@xeokit/xeokit-sdk 2.6.0-beta-16 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/xeokit-sdk.cjs.js +140 -150
- package/dist/xeokit-sdk.es.js +140 -150
- package/dist/xeokit-sdk.es5.js +140 -151
- package/package.json +3 -4
- package/src/extras/ContextMenu/ContextMenu.js +5 -5
- package/src/extras/PointerLens/PointerLens.js +1 -1
- package/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.js +5 -5
- package/src/plugins/AnnotationsPlugin/AnnotationsPlugin.js +8 -8
- package/src/plugins/AxisGizmoPlugin/AxisGizmoPlugin.js +1 -1
- package/src/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.js +7 -7
- package/src/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.js +3 -3
- package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.js +8 -8
- package/src/plugins/FaceAlignedSectionPlanesPlugin/FaceAlignedSectionPlanesPlugin.js +2 -2
- package/src/plugins/FastNavPlugin/FastNavPlugin.js +2 -2
- package/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js +3 -3
- package/src/plugins/NavCubePlugin/NavCubePlugin.js +2 -2
- package/src/plugins/OBJLoaderPlugin/OBJLoaderPlugin.js +1 -1
- package/src/plugins/STLLoaderPlugin/STLLoaderPlugin.js +3 -3
- package/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +2 -2
- package/src/plugins/TreeViewPlugin/TreeViewPlugin.js +5 -5
- package/src/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.js +3 -3
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +8 -16
- package/src/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.js +8 -8
- package/src/viewer/Configs.js +1 -1
- package/src/viewer/localization/LocaleService.js +1 -1
- package/src/viewer/metadata/MetaScene.js +1 -1
- package/src/viewer/scene/Bitmap/Bitmap.js +2 -2
- package/src/viewer/scene/CameraControl/CameraControl.js +6 -6
- package/src/viewer/scene/ImagePlane/ImagePlane.js +4 -4
- package/src/viewer/scene/LineSet/LineSet.js +2 -2
- package/src/viewer/scene/camera/CameraFlightAnimation.js +1 -1
- package/src/viewer/scene/camera/CameraPathAnimation.js +1 -1
- package/src/viewer/scene/geometry/ReadableGeometry.js +1 -1
- package/src/viewer/scene/geometry/VBOGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildBoxGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildBoxLinesGeometry.js +2 -2
- package/src/viewer/scene/geometry/builders/buildCylinderGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildGridGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildPlaneGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildPolylineGeometry.js +2 -2
- package/src/viewer/scene/geometry/builders/buildSphereGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildTorusGeometry.js +1 -1
- package/src/viewer/scene/geometry/builders/buildVectorTextGeometry.js +1 -1
- package/src/viewer/scene/geometry/loaders/load3DSGeometry.js +0 -2
- package/src/viewer/scene/geometry/loaders/loadOBJGeometry.js +0 -2
- package/src/viewer/scene/lights/AmbientLight.js +1 -1
- package/src/viewer/scene/lights/DirLight.js +1 -1
- package/src/viewer/scene/lights/PointLight.js +1 -1
- package/src/viewer/scene/lights/Shadow.js +1 -0
- package/src/viewer/scene/marker/Marker.js +0 -2
- package/src/viewer/scene/marker/SpriteMarker.js +1 -1
- package/src/viewer/scene/materials/EdgeMaterial.js +1 -1
- package/src/viewer/scene/materials/Fresnel.js +1 -1
- package/src/viewer/scene/materials/LambertMaterial.js +1 -1
- package/src/viewer/scene/materials/LinesMaterial.js +1 -1
- package/src/viewer/scene/materials/MetallicMaterial.js +1 -1
- package/src/viewer/scene/materials/PhongMaterial.js +1 -1
- package/src/viewer/scene/materials/PointsMaterial.js +1 -1
- package/src/viewer/scene/materials/Texture.js +1 -1
- package/src/viewer/scene/mesh/Mesh.js +1 -1
- package/src/viewer/scene/model/SceneModel.js +5 -5
- package/src/viewer/scene/nodes/Node.js +1 -1
- package/src/viewer/scene/postfx/SAO.js +5 -5
- package/src/viewer/scene/utils/textureTranscoders/KTX2TextureTranscoder/KTX2TextureTranscoder.js +3 -3
- package/src/viewer/scene/webgl/occlusion/OcclusionLayer.js +3 -0
- package/src/viewer/scene/webgl/occlusion/OcclusionTester.js +1 -0
- package/dist/web-ifc.wasm +0 -0
- package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControlLegacy.js +0 -472
|
@@ -8,7 +8,7 @@ import {math} from "../scene/math/math.js";
|
|
|
8
8
|
*
|
|
9
9
|
* * Located in {@link Viewer#metaScene}.
|
|
10
10
|
* * Contains {@link MetaModel}s and {@link MetaObject}s.
|
|
11
|
-
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples
|
|
11
|
+
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneGraph_metadata)
|
|
12
12
|
*/
|
|
13
13
|
class MetaScene {
|
|
14
14
|
|
|
@@ -17,9 +17,9 @@ import {math} from "../math/math.js";
|
|
|
17
17
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
18
18
|
* an ````Bitmap```` to show a storey plan next to the model.
|
|
19
19
|
*
|
|
20
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](/examples/#
|
|
20
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
21
21
|
*
|
|
22
|
-
* [[Run this example](/examples/#
|
|
22
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
23
23
|
*
|
|
24
24
|
* ````javascript
|
|
25
25
|
* import {Viewer, Bitmap, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -69,12 +69,12 @@ const DEFAULT_SNAP_EDGE = true;
|
|
|
69
69
|
*
|
|
70
70
|
* # Examples
|
|
71
71
|
*
|
|
72
|
-
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
73
|
-
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
74
|
-
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
75
|
-
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
76
|
-
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
77
|
-
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples
|
|
72
|
+
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_Duplex)
|
|
73
|
+
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_HolterTower)
|
|
74
|
+
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_Duplex)
|
|
75
|
+
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_HolterTower)
|
|
76
|
+
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_planView_Schependomlaan)
|
|
77
|
+
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_keyMap)
|
|
78
78
|
* <br><br>
|
|
79
79
|
*
|
|
80
80
|
* # Orbit Mode
|
|
@@ -31,9 +31,9 @@ const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
|
31
31
|
*
|
|
32
32
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanGoogleSatMapMed.png">
|
|
33
33
|
*
|
|
34
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](/examples/#ImagePlane_groundPlane)
|
|
34
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)
|
|
35
35
|
*
|
|
36
|
-
* [[Run this example](/examples/#ImagePlane_groundPlane)]
|
|
36
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)]
|
|
37
37
|
*
|
|
38
38
|
* ````javascript
|
|
39
39
|
* import {Viewer, ImagePlane, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -81,9 +81,9 @@ const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
|
81
81
|
*
|
|
82
82
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanPlanViewMed.png">
|
|
83
83
|
*
|
|
84
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](/examples/#ImagePlane_imageInSectionPlane)
|
|
84
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
85
85
|
*
|
|
86
|
-
* [[Run this example](/examples/#ImagePlane_imageInSectionPlane)]
|
|
86
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
87
87
|
*
|
|
88
88
|
* ````javascript
|
|
89
89
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin, ImagePlane} from "xeokit-sdk.es.js";
|
|
@@ -14,9 +14,9 @@ import {SceneModel} from "../model/SceneModel.js";
|
|
|
14
14
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
15
15
|
* a ````LineSet```` to show a grid underneath the model.
|
|
16
16
|
*
|
|
17
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](/examples/#LineSet_grid)
|
|
17
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)
|
|
18
18
|
*
|
|
19
|
-
* [[Run this example](/examples/#LineSet_grid)]
|
|
19
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)]
|
|
20
20
|
*
|
|
21
21
|
* ````javascript
|
|
22
22
|
* import {Viewer, XKTLoaderPlugin, LineSet, buildGridGeometry} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -72,7 +72,7 @@ const newLookEyeVec = math.vec3();
|
|
|
72
72
|
*
|
|
73
73
|
* Let's transition the Camera to orthographic projection:
|
|
74
74
|
*
|
|
75
|
-
* [[Run example](/examples
|
|
75
|
+
* [[Run example](/examples/index.html#camera_CameraFlightAnimation_projection)]
|
|
76
76
|
*
|
|
77
77
|
* ````Javascript
|
|
78
78
|
* viewer.cameraFlight.flyTo({ projection: "ortho", () => {
|
|
@@ -10,7 +10,7 @@ import {CameraFlightAnimation} from "./CameraFlightAnimation.js"
|
|
|
10
10
|
* In the example below, we'll load a model using a {@link GLTFLoaderPlugin}, then animate a {@link Camera}
|
|
11
11
|
* through the frames in a {@link CameraPath}.
|
|
12
12
|
*
|
|
13
|
-
* * [[Run this example](/examples
|
|
13
|
+
* * [[Run this example](/examples/index.html#camera_CameraPathAnimation)]
|
|
14
14
|
*
|
|
15
15
|
* ````Javascript
|
|
16
16
|
* import {Viewer, GLTFLoaderPlugin, CameraPath, CameraPathAnimation} from "xeokit-sdk.es.js";
|
|
@@ -18,7 +18,7 @@ const tempAABB = math.AABB3();
|
|
|
18
18
|
*
|
|
19
19
|
* Creating a {@link Mesh} with a ReadableGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
20
20
|
*
|
|
21
|
-
* [[Run this example](/examples
|
|
21
|
+
* [[Run this example](/examples/index.html#geometry_ReadableGeometry)]
|
|
22
22
|
*
|
|
23
23
|
* ````javascript
|
|
24
24
|
* import {Viewer, Mesh, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -18,7 +18,7 @@ const tempAABB = math.AABB3();
|
|
|
18
18
|
*
|
|
19
19
|
* Creating a {@link Mesh} with a VBOGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
20
20
|
*
|
|
21
|
-
* [[Run this example](/examples
|
|
21
|
+
* [[Run this example](/examples/index.html#geometry_VBOGeometry)]
|
|
22
22
|
*
|
|
23
23
|
* ````javascript
|
|
24
24
|
* import {Viewer, Mesh, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry}.
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples
|
|
10
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildBoxGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples
|
|
10
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildBoxLinesGeometry, ReadableGeometry, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -111,7 +111,7 @@ function buildBoxLinesGeometry(cfg = {}) {
|
|
|
111
111
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
112
112
|
* This box will be created from AABB of a model.
|
|
113
113
|
*
|
|
114
|
-
* [[Run this example](/examples
|
|
114
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometryFromAABB)]
|
|
115
115
|
*
|
|
116
116
|
* ````javascript
|
|
117
117
|
* import {Viewer, Mesh, Node, buildBoxGeometry, buildBoxLinesGeometryFromAABB, ReadableGeometry, PhongMaterial} from "../../dist/xeokit-sdk.min.es.js";
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Creating a {@link Mesh} with a cylinder-shaped {@link ReadableGeometry} :
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples
|
|
10
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildCylinderGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
*
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Creating a {@link Mesh} with a GridGeometry and a {@link PhongMaterial}:
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples
|
|
10
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildGridGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildGridGeometry, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Creating a {@link Mesh} with a PlaneGeometry and a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples/#
|
|
10
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPlaneGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildPlaneGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} that has lines primitives.
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples/#
|
|
10
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -91,7 +91,7 @@ function buildPolylineGeometry(cfg = {}) {
|
|
|
91
91
|
*
|
|
92
92
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} created from curves.
|
|
93
93
|
*
|
|
94
|
-
* [[Run this example](/examples/#
|
|
94
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometryFromCurve)]
|
|
95
95
|
*
|
|
96
96
|
* ````javascript
|
|
97
97
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -7,7 +7,7 @@ import {utils} from '../../utils.js';
|
|
|
7
7
|
*
|
|
8
8
|
* Creating a {@link Mesh} with a sphere-shaped {@link ReadableGeometry} :
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples/#
|
|
10
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildSphereGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildSphereGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7,7 +7,7 @@ import {math} from '../../math/math.js';
|
|
|
7
7
|
* ## Usage
|
|
8
8
|
* Creating a {@link Mesh} with a torus-shaped {@link ReadableGeometry} :
|
|
9
9
|
*
|
|
10
|
-
* [[Run this example](/examples
|
|
10
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildTorusGeometry)]
|
|
11
11
|
*
|
|
12
12
|
* ````javascript
|
|
13
13
|
* import {Viewer, Mesh, buildTorusGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -1581,7 +1581,7 @@ const letters = {
|
|
|
1581
1581
|
*
|
|
1582
1582
|
* Creating a {@link Mesh} with vector text {@link ReadableGeometry} :
|
|
1583
1583
|
*
|
|
1584
|
-
* [[Run this example](/examples
|
|
1584
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildVectorTextGeometry)]
|
|
1585
1585
|
*
|
|
1586
1586
|
* ````javascript
|
|
1587
1587
|
*
|
|
@@ -8,8 +8,6 @@ import {K3D} from '../../libs/k3d.js';
|
|
|
8
8
|
*
|
|
9
9
|
* In the example below we'll create a {@link Mesh} with {@link PhongMaterial}, {@link Texture} and a {@link ReadableGeometry} loaded from 3DS.
|
|
10
10
|
*
|
|
11
|
-
* [[Run this example](/examples/#geometry_loaders_3DS)]
|
|
12
|
-
*
|
|
13
11
|
* ````javascript
|
|
14
12
|
* import {Viewer, Mesh, load3DSGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
15
13
|
*
|
|
@@ -8,8 +8,6 @@ import {K3D} from '../../libs/k3d.js';
|
|
|
8
8
|
*
|
|
9
9
|
* In the example below we'll create a {@link Mesh} with {@link MetallicMaterial} and {@link ReadableGeometry} loaded from OBJ.
|
|
10
10
|
*
|
|
11
|
-
* [[Run this example](/examples/#geometry_loaders_OBJ)]
|
|
12
|
-
*
|
|
13
11
|
* ````javascript
|
|
14
12
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry,
|
|
15
13
|
* MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -12,7 +12,7 @@ import {Light} from './Light.js';
|
|
|
12
12
|
*
|
|
13
13
|
* In the example below we'll destroy the {@link Scene}'s default light sources then create an AmbientLight and a couple of {@link @DirLight}s:
|
|
14
14
|
*
|
|
15
|
-
* [[Run this example](/examples
|
|
15
|
+
* [[Run this example](/examples/index.html#lights_AmbientLight)]
|
|
16
16
|
*
|
|
17
17
|
* ````javascript
|
|
18
18
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -16,7 +16,7 @@ import {math} from '../math/math.js';
|
|
|
16
16
|
*
|
|
17
17
|
* In the example below we'll replace the {@link Scene}'s default light sources with three View-space DirLights.
|
|
18
18
|
*
|
|
19
|
-
* [[Run this example](/examples
|
|
19
|
+
* [[Run this example](/examples/index.html#lights_DirLight_view)]
|
|
20
20
|
*
|
|
21
21
|
* ````javascript
|
|
22
22
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -18,7 +18,7 @@ import {math} from '../math/math.js';
|
|
|
18
18
|
*
|
|
19
19
|
* In the example below we'll replace the {@link Scene}'s default light sources with three World-space PointLights.
|
|
20
20
|
*
|
|
21
|
-
* [[Run this example](/examples
|
|
21
|
+
* [[Run this example](/examples/index.html#lights_PointLight_world)]
|
|
22
22
|
*
|
|
23
23
|
* ````javascript
|
|
24
24
|
* import {Viewer, Mesh, buildSphereGeometry, buildPlaneGeometry,
|
|
@@ -38,8 +38,6 @@ const tempVec4b = math.vec4();
|
|
|
38
38
|
* We'll also demonstrate how to query the Marker's visibility status and position (in the World, View and
|
|
39
39
|
* Canvas coordinate systems), and how to subscribe to change events on those properties.
|
|
40
40
|
*
|
|
41
|
-
* [[Run this example](/examples/#Markers_SimpleExample)]
|
|
42
|
-
*
|
|
43
41
|
* ````javascript
|
|
44
42
|
* import {Viewer, GLTFLoaderPlugin, Marker} from "xeokit-sdk.es.js";
|
|
45
43
|
*
|
|
@@ -15,7 +15,7 @@ import {Marker} from "./Marker.js";
|
|
|
15
15
|
*
|
|
16
16
|
* ## Usage
|
|
17
17
|
*
|
|
18
|
-
* [[Run this example](/examples
|
|
18
|
+
* [[Run this example](/examples/index.html#markers_SpriteMarker)]
|
|
19
19
|
*
|
|
20
20
|
* ```` javascript
|
|
21
21
|
* import {Viewer, SpriteMarker } from "./https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -39,7 +39,7 @@ const PRESETS = {
|
|
|
39
39
|
*
|
|
40
40
|
* Recall that {@link Mesh} is a concrete subtype of the abstract {@link Entity} base class.
|
|
41
41
|
*
|
|
42
|
-
* [[Run this example](/examples
|
|
42
|
+
* [[Run this example](/examples/index.html#materials_EdgeMaterial)]
|
|
43
43
|
*
|
|
44
44
|
* ````javascript
|
|
45
45
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -11,7 +11,7 @@ import {math} from '../math/math.js';
|
|
|
11
11
|
*
|
|
12
12
|
* In the example below we'll create a {@link Mesh} with a {@link PhongMaterial} that applies a Fresnel to its alpha channel to give a glasss-like effect.
|
|
13
13
|
*
|
|
14
|
-
* [[Run this example](/examples
|
|
14
|
+
* [[Run this example](/examples/index.html#materials_Fresnel)]
|
|
15
15
|
*
|
|
16
16
|
* ````javascript
|
|
17
17
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -13,7 +13,7 @@ import {math} from '../math/math.js';
|
|
|
13
13
|
*
|
|
14
14
|
* ## Usage
|
|
15
15
|
*
|
|
16
|
-
* [[Run this example](/examples
|
|
16
|
+
* [[Run this example](/examples/index.html#materials_LambertMaterial)]
|
|
17
17
|
*
|
|
18
18
|
* In the example below we'll create a {@link Mesh} with a shape defined by a {@link buildTorusGeometry} and normal rendering appearance configured with a LambertMaterial.
|
|
19
19
|
*
|
|
@@ -24,7 +24,7 @@ const PRESETS = {
|
|
|
24
24
|
* In the example below, we'll customize the {@link Scene}'s global ````LinesMaterial````, then use
|
|
25
25
|
* an {@link XKTLoaderPlugin} to load a model containing line segments.
|
|
26
26
|
*
|
|
27
|
-
* [[Run this example](/examples
|
|
27
|
+
* [[Run this example](/examples/index.html#materials_LinesMaterial)]
|
|
28
28
|
*
|
|
29
29
|
* ````javascript
|
|
30
30
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -21,7 +21,7 @@ const modeNames = ["opaque", "mask", "blend"];
|
|
|
21
21
|
* channels, which allows us a little creative flexibility. Then, in the next example further down, we'll combine those channels
|
|
22
22
|
* within the same {@link Texture} for efficiency.
|
|
23
23
|
*
|
|
24
|
-
* [[Run this example](/examples
|
|
24
|
+
* [[Run this example](/examples/index.html#materials_MetallicMaterial)]
|
|
25
25
|
*
|
|
26
26
|
* ````javascript
|
|
27
27
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry, MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -17,7 +17,7 @@ const alphaModeNames = ["opaque", "mask", "blend"];
|
|
|
17
17
|
*
|
|
18
18
|
* In the example below, we'll create a {@link Mesh} with a PhongMaterial with a diffuse {@link Texture} and a specular {@link Fresnel}, using a {@link buildTorusGeometry} to create the {@link Geometry}.
|
|
19
19
|
*
|
|
20
|
-
* [[Run this example](/examples
|
|
20
|
+
* [[Run this example](/examples/index.html#materials_PhongMaterial)]
|
|
21
21
|
*
|
|
22
22
|
* ```` javascript
|
|
23
23
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -32,7 +32,7 @@ const PRESETS = {
|
|
|
32
32
|
* In the example below, we'll customize the {@link Scene}'s global ````PointsMaterial````, then use
|
|
33
33
|
* an {@link XKTLoaderPlugin} to load a model containing a point cloud.
|
|
34
34
|
*
|
|
35
|
-
* [[Run this example](/examples
|
|
35
|
+
* [[Run this example](/examples/index.html#materials_PointsMaterial)]
|
|
36
36
|
*
|
|
37
37
|
* ````javascript
|
|
38
38
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -52,7 +52,7 @@ function nextHighestPowerOfTwo(x) {
|
|
|
52
52
|
* with {@link PhongMaterial#diffuseMap} and {@link PhongMaterial#specularMap}. The {@link Texture} pixel colors directly
|
|
53
53
|
* provide the diffuse and specular components for each fragment across the {@link ReadableGeometry} surface.
|
|
54
54
|
*
|
|
55
|
-
* [[Run this example](/examples
|
|
55
|
+
* [[Run this example](/examples/index.html#materials_Texture)]
|
|
56
56
|
*
|
|
57
57
|
* ```` javascript
|
|
58
58
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -51,7 +51,7 @@ const identityMat = math.identityMat4();
|
|
|
51
51
|
*
|
|
52
52
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
53
53
|
*
|
|
54
|
-
* [[Run this example](/examples/#
|
|
54
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#sceneGraph)]
|
|
55
55
|
*
|
|
56
56
|
* ````javascript
|
|
57
57
|
* import {Viewer, Mesh, Node, PhongMaterial, buildBoxGeometry, ReadableGeometry} from "xeokit-sdk.es.js";
|
|
@@ -149,7 +149,7 @@ const DTX = 2;
|
|
|
149
149
|
* Then, for each object in our model we'll add an {@link Entity}
|
|
150
150
|
* that has a mesh that instances our box geometry, transforming and coloring the instance.
|
|
151
151
|
*
|
|
152
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
152
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_instancing)
|
|
153
153
|
*
|
|
154
154
|
* ````javascript
|
|
155
155
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -349,7 +349,7 @@ const DTX = 2;
|
|
|
349
349
|
* Let's once more use a ````SceneModel````
|
|
350
350
|
* to build the simple table model, this time exploiting geometry batching.
|
|
351
351
|
*
|
|
352
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
352
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
353
353
|
*
|
|
354
354
|
* ````javascript
|
|
355
355
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -617,7 +617,7 @@ const DTX = 2;
|
|
|
617
617
|
* ````
|
|
618
618
|
*
|
|
619
619
|
* Given an {@link Entity}, we can find the object or model of which it is a part, or the objects that comprise it. We can also generate UI
|
|
620
|
-
* components from the metadata, such as the tree view demonstrated in [this demo](https://xeokit.github.io/xeokit-sdk/examples
|
|
620
|
+
* components from the metadata, such as the tree view demonstrated in [this demo](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_glTF_OTCConferenceCenter).
|
|
621
621
|
*
|
|
622
622
|
* This hierarchy allows us to express the hierarchical structure of a model while representing it in
|
|
623
623
|
* various ways in the 3D scene (such as with ````SceneModel````, which
|
|
@@ -650,7 +650,7 @@ const DTX = 2;
|
|
|
650
650
|
*
|
|
651
651
|
* Note that the axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
652
652
|
*
|
|
653
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
653
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
654
654
|
*
|
|
655
655
|
* ````javascript
|
|
656
656
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -747,7 +747,7 @@ const DTX = 2;
|
|
|
747
747
|
*
|
|
748
748
|
* The axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
749
749
|
*
|
|
750
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
750
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
751
751
|
*
|
|
752
752
|
* ````javascript
|
|
753
753
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -30,7 +30,7 @@ const identityMat = math.identityMat4();
|
|
|
30
30
|
*
|
|
31
31
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
32
32
|
*
|
|
33
|
-
* [[Run this example](/examples
|
|
33
|
+
* [[Run this example](/examples/index.html#sceneRepresentation_SceneGraph)]
|
|
34
34
|
*
|
|
35
35
|
* ````javascript
|
|
36
36
|
* import {Viewer, Mesh, Node, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -4,9 +4,9 @@ import {WEBGL_INFO} from "../webglInfo.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* @desc Configures Scalable Ambient Obscurance (SAO) for a {@link Scene}.
|
|
6
6
|
*
|
|
7
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
7
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#postEffects_SAO_OTCConferenceCenter"><img src="http://xeokit.io/img/docs/SAO/saoEnabledDisabled.gif"></a>
|
|
8
8
|
*
|
|
9
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
9
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
10
10
|
*
|
|
11
11
|
* ## Overview
|
|
12
12
|
*
|
|
@@ -28,7 +28,7 @@ import {WEBGL_INFO} from "../webglInfo.js";
|
|
|
28
28
|
* {@link SAO#scale} and {@link SAO#intensity} must be tuned to the distance
|
|
29
29
|
* between {@link Perspective#near} and {@link Perspective#far}, or the distance
|
|
30
30
|
* between {@link Ortho#near} and {@link Ortho#far}, depending on which of those two projections the {@link Camera} is currently
|
|
31
|
-
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
31
|
+
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter) to get a
|
|
32
32
|
* feel for that.
|
|
33
33
|
*
|
|
34
34
|
* ## Usage
|
|
@@ -84,7 +84,7 @@ import {WEBGL_INFO} from "../webglInfo.js";
|
|
|
84
84
|
* });
|
|
85
85
|
* ````
|
|
86
86
|
*
|
|
87
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
87
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
88
88
|
*
|
|
89
89
|
* ## Efficiency
|
|
90
90
|
*
|
|
@@ -167,7 +167,7 @@ import {WEBGL_INFO} from "../webglInfo.js";
|
|
|
167
167
|
* });
|
|
168
168
|
* ````
|
|
169
169
|
*
|
|
170
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
170
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#techniques_nonInteractiveQuality)]
|
|
171
171
|
*/
|
|
172
172
|
class SAO extends Component {
|
|
173
173
|
|
package/src/viewer/scene/utils/textureTranscoders/KTX2TextureTranscoder/KTX2TextureTranscoder.js
CHANGED
|
@@ -58,9 +58,9 @@ let activeTranscoders = 0;
|
|
|
58
58
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
59
59
|
* load the Codec from the CDN. We'll stick with loading our own Codec, in case we want to run our app without an Internet connection.
|
|
60
60
|
*
|
|
61
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
61
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan"><img src="https://xeokit.github.io/xeokit-sdk/assets/images/xktWithTextures.png"></a>
|
|
62
62
|
*
|
|
63
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
63
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
64
64
|
*
|
|
65
65
|
* ````javascript
|
|
66
66
|
* const viewer = new Viewer({
|
|
@@ -101,7 +101,7 @@ let activeTranscoders = 0;
|
|
|
101
101
|
*
|
|
102
102
|
* As in the previous example, we'll configure our KTX2TextureTranscoder to load the Basis Codec from a local directory.
|
|
103
103
|
*
|
|
104
|
-
* * [Run a similar example](
|
|
104
|
+
* * [Run a similar example](https://xeokit.github.io/xeokit-sdk/examples/scenemodel/#vbo_batching_autocompressed_triangles_textures_ktx2)
|
|
105
105
|
*
|
|
106
106
|
* ````javascript
|
|
107
107
|
* const viewer = new Viewer({
|
package/dist/web-ifc.wasm
DELETED
|
Binary file
|