@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.es5.js
CHANGED
|
@@ -17,9 +17,9 @@ this.groups=[];this.menuElement=null;this.shown=false;this.mouseOver=0;});/**
|
|
|
17
17
|
*/var Item=/*#__PURE__*/_createClass(function Item(id,getTitle,doAction,getEnabled,getShown){_classCallCheck(this,Item);this.id=id;this.getTitle=getTitle;this.doAction=doAction;this.getEnabled=getEnabled;this.getShown=getShown;this.itemElement=null;this.subMenu=null;this.enabled=true;});/**
|
|
18
18
|
* @desc A customizable HTML context menu.
|
|
19
19
|
*
|
|
20
|
-
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
20
|
+
* [<img src="http://xeokit.io/img/docs/ContextMenu/ContextMenu.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)
|
|
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#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
23
23
|
*
|
|
24
24
|
* ## Overview
|
|
25
25
|
*
|
|
@@ -62,7 +62,7 @@ this.groups=[];this.menuElement=null;this.shown=false;this.mouseOver=0;});/**
|
|
|
62
62
|
*
|
|
63
63
|
* We'll also initially enable the ````ContextMenu````.
|
|
64
64
|
*
|
|
65
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
65
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_Custom)]
|
|
66
66
|
*
|
|
67
67
|
* ````javascript
|
|
68
68
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -153,7 +153,7 @@ this.groups=[];this.menuElement=null;this.shown=false;this.mouseOver=0;});/**
|
|
|
153
153
|
* In the example below, we'll create a simple ````ContextMenu```` that allows us to toggle the selection of an object
|
|
154
154
|
* via its first item, which changes text depending on whether we are selecting or deselecting the object.
|
|
155
155
|
*
|
|
156
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
156
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_dynamicItemTitles)]
|
|
157
157
|
*
|
|
158
158
|
* ````javascript
|
|
159
159
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -194,7 +194,7 @@ this.groups=[];this.menuElement=null;this.shown=false;this.mouseOver=0;});/**
|
|
|
194
194
|
* Note that our "Effects" item has no ````doAction```` callback, because an item with a sub-menu performs no
|
|
195
195
|
* action of its own.
|
|
196
196
|
*
|
|
197
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
197
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_subMenus)]
|
|
198
198
|
*
|
|
199
199
|
* ````javascript
|
|
200
200
|
* const canvasContextMenu = new ContextMenu({
|
|
@@ -349,7 +349,7 @@ menuElement.style.display='block';var menuHeight=menuElement.offsetHeight;var me
|
|
|
349
349
|
* This component is used by {@link DistanceMeasurementsControl} and {@link AngleMeasurementsControl}
|
|
350
350
|
* to help position the pointer when snap-to-vertex or snap-toedge is enabled.
|
|
351
351
|
*
|
|
352
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
352
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
353
353
|
*
|
|
354
354
|
* ````JavaScript
|
|
355
355
|
*
|
|
@@ -2588,8 +2588,6 @@ if(lastOpacityQuantized===opacityQuantized){return;}}else{opacityQuantized=255.0
|
|
|
2588
2588
|
* We'll also demonstrate how to query the Marker's visibility status and position (in the World, View and
|
|
2589
2589
|
* Canvas coordinate systems), and how to subscribe to change events on those properties.
|
|
2590
2590
|
*
|
|
2591
|
-
* [[Run this example](/examples/#Markers_SimpleExample)]
|
|
2592
|
-
*
|
|
2593
2591
|
* ````javascript
|
|
2594
2592
|
* import {Viewer, GLTFLoaderPlugin, Marker} from "xeokit-sdk.es.js";
|
|
2595
2593
|
*
|
|
@@ -3030,10 +3028,10 @@ _this19._initMarkerDiv();_this19._onMouseHoverSurface=null;_this19._onHoverNothi
|
|
|
3030
3028
|
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(AngleMeasurementsMouseControl.prototype),"destroy",this).call(this);}}]);return AngleMeasurementsMouseControl;}(AngleMeasurementsControl);/**
|
|
3031
3029
|
* {@link Viewer} plugin for measuring angles.
|
|
3032
3030
|
*
|
|
3033
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63641903-61488180-c6b6-11e9-8e00-895b9d16dc4b.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
3031
|
+
* [<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)
|
|
3034
3032
|
*
|
|
3035
|
-
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
3036
|
-
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
3033
|
+
* * [[Example 1: Model with angle measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
3034
|
+
* * [[Example 2: Create angle measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
3037
3035
|
*
|
|
3038
3036
|
* ## Overview
|
|
3039
3037
|
*
|
|
@@ -3053,7 +3051,7 @@ _this19._initMarkerDiv();_this19._onMouseHoverSurface=null;_this19._onHoverNothi
|
|
|
3053
3051
|
* Note how each AngleMeasurement has ````origin````, ````corner```` and ````target````, which each indicate a 3D World-space
|
|
3054
3052
|
* position on the surface of an {@link Entity}. These can be aon the same Entity, or on different Entitys.
|
|
3055
3053
|
*
|
|
3056
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
3054
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_angle_modelWithMeasurements)]
|
|
3057
3055
|
*
|
|
3058
3056
|
* ````JavaScript
|
|
3059
3057
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -3124,7 +3122,7 @@ _this19._initMarkerDiv();_this19._onMouseHoverSurface=null;_this19._onHoverNothi
|
|
|
3124
3122
|
* The AngleMeasurementControl will then wait for the next click on any Entity, to begin constructing
|
|
3125
3123
|
* another AngleMeasurement, and so on, until deactivated again.
|
|
3126
3124
|
*
|
|
3127
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
3125
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#angle_createWithMouse_snapping)]
|
|
3128
3126
|
*
|
|
3129
3127
|
* ````JavaScript
|
|
3130
3128
|
* import {Viewer, XKTLoaderPlugin, AngleMeasurementsPlugin, AngleMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -3517,13 +3515,13 @@ if(utils.isArray(labelHTML)){labelHTML=labelHTML.join("");}labelHTML=this._rende
|
|
|
3517
3515
|
*/},{key:"destroy",value:function destroy(){if(this._marker){if(!this._markerExternal){this._marker.parentNode.removeChild(this._marker);}else{this._marker.removeEventListener("click",this._onMouseClickedExternalMarker);this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker);this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker);this._marker=null;}}if(this._label){if(!this._labelExternal){this._label.parentNode.removeChild(this._label);}this._label=null;}this.scene.off(this._onTick);_get(_getPrototypeOf(Annotation.prototype),"destroy",this).call(this);}}]);return Annotation;}(Marker);var tempVec3a$K=math.vec3();var tempVec3b$z=math.vec3();var tempVec3c$v=math.vec3();/**
|
|
3518
3516
|
* {@link Viewer} plugin that creates {@link Annotation}s.
|
|
3519
3517
|
*
|
|
3520
|
-
* [<img src="https://user-images.githubusercontent.com/83100/58403089-26589280-8062-11e9-8652-aed61a4e8c64.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
3518
|
+
* [<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)
|
|
3521
3519
|
*
|
|
3522
|
-
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples
|
|
3523
|
-
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
3524
|
-
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples
|
|
3525
|
-
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
3526
|
-
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples
|
|
3520
|
+
* * [[Example 1: Create annotations with mouse](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
3521
|
+
* * [[Example 2: Click annotations to toggle labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
3522
|
+
* * [[Example 3: Hover annotations to show labels](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_hoverShowLabels)]
|
|
3523
|
+
* * [[Example 4: Click annotations to fly to viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickFlyToPosition)]
|
|
3524
|
+
* * [[Example 5: Create Annotations with externally-created elements](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_externalElements)]
|
|
3527
3525
|
*
|
|
3528
3526
|
* ## Overview
|
|
3529
3527
|
*
|
|
@@ -3553,7 +3551,7 @@ if(utils.isArray(labelHTML)){labelHTML=labelHTML.join("");}labelHTML=this._rende
|
|
|
3553
3551
|
*
|
|
3554
3552
|
* Finally, we'll query the Annotation's position occlusion/visibility status, and subscribe to change events on those properties.
|
|
3555
3553
|
*
|
|
3556
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
3554
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_clickShowLabels)]
|
|
3557
3555
|
*
|
|
3558
3556
|
* ````JavaScript
|
|
3559
3557
|
* import {Viewer, XKTLoaderPlugin,AnnotationsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -3826,7 +3824,7 @@ if(utils.isArray(labelHTML)){labelHTML=labelHTML.join("");}labelHTML=this._rende
|
|
|
3826
3824
|
*
|
|
3827
3825
|
* Let's now extend our example to create an Annotation wherever we click on the surface of of our model:
|
|
3828
3826
|
*
|
|
3829
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
3827
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#annotations_createWithMouse)]
|
|
3830
3828
|
*
|
|
3831
3829
|
* ````javascript
|
|
3832
3830
|
* var i = 1; // Used to create unique Annotation IDs
|
|
@@ -4645,7 +4643,9 @@ this.validated=true;if(!this.linked||!this.validated){this.errors=[];this.errors
|
|
|
4645
4643
|
* @private
|
|
4646
4644
|
*/var ArrayBuf=/*#__PURE__*/function(){function ArrayBuf(gl,type,data,numItems,itemSize,usage,normalized,stride,offset){_classCallCheck(this,ArrayBuf);this._gl=gl;this.type=type;this.allocated=false;switch(data.constructor){case Uint8Array:this.itemType=gl.UNSIGNED_BYTE;this.itemByteSize=1;break;case Int8Array:this.itemType=gl.BYTE;this.itemByteSize=1;break;case Uint16Array:this.itemType=gl.UNSIGNED_SHORT;this.itemByteSize=2;break;case Int16Array:this.itemType=gl.SHORT;this.itemByteSize=2;break;case Uint32Array:this.itemType=gl.UNSIGNED_INT;this.itemByteSize=4;break;case Int32Array:this.itemType=gl.INT;this.itemByteSize=4;break;default:this.itemType=gl.FLOAT;this.itemByteSize=4;}this.usage=usage;this.length=0;this.dataLength=numItems;this.numItems=0;this.itemSize=itemSize;this.normalized=!!normalized;this.stride=stride||0;this.offset=offset||0;this._allocate(data);}_createClass(ArrayBuf,[{key:"_allocate",value:function _allocate(data){this.allocated=false;this._handle=this._gl.createBuffer();if(!this._handle){throw"Failed to allocate WebGL ArrayBuffer";}if(this._handle){this._gl.bindBuffer(this.type,this._handle);this._gl.bufferData(this.type,data.length>this.dataLength?data.slice(0,this.dataLength):data,this.usage);this._gl.bindBuffer(this.type,null);this.length=data.length;this.numItems=this.length/this.itemSize;this.allocated=true;}}},{key:"setData",value:function setData(data,offset){if(!this.allocated){return;}if(data.length+(offset||0)>this.length){// Needs reallocation
|
|
4647
4645
|
this.destroy();this._allocate(data);}else{// No reallocation needed
|
|
4648
|
-
this._gl.bindBuffer(this.type,this._handle);if(offset||offset===0){this._gl.bufferSubData(this.type,offset*this.itemByteSize,data);}else{this._gl.bufferData(this.type,data,this.usage);}this._gl.bindBuffer(this.type,null);}}},{key:"bind",value:function bind(){if(!this.allocated){return;}this._gl.bindBuffer(this.type,this._handle);}},{key:"unbind",value:function unbind(){if(!this.allocated){return;}this._gl.bindBuffer(this.type,null);}},{key:"destroy",value:function destroy(){if(!this.allocated){return;}this._gl.deleteBuffer(this._handle);this._handle=null;this.allocated=false;}}]);return ArrayBuf;}()
|
|
4646
|
+
this._gl.bindBuffer(this.type,this._handle);if(offset||offset===0){this._gl.bufferSubData(this.type,offset*this.itemByteSize,data);}else{this._gl.bufferData(this.type,data,this.usage);}this._gl.bindBuffer(this.type,null);}}},{key:"bind",value:function bind(){if(!this.allocated){return;}this._gl.bindBuffer(this.type,this._handle);}},{key:"unbind",value:function unbind(){if(!this.allocated){return;}this._gl.bindBuffer(this.type,null);}},{key:"destroy",value:function destroy(){if(!this.allocated){return;}this._gl.deleteBuffer(this._handle);this._handle=null;this.allocated=false;}}]);return ArrayBuf;}();/**
|
|
4647
|
+
* @private
|
|
4648
|
+
*/var OcclusionLayer=/*#__PURE__*/function(){function OcclusionLayer(scene,origin){_classCallCheck(this,OcclusionLayer);this.scene=scene;this.aabb=math.AABB3();this.origin=math.vec3(origin);this.originHash=this.origin.join();this.numMarkers=0;this.markers={};this.markerList=[];// Ordered array of Markers
|
|
4649
4649
|
this.markerIndices={};// ID map of Marker indices in _markerList
|
|
4650
4650
|
this.positions=[];// Packed array of World-space marker positions
|
|
4651
4651
|
this.indices=[];// Indices corresponding to array above
|
|
@@ -4660,6 +4660,7 @@ var boundary=canvas.boundary;var canvasWidth=boundary[2];var canvasHeight=bounda
|
|
|
4660
4660
|
marker._setVisible(false);continue;}var _canvasPos=marker.canvasPos;var canvasX=_canvasPos[0];var canvasY=_canvasPos[1];if(canvasX+10<0||canvasY+10<0||canvasX-10>canvasWidth||canvasY-10>canvasHeight){marker._setVisible(false);continue;}if(marker.entity&&!marker.entity.visible){marker._setVisible(false);continue;}if(marker.occludable){this.occlusionTestList[this.lenOcclusionTestList++]=marker;this.pixels[lenPixels++]=canvasX;this.pixels[lenPixels++]=canvasY;continue;}marker._setVisible(true);}}},{key:"_updateActiveSectionPlanes",value:function _updateActiveSectionPlanes(){var sectionPlanes=this.scene._sectionPlanesState.sectionPlanes;var numSectionPlanes=sectionPlanes.length;if(numSectionPlanes>0){for(var _i51=0;_i51<numSectionPlanes;_i51++){var sectionPlane=sectionPlanes[_i51];if(!sectionPlane.active){this.sectionPlanesActive[_i51]=false;}else{var intersect=math.planeAABB3Intersect(sectionPlane.dir,sectionPlane.dist,this.aabb);var outside=intersect===-1;if(outside){this.culledBySectionPlanes=true;return;}var intersecting=intersect===0;this.sectionPlanesActive[_i51]=intersecting;}}}this.culledBySectionPlanes=false;}},{key:"destroy",value:function destroy(){this.markers={};this.markerList.length=0;if(this.positionsBuf){this.positionsBuf.destroy();}if(this.indicesBuf){this.indicesBuf.destroy();}}}]);return OcclusionLayer;}();var MARKER_COLOR=math.vec3([1.0,0.0,0.0]);var POINT_SIZE=20;var MARKER_SPRITE_CLIPZ_OFFSET=-0.001;// Amount that we offset sprite clip Z coords to raise them from surfaces
|
|
4661
4661
|
var tempVec3a$J=math.vec3();/**
|
|
4662
4662
|
* Manages occlusion testing. Private member of a Renderer.
|
|
4663
|
+
* @private
|
|
4663
4664
|
*/var OcclusionTester=/*#__PURE__*/function(){function OcclusionTester(scene,renderBufferManager){var _this31=this;_classCallCheck(this,OcclusionTester);this._scene=scene;this._renderBufferManager=renderBufferManager;this._occlusionLayers={};this._occlusionLayersList=[];this._occlusionLayersListDirty=false;this._shaderSource=null;this._program=null;this._shaderSourceHash=null;this._shaderSourceDirty=true;// Need to build shader source code ?
|
|
4664
4665
|
this._programDirty=false;// Need to build shader program ?
|
|
4665
4666
|
this._markersToOcclusionLayersMap={};this._onCameraViewMatrix=scene.camera.on("viewMatrix",function(){_this31._occlusionTestListDirty=true;});this._onCameraProjMatrix=scene.camera.on("projMatrix",function(){_this31._occlusionTestListDirty=true;});this._onCanvasBoundary=scene.canvas.on("boundary",function(){_this31._occlusionTestListDirty=true;});}/**
|
|
@@ -6574,7 +6575,7 @@ this.fire("dirty");this.fire("projection",this._projectionType);this.fire("projM
|
|
|
6574
6575
|
*
|
|
6575
6576
|
* In the example below we'll replace the {@link Scene}'s default light sources with three View-space DirLights.
|
|
6576
6577
|
*
|
|
6577
|
-
* [[Run this example](/examples
|
|
6578
|
+
* [[Run this example](/examples/index.html#lights_DirLight_view)]
|
|
6578
6579
|
*
|
|
6579
6580
|
* ````javascript
|
|
6580
6581
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -6727,7 +6728,7 @@ _this43._shadowProjMatrixDirty=false;}return _this43._shadowProjMatrix;},getShad
|
|
|
6727
6728
|
*
|
|
6728
6729
|
* 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:
|
|
6729
6730
|
*
|
|
6730
|
-
* [[Run this example](/examples
|
|
6731
|
+
* [[Run this example](/examples/index.html#lights_AmbientLight)]
|
|
6731
6732
|
*
|
|
6732
6733
|
* ````javascript
|
|
6733
6734
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -6900,7 +6901,7 @@ var x=array[i]/(Math.abs(array[i])+Math.abs(array[i+1])+Math.abs(array[i+2]));va
|
|
|
6900
6901
|
*
|
|
6901
6902
|
* Creating a {@link Mesh} with a ReadableGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
6902
6903
|
*
|
|
6903
|
-
* [[Run this example](/examples
|
|
6904
|
+
* [[Run this example](/examples/index.html#geometry_ReadableGeometry)]
|
|
6904
6905
|
*
|
|
6905
6906
|
* ````javascript
|
|
6906
6907
|
* import {Viewer, Mesh, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7081,7 +7082,7 @@ return;}var state=this._state;var colors=state.colors;if(!colors){this.error("ca
|
|
|
7081
7082
|
*
|
|
7082
7083
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry}.
|
|
7083
7084
|
*
|
|
7084
|
-
* [[Run this example](/examples
|
|
7085
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxGeometry)]
|
|
7085
7086
|
*
|
|
7086
7087
|
* ````javascript
|
|
7087
7088
|
* import {Viewer, Mesh, buildBoxGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -7186,7 +7187,7 @@ indices:[0,1,2,0,2,3,// front
|
|
|
7186
7187
|
*
|
|
7187
7188
|
* 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}.
|
|
7188
7189
|
*
|
|
7189
|
-
* [[Run this example](/examples
|
|
7190
|
+
* [[Run this example](/examples/index.html#materials_PhongMaterial)]
|
|
7190
7191
|
*
|
|
7191
7192
|
* ```` javascript
|
|
7192
7193
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -7824,7 +7825,7 @@ _this49.preset=cfg.preset;if(cfg.fill!==undefined){_this49.fill=cfg.fill;}if(cfg
|
|
|
7824
7825
|
*
|
|
7825
7826
|
* Recall that {@link Mesh} is a concrete subtype of the abstract {@link Entity} base class.
|
|
7826
7827
|
*
|
|
7827
|
-
* [[Run this example](/examples
|
|
7828
|
+
* [[Run this example](/examples/index.html#materials_EdgeMaterial)]
|
|
7828
7829
|
*
|
|
7829
7830
|
* ````javascript
|
|
7830
7831
|
* import {Viewer, Mesh, buildSphereGeometry,
|
|
@@ -8132,9 +8133,9 @@ var unitsInfo={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"}
|
|
|
8132
8133
|
*/},{key:"realToWorldPos",value:function realToWorldPos(realPos){var worldPos=arguments.length>1&&arguments[1]!==undefined?arguments[1]:math.vec3(3);worldPos[0]=(realPos[0]-this._origin[0])/this._scale;worldPos[1]=(realPos[1]-this._origin[1])/this._scale;worldPos[2]=(realPos[2]-this._origin[2])/this._scale;return worldPos;}}]);return Metrics;}(Component);/**
|
|
8133
8134
|
* @desc Configures Scalable Ambient Obscurance (SAO) for a {@link Scene}.
|
|
8134
8135
|
*
|
|
8135
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
8136
|
+
* <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>
|
|
8136
8137
|
*
|
|
8137
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
8138
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
8138
8139
|
*
|
|
8139
8140
|
* ## Overview
|
|
8140
8141
|
*
|
|
@@ -8156,7 +8157,7 @@ var unitsInfo={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"}
|
|
|
8156
8157
|
* {@link SAO#scale} and {@link SAO#intensity} must be tuned to the distance
|
|
8157
8158
|
* between {@link Perspective#near} and {@link Perspective#far}, or the distance
|
|
8158
8159
|
* between {@link Ortho#near} and {@link Ortho#far}, depending on which of those two projections the {@link Camera} is currently
|
|
8159
|
-
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
8160
|
+
* using. Use the [live example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter) to get a
|
|
8160
8161
|
* feel for that.
|
|
8161
8162
|
*
|
|
8162
8163
|
* ## Usage
|
|
@@ -8212,7 +8213,7 @@ var unitsInfo={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"}
|
|
|
8212
8213
|
* });
|
|
8213
8214
|
* ````
|
|
8214
8215
|
*
|
|
8215
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
8216
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/viewer/#sao_ConferenceCenter)]
|
|
8216
8217
|
*
|
|
8217
8218
|
* ## Efficiency
|
|
8218
8219
|
*
|
|
@@ -8295,7 +8296,7 @@ var unitsInfo={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"}
|
|
|
8295
8296
|
* });
|
|
8296
8297
|
* ````
|
|
8297
8298
|
*
|
|
8298
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
8299
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#techniques_nonInteractiveQuality)]
|
|
8299
8300
|
*/var SAO=/*#__PURE__*/function(_Component19){_inherits(SAO,_Component19);var _super31=_createSuper(SAO);/** @private */function SAO(owner){var _this52;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,SAO);_this52=_super31.call(this,owner,cfg);_this52._supported=WEBGL_INFO.SUPPORTED_EXTENSIONS["OES_standard_derivatives"];// For computing normals in SAO fragment shader
|
|
8300
8301
|
_this52.enabled=cfg.enabled;_this52.kernelRadius=cfg.kernelRadius;_this52.intensity=cfg.intensity;_this52.bias=cfg.bias;_this52.scale=cfg.scale;_this52.minResolution=cfg.minResolution;_this52.numSamples=cfg.numSamples;_this52.blur=cfg.blur;_this52.blendCutoff=cfg.blendCutoff;_this52.blendFactor=cfg.blendFactor;return _this52;}/**
|
|
8301
8302
|
* Gets whether or not SAO is supported by this browser and GPU.
|
|
@@ -8460,7 +8461,7 @@ _this52.enabled=cfg.enabled;_this52.kernelRadius=cfg.kernelRadius;_this52.intens
|
|
|
8460
8461
|
* In the example below, we'll customize the {@link Scene}'s global ````PointsMaterial````, then use
|
|
8461
8462
|
* an {@link XKTLoaderPlugin} to load a model containing a point cloud.
|
|
8462
8463
|
*
|
|
8463
|
-
* [[Run this example](/examples
|
|
8464
|
+
* [[Run this example](/examples/index.html#materials_PointsMaterial)]
|
|
8464
8465
|
*
|
|
8465
8466
|
* ````javascript
|
|
8466
8467
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -8635,7 +8636,7 @@ _this53.preset=cfg.preset;if(cfg.pointSize!==undefined){_this53.pointSize=cfg.po
|
|
|
8635
8636
|
* In the example below, we'll customize the {@link Scene}'s global ````LinesMaterial````, then use
|
|
8636
8637
|
* an {@link XKTLoaderPlugin} to load a model containing line segments.
|
|
8637
8638
|
*
|
|
8638
|
-
* [[Run this example](/examples
|
|
8639
|
+
* [[Run this example](/examples/index.html#materials_LinesMaterial)]
|
|
8639
8640
|
*
|
|
8640
8641
|
* ````javascript
|
|
8641
8642
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -10304,7 +10305,7 @@ if(geometryState.indicesBufCombined){geometryState.indicesBufCombined.bind();fra
|
|
|
10304
10305
|
*
|
|
10305
10306
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
10306
10307
|
*
|
|
10307
|
-
* [[Run this example](/examples/#
|
|
10308
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#sceneGraph)]
|
|
10308
10309
|
*
|
|
10309
10310
|
* ````javascript
|
|
10310
10311
|
* import {Viewer, Mesh, Node, PhongMaterial, buildBoxGeometry, ReadableGeometry} from "xeokit-sdk.es.js";
|
|
@@ -11020,7 +11021,7 @@ var uvDecodeMatrix=geometry.uvDecodeMatrix;if(uvDecodeMatrix){geometryCompressio
|
|
|
11020
11021
|
*
|
|
11021
11022
|
* Creating a {@link Mesh} with a cylinder-shaped {@link ReadableGeometry} :
|
|
11022
11023
|
*
|
|
11023
|
-
* [[Run this example](/examples
|
|
11024
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildCylinderGeometry)]
|
|
11024
11025
|
*
|
|
11025
11026
|
* ````javascript
|
|
11026
11027
|
*
|
|
@@ -11080,7 +11081,7 @@ for(i=0;i<=radialSegments;i++){x=Math.sin(i*radialAngle);z=Math.cos(i*radialAngl
|
|
|
11080
11081
|
*
|
|
11081
11082
|
* Creating a {@link Mesh} with a sphere-shaped {@link ReadableGeometry} :
|
|
11082
11083
|
*
|
|
11083
|
-
* [[Run this example](/examples/#
|
|
11084
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildSphereGeometry)]
|
|
11084
11085
|
*
|
|
11085
11086
|
* ````javascript
|
|
11086
11087
|
* import {Viewer, Mesh, buildSphereGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -11123,7 +11124,7 @@ for(i=0;i<=radialSegments;i++){x=Math.sin(i*radialAngle);z=Math.cos(i*radialAngl
|
|
|
11123
11124
|
*
|
|
11124
11125
|
* Creating a {@link Mesh} with vector text {@link ReadableGeometry} :
|
|
11125
11126
|
*
|
|
11126
|
-
* [[Run this example](/examples
|
|
11127
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildVectorTextGeometry)]
|
|
11127
11128
|
*
|
|
11128
11129
|
* ````javascript
|
|
11129
11130
|
*
|
|
@@ -11163,7 +11164,7 @@ for(i=0;i<=radialSegments;i++){x=Math.sin(i*radialAngle);z=Math.cos(i*radialAngl
|
|
|
11163
11164
|
*
|
|
11164
11165
|
* ## Usage
|
|
11165
11166
|
*
|
|
11166
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
11167
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_AxisGizmoPlugin)]
|
|
11167
11168
|
*
|
|
11168
11169
|
* ````JavaScript````
|
|
11169
11170
|
* import {Viewer, XKTLoaderPlugin, AxisGizmoPlugin} from "xeokit-sdk.es.js";
|
|
@@ -11340,7 +11341,7 @@ geometry:new ReadableGeometry(axisGizmoScene,buildVectorTextGeometry({text:"Z",s
|
|
|
11340
11341
|
*
|
|
11341
11342
|
* We can also update properties of our object-Meshes via calls to {@link Scene#setObjectsHighlighted} etc.
|
|
11342
11343
|
*
|
|
11343
|
-
* [[Run this example](/examples
|
|
11344
|
+
* [[Run this example](/examples/index.html#sceneRepresentation_SceneGraph)]
|
|
11344
11345
|
*
|
|
11345
11346
|
* ````javascript
|
|
11346
11347
|
* import {Viewer, Mesh, Node, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -11903,7 +11904,7 @@ var tempChildList=this._children.splice();var child;for(var _i148=0,len=tempChil
|
|
|
11903
11904
|
*
|
|
11904
11905
|
* ## Usage
|
|
11905
11906
|
*
|
|
11906
|
-
* [[Run this example](/examples
|
|
11907
|
+
* [[Run this example](/examples/index.html#materials_LambertMaterial)]
|
|
11907
11908
|
*
|
|
11908
11909
|
* 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.
|
|
11909
11910
|
*
|
|
@@ -12091,7 +12092,7 @@ hash:"/lam;"});_this60.ambient=cfg.ambient;_this60.color=cfg.color;_this60.emiss
|
|
|
12091
12092
|
* channels, which allows us a little creative flexibility. Then, in the next example further down, we'll combine those channels
|
|
12092
12093
|
* within the same {@link Texture} for efficiency.
|
|
12093
12094
|
*
|
|
12094
|
-
* [[Run this example](/examples
|
|
12095
|
+
* [[Run this example](/examples/index.html#materials_MetallicMaterial)]
|
|
12095
12096
|
*
|
|
12096
12097
|
* ````javascript
|
|
12097
12098
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry, MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -12964,7 +12965,7 @@ gl.bindTexture(this.target,null);}},{key:"setProps",value:function setProps(prop
|
|
|
12964
12965
|
* with {@link PhongMaterial#diffuseMap} and {@link PhongMaterial#specularMap}. The {@link Texture} pixel colors directly
|
|
12965
12966
|
* provide the diffuse and specular components for each fragment across the {@link ReadableGeometry} surface.
|
|
12966
12967
|
*
|
|
12967
|
-
* [[Run this example](/examples
|
|
12968
|
+
* [[Run this example](/examples/index.html#materials_Texture)]
|
|
12968
12969
|
*
|
|
12969
12970
|
* ```` javascript
|
|
12970
12971
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -13176,7 +13177,7 @@ if(cfg.src){_this63.src=cfg.src;// Image file
|
|
|
13176
13177
|
*
|
|
13177
13178
|
* 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.
|
|
13178
13179
|
*
|
|
13179
|
-
* [[Run this example](/examples
|
|
13180
|
+
* [[Run this example](/examples/index.html#materials_Fresnel)]
|
|
13180
13181
|
*
|
|
13181
13182
|
* ````javascript
|
|
13182
13183
|
* import {Viewer, Mesh, buildTorusGeometry,
|
|
@@ -13303,7 +13304,7 @@ v edgeBias: 0.2,
|
|
|
13303
13304
|
*
|
|
13304
13305
|
* Creating a {@link Mesh} with a VBOGeometry that defines a single triangle, plus a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
13305
13306
|
*
|
|
13306
|
-
* [[Run this example](/examples
|
|
13307
|
+
* [[Run this example](/examples/index.html#geometry_VBOGeometry)]
|
|
13307
13308
|
*
|
|
13308
13309
|
* ````javascript
|
|
13309
13310
|
* import {Viewer, Mesh, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -13450,8 +13451,6 @@ K3D.edit.remap=function(ind,nind,arr,cpi){var ncrd=new Array(arr.length);for(var
|
|
|
13450
13451
|
*
|
|
13451
13452
|
* In the example below we'll create a {@link Mesh} with {@link PhongMaterial}, {@link Texture} and a {@link ReadableGeometry} loaded from 3DS.
|
|
13452
13453
|
*
|
|
13453
|
-
* [[Run this example](/examples/#geometry_loaders_3DS)]
|
|
13454
|
-
*
|
|
13455
13454
|
* ````javascript
|
|
13456
13455
|
* import {Viewer, Mesh, load3DSGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
13457
13456
|
*
|
|
@@ -13503,8 +13502,6 @@ var mesh=m.edit.objects[0].mesh;var positions=mesh.vertices;var uv=mesh.uvt;var
|
|
|
13503
13502
|
*
|
|
13504
13503
|
* In the example below we'll create a {@link Mesh} with {@link MetallicMaterial} and {@link ReadableGeometry} loaded from OBJ.
|
|
13505
13504
|
*
|
|
13506
|
-
* [[Run this example](/examples/#geometry_loaders_OBJ)]
|
|
13507
|
-
*
|
|
13508
13505
|
* ````javascript
|
|
13509
13506
|
* import {Viewer, Mesh, loadOBJGeometry, ReadableGeometry,
|
|
13510
13507
|
* MetallicMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -13577,7 +13574,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13577
13574
|
*
|
|
13578
13575
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
13579
13576
|
*
|
|
13580
|
-
* [[Run this example](/examples
|
|
13577
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometry)]
|
|
13581
13578
|
*
|
|
13582
13579
|
* ````javascript
|
|
13583
13580
|
* import {Viewer, Mesh, buildBoxLinesGeometry, ReadableGeometry, PhongMaterial} from "xeokit-sdk.es.js";
|
|
@@ -13619,7 +13616,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13619
13616
|
* In the example below we'll create a {@link Mesh} with a box-shaped {@link ReadableGeometry} that has lines primitives.
|
|
13620
13617
|
* This box will be created from AABB of a model.
|
|
13621
13618
|
*
|
|
13622
|
-
* [[Run this example](/examples
|
|
13619
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildBoxLinesGeometryFromAABB)]
|
|
13623
13620
|
*
|
|
13624
13621
|
* ````javascript
|
|
13625
13622
|
* import {Viewer, Mesh, Node, buildBoxGeometry, buildBoxLinesGeometryFromAABB, ReadableGeometry, PhongMaterial} from "../../dist/xeokit-sdk.min.es.js";
|
|
@@ -13735,7 +13732,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13735
13732
|
*
|
|
13736
13733
|
* Creating a {@link Mesh} with a GridGeometry and a {@link PhongMaterial}:
|
|
13737
13734
|
*
|
|
13738
|
-
* [[Run this example](/examples
|
|
13735
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildGridGeometry)]
|
|
13739
13736
|
*
|
|
13740
13737
|
* ````javascript
|
|
13741
13738
|
* import {Viewer, Mesh, buildGridGeometry, VBOGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -13774,7 +13771,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13774
13771
|
*
|
|
13775
13772
|
* Creating a {@link Mesh} with a PlaneGeometry and a {@link PhongMaterial} with diffuse {@link Texture}:
|
|
13776
13773
|
*
|
|
13777
|
-
* [[Run this example](/examples/#
|
|
13774
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPlaneGeometry)]
|
|
13778
13775
|
*
|
|
13779
13776
|
* ````javascript
|
|
13780
13777
|
* import {Viewer, Mesh, buildPlaneGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -13818,7 +13815,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13818
13815
|
* ## Usage
|
|
13819
13816
|
* Creating a {@link Mesh} with a torus-shaped {@link ReadableGeometry} :
|
|
13820
13817
|
*
|
|
13821
|
-
* [[Run this example](/examples
|
|
13818
|
+
* [[Run this example](/examples/index.html#geometry_builders_buildTorusGeometry)]
|
|
13822
13819
|
*
|
|
13823
13820
|
* ````javascript
|
|
13824
13821
|
* import {Viewer, Mesh, buildTorusGeometry, ReadableGeometry, PhongMaterial, Texture} from "xeokit-sdk.es.js";
|
|
@@ -13865,7 +13862,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13865
13862
|
*
|
|
13866
13863
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} that has lines primitives.
|
|
13867
13864
|
*
|
|
13868
|
-
* [[Run this example](/examples/#
|
|
13865
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometry)]
|
|
13869
13866
|
*
|
|
13870
13867
|
* ````javascript
|
|
13871
13868
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -13926,7 +13923,7 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
13926
13923
|
*
|
|
13927
13924
|
* In the example below we'll create a {@link Mesh} with a polyline {@link ReadableGeometry} created from curves.
|
|
13928
13925
|
*
|
|
13929
|
-
* [[Run this example](/examples/#
|
|
13926
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#buildPolylineGeometryFromCurve)]
|
|
13930
13927
|
*
|
|
13931
13928
|
* ````javascript
|
|
13932
13929
|
* //------------------------------------------------------------------------------------------------------------------
|
|
@@ -14040,9 +14037,9 @@ var positions=K3D.edit.unwrap(m.i_verts,m.c_verts,3);var normals=K3D.edit.unwrap
|
|
|
14040
14037
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
14041
14038
|
* an ````Bitmap```` to show a storey plan next to the model.
|
|
14042
14039
|
*
|
|
14043
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](/examples/#
|
|
14040
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/Bitmap_storeyPlan.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
14044
14041
|
*
|
|
14045
|
-
* [[Run this example](/examples/#
|
|
14042
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
14046
14043
|
*
|
|
14047
14044
|
* ````javascript
|
|
14048
14045
|
* import {Viewer, Bitmap, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -14518,7 +14515,7 @@ this._silhouetteRenderer=new TrianglesSilhouetteRenderer$1(this._scene);}if(!thi
|
|
|
14518
14515
|
*
|
|
14519
14516
|
* 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.
|
|
14520
14517
|
*
|
|
14521
|
-
* [[Run this example](/examples
|
|
14518
|
+
* [[Run this example](/examples/index.html#Configs_disableDoublePrecisionAndRAF)]
|
|
14522
14519
|
*
|
|
14523
14520
|
* ````javascript
|
|
14524
14521
|
* import {Configs, Viewer, XKTLoaderPlugin} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -16503,9 +16500,9 @@ _this73.manager.itemError(url);throw err;}delete loading[url];for(var _i376=0,il
|
|
|
16503
16500
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
16504
16501
|
* 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.
|
|
16505
16502
|
*
|
|
16506
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
16503
|
+
* <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>
|
|
16507
16504
|
*
|
|
16508
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
16505
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
16509
16506
|
*
|
|
16510
16507
|
* ````javascript
|
|
16511
16508
|
* const viewer = new Viewer({
|
|
@@ -16546,7 +16543,7 @@ _this73.manager.itemError(url);throw err;}delete loading[url];for(var _i376=0,il
|
|
|
16546
16543
|
*
|
|
16547
16544
|
* As in the previous example, we'll configure our KTX2TextureTranscoder to load the Basis Codec from a local directory.
|
|
16548
16545
|
*
|
|
16549
|
-
* * [Run a similar example](
|
|
16546
|
+
* * [Run a similar example](https://xeokit.github.io/xeokit-sdk/examples/scenemodel/#vbo_batching_autocompressed_triangles_textures_ktx2)
|
|
16550
16547
|
*
|
|
16551
16548
|
* ````javascript
|
|
16552
16549
|
* const viewer = new Viewer({
|
|
@@ -16995,7 +16992,7 @@ return this;}/**
|
|
|
16995
16992
|
* Then, for each object in our model we'll add an {@link Entity}
|
|
16996
16993
|
* that has a mesh that instances our box geometry, transforming and coloring the instance.
|
|
16997
16994
|
*
|
|
16998
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
16995
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_instancing)
|
|
16999
16996
|
*
|
|
17000
16997
|
* ````javascript
|
|
17001
16998
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -17195,7 +17192,7 @@ return this;}/**
|
|
|
17195
17192
|
* Let's once more use a ````SceneModel````
|
|
17196
17193
|
* to build the simple table model, this time exploiting geometry batching.
|
|
17197
17194
|
*
|
|
17198
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
17195
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
17199
17196
|
*
|
|
17200
17197
|
* ````javascript
|
|
17201
17198
|
* import {Viewer, SceneModel} from "xeokit-sdk.es.js";
|
|
@@ -17463,7 +17460,7 @@ return this;}/**
|
|
|
17463
17460
|
* ````
|
|
17464
17461
|
*
|
|
17465
17462
|
* 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
|
|
17466
|
-
* components from the metadata, such as the tree view demonstrated in [this demo](https://xeokit.github.io/xeokit-sdk/examples
|
|
17463
|
+
* 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).
|
|
17467
17464
|
*
|
|
17468
17465
|
* This hierarchy allows us to express the hierarchical structure of a model while representing it in
|
|
17469
17466
|
* various ways in the 3D scene (such as with ````SceneModel````, which
|
|
@@ -17496,7 +17493,7 @@ return this;}/**
|
|
|
17496
17493
|
*
|
|
17497
17494
|
* Note that the axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
17498
17495
|
*
|
|
17499
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
17496
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
17500
17497
|
*
|
|
17501
17498
|
* ````javascript
|
|
17502
17499
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -17593,7 +17590,7 @@ return this;}/**
|
|
|
17593
17590
|
*
|
|
17594
17591
|
* The axis-aligned World-space boundary (AABB) of our model is ````[ -6, -9, -6, 1000000006, -2.5, 1000000006]````.
|
|
17595
17592
|
*
|
|
17596
|
-
* [](https://xeokit.github.io/xeokit-sdk/examples
|
|
17593
|
+
* [](https://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneModel_batching)
|
|
17597
17594
|
*
|
|
17598
17595
|
* ````javascript
|
|
17599
17596
|
* const origin = [100000000, 0, 100000000];
|
|
@@ -18677,9 +18674,9 @@ var _uniquifyPositions=uniquifyPositions({positionsCompressed:geometry.positions
|
|
|
18677
18674
|
* In the example below, we'll load the Schependomlaan model, then use
|
|
18678
18675
|
* a ````LineSet```` to show a grid underneath the model.
|
|
18679
18676
|
*
|
|
18680
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](/examples/#LineSet_grid)
|
|
18677
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/LineSet_grid.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)
|
|
18681
18678
|
*
|
|
18682
|
-
* [[Run this example](/examples/#LineSet_grid)]
|
|
18679
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#LineSet_grid)]
|
|
18683
18680
|
*
|
|
18684
18681
|
* ````javascript
|
|
18685
18682
|
* import {Viewer, XKTLoaderPlugin, LineSet, buildGridGeometry} from "https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -18758,10 +18755,10 @@ var _uniquifyPositions=uniquifyPositions({positionsCompressed:geometry.positions
|
|
|
18758
18755
|
this.scene._lineSetDestroyed(this);}}]);return LineSet;}(Component);var tempVec3$5=math.vec3();var tempVec3a$9=math.vec3();var tempVec3b$6=math.vec3();var tempVec3c$4=math.vec3();/**
|
|
18759
18756
|
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
18760
18757
|
*
|
|
18761
|
-
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples
|
|
18758
|
+
* [<img src="http://xeokit.github.io/xeokit-sdk/assets/images/BCFViewpointsPlugin.png">](/examples/index.html#BCF_SaveViewpoint)
|
|
18762
18759
|
*
|
|
18763
|
-
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
18764
|
-
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples
|
|
18760
|
+
* * [[Example 1: Saving viewer state to a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
18761
|
+
* * [[Example 2: Loading viewer state from a BCF viewpoint](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint)]
|
|
18765
18762
|
*
|
|
18766
18763
|
* ## Overview
|
|
18767
18764
|
*
|
|
@@ -18793,7 +18790,7 @@ this.scene._lineSetDestroyed(this);}}]);return LineSet;}(Component);var tempVec3
|
|
|
18793
18790
|
* plan view using a {@link Bitmap}, then use a {@link BCFViewpointsPlugin#getViewpoint}
|
|
18794
18791
|
* to save a viewpoint to JSON, which we'll log to the JavaScript developer console.
|
|
18795
18792
|
*
|
|
18796
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
18793
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint)]
|
|
18797
18794
|
*
|
|
18798
18795
|
* ````javascript
|
|
18799
18796
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin,
|
|
@@ -19022,7 +19019,7 @@ this.scene._lineSetDestroyed(this);}}]);return LineSet;}(Component);var tempVec3
|
|
|
19022
19019
|
* });
|
|
19023
19020
|
* ````
|
|
19024
19021
|
*
|
|
19025
|
-
* [[Run an example](/examples
|
|
19022
|
+
* [[Run an example](/examples/index.html#BCF_LoadViewpoint_defaultInvisible)]
|
|
19026
19023
|
*
|
|
19027
19024
|
* ## Behaviour with XKTLoaderPlugin globalizeObjectIds
|
|
19028
19025
|
*
|
|
@@ -19040,8 +19037,8 @@ this.scene._lineSetDestroyed(this);}}]);return LineSet;}(Component);var tempVec3
|
|
|
19040
19037
|
* capture the states of the individual ````Entitys```` that represent the duplicate IFC elements. Take a look at the
|
|
19041
19038
|
* following two examples to learn more.
|
|
19042
19039
|
*
|
|
19043
|
-
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
19044
|
-
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples
|
|
19040
|
+
* * [Example: Saving a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_SaveViewpoint_MultipleModels)
|
|
19041
|
+
* * [Example: Loading a BCF viewpoint containing duplicate models](https://xeokit.github.io/xeokit-sdk/examples/index.html#BCF_LoadViewpoint_MultipleModels)
|
|
19045
19042
|
*
|
|
19046
19043
|
* **Caveat:** when loading a BCF viewpoint, we always assume that we have loaded in our target BIM viewer the same models that were
|
|
19047
19044
|
* loaded in the viewpoint's original authoring application when the viewpoint was created. In the case of multi-model
|
|
@@ -19421,11 +19418,11 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
19421
19418
|
*/},{key:"destroy",value:function destroy(){this.deactivate();_get(_getPrototypeOf(DistanceMeasurementsMouseControl.prototype),"destroy",this).call(this);}}]);return DistanceMeasurementsMouseControl;}(DistanceMeasurementsControl);/**
|
|
19422
19419
|
* {@link Viewer} plugin for measuring point-to-point distances.
|
|
19423
19420
|
*
|
|
19424
|
-
* [<img src="https://user-images.githubusercontent.com/83100/63047331-867a0a80-bed4-11e9-892f-398740013c5f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
19421
|
+
* [<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)
|
|
19425
19422
|
*
|
|
19426
|
-
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples
|
|
19427
|
-
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
19428
|
-
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
19423
|
+
* * [[Example 1: Model with distance measurements](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
19424
|
+
* * [[Example 2: Create distance measurements with mouse](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
19425
|
+
* * [[Example 3: Configuring units and scale](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_unitsAndScale)
|
|
19429
19426
|
*
|
|
19430
19427
|
* ## Overview
|
|
19431
19428
|
*
|
|
@@ -19445,7 +19442,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
19445
19442
|
* Note how each DistanceMeasurement has ````origin```` and ````target```` endpoints, which each indicate a 3D World-space
|
|
19446
19443
|
* position on the surface of an {@link Entity}. The endpoints can be attached to the same Entity, or to different Entitys.
|
|
19447
19444
|
*
|
|
19448
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/
|
|
19445
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_modelWithMeasurements)]
|
|
19449
19446
|
*
|
|
19450
19447
|
* ````JavaScript
|
|
19451
19448
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin} from "xeokit-sdk.es.js";
|
|
@@ -19510,7 +19507,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
19510
19507
|
* The DistanceMeasurementsMouseControl will then wait for the next click on any Entity, to begin constructing
|
|
19511
19508
|
* another DistanceMeasurement, and so on, until deactivated again.
|
|
19512
19509
|
*
|
|
19513
|
-
* [[Run example](/examples/measurement/#
|
|
19510
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/measurement/#distance_createWithMouse_snapping)]
|
|
19514
19511
|
*
|
|
19515
19512
|
* ````JavaScript
|
|
19516
19513
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -19548,7 +19545,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
19548
19545
|
*
|
|
19549
19546
|
* 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.
|
|
19550
19547
|
*
|
|
19551
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
19548
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_unitsAndScale)]
|
|
19552
19549
|
*
|
|
19553
19550
|
* ````JavaScript
|
|
19554
19551
|
* const metrics = viewer.scene.metrics;
|
|
@@ -19562,7 +19559,7 @@ this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.s
|
|
|
19562
19559
|
* In our fourth example, we'll attach event handlers to our plugin, to catch when the user
|
|
19563
19560
|
* hovers or right-clicks over our measurements.
|
|
19564
19561
|
*
|
|
19565
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
19562
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#measurements_distance_modelWithMeasurements)]
|
|
19566
19563
|
*
|
|
19567
19564
|
* ````javascript
|
|
19568
19565
|
* import {Viewer, XKTLoaderPlugin, DistanceMeasurementsPlugin, DistanceMeasurementsMouseControl, PointerLens} from "xeokit-sdk.es.js";
|
|
@@ -19853,7 +19850,7 @@ return;}if(_this89.pointerLens){_this89.pointerLens.canvasPos=touchMoveCanvasPos
|
|
|
19853
19850
|
* {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching
|
|
19854
19851
|
* the Viewer to faster, lower-quality rendering modes whenever we interact.
|
|
19855
19852
|
*
|
|
19856
|
-
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
19853
|
+
* [<img src="https://xeokit.io/img/docs/FastNavPlugin/FastNavPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)
|
|
19857
19854
|
*
|
|
19858
19855
|
* FastNavPlugin works by hiding specified Viewer rendering features, and optionally scaling the Viewer's canvas
|
|
19859
19856
|
* resolution, whenever we interact with the Viewer. Then, once we've finished interacting, FastNavPlugin restores those
|
|
@@ -19887,7 +19884,7 @@ return;}if(_this89.pointerLens){_this89.pointerLens.canvasPos=touchMoveCanvasPos
|
|
|
19887
19884
|
* 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
|
|
19888
19885
|
* to expensive, high-quality SAO settings, that we wouldn't normally configure for an interactive SAO effect.
|
|
19889
19886
|
*
|
|
19890
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
19887
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#performance_FastNavPlugin)]
|
|
19891
19888
|
*
|
|
19892
19889
|
* ````javascript
|
|
19893
19890
|
* import {Viewer, XKTLoaderPlugin, FastNavPlugin} from "xeokit-sdk.es.js";
|
|
@@ -20179,7 +20176,7 @@ var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window.
|
|
|
20179
20176
|
* If we didn't provide that particular translation in our LocaleService, or any translations for that locale,
|
|
20180
20177
|
* then the NavCubePlugin will just fall back on its own default hard-coded translation, which in this case is "BACK".
|
|
20181
20178
|
*
|
|
20182
|
-
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
20179
|
+
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#localization_NavCubePlugin)]
|
|
20183
20180
|
*
|
|
20184
20181
|
* ````javascript
|
|
20185
20182
|
* import {Viewer, LocaleService, NavCubePlugin, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -20645,7 +20642,7 @@ comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1;}else if(compa
|
|
|
20645
20642
|
*
|
|
20646
20643
|
* Let's transition the Camera to orthographic projection:
|
|
20647
20644
|
*
|
|
20648
|
-
* [[Run example](/examples
|
|
20645
|
+
* [[Run example](/examples/index.html#camera_CameraFlightAnimation_projection)]
|
|
20649
20646
|
*
|
|
20650
20647
|
* ````Javascript
|
|
20651
20648
|
* viewer.cameraFlight.flyTo({ projection: "ortho", () => {
|
|
@@ -20801,7 +20798,7 @@ t/=d;return-c*t*(t-2)+b;}},{key:"_easeInCubic",value:function _easeInCubic(t,b,c
|
|
|
20801
20798
|
* In the example below, we'll load a model using a {@link GLTFLoaderPlugin}, then animate a {@link Camera}
|
|
20802
20799
|
* through the frames in a {@link CameraPath}.
|
|
20803
20800
|
*
|
|
20804
|
-
* * [[Run this example](/examples
|
|
20801
|
+
* * [[Run this example](/examples/index.html#camera_CameraPathAnimation)]
|
|
20805
20802
|
*
|
|
20806
20803
|
* ````Javascript
|
|
20807
20804
|
* import {Viewer, GLTFLoaderPlugin, CameraPath, CameraPathAnimation} from "xeokit-sdk.es.js";
|
|
@@ -20934,9 +20931,9 @@ t/=d;return-c*t*(t-2)+b;}},{key:"_easeInCubic",value:function _easeInCubic(t,b,c
|
|
|
20934
20931
|
*
|
|
20935
20932
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanGoogleSatMapMed.png">
|
|
20936
20933
|
*
|
|
20937
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](/examples/#ImagePlane_groundPlane)
|
|
20934
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)
|
|
20938
20935
|
*
|
|
20939
|
-
* [[Run this example](/examples/#ImagePlane_groundPlane)]
|
|
20936
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_groundPlane)]
|
|
20940
20937
|
*
|
|
20941
20938
|
* ````javascript
|
|
20942
20939
|
* import {Viewer, ImagePlane, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -20984,9 +20981,9 @@ t/=d;return-c*t*(t-2)+b;}},{key:"_easeInCubic",value:function _easeInCubic(t,b,c
|
|
|
20984
20981
|
*
|
|
20985
20982
|
* <img src="http://xeokit.io/img/docs/ImagePlane/schependomlaanPlanViewMed.png">
|
|
20986
20983
|
*
|
|
20987
|
-
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](/examples/#ImagePlane_imageInSectionPlane)
|
|
20984
|
+
* [<img src="http://xeokit.io/img/docs/ImagePlane/ImagePlane_planView.png">](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)
|
|
20988
20985
|
*
|
|
20989
|
-
* [[Run this example](/examples/#ImagePlane_imageInSectionPlane)]
|
|
20986
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/scenegraph/#ImagePlane_imageInSectionPlane)]
|
|
20990
20987
|
*
|
|
20991
20988
|
* ````javascript
|
|
20992
20989
|
* import {Viewer, XKTLoaderPlugin, SectionPlanesPlugin, ImagePlane} from "xeokit-sdk.es.js";
|
|
@@ -21217,7 +21214,7 @@ t/=d;return-c*t*(t-2)+b;}},{key:"_easeInCubic",value:function _easeInCubic(t,b,c
|
|
|
21217
21214
|
*
|
|
21218
21215
|
* In the example below we'll replace the {@link Scene}'s default light sources with three World-space PointLights.
|
|
21219
21216
|
*
|
|
21220
|
-
* [[Run this example](/examples
|
|
21217
|
+
* [[Run this example](/examples/index.html#lights_PointLight_world)]
|
|
21221
21218
|
*
|
|
21222
21219
|
* ````javascript
|
|
21223
21220
|
* import {Viewer, Mesh, buildSphereGeometry, buildPlaneGeometry,
|
|
@@ -21538,7 +21535,7 @@ if(this._src){this._loadSrc(this._src);}}},{key:"_loadSrc",value:function _loadS
|
|
|
21538
21535
|
*
|
|
21539
21536
|
* ## Usage
|
|
21540
21537
|
*
|
|
21541
|
-
* [[Run this example](/examples
|
|
21538
|
+
* [[Run this example](/examples/index.html#markers_SpriteMarker)]
|
|
21542
21539
|
*
|
|
21543
21540
|
* ```` javascript
|
|
21544
21541
|
* import {Viewer, SpriteMarker } from "./https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/xeokit-sdk.es.min.js";
|
|
@@ -22530,12 +22527,12 @@ getCanvasPosFromEvent(changedTouches[0],pickController.pickCursorPos);pickContro
|
|
|
22530
22527
|
*
|
|
22531
22528
|
* # Examples
|
|
22532
22529
|
*
|
|
22533
|
-
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
22534
|
-
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
22535
|
-
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
22536
|
-
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
22537
|
-
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples
|
|
22538
|
-
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples
|
|
22530
|
+
* * [Orbit Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_Duplex)
|
|
22531
|
+
* * [Orbit Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_orbit_HolterTower)
|
|
22532
|
+
* * [First-Person Navigation - Duplex Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_Duplex)
|
|
22533
|
+
* * [First-Person Navigation - Holter Tower Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_firstPerson_HolterTower)
|
|
22534
|
+
* * [Plan-view Navigation - Schependomlaan Model](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_planView_Schependomlaan)
|
|
22535
|
+
* * [Custom Keyboard Mapping](https://xeokit.github.io/xeokit-sdk/examples/index.html#CameraControl_keyMap)
|
|
22539
22536
|
* <br><br>
|
|
22540
22537
|
*
|
|
22541
22538
|
* # Orbit Mode
|
|
@@ -23811,7 +23808,7 @@ if(metaModelData.propertySets){for(var _i480=0,_len96=metaModelData.propertySets
|
|
|
23811
23808
|
*
|
|
23812
23809
|
* * Located in {@link Viewer#metaScene}.
|
|
23813
23810
|
* * Contains {@link MetaModel}s and {@link MetaObject}s.
|
|
23814
|
-
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples
|
|
23811
|
+
* * [Scene graph example with metadata](http://xeokit.github.io/xeokit-sdk/examples/index.html#sceneRepresentation_SceneGraph_metadata)
|
|
23815
23812
|
*/var MetaScene=/*#__PURE__*/function(){/**
|
|
23816
23813
|
* @private
|
|
23817
23814
|
*/function MetaScene(viewer,scene){_classCallCheck(this,MetaScene);/**
|
|
@@ -24777,9 +24774,9 @@ id:id,isObject:true// Registers the Entity in Scene#objects
|
|
|
24777
24774
|
for(var i=0,len=areas.length;i<len;i++){var _area3=areas[i];var boundaries=_area3.boundaries;for(var j=0,lenj=boundaries.length;j<lenj;j++){var boundary=boundaries[j];if(s>=boundary[0]*scale&&s<=(boundary[0]+boundary[2])*scale&&t>=boundary[1]*scale&&t<=(boundary[1]+boundary[3])*scale){return i;}}}return-1;};this.setAreaHighlighted=function(areaId,highlighted){var area=areas[areaId];if(!area){throw"Area not found: "+areaId;}area.highlighted=!!highlighted;paint();};this.getAreaDir=function(areaId){var area=areas[areaId];if(!area){throw"Unknown area: "+areaId;}return area.dir;};this.getAreaUp=function(areaId){var area=areas[areaId];if(!area){throw"Unknown area: "+areaId;}return area.up;};this.getImage=function(){return this._textureCanvas;};this.destroy=function(){if(this._textureCanvas){this._textureCanvas.parentNode.removeChild(this._textureCanvas);this._textureCanvas=null;}};}var tempVec3a$4=math.vec3();var tempVec3b$1=math.vec3();math.mat4();/**
|
|
24778
24775
|
* {@link Viewer} plugin that lets us look at the entire {@link Scene} from along a chosen axis or diagonal.
|
|
24779
24776
|
*
|
|
24780
|
-
* [<img src="https://user-images.githubusercontent.com/83100/55674490-c93c2e00-58b5-11e9-8a28-eb08876947c0.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
24777
|
+
* [<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)
|
|
24781
24778
|
*
|
|
24782
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
24779
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_NavCubePlugin)]
|
|
24783
24780
|
*
|
|
24784
24781
|
* ## Overview
|
|
24785
24782
|
*
|
|
@@ -25068,7 +25065,7 @@ console.warn('loadFile: HTTP Status 0 received.');if(ok){ok(response);}}else{if(
|
|
|
25068
25065
|
*
|
|
25069
25066
|
* ## Usage
|
|
25070
25067
|
*
|
|
25071
|
-
* [[Run this example](/examples/#
|
|
25068
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/cad/#OBJ_SportsCar_ExplodeModel)]
|
|
25072
25069
|
*
|
|
25073
25070
|
* ````javascript
|
|
25074
25071
|
* import {Viewer, OBJLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -25304,9 +25301,9 @@ this.setVisible(cfg.overviewVisible);}/** Called by SectionPlanesPlugin#createSe
|
|
|
25304
25301
|
*/},{key:"destroy",value:function destroy(){this._viewer.camera.off(this._onViewerCameraMatrix);this._viewer.camera.off(this._onViewerCameraWorldAxis);this._viewer.camera.perspective.off(this._onViewerCameraFOV);this._scene.input.off(this._onInputMouseMove);this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp);this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut);this._scene.destroy();}}]);return Overview$1;}();var tempAABB$1=math.AABB3();var tempVec3$1=math.vec3();/**
|
|
25305
25302
|
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
25306
25303
|
*
|
|
25307
|
-
* [<img src="https://user-images.githubusercontent.com/83100/57724962-406e9a00-768c-11e9-9f1f-3d178a3ec11f.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
25304
|
+
* [<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)
|
|
25308
25305
|
*
|
|
25309
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
25306
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_SectionPlanesPlugin)]
|
|
25310
25307
|
*
|
|
25311
25308
|
* ## Overview
|
|
25312
25309
|
*
|
|
@@ -25996,9 +25993,9 @@ this.setVisible(cfg.overviewVisible);}/** Called by SectionPlanesPlugin#createSe
|
|
|
25996
25993
|
*/},{key:"destroy",value:function destroy(){this._viewer.camera.off(this._onViewerCameraMatrix);this._viewer.camera.off(this._onViewerCameraWorldAxis);this._viewer.camera.perspective.off(this._onViewerCameraFOV);this._scene.input.off(this._onInputMouseMove);this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp);this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut);this._scene.destroy();}}]);return Overview;}();var tempAABB=math.AABB3();var tempVec3=math.vec3();/**
|
|
25997
25994
|
* FaceAlignedSectionPlanesPlugin is a {@link Viewer} plugin that creates and edits face-aligned {@link SectionPlane}s.
|
|
25998
25995
|
*
|
|
25999
|
-
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples
|
|
25996
|
+
* [<img src="https://xeokit.github.io/xeokit-sdk/assets/images/FaceAlignedSectionPlanesPlugin.gif">](https://xeokit.github.io/xeokit-sdk/examples/index.html#gizmos_FaceAlignedSectionPlanesPlugin)
|
|
26000
25997
|
*
|
|
26001
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
25998
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/slicing/#FaceAlignedSectionPlanesPlugin)]
|
|
26002
25999
|
*
|
|
26003
26000
|
* ## Overview
|
|
26004
26001
|
*
|
|
@@ -26295,7 +26292,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26295
26292
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
26296
26293
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
26297
26294
|
*
|
|
26298
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26295
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_SpurGear)]
|
|
26299
26296
|
*
|
|
26300
26297
|
* ````javascript
|
|
26301
26298
|
* // Create a xeokit Viewer
|
|
@@ -26340,7 +26337,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26340
26337
|
* file data straight into the {@link STLLoaderPlugin#load} method. In the example below, to show how it's done, we'll pre-load
|
|
26341
26338
|
* our STL file data, then pass it straight into that method.
|
|
26342
26339
|
*
|
|
26343
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26340
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataAsParam)]
|
|
26344
26341
|
*
|
|
26345
26342
|
* ````javascript
|
|
26346
26343
|
* loadSTL("./models/stl/binary/spurGear.stl", (stlData) =>{
|
|
@@ -26383,7 +26380,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26383
26380
|
* custom data source object, through which it can load STL files. For this example, our data source just loads
|
|
26384
26381
|
* them via HTTP, for simplicity. Once we've created the STLLoaderPlugin, we'll load our STL file as before.
|
|
26385
26382
|
*
|
|
26386
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26383
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_STL_dataSource)]
|
|
26387
26384
|
*
|
|
26388
26385
|
* ````javascript
|
|
26389
26386
|
* // Our custom STL data access strategy - implementation happens to be the same as STLDefaultDataSource
|
|
@@ -26483,9 +26480,9 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26483
26480
|
* @desc A {@link Viewer} plugin that provides an HTML tree view to navigate the IFC elements in models.
|
|
26484
26481
|
* <br>
|
|
26485
26482
|
*
|
|
26486
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
26483
|
+
* <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>
|
|
26487
26484
|
*
|
|
26488
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26485
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_WestRiverSideHospital)]
|
|
26489
26486
|
*
|
|
26490
26487
|
* ## Overview
|
|
26491
26488
|
*
|
|
@@ -26509,7 +26506,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26509
26506
|
* Then we'll use an {@link XKTLoaderPlugin} to load the Schependomlaan model from an
|
|
26510
26507
|
* [.xkt file](https://github.com/xeokit/xeokit-sdk/tree/master/examples/models/xkt/schependomlaan).
|
|
26511
26508
|
*
|
|
26512
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
26509
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/navigation/#TreeViewPlugin_Containment)]
|
|
26513
26510
|
*
|
|
26514
26511
|
* ````javascript
|
|
26515
26512
|
* import {Viewer, XKTLoaderPlugin, TreeViewPlugin} from "xeokit-sdk.es.js";
|
|
@@ -26691,7 +26688,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26691
26688
|
*
|
|
26692
26689
|
* Let's use {@link ContextMenu} to show a simple context menu for the node we clicked.
|
|
26693
26690
|
*
|
|
26694
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26691
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
26695
26692
|
*
|
|
26696
26693
|
* ````javascript
|
|
26697
26694
|
* import {ContextMenu} from "../src/extras/ContextMenu/ContextMenu.js";
|
|
@@ -26782,7 +26779,7 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m
|
|
|
26782
26779
|
* Let's register a callback to isolate and fit-to-view the {@link Entity}(s) represented by the node. This callback is
|
|
26783
26780
|
* 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.
|
|
26784
26781
|
*
|
|
26785
|
-
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples
|
|
26782
|
+
* [[Run an example](https://xeokit.github.io/xeokit-sdk/examples/index.html#ContextMenu_Canvas_TreeViewPlugin_Custom)]
|
|
26786
26783
|
*
|
|
26787
26784
|
* ````javascript
|
|
26788
26785
|
* treeView.on("nodeTitleClicked", (e) => {
|
|
@@ -27239,9 +27236,9 @@ var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryA
|
|
|
27239
27236
|
var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName=void 0;var _geometryPositions4=void 0;var geometryNormals=void 0;var geometryUVs=void 0;var geometryColors=void 0;var geometryIndices=void 0;var geometryEdgeIndices=void 0;var _geometryValid3=false;switch(_primitiveType4){case 0:primitiveName="solid";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex4],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0;break;case 3:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 4:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=lineStripToLines(_geometryPositions4,indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]));_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid3){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,textureSetId:_textureSetId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions4,normalsCompressed:geometryNormals,uv:geometryUVs&&geometryUVs.length>0?geometryUVs:null,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}function lineStripToLines(positions,indices){var linesIndices=[];if(indices.length>1){for(var _i564=0,len=indices.length-1;_i564<len;_i564++){linesIndices.push(indices[_i564]);linesIndices.push(indices[_i564+1]);}}else if(positions.length>1){for(var _i565=0,_len117=positions.length/3-1;_i565<_len117;_i565++){linesIndices.push(_i565);linesIndices.push(_i565+1);}}return linesIndices;}/** @private */var ParserV10={version:10,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract(elements);var inflatedData=inflate(deflatedData);load(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};var parsers={};parsers[ParserV1.version]=ParserV1;parsers[ParserV2.version]=ParserV2;parsers[ParserV3.version]=ParserV3;parsers[ParserV4.version]=ParserV4;parsers[ParserV5.version]=ParserV5;parsers[ParserV6.version]=ParserV6;parsers[ParserV7.version]=ParserV7;parsers[ParserV8.version]=ParserV8;parsers[ParserV9.version]=ParserV9;parsers[ParserV10.version]=ParserV10;/**
|
|
27240
27237
|
* {@link Viewer} plugin that loads models from xeokit's optimized *````.XKT````* format.
|
|
27241
27238
|
*
|
|
27242
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
27239
|
+
* <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>
|
|
27243
27240
|
*
|
|
27244
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
27241
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_XKT_OTCConferenceCenter)]
|
|
27245
27242
|
*
|
|
27246
27243
|
* # Overview
|
|
27247
27244
|
*
|
|
@@ -27297,7 +27294,7 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27297
27294
|
*
|
|
27298
27295
|
* 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).
|
|
27299
27296
|
*
|
|
27300
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
27297
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_XKT_metadata_Schependomlaan)]
|
|
27301
27298
|
*
|
|
27302
27299
|
* ````javascript
|
|
27303
27300
|
* import {Viewer, XKTLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -27384,9 +27381,9 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27384
27381
|
* KTX2TextureTranscoder altogether, and let the XKTLoaderPlugin use its internal default KTX2TextureTranscoder, which is configured to
|
|
27385
27382
|
* 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.
|
|
27386
27383
|
*
|
|
27387
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples/#
|
|
27384
|
+
* <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>
|
|
27388
27385
|
*
|
|
27389
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/#
|
|
27386
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_vbo_textures_HousePlan)]
|
|
27390
27387
|
*
|
|
27391
27388
|
* ````javascript
|
|
27392
27389
|
* const viewer = new Viewer({
|
|
@@ -27422,8 +27419,6 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27422
27419
|
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
27423
27420
|
* translate it 100 units along its X axis.
|
|
27424
27421
|
*
|
|
27425
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_Duplex_transform)]
|
|
27426
|
-
*
|
|
27427
27422
|
* ````javascript
|
|
27428
27423
|
* xktLoader.load({
|
|
27429
27424
|
* src: "./models/xkt/Duplex.ifc.xkt",
|
|
@@ -27439,8 +27434,6 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27439
27434
|
*
|
|
27440
27435
|
* In the example below, we'll load only the objects that represent walls.
|
|
27441
27436
|
*
|
|
27442
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_includeTypes)]
|
|
27443
|
-
*
|
|
27444
27437
|
* ````javascript
|
|
27445
27438
|
* const model2 = xktLoader.load({
|
|
27446
27439
|
* id: "myModel2",
|
|
@@ -27453,8 +27446,6 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27453
27446
|
*
|
|
27454
27447
|
* In the example below, we'll load only the objects that do not represent empty space.
|
|
27455
27448
|
*
|
|
27456
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_excludeTypes)]
|
|
27457
|
-
*
|
|
27458
27449
|
* ````javascript
|
|
27459
27450
|
* const model3 = xktLoader.load({
|
|
27460
27451
|
* id: "myModel3",
|
|
@@ -27476,8 +27467,6 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27476
27467
|
* In the example below, we'll load a model, while configuring ````IfcSpace```` elements to be always initially invisible,
|
|
27477
27468
|
* and ````IfcWindow```` types to be always translucent blue.
|
|
27478
27469
|
*
|
|
27479
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_XKT_objectDefaults)]
|
|
27480
|
-
*
|
|
27481
27470
|
* ````javascript
|
|
27482
27471
|
* const myObjectDefaults = {
|
|
27483
27472
|
*
|
|
@@ -27538,8 +27527,6 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27538
27527
|
* In the example below, we'll customize the way XKTLoaderPlugin loads the files by configuring it with our own data source
|
|
27539
27528
|
* object. For simplicity, our custom data source example also uses HTTP, using a couple of xeokit utility functions.
|
|
27540
27529
|
*
|
|
27541
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_XKT_dataSource)]
|
|
27542
|
-
*
|
|
27543
27530
|
* ````javascript
|
|
27544
27531
|
* import {utils} from "xeokit-sdk.es.js";
|
|
27545
27532
|
*
|
|
@@ -27590,7 +27577,7 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27590
27577
|
*
|
|
27591
27578
|
* As shown in the example below, we do this by setting {@link XKTLoaderPlugin#globalizeObjectIds} ````true```` before we load our models.
|
|
27592
27579
|
*
|
|
27593
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
27580
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#TreeViewPlugin_Containment_MultipleModels)]
|
|
27594
27581
|
*
|
|
27595
27582
|
* ````javascript
|
|
27596
27583
|
* xktLoader.globalizeObjectIds = true;
|
|
@@ -27696,6 +27683,8 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName
|
|
|
27696
27683
|
* Now, to load all those XKT files into a single SceneModel and MetaModel in one operation, we pass a path to the XKT
|
|
27697
27684
|
* manifest to `XKTLoaderPlugin.load`, as shown in the example below:
|
|
27698
27685
|
*
|
|
27686
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/buildings/#xkt_manifest_KarhumakiBridge)]
|
|
27687
|
+
*
|
|
27699
27688
|
* ````javascript
|
|
27700
27689
|
* import {
|
|
27701
27690
|
* Viewer,
|
|
@@ -28184,9 +28173,9 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28184
28173
|
});};};function loadZIP(src,ok,err){var zip=new ZIP();zip.load(src,function(){ok(zip);},function(errMsg){err("Error loading ZIP archive: "+errMsg);});}function stripURN(str){var subStr="urn:3DXML:";return str.indexOf(subStr)===0?str.substring(subStr.length):str;}function getIDFromURI(str){var hashIdx=str.lastIndexOf("#");return hashIdx!==-1?str.substring(hashIdx+1):str;}/**
|
|
28185
28174
|
* {@link Viewer} plugin that loads models from [3DXML](https://en.wikipedia.org/wiki/3DXML) files.
|
|
28186
28175
|
*
|
|
28187
|
-
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples
|
|
28176
|
+
* [<img src="https://xeokit.io/img/docs/XML3DLoaderPlugin/XML3DPluginTreeView.png">](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)
|
|
28188
28177
|
*
|
|
28189
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28178
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
28190
28179
|
*
|
|
28191
28180
|
* ## Overview
|
|
28192
28181
|
*
|
|
@@ -28210,7 +28199,7 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28210
28199
|
* we'll use the {@link CameraFlightAnimation} to fly the {@link Camera} to look at boundary of the model. We'll
|
|
28211
28200
|
* then get the model's {@link Entity} from the {@link Scene} and highlight the whole model.
|
|
28212
28201
|
*
|
|
28213
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28202
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_Widget)]
|
|
28214
28203
|
*
|
|
28215
28204
|
* ````javascript
|
|
28216
28205
|
* // Create a xeokit Viewer
|
|
@@ -28301,7 +28290,7 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28301
28290
|
* does not make sense because XML3DLoaderPlugin will set each {@link MetaObject#type} to "Default", and "storeys"
|
|
28302
28291
|
* does not make sense because that requires some of the MetaObject#type values to be "IfcBuildingStorey".
|
|
28303
28292
|
*
|
|
28304
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28293
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_TreeView)]
|
|
28305
28294
|
*
|
|
28306
28295
|
* ## Material Type
|
|
28307
28296
|
*
|
|
@@ -28311,9 +28300,9 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28311
28300
|
*
|
|
28312
28301
|
* | Material Type | Material Components Loaded | Description | Example |
|
|
28313
28302
|
* |:--------:|:----:|:-----:|:-----:|
|
|
28314
|
-
* | "PhongMaterial" (default) | {@link PhongMaterial} | Non-physically-correct Blinn-Phong shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28315
|
-
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28316
|
-
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28303
|
+
* | "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) |
|
|
28304
|
+
* | "MetallicMaterial" | {@link MetallicMaterial} | Physically-accurate specular-glossiness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Metallic) |
|
|
28305
|
+
* | "SpecularMaterial" | {@link SpecularMaterial} | Physically-accurate metallic-roughness shading model | [Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular) |
|
|
28317
28306
|
*
|
|
28318
28307
|
* <br>
|
|
28319
28308
|
* Let's load our model again, this time converting the 3DXML Blinn-Phong materials to {@link SpecularMaterial}s:
|
|
@@ -28326,7 +28315,7 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28326
28315
|
* });
|
|
28327
28316
|
* ````
|
|
28328
28317
|
*
|
|
28329
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28318
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_3DXML_materialType_Specular)]
|
|
28330
28319
|
*
|
|
28331
28320
|
* @class XML3DLoaderPlugin
|
|
28332
28321
|
*/var XML3DLoaderPlugin=/*#__PURE__*/function(_Plugin18){_inherits(XML3DLoaderPlugin,_Plugin18);var _super161=_createSuper(XML3DLoaderPlugin);/**
|
|
@@ -28376,9 +28365,9 @@ var json=xmlToJSON(xmlDoc,{});ok(xmlDoc,json);});};function xmlToJSON(node,attri
|
|
|
28376
28365
|
var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window.decodeURIComponent(data);if(isBase64){data=window.atob(data);}try{var buffer=new ArrayBuffer(data.length);var view=new Uint8Array(buffer);for(var i=0;i<data.length;i++){view[i]=data.charCodeAt(i);}ok(buffer);}catch(errMsg){error(errMsg);}}else{var request=new XMLHttpRequest();request.open('GET',src,true);request.responseType='arraybuffer';request.onreadystatechange=function(){if(request.readyState===4){if(request.status===200){ok(request.response);}else{error('getXKT error : '+request.response);}}};request.send(null);}}}]);return WebIFCDefaultDataSource;}();/**
|
|
28377
28366
|
* {@link Viewer} plugin that uses [web-ifc](https://github.com/tomvandig/web-ifc) to load BIM models directly from IFC files.
|
|
28378
28367
|
*
|
|
28379
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
28368
|
+
* <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>
|
|
28380
28369
|
*
|
|
28381
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28370
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_Duplex)]
|
|
28382
28371
|
*
|
|
28383
28372
|
* ## Overview
|
|
28384
28373
|
*
|
|
@@ -28422,7 +28411,7 @@ var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window.
|
|
|
28422
28411
|
* Since this model contains IFC types, the WebIFCLoaderPlugin will set the initial appearance of each object
|
|
28423
28412
|
* {@link Entity} according to its IFC type in {@link WebIFCLoaderPlugin#objectDefaults}.
|
|
28424
28413
|
*
|
|
28425
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28414
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#BIMOffline_WebIFCLoaderPlugin_isolateStorey)]
|
|
28426
28415
|
*
|
|
28427
28416
|
* ````javascript
|
|
28428
28417
|
* import {Viewer, WebIFCLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -28889,9 +28878,9 @@ var headerBlockItems=[{item:'FileSignature',format:'char',size:4},{item:'FileSou
|
|
|
28889
28878
|
/**
|
|
28890
28879
|
* {@link Viewer} plugin that loads lidar point cloud geometry from LAS files.
|
|
28891
28880
|
*
|
|
28892
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
28881
|
+
* <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>
|
|
28893
28882
|
*
|
|
28894
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28883
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
28895
28884
|
*
|
|
28896
28885
|
* ## Summary
|
|
28897
28886
|
*
|
|
@@ -28930,7 +28919,7 @@ var headerBlockItems=[{item:'FileSignature',format:'char',size:4},{item:'FileSou
|
|
|
28930
28919
|
* a [LAS file](/assets/models/las/). Once the model has
|
|
28931
28920
|
* loaded, we'll then find its {@link MetaModel}, and the {@link MetaObject} and {@link Entity} that represent its point cloud.
|
|
28932
28921
|
*
|
|
28933
|
-
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
28922
|
+
* * [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_LASLoaderPlugin_Autzen)]
|
|
28934
28923
|
*
|
|
28935
28924
|
* ````javascript
|
|
28936
28925
|
* import {Viewer, LASLoaderPlugin} from "xeokit-sdk.es.js";
|
|
@@ -29214,9 +29203,9 @@ earcut.deviation=function(data,holeIndices,dim,triangles){var hasHoles=holeIndic
|
|
|
29214
29203
|
earcut.flatten=function(data){var dim=data[0][0].length,result={vertices:[],holes:[],dimensions:dim},holeIndex=0;for(var i=0;i<data.length;i++){for(var j=0;j<data[i].length;j++){for(var d=0;d<dim;d++){result.vertices.push(data[i][j][d]);}}if(i>0){holeIndex+=data[i-1].length;result.holes.push(holeIndex);}}return result;};var tempVec2a=math.vec2();var tempVec3a=math.vec3();var tempVec3b=math.vec3();var tempVec3c=math.vec3();/**
|
|
29215
29204
|
* {@link Viewer} plugin that loads models from CityJSON files.
|
|
29216
29205
|
*
|
|
29217
|
-
* <a href="https://xeokit.github.io/xeokit-sdk/examples
|
|
29206
|
+
* <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>
|
|
29218
29207
|
*
|
|
29219
|
-
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples
|
|
29208
|
+
* [[Run this example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
29220
29209
|
*
|
|
29221
29210
|
* ## Overview
|
|
29222
29211
|
*
|
|
@@ -29256,7 +29245,7 @@ earcut.flatten=function(data){var dim=data[0][0].length,result={vertices:[],hole
|
|
|
29256
29245
|
* We'll also scale our model to half its size, rotate it 90 degrees about its local X-axis, then
|
|
29257
29246
|
* translate it 100 units along its X axis.
|
|
29258
29247
|
*
|
|
29259
|
-
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples
|
|
29248
|
+
* * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/index.html#loading_CityJSONLoaderPlugin_Railway)]
|
|
29260
29249
|
*
|
|
29261
29250
|
* ````javascript
|
|
29262
29251
|
* import {Viewer, CityJSONLoaderPlugin} from "xeokit-sdk.es.js";
|