@xeokit/xeokit-sdk 2.5.2-beta-8 → 2.5.2-beta-10
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/dist/xeokit-sdk.cjs.js +73 -31
- package/dist/xeokit-sdk.es.js +73 -31
- package/dist/xeokit-sdk.es5.js +20 -12
- package/dist/xeokit-sdk.min.cjs.js +5 -5
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +4 -4
- package/package.json +1 -1
- package/src/plugins/AnnotationsPlugin/Annotation.js +2 -2
- package/src/plugins/GLTFLoaderPlugin/GLTFDefaultDataSource.js +5 -4
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +4 -5
- package/src/plugins/XKTLoaderPlugin/parsers/ParserV11.js +663 -0
- package/src/viewer/Plugin.js +9 -0
- package/src/viewer/scene/Component.js +8 -0
- package/src/viewer/scene/core.js +41 -15
- package/src/viewer/scene/utils/FileLoader.js +2 -1
- package/src/viewer/scene/utils.js +6 -4
package/package.json
CHANGED
|
@@ -151,7 +151,7 @@ class Annotation extends Marker {
|
|
|
151
151
|
if (utils.isArray(markerHTML)) {
|
|
152
152
|
markerHTML = markerHTML.join("");
|
|
153
153
|
}
|
|
154
|
-
markerHTML = this._renderTemplate(markerHTML);
|
|
154
|
+
markerHTML = this._renderTemplate(markerHTML.trim());
|
|
155
155
|
const markerFragment = document.createRange().createContextualFragment(markerHTML);
|
|
156
156
|
this._marker = markerFragment.firstChild;
|
|
157
157
|
this._container.appendChild(this._marker);
|
|
@@ -178,7 +178,7 @@ class Annotation extends Marker {
|
|
|
178
178
|
if (utils.isArray(labelHTML)) {
|
|
179
179
|
labelHTML = labelHTML.join("");
|
|
180
180
|
}
|
|
181
|
-
labelHTML = this._renderTemplate(labelHTML);
|
|
181
|
+
labelHTML = this._renderTemplate(labelHTML.trim());
|
|
182
182
|
const labelFragment = document.createRange().createContextualFragment(labelHTML);
|
|
183
183
|
this._label = labelFragment.firstChild;
|
|
184
184
|
this._container.appendChild(this._label);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {utils} from "../../viewer/scene/utils.js";
|
|
2
|
+
import {core} from "../../viewer/scene/core";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Default data access strategy for {@link GLTFLoaderPlugin}.
|
|
@@ -104,13 +105,13 @@ function loadArraybuffer(glTFSrc, binarySrc, ok, err) {
|
|
|
104
105
|
for (var i = 0; i < data.length; i++) {
|
|
105
106
|
view[i] = data.charCodeAt(i);
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
+
core.scheduleTask(function () {
|
|
108
109
|
ok(buffer);
|
|
109
|
-
}
|
|
110
|
+
});
|
|
110
111
|
} catch (error) {
|
|
111
|
-
|
|
112
|
+
core.scheduleTask(function () {
|
|
112
113
|
err(error);
|
|
113
|
-
}
|
|
114
|
+
});
|
|
114
115
|
}
|
|
115
116
|
} else {
|
|
116
117
|
const basePath = getBasePath(glTFSrc);
|
|
@@ -957,14 +957,13 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
957
957
|
sceneModel.once("destroyed", () => {
|
|
958
958
|
this.viewer.metaScene.destroyMetaModel(metaModel.id);
|
|
959
959
|
});
|
|
960
|
-
|
|
961
|
-
|
|
960
|
+
this.scheduleTask(() => {
|
|
962
961
|
if (sceneModel.destroyed) {
|
|
963
962
|
return;
|
|
964
963
|
}
|
|
965
964
|
sceneModel.scene.fire("modelLoaded", sceneModel.id); // FIXME: Assumes listeners know order of these two events
|
|
966
965
|
sceneModel.fire("loaded", true, false); // Don't forget the event, for late subscribers
|
|
967
|
-
}
|
|
966
|
+
});
|
|
968
967
|
}
|
|
969
968
|
|
|
970
969
|
const error = (errMsg) => {
|
|
@@ -1042,7 +1041,7 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
1042
1041
|
globalizeObjectIds: options.globalizeObjectIds
|
|
1043
1042
|
});
|
|
1044
1043
|
i++;
|
|
1045
|
-
|
|
1044
|
+
this.scheduleTask( loadNext, 100);
|
|
1046
1045
|
}, error);
|
|
1047
1046
|
}
|
|
1048
1047
|
}
|
|
@@ -1057,7 +1056,7 @@ class XKTLoaderPlugin extends Plugin {
|
|
|
1057
1056
|
this._dataSource.getXKT(`${baseDir}${xktFiles[i]}`, (arrayBuffer) => {
|
|
1058
1057
|
this._parseModel(arrayBuffer, params, options, sceneModel, metaModel, manifestCtx);
|
|
1059
1058
|
i++;
|
|
1060
|
-
|
|
1059
|
+
this.scheduleTask(loadNext, 100);
|
|
1061
1060
|
}, error);
|
|
1062
1061
|
}
|
|
1063
1062
|
}
|