Scene
Extends:
The Scene is a manager of Items and also links to a ThreeJS scene.
Constructor Summary
| Public Constructor | ||
| public |
constructor(model: *, textureDir: *) Constructs a scene. |
|
Member Summary
| Public Members | ||
| public |
gltfloader: * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
items: *[] |
|
| public |
loader: * |
|
| public |
model: * |
|
| public |
|
|
| public |
objloader: * |
|
| public |
scene: * |
|
| public |
textureDir: * |
|
Method Summary
| Public Methods | ||
| public |
add(mesh: *) Adds a non-item, basically a mesh, to the scene. |
|
| public |
addItem(itemType: *, fileName: *, metadata: *, position: *, rotation: *, scale: *, fixed: *, newItemDefinitions: *) Creates an item and adds it to the scene. |
|
| public |
Removes all items. |
|
| public |
getItems(): * Gets the items. |
|
| public |
getScene(): * Gets the scene. |
|
| public |
itemCount(): * Gets the count of items. |
|
| public |
remove(mesh: *) Removes a non-item, basically a mesh, from the scene. |
|
| public |
removeItem(item: *, dontRemove: *) Removes an item. |
|
| public |
switchWireframe(flag: *) |
|
Public Constructors
public constructor(model: *, textureDir: *) source
Constructs a scene.
Params:
| Name | Type | Attribute | Description |
| model | * | The associated model. |
|
| textureDir | * | The directory from which to load the textures. |
Public Members
public gltfloader: * source
public itemLoadedCallbacks: * source
public itemLoadingCallbacks: * source
public itemRemovedCallbacks: * source
public items: *[] source
public loader: * source
public model: * source
public objloader: * source
public scene: * source
public textureDir: * source
Public Methods
public add(mesh: *) source
Adds a non-item, basically a mesh, to the scene.
Params:
| Name | Type | Attribute | Description |
| mesh | * | The mesh to be added. |
public addItem(itemType: *, fileName: *, metadata: *, position: *, rotation: *, scale: *, fixed: *, newItemDefinitions: *) source
Creates an item and adds it to the scene.
Params:
| Name | Type | Attribute | Description |
| itemType | * | The type of the item given by an enumerator. |
|
| fileName | * | The name of the file to load. |
|
| metadata | * | TODO |
|
| position | * | The initial position. |
|
| rotation | * | The initial rotation around the y axis. |
|
| scale | * | The initial scaling. |
|
| fixed | * | True if fixed. |
|
| newItemDefinitions | * | Object with position and 'edge' attribute if it is a wall item |
public remove(mesh: *) source
Removes a non-item, basically a mesh, from the scene.
Params:
| Name | Type | Attribute | Description |
| mesh | * | The mesh to be removed. |
public removeItem(item: *, dontRemove: *) source
Removes an item.
Params:
| Name | Type | Attribute | Description |
| item | * | The item to be removed. |
|
| dontRemove | * | If not set, also remove the item from the items list. |
public switchWireframe(flag: *) source
Params:
| Name | Type | Attribute | Description |
| flag | * |