Interface AddAssetOptions

interface AddAssetOptions {
    addToRoot?: boolean;
    autoCenter?: boolean;
    autoScale?: boolean;
    autoScaleRadius?: number;
    autoSetBackground?: boolean;
    autoSetEnvironment?: boolean;
    centerGeometries?: boolean;
    centerGeometriesKeepPosition?: boolean;
    clearSceneObjects?: boolean;
    disposeSceneObjects?: boolean;
    importConfig?: boolean;
    license?: string;
}

Hierarchy (view full)

Properties

addToRoot?: boolean

Add directly to the RootScene object instead of RootScene.modelRoot

Default

false
autoCenter?: boolean

Automatically center the object in the scene.

Default

false
autoScale?: boolean

Automatically scale the object according to its bounding box and the autoScaleRadius setting

Default

false
autoScaleRadius?: number

Radius to use for autoScale autoScale must be true for this to work.

Default

2
autoSetBackground?: boolean

Automatically set any loaded image(ITexture) file as the scene background

autoSetEnvironment?: boolean

Automatically set any loaded HDR, EXR file as the scene environment map

Default

true
centerGeometries?: boolean

Automatically center the geometries(pivots) in the object hierarchy before adding.

Default

false
centerGeometriesKeepPosition?: boolean

This centers the geometry while keeping the world position, i.e the mesh(Object3D) positions will change. centerGeometries must be true for this to work.

Default

true
clearSceneObjects?: boolean

Clear the viewer scene objects before the new object is added. Same as disposeSceneObjects but does not dispose the objects.

disposeSceneObjects?: boolean

Dispose all the scene objects before the new object is added. Same as clearSceneObjects but also disposes the objects.

importConfig?: boolean

any attached viewer config will be ignored if this is set to true

Default

true
license?: string

Add a license to the object

Generated using TypeDoc