Reference Source

References

plugins/AnnotationsPlugin

summary
public

A Marker with an HTML label attached to it, managed by an AnnotationsPlugin.

public

AnnotationsPlugin is a Viewer plugin that creates Annotations.

plugins/AxisGizmoPlugin

summary
public

Viewer plugin that shows the axii of the World-space coordinate system.

plugins/BCFViewpointsPlugin

summary
public

Viewer plugin that saves and loads BCF viewpoints as JSON objects.

plugins/BIMServerLoaderPlugin

summary
public

Viewer plugin that loads models from a BIMServer.

plugins/BIMServerLoaderPlugin/BIMServerClient

summary
public

plugins/GLTFLoaderPlugin

summary
public

Default data access strategy for GLTFLoaderPlugin.

public

A Viewer plugin that loads models from glTF.

plugins/NavCubePlugin

summary
public

NavCubePlugin is a Viewer plugin that provides a navigation control that lets us look at the Scene from along a chosen axis or diagonal.

public

F CubeTextureCanvas(viewer: *)

plugins/OBJLoaderPlugin

summary
public

Viewer plugin that loads models from OBJ files.

plugins/PlanViewsPlugin

summary
public

A plan view of a building storey, managed by a PlanViewsPlugin.

public

A Viewer plugin that provides plan view images of storeys within IFC building models.

public

Property states for Entitys in PlanViews capture by a PlanViewsPlugin.

plugins/STLLoaderPlugin

summary
public

Viewer plugin that loads models from STL files.

plugins/SectionPlanesPlugin

summary
public

SectionPlanesPlugin is a Viewer plugin that manages SectionPlanes.

plugins/SkyboxesPlugin

summary
public

Viewer plugin that manages skyboxes

plugins/XKTLoaderPlugin

summary
public

Default data access strategy for XKTLoaderPlugin.

public

A Viewer plugin that loads models from xeokit's optimized .xkt format.

[Run this example]

Overview

  • XKTLoaderPlugin is the most efficient way to load high-detail models into xeokit.
  • An .xkt file is a single BLOB containing a model, compressed using geometry quantization and pako.
  • Set the position, scale and rotation of each model as you load it.
  • Filter which IFC types get loaded.
  • Configure initial default appearances for IFC types.
  • Set a custom data source for .xkt and IFC metadata files.
  • Does not support textures or physically-based materials.

Creating .xkt files

Use the node.js-based xeokit-gltf-to-xkt tool to convert your glTF IFC files to .xkt format.

Scene representation

When loading a model, XKTLoaderPlugin creates an Entity that represents the model, which will have Entity#isModel set true and will be registered by Entity#id in Scene#models. The XKTLoaderPlugin also creates an Entity for each object within the model. Those Entities will have Entity#isObject set true and will be registered by Entity#id in Scene#objects.

Metadata

XKTLoaderPlugin can also load an accompanying JSON metadata file with each model, which creates a MetaModel corresponding to the model Entity and a MetaObject corresponding to each object Entity.

Each MetaObject has a MetaObject#type, which indicates the classification of its corresponding Entity. When loading metadata, we can also configure XKTLoaderPlugin with a custom lookup table of initial values to set on the properties of each type of Entity. By default, XKTLoaderPlugin uses its own map of default colors and visibilities for IFC element types.

Usage

In the example below we'll load the Schependomlaan model from a .xkt file, along with an accompanying JSON IFC metadata file.

plugins/XML3DLoaderPlugin

summary
public

Viewer plugin that loads models from 3DXML files.

viewer

summary
public

C Plugin

Base class for Viewer plugin classes.

public

C Viewer

The WebGL-based 3D Viewer class at the heart of the xeokit SDK.

viewer/metadata

summary
public

Metadata corresponding to an Entity that represents a model.

public

Metadata corresponding to an Entity that represents an object.

public

Metadata corresponding to a Scene.

public

V IFCObjectDefaults: {String: Object}

Default initial properties for Entitys loaded from models accompanied by metadata.

viewer/scene

summary
public

Base class for all xeokit components.

public abstract

I Entity

An abstract 3D scene element that can be individually shown, hidden, selected, highlighted, xrayed, culled, picked, clipped and bounded.

viewer/scene/PerformanceModel

summary
public

A high-performance model representation for efficient rendering and low memory usage.

viewer/scene/camera

summary
public

C Camera

Manages viewing and projection transforms for its Scene.

public

Controls a Camera with keyboard, mouse and touch input.

public

Jumps or flies the Scene's Camera to a given target.

  • Located at Viewer#cameraFlight
  • Can fly or jump to its target.
  • While flying, can be stopped, or redirected to a different target.
  • Can also smoothly transition between ortho and perspective projections.

A CameraFlightAnimation's target can be:

public

Defines a sequence of frames along which a CameraPathAnimation can animate a Camera.

public

Animates the Scene's's Camera along a CameraPath.

public

Defines a custom projection for a Camera as a custom 4x4 matrix..

public

Defines its Camera's perspective projection as a frustum-shaped view volume.

  • Located at Camera#frustum.
  • Allows to explicitly set the positions of the left, right, top, bottom, near and far planes, which is useful for asymmetrical view volumes, such as for stereo viewing.
  • Frustum#near and Frustum#far specify the distances to the WebGL clipping planes.
public

C Ortho

Defines its Camera's orthographic projection as a box-shaped view volume.

  • Located at Camera#ortho.
  • Works like Blender's orthographic projection, where the positions of the left, right, top and bottom planes are implicitly indicated with a single Ortho#scale property, which causes the frustum to be symmetrical on X and Y axis, large enough to contain the number of units given by Ortho#scale.
public

Defines its Camera's perspective projection using a field-of-view angle.

viewer/scene/canvas

summary
public

C Canvas

Manages its Scene's HTML canvas.

public

Displays a progress animation at the center of its Canvas while things are loading or otherwise busy.

viewer/scene/geometry

summary
public

Defines a shape for one or more Meshes.

public

A Geometry that keeps its geometry data in both browser and GPU memory.

public

A Geometry that keeps its geometry data solely in GPU memory, without retaining it in browser memory.

viewer/scene/geometry/builders

summary
public

Creates a box-shaped Geometry.

public

Creates a cylinder-shaped Geometry.

public

Creates a plane-shaped Geometry.

public

Creates a sphere-shaped Geometry.

public

Creates a torus-shaped Geometry.

public

Creates wireframe vector text Geometry.

viewer/scene/geometry/loaders

summary
public

F load3DSGeometry(scene: Scene, cfg: *): Object

Loads Geometry from 3DS.

public

F loadOBJGeometry(scene: Scene, cfg: *): Object

Loads Geometry from OBJ.

viewer/scene/input

summary
public

C Input

viewer/scene/lights

summary
public

An ambient light source of fixed color and intensity that illuminates all Meshes equally.

public

A cube texture map.

public

A directional light source that illuminates all Meshes equally from a given direction.

public

C Light

A dynamic light source within a Scene.

public

A LightMap specifies a cube texture light map.

public

A positional light source that originates from a single point and spreads outward in all directions, with optional attenuation over distance.

public

A reflection cube map.

public

C Shadow

viewer/scene/marker

summary
public

C Marker

Tracks the World, View and Canvas coordinates, and visibility, of a position within a Scene.

viewer/scene/materials

summary
public

Configures the appearance of Entitys when their edges are emphasised.

public

Configures the appearance of Entitys when they are xrayed, highlighted or selected.

public

Configures Fresnel effects for PhongMaterials.

public

Configures the normal rendered appearance of Meshes using the non-realistic but GPU-efficient Lambertian flat shading model for calculating reflectance.

public
public

Configures the normal rendered appearance of Meshes using the physically-accurate metallic-roughness shading model.

public

Configures the normal rendered appearance of Meshes using the non-physically-correct Blinn-Phong shading model.

public

Configures the normal rendered appearance of Meshes using the physically-accurate specular-glossiness shading model.

public

A 2D texture map.

viewer/scene/mesh

summary
public

C Mesh

An Entity that is a drawable element, with a Geometry and a Material, that can be connected into a scene graph using Nodes.

viewer/scene/nodes

summary
public

C Node

An Entity that is a scene graph node that can have child Nodes and Meshes.

viewer/scene/paths

summary
public

A Curve along which a 3D position can be animated.

public

C Curve

Abstract base class for curve classes.

public

C Path

A complex curved path constructed from various Curve subtypes.

public

A QuadraticBezierCurve is a Curve along which a 3D position can be animated.

public

A Curve along which a 3D position can be animated.

viewer/scene/scene

summary
public

C Scene

Contains the components that comprise a 3D scene.

public

Saves a snapshot of the visual state of a Scene.

viewer/scene/sectionPlane

summary
public

An arbitrarily-aligned World-space clipping plane.

viewer/scene/skybox

summary
public

C Skybox

A Skybox.

viewer/scene/viewport

summary
public

viewer/scene/webgl

summary
public

Manages occlusion testing.

public

Pick result returned by Scene#pick.