GameObject

Revision as of 17:08, 27 June 2023 by Evert (talk | contribs) (Created page with "'''GameObject''' is the base class for all objects in the game. Internally in the game client it extends [https://threejs.org/docs/index.html?q=objec#api/en/core/Object3D Object3D]. == Properties == === <code>objectType: string</code> <small>[archivable] [replicated] [read-only]</small> === String representation of the object type. === <code>uuid: string</code> <small>[archivable] [replicated] [read-only]</small> === Internal wikipedia:Universally_unique_identifier|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

GameObject is the base class for all objects in the game. Internally in the game client it extends Object3D.

Properties

objectType: string [archivable] [replicated] [read-only]

String representation of the object type.

uuid: string [archivable] [replicated] [read-only]

Internal UUID of this object.

name: string [archivable] [replicated]

User-defined name of the object. Defaults to the object type.

visible: boolean [archivable] [replicated]

Visibility of the object in the scene.

archivable: boolean [archivable] [replicated]

When set to false, this object will not be serialized into the save file.

Methods

serialize(): SerializedObject

Return the save data for this object.

setOwnProperty(key: string, value: unknown): void

This function can be used to modify any property of the object by key.

deserialize(input: SerializedObject): void

Deserialize a serialized object into properties on this object.