@crystaldesign/real-time-viewer 26.4.0-beta.2 → 26.4.0-beta.4
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/build/esm/index.js +3 -4
- package/build/umd/report.html +1 -1
- package/package.json +2 -2
package/build/esm/index.js
CHANGED
|
@@ -50,7 +50,6 @@ import { EngineFactory } from '@babylonjs/core/Engines/engineFactory';
|
|
|
50
50
|
import { Scene } from '@babylonjs/core/scene';
|
|
51
51
|
import { DracoCompression } from '@babylonjs/core/Meshes/Compression/dracoCompression';
|
|
52
52
|
import { loadAssetContainerAsync } from '@babylonjs/core/Loading/index';
|
|
53
|
-
import { useSceneStoreContext as useSceneStoreContext$1 } from '@crystaldesign/real-time-viewer/context';
|
|
54
53
|
import { PBRMetallicRoughnessMaterial as PBRMetallicRoughnessMaterial$1, Texture as Texture$1, WebGPUEngine } from '@babylonjs/core';
|
|
55
54
|
import '@babylonjs/loaders/glTF/2.0/';
|
|
56
55
|
import { UniversalCamera } from '@babylonjs/core/Cameras/universalCamera';
|
|
@@ -3913,7 +3912,7 @@ function _createForOfIteratorHelper$1(r, e) { var t = "undefined" != typeof Symb
|
|
|
3913
3912
|
function _unsupportedIterableToArray$1(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$1(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0; } }
|
|
3914
3913
|
function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3915
3914
|
function findMaterials(cache) {
|
|
3916
|
-
var sceneStore = useSceneStoreContext
|
|
3915
|
+
var sceneStore = useSceneStoreContext();
|
|
3917
3916
|
var matsOnMeshes = {};
|
|
3918
3917
|
//! parent = the parent from which on every child should receive the Material
|
|
3919
3918
|
//! id = the id which points to the material that should be assigned
|
|
@@ -3922,7 +3921,7 @@ function findMaterials(cache) {
|
|
|
3922
3921
|
return mat.uniqueId == _mat.uniqueId;
|
|
3923
3922
|
});
|
|
3924
3923
|
if (!matStillExists) {
|
|
3925
|
-
var sharedName = mat.name +
|
|
3924
|
+
var sharedName = mat.name + '_recreated';
|
|
3926
3925
|
var sharedMat = sceneStore.scene.getMaterialByName(sharedName);
|
|
3927
3926
|
if (!sharedMat) {
|
|
3928
3927
|
sharedMat = new PBRMetallicRoughnessMaterial$1(sharedName, sceneStore.scene);
|
|
@@ -3980,7 +3979,7 @@ function findMaterials(cache) {
|
|
|
3980
3979
|
try {
|
|
3981
3980
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
3982
3981
|
var child = _step2.value;
|
|
3983
|
-
if (onNode ==
|
|
3982
|
+
if (onNode == '' || onNode == 'ALL') setMaterials(child, mat.mat);
|
|
3984
3983
|
if (child.name.startsWith(onNode) || child.name.startsWith('geo_') && child.name.includes(onNode)) {
|
|
3985
3984
|
setMaterials(child, mat.mat);
|
|
3986
3985
|
}
|