Render
Direct Subclass:
Base class for all Renders
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: object, defOptions: object, element: HTMLElement) |
|
Member Summary
| Public Members | ||
| public |
element: HTMLElement DOM Element to attach the renderer to |
|
| public |
options: { Combined options |
|
| public |
|
|
Method Summary
| Public Methods | ||
| public |
addToScene(toAdd: *) Adds an object to the scene & sets userData.renderType to this renderer's type |
|
| public |
clearScene(onlySelfType: *, filterFn: *) Clears the scene |
|
| public |
dispose() |
|
| public |
Export the current scene content in the .gltf format (geometries + textures) |
|
| public |
|
|
| public |
Export the current scene content in the .obj format (only geometries, no textures) |
|
| public |
toPLY(exportOptions: *): * |
|
| Protected Methods | ||
| protected |
Initializes the scene |
|
Public Constructors
public constructor(options: object, defOptions: object, element: HTMLElement) source
Params:
| Name | Type | Attribute | Description |
| options | object | The options for this renderer, see defaultOptions |
|
| defOptions | object | Additional default options, provided by the individual renders |
|
| element | HTMLElement |
|
DOM Element to attach the renderer to - defaults to document.body |
Public Members
Public Methods
public addToScene(toAdd: *) source
Adds an object to the scene & sets userData.renderType to this renderer's type
Params:
| Name | Type | Attribute | Description |
| toAdd | * | object to add |
public clearScene(onlySelfType: *, filterFn: *) source
Clears the scene
Params:
| Name | Type | Attribute | Description |
| onlySelfType | * | whether to remove only objects whose type is equal to this renderer's type (useful for combined render) |
|
| filterFn | * | Filter function to check which children of the scene to remove |
public dispose() source
public toGLTF(exportOptions: *): Promise<any> source
Export the current scene content in the .gltf format (geometries + textures)
Params:
| Name | Type | Attribute | Description |
| exportOptions | * |
public toObj(): string source
Export the current scene content in the .obj format (only geometries, no textures)
public toPLY(exportOptions: *): * source
Params:
| Name | Type | Attribute | Description |
| exportOptions | * |
Return:
| * |
Reference
Source
