Let Spawn take an asset over an edge and find a child by name (#237)
An asset could only be picked as a setting on the Spawn node. It could not be wired in, held in a variable or put into a list. Finding an object below the own one needed a scene-wide search by name. - "Asset" is now a kind like Animation or Sound: port, variable, list item and a new "Asset" literal node, with its own cube icon. - Spawn and Is asset have an `asset` input. It uses the key of the old setting, so a saved asset reads as the value of the input and older projects keep spawning without a migration. - New node "Child by name" searches below an object level by level. A child wins over a grandchild of the same name. Nothing found or no object gives null. Tests: - ./check.sh: 168 files, 2453 tests, CHECK EXIT 0. - 9 new unit tests in tests/core/asset-kind.test.ts, catalog cases for Spawn, Is asset, Child by name and the literal. - e2e 6z-ii (2 checks): node rows and a real drag of the literal onto `asset`. e2e 6: 119 checks passed. Spawn checks in 3 and 9 passed. - Counter-checks: depth-first search fails 1, Spawn reading only the old setting fails 3, runtime ignoring the parent fails 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1b3cb625a3
commit
923baf2557
18 files changed
+345
-24
No files matched your search
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" id="kind-asset" viewBox="-8 -8 16 16" width="16" height="16">
|
||||
<path d="M0 -5.5 L5 -3 L5 3 L0 5.5 L-5 3 L-5 -3 Z" fill="none" stroke="currentColor" stroke-width="1.2" />
|
||||
<path d="M-5 -3 L0 -0.5 L5 -3 M0 -0.5 L0 5.5" fill="none" stroke="currentColor" stroke-width="1.2" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 322 B |
@@ -9,6 +9,7 @@ import arrowOut from './icons/arrow-out.svg?raw';
|
||||
import fitHeight from './icons/fit-height.svg?raw';
|
||||
import fitWidth from './icons/fit-width.svg?raw';
|
||||
import animation from './icons/kind-animation.svg?raw';
|
||||
import asset from './icons/kind-asset.svg?raw';
|
||||
import boolean from './icons/kind-boolean.svg?raw';
|
||||
import color from './icons/kind-color.svg?raw';
|
||||
import list from './icons/kind-list.svg?raw';
|
||||
@@ -23,6 +24,7 @@ import reset from './icons/reset.svg?raw';
|
||||
/** Kinds shown as a picture; the rest keep their mark in letters (`#`, `Aa`). */
|
||||
export const KIND_ICON_SVG: Partial<Record<Kind, string>> = {
|
||||
animation,
|
||||
asset,
|
||||
boolean,
|
||||
color,
|
||||
list,
|
||||
|
||||
Reference in new issue
Block a user