@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avs/go",
3
- "version": "0.12.71739",
3
+ "version": "0.13.71740",
4
4
  "description": "AVS Go",
5
5
  "keywords": [
6
6
  "polymer",
@@ -956,29 +956,34 @@ export class AvsGoDataViz extends AvsDataSourceMixin(AvsStreamMixin(AvsHttpMixin
956
956
  this._handleLoadComplete();
957
957
  }
958
958
  else if (json.threejs) {
959
- this.threeViewer.loadGeometryAsJson(json.threejs, this._handleLoadComplete.bind(this));
960
- }
961
- else if (json.chunkId) {
962
- this.threeViewer.loadGeometryAsEvents(json, this._handleLoadComplete.bind(this));
963
-
964
- if (json.moreChunks === true) {
965
- if (this.urlLoadJsonFile) {
966
- this.chunkFile++;
967
- const urlBase = this.url.substring(0, this.url.lastIndexOf('.')) || this.url;
968
- const ext = this.url.split('.').pop();
969
- this._httpRequest(urlBase + '-' + this.chunkFile + '.' + ext, this._handleHttpResponse.bind(this), undefined, this._handleHttpError.bind(this));
970
- }
971
- else {
972
- var model = this._assembleModel();
973
- if (model) {
974
- model.rendererProperties.streamProperties.chunkId = json.chunkId;
975
- this._httpRequest(this.url, this._handleHttpResponse.bind(this), undefined, this._handleHttpError.bind(this), model);
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 if (this.urlLoadJsonFile) {
981
- this.threeViewer.loadGeometryAsJson(json, this._handleLoadComplete.bind(this));
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
@@ -18,4 +18,4 @@
18
18
  * Advanced Visual Systems Inc. (http://www.avs.com)
19
19
  */
20
20
 
21
- export var VERSION = '0.12.71739';
21
+ export var VERSION = '0.13.71740';