kitchen-simulator 4.1.5-react-18 → 4.1.6-react-18
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.
|
@@ -24,6 +24,7 @@ var Viewer3DFirstPerson = /*#__PURE__*/function (_React$Component) {
|
|
|
24
24
|
var _this;
|
|
25
25
|
_classCallCheck(this, Viewer3DFirstPerson);
|
|
26
26
|
_this = _callSuper(this, Viewer3DFirstPerson, [props]);
|
|
27
|
+
_this.canvasWrapperRef = /*#__PURE__*/React.createRef();
|
|
27
28
|
_this.width = props.width;
|
|
28
29
|
_this.height = props.height;
|
|
29
30
|
_this.stopRendering = false;
|
|
@@ -57,7 +58,7 @@ var Viewer3DFirstPerson = /*#__PURE__*/function (_React$Component) {
|
|
|
57
58
|
};
|
|
58
59
|
var state = this.props.state;
|
|
59
60
|
var data = state.scene;
|
|
60
|
-
var canvasWrapper =
|
|
61
|
+
var canvasWrapper = this.canvasWrapperRef.current;
|
|
61
62
|
var scene3D = new Three.Scene();
|
|
62
63
|
|
|
63
64
|
// As I need to show the pointer above all scene objects, I use this workaround http://stackoverflow.com/a/13309722
|
|
@@ -300,7 +301,7 @@ var Viewer3DFirstPerson = /*#__PURE__*/function (_React$Component) {
|
|
|
300
301
|
key: "render",
|
|
301
302
|
value: function render() {
|
|
302
303
|
return /*#__PURE__*/React.createElement('div', {
|
|
303
|
-
ref:
|
|
304
|
+
ref: this.canvasWrapperRef
|
|
304
305
|
});
|
|
305
306
|
}
|
|
306
307
|
}]);
|
|
@@ -52,6 +52,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
52
52
|
_this.width = props.width;
|
|
53
53
|
_this.height = props.height;
|
|
54
54
|
_this.renderingID = 0;
|
|
55
|
+
_this.canvasWrapperRef = /*#__PURE__*/React.createRef();
|
|
55
56
|
var mode = props.state.mode;
|
|
56
57
|
if (!window.__elevationRendererDownload) {
|
|
57
58
|
window.__elevationRendererDownload = {};
|
|
@@ -2193,7 +2194,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
2193
2194
|
}
|
|
2194
2195
|
|
|
2195
2196
|
// Add the output of the renderer to the html element
|
|
2196
|
-
var canvasWrapper =
|
|
2197
|
+
var canvasWrapper = this.canvasWrapperRef.current;
|
|
2197
2198
|
canvasWrapper && canvasWrapper.appendChild(this.renderer.domElement);
|
|
2198
2199
|
|
|
2199
2200
|
//
|
|
@@ -2674,7 +2675,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
2674
2675
|
this.renderer.domElement.style.opacity = '1';
|
|
2675
2676
|
!this.props.downloadFlag && document.getElementById('front') && (document.getElementById('front').style.display = 'block');
|
|
2676
2677
|
return /*#__PURE__*/React.createElement('div', {
|
|
2677
|
-
ref:
|
|
2678
|
+
ref: this.canvasWrapperRef
|
|
2678
2679
|
});
|
|
2679
2680
|
}
|
|
2680
2681
|
}
|
|
@@ -31,6 +31,7 @@ var Viewer3DFirstPerson = exports["default"] = /*#__PURE__*/function (_React$Com
|
|
|
31
31
|
var _this;
|
|
32
32
|
(0, _classCallCheck2["default"])(this, Viewer3DFirstPerson);
|
|
33
33
|
_this = _callSuper(this, Viewer3DFirstPerson, [props]);
|
|
34
|
+
_this.canvasWrapperRef = /*#__PURE__*/_react["default"].createRef();
|
|
34
35
|
_this.width = props.width;
|
|
35
36
|
_this.height = props.height;
|
|
36
37
|
_this.stopRendering = false;
|
|
@@ -64,7 +65,7 @@ var Viewer3DFirstPerson = exports["default"] = /*#__PURE__*/function (_React$Com
|
|
|
64
65
|
};
|
|
65
66
|
var state = this.props.state;
|
|
66
67
|
var data = state.scene;
|
|
67
|
-
var canvasWrapper =
|
|
68
|
+
var canvasWrapper = this.canvasWrapperRef.current;
|
|
68
69
|
var scene3D = new Three.Scene();
|
|
69
70
|
|
|
70
71
|
// As I need to show the pointer above all scene objects, I use this workaround http://stackoverflow.com/a/13309722
|
|
@@ -307,7 +308,7 @@ var Viewer3DFirstPerson = exports["default"] = /*#__PURE__*/function (_React$Com
|
|
|
307
308
|
key: "render",
|
|
308
309
|
value: function render() {
|
|
309
310
|
return /*#__PURE__*/_react["default"].createElement('div', {
|
|
310
|
-
ref:
|
|
311
|
+
ref: this.canvasWrapperRef
|
|
311
312
|
});
|
|
312
313
|
}
|
|
313
314
|
}]);
|
|
@@ -58,6 +58,7 @@ var Scene3DViewer = exports["default"] = /*#__PURE__*/function (_React$Component
|
|
|
58
58
|
_this.width = props.width;
|
|
59
59
|
_this.height = props.height;
|
|
60
60
|
_this.renderingID = 0;
|
|
61
|
+
_this.canvasWrapperRef = /*#__PURE__*/_react["default"].createRef();
|
|
61
62
|
var mode = props.state.mode;
|
|
62
63
|
if (!window.__elevationRendererDownload) {
|
|
63
64
|
window.__elevationRendererDownload = {};
|
|
@@ -2199,7 +2200,7 @@ var Scene3DViewer = exports["default"] = /*#__PURE__*/function (_React$Component
|
|
|
2199
2200
|
}
|
|
2200
2201
|
|
|
2201
2202
|
// Add the output of the renderer to the html element
|
|
2202
|
-
var canvasWrapper =
|
|
2203
|
+
var canvasWrapper = this.canvasWrapperRef.current;
|
|
2203
2204
|
canvasWrapper && canvasWrapper.appendChild(this.renderer.domElement);
|
|
2204
2205
|
|
|
2205
2206
|
//
|
|
@@ -2680,7 +2681,7 @@ var Scene3DViewer = exports["default"] = /*#__PURE__*/function (_React$Component
|
|
|
2680
2681
|
this.renderer.domElement.style.opacity = '1';
|
|
2681
2682
|
!this.props.downloadFlag && document.getElementById('front') && (document.getElementById('front').style.display = 'block');
|
|
2682
2683
|
return /*#__PURE__*/_react["default"].createElement('div', {
|
|
2683
|
-
ref:
|
|
2684
|
+
ref: this.canvasWrapperRef
|
|
2684
2685
|
});
|
|
2685
2686
|
}
|
|
2686
2687
|
}
|