@crystaldesign/real-time-viewer 26.4.0-beta.26 → 26.4.0-beta.28

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.
@@ -49,10 +49,10 @@ import { Matrix as Matrix$1, Vector3 as Vector3$1 } from '@babylonjs/core/Maths/
49
49
  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
- import { loadAssetContainerAsync } from '@babylonjs/core/Loading/index';
52
+ import { LoadAssetContainerAsync } from '@babylonjs/core/Loading/index';
53
+ import { VertexBuffer, WebGPUEngine } from '@babylonjs/core';
53
54
  import '@babylonjs/loaders/glTF/2.0/';
54
55
  import { UniversalCamera } from '@babylonjs/core/Cameras/universalCamera';
55
- import { WebGPUEngine } from '@babylonjs/core';
56
56
  import { jsxs, jsx } from 'react/jsx-runtime';
57
57
 
58
58
  (function() {
@@ -3199,6 +3199,8 @@ var customMat = /*#__PURE__*/function () {
3199
3199
  var reCtrTex = new Texture(texture.url, _customMat.scene);
3200
3200
  reCtrTex.uScale = texture.uScale;
3201
3201
  reCtrTex.vScale = -texture.vScale;
3202
+ reCtrTex.wrapU = Texture.WRAP_ADDRESSMODE;
3203
+ reCtrTex.wrapV = Texture.WRAP_ADDRESSMODE;
3202
3204
  reCtrTex.uOffset = 1;
3203
3205
  reCtrTex.vOffset = -(1 - texture.vScale);
3204
3206
  reCtrTex._mimeType = texture.url.endsWith('.jpg') ? 'image/jpeg' : 'image/png';
@@ -3221,6 +3223,8 @@ var customMat = /*#__PURE__*/function () {
3221
3223
  parsedMat.baseTexture = doReCtrTex(parsedMat.baseTexture);
3222
3224
  parsedMat.metallicRoughnessTexture = doReCtrTex(parsedMat.metallicRoughnessTexture);
3223
3225
  parsedMat.normalTexture = doReCtrTex(parsedMat.normalTexture);
3226
+ parsedMat._useAlphaFromAlbedoTexture = false;
3227
+ parsedMat.transparencyMode = 0;
3224
3228
  found = !!parsedMat.baseTexture;
3225
3229
  if (!found) LOG$1.warn('MISSING_MATERIAL: could not get material ' + _customMat.name + ' for iln ' + _customMat.blob);
3226
3230
  if (setDataRow) useUtilStoreContext().setAnalyzeDataRow({
@@ -3235,8 +3239,8 @@ var customMat = /*#__PURE__*/function () {
3235
3239
  mat: parsedMat,
3236
3240
  found: true
3237
3241
  });
3238
- case 27:
3239
- _context.prev = 27;
3242
+ case 29:
3243
+ _context.prev = 29;
3240
3244
  _context.t0 = _context["catch"](9);
3241
3245
  if (setDataRow) useUtilStoreContext().setAnalyzeDataRow({
3242
3246
  type: 'MAT',
@@ -3246,17 +3250,17 @@ var customMat = /*#__PURE__*/function () {
3246
3250
  path: _customMat.blob,
3247
3251
  sizeMb: 0
3248
3252
  });
3249
- case 30:
3253
+ case 32:
3250
3254
  mat = new PBRMetallicRoughnessMaterial(_customMat.name, sceneStore.scene);
3251
3255
  return _context.abrupt("return", {
3252
3256
  mat: mat,
3253
3257
  found: true
3254
3258
  });
3255
- case 32:
3259
+ case 34:
3256
3260
  case "end":
3257
3261
  return _context.stop();
3258
3262
  }
3259
- }, _callee, null, [[9, 27]]);
3263
+ }, _callee, null, [[9, 29]]);
3260
3264
  }));
3261
3265
  return function customMat(_x) {
3262
3266
  return _ref.apply(this, arguments);
@@ -3298,7 +3302,7 @@ function _findAssets() {
3298
3302
  size = 0;
3299
3303
  _context2.prev = 5;
3300
3304
  _context2.next = 8;
3301
- return loadAssetContainerAsync(path + geo.name + '.glb', sceneStore.scene);
3305
+ return LoadAssetContainerAsync(path + geo.name + '.glb', sceneStore.scene);
3302
3306
  case 8:
3303
3307
  result = _context2.sent;
3304
3308
  utilStore.setAnalyzeDataRow({
@@ -3320,9 +3324,16 @@ function _findAssets() {
3320
3324
  mesh.metadata = {
3321
3325
  lastUsed: Date.now()
3322
3326
  };
3327
+ if (mesh._isMesh()) {
3328
+ mesh.removeVerticesData(VertexBuffer.ColorKind);
3329
+ } else {
3330
+ mesh.getChildMeshes().forEach(function (m) {
3331
+ return m.removeVerticesData(VertexBuffer.ColorKind);
3332
+ });
3333
+ }
3323
3334
  return _context2.abrupt("return", mesh);
3324
- case 22:
3325
- _context2.prev = 22;
3335
+ case 23:
3336
+ _context2.prev = 23;
3326
3337
  _context2.t0 = _context2["catch"](5);
3327
3338
  (_sceneStore$onMissing = sceneStore.onMissingGeo) === null || _sceneStore$onMissing === void 0 || _sceneStore$onMissing.call(sceneStore);
3328
3339
  utilStore.setAnalyzeDataRow({
@@ -3334,11 +3345,11 @@ function _findAssets() {
3334
3345
  found: false
3335
3346
  });
3336
3347
  return _context2.abrupt("return", undefined);
3337
- case 27:
3348
+ case 28:
3338
3349
  case "end":
3339
3350
  return _context2.stop();
3340
3351
  }
3341
- }, _callee2, null, [[5, 22]]);
3352
+ }, _callee2, null, [[5, 23]]);
3342
3353
  }));
3343
3354
  return _importGeo.apply(this, arguments);
3344
3355
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CustomMaterial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAK1G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAGD,QAAA,MAAM,SAAS,cAAqB,cAAc,eAAc,OAAO,KAAU,OAAO,CAAC;IAAE,GAAG,EAAE,4BAA4B,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAkD7I,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CustomMaterial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAK1G,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C;AAGD,QAAA,MAAM,SAAS,cAAqB,cAAc,eAAc,OAAO,KAAU,OAAO,CAAC;IAAE,GAAG,EAAE,4BAA4B,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAsD7I,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAKpC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;GAoJ1E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/findAssets/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAGrE,OAAO,EAAE,UAAU,EAAW,MAAM,UAAU,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMpC,wBAA8B,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;;;GA0J1E"}