MRPlaneManager

MRPlaneManager

creates and manages the MRjs representation of XR planes. The resulting planes have RAPIER rigid bodies and THREE.js meshes that occlude virtual content by default

Kind: global class

mrPlaneManager.MRPlaneManager

Kind: instance class of MRPlaneManager

new exports.MRPlaneManager(scene, occlusion)

Param Type Description
scene object the MRApp’s threejs scene object
occlusion boolean whether or not the MRPlaneManager should make the planes visible or not

mrPlaneManager.initPlane(plane, width, height) ⇒ object

Initializes the MRPlane for this.currentPlanes at the ‘plane’ key

Kind: instance method of MRPlaneManager
Returns: object - MRPlane - the MRPlane object that was initialized by this function.

Param Type Description
plane object the map key of this.currentPlanes for which we want to initPlane to fill in its value.
width number expected width of the new MRPlane
height number expected height of the new MRPlane

mrPlaneManager.removePlane(plane, mrplane)

Removes the MRPlane from the scene and removes the plane object from the currentPlanes map.

Kind: instance method of MRPlaneManager

Param Type Description
plane object plane object associated with this specific MRPlane in the scene
mrplane object the specific MRPlane object being removed from the scene

mrPlaneManager.initPhysicsBody() ⇒ object

Initializes the physics body of an MRPlane

Kind: instance method of MRPlaneManager
Returns: object - body - the created rigid body for the plane