@zylem/behaviors 0.3.0 → 0.3.1
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/LICENSE +21 -0
- package/dist/{chunk-K4UBXSZL.js → chunk-2C3Z5GE7.js} +2 -1
- package/dist/chunk-2C3Z5GE7.js.map +1 -0
- package/dist/{chunk-BC3IJYS7.js → chunk-2CLT36VB.js} +5 -4
- package/dist/chunk-2CLT36VB.js.map +1 -0
- package/dist/{chunk-23HQH3GJ.js → chunk-3PYGRHAL.js} +2 -1
- package/dist/chunk-3PYGRHAL.js.map +1 -0
- package/dist/{chunk-6UMC6BB5.js → chunk-4I6E6DGV.js} +5 -4
- package/dist/chunk-4I6E6DGV.js.map +1 -0
- package/dist/{chunk-RER2IDPW.js → chunk-4URF65BR.js} +1 -0
- package/dist/chunk-4URF65BR.js.map +1 -0
- package/dist/{chunk-IEA7F73P.js → chunk-6C6NXNEW.js} +2 -1
- package/dist/chunk-6C6NXNEW.js.map +1 -0
- package/dist/{chunk-WSKD7GY3.js → chunk-7JJEIADR.js} +1 -0
- package/dist/chunk-7JJEIADR.js.map +1 -0
- package/dist/{chunk-6Y3GB76J.js → chunk-ARJWUNRE.js} +4 -3
- package/dist/chunk-ARJWUNRE.js.map +1 -0
- package/dist/{chunk-F6LFX4V3.js → chunk-BXP4K7RF.js} +3 -2
- package/dist/chunk-BXP4K7RF.js.map +1 -0
- package/dist/{chunk-F7E23E26.js → chunk-DYLH6K7B.js} +1 -0
- package/dist/chunk-DYLH6K7B.js.map +1 -0
- package/dist/{chunk-2HKY6WF7.js → chunk-EIWQM6U3.js} +1 -0
- package/dist/chunk-EIWQM6U3.js.map +1 -0
- package/dist/{chunk-YDLO5M7S.js → chunk-EZNCCO4L.js} +1 -0
- package/dist/chunk-EZNCCO4L.js.map +1 -0
- package/dist/{chunk-FOOM42MK.js → chunk-F3KRX2V4.js} +6 -5
- package/dist/chunk-F3KRX2V4.js.map +1 -0
- package/dist/{chunk-7IZ36Y5G.js → chunk-FPTWVCPN.js} +3 -2
- package/dist/chunk-FPTWVCPN.js.map +1 -0
- package/dist/{chunk-7Y6JVZ5H.js → chunk-GCNRXAKH.js} +2 -1
- package/dist/chunk-GCNRXAKH.js.map +1 -0
- package/dist/{chunk-4DVDFCVY.js → chunk-HZMY3TT4.js} +1 -0
- package/dist/chunk-HZMY3TT4.js.map +1 -0
- package/dist/{chunk-7U4WFBWM.js → chunk-ID5QJYF5.js} +1 -0
- package/dist/chunk-ID5QJYF5.js.map +1 -0
- package/dist/{chunk-T2P4JTQN.js → chunk-JAN34G6S.js} +3 -2
- package/dist/chunk-JAN34G6S.js.map +1 -0
- package/dist/{chunk-J5XLB24H.js → chunk-K3UNLQ7W.js} +2 -1
- package/dist/chunk-K3UNLQ7W.js.map +1 -0
- package/dist/{chunk-ZHBD65AZ.js → chunk-KDY5N6J4.js} +1 -0
- package/dist/chunk-KDY5N6J4.js.map +1 -0
- package/dist/{chunk-RD2YTTXY.js → chunk-KOZUNIIE.js} +4 -3
- package/dist/chunk-KOZUNIIE.js.map +1 -0
- package/dist/{chunk-2HLZBWGD.js → chunk-KS72RZHX.js} +1 -0
- package/dist/chunk-KS72RZHX.js.map +1 -0
- package/dist/{chunk-4EWASZHB.js → chunk-LD5SMIB3.js} +1 -0
- package/dist/chunk-LD5SMIB3.js.map +1 -0
- package/dist/{chunk-WHKPWIQO.js → chunk-OHCPV2NT.js} +1 -0
- package/dist/chunk-OHCPV2NT.js.map +1 -0
- package/dist/{chunk-HIBJDA5Z.js → chunk-OYWFPIHF.js} +5 -4
- package/dist/chunk-OYWFPIHF.js.map +1 -0
- package/dist/{chunk-FHDYJ5WP.js → chunk-RTRVBEIB.js} +3 -2
- package/dist/chunk-RTRVBEIB.js.map +1 -0
- package/dist/{chunk-RQWWUML4.js → chunk-RTVRUNYR.js} +1 -0
- package/dist/chunk-RTVRUNYR.js.map +1 -0
- package/dist/{chunk-IQRG5BAZ.js → chunk-SS7ELMJ7.js} +5 -4
- package/dist/chunk-SS7ELMJ7.js.map +1 -0
- package/dist/{chunk-L76JG73P.js → chunk-STCCNLPC.js} +4 -3
- package/dist/chunk-STCCNLPC.js.map +1 -0
- package/dist/{chunk-UFHYR2LV.js → chunk-SVLNF434.js} +1 -0
- package/dist/chunk-SVLNF434.js.map +1 -0
- package/dist/{chunk-K6CWKFHL.js → chunk-UYFOLI2X.js} +1 -0
- package/dist/chunk-UYFOLI2X.js.map +1 -0
- package/dist/{chunk-VO5J64DG.js → chunk-VAN4WW3F.js} +3 -2
- package/dist/chunk-VAN4WW3F.js.map +1 -0
- package/dist/{chunk-ERS6SNA5.js → chunk-WOMHL23C.js} +2 -1
- package/dist/chunk-WOMHL23C.js.map +1 -0
- package/dist/{chunk-RHW3IDQX.js → chunk-WWVD5DR5.js} +1 -0
- package/dist/chunk-WWVD5DR5.js.map +1 -0
- package/dist/{chunk-E4HTCQPK.js → chunk-XG2YMCJW.js} +5 -4
- package/dist/chunk-XG2YMCJW.js.map +1 -0
- package/dist/{chunk-D53GNZXP.js → chunk-XIJNE67Y.js} +4 -3
- package/dist/chunk-XIJNE67Y.js.map +1 -0
- package/dist/{chunk-YYJP62QD.js → chunk-Y6UJOUE5.js} +1 -0
- package/dist/chunk-Y6UJOUE5.js.map +1 -0
- package/dist/{chunk-SBACY5SU.js → chunk-YUO6SKJD.js} +6 -5
- package/dist/chunk-YUO6SKJD.js.map +1 -0
- package/dist/{chunk-VPZ32CCD.js → chunk-ZPSAXX73.js} +4 -3
- package/dist/chunk-ZPSAXX73.js.map +1 -0
- package/dist/cooldown.js +3 -2
- package/dist/cooldown.js.map +1 -0
- package/dist/coordinators/boundary-ricochet-3d.js +3 -2
- package/dist/coordinators/boundary-ricochet-3d.js.map +1 -0
- package/dist/coordinators/boundary-ricochet.js +3 -2
- package/dist/coordinators/boundary-ricochet.js.map +1 -0
- package/dist/coordinators/first-person-shooter.js +4 -3
- package/dist/coordinators/first-person-shooter.js.map +1 -0
- package/dist/coordinators/multidirectional-space-shooter.js +5 -4
- package/dist/coordinators/multidirectional-space-shooter.js.map +1 -0
- package/dist/coordinators/top-down-shooter.js +5 -4
- package/dist/coordinators/top-down-shooter.js.map +1 -0
- package/dist/core.js +7 -6
- package/dist/core.js.map +1 -0
- package/dist/destructible-3d.js +4 -3
- package/dist/destructible-3d.js.map +1 -0
- package/dist/destructible-prebake.js +2 -1
- package/dist/destructible-prebake.js.map +1 -0
- package/dist/first-person.js +7 -6
- package/dist/first-person.js.map +1 -0
- package/dist/index.js +39 -38
- package/dist/index.js.map +1 -0
- package/dist/jumper-2d.js +6 -5
- package/dist/jumper-2d.js.map +1 -0
- package/dist/jumper-3d.js +7 -6
- package/dist/jumper-3d.js.map +1 -0
- package/dist/particle-emitter/presets.js +2 -1
- package/dist/particle-emitter/presets.js.map +1 -0
- package/dist/particle-emitter.js +5 -4
- package/dist/particle-emitter.js.map +1 -0
- package/dist/platformer-3d.js +4 -3
- package/dist/platformer-3d.js.map +1 -0
- package/dist/ricochet-2d.js +5 -4
- package/dist/ricochet-2d.js.map +1 -0
- package/dist/ricochet-3d.js +5 -4
- package/dist/ricochet-3d.js.map +1 -0
- package/dist/runtime-2d.js +3 -2
- package/dist/runtime-2d.js.map +1 -0
- package/dist/runtime-pong.js +3 -2
- package/dist/runtime-pong.js.map +1 -0
- package/dist/screen-visibility.js +3 -2
- package/dist/screen-visibility.js.map +1 -0
- package/dist/screen-wrap.js +5 -4
- package/dist/screen-wrap.js.map +1 -0
- package/dist/shooter-2d.js +5 -4
- package/dist/shooter-2d.js.map +1 -0
- package/dist/thruster.js +6 -5
- package/dist/thruster.js.map +1 -0
- package/dist/top-down-movement.js +6 -5
- package/dist/top-down-movement.js.map +1 -0
- package/dist/world-boundary-2d.js +6 -5
- package/dist/world-boundary-2d.js.map +1 -0
- package/dist/world-boundary-3d.js +6 -5
- package/dist/world-boundary-3d.js.map +1 -0
- package/package.json +4 -3
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TopDownShooterCoordinator
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-FPTWVCPN.js";
|
|
4
|
+
import "../chunk-6C6NXNEW.js";
|
|
5
|
+
import "../chunk-EIWQM6U3.js";
|
|
6
|
+
import "../chunk-ID5QJYF5.js";
|
|
7
7
|
export {
|
|
8
8
|
TopDownShooterCoordinator
|
|
9
9
|
};
|
|
10
|
+
//# sourceMappingURL=top-down-shooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/core.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createPhysicsBodyComponent,
|
|
3
3
|
createTransformComponent,
|
|
4
4
|
useBehavior
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UYFOLI2X.js";
|
|
6
6
|
import {
|
|
7
7
|
StageBodyKind,
|
|
8
8
|
StageBoundaryDim,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
StageRicochetDim,
|
|
11
11
|
StageRicochetReflection,
|
|
12
12
|
StageTopDownPlane
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-Y6UJOUE5.js";
|
|
14
14
|
import {
|
|
15
15
|
VEC2_ONE,
|
|
16
16
|
VEC2_ZERO,
|
|
@@ -23,18 +23,18 @@ import {
|
|
|
23
23
|
toRapierVector3,
|
|
24
24
|
toThreeVector2,
|
|
25
25
|
toThreeVector3
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WWVD5DR5.js";
|
|
27
27
|
import {
|
|
28
28
|
clearVelocityIntent,
|
|
29
29
|
setVelocityIntent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-RTVRUNYR.js";
|
|
31
31
|
import {
|
|
32
32
|
SyncStateMachine,
|
|
33
33
|
t
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4URF65BR.js";
|
|
35
35
|
import {
|
|
36
36
|
defineBehavior
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-EZNCCO4L.js";
|
|
38
38
|
|
|
39
39
|
// src/lib/actions/capabilities/transform-store.ts
|
|
40
40
|
import { proxy } from "valtio";
|
|
@@ -324,3 +324,4 @@ export {
|
|
|
324
324
|
wrapAround3D,
|
|
325
325
|
wrapAroundXY
|
|
326
326
|
};
|
|
327
|
+
//# sourceMappingURL=core.js.map
|
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/actions/capabilities/transform-store.ts","../src/lib/actions/capabilities/moveable.ts","../src/lib/entities/entity.ts"],"sourcesContent":["import { proxy } from 'valtio';\n\nexport type VelocityIntentMode = 'replace' | 'add';\n\nexport interface VelocityIntent {\n\tx?: number;\n\ty?: number;\n\tz?: number;\n\tmode: VelocityIntentMode;\n\tpriority?: number;\n}\n\n/**\n * Transform state managed by Valtio for batched physics updates.\n * \n * This store accumulates transformation intents during the frame,\n * then applies them all at once after onUpdate() callbacks complete.\n * \n * Design decisions:\n * - Position: Accumulated deltas (additive)\n * - Rotation: Last value wins (replacement)\n * - Velocity: Accumulated deltas (additive)\n * - Angular velocity: Accumulated deltas (additive)\n */\nexport interface TransformState {\n\t/** Position deltas to be applied (accumulated) */\n\tposition: { x: number; y: number; z: number };\n\t\n\t/** Rotation quaternion (last value wins) */\n\trotation: { x: number; y: number; z: number; w: number };\n\t\n\t/** Linear velocity (accumulated) */\n\tvelocity: { x: number; y: number; z: number };\n\t\n\t/** Angular velocity (accumulated) */\n\tangularVelocity: { x: number; y: number; z: number };\n\n\t/** Per-source velocity intents composed once per frame */\n\tvelocityChannels: Record<string, VelocityIntent>;\n\t\n\t/** Dirty flags to track what needs to be applied */\n\tdirty: {\n\t\tposition: boolean;\n\t\trotation: boolean;\n\t\t/** @deprecated Use per-axis velocityX/Y/Z flags for new code */\n\t\tvelocity: boolean;\n\t\tvelocityX: boolean;\n\t\tvelocityY: boolean;\n\t\tvelocityZ: boolean;\n\t\tvelocityChannels: boolean;\n\t\tangularVelocity: boolean;\n\t};\n}\n\n/**\n * Create a new transform store with optional initial values.\n * The store is a Valtio proxy, making it reactive for debugging/visualization.\n * \n * @param initial Optional initial state values\n * @returns Reactive transform state\n */\nexport function createTransformStore(initial?: Partial<TransformState>): TransformState {\n\tconst defaultState: TransformState = {\n\t\tposition: { x: 0, y: 0, z: 0 },\n\t\trotation: { x: 0, y: 0, z: 0, w: 1 },\n\t\tvelocity: { x: 0, y: 0, z: 0 },\n\t\tangularVelocity: { x: 0, y: 0, z: 0 },\n\t\tvelocityChannels: {},\n\t\tdirty: {\n\t\t\tposition: false,\n\t\t\trotation: false,\n\t\t\tvelocity: false,\n\t\t\tvelocityX: false,\n\t\t\tvelocityY: false,\n\t\t\tvelocityZ: false,\n\t\t\tvelocityChannels: false,\n\t\t\tangularVelocity: false,\n\t\t},\n\t};\n\n\treturn proxy({\n\t\t...defaultState,\n\t\t...initial,\n\t\t// Ensure dirty flags are properly initialized even if partial initial state\n\t\tdirty: {\n\t\t\t...defaultState.dirty,\n\t\t\t...initial?.dirty,\n\t\t},\n\t});\n}\n\n/**\n * Reset a transform store to its initial clean state.\n * Called after applying changes to prepare for the next frame.\n * \n * @param store The transform store to reset\n */\nexport function resetTransformStore(store: TransformState): void {\n\t// Reset position deltas\n\tstore.position.x = 0;\n\tstore.position.y = 0;\n\tstore.position.z = 0;\n\n\t// Reset rotation to identity quaternion\n\tstore.rotation.x = 0;\n\tstore.rotation.y = 0;\n\tstore.rotation.z = 0;\n\tstore.rotation.w = 1;\n\n\t// Reset velocity\n\tstore.velocity.x = 0;\n\tstore.velocity.y = 0;\n\tstore.velocity.z = 0;\n\n\t// Reset angular velocity\n\tstore.angularVelocity.x = 0;\n\tstore.angularVelocity.y = 0;\n\tstore.angularVelocity.z = 0;\n\n\t// Reset per-source velocity intents\n\tfor (const sourceId of Object.keys(store.velocityChannels)) {\n\t\tdelete store.velocityChannels[sourceId];\n\t}\n\n\t// Clear all dirty flags\n\tstore.dirty.position = false;\n\tstore.dirty.rotation = false;\n\tstore.dirty.velocity = false;\n\tstore.dirty.velocityX = false;\n\tstore.dirty.velocityY = false;\n\tstore.dirty.velocityZ = false;\n\tstore.dirty.velocityChannels = false;\n\tstore.dirty.angularVelocity = false;\n}\n","import { Vector3 } from 'three';\nimport { RigidBody, Vector } from '@dimforge/rapier3d-compat';\nimport type { TransformState } from './transform-store';\nimport { createTransformStore } from './transform-store';\nimport { setVelocityIntent } from './velocity-intents';\n\nexport interface EntityWithBody {\n\tbody: RigidBody | null;\n\ttransformStore?: TransformState;\n}\n\n/**\n * Move an entity along the X axis, preserving other velocities.\n */\nexport function moveX(entity: EntityWithBody, delta: number): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(entity.transformStore, 'actions', { x: delta }, { mode: 'replace' });\n}\n\n/**\n * Move an entity along the Y axis, preserving other velocities.\n */\nexport function moveY(entity: EntityWithBody, delta: number): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(entity.transformStore, 'actions', { y: delta }, { mode: 'replace' });\n}\n\n/**\n * Move an entity along the Z axis, preserving other velocities.\n */\nexport function moveZ(entity: EntityWithBody, delta: number): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(entity.transformStore, 'actions', { z: delta }, { mode: 'replace' });\n}\n\n/**\n * Move an entity along the X and Y axis, preserving Z velocity.\n */\nexport function moveXY(entity: EntityWithBody, deltaX: number, deltaY: number): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(\n\t\tentity.transformStore,\n\t\t'actions',\n\t\t{ x: deltaX, y: deltaY },\n\t\t{ mode: 'replace' },\n\t);\n}\n\n/**\n * Move an entity along the X and Z axis, preserving Y velocity.\n */\nexport function moveXZ(entity: EntityWithBody, deltaX: number, deltaZ: number): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(\n\t\tentity.transformStore,\n\t\t'actions',\n\t\t{ x: deltaX, z: deltaZ },\n\t\t{ mode: 'replace' },\n\t);\n}\n\n/**\n * Move entity based on a vector, adding to existing velocities.\n */\nexport function move(entity: EntityWithBody, vector: Vector3): void {\n\tif (!entity.transformStore) return;\n\tsetVelocityIntent(\n\t\tentity.transformStore,\n\t\t'actions',\n\t\t{ x: vector.x, y: vector.y, z: vector.z },\n\t\t{ mode: 'add' },\n\t);\n}\n\n/**\n * Reset entity velocity\n */\nexport function resetVelocity(entity: EntityWithBody): void {\n\tif (!entity.body) return;\n\tentity.body.setLinvel(new Vector3(0, 0, 0), true);\n\tentity.body.setLinearDamping(5);\n}\n\n/**\n * Move entity forward in 2D space, preserving Z velocity\n */\nexport function moveForwardXY(entity: EntityWithBody, delta: number, rotation2DAngle: number): void {\n\tconst deltaX = Math.sin(-rotation2DAngle) * delta;\n\tconst deltaY = Math.cos(-rotation2DAngle) * delta;\n\tmoveXY(entity, deltaX, deltaY);\n}\n\n/**\n * Get entity position\n */\nexport function getPosition(entity: EntityWithBody): Vector | null {\n\tif (!entity.body) return null;\n\treturn entity.body.translation();\n}\n\n/**\n * Get entity velocity\n */\nexport function getVelocity(entity: EntityWithBody): Vector | null {\n\tif (!entity.body) return null;\n\treturn entity.body.linvel();\n}\n\n/**\n * Set entity position\n */\nexport function setPosition(entity: EntityWithBody, x: number, y: number, z: number): void {\n\tif (!entity.body) return;\n\tentity.body.setTranslation({ x, y, z }, true);\n}\n\n/**\n * Set entity X position\n */\nexport function setPositionX(entity: EntityWithBody, x: number): void {\n\tif (!entity.body) return;\n\tconst { y, z } = entity.body.translation();\n\tentity.body.setTranslation({ x, y, z }, true);\n}\n\n/**\n * Set entity Y position\n */\nexport function setPositionY(entity: EntityWithBody, y: number): void {\n\tif (!entity.body) return;\n\tconst { x, z } = entity.body.translation();\n\tentity.body.setTranslation({ x, y, z }, true);\n}\n\n/**\n * Set entity Z position\n */\nexport function setPositionZ(entity: EntityWithBody, z: number): void {\n\tif (!entity.body) return;\n\tconst { x, y } = entity.body.translation();\n\tentity.body.setTranslation({ x, y, z }, true);\n}\n\n/**\n * Wrap entity around 2D bounds\n */\nexport function wrapAroundXY(entity: EntityWithBody, boundsX: number, boundsY: number): void {\n\tconst position = getPosition(entity);\n\tif (!position) return;\n\n\tconst { x, y } = position;\n\tconst newX = x > boundsX ? -boundsX : (x < -boundsX ? boundsX : x);\n\tconst newY = y > boundsY ? -boundsY : (y < -boundsY ? boundsY : y);\n\n\tif (newX !== x || newY !== y) {\n\t\tsetPosition(entity, newX, newY, 0);\n\t}\n}\n\n/**\n * Wrap entity around 3D bounds\n */\nexport function wrapAround3D(entity: EntityWithBody, boundsX: number, boundsY: number, boundsZ: number): void {\n\tconst position = getPosition(entity);\n\tif (!position) return;\n\n\tconst { x, y, z } = position;\n\tconst newX = x > boundsX ? -boundsX : (x < -boundsX ? boundsX : x);\n\tconst newY = y > boundsY ? -boundsY : (y < -boundsY ? boundsY : y);\n\tconst newZ = z > boundsZ ? -boundsZ : (z < -boundsZ ? boundsZ : z);\n\n\tif (newX !== x || newY !== y || newZ !== z) {\n\t\tsetPosition(entity, newX, newY, newZ);\n\t}\n}\n\n/**\n * Enhanced moveable entity with bound methods\n */\nexport interface MoveableEntity extends EntityWithBody {\n\tmoveX(delta: number): void;\n\tmoveY(delta: number): void;\n\tmoveZ(delta: number): void;\n\tmoveXY(deltaX: number, deltaY: number): void;\n\tmoveXZ(deltaX: number, deltaZ: number): void;\n\tmove(vector: Vector3): void;\n\tresetVelocity(): void;\n\tmoveForwardXY(delta: number, rotation2DAngle: number): void;\n\tgetPosition(): Vector | null;\n\tgetVelocity(): Vector | null;\n\tsetPosition(x: number, y: number, z: number): void;\n\tsetPositionX(x: number): void;\n\tsetPositionY(y: number): void;\n\tsetPositionZ(z: number): void;\n\twrapAroundXY(boundsX: number, boundsY: number): void;\n\twrapAround3D(boundsX: number, boundsY: number, boundsZ: number): void;\n}\n\n/**\n * Enhance an entity with additive movement methods.\n * Automatically creates a transform store if one doesn't exist.\n */\nexport function makeMoveable<T extends EntityWithBody>(entity: T): T & MoveableEntity {\n\tconst moveable = entity as T & MoveableEntity;\n\n\t// Create transform store if it doesn't exist\n\tif (!moveable.transformStore) {\n\t\tmoveable.transformStore = createTransformStore();\n\t}\n\n\tmoveable.moveX = (delta: number) => moveX(entity, delta);\n\tmoveable.moveY = (delta: number) => moveY(entity, delta);\n\tmoveable.moveZ = (delta: number) => moveZ(entity, delta);\n\tmoveable.moveXY = (deltaX: number, deltaY: number) => moveXY(entity, deltaX, deltaY);\n\tmoveable.moveXZ = (deltaX: number, deltaZ: number) => moveXZ(entity, deltaX, deltaZ);\n\tmoveable.move = (vector: Vector3) => move(entity, vector);\n\tmoveable.resetVelocity = () => resetVelocity(entity);\n\tmoveable.moveForwardXY = (delta: number, rotation2DAngle: number) => moveForwardXY(entity, delta, rotation2DAngle);\n\tmoveable.getPosition = () => getPosition(entity);\n\tmoveable.getVelocity = () => getVelocity(entity);\n\tmoveable.setPosition = (x: number, y: number, z: number) => setPosition(entity, x, y, z);\n\tmoveable.setPositionX = (x: number) => setPositionX(entity, x);\n\tmoveable.setPositionY = (y: number) => setPositionY(entity, y);\n\tmoveable.setPositionZ = (z: number) => setPositionZ(entity, z);\n\tmoveable.wrapAroundXY = (boundsX: number, boundsY: number) => wrapAroundXY(entity, boundsX, boundsY);\n\tmoveable.wrapAround3D = (boundsX: number, boundsY: number, boundsZ: number) => wrapAround3D(entity, boundsX, boundsY, boundsZ);\n\n\treturn moveable;\n}","import type {\n\tBehaviorDescriptor,\n\tBehaviorHandle,\n\tBehaviorRef,\n} from '../behaviors/behavior-descriptor';\n\n/**\n * Minimal, runtime-agnostic entity options contract.\n *\n * The full engine entity (in `@zylem/game-lib`) provides a richer options type,\n * but behaviors only rely on this loose shape.\n */\nexport interface GameEntityOptions {\n\t[key: string]: any;\n\tname?: string;\n}\n\n/**\n * Structural stand-in for the engine `GameEntity`.\n *\n * Behaviors annotate against this loose contract so that `@zylem/behaviors`\n * (and its `@zylem/behaviors/core` surface) never has to depend on the concrete\n * `@zylem/game-lib` entity implementation. The real engine entity is\n * structurally assignable to this type.\n */\nexport class GameEntity<TOptions = unknown> {\n\t[key: string]: any;\n\n\tuuid!: string;\n\tname!: string;\n\ttype!: string;\n\toptions?: TOptions & Record<string, unknown>;\n\tgroup: any = null;\n\tmesh?: any;\n\tmaterials?: any[];\n\tbody: any = null;\n\tcollider: any = null;\n\tcolliderDesc?: any;\n\tcolliderDescs: any[] = [];\n\tbodyDesc?: any;\n\tphysicsAttached = false;\n\truntimeHandle?: number;\n\ttransformStore?: any;\n\tnodeDestroy?: any;\n\tisInstanced?: boolean;\n\n\tprivate __behaviorRefs: BehaviorRef<any>[] = [];\n\n\tcreate(): this {\n\t\treturn this;\n\t}\n\n\tonCleanup(callback: () => void): this {\n\t\tvoid callback;\n\t\treturn this;\n\t}\n\n\tsetPosition(_x: number, _y: number, _z: number): void {}\n\tsetRotation(_x: number, _y: number, _z: number): void {}\n\tsetRotationZ(_z: number): void {}\n\tsetScale(_x: number, _y: number, _z: number): void {}\n\n\t/**\n\t * Attach a behavior to this entity. The real engine entity does substantially\n\t * more, but this functional stub stores the merged ref and builds the handle\n\t * so descriptor/handle logic (and tests that drive behaviors directly) work\n\t * without the full engine.\n\t */\n\tuse<\n\t\tO extends Record<string, any>,\n\t\tH extends Record<string, any> = Record<string, never>,\n\t>(\n\t\tdescriptor: BehaviorDescriptor<O, H>,\n\t\toptions?: Partial<O>,\n\t): BehaviorHandle<O, H> {\n\t\tconst mergedOptions = {\n\t\t\t...(descriptor.defaultOptions as O),\n\t\t\t...(options ?? {}),\n\t\t} as O;\n\t\tconst ref: BehaviorRef<O> = { descriptor, options: mergedOptions };\n\t\tthis.__behaviorRefs.push(ref as BehaviorRef<any>);\n\n\t\tconst baseHandle = {\n\t\t\tgetFSM: () => ref.fsm ?? null,\n\t\t\tgetOptions: () => ref.options,\n\t\t\tref,\n\t\t};\n\t\tconst extra = descriptor.createHandle\n\t\t\t? descriptor.createHandle(ref)\n\t\t\t: ({} as H);\n\t\treturn { ...baseHandle, ...extra } as BehaviorHandle<O, H>;\n\t}\n\n\t/** Live behavior refs attached via {@link use}. */\n\tgetBehaviorRefs(): BehaviorRef<any>[] {\n\t\treturn this.__behaviorRefs;\n\t}\n}\n\n/**\n * Factory contract injected into behavior systems via\n * {@link BehaviorSystemContext.createEntity}. The host engine supplies the real\n * entity factory at stage-construction time.\n */\nexport type CreateEntityFn = (\n\toptions?: Partial<GameEntityOptions>,\n) => GameEntity<GameEntityOptions>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,aAAa;AA6Df,SAAS,qBAAqB,SAAmD;AACvF,QAAM,eAA+B;AAAA,IACpC,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IAC7B,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IACnC,UAAU,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IAC7B,iBAAiB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IACpC,kBAAkB,CAAC;AAAA,IACnB,OAAO;AAAA,MACN,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,IAClB;AAAA,EACD;AAEA,SAAO,MAAM;AAAA,IACZ,GAAG;AAAA,IACH,GAAG;AAAA;AAAA,IAEH,OAAO;AAAA,MACN,GAAG,aAAa;AAAA,MAChB,GAAG,SAAS;AAAA,IACb;AAAA,EACD,CAAC;AACF;AAQO,SAAS,oBAAoB,OAA6B;AAEhE,QAAM,SAAS,IAAI;AACnB,QAAM,SAAS,IAAI;AACnB,QAAM,SAAS,IA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;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEQ,iBAAqC,CAAC;AAAA,EAE9C,SAAe;AACd,WAAO;AAAA,EACR;AAAA,EAEA,UAAU,UAA4B;AACrC,SAAK;AACL,WAAO;AAAA,EACR;AAAA,EAEA,YAAY,IAAY,IAAY,IAAkB;AAAA,EAAC;AAAA,EACvD,YAAY,IAAY,IAAY,IAAkB;AAAA,EAAC;AAAA,EACvD,aAAa,IAAkB;AAAA,EAAC;AAAA,EAChC,SAAS,IAAY,IAAY,IAAkB;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQpD,IAIC,YACA,SACuB;AACvB,UAAM,gBAAgB;AAAA,MACrB,GAAI,WAAW;AAAA,MACf,GAAI,WAAW,CAAC;AAAA,IACjB;AACA,UAAM,MAAsB,EAAE,YAAY,SAAS,cAAc;AACjE,SAAK,eAAe,KAAK,GAAuB;AAEhD,UAAM,aAAa;AAAA,MAClB,QAAQ,MAAM,IAAI,OAAO;AAAA,MACzB,YAAY,MAAM,IAAI;AAAA,MACtB;AAAA,IACD;AACA,UAAM,QAAQ,WAAW,eACtB,WAAW,aAAa,GAAG,IAC1B,CAAC;AACL,WAAO,EAAE,GAAG,YAAY,GAAG,MAAM;AAAA,EAClC;AAAA;AAAA,EAGA,kBAAsC;AACrC,WAAO,KAAK;AAAA,EACb;AACD;","names":[]}
|
package/dist/destructible-3d.js
CHANGED
|
@@ -2,11 +2,12 @@ import {
|
|
|
2
2
|
Destructible3DBehavior,
|
|
3
3
|
DestructibleMesh,
|
|
4
4
|
FractureOptions
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BXP4K7RF.js";
|
|
6
|
+
import "./chunk-HZMY3TT4.js";
|
|
7
|
+
import "./chunk-EZNCCO4L.js";
|
|
8
8
|
export {
|
|
9
9
|
Destructible3DBehavior,
|
|
10
10
|
DestructibleMesh,
|
|
11
11
|
FractureOptions
|
|
12
12
|
};
|
|
13
|
+
//# sourceMappingURL=destructible-3d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
plainFractureOptionsToPinata,
|
|
9
9
|
plainToBufferGeometry,
|
|
10
10
|
plainWorkerResultToTemplateParts
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HZMY3TT4.js";
|
|
12
12
|
export {
|
|
13
13
|
bufferGeometryToPlain,
|
|
14
14
|
buildFractureGeometryCacheKey,
|
|
@@ -20,3 +20,4 @@ export {
|
|
|
20
20
|
plainToBufferGeometry,
|
|
21
21
|
plainWorkerResultToTemplateParts
|
|
22
22
|
};
|
|
23
|
+
//# sourceMappingURL=destructible-prebake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/first-person.js
CHANGED
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
FirstPersonEvent,
|
|
5
5
|
FirstPersonFSM,
|
|
6
6
|
FirstPersonState
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YUO6SKJD.js";
|
|
8
8
|
import {
|
|
9
9
|
createFirstPersonInputComponent,
|
|
10
10
|
createFirstPersonMovementComponent,
|
|
11
11
|
createFirstPersonStateComponent
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LD5SMIB3.js";
|
|
13
|
+
import "./chunk-WWVD5DR5.js";
|
|
14
|
+
import "./chunk-RTVRUNYR.js";
|
|
15
|
+
import "./chunk-4URF65BR.js";
|
|
16
|
+
import "./chunk-EZNCCO4L.js";
|
|
17
17
|
export {
|
|
18
18
|
FirstPersonController,
|
|
19
19
|
FirstPersonControllerBehavior,
|
|
@@ -24,3 +24,4 @@ export {
|
|
|
24
24
|
createFirstPersonMovementComponent,
|
|
25
25
|
createFirstPersonStateComponent
|
|
26
26
|
};
|
|
27
|
+
//# sourceMappingURL=first-person.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FirstPersonShooterCoordinator
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VAN4WW3F.js";
|
|
4
4
|
import {
|
|
5
5
|
MultidirectionalSpaceShooterCoordinator
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RTRVBEIB.js";
|
|
7
7
|
import {
|
|
8
8
|
TopDownShooterCoordinator
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-FPTWVCPN.js";
|
|
10
|
+
import "./chunk-6C6NXNEW.js";
|
|
11
11
|
import {
|
|
12
12
|
ScreenWrapBehavior,
|
|
13
13
|
ScreenWrapEvent,
|
|
14
14
|
ScreenWrapFSM,
|
|
15
15
|
ScreenWrapState
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XIJNE67Y.js";
|
|
17
17
|
import {
|
|
18
18
|
Shooter2DBehavior,
|
|
19
19
|
createShooter2DStateComponent
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-STCCNLPC.js";
|
|
21
21
|
import {
|
|
22
22
|
ThrusterBehavior,
|
|
23
23
|
ThrusterEvent,
|
|
24
24
|
ThrusterFSM,
|
|
25
25
|
ThrusterMovementBehavior,
|
|
26
26
|
ThrusterState
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2CLT36VB.js";
|
|
28
28
|
import {
|
|
29
29
|
createThrusterInputComponent,
|
|
30
30
|
createThrusterMovementComponent,
|
|
31
31
|
createThrusterStateComponent
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KS72RZHX.js";
|
|
33
33
|
import {
|
|
34
34
|
TopDownMovementBehavior,
|
|
35
35
|
TopDownMovementRuntimeBehavior
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-OYWFPIHF.js";
|
|
37
37
|
import {
|
|
38
38
|
createTopDownMovementComponent,
|
|
39
39
|
createTopDownMovementInputComponent,
|
|
40
40
|
createTopDownMovementStateComponent
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-EIWQM6U3.js";
|
|
42
|
+
import "./chunk-ID5QJYF5.js";
|
|
43
43
|
import {
|
|
44
44
|
WorldBoundary2DBehavior,
|
|
45
45
|
WorldBoundary2DEvent,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
WorldBoundary2DState,
|
|
48
48
|
computeWorldBoundary2DHits,
|
|
49
49
|
hasAnyWorldBoundary2DHit
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-XG2YMCJW.js";
|
|
51
51
|
import {
|
|
52
52
|
WorldBoundary3DBehavior,
|
|
53
53
|
WorldBoundary3DEvent,
|
|
@@ -55,22 +55,22 @@ import {
|
|
|
55
55
|
WorldBoundary3DState,
|
|
56
56
|
computeWorldBoundary3DHits,
|
|
57
57
|
hasAnyWorldBoundary3DHit
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-4I6E6DGV.js";
|
|
59
59
|
import {
|
|
60
60
|
BoundaryRicochetCoordinator
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-GCNRXAKH.js";
|
|
62
|
+
import "./chunk-KDY5N6J4.js";
|
|
63
63
|
import {
|
|
64
64
|
BoundaryRicochet3DCoordinator
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-3PYGRHAL.js";
|
|
66
|
+
import "./chunk-OHCPV2NT.js";
|
|
67
67
|
import {
|
|
68
68
|
ParticleEmitterBehavior,
|
|
69
69
|
particlePresets
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-ZPSAXX73.js";
|
|
71
71
|
import {
|
|
72
72
|
particleEffect
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-7JJEIADR.js";
|
|
74
74
|
import {
|
|
75
75
|
Platformer3DBehavior,
|
|
76
76
|
Platformer3DBehavior2,
|
|
@@ -80,29 +80,29 @@ import {
|
|
|
80
80
|
createPlatformer3DInputComponent,
|
|
81
81
|
createPlatformer3DMovementComponent,
|
|
82
82
|
createPlatformer3DStateComponent
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-JAN34G6S.js";
|
|
84
84
|
import {
|
|
85
85
|
Ricochet2DBehavior,
|
|
86
86
|
Ricochet2DEvent,
|
|
87
87
|
Ricochet2DFSM,
|
|
88
88
|
Ricochet2DState
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-KOZUNIIE.js";
|
|
90
90
|
import {
|
|
91
91
|
Ricochet3DBehavior,
|
|
92
92
|
Ricochet3DEvent,
|
|
93
93
|
Ricochet3DFSM,
|
|
94
94
|
Ricochet3DState
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-ARJWUNRE.js";
|
|
96
96
|
import {
|
|
97
97
|
ScreenVisibilityBehavior,
|
|
98
98
|
ScreenVisibilityFSM
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-WOMHL23C.js";
|
|
100
100
|
import {
|
|
101
101
|
createPhysicsBodyComponent,
|
|
102
102
|
createTransformComponent,
|
|
103
103
|
useBehavior
|
|
104
|
-
} from "./chunk-
|
|
105
|
-
import "./chunk-
|
|
104
|
+
} from "./chunk-UYFOLI2X.js";
|
|
105
|
+
import "./chunk-Y6UJOUE5.js";
|
|
106
106
|
import {
|
|
107
107
|
CooldownBehavior,
|
|
108
108
|
fireCooldown,
|
|
@@ -111,26 +111,26 @@ import {
|
|
|
111
111
|
registerCooldown,
|
|
112
112
|
resetCooldown,
|
|
113
113
|
tickCooldowns
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-K3UNLQ7W.js";
|
|
115
115
|
import {
|
|
116
116
|
Destructible3DBehavior,
|
|
117
117
|
DestructibleMesh,
|
|
118
118
|
FractureOptions
|
|
119
|
-
} from "./chunk-
|
|
120
|
-
import "./chunk-
|
|
119
|
+
} from "./chunk-BXP4K7RF.js";
|
|
120
|
+
import "./chunk-HZMY3TT4.js";
|
|
121
121
|
import {
|
|
122
122
|
FirstPersonController,
|
|
123
123
|
FirstPersonControllerBehavior,
|
|
124
124
|
FirstPersonEvent,
|
|
125
125
|
FirstPersonFSM,
|
|
126
126
|
FirstPersonState
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-YUO6SKJD.js";
|
|
128
128
|
import {
|
|
129
129
|
createFirstPersonInputComponent,
|
|
130
130
|
createFirstPersonMovementComponent,
|
|
131
131
|
createFirstPersonStateComponent
|
|
132
|
-
} from "./chunk-
|
|
133
|
-
import "./chunk-
|
|
132
|
+
} from "./chunk-LD5SMIB3.js";
|
|
133
|
+
import "./chunk-WWVD5DR5.js";
|
|
134
134
|
import {
|
|
135
135
|
Jumper2D,
|
|
136
136
|
Jumper2DBehavior,
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
createJumpConfig2D,
|
|
142
142
|
createJumpInput2D,
|
|
143
143
|
createJumpState2D
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-SS7ELMJ7.js";
|
|
145
145
|
import {
|
|
146
146
|
Jumper3D,
|
|
147
147
|
Jumper3DBehavior,
|
|
@@ -149,18 +149,18 @@ import {
|
|
|
149
149
|
Jumper3DFSM,
|
|
150
150
|
Jumper3DState,
|
|
151
151
|
JumperTickEvent
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-F3KRX2V4.js";
|
|
153
153
|
import {
|
|
154
154
|
createJumpConfig3D,
|
|
155
155
|
createJumpInput3D,
|
|
156
156
|
createJumpState3D
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-
|
|
159
|
-
import "./chunk-
|
|
160
|
-
import "./chunk-
|
|
157
|
+
} from "./chunk-DYLH6K7B.js";
|
|
158
|
+
import "./chunk-SVLNF434.js";
|
|
159
|
+
import "./chunk-RTVRUNYR.js";
|
|
160
|
+
import "./chunk-4URF65BR.js";
|
|
161
161
|
import {
|
|
162
162
|
defineBehavior
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-EZNCCO4L.js";
|
|
164
164
|
export {
|
|
165
165
|
BoundaryRicochet3DCoordinator,
|
|
166
166
|
BoundaryRicochetCoordinator,
|
|
@@ -260,3 +260,4 @@ export {
|
|
|
260
260
|
tickCooldowns,
|
|
261
261
|
useBehavior
|
|
262
262
|
};
|
|
263
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/jumper-2d.js
CHANGED
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
createJumpConfig2D,
|
|
9
9
|
createJumpInput2D,
|
|
10
10
|
createJumpState2D
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-SS7ELMJ7.js";
|
|
12
|
+
import "./chunk-SVLNF434.js";
|
|
13
|
+
import "./chunk-RTVRUNYR.js";
|
|
14
|
+
import "./chunk-4URF65BR.js";
|
|
15
|
+
import "./chunk-EZNCCO4L.js";
|
|
16
16
|
export {
|
|
17
17
|
Jumper2D,
|
|
18
18
|
Jumper2DBehavior,
|
|
@@ -24,3 +24,4 @@ export {
|
|
|
24
24
|
createJumpInput2D,
|
|
25
25
|
createJumpState2D
|
|
26
26
|
};
|
|
27
|
+
//# sourceMappingURL=jumper-2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/jumper-3d.js
CHANGED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
Jumper3DFSM,
|
|
6
6
|
Jumper3DState,
|
|
7
7
|
JumperTickEvent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-F3KRX2V4.js";
|
|
9
9
|
import {
|
|
10
10
|
createJumpConfig3D,
|
|
11
11
|
createJumpInput3D,
|
|
12
12
|
createJumpState3D
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-DYLH6K7B.js";
|
|
14
|
+
import "./chunk-SVLNF434.js";
|
|
15
|
+
import "./chunk-RTVRUNYR.js";
|
|
16
|
+
import "./chunk-4URF65BR.js";
|
|
17
|
+
import "./chunk-EZNCCO4L.js";
|
|
18
18
|
export {
|
|
19
19
|
Jumper3D,
|
|
20
20
|
Jumper3DBehavior,
|
|
@@ -26,3 +26,4 @@ export {
|
|
|
26
26
|
createJumpInput3D,
|
|
27
27
|
createJumpState3D
|
|
28
28
|
};
|
|
29
|
+
//# sourceMappingURL=jumper-3d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
gasPresets,
|
|
5
5
|
magicPresets,
|
|
6
6
|
waterPresets
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-7JJEIADR.js";
|
|
8
8
|
export {
|
|
9
9
|
electricityPresets,
|
|
10
10
|
firePresets,
|
|
@@ -12,3 +12,4 @@ export {
|
|
|
12
12
|
magicPresets,
|
|
13
13
|
waterPresets
|
|
14
14
|
};
|
|
15
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/particle-emitter.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ParticleEmitterBehavior,
|
|
3
3
|
particlePresets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZPSAXX73.js";
|
|
5
5
|
import {
|
|
6
6
|
particleEffect
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-7JJEIADR.js";
|
|
8
|
+
import "./chunk-WWVD5DR5.js";
|
|
9
|
+
import "./chunk-EZNCCO4L.js";
|
|
10
10
|
export {
|
|
11
11
|
ParticleEmitterBehavior,
|
|
12
12
|
particleEffect,
|
|
13
13
|
particlePresets
|
|
14
14
|
};
|
|
15
|
+
//# sourceMappingURL=particle-emitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/platformer-3d.js
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
createPlatformer3DInputComponent,
|
|
8
8
|
createPlatformer3DMovementComponent,
|
|
9
9
|
createPlatformer3DStateComponent
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-JAN34G6S.js";
|
|
11
|
+
import "./chunk-4URF65BR.js";
|
|
12
|
+
import "./chunk-EZNCCO4L.js";
|
|
13
13
|
export {
|
|
14
14
|
Platformer3DBehavior2 as Platformer3DBehavior,
|
|
15
15
|
Platformer3DEvent,
|
|
@@ -20,3 +20,4 @@ export {
|
|
|
20
20
|
createPlatformer3DMovementComponent,
|
|
21
21
|
createPlatformer3DStateComponent
|
|
22
22
|
};
|
|
23
|
+
//# sourceMappingURL=platformer-3d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/ricochet-2d.js
CHANGED
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
Ricochet2DEvent,
|
|
4
4
|
Ricochet2DFSM,
|
|
5
5
|
Ricochet2DState
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-KOZUNIIE.js";
|
|
7
|
+
import "./chunk-Y6UJOUE5.js";
|
|
8
|
+
import "./chunk-4URF65BR.js";
|
|
9
|
+
import "./chunk-EZNCCO4L.js";
|
|
10
10
|
export {
|
|
11
11
|
Ricochet2DBehavior,
|
|
12
12
|
Ricochet2DEvent,
|
|
13
13
|
Ricochet2DFSM,
|
|
14
14
|
Ricochet2DState
|
|
15
15
|
};
|
|
16
|
+
//# sourceMappingURL=ricochet-2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/ricochet-3d.js
CHANGED
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
Ricochet3DEvent,
|
|
4
4
|
Ricochet3DFSM,
|
|
5
5
|
Ricochet3DState
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ARJWUNRE.js";
|
|
7
|
+
import "./chunk-Y6UJOUE5.js";
|
|
8
|
+
import "./chunk-4URF65BR.js";
|
|
9
|
+
import "./chunk-EZNCCO4L.js";
|
|
10
10
|
export {
|
|
11
11
|
Ricochet3DBehavior,
|
|
12
12
|
Ricochet3DEvent,
|
|
13
13
|
Ricochet3DFSM,
|
|
14
14
|
Ricochet3DState
|
|
15
15
|
};
|
|
16
|
+
//# sourceMappingURL=ricochet-3d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/runtime-2d.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
bindRuntimePongBallHandle,
|
|
13
13
|
emitRuntimeRicochet,
|
|
14
14
|
emitRuntimeTriggerRegionEnter
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-2C3Z5GE7.js";
|
|
16
|
+
import "./chunk-EZNCCO4L.js";
|
|
17
17
|
export {
|
|
18
18
|
RUNTIME_WORLD_BOUNDARY_2D_BEHAVIOR_KEY as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,
|
|
19
19
|
RUNTIME_PONG_BALL_BEHAVIOR_KEY as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,
|
|
@@ -29,3 +29,4 @@ export {
|
|
|
29
29
|
emitRuntimeRicochet,
|
|
30
30
|
emitRuntimeTriggerRegionEnter
|
|
31
31
|
};
|
|
32
|
+
//# sourceMappingURL=runtime-2d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/runtime-pong.js
CHANGED
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
emitRuntimeGoal,
|
|
16
16
|
emitRuntimeRicochet,
|
|
17
17
|
emitRuntimeTriggerRegionEnter
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-2C3Z5GE7.js";
|
|
19
|
+
import "./chunk-EZNCCO4L.js";
|
|
20
20
|
export {
|
|
21
21
|
RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,
|
|
22
22
|
RUNTIME_PADDLE_INPUT_2D_BEHAVIOR_KEY,
|
|
@@ -35,3 +35,4 @@ export {
|
|
|
35
35
|
emitRuntimeRicochet,
|
|
36
36
|
emitRuntimeTriggerRegionEnter
|
|
37
37
|
};
|
|
38
|
+
//# sourceMappingURL=runtime-pong.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ScreenVisibilityBehavior,
|
|
3
3
|
ScreenVisibilityFSM
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-WOMHL23C.js";
|
|
5
|
+
import "./chunk-EZNCCO4L.js";
|
|
6
6
|
export {
|
|
7
7
|
ScreenVisibilityBehavior,
|
|
8
8
|
ScreenVisibilityFSM
|
|
9
9
|
};
|
|
10
|
+
//# sourceMappingURL=screen-visibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/screen-wrap.js
CHANGED
|
@@ -3,13 +3,14 @@ import {
|
|
|
3
3
|
ScreenWrapEvent,
|
|
4
4
|
ScreenWrapFSM,
|
|
5
5
|
ScreenWrapState
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-XIJNE67Y.js";
|
|
7
|
+
import "./chunk-KDY5N6J4.js";
|
|
8
|
+
import "./chunk-4URF65BR.js";
|
|
9
|
+
import "./chunk-EZNCCO4L.js";
|
|
10
10
|
export {
|
|
11
11
|
ScreenWrapBehavior,
|
|
12
12
|
ScreenWrapEvent,
|
|
13
13
|
ScreenWrapFSM,
|
|
14
14
|
ScreenWrapState
|
|
15
15
|
};
|
|
16
|
+
//# sourceMappingURL=screen-wrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|