redhotmagma-visualization 1.33.4 → 1.34.1
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/Three/Three2D.js +44 -36
- package/package.json +2 -2
- package/src/Three/Three2D.js +16 -14
- package/src/visualizationAdapterCreator.js +5 -0
- package/visualizationAdapterCreator.js +6 -0
package/Three/Three2D.js
CHANGED
|
@@ -781,53 +781,61 @@ var Three2D = /*#__PURE__*/function (_ThreeBase) {
|
|
|
781
781
|
switch (_context7.prev = _context7.next) {
|
|
782
782
|
case 0:
|
|
783
783
|
this._redraw = (_this$_getDrawingCont = this._getDrawingContext).bind.apply(_this$_getDrawingCont, [this].concat(Array.prototype.slice.call(_args7)));
|
|
784
|
+
_context7.prev = 1;
|
|
785
|
+
_context7.next = 4;
|
|
786
|
+
return this._redrawPromise;
|
|
784
787
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
_this5._redrawFrame = window.requestAnimationFrame( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
789
|
-
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
790
|
-
while (1) {
|
|
791
|
-
switch (_context6.prev = _context6.next) {
|
|
792
|
-
case 0:
|
|
793
|
-
_context6.prev = 0;
|
|
794
|
-
_context6.next = 3;
|
|
795
|
-
return _this5.redraw();
|
|
796
|
-
|
|
797
|
-
case 3:
|
|
798
|
-
resolve();
|
|
799
|
-
_context6.next = 9;
|
|
800
|
-
break;
|
|
788
|
+
case 4:
|
|
789
|
+
_context7.next = 8;
|
|
790
|
+
break;
|
|
801
791
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
reject(_context6.t0);
|
|
792
|
+
case 6:
|
|
793
|
+
_context7.prev = 6;
|
|
794
|
+
_context7.t0 = _context7["catch"](1);
|
|
806
795
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
796
|
+
case 8:
|
|
797
|
+
this._redrawPromise = new Promise(function (resolve, reject) {
|
|
798
|
+
_this5._redrawFrame = window.requestAnimationFrame( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
|
|
799
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
800
|
+
while (1) {
|
|
801
|
+
switch (_context6.prev = _context6.next) {
|
|
802
|
+
case 0:
|
|
803
|
+
_context6.prev = 0;
|
|
804
|
+
_context6.next = 3;
|
|
805
|
+
return _this5.redraw();
|
|
811
806
|
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
}
|
|
817
|
-
}, _callee6, null, [[0, 6, 9, 12]]);
|
|
818
|
-
})));
|
|
819
|
-
});
|
|
820
|
-
}
|
|
807
|
+
case 3:
|
|
808
|
+
resolve();
|
|
809
|
+
_context6.next = 9;
|
|
810
|
+
break;
|
|
821
811
|
|
|
822
|
-
|
|
812
|
+
case 6:
|
|
813
|
+
_context6.prev = 6;
|
|
814
|
+
_context6.t0 = _context6["catch"](0);
|
|
815
|
+
reject(_context6.t0);
|
|
816
|
+
|
|
817
|
+
case 9:
|
|
818
|
+
_context6.prev = 9;
|
|
819
|
+
delete _this5._redrawPromise;
|
|
820
|
+
return _context6.finish(9);
|
|
821
|
+
|
|
822
|
+
case 12:
|
|
823
|
+
case "end":
|
|
824
|
+
return _context6.stop();
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}, _callee6, null, [[0, 6, 9, 12]]);
|
|
828
|
+
})));
|
|
829
|
+
});
|
|
830
|
+
_context7.next = 11;
|
|
823
831
|
return this._redrawPromise;
|
|
824
832
|
|
|
825
|
-
case
|
|
833
|
+
case 11:
|
|
826
834
|
case "end":
|
|
827
835
|
return _context7.stop();
|
|
828
836
|
}
|
|
829
837
|
}
|
|
830
|
-
}, _callee7, this);
|
|
838
|
+
}, _callee7, this, [[1, 6]]);
|
|
831
839
|
}));
|
|
832
840
|
|
|
833
841
|
function getDrawingContext() {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redhotmagma-visualization",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.1",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/polyfill": "^7.12.1",
|
|
9
|
-
"@configuratorware/scripts": "1.
|
|
9
|
+
"@configuratorware/scripts": "1.34.1",
|
|
10
10
|
"@tweenjs/tween.js": "^17.6.0",
|
|
11
11
|
"console-polyfill": "^0.3.0",
|
|
12
12
|
"css-element-queries": "^1.2.3",
|
package/src/Three/Three2D.js
CHANGED
|
@@ -411,21 +411,23 @@ export class Three2D extends ThreeBase {
|
|
|
411
411
|
|
|
412
412
|
async getDrawingContext() {
|
|
413
413
|
this._redraw = this._getDrawingContext.bind(this, ...arguments);
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
try {
|
|
419
|
-
await this.redraw();
|
|
420
|
-
resolve();
|
|
421
|
-
} catch (e) {
|
|
422
|
-
reject(e);
|
|
423
|
-
} finally {
|
|
424
|
-
delete this._redrawPromise;
|
|
425
|
-
}
|
|
426
|
-
});
|
|
427
|
-
});
|
|
414
|
+
try {
|
|
415
|
+
await this._redrawPromise;
|
|
416
|
+
} catch (e) {
|
|
417
|
+
// continue drawing anyway
|
|
428
418
|
}
|
|
419
|
+
this._redrawPromise = new Promise((resolve, reject) => {
|
|
420
|
+
this._redrawFrame = window.requestAnimationFrame(async () => {
|
|
421
|
+
try {
|
|
422
|
+
await this.redraw();
|
|
423
|
+
resolve();
|
|
424
|
+
} catch (e) {
|
|
425
|
+
reject(e);
|
|
426
|
+
} finally {
|
|
427
|
+
delete this._redrawPromise;
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
});
|
|
429
431
|
await this._redrawPromise;
|
|
430
432
|
}
|
|
431
433
|
|
|
@@ -25,6 +25,11 @@ export const createAdapterConfig = ({ host }, overrides = {}) =>
|
|
|
25
25
|
modelBasePath: host,
|
|
26
26
|
basePath: `${host}/images/item/view`, // only for conventional urls
|
|
27
27
|
},
|
|
28
|
+
"2dVariantOverlay": {
|
|
29
|
+
adapterClass: Three2D,
|
|
30
|
+
modelBasePath: host,
|
|
31
|
+
basePath: `${host}/images/item/view`, // only for conventional urls
|
|
32
|
+
},
|
|
28
33
|
"2dLayer": {
|
|
29
34
|
adapterClass: Three2DLayers,
|
|
30
35
|
modelBasePath: host,
|
|
@@ -46,6 +46,12 @@ var createAdapterConfig = function createAdapterConfig(_ref) {
|
|
|
46
46
|
modelBasePath: host,
|
|
47
47
|
basePath: "".concat(host, "/images/item/view") // only for conventional urls
|
|
48
48
|
|
|
49
|
+
},
|
|
50
|
+
"2dVariantOverlay": {
|
|
51
|
+
adapterClass: _Three2D.Three2D,
|
|
52
|
+
modelBasePath: host,
|
|
53
|
+
basePath: "".concat(host, "/images/item/view") // only for conventional urls
|
|
54
|
+
|
|
49
55
|
},
|
|
50
56
|
"2dLayer": {
|
|
51
57
|
adapterClass: _Three2DLayers.Three2DLayers,
|