Options
All
  • Public
  • Public/Protected
  • All
Menu

@xeokit/xeokit-sdk

Index

Classes

Interfaces

Type aliases

Variables

Type aliases

AngleMeasurementsPluginConfiguration: { container?: HTMLElement; defaultColor?: string; id?: string; zIndex?: number }

Type declaration

  • Optional container?: HTMLElement

    Container DOM element for markers and labels. Defaults to document.body.

  • Optional defaultColor?: string

    The default color of the dots, wire and label.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional zIndex?: number

    If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels).

AnnotationsPluginConfiguration: { container?: HTMLElement; id?: string; labelHTML?: string; markerHTML?: string; surfaceOffset?: number; values?: {} }

Type declaration

  • Optional container?: HTMLElement

    Container DOM element for markers and labels. Defaults to document.body.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional labelHTML?: string

    HTML text template for Annotation labels. Defaults to <div></div>. Ignored on Annotations configured with a labelElementId.

  • Optional markerHTML?: string

    HTML text template for Annotation markers. Defaults to <div></div>. Ignored on Annotations configured with a markerElementId.

  • Optional surfaceOffset?: number

    The amount by which each Annotation is offset from the surface of its Entity when we create the Annotation by supplying a PickResult to AnnotationsPlugin.createAnnotation.

  • Optional values?: {}

    Map of default values to insert into the HTML templates for the marker and label.

    • [key: string]: string | number
AxisGizmoPluginConfiguration: { canvasElement?: HTMLCanvasElement; canvasId?: string; id?: string }

Type declaration

  • Optional canvasElement?: HTMLCanvasElement

    Reference of an existing HTML canvas to display the AxisGizmo - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional canvasId?: string

    ID of an existing HTML canvas to display the AxisGizmo - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

BCFViewpointsPluginConfiguration: { authoringTool?: string; id?: string; originatingSystem?: string }

Type declaration

  • Optional authoringTool?: string

    Identifies the authoring tool for BCF records.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional originatingSystem?: string

    Identifies the originating system for BCF records.

CameraPathAnimationConfiguration: { cameraPath: CameraPath; playingRate: number }

Type declaration

CameraPathConfiguration: { frames: Frame[]; id?: string }

Type declaration

  • frames: Frame[]

    Initial sequence of frames.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

CityJSONLoaderPluginConfiguration: { dataSource?: ICityJSONDefaultDataSource; id?: string }

Type declaration

  • Optional dataSource?: ICityJSONDefaultDataSource

    A custom data source through which the CityJSONLoaderPlugin can load model and metadata files. Defaults to an instance of {@link CityJSONDefaultDataSource}, which loads over HTTP.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

ContextMenuConfiguration: { context?: any; enabled?: boolean; hideOnMouseDown?: boolean; items?: any }

Type declaration

  • Optional context?: any

    The context, which is passed into the item callbacks. This can also be dynamically set on ContextMenu.context. This must be set before calling ContextMenu.show.

  • Optional enabled?: boolean

    Whether this ContextMenu is initially enabled. ContextMenu.show does nothing while this is false.

  • Optional hideOnMouseDown?: boolean

    Whether this ContextMenu automatically hides whenever we mouse-down or tap anywhere in the page.

  • Optional items?: any

    The context menu items. These can also be dynamically set on ContextMenu.items. See the class documentation for an example.

DistanceMeasurementsPluginConfiguration: { container?: HTMLElement; defaultAxisVisible?: boolean; defaultColor?: string; defaultOriginVisible?: boolean; defaultTargetVisible?: boolean; defaultVisible?: boolean; defaultWireVisible?: boolean; id?: string; labelMinAxisLength?: number; zIndex?: number }

Type declaration

  • Optional container?: HTMLElement

    Container DOM element for markers and labels. Defaults to document.body.

  • Optional defaultAxisVisible?: boolean

    The default value of the DistanceMeasurements axisVisible property.

  • Optional defaultColor?: string

    The default color of the length dots, wire and label.

  • Optional defaultOriginVisible?: boolean

    The default value of the DistanceMeasurements originVisible property.

  • Optional defaultTargetVisible?: boolean

    The default value of the DistanceMeasurements targetVisible property.

  • Optional defaultVisible?: boolean

    The default value of the DistanceMeasurements visible property.

  • Optional defaultWireVisible?: boolean

    The default value of the DistanceMeasurements wireVisible property.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional labelMinAxisLength?: number

    The minimum length, in pixels, of an axis wire beyond which its label is shown.

  • Optional zIndex?: number

    If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels).

EdgeMaterialConfiguration: { edgeAlpha?: number; edgeColor?: number[]; edgeWidth?: number; id?: string; preset?: string }

Type declaration

  • Optional edgeAlpha?: number

    Edge transparency.

  • Optional edgeColor?: number[]

    RGB edge color.

  • Optional edgeWidth?: number

    Edge width in pixels.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional preset?: string

    Selects a preset EdgeMaterial configuration

EmphasisMaterialConfiguration: { backfaces?: boolean; edgeAlpha?: number; edgeColor?: number[]; edgeWidth?: number; edges?: boolean; fill?: boolean; fillAlpha?: number; fillColor?: number[]; glowThrough?: boolean; id?: string; preset?: string }

Type declaration

  • Optional backfaces?: boolean

    Whether to render geometry backfaces when emphasising.

  • Optional edgeAlpha?: number

    Transparency of xray edges. A value of 0.0 indicates fully transparent, 1.0 is fully opaque.

  • Optional edgeColor?: number[]

    RGB color of xray edges.

  • Optional edgeWidth?: number

    Width of xray edges, in pixels.

  • Optional edges?: boolean

    Indicates if xray edges are visible.

  • Optional fill?: boolean

    Indicates if xray surfaces are filled with color.

  • Optional fillAlpha?: number

    Transparency of filled xray faces. A value of 0.0 indicates fully transparent, 1.0 is fully opaque.

  • Optional fillColor?: number[]

    EmphasisMaterial fill color.

  • Optional glowThrough?: boolean

    Whether to make the emphasized object appear to float on top of other objects, as if it were "glowing through" them.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional preset?: string

    Selects a preset EmphasisMaterial configuration - see EmphasisMaterial.presets.

FastNavPluginConfiguration: { delayBeforeRestore?: boolean; delayBeforeRestoreSeconds?: number; hideEdges?: boolean; hidePBR?: boolean; hideSAO?: boolean; hideTransparentObjects?: boolean; id?: string; scaleCanvasResolution?: number; scaleCanvasResolutionFactor?: number }

Type declaration

  • Optional delayBeforeRestore?: boolean

    Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer.

  • Optional delayBeforeRestoreSeconds?: number

    Delay in seconds before restoring normal rendering after we stop interacting with the Viewer.

  • Optional hideEdges?: boolean

    Whether to temporarily hide edges whenever we interact with the Viewer.

  • Optional hidePBR?: boolean

    Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer.

  • Optional hideSAO?: boolean

    Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer.

  • Optional hideTransparentObjects?: boolean

    Whether to temporarily hide transparent objects whenever we interact with the Viewer.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional scaleCanvasResolution?: number

    Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer.

  • Optional scaleCanvasResolutionFactor?: number

    The factor by which we downscale the canvas resolution whenever we interact with the Viewer.

Frame: { eye: number[]; look: number[]; t: number; up: number[] }

Type declaration

  • eye: number[]
  • look: number[]
  • t: number
  • up: number[]
GLTFLoaderPluginConfiguration: { dataSource?: IGLTFDefaultDataSource; id?: string; objectDefaults?: IFCObjectDefaults }

Type declaration

  • Optional dataSource?: IGLTFDefaultDataSource

    A custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments. Defaults to an instance of {@link GLTFDefaultDataSource}, which loads over HTTP.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional objectDefaults?: IFCObjectDefaults

    Map of initial default states for each loaded Entity that represents an object. Default value is IFCObjectDefaults.

IFCObjectDefaults: {}

Type declaration

  • [key: string]: { colorize?: number[]; opacity?: number; pickable?: boolean; visible?: boolean }
    • Optional colorize?: number[]
    • Optional opacity?: number
    • Optional pickable?: boolean
    • Optional visible?: boolean
IFCStoreyPlanObjectStates: {}

Type declaration

  • [key: string]: { colorize?: number[]; edges?: boolean; visible: boolean }
    • Optional colorize?: number[]
    • Optional edges?: boolean
    • visible: boolean
LASLoaderPluginConfiguration: { colorDepth?: 8 | 16 | "auto"; dataSource?: ILASDefaultDataSource; fp64?: number; id?: string; skip?: number }

Type declaration

  • Optional colorDepth?: 8 | 16 | "auto"

    Configures whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits. Accepted values are 8, 16 an "auto".

  • Optional dataSource?: ILASDefaultDataSource

    A custom data source through which the LASLoaderPlugin can load model and metadata files. Defaults to an instance of {@link LASDefaultDataSource}, which loads over HTTP.

  • Optional fp64?: number

    Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional skip?: number

    Configures LASLoaderPlugin to load every n points.

LinesMaterialConfiguration: { id?: string; lineWidth?: number; preset?: string }

Type declaration

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional lineWidth?: number

    Line width in pixels.

  • Optional preset?: string

    Selects a preset LinesMaterial configuration - see LinesMaterial.presets.

LoadCityJSONModel: { cityJSON?: ArrayBuffer; id?: string; loadMetadata?: boolean; matrix?: number[]; origin?: number[]; position?: number[]; rotation?: number[]; scale?: number[]; src?: string; stats?: ModelStats }

Type declaration

  • Optional cityJSON?: ArrayBuffer

    The CityJSON file data, as an alternative to the src parameter.

  • Optional id?: string

    ID to assign to the root Entity.id, unique among all components in the Viewer's Scene, generated automatically by default.

  • Optional loadMetadata?: boolean

    Whether to load metadata on CityJSON objects.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to origin.

  • Optional origin?: number[]

    The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates.

  • Optional position?: number[]

    The model single-precision 3D position, relative to the origin parameter.

  • Optional rotation?: number[]

    The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's scale.

  • Optional src?: string

    Path to a CityJSON file, as an alternative to the cityJSON parameter.

  • Optional stats?: ModelStats

    Collects model statistics.

LoadGLTFModel: { backfaces?: number[]; edgeThreshold?: number[]; edges?: boolean; excludeTypes?: string[]; gltf?: any; id?: string; includeTypes?: string[]; matrix?: number[]; metaModelData?: any; metaModelSrc?: string; objectDefaults?: object; origin?: number[]; performance?: boolean; position?: number[]; rotation?: number[]; scale?: number[]; src?: string }

Type declaration

  • Optional backfaces?: number[]

    When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces.

  • Optional edgeThreshold?: number[]

    When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.

  • Optional edges?: boolean

    Whether or not xeokit renders the model with edges emphasized.

  • Optional excludeTypes?: string[]

    When loading metadata, never loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional gltf?: any

    glTF JSON, as an alternative to the src parameter.

  • Optional id?: string

    ID to assign to the root Entity.id, unique among all components in the Viewer's Scene, generated automatically by default.

  • Optional includeTypes?: string[]

    When loading metadata, only loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to origin.

  • Optional metaModelData?: any

    JSON model metadata, as an alternative to the metaModelSrc parameter.

  • Optional metaModelSrc?: string

    Path to an optional metadata file, as an alternative to the metaModelData parameter.

  • Optional objectDefaults?: object

    Map of initial default states for each loaded Entity that represents an object. Default value is IFCObjectDefaults.

  • Optional origin?: number[]

    The double-precision World-space origin of the model's coordinates.

  • Optional performance?: boolean

    Set false to load all the materials and textures provided by the glTF file, otherwise leave true to load the default high-performance representation optimized for low memory usage and efficient rendering.

  • Optional position?: number[]

    The single-precision position, relative to origin.

  • Optional rotation?: number[]

    The model's orientation, as Euler angles given in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's scale.

  • Optional src?: string

    Path to a glTF file, as an alternative to the gltf parameter.

LoadLASModel: { id?: string; las?: ArrayBuffer; loadMetadata?: boolean; matrix?: number[]; origin?: number[]; position?: number[]; rotation?: number[]; scale?: number[]; src?: string; stats?: ModelStats }

Type declaration

  • Optional id?: string

    ID to assign to the root Entity.id, unique among all components in the Viewer's Scene, generated automatically by default.

  • Optional las?: ArrayBuffer

    The LAS file data, as an alternative to the src parameter.

  • Optional loadMetadata?: boolean

    Whether to load metadata for the LAS model.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to origin.

  • Optional origin?: number[]

    The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates.

  • Optional position?: number[]

    The model single-precision 3D position, relative to the origin parameter.

  • Optional rotation?: number[]

    The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's scale.

  • Optional src?: string

    Path to a LAS file, as an alternative to the las parameter.

  • Optional stats?: ModelStats

    Collects model statistics.

LoadOBJModel: { edgeThreshold?: number; id: string; matrix?: number[]; metaModelSrc?: string; position?: number[]; rotation?: number[]; scale?: number[]; src: string }

Type declaration

  • Optional edgeThreshold?: number

    When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.

  • id: string

    ID to assign to the model's root Entity, unique among all components in the Viewer's Scene.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters.

  • Optional metaModelSrc?: string

    Path to an optional metadata file.

  • Optional position?: number[]

    The model World-space 3D position.

  • Optional rotation?: number[]

    The model's World-space rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's World-space scale.

  • src: string

    Path to an OBJ file.

LoadSTLModel: { backfaces?: boolean; edgeThreshold?: number; edges?: boolean; id: string; matrix?: number[]; origin?: number[]; position?: number[]; rotation?: number[]; scale?: number[]; smoothNormals?: boolean; smoothNormalsAngleThreshold?: number; splitMeshes?: boolean; src?: string; stl?: string }

Type declaration

  • Optional backfaces?: boolean

    When true, allows visible backfaces, wherever specified in the 3DXML. When false, ignores backfaces.

  • Optional edgeThreshold?: number

    When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.

  • Optional edges?: boolean

    Whether or not to renders the model with edges emphasized.

  • id: string

    ID to assign to the model's root Entity, unique among all components in the Viewer's Scene.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters.

  • Optional origin?: number[]

    The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates.

  • Optional position?: number[]

    The model single-precision 3D position, relative to the origin parameter.

  • Optional rotation?: number[]

    The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's scale.

  • Optional smoothNormals?: boolean

    When true, automatically converts face-oriented normals to vertex normals for a smooth appearance.

  • Optional smoothNormalsAngleThreshold?: number

    When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.

  • Optional splitMeshes?: boolean

    When true, creates a separate Mesh for each group of faces that share the same vertex colors. Only works with binary STL.

  • Optional src?: string

    Path to an STL file. Overrides the stl parameter.

  • Optional stl?: string

    Contents of an STL file, either binary of ASCII. Overridden by the src parameter.

LoadWebIFCModel: { backfaces?: boolean; edges?: boolean; excludeTypes?: string[]; excludeUnclassifiedObjects?: boolean; globalizeObjectIds?: boolean; id?: string; ifc?: ArrayBuffer; includeTypes?: string[]; loadMetadata?: boolean; matrix?: number[]; objectDefaults?: IFCObjectDefaults; origin?: number[]; pbrEnabled?: boolean; position?: number[]; rotation?: number[]; saoEnabled?: boolean; scale?: number[]; src?: string; stats?: ModelStats }

Type declaration

  • Optional backfaces?: boolean

    When we set this true, then we force rendering of backfaces for the model. When we leave this false, then we allow the Viewer to decide when to render backfaces. In that case, the Viewer will hide backfaces on watertight meshes, show backfaces on open meshes, and always show backfaces on meshes when we slice them open with SectionPlanes.

  • Optional edges?: boolean

    Whether or not xeokit renders the model with edges emphasized.

  • Optional excludeTypes?: string[]

    When loading metadata, never loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional excludeUnclassifiedObjects?: boolean

    When loading metadata and this is true, will only load Entitys that have MetaObjects (that are not excluded). This is useful when we don't want Entitys in the Scene that are not represented within IFC navigation components, such as TreeViewPlugin.

  • Optional globalizeObjectIds?: boolean

    Indicates whether to globalize each Entity.id and MetaObject.id, in case you need to prevent ID clashes with other models.

  • Optional id?: string

    ID to assign to the root Entity.id, unique among all components in the Viewer's Scene, generated automatically by default.

  • Optional ifc?: ArrayBuffer

    The IFC file data, as an alternative to the src parameter.

  • Optional includeTypes?: string[]

    When loading metadata, only loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional loadMetadata?: boolean

    Whether to load IFC metadata (metaobjects and property sets).

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to origin.

  • Optional objectDefaults?: IFCObjectDefaults

    Map of initial default states for each loaded Entity that represents an object. Default value is IFCObjectDefaults.

  • Optional origin?: number[]

    The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates.

  • Optional pbrEnabled?: boolean

    Indicates if physically-based rendering (PBR) will apply to the model. Only works when Scene.pbrEnabled is also true.

  • Optional position?: number[]

    The model single-precision 3D position, relative to the origin parameter.

  • Optional rotation?: number[]

    The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis.

  • Optional saoEnabled?: boolean

    Indicates if Scalable Ambient Obscurance (SAO) will apply to the model. SAO is configured by the Scene's {@link SAO} component. Only works when {@link SAO.enabled} is also true

  • Optional scale?: number[]

    The model's scale.

  • Optional src?: string

    Path to a IFC file, as an alternative to the ifc parameter.

  • Optional stats?: ModelStats

    Collects model statistics.

LoadXKTModel: { backfaces?: boolean; edges?: boolean; excludeTypes?: string[]; excludeUnclassifiedObjects?: boolean; globalizeObjectIds?: boolean; id?: string; includeTypes?: string[]; matrix?: number[]; metaModelData?: any; metaModelSrc?: string; objectDefaults?: object; origin?: number[]; pbrEnabled?: boolean; position?: number[]; reuseGeometries?: boolean; rotation?: number[]; saoEnabled?: boolean; scale?: number[]; src?: string; xkt?: ArrayBuffer }

Type declaration

  • Optional backfaces?: boolean

    When we set this true, then we force rendering of backfaces for the model.

  • Optional edges?: boolean

    Whether or not xeokit renders the model with edges emphasized.

  • Optional excludeTypes?: string[]

    When loading metadata, never loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional excludeUnclassifiedObjects?: boolean

    When loading metadata and this is true, will only load Entitys that have MetaObjects (that are not excluded).

  • Optional globalizeObjectIds?: boolean

    Indicates whether to globalize each Entity.id and MetaObject.id, in case you need to prevent ID clashes with other models.

  • Optional id?: string

    ID to assign to the root Entity.id, unique among all components in the Viewer's Scene, generated automatically by default.

  • Optional includeTypes?: string[]

    When loading metadata, only loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to origin.

  • Optional metaModelData?: any

    JSON model metadata, as an alternative to the metaModelSrc parameter.

  • Optional metaModelSrc?: string

    Path to an optional metadata file, as an alternative to the metaModelData parameter.

  • Optional objectDefaults?: object

    Map of initial default states for each loaded Entity that represents an object. Default value is IFCObjectDefaults.

  • Optional origin?: number[]

    The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates.

  • Optional pbrEnabled?: boolean

    Indicates if physically-based rendering (PBR) will apply to the model. Only works when Scene.pbrEnabled is also true.

  • Optional position?: number[]

    The model single-precision 3D position, relative to the origin parameter.

  • Optional reuseGeometries?: boolean

    Indicates whether to enable geometry reuse

  • Optional rotation?: number[]

    The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis.

  • Optional saoEnabled?: boolean

    Indicates if Scalable Ambient Obscurance (SAO) will apply to the model. SAO is configured by the Scene's {@link SAO} component. Only works when {@link SAO.enabled} is also true

  • Optional scale?: number[]

    The model's scale.

  • Optional src?: string

    Path to a .xkt file, as an alternative to the xkt parameter.

  • Optional xkt?: ArrayBuffer

    The .xkt file data, as an alternative to the src parameter.

LoadXML3DModel: { backfaces?: boolean; createMetaModel?: boolean; edgeThreshold?: number; edges?: boolean; id: string; materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial"; matrix?: number[]; position?: number[]; rotation?: number[]; scale?: number[]; src: string }

Type declaration

  • Optional backfaces?: boolean

    When true, allows visible backfaces, wherever specified in the 3DXML. When false, ignores backfaces.

  • Optional createMetaModel?: boolean

    When true, will create a MetaModel for the model in MetaScene.metaModels.

  • Optional edgeThreshold?: number

    When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn.

  • Optional edges?: boolean

    Whether or not xeokit renders the Entity with edges emphasized.

  • id: string

    ID to assign to the model's root Entity, unique among all components in the Viewer's Scene.

  • Optional materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial"

    What type of materials to create while loading: "MetallicMaterial" to create {@link MetallicMaterial}s, "SpecularMaterial" to create {@link SpecularMaterial}s or "PhongMaterial" to create PhongMaterials. As it loads XML3D's Phong materials, the XMLLoaderPlugin will do its best approximate conversion of those to the specified workflow.

  • Optional matrix?: number[]

    The model's world transform matrix. Overrides the position, scale and rotation parameters.

  • Optional position?: number[]

    The model's World-space 3D position.

  • Optional rotation?: number[]

    The model's World-space rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    The model's World-space scale.

  • src: string

    Path to a 3DXML file.

LocaleServiceConfiguration: { locale?: string; messages: any }

Type declaration

  • Optional locale?: string
  • messages: any
MarkerConfiguration: { entity?: Entity; id?: string; occludable?: boolean; worldPos?: number[] }

Type declaration

  • Optional entity?: Entity

    Entity to associate this Marker with. When the Marker has an Entity, then Marker.visible will always be false if Entity.visible is false.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional occludable?: boolean

    Indicates whether or not this Marker is hidden (ie. Marker.visible is false whenever occluded by Entitys in the Scene.

  • Optional worldPos?: number[]

    World-space 3D Marker position.

MeshConfiguration: { background?: boolean; billboard?: "none" | "spherical" | "cylindrical"; castsShadow?: boolean; clippable?: boolean; collidable?: boolean; colorize?: number[]; culled?: boolean; edgeMaterial?: EmphasisMaterial; edges?: boolean; geometry?: Geometry; highlightMaterial?: EmphasisMaterial; highlighted?: boolean; id?: string; isModel?: boolean; isObject?: boolean; material?: Material; matrix?: number[]; occluder?: boolean; offset?: number[]; opacity?: number; origin?: number[]; originalSystemId?: string; parent?: Node; pickable?: boolean; position?: number[]; receivesShadow?: boolean; rotation?: number[]; scale?: number[]; selected?: boolean; selectedMaterial?: EmphasisMaterial; visible?: boolean; xrayMaterial?: EmphasisMaterial; xrayed?: boolean }

Type declaration

  • Optional background?: boolean

    Indicates if the Mesh should act as background, e.g., it can be used for a skybox.

  • Optional billboard?: "none" | "spherical" | "cylindrical"

    Mesh's billboarding behaviour.

  • Optional castsShadow?: boolean

    Indicates if the Mesh initially casts shadows.

  • Optional clippable?: boolean

    Indicates if the Mesh is initially clippable.

  • Optional collidable?: boolean

    Indicates if the Mesh is initially included in boundary calculations.

  • Optional colorize?: number[]

    Mesh's initial RGB colorize color, multiplies by the rendered fragment colors.

  • Optional culled?: boolean

    Indicates if the Mesh is initially culled from view.

  • Optional edgeMaterial?: EmphasisMaterial

    EdgeMaterial to define the appearance of enhanced edges for this Mesh. Inherits Scene.edgeMaterial by default.

  • Optional edges?: boolean

    Indicates if the Mesh's edges are initially emphasized.

  • Optional geometry?: Geometry

    {@link Geometry} to define the shape of this Mesh. Inherits Scene.geometry by default.

  • Optional highlightMaterial?: EmphasisMaterial

    EmphasisMaterial to define the xrayed appearance for this Mesh. Inherits Scene.highlightMaterial by default.

  • Optional highlighted?: boolean

    Indicates if the Mesh is initially highlighted.

  • Optional id?: string

    Optional ID, unique among all components in the parent scene, generated automatically when omitted.

  • Optional isModel?: boolean

    Specify true if this Mesh represents a model, in which case the Mesh will be registered by Mesh.id in Scene.models and may also have a corresponding MetaModel with matching MetaModel.id, registered by that ID in MetaScene.metaModels.

  • Optional isObject?: boolean

    Specify true if this Mesh represents an object, in which case the Mesh will be registered by Mesh.id in Scene.objects and may also have a corresponding MetaObject with matching MetaObject.id, registered by that ID in MetaScene.metaObjects.

  • Optional material?: Material

    Material to define the normal rendered appearance for this Mesh. Inherits Scene.material by default.

  • Optional matrix?: number[]

    Local modelling transform matrix. Overrides the position, scale and rotation parameters.

  • Optional occluder?: boolean

    Indicates if the Mesh is able to occlude Markers.

  • Optional offset?: number[]

    World-space 3D translation offset. Translates the Mesh in World space, after modelling transforms.

  • Optional opacity?: number

    Mesh's initial opacity factor, multiplies by the rendered fragment alpha.

  • Optional origin?: number[]

    World-space origin for this Mesh. When this is given, then matrix, position and geometry are all assumed to be relative to this center.

  • Optional originalSystemId?: string

    ID of the corresponding object within the originating system, if any.

  • Optional parent?: Node

    The parent Node.

  • Optional pickable?: boolean

    Indicates if the Mesh is initially pickable.

  • Optional position?: number[]

    3D position of this Mesh, relative to origin.

  • Optional receivesShadow?: boolean

    Indicates if the Mesh initially receives shadows.

  • Optional rotation?: number[]

    Local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    Local scale.

  • Optional selected?: boolean

    Indicates if the Mesh is initially selected.

  • Optional selectedMaterial?: EmphasisMaterial

    EmphasisMaterial to define the selected appearance for this Mesh. Inherits Scene.selectedMaterial by default.

  • Optional visible?: boolean

    Indicates if the Mesh is initially visible.

  • Optional xrayMaterial?: EmphasisMaterial

    EmphasisMaterial to define the xrayed appearance for this Mesh. Inherits Scene.xrayMaterial by default.

  • Optional xrayed?: boolean

    Indicates if the Mesh is initially xrayed.

ModelStats: { author: string; created: string; numGeometries: number; numMetaObjects: number; numObjects: number; numPropertySets: number; numTriangles: number; numVertices: number; schemaVersion: string; sourceFormat: string; title: string }

Type declaration

  • author: string
  • created: string
  • numGeometries: number
  • numMetaObjects: number
  • numObjects: number
  • numPropertySets: number
  • numTriangles: number
  • numVertices: number
  • schemaVersion: string
  • sourceFormat: string
  • title: string
NavCubePluginConfiguration: { backColor?: string; bottomColor?: string; cameraFitFOV?: string; cameraFly?: string; cameraFlyDuration?: string; canvasElement?: HTMLCanvasElement; canvasId?: string; color?: string; fitVisible?: boolean; frontColor?: string; hoverColor?: string; id?: string; leftColor?: string; rightColor?: string; shadowVisible?: boolean; synchProjection?: boolean; topColor?: string; visible?: boolean }

Type declaration

  • Optional backColor?: string

    Custom color for the back face of the NavCube. Overrides color.

  • Optional bottomColor?: string

    Custom color for the bottom face of the NavCube. Overrides color.

  • Optional cameraFitFOV?: string

    How much of the field-of-view, in degrees, that the 3D scene should fill the {@link Canvas} when the Camera moves to an axis or diagonal.

  • Optional cameraFly?: string

    Whether the Camera flies or jumps to each selected axis or diagonal.

  • Optional cameraFlyDuration?: string

    When flying the Camera to each new axis or diagonal, how long, in seconds, that the Camera takes to get there.

  • Optional canvasElement?: HTMLCanvasElement

    Reference of an existing HTML canvas to display the NavCube - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional canvasId?: string

    ID of an existing HTML canvas to display the NavCube - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional color?: string

    Custom uniform color for the faces of the NavCube.

  • Optional fitVisible?: boolean

    Sets whether the axis, corner and edge-aligned views will fit the view to the entire Scene or just to visible object-Entitys. Entitys are visible objects when Entity.isObject and Entity.visible are both true.

  • Optional frontColor?: string

    Custom color for the front face of the NavCube. Overrides color.

  • Optional hoverColor?: string

    Custom color for highlighting regions on the NavCube as we hover the pointer over them.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional leftColor?: string

    Custom color for the left face of the NavCube. Overrides color.

  • Optional rightColor?: string

    Custom color for the right face of the NavCube. Overrides color.

  • Optional shadowVisible?: boolean

    Whether the shadow of the cube is visible.

  • Optional synchProjection?: boolean

    Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the Camera. When false, the NavCube will always be rendered with perspective projection.

  • Optional topColor?: string

    Custom color for the top face of the NavCube. Overrides color.

  • Optional visible?: boolean

    Initial visibility.

NodeConfiguration: { castsShadow?: boolean; children?: (Node | Mesh)[]; clippable?: boolean; collidable?: boolean; colorize: number[]; culled?: boolean; edges?: boolean; highlighted?: boolean; id?: string; inheritStates?: boolean; isModel?: boolean; isObject?: boolean; matrix?: number[]; offset?: number[]; opacity: number; origin?: number[]; parent?: Node; pickable?: boolean; position?: number[]; receivesShadow?: boolean; rotation?: number[]; scale?: number[]; selected?: boolean; visible?: boolean; xrayed?: boolean }

Type declaration

  • Optional castsShadow?: boolean

    Indicates if the Node initially casts shadows.

  • Optional children?: (Node | Mesh)[]

    Child Nodes or Meshes to add initially.

  • Optional clippable?: boolean

    Indicates if the Node is initially clippable.

  • Optional collidable?: boolean

    Indicates if the Node is initially included in boundary calculations.

  • colorize: number[]

    Node's initial RGB colorize color, multiplies by the rendered fragment colors.

  • Optional culled?: boolean

    Indicates if the Node is initially culled from view.

  • Optional edges?: boolean

    Indicates if the Node's edges are initially emphasized.

  • Optional highlighted?: boolean

    Indicates if the Node is initially highlighted.

  • Optional id?: string

    Optional ID, unique among all components in the parent scene, generated automatically when omitted.

  • Optional inheritStates?: boolean

    Indicates if children given to this constructor should inherit rendering state from this parent as they are added.

  • Optional isModel?: boolean

    Specify true if this Mesh represents a model, in which case the Mesh will be registered by Mesh.id in Scene.models and may also have a corresponding MetaModel with matching MetaModel.id, registered by that ID in MetaScene.metaModels.

  • Optional isObject?: boolean

    Specify true if this Mesh represents an object, in which case the Mesh will be registered by Mesh.id in Scene.objects and may also have a corresponding MetaObject with matching MetaObject.id, registered by that ID in MetaScene.metaObjects.

  • Optional matrix?: number[]

    Local modelling transform matrix. Overrides the position, scale and rotation parameters.

  • Optional offset?: number[]

    World-space 3D translation offset. Translates the Node in World space, after modelling transforms.

  • opacity: number

    Node's initial opacity factor, multiplies by the rendered fragment alpha.

  • Optional origin?: number[]

    World-space origin for this Node.

  • Optional parent?: Node

    The parent Node.

  • Optional pickable?: boolean

    Indicates if the Node is initially pickable.

  • Optional position?: number[]

    Local 3D position.

  • Optional receivesShadow?: boolean

    Indicates if the Node initially receives shadows.

  • Optional rotation?: number[]

    Local rotation, as Euler angles given in degrees, for each of the X, Y and Z axis.

  • Optional scale?: number[]

    Local scale.

  • Optional selected?: boolean

    Indicates if the Mesh is initially selected.

  • Optional visible?: boolean

    Indicates if the Node is initially visible.

  • Optional xrayed?: boolean

    Indicates if the Node is initially xrayed.

PhongMaterialConfiguration: { alpha?: number; alphaCutoff?: number; alphaFresnel?: Fresnel; alphaMap?: Texture; alphaMode?: "opaque" | "blend" | "mask"; ambient?: number[]; ambientMap?: Texture; backfaces?: boolean; diffuse?: number[]; diffuseFresnel?: Fresnel; diffuseMap?: Texture; emissive?: number[]; emissiveFresnel?: Fresnel; emissiveMap?: Texture; frontface?: "cw" | "ccw"; id?: string; lineWidth?: number; normalMap?: Texture; occlusionMap?: Texture; pointSize?: number; reflectivity?: number; reflectivityFresnel?: Fresnel; reflectivityMap?: Texture; shininess?: number; specular?: number[]; specularFresnel?: Fresnel; specularMap?: Texture }

Type declaration

  • Optional alpha?: number

    Scalar in range 0-1 that controls alpha, where 0 is completely transparent and 1 is completely opaque.

  • Optional alphaCutoff?: number

    The alpha cutoff value. See the PhongMaterial.alphaCutoff property for more info.

  • Optional alphaFresnel?: Fresnel

    An alpha {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same Scene as this PhongMaterial.

  • Optional alphaMap?: Texture

    An alpha map {@link Texture}, which will override the effect of the alpha property. Must be within the same Scene as this PhongMaterial.

  • Optional alphaMode?: "opaque" | "blend" | "mask"

    The alpha blend mode - accepted values are "opaque", "blend" and "mask". See the PhongMaterial.alphaMode property for more info.

  • Optional ambient?: number[]

    PhongMaterial ambient color.

  • Optional ambientMap?: Texture

    A ambient map {@link Texture}, which will multiply by the diffuse property. Must be within the same Scene as this PhongMaterial.

  • Optional backfaces?: boolean

    Whether to render geometry backfaces.

  • Optional diffuse?: number[]

    PhongMaterial diffuse color.

  • Optional diffuseFresnel?: Fresnel

    A diffuse {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same Scene as this PhongMaterial.

  • Optional diffuseMap?: Texture

    A diffuse map {@link Texture}, which will override the effect of the diffuse property. Must be within the same Scene as this PhongMaterial.

  • Optional emissive?: number[]

    PhongMaterial emissive color.

  • Optional emissiveFresnel?: Fresnel

    An emissive {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same Scene as this PhongMaterial.

  • Optional emissiveMap?: Texture

    An emissive map {@link Texture}, which will override the effect of the emissive property. Must be within the same Scene as this PhongMaterial.

  • Optional frontface?: "cw" | "ccw"

    The winding order for geometry front faces - "cw" for clockwise, or "ccw" for counter-clockwise.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional lineWidth?: number

    Scalar that controls the width of lines.

  • Optional normalMap?: Texture

    A normal map {@link Texture}. Must be within the same Scene as this PhongMaterial.

  • Optional occlusionMap?: Texture

    An occlusion map {@link Texture}. Must be within the same Scene as this PhongMaterial.

  • Optional pointSize?: number

    Scalar that controls the size of points.

  • Optional reflectivity?: number

    Scalar in range 0-1 that controls how much {@link ReflectionMap} is reflected.

  • Optional reflectivityFresnel?: Fresnel

    A reflectivity {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same Scene as this PhongMaterial.

  • Optional reflectivityMap?: Texture

    A reflectivity control map {@link Texture}, which will override the effect of the reflectivity property. Must be within the same Scene as this PhongMaterial.

  • Optional shininess?: number

    Scalar in range 0-128 that determines the size and sharpness of specular highlights.

  • Optional specular?: number[]

    PhongMaterial specular color.

  • Optional specularFresnel?: Fresnel

    A specular {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same Scene as this PhongMaterial.

  • Optional specularMap?: Texture

    A specular map {@link Texture}, which will override the effect of the specular property. Must be within the same Scene as this PhongMaterial.

PointsMaterialConfiguration: { filterIntensity?: boolean; id?: string; maxIntensity?: number; maxPerspectivePointSize?: number; minIntensity?: number; minPerspectivePointSize?: number; perspectivePoints?: boolean; pointSize?: number; preset?: string; roundPoints?: boolean }

Type declaration

  • Optional filterIntensity?: boolean

    When this is true, points are only rendered when their intensity value falls within the range given in {@link }

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional maxIntensity?: number

    When filterIntensity is true, points with intensity above this value will not be rendered.

  • Optional maxPerspectivePointSize?: number

    When perspectivePoints is true, this is the maximum rendered size of each point in pixels.

  • Optional minIntensity?: number

    When filterIntensity is true, points with intensity below this value will not be rendered.

  • Optional minPerspectivePointSize?: number

    When perspectivePoints is true, this is the minimum rendered size of each point in pixels.

  • Optional perspectivePoints?: boolean

    Whether apparent point size reduces with distance when Camera.projection is set to "perspective".

  • Optional pointSize?: number

    Point size in pixels.

  • Optional preset?: string

    Selects a preset PointsMaterial configuration - see PointsMaterial.presets.

  • Optional roundPoints?: boolean

    Whether points are round (true) or square (false).

ReadableGeometryConfiguration: { autoVertexNormals?: boolean; colors?: number[]; compressGeometry?: boolean; edgeThreshold?: number; id?: string; indices?: number[]; meta?: {}; normals?: number[]; positions?: number[]; primitive?: "points" | "lines" | "line-loop" | "line-strip" | "triangles" | "triangle-strip" | "triangle-fan"; uv?: number[] }

Type declaration

  • Optional autoVertexNormals?: boolean

    Set true to automatically generate normal vectors from the positions and indices, if those are supplied.

  • Optional colors?: number[]

    Vertex colors.

  • Optional compressGeometry?: boolean

    Stores positions, colors, normals and UVs in compressGeometry and oct-encoded formats for reduced memory footprint and GPU bus usage.

  • Optional edgeThreshold?: number

    When a Mesh renders this Geometry as wireframe, this indicates the threshold angle (in degrees) between the face normals of adjacent triangles below which the edge is discarded.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene,

  • Optional indices?: number[]

    Indices array.

  • Optional meta?: {}

    Optional map of user-defined metadata to attach to this Geometry.

    • [key: string]: any
  • Optional normals?: number[]

    Vertex normal vectors array.

  • Optional positions?: number[]

    Positions array.

  • Optional primitive?: "points" | "lines" | "line-loop" | "line-strip" | "triangles" | "triangle-strip" | "triangle-fan"

    The primitive type.

  • Optional uv?: number[]

    UVs array.

STLLoaderPluginCOnfiguration: { dataSource?: ISTLDefaultDataSource; id?: string }

Type declaration

  • Optional dataSource?: ISTLDefaultDataSource

    A custom data source through which the STLLoaderPlugin can load STL files. Defaults to an instance of {@link STLDefaultDataSource}, which loads over HTTP.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

SectionPlaneConfiguration: { active?: boolean; dir?: number[]; id?: string; pos?: number[] }

Type declaration

  • Optional active?: boolean

    Indicates whether or not this SectionPlane is active.

  • Optional dir?: number[]

    Vector perpendicular to the plane surface, indicating the SectionPlane plane orientation.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional pos?: number[]

    World-space position of the SectionPlane.

SectionPlanesPluginConfiguration: { id?: string; overviewCanvasId?: string; overviewVisible?: string }

Type declaration

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional overviewCanvasId?: string

    ID of a canvas element to display the overview.

  • Optional overviewVisible?: string

    Initial visibility of the overview canvas.

SpriteMarkerConfiguration: { encoding?: string; entity?: Entity; flipY?: boolean; id?: string; image?: HTMLImageElement; occludable?: boolean; src?: string; worldPos?: number[] }

Type declaration

  • Optional encoding?: string

    Texture encoding format. See the {@link Texture#encoding} property for more info.

  • Optional entity?: Entity

    Entity to associate this SpriteMarker with. When the SpriteMarker has an Entity, then SpriteMarker.visible will always be false if Entity.visible is false.

  • Optional flipY?: boolean

    Flips this SpriteMarker's texture image along its vertical axis when true.

  • Optional id?: string

    Optional ID, unique among all components in the parent Scene, generated automatically when omitted.

  • Optional image?: HTMLImageElement

    HTML Image object to load into this SpriteMarker. See the {@link SpriteMarker#image} property for more info.

  • Optional occludable?: boolean

    Indicates whether or not this SpriteMarker is hidden (ie. SpriteMarker.visible is false whenever occluded by Entitys in the Scene.

  • Optional src?: string

    Path to image file to load into this SpriteMarker.

  • Optional worldPos?: number[]

    World-space 3D SpriteMarker position.

StoreyViewsPluginConfiguration: { id?: string; objectStates?: IFCStoreyPlanObjectStates }

Type declaration

TickEvent: { deltaTime: Number; prevTime: Number; sceneID: string; startTime: Number; time: Number }

Type declaration

  • deltaTime: Number

    The time in seconds since the previous "tick" event from this Scene.

  • prevTime: Number

    The time of the previous "tick" event from this Scene..

  • sceneID: string

    The ID of this Scene.

  • startTime: Number

    The time in seconds since 1970 that this Scene was instantiated.

  • time: Number

    The time in seconds since 1970 of this "tick" event.

TreeViewPluginConfiguration: { autoAddModels?: boolean; autoExpandDepth?: number; containerElement: HTMLElement; hierarchy?: "containment" | "storeys" | "types"; pruneEmptyNodes?: boolean; sortNodes?: boolean }

Type declaration

  • Optional autoAddModels?: boolean

    When true (default), will automatically add each model as it's created. Set this false if you want to manually add models using TreeViewPlugin.addModel instead.

  • Optional autoExpandDepth?: number

    Optional depth to which to initially expand the tree.

  • containerElement: HTMLElement

    DOM element to contain the TreeViewPlugin.

  • Optional hierarchy?: "containment" | "storeys" | "types"

    How to organize the tree nodes: "containment", "storeys" or "types". See the class documentation for details.

  • Optional pruneEmptyNodes?: boolean

    When true, will not contain nodes that don't have content in the Scene. These are nodes whose MetaObjects don't have Entitys.

  • Optional sortNodes?: boolean

    When true, will sort the children of each node.

ViewCullPluginConfiguration: { id?: string; maxTreeDepth?: number }

Type declaration

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional maxTreeDepth?: number

    Maximum depth of the kd-tree.

ViewerConfiguration: { alphaDepthMask?: boolean; antialias?: boolean; backgroundColor?: number[]; backgroundColorFromAmbientLight?: boolean; canvasElement?: HTMLCanvasElement; canvasId?: string; clearEachPass?: boolean; entityOffsetsEnabled?: boolean; gammaFactor?: number; gammaInput?: boolean; gammaOutput?: boolean; id?: string; keyboardEventsElement?: HTMLElement; localeService?: LocaleService; logarithmicDepthBufferEnabled?: boolean; origin?: number[]; passes?: number; pbrEnabled?: boolean; pickSurfacePrecisionEnabled?: boolean; premultipliedAlpha?: boolean; preserveDrawingBuffer?: boolean; saoEnabled?: boolean; scale?: number; spinnerElementId?: string; transparent?: boolean; units?: "meters" | "centimeters" | "millimeters" | "yards" | "feet" | "inches" }

Type declaration

  • Optional alphaDepthMask?: boolean

    Whether writing into the depth buffer is enabled or disabled when rendering transparent objects.

  • Optional antialias?: boolean

    Whether to enable anti-aliasing.

  • Optional backgroundColor?: number[]

    Sets the canvas background color to use when transparent is false.

  • Optional backgroundColorFromAmbientLight?: boolean

    When transparent is false, set this true to derive the canvas background color from {@link AmbientLight.color}, or false to set the canvas background to backgroundColor.

  • Optional canvasElement?: HTMLCanvasElement

    Reference of an existing HTML canvas for the Viewer.scene - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional canvasId?: string

    ID of an existing HTML canvas for the Viewer.scene - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID.

  • Optional clearEachPass?: boolean

    When doing multiple passes per frame, specifies if to clear the canvas before each pass (true) or just before the first pass (false).

  • Optional entityOffsetsEnabled?: boolean

    Whether to enable Entity.offset. For best performance, only set this true when you need to use Entity.offset.

  • Optional gammaFactor?: number

    The gamma factor to use when rendering with pre-multiplied gamma.

  • Optional gammaInput?: boolean

    When true, expects that all textures and colors are premultiplied gamma.

  • Optional gammaOutput?: boolean

    Whether or not to render with pre-multiplied gama.

  • Optional id?: string

    Optional ID for this Viewer, defaults to the ID of Viewer.scene, which xeokit automatically generates.

  • Optional keyboardEventsElement?: HTMLElement

    Optional reference to HTML element on which key events should be handled. Defaults to the HTML Document.

  • Optional localeService?: LocaleService

    Optional locale-based translation service.

  • Optional logarithmicDepthBufferEnabled?: boolean

    Whether to enable logarithmic depth buffer.

  • Optional origin?: number[]

    The Real-space 3D origin, in current measurement units, at which the World-space coordinate origin [0,0,0] sits.

  • Optional passes?: number

    The number of times the Viewer.scene renders per frame.

  • Optional pbrEnabled?: boolean

    Whether to enable physically-based rendering.

  • Optional pickSurfacePrecisionEnabled?: boolean

    Whether to enable full-precision accuracy when surface picking with Scene.pick.

  • Optional premultipliedAlpha?: boolean

    Whether or not you want alpha composition with premultiplied alpha. Highlighting and selection works best when this is false.

  • Optional preserveDrawingBuffer?: boolean

    Whether or not to preserve the WebGL drawing buffer. This needs to be true for Viewer.getSnapshot to work.

  • Optional saoEnabled?: boolean

    Whether to enable Scalable Ambient Obscurance (SAO) effect. See {@link SAO} for more info.

  • Optional scale?: number

    The number of Real-space units in each World-space coordinate system unit.

  • Optional spinnerElementId?: string

    ID of existing HTML element to show the {@link Spinner} - internally creates a default element automatically if this is omitted.

  • Optional transparent?: boolean

    Whether or not the canvas is transparent.

  • Optional units?: "meters" | "centimeters" | "millimeters" | "yards" | "feet" | "inches"

    The measurement unit type.

WebIFCLoaderPluginConfiguration: { dataSource?: IWebIFCDefaultDataSource; excludeTypes?: string[]; excludeUnclassifiedObjects?: boolean; id?: string; includeTypes?: string[]; objectDefaults?: any; wasmPath: string }

Type declaration

  • Optional dataSource?: IWebIFCDefaultDataSource
  • Optional excludeTypes?: string[]
  • Optional excludeUnclassifiedObjects?: boolean
  • Optional id?: string
  • Optional includeTypes?: string[]
  • Optional objectDefaults?: any
  • wasmPath: string
XKTLoaderPluginConfiguration: { dataSource?: IXKTDefaultDataSource; excludeTypes?: string[]; excludeUnclassifiedObjects?: boolean; id?: string; includeTypes?: string[]; maxGeometryBatchSize?: number; objectDefaults?: IFCObjectDefaults; reuseGeometries?: boolean }

Type declaration

  • Optional dataSource?: IXKTDefaultDataSource

    A custom data source through which the XKTLoaderPlugin can load model and metadata files. Defaults to an instance of {@link XKTDefaultDataSource}, which loads uover HTTP.

  • Optional excludeTypes?: string[]

    When loading metadata, never loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional excludeUnclassifiedObjects?: boolean

    When loading metadata and this is true, will only load Entitys that have MetaObjects (that are not excluded). This is useful when we don't want Entitys in the Scene that are not represented within IFC navigation components, such as TreeViewPlugin.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional includeTypes?: string[]

    When loading metadata, only loads objects that have MetaObjects with MetaObject.type values in this list.

  • Optional maxGeometryBatchSize?: number

    Maximum geometry batch size, as number of vertices.

  • Optional objectDefaults?: IFCObjectDefaults

    Map of initial default states for each loaded Entity that represents an object. Default value is IFCObjectDefaults.

  • Optional reuseGeometries?: boolean

    Indicates whether to enable geometry reuse

XML3DLoaderPluginConfiguration: { createMetaModel?: boolean; id?: string; materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial"; workerScriptsPath: string }

Type declaration

  • Optional createMetaModel?: boolean

    When true, will create a MetaModel for the model in MetaScene.metaModels.

  • Optional id?: string

    Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.

  • Optional materialType?: "MetallicMaterial" | "SpecularMaterial" | "PhongMaterial"

    What type of materials to create while loading

  • workerScriptsPath: string

    Path to the directory that contains the bundled zip.js archive

Variables

math: { DEGTORAD: 0.017453292; RADTODEG: 57.295779513; getAABB2Center: any; getAABB3Center: any; getAABB3Diag: any; globalizeObjectId: any; normalizeVec3: any; unglobalizeObjectId: any; vec2: any; vec3: any; vec4: any }

Type declaration

  • DEGTORAD: 0.017453292

    The number of radiians in a degree (0.0174532925).

  • RADTODEG: 57.295779513

    The number of degrees in a radian.

  • getAABB2Center:function
    • getAABB2Center(aabb: number[], dest?: (values?: number[]) => number[]): number[]
    • Gets the center of a 2D AABB.

      Parameters

      • aabb: number[]
      • Optional dest: (values?: number[]) => number[]
          • (values?: number[]): number[]
          • Parameters

            • Optional values: number[]

            Returns number[]

      Returns number[]

  • getAABB3Center:function
    • getAABB3Center(aabb: number[], dest?: (values?: number[]) => number[]): number[]
    • Gets the center of an AABB.

      Parameters

      • aabb: number[]
      • Optional dest: (values?: number[]) => number[]
          • (values?: number[]): number[]
          • Parameters

            • Optional values: number[]

            Returns number[]

      Returns number[]

  • getAABB3Diag:function
    • getAABB3Diag(aabb: number[]): number
  • globalizeObjectId:function
    • globalizeObjectId(modelId: string, objectId: string): string
  • normalizeVec3:function
    • normalizeVec3(v: number[], dest?: any): number[]
  • unglobalizeObjectId:function
    • unglobalizeObjectId(modelId: string, globalId: string): string
  • vec2:function
    • vec2(values?: number[]): number[]
  • vec3:function
    • vec3(values?: number[]): number[]
  • vec4:function
    • vec4(values?: number[]): number[]

Generated using TypeDoc