Add shared-scene 2D authoring, sprite animation and Rapier2D physics
CI / validate (push) Waiting to run

This commit is contained in:
emil28092005
2026-09-12 04:58:59 +03:00
parent 6f497d1977
commit 3afac743a4
32 changed files with 4999 additions and 270 deletions
+5 -2
View File
@@ -3,16 +3,19 @@
"api": {
"state": "Persistent per-instance mutable data during one play run",
"params": "Field defaults + component.script.params",
"input": "{x,z,attack,pointer,aim,jump,dash,sprint,jumpPressed,dashPressed,resetPressed,yaw,pitch}; yaw=0 faces -Z in first person",
"input": "{x,y,z,attack,pointer,aim,jump,dash,sprint,jumpPressed,dashPressed,resetPressed,yaw,pitch}; yaw=0 faces -Z in first person",
"get": "api.get(id?) -> clone of entity or null",
"entities": "api.entities() -> clones of entity states",
"position": "api.position(id?) -> local coordinates",
"move": "api.move([dx,dy,dz]); real collisions for kinematic body",
"physics": "api.physics(id?) -> {grounded,velocity:{x,y,z},contacts:[{entityId,normal:[x,y,z]}]}",
"velocity": "api.velocity({x?,y?,z?,gravityScale?}); persistent m/s, requires character component; gravity runs at 60 Hz",
"velocity": "api.velocity({x?,y?,z?,gravityScale?}); persistent m/s, requires 3D character or any body2d; 2D uses x/y. Gravity runs at 60 Hz",
"teleport": "api.teleport([x,y,z],yaw?); clears velocity and contacts for character respawn",
"emit": "api.emit(name,data?); delivers a presentation event to runtime callbacks",
"rotate": "api.rotate(yRadians)",
"rotate2D": "api.rotate2D(zRadians)",
"impulse2D": "api.impulse2D([x,y]); applies impulse to dynamic body2d",
"collision2d": "Optional behavior hook collision2d(api,event): {entityId,otherId,started,sensor}. Runs before update.",
"patch": "api.patch(id,patch); updates state/transform/enabled. Structural mesh/collider edits take effect next Play.",
"animate": "api.animate(clipOrState,loop=true); use false for a one-shot animation",
"effect": "api.effect(\"swing\"|\"hit\",id?)",