MaskingSystem
Classes
- MaskingSystem ⇐
MRSystem
Handles specific needs for setting up the masking for all necessary items.
Functions
- setupMaskingMaterial(material, shiftBit, debug)
Setting up a material for an object that maskes other elements
- setupMaskedMaterial(material, shiftBit)
Setting up a material for an object that is masked by another element
MRSystem
MaskingSystem ⇐ Handles specific needs for setting up the masking for all necessary items.
Kind: global class
Extends: MRSystem
- MaskingSystem ⇐
MRSystem
maskingSystem.MaskingSystem
Kind: instance class of MaskingSystem
new exports.MaskingSystem()
MaskingSystem’s default constructor.
maskingSystem.update(deltaTime, frame)
…
Kind: instance method of MaskingSystem
Param | Type | Description |
---|---|---|
deltaTime | number |
given timestep to be used for any feature changes |
frame | object |
given frame information to be used for any feature changes |
maskingSystem.sync()
Copy the source world matrices to the objects writing to stencil buffer
Kind: instance method of MaskingSystem
maskingSystem.onNewEntity(entity)
Called when a new entity is added to the scene. Handles masking elements to their panel.
Kind: instance method of MaskingSystem
Param | Type | Description |
---|---|---|
entity | MREntity |
the entity being added. |
setupMaskingMaterial(material, shiftBit, debug)
Setting up a material for an object that maskes other elements
Kind: global function
Param | Type | Default | Description |
---|---|---|---|
material | THREE.Material |
the material whose values are augmented to mask as expected. | |
shiftBit | number |
used to offset the stencilWriteMask and stencilRef. | |
debug | boolean |
false |
true if in debug mode, false otherwise |
setupMaskedMaterial(material, shiftBit)
Setting up a material for an object that is masked by another element
Kind: global function
Param | Type | Description |
---|---|---|
material | THREE.Material |
the material whose values are augmented to mask as expected. |
shiftBit | number |
used to offset the stencilWriteMask and stencilRef. |