Space class
Repersents the container for all objects in the scene for the current game.
This class is a wrapper around the ThreeJS Group (opens in a new tab) class.
Signature:
export class Space extends AugmentedGroup
Extends: AugmentedGroup
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Space
class.
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
camera | readonly | any | Returns the current camera in the scene. cf MainCamera |
components | ComponentManager | { ComponentManager } - The component manager for the current game. | |
options | any | ||
physics | PhysicsRapierWrapper | { PhysicsRapierWrapper } - The physics manager for the current game. Currently only Rapier is supported. |
Methods
Method | Modifiers | Description |
---|---|---|
captureFrame(opts) | Takes a screenshot of the current frame. Returns a promise that resolves to the data URL of the screenshot. | |
pause(payload) | Use this method to pause the current game. | |
resume(payload) | Use this method to resume the current game. | |
start(payload) | Use this method to start the current game. | |
stop(payload) | Use this method to stop the current game. |