diff --git a/source/pages/02Javascript API.md b/source/pages/02Javascript API.md index 78662aa..c5ee674 100644 --- a/source/pages/02Javascript API.md +++ b/source/pages/02Javascript API.md @@ -67,6 +67,7 @@ The default representation of an MRSystem to be expanded upon by actual details * [.MRSystem](#MRSystem+MRSystem) * [new exports.MRSystem(useComponents, frameRate)](#new_MRSystem+MRSystem_new) * [.alwaysNeedsSystemUpdate()](#MRSystem+alwaysNeedsSystemUpdate) ⇒ boolean + * [.alwaysNeedsSystemUpdate()](#MRSystem+alwaysNeedsSystemUpdate) * [.needsSystemUpdate()](#MRSystem+needsSystemUpdate) ⇒ boolean * [.needsSystemUpdate()](#MRSystem+needsSystemUpdate) * [._update(deltaTime, frame)](#MRSystem+_update) @@ -102,6 +103,13 @@ Useful for readability and to not need to check against undefined often. **Kind**: instance method of [MRSystem](#MRSystem) **Returns**: boolean - true if the internal _needsSystemUpdate is set to 'undefined', false otherwise. + + +### mrSystem.alwaysNeedsSystemUpdate() +Sets the system ito always run (true) or to be in a state that allows for toggling on and off (false). +Useful for readability and to not need to check against undefined often. + +**Kind**: instance method of [MRSystem](#MRSystem) ### mrSystem.needsSystemUpdate() ⇒ boolean @@ -1547,6 +1555,8 @@ creates and manages WebXR anchors in the MR scene. * [AnchorSystem](#AnchorSystem) ⇐ MRSystem * [.AnchorSystem](#AnchorSystem+AnchorSystem) * [new exports.AnchorSystem()](#new_AnchorSystem+AnchorSystem_new) + * [.needsSystemUpdate()](#AnchorSystem+needsSystemUpdate) ⇒ boolean + * [.needsSystemUpdate()](#AnchorSystem+needsSystemUpdate) * [.update(deltaTime, frame)](#AnchorSystem+update) * [.attachedComponent(entity)](#AnchorSystem+attachedComponent) * [.updatedComponent(entity)](#AnchorSystem+updatedComponent) @@ -1569,6 +1579,22 @@ creates and manages WebXR anchors in the MR scene. #### new exports.AnchorSystem() AnchorSystem's default constructor including setting up event listeners for XR initialization, user interaction, and the MRPlaneManager + + +### anchorSystem.needsSystemUpdate() ⇒ boolean +Getter to checks if we need to run this system's update call. Overridden implementation returns true if there are any items in this +systems anchoringQueue that need to be run OR the default systemUpdateCheck is true +(see [MRSystem.needsSystemUpdate](https://docs.mrjs.io/javascript-api/#mrsystem.needssystemupdate) for default). + +**Kind**: instance method of [AnchorSystem](#AnchorSystem) +**Returns**: boolean - true if the system is in a state where this system is needed to update, false otherwise + + +### anchorSystem.needsSystemUpdate() +Since this class overrides the default `get` for the `needsSystemUpdate` call, the `set` pair is needed for javascript to be happy. +Relies on the parent's implementation. (see [MRSystem.needsSystemUpdate](https://docs.mrjs.io/javascript-api/#mrsystem.needssystemupdate) for default). + +**Kind**: instance method of [AnchorSystem](#AnchorSystem) ### anchorSystem.update(deltaTime, frame)