[name]
An object providing a [link:https://en.wikipedia.org/wiki/Mask_(computing) bit mask] and accessor methods
used to control an [page:Object3D]'s visibility.
A [page:Layers] object assigns an [page:Object3D] to 0 or more of 32 layers numbered 0 to 31.
This is used to control visibility - an object must share a layer with a [page:Camera camera]
to be visible when that camera's view is renderered.
All classes that inherit from [page:Object3D] have a [property:layers] property which is an instance
of this class.
Constructor
[name]()
Create a new Layers object, with an initial mask set to layer 1.
Properties
[property:Integer mask]
Internal layer mask.
Methods
[method:null disable]( [page:Integer layer] )
layer - an integer from 0 to 31.
Remove *layer* from the mask.
[method:null enable]( [page:Integer layer] )
layer - an integer from 0 to 31.
Add *layer* to the mask.
[method:null set]( [page:Integer layer] )
layer - an integer from 0 to 31.
Set the layer mask to the value *layer*.
[method:Boolean test]( [page:Integer layers] )
layers - a 32bit bit mask of layer numbers.
Returns true if *layers* and [page:.mask] have any bits set in common.
[method:null toggle]( [page:Integer layer] )
layer - an integer from 0 to 31.
Toggle the *layer* value in the mask.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]