SceneInterface interface

Contract for scenes.

Signature:

interface SceneInterface extends EventEmitter<SceneEvents> 

Extends: EventEmitter<SceneEvents>

Remarks

Scenes allow for visualization of a Model or Design. The options and behavior are standardized across adapters.

Properties

Property

Modifiers

Type

Description

camera

readonly

Required<Exclude<SceneOptions['camera'], string>>

The current camera details.

distance

readonly

number

The distance to the target.

element

readonly

HTMLCanvasElement

The canvas element.

isSupported

readonly

boolean

Whether the scene is supported in the current context.

options

readonly

SceneOptions

The current scene options.

size

readonly

[number, number]

The current size of the scene.

target

readonly

Design | undefined

The current target of the scene.

Methods

Method

Description

configure(options)

Method for updating scene options.

dispose()

Dispose of the scene and internals.

fit()

Attempt to adjust the camera to fit the model within the viewport.

invalidate()

Invalidate the scene.

load()

Load the scene, prepare internal resources.

reset()

Reset the camera to its original configured position.

screenshot()

Capture a screenshot of the scene.

start()

Start the render loop.

stop()

Stop the render loop.

update()

Manually render the scene.

Get in touch

We'd love to learn more about your vision and how we can help.

PressPrivacyTermsSupportCopyright © 2024 Core3D, Inc. All Rights Reserved.