A constraint allows to show/hide object depending on 3D viewport width/height or orientation settings.
Constraints are used to set up various relations between objects by affecting their position, rotation and scale. Can be used with the Object3D.constraints property.
The constructor takes no arguments.
See the base Constraint class for common properties.
The current application. Default is undefined
.
Used to check whether this or derived classes are canvas breakpoints constraints. Default is true
.
Maximum canvas height the object stays visible. Default is Infinity
.
Maximum canvas width the object stays visible. Default is Infinity
.
Minimum canvas height the object stays visible. Default is 0
.
Minimum canvas width the object stays visible. Default is 0
.
Screen orientation the object stays visible. Default is 'ALL'
.
'ALL'
'LANDSCAPE'
'PORTRAIT'
The constraint's type. Equals to 'CanvasBreakpointsConstraint'
.
camera — the current camera in scene.
scene — the scene in which we are looking for the camera.
width — the canvas width.
height — the canvas height.
Returns an alternative camera (with acceptable visibility breakpoints) in the scene, if no alternative camera is found, returns null
.
See the base Constraint class for common methods.
For more info on how to obtain the source code of this module see this page.