@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/dist/xeokit-sdk.es.js
CHANGED
|
@@ -89,9 +89,9 @@ class Item {
|
|
|
89
89
|
/**
|
|
90
90
|
* @desc A customizable HTML context menu.
|
|
91
91
|
*
|
|
92
|
-
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
92
|
+
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)
|
|
93
93
|
*
|
|
94
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
94
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
95
95
|
*
|
|
96
96
|
* ## Overview
|
|
97
97
|
*
|
|
@@ -134,7 +134,7 @@ class Item {
|
|
|
134
134
|
*
|
|
135
135
|
* We'll also initially enable the ````ContextMenu````.
|
|
136
136
|
*
|
|
137
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
137
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_Custom)]
|
|
138
138
|
*
|
|
139
139
|
* ````javascript
|
|
140
140
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -225,7 +225,7 @@ class Item {
|
|
|
225
225
|
* In the example below, we'll create a simple ````ContextMenu```` that allows us to toggle the selection of an object
|
|
226
226
|
* via its first item, which changes text depending on whether we are selecting or deselecting the object.
|
|
227
227
|
*
|
|
228
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
228
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_dynamicItemTitles)]
|
|
229
229
|
*
|
|
230
230
|
* ````javascript
|
|
231
231
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -266,7 +266,7 @@ class Item {
|
|
|
266
266
|
* Note that our "Effects" item has no ````doAction```` callback, because an item with a sub-menu performs no
|
|
267
267
|
* action of its own.
|
|
268
268
|
*
|
|
269
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
269
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_subMenus)]
|
|
270
270
|
*
|
|
271
271
|
* ````javascript
|
|
272
272
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -953,7 +953,7 @@ class ContextMenu {
|
|
|
953
953
|
* This component is used by {@link DistanceMeasurementsControl} and {@link AngleMeasurementsControl}
|
|
954
954
|
* to help position the pointer when snap-to-vertex or snap-toedge is enabled.
|
|
955
955
|
*
|
|
956
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
956
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
957
957
|
*
|
|
958
958
|
* ````JavaScript
|
|
959
959
|
*
|
|
@@ -10408,8 +10408,6 @@ const tempVec4b$6 = math.vec4();
|
|
|
10408
10408
|
* We'll also demonstrate how to query the Marker's visibility status and position (in the World, View and
|
|
10409
10409
|
* Canvas coordinate systems), and how to subscribe to change events on those properties.
|
|
10410
10410
|
*
|
|
10411
|
-
* [[Run this example](/examples/#Markers_SimpleExample)]
|
|
10412
|
-
*
|
|
10413
10411
|
* ````javascript
|
|
10414
10412
|
* import {Viewer, GLTFLoaderPlugin, Marker} from "xeokit-sdk.es.js";
|
|
10415
10413
|
*
|
|
@@ -12563,10 +12561,10 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
|
|
|
12563
12561
|
/**
|
|
12564
12562
|
* {@link Viewer} plugin for measuring angles.
|
|
12565
12563
|
*
|
|
12566
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63641903-61488180-c6b6-11e9-8e00-895b9d16dc4b.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
12564
|
+
* [<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)
|
|
12567
12565
|
*
|
|
12568
|
-
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
12569
|
-
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
12566
|
+
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
12567
|
+
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
12570
12568
|
*
|
|
12571
12569
|
* ## Overview
|
|
12572
12570
|
*
|
|
@@ -12586,7 +12584,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
|
|
|
12586
12584
|
* Note how each AngleMeasurement has ````origin````, ````corner```` and ````target````, which each indicate a 3D World-space
|
|
12587
12585
|
* position on the surface of an {@link Entity}. These can be aon the same Entity, or on different Entitys.
|
|
12588
12586
|
*
|
|
12589
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
12587
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
12590
12588
|
*
|
|
12591
12589
|
* ````JavaScript
|
|
12592
12590
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -12657,7 +12655,7 @@ class AngleMeasurementsMouseControl extends AngleMeasurementsControl {
|
|
|
12657
12655
|
* The AngleMeasurementControl will then wait for the next click on any Entity, to begin constructing
|
|
12658
12656
|
* another AngleMeasurement, and so on, until deactivated again.
|
|
12659
12657
|
*
|
|
12660
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
12658
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
12661
12659
|
*
|
|
12662
12660
|
* ````JavaScript
|
|
12663
12661
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -14289,13 +14287,13 @@ const tempVec3c$v = math.vec3();
|
|
|
14289
14287
|
/**
|
|
14290
14288
|
* {@link Viewer} plugin that creates {@link Annotation}s.
|
|
14291
14289
|
*
|
|
14292
|
-
* [<img src="https://user-images.githubusercontent.com/83100/58403089-26589280-8062-11e9-8652-aed61a4e8c64.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
14290
|
+
* [<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)
|
|
14293
14291
|
*
|
|
14294
|
-
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples
|
|
14295
|
-
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
14296
|
-
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
14297
|
-
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
14298
|
-
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples
|
|
14292
|
+
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
14293
|
+
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
14294
|
+
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_hoverShowLabels)]
|
|
14295
|
+
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickFlyToPosition)]
|
|
14296
|
+
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_externalElements)]
|
|
14299
14297
|
*
|
|
14300
14298
|
* ## Overview
|
|
14301
14299
|
*
|
|
@@ -14325,7 +14323,7 @@ const tempVec3c$v = math.vec3();
|
|
|
14325
14323
|
*
|
|
14326
14324
|
* Finally, we'll query the Annotation's position occlusion/visibility status, and subscribe to change events on those properties.
|
|
14327
14325
|
*
|
|
14328
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
14326
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
14329
14327
|
*
|
|
14330
14328
|
* ````JavaScript
|
|
14331
14329
|
* import {Viewer, XKTLoaderPlugin,AnnotationsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -14598,7 +14596,7 @@ const tempVec3c$v = math.vec3();
|
|
|
14598
14596
|
*
|
|
14599
14597
|
* Let's now extend our example to create an Annotation wherever we click on the surface of of our model:
|
|
14600
14598
|
*
|
|
14601
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
14599
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
14602
14600
|
*
|
|
14603
14601
|
* ````javascript
|
|
14604
14602
|
* var i = 1; // Used to create unique Annotation IDs
|
|
@@ -16767,6 +16765,9 @@ class ArrayBuf {
|
|
|
16767
16765
|
}
|
|
16768
16766
|
}
|
|
16769
16767
|
|
|
16768
|
+
/**
|
|
16769
|
+
* @private
|
|
16770
|
+
*/
|
|
16770
16771
|
class OcclusionLayer {
|
|
16771
16772
|
|
|
16772
16773
|
constructor(scene, origin) {
|
|
@@ -16984,6 +16985,7 @@ const tempVec3a$J = math.vec3();
|
|
|
16984
16985
|
|
|
16985
16986
|
/**
|
|
16986
16987
|
* Manages occlusion testing. Private member of a Renderer.
|
|
16988
|
+
* @private
|
|
16987
16989
|
*/
|
|
16988
16990
|
class OcclusionTester {
|
|
16989
16991
|
|
|
@@ -23807,7 +23809,7 @@ class Light extends Component {
|
|
|
23807
23809
|
*
|
|
23808
23810
|
* In the example below we'll replace the {@link Scene}'s default light sources with three View-space DirLights.
|
|
23809
23811
|
*
|
|
23810
|
-
* [[Run this example](/examples
|
|
23812
|
+
* [[Run this example](/examples/index.html#lights_DirLight_view)]
|
|
23811
23813
|
*
|
|
23812
23814
|
* ````javascript
|
|
23813
23815
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -24113,7 +24115,7 @@ class DirLight extends Light {
|
|
|
24113
24115
|
*
|
|
24114
24116
|
* 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:
|
|
24115
24117
|
*
|
|
24116
|
-
* [[Run this example](/examples
|
|
24118
|
+
* [[Run this example](/examples/index.html#lights_AmbientLight)]
|
|
24117
24119
|
*
|
|
24118
24120
|
* ````javascript
|
|
24119
24121
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -24835,7 +24837,7 @@ const tempAABB$3 = math.AABB3();
|
|
|
24835
24837
|
*
|
|
24836
24838
|
* Creating a {@link Mesh} with a ReadableGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
24837
24839
|
*
|
|
24838
|
-
* [[Run this example](/examples
|
|
24840
|
+
* [[Run this example](/examples/index.html#geometry_ReadableGeometry)]
|
|
24839
24841
|
*
|
|
24840
24842
|
* ````javascript
|
|
24841
24843
|
* import {Viewer, Mesh, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -25502,7 +25504,7 @@ class ReadableGeometry extends Geometry {
|
|
|
25502
25504
|
*
|
|
25503
25505
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry}.
|
|
25504
25506
|
*
|
|
25505
|
-
* [[Run this example](/examples
|
|
25507
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxGeometry)]
|
|
25506
25508
|
*
|
|
25507
25509
|
* ````javascript
|
|
25508
25510
|
* import {Viewer, Mesh, buildBoxGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -25781,7 +25783,7 @@ const alphaModeNames$1 = ["opaque", "mask", "blend"];
|
|
|
25781
25783
|
*
|
|
25782
25784
|
* 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}.
|
|
25783
25785
|
*
|
|
25784
|
-
* [[Run this example](/examples
|
|
25786
|
+
* [[Run this example](/examples/index.html#materials_PhongMaterial)]
|
|
25785
25787
|
*
|
|
25786
25788
|
* ```` javascript
|
|
25787
25789
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -27268,7 +27270,7 @@ const PRESETS$2 = {
|
|
|
27268
27270
|
*
|
|
27269
27271
|
* Recall that {@link Mesh} is a concrete subtype of the abstract {@link Entity} base class.
|
|
27270
27272
|
*
|
|
27271
|
-
* [[Run this example](/examples
|
|
27273
|
+
* [[Run this example](/examples/index.html#materials_EdgeMaterial)]
|
|
27272
27274
|
*
|
|
27273
27275
|
* ````javascript
|
|
27274
27276
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -27841,9 +27843,9 @@ class Metrics extends Component {
|
|
|
27841
27843
|
/**
|
|
27842
27844
|
* @desc Configures Scalable Ambient Obscurance (SAO) for a {@link Scene}.
|
|
27843
27845
|
*
|
|
27844
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
27846
|
+
* <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>
|
|
27845
27847
|
*
|
|
27846
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
27848
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
27847
27849
|
*
|
|
27848
27850
|
* ## Overview
|
|
27849
27851
|
*
|
|
@@ -27865,7 +27867,7 @@ class Metrics extends Component {
|
|
|
27865
27867
|
* {@link SAO#scale} and {@link SAO#intensity} must be tuned to the distance
|
|
27866
27868
|
* between {@link Perspective#near} and {@link Perspective#far}, or the distance
|
|
27867
27869
|
* between {@link Ortho#near} and {@link Ortho#far}, depending on which of those two projections the {@link Camera} is currently
|
|
27868
|
-
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
27870
|
+
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter) to get a
|
|
27869
27871
|
* feel for that.
|
|
27870
27872
|
*
|
|
27871
27873
|
* ## Usage
|
|
@@ -27921,7 +27923,7 @@ class Metrics extends Component {
|
|
|
27921
27923
|
* });
|
|
27922
27924
|
* ````
|
|
27923
27925
|
*
|
|
27924
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
27926
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
27925
27927
|
*
|
|
27926
27928
|
* ## Efficiency
|
|
27927
27929
|
*
|
|
@@ -28004,7 +28006,7 @@ class Metrics extends Component {
|
|
|
28004
28006
|
* });
|
|
28005
28007
|
* ````
|
|
28006
28008
|
*
|
|
28007
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28009
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#techniques_nonInteractiveQuality)]
|
|
28008
28010
|
*/
|
|
28009
28011
|
class SAO extends Component {
|
|
28010
28012
|
|
|
@@ -28408,7 +28410,7 @@ const PRESETS$1 = {
|
|
|
28408
28410
|
* In the example below, we'll customize the {@link Scene}'s global ````PointsMaterial````, then use
|
|
28409
28411
|
* an {@link XKTLoaderPlugin} to load a model containing a point cloud.
|
|
28410
28412
|
*
|
|
28411
|
-
* [[Run this example](/examples
|
|
28413
|
+
* [[Run this example](/examples/index.html#materials_PointsMaterial)]
|
|
28412
28414
|
*
|
|
28413
28415
|
* ````javascript
|
|
28414
28416
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -28805,7 +28807,7 @@ const PRESETS = {
|
|
|
28805
28807
|
* In the example below, we'll customize the {@link Scene}'s global ````LinesMaterial````, then use
|
|
28806
28808
|
* an {@link XKTLoaderPlugin} to load a model containing line segments.
|
|
28807
28809
|
*
|
|
28808
|
-
* [[Run this example](/examples
|
|
28810
|
+
* [[Run this example](/examples/index.html#materials_LinesMaterial)]
|
|
28809
28811
|
*
|
|
28810
28812
|
* ````javascript
|
|
28811
28813
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -37106,7 +37108,7 @@ const identityMat$2 = math.identityMat4();
|
|
|
37106
37108
|
*
|
|
37107
37109
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
37108
37110
|
*
|
|
37109
|
-
* [[Run this example](/examples/#
|
|
37111
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#sceneGraph)]
|
|
37110
37112
|
*
|
|
37111
37113
|
* ````javascript
|
|
37112
37114
|
* import {Viewer, Mesh, Node, PhongMaterial, buildBoxGeometry, ReadableGeometry} from "xeokit-sdk.es.js";
|
|
@@ -39260,7 +39262,7 @@ const pickTriangleSurface = (function () {
|
|
|
39260
39262
|
*
|
|
39261
39263
|
* Creating a {@link Mesh} with a cylinder-shaped {@link ReadableGeometry} :
|
|
39262
39264
|
*
|
|
39263
|
-
* [[Run this example](/examples
|
|
39265
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildCylinderGeometry)]
|
|
39264
39266
|
*
|
|
39265
39267
|
* ````javascript
|
|
39266
39268
|
*
|
|
@@ -39527,7 +39529,7 @@ function buildCylinderGeometry(cfg = {}) {
|
|
|
39527
39529
|
*
|
|
39528
39530
|
* Creating a {@link Mesh} with a sphere-shaped {@link ReadableGeometry} :
|
|
39529
39531
|
*
|
|
39530
|
-
* [[Run this example](/examples/#
|
|
39532
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildSphereGeometry)]
|
|
39531
39533
|
*
|
|
39532
39534
|
* ````javascript
|
|
39533
39535
|
* import {Viewer, Mesh, buildSphereGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -41259,7 +41261,7 @@ const letters = {
|
|
|
41259
41261
|
*
|
|
41260
41262
|
* Creating a {@link Mesh} with vector text {@link ReadableGeometry} :
|
|
41261
41263
|
*
|
|
41262
|
-
* [[Run this example](/examples
|
|
41264
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildVectorTextGeometry)]
|
|
41263
41265
|
*
|
|
41264
41266
|
* ````javascript
|
|
41265
41267
|
*
|
|
@@ -41391,7 +41393,7 @@ function buildVectorTextGeometry(cfg = {}) {
|
|
|
41391
41393
|
*
|
|
41392
41394
|
* ## Usage
|
|
41393
41395
|
*
|
|
41394
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
41396
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_AxisGizmoPlugin)]
|
|
41395
41397
|
*
|
|
41396
41398
|
* ````JavaScript````
|
|
41397
41399
|
* import {Viewer, XKTLoaderPlugin, AxisGizmoPlugin} from "xeokit-sdk.es.js";
|
|
@@ -41927,7 +41929,7 @@ const identityMat$1 = math.identityMat4();
|
|
|
41927
41929
|
*
|
|
41928
41930
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
41929
41931
|
*
|
|
41930
|
-
* [[Run this example](/examples
|
|
41932
|
+
* [[Run this example](/examples/index.html#sceneRepresentation_SceneGraph)]
|
|
41931
41933
|
*
|
|
41932
41934
|
* ````javascript
|
|
41933
41935
|
* import {Viewer, Mesh, Node, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -43287,7 +43289,7 @@ class Node$2 extends Component {
|
|
|
43287
43289
|
*
|
|
43288
43290
|
* ## Usage
|
|
43289
43291
|
*
|
|
43290
|
-
* [[Run this example](/examples
|
|
43292
|
+
* [[Run this example](/examples/index.html#materials_LambertMaterial)]
|
|
43291
43293
|
*
|
|
43292
43294
|
* 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.
|
|
43293
43295
|
*
|
|
@@ -43668,7 +43670,7 @@ const modeNames = ["opaque", "mask", "blend"];
|
|
|
43668
43670
|
* channels, which allows us a little creative flexibility. Then, in the next example further down, we'll combine those channels
|
|
43669
43671
|
* within the same {@link Texture} for efficiency.
|
|
43670
43672
|
*
|
|
43671
|
-
* [[Run this example](/examples
|
|
43673
|
+
* [[Run this example](/examples/index.html#materials_MetallicMaterial)]
|
|
43672
43674
|
*
|
|
43673
43675
|
* ````javascript
|
|
43674
43676
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry, MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -45910,7 +45912,7 @@ function nextHighestPowerOfTwo$1(x) {
|
|
|
45910
45912
|
* with {@link PhongMaterial#diffuseMap} and {@link PhongMaterial#specularMap}. The {@link Texture} pixel colors directly
|
|
45911
45913
|
* provide the diffuse and specular components for each fragment across the {@link ReadableGeometry} surface.
|
|
45912
45914
|
*
|
|
45913
|
-
* [[Run this example](/examples
|
|
45915
|
+
* [[Run this example](/examples/index.html#materials_Texture)]
|
|
45914
45916
|
*
|
|
45915
45917
|
* ```` javascript
|
|
45916
45918
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -46377,7 +46379,7 @@ class Texture extends Component {
|
|
|
46377
46379
|
*
|
|
46378
46380
|
* 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.
|
|
46379
46381
|
*
|
|
46380
|
-
* [[Run this example](/examples
|
|
46382
|
+
* [[Run this example](/examples/index.html#materials_Fresnel)]
|
|
46381
46383
|
*
|
|
46382
46384
|
* ````javascript
|
|
46383
46385
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -46597,7 +46599,7 @@ const tempAABB$2 = math.AABB3();
|
|
|
46597
46599
|
*
|
|
46598
46600
|
* Creating a {@link Mesh} with a VBOGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
46599
46601
|
*
|
|
46600
|
-
* [[Run this example](/examples
|
|
46602
|
+
* [[Run this example](/examples/index.html#geometry_VBOGeometry)]
|
|
46601
46603
|
*
|
|
46602
46604
|
* ````javascript
|
|
46603
46605
|
* import {Viewer, Mesh, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -47926,8 +47928,6 @@ K3D.utils.getAABB = function(vts)
|
|
|
47926
47928
|
*
|
|
47927
47929
|
* In the example below we'll create a {@link Mesh} with {@link PhongMaterial}, {@link Texture} and a {@link ReadableGeometry} loaded from 3DS.
|
|
47928
47930
|
*
|
|
47929
|
-
* [[Run this example](/examples/#geometry_loaders_3DS)]
|
|
47930
|
-
*
|
|
47931
47931
|
* ````javascript
|
|
47932
47932
|
* import {Viewer, Mesh, load3DSGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
47933
47933
|
*
|
|
@@ -48025,8 +48025,6 @@ function load3DSGeometry(scene, cfg = {}) {
|
|
|
48025
48025
|
*
|
|
48026
48026
|
* In the example below we'll create a {@link Mesh} with {@link MetallicMaterial} and {@link ReadableGeometry} loaded from OBJ.
|
|
48027
48027
|
*
|
|
48028
|
-
* [[Run this example](/examples/#geometry_loaders_OBJ)]
|
|
48029
|
-
*
|
|
48030
48028
|
* ````javascript
|
|
48031
48029
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry,
|
|
48032
48030
|
* MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -48151,7 +48149,7 @@ function loadOBJGeometry(scene, cfg = {}) {
|
|
|
48151
48149
|
*
|
|
48152
48150
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
48153
48151
|
*
|
|
48154
|
-
* [[Run this example](/examples
|
|
48152
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometry)]
|
|
48155
48153
|
*
|
|
48156
48154
|
* ````javascript
|
|
48157
48155
|
* import {Viewer, Mesh, buildBoxLinesGeometry, ReadableGeometry, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -48255,7 +48253,7 @@ function buildBoxLinesGeometry(cfg = {}) {
|
|
|
48255
48253
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
48256
48254
|
* This box will be created from AABB of a model.
|
|
48257
48255
|
*
|
|
48258
|
-
* [[Run this example](/examples
|
|
48256
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometryFromAABB)]
|
|
48259
48257
|
*
|
|
48260
48258
|
* ````javascript
|
|
48261
48259
|
* import {Viewer, Mesh, Node, buildBoxGeometry, buildBoxLinesGeometryFromAABB, ReadableGeometry, PhongMaterial} from "../../dist/xeokit-sdk.min.es.js";
|
|
@@ -48386,7 +48384,7 @@ function buildBoxLinesGeometryFromAABB(cfg = {}){
|
|
|
48386
48384
|
*
|
|
48387
48385
|
* Creating a {@link Mesh} with a GridGeometry and a {@link PhongMaterial}:
|
|
48388
48386
|
*
|
|
48389
|
-
* [[Run this example](/examples
|
|
48387
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildGridGeometry)]
|
|
48390
48388
|
*
|
|
48391
48389
|
* ````javascript
|
|
48392
48390
|
* import {Viewer, Mesh, buildGridGeometry, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -48484,7 +48482,7 @@ function buildGridGeometry(cfg = {}) {
|
|
|
48484
48482
|
*
|
|
48485
48483
|
* Creating a {@link Mesh} with a PlaneGeometry and a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
48486
48484
|
*
|
|
48487
|
-
* [[Run this example](/examples/#
|
|
48485
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPlaneGeometry)]
|
|
48488
48486
|
*
|
|
48489
48487
|
* ````javascript
|
|
48490
48488
|
* import {Viewer, Mesh, buildPlaneGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -48648,7 +48646,7 @@ function buildPlaneGeometry(cfg = {}) {
|
|
|
48648
48646
|
* ## Usage
|
|
48649
48647
|
* Creating a {@link Mesh} with a torus-shaped {@link ReadableGeometry} :
|
|
48650
48648
|
*
|
|
48651
|
-
* [[Run this example](/examples
|
|
48649
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildTorusGeometry)]
|
|
48652
48650
|
*
|
|
48653
48651
|
* ````javascript
|
|
48654
48652
|
* import {Viewer, Mesh, buildTorusGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -48817,7 +48815,7 @@ function buildTorusGeometry(cfg = {}) {
|
|
|
48817
48815
|
*
|
|
48818
48816
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} that has lines primitives.
|
|
48819
48817
|
*
|
|
48820
|
-
* [[Run this example](/examples/#
|
|
48818
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometry)]
|
|
48821
48819
|
*
|
|
48822
48820
|
* ````javascript
|
|
48823
48821
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -48901,7 +48899,7 @@ function buildPolylineGeometry(cfg = {}) {
|
|
|
48901
48899
|
*
|
|
48902
48900
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} created from curves.
|
|
48903
48901
|
*
|
|
48904
|
-
* [[Run this example](/examples/#
|
|
48902
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometryFromCurve)]
|
|
48905
48903
|
*
|
|
48906
48904
|
* ````javascript
|
|
48907
48905
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -49025,9 +49023,9 @@ function buildPolylineGeometryFromCurve(cfg = {}) {
|
|
|
49025
49023
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
49026
49024
|
* an ````Bitmap```` to show a storey plan next to the model.
|
|
49027
49025
|
*
|
|
49028
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](/examples/#
|
|
49026
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
49029
49027
|
*
|
|
49030
|
-
* [[Run this example](/examples/#
|
|
49028
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
49031
49029
|
*
|
|
49032
49030
|
* ````javascript
|
|
49033
49031
|
* import {Viewer, Bitmap, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -54253,7 +54251,7 @@ let maxGeometryBatchSize = 5000000;
|
|
|
54253
54251
|
*
|
|
54254
54252
|
* 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.
|
|
54255
54253
|
*
|
|
54256
|
-
* [[Run this example](/examples
|
|
54254
|
+
* [[Run this example](/examples/index.html#Configs_disableDoublePrecisionAndRAF)]
|
|
54257
54255
|
*
|
|
54258
54256
|
* ````javascript
|
|
54259
54257
|
* import {Configs, Viewer, XKTLoaderPlugin} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -79280,9 +79278,9 @@ let activeTranscoders = 0;
|
|
|
79280
79278
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
79281
79279
|
* 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.
|
|
79282
79280
|
*
|
|
79283
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
79281
|
+
* <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>
|
|
79284
79282
|
*
|
|
79285
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
79283
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
79286
79284
|
*
|
|
79287
79285
|
* ````javascript
|
|
79288
79286
|
* const viewer = new Viewer({
|
|
@@ -79323,7 +79321,7 @@ let activeTranscoders = 0;
|
|
|
79323
79321
|
*
|
|
79324
79322
|
* As in the previous example, we'll configure our KTX2TextureTranscoder to load the Basis Codec from a local directory.
|
|
79325
79323
|
*
|
|
79326
|
-
* * [Run a similar example](
|
|
79324
|
+
* * [Run a similar example](https://xeokit.github.io/xeokit-sdk/examples/scenemodel/#vbo_batching_autocompressed_triangles_textures_ktx2)
|
|
79327
79325
|
*
|
|
79328
79326
|
* ````javascript
|
|
79329
79327
|
* const viewer = new Viewer({
|
|
@@ -80835,7 +80833,7 @@ const DTX = 2;
|
|
|
80835
80833
|
* Then, for each object in our model we'll add an {@link Entity}
|
|
80836
80834
|
* that has a mesh that instances our box geometry, transforming and coloring the instance.
|
|
80837
80835
|
*
|
|
80838
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
80836
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_instancing)
|
|
80839
80837
|
*
|
|
80840
80838
|
* ````javascript
|
|
80841
80839
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -81035,7 +81033,7 @@ const DTX = 2;
|
|
|
81035
81033
|
* Let's once more use a ````SceneModel````
|
|
81036
81034
|
* to build the simple table model, this time exploiting geometry batching.
|
|
81037
81035
|
*
|
|
81038
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
81036
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
81039
81037
|
*
|
|
81040
81038
|
* ````javascript
|
|
81041
81039
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -81303,7 +81301,7 @@ const DTX = 2;
|
|
|
81303
81301
|
* ````
|
|
81304
81302
|
*
|
|
81305
81303
|
* 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
|
|
81306
|
-
* components from the metadata, such as the tree view demonstrated in [this demo](https://xeokit.github.io/xeokit-sdk/examples
|
|
81304
|
+
* 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).
|
|
81307
81305
|
*
|
|
81308
81306
|
* This hierarchy allows us to express the hierarchical structure of a model while representing it in
|
|
81309
81307
|
* various ways in the 3D scene (such as with ````SceneModel````, which
|
|
@@ -81336,7 +81334,7 @@ const DTX = 2;
|
|
|
81336
81334
|
*
|
|
81337
81335
|
* Note that the axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
81338
81336
|
*
|
|
81339
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
81337
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
81340
81338
|
*
|
|
81341
81339
|
* ````javascript
|
|
81342
81340
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -81433,7 +81431,7 @@ const DTX = 2;
|
|
|
81433
81431
|
*
|
|
81434
81432
|
* The axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
81435
81433
|
*
|
|
81436
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
81434
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
81437
81435
|
*
|
|
81438
81436
|
* ````javascript
|
|
81439
81437
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -84716,9 +84714,9 @@ function createDTXBuckets(geometry, enableVertexWelding, enableIndexBucketing) {
|
|
|
84716
84714
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
84717
84715
|
* a ````LineSet```` to show a grid underneath the model.
|
|
84718
84716
|
*
|
|
84719
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](/examples/#LineSet_grid)
|
|
84717
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)
|
|
84720
84718
|
*
|
|
84721
|
-
* [[Run this example](/examples/#LineSet_grid)]
|
|
84719
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)]
|
|
84722
84720
|
*
|
|
84723
84721
|
* ````javascript
|
|
84724
84722
|
* import {Viewer, XKTLoaderPlugin, LineSet, buildGridGeometry} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -84870,10 +84868,10 @@ const tempVec3c$4 = math.vec3();
|
|
|
84870
84868
|
/**
|
|
84871
84869
|
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
84872
84870
|
*
|
|
84873
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples
|
|
84871
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples/index.html#BCF_SaveViewpoint)
|
|
84874
84872
|
*
|
|
84875
|
-
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
84876
|
-
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
84873
|
+
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
84874
|
+
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint)]
|
|
84877
84875
|
*
|
|
84878
84876
|
* ## Overview
|
|
84879
84877
|
*
|
|
@@ -84905,7 +84903,7 @@ const tempVec3c$4 = math.vec3();
|
|
|
84905
84903
|
* plan view using a {@link Bitmap}, then use a {@link BCFViewpointsPlugin#getViewpoint}
|
|
84906
84904
|
* to save a viewpoint to JSON, which we'll log to the JavaScript developer console.
|
|
84907
84905
|
*
|
|
84908
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
84906
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
84909
84907
|
*
|
|
84910
84908
|
* ````javascript
|
|
84911
84909
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin,
|
|
@@ -85134,7 +85132,7 @@ const tempVec3c$4 = math.vec3();
|
|
|
85134
85132
|
* });
|
|
85135
85133
|
* ````
|
|
85136
85134
|
*
|
|
85137
|
-
* [[Run an example](/examples
|
|
85135
|
+
* [[Run an example](/examples/index.html#BCF_LoadViewpoint_defaultInvisible)]
|
|
85138
85136
|
*
|
|
85139
85137
|
* ## Behaviour with XKTLoaderPlugin globalizeObjectIds
|
|
85140
85138
|
*
|
|
@@ -85152,8 +85150,8 @@ const tempVec3c$4 = math.vec3();
|
|
|
85152
85150
|
* capture the states of the individual ````Entitys```` that represent the duplicate IFC elements. Take a look at the
|
|
85153
85151
|
* following two examples to learn more.
|
|
85154
85152
|
*
|
|
85155
|
-
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
85156
|
-
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
85153
|
+
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint_MultipleModels)
|
|
85154
|
+
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint_MultipleModels)
|
|
85157
85155
|
*
|
|
85158
85156
|
* **Caveat:** when loading a BCF viewpoint, we always assume that we have loaded in our target BIM viewer the same models that were
|
|
85159
85157
|
* loaded in the viewpoint's original authoring application when the viewpoint was created. In the case of multi-model
|
|
@@ -87313,11 +87311,11 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
|
|
|
87313
87311
|
/**
|
|
87314
87312
|
* {@link Viewer} plugin for measuring point-to-point distances.
|
|
87315
87313
|
*
|
|
87316
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63047331-867a0a80-bed4-11e9-892f-398740013c5f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
87314
|
+
* [<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)
|
|
87317
87315
|
*
|
|
87318
|
-
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
87319
|
-
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
87320
|
-
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
87316
|
+
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
87317
|
+
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
87318
|
+
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_unitsAndScale)
|
|
87321
87319
|
*
|
|
87322
87320
|
* ## Overview
|
|
87323
87321
|
*
|
|
@@ -87337,7 +87335,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
|
|
|
87337
87335
|
* Note how each DistanceMeasurement has ````origin```` and ````target```` endpoints, which each indicate a 3D World-space
|
|
87338
87336
|
* position on the surface of an {@link Entity}. The endpoints can be attached to the same Entity, or to different Entitys.
|
|
87339
87337
|
*
|
|
87340
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
87338
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_modelWithMeasurements)]
|
|
87341
87339
|
*
|
|
87342
87340
|
* ````JavaScript
|
|
87343
87341
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -87402,7 +87400,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
|
|
|
87402
87400
|
* The DistanceMeasurementsMouseControl will then wait for the next click on any Entity, to begin constructing
|
|
87403
87401
|
* another DistanceMeasurement, and so on, until deactivated again.
|
|
87404
87402
|
*
|
|
87405
|
-
* [[Run example](/examples/measurement/#
|
|
87403
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
87406
87404
|
*
|
|
87407
87405
|
* ````JavaScript
|
|
87408
87406
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -87440,7 +87438,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
|
|
|
87440
87438
|
*
|
|
87441
87439
|
* 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.
|
|
87442
87440
|
*
|
|
87443
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
87441
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_unitsAndScale)]
|
|
87444
87442
|
*
|
|
87445
87443
|
* ````JavaScript
|
|
87446
87444
|
* const metrics = viewer.scene.metrics;
|
|
@@ -87454,7 +87452,7 @@ class DistanceMeasurementsMouseControl extends DistanceMeasurementsControl {
|
|
|
87454
87452
|
* In our fourth example, we'll attach event handlers to our plugin, to catch when the user
|
|
87455
87453
|
* hovers or right-clicks over our measurements.
|
|
87456
87454
|
*
|
|
87457
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
87455
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
87458
87456
|
*
|
|
87459
87457
|
* ````javascript
|
|
87460
87458
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -88618,7 +88616,7 @@ class DistanceMeasurementsTouchControl extends DistanceMeasurementsControl {
|
|
|
88618
88616
|
* {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching
|
|
88619
88617
|
* the Viewer to faster, lower-quality rendering modes whenever we interact.
|
|
88620
88618
|
*
|
|
88621
|
-
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
88619
|
+
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)
|
|
88622
88620
|
*
|
|
88623
88621
|
* FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas
|
|
88624
88622
|
* resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those
|
|
@@ -88652,7 +88650,7 @@ class DistanceMeasurementsTouchControl extends DistanceMeasurementsControl {
|
|
|
88652
88650
|
* 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
|
|
88653
88651
|
* to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect.
|
|
88654
88652
|
*
|
|
88655
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
88653
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)]
|
|
88656
88654
|
*
|
|
88657
88655
|
* ````javascript
|
|
88658
88656
|
* import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js";
|
|
@@ -89242,7 +89240,7 @@ function getBasePath$1(src) {
|
|
|
89242
89240
|
* If we didn't provide that particular translation in our LocaleService, or any translations for that locale,
|
|
89243
89241
|
* then the NavCubePlugin will just fall back on its own default hard-coded translation, which in this case is "BACK".
|
|
89244
89242
|
*
|
|
89245
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
89243
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#localization_NavCubePlugin)]
|
|
89246
89244
|
*
|
|
89247
89245
|
* ````javascript
|
|
89248
89246
|
* import {Viewer, LocaleService, NavCubePlugin, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -90241,7 +90239,7 @@ const newLookEyeVec = math.vec3();
|
|
|
90241
90239
|
*
|
|
90242
90240
|
* Let's transition the Camera to orthographic projection:
|
|
90243
90241
|
*
|
|
90244
|
-
* [[Run example](/examples
|
|
90242
|
+
* [[Run example](/examples/index.html#camera_CameraFlightAnimation_projection)]
|
|
90245
90243
|
*
|
|
90246
90244
|
* ````Javascript
|
|
90247
90245
|
* viewer.cameraFlight.flyTo({ projection: "ortho", () => {
|
|
@@ -90843,7 +90841,7 @@ class CameraFlightAnimation extends Component {
|
|
|
90843
90841
|
* In the example below, we'll load a model using a {@link GLTFLoaderPlugin}, then animate a {@link Camera}
|
|
90844
90842
|
* through the frames in a {@link CameraPath}.
|
|
90845
90843
|
*
|
|
90846
|
-
* * [[Run this example](/examples
|
|
90844
|
+
* * [[Run this example](/examples/index.html#camera_CameraPathAnimation)]
|
|
90847
90845
|
*
|
|
90848
90846
|
* ````Javascript
|
|
90849
90847
|
* import {Viewer, GLTFLoaderPlugin, CameraPath, CameraPathAnimation} from "xeokit-sdk.es.js";
|
|
@@ -91177,9 +91175,9 @@ const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
|
91177
91175
|
*
|
|
91178
91176
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanGoogleSatMapMed.png">
|
|
91179
91177
|
*
|
|
91180
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](/examples/#ImagePlane_groundPlane)
|
|
91178
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)
|
|
91181
91179
|
*
|
|
91182
|
-
* [[Run this example](/examples/#ImagePlane_groundPlane)]
|
|
91180
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)]
|
|
91183
91181
|
*
|
|
91184
91182
|
* ````javascript
|
|
91185
91183
|
* import {Viewer, ImagePlane, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -91227,9 +91225,9 @@ const tempQuat = math.vec4([0, 0, 0, 1]);
|
|
|
91227
91225
|
*
|
|
91228
91226
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanPlanViewMed.png">
|
|
91229
91227
|
*
|
|
91230
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](/examples/#ImagePlane_imageInSectionPlane)
|
|
91228
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
91231
91229
|
*
|
|
91232
|
-
* [[Run this example](/examples/#ImagePlane_imageInSectionPlane)]
|
|
91230
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
91233
91231
|
*
|
|
91234
91232
|
* ````javascript
|
|
91235
91233
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin, ImagePlane} from "xeokit-sdk.es.js";
|
|
@@ -91728,7 +91726,7 @@ class ImagePlane extends Component {
|
|
|
91728
91726
|
*
|
|
91729
91727
|
* In the example below we'll replace the {@link Scene}'s default light sources with three World-space PointLights.
|
|
91730
91728
|
*
|
|
91731
|
-
* [[Run this example](/examples
|
|
91729
|
+
* [[Run this example](/examples/index.html#lights_PointLight_world)]
|
|
91732
91730
|
*
|
|
91733
91731
|
* ````javascript
|
|
91734
91732
|
* import {Viewer, Mesh, buildSphereGeometry, buildPlaneGeometry,
|
|
@@ -92412,7 +92410,7 @@ class LightMap extends CubeTexture {
|
|
|
92412
92410
|
*
|
|
92413
92411
|
* ## Usage
|
|
92414
92412
|
*
|
|
92415
|
-
* [[Run this example](/examples
|
|
92413
|
+
* [[Run this example](/examples/index.html#markers_SpriteMarker)]
|
|
92416
92414
|
*
|
|
92417
92415
|
* ```` javascript
|
|
92418
92416
|
* import {Viewer, SpriteMarker } from "./https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -96888,12 +96886,12 @@ const DEFAULT_SNAP_EDGE = true;
|
|
|
96888
96886
|
*
|
|
96889
96887
|
* # Examples
|
|
96890
96888
|
*
|
|
96891
|
-
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
96892
|
-
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
96893
|
-
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
96894
|
-
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
96895
|
-
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
96896
|
-
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples
|
|
96889
|
+
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_Duplex)
|
|
96890
|
+
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_HolterTower)
|
|
96891
|
+
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_Duplex)
|
|
96892
|
+
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_HolterTower)
|
|
96893
|
+
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_planView_Schependomlaan)
|
|
96894
|
+
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_keyMap)
|
|
96897
96895
|
* <br><br>
|
|
96898
96896
|
*
|
|
96899
96897
|
* # Orbit Mode
|
|
@@ -99345,7 +99343,7 @@ class MetaModel {
|
|
|
99345
99343
|
*
|
|
99346
99344
|
* * Located in {@link Viewer#metaScene}.
|
|
99347
99345
|
* * Contains {@link MetaModel}s and {@link MetaObject}s.
|
|
99348
|
-
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples
|
|
99346
|
+
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneGraph_metadata)
|
|
99349
99347
|
*/
|
|
99350
99348
|
class MetaScene {
|
|
99351
99349
|
|
|
@@ -116764,9 +116762,9 @@ math.mat4();
|
|
|
116764
116762
|
/**
|
|
116765
116763
|
* {@link Viewer} plugin that lets us look at the entire {@link Scene} from along a chosen axis or diagonal.
|
|
116766
116764
|
*
|
|
116767
|
-
* [<img src="https://user-images.githubusercontent.com/83100/55674490-c93c2e00-58b5-11e9-8a28-eb08876947c0.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
116765
|
+
* [<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)
|
|
116768
116766
|
*
|
|
116769
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
116767
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_NavCubePlugin)]
|
|
116770
116768
|
*
|
|
116771
116769
|
* ## Overview
|
|
116772
116770
|
*
|
|
@@ -118269,7 +118267,7 @@ function loadFile(url, ok, err) {
|
|
|
118269
118267
|
*
|
|
118270
118268
|
* ## Usage
|
|
118271
118269
|
*
|
|
118272
|
-
* [[Run this example](/examples/#
|
|
118270
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/cad/#OBJ_SportsCar_ExplodeModel)]
|
|
118273
118271
|
*
|
|
118274
118272
|
* ````javascript
|
|
118275
118273
|
* import {Viewer, OBJLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -120123,9 +120121,9 @@ const tempVec3$1 = math.vec3();
|
|
|
120123
120121
|
/**
|
|
120124
120122
|
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
120125
120123
|
*
|
|
120126
|
-
* [<img src="https://user-images.githubusercontent.com/83100/57724962-406e9a00-768c-11e9-9f1f-3d178a3ec11f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
120124
|
+
* [<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)
|
|
120127
120125
|
*
|
|
120128
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
120126
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_SectionPlanesPlugin)]
|
|
120129
120127
|
*
|
|
120130
120128
|
* ## Overview
|
|
120131
120129
|
*
|
|
@@ -122424,9 +122422,9 @@ const tempVec3 = math.vec3();
|
|
|
122424
122422
|
/**
|
|
122425
122423
|
* FaceAlignedSectionPlanesPlugin is a {@link Viewer} plugin that creates and edits face-aligned {@link SectionPlane}s.
|
|
122426
122424
|
*
|
|
122427
|
-
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
122425
|
+
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_FaceAlignedSectionPlanesPlugin)
|
|
122428
122426
|
*
|
|
122429
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
122427
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/slicing/#FaceAlignedSectionPlanesPlugin)]
|
|
122430
122428
|
*
|
|
122431
122429
|
* ## Overview
|
|
122432
122430
|
*
|
|
@@ -123354,7 +123352,7 @@ function decodeText(array) {
|
|
|
123354
123352
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
123355
123353
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
123356
123354
|
*
|
|
123357
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
123355
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_SpurGear)]
|
|
123358
123356
|
*
|
|
123359
123357
|
* ````javascript
|
|
123360
123358
|
* // Create a xeokit Viewer
|
|
@@ -123399,7 +123397,7 @@ function decodeText(array) {
|
|
|
123399
123397
|
* file data straight into the {@link STLLoaderPlugin#load} method. In the example below, to show how it's done, we'll pre-load
|
|
123400
123398
|
* our STL file data, then pass it straight into that method.
|
|
123401
123399
|
*
|
|
123402
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
123400
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataAsParam)]
|
|
123403
123401
|
*
|
|
123404
123402
|
* ````javascript
|
|
123405
123403
|
* loadSTL("./models/stl/binary/spurGear.stl", (stlData) =>{
|
|
@@ -123442,7 +123440,7 @@ function decodeText(array) {
|
|
|
123442
123440
|
* custom data source object, through which it can load STL files. For this example, our data source just loads
|
|
123443
123441
|
* them via HTTP, for simplicity. Once we've created the STLLoaderPlugin, we'll load our STL file as before.
|
|
123444
123442
|
*
|
|
123445
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
123443
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataSource)]
|
|
123446
123444
|
*
|
|
123447
123445
|
* ````javascript
|
|
123448
123446
|
* // Our custom STL data access strategy - implementation happens to be the same as STLDefaultDataSource
|
|
@@ -123757,9 +123755,9 @@ const treeViews = [];
|
|
|
123757
123755
|
* @desc A {@link Viewer} plugin that provides an HTML tree view to navigate the IFC elements in models.
|
|
123758
123756
|
* <br>
|
|
123759
123757
|
*
|
|
123760
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
123758
|
+
* <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>
|
|
123761
123759
|
*
|
|
123762
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
123760
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_WestRiverSideHospital)]
|
|
123763
123761
|
*
|
|
123764
123762
|
* ## Overview
|
|
123765
123763
|
*
|
|
@@ -123783,7 +123781,7 @@ const treeViews = [];
|
|
|
123783
123781
|
* Then we'll use an {@link XKTLoaderPlugin} to load the Schependomlaan model from an
|
|
123784
123782
|
* [.xkt file](https://github.com/xeokit/xeokit-sdk/tree/master/examples/models/xkt/schependomlaan).
|
|
123785
123783
|
*
|
|
123786
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
123784
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/navigation/#TreeViewPlugin_Containment)]
|
|
123787
123785
|
*
|
|
123788
123786
|
* ````javascript
|
|
123789
123787
|
* import {Viewer, XKTLoaderPlugin, TreeViewPlugin} from "xeokit-sdk.es.js";
|
|
@@ -123965,7 +123963,7 @@ const treeViews = [];
|
|
|
123965
123963
|
*
|
|
123966
123964
|
* Let's use {@link ContextMenu} to show a simple context menu for the node we clicked.
|
|
123967
123965
|
*
|
|
123968
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
123966
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
123969
123967
|
*
|
|
123970
123968
|
* ````javascript
|
|
123971
123969
|
* import {ContextMenu} from "../src/extras/ContextMenu/ContextMenu.js";
|
|
@@ -124056,7 +124054,7 @@ const treeViews = [];
|
|
|
124056
124054
|
* Let's register a callback to isolate and fit-to-view the {@link Entity}(s) represented by the node. This callback is
|
|
124057
124055
|
* 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.
|
|
124058
124056
|
*
|
|
124059
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
124057
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
124060
124058
|
*
|
|
124061
124059
|
* ````javascript
|
|
124062
124060
|
* treeView.on("nodeTitleClicked", (e) => {
|
|
@@ -129277,9 +129275,9 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129277
129275
|
/**
|
|
129278
129276
|
* {@link Viewer} plugin that loads models from xeokit's optimized *````.XKT````* format.
|
|
129279
129277
|
*
|
|
129280
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
129278
|
+
* <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>
|
|
129281
129279
|
*
|
|
129282
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
129280
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_XKT_OTCConferenceCenter)]
|
|
129283
129281
|
*
|
|
129284
129282
|
* # Overview
|
|
129285
129283
|
*
|
|
@@ -129335,7 +129333,7 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129335
129333
|
*
|
|
129336
129334
|
* 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).
|
|
129337
129335
|
*
|
|
129338
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
129336
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_metadata_Schependomlaan)]
|
|
129339
129337
|
*
|
|
129340
129338
|
* ````javascript
|
|
129341
129339
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -129422,9 +129420,9 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129422
129420
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
129423
129421
|
* 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.
|
|
129424
129422
|
*
|
|
129425
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
129423
|
+
* <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>
|
|
129426
129424
|
*
|
|
129427
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
129425
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
129428
129426
|
*
|
|
129429
129427
|
* ````javascript
|
|
129430
129428
|
* const viewer = new Viewer({
|
|
@@ -129460,8 +129458,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129460
129458
|
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
129461
129459
|
* translate it 100 units along its X axis.
|
|
129462
129460
|
*
|
|
129463
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_Duplex_transform)]
|
|
129464
|
-
*
|
|
129465
129461
|
* ````javascript
|
|
129466
129462
|
* xktLoader.load({
|
|
129467
129463
|
* src: "./models/xkt/Duplex.ifc.xkt",
|
|
@@ -129477,8 +129473,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129477
129473
|
*
|
|
129478
129474
|
* In the example below, we'll load only the objects that represent walls.
|
|
129479
129475
|
*
|
|
129480
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_includeTypes)]
|
|
129481
|
-
*
|
|
129482
129476
|
* ````javascript
|
|
129483
129477
|
* const model2 = xktLoader.load({
|
|
129484
129478
|
* id: "myModel2",
|
|
@@ -129491,8 +129485,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129491
129485
|
*
|
|
129492
129486
|
* In the example below, we'll load only the objects that do not represent empty space.
|
|
129493
129487
|
*
|
|
129494
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_excludeTypes)]
|
|
129495
|
-
*
|
|
129496
129488
|
* ````javascript
|
|
129497
129489
|
* const model3 = xktLoader.load({
|
|
129498
129490
|
* id: "myModel3",
|
|
@@ -129514,8 +129506,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129514
129506
|
* In the example below, we'll load a model, while configuring ````IfcSpace```` elements to be always initially invisible,
|
|
129515
129507
|
* and ````IfcWindow```` types to be always translucent blue.
|
|
129516
129508
|
*
|
|
129517
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_objectDefaults)]
|
|
129518
|
-
*
|
|
129519
129509
|
* ````javascript
|
|
129520
129510
|
* const myObjectDefaults = {
|
|
129521
129511
|
*
|
|
@@ -129576,8 +129566,6 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129576
129566
|
* In the example below, we'll customize the way XKTLoaderPlugin loads the files by configuring it with our own data source
|
|
129577
129567
|
* object. For simplicity, our custom data source example also uses HTTP, using a couple of xeokit utility functions.
|
|
129578
129568
|
*
|
|
129579
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_dataSource)]
|
|
129580
|
-
*
|
|
129581
129569
|
* ````javascript
|
|
129582
129570
|
* import {utils} from "xeokit-sdk.es.js";
|
|
129583
129571
|
*
|
|
@@ -129628,7 +129616,7 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129628
129616
|
*
|
|
129629
129617
|
* As shown in the example below, we do this by setting {@link XKTLoaderPlugin#globalizeObjectIds} ````true```` before we load our models.
|
|
129630
129618
|
*
|
|
129631
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
129619
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#TreeViewPlugin_Containment_MultipleModels)]
|
|
129632
129620
|
*
|
|
129633
129621
|
* ````javascript
|
|
129634
129622
|
* xktLoader.globalizeObjectIds = true;
|
|
@@ -129734,6 +129722,8 @@ parsers[ParserV10.version] = ParserV10;
|
|
|
129734
129722
|
* Now, to load all those XKT files into a single SceneModel and MetaModel in one operation, we pass a path to the XKT
|
|
129735
129723
|
* manifest to `XKTLoaderPlugin.load`, as shown in the example below:
|
|
129736
129724
|
*
|
|
129725
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_manifest_KarhumakiBridge)]
|
|
129726
|
+
*
|
|
129737
129727
|
* ````javascript
|
|
129738
129728
|
* import {
|
|
129739
129729
|
* Viewer,
|
|
@@ -132861,9 +132851,9 @@ getIDFromURI(str) {
|
|
|
132861
132851
|
/**
|
|
132862
132852
|
* {@link Viewer} plugin that loads models from [3DXML](https://en.wikipedia.org/wiki/3DXML) files.
|
|
132863
132853
|
*
|
|
132864
|
-
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples
|
|
132854
|
+
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)
|
|
132865
132855
|
*
|
|
132866
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132856
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
132867
132857
|
*
|
|
132868
132858
|
* ## Overview
|
|
132869
132859
|
*
|
|
@@ -132887,7 +132877,7 @@ getIDFromURI(str) {
|
|
|
132887
132877
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
132888
132878
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
132889
132879
|
*
|
|
132890
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132880
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_Widget)]
|
|
132891
132881
|
*
|
|
132892
132882
|
* ````javascript
|
|
132893
132883
|
* // Create a xeokit Viewer
|
|
@@ -132978,7 +132968,7 @@ getIDFromURI(str) {
|
|
|
132978
132968
|
* does not make sense because XML3DLoaderPlugin will set each {@link MetaObject#type} to "Default", and "storeys"
|
|
132979
132969
|
* does not make sense because that requires some of the MetaObject#type values to be "IfcBuildingStorey".
|
|
132980
132970
|
*
|
|
132981
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132971
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
132982
132972
|
*
|
|
132983
132973
|
* ## Material Type
|
|
132984
132974
|
*
|
|
@@ -132988,9 +132978,9 @@ getIDFromURI(str) {
|
|
|
132988
132978
|
*
|
|
132989
132979
|
* | Material Type | Material Components Loaded | Description | Example |
|
|
132990
132980
|
* |:--------:|:----:|:-----:|:-----:|
|
|
132991
|
-
* | "PhongMaterial" (default) | {@link PhongMaterial} | Non-physically-correct Blinn-Phong shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132992
|
-
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132993
|
-
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132981
|
+
* | "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) |
|
|
132982
|
+
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Metallic) |
|
|
132983
|
+
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular) |
|
|
132994
132984
|
*
|
|
132995
132985
|
* <br>
|
|
132996
132986
|
* Let's load our model again, this time converting the 3DXML Blinn-Phong materials to {@link SpecularMaterial}s:
|
|
@@ -133003,7 +132993,7 @@ getIDFromURI(str) {
|
|
|
133003
132993
|
* });
|
|
133004
132994
|
* ````
|
|
133005
132995
|
*
|
|
133006
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
132996
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular)]
|
|
133007
132997
|
*
|
|
133008
132998
|
* @class XML3DLoaderPlugin
|
|
133009
132999
|
*/
|
|
@@ -133150,9 +133140,9 @@ class WebIFCDefaultDataSource {
|
|
|
133150
133140
|
/**
|
|
133151
133141
|
* {@link Viewer} plugin that uses [web-ifc](https://github.com/tomvandig/web-ifc) to load BIM models directly from IFC files.
|
|
133152
133142
|
*
|
|
133153
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
133143
|
+
* <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>
|
|
133154
133144
|
*
|
|
133155
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
133145
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_Duplex)]
|
|
133156
133146
|
*
|
|
133157
133147
|
* ## Overview
|
|
133158
133148
|
*
|
|
@@ -133196,7 +133186,7 @@ class WebIFCDefaultDataSource {
|
|
|
133196
133186
|
* Since this model contains IFC types, the WebIFCLoaderPlugin will set the initial appearance of each object
|
|
133197
133187
|
* {@link Entity} according to its IFC type in {@link WebIFCLoaderPlugin#objectDefaults}.
|
|
133198
133188
|
*
|
|
133199
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
133189
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_isolateStorey)]
|
|
133200
133190
|
*
|
|
133201
133191
|
* ````javascript
|
|
133202
133192
|
* import {Viewer, WebIFCLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -134358,9 +134348,9 @@ const MAX_VERTICES = 500000; // TODO: Rough estimate
|
|
|
134358
134348
|
/**
|
|
134359
134349
|
* {@link Viewer} plugin that loads lidar point cloud geometry from LAS files.
|
|
134360
134350
|
*
|
|
134361
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
134351
|
+
* <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>
|
|
134362
134352
|
*
|
|
134363
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
134353
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
134364
134354
|
*
|
|
134365
134355
|
* ## Summary
|
|
134366
134356
|
*
|
|
@@ -134399,7 +134389,7 @@ const MAX_VERTICES = 500000; // TODO: Rough estimate
|
|
|
134399
134389
|
* a [LAS file](/assets/models/las/). Once the model has
|
|
134400
134390
|
* loaded, we'll then find its {@link MetaModel}, and the {@link MetaObject} and {@link Entity} that represent its point cloud.
|
|
134401
134391
|
*
|
|
134402
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
134392
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
134403
134393
|
*
|
|
134404
134394
|
* ````javascript
|
|
134405
134395
|
* import {Viewer, LASLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -135616,9 +135606,9 @@ const tempVec3c = math.vec3();
|
|
|
135616
135606
|
/**
|
|
135617
135607
|
* {@link Viewer} plugin that loads models from CityJSON files.
|
|
135618
135608
|
*
|
|
135619
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
135609
|
+
* <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>
|
|
135620
135610
|
*
|
|
135621
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
135611
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
135622
135612
|
*
|
|
135623
135613
|
* ## Overview
|
|
135624
135614
|
*
|
|
@@ -135658,7 +135648,7 @@ const tempVec3c = math.vec3();
|
|
|
135658
135648
|
* We'll also scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
135659
135649
|
* translate it 100 units along its X axis.
|
|
135660
135650
|
*
|
|
135661
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
135651
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
135662
135652
|
*
|
|
135663
135653
|
* ````javascript
|
|
135664
135654
|
* import {Viewer, CityJSONLoaderPlugin} from "xeokit-sdk.es.js";
|