ClippingSystem

ClippingSystem ⇐ MRSystem

This system supports 3D clipping following threejs’s clipping planes setup. See https://threejs.org/docs/?q=material#api/en/materials/Material.clippingPlanes for more information.

Kind: global class
Extends: MRSystem

clippingSystem.ClippingSystem

Kind: instance class of ClippingSystem

new exports.ClippingSystem()

ClippingSystem’s default constructor that sets up coplanar points and the default clipping information.

clippingSystem.update(deltaTime, frame)

The generic system update call. Updates the clipped view of every entity in this system’s registry.

Kind: instance method of ClippingSystem

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

clippingSystem.updatePlanes(entity)

Updates the stored clipping planes to be based on the passed in entity.

Kind: instance method of ClippingSystem

Param Type Description
entity MREntity given entity that will be used to create the clipping planes positioning.

clippingSystem.applyClipping(entity, clipping)

Helper method for onNewEntity. Actually applies the clipping planes to the material setup for rendering. Uses threejs in the background following https://threejs.org/docs/?q=material#api/en/materials/Material.clippingPlanes

Kind: instance method of ClippingSystem

Param Type Description
entity MREntity the entity to be clipped
clipping MRClippingGeometry the clipping information to be passed to the material

clippingSystem.addClippingPlanes(entity)

Helper method for onNewEntity. Creates a clipping planes information (still writing this description)

Kind: instance method of ClippingSystem

Param Type Description
entity MREntity the entity to which we’re adding the clipping planes information

clippingSystem.entityEventUpdate(e)

a function called when a specific entity has an event update

Kind: instance method of ClippingSystem

Param Type Description
e Event the event generated by the entity

clippingSystem.onNewEntity(entity)

When the system swaps to a new entity, this handles applying the clipping planes as needed in the system run.

Kind: instance method of ClippingSystem

Param Type Description
entity MREntity given entity that will be clipped by the planes.