@series-inc/stowkit-cli 0.1.16 → 0.1.18
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/app/disk-project.d.ts +1 -0
- package/dist/orchestrator.js +9 -1
- package/dist/server.js +19 -3
- package/package.json +1 -1
- package/skill.md +13 -0
package/dist/orchestrator.js
CHANGED
|
@@ -149,7 +149,15 @@ export async function fullBuild(projectDir, opts) {
|
|
|
149
149
|
}
|
|
150
150
|
for (const mesh of extract.meshes) {
|
|
151
151
|
const typeName = mesh.hasSkeleton ? 'skinnedMesh' : 'staticMesh';
|
|
152
|
-
|
|
152
|
+
const meshChild = existingChildren.get(mesh.name) ?? generateDefaultGlbChild(mesh.name, typeName);
|
|
153
|
+
// Store scene node names so AI agents can see the hierarchy in the stowmeta
|
|
154
|
+
if (mesh.imported.nodes.length > 1) {
|
|
155
|
+
meshChild.sceneNodeNames = mesh.imported.nodes.map(n => n.name);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
delete meshChild.sceneNodeNames;
|
|
159
|
+
}
|
|
160
|
+
childrenManifest.push(meshChild);
|
|
153
161
|
}
|
|
154
162
|
for (const mat of extract.materials) {
|
|
155
163
|
const matName = `${mat.name}.stowmat`;
|
package/dist/server.js
CHANGED
|
@@ -240,8 +240,15 @@ async function processGlbContainer(containerId) {
|
|
|
240
240
|
// Process meshes
|
|
241
241
|
for (const mesh of extract.meshes) {
|
|
242
242
|
const typeName = mesh.hasSkeleton ? 'skinnedMesh' : 'staticMesh';
|
|
243
|
-
const
|
|
244
|
-
|
|
243
|
+
const meshChild = existingChildren.get(mesh.name) ?? generateDefaultGlbChild(mesh.name, typeName);
|
|
244
|
+
// Store scene node names so AI agents can see the hierarchy in the stowmeta
|
|
245
|
+
if (mesh.imported.nodes.length > 1) {
|
|
246
|
+
meshChild.sceneNodeNames = mesh.imported.nodes.map(n => n.name);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
delete meshChild.sceneNodeNames;
|
|
250
|
+
}
|
|
251
|
+
childrenManifest.push(meshChild);
|
|
245
252
|
}
|
|
246
253
|
// Process materials
|
|
247
254
|
for (const mat of extract.materials) {
|
|
@@ -516,8 +523,14 @@ async function processOneAsset(id) {
|
|
|
516
523
|
const asset = assets.find(a => a.id === id);
|
|
517
524
|
if (!asset)
|
|
518
525
|
return;
|
|
519
|
-
if (asset.type === AssetType.MaterialSchema)
|
|
526
|
+
if (asset.type === AssetType.MaterialSchema) {
|
|
527
|
+
// Materials are metadata-only — no encoding needed. Ensure they're always ready.
|
|
528
|
+
if (asset.status !== 'ready') {
|
|
529
|
+
asset.status = 'ready';
|
|
530
|
+
broadcast({ type: 'asset-update', id, updates: { status: 'ready' } });
|
|
531
|
+
}
|
|
520
532
|
return;
|
|
533
|
+
}
|
|
521
534
|
// GLB children: if source data isn't in BlobStore, re-extract from parent GLB
|
|
522
535
|
// and process just this child (not the entire container)
|
|
523
536
|
if (asset.parentId && !BlobStore.getSource(id)) {
|
|
@@ -734,9 +747,12 @@ async function handleRequest(req, res, staticApps) {
|
|
|
734
747
|
[...currentIds].some(id => !diskIds.has(id)) ||
|
|
735
748
|
[...diskIds].some(id => !currentIds.has(id));
|
|
736
749
|
// Check for modified files (size or mtime changed)
|
|
750
|
+
// Skip MaterialSchema — .stowmat files are metadata-only and written by the server itself
|
|
737
751
|
const modifiedIds = [];
|
|
738
752
|
if (!changed) {
|
|
739
753
|
for (const asset of currentAssets) {
|
|
754
|
+
if (asset.type === AssetType.MaterialSchema)
|
|
755
|
+
continue;
|
|
740
756
|
const diskFile = diskFiles.get(asset.id);
|
|
741
757
|
if (diskFile && asset.sourceSize > 0 && diskFile.size !== asset.sourceSize) {
|
|
742
758
|
modifiedIds.push(asset.id);
|
package/package.json
CHANGED
package/skill.md
CHANGED
|
@@ -248,6 +248,19 @@ The build pipeline automatically:
|
|
|
248
248
|
|
|
249
249
|
Set `"preserveHierarchy": true` on a GLB container to preserve the scene graph node hierarchy in extracted static meshes. When false (default), all mesh geometry is baked to world space and flattened. Skinned meshes are always excluded from hierarchy preservation.
|
|
250
250
|
|
|
251
|
+
When preserve hierarchy is enabled, mesh children in the `.stowmeta` will include a `sceneNodeNames` array listing all scene graph nodes in that mesh:
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"name": "Environment",
|
|
256
|
+
"childType": "staticMesh",
|
|
257
|
+
"stringId": "environment",
|
|
258
|
+
"sceneNodeNames": ["Root", "Floor", "Wall_North", "Wall_South", "Ceiling", "Door_Frame"]
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
This lets you see which nodes are in the hierarchy without reading the binary processed data. The array is automatically populated during extraction and only appears when the mesh has more than one node.
|
|
263
|
+
|
|
251
264
|
### GLB child settings
|
|
252
265
|
|
|
253
266
|
Each child in the `children` array supports the same settings as its corresponding standalone asset type:
|