@xeokit/xeokit-sdk 2.6.77-slim-rc5 → 2.6.77
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/LICENSE +6 -2
- package/dist/xeokit-sdk.cjs.js +625 -531
- package/dist/xeokit-sdk.es.js +624 -532
- package/dist/xeokit-sdk.es5.js +31998 -31986
- package/dist/xeokit-sdk.min.cjs.js +7 -7
- package/dist/xeokit-sdk.min.es.js +7 -7
- package/dist/xeokit-sdk.min.es5.js +6 -6
- package/package.json +4 -5
- package/src/extras/SphereMap/SphereMap.js +42 -0
- package/src/extras/SphereMap/index.js +1 -0
- package/src/extras/index.js +2 -1
- package/src/plugins/CxConverterIFCLoaderPlugin/CxConverterIFCLoaderPlugin.js +4 -4
- package/src/plugins/GLTFLoaderPlugin/GLTFSceneModelLoader.js +12 -9
- package/src/plugins/SectionPlanesPlugin/SectionPlanesPlugin.js +165 -2
- package/src/plugins/{SectionPlanesPlugin/Control.js → TransformControl/TransformControl.js} +110 -193
- package/src/plugins/TransformControl/index.js +1 -0
- package/src/plugins/index.js +1 -0
- package/src/viewer/scene/camera/Camera.js +21 -1
- package/src/viewer/scene/math/math.js +10 -0
- package/src/viewer/scene/mesh/Mesh.js +11 -1
- package/src/viewer/scene/webgl/Renderer.js +30 -6
- package/types/plugins/DotBIMLoaderPlugin/DotBIMLoaderPlugin.d.ts +2 -9
- package/types/plugins/TransformControl/TransformControl.d.ts +50 -0
- package/types/plugins/TransformControl/index.d.ts +1 -0
- package/types/plugins/index.d.ts +1 -0
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* xeokit-sdk v2.6.77
|
|
3
|
-
* Commit:
|
|
4
|
-
* Built: 2025-
|
|
2
|
+
* xeokit-sdk v2.6.77
|
|
3
|
+
* Commit: dc4203217f3d582aa27f898cc28df7c4ff10effb
|
|
4
|
+
* Built: 2025-06-10T12:09:01.541Z
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
'use strict';
|
|
@@ -1586,6 +1586,16 @@ const math = {
|
|
|
1586
1586
|
return (v1[0] === v2[0] && v1[1] === v2[1] && v1[2] === v2[2]);
|
|
1587
1587
|
},
|
|
1588
1588
|
|
|
1589
|
+
/**
|
|
1590
|
+
* Returns true if the two 4-element vectors are the same.
|
|
1591
|
+
* @param v1
|
|
1592
|
+
* @param v2
|
|
1593
|
+
* @returns {Boolean}
|
|
1594
|
+
*/
|
|
1595
|
+
compareVec4(v1, v2) {
|
|
1596
|
+
return (v1[0] === v2[0] && v1[1] === v2[1] && v1[2] === v2[2] && v1[3] === v2[3]);
|
|
1597
|
+
},
|
|
1598
|
+
|
|
1589
1599
|
/**
|
|
1590
1600
|
* Negates a three-element vector.
|
|
1591
1601
|
* @method negateVec3
|
|
@@ -25273,7 +25283,8 @@ class Mesh extends Component {
|
|
|
25273
25283
|
pickHash: "",
|
|
25274
25284
|
offset: math.vec3(),
|
|
25275
25285
|
origin: null,
|
|
25276
|
-
originHash: null
|
|
25286
|
+
originHash: null,
|
|
25287
|
+
isUI: cfg.isUI
|
|
25277
25288
|
});
|
|
25278
25289
|
|
|
25279
25290
|
this._drawRenderer = null;
|
|
@@ -25625,6 +25636,15 @@ class Mesh extends Component {
|
|
|
25625
25636
|
return this._isObject;
|
|
25626
25637
|
}
|
|
25627
25638
|
|
|
25639
|
+
/**
|
|
25640
|
+
* Returns ````true```` if this Mesh is an UI object.
|
|
25641
|
+
*
|
|
25642
|
+
* @type {Boolean}
|
|
25643
|
+
*/
|
|
25644
|
+
get isUI() {
|
|
25645
|
+
return this._state.isUI;
|
|
25646
|
+
}
|
|
25647
|
+
|
|
25628
25648
|
/**
|
|
25629
25649
|
* Gets the Mesh's World-space 3D axis-aligned bounding box.
|
|
25630
25650
|
*
|
|
@@ -77426,6 +77446,7 @@ const Renderer$1 = function (scene, options) {
|
|
|
77426
77446
|
|
|
77427
77447
|
let postSortDrawableList = [];
|
|
77428
77448
|
let postCullDrawableList = [];
|
|
77449
|
+
let uiDrawableList = [];
|
|
77429
77450
|
|
|
77430
77451
|
let drawableListDirty = true;
|
|
77431
77452
|
let stateSortDirty = true;
|
|
@@ -77666,14 +77687,20 @@ const Renderer$1 = function (scene, options) {
|
|
|
77666
77687
|
|
|
77667
77688
|
function cullDrawableList() {
|
|
77668
77689
|
let lenDrawableList = 0;
|
|
77690
|
+
let lenUiList = 0;
|
|
77669
77691
|
for (let i = 0, len = postSortDrawableList.length; i < len; i++) {
|
|
77670
77692
|
const drawable = postSortDrawableList[i];
|
|
77671
77693
|
drawable.rebuildRenderFlags();
|
|
77672
77694
|
if (!drawable.renderFlags.culled) {
|
|
77673
|
-
|
|
77695
|
+
if (drawable.isUI) {
|
|
77696
|
+
uiDrawableList[lenUiList++] = drawable;
|
|
77697
|
+
} else {
|
|
77698
|
+
postCullDrawableList[lenDrawableList++] = drawable;
|
|
77699
|
+
}
|
|
77674
77700
|
}
|
|
77675
77701
|
}
|
|
77676
77702
|
postCullDrawableList.length = lenDrawableList;
|
|
77703
|
+
uiDrawableList.length = lenUiList;
|
|
77677
77704
|
}
|
|
77678
77705
|
|
|
77679
77706
|
function draw(params) {
|
|
@@ -77905,6 +77932,8 @@ const Renderer$1 = function (scene, options) {
|
|
|
77905
77932
|
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
|
77906
77933
|
}
|
|
77907
77934
|
|
|
77935
|
+
const renderDrawables = function(drawables) {
|
|
77936
|
+
|
|
77908
77937
|
let normalDrawSAOBinLen = 0;
|
|
77909
77938
|
let normalEdgesOpaqueBinLen = 0;
|
|
77910
77939
|
let normalFillTransparentBinLen = 0;
|
|
@@ -77928,10 +77957,9 @@ const Renderer$1 = function (scene, options) {
|
|
|
77928
77957
|
//------------------------------------------------------------------------------------------------------
|
|
77929
77958
|
// Render normal opaque solids, defer others to bins to render after
|
|
77930
77959
|
//------------------------------------------------------------------------------------------------------
|
|
77960
|
+
for (let i = 0, len = drawables.length; i < len; i++) {
|
|
77931
77961
|
|
|
77932
|
-
|
|
77933
|
-
|
|
77934
|
-
drawable = postCullDrawableList[i];
|
|
77962
|
+
drawable = drawables[i];
|
|
77935
77963
|
|
|
77936
77964
|
if (drawable.culled === true || drawable.visible === false) {
|
|
77937
77965
|
continue;
|
|
@@ -78229,6 +78257,14 @@ const Renderer$1 = function (scene, options) {
|
|
|
78229
78257
|
gl.disable(gl.BLEND);
|
|
78230
78258
|
}
|
|
78231
78259
|
|
|
78260
|
+
};
|
|
78261
|
+
|
|
78262
|
+
renderDrawables(postCullDrawableList);
|
|
78263
|
+
if (uiDrawableList.length > 0) {
|
|
78264
|
+
gl.clear(gl.DEPTH_BUFFER_BIT);
|
|
78265
|
+
renderDrawables(uiDrawableList);
|
|
78266
|
+
}
|
|
78267
|
+
|
|
78232
78268
|
const endTime = Date.now();
|
|
78233
78269
|
const frameStats = stats.frame;
|
|
78234
78270
|
|
|
@@ -78434,8 +78470,9 @@ const Renderer$1 = function (scene, options) {
|
|
|
78434
78470
|
const includeEntityIds = params.includeEntityIds;
|
|
78435
78471
|
const excludeEntityIds = params.excludeEntityIds;
|
|
78436
78472
|
|
|
78437
|
-
|
|
78438
|
-
|
|
78473
|
+
const renderDrawables = function(drawables) {
|
|
78474
|
+
for (let i = 0, len = drawables.length; i < len; i++) {
|
|
78475
|
+
const drawable = drawables[i];
|
|
78439
78476
|
if (drawable.culled === true || drawable.visible === false) {
|
|
78440
78477
|
continue;
|
|
78441
78478
|
}
|
|
@@ -78450,6 +78487,13 @@ const Renderer$1 = function (scene, options) {
|
|
|
78450
78487
|
}
|
|
78451
78488
|
drawable.drawPickMesh(frameCtx);
|
|
78452
78489
|
}
|
|
78490
|
+
};
|
|
78491
|
+
|
|
78492
|
+
renderDrawables(postCullDrawableList);
|
|
78493
|
+
if (uiDrawableList.length > 0) {
|
|
78494
|
+
gl.clear(gl.DEPTH_BUFFER_BIT);
|
|
78495
|
+
renderDrawables(uiDrawableList);
|
|
78496
|
+
}
|
|
78453
78497
|
|
|
78454
78498
|
const pix = pickBuffer.read(0, 0);
|
|
78455
78499
|
const pickID = pix[0] + (pix[1] << 8) + (pix[2] << 16) + (pix[3] << 24);
|
|
@@ -81997,6 +82041,7 @@ class Camera extends Component {
|
|
|
81997
82041
|
super(owner, cfg);
|
|
81998
82042
|
|
|
81999
82043
|
this._state = new RenderState({
|
|
82044
|
+
offsetEyeFromLook: true, // TODO: treat as legacy and get rid of at some later point
|
|
82000
82045
|
deviceMatrix: math.mat4(),
|
|
82001
82046
|
hasDeviceMatrix: false, // True when deviceMatrix set to other than identity
|
|
82002
82047
|
matrix: math.mat4(),
|
|
@@ -82057,7 +82102,7 @@ class Camera extends Component {
|
|
|
82057
82102
|
// the front off the view (not a problem with perspective, since objects close enough
|
|
82058
82103
|
// to be clipped by the front plane are usually too big to see anything of their cross-sections).
|
|
82059
82104
|
let eye;
|
|
82060
|
-
if (this.projection === "ortho") {
|
|
82105
|
+
if (this.projection === "ortho" && this._state.offsetEyeFromLook) {
|
|
82061
82106
|
math.subVec3(this._eye, this._look, eyeLookVec);
|
|
82062
82107
|
math.normalizeVec3(eyeLookVec, eyeLookVecNorm);
|
|
82063
82108
|
math.mulVec3Scalar(eyeLookVecNorm, 1000.0, eyeLookOffset);
|
|
@@ -82639,6 +82684,25 @@ class Camera extends Component {
|
|
|
82639
82684
|
return this._project;
|
|
82640
82685
|
}
|
|
82641
82686
|
|
|
82687
|
+
/**
|
|
82688
|
+
* Gets whether to offset the ortho camera's effective eye from its look
|
|
82689
|
+
*
|
|
82690
|
+
* Default value for legacy reasons is ````true````.
|
|
82691
|
+
*/
|
|
82692
|
+
get offsetEyeFromLook() {
|
|
82693
|
+
return this._state.offsetEyeFromLook;
|
|
82694
|
+
}
|
|
82695
|
+
|
|
82696
|
+
/**
|
|
82697
|
+
* Offsets the ortho camera's effective eye from its look
|
|
82698
|
+
*
|
|
82699
|
+
* Default value for legacy reasons is ````true````.
|
|
82700
|
+
*/
|
|
82701
|
+
set offsetEyeFromLook(v) {
|
|
82702
|
+
this._state.offsetEyeFromLook = v;
|
|
82703
|
+
this._needUpdate(0); // Ensure matrix built on next "tick"
|
|
82704
|
+
}
|
|
82705
|
+
|
|
82642
82706
|
/**
|
|
82643
82707
|
* Get the 2D canvas position of a 3D world position.
|
|
82644
82708
|
*
|
|
@@ -98234,7 +98298,7 @@ for (var i = 0; i < chars.length; i++) {
|
|
|
98234
98298
|
var Prepend = 1;
|
|
98235
98299
|
var CR = 2;
|
|
98236
98300
|
var LF = 3;
|
|
98237
|
-
var Control
|
|
98301
|
+
var Control = 4;
|
|
98238
98302
|
var Extend = 5;
|
|
98239
98303
|
var SpacingMark = 7;
|
|
98240
98304
|
var L = 8;
|
|
@@ -98312,11 +98376,11 @@ var _graphemeBreakAtIndex = function (_codePoints, classTypes, index) {
|
|
|
98312
98376
|
return BREAK_NOT_ALLOWED;
|
|
98313
98377
|
}
|
|
98314
98378
|
// GB4 Otherwise, break before and after controls.
|
|
98315
|
-
if (current === CR || current === LF || current === Control
|
|
98379
|
+
if (current === CR || current === LF || current === Control) {
|
|
98316
98380
|
return BREAK_ALLOWED;
|
|
98317
98381
|
}
|
|
98318
98382
|
// GB5
|
|
98319
|
-
if (next === CR || next === LF || next === Control
|
|
98383
|
+
if (next === CR || next === LF || next === Control) {
|
|
98320
98384
|
return BREAK_ALLOWED;
|
|
98321
98385
|
}
|
|
98322
98386
|
// Do not break Hangul syllable sequences.
|
|
@@ -104713,6 +104777,42 @@ function createSkyboxMesh(scene, texture) {
|
|
|
104713
104777
|
});
|
|
104714
104778
|
}
|
|
104715
104779
|
|
|
104780
|
+
/**
|
|
104781
|
+
*
|
|
104782
|
+
* @param {*} scene
|
|
104783
|
+
* @param {Texture} [texture] Texture to be used on the material for SphereMap
|
|
104784
|
+
* @returns {Mesh}
|
|
104785
|
+
*/
|
|
104786
|
+
|
|
104787
|
+
function createSphereMapMesh(scene, texture) {
|
|
104788
|
+
const sphereMapGeometry = new ReadableGeometry(scene, buildSphereGeometry({
|
|
104789
|
+
center: [0, 0, 0],
|
|
104790
|
+
radius: 1,
|
|
104791
|
+
heightSegments: 60,
|
|
104792
|
+
widthSegments: 60
|
|
104793
|
+
}));
|
|
104794
|
+
|
|
104795
|
+
const sphereMapMaterial = new PhongMaterial(scene, {
|
|
104796
|
+
ambient: [0, 0, 0],
|
|
104797
|
+
diffuse: [0, 0, 0],
|
|
104798
|
+
specular: [0, 0, 0],
|
|
104799
|
+
emissive: [1, 1, 1],
|
|
104800
|
+
emissiveMap: texture,
|
|
104801
|
+
backfaces: true
|
|
104802
|
+
});
|
|
104803
|
+
|
|
104804
|
+
return new Mesh(scene, {
|
|
104805
|
+
geometry: sphereMapGeometry,
|
|
104806
|
+
background: true,
|
|
104807
|
+
rotation: [0, 0, 180],
|
|
104808
|
+
material: sphereMapMaterial,
|
|
104809
|
+
visible: true,
|
|
104810
|
+
pickable: false,
|
|
104811
|
+
clippable: false,
|
|
104812
|
+
collidable: false
|
|
104813
|
+
});
|
|
104814
|
+
}
|
|
104815
|
+
|
|
104716
104816
|
const tmpVec3a$1 = math.vec3();
|
|
104717
104817
|
const tmpVec3b$1 = math.vec3();
|
|
104718
104818
|
|
|
@@ -123304,6 +123404,13 @@ class GLTFSceneModelLoader {
|
|
|
123304
123404
|
if (ok) {
|
|
123305
123405
|
ok();
|
|
123306
123406
|
}
|
|
123407
|
+
},
|
|
123408
|
+
function (msg) {
|
|
123409
|
+
sceneModel.error(msg);
|
|
123410
|
+
sceneModel.fire("error", msg);
|
|
123411
|
+
if (error) {
|
|
123412
|
+
error(msg);
|
|
123413
|
+
}
|
|
123307
123414
|
});
|
|
123308
123415
|
}
|
|
123309
123416
|
}
|
|
@@ -123315,7 +123422,7 @@ function loadGLTF(plugin, src, metaModelJSON, options, sceneModel, ok, error) {
|
|
|
123315
123422
|
if (isGLB) {
|
|
123316
123423
|
plugin.dataSource.getGLB(src, (arrayBuffer) => { // OK
|
|
123317
123424
|
options.basePath = getBasePath(src);
|
|
123318
|
-
parseGLTF(plugin, src, arrayBuffer, metaModelJSON, options, sceneModel, ok);
|
|
123425
|
+
parseGLTF(plugin, src, arrayBuffer, metaModelJSON, options, sceneModel, ok, error);
|
|
123319
123426
|
spinner.processes--;
|
|
123320
123427
|
},
|
|
123321
123428
|
(err) => {
|
|
@@ -123325,7 +123432,7 @@ function loadGLTF(plugin, src, metaModelJSON, options, sceneModel, ok, error) {
|
|
|
123325
123432
|
} else {
|
|
123326
123433
|
plugin.dataSource.getGLTF(src, (gltf) => { // OK
|
|
123327
123434
|
options.basePath = getBasePath(src);
|
|
123328
|
-
parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok);
|
|
123435
|
+
parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok, error);
|
|
123329
123436
|
spinner.processes--;
|
|
123330
123437
|
},
|
|
123331
123438
|
(err) => {
|
|
@@ -123340,7 +123447,7 @@ function getBasePath(src) {
|
|
|
123340
123447
|
return (i !== 0) ? src.substring(0, i + 1) : "";
|
|
123341
123448
|
}
|
|
123342
123449
|
|
|
123343
|
-
function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok) {
|
|
123450
|
+
function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok, error) {
|
|
123344
123451
|
const spinner = plugin.viewer.scene.canvas.spinner;
|
|
123345
123452
|
spinner.processes++;
|
|
123346
123453
|
parse$3(gltf, GLTFLoader, {
|
|
@@ -123388,6 +123495,8 @@ function parseGLTF(plugin, src, gltf, metaModelJSON, options, sceneModel, ok) {
|
|
|
123388
123495
|
}
|
|
123389
123496
|
spinner.processes--;
|
|
123390
123497
|
ok();
|
|
123498
|
+
}).catch((err) => {
|
|
123499
|
+
if (error) error(err);
|
|
123391
123500
|
});
|
|
123392
123501
|
}
|
|
123393
123502
|
|
|
@@ -126153,35 +126262,18 @@ class OBJLoaderPlugin extends Plugin {
|
|
|
126153
126262
|
}
|
|
126154
126263
|
|
|
126155
126264
|
/**
|
|
126156
|
-
* Controls a
|
|
126265
|
+
* Controls a transformation with mouse and touch input.
|
|
126157
126266
|
*
|
|
126158
126267
|
* @private
|
|
126159
126268
|
*/
|
|
126160
|
-
class
|
|
126269
|
+
class TransformControl {
|
|
126161
126270
|
|
|
126162
126271
|
/** @private */
|
|
126163
|
-
constructor(
|
|
126164
|
-
|
|
126165
|
-
/**
|
|
126166
|
-
* ID of this Control.
|
|
126167
|
-
*
|
|
126168
|
-
* SectionPlaneControls are mapped by this ID in {@link SectionPlanesPlugin#sectionPlaneControls}.
|
|
126169
|
-
*
|
|
126170
|
-
* @property id
|
|
126171
|
-
* @type {String|Number}
|
|
126172
|
-
*/
|
|
126173
|
-
this.id = null;
|
|
126174
|
-
|
|
126175
|
-
const viewer = plugin.viewer;
|
|
126176
|
-
const camera = viewer.camera;
|
|
126272
|
+
constructor(viewer) {
|
|
126177
126273
|
const cameraControl = viewer.cameraControl;
|
|
126178
126274
|
const scene = viewer.scene;
|
|
126179
126275
|
const canvas = scene.canvas.canvas;
|
|
126180
126276
|
|
|
126181
|
-
this._visible = false;
|
|
126182
|
-
|
|
126183
|
-
let ignoreNextSectionPlaneDirUpdate = false;
|
|
126184
|
-
|
|
126185
126277
|
// Builds the Entities that represent this Control.
|
|
126186
126278
|
const NO_STATE_INHERIT = false;
|
|
126187
126279
|
const arrowLength = 1.0;
|
|
@@ -126195,7 +126287,7 @@ class Control {
|
|
|
126195
126287
|
});
|
|
126196
126288
|
|
|
126197
126289
|
const pos = math.vec3();
|
|
126198
|
-
|
|
126290
|
+
this._setPosition = (function() {
|
|
126199
126291
|
const origin = math.vec3();
|
|
126200
126292
|
const rtcPos = math.vec3();
|
|
126201
126293
|
return function(p) {
|
|
@@ -126206,6 +126298,8 @@ class Control {
|
|
|
126206
126298
|
};
|
|
126207
126299
|
})();
|
|
126208
126300
|
|
|
126301
|
+
this._setQuaternion = q => { rootNode.quaternion = q; };
|
|
126302
|
+
|
|
126209
126303
|
const arrowGeometry = (radiusBottom, height) => new ReadableGeometry(rootNode, buildCylinderGeometry({
|
|
126210
126304
|
radiusTop: 0.001,
|
|
126211
126305
|
radiusBottom: radiusBottom,
|
|
@@ -126293,6 +126387,7 @@ class Control {
|
|
|
126293
126387
|
clippable: false,
|
|
126294
126388
|
backfaces: true,
|
|
126295
126389
|
visible: false,
|
|
126390
|
+
isUI: true,
|
|
126296
126391
|
isObject: false
|
|
126297
126392
|
}), NO_STATE_INHERIT);
|
|
126298
126393
|
|
|
@@ -126305,6 +126400,7 @@ class Control {
|
|
|
126305
126400
|
clippable: false,
|
|
126306
126401
|
backfaces: true,
|
|
126307
126402
|
visible: false,
|
|
126403
|
+
isUI: true,
|
|
126308
126404
|
isObject: false
|
|
126309
126405
|
}), NO_STATE_INHERIT);
|
|
126310
126406
|
|
|
@@ -126316,6 +126412,7 @@ class Control {
|
|
|
126316
126412
|
collidable: true,
|
|
126317
126413
|
clippable: false,
|
|
126318
126414
|
visible: false,
|
|
126415
|
+
isUI: true,
|
|
126319
126416
|
isObject: false
|
|
126320
126417
|
}), NO_STATE_INHERIT);
|
|
126321
126418
|
|
|
@@ -126327,6 +126424,7 @@ class Control {
|
|
|
126327
126424
|
collidable: true,
|
|
126328
126425
|
clippable: false,
|
|
126329
126426
|
visible: false,
|
|
126427
|
+
isUI: true,
|
|
126330
126428
|
isObject: false
|
|
126331
126429
|
}), NO_STATE_INHERIT);
|
|
126332
126430
|
|
|
@@ -126340,6 +126438,7 @@ class Control {
|
|
|
126340
126438
|
collidable: true,
|
|
126341
126439
|
clippable: false,
|
|
126342
126440
|
visible: false,
|
|
126441
|
+
isUI: true,
|
|
126343
126442
|
isObject: false
|
|
126344
126443
|
}), NO_STATE_INHERIT);
|
|
126345
126444
|
|
|
@@ -126359,6 +126458,7 @@ class Control {
|
|
|
126359
126458
|
collidable: true,
|
|
126360
126459
|
clippable: false,
|
|
126361
126460
|
visible: false,
|
|
126461
|
+
isUI: true,
|
|
126362
126462
|
isObject: false
|
|
126363
126463
|
}), NO_STATE_INHERIT);
|
|
126364
126464
|
|
|
@@ -126370,6 +126470,7 @@ class Control {
|
|
|
126370
126470
|
collidable: true,
|
|
126371
126471
|
clippable: false,
|
|
126372
126472
|
visible: false,
|
|
126473
|
+
isUI: true,
|
|
126373
126474
|
isObject: false
|
|
126374
126475
|
}), NO_STATE_INHERIT);
|
|
126375
126476
|
|
|
@@ -126381,6 +126482,7 @@ class Control {
|
|
|
126381
126482
|
collidable: true,
|
|
126382
126483
|
clippable: false,
|
|
126383
126484
|
visible: false,
|
|
126485
|
+
isUI: true,
|
|
126384
126486
|
isObject: false
|
|
126385
126487
|
}), NO_STATE_INHERIT);
|
|
126386
126488
|
|
|
@@ -126392,6 +126494,7 @@ class Control {
|
|
|
126392
126494
|
collidable: true,
|
|
126393
126495
|
clippable: false,
|
|
126394
126496
|
visible: false,
|
|
126497
|
+
isUI: true,
|
|
126395
126498
|
isObject: false
|
|
126396
126499
|
}), NO_STATE_INHERIT);
|
|
126397
126500
|
|
|
@@ -126403,6 +126506,7 @@ class Control {
|
|
|
126403
126506
|
collidable: true,
|
|
126404
126507
|
clippable: false,
|
|
126405
126508
|
visible: false,
|
|
126509
|
+
isUI: true,
|
|
126406
126510
|
isObject: false
|
|
126407
126511
|
}), NO_STATE_INHERIT);
|
|
126408
126512
|
|
|
@@ -126443,9 +126547,9 @@ class Control {
|
|
|
126443
126547
|
return closestPointOnAxis(initCanvasPos, initOffset) && math.subVec3(initOffset, pos, initOffset) && ((canvasPos) => {
|
|
126444
126548
|
if (closestPointOnAxis(canvasPos, tempVec3)) {
|
|
126445
126549
|
math.subVec3(tempVec3, initOffset, tempVec3);
|
|
126446
|
-
|
|
126447
|
-
if (this.
|
|
126448
|
-
this.
|
|
126550
|
+
this._setPosition(tempVec3);
|
|
126551
|
+
if (this._handlers) {
|
|
126552
|
+
this._handlers.onPosition(tempVec3);
|
|
126449
126553
|
}
|
|
126450
126554
|
}
|
|
126451
126555
|
});
|
|
@@ -126456,9 +126560,9 @@ class Control {
|
|
|
126456
126560
|
setActivated: a => hoop.visible = a,
|
|
126457
126561
|
initDragAction: (initCanvasPos) => {
|
|
126458
126562
|
const rotationFromCanvasPos = (function() {
|
|
126459
|
-
const planeCanvasPos = camera.projectWorldPos(pos);
|
|
126563
|
+
const planeCanvasPos = scene.camera.projectWorldPos(pos);
|
|
126460
126564
|
localToWorldVec(rgb, tempVec3);
|
|
126461
|
-
math.transformVec3(camera.normalMatrix, tempVec3, tempVec3);
|
|
126565
|
+
math.transformVec3(scene.camera.normalMatrix, tempVec3, tempVec3);
|
|
126462
126566
|
const axisCoeff = Math.sign(tempVec3[2]);
|
|
126463
126567
|
return (canvasPos) => {
|
|
126464
126568
|
const dx = canvasPos[0] - planeCanvasPos[0];
|
|
@@ -126472,101 +126576,46 @@ class Control {
|
|
|
126472
126576
|
return canvasPos => {
|
|
126473
126577
|
const rotation = rotationFromCanvasPos(canvasPos);
|
|
126474
126578
|
rootNode.rotate(rgb, (rotation - lastRotation) * 180 / Math.PI);
|
|
126475
|
-
if (this.
|
|
126476
|
-
|
|
126477
|
-
this._sectionPlane.quaternion = rootNode.quaternion;
|
|
126579
|
+
if (this._handlers) {
|
|
126580
|
+
this._handlers.onQuaternion(rootNode.quaternion);
|
|
126478
126581
|
}
|
|
126479
126582
|
lastRotation = rotation;
|
|
126480
126583
|
};
|
|
126481
126584
|
}
|
|
126482
126585
|
};
|
|
126483
126586
|
|
|
126587
|
+
let positionActive = false;
|
|
126588
|
+
let rotationActive = false;
|
|
126589
|
+
let visible = false;
|
|
126590
|
+
|
|
126591
|
+
const updatePositionHandle = () => {
|
|
126592
|
+
const v = visible && positionActive;
|
|
126593
|
+
arrowHandle.visible = shaftHandle.visible = arrow.visible = shaft.visible = !!v;
|
|
126594
|
+
if (! v) {
|
|
126595
|
+
bigArrowHead.visible = false;
|
|
126596
|
+
}
|
|
126597
|
+
};
|
|
126598
|
+
const updateRotationHandle = () => {
|
|
126599
|
+
const v = visible && rotationActive;
|
|
126600
|
+
rotateHandle.visible = curve.visible = arrow1.visible = arrow2.visible = !!v;
|
|
126601
|
+
if (! v) {
|
|
126602
|
+
hoop.visible = false;
|
|
126603
|
+
}
|
|
126604
|
+
};
|
|
126605
|
+
|
|
126484
126606
|
return {
|
|
126607
|
+
setPositionActive: (a) => { positionActive = a; updatePositionHandle(); },
|
|
126608
|
+
setRotationActive: (a) => { rotationActive = a; updateRotationHandle(); },
|
|
126485
126609
|
set visible(v) {
|
|
126486
|
-
|
|
126487
|
-
|
|
126488
|
-
|
|
126489
|
-
hoop.visible = v;
|
|
126490
|
-
}
|
|
126491
|
-
},
|
|
126492
|
-
set culled(c) {
|
|
126493
|
-
arrow.culled = arrowHandle.culled = shaft.culled = shaftHandle.culled = curve.culled = rotateHandle.culled = arrow1.culled = arrow2.culled = c;
|
|
126494
|
-
if (! c) {
|
|
126495
|
-
bigArrowHead.culled = c;
|
|
126496
|
-
hoop.culled = c;
|
|
126497
|
-
}
|
|
126610
|
+
visible = v;
|
|
126611
|
+
updatePositionHandle();
|
|
126612
|
+
updateRotationHandle();
|
|
126498
126613
|
}
|
|
126499
126614
|
};
|
|
126500
126615
|
};
|
|
126501
126616
|
|
|
126502
|
-
this._displayMeshes =
|
|
126503
|
-
rootNode.addChild(new Mesh(rootNode, { //
|
|
126504
|
-
geometry: new ReadableGeometry(rootNode, {
|
|
126505
|
-
primitive: "triangles",
|
|
126506
|
-
positions: [
|
|
126507
|
-
0.5, 0.5, 0.0, 0.5, -0.5, 0.0, // 0
|
|
126508
|
-
-0.5, -0.5, 0.0, -0.5, 0.5, 0.0, // 1
|
|
126509
|
-
0.5, 0.5, -0.0, 0.5, -0.5, -0.0, // 2
|
|
126510
|
-
-0.5, -0.5, -0.0, -0.5, 0.5, -0.0 // 3
|
|
126511
|
-
],
|
|
126512
|
-
indices: [0, 1, 2, 2, 3, 0]
|
|
126513
|
-
}),
|
|
126514
|
-
material: new PhongMaterial(rootNode, {
|
|
126515
|
-
emissive: [0, 0.0, 0],
|
|
126516
|
-
diffuse: [0, 0, 0],
|
|
126517
|
-
backfaces: true
|
|
126518
|
-
}),
|
|
126519
|
-
opacity: 0.6,
|
|
126520
|
-
ghosted: true,
|
|
126521
|
-
ghostMaterial: new EmphasisMaterial(rootNode, {
|
|
126522
|
-
edges: false,
|
|
126523
|
-
filled: true,
|
|
126524
|
-
fillColor: [1, 1, 0],
|
|
126525
|
-
edgeColor: [0, 0, 0],
|
|
126526
|
-
fillAlpha: 0.1,
|
|
126527
|
-
backfaces: true
|
|
126528
|
-
}),
|
|
126529
|
-
pickable: false,
|
|
126530
|
-
collidable: true,
|
|
126531
|
-
clippable: false,
|
|
126532
|
-
visible: false,
|
|
126533
|
-
scale: [2.4, 2.4, 1],
|
|
126534
|
-
isObject: false
|
|
126535
|
-
}), NO_STATE_INHERIT),
|
|
126536
|
-
|
|
126537
|
-
rootNode.addChild(new Mesh(rootNode, { // Visible frame
|
|
126538
|
-
geometry: new ReadableGeometry(rootNode, buildTorusGeometry({
|
|
126539
|
-
center: [0, 0, 0],
|
|
126540
|
-
radius: 1.7,
|
|
126541
|
-
tube: tubeRadius * 2,
|
|
126542
|
-
radialSegments: 4,
|
|
126543
|
-
tubeSegments: 4,
|
|
126544
|
-
arc: Math.PI * 2.0
|
|
126545
|
-
})),
|
|
126546
|
-
material: new PhongMaterial(rootNode, {
|
|
126547
|
-
emissive: [0, 0, 0],
|
|
126548
|
-
diffuse: [0, 0, 0],
|
|
126549
|
-
specular: [0, 0, 0],
|
|
126550
|
-
shininess: 0
|
|
126551
|
-
}),
|
|
126552
|
-
//highlighted: true,
|
|
126553
|
-
highlightMaterial: new EmphasisMaterial(rootNode, {
|
|
126554
|
-
edges: false,
|
|
126555
|
-
edgeColor: [0.0, 0.0, 0.0],
|
|
126556
|
-
filled: true,
|
|
126557
|
-
fillColor: [0.8, 0.8, 0.8],
|
|
126558
|
-
fillAlpha: 1.0
|
|
126559
|
-
}),
|
|
126560
|
-
pickable: false,
|
|
126561
|
-
collidable: false,
|
|
126562
|
-
clippable: false,
|
|
126563
|
-
visible: false,
|
|
126564
|
-
scale: [1, 1, .1],
|
|
126565
|
-
rotation: [0, 0, 45],
|
|
126566
|
-
isObject: false
|
|
126567
|
-
}), NO_STATE_INHERIT),
|
|
126568
|
-
|
|
126569
|
-
rootNode.addChild(new Mesh(rootNode, { // center
|
|
126617
|
+
this._displayMeshes = {
|
|
126618
|
+
center: rootNode.addChild(new Mesh(rootNode, { // center
|
|
126570
126619
|
geometry: new ReadableGeometry(rootNode, buildSphereGeometry({
|
|
126571
126620
|
radius: 0.05
|
|
126572
126621
|
})),
|
|
@@ -126584,21 +126633,25 @@ class Control {
|
|
|
126584
126633
|
isObject: false
|
|
126585
126634
|
}), NO_STATE_INHERIT),
|
|
126586
126635
|
|
|
126587
|
-
|
|
126588
|
-
|
|
126589
|
-
|
|
126590
|
-
|
|
126591
|
-
addAxis([1,0,0], math.vec3PairToQuaternion([1,0,0], [0,0,1])),
|
|
126592
|
-
addAxis([0,1,0], math.eulerToQuaternion([90,0,0], "XYZ")),
|
|
126593
|
-
addAxis([0,0,1], math.identityQuaternion())
|
|
126594
|
-
];
|
|
126636
|
+
x: addAxis([1,0,0], math.vec3PairToQuaternion([1,0,0], [0,0,1])),
|
|
126637
|
+
y: addAxis([0,1,0], math.eulerToQuaternion([90,0,0], "XYZ")),
|
|
126638
|
+
z: addAxis([0,0,1], math.identityQuaternion())
|
|
126639
|
+
};
|
|
126595
126640
|
|
|
126596
126641
|
const cleanups = [ ];
|
|
126597
126642
|
|
|
126598
126643
|
{ // Keep gizmo screen size constant
|
|
126599
126644
|
let lastDist = -1;
|
|
126600
|
-
const setRootNodeScale = size => {
|
|
126645
|
+
const setRootNodeScale = size => {
|
|
126646
|
+
if (rootNode.scale[0] !== size) {
|
|
126647
|
+
rootNode.scale = [size, size, size];
|
|
126648
|
+
if (this._handlers && this._handlers.onScreenScale) {
|
|
126649
|
+
this._handlers.onScreenScale(rootNode.scale);
|
|
126650
|
+
}
|
|
126651
|
+
}
|
|
126652
|
+
};
|
|
126601
126653
|
const onSceneTick = scene.on("tick", () => {
|
|
126654
|
+
const camera = scene.camera;
|
|
126602
126655
|
const dist = Math.abs(math.distVec3(camera.eye, pos));
|
|
126603
126656
|
if (camera.projection === "perspective") {
|
|
126604
126657
|
if (dist !== lastDist) {
|
|
@@ -126623,10 +126676,10 @@ class Control {
|
|
|
126623
126676
|
vec2[1] = event.pageY;
|
|
126624
126677
|
transformToNode(canvas.ownerDocument.documentElement, canvas, vec2);
|
|
126625
126678
|
};
|
|
126626
|
-
|
|
126627
126679
|
const pickHandler = (e) => {
|
|
126628
126680
|
copyCanvasPos(e, canvasPos);
|
|
126629
|
-
|
|
126681
|
+
// This doesn't guarantee the gizmo is prioritized (as it should be) by other Scene::pick calls
|
|
126682
|
+
const pickResult = scene.pick({ canvasPos: canvasPos });//, includeEntities: pickIds });
|
|
126630
126683
|
const pickEntity = pickResult && pickResult.entity;
|
|
126631
126684
|
const pickId = pickEntity && pickEntity.id;
|
|
126632
126685
|
return (pickId in handlers) && handlers[pickId];
|
|
@@ -126659,6 +126712,9 @@ class Control {
|
|
|
126659
126712
|
}
|
|
126660
126713
|
};
|
|
126661
126714
|
}
|
|
126715
|
+
return !!dragAction;
|
|
126716
|
+
} else {
|
|
126717
|
+
return false;
|
|
126662
126718
|
}
|
|
126663
126719
|
};
|
|
126664
126720
|
|
|
@@ -126667,16 +126723,22 @@ class Control {
|
|
|
126667
126723
|
cleanups.push(() => canvas.removeEventListener(type, listener));
|
|
126668
126724
|
};
|
|
126669
126725
|
|
|
126670
|
-
|
|
126726
|
+
const preventDefaultStopPropagation = e => {
|
|
126671
126727
|
e.preventDefault();
|
|
126672
|
-
|
|
126673
|
-
|
|
126728
|
+
e.stopPropagation();
|
|
126729
|
+
e.stopImmediatePropagation();
|
|
126730
|
+
};
|
|
126731
|
+
|
|
126732
|
+
addCanvasEventListener("mousedown", (e) => {
|
|
126733
|
+
if ((e.which === 1) && startDrag(e, event => (event.which === 1) && event)) {
|
|
126734
|
+
preventDefaultStopPropagation(e);
|
|
126674
126735
|
}
|
|
126675
126736
|
});
|
|
126676
126737
|
|
|
126677
126738
|
addCanvasEventListener("mousemove", (e) => {
|
|
126678
126739
|
if (currentDrag) {
|
|
126679
126740
|
currentDrag.onChange(e);
|
|
126741
|
+
preventDefaultStopPropagation(e);
|
|
126680
126742
|
} else {
|
|
126681
126743
|
if (deactivateActive) {
|
|
126682
126744
|
deactivateActive();
|
|
@@ -126695,6 +126757,9 @@ class Control {
|
|
|
126695
126757
|
if (currentDrag) {
|
|
126696
126758
|
currentDrag.onChange(e);
|
|
126697
126759
|
currentDrag.cleanup();
|
|
126760
|
+
// Calling preventDefaultStopPropagation would interfere with cameraControl
|
|
126761
|
+
// by making it follow the pointer until next click
|
|
126762
|
+
// preventDefaultStopPropagation(e);
|
|
126698
126763
|
}
|
|
126699
126764
|
});
|
|
126700
126765
|
|
|
@@ -126704,115 +126769,74 @@ class Control {
|
|
|
126704
126769
|
if (event.touches.length === 1)
|
|
126705
126770
|
{
|
|
126706
126771
|
const touchStartId = event.touches[0].identifier;
|
|
126707
|
-
startDrag(event, event => [...event.changedTouches].find(e => e.identifier === touchStartId))
|
|
126772
|
+
if (startDrag(event, event => [...event.changedTouches].find(e => e.identifier === touchStartId))) {
|
|
126773
|
+
preventDefaultStopPropagation(event);
|
|
126774
|
+
}
|
|
126708
126775
|
}
|
|
126709
126776
|
});
|
|
126710
126777
|
|
|
126711
126778
|
addCanvasEventListener("touchmove", event => {
|
|
126712
|
-
|
|
126713
|
-
|
|
126779
|
+
if (currentDrag) {
|
|
126780
|
+
currentDrag.onChange(event);
|
|
126781
|
+
preventDefaultStopPropagation(event);
|
|
126782
|
+
}
|
|
126714
126783
|
});
|
|
126715
126784
|
|
|
126716
126785
|
addCanvasEventListener("touchend", event => {
|
|
126717
|
-
event.preventDefault();
|
|
126718
126786
|
if (currentDrag) {
|
|
126719
126787
|
currentDrag.onChange(event);
|
|
126720
126788
|
currentDrag.cleanup();
|
|
126789
|
+
// See the comment in mouseup listener
|
|
126790
|
+
// preventDefaultStopPropagation(e);
|
|
126721
126791
|
}
|
|
126722
126792
|
});
|
|
126723
126793
|
}
|
|
126724
126794
|
|
|
126725
|
-
this._unbindSectionPlane = () => { };
|
|
126726
|
-
|
|
126727
|
-
this.__setSectionPlane = sectionPlane => {
|
|
126728
|
-
this.id = sectionPlane.id;
|
|
126729
|
-
this._sectionPlane = sectionPlane;
|
|
126730
|
-
const setPosFromSectionPlane = () => setPos(sectionPlane.pos);
|
|
126731
|
-
const setDirFromSectionPlane = () => rootNode.quaternion = sectionPlane.quaternion;
|
|
126732
|
-
setPosFromSectionPlane();
|
|
126733
|
-
setDirFromSectionPlane();
|
|
126734
|
-
const onSectionPlanePos = sectionPlane.on("pos", setPosFromSectionPlane);
|
|
126735
|
-
const onSectionPlaneDir = sectionPlane.on("dir", () => {
|
|
126736
|
-
if (!ignoreNextSectionPlaneDirUpdate) {
|
|
126737
|
-
setDirFromSectionPlane();
|
|
126738
|
-
} else {
|
|
126739
|
-
ignoreNextSectionPlaneDirUpdate = false;
|
|
126740
|
-
}
|
|
126741
|
-
});
|
|
126742
|
-
|
|
126743
|
-
this._unbindSectionPlane = () => {
|
|
126744
|
-
this.id = null;
|
|
126745
|
-
this._sectionPlane = null;
|
|
126746
|
-
sectionPlane.off(onSectionPlanePos);
|
|
126747
|
-
sectionPlane.off(onSectionPlaneDir);
|
|
126748
|
-
this._unbindSectionPlane = () => { };
|
|
126749
|
-
};
|
|
126750
|
-
};
|
|
126751
|
-
|
|
126752
126795
|
this.__destroy = () => {
|
|
126753
126796
|
cleanups.forEach(c => c());
|
|
126754
|
-
this._unbindSectionPlane();
|
|
126755
126797
|
rootNode.destroy();
|
|
126756
|
-
this._displayMeshes = [ ];
|
|
126757
126798
|
for (let id in handlers) {
|
|
126758
126799
|
delete handlers[id];
|
|
126759
126800
|
}
|
|
126760
126801
|
};
|
|
126761
126802
|
}
|
|
126762
126803
|
|
|
126763
|
-
|
|
126804
|
+
destroy() {
|
|
126764
126805
|
this.__destroy();
|
|
126765
126806
|
}
|
|
126766
126807
|
|
|
126767
126808
|
/**
|
|
126768
|
-
* Called
|
|
126769
|
-
*
|
|
126770
|
-
* Call with a null or undefined value to disconnect the Control ffrom whatever SectionPlane it was assigned to.
|
|
126809
|
+
* Called to assign this Control to Handlers.
|
|
126810
|
+
* Call with a null or undefined value to disconnect the Control from whatever Handlers it was assigned to.
|
|
126771
126811
|
* @private
|
|
126772
126812
|
*/
|
|
126773
|
-
|
|
126774
|
-
this.
|
|
126775
|
-
|
|
126776
|
-
|
|
126777
|
-
|
|
126778
|
-
|
|
126779
|
-
|
|
126780
|
-
|
|
126781
|
-
|
|
126782
|
-
* @returns {SectionPlane} The SectionPlane.
|
|
126783
|
-
*/
|
|
126784
|
-
get sectionPlane() {
|
|
126785
|
-
return this._sectionPlane;
|
|
126813
|
+
setHandlers(handlers) {
|
|
126814
|
+
Object.values(this._displayMeshes).forEach(m => m.visible = !!handlers);
|
|
126815
|
+
this._handlers = handlers;
|
|
126816
|
+
this._displayMeshes.x.setPositionActive(handlers && handlers.onPosition);
|
|
126817
|
+
this._displayMeshes.y.setPositionActive(handlers && handlers.onPosition);
|
|
126818
|
+
this._displayMeshes.z.setPositionActive(handlers && handlers.onPosition);
|
|
126819
|
+
this._displayMeshes.x.setRotationActive(handlers && handlers.onQuaternion);
|
|
126820
|
+
this._displayMeshes.y.setRotationActive(handlers && handlers.onQuaternion);
|
|
126821
|
+
this._displayMeshes.z.setRotationActive(handlers && handlers.onQuaternion);
|
|
126786
126822
|
}
|
|
126787
126823
|
|
|
126788
126824
|
/**
|
|
126789
|
-
* Sets
|
|
126825
|
+
* Sets the World-space position of this Control.
|
|
126790
126826
|
*
|
|
126791
|
-
* @
|
|
126827
|
+
* @param {Number[]} value New position.
|
|
126792
126828
|
*/
|
|
126793
|
-
|
|
126794
|
-
|
|
126795
|
-
this._visible = visible;
|
|
126796
|
-
this._displayMeshes.forEach(m => m.visible = visible);
|
|
126797
|
-
}
|
|
126829
|
+
setPosition(p) {
|
|
126830
|
+
this._setPosition(p);
|
|
126798
126831
|
}
|
|
126799
126832
|
|
|
126800
126833
|
/**
|
|
126801
|
-
*
|
|
126834
|
+
* Sets the quaternion of this Control.
|
|
126802
126835
|
*
|
|
126803
|
-
* @
|
|
126804
|
-
*/
|
|
126805
|
-
getVisible() {
|
|
126806
|
-
return this._visible;
|
|
126807
|
-
}
|
|
126808
|
-
|
|
126809
|
-
/**
|
|
126810
|
-
* Sets if this Control is culled. This is called by SectionPlanesPlugin to
|
|
126811
|
-
* temporarily hide the Control while a snapshot is being taken by Viewer#getSnapshot().
|
|
126812
|
-
* @param culled
|
|
126836
|
+
* @param {Number[]} value New quaternion.
|
|
126813
126837
|
*/
|
|
126814
|
-
|
|
126815
|
-
this.
|
|
126838
|
+
setQuaternion(q) {
|
|
126839
|
+
this._setQuaternion(q);
|
|
126816
126840
|
}
|
|
126817
126841
|
}
|
|
126818
126842
|
|
|
@@ -127447,7 +127471,160 @@ class SectionPlanesPlugin extends Plugin {
|
|
|
127447
127471
|
}
|
|
127448
127472
|
|
|
127449
127473
|
_sectionPlaneCreated(sectionPlane) {
|
|
127450
|
-
const control = (this._freeControls.length > 0)
|
|
127474
|
+
const control = ((this._freeControls.length > 0)
|
|
127475
|
+
? this._freeControls.pop()
|
|
127476
|
+
: (() => {
|
|
127477
|
+
const scene = this.viewer.scene;
|
|
127478
|
+
const planeRoot = (function() {
|
|
127479
|
+
const rootNode = new Node$1(scene, { isObject: false });
|
|
127480
|
+
|
|
127481
|
+
rootNode.addChild(new Mesh(rootNode, { // plane
|
|
127482
|
+
geometry: new ReadableGeometry(rootNode, {
|
|
127483
|
+
primitive: "triangles",
|
|
127484
|
+
positions: [
|
|
127485
|
+
0.5, 0.5, 0.0, 0.5, -0.5, 0.0, // 0
|
|
127486
|
+
-0.5, -0.5, 0.0, -0.5, 0.5, 0.0, // 1
|
|
127487
|
+
0.5, 0.5, -0.0, 0.5, -0.5, -0.0, // 2
|
|
127488
|
+
-0.5, -0.5, -0.0, -0.5, 0.5, -0.0 // 3
|
|
127489
|
+
],
|
|
127490
|
+
indices: [0, 1, 2, 2, 3, 0]
|
|
127491
|
+
}),
|
|
127492
|
+
material: new PhongMaterial(rootNode, {
|
|
127493
|
+
emissive: [0, 0.0, 0],
|
|
127494
|
+
diffuse: [0, 0, 0],
|
|
127495
|
+
backfaces: true
|
|
127496
|
+
}),
|
|
127497
|
+
opacity: 0.6,
|
|
127498
|
+
ghosted: true,
|
|
127499
|
+
ghostMaterial: new EmphasisMaterial(rootNode, {
|
|
127500
|
+
edges: false,
|
|
127501
|
+
filled: true,
|
|
127502
|
+
fillColor: [1, 1, 0],
|
|
127503
|
+
edgeColor: [0, 0, 0],
|
|
127504
|
+
fillAlpha: 0.1,
|
|
127505
|
+
backfaces: true
|
|
127506
|
+
}),
|
|
127507
|
+
pickable: false,
|
|
127508
|
+
collidable: true,
|
|
127509
|
+
clippable: false,
|
|
127510
|
+
visible: false,
|
|
127511
|
+
scale: [2.4, 2.4, 1],
|
|
127512
|
+
isObject: false
|
|
127513
|
+
}));
|
|
127514
|
+
|
|
127515
|
+
rootNode.addChild(new Mesh(rootNode, { // Visible frame
|
|
127516
|
+
geometry: new ReadableGeometry(rootNode, buildTorusGeometry({
|
|
127517
|
+
center: [0, 0, 0],
|
|
127518
|
+
radius: 1.7,
|
|
127519
|
+
tube: 0.02,
|
|
127520
|
+
radialSegments: 4,
|
|
127521
|
+
tubeSegments: 4,
|
|
127522
|
+
arc: Math.PI * 2.0
|
|
127523
|
+
})),
|
|
127524
|
+
material: new PhongMaterial(rootNode, {
|
|
127525
|
+
emissive: [0, 0, 0],
|
|
127526
|
+
diffuse: [0, 0, 0],
|
|
127527
|
+
specular: [0, 0, 0],
|
|
127528
|
+
shininess: 0
|
|
127529
|
+
}),
|
|
127530
|
+
//highlighted: true,
|
|
127531
|
+
highlightMaterial: new EmphasisMaterial(rootNode, {
|
|
127532
|
+
edges: false,
|
|
127533
|
+
edgeColor: [0.0, 0.0, 0.0],
|
|
127534
|
+
filled: true,
|
|
127535
|
+
fillColor: [0.8, 0.8, 0.8],
|
|
127536
|
+
fillAlpha: 1.0
|
|
127537
|
+
}),
|
|
127538
|
+
pickable: false,
|
|
127539
|
+
collidable: false,
|
|
127540
|
+
clippable: false,
|
|
127541
|
+
visible: false,
|
|
127542
|
+
scale: [1, 1, .1],
|
|
127543
|
+
rotation: [0, 0, 45],
|
|
127544
|
+
isObject: false
|
|
127545
|
+
}));
|
|
127546
|
+
|
|
127547
|
+
return {
|
|
127548
|
+
setPosition: (function() {
|
|
127549
|
+
const origin = math.vec3();
|
|
127550
|
+
const rtcPos = math.vec3();
|
|
127551
|
+
return function(p) {
|
|
127552
|
+
worldToRTCPos(p, origin, rtcPos);
|
|
127553
|
+
rootNode.origin = origin;
|
|
127554
|
+
rootNode.position = rtcPos;
|
|
127555
|
+
};
|
|
127556
|
+
})(),
|
|
127557
|
+
setQuaternion: q => { rootNode.quaternion = q; },
|
|
127558
|
+
setScale: s => { rootNode.scale = s; },
|
|
127559
|
+
setVisible: v => { rootNode.visible = v; }
|
|
127560
|
+
};
|
|
127561
|
+
})();
|
|
127562
|
+
let unbindSectionPlane = () => { };
|
|
127563
|
+
const ctrl = new TransformControl(this.viewer);
|
|
127564
|
+
|
|
127565
|
+
let culled = false;
|
|
127566
|
+
let visible = false;
|
|
127567
|
+
let handlers = null;
|
|
127568
|
+
const updateVisible = () => {
|
|
127569
|
+
const vis = visible && (! culled);
|
|
127570
|
+
planeRoot.setVisible(vis);
|
|
127571
|
+
ctrl.setHandlers(vis && handlers);
|
|
127572
|
+
};
|
|
127573
|
+
|
|
127574
|
+
return {
|
|
127575
|
+
_destroy: () => {
|
|
127576
|
+
unbindSectionPlane();
|
|
127577
|
+
ctrl.destroy();
|
|
127578
|
+
},
|
|
127579
|
+
setCulled: c => { culled = c; updateVisible(); },
|
|
127580
|
+
setVisible: v => { visible = v; updateVisible(); },
|
|
127581
|
+
_setSectionPlane: sectionPlane => {
|
|
127582
|
+
unbindSectionPlane();
|
|
127583
|
+
if (sectionPlane) {
|
|
127584
|
+
let ignoreNextSectionPlaneDirUpdate = false;
|
|
127585
|
+
handlers = {
|
|
127586
|
+
onPosition: p => {
|
|
127587
|
+
planeRoot.setPosition(p);
|
|
127588
|
+
sectionPlane.pos = p;
|
|
127589
|
+
},
|
|
127590
|
+
onQuaternion: q => {
|
|
127591
|
+
planeRoot.setQuaternion(q);
|
|
127592
|
+
ignoreNextSectionPlaneDirUpdate = true;
|
|
127593
|
+
sectionPlane.quaternion = q;
|
|
127594
|
+
},
|
|
127595
|
+
onScreenScale: s => {
|
|
127596
|
+
planeRoot.setScale(s);
|
|
127597
|
+
}
|
|
127598
|
+
};
|
|
127599
|
+
|
|
127600
|
+
const setPosFromSectionPlane = () => {
|
|
127601
|
+
planeRoot.setPosition(sectionPlane.pos);
|
|
127602
|
+
ctrl.setPosition(sectionPlane.pos);
|
|
127603
|
+
};
|
|
127604
|
+
const setDirFromSectionPlane = () => {
|
|
127605
|
+
planeRoot.setQuaternion(sectionPlane.quaternion);
|
|
127606
|
+
ctrl.setQuaternion(sectionPlane.quaternion);
|
|
127607
|
+
};
|
|
127608
|
+
setPosFromSectionPlane();
|
|
127609
|
+
setDirFromSectionPlane();
|
|
127610
|
+
const onSectionPlanePos = sectionPlane.on("pos", setPosFromSectionPlane);
|
|
127611
|
+
const onSectionPlaneDir = sectionPlane.on("dir", () => {
|
|
127612
|
+
if (!ignoreNextSectionPlaneDirUpdate) {
|
|
127613
|
+
setDirFromSectionPlane();
|
|
127614
|
+
} else {
|
|
127615
|
+
ignoreNextSectionPlaneDirUpdate = false;
|
|
127616
|
+
}
|
|
127617
|
+
});
|
|
127618
|
+
|
|
127619
|
+
unbindSectionPlane = () => {
|
|
127620
|
+
sectionPlane.off(onSectionPlanePos);
|
|
127621
|
+
sectionPlane.off(onSectionPlaneDir);
|
|
127622
|
+
unbindSectionPlane = () => { };
|
|
127623
|
+
};
|
|
127624
|
+
}
|
|
127625
|
+
}
|
|
127626
|
+
};
|
|
127627
|
+
})());
|
|
127451
127628
|
control._setSectionPlane(sectionPlane);
|
|
127452
127629
|
control.setVisible(false);
|
|
127453
127630
|
this._controls[sectionPlane.id] = control;
|
|
@@ -142880,8 +143057,8 @@ class WebIFCLoaderPlugin extends Plugin {
|
|
|
142880
143057
|
}
|
|
142881
143058
|
}
|
|
142882
143059
|
|
|
142883
|
-
const name = "@creooxag/
|
|
142884
|
-
const version = "0.0.
|
|
143060
|
+
const name = "@creooxag/cxconverter";
|
|
143061
|
+
const version = "0.0.3-alpha";
|
|
142885
143062
|
const description = "";
|
|
142886
143063
|
const exports$1 = {
|
|
142887
143064
|
".": {
|
|
@@ -142957,8 +143134,7 @@ var __publicField$2 = (obj, key, value) => {
|
|
|
142957
143134
|
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
142958
143135
|
return value;
|
|
142959
143136
|
};
|
|
142960
|
-
var IfcDbWasm = (() => {
|
|
142961
|
-
var _scriptName = typeof document === "undefined" ? "" : document.currentScript.src;
|
|
143137
|
+
var IfcDbWasm = /* @__PURE__ */ (() => {
|
|
142962
143138
|
return async function(moduleArg = {}) {
|
|
142963
143139
|
var moduleRtn;
|
|
142964
143140
|
var Module = moduleArg;
|
|
@@ -142967,12 +143143,12 @@ var IfcDbWasm = (() => {
|
|
|
142967
143143
|
readyPromiseResolve = resolve;
|
|
142968
143144
|
readyPromiseReject = reject;
|
|
142969
143145
|
});
|
|
142970
|
-
var moduleOverrides = Object.assign({}, Module);
|
|
142971
143146
|
var arguments_ = [];
|
|
142972
143147
|
var thisProgram = "./this.program";
|
|
142973
143148
|
var quit_ = (status, toThrow) => {
|
|
142974
143149
|
throw toThrow;
|
|
142975
143150
|
};
|
|
143151
|
+
var _scriptName = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('xeokit-sdk.cjs.js', document.baseURI).href));
|
|
142976
143152
|
var scriptDirectory = "";
|
|
142977
143153
|
function locateFile(path) {
|
|
142978
143154
|
if (Module["locateFile"]) {
|
|
@@ -142982,16 +143158,9 @@ var IfcDbWasm = (() => {
|
|
|
142982
143158
|
}
|
|
142983
143159
|
var readAsync, readBinary;
|
|
142984
143160
|
{
|
|
142985
|
-
|
|
142986
|
-
scriptDirectory =
|
|
142987
|
-
}
|
|
142988
|
-
if (_scriptName) {
|
|
142989
|
-
scriptDirectory = _scriptName;
|
|
142990
|
-
}
|
|
142991
|
-
if (scriptDirectory.startsWith("blob:")) {
|
|
142992
|
-
scriptDirectory = "";
|
|
142993
|
-
} else {
|
|
142994
|
-
scriptDirectory = scriptDirectory.slice(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1);
|
|
143161
|
+
try {
|
|
143162
|
+
scriptDirectory = new URL(".", _scriptName).href;
|
|
143163
|
+
} catch {
|
|
142995
143164
|
}
|
|
142996
143165
|
{
|
|
142997
143166
|
readAsync = async (url) => {
|
|
@@ -143003,31 +143172,25 @@ var IfcDbWasm = (() => {
|
|
|
143003
143172
|
};
|
|
143004
143173
|
}
|
|
143005
143174
|
}
|
|
143006
|
-
var out =
|
|
143007
|
-
var err =
|
|
143008
|
-
|
|
143009
|
-
moduleOverrides = null;
|
|
143010
|
-
if (Module["arguments"])
|
|
143011
|
-
arguments_ = Module["arguments"];
|
|
143012
|
-
if (Module["thisProgram"])
|
|
143013
|
-
thisProgram = Module["thisProgram"];
|
|
143014
|
-
var wasmBinary = Module["wasmBinary"];
|
|
143175
|
+
var out = console.log.bind(console);
|
|
143176
|
+
var err = console.error.bind(console);
|
|
143177
|
+
var wasmBinary;
|
|
143015
143178
|
var wasmMemory;
|
|
143016
143179
|
var ABORT = false;
|
|
143017
143180
|
var EXITSTATUS;
|
|
143018
143181
|
var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAP64, HEAPU64, HEAPF64;
|
|
143019
143182
|
function updateMemoryViews() {
|
|
143020
143183
|
var b = wasmMemory.buffer;
|
|
143021
|
-
|
|
143022
|
-
|
|
143023
|
-
|
|
143024
|
-
|
|
143025
|
-
|
|
143026
|
-
|
|
143027
|
-
|
|
143028
|
-
|
|
143029
|
-
|
|
143030
|
-
|
|
143184
|
+
HEAP8 = new Int8Array(b);
|
|
143185
|
+
HEAP16 = new Int16Array(b);
|
|
143186
|
+
HEAPU8 = new Uint8Array(b);
|
|
143187
|
+
HEAPU16 = new Uint16Array(b);
|
|
143188
|
+
HEAP32 = new Int32Array(b);
|
|
143189
|
+
HEAPU32 = new Uint32Array(b);
|
|
143190
|
+
HEAPF32 = new Float32Array(b);
|
|
143191
|
+
HEAPF64 = new Float64Array(b);
|
|
143192
|
+
HEAP64 = new BigInt64Array(b);
|
|
143193
|
+
HEAPU64 = new BigUint64Array(b);
|
|
143031
143194
|
}
|
|
143032
143195
|
function preRun() {
|
|
143033
143196
|
if (Module["preRun"]) {
|
|
@@ -143087,7 +143250,7 @@ var IfcDbWasm = (() => {
|
|
|
143087
143250
|
if (Module["locateFile"]) {
|
|
143088
143251
|
return locateFile("ifcdb.wasm");
|
|
143089
143252
|
}
|
|
143090
|
-
return new URL("ifcdb.wasm", typeof document ===
|
|
143253
|
+
return new URL("ifcdb.wasm", (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('xeokit-sdk.cjs.js', document.baseURI).href))).href;
|
|
143091
143254
|
}
|
|
143092
143255
|
function getBinarySync(file) {
|
|
143093
143256
|
if (file == wasmBinaryFile && wasmBinary) {
|
|
@@ -143137,7 +143300,6 @@ var IfcDbWasm = (() => {
|
|
|
143137
143300
|
wasmExports = Asyncify.instrumentWasmExports(wasmExports);
|
|
143138
143301
|
wasmMemory = wasmExports["U"];
|
|
143139
143302
|
updateMemoryViews();
|
|
143140
|
-
wasmExports["X"];
|
|
143141
143303
|
removeRunDependency();
|
|
143142
143304
|
return wasmExports;
|
|
143143
143305
|
}
|
|
@@ -143149,8 +143311,7 @@ var IfcDbWasm = (() => {
|
|
|
143149
143311
|
if (Module["instantiateWasm"]) {
|
|
143150
143312
|
return new Promise((resolve, reject) => {
|
|
143151
143313
|
Module["instantiateWasm"](info, (mod, inst) => {
|
|
143152
|
-
receiveInstance(mod);
|
|
143153
|
-
resolve(mod.exports);
|
|
143314
|
+
resolve(receiveInstance(mod));
|
|
143154
143315
|
});
|
|
143155
143316
|
});
|
|
143156
143317
|
}
|
|
@@ -143164,9 +143325,6 @@ var IfcDbWasm = (() => {
|
|
|
143164
143325
|
return Promise.reject(e);
|
|
143165
143326
|
}
|
|
143166
143327
|
}
|
|
143167
|
-
var ASM_CONSTS = { 191520: () => {
|
|
143168
|
-
console.error("progress callback is not set.");
|
|
143169
|
-
} };
|
|
143170
143328
|
class ExitStatus {
|
|
143171
143329
|
constructor(status) {
|
|
143172
143330
|
__publicField$2(this, "name", "ExitStatus");
|
|
@@ -143180,10 +143338,22 @@ var IfcDbWasm = (() => {
|
|
|
143180
143338
|
}
|
|
143181
143339
|
};
|
|
143182
143340
|
var onPostRuns = [];
|
|
143183
|
-
var addOnPostRun = (cb) => onPostRuns.
|
|
143341
|
+
var addOnPostRun = (cb) => onPostRuns.push(cb);
|
|
143184
143342
|
var onPreRuns = [];
|
|
143185
|
-
var addOnPreRun = (cb) => onPreRuns.
|
|
143186
|
-
var
|
|
143343
|
+
var addOnPreRun = (cb) => onPreRuns.push(cb);
|
|
143344
|
+
var dynCallLegacy = (sig, ptr, args) => {
|
|
143345
|
+
sig = sig.replace(/p/g, "i");
|
|
143346
|
+
var f = Module["dynCall_" + sig];
|
|
143347
|
+
return f(ptr, ...args);
|
|
143348
|
+
};
|
|
143349
|
+
var dynCall = (sig, ptr, args = [], promising = false) => {
|
|
143350
|
+
var rtn = dynCallLegacy(sig, ptr, args);
|
|
143351
|
+
function convert(rtn2) {
|
|
143352
|
+
return rtn2;
|
|
143353
|
+
}
|
|
143354
|
+
return convert(rtn);
|
|
143355
|
+
};
|
|
143356
|
+
var noExitRuntime = true;
|
|
143187
143357
|
class ExceptionInfo {
|
|
143188
143358
|
constructor(excPtr) {
|
|
143189
143359
|
this.excPtr = excPtr;
|
|
@@ -143542,7 +143712,6 @@ var IfcDbWasm = (() => {
|
|
|
143542
143712
|
tty.output = [];
|
|
143543
143713
|
}
|
|
143544
143714
|
} } };
|
|
143545
|
-
var alignMemory = (size, alignment) => Math.ceil(size / alignment) * alignment;
|
|
143546
143715
|
var mmapAlloc = (size) => {
|
|
143547
143716
|
abort();
|
|
143548
143717
|
};
|
|
@@ -143552,7 +143721,7 @@ var IfcDbWasm = (() => {
|
|
|
143552
143721
|
if (FS.isBlkdev(mode) || FS.isFIFO(mode)) {
|
|
143553
143722
|
throw new FS.ErrnoError(63);
|
|
143554
143723
|
}
|
|
143555
|
-
MEMFS.ops_table || (MEMFS.ops_table = { dir: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, lookup: MEMFS.node_ops.lookup, mknod: MEMFS.node_ops.mknod, rename: MEMFS.node_ops.rename, unlink: MEMFS.node_ops.unlink, rmdir: MEMFS.node_ops.rmdir, readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: { llseek: MEMFS.stream_ops.llseek, read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write,
|
|
143724
|
+
MEMFS.ops_table || (MEMFS.ops_table = { dir: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, lookup: MEMFS.node_ops.lookup, mknod: MEMFS.node_ops.mknod, rename: MEMFS.node_ops.rename, unlink: MEMFS.node_ops.unlink, rmdir: MEMFS.node_ops.rmdir, readdir: MEMFS.node_ops.readdir, symlink: MEMFS.node_ops.symlink }, stream: { llseek: MEMFS.stream_ops.llseek } }, file: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: { llseek: MEMFS.stream_ops.llseek, read: MEMFS.stream_ops.read, write: MEMFS.stream_ops.write, mmap: MEMFS.stream_ops.mmap, msync: MEMFS.stream_ops.msync } }, link: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr, readlink: MEMFS.node_ops.readlink }, stream: {} }, chrdev: { node: { getattr: MEMFS.node_ops.getattr, setattr: MEMFS.node_ops.setattr }, stream: FS.chrdev_stream_ops } });
|
|
143556
143725
|
var node = FS.createNode(parent, name, mode, dev);
|
|
143557
143726
|
if (FS.isDir(node.mode)) {
|
|
143558
143727
|
node.node_ops = MEMFS.ops_table.dir.node;
|
|
@@ -143741,9 +143910,6 @@ var IfcDbWasm = (() => {
|
|
|
143741
143910
|
throw new FS.ErrnoError(28);
|
|
143742
143911
|
}
|
|
143743
143912
|
return position;
|
|
143744
|
-
}, allocate(stream, offset, length) {
|
|
143745
|
-
MEMFS.expandFileStorage(stream.node, offset + length);
|
|
143746
|
-
stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);
|
|
143747
143913
|
}, mmap(stream, length, position, prot, flags) {
|
|
143748
143914
|
if (!FS.isFile(stream.node.mode)) {
|
|
143749
143915
|
throw new FS.ErrnoError(43);
|
|
@@ -143781,10 +143947,8 @@ var IfcDbWasm = (() => {
|
|
|
143781
143947
|
return new Uint8Array(arrayBuffer);
|
|
143782
143948
|
};
|
|
143783
143949
|
asyncLoad.isAsync = true;
|
|
143784
|
-
var FS_createDataFile = (
|
|
143785
|
-
|
|
143786
|
-
};
|
|
143787
|
-
var preloadPlugins = Module["preloadPlugins"] || [];
|
|
143950
|
+
var FS_createDataFile = (...args) => FS.createDataFile(...args);
|
|
143951
|
+
var preloadPlugins = [];
|
|
143788
143952
|
var FS_handledByPreloadPlugin = (byteArray, fullname, finish, onerror) => {
|
|
143789
143953
|
if (typeof Browser != "undefined")
|
|
143790
143954
|
Browser.init();
|
|
@@ -143841,12 +144005,12 @@ var IfcDbWasm = (() => {
|
|
|
143841
144005
|
mode |= 146;
|
|
143842
144006
|
return mode;
|
|
143843
144007
|
};
|
|
143844
|
-
var FS = { root: null, mounts: [], devices: {}, streams: [], nextInode: 1, nameTable: null, currentPath: "/", initialized: false, ignorePermissions: true, ErrnoError: class {
|
|
144008
|
+
var FS = { root: null, mounts: [], devices: {}, streams: [], nextInode: 1, nameTable: null, currentPath: "/", initialized: false, ignorePermissions: true, filesystems: null, syncFSRequests: 0, readFiles: {}, ErrnoError: class {
|
|
143845
144009
|
constructor(errno) {
|
|
143846
144010
|
__publicField$2(this, "name", "ErrnoError");
|
|
143847
144011
|
this.errno = errno;
|
|
143848
144012
|
}
|
|
143849
|
-
},
|
|
144013
|
+
}, FSStream: class {
|
|
143850
144014
|
constructor() {
|
|
143851
144015
|
__publicField$2(this, "shared", {});
|
|
143852
144016
|
}
|
|
@@ -143936,7 +144100,12 @@ var IfcDbWasm = (() => {
|
|
|
143936
144100
|
}
|
|
143937
144101
|
if (parts[i] === "..") {
|
|
143938
144102
|
current_path = PATH.dirname(current_path);
|
|
143939
|
-
current
|
|
144103
|
+
if (FS.isRoot(current)) {
|
|
144104
|
+
path = current_path + "/" + parts.slice(i + 1).join("/");
|
|
144105
|
+
continue linkloop;
|
|
144106
|
+
} else {
|
|
144107
|
+
current = current.parent;
|
|
144108
|
+
}
|
|
143940
144109
|
continue;
|
|
143941
144110
|
}
|
|
143942
144111
|
current_path = PATH.join2(current_path, parts[i]);
|
|
@@ -144292,10 +144461,12 @@ var IfcDbWasm = (() => {
|
|
|
144292
144461
|
}, mkdirTree(path, mode) {
|
|
144293
144462
|
var dirs = path.split("/");
|
|
144294
144463
|
var d = "";
|
|
144295
|
-
for (var
|
|
144296
|
-
if (!
|
|
144464
|
+
for (var dir of dirs) {
|
|
144465
|
+
if (!dir)
|
|
144297
144466
|
continue;
|
|
144298
|
-
d
|
|
144467
|
+
if (d || PATH.isAbs(path))
|
|
144468
|
+
d += "/";
|
|
144469
|
+
d += dir;
|
|
144299
144470
|
try {
|
|
144300
144471
|
FS.mkdir(d, mode);
|
|
144301
144472
|
} catch (e) {
|
|
@@ -144675,23 +144846,6 @@ var IfcDbWasm = (() => {
|
|
|
144675
144846
|
if (!seeking)
|
|
144676
144847
|
stream.position += bytesWritten;
|
|
144677
144848
|
return bytesWritten;
|
|
144678
|
-
}, allocate(stream, offset, length) {
|
|
144679
|
-
if (FS.isClosed(stream)) {
|
|
144680
|
-
throw new FS.ErrnoError(8);
|
|
144681
|
-
}
|
|
144682
|
-
if (offset < 0 || length <= 0) {
|
|
144683
|
-
throw new FS.ErrnoError(28);
|
|
144684
|
-
}
|
|
144685
|
-
if ((stream.flags & 2097155) === 0) {
|
|
144686
|
-
throw new FS.ErrnoError(8);
|
|
144687
|
-
}
|
|
144688
|
-
if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) {
|
|
144689
|
-
throw new FS.ErrnoError(43);
|
|
144690
|
-
}
|
|
144691
|
-
if (!stream.stream_ops.allocate) {
|
|
144692
|
-
throw new FS.ErrnoError(138);
|
|
144693
|
-
}
|
|
144694
|
-
stream.stream_ops.allocate(stream, offset, length);
|
|
144695
144849
|
}, mmap(stream, length, position, prot, flags) {
|
|
144696
144850
|
if ((prot & 2) !== 0 && (flags & 2) === 0 && (stream.flags & 2097155) !== 2) {
|
|
144697
144851
|
throw new FS.ErrnoError(2);
|
|
@@ -144837,12 +144991,10 @@ var IfcDbWasm = (() => {
|
|
|
144837
144991
|
FS.createStandardStreams(input, output, error);
|
|
144838
144992
|
}, quit() {
|
|
144839
144993
|
FS.initialized = false;
|
|
144840
|
-
for (var
|
|
144841
|
-
|
|
144842
|
-
|
|
144843
|
-
continue;
|
|
144994
|
+
for (var stream of FS.streams) {
|
|
144995
|
+
if (stream) {
|
|
144996
|
+
FS.close(stream);
|
|
144844
144997
|
}
|
|
144845
|
-
FS.close(stream);
|
|
144846
144998
|
}
|
|
144847
144999
|
}, findObject(path, dontResolveLastLink) {
|
|
144848
145000
|
var ret = FS.analyzePath(path, dontResolveLastLink);
|
|
@@ -144884,6 +145036,8 @@ var IfcDbWasm = (() => {
|
|
|
144884
145036
|
try {
|
|
144885
145037
|
FS.mkdir(current);
|
|
144886
145038
|
} catch (e) {
|
|
145039
|
+
if (e.errno != 20)
|
|
145040
|
+
throw e;
|
|
144887
145041
|
}
|
|
144888
145042
|
parent = current;
|
|
144889
145043
|
}
|
|
@@ -145379,12 +145533,12 @@ var IfcDbWasm = (() => {
|
|
|
145379
145533
|
try {
|
|
145380
145534
|
path = SYSCALLS.getStr(path);
|
|
145381
145535
|
path = SYSCALLS.calculateAt(dirfd, path);
|
|
145382
|
-
if (flags
|
|
145536
|
+
if (!flags) {
|
|
145383
145537
|
FS.unlink(path);
|
|
145384
145538
|
} else if (flags === 512) {
|
|
145385
145539
|
FS.rmdir(path);
|
|
145386
145540
|
} else {
|
|
145387
|
-
|
|
145541
|
+
return -28;
|
|
145388
145542
|
}
|
|
145389
145543
|
return 0;
|
|
145390
145544
|
} catch (e) {
|
|
@@ -145408,7 +145562,12 @@ var IfcDbWasm = (() => {
|
|
|
145408
145562
|
var awaitingDependencies = {};
|
|
145409
145563
|
var registeredTypes = {};
|
|
145410
145564
|
var typeDependencies = {};
|
|
145411
|
-
var InternalError
|
|
145565
|
+
var InternalError = class InternalError extends Error {
|
|
145566
|
+
constructor(message) {
|
|
145567
|
+
super(message);
|
|
145568
|
+
this.name = "InternalError";
|
|
145569
|
+
}
|
|
145570
|
+
};
|
|
145412
145571
|
var throwInternalError = (message) => {
|
|
145413
145572
|
throw new InternalError(message);
|
|
145414
145573
|
};
|
|
@@ -145459,6 +145618,7 @@ var IfcDbWasm = (() => {
|
|
|
145459
145618
|
fieldRecords.forEach((field, i) => {
|
|
145460
145619
|
var fieldName = field.fieldName;
|
|
145461
145620
|
var getterReturnType = fieldTypes2[i];
|
|
145621
|
+
var optional = fieldTypes2[i].optional;
|
|
145462
145622
|
var getter = field.getter;
|
|
145463
145623
|
var getterContext = field.getterContext;
|
|
145464
145624
|
var setterArgumentType = fieldTypes2[i + fieldRecords.length];
|
|
@@ -145468,7 +145628,7 @@ var IfcDbWasm = (() => {
|
|
|
145468
145628
|
var destructors = [];
|
|
145469
145629
|
setter(setterContext, ptr, setterArgumentType["toWireType"](destructors, o));
|
|
145470
145630
|
runDestructors(destructors);
|
|
145471
|
-
} };
|
|
145631
|
+
}, optional };
|
|
145472
145632
|
});
|
|
145473
145633
|
return [{ name: reg.name, fromWireType: (ptr) => {
|
|
145474
145634
|
var rv = {};
|
|
@@ -145479,7 +145639,7 @@ var IfcDbWasm = (() => {
|
|
|
145479
145639
|
return rv;
|
|
145480
145640
|
}, toWireType: (destructors, o) => {
|
|
145481
145641
|
for (var fieldName in fields) {
|
|
145482
|
-
if (!(fieldName in o)) {
|
|
145642
|
+
if (!(fieldName in o) && !fields[fieldName].optional) {
|
|
145483
145643
|
throw new TypeError(`Missing field: "${fieldName}"`);
|
|
145484
145644
|
}
|
|
145485
145645
|
}
|
|
@@ -145494,17 +145654,6 @@ var IfcDbWasm = (() => {
|
|
|
145494
145654
|
}, argPackAdvance: GenericWireTypeSize, readValueFromPointer: readPointer, destructorFunction: rawDestructor }];
|
|
145495
145655
|
});
|
|
145496
145656
|
};
|
|
145497
|
-
var embindRepr = (v) => {
|
|
145498
|
-
if (v === null) {
|
|
145499
|
-
return "null";
|
|
145500
|
-
}
|
|
145501
|
-
var t = typeof v;
|
|
145502
|
-
if (t === "object" || t === "array" || t === "function") {
|
|
145503
|
-
return v.toString();
|
|
145504
|
-
} else {
|
|
145505
|
-
return "" + v;
|
|
145506
|
-
}
|
|
145507
|
-
};
|
|
145508
145657
|
var embind_init_charCodes = () => {
|
|
145509
145658
|
var codes = new Array(256);
|
|
145510
145659
|
for (var i = 0; i < 256; ++i) {
|
|
@@ -145521,7 +145670,12 @@ var IfcDbWasm = (() => {
|
|
|
145521
145670
|
}
|
|
145522
145671
|
return ret;
|
|
145523
145672
|
};
|
|
145524
|
-
var BindingError
|
|
145673
|
+
var BindingError = class BindingError extends Error {
|
|
145674
|
+
constructor(message) {
|
|
145675
|
+
super(message);
|
|
145676
|
+
this.name = "BindingError";
|
|
145677
|
+
}
|
|
145678
|
+
};
|
|
145525
145679
|
var throwBindingError = (message) => {
|
|
145526
145680
|
throw new BindingError(message);
|
|
145527
145681
|
};
|
|
@@ -145564,11 +145718,14 @@ var IfcDbWasm = (() => {
|
|
|
145564
145718
|
};
|
|
145565
145719
|
var __embind_register_bigint = (primitiveType, name, size, minRange, maxRange) => {
|
|
145566
145720
|
name = readLatin1String(name);
|
|
145567
|
-
|
|
145568
|
-
|
|
145569
|
-
|
|
145570
|
-
|
|
145571
|
-
|
|
145721
|
+
const isUnsignedType = minRange === 0n;
|
|
145722
|
+
let fromWireType = (value) => value;
|
|
145723
|
+
if (isUnsignedType) {
|
|
145724
|
+
const bitSize = size * 8;
|
|
145725
|
+
fromWireType = (value) => BigInt.asUintN(bitSize, value);
|
|
145726
|
+
maxRange = fromWireType(maxRange);
|
|
145727
|
+
}
|
|
145728
|
+
registerType(primitiveType, { name, fromWireType, toWireType: (destructors, value) => {
|
|
145572
145729
|
if (typeof value == "number") {
|
|
145573
145730
|
value = BigInt(value);
|
|
145574
145731
|
}
|
|
@@ -145587,21 +145744,16 @@ var IfcDbWasm = (() => {
|
|
|
145587
145744
|
}, destructorFunction: null });
|
|
145588
145745
|
};
|
|
145589
145746
|
var emval_freelist = [];
|
|
145590
|
-
var emval_handles = [];
|
|
145747
|
+
var emval_handles = [0, 1, , 1, null, 1, true, 1, false, 1];
|
|
145591
145748
|
var __emval_decref = (handle) => {
|
|
145592
145749
|
if (handle > 9 && 0 === --emval_handles[handle + 1]) {
|
|
145593
145750
|
emval_handles[handle] = void 0;
|
|
145594
145751
|
emval_freelist.push(handle);
|
|
145595
145752
|
}
|
|
145596
145753
|
};
|
|
145597
|
-
var count_emval_handles = () => emval_handles.length / 2 - 5 - emval_freelist.length;
|
|
145598
|
-
var init_emval = () => {
|
|
145599
|
-
emval_handles.push(0, 1, void 0, 1, null, 1, true, 1, false, 1);
|
|
145600
|
-
Module["count_emval_handles"] = count_emval_handles;
|
|
145601
|
-
};
|
|
145602
145754
|
var Emval = { toValue: (handle) => {
|
|
145603
145755
|
if (!handle) {
|
|
145604
|
-
throwBindingError(
|
|
145756
|
+
throwBindingError(`Cannot use deleted val. handle = ${handle}`);
|
|
145605
145757
|
}
|
|
145606
145758
|
return emval_handles[handle];
|
|
145607
145759
|
}, toHandle: (value) => {
|
|
@@ -145646,7 +145798,7 @@ var IfcDbWasm = (() => {
|
|
|
145646
145798
|
name = readLatin1String(name);
|
|
145647
145799
|
registerType(rawType, { name, fromWireType: (value) => value, toWireType: (destructors, value) => value, argPackAdvance: GenericWireTypeSize, readValueFromPointer: floatReadValueFromPointer(name, size), destructorFunction: null });
|
|
145648
145800
|
};
|
|
145649
|
-
var createNamedFunction = (name,
|
|
145801
|
+
var createNamedFunction = (name, func) => Object.defineProperty(func, "name", { value: name });
|
|
145650
145802
|
function usesDestructorStack(argTypes) {
|
|
145651
145803
|
for (var i = 1; i < argTypes.length; ++i) {
|
|
145652
145804
|
if (argTypes[i] !== null && argTypes[i].destructorFunction === void 0) {
|
|
@@ -145655,17 +145807,6 @@ var IfcDbWasm = (() => {
|
|
|
145655
145807
|
}
|
|
145656
145808
|
return false;
|
|
145657
145809
|
}
|
|
145658
|
-
function newFunc(constructor, argumentList) {
|
|
145659
|
-
if (!(constructor instanceof Function)) {
|
|
145660
|
-
throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`);
|
|
145661
|
-
}
|
|
145662
|
-
var dummy = createNamedFunction(constructor.name || "unknownFunctionName", function() {
|
|
145663
|
-
});
|
|
145664
|
-
dummy.prototype = constructor.prototype;
|
|
145665
|
-
var obj = new dummy();
|
|
145666
|
-
var r = constructor.apply(obj, argumentList);
|
|
145667
|
-
return r instanceof Object ? r : obj;
|
|
145668
|
-
}
|
|
145669
145810
|
function createJsInvoker(argTypes, isClassMethodFunc, returns, isAsync) {
|
|
145670
145811
|
var needsDestructorStack = usesDestructorStack(argTypes);
|
|
145671
145812
|
var argCount = argTypes.length - 2;
|
|
@@ -145899,11 +146040,9 @@ var IfcDbWasm = (() => {
|
|
|
145899
146040
|
abort(`invalid state: ${Asyncify.state}`);
|
|
145900
146041
|
}
|
|
145901
146042
|
return Asyncify.handleSleepReturnValue;
|
|
145902
|
-
}, handleAsync(startAsync) {
|
|
145903
|
-
|
|
145904
|
-
|
|
145905
|
-
});
|
|
145906
|
-
} };
|
|
146043
|
+
}, handleAsync: (startAsync) => Asyncify.handleSleep((wakeUp) => {
|
|
146044
|
+
startAsync().then(wakeUp);
|
|
146045
|
+
}) };
|
|
145907
146046
|
function craftInvokerFunction(humanName, argTypes, classType, cppInvokerFunc, cppTargetFunc, isAsync) {
|
|
145908
146047
|
var argCount = argTypes.length;
|
|
145909
146048
|
if (argCount < 2) {
|
|
@@ -145925,8 +146064,7 @@ var IfcDbWasm = (() => {
|
|
|
145925
146064
|
}
|
|
145926
146065
|
}
|
|
145927
146066
|
let [args, invokerFnBody] = createJsInvoker(argTypes, isClassMethodFunc, returns, isAsync);
|
|
145928
|
-
args
|
|
145929
|
-
var invokerFn = newFunc(Function, args)(...closureArgs);
|
|
146067
|
+
var invokerFn = new Function(...args, invokerFnBody)(...closureArgs);
|
|
145930
146068
|
return createNamedFunction(humanName, invokerFn);
|
|
145931
146069
|
}
|
|
145932
146070
|
var ensureOverloadTable = (proto, methodName, humanName) => {
|
|
@@ -145975,17 +146113,8 @@ var IfcDbWasm = (() => {
|
|
|
145975
146113
|
Module[name].argCount = numArguments;
|
|
145976
146114
|
}
|
|
145977
146115
|
};
|
|
145978
|
-
var
|
|
145979
|
-
|
|
145980
|
-
var f = Module["dynCall_" + sig];
|
|
145981
|
-
return f(ptr, ...args);
|
|
145982
|
-
};
|
|
145983
|
-
var dynCall = (sig, ptr, args = []) => {
|
|
145984
|
-
var rtn = dynCallLegacy(sig, ptr, args);
|
|
145985
|
-
return rtn;
|
|
145986
|
-
};
|
|
145987
|
-
var getDynCaller = (sig, ptr) => (...args) => dynCall(sig, ptr, args);
|
|
145988
|
-
var embind__requireFunction = (signature, rawFunction) => {
|
|
146116
|
+
var getDynCaller = (sig, ptr, promising = false) => (...args) => dynCall(sig, ptr, args, promising);
|
|
146117
|
+
var embind__requireFunction = (signature, rawFunction, isAsync = false) => {
|
|
145989
146118
|
signature = readLatin1String(signature);
|
|
145990
146119
|
function makeDynCaller() {
|
|
145991
146120
|
return getDynCaller(signature, rawFunction);
|
|
@@ -145996,27 +146125,8 @@ var IfcDbWasm = (() => {
|
|
|
145996
146125
|
}
|
|
145997
146126
|
return fp;
|
|
145998
146127
|
};
|
|
145999
|
-
|
|
146000
|
-
|
|
146001
|
-
this.name = errorName;
|
|
146002
|
-
this.message = message;
|
|
146003
|
-
var stack = new Error(message).stack;
|
|
146004
|
-
if (stack !== void 0) {
|
|
146005
|
-
this.stack = this.toString() + "\n" + stack.replace(/^Error(:[^\n]*)?\n/, "");
|
|
146006
|
-
}
|
|
146007
|
-
});
|
|
146008
|
-
errorClass.prototype = Object.create(baseErrorType.prototype);
|
|
146009
|
-
errorClass.prototype.constructor = errorClass;
|
|
146010
|
-
errorClass.prototype.toString = function() {
|
|
146011
|
-
if (this.message === void 0) {
|
|
146012
|
-
return this.name;
|
|
146013
|
-
} else {
|
|
146014
|
-
return `${this.name}: ${this.message}`;
|
|
146015
|
-
}
|
|
146016
|
-
};
|
|
146017
|
-
return errorClass;
|
|
146018
|
-
};
|
|
146019
|
-
var UnboundTypeError;
|
|
146128
|
+
class UnboundTypeError extends Error {
|
|
146129
|
+
}
|
|
146020
146130
|
var getTypeName = (type) => {
|
|
146021
146131
|
var ptr = ___getTypeName(type);
|
|
146022
146132
|
var rv = readLatin1String(ptr);
|
|
@@ -146054,7 +146164,7 @@ var IfcDbWasm = (() => {
|
|
|
146054
146164
|
var argTypes = heap32VectorToArray(argCount, rawArgTypesAddr);
|
|
146055
146165
|
name = readLatin1String(name);
|
|
146056
146166
|
name = getFunctionName(name);
|
|
146057
|
-
rawInvoker = embind__requireFunction(signature, rawInvoker);
|
|
146167
|
+
rawInvoker = embind__requireFunction(signature, rawInvoker, isAsync);
|
|
146058
146168
|
exposePublicSymbol(name, function() {
|
|
146059
146169
|
throwUnboundTypeError(`Cannot call ${name} due to unbound types`, argTypes);
|
|
146060
146170
|
}, argCount - 1);
|
|
@@ -146066,27 +146176,14 @@ var IfcDbWasm = (() => {
|
|
|
146066
146176
|
};
|
|
146067
146177
|
var __embind_register_integer = (primitiveType, name, size, minRange, maxRange) => {
|
|
146068
146178
|
name = readLatin1String(name);
|
|
146069
|
-
|
|
146070
|
-
|
|
146179
|
+
const isUnsignedType = minRange === 0;
|
|
146180
|
+
let fromWireType = (value) => value;
|
|
146181
|
+
if (isUnsignedType) {
|
|
146071
146182
|
var bitshift = 32 - 8 * size;
|
|
146072
146183
|
fromWireType = (value) => value << bitshift >>> bitshift;
|
|
146184
|
+
maxRange = fromWireType(maxRange);
|
|
146073
146185
|
}
|
|
146074
|
-
|
|
146075
|
-
var checkAssertions = (value, toTypeName) => {
|
|
146076
|
-
};
|
|
146077
|
-
var toWireType;
|
|
146078
|
-
if (isUnsignedType) {
|
|
146079
|
-
toWireType = function(destructors, value) {
|
|
146080
|
-
checkAssertions(value, this.name);
|
|
146081
|
-
return value >>> 0;
|
|
146082
|
-
};
|
|
146083
|
-
} else {
|
|
146084
|
-
toWireType = function(destructors, value) {
|
|
146085
|
-
checkAssertions(value, this.name);
|
|
146086
|
-
return value;
|
|
146087
|
-
};
|
|
146088
|
-
}
|
|
146089
|
-
registerType(primitiveType, { name, fromWireType, toWireType, argPackAdvance: GenericWireTypeSize, readValueFromPointer: integerReadValueFromPointer(name, size, minRange !== 0), destructorFunction: null });
|
|
146186
|
+
registerType(primitiveType, { name, fromWireType, toWireType: (destructors, value) => value, argPackAdvance: GenericWireTypeSize, readValueFromPointer: integerReadValueFromPointer(name, size, minRange !== 0), destructorFunction: null });
|
|
146090
146187
|
};
|
|
146091
146188
|
var __embind_register_memory_view = (rawType, dataTypeIndex, name) => {
|
|
146092
146189
|
var typeMapping = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, BigInt64Array, BigUint64Array];
|
|
@@ -146131,7 +146228,7 @@ var IfcDbWasm = (() => {
|
|
|
146131
146228
|
}
|
|
146132
146229
|
var length;
|
|
146133
146230
|
var valueIsOfTypeString = typeof value == "string";
|
|
146134
|
-
if (!(valueIsOfTypeString || value
|
|
146231
|
+
if (!(valueIsOfTypeString || ArrayBuffer.isView(value) && value.BYTES_PER_ELEMENT == 1)) {
|
|
146135
146232
|
throwBindingError("Cannot pass non-string to std::string");
|
|
146136
146233
|
}
|
|
146137
146234
|
if (valueIsOfTypeString) {
|
|
@@ -146143,22 +146240,11 @@ var IfcDbWasm = (() => {
|
|
|
146143
146240
|
var ptr = base + 4;
|
|
146144
146241
|
HEAPU32[base >> 2] = length;
|
|
146145
146242
|
if (valueIsOfTypeString) {
|
|
146146
|
-
|
|
146147
|
-
|
|
146148
|
-
if (valueIsOfTypeString) {
|
|
146149
|
-
for (var i = 0; i < length; ++i) {
|
|
146150
|
-
var charCode = value.charCodeAt(i);
|
|
146151
|
-
if (charCode > 255) {
|
|
146152
|
-
_free(base);
|
|
146153
|
-
throwBindingError("String has UTF-16 code units that do not fit in 8 bits");
|
|
146154
|
-
}
|
|
146155
|
-
HEAPU8[ptr + i] = charCode;
|
|
146156
|
-
}
|
|
146157
|
-
} else {
|
|
146158
|
-
for (var i = 0; i < length; ++i) {
|
|
146159
|
-
HEAPU8[ptr + i] = value[i];
|
|
146160
|
-
}
|
|
146243
|
+
{
|
|
146244
|
+
stringToUTF8(value, ptr, length + 1);
|
|
146161
146245
|
}
|
|
146246
|
+
} else {
|
|
146247
|
+
HEAPU8.set(value, ptr);
|
|
146162
146248
|
}
|
|
146163
146249
|
if (destructors !== null) {
|
|
146164
146250
|
destructors.push(_free, base);
|
|
@@ -146170,17 +146256,16 @@ var IfcDbWasm = (() => {
|
|
|
146170
146256
|
};
|
|
146171
146257
|
var UTF16Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf-16le") : void 0;
|
|
146172
146258
|
var UTF16ToString = (ptr, maxBytesToRead) => {
|
|
146173
|
-
var
|
|
146174
|
-
var idx = endPtr >> 1;
|
|
146259
|
+
var idx = ptr >> 1;
|
|
146175
146260
|
var maxIdx = idx + maxBytesToRead / 2;
|
|
146176
|
-
|
|
146177
|
-
|
|
146178
|
-
|
|
146179
|
-
if (
|
|
146180
|
-
return UTF16Decoder.decode(
|
|
146261
|
+
var endIdx = idx;
|
|
146262
|
+
while (!(endIdx >= maxIdx) && HEAPU16[endIdx])
|
|
146263
|
+
++endIdx;
|
|
146264
|
+
if (endIdx - idx > 16 && UTF16Decoder)
|
|
146265
|
+
return UTF16Decoder.decode(HEAPU16.subarray(idx, endIdx));
|
|
146181
146266
|
var str = "";
|
|
146182
|
-
for (var i =
|
|
146183
|
-
var codeUnit =
|
|
146267
|
+
for (var i = idx; !(i >= maxIdx); ++i) {
|
|
146268
|
+
var codeUnit = HEAPU16[i];
|
|
146184
146269
|
if (codeUnit == 0)
|
|
146185
146270
|
break;
|
|
146186
146271
|
str += String.fromCharCode(codeUnit);
|
|
@@ -146368,7 +146453,7 @@ var IfcDbWasm = (() => {
|
|
|
146368
146453
|
var emval_lookupTypes = (argCount, argTypes) => {
|
|
146369
146454
|
var a = new Array(argCount);
|
|
146370
146455
|
for (var i = 0; i < argCount; ++i) {
|
|
146371
|
-
a[i] = requireRegisteredType(HEAPU32[argTypes + i * 4 >> 2],
|
|
146456
|
+
a[i] = requireRegisteredType(HEAPU32[argTypes + i * 4 >> 2], `parameter ${i}`);
|
|
146372
146457
|
}
|
|
146373
146458
|
return a;
|
|
146374
146459
|
};
|
|
@@ -146386,8 +146471,8 @@ var IfcDbWasm = (() => {
|
|
|
146386
146471
|
var params = ["retType"];
|
|
146387
146472
|
var args = [retType];
|
|
146388
146473
|
for (var i = 0; i < argCount; ++i) {
|
|
146389
|
-
argsList.push(
|
|
146390
|
-
params.push(
|
|
146474
|
+
argsList.push(`arg${i}`);
|
|
146475
|
+
params.push(`argType${i}`);
|
|
146391
146476
|
args.push(types[i]);
|
|
146392
146477
|
functionBody += ` var arg${i} = argType${i}.readValueFromPointer(args${offset ? "+" + offset : ""});
|
|
146393
146478
|
`;
|
|
@@ -146402,8 +146487,7 @@ var IfcDbWasm = (() => {
|
|
|
146402
146487
|
functionBody += " return emval_returnValue(retType, destructorsRef, rv);\n";
|
|
146403
146488
|
}
|
|
146404
146489
|
functionBody += "};\n";
|
|
146405
|
-
params
|
|
146406
|
-
var invokerFunction = newFunc(Function, params)(...args);
|
|
146490
|
+
var invokerFunction = new Function(...params, functionBody)(...args);
|
|
146407
146491
|
var functionName = `methodCaller<(${types.map((t) => t.name).join(", ")}) => ${retType.name}>`;
|
|
146408
146492
|
return emval_addMethodCaller(createNamedFunction(functionName, invokerFunction));
|
|
146409
146493
|
};
|
|
@@ -146426,6 +146510,23 @@ var IfcDbWasm = (() => {
|
|
|
146426
146510
|
var v = type["readValueFromPointer"](arg);
|
|
146427
146511
|
return Emval.toHandle(v);
|
|
146428
146512
|
};
|
|
146513
|
+
var INT53_MAX = 9007199254740992;
|
|
146514
|
+
var INT53_MIN = -9007199254740992;
|
|
146515
|
+
var bigintToI53Checked = (num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
|
|
146516
|
+
function __gmtime_js(time, tmPtr) {
|
|
146517
|
+
time = bigintToI53Checked(time);
|
|
146518
|
+
var date = new Date(time * 1e3);
|
|
146519
|
+
HEAP32[tmPtr >> 2] = date.getUTCSeconds();
|
|
146520
|
+
HEAP32[tmPtr + 4 >> 2] = date.getUTCMinutes();
|
|
146521
|
+
HEAP32[tmPtr + 8 >> 2] = date.getUTCHours();
|
|
146522
|
+
HEAP32[tmPtr + 12 >> 2] = date.getUTCDate();
|
|
146523
|
+
HEAP32[tmPtr + 16 >> 2] = date.getUTCMonth();
|
|
146524
|
+
HEAP32[tmPtr + 20 >> 2] = date.getUTCFullYear() - 1900;
|
|
146525
|
+
HEAP32[tmPtr + 24 >> 2] = date.getUTCDay();
|
|
146526
|
+
var start = Date.UTC(date.getUTCFullYear(), 0, 1, 0, 0, 0, 0);
|
|
146527
|
+
var yday = (date.getTime() - start) / (1e3 * 60 * 60 * 24) | 0;
|
|
146528
|
+
HEAP32[tmPtr + 28 >> 2] = yday;
|
|
146529
|
+
}
|
|
146429
146530
|
var isLeapYear = (year) => year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
146430
146531
|
var MONTH_DAYS_LEAP_CUMULATIVE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
|
|
146431
146532
|
var MONTH_DAYS_REGULAR_CUMULATIVE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
|
|
@@ -146435,9 +146536,6 @@ var IfcDbWasm = (() => {
|
|
|
146435
146536
|
var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1;
|
|
146436
146537
|
return yday;
|
|
146437
146538
|
};
|
|
146438
|
-
var INT53_MAX = 9007199254740992;
|
|
146439
|
-
var INT53_MIN = -9007199254740992;
|
|
146440
|
-
var bigintToI53Checked = (num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num);
|
|
146441
146539
|
function __localtime_js(time, tmPtr) {
|
|
146442
146540
|
time = bigintToI53Checked(time);
|
|
146443
146541
|
var date = new Date(time * 1e3);
|
|
@@ -146457,39 +146555,6 @@ var IfcDbWasm = (() => {
|
|
|
146457
146555
|
var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset)) | 0;
|
|
146458
146556
|
HEAP32[tmPtr + 32 >> 2] = dst;
|
|
146459
146557
|
}
|
|
146460
|
-
var __mktime_js = function(tmPtr) {
|
|
146461
|
-
var ret = (() => {
|
|
146462
|
-
var date = new Date(HEAP32[tmPtr + 20 >> 2] + 1900, HEAP32[tmPtr + 16 >> 2], HEAP32[tmPtr + 12 >> 2], HEAP32[tmPtr + 8 >> 2], HEAP32[tmPtr + 4 >> 2], HEAP32[tmPtr >> 2], 0);
|
|
146463
|
-
var dst = HEAP32[tmPtr + 32 >> 2];
|
|
146464
|
-
var guessedOffset = date.getTimezoneOffset();
|
|
146465
|
-
var start = new Date(date.getFullYear(), 0, 1);
|
|
146466
|
-
var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset();
|
|
146467
|
-
var winterOffset = start.getTimezoneOffset();
|
|
146468
|
-
var dstOffset = Math.min(winterOffset, summerOffset);
|
|
146469
|
-
if (dst < 0) {
|
|
146470
|
-
HEAP32[tmPtr + 32 >> 2] = Number(summerOffset != winterOffset && dstOffset == guessedOffset);
|
|
146471
|
-
} else if (dst > 0 != (dstOffset == guessedOffset)) {
|
|
146472
|
-
var nonDstOffset = Math.max(winterOffset, summerOffset);
|
|
146473
|
-
var trueOffset = dst > 0 ? dstOffset : nonDstOffset;
|
|
146474
|
-
date.setTime(date.getTime() + (trueOffset - guessedOffset) * 6e4);
|
|
146475
|
-
}
|
|
146476
|
-
HEAP32[tmPtr + 24 >> 2] = date.getDay();
|
|
146477
|
-
var yday = ydayFromDate(date) | 0;
|
|
146478
|
-
HEAP32[tmPtr + 28 >> 2] = yday;
|
|
146479
|
-
HEAP32[tmPtr >> 2] = date.getSeconds();
|
|
146480
|
-
HEAP32[tmPtr + 4 >> 2] = date.getMinutes();
|
|
146481
|
-
HEAP32[tmPtr + 8 >> 2] = date.getHours();
|
|
146482
|
-
HEAP32[tmPtr + 12 >> 2] = date.getDate();
|
|
146483
|
-
HEAP32[tmPtr + 16 >> 2] = date.getMonth();
|
|
146484
|
-
HEAP32[tmPtr + 20 >> 2] = date.getYear();
|
|
146485
|
-
var timeMs = date.getTime();
|
|
146486
|
-
if (isNaN(timeMs)) {
|
|
146487
|
-
return -1;
|
|
146488
|
-
}
|
|
146489
|
-
return timeMs / 1e3;
|
|
146490
|
-
})();
|
|
146491
|
-
return BigInt(ret);
|
|
146492
|
-
};
|
|
146493
146558
|
var __tzset_js = (timezone, daylight, std_name, dst_name) => {
|
|
146494
146559
|
var currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
146495
146560
|
var winter = new Date(currentYear, 0, 1);
|
|
@@ -146552,7 +146617,7 @@ var IfcDbWasm = (() => {
|
|
|
146552
146617
|
};
|
|
146553
146618
|
var _emscripten_asm_const_int = (code, sigPtr, argbuf) => runEmAsmFunction(code, sigPtr, argbuf);
|
|
146554
146619
|
var getHeapMax = () => 2147483648;
|
|
146555
|
-
var
|
|
146620
|
+
var alignMemory = (size, alignment) => Math.ceil(size / alignment) * alignment;
|
|
146556
146621
|
var growMemory = (size) => {
|
|
146557
146622
|
var b = wasmMemory.buffer;
|
|
146558
146623
|
var pages = (size - b.byteLength + 65535) / 65536 | 0;
|
|
@@ -146606,27 +146671,24 @@ var IfcDbWasm = (() => {
|
|
|
146606
146671
|
}
|
|
146607
146672
|
return getEnvStrings.strings;
|
|
146608
146673
|
};
|
|
146609
|
-
var stringToAscii = (str, buffer) => {
|
|
146610
|
-
for (var i = 0; i < str.length; ++i) {
|
|
146611
|
-
HEAP8[buffer++] = str.charCodeAt(i);
|
|
146612
|
-
}
|
|
146613
|
-
HEAP8[buffer] = 0;
|
|
146614
|
-
};
|
|
146615
146674
|
var _environ_get = (__environ, environ_buf) => {
|
|
146616
146675
|
var bufSize = 0;
|
|
146617
|
-
|
|
146676
|
+
var envp = 0;
|
|
146677
|
+
for (var string of getEnvStrings()) {
|
|
146618
146678
|
var ptr = environ_buf + bufSize;
|
|
146619
|
-
HEAPU32[__environ +
|
|
146620
|
-
|
|
146621
|
-
|
|
146622
|
-
}
|
|
146679
|
+
HEAPU32[__environ + envp >> 2] = ptr;
|
|
146680
|
+
bufSize += stringToUTF8(string, ptr, Infinity) + 1;
|
|
146681
|
+
envp += 4;
|
|
146682
|
+
}
|
|
146623
146683
|
return 0;
|
|
146624
146684
|
};
|
|
146625
146685
|
var _environ_sizes_get = (penviron_count, penviron_buf_size) => {
|
|
146626
146686
|
var strings = getEnvStrings();
|
|
146627
146687
|
HEAPU32[penviron_count >> 2] = strings.length;
|
|
146628
146688
|
var bufSize = 0;
|
|
146629
|
-
|
|
146689
|
+
for (var string of strings) {
|
|
146690
|
+
bufSize += lengthBytesUTF8(string) + 1;
|
|
146691
|
+
}
|
|
146630
146692
|
HEAPU32[penviron_buf_size >> 2] = bufSize;
|
|
146631
146693
|
return 0;
|
|
146632
146694
|
};
|
|
@@ -146641,6 +146703,26 @@ var IfcDbWasm = (() => {
|
|
|
146641
146703
|
return e.errno;
|
|
146642
146704
|
}
|
|
146643
146705
|
}
|
|
146706
|
+
function _fd_fdstat_get(fd, pbuf) {
|
|
146707
|
+
try {
|
|
146708
|
+
var rightsBase = 0;
|
|
146709
|
+
var rightsInheriting = 0;
|
|
146710
|
+
var flags = 0;
|
|
146711
|
+
{
|
|
146712
|
+
var stream = SYSCALLS.getStreamFromFD(fd);
|
|
146713
|
+
var type = stream.tty ? 2 : FS.isDir(stream.mode) ? 3 : FS.isLink(stream.mode) ? 7 : 4;
|
|
146714
|
+
}
|
|
146715
|
+
HEAP8[pbuf] = type;
|
|
146716
|
+
HEAP16[pbuf + 2 >> 1] = flags;
|
|
146717
|
+
HEAP64[pbuf + 8 >> 3] = BigInt(rightsBase);
|
|
146718
|
+
HEAP64[pbuf + 16 >> 3] = BigInt(rightsInheriting);
|
|
146719
|
+
return 0;
|
|
146720
|
+
} catch (e) {
|
|
146721
|
+
if (typeof FS == "undefined" || !(e.name === "ErrnoError"))
|
|
146722
|
+
throw e;
|
|
146723
|
+
return e.errno;
|
|
146724
|
+
}
|
|
146725
|
+
}
|
|
146644
146726
|
var doReadv = (stream, iov, iovcnt, offset) => {
|
|
146645
146727
|
var ret = 0;
|
|
146646
146728
|
for (var i = 0; i < iovcnt; i++) {
|
|
@@ -146730,61 +146812,66 @@ var IfcDbWasm = (() => {
|
|
|
146730
146812
|
FS.staticInit();
|
|
146731
146813
|
MEMFS.doesNotExistError = new FS.ErrnoError(44);
|
|
146732
146814
|
MEMFS.doesNotExistError.stack = "<generic error, no stack>";
|
|
146733
|
-
InternalError = Module["InternalError"] = class InternalError extends Error {
|
|
146734
|
-
constructor(message) {
|
|
146735
|
-
super(message);
|
|
146736
|
-
this.name = "InternalError";
|
|
146737
|
-
}
|
|
146738
|
-
};
|
|
146739
146815
|
embind_init_charCodes();
|
|
146740
|
-
|
|
146741
|
-
|
|
146742
|
-
|
|
146743
|
-
|
|
146744
|
-
|
|
146745
|
-
|
|
146746
|
-
|
|
146747
|
-
|
|
146748
|
-
|
|
146816
|
+
{
|
|
146817
|
+
if (Module["noExitRuntime"])
|
|
146818
|
+
noExitRuntime = Module["noExitRuntime"];
|
|
146819
|
+
if (Module["preloadPlugins"])
|
|
146820
|
+
preloadPlugins = Module["preloadPlugins"];
|
|
146821
|
+
if (Module["print"])
|
|
146822
|
+
out = Module["print"];
|
|
146823
|
+
if (Module["printErr"])
|
|
146824
|
+
err = Module["printErr"];
|
|
146825
|
+
if (Module["wasmBinary"])
|
|
146826
|
+
wasmBinary = Module["wasmBinary"];
|
|
146827
|
+
if (Module["arguments"])
|
|
146828
|
+
arguments_ = Module["arguments"];
|
|
146829
|
+
if (Module["thisProgram"])
|
|
146830
|
+
thisProgram = Module["thisProgram"];
|
|
146831
|
+
}
|
|
146832
|
+
var ASM_CONSTS = { 1473352: () => {
|
|
146833
|
+
console.error("progress callback is not set.");
|
|
146834
|
+
} };
|
|
146835
|
+
var wasmImports = { a: ___cxa_throw, j: ___syscall_fcntl64, G: ___syscall_ioctl, H: ___syscall_openat, r: ___syscall_renameat, s: ___syscall_rmdir, w: ___syscall_stat64, t: ___syscall_unlinkat, u: __abort_js, L: __embind_finalize_value_object, m: __embind_register_bigint, R: __embind_register_bool, P: __embind_register_emval, l: __embind_register_float, f: __embind_register_function, c: __embind_register_integer, b: __embind_register_memory_view, Q: __embind_register_std_string, g: __embind_register_std_wstring, O: __embind_register_value_object, M: __embind_register_value_object_field, S: __embind_register_void, N: __emval_as, d: __emval_call, q: __emval_decref, F: __emval_get_global, e: __emval_get_method_caller, o: __emval_incref, T: __emval_is_string, n: __emval_run_destructors, p: __emval_take_value, x: __gmtime_js, y: __localtime_js, z: __tzset_js, J: _clock_time_get, K: _emscripten_asm_const_int, I: _emscripten_date_now, v: _emscripten_resize_heap, k: _emscripten_sleep, C: _environ_get, D: _environ_sizes_get, h: _fd_close, B: _fd_fdstat_get, E: _fd_read, A: _fd_seek, i: _fd_write };
|
|
146749
146836
|
var wasmExports = await createWasm();
|
|
146750
146837
|
wasmExports["V"];
|
|
146751
146838
|
var ___getTypeName = wasmExports["W"];
|
|
146752
|
-
var _malloc = wasmExports["
|
|
146753
|
-
var _free = wasmExports["
|
|
146754
|
-
var _main = Module["_main"] = wasmExports["
|
|
146755
|
-
var __emscripten_stack_alloc = wasmExports["
|
|
146839
|
+
var _malloc = wasmExports["X"];
|
|
146840
|
+
var _free = wasmExports["Y"];
|
|
146841
|
+
var _main = Module["_main"] = wasmExports["Z"];
|
|
146842
|
+
var __emscripten_stack_alloc = wasmExports["_"];
|
|
146843
|
+
Module["dynCall_ii"] = wasmExports["$"];
|
|
146756
146844
|
Module["dynCall_vi"] = wasmExports["aa"];
|
|
146757
|
-
Module["
|
|
146758
|
-
Module["
|
|
146759
|
-
Module["
|
|
146760
|
-
Module["
|
|
146761
|
-
Module["
|
|
146762
|
-
Module["
|
|
146845
|
+
Module["dynCall_vii"] = wasmExports["ba"];
|
|
146846
|
+
Module["dynCall_iii"] = wasmExports["ca"];
|
|
146847
|
+
Module["dynCall_viii"] = wasmExports["da"];
|
|
146848
|
+
Module["dynCall_v"] = wasmExports["ea"];
|
|
146849
|
+
Module["dynCall_diiii"] = wasmExports["fa"];
|
|
146850
|
+
Module["dynCall_viif"] = wasmExports["ga"];
|
|
146763
146851
|
Module["dynCall_iiiii"] = wasmExports["ha"];
|
|
146764
|
-
Module["
|
|
146765
|
-
Module["
|
|
146766
|
-
Module["
|
|
146767
|
-
Module["
|
|
146768
|
-
Module["
|
|
146769
|
-
Module["
|
|
146770
|
-
Module["
|
|
146771
|
-
Module["
|
|
146772
|
-
Module["
|
|
146773
|
-
Module["
|
|
146774
|
-
Module["
|
|
146775
|
-
Module["
|
|
146776
|
-
Module["
|
|
146777
|
-
Module["
|
|
146778
|
-
Module["
|
|
146779
|
-
Module["
|
|
146780
|
-
Module["
|
|
146781
|
-
Module["
|
|
146782
|
-
Module["
|
|
146783
|
-
|
|
146784
|
-
var
|
|
146785
|
-
var
|
|
146786
|
-
var
|
|
146787
|
-
var _asyncify_stop_rewind = wasmExports["Fa"];
|
|
146852
|
+
Module["dynCall_iiii"] = wasmExports["ia"];
|
|
146853
|
+
Module["dynCall_ddd"] = wasmExports["ja"];
|
|
146854
|
+
Module["dynCall_i"] = wasmExports["ka"];
|
|
146855
|
+
Module["dynCall_fii"] = wasmExports["la"];
|
|
146856
|
+
Module["dynCall_viiii"] = wasmExports["ma"];
|
|
146857
|
+
Module["dynCall_iiiiii"] = wasmExports["na"];
|
|
146858
|
+
Module["dynCall_idd"] = wasmExports["oa"];
|
|
146859
|
+
Module["dynCall_jiji"] = wasmExports["pa"];
|
|
146860
|
+
Module["dynCall_iidiiii"] = wasmExports["qa"];
|
|
146861
|
+
Module["dynCall_viijii"] = wasmExports["ra"];
|
|
146862
|
+
Module["dynCall_iiiiiiiii"] = wasmExports["sa"];
|
|
146863
|
+
Module["dynCall_iiiiiii"] = wasmExports["ta"];
|
|
146864
|
+
Module["dynCall_iiiiij"] = wasmExports["ua"];
|
|
146865
|
+
Module["dynCall_iiiiid"] = wasmExports["va"];
|
|
146866
|
+
Module["dynCall_iiiiijj"] = wasmExports["wa"];
|
|
146867
|
+
Module["dynCall_iiiiiiii"] = wasmExports["xa"];
|
|
146868
|
+
Module["dynCall_iiiiiijj"] = wasmExports["ya"];
|
|
146869
|
+
Module["dynCall_viiiiii"] = wasmExports["za"];
|
|
146870
|
+
Module["dynCall_viiiii"] = wasmExports["Aa"];
|
|
146871
|
+
var _asyncify_start_unwind = wasmExports["Ba"];
|
|
146872
|
+
var _asyncify_stop_unwind = wasmExports["Ca"];
|
|
146873
|
+
var _asyncify_start_rewind = wasmExports["Da"];
|
|
146874
|
+
var _asyncify_stop_rewind = wasmExports["Ea"];
|
|
146788
146875
|
function callMain(args = []) {
|
|
146789
146876
|
var entryFunction = _main;
|
|
146790
146877
|
args.unshift(thisProgram);
|
|
@@ -146836,13 +146923,16 @@ var IfcDbWasm = (() => {
|
|
|
146836
146923
|
doRun();
|
|
146837
146924
|
}
|
|
146838
146925
|
}
|
|
146839
|
-
|
|
146840
|
-
if (
|
|
146841
|
-
Module["preInit"]
|
|
146842
|
-
|
|
146843
|
-
Module["preInit"].
|
|
146926
|
+
function preInit() {
|
|
146927
|
+
if (Module["preInit"]) {
|
|
146928
|
+
if (typeof Module["preInit"] == "function")
|
|
146929
|
+
Module["preInit"] = [Module["preInit"]];
|
|
146930
|
+
while (Module["preInit"].length > 0) {
|
|
146931
|
+
Module["preInit"].shift()();
|
|
146932
|
+
}
|
|
146844
146933
|
}
|
|
146845
146934
|
}
|
|
146935
|
+
preInit();
|
|
146846
146936
|
run();
|
|
146847
146937
|
moduleRtn = readyPromise;
|
|
146848
146938
|
return moduleRtn;
|
|
@@ -146855,20 +146945,20 @@ var __publicField$1 = (obj, key, value) => {
|
|
|
146855
146945
|
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
146856
146946
|
return value;
|
|
146857
146947
|
};
|
|
146858
|
-
const cdnUrl = `https://cdn.jsdelivr.net/npm/@creooxag/
|
|
146948
|
+
const cdnUrl = `https://cdn.jsdelivr.net/npm/@creooxag/cxconverter@${packageJSON.version}/dist/`;
|
|
146859
146949
|
const defaultUrlPrefix = "./";
|
|
146860
146950
|
const _IfcWasmConverterLoader = class _IfcWasmConverterLoader {
|
|
146861
146951
|
constructor() {
|
|
146862
146952
|
__publicField$1(this, "module");
|
|
146863
146953
|
}
|
|
146864
|
-
static async getInstance(userUrlPrefix) {
|
|
146954
|
+
static async getInstance(userUrlPrefix = "remote") {
|
|
146865
146955
|
let urlPrefix = defaultUrlPrefix;
|
|
146866
146956
|
if (userUrlPrefix) {
|
|
146867
146957
|
urlPrefix = userUrlPrefix == "remote" ? cdnUrl : userUrlPrefix;
|
|
146868
146958
|
}
|
|
146869
146959
|
if (!_IfcWasmConverterLoader.instance) {
|
|
146870
146960
|
_IfcWasmConverterLoader.instance = new _IfcWasmConverterLoader();
|
|
146871
|
-
|
|
146961
|
+
const Module = {
|
|
146872
146962
|
locateFile: function(path) {
|
|
146873
146963
|
const fullPath = urlPrefix + path;
|
|
146874
146964
|
if (path.endsWith(".wasm")) {
|
|
@@ -146893,7 +146983,9 @@ const _IfcWasmConverterLoader = class _IfcWasmConverterLoader {
|
|
|
146893
146983
|
__publicField$1(_IfcWasmConverterLoader, "instance");
|
|
146894
146984
|
let IfcWasmConverterLoader = _IfcWasmConverterLoader;
|
|
146895
146985
|
|
|
146896
|
-
async function ifc2gltf(ifcData, params) {
|
|
146986
|
+
async function ifc2gltf(ifcData, params = { remote: true }) {
|
|
146987
|
+
if (params.remote == void 0)
|
|
146988
|
+
params.remote = true;
|
|
146897
146989
|
const inputOptionsString = params.inputOptions ? params.inputOptions : JSON.stringify(inputOptionsDefault);
|
|
146898
146990
|
const loadOptions = {
|
|
146899
146991
|
"maxFileSizeInMegaBytes": 1e3
|
|
@@ -146976,17 +147068,17 @@ async function fetchFile(url) {
|
|
|
146976
147068
|
}
|
|
146977
147069
|
|
|
146978
147070
|
/**
|
|
146979
|
-
* {@link Viewer} plugin that uses [CxConverter](https://github.com/Creoox/cxconverter) to load BIM models directly from IFC files, using its WebAssembly buid from [npm package](https://www.npmjs.com/package/@creooxag/
|
|
147071
|
+
* {@link Viewer} plugin that uses [CxConverter](https://github.com/Creoox/cxconverter) to load BIM models directly from IFC files, using its WebAssembly buid from [npm package](https://www.npmjs.com/package/@creooxag/cxconverter).
|
|
146980
147072
|
*
|
|
146981
147073
|
* ## Overview
|
|
146982
147074
|
* The WebAssembly build of CxConverter is still in alfa stage, so it may not work as expected. This documentation will be updated as the library and the plugin evolve. The example below shows how to use the plugin:
|
|
146983
147075
|
* ````javascript
|
|
146984
147076
|
* import { CxConverterIFCLoaderPlugin, Viewer } from "../../dist/xeokit-sdk.es.js";
|
|
146985
147077
|
* const cxConverterIFCLoaderPlugin = new CxConverterIFCLoaderPlugin(viewer);
|
|
146986
|
-
*
|
|
147078
|
+
*
|
|
146987
147079
|
* const sceneModel = await cxConverterIFCLoaderPlugin.load({
|
|
146988
147080
|
* src: "../../assets/models/ifc/Duplex.ifc"
|
|
146989
|
-
* });
|
|
147081
|
+
* });
|
|
146990
147082
|
* ````
|
|
146991
147083
|
See the code in action [here](https://xeokit.github.io/xeokit-sdk/examples/buildings/#cxConverterIFC_vbo_Duplex).
|
|
146992
147084
|
*/
|
|
@@ -170658,6 +170750,7 @@ exports.SpriteMarker = SpriteMarker;
|
|
|
170658
170750
|
exports.StoreyViewsPlugin = StoreyViewsPlugin;
|
|
170659
170751
|
exports.Texture = Texture;
|
|
170660
170752
|
exports.TextureTranscoder = TextureTranscoder;
|
|
170753
|
+
exports.TransformControl = TransformControl;
|
|
170661
170754
|
exports.TreeViewPlugin = TreeViewPlugin;
|
|
170662
170755
|
exports.UnsignedByteType = UnsignedByteType;
|
|
170663
170756
|
exports.UnsignedInt248Type = UnsignedInt248Type;
|
|
@@ -170704,6 +170797,7 @@ exports.buildVectorTextGeometry = buildVectorTextGeometry;
|
|
|
170704
170797
|
exports.createCombinedTexture = createCombinedTexture;
|
|
170705
170798
|
exports.createRTCViewMat = createRTCViewMat;
|
|
170706
170799
|
exports.createSkyboxMesh = createSkyboxMesh;
|
|
170800
|
+
exports.createSphereMapMesh = createSphereMapMesh;
|
|
170707
170801
|
exports.frustumIntersectsAABB3 = frustumIntersectsAABB3;
|
|
170708
170802
|
exports.getKTX2TextureTranscoder = getKTX2TextureTranscoder;
|
|
170709
170803
|
exports.getPlaneRTCPos = getPlaneRTCPos;
|