[feat] 33 P2: animated, functional pack items (doors that open, no autoplay) - #259
Merged
Merged
Conversation
…op), no autoplay
- behaviorCore.js (pure, vitest 18): normalizeBehavior, the pose as a pure function of
{on, at, from, n} + the session clock, nextState, frameSlabs/passageThrough (the doorway
cut out of a one-piece frame, through the wall's depth)
- packBehavior.js: per-frame pose driver (rest pose in Edit whatever the shared state),
a core click handler in moduleSDK's one dispatch (desktop Interact click, Play tap, VR
laser/poke), proximity (1.5 m) and knock (VR hand >= 0.6 m/s) triggers, the `behavior`
wire message (latest-wins on sessionNow), a kinematic box per moving node that follows
the swing while a sim runs + the frame as custom slab colliders, a local Animation-panel
preview (never sent/saved), the per-item sound
- animatedImports: NOTHING AUTOPLAYS on placement any more (the first clip used to start
and loop); behavior roots skip the transport; spec (+ live state on the wire, + the
lod-editor's userData.lod) ride objectfile, the save snapshot and the undo entry
- fileHandler: animated imports land at the drop point; opts.behavior from the pack row
- packs/Explorer/explorerDrop: the row's spec travels to placement; an "animated" badge on
cards and list rows
- gameSfx: + door gate slide lever lid; wireValidate `behavior` shape; ROOM_SCOPED;
vrGameInput treats behavior roots as clickable; api.behavior {list, state, trigger}
- suites: pack-behavior (new; test-door.glb built with gltf-transform), animated-models and
animation-persist press play first now, game-audio expects 25 sounds
WIP at the budget checkpoint: pack-behavior ran 41 pass / 8 fail before the priming fix in
this commit. 7.2 (the first walk resolved on the plane tier: charController's lazy physics
import; primed now, not re-run). 7.6 (the reopen click on the frame post did not toggle)
cascades into 8.2/9.1/11.2/13.1/13.2 - next window's first job. Counterfactuals already
green: 7.7 (uncut frame = a wall when open), 2.3/12.1 (no autoplay), 14.1 (slow hand).
svelte-check 333/47 (= base), vitest 396/396, check-storage clean.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…behavior - PACKS.md: the behavior contract (types, triggers, the no-autoplay rule, shared state, frame + moving parts + collider follow, authoring notes, the Explorer badge) - MODULES.md: api.behavior list/state/trigger and the five item sounds Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t play schedules the clip
- physics: with nothing dynamic, a sim start simulated the (sticky) selectedObject — the
door just placed. It fell over and every Interact click on it became a carry (the
pack-behavior 7.x flake). Functional items (userData.behavior) are skipped; a door-only
scene now gets the existing "Nothing to simulate" toast.
Counterfactual: pack-behavior 7.0a (the door dynamic) and 7.3/7.7 go red without it.
- animatedImports: with registration no longer autoplaying, nothing scheduled the action
when `playing` later turned true (a press, or a restored playing save) — the state said
playing and nothing moved. setAnimationState schedules it on the first play.
Counterfactual: animated-models "clip animates on A/B", animation-persist "animates
before saving / after the round trip" go red without it.
- packBehaviorDebug grows click diagnostics (clicks, lastClick {mesh, result}).
- suites: pack-behavior primes the walker, adds a real dynamic crate + 7.0a/7.0b, samples
the preview window (10.1); animation-persist's panel section starts from a playing clip.
Battery (vite inside e2e-slot, PEER_CONFIG): pack-behavior 51/0, animated-models 15/0,
animation-persist 23/0, game-audio 26/0, packs-explorer 10/0. svelte-check 333/47 (= base),
vitest 396/396, check-storage clean, npm run build green.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap 33, lane 33-anim-core: contract P2, animated, functional pack items. This is the core half of K4 ("if its a door it should be functional ... not randomly plays animation or in loop").
What it does
behavioron a pack item (door | toggle | oneshot | loop, triggersclick | proximity | knock). A peer in Edit always sees the rest pose. A trigger works in Interact/Play: the desktop click, the Play tap, and the VR laser/poke, which all go through moduleSDK's one click dispatch. Proximity is 1.5 m. A knock is a VR hand at >= 0.6 m/s.behaviormessage{uuid, on, at, from, n}, latest-wins onsessionNow(). It has a wireValidate shape and is ROOM_SCOPED. Every peer derives the pose from the stamp. A late joiner getsbehaviorStateon itsobjectfile. The state is runtime only: never saved, never undone.door gate slide lever lid.api.behavior{list, state, trigger}for modules.userData.lodon objectfile, the save and undo, for 33-lod-editor.Contract notes for the pack lanes are at the top of the handover. anim-kit's 19 interactive-kit items were checked against the runtime offline.
Proof
pack-behavior(new, 51 checks, two peers + a late joiner), driving the real Explorer path with a routed pack and a gltf-transform test door (tests/e2e/fixtures/test-door.glb):api.behavior, and a slow vs fast knock.behaviorCore(18).npm run buildgreen.Owed on device
A door in a Quest (laser click, poke, knock speed), the sounds' character, the badge in non-dark themes, and walking up to a proximity sliding door for real.
Forks taken (QUESTIONS-33-anim-core.md)
playing: truekeep playing.🤖 Generated with Claude Code