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 |
|---|---|---|---|
|
|
any |
Returns the current camera in the scene. cf MainCamera | |
|
{ ComponentManager } - The component manager for the current game. | |||
|
|
boolean | ||
|
{ game: import("..").Game; externalApi: any; server?: import("../@types/states").Server; disableScripts?: boolean; signals?: import("..").GameSignals; loadOpts?: { looseMode?: boolean; }; } | |||
|
{ PhysicsRapierWrapper } - The physics manager for the current game. Currently only Rapier is supported. | |||
|
ComponentsRegistry |
{ ComponentsRegistry } - The components registry for the current game. | ||
|
ResourceManager |
{ ResourceManager } - The resources manager for the current game. | ||
|
|
string |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Takes a screenshot of the current frame. Returns a promise that resolves to the data URL of the screenshot. | ||
|
Use this method to pause the current game. | ||
|
Use this method to resume the current game. | ||
|
Use this method to start the current game. | ||
|
Use this method to stop the current game. |