angular-three-plugin 4.0.0-next.35 → 4.0.0-next.37
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
|
@@ -28,11 +28,11 @@ export type <%= gltfAnimationApiTypeName %> = Exclude<NgtsAnimationApi<<%= gltfA
|
|
|
28
28
|
<% } %>
|
|
29
29
|
export type <%= gltfResultTypeName %> = GLTF & {
|
|
30
30
|
nodes: {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
<%- meshesTypes %>
|
|
32
|
+
<%- bonesTypes %>
|
|
33
33
|
};
|
|
34
34
|
materials: {
|
|
35
|
-
|
|
35
|
+
<%- materialsTypes %>
|
|
36
36
|
};<% if (animations.length) { %>
|
|
37
37
|
animations: <%= gltfAnimationTypeName %>[];<% } %>
|
|
38
38
|
};
|
|
@@ -69,23 +69,18 @@ export class <%= className %> {
|
|
|
69
69
|
|
|
70
70
|
modelRef = viewChild<ElementRef<Group>>('model');
|
|
71
71
|
|
|
72
|
-
protected gltf = injectGLTF<<%= gltfResultTypeName %>>(() =>
|
|
72
|
+
protected gltf = injectGLTF<<%= gltfResultTypeName %>>(() => <% if (useImportAttribute) { %> <%= gltfName %> <% } else { %> '<%= url %>' <% } %><% if (gltfOptions) { %>, <%= gltfOptions %><% } %>);
|
|
73
73
|
|
|
74
74
|
constructor() {
|
|
75
|
-
extend({ Group
|
|
75
|
+
extend({ Group<%= threeImports %> });
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
hasAnimations
|
|
79
|
-
? `
|
|
77
|
+
<% if (animations.length) { %>
|
|
80
78
|
const animations = injectAnimations(this.gltf, this.modelRef);
|
|
81
79
|
effect(() => {
|
|
82
|
-
if (animations
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
`
|
|
87
|
-
: ""
|
|
88
|
-
}
|
|
80
|
+
if (!animations.isReady) return;
|
|
81
|
+
this.animations.set(animations);
|
|
82
|
+
});
|
|
83
|
+
<% } %>
|
|
89
84
|
|
|
90
85
|
const objectEvents = inject(NgtObjectEvents, { host: true });
|
|
91
86
|
effect(() => {
|
|
@@ -93,6 +88,6 @@ export class <%= className %> {
|
|
|
93
88
|
if (!model) return;
|
|
94
89
|
|
|
95
90
|
objectEvents.ngtObjectEvents.set(model);
|
|
96
|
-
}
|
|
91
|
+
});
|
|
97
92
|
}
|
|
98
93
|
}
|
|
@@ -12,16 +12,20 @@ export interface GltfGeneratorSchema {
|
|
|
12
12
|
console: boolean;
|
|
13
13
|
instance: boolean;
|
|
14
14
|
instanceAll: boolean;
|
|
15
|
+
transform: boolean;
|
|
16
|
+
degrade: string;
|
|
17
|
+
degradeResolution: number;
|
|
15
18
|
resolution: number;
|
|
16
19
|
keepMeshes: boolean;
|
|
17
20
|
keepMaterials: boolean;
|
|
18
21
|
keepAttributes: boolean;
|
|
19
22
|
keepNames: boolean;
|
|
20
23
|
keepGroups: boolean;
|
|
21
|
-
format:
|
|
24
|
+
format: 'jpeg' | 'png' | 'webp' | 'avif';
|
|
22
25
|
simplify: boolean;
|
|
23
26
|
ratio: number;
|
|
24
27
|
error: number;
|
|
28
|
+
header: string;
|
|
25
29
|
verbose: boolean;
|
|
26
30
|
}
|
|
27
31
|
export declare function gltfGenerator(tree: Tree, options: GltfGeneratorSchema): Promise<void>;
|
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.gltfGenerator = gltfGenerator;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
5
|
const node_path_1 = require("node:path");
|
|
5
6
|
const generate_ngt_1 = require("./utils/generate-ngt");
|
|
6
7
|
async function gltfGenerator(tree, options) {
|
|
7
|
-
const { loadGLTF, AnalyzedGLTF, gltfTransform, Log, allPruneStrategies } = await import('@rosskevin/gltfjsx');
|
|
8
|
+
const { loadGLTF, AnalyzedGLTF, gltfTransform, Log, allPruneStrategies, compareFileSizes } = await import('@rosskevin/gltfjsx');
|
|
8
9
|
const modelPath = (0, node_path_1.join)(tree.root, options.modelPath);
|
|
10
|
+
const log = new Log({ debug: options.verbose, silent: false });
|
|
11
|
+
//
|
|
12
|
+
// Transform the GLTF file if necessary using gltf-transform
|
|
13
|
+
//
|
|
14
|
+
let size = '';
|
|
15
|
+
let transformedModelPath = undefined;
|
|
16
|
+
if (options.transform) {
|
|
17
|
+
transformedModelPath = (0, node_path_1.resolve)(modelPath + '-transformed.glb');
|
|
18
|
+
await gltfTransform(modelPath, transformedModelPath, {
|
|
19
|
+
format: options.format,
|
|
20
|
+
degrade: options.degrade,
|
|
21
|
+
degraderesolution: options.degradeResolution,
|
|
22
|
+
simplify: options.simplify ? { ratio: options.ratio, error: options.error } : false,
|
|
23
|
+
log,
|
|
24
|
+
bones: options.bones,
|
|
25
|
+
meta: options.meta,
|
|
26
|
+
shadows: options.shadows,
|
|
27
|
+
instance: options.instance,
|
|
28
|
+
instanceall: options.instanceAll,
|
|
29
|
+
keepgroups: options.keepGroups,
|
|
30
|
+
keepnames: options.keepNames,
|
|
31
|
+
precision: options.precision,
|
|
32
|
+
keepattributes: options.keepAttributes,
|
|
33
|
+
keepmeshes: options.keepMeshes,
|
|
34
|
+
keepmaterials: options.keepMaterials,
|
|
35
|
+
resolution: options.resolution,
|
|
36
|
+
});
|
|
37
|
+
size = compareFileSizes(modelPath, transformedModelPath);
|
|
38
|
+
}
|
|
9
39
|
const gltf = await loadGLTF(modelPath);
|
|
10
40
|
const analyzed = new AnalyzedGLTF(gltf, {
|
|
11
|
-
log
|
|
41
|
+
log,
|
|
12
42
|
bones: options.bones,
|
|
13
43
|
meta: options.meta,
|
|
14
44
|
shadows: options.shadows,
|
|
@@ -19,9 +49,83 @@ async function gltfGenerator(tree, options) {
|
|
|
19
49
|
precision: options.precision,
|
|
20
50
|
}, allPruneStrategies);
|
|
21
51
|
const generateNGT = new generate_ngt_1.GenerateNGT(analyzed, options);
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
52
|
+
const scene = await generateNGT.generate();
|
|
53
|
+
const args = generateNGT.args;
|
|
54
|
+
const perspective = generateNGT.ngtTypes.has('PerspectiveCamera');
|
|
55
|
+
const orthographic = generateNGT.ngtTypes.has('OrthographicCamera');
|
|
56
|
+
const { className, fileName } = (0, devkit_1.names)(options.className);
|
|
57
|
+
const gltfExtras = analyzed.gltf.parser.json.asset && analyzed.gltf.parser.json.asset.extras;
|
|
58
|
+
const extras = gltfExtras
|
|
59
|
+
? Object.keys(gltfExtras)
|
|
60
|
+
.map((key) => `${key.charAt(0).toUpperCase() + key.slice(1)}: ${gltfExtras[key]}`)
|
|
61
|
+
.join('\n')
|
|
62
|
+
: '';
|
|
63
|
+
const ngtTypesArr = Array.from(generateNGT.ngtTypes).filter((t) =>
|
|
64
|
+
// group always is the top-level object
|
|
65
|
+
t !== 'Group' &&
|
|
66
|
+
// we render ngts-perspective-camera instead of ngt-perspective-camera
|
|
67
|
+
t !== 'PerspectiveCamera' &&
|
|
68
|
+
// we render ngts-orthographic-camera instead of ngt-orthographic-camera
|
|
69
|
+
t !== 'OrthographicCamera' &&
|
|
70
|
+
// we don't render ngt-bone
|
|
71
|
+
t !== 'Bone' &&
|
|
72
|
+
// we don't render ngt-object3D
|
|
73
|
+
t !== 'Object3D');
|
|
74
|
+
const threeImports = ngtTypesArr.length ? `, ${ngtTypesArr.join(',')}` : '';
|
|
75
|
+
const gltfAnimationTypeName = className + 'AnimationClips';
|
|
76
|
+
const gltfAnimationApiTypeName = className + 'AnimationApi';
|
|
77
|
+
const gltfName = className + 'GLTF';
|
|
78
|
+
const gltfResultTypeName = gltfName + 'GLTFResult';
|
|
79
|
+
const angularImports = [];
|
|
80
|
+
if (args) {
|
|
81
|
+
angularImports.push('NgtArgs');
|
|
82
|
+
}
|
|
83
|
+
if (perspective) {
|
|
84
|
+
angularImports.push('NgtsPerspectiveCamera');
|
|
85
|
+
}
|
|
86
|
+
if (perspective) {
|
|
87
|
+
angularImports.push('NgtsOrthographicCamera');
|
|
88
|
+
}
|
|
89
|
+
const gltfOptions = options.draco ? `{ useDraco: true }` : '';
|
|
90
|
+
const meshesTypes = analyzed
|
|
91
|
+
.getMeshes()
|
|
92
|
+
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
93
|
+
.join(';\n');
|
|
94
|
+
const bonesTypes = analyzed
|
|
95
|
+
.getBones()
|
|
96
|
+
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
97
|
+
.join(';\n');
|
|
98
|
+
const materials = analyzed.getMaterials();
|
|
99
|
+
const materialsTypes = materials.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type).join(';\n');
|
|
100
|
+
log.debug(materialsTypes);
|
|
101
|
+
(0, devkit_1.generateFiles)(tree, (0, node_path_1.join)(__dirname, 'files'), (0, node_path_1.dirname)(options.output), {
|
|
102
|
+
tmpl: '',
|
|
103
|
+
scene,
|
|
104
|
+
fileName,
|
|
105
|
+
className,
|
|
106
|
+
selector: `${options.selectorPrefix}-${fileName}`,
|
|
107
|
+
animations: analyzed.gltf.animations || [],
|
|
108
|
+
extras,
|
|
109
|
+
threeImports,
|
|
110
|
+
args,
|
|
111
|
+
perspective,
|
|
112
|
+
orthographic,
|
|
113
|
+
useImportAttribute: !modelPath.startsWith('http'),
|
|
114
|
+
preload: true,
|
|
115
|
+
gltfName,
|
|
116
|
+
gltfAnimationTypeName,
|
|
117
|
+
gltfAnimationApiTypeName,
|
|
118
|
+
gltfResultTypeName,
|
|
119
|
+
gltfPath: modelPath,
|
|
120
|
+
gltfOptions,
|
|
121
|
+
meshesTypes,
|
|
122
|
+
bonesTypes,
|
|
123
|
+
materialsTypes,
|
|
124
|
+
angularImports,
|
|
125
|
+
header: options.header,
|
|
126
|
+
size,
|
|
127
|
+
});
|
|
128
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
25
129
|
}
|
|
26
130
|
exports.default = gltfGenerator;
|
|
27
131
|
//# sourceMappingURL=gltf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gltf.js","sourceRoot":"","sources":["../../../../../../libs/plugin/src/generators/gltf/gltf.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"gltf.js","sourceRoot":"","sources":["../../../../../../libs/plugin/src/generators/gltf/gltf.ts"],"names":[],"mappings":";;AAkCA,sCAmJC;AArLD,uCAAqE;AACrE,yCAAmD;AACnD,uDAAmD;AAgC5C,KAAK,UAAU,aAAa,CAAC,IAAU,EAAE,OAA4B;IAC3E,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,MAAM,MAAM,CACxG,oBAAoB,CACpB,CAAC;IAEF,MAAM,SAAS,GAAG,IAAA,gBAAI,EAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE/D,EAAE;IACF,4DAA4D;IAC5D,EAAE;IACF,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,oBAAoB,GAAuB,SAAS,CAAC;IACzD,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACvB,oBAAoB,GAAG,IAAA,mBAAO,EAAC,SAAS,GAAG,kBAAkB,CAAC,CAAC;QAC/D,MAAM,aAAa,CAAC,SAAS,EAAE,oBAAoB,EAAE;YACpD,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CA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IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE7G,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAE1B,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAA,gBAAI,EAAC,SAAS,EAAE,OAAO,CAAC,EAAE,IAAA,mBAAO,EAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACtE,IAAI,EAAE,EAAE;QACR,KAAK;QACL,QAAQ;QACR,SAAS;QACT,QAAQ,EAAE,GAAG,OAAO,CAAC,cAAc,IAAI,QAAQ,EAAE;QACjD,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE;QAC1C,MAAM;QACN,YAAY;QACZ,IAAI;QACJ,WAAW;QACX,YAAY;QACZ,kBAAkB,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QACjD,OAAO,EAAE,IAAI;QACb,QAAQ;QACR,qBAAqB;QACrB,wBAAwB;QACxB,kBAAkB;QAClB,QAAQ,EAAE,SAAS;QACnB,WAAW;QACX,WAAW;QACX,UAAU;QACV,cAAc;QACd,cAAc;QACd,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI;KACJ,CAAC,CAAC;IAEH,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -81,6 +81,24 @@
|
|
|
81
81
|
"alias": "I",
|
|
82
82
|
"default": false
|
|
83
83
|
},
|
|
84
|
+
"transform": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"description": "Transform meshes via @gltf-transform/extensions",
|
|
87
|
+
"alias": "t",
|
|
88
|
+
"default": false
|
|
89
|
+
},
|
|
90
|
+
"degrade": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Degrade meshes via @gltf-transform/extensions",
|
|
93
|
+
"alias": "q",
|
|
94
|
+
"default": ""
|
|
95
|
+
},
|
|
96
|
+
"degradeResolution": {
|
|
97
|
+
"type": "number",
|
|
98
|
+
"description": "Degrade meshes via @gltf-transform/extensions",
|
|
99
|
+
"alias": "Q",
|
|
100
|
+
"default": 512
|
|
101
|
+
},
|
|
84
102
|
"resolution": {
|
|
85
103
|
"type": "number",
|
|
86
104
|
"description": "Resolution for texture resizing (default: 1024)",
|
|
@@ -141,6 +159,12 @@
|
|
|
141
159
|
"alias": "e",
|
|
142
160
|
"default": 0.0001
|
|
143
161
|
},
|
|
162
|
+
"header": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Custom header to add to the generated file",
|
|
165
|
+
"alias": "H",
|
|
166
|
+
"default": ""
|
|
167
|
+
},
|
|
144
168
|
"verbose": {
|
|
145
169
|
"type": "boolean",
|
|
146
170
|
"description": "Verbose log",
|