From 12b530f53c1c8be258e10e35939761424c807ce1 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 29 Jun 2023 22:30:12 -0400 Subject: [PATCH 1/2] Examples: Removed misc_exporter_collada. --- .../jsm/exporters/ColladaExporter.d.ts | 33 ------------------ .../examples/jsm/exporters/ColladaExporter.ts | 34 ------------------- 2 files changed, 67 deletions(-) delete mode 100644 types/three/examples/jsm/exporters/ColladaExporter.d.ts delete mode 100644 types/three/test/unit/examples/jsm/exporters/ColladaExporter.ts diff --git a/types/three/examples/jsm/exporters/ColladaExporter.d.ts b/types/three/examples/jsm/exporters/ColladaExporter.d.ts deleted file mode 100644 index 9a4343746..000000000 --- a/types/three/examples/jsm/exporters/ColladaExporter.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Object3D, Texture } from '../../../src/Three'; - -export interface ColladaExporterOptions { - version?: string; - author?: string; - textureDirectory?: string; - upAxis?: 'Y_UP' | 'Z_UP' | 'X_UP'; - unitName?: string; - unitMeter?: number; -} - -export interface ColladaTexture { - directory: string; - name: string; - ext: string; - data: Uint8Array; - original: Texture; -} - -export interface ColladaExporterResult { - data: string; - textures: ColladaTexture[]; -} - -export class ColladaExporter { - constructor(); - - parse( - object: Object3D, - onDone: ((res: ColladaExporterResult) => void) | undefined, - options: ColladaExporterOptions, - ): ColladaExporterResult | null; -} diff --git a/types/three/test/unit/examples/jsm/exporters/ColladaExporter.ts b/types/three/test/unit/examples/jsm/exporters/ColladaExporter.ts deleted file mode 100644 index e29d4d982..000000000 --- a/types/three/test/unit/examples/jsm/exporters/ColladaExporter.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as THREE from 'three'; - -import { ColladaExporter } from 'three/examples/jsm/exporters/ColladaExporter'; - -const exporter = new ColladaExporter(); -declare const mesh: THREE.Mesh; - -const result = exporter.parse(mesh, undefined, { - upAxis: 'Y_UP', - unitName: 'millimeter', - unitMeter: 0.001, -})!; - -saveString(result.data, 'mesh.dae'); - -result.textures.forEach(tex => { - saveArrayBuffer(tex.data, `${tex.name}.${tex.ext}`); -}); - -function save(blob: Blob, filename: string) { - link.href = URL.createObjectURL(blob); - link.download = filename; - link.click(); -} - -function saveString(text: string, filename: string) { - save(new Blob([text], { type: 'text/plain' }), filename); -} - -function saveArrayBuffer(buffer: BufferSource, filename: string) { - save(new Blob([buffer], { type: 'application/octet-stream' }), filename); -} - -const link = document.createElement('a'); From aac2fc3c3f4d72eeae3dbddec7cb0318431831d5 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Thu, 29 Jun 2023 22:37:25 -0400 Subject: [PATCH 2/2] Remove reference to file --- types/three/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/types/three/tsconfig.json b/types/three/tsconfig.json index cb1536fc4..60d973d16 100644 --- a/types/three/tsconfig.json +++ b/types/three/tsconfig.json @@ -79,7 +79,6 @@ "test/integration/three-examples/webxr_ar_lighting.ts", "test/integration/three-examples/webxr_vr_handinput_cubes.ts", "test/integration/webxr-vr-cube.ts", - "test/unit/examples/jsm/exporters/ColladaExporter.ts", "test/unit/examples/jsm/exporters/PLYExporter.ts", "test/unit/examples/jsm/exporters/STLExporter.ts", "test/unit/examples/jsm/helpers/ViewHelper.ts",