Skip to Content
Bear documentation

workbench

Import from bear/engine/workbench.

Interfaces

Workbench

Defined in: bear/engine/workbench.ts:32

Properties

PropertyModifierTypeDescription
currentreadonlyBuilt | nullWhat was last built, until the next build starts or clear.

Methods

build()
build(source): Promise<Model>;

Defined in: bear/engine/workbench.ts:35

Parameters
ParameterType
sourceModelSource
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
ParameterType
sourceModelSource
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

PropertyType
modelModel
sourceModelSource

ModelSource

type ModelSource = ModelExport & object;

Defined in: bear/engine/workbench.ts:27

A built module and the export of it to materialize.

Type Declaration

NameType
urlstring

Functions

createWorkbench()

function createWorkbench(options?): Workbench;

Defined in: bear/engine/workbench.ts:43

Parameters

ParameterType
options?Omit<MaterializeOptions, "shapes">

Returns

Workbench

On this page