@threepipe/plugin-gltf-transform 0.1.0 → 0.1.2
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/GLTFDracoExportPlugin.d.ts +19 -3
- package/dist/GLTFDracoExportPlugin.d.ts.map +1 -1
- package/dist/dependencies.txt +0 -3
- package/dist/index.js +408 -641
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +409 -642
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -3
- package/src/GLTFDracoExportPlugin.ts +90 -49
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetExporterPlugin, AViewerPluginSync, ThreeViewer } from 'threepipe';
|
|
1
|
+
import { AssetExporterPlugin, AViewerPluginSync, IExporter, ThreeViewer } from 'threepipe';
|
|
2
2
|
import { EncoderOptions } from '@gltf-transform/extensions/dist/khr-draco-mesh-compression/encoder';
|
|
3
3
|
export declare enum EncoderMethod {
|
|
4
4
|
EDGEBREAKER = 1,
|
|
@@ -12,14 +12,30 @@ export declare enum EncoderMethod {
|
|
|
12
12
|
*
|
|
13
13
|
* @category Plugins
|
|
14
14
|
*/
|
|
15
|
-
export declare class GLTFDracoExportPlugin extends AViewerPluginSync
|
|
15
|
+
export declare class GLTFDracoExportPlugin extends AViewerPluginSync {
|
|
16
16
|
static readonly PluginType = "GLTFDracoExportPlugin";
|
|
17
17
|
enabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* These are added here, but also added as plugins. Added here by default so that the data is not lost if some plugin is not added in an app.
|
|
20
|
+
* To explicitly remove the data, use `removeExtension` with the name of the extension
|
|
21
|
+
*/
|
|
22
|
+
extraExtensions: [string, Record<string, string | number> | undefined][];
|
|
23
|
+
addExtension(name: string, textures?: Record<string, string | number>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Note - don't remove an extension when removing a plugin.
|
|
26
|
+
*
|
|
27
|
+
* extensions can be removed if you don't want to save the data of some plugin when transforming glb. But since this is not desirable in most cases, it is not recommended.
|
|
28
|
+
* @param name
|
|
29
|
+
*/
|
|
30
|
+
removeExtension(name: string): void;
|
|
31
|
+
private _lastExporter?;
|
|
32
|
+
protected _ctor: IExporter['ctor'];
|
|
18
33
|
onAdded(viewer: ThreeViewer): void;
|
|
34
|
+
onRemove(viewer: ThreeViewer): void;
|
|
19
35
|
protected _makeUi: (exporter: AssetExporterPlugin) => ({
|
|
20
36
|
type: string;
|
|
21
37
|
label: string;
|
|
22
|
-
property: (string | import(
|
|
38
|
+
property: (string | import('threepipe').ExportAssetOptions)[];
|
|
23
39
|
onChange: () => void | undefined;
|
|
24
40
|
hidden?: undefined;
|
|
25
41
|
children?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GLTFDracoExportPlugin.d.ts","sourceRoot":"","sources":["../src/GLTFDracoExportPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"GLTFDracoExportPlugin.d.ts","sourceRoot":"","sources":["../src/GLTFDracoExportPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,iBAAiB,EAUjB,SAAS,EACT,WAAW,EAKd,MAAM,WAAW,CAAA;AAGlB,OAAO,EAAC,cAAc,EAAC,MAAM,oEAAoE,CAAA;AAEjG,oBAAY,aAAa;IACrB,WAAW,IAAI;IACf,UAAU,IAAI;CACjB;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,iBAAiB;IACxD,gBAAuB,UAAU,2BAA0B;IAC3D,OAAO,UAAO;IAEd;;;OAGG;IACH,eAAe,EAyBV,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,CAAC,GAAC,SAAS,CAAC,EAAE,CAAA;IAExD,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAC,MAAM,CAAC;IAMnE;;;;;OAKG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM;IAK5B,OAAO,CAAC,aAAa,CAAC,CAA+B;IAErD,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAWjC;IAED,OAAO,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IA6ClC,QAAQ,CAAC,MAAM,EAAE,WAAW;IAS5B,SAAS,CAAC,OAAO,aAAc,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA2CjD;CACJ"}
|
package/dist/dependencies.txt
CHANGED
|
@@ -30,7 +30,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
30
30
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
31
|
SOFTWARE.
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
---
|
|
35
34
|
|
|
36
35
|
Name: @gltf-transform/core
|
|
@@ -66,7 +65,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
66
65
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
67
66
|
SOFTWARE.
|
|
68
67
|
|
|
69
|
-
|
|
70
68
|
---
|
|
71
69
|
|
|
72
70
|
Name: ktx-parse
|
|
@@ -101,7 +99,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
101
99
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
102
100
|
SOFTWARE.
|
|
103
101
|
|
|
104
|
-
|
|
105
102
|
---
|
|
106
103
|
|
|
107
104
|
Name: @gltf-transform/extensions
|