@combeenation/3d-viewer 9.0.2-alpha1 → 9.0.2-alpha2

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": "9.0.2-alpha1",
3
+ "version": "9.0.2-alpha2",
4
4
  "description": "Combeenation 3D Viewer",
5
5
  "homepage": "https://github.com/Combeenation/3d-viewer#readme",
6
6
  "bugs": {
@@ -173,15 +173,23 @@ export class GltfExportManager {
173
173
  this.restoreMetadataOfAllNodes(metadataArr);
174
174
 
175
175
  // load the scene into an invisible "dummy" canvas
176
- const offscreenCanvas = new OffscreenCanvas(0, 0);
176
+ const offscreenCanvas = new HTMLCanvasElement();
177
177
  const engine = new Engine(offscreenCanvas);
178
178
 
179
+ // engine.getCaps().maxTextureSize = 1024;
180
+ console.log('!!! using HTML Canvas for Export !!!');
181
+
179
182
  SceneLoader.ShowLoadingScreen = false;
180
183
  const newScene = await SceneLoader.LoadAsync('', 'data:' + JSON.stringify(serializedScene), engine);
181
184
  // this is required for offscreen canvas, otherwise the scene dispose code throws when trying to remove the cursor
182
185
  // events
183
186
  newScene.doNotHandleCursors = true;
184
187
 
188
+ console.log('old scene');
189
+ this.viewer.scene.textures.map(texture => console.log(texture._texture?.width));
190
+ console.log('new scene');
191
+ newScene.textures.map(texture => console.log(texture._texture?.width));
192
+
185
193
  return newScene;
186
194
  }
187
195