@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/dist/lib-cjs/api/manager/gltfExportManager.js +7 -1
- package/dist/lib-cjs/api/manager/gltfExportManager.js.map +1 -1
- package/dist/lib-cjs/buildinfo.json +1 -1
- package/dist/lib-cjs/commonjs.tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api/manager/gltfExportManager.ts +9 -1
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|