@gamelearn/arcade-components 0.14.8 → 0.15.0
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.
|
@@ -44,6 +44,8 @@ var Scene = function Scene(_ref) {
|
|
|
44
44
|
elements = _ref$elements === void 0 ? [] : _ref$elements,
|
|
45
45
|
_ref$hasControls = _ref.hasControls,
|
|
46
46
|
hasControls = _ref$hasControls === void 0 ? false : _ref$hasControls,
|
|
47
|
+
_ref$has3Stats = _ref.has3Stats,
|
|
48
|
+
has3Stats = _ref$has3Stats === void 0 ? false : _ref$has3Stats,
|
|
47
49
|
_ref$backgroundData = _ref.backgroundData,
|
|
48
50
|
backgroundData = _ref$backgroundData === void 0 ? {} : _ref$backgroundData,
|
|
49
51
|
_ref$loadingText = _ref.loadingText,
|
|
@@ -83,7 +85,7 @@ var Scene = function Scene(_ref) {
|
|
|
83
85
|
}, [emitEvent]);
|
|
84
86
|
(0, _react.useEffect)(function () {
|
|
85
87
|
setShowLoad(true);
|
|
86
|
-
}, [backgroundData, elements, lodSettings.currentLOD]);
|
|
88
|
+
}, [backgroundData, elements, lodSettings.currentLOD, lodSettings.rgbSimulation, lodSettings.showHelpers, lodSettings.showStats]);
|
|
87
89
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_fiber.Canvas, {
|
|
88
90
|
className: "main-canvas",
|
|
89
91
|
style: {
|
|
@@ -119,7 +121,7 @@ var Scene = function Scene(_ref) {
|
|
|
119
121
|
data: backgroundData
|
|
120
122
|
}), /*#__PURE__*/_react.default.createElement(_drei.Preload, {
|
|
121
123
|
all: true
|
|
122
|
-
})), /*#__PURE__*/_react.default.createElement(_drei.Stats, null), hasControls && /*#__PURE__*/_react.default.createElement(_drei.OrbitControls, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
})), has3Stats && /*#__PURE__*/_react.default.createElement(_drei.Stats, null), hasControls && /*#__PURE__*/_react.default.createElement(_drei.OrbitControls, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
123
125
|
id: "elements-projection"
|
|
124
126
|
}));
|
|
125
127
|
};
|
package/dist/helpers/drawLOD.js
CHANGED
|
@@ -310,8 +310,9 @@ var drawLOD = function drawLOD(scene, camera, settings) {
|
|
|
310
310
|
params._rgbSimulation = settings !== null && settings !== void 0 && settings.rgbSimulation ? settings.rgbSimulation : rgbSimulation;
|
|
311
311
|
params._showHelpers = settings !== null && settings !== void 0 && settings.showHelpers ? settings.showHelpers : showHelpers;
|
|
312
312
|
params._showStats = settings !== null && settings !== void 0 && settings.showStats ? settings.showStats : showStats;
|
|
313
|
-
params._forceRender = (scene === null || scene === void 0 ? void 0 : scene.lastLOD) !== (settings === null || settings === void 0 ? void 0 : settings.currentLOD);
|
|
313
|
+
params._forceRender = (scene === null || scene === void 0 ? void 0 : scene.lastLOD) !== (settings === null || settings === void 0 ? void 0 : settings.currentLOD) || (scene === null || scene === void 0 ? void 0 : scene.lastRGB) !== params._rgbSimulation;
|
|
314
314
|
scene.lastLOD = settings === null || settings === void 0 ? void 0 : settings.currentLOD;
|
|
315
|
+
scene.lastRGB = params._rgbSimulation;
|
|
315
316
|
params._texturesFrustum = texturesFrustum;
|
|
316
317
|
params._texturesDistance = texturesDistance;
|
|
317
318
|
params._scene = scene;
|