adiciona modelo real
This commit is contained in:
1 parent
71d13753c9
commit
3a659a52c7
18 files changed
+612
-176
No files matched your search
@@ -5,7 +5,10 @@ import { fileURLToPath } from "node:url";
|
||||
import { buildGeometry } from "./geometry.mjs";
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const manifestPath = path.resolve(__dirname, "../seed/manifest.json");
|
||||
const manifestPath = path.resolve(
|
||||
__dirname,
|
||||
process.argv[2] ?? "../seed/manifest-tegumentar.json",
|
||||
);
|
||||
const outDir = path.resolve(__dirname, "../seed/models");
|
||||
mkdirSync(outDir, { recursive: true });
|
||||
|
||||
@@ -80,9 +83,9 @@ for (const [systemSlug, items] of bySystem) {
|
||||
.setIndices(idxAccessor)
|
||||
.setMaterial(material);
|
||||
|
||||
const mesh = doc.createMesh(item.slug).addPrimitive(prim);
|
||||
const mesh = doc.createMesh(item.meshName).addPrimitive(prim);
|
||||
const node = doc
|
||||
.createNode(item.slug)
|
||||
.createNode(item.meshName)
|
||||
.setMesh(mesh)
|
||||
.setTranslation(item.position)
|
||||
.setRotation(eulerToQuat(item.rotation ?? [0, 0, 0]));
|
||||
|
||||
Reference in new issue
Block a user