API referenceEngine
workbench
Import from bear/engine/workbench.
Interfaces
Workbench
Defined in: bear/engine/workbench.ts:32
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
current | readonly | Built | null | What was last built, until the next build starts or clear. |
Methods
build()
build(source): Promise<Model>;Defined in: bear/engine/workbench.ts:35
Parameters
| Parameter | Type |
|---|---|
source | ModelSource |
Returns
Promise<Model>
clear()
clear(): void;Defined in: bear/engine/workbench.ts:38
Free the current model. Its shapes stay for the next build.
Returns
void
dispose()
dispose(): void;Defined in: bear/engine/workbench.ts:40
Free the current model and every shape.
Returns
void
scene()
scene(source): Promise<Scene<Object3DEventMap>>;Defined in: bear/engine/workbench.ts:36
Parameters
| Parameter | Type |
|---|---|
source | ModelSource |
Returns
Promise<Scene<Object3DEventMap>>
Type Aliases
Built
type Built = object;Defined in: bear/engine/workbench.ts:30
A model and what it was built from.
Properties
| Property | Type |
|---|---|
model | Model |
source | ModelSource |
ModelSource
type ModelSource = ModelExport & object;Defined in: bear/engine/workbench.ts:27
A built module and the export of it to materialize.
Type Declaration
| Name | Type |
|---|---|
url | string |
Functions
createWorkbench()
function createWorkbench(options?): Workbench;Defined in: bear/engine/workbench.ts:43
Parameters
| Parameter | Type |
|---|---|
options? | Omit<MaterializeOptions, "shapes"> |