Prefab

A Prefab is a predefined Object3D that we store in a .roguePrefab file along with all components associated to the object itself or its children.

An instance of this class provides the information to load a Prefab and the means to instantiate it.

Properties

.uuid

readonly uuid: string;

The unique identifier for the Prefab.

.path

readonly path: string;

The current path to the Prefab file.

.name

readonly name: string;

The name of the Prefab.

Methods

.instantiate

instantiate(parent?: THREE.Object3D): THREE.Object3D;

This method instantiates the Prefab either directly into the Scene or, optionally, a given Object3D.