angular-three-plugin 4.0.0-next.39 → 4.0.0-next.41
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 +2 -1
- package/src/generators/gltf/files/__fileName__.ts__tmpl__ +2 -2
- package/src/generators/gltf/gltf.d.ts +1 -1
- package/src/generators/gltf/gltf.js +101 -108
- package/src/generators/gltf/gltf.js.map +1 -1
- package/src/generators/gltf/utils/generate-ngt.d.ts +16 -2
- package/src/generators/gltf/utils/generate-ngt.js +68 -15
- package/src/generators/gltf/utils/generate-ngt.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-three-plugin",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.41",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@nx/devkit": "^20.0.0",
|
|
23
23
|
"@rosskevin/gltfjsx": "7.0.20",
|
|
24
|
+
"node-three-gltf": "^2.0.0",
|
|
24
25
|
"nx": "^20.0.0",
|
|
25
26
|
"ts-morph": "^25.0.0",
|
|
26
27
|
"tslib": "^2.3.0"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type * as THREE from 'three';
|
|
9
9
|
import { Group<%= threeImports %> } from 'three';
|
|
10
10
|
import { extend, type NgtThreeElements, NgtObjectEvents<% if (args) { %>, NgtArgs<% } %> } from 'angular-three';
|
|
11
|
-
import { Component, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, input, viewChild, ElementRef, inject, effect<% if (animations.length) { %>,
|
|
11
|
+
import { Component, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, input, viewChild, ElementRef, inject, effect<% if (animations.length) { %>, model<% } %> } from '@angular/core';
|
|
12
12
|
import { injectGLTF } from 'angular-three-soba/loaders';
|
|
13
13
|
import type { GLTF } from 'three-stdlib';<% if (animations.length) { %>
|
|
14
14
|
import { injectAnimations, type NgtsAnimationClips, type NgtsAnimationApi } from 'angular-three-soba/misc';<% } %><% if (perspective) { %>
|
|
@@ -16,7 +16,7 @@ import { NgtsPerspectiveCamera } from 'angular-three-soba/cameras';<% } %><% if
|
|
|
16
16
|
import { NgtsOrthographicCamera } from 'angular-three-soba/cameras';<% } %>
|
|
17
17
|
<% if (useImportAttribute) { %>
|
|
18
18
|
// @ts-expect-error - import .glb/.gltf file
|
|
19
|
-
import <%= gltfName %> from '
|
|
19
|
+
import <%= gltfName %> from '<%= gltfPath %>' with { loader: 'file' };
|
|
20
20
|
<% } %>
|
|
21
21
|
<% if (preload) { %>
|
|
22
22
|
injectGLTF.preload(() => <% if (useImportAttribute) { %><%= gltfName %><% } else { %>'<%= gltfPath %>'<% } %>);
|
|
@@ -28,5 +28,5 @@ export interface GltfGeneratorSchema {
|
|
|
28
28
|
header: string;
|
|
29
29
|
verbose: boolean;
|
|
30
30
|
}
|
|
31
|
-
export declare function gltfGenerator(tree: Tree, options: GltfGeneratorSchema): Promise<
|
|
31
|
+
export declare function gltfGenerator(tree: Tree, options: GltfGeneratorSchema): Promise<never>;
|
|
32
32
|
export default gltfGenerator;
|
|
@@ -4,40 +4,12 @@ exports.gltfGenerator = gltfGenerator;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
6
|
const generate_ngt_1 = require("./utils/generate-ngt");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
7
|
+
// @ts-expect-error - type only import
|
|
8
|
+
function normalizeOptions(tree, options, gltfJsx) {
|
|
9
|
+
const { Log } = gltfJsx;
|
|
10
|
+
const { fileName, className } = (0, devkit_1.names)(options.className);
|
|
10
11
|
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
|
-
}
|
|
39
|
-
const gltf = await loadGLTF(modelPath);
|
|
40
|
-
const analyzed = new AnalyzedGLTF(gltf, {
|
|
12
|
+
const gltfJsxOptions = {
|
|
41
13
|
log,
|
|
42
14
|
bones: options.bones,
|
|
43
15
|
meta: options.meta,
|
|
@@ -47,90 +19,111 @@ async function gltfGenerator(tree, options) {
|
|
|
47
19
|
keepgroups: options.keepGroups,
|
|
48
20
|
keepnames: options.keepNames,
|
|
49
21
|
precision: options.precision,
|
|
50
|
-
}
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
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
|
-
let gltfPath = !transformedModelPath && modelPath.startsWith('http')
|
|
76
|
-
? modelPath
|
|
77
|
-
: (0, node_path_1.relative)((0, node_path_1.dirname)(options.output), transformedModelPath || modelPath);
|
|
78
|
-
if (!gltfPath.startsWith('http') && !gltfPath.startsWith('.')) {
|
|
79
|
-
gltfPath = `./${gltfPath}`;
|
|
80
|
-
}
|
|
22
|
+
};
|
|
23
|
+
const transformOptions = {
|
|
24
|
+
format: options.format,
|
|
25
|
+
degrade: options.degrade,
|
|
26
|
+
degraderesolution: options.degradeResolution,
|
|
27
|
+
simplify: options.simplify ? { ratio: options.ratio, error: options.error } : false,
|
|
28
|
+
keepattributes: options.keepAttributes,
|
|
29
|
+
keepmeshes: options.keepMeshes,
|
|
30
|
+
keepmaterials: options.keepMaterials,
|
|
31
|
+
resolution: options.resolution,
|
|
32
|
+
};
|
|
33
|
+
const modelPathFromRoot = (0, node_path_1.join)(tree.root, options.modelPath);
|
|
34
|
+
const outputDir = (0, node_path_1.dirname)(options.output);
|
|
35
|
+
const injectGLTFOptions = options.draco ? `{ useDraco: true }` : '';
|
|
36
|
+
const selector = `${options.selectorPrefix}-${fileName}`;
|
|
81
37
|
const gltfAnimationTypeName = className + 'AnimationClips';
|
|
82
38
|
const gltfAnimationApiTypeName = className + 'AnimationApi';
|
|
83
39
|
const gltfName = className + 'GLTF';
|
|
84
40
|
const gltfResultTypeName = gltfName + 'GLTFResult';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
if (perspective) {
|
|
90
|
-
angularImports.push('NgtsPerspectiveCamera');
|
|
91
|
-
}
|
|
92
|
-
if (perspective) {
|
|
93
|
-
angularImports.push('NgtsOrthographicCamera');
|
|
94
|
-
}
|
|
95
|
-
const gltfOptions = options.draco ? `{ useDraco: true }` : '';
|
|
96
|
-
const meshesTypes = analyzed
|
|
97
|
-
.getMeshes()
|
|
98
|
-
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
99
|
-
.join(';\n');
|
|
100
|
-
const bonesTypes = analyzed
|
|
101
|
-
.getBones()
|
|
102
|
-
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
103
|
-
.join(';\n');
|
|
104
|
-
const materials = analyzed.getMaterials();
|
|
105
|
-
const materialsTypes = materials.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type).join(';\n');
|
|
106
|
-
log.debug(materialsTypes);
|
|
107
|
-
(0, devkit_1.generateFiles)(tree, (0, node_path_1.join)(__dirname, 'files'), (0, node_path_1.dirname)(options.output), {
|
|
108
|
-
tmpl: '',
|
|
109
|
-
scene,
|
|
41
|
+
return {
|
|
42
|
+
log,
|
|
43
|
+
selector,
|
|
110
44
|
fileName,
|
|
111
45
|
className,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
perspective,
|
|
118
|
-
orthographic,
|
|
119
|
-
useImportAttribute: !modelPath.startsWith('http'),
|
|
120
|
-
preload: true,
|
|
121
|
-
gltfName,
|
|
46
|
+
gltfJsxOptions,
|
|
47
|
+
transformOptions,
|
|
48
|
+
modelPathFromRoot,
|
|
49
|
+
outputDir,
|
|
50
|
+
injectGLTFOptions,
|
|
122
51
|
gltfAnimationTypeName,
|
|
123
52
|
gltfAnimationApiTypeName,
|
|
53
|
+
gltfName,
|
|
124
54
|
gltfResultTypeName,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async function gltfGenerator(tree, options) {
|
|
58
|
+
const gltfjsx = await import('@rosskevin/gltfjsx');
|
|
59
|
+
const { loadGLTF, AnalyzedGLTF, gltfTransform, compareFileSizes } = gltfjsx;
|
|
60
|
+
const { selector, className, fileName, modelPathFromRoot, log, gltfJsxOptions, transformOptions, outputDir, injectGLTFOptions, gltfAnimationTypeName, gltfAnimationApiTypeName, gltfName, gltfResultTypeName, } = normalizeOptions(tree, options, gltfjsx);
|
|
61
|
+
//
|
|
62
|
+
// Transform the GLTF file if necessary using gltf-transform
|
|
63
|
+
//
|
|
64
|
+
let size = '';
|
|
65
|
+
let transformedModelPath = undefined;
|
|
66
|
+
if (options.transform) {
|
|
67
|
+
transformedModelPath = (0, node_path_1.resolve)(modelPathFromRoot + '-transformed.glb');
|
|
68
|
+
await gltfTransform(modelPathFromRoot, transformedModelPath, Object.assign(transformOptions, gltfJsxOptions));
|
|
69
|
+
size = compareFileSizes(modelPathFromRoot, transformedModelPath);
|
|
70
|
+
}
|
|
71
|
+
const modelPath = transformedModelPath || modelPathFromRoot;
|
|
72
|
+
//
|
|
73
|
+
// Read the model
|
|
74
|
+
//
|
|
75
|
+
let dracoLoader = undefined; // global instance, instantiate once, dispose once
|
|
76
|
+
if (options.draco) {
|
|
77
|
+
log.debug('Instantiating DracoLoader');
|
|
78
|
+
const { DRACOLoader } = await import('node-three-gltf');
|
|
79
|
+
dracoLoader = new DRACOLoader();
|
|
80
|
+
}
|
|
81
|
+
log.debug('Loading model: ', modelPath);
|
|
82
|
+
try {
|
|
83
|
+
const gltf = await loadGLTF(modelPath, dracoLoader);
|
|
84
|
+
const analyzed = new AnalyzedGLTF(gltf, gltfJsxOptions);
|
|
85
|
+
const generateNGT = new generate_ngt_1.GenerateNGT(analyzed, gltfjsx, options);
|
|
86
|
+
const scene = generateNGT.generate();
|
|
87
|
+
const generateOptions = generateNGT.getGenerateOptions();
|
|
88
|
+
let gltfPath = !transformedModelPath && modelPath.startsWith('http') ? modelPath : (0, node_path_1.relative)(outputDir, modelPath);
|
|
89
|
+
if (!gltfPath.startsWith('http') && !gltfPath.startsWith('.')) {
|
|
90
|
+
gltfPath = `./${gltfPath}`;
|
|
91
|
+
}
|
|
92
|
+
(0, devkit_1.generateFiles)(tree, (0, node_path_1.join)(__dirname, 'files'), outputDir, {
|
|
93
|
+
tmpl: '',
|
|
94
|
+
...generateOptions,
|
|
95
|
+
scene,
|
|
96
|
+
fileName,
|
|
97
|
+
className,
|
|
98
|
+
selector,
|
|
99
|
+
animations: analyzed.gltf.animations || [],
|
|
100
|
+
useImportAttribute: !modelPath.startsWith('http'),
|
|
101
|
+
preload: true,
|
|
102
|
+
gltfName,
|
|
103
|
+
gltfAnimationTypeName,
|
|
104
|
+
gltfAnimationApiTypeName,
|
|
105
|
+
gltfResultTypeName,
|
|
106
|
+
gltfPath,
|
|
107
|
+
gltfOptions: injectGLTFOptions,
|
|
108
|
+
header: options.header,
|
|
109
|
+
size,
|
|
110
|
+
});
|
|
111
|
+
if (options.console) {
|
|
112
|
+
const outputPath = (0, node_path_1.join)(outputDir, `${fileName}.ts`);
|
|
113
|
+
const outputContent = tree.read(outputPath, 'utf8');
|
|
114
|
+
console.log(outputContent);
|
|
115
|
+
tree.delete(outputPath);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
log.error(err);
|
|
120
|
+
dracoLoader?.dispose();
|
|
121
|
+
return process.exit(1);
|
|
122
|
+
}
|
|
123
|
+
finally {
|
|
124
|
+
log.debug('Disposing of DracoLoader');
|
|
125
|
+
dracoLoader?.dispose();
|
|
126
|
+
}
|
|
134
127
|
await (0, devkit_1.formatFiles)(tree);
|
|
135
128
|
}
|
|
136
129
|
exports.default = gltfGenerator;
|
|
@@ -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":";;AA6FA,sCAgGC;AA7LD,uCAAqE;AACrE,yCAA6D;AAC7D,uDAAmD;AAgCnD,sCAAsC;AACtC,SAAS,gBAAgB,CAAC,IAAU,EAAE,OAA4B,EAAE,OAA4C;IAC/G,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAExB,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE/D,MAAM,cAAc,GAAG;QACtB,GAAG;QACH,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;KAC5B,CAAC;IAEF,MAAM,gBAAgB,GAAG;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK;QACnF,cAAc,EAAE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UAAU,CAAC,CAAC;QACzB,CAAC;IACF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACf,WAAW,EAAE,OAAO,EAAE,CAAC;QACvB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC;YAAS,CAAC;QACV,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACtC,WAAW,EAAE,OAAO,EAAE,CAAC;IACxB,CAAC;IAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import type { GltfGeneratorSchema } from '../gltf';
|
|
2
2
|
export declare class GenerateNGT {
|
|
3
3
|
private analyzedGLTF;
|
|
4
|
+
private gltfjsxAPI;
|
|
4
5
|
private options;
|
|
5
6
|
ngtTypes: Set<string>;
|
|
6
7
|
args: boolean;
|
|
7
|
-
constructor(analyzedGLTF: import('@rosskevin/gltfjsx').AnalyzedGLTF, options: GltfGeneratorSchema);
|
|
8
|
-
generate():
|
|
8
|
+
constructor(analyzedGLTF: import('@rosskevin/gltfjsx').AnalyzedGLTF, gltfjsxAPI: typeof import('@rosskevin/gltfjsx'), options: GltfGeneratorSchema);
|
|
9
|
+
generate(): string;
|
|
10
|
+
getGenerateOptions(): {
|
|
11
|
+
animations: import("three").AnimationClip[];
|
|
12
|
+
extras: string;
|
|
13
|
+
threeImports: string;
|
|
14
|
+
args: boolean;
|
|
15
|
+
perspective: boolean;
|
|
16
|
+
orthographic: boolean;
|
|
17
|
+
meshesTypes: string;
|
|
18
|
+
bonesTypes: string;
|
|
19
|
+
materialsTypes: string;
|
|
20
|
+
angularImports: any[];
|
|
21
|
+
};
|
|
22
|
+
private get ngtTypesArr();
|
|
9
23
|
private print;
|
|
10
24
|
private handleAngularInputs;
|
|
11
25
|
private getType;
|
|
@@ -3,28 +3,87 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GenerateNGT = void 0;
|
|
4
4
|
class GenerateNGT {
|
|
5
5
|
analyzedGLTF;
|
|
6
|
+
gltfjsxAPI;
|
|
6
7
|
options;
|
|
7
8
|
ngtTypes = new Set();
|
|
8
9
|
args = false;
|
|
9
10
|
constructor(
|
|
10
11
|
// @ts-expect-error - type only import
|
|
11
|
-
analyzedGLTF,
|
|
12
|
+
analyzedGLTF,
|
|
13
|
+
// @ts-expect-error - type only import
|
|
14
|
+
gltfjsxAPI, options) {
|
|
12
15
|
this.analyzedGLTF = analyzedGLTF;
|
|
16
|
+
this.gltfjsxAPI = gltfjsxAPI;
|
|
13
17
|
this.options = options;
|
|
14
18
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return this.analyzedGLTF.gltf.scene.children.map((child) => this.print(child, gltfjsxApi)).join('\n');
|
|
19
|
+
generate() {
|
|
20
|
+
return this.analyzedGLTF.gltf.scene.children.map((child) => this.print(child)).join('\n');
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
22
|
+
getGenerateOptions() {
|
|
23
|
+
const perspective = this.ngtTypes.has('PerspectiveCamera');
|
|
24
|
+
const orthographic = this.ngtTypes.has('OrthographicCamera');
|
|
25
|
+
const angularImports = [];
|
|
26
|
+
if (this.args)
|
|
27
|
+
angularImports.push('NgtArgs');
|
|
28
|
+
if (perspective)
|
|
29
|
+
angularImports.push('NgtsPerspectiveCamera');
|
|
30
|
+
if (orthographic)
|
|
31
|
+
angularImports.push('NgtsOrthographicCamera');
|
|
32
|
+
const meshesTypes = this.analyzedGLTF
|
|
33
|
+
.getMeshes()
|
|
34
|
+
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
35
|
+
.join(';\n');
|
|
36
|
+
const bonesTypes = this.analyzedGLTF
|
|
37
|
+
.getBones()
|
|
38
|
+
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
39
|
+
.join(';\n');
|
|
40
|
+
const materialsTypes = this.analyzedGLTF
|
|
41
|
+
.getMaterials()
|
|
42
|
+
.map(({ name, type }) => "\'" + name + "\'" + ': THREE.' + type)
|
|
43
|
+
.join(';\n');
|
|
44
|
+
this.analyzedGLTF.options.log.debug({ materialsTypes });
|
|
45
|
+
const animations = this.analyzedGLTF.gltf.animations || [];
|
|
46
|
+
const gltfExtras = this.analyzedGLTF.gltf.parser.json.asset && this.analyzedGLTF.gltf.parser.json.asset.extras;
|
|
47
|
+
const extras = gltfExtras
|
|
48
|
+
? Object.keys(gltfExtras)
|
|
49
|
+
.map((key) => `${key.charAt(0).toUpperCase() + key.slice(1)}: ${gltfExtras[key]}`)
|
|
50
|
+
.join('\n')
|
|
51
|
+
: '';
|
|
52
|
+
const ngtTypesArr = this.ngtTypesArr;
|
|
53
|
+
const threeImports = ngtTypesArr.length ? `, ${ngtTypesArr.join(',')}` : '';
|
|
54
|
+
return {
|
|
55
|
+
animations,
|
|
56
|
+
extras,
|
|
57
|
+
threeImports,
|
|
58
|
+
args: this.args,
|
|
59
|
+
perspective,
|
|
60
|
+
orthographic,
|
|
61
|
+
meshesTypes,
|
|
62
|
+
bonesTypes,
|
|
63
|
+
materialsTypes,
|
|
64
|
+
angularImports,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
get ngtTypesArr() {
|
|
68
|
+
return Array.from(this.ngtTypes).filter((t) =>
|
|
69
|
+
// group always is the top-level object
|
|
70
|
+
t !== 'Group' &&
|
|
71
|
+
// we render ngts-perspective-camera instead of ngt-perspective-camera
|
|
72
|
+
t !== 'PerspectiveCamera' &&
|
|
73
|
+
// we render ngts-orthographic-camera instead of ngt-orthographic-camera
|
|
74
|
+
t !== 'OrthographicCamera' &&
|
|
75
|
+
// we don't render ngt-bone
|
|
76
|
+
t !== 'Bone' &&
|
|
77
|
+
// we don't render ngt-object3D
|
|
78
|
+
t !== 'Object3D');
|
|
79
|
+
}
|
|
80
|
+
print(obj) {
|
|
81
|
+
const { nodeName, isRemoved, isTargetedLight, isInstancedMesh, sanitizeName } = this.gltfjsxAPI;
|
|
23
82
|
let result = '';
|
|
24
83
|
let children = '';
|
|
25
84
|
// Children
|
|
26
85
|
if (obj.children)
|
|
27
|
-
obj.children.forEach((child) => (children += this.print(child
|
|
86
|
+
obj.children.forEach((child) => (children += this.print(child)));
|
|
28
87
|
// Bail out if the object was pruned
|
|
29
88
|
if (isRemoved(obj))
|
|
30
89
|
return children;
|
|
@@ -137,10 +196,4 @@ class GenerateNGT {
|
|
|
137
196
|
}
|
|
138
197
|
}
|
|
139
198
|
exports.GenerateNGT = GenerateNGT;
|
|
140
|
-
// export async function generateNGT(
|
|
141
|
-
// // @ts-expect-error - type only import
|
|
142
|
-
// analyzedGLTF: import('@rosskevin/gltfjsx').AnalyzedGLTF,
|
|
143
|
-
// ) {}
|
|
144
|
-
//
|
|
145
|
-
// function generate(obj: Object3D) {}
|
|
146
199
|
//# sourceMappingURL=generate-ngt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-ngt.js","sourceRoot":"","sources":["../../../../../../../libs/plugin/src/generators/gltf/utils/generate-ngt.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;IAMd;IACA;
|
|
1
|
+
{"version":3,"file":"generate-ngt.js","sourceRoot":"","sources":["../../../../../../../libs/plugin/src/generators/gltf/utils/generate-ngt.ts"],"names":[],"mappings":";;;AAGA,MAAa,WAAW;IAMd;IAEA;IACA;IART,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAC7B,IAAI,GAAG,KAAK,CAAC;IAEb;IACC,sCAAsC;IAC9B,YAAuD;IAC/D,sCAAsC;IAC9B,UAA+C,EAC/C,OAA4B;QAH5B,iBAAY,GAAZ,YAAY,CAA2C;QAEvD,eAAU,GAAV,UAAU,CAAqC;QAC/C,YAAO,GAAP,OAAO,CAAqB;IAClC,CAAC;IAEJ,QAAQ;QACP,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