@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
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xeokit/xeokit-sdk",
|
|
3
|
-
"version": "2.6.0
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Web Programming Toolkit for 3D/2D BIM and AEC Graphics",
|
|
5
5
|
"module": "./dist/xeokit-sdk.es.js",
|
|
6
6
|
"main": "./dist/xeokit-sdk.cjs.js",
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "rollup --config rollup.config.js; rollup --config rollup.minified.config.js
|
|
10
|
-
"dev-build": "rollup --config rollup.dev.config.js
|
|
11
|
-
"test": "percy exec -- node ./snapshots.js",
|
|
9
|
+
"build": "rollup --config rollup.config.js; rollup --config rollup.minified.config.js",
|
|
10
|
+
"dev-build": "rollup --config rollup.dev.config.js",
|
|
12
11
|
"docs": "rm -Rf ./docs/*; ./node_modules/.bin/esdoc",
|
|
13
12
|
"typedocs": "rm -Rf ./docs/*; typedoc --tsconfig tsconfig.json",
|
|
14
13
|
"publish": "npm publish --access public"
|
|
@@ -47,9 +47,9 @@ class Item {
|
|
|
47
47
|
/**
|
|
48
48
|
* @desc A customizable HTML context menu.
|
|
49
49
|
*
|
|
50
|
-
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
50
|
+
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)
|
|
51
51
|
*
|
|
52
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
52
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
53
53
|
*
|
|
54
54
|
* ## Overview
|
|
55
55
|
*
|
|
@@ -92,7 +92,7 @@ class Item {
|
|
|
92
92
|
*
|
|
93
93
|
* We'll also initially enable the ````ContextMenu````.
|
|
94
94
|
*
|
|
95
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
95
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_Custom)]
|
|
96
96
|
*
|
|
97
97
|
* ````javascript
|
|
98
98
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -183,7 +183,7 @@ class Item {
|
|
|
183
183
|
* In the example below, we'll create a simple ````ContextMenu```` that allows us to toggle the selection of an object
|
|
184
184
|
* via its first item, which changes text depending on whether we are selecting or deselecting the object.
|
|
185
185
|
*
|
|
186
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
186
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_dynamicItemTitles)]
|
|
187
187
|
*
|
|
188
188
|
* ````javascript
|
|
189
189
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -224,7 +224,7 @@ class Item {
|
|
|
224
224
|
* Note that our "Effects" item has no ````doAction```` callback, because an item with a sub-menu performs no
|
|
225
225
|
* action of its own.
|
|
226
226
|
*
|
|
227
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
227
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_subMenus)]
|
|
228
228
|
*
|
|
229
229
|
* ````javascript
|
|
230
230
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This component is used by {@link DistanceMeasurementsControl} and {@link AngleMeasurementsControl}
|
|
6
6
|
* to help position the pointer when snap-to-vertex or snap-toedge is enabled.
|
|
7
7
|
*
|
|
8
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
8
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
9
9
|
*
|
|
10
10
|
* ````JavaScript
|
|
11
11
|
*
|
|
@@ -5,10 +5,10 @@ import {AngleMeasurementsMouseControl} from "./AngleMeasurementsMouseControl.js"
|
|
|
5
5
|
/**
|
|
6
6
|
* {@link Viewer} plugin for measuring angles.
|
|
7
7
|
*
|
|
8
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63641903-61488180-c6b6-11e9-8e00-895b9d16dc4b.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
8
|
+
* [<img src="https://user-images.githubusercontent.com/83100/63641903-61488180-c6b6-11e9-8e00-895b9d16dc4b.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_createWithMouse)
|
|
9
9
|
*
|
|
10
|
-
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
11
|
-
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
10
|
+
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
11
|
+
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
12
12
|
*
|
|
13
13
|
* ## Overview
|
|
14
14
|
*
|
|
@@ -28,7 +28,7 @@ import {AngleMeasurementsMouseControl} from "./AngleMeasurementsMouseControl.js"
|
|
|
28
28
|
* Note how each AngleMeasurement has ````origin````, ````corner```` and ````target````, which each indicate a 3D World-space
|
|
29
29
|
* position on the surface of an {@link Entity}. These can be aon the same Entity, or on different Entitys.
|
|
30
30
|
*
|
|
31
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
31
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
32
32
|
*
|
|
33
33
|
* ````JavaScript
|
|
34
34
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -99,7 +99,7 @@ import {AngleMeasurementsMouseControl} from "./AngleMeasurementsMouseControl.js"
|
|
|
99
99
|
* The AngleMeasurementControl will then wait for the next click on any Entity, to begin constructing
|
|
100
100
|
* another AngleMeasurement, and so on, until deactivated again.
|
|
101
101
|
*
|
|
102
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
102
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
103
103
|
*
|
|
104
104
|
* ````JavaScript
|
|
105
105
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -10,13 +10,13 @@ const tempVec3c = math.vec3();
|
|
|
10
10
|
/**
|
|
11
11
|
* {@link Viewer} plugin that creates {@link Annotation}s.
|
|
12
12
|
*
|
|
13
|
-
* [<img src="https://user-images.githubusercontent.com/83100/58403089-26589280-8062-11e9-8652-aed61a4e8c64.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
13
|
+
* [<img src="https://user-images.githubusercontent.com/83100/58403089-26589280-8062-11e9-8652-aed61a4e8c64.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickFlyToPosition)
|
|
14
14
|
*
|
|
15
|
-
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples
|
|
16
|
-
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
17
|
-
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
18
|
-
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
19
|
-
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples
|
|
15
|
+
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
16
|
+
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
17
|
+
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_hoverShowLabels)]
|
|
18
|
+
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickFlyToPosition)]
|
|
19
|
+
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_externalElements)]
|
|
20
20
|
*
|
|
21
21
|
* ## Overview
|
|
22
22
|
*
|
|
@@ -46,7 +46,7 @@ const tempVec3c = math.vec3();
|
|
|
46
46
|
*
|
|
47
47
|
* Finally, we'll query the Annotation's position occlusion/visibility status, and subscribe to change events on those properties.
|
|
48
48
|
*
|
|
49
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
49
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
50
50
|
*
|
|
51
51
|
* ````JavaScript
|
|
52
52
|
* import {Viewer, XKTLoaderPlugin,AnnotationsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -319,7 +319,7 @@ const tempVec3c = math.vec3();
|
|
|
319
319
|
*
|
|
320
320
|
* Let's now extend our example to create an Annotation wherever we click on the surface of of our model:
|
|
321
321
|
*
|
|
322
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
322
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
323
323
|
*
|
|
324
324
|
* ````javascript
|
|
325
325
|
* var i = 1; // Used to create unique Annotation IDs
|
|
@@ -15,7 +15,7 @@ import {math} from "../../viewer/scene/math/math.js";
|
|
|
15
15
|
*
|
|
16
16
|
* ## Usage
|
|
17
17
|
*
|
|
18
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
18
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_AxisGizmoPlugin)]
|
|
19
19
|
*
|
|
20
20
|
* ````JavaScript````
|
|
21
21
|
* import {Viewer, XKTLoaderPlugin, AxisGizmoPlugin} from "xeokit-sdk.es.js";
|
|
@@ -13,10 +13,10 @@ const tempVec3c = math.vec3();
|
|
|
13
13
|
/**
|
|
14
14
|
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
15
15
|
*
|
|
16
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples
|
|
16
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples/index.html#BCF_SaveViewpoint)
|
|
17
17
|
*
|
|
18
|
-
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
19
|
-
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
18
|
+
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
19
|
+
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint)]
|
|
20
20
|
*
|
|
21
21
|
* ## Overview
|
|
22
22
|
*
|
|
@@ -48,7 +48,7 @@ const tempVec3c = math.vec3();
|
|
|
48
48
|
* plan view using a {@link Bitmap}, then use a {@link BCFViewpointsPlugin#getViewpoint}
|
|
49
49
|
* to save a viewpoint to JSON, which we'll log to the JavaScript developer console.
|
|
50
50
|
*
|
|
51
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
51
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
52
52
|
*
|
|
53
53
|
* ````javascript
|
|
54
54
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin,
|
|
@@ -277,7 +277,7 @@ const tempVec3c = math.vec3();
|
|
|
277
277
|
* });
|
|
278
278
|
* ````
|
|
279
279
|
*
|
|
280
|
-
* [[Run an example](/examples
|
|
280
|
+
* [[Run an example](/examples/index.html#BCF_LoadViewpoint_defaultInvisible)]
|
|
281
281
|
*
|
|
282
282
|
* ## Behaviour with XKTLoaderPlugin globalizeObjectIds
|
|
283
283
|
*
|
|
@@ -295,8 +295,8 @@ const tempVec3c = math.vec3();
|
|
|
295
295
|
* capture the states of the individual ````Entitys```` that represent the duplicate IFC elements. Take a look at the
|
|
296
296
|
* following two examples to learn more.
|
|
297
297
|
*
|
|
298
|
-
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
299
|
-
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
298
|
+
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint_MultipleModels)
|
|
299
|
+
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint_MultipleModels)
|
|
300
300
|
*
|
|
301
301
|
* **Caveat:** when loading a BCF viewpoint, we always assume that we have loaded in our target BIM viewer the same models that were
|
|
302
302
|
* loaded in the viewpoint's original authoring application when the viewpoint was created. In the case of multi-model
|
|
@@ -11,9 +11,9 @@ const tempVec3c = math.vec3();
|
|
|
11
11
|
/**
|
|
12
12
|
* {@link Viewer} plugin that loads models from CityJSON files.
|
|
13
13
|
*
|
|
14
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
14
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway"><img src="https://xeokit.io/img/docs/CityJSONLoaderPlugin/CityJSONLoaderPlugin.png"></a>
|
|
15
15
|
*
|
|
16
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
16
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
17
17
|
*
|
|
18
18
|
* ## Overview
|
|
19
19
|
*
|
|
@@ -53,7 +53,7 @@ const tempVec3c = math.vec3();
|
|
|
53
53
|
* We'll also scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
54
54
|
* translate it 100 units along its X axis.
|
|
55
55
|
*
|
|
56
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
56
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
57
57
|
*
|
|
58
58
|
* ````javascript
|
|
59
59
|
* import {Viewer, CityJSONLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -5,11 +5,11 @@ import {DistanceMeasurementsMouseControl} from "./DistanceMeasurementsMouseContr
|
|
|
5
5
|
/**
|
|
6
6
|
* {@link Viewer} plugin for measuring point-to-point distances.
|
|
7
7
|
*
|
|
8
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63047331-867a0a80-bed4-11e9-892f-398740013c5f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
8
|
+
* [<img src="https://user-images.githubusercontent.com/83100/63047331-867a0a80-bed4-11e9-892f-398740013c5f.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_createWithMouse)
|
|
9
9
|
*
|
|
10
|
-
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
11
|
-
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
12
|
-
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
10
|
+
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
11
|
+
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
12
|
+
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_unitsAndScale)
|
|
13
13
|
*
|
|
14
14
|
* ## Overview
|
|
15
15
|
*
|
|
@@ -29,7 +29,7 @@ import {DistanceMeasurementsMouseControl} from "./DistanceMeasurementsMouseContr
|
|
|
29
29
|
* Note how each DistanceMeasurement has ````origin```` and ````target```` endpoints, which each indicate a 3D World-space
|
|
30
30
|
* position on the surface of an {@link Entity}. The endpoints can be attached to the same Entity, or to different Entitys.
|
|
31
31
|
*
|
|
32
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
32
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_modelWithMeasurements)]
|
|
33
33
|
*
|
|
34
34
|
* ````JavaScript
|
|
35
35
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -94,7 +94,7 @@ import {DistanceMeasurementsMouseControl} from "./DistanceMeasurementsMouseContr
|
|
|
94
94
|
* The DistanceMeasurementsMouseControl will then wait for the next click on any Entity, to begin constructing
|
|
95
95
|
* another DistanceMeasurement, and so on, until deactivated again.
|
|
96
96
|
*
|
|
97
|
-
* [[Run example](/examples/measurement/#
|
|
97
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
98
98
|
*
|
|
99
99
|
* ````JavaScript
|
|
100
100
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -132,7 +132,7 @@ import {DistanceMeasurementsMouseControl} from "./DistanceMeasurementsMouseContr
|
|
|
132
132
|
*
|
|
133
133
|
* The wires belonging to our DistanceMeasurements show their lengths in Real-space coordinates, in the current unit of measurement. They will dynamically update as we set these configurations.
|
|
134
134
|
*
|
|
135
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
135
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_unitsAndScale)]
|
|
136
136
|
*
|
|
137
137
|
* ````JavaScript
|
|
138
138
|
* const metrics = viewer.scene.metrics;
|
|
@@ -146,7 +146,7 @@ import {DistanceMeasurementsMouseControl} from "./DistanceMeasurementsMouseContr
|
|
|
146
146
|
* In our fourth example, we'll attach event handlers to our plugin, to catch when the user
|
|
147
147
|
* hovers or right-clicks over our measurements.
|
|
148
148
|
*
|
|
149
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
149
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
150
150
|
*
|
|
151
151
|
* ````javascript
|
|
152
152
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -10,9 +10,9 @@ const tempVec3 = math.vec3();
|
|
|
10
10
|
/**
|
|
11
11
|
* FaceAlignedSectionPlanesPlugin is a {@link Viewer} plugin that creates and edits face-aligned {@link SectionPlane}s.
|
|
12
12
|
*
|
|
13
|
-
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
13
|
+
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_FaceAlignedSectionPlanesPlugin)
|
|
14
14
|
*
|
|
15
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
15
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/slicing/#FaceAlignedSectionPlanesPlugin)]
|
|
16
16
|
*
|
|
17
17
|
* ## Overview
|
|
18
18
|
*
|
|
@@ -4,7 +4,7 @@ import {Plugin} from "../../viewer/Plugin.js";
|
|
|
4
4
|
* {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching
|
|
5
5
|
* the Viewer to faster, lower-quality rendering modes whenever we interact.
|
|
6
6
|
*
|
|
7
|
-
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
7
|
+
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)
|
|
8
8
|
*
|
|
9
9
|
* FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas
|
|
10
10
|
* resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those
|
|
@@ -38,7 +38,7 @@ import {Plugin} from "../../viewer/Plugin.js";
|
|
|
38
38
|
* not continually flipping between low and high quality as we interact. Since we're only rendering ambient shadows when not interacting, we'll also treat ourselves
|
|
39
39
|
* to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect.
|
|
40
40
|
*
|
|
41
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
41
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)]
|
|
42
42
|
*
|
|
43
43
|
* ````javascript
|
|
44
44
|
* import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js";
|
|
@@ -12,9 +12,9 @@ const MAX_VERTICES = 500000; // TODO: Rough estimate
|
|
|
12
12
|
/**
|
|
13
13
|
* {@link Viewer} plugin that loads lidar point cloud geometry from LAS files.
|
|
14
14
|
*
|
|
15
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
15
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen"><img src="https://xeokit.github.io/xeokit-sdk/assets/images/autzen.png"></a>
|
|
16
16
|
*
|
|
17
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
17
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
18
18
|
*
|
|
19
19
|
* ## Summary
|
|
20
20
|
*
|
|
@@ -53,7 +53,7 @@ const MAX_VERTICES = 500000; // TODO: Rough estimate
|
|
|
53
53
|
* a [LAS file](/assets/models/las/). Once the model has
|
|
54
54
|
* loaded, we'll then find its {@link MetaModel}, and the {@link MetaObject} and {@link Entity} that represent its point cloud.
|
|
55
55
|
*
|
|
56
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
56
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
57
57
|
*
|
|
58
58
|
* ````javascript
|
|
59
59
|
* import {Viewer, LASLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -17,9 +17,9 @@ const tempMat4a = math.mat4();
|
|
|
17
17
|
/**
|
|
18
18
|
* {@link Viewer} plugin that lets us look at the entire {@link Scene} from along a chosen axis or diagonal.
|
|
19
19
|
*
|
|
20
|
-
* [<img src="https://user-images.githubusercontent.com/83100/55674490-c93c2e00-58b5-11e9-8a28-eb08876947c0.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
20
|
+
* [<img src="https://user-images.githubusercontent.com/83100/55674490-c93c2e00-58b5-11e9-8a28-eb08876947c0.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_NavCubePlugin)
|
|
21
21
|
*
|
|
22
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
22
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_NavCubePlugin)]
|
|
23
23
|
*
|
|
24
24
|
* ## Overview
|
|
25
25
|
*
|
|
@@ -22,7 +22,7 @@ import {OBJSceneGraphLoader} from "./OBJSceneGraphLoader.js";
|
|
|
22
22
|
*
|
|
23
23
|
* ## Usage
|
|
24
24
|
*
|
|
25
|
-
* [[Run this example](/examples/#
|
|
25
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/cad/#OBJ_SportsCar_ExplodeModel)]
|
|
26
26
|
*
|
|
27
27
|
* ````javascript
|
|
28
28
|
* import {Viewer, OBJLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -43,7 +43,7 @@ import {STLDefaultDataSource} from "./STLDefaultDataSource.js";
|
|
|
43
43
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
44
44
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
45
45
|
*
|
|
46
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
46
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_SpurGear)]
|
|
47
47
|
*
|
|
48
48
|
* ````javascript
|
|
49
49
|
* // Create a xeokit Viewer
|
|
@@ -88,7 +88,7 @@ import {STLDefaultDataSource} from "./STLDefaultDataSource.js";
|
|
|
88
88
|
* file data straight into the {@link STLLoaderPlugin#load} method. In the example below, to show how it's done, we'll pre-load
|
|
89
89
|
* our STL file data, then pass it straight into that method.
|
|
90
90
|
*
|
|
91
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
91
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataAsParam)]
|
|
92
92
|
*
|
|
93
93
|
* ````javascript
|
|
94
94
|
* loadSTL("./models/stl/binary/spurGear.stl", (stlData) =>{
|
|
@@ -131,7 +131,7 @@ import {STLDefaultDataSource} from "./STLDefaultDataSource.js";
|
|
|
131
131
|
* custom data source object, through which it can load STL files. For this example, our data source just loads
|
|
132
132
|
* them via HTTP, for simplicity. Once we've created the STLLoaderPlugin, we'll load our STL file as before.
|
|
133
133
|
*
|
|
134
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
134
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataSource)]
|
|
135
135
|
*
|
|
136
136
|
* ````javascript
|
|
137
137
|
* // Our custom STL data access strategy - implementation happens to be the same as STLDefaultDataSource
|
|
@@ -10,9 +10,9 @@ const tempVec3 = math.vec3();
|
|
|
10
10
|
/**
|
|
11
11
|
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
12
12
|
*
|
|
13
|
-
* [<img src="https://user-images.githubusercontent.com/83100/57724962-406e9a00-768c-11e9-9f1f-3d178a3ec11f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
13
|
+
* [<img src="https://user-images.githubusercontent.com/83100/57724962-406e9a00-768c-11e9-9f1f-3d178a3ec11f.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_SectionPlanesPlugin)
|
|
14
14
|
*
|
|
15
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
15
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_SectionPlanesPlugin)]
|
|
16
16
|
*
|
|
17
17
|
* ## Overview
|
|
18
18
|
*
|
|
@@ -7,9 +7,9 @@ const treeViews = [];
|
|
|
7
7
|
* @desc A {@link Viewer} plugin that provides an HTML tree view to navigate the IFC elements in models.
|
|
8
8
|
* <br>
|
|
9
9
|
*
|
|
10
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
10
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_WestRiverSideHospital" style="border: 1px solid black;"><img src="http://xeokit.io/img/docs/TreeViewPlugin/TreeViewPlugin.png"></a>
|
|
11
11
|
*
|
|
12
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
12
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_WestRiverSideHospital)]
|
|
13
13
|
*
|
|
14
14
|
* ## Overview
|
|
15
15
|
*
|
|
@@ -33,7 +33,7 @@ const treeViews = [];
|
|
|
33
33
|
* Then we'll use an {@link XKTLoaderPlugin} to load the Schependomlaan model from an
|
|
34
34
|
* [.xkt file](https://github.com/xeokit/xeokit-sdk/tree/master/examples/models/xkt/schependomlaan).
|
|
35
35
|
*
|
|
36
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
36
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/navigation/#TreeViewPlugin_Containment)]
|
|
37
37
|
*
|
|
38
38
|
* ````javascript
|
|
39
39
|
* import {Viewer, XKTLoaderPlugin, TreeViewPlugin} from "xeokit-sdk.es.js";
|
|
@@ -215,7 +215,7 @@ const treeViews = [];
|
|
|
215
215
|
*
|
|
216
216
|
* Let's use {@link ContextMenu} to show a simple context menu for the node we clicked.
|
|
217
217
|
*
|
|
218
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
218
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
219
219
|
*
|
|
220
220
|
* ````javascript
|
|
221
221
|
* import {ContextMenu} from "../src/extras/ContextMenu/ContextMenu.js";
|
|
@@ -306,7 +306,7 @@ const treeViews = [];
|
|
|
306
306
|
* Let's register a callback to isolate and fit-to-view the {@link Entity}(s) represented by the node. This callback is
|
|
307
307
|
* going to X-ray all the other Entitys, fly the camera to fit the Entity(s) for the clicked node, then hide the other Entitys.
|
|
308
308
|
*
|
|
309
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
309
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
310
310
|
*
|
|
311
311
|
* ````javascript
|
|
312
312
|
* treeView.on("nodeTitleClicked", (e) => {
|
|
@@ -9,9 +9,9 @@ import {worldToRTCPositions} from "../../viewer/scene/math/rtcCoords.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* {@link Viewer} plugin that uses [web-ifc](https://github.com/tomvandig/web-ifc) to load BIM models directly from IFC files.
|
|
11
11
|
*
|
|
12
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
12
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_Duplex"><img src="https://xeokit.io/img/docs/WebIFCLoaderPlugin/WebIFCLoaderPlugin.png"></a>
|
|
13
13
|
*
|
|
14
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
14
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_Duplex)]
|
|
15
15
|
*
|
|
16
16
|
* ## Overview
|
|
17
17
|
*
|
|
@@ -55,7 +55,7 @@ import {worldToRTCPositions} from "../../viewer/scene/math/rtcCoords.js";
|
|
|
55
55
|
* Since this model contains IFC types, the WebIFCLoaderPlugin will set the initial appearance of each object
|
|
56
56
|
* {@link Entity} according to its IFC type in {@link WebIFCLoaderPlugin#objectDefaults}.
|
|
57
57
|
*
|
|
58
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
58
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_isolateStorey)]
|
|
59
59
|
*
|
|
60
60
|
* ````javascript
|
|
61
61
|
* import {Viewer, WebIFCLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -33,9 +33,9 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
33
33
|
/**
|
|
34
34
|
* {@link Viewer} plugin that loads models from xeokit's optimized *````.XKT````* format.
|
|
35
35
|
*
|
|
36
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
36
|
+
* <a href="https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_XKT_OTCConferenceCenter"><img src="http://xeokit.io/img/docs/XKTLoaderPlugin/XKTLoaderPlugin.png"></a>
|
|
37
37
|
*
|
|
38
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
38
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_XKT_OTCConferenceCenter)]
|
|
39
39
|
*
|
|
40
40
|
* # Overview
|
|
41
41
|
*
|
|
@@ -91,7 +91,7 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
91
91
|
*
|
|
92
92
|
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
|
|
93
93
|
*
|
|
94
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
94
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_metadata_Schependomlaan)]
|
|
95
95
|
*
|
|
96
96
|
* ````javascript
|
|
97
97
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -178,9 +178,9 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
178
178
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
179
179
|
* 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.
|
|
180
180
|
*
|
|
181
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
181
|
+
* <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>
|
|
182
182
|
*
|
|
183
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
183
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
184
184
|
*
|
|
185
185
|
* ````javascript
|
|
186
186
|
* const viewer = new Viewer({
|
|
@@ -216,8 +216,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
216
216
|
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
217
217
|
* translate it 100 units along its X axis.
|
|
218
218
|
*
|
|
219
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_Duplex_transform)]
|
|
220
|
-
*
|
|
221
219
|
* ````javascript
|
|
222
220
|
* xktLoader.load({
|
|
223
221
|
* src: "./models/xkt/Duplex.ifc.xkt",
|
|
@@ -233,8 +231,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
233
231
|
*
|
|
234
232
|
* In the example below, we'll load only the objects that represent walls.
|
|
235
233
|
*
|
|
236
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_includeTypes)]
|
|
237
|
-
*
|
|
238
234
|
* ````javascript
|
|
239
235
|
* const model2 = xktLoader.load({
|
|
240
236
|
* id: "myModel2",
|
|
@@ -247,8 +243,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
247
243
|
*
|
|
248
244
|
* In the example below, we'll load only the objects that do not represent empty space.
|
|
249
245
|
*
|
|
250
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_excludeTypes)]
|
|
251
|
-
*
|
|
252
246
|
* ````javascript
|
|
253
247
|
* const model3 = xktLoader.load({
|
|
254
248
|
* id: "myModel3",
|
|
@@ -270,8 +264,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
270
264
|
* In the example below, we'll load a model, while configuring ````IfcSpace```` elements to be always initially invisible,
|
|
271
265
|
* and ````IfcWindow```` types to be always translucent blue.
|
|
272
266
|
*
|
|
273
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_objectDefaults)]
|
|
274
|
-
*
|
|
275
267
|
* ````javascript
|
|
276
268
|
* const myObjectDefaults = {
|
|
277
269
|
*
|
|
@@ -332,8 +324,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
332
324
|
* In the example below, we'll customize the way XKTLoaderPlugin loads the files by configuring it with our own data source
|
|
333
325
|
* object. For simplicity, our custom data source example also uses HTTP, using a couple of xeokit utility functions.
|
|
334
326
|
*
|
|
335
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_dataSource)]
|
|
336
|
-
*
|
|
337
327
|
* ````javascript
|
|
338
328
|
* import {utils} from "xeokit-sdk.es.js";
|
|
339
329
|
*
|
|
@@ -384,7 +374,7 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
384
374
|
*
|
|
385
375
|
* As shown in the example below, we do this by setting {@link XKTLoaderPlugin#globalizeObjectIds} ````true```` before we load our models.
|
|
386
376
|
*
|
|
387
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
377
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#TreeViewPlugin_Containment_MultipleModels)]
|
|
388
378
|
*
|
|
389
379
|
* ````javascript
|
|
390
380
|
* xktLoader.globalizeObjectIds = true;
|
|
@@ -490,6 +480,8 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
490
480
|
* Now, to load all those XKT files into a single SceneModel and MetaModel in one operation, we pass a path to the XKT
|
|
491
481
|
* manifest to `XKTLoaderPlugin.load`, as shown in the example below:
|
|
492
482
|
*
|
|
483
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_manifest_KarhumakiBridge)]
|
|
484
|
+
*
|
|
493
485
|
* ````javascript
|
|
494
486
|
* import {
|
|
495
487
|
* Viewer,
|
|
@@ -6,9 +6,9 @@ import {XML3DSceneGraphLoader} from "./XML3DSceneGraphLoader.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* {@link Viewer} plugin that loads models from [3DXML](https://en.wikipedia.org/wiki/3DXML) files.
|
|
8
8
|
*
|
|
9
|
-
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples
|
|
9
|
+
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)
|
|
10
10
|
*
|
|
11
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
11
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
12
12
|
*
|
|
13
13
|
* ## Overview
|
|
14
14
|
*
|
|
@@ -32,7 +32,7 @@ import {XML3DSceneGraphLoader} from "./XML3DSceneGraphLoader.js";
|
|
|
32
32
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
33
33
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
34
34
|
*
|
|
35
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
35
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_Widget)]
|
|
36
36
|
*
|
|
37
37
|
* ````javascript
|
|
38
38
|
* // Create a xeokit Viewer
|
|
@@ -123,7 +123,7 @@ import {XML3DSceneGraphLoader} from "./XML3DSceneGraphLoader.js";
|
|
|
123
123
|
* does not make sense because XML3DLoaderPlugin will set each {@link MetaObject#type} to "Default", and "storeys"
|
|
124
124
|
* does not make sense because that requires some of the MetaObject#type values to be "IfcBuildingStorey".
|
|
125
125
|
*
|
|
126
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
126
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
127
127
|
*
|
|
128
128
|
* ## Material Type
|
|
129
129
|
*
|
|
@@ -133,9 +133,9 @@ import {XML3DSceneGraphLoader} from "./XML3DSceneGraphLoader.js";
|
|
|
133
133
|
*
|
|
134
134
|
* | Material Type | Material Components Loaded | Description | Example |
|
|
135
135
|
* |:--------:|:----:|:-----:|:-----:|
|
|
136
|
-
* | "PhongMaterial" (default) | {@link PhongMaterial} | Non-physically-correct Blinn-Phong shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
137
|
-
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
138
|
-
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
136
|
+
* | "PhongMaterial" (default) | {@link PhongMaterial} | Non-physically-correct Blinn-Phong shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Phong) |
|
|
137
|
+
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Metallic) |
|
|
138
|
+
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular) |
|
|
139
139
|
*
|
|
140
140
|
* <br>
|
|
141
141
|
* Let's load our model again, this time converting the 3DXML Blinn-Phong materials to {@link SpecularMaterial}s:
|
|
@@ -148,7 +148,7 @@ import {XML3DSceneGraphLoader} from "./XML3DSceneGraphLoader.js";
|
|
|
148
148
|
* });
|
|
149
149
|
* ````
|
|
150
150
|
*
|
|
151
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
151
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular)]
|
|
152
152
|
*
|
|
153
153
|
* @class XML3DLoaderPlugin
|
|
154
154
|
*/
|
package/src/viewer/Configs.js
CHANGED
|
@@ -13,7 +13,7 @@ let maxGeometryBatchSize = 5000000
|
|
|
13
13
|
*
|
|
14
14
|
* That's OK if we know that we're not going to view models that are geographically vast, or offset far from the World coordinate origin.
|
|
15
15
|
*
|
|
16
|
-
* [[Run this example](/examples
|
|
16
|
+
* [[Run this example](/examples/index.html#Configs_disableDoublePrecisionAndRAF)]
|
|
17
17
|
*
|
|
18
18
|
* ````javascript
|
|
19
19
|
* import {Configs, Viewer, XKTLoaderPlugin} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -39,7 +39,7 @@ import {Map} from "./../scene/utils/Map.js";
|
|
|
39
39
|
* If we didn't provide that particular translation in our LocaleService, or any translations for that locale,
|
|
40
40
|
* then the NavCubePlugin will just fall back on its own default hard-coded translation, which in this case is "BACK".
|
|
41
41
|
*
|
|
42
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
42
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#localization_NavCubePlugin)]
|
|
43
43
|
*
|
|
44
44
|
* ````javascript
|
|
45
45
|
* import {Viewer, LocaleService, NavCubePlugin, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|