@combeenation/3d-viewer 12.3.0 → 12.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@combeenation/3d-viewer",
3
- "version": "12.3.0",
3
+ "version": "12.4.0",
4
4
  "description": "Combeenation 3D Viewer",
5
5
  "homepage": "https://github.com/Combeenation/3d-viewer#readme",
6
6
  "bugs": {
@@ -79,7 +79,10 @@
79
79
  "webpack-merge": "5.8.0"
80
80
  },
81
81
  "optionalDependencies": {
82
+ "@babylonjs/gui": "6.27.1",
83
+ "@babylonjs/gui-editor": "6.27.1",
82
84
  "@babylonjs/inspector": "6.27.1",
85
+ "@babylonjs/materials": "6.27.1",
83
86
  "@babylonjs/node-editor": "6.27.1",
84
87
  "@babylonjs/node-geometry-editor": "6.27.1"
85
88
  },
@@ -689,6 +689,7 @@ export class Variant extends Parameterizable {
689
689
  this.viewer.scene.addCamera(camera);
690
690
  });
691
691
  this.assetContainer.materials.forEach(material => this.viewer.scene.materials.push(material));
692
+ this.assetContainer.textures.forEach(texture => this.viewer.scene.textures.push(texture));
692
693
  this.assetContainer.skeletons.forEach(skeleton => this.viewer.scene.skeletons.push(skeleton));
693
694
  this.broadcastEvent(Event.ASSET_LOADING_END, this);
694
695
  resolve(this);
@@ -676,6 +676,10 @@ The inspector can only be used in development builds.`);
676
676
  engine.getCaps().maxTextureSize = (sceneJson.engine!.limitTextureSize as LimitTextureSizeConfig).size;
677
677
  }
678
678
 
679
+ if (sceneJson.engine?.useParallelShaderCompile === false) {
680
+ engine.getCaps().parallelShaderCompile = undefined;
681
+ }
682
+
679
683
  const scene = await sceneSetup(engine, sceneJson);
680
684
  if (sceneJson.meshPicking) {
681
685
  new HighlightLayer('default', scene);
@@ -204,6 +204,15 @@ type SceneJson = {
204
204
  * only as well.
205
205
  */
206
206
  limitTextureSize?: LimitTextureSizeConfig | false;
207
+ /**
208
+ * See this forum entry for description of parallel shader compilition effect:
209
+ * https://forum.babylonjs.com/t/scene-flickering-when-turning-off-light/48733.
210
+ * Parallel shading compilition generally improves the speed of material compilition and helps when switching
211
+ * materials while objects are moving (eg: animations).
212
+ * Deactivating parallel shading compilition is benefitial when switching lights and materials in static scenarios.
213
+ * It's activated by default due to compatibility reasons but can be overwritten with this flag.
214
+ */
215
+ useParallelShaderCompile?: boolean;
207
216
  };
208
217
  scene: SceneDefinition;
209
218
  animations?: AnimationDefinitions;