Skip to main content

Module: Core-API

Classes

Interfaces

Enumerations

Functions

makeFilter

makeFilter<Tid, TPass>(viewer, filter, updaters?): IFilter<TPass, Tid>

Type parameters

NameType
Tidextends string
TPassextends IPass<TPass>

Parameters

NameType
viewerIViewerApp
filterPartialPick<IFilter<TPass, Tid>, "passId" | "passObject">
updaters?(undefined | IShaderPropertiesUpdater)[] | () => (undefined | IShaderPropertiesUpdater)[]

Returns

IFilter<TPass, Tid>

Defined in

webgi/src/core/AViewerPlugin.ts:82


createRenderTargetKey

createRenderTargetKey(op?): string

Parameters

NameType
opCreateRenderTargetOptions

Returns

string

Defined in

webgi/src/core/threejs/BaseRenderer.ts:552


setupObject3dModel

setupObject3dModel(obj, modelProcessor): IModel<Object3D<Event>>

Setup an Object3DModel with a model processor

Parameters

NameType
objIModel<Object3D<Event>>
modelProcessor(m: IModel<any>) => undefined | IModel<any>

Returns

IModel<Object3D<Event>>

Defined in

webgi/src/core/threejs/Object3DModel.ts:226


setupIModel

setupIModel(object, parent?, modelProcessor?): IModel & Object3D

Converts three.js Object3D to IModel, setup object events, adds utility methods, and runs model processor.

Parameters

NameType
objectObject3D<Event> & IModel<any>
parent?IModel<any>
modelProcessor?(m: IModel<any>) => undefined | IModel<any>

Returns

IModel & Object3D

Defined in

webgi/src/core/threejs/iModelSetup.ts:13


setMeshMaterial

setMeshMaterial(mesh, material): IMaterial[]

Parameters

NameType
meshMesh<BufferGeometry, Material | Material[]> & IModel<any> & Line<BufferGeometry, Material | Material[]> & IModel<any>
materialundefined | null | IMaterial<any> | IMaterial<any>[]

Returns

IMaterial[]

Defined in

webgi/src/core/threejs/iModelSetup.ts:246


setMeshGeometry

setMeshGeometry(mesh, geometry, force?): BufferGeometry | undefined

Parameters

NameTypeDefault value
meshMesh<BufferGeometry, Material | Material[]> & IModel<any> & Line<BufferGeometry, Material | Material[]> & IModel<any>undefined
geometryundefined | null | BufferGeometryundefined
forcebooleanfalse

Returns

BufferGeometry | undefined

Defined in

webgi/src/core/threejs/iModelSetup.ts:286


copyObject3DUserData

copyObject3DUserData(dest, source): any

Parameters

NameType
destany
sourceany

Returns

any

Defined in

webgi/src/core/threejs/iModelSetup.ts:317


getTextureDataType

getTextureDataType(renderer?): TextureDataType

Parameters

NameType
renderer?WebGLRenderer

Returns

TextureDataType

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:558


makeSamplerUi

makeSamplerUi<T>(mat, map): UiObjectConfig<any, string>

Type parameters

NameType
Textends IMaterial<any, T> & { map: null | Texture }

Parameters

NameType
matT
mapkeyof T

Returns

UiObjectConfig<any, string>

Defined in

webgi/src/extras/asset_manager/threejs/materialUtils.ts:19


copyMaterialUserData

copyMaterialUserData(dest, source): any

Parameters

NameType
destany
sourceany

Returns

any

Defined in

webgi/src/extras/asset_manager/threejs/materialUtils.ts:195


copyTextureUserData

copyTextureUserData(dest, source): any

Parameters

NameType
destany
sourceany

Returns

any

Defined in

webgi/src/extras/asset_manager/threejs/materialUtils.ts:208


uiConfig

uiConfig(uiType?, params?): PropertyDecorator

Parameters

NameType
uiType?string
params?AnyOptions

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:6


uiToggle

uiToggle(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:27


uiMonitor

uiMonitor(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:30


uiSlider

uiSlider(label?, bounds?, stepSize?, params?): PropertyDecorator

Parameters

NameType
label?string
bounds?[number, number]
stepSize?number
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:33


uiVector

uiVector(label?, bounds?, stepSize?, params?): PropertyDecorator

Parameters

NameType
label?string
bounds?[number, number]
stepSize?number
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:36


uiDropdown

uiDropdown(label?, children?, params?): PropertyDecorator

Parameters

NameType
label?string
children?UiObjectConfig<any, string>[]
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:39


uiButton

uiButton(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:43


uiInput

uiInput(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:46


uiColor

uiColor(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:49


uiImage

uiImage(label?, params?): PropertyDecorator

Parameters

NameType
label?string
params?any

Returns

PropertyDecorator

Defined in

webgi/src/ui/uiConfigDecorators.ts:52


generateUiConfig

generateUiConfig(obj): UiObjectConfig[]

Parameters

NameType
objany

Returns

UiObjectConfig[]

Defined in

webgi/src/ui/uiConfigDecorators.ts:56


generateUiFolder

generateUiFolder(label, obj, params?, type?): UiObjectConfig

Parameters

NameTypeDefault value
labelstringundefined
objanyundefined
paramsany{}
typestring'folder'

Returns

UiObjectConfig

Defined in

webgi/src/ui/uiConfigDecorators.ts:103


uiFolder

uiFolder(label, params?, type?): <T>(constructor: T) => { prototype: __class<any> } & T

Parameters

NameTypeDefault value
labelstringundefined
params?anyundefined
typestring'folder'

Returns

fn

▸ <T>(constructor): { prototype: __class<any> } & T

Type parameters
NameType
Textends (...args: any[]) => any
Parameters
NameType
constructorT
Returns

{ prototype: __class<any> } & T

Defined in

webgi/src/ui/uiConfigDecorators.ts:113


uiPanel

uiPanel(label, params?): <T>(constructor: T) => { prototype: __class<any> } & T

Parameters

NameType
labelstring
params?any

Returns

fn

▸ <T>(constructor): { prototype: __class<any> } & T

Type parameters
NameType
Textends (...args: any[]) => any
Parameters
NameType
constructorT
Returns

{ prototype: __class<any> } & T

Defined in

webgi/src/ui/uiConfigDecorators.ts:121

Type aliases

TOrbitControlsEvents

Ƭ TOrbitControlsEvents: "change" | "end" | "start"

Defined in

webgi/src/core/threejs/CameraController.ts:20


TControlsCtor

Ƭ TControlsCtor: (camera: Camera, domElement: HTMLElement | Document) => TCameraControls

Type declaration

▸ (camera, domElement): TCameraControls

Parameters
NameType
cameraCamera
domElementHTMLElement | Document
Returns

TCameraControls

Defined in

webgi/src/core/threejs/CameraController.ts:21


TCameraControls

Ƭ TCameraControls: ICameraControls<"change" | string>

Defined in

webgi/src/core/threejs/CameraController.ts:31


Object3DModelOptions

Ƭ Object3DModelOptions: AddModelOptions & { pseudoCenter?: boolean ; autoCenter?: boolean ; license?: string }

Defined in

webgi/src/core/threejs/Object3DModel.ts:9


IAssetID

Ƭ IAssetID: string

Defined in

webgi/src/extras/asset_manager/AssetManager.ts:23


ExportFileOptions

Ƭ ExportFileOptions: { exportExt?: string ; viewerConfig?: boolean } & GLTFExporter2Options & AnyOptions

Defined in

webgi/src/extras/asset_manager/AssetManager.ts:52


ProcessImportedOptions

Ƭ ProcessImportedOptions: { processImported?: boolean ; forceImporterReprocess?: boolean ; rootPath?: string ; generateMipmaps?: boolean ; _testDataTextureComplete?: boolean } & Object3DModelOptions & AnyOptions

Defined in

webgi/src/extras/asset_manager/AssetManager.ts:68


ImportFilesOptions

Ƭ ImportFilesOptions: ProcessImportedOptions & ImportFileOptions & { allowedExtensions?: string[] }

Defined in

webgi/src/extras/asset_manager/AssetManager.ts:85


ImportAssetOptions

Ƭ ImportAssetOptions: { forceImport?: boolean ; reimportDisposed?: boolean ; pathOverride?: string } & ProcessImportedOptions & ImportFileOptions & AnyOptions

Defined in

webgi/src/extras/asset_manager/AssetManager.ts:87


ImportAddOptions

Ƭ ImportAddOptions: ImportAssetOptions & AddModelOptions & AddObjectOptions

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:26


AddImportedOptions

Ƭ AddImportedOptions: ProcessImportedOptions & AddObjectOptions & AddModelOptions

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:27


Class

Ƭ Class<T>: (...args: any[]) => T

Type parameters

Name
T

Type declaration

• (...args)

Parameters
NameType
...argsany[]

Defined in

webgi/src/interfaces.ts:14


PartialRecord

Ƭ PartialRecord<K, T>: { [P in K]?: T }

Type parameters

NameType
Kextends keyof any
TT

Defined in

webgi/src/interfaces.ts:16


PartialPick

Ƭ PartialPick<T, K>: Partial<T> & Pick<T, K>

Type parameters

NameType
TT
Kextends keyof T

Defined in

webgi/src/interfaces.ts:20


AnyOptions

Ƭ AnyOptions: Record<string, any>

Defined in

webgi/src/interfaces.ts:24


TAssetTypes

Ƭ TAssetTypes: "model" | "texture" | "light" | "material"

Defined in

webgi/src/interfaces.ts:28


IFile

Ƭ IFile: Partial<File> & { name: string ; type: string ; objectUrl?: string ; importId?: string ; ext?: string }

Defined in

webgi/src/interfaces.ts:30


ISceneObject

Ƭ ISceneObject<T>: IModel<T> | ILight<T> | ITexture<T> | IMaterial<T> & IUiConfigContainer

Type parameters

NameType
Tany

Defined in

webgi/src/interfaces.ts:52


TSceneEvents

Ƭ TSceneEvents: "sceneUpdate" | "addSceneObject" | "update" | "textureAdded" | "activeCameraChange" | "activeCameraUpdate" | "sceneMaterialUpdate" | "environmentChanged" | "select" | "objectUpdate" | "materialUpdate" | "setView" | "activateMain"

Defined in

webgi/src/interfaces.ts:62


TCameraControlsMode

Ƭ TCameraControlsMode: "" | "orbit" | "deviceOrientation" | "firstPerson" | "pointerLock" | string

Defined in

webgi/src/interfaces.ts:206


IGeometry

Ƭ IGeometry: any

Others

Defined in

webgi/src/interfaces.ts:291


IShader

Ƭ IShader: IEventDispatcher<string>

Defined in

webgi/src/interfaces.ts:351


IPassID

Ƭ IPassID: string

Defined in

webgi/src/interfaces.ts:353


TUiRefreshModes

Ƭ TUiRefreshModes: "preRender" | "postRender" | "preFrame" | "postFrame"

UI

Defined in

webgi/src/interfaces.ts:510


UiObjectType

Ƭ UiObjectType: string

Defined in

webgi/src/interfaces.ts:511


TViewerScreenShaderFrag

Ƭ TViewerScreenShaderFrag: string | [string, string] | { pars?: string ; main: string }

Defined in

webgi/src/viewer/ViewerApp.ts:54


TViewerScreenShader

Ƭ TViewerScreenShader: TViewerScreenShaderFrag | ShaderPass2

Defined in

webgi/src/viewer/ViewerApp.ts:55


EnvMapBackground

Ƭ EnvMapBackground: "envMapBackground"

Type for {@see envMapBackground}

Defined in

webgi/src/viewer/ViewerApp.ts:888

Variables

iGeometryIgnoredUserData

Const iGeometryIgnoredUserData: string[]

Defined in

webgi/src/core/threejs/iModelSetup.ts:315


iModelIgnoredUserData

Const iModelIgnoredUserData: string[]

Defined in

webgi/src/core/threejs/iModelSetup.ts:316


basicMaterialPropList

Const basicMaterialPropList: Object

Type declaration

NameType
namestring
fogboolean
blendingBlending
sideSide
vertexColorsboolean
opacitynumber
transparentboolean
blendSrcBlendingDstFactor
blendDstBlendingDstFactor
blendEquationBlendingEquation
blendSrcAlphanull
blendDstAlphanull
blendEquationAlphanull
depthFuncDepthModes
depthTestboolean
depthWriteboolean
stencilWriteMasknumber
stencilFuncStencilFunc
stencilRefnumber
stencilFuncMasknumber
stencilFailStencilOp
stencilZFailStencilOp
stencilZPassStencilOp
stencilWriteboolean
clippingPlanesnull
clipIntersectionboolean
clipShadowsboolean
shadowSidenull
colorWriteboolean
precisionnull
polygonOffsetboolean
polygonOffsetFactornumber
polygonOffsetUnitsnumber
ditheringboolean
alphaTestnumber
alphaToCoverageboolean
premultipliedAlphaboolean
visibleboolean
toneMappedboolean
userData{}
wireframeLinecapstring
wireframeLinejoinstring
colorstring
mapnull
lightMapnull
lightMapIntensitynumber
aoMapnull
aoMapIntensitynumber
alphaMapnull
envMapnull
combineCombine
reflectivitynumber
refractionRationumber
wireframeboolean
wireframeLinewidthnumber
skinningboolean

Defined in

webgi/src/extras/asset_manager/threejs/MeshBasicMaterial2.ts:30


standardMaterialPropList

Const standardMaterialPropList: Object

Type declaration

NameType
namestring
fogboolean
blendingBlending
sideSide
vertexColorsboolean
opacitynumber
transparentboolean
blendSrcBlendingDstFactor
blendDstBlendingDstFactor
blendEquationBlendingEquation
blendSrcAlphanull
blendDstAlphanull
blendEquationAlphanull
depthFuncDepthModes
depthTestboolean
depthWriteboolean
stencilWriteMasknumber
stencilFuncStencilFunc
stencilRefnumber
stencilFuncMasknumber
stencilFailStencilOp
stencilZFailStencilOp
stencilZPassStencilOp
stencilWriteboolean
clippingPlanesnull
clipIntersectionboolean
clipShadowsboolean
shadowSidenull
colorWriteboolean
precisionnull
polygonOffsetboolean
polygonOffsetFactornumber
polygonOffsetUnitsnumber
ditheringboolean
alphaTestnumber
alphaToCoverageboolean
premultipliedAlphaboolean
visibleboolean
toneMappedboolean
userData{}
wireframeLinecapstring
wireframeLinejoinstring
colorstring
roughnessnumber
metalnessnumber
mapnull
lightMapnull
lightMapIntensitynumber
aoMapnull
aoMapIntensitynumber
emissivestring
emissiveIntensitynumber
emissiveMapnull
bumpMapnull
bumpScalenumber
normalMapnull
normalMapTypeNormalMapTypes
normalScaleVector2
displacementMapnull
displacementScalenumber
displacementBiasnumber
roughnessMapnull
metalnessMapnull
alphaMapnull
envMapnull
envMapIntensitynumber
refractionRationumber
wireframeboolean
wireframeLinewidthnumber
skinningboolean
morphTargetsboolean
morphNormalsboolean
flatShadingboolean
glossinessnumber
glossinessMapnull
specularColorColor
specularColorMapnull

Defined in

webgi/src/extras/asset_manager/threejs/MeshStandardMaterial2.ts:43


physicalMaterialPropList

Const physicalMaterialPropList: Object

Type declaration

NameType
namestring
fogboolean
blendingBlending
sideSide
vertexColorsboolean
opacitynumber
transparentboolean
blendSrcBlendingDstFactor
blendDstBlendingDstFactor
blendEquationBlendingEquation
blendSrcAlphanull
blendDstAlphanull
blendEquationAlphanull
depthFuncDepthModes
depthTestboolean
depthWriteboolean
stencilWriteMasknumber
stencilFuncStencilFunc
stencilRefnumber
stencilFuncMasknumber
stencilFailStencilOp
stencilZFailStencilOp
stencilZPassStencilOp
stencilWriteboolean
clippingPlanesnull
clipIntersectionboolean
clipShadowsboolean
shadowSidenull
colorWriteboolean
precisionnull
polygonOffsetboolean
polygonOffsetFactornumber
polygonOffsetUnitsnumber
ditheringboolean
alphaTestnumber
alphaToCoverageboolean
premultipliedAlphaboolean
visibleboolean
toneMappedboolean
userData{}
wireframeLinecapstring
wireframeLinejoinstring
colorstring
roughnessnumber
metalnessnumber
mapnull
lightMapnull
lightMapIntensitynumber
aoMapnull
aoMapIntensitynumber
emissivestring
emissiveIntensitynumber
emissiveMapnull
bumpMapnull
bumpScalenumber
normalMapnull
normalMapTypeNormalMapTypes
normalScaleVector2
displacementMapnull
displacementScalenumber
displacementBiasnumber
roughnessMapnull
metalnessMapnull
alphaMapnull
envMapnull
envMapIntensitynumber
refractionRationumber
wireframeboolean
wireframeLinewidthnumber
skinningboolean
morphTargetsboolean
morphNormalsboolean
flatShadingboolean
glossinessnumber
glossinessMapnull
clearcoatnumber
clearcoatMapnull
clearcoatRoughnessnumber
clearcoatRoughnessMapnull
clearcoatNormalScaleVector2
clearcoatNormalMapnull
reflectivitynumber
sheennumber
sheenColorColor
sheenColorMapnull
sheenRoughnessnumber
sheenRoughnessMapnull
specularIntensitynumber
specularIntensityMapnull
specularColorColor
specularColorMapnull
transmissionnumber
transmissionMapnull
thicknessnumber
thicknessMapnull
attenuationDistancenumber
attenuationColorColor
iridescenceMapnull
iridescenceIORnumber
iridescenceThicknessRangenumber[]
iridescenceThicknessMapnull

Defined in

webgi/src/extras/asset_manager/threejs/MeshStandardMaterial2.ts:92


iMaterialIgnoredUserData

Const iMaterialIgnoredUserData: string[]

Defined in

webgi/src/extras/asset_manager/threejs/materialUtils.ts:194


iTextureIgnoredUserData

Const iTextureIgnoredUserData: string[]

Defined in

webgi/src/extras/asset_manager/threejs/materialUtils.ts:207


envMapBackground

Const envMapBackground: EnvMapBackground = 'envMapBackground'

Special value for background to use the environment map.

Defined in

webgi/src/viewer/ViewerApp.ts:893