@avs/go 0.12.71739 → 0.13.71740
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/demo/data/hydrogen.json +1 -1
- package/demo/jsonView.html +2 -2
- package/dist/avs-go.min.js +1 -1
- package/package.json +1 -1
- package/src/avs-go-dataviz.js +24 -19
- package/src/constants.js +1 -1
package/package.json
CHANGED
package/src/avs-go-dataviz.js
CHANGED
|
@@ -956,29 +956,34 @@ export class AvsGoDataViz extends AvsDataSourceMixin(AvsStreamMixin(AvsHttpMixin
|
|
|
956
956
|
this._handleLoadComplete();
|
|
957
957
|
}
|
|
958
958
|
else if (json.threejs) {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
959
|
+
if (json.threejs.chunkId) {
|
|
960
|
+
this.threeViewer.loadGeometryAsEvents(json.threejs, this._handleLoadComplete.bind(this));
|
|
961
|
+
|
|
962
|
+
if (json.threejs.moreChunks === true) {
|
|
963
|
+
if (this.urlLoadJsonFile) {
|
|
964
|
+
// Load the next chunk file
|
|
965
|
+
this.chunkFile++;
|
|
966
|
+
const urlBase = this.url.substring(0, this.url.lastIndexOf('.')) || this.url;
|
|
967
|
+
const ext = this.url.split('.').pop();
|
|
968
|
+
this._httpRequest(urlBase + '-' + this.chunkFile + '.' + ext, this._handleHttpResponse.bind(this), undefined, this._handleHttpError.bind(this));
|
|
969
|
+
}
|
|
970
|
+
else {
|
|
971
|
+
// Get the next chunk from the server
|
|
972
|
+
var model = this._assembleModel();
|
|
973
|
+
if (model) {
|
|
974
|
+
model.rendererProperties.streamProperties.chunkId = json.threejs.chunkId;
|
|
975
|
+
this._httpRequest(this.url, this._handleHttpResponse.bind(this), undefined, this._handleHttpError.bind(this), model);
|
|
976
|
+
}
|
|
976
977
|
}
|
|
977
978
|
}
|
|
978
979
|
}
|
|
980
|
+
else {
|
|
981
|
+
this.threeViewer.loadGeometryAsJson(json.threejs, this._handleLoadComplete.bind(this));
|
|
982
|
+
}
|
|
979
983
|
}
|
|
980
|
-
else
|
|
981
|
-
|
|
984
|
+
else {
|
|
985
|
+
console.log("ERROR: No image, SVG, or ThreeJS found in response.");
|
|
986
|
+
this._handleLoadComplete();
|
|
982
987
|
}
|
|
983
988
|
}
|
|
984
989
|
}
|
package/src/constants.js
CHANGED