@zylem/game-lib 0.8.4 → 0.8.6
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/actions.d.ts +7 -5
- package/dist/api/game-lib.api.json +3424 -514
- package/dist/api/game-lib.api.md +178 -10
- package/dist/api/game-lib.d.ts +481 -11
- package/dist/api/game-lib.typedoc.json +220347 -136841
- package/dist/base-node-idopiSw5.d.ts +96 -0
- package/dist/bridge.d.ts +27 -5
- package/dist/bridge.js +1 -1
- package/dist/catalog.d.ts +77 -0
- package/dist/catalog.js +1 -0
- package/dist/{chunk-CM5YRNBJ.js → chunk-7NYP4YAG.js} +1 -1
- package/dist/chunk-AE3CTVHY.js +1 -0
- package/dist/chunk-BCFFS3FP.js +1 -0
- package/dist/chunk-BMRFDDMR.js +1 -0
- package/dist/chunk-DECK4UEC.js +1 -0
- package/dist/chunk-DQQA3VJH.js +1 -0
- package/dist/chunk-FYQNZCIP.js +1 -0
- package/dist/chunk-GHJQ2HKI.js +1 -0
- package/dist/chunk-LD4KDRYL.js +24 -0
- package/dist/chunk-MXO4VGDB.js +1 -0
- package/dist/{chunk-VIPINV7V.js → chunk-Q2YDBMVY.js} +1 -1
- package/dist/chunk-QDQ4QMAI.js +1 -0
- package/dist/{chunk-TV3AZKT4.js → chunk-QVIUZEYA.js} +1 -1
- package/dist/chunk-SAQA4SXW.js +1 -0
- package/dist/chunk-VJZMSBKP.js +1 -0
- package/dist/chunk-YOVE25NW.js +1 -0
- package/dist/{collision-builder-4TVDzXsp.d.ts → collision-builder-BckxkdmA.d.ts} +1 -1
- package/dist/core.d.ts +14 -11
- package/dist/core.js +1 -1
- package/dist/debug-state-B5awuDHl.d.ts +89 -0
- package/dist/debug.d.ts +194 -7
- package/dist/debug.js +1 -1
- package/dist/{entity-DDks47JB.d.ts → entity-BIf_a4dl.d.ts} +1 -1
- package/dist/{entity-BI7cSlK8.d.ts → entity-XZNGBeca.d.ts} +32 -98
- package/dist/{entity-type-map-COHu4fkW.d.ts → entity-type-map-CkkFMSrL.d.ts} +5 -4
- package/dist/entity.d.ts +9 -7
- package/dist/entity.js +1 -1
- package/dist/{game-4fsy55uN.d.ts → game-Cy8f6gJm.d.ts} +181 -17
- package/dist/game-default-F3KPYZ7X.js +1 -0
- package/dist/graphics.d.ts +6 -5
- package/dist/graphics.js +1 -1
- package/dist/{material-BKPYeBC6.d.ts → material-CxxAyJYp.d.ts} +1 -1
- package/dist/public.d.ts +12 -10
- package/dist/public.js +1 -1
- package/dist/runtime.d.ts +3 -3
- package/dist/{vector-DPbwlzgG.d.ts → simulation-body-zQw-emOr.d.ts} +1 -40
- package/dist/vector-D3eDzvcA.d.ts +41 -0
- package/dist/web-components.d.ts +12 -9
- package/dist/web-components.js +1 -1
- package/dist/{zylem-camera-B73ZNcgs.d.ts → zylem-camera-DZTpPOiD.d.ts} +12 -1
- package/package.json +6 -2
- package/dist/chunk-3I537JFL.js +0 -1
- package/dist/chunk-4CHZUWLF.js +0 -1
- package/dist/chunk-6B5JP7T5.js +0 -24
- package/dist/chunk-C5NEGC3S.js +0 -1
- package/dist/chunk-D3JO4HW2.js +0 -1
- package/dist/chunk-LKFF6XJC.js +0 -1
- package/dist/chunk-OAWK2UUY.js +0 -1
- package/dist/chunk-PNLNC3FA.js +0 -1
- package/dist/chunk-W5SXED5T.js +0 -1
- package/dist/debug-state-s0s-qndj.d.ts +0 -49
- package/dist/game-default-4PPYYGAR.js +0 -1
- /package/dist/{chunk-DFLI7ICU.js → chunk-MSCVL5OK.js} +0 -0
package/dist/entity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as ma,b as na,c as oa,d as pa,e as qa}from"./chunk-GHJQ2HKI.js";import{a as ba,b as ca,c as da,d as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,l as la}from"./chunk-YOVE25NW.js";import{a as X,b as Y,c as Z,d as _,e as $,f as aa}from"./chunk-MXO4VGDB.js";import{A as J,B as K,C as L,D as M,E as N,F as O,G as P,H as Q,I as R,J as S,K as T,L as U,M as V,N as W,b as j,c as k,d as l,e as m,f as n,g as o,h as p,i as q,j as r,k as s,l as t,m as u,n as v,o as w,p as x,q as y,r as z,s as A,t as B,u as C,v as D,w as E,x as F,y as G,z as I}from"./chunk-BMRFDDMR.js";import{c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,u as i,z as H}from"./chunk-SAQA4SXW.js";import"./chunk-7NYP4YAG.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-EVYHPR3J.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-XRP4JJXL.js";export{X as ACTOR_TYPE,p as BOX_TYPE,v as CONE_TYPE,B as CYLINDER_TYPE,I as DISK_TYPE,_ as FOG_TYPE,U as LIGHT_TYPE,ha as LINE_TYPE,ma as PARTICLE_SYSTEM_TYPE,E as PILL_TYPE,L as PLANE_TYPE,y as PYRAMID_TYPE,R as RECT_TYPE,s as SPHERE_TYPE,ea as SPRITE_TYPE,ba as TEXT_TYPE,O as ZONE_TYPE,Y as ZylemActor,q as ZylemBox,w as ZylemCone,C as ZylemCylinder,J as ZylemDisk,$ as ZylemFog,V as ZylemLight,ja as ZylemLine,na as ZylemParticleSystem,F as ZylemPill,M as ZylemPlane,z as ZylemPyramid,S as ZylemRect,t as ZylemSphere,fa as ZylemSprite,ca as ZylemText,P as ZylemZone,a as boxCollision,j as boxMesh,c as coneCollision,l as coneMesh,i as create,Z as createActor,r as createBox,x as createCone,pa as createCooldownIcon,D as createCylinder,K as createDisk,H as createEntity,la as createEntityFactory,aa as createFog,W as createLight,ka as createLine,oa as createParticleSystem,G as createPill,N as createPlane,A as createPyramid,T as createRect,u as createSphere,ga as createSprite,da as createText,Q as createZone,e as cylinderCollision,n as cylinderMesh,qa as destroy,ia as pickZylemLine,f as pillCollision,o as pillMesh,g as planeCollision,d as pyramidCollision,m as pyramidMesh,b as sphereCollision,k as sphereMesh,h as zoneCollision};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { e as InputPlayerNumber, f as InputProvider, I as Inputs, h as SetupFunction, g as UpdateFunction, j as DestroyFunction, a as SetupContext, U as UpdateContext, D as DestroyContext, L as LoadingEvent, m as IGame, S as StageNavigationOptions } from './base-node-life-cycle-BK9xebT9.js';
|
|
2
2
|
import { G as GameInputConfig, B as BaseGlobals, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
|
|
3
|
-
import {
|
|
3
|
+
import { B as BaseNode } from './base-node-idopiSw5.js';
|
|
4
4
|
import { Scene, Color, Object3D, Vector3, BufferGeometry, Material, Group, Texture } from 'three';
|
|
5
|
-
import { al as ZylemWorld, aj as EntityTypeMap } from './entity-type-map-
|
|
6
|
-
import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-
|
|
7
|
-
import {
|
|
8
|
-
import { d as
|
|
9
|
-
import {
|
|
5
|
+
import { al as ZylemWorld, aj as EntityTypeMap } from './entity-type-map-CkkFMSrL.js';
|
|
6
|
+
import { E as Entity, L as LifecycleFunction, S as StageEntity } from './entity-BIf_a4dl.js';
|
|
7
|
+
import { G as GameEntity, a as GameEntityOptions, y as GameEntityLifeCycle } from './entity-XZNGBeca.js';
|
|
8
|
+
import { k as ZylemCamera, R as RendererManager, e as CameraPerspective, d as CameraContext, C as CameraPose, P as PerspectiveType, f as CameraBehavior, g as CameraAction, h as CameraPipelineState, V as Viewport, Z as ZylemPostEffect } from './zylem-camera-DZTpPOiD.js';
|
|
9
|
+
import { d as ZylemShader } from './material-CxxAyJYp.js';
|
|
10
|
+
import { a as SimulationBody } from './simulation-body-zQw-emOr.js';
|
|
11
|
+
import { e as Vec3Input, b as Vec2Input, d as Vec3Components } from './vector-D3eDzvcA.js';
|
|
12
|
+
import { SceneOperationPayload } from '@zylem/bridge';
|
|
10
13
|
import { BehaviorSystem, BehaviorEntityLink, BehaviorRuntime, BehaviorSystemFactory, Simulation } from '@zylem/behaviors/core';
|
|
11
14
|
import { StageEvents, GameEvents } from './events.js';
|
|
12
15
|
import { D as DefaultTouchControlsOptions } from './default-controls-CAKJ5zlo.js';
|
|
@@ -846,13 +849,16 @@ declare function createCamera(options: CameraOptions): CameraWrapper;
|
|
|
846
849
|
/**
|
|
847
850
|
* Owns the stage's in-world debug/editor interaction layer.
|
|
848
851
|
*
|
|
849
|
-
* Self-manages around the global `debugState
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
*
|
|
853
|
-
*
|
|
854
|
-
*
|
|
855
|
-
*
|
|
852
|
+
* Self-manages around the global `debugState`, in two layers that switch on
|
|
853
|
+
* independently. The tool layer — mouse listeners, physics raycasts to
|
|
854
|
+
* hover/select/delete/spawn, the `DebugEntityCursor` highlight and the
|
|
855
|
+
* `PlacementGhost` — is live whenever a tool is armed, so the toolbar's buttons
|
|
856
|
+
* work on their own. The debug layer — the wasm simulation's collider
|
|
857
|
+
* wireframes and the orbit camera — is the part `debugState.enabled` gates, and
|
|
858
|
+
* is torn down when it goes off while the delegate stays alive to re-activate.
|
|
859
|
+
*
|
|
860
|
+
* Centralizes all of this so `ZylemStage` doesn't have to know about
|
|
861
|
+
* raycasting, DOM input, or debug rendering.
|
|
856
862
|
*/
|
|
857
863
|
|
|
858
864
|
type AddEntityFactory = (params: {
|
|
@@ -875,10 +881,10 @@ declare class StageDebugDelegate {
|
|
|
875
881
|
private options;
|
|
876
882
|
private mouseNdc;
|
|
877
883
|
private raycaster;
|
|
878
|
-
private isMouseDown;
|
|
879
884
|
private domDisposeFns;
|
|
880
885
|
private domListenersAttached;
|
|
881
886
|
private debugCursor;
|
|
887
|
+
private placementGhost;
|
|
882
888
|
private debugLines;
|
|
883
889
|
private cameraDebugDelegate;
|
|
884
890
|
private debugStateUnsubscribe;
|
|
@@ -886,6 +892,11 @@ declare class StageDebugDelegate {
|
|
|
886
892
|
private entityResolverUnregister;
|
|
887
893
|
private lastDebugEnabled;
|
|
888
894
|
private warnedMissingAddFactory;
|
|
895
|
+
private transformTool;
|
|
896
|
+
private grid;
|
|
897
|
+
private lastTool;
|
|
898
|
+
/** Element the current gizmo drag captured, so pointerup is never missed. */
|
|
899
|
+
private capturedPointer;
|
|
889
900
|
constructor(stage: ZylemStage, options?: StageDebugDelegateOptions);
|
|
890
901
|
/**
|
|
891
902
|
* Supply the factory the `add` tool uses to spawn entities at the clicked
|
|
@@ -905,18 +916,107 @@ declare class StageDebugDelegate {
|
|
|
905
916
|
* rebuild the render pipeline once per frame.
|
|
906
917
|
*/
|
|
907
918
|
private syncWithDebugState;
|
|
919
|
+
/** Hand the transform tool its mode whenever the active tool changes. */
|
|
920
|
+
private syncToolMode;
|
|
921
|
+
private syncGrid;
|
|
908
922
|
/** Initialize DOM listeners and switch rendering to the debug orbit camera. */
|
|
909
923
|
private activate;
|
|
910
924
|
/** Tear down visuals and restore the gameplay primary camera. */
|
|
911
925
|
private deactivate;
|
|
912
926
|
private rebindPostProcessing;
|
|
927
|
+
/**
|
|
928
|
+
* Collider wireframes: the one overlay that really is debug-mode-only, since
|
|
929
|
+
* it draws the simulation itself rather than anything being edited.
|
|
930
|
+
*/
|
|
913
931
|
private initDebugVisuals;
|
|
914
932
|
private disposeDebugVisuals;
|
|
933
|
+
/**
|
|
934
|
+
* Tool feedback, built on first use and kept for the delegate's life.
|
|
935
|
+
*
|
|
936
|
+
* Separate from {@link initDebugVisuals} because the hover highlight and the
|
|
937
|
+
* placement ghost belong to the tools, not to debug mode: they have to be
|
|
938
|
+
* available when a tool is armed with debug off.
|
|
939
|
+
*/
|
|
940
|
+
private ensureToolVisuals;
|
|
941
|
+
/**
|
|
942
|
+
* Hide the overlays whose tool has just gone away.
|
|
943
|
+
*
|
|
944
|
+
* `update()` normally does this, but it stops being called once nothing is
|
|
945
|
+
* armed and debug is off — so the frame that would have hidden a disarmed
|
|
946
|
+
* Add's ghost never arrives, and the preview is left floating in the scene.
|
|
947
|
+
* Driven from the tool transition, which always fires.
|
|
948
|
+
*/
|
|
949
|
+
private parkToolVisuals;
|
|
950
|
+
private disposeToolVisuals;
|
|
915
951
|
update(): void;
|
|
952
|
+
/** Collider wireframes, straight from the wasm simulation. */
|
|
953
|
+
private updateColliderWireframes;
|
|
954
|
+
/**
|
|
955
|
+
* Make sure an armed tool can actually receive the pointer.
|
|
956
|
+
*
|
|
957
|
+
* The listeners outlive debug mode once attached — `deactivate()` leaves them
|
|
958
|
+
* in place and only `dispose()` removes them — so this only ever has to run
|
|
959
|
+
* until it succeeds.
|
|
960
|
+
*/
|
|
961
|
+
private ensureInteraction;
|
|
962
|
+
/**
|
|
963
|
+
* Drive the translucent preview of the armed entity type from the cursor.
|
|
964
|
+
*
|
|
965
|
+
* Runs while the game is paused as well as while it plays: only the
|
|
966
|
+
* fixed-step `step()` is pause-gated, so this pass still ticks and the
|
|
967
|
+
* ghost keeps following the mouse in a frozen scene — which is exactly when
|
|
968
|
+
* a scene is usually being built. It runs with debug mode off too, for the
|
|
969
|
+
* same reason: arming Add is a request to place something, not to inspect
|
|
970
|
+
* colliders.
|
|
971
|
+
*
|
|
972
|
+
* The ghost is a scene overlay, not an entity, so it is invisible to the
|
|
973
|
+
* physics raycast here and cannot preview itself.
|
|
974
|
+
*/
|
|
975
|
+
private updatePlacementGhost;
|
|
916
976
|
/** Full teardown — unsubscribes from debugState and cleans up all resources. */
|
|
917
977
|
dispose(): void;
|
|
918
|
-
|
|
978
|
+
/**
|
|
979
|
+
* Undo or redo a committed operation.
|
|
980
|
+
*
|
|
981
|
+
* The editor holds the history but cannot apply it: reverting a delete means
|
|
982
|
+
* producing the original entity, which only the stage can do. So the editor
|
|
983
|
+
* hands the record back and the inversion happens here.
|
|
984
|
+
*/
|
|
985
|
+
applySceneOperation(op: SceneOperationPayload, direction: 'undo' | 'redo'): void;
|
|
986
|
+
/** The mouse ray in world space, from the last pointer position. */
|
|
987
|
+
private currentRay;
|
|
988
|
+
private handleAction;
|
|
989
|
+
/**
|
|
990
|
+
* Spawn the armed entity type at the clicked point.
|
|
991
|
+
*
|
|
992
|
+
* Placement resolves in two steps because a click into empty sky is the
|
|
993
|
+
* common case when building a scene from nothing: the physics hit is
|
|
994
|
+
* preferred (the entity rests on the surface it was dropped onto), and
|
|
995
|
+
* otherwise the ray is intersected with the y=0 construction plane. Before
|
|
996
|
+
* this, clicking anywhere without an existing collider under the cursor did
|
|
997
|
+
* nothing at all.
|
|
998
|
+
*/
|
|
999
|
+
private placeEntity;
|
|
1000
|
+
/**
|
|
1001
|
+
* Nudge a freshly placed entity out along the surface normal by half its
|
|
1002
|
+
* own size, so it sits on the surface rather than half-buried in it.
|
|
1003
|
+
*
|
|
1004
|
+
* Runs after spawn because the entity's bounds are not known until its mesh
|
|
1005
|
+
* exists.
|
|
1006
|
+
*/
|
|
1007
|
+
private restOnSurface;
|
|
1008
|
+
private warnMissingAddSource;
|
|
919
1009
|
private attachDomListeners;
|
|
1010
|
+
/**
|
|
1011
|
+
* Own the pointer for the duration of a gizmo drag.
|
|
1012
|
+
*
|
|
1013
|
+
* Capture keeps events coming even when the cursor leaves the canvas, which
|
|
1014
|
+
* happens constantly when dragging an axis toward the edge of the viewport.
|
|
1015
|
+
* Orbit is suspended for the same window so the drag does not also swing the
|
|
1016
|
+
* camera.
|
|
1017
|
+
*/
|
|
1018
|
+
private beginPointerCapture;
|
|
1019
|
+
private endPointerCapture;
|
|
920
1020
|
}
|
|
921
1021
|
|
|
922
1022
|
/**
|
|
@@ -1070,6 +1170,21 @@ type NodeLike$1 = {
|
|
|
1070
1170
|
create: Function;
|
|
1071
1171
|
};
|
|
1072
1172
|
type StageEntityInput = NodeLike$1 | Promise<any> | (() => NodeLike$1 | Promise<any>);
|
|
1173
|
+
/** A detached entity plus the pose to restore it at. */
|
|
1174
|
+
interface DetachedEntity {
|
|
1175
|
+
entity: any;
|
|
1176
|
+
position: {
|
|
1177
|
+
x: number;
|
|
1178
|
+
y: number;
|
|
1179
|
+
z: number;
|
|
1180
|
+
} | null;
|
|
1181
|
+
rotation: {
|
|
1182
|
+
x: number;
|
|
1183
|
+
y: number;
|
|
1184
|
+
z: number;
|
|
1185
|
+
w: number;
|
|
1186
|
+
} | null;
|
|
1187
|
+
}
|
|
1073
1188
|
/**
|
|
1074
1189
|
* Runtime context provided by ZylemStage after scene and world are initialized.
|
|
1075
1190
|
*/
|
|
@@ -1094,6 +1209,11 @@ declare class StageEntityDelegate {
|
|
|
1094
1209
|
readonly childrenMap: Map<string, BaseNode>;
|
|
1095
1210
|
/** UUID → BaseNode map populated when debug mode is active. */
|
|
1096
1211
|
readonly debugMap: Map<string, BaseNode>;
|
|
1212
|
+
/**
|
|
1213
|
+
* Entities detached from the stage but kept alive so an editor undo can put
|
|
1214
|
+
* them back. See {@link StageEntityDelegate.detachEntity}.
|
|
1215
|
+
*/
|
|
1216
|
+
readonly detachedMap: Map<string, DetachedEntity>;
|
|
1097
1217
|
private pendingEntities;
|
|
1098
1218
|
private pendingPromises;
|
|
1099
1219
|
private _isLoaded;
|
|
@@ -1143,10 +1263,48 @@ declare class StageEntityDelegate {
|
|
|
1143
1263
|
/** Add the entity to internal maps and notify listeners. */
|
|
1144
1264
|
addEntityToStage(entity: BaseNode): void;
|
|
1145
1265
|
/**
|
|
1146
|
-
* Remove an entity
|
|
1266
|
+
* Remove an entity from the stage by its UUID.
|
|
1267
|
+
*
|
|
1268
|
+
* Detaches rather than destroys, so an editor undo can put the same
|
|
1269
|
+
* instance back. See {@link StageEntityDelegate.detachEntity}.
|
|
1270
|
+
*
|
|
1147
1271
|
* @returns true if removed, false if not found or stage not ready
|
|
1148
1272
|
*/
|
|
1149
1273
|
removeEntityByUuid(uuid: string): boolean;
|
|
1274
|
+
/**
|
|
1275
|
+
* Take an entity out of the stage while keeping the instance alive.
|
|
1276
|
+
*
|
|
1277
|
+
* The editor cannot rebuild an entity — all it ever receives is a summary of
|
|
1278
|
+
* name, type, and transform, with no material, behaviors, or collider
|
|
1279
|
+
* config. So undoing a delete has to restore the original object, which
|
|
1280
|
+
* means holding onto it here. Keeping the same instance also keeps its uuid
|
|
1281
|
+
* stable, which every other entry in the undo stack depends on.
|
|
1282
|
+
*
|
|
1283
|
+
* Observers are still told the entity is gone: from the outside it has left
|
|
1284
|
+
* the stage, and leaving it in the editor's list or the thumbnail cache
|
|
1285
|
+
* would leak.
|
|
1286
|
+
*
|
|
1287
|
+
* @returns true when the entity was found and detached.
|
|
1288
|
+
*/
|
|
1289
|
+
detachEntity(uuid: string): boolean;
|
|
1290
|
+
/**
|
|
1291
|
+
* Put a detached entity back into the stage at the pose it left.
|
|
1292
|
+
*
|
|
1293
|
+
* Unlike {@link StageEntityDelegate.spawnEntity} this never calls
|
|
1294
|
+
* `create()`: the entity is already fully built, and rebuilding it would
|
|
1295
|
+
* discard its meshes and colliders along with any editor scale applied to
|
|
1296
|
+
* them.
|
|
1297
|
+
*
|
|
1298
|
+
* @returns true when the entity was found and restored.
|
|
1299
|
+
*/
|
|
1300
|
+
restoreEntity(uuid: string): boolean;
|
|
1301
|
+
/** Whether a uuid is currently recoverable via {@link restoreEntity}. */
|
|
1302
|
+
isDetached(uuid: string): boolean;
|
|
1303
|
+
/**
|
|
1304
|
+
* Destroy detached entities past the recoverable window. Insertion-ordered,
|
|
1305
|
+
* so the oldest detachments go first.
|
|
1306
|
+
*/
|
|
1307
|
+
private evictOldestDetached;
|
|
1150
1308
|
/** Get an entity by its name; returns null if not found. */
|
|
1151
1309
|
getEntityByName(name: string): BaseNode | null;
|
|
1152
1310
|
/** Build a serializable state snapshot for an entity. */
|
|
@@ -1295,7 +1453,7 @@ declare class ZylemStage extends LifeCycleBase<ZylemStage> {
|
|
|
1295
1453
|
protected _setup(params: SetupContext<ZylemStage>): void;
|
|
1296
1454
|
protected _update(params: UpdateContext<ZylemStage>): void;
|
|
1297
1455
|
outOfLoop(): void;
|
|
1298
|
-
/** Update debug overlays and
|
|
1456
|
+
/** Update debug overlays and the editor's pointer tools. */
|
|
1299
1457
|
debugUpdate(): void;
|
|
1300
1458
|
/** Cleanup owned resources when the stage is destroyed. */
|
|
1301
1459
|
protected _destroy(params: DestroyContext<ZylemStage>): void;
|
|
@@ -1712,6 +1870,8 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
|
|
|
1712
1870
|
private lastPublishedGameConfig;
|
|
1713
1871
|
/** Editor ↔ game bridge adapter (RAF-coalesced publishes, command intake). */
|
|
1714
1872
|
private gameBridge;
|
|
1873
|
+
/** Stops republishing the entity catalog on registry changes. */
|
|
1874
|
+
private catalogUnsubscribe;
|
|
1715
1875
|
private readonly gameUpdateParams;
|
|
1716
1876
|
private readonly stageSetupParams;
|
|
1717
1877
|
private readonly stageUpdateParams;
|
|
@@ -1722,6 +1882,10 @@ declare class ZylemGame<TGlobals extends BaseGlobals> {
|
|
|
1722
1882
|
static FRAME_DURATION: number;
|
|
1723
1883
|
static MAX_DELTA_SECONDS: number;
|
|
1724
1884
|
constructor(options: ZylemGameOptions<TGlobals>, wrapperRef: Game<TGlobals>, displayRuntime?: ResolveGameConfigRuntime);
|
|
1885
|
+
/** Publish the placeable entity types the editor's Add palette lists. */
|
|
1886
|
+
private publishEntityCatalog;
|
|
1887
|
+
/** Spawn a catalog type programmatically (editor `entity:create`). */
|
|
1888
|
+
private createCatalogEntity;
|
|
1725
1889
|
setDisplayRuntime(runtime: ResolveGameConfigRuntime): void;
|
|
1726
1890
|
loadGameCanvas(config: GameConfig): void;
|
|
1727
1891
|
loadDebugOptions(options: ZylemGameOptions<TGlobals>): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{v as e}from"./chunk-FYQNZCIP.js";import"./chunk-BCFFS3FP.js";import"./chunk-AE3CTVHY.js";import"./chunk-DQQA3VJH.js";import"./chunk-VJZMSBKP.js";import"./chunk-DECK4UEC.js";import"./chunk-WBQ5TNRZ.js";import"./chunk-MXO4VGDB.js";import"./chunk-SAQA4SXW.js";import"./chunk-7NYP4YAG.js";import"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import"./chunk-EVYHPR3J.js";import"./chunk-D2PATZCC.js";import"./chunk-4QLJUQSJ.js";import"./chunk-7WRQ2UAN.js";import"./chunk-BH53MBAZ.js";import"./chunk-XRP4JJXL.js";import"./chunk-UG22Z42P.js";import{proxy as t}from"valtio/vanilla";var s=()=>({id:"zylem",globals:{},stages:[e()],debug:!1,time:0,input:void 0}),a=t({...s()});function o(){return{id:a.id??"zylem",globals:a.globals??{},stages:a.stages??[e()],debug:a.debug,time:a.time,input:a.input}}export{o as getGameDefaultConfig};
|
package/dist/graphics.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { b as ZylemTSLShader } from './material-
|
|
2
|
-
export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-
|
|
3
|
-
export { Z as ZylemPostEffect } from './zylem-camera-
|
|
1
|
+
import { b as ZylemTSLShader } from './material-CxxAyJYp.js';
|
|
2
|
+
export { d as ZylemShader, Z as ZylemShaderObject, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-CxxAyJYp.js';
|
|
3
|
+
export { Z as ZylemPostEffect } from './zylem-camera-DZTpPOiD.js';
|
|
4
4
|
export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
|
|
5
5
|
export { Fn, abs, asin, atan, clamp, cos, dot, exp, float, floor, fract, length, max, min, mix, mod, normalize, positionWorld, positionWorldDirection, pow, sin, smoothstep, step, time, uniform, uv, vec2, vec3, vec4 } from 'three/tsl';
|
|
6
6
|
import 'three';
|
|
7
7
|
import 'three/webgpu';
|
|
8
|
-
import './vector-
|
|
8
|
+
import './vector-D3eDzvcA.js';
|
|
9
|
+
import './entity-BIf_a4dl.js';
|
|
10
|
+
import './simulation-body-zQw-emOr.js';
|
|
9
11
|
import '@zylem/behaviors/core';
|
|
10
|
-
import './entity-DDks47JB.js';
|
|
11
12
|
|
|
12
13
|
declare const standardShader: {
|
|
13
14
|
vertex: string;
|
package/dist/graphics.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,b as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J}from"./chunk-QB3NL7VQ.js";import{a}from"./chunk-7GYFZKK7.js";import{a
|
|
1
|
+
import{a as n,b as o,c as p,d as q,e as r,f as s,g as t,h as u,i as v,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as H,v as I,w as J}from"./chunk-QB3NL7VQ.js";import{a as m}from"./chunk-7GYFZKK7.js";import{a,b,h as c,i as d,k as e,l as f,m as g,n as h,o as i,p as j,q as k,r as l}from"./chunk-7NYP4YAG.js";import"./chunk-QXVH6POE.js";import"./chunk-7WRQ2UAN.js";export{l as Fn,y as abs,x as asin,w as atan,t as clamp,v as cos,n as createBackgroundShader,e as createNodeMaterialFromTSL,m as crossfadeTransitionShader,G as dot,z as exp,k as float,E as floor,F as fract,d as isGLSLShader,c as isTSLShader,H as length,C as max,D as min,r as mix,J as mod,q as normalize,a as objectVertexShader,p as positionWorld,o as positionWorldDirection,A as pow,u as sin,s as smoothstep,b as standardShader,B as step,h as time,f as uniform,g as uv,I as vec2,i as vec3,j as vec4};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Blending, Side, Color, Material } from 'three';
|
|
2
2
|
import { MeshBasicNodeMaterial } from 'three/webgpu';
|
|
3
|
-
import { b as Vec2Input } from './vector-
|
|
3
|
+
import { b as Vec2Input } from './vector-D3eDzvcA.js';
|
|
4
4
|
|
|
5
5
|
declare function shortHash(objString: string): string;
|
|
6
6
|
|
package/dist/public.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { A as AspectRatio, q as AspectRatioValue, k as CameraManager, j as CameraOptions, C as CameraWrapper, D as DeviceProfile, p as FirstPersonOptions, l as FirstPersonPerspective, o as Fixed2DOptions, F as Fixed2DPerspective, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, P as PerspectiveOptions, y as RenderBundleManager, z as RenderStrategyManager, R as ResolutionInput, e as ResolveGameConfigRuntime, v as RetroPreset, w as RetroPresetKey, x as RetroResolution, S as StageConfigLike, h as StageOptions, n as ThirdPersonOptions, T as ThirdPersonPerspective, i as createCamera, c as createGame, m as createPerspective, f as createStage, g as gameConfig, r as getDisplayAspect, t as getPresetResolution, u as parseResolution, s as stageConfig } from './game-
|
|
1
|
+
export { A as AspectRatio, q as AspectRatioValue, k as CameraManager, j as CameraOptions, C as CameraWrapper, D as DeviceProfile, p as FirstPersonOptions, l as FirstPersonPerspective, o as Fixed2DOptions, F as Fixed2DPerspective, G as Game, b as GameConfigLike, d as GameDeviceConfig, a as GameLoadingEvent, P as PerspectiveOptions, y as RenderBundleManager, z as RenderStrategyManager, R as ResolutionInput, e as ResolveGameConfigRuntime, v as RetroPreset, w as RetroPresetKey, x as RetroResolution, S as StageConfigLike, h as StageOptions, n as ThirdPersonOptions, T as ThirdPersonPerspective, i as createCamera, c as createGame, m as createPerspective, f as createStage, g as gameConfig, r as getDisplayAspect, t as getPresetResolution, u as parseResolution, s as stageConfig } from './game-Cy8f6gJm.js';
|
|
2
2
|
export { G as GameInputConfig, a as GameInputPlayerConfig, K as KeyboardMapping, M as MouseConfig, b as MouseMapping, V as VirtualTouchButtonConfig, d as VirtualTouchButtonSlot, c as VirtualTouchButtonsConfig, e as VirtualTouchConfig, f as VirtualTouchJoystickConfig, g as VirtualTouchJoysticksConfig, h as VirtualTouchPosition, i as VirtualTouchStyle, Z as ZylemGameConfig } from './game-interfaces-vF5sRi1n.js';
|
|
3
3
|
export { CameraFeedOptions, FollowTargetOptions, RenderCategory, STAGE_STATE_CHANGE, StageManager, StageStateChangeEvent, Vect3, createFollowTarget, dispatchStageState, entitySpawner, initStageStateDispatcher, isManagedRenderEntity, resolveRenderCategory, setCameraFeed, setStageFrameProfilerEnabled, stageState, usesManagedRenderPath, vessel } from './core.js';
|
|
4
4
|
export { f as EntityBlueprint, j as EntityJson, d as EntityJsonSchema, E as EntitySchema, i as LineEntityData, L as LineEntityDataSchema, h as SpriteEntityData, b as SpriteEntityDataSchema, S as StageBlueprint, k as StageJson, e as StageJsonSchema, c as StageSchema, g as TextEntityData, T as TextEntityDataSchema, V as Vector2Schema, a as Vector3TupleSchema } from './blueprints-TbGY-h53.js';
|
|
5
5
|
export { A as AnalogState, d as ButtonName, B as ButtonState, c as InputGamepad, b as InputPlayer, e as InputPlayerNumber, f as InputProvider, I as Inputs, L as LoadingEvent, a as SetupContext, S as StageNavigationOptions, U as UpdateContext } from './base-node-life-cycle-BK9xebT9.js';
|
|
6
6
|
export { S as StageTransitionConfig, a as StageTransitionEasing, Z as ZylemTransitionShader, c as crossfadeTransitionShader } from './stage-transition-CmGpV4tc.js';
|
|
7
|
-
export { g as CameraAction, f as CameraBehavior, d as CameraContext, e as CameraPerspective, j as CameraPipeline, h as CameraPipelineState, C as CameraPose, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, Z as ZylemPostEffect, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-
|
|
8
|
-
export { S as StageEntity } from './entity-
|
|
9
|
-
export {
|
|
10
|
-
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-
|
|
11
|
-
export { A as Action, C as CollisionComponent, G as GameEntity, a as GameEntityOptions, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, x as getRotation, f as pillCollision, g as planeCollision, p as pyramidCollision, i as rotateEuler, r as rotateInDirection, j as rotateX, k as rotateY, h as rotateYEuler, l as rotateZ, w as setRotation, q as setRotationDegrees, u as setRotationDegreesX, t as setRotationDegreesY, v as setRotationDegreesZ, n as setRotationX, m as setRotationY, o as setRotationZ, s as sphereCollision, z as zoneCollision } from './entity-
|
|
7
|
+
export { g as CameraAction, f as CameraBehavior, d as CameraContext, e as CameraPerspective, j as CameraPipeline, h as CameraPipelineState, C as CameraPose, P as PerspectiveType, a as Perspectives, c as PoseDelta, T as TransformLike, V as Viewport, Z as ZylemPostEffect, b as ZylemRenderer, i as isWebGPUSupported } from './zylem-camera-DZTpPOiD.js';
|
|
8
|
+
export { S as StageEntity } from './entity-BIf_a4dl.js';
|
|
9
|
+
export { f as VEC2_ONE, g as VEC2_ZERO, h as VEC3_ONE, i as VEC3_ZERO, V as Vec2, a as Vec2Components, b as Vec2Input, c as Vec3, d as Vec3Components, e as Vec3Input, n as normalizeVec2, j as normalizeVec3, t as toThreeVector2, k as toThreeVector3 } from './vector-D3eDzvcA.js';
|
|
10
|
+
export { A as ACTOR_TYPE, a0 as AmbientLightOptions, B as BOX_TYPE, E as CONE_TYPE, K as CYLINDER_TYPE, C as CollisionShapeType, D as DISK_TYPE, a2 as DirectionalLightOptions, ak as EntityForType, aj as EntityTypeMap, a8 as FOG_TYPE, a1 as HemisphereLightOptions, _ as LIGHT_TYPE, ab as LINE_TYPE, a5 as LightShadowOptions, ae as LinePickResult, o as OnEnterParams, p as OnExitParams, O as OnHeldParams, V as PARTICLE_SYSTEM_TYPE, N as PILL_TYPE, P as PLANE_TYPE, H as PYRAMID_TYPE, a3 as PointLightOptions, R as RECT_TYPE, S as SPHERE_TYPE, f as SPRITE_TYPE, a4 as SpotLightOptions, h as SpriteAnimation, g as SpriteImage, i as SpriteSheet, T as TEXT_TYPE, n as ZONE_TYPE, r as ZylemActor, Z as ZylemBox, z as ZylemCone, J as ZylemCylinder, x as ZylemDisk, a7 as ZylemFog, ah as ZylemFogHeightOptions, ai as ZylemFogNoiseOptions, af as ZylemFogOptions, ag as ZylemFogType, Y as ZylemLight, $ as ZylemLightOptions, aa as ZylemLine, ad as ZylemLineOptions, U as ZylemParticleSystem, W as ZylemParticleSystemOptions, M as ZylemPill, k as ZylemPlane, G as ZylemPyramid, v as ZylemRect, b as ZylemSphere, e as ZylemSprite, t as ZylemText, m as ZylemZone, q as createActor, c as createBox, y as createCone, I as createCylinder, w as createDisk, a6 as createFog, X as createLight, a9 as createLine, Q as createParticleSystem, L as createPill, j as createPlane, F as createPyramid, u as createRect, a as createSphere, d as createSprite, s as createText, l as createZone, ac as pickZylemLine } from './entity-type-map-CkkFMSrL.js';
|
|
11
|
+
export { A as Action, C as CollisionComponent, G as GameEntity, a as GameEntityOptions, b as boxCollision, d as coneCollision, c as create, e as cylinderCollision, x as getRotation, f as pillCollision, g as planeCollision, p as pyramidCollision, i as rotateEuler, r as rotateInDirection, j as rotateX, k as rotateY, h as rotateYEuler, l as rotateZ, w as setRotation, q as setRotationDegrees, u as setRotationDegreesX, t as setRotationDegreesY, v as setRotationDegreesZ, n as setRotationX, m as setRotationY, o as setRotationZ, s as sphereCollision, z as zoneCollision } from './entity-XZNGBeca.js';
|
|
12
12
|
export { IconSize, IconSizePreset, ScreenAnchor, TemplateFactory, boxMesh, coneMesh, createCooldownIcon, createEntity, createEntityFactory, cylinderMesh, destroy, pillMesh, pyramidMesh, sphereMesh } from './entity.js';
|
|
13
13
|
export { BehaviorDescriptor, BehaviorHandle, BehaviorRef, BehaviorSystem, BehaviorSystemFactory, BoundaryRicochet3DCoordinator, BoundaryRicochet3DEntity, BoundaryRicochetCoordinator, BoundaryRicochetEntity, BoundaryRicochetUpdate, BurstParticlePresetOptions, CooldownBehavior, CooldownConfig, CooldownEntry, CooldownHandle, CooldownOptions, DefineBehaviorConfig, Destructible3DBehavior, Destructible3DBehaviorOptions, Destructible3DColliderOptions, Destructible3DFragmentColliderShape, Destructible3DFragmentPhysicsOptions, Destructible3DHandle, DestructibleMesh, DestructiblePrebakeWorkerAPI, FacingAngle2DEntity, FirstPersonBehavior, FirstPersonBehaviorOptions, FirstPersonContext, FirstPersonEntity, FirstPersonEvent, FirstPersonFSM, FirstPersonInputComponent, FirstPersonMovementComponent, FirstPersonPresentation, FirstPersonShooterCoordinator, FirstPersonShooterEntity, FirstPersonShooterInput, FirstPersonState, FirstPersonStateComponent, FractureOptions, FractureOptionsInput, JumpConfig2D, JumpConfig3D, JumpContext2D, JumpContext3D, JumpInput2D, JumpInput3D, JumpState2D, JumpState3D, Jumper2DBehavior, Jumper2DBehaviorOptions, Jumper2DEntity, Jumper2DEvent, Jumper2DFSM, Jumper2DState, Jumper3DBehavior, Jumper3DBehaviorOptions, Jumper3DEntity, Jumper3DEvent, Jumper3DFSM, Jumper3DState, MultidirectionalSpaceShooterCoordinator, MultidirectionalSpaceShooterEntity, MultidirectionalSpaceShooterInput, ParticleEffectDefinition, ParticleEmitterBehavior, ParticleEmitterBehaviorOptions, ParticleEmitterHandle, ParticleMagicAgency, ParticleMagicAlignment, ParticleMagicModifierInput, ParticleMagicModifierOptions, ParticleMagicOrder, ParticleMagicRealityEffect, ParticleMagicTemperament, ParticlePresetMaterialOptions, PhysicsBodyComponent, PlainBufferGeometryPayload, PlainFractureOptions, Platformer2DBehavior, Platformer2DBehaviorOptions, Platformer2DCollisionContext, Platformer2DContext, Platformer2DEntity, Platformer2DEvent, Platformer2DFSM, Platformer2DInputComponent, Platformer2DMovementComponent, Platformer2DState, Platformer2DStateComponent, Platformer3DBehavior, Platformer3DBehaviorOptions, Platformer3DContext, Platformer3DEntity, Platformer3DEvent, Platformer3DFSM, Platformer3DInputComponent, Platformer3DMovementComponent, Platformer3DState, Platformer3DStateComponent, PlatformerCollisionContext, PlayerInput, PrebakeWorkerRequest, PrebakeWorkerResponse, ResolvedAim2D, Ricochet2DBehavior, Ricochet2DCollisionContext, Ricochet2DEvent, Ricochet2DFSM, Ricochet2DHandle, Ricochet2DOptions, Ricochet2DResult, Ricochet2DState, Ricochet3DBehavior, Ricochet3DCallback, Ricochet3DCollisionContext, Ricochet3DEvent, Ricochet3DFSM, Ricochet3DHandle, Ricochet3DOptions, Ricochet3DResult, Ricochet3DState, RicochetCallback, ScreenVisibilityBehavior, ScreenVisibilityChangeContext, ScreenVisibilityFSM, ScreenVisibilityHandle, ScreenVisibilityOptions, ScreenVisibilitySize, ScreenVisibilitySnapshot, ScreenWrapBehavior, ScreenWrapEvent, ScreenWrapFSM, ScreenWrapOptions, ScreenWrapState, SemanticParticlePresetOptions, Shooter2DAimFireInput, Shooter2DBehavior, Shooter2DBehaviorOptions, Shooter2DFireArgs, Shooter2DHandle, Shooter2DProjectileFactory, Shooter2DSourceEntity, Shooter2DStageLike, Shooter2DStateComponent, Shooter2DTarget, ThrusterBehavior, ThrusterBehaviorOptions, ThrusterEntity, ThrusterEvent, ThrusterFSM, ThrusterFSMContext, ThrusterInputComponent, ThrusterMovementComponent, ThrusterState, ThrusterStateComponent, TopDownMovementBehavior, TopDownMovementBehaviorOptions, TopDownMovementComponent, TopDownMovementEntity, TopDownMovementHandle, TopDownMovementInputComponent, TopDownMovementStateComponent, TopDownShooterCoordinator, TopDownShooterEntity, TopDownShooterInput, TransformComponent, Vec3Like, ViewmodelConfig, VoronoiOptions, WorldBoundary2DBehavior, WorldBoundary2DBounds, WorldBoundary2DEvent, WorldBoundary2DFSM, WorldBoundary2DHandle, WorldBoundary2DHit, WorldBoundary2DHits, WorldBoundary2DOptions, WorldBoundary2DPosition, WorldBoundary2DState, WorldBoundary3DBehavior, WorldBoundary3DBounds, WorldBoundary3DEvent, WorldBoundary3DFSM, WorldBoundary3DHandle, WorldBoundary3DHit, WorldBoundary3DHits, WorldBoundary3DOptions, WorldBoundary3DPosition, WorldBoundary3DState, computeWorldBoundary2DHits, computeWorldBoundary3DHits, createFirstPersonInputComponent, createFirstPersonMovementComponent, createFirstPersonStateComponent, createJumpConfig2D, createJumpConfig3D, createJumpInput2D, createJumpInput3D, createJumpState2D, createJumpState3D, createPhysicsBodyComponent, createPlatformer2DInputComponent, createPlatformer2DMovementComponent, createPlatformer2DStateComponent, createPlatformer3DInputComponent, createPlatformer3DMovementComponent, createPlatformer3DStateComponent, createShooter2DStateComponent, createThrusterInputComponent, createThrusterMovementComponent, createThrusterStateComponent, createTopDownMovementComponent, createTopDownMovementInputComponent, createTopDownMovementStateComponent, createTransformComponent, defineBehavior, fireCooldown, fireShooter2DIfRequested, getCooldown, getCooldownStore, getEntityFacingAngle2D, hasAnyWorldBoundary2DHit, hasAnyWorldBoundary3DHit, particleEffect, particlePresets, registerCooldown, resetCooldown, resolveAim2D, tickCooldowns, updateBoundaryRicochet, useBehavior } from '@zylem/behaviors';
|
|
14
14
|
export { RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY, RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY, RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY, RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY, RUNTIME_RICOCHET_2D_BEHAVIOR_KEY, RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY, RuntimeBoundary2DBehavior, RuntimeBoundary2DOptions, RuntimeDynamicCircleBody2DBehavior, RuntimeDynamicCircleBody2DHandle, RuntimeDynamicCircleBody2DOptions, RuntimeGoalZone2DBehavior, RuntimeGoalZone2DEvent, RuntimeGoalZone2DHandle, RuntimeGoalZone2DOptions, RuntimePlayerInput2DBehavior, RuntimePlayerInput2DOptions, RuntimeRicochet2DBehavior, RuntimeRicochet2DEvent, RuntimeRicochet2DHandle, RuntimeRicochet2DOptions, RuntimeTriggerRegion2DBehavior, RuntimeTriggerRegion2DEvent, RuntimeTriggerRegion2DHandle, RuntimeTriggerRegion2DOptions, bindRuntimeDynamicCircleBody2DHandle, emitRuntimeGoal, emitRuntimeRicochet, emitRuntimeTriggerRegionEnter } from '@zylem/behaviors/runtime-2d';
|
|
@@ -21,17 +21,19 @@ export { EntityEvents, EventEmitterDelegate, GameEvents, GameLoadingPayload, Sta
|
|
|
21
21
|
export { clearGlobalSubscriptions, createGlobal, createVariable, getGlobal, getGlobals, getVariable, globalChange, globalChanges, onGlobalChange, onGlobalChanges, onVariableChange, onVariableChanges, setGlobal, setVariable, variableChange, variableChanges } from './globals.js';
|
|
22
22
|
export { pingPongBeep, ricochetSound } from './audio.js';
|
|
23
23
|
export { Howl } from 'howler';
|
|
24
|
-
export {
|
|
25
|
-
export { EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, entityThumbnailCache, focusEntity, registerEntityFocusContext } from './debug.js';
|
|
24
|
+
export { D as DEFAULT_SNAP_SETTINGS, u as DebugEntityResolver, t as DebugTools, S as SnapSettings, T as TRANSFORM_TOOLS, v as TransformTool, d as debugState, k as getHoveredEntity, j as getHoveredEntityId, e as getSelectedEntity, g as getSelectedEntityId, h as getSelectedEntityIds, m as getSnapSettings, q as isTransformTool, r as registerDebugEntityResolver, l as resolveDebugEntity, p as setAddType, s as setDebugTool, o as setGridVisible, i as setHoveredEntityId, a as setPaused, b as setSelectedEntity, c as setSelectedEntityId, f as setSelectedEntityIds, n as setSnapSettings } from './debug-state-B5awuDHl.js';
|
|
25
|
+
export { ConstructionGrid, EntityFocusContext, EntityThumbnailCache, EntityThumbnailCacheEntry, EntityThumbnailResult, GizmoAxis, GizmoDelta, GizmoMode, GizmoRay, Quat, TransformGizmo, closestAxisValue, degreesToRadians, entityThumbnailCache, eulerToQuaternion, focusEntity, intersectPlane, quaternionToEuler, radiansToDegrees, registerEntityFocusContext, snapScale, snapToIncrement, snapVec3 } from './debug.js';
|
|
26
26
|
export { GameBridge, GameBridgeHost } from './bridge.js';
|
|
27
27
|
export { BRIDGE_READY_EVENT, BridgeChannel, BridgeDebugTool, BridgeHandler, GameLoadingPayload as BridgeLoadingPayload, BridgeMessageType, BridgeMessages, BridgeVec3, EditorToGameMessages, EntitySummaryPayload, EntityThumbnailPayload, GameConfigPayload, GameToEditorMessages, GameVariablePayload, StageConfigPayload, StageSnapshotPayload, ZylemBridge, announceBridgeReady, getZylemBridge } from '@zylem/bridge';
|
|
28
28
|
export { ZylemGameElement, ZylemGameState } from './web-components.js';
|
|
29
|
+
export { a as SimulationBody, S as SimulationStepClock } from './simulation-body-zQw-emOr.js';
|
|
29
30
|
export { RuntimeBodyOptions, RuntimeColliderOptions, RuntimeCollisionBundle, buildBoxCollider, buildCapsuleCollider, buildConvexHullCollider, buildCylinderCollider, buildHeightfieldCollider, buildRuntimeBody, buildSphereCollider, buildTrimeshCollider, bundleRuntimeCollision } from './runtime.js';
|
|
30
31
|
export { ColorJsonSchema, GameConfigJson, GameConfigJsonSchema, GameDeviceConfigJson, GameDeviceConfigJsonSchema, GameInputConfigJson, GameInputConfigSchema, GameInputPlayerConfigSchema, KeyboardMappingSchema, MouseConfigSchema, MouseMappingSchema, ResolutionInputSchema, StageAssetLoaderConfigSchema, StageConfigJson, StageConfigJsonSchema, StageGLTFAssetLoaderConfigSchema, Vec3ComponentsSchema, VirtualTouchButtonConfigSchema, VirtualTouchButtonsConfigSchema, VirtualTouchConfigSchema, VirtualTouchJoystickConfigSchema, VirtualTouchJoysticksConfigSchema, VirtualTouchPositionSchema, VirtualTouchStyleSchema } from './schema.js';
|
|
31
32
|
export { createBackgroundShader, objectVertexShader, standardShader } from './graphics.js';
|
|
32
|
-
export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-
|
|
33
|
+
export { d as ZylemShader, Z as ZylemShaderObject, b as ZylemTSLShader, c as createNodeMaterialFromTSL, a as isGLSLShader, i as isTSLShader } from './material-CxxAyJYp.js';
|
|
33
34
|
export { Fn, abs, asin, atan, clamp, cos, dot, exp, float, floor, fract, length, max, min, mix, mod, normalize, positionWorld, positionWorldDirection, pow, sin, smoothstep, step, time, uniform, uv, vec2, vec3, vec4 } from 'three/tsl';
|
|
34
|
-
export { p as packCollisionGroups } from './collision-builder-
|
|
35
|
+
export { p as packCollisionGroups } from './collision-builder-BckxkdmA.js';
|
|
36
|
+
import './base-node-idopiSw5.js';
|
|
35
37
|
import 'three';
|
|
36
38
|
import '@sinclair/typebox';
|
|
37
39
|
import 'three/webgpu';
|
package/dist/public.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s,b as n,c as l,d as S,e as h,f as y,g as L,h as v,i as Z,j as b,k as g,l as u,m as T,n as j,o as F,p as W,q as k,r as w,s as z,t as B,u as D,v as E,w as G}from"./chunk-QB3NL7VQ.js";import"./chunk-BIGH6D34.js";import"./chunk-DFLI7ICU.js";import{a as _a,b as $a,c as op}from"./chunk-HNCTOJP7.js";import{a as rp}from"./chunk-TV3AZKT4.js";import{a as ep,b as tp,c as mp,d as ap,e as pp,f as fp,g as xp,h as ip,i as dp,j as cp,k as sp,l as np,m as lp,n as Sp,o as hp,p as yp}from"./chunk-47DG7I7M.js";import{A as Ip,B as Jp,C as Kp,a as Lp,b as vp,c as Zp,d as bp,e as gp,f as up,g as Tp,h as jp,i as Fp,j as Wp,k as kp,l as wp,m as zp,n as Bp,o as Dp,p as Ep,q as Gp,r as Mp,s as Np,t as Op,u as Pp,v as Vp,w as qp,x as Ap,y as Cp,z as Hp}from"./chunk-JNFFTNMH.js";import{a as ho,b as yo,c as Lo,d as vo,e as Wo,f as Jr,g as Kr,h as me,i as ae,j as pe,k as fe,l as xe,m as ie,n as de,o as ce}from"./chunk-6B5JP7T5.js";import{a as So,c as Go,d as Mo,e as No,f as Tr,g as jr,h as Br,i as Dr,k as Er,l as Gr,m as Mr,n as Nr,o as Or,p as Pr,q as Vr,r as qr,s as Ar,t as Hr,v as Ir}from"./chunk-4CHZUWLF.js";import{a as Eo}from"./chunk-7GYFZKK7.js";import{a as oo,b as ro}from"./chunk-VIPINV7V.js";import"./chunk-C5NEGC3S.js";import{c as Do}from"./chunk-D3JO4HW2.js";import{a as zo,b as Bo}from"./chunk-LKFF6XJC.js";import{a as C,b as H,c as I,e as J,g as K,h as Q,i as R,j as U,k as X,m as Y,n as _,o as $}from"./chunk-W5SXED5T.js";import{b as Zr}from"./chunk-WBQ5TNRZ.js";import{A as Pe,B as Ve,C as qe,D as Ae,E as Ce,F as He,G as Ie,H as Je,I as Ke,J as Qe,K as Re,L as Ue,M as Xe,N as Ye,O as _e,P as $e,Q as ot,R as rt,a as se,b as ne,c as le,d as Se,e as he,f as ye,g as Le,h as ve,i as Ze,j as be,k as ge,l as ue,m as Te,n as je,o as Fe,p as We,q as ke,r as we,s as ze,t as Be,u as De,v as Ee,w as Ge,x as Me,y as Ne,z as Oe}from"./chunk-OAWK2UUY.js";import{b as Qr,c as Rr,d as Ur,e as Xr,f as Yr,g as _r,h as $r,i as oe,j as re,k as ee,m as te}from"./chunk-PNLNC3FA.js";import{A as vr,B as br,C as gr,D as ur,c as fr,d as xr,e as ir,f as dr,g as cr,h as sr,i as nr,j as lr,s as Sr,u as hr,y as yr,z as Lr}from"./chunk-3I537JFL.js";import{a as o,b as r,h as e,i as t,k as m,l as a,m as p,n as f,o as x,p as i,q as d,r as c}from"./chunk-CM5YRNBJ.js";import{a as ko,b as wo}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{b as pr}from"./chunk-EVYHPR3J.js";import{$ as rm,$a as ra,A as kt,Aa as km,B as wt,Ba as wm,C as zt,Ca as zm,D as Bt,Da as Bm,E as Dt,Ea as Dm,F as Et,Fa as Em,G as Gt,Ga as Gm,H as Mt,Ha as Mm,I as Nt,Ia as Nm,J as Ot,Ja as Om,K as Pt,Ka as Pm,L as Vt,La as Vm,M as qt,Ma as qm,N as At,Na as Am,O as Ct,Oa as Cm,P as Ht,Pa as Hm,Q as It,Qa as Im,R as Jt,Ra as Jm,S as Kt,Sa as Km,T as Qt,Ta as Qm,U as Rt,Ua as Rm,V as Ut,Va as Um,W as Xt,Wa as Xm,X as Yt,Xa as Ym,Y as _t,Ya as _m,Z as $t,Za as $m,_ as om,_a as oa,a as et,aa as em,ab as ea,b as tt,ba as tm,bb as ta,c as mt,ca as mm,cb as ma,d as at,da as am,db as aa,e as pt,ea as pm,eb as pa,f as ft,fa as fm,fb as fa,g as xt,ga as xm,gb as xa,h as it,ha as im,hb as ia,i as dt,ia as dm,ib as da,j as ct,ja as cm,k as st,ka as sm,l as nt,la as nm,m as lt,ma as lm,n as St,na as Sm,o as ht,oa as hm,p as yt,pa as ym,q as Lt,qa as Lm,r as vt,ra as vm,s as Zt,sa as Zm,t as bt,ta as bm,u as gt,ua as gm,v as ut,va as um,w as Tt,wa as Tm,x as jt,xa as jm,y as Ft,ya as Fm,z as Wt,za as Wm}from"./chunk-XK63E4SX.js";import{a as ca,b as sa,c as na}from"./chunk-ZRT3ZQVH.js";import{a as la,b as Sa,c as ha,d as ya}from"./chunk-WQ3WMMZD.js";import{h as Fr,i as Wr,j as kr,k as wr,l as zr}from"./chunk-D2PATZCC.js";import{e as M,f as N,g as O,h as P,i as V,j as q,m as A}from"./chunk-4QLJUQSJ.js";import{a as Oo,b as Po,c as Vo,d as qo,g as Ao,h as Co,i as Ho,j as Io}from"./chunk-7WRQ2UAN.js";import{A as Ia,B as Ja,C as Ka,D as Qa,E as Ra,a as La,b as va,c as Za,d as ba,e as ga,f as ua,g as Ta,h as ja,i as Fa,j as Wa,k as ka,l as wa,m as za,n as Ba,o as Da,p as Ea,q as Ga,r as Ma,s as Na,t as Oa,u as Pa,v as Va,w as qa,x as Aa,y as Ca,z as Ha}from"./chunk-IPWUDOV5.js";import{a as Cr}from"./chunk-BH53MBAZ.js";import{a as Jo,b as Ko,c as Qo,d as Ro,e as Uo,f as Xo,g as Yo,h as _o,i as $o,j as or,k as rr,l as er,m as tr,n as mr,o as ar}from"./chunk-XRP4JJXL.js";import{a as Ua,b as Xa,c as Ya}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as Zo,b as bo,c as go,d as uo,e as To,f as jo,g as Fo}from"./chunk-PCFF4LLO.js";import{a as eo,b as to,c as mo,d as ao,e as po,f as fo,g as xo,h as io,i as co,j as so,k as no,l as lo}from"./chunk-UG22Z42P.js";export{yr as ACTOR_TYPE,ho as AspectRatio,Le as BOX_TYPE,op as BRIDGE_READY_EVENT,et as BoundaryRicochet3DCoordinator,tt as BoundaryRicochetCoordinator,Ne as CONE_TYPE,Ce as CYLINDER_TYPE,Pr as CameraManager,Er as CameraPipeline,Vr as CameraWrapper,Vp as ColorJsonSchema,mt as CooldownBehavior,Ee as DISK_TYPE,at as Destructible3DBehavior,pt as DestructibleMesh,jp as EntityJsonSchema,vp as EntitySchema,oo as EntityThumbnailCache,ko as EventEmitterDelegate,br as FOG_TYPE,ft as FirstPersonBehavior,xt as FirstPersonEvent,it as FirstPersonFSM,Nr as FirstPersonPerspective,st as FirstPersonPresentation,dt as FirstPersonShooterCoordinator,ct as FirstPersonState,Mr as Fixed2DPerspective,c as Fn,nt as FractureOptions,me as Game,Do as GameBridge,Kp as GameConfigJsonSchema,Jp as GameDeviceConfigJsonSchema,Pp as GameInputConfigSchema,Op as GameInputPlayerConfigSchema,na as Howl,lt as Jumper2DBehavior,St as Jumper2DEvent,ht as Jumper2DFSM,yt as Jumper2DState,Lt as Jumper3DBehavior,vt as Jumper3DEvent,Zt as Jumper3DFSM,bt as Jumper3DState,Wp as KeyboardMappingSchema,Ye as LIGHT_TYPE,$r as LINE_TYPE,up as LineEntityDataSchema,Np as MouseConfigSchema,kp as MouseMappingSchema,gt as MultidirectionalSpaceShooterCoordinator,Re as PARTICLE_SYSTEM_TYPE,Je as PILL_TYPE,Te as PLANE_TYPE,Ve as PYRAMID_TYPE,ut as ParticleEmitterBehavior,Dr as Perspectives,Tt as Platformer2DBehavior,jt as Platformer2DEvent,Ft as Platformer2DFSM,Wt as Platformer2DState,kt as Platformer3DBehavior,wt as Platformer3DEvent,zt as Platformer3DFSM,Bt as Platformer3DState,ze as RECT_TYPE,ra as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,ea as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,ta as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,ma as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,aa as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,pa as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,Tr as RenderBundleManager,jr as RenderStrategyManager,Ip as ResolutionInputSchema,Dt as Ricochet2DBehavior,Et as Ricochet2DEvent,Gt as Ricochet2DFSM,Mt as Ricochet2DState,Nt as Ricochet3DBehavior,Ot as Ricochet3DEvent,Pt as Ricochet3DFSM,Vt as Ricochet3DState,Um as RuntimeBoundary2DBehavior,Xm as RuntimeDynamicCircleBody2DBehavior,Ym as RuntimeGoalZone2DBehavior,_m as RuntimePlayerInput2DBehavior,$m as RuntimeRicochet2DBehavior,oa as RuntimeTriggerRegion2DBehavior,be as SPHERE_TYPE,Xr as SPRITE_TYPE,fe as STAGE_STATE_CHANGE,qt as ScreenVisibilityBehavior,At as ScreenVisibilityFSM,Ct as ScreenWrapBehavior,Ht as ScreenWrapEvent,It as ScreenWrapFSM,Jt as ScreenWrapState,Kt as Shooter2DBehavior,Zr as SimulationBody,Tp as SpriteEntityDataSchema,Cp as StageAssetLoaderConfigSchema,cp as StageBodyKind,sp as StageBoundaryDim,Hp as StageConfigJsonSchema,np as StageEventType,Ap as StageGLTFAssetLoaderConfigSchema,Fp as StageJsonSchema,Kr as StageManager,lp as StageRicochetDim,Sp as StageRicochetReflection,Zp as StageSchema,hp as StageTopDownPlane,Qr as TEXT_TYPE,bp as TextEntityDataSchema,Gr as ThirdPersonPerspective,Qt as ThrusterBehavior,Rt as ThrusterEvent,Ut as ThrusterFSM,Xt as ThrusterState,Yt as TopDownMovementBehavior,_t as TopDownShooterCoordinator,Po as VEC2_ONE,Oo as VEC2_ZERO,qo as VEC3_ONE,Vo as VEC3_ZERO,qp as Vec3ComponentsSchema,Lp as Vector2Schema,gp as Vector3TupleSchema,Bp as VirtualTouchButtonConfigSchema,Ep as VirtualTouchButtonsConfigSchema,Mp as VirtualTouchConfigSchema,Dp as VirtualTouchJoystickConfigSchema,Gp as VirtualTouchJoysticksConfigSchema,zp as VirtualTouchPositionSchema,wp as VirtualTouchStyleSchema,$t as WorldBoundary2DBehavior,om as WorldBoundary2DEvent,rm as WorldBoundary2DFSM,em as WorldBoundary2DState,tm as WorldBoundary3DBehavior,mm as WorldBoundary3DEvent,am as WorldBoundary3DFSM,pm as WorldBoundary3DState,We as ZONE_TYPE,Lr as ZylemActor,ve as ZylemBox,Oe as ZylemCone,He as ZylemCylinder,Ge as ZylemDisk,gr as ZylemFog,rp as ZylemGameElement,_e as ZylemLight,re as ZylemLine,Ue as ZylemParticleSystem,Ke as ZylemPill,je as ZylemPlane,qe as ZylemPyramid,Be as ZylemRect,ge as ZylemSphere,Yr as ZylemSprite,Rr as ZylemText,ke as ZylemZone,u as abs,$a as announceBridgeReady,Cr as applyTransformChanges,g as asin,b as atan,fa as bindRuntimeDynamicCircleBody2DHandle,fr as boxCollision,se as boxMesh,tp as buildBoxCollider,ap as buildCapsuleCollider,fp as buildConvexHullCollider,pp as buildCylinderCollider,ip as buildHeightfieldCollider,ep as buildRuntimeBody,mp as buildSphereCollider,xp as buildTrimeshCollider,dp as bundleRuntimeCollision,ua as callFunc,L as clamp,A as clearGlobalSubscriptions,fm as computeWorldBoundary2DHits,xm as computeWorldBoundary3DHits,ir as coneCollision,le as coneMesh,Z as cos,Sr as create,vr as createActor,s as createBackgroundShader,Ze as createBox,qr as createCamera,Pe as createCone,ot as createCooldownIcon,Ie as createCylinder,Me as createDisk,hr as createEntity,te as createEntityFactory,im as createFirstPersonInputComponent,dm as createFirstPersonMovementComponent,cm as createFirstPersonStateComponent,ur as createFog,de as createFollowTarget,ae as createGame,N as createGlobal,sm as createJumpConfig2D,nm as createJumpConfig3D,lm as createJumpInput2D,Sm as createJumpInput3D,hm as createJumpState2D,ym as createJumpState3D,$e as createLight,ee as createLine,m as createNodeMaterialFromTSL,Xe as createParticleSystem,Or as createPerspective,Lm as createPhysicsBodyComponent,Qe as createPill,Fe as createPlane,vm as createPlatformer2DInputComponent,Zm as createPlatformer2DMovementComponent,bm as createPlatformer2DStateComponent,gm as createPlatformer3DInputComponent,um as createPlatformer3DMovementComponent,Tm as createPlatformer3DStateComponent,Ae as createPyramid,De as createRect,jm as createShooter2DStateComponent,yp as createSimulation,ue as createSphere,_r as createSprite,Ir as createStage,Ur as createText,Fm as createThrusterInputComponent,Wm as createThrusterMovementComponent,km as createThrusterStateComponent,wm as createTopDownMovementComponent,zm as createTopDownMovementInputComponent,Bm as createTopDownMovementStateComponent,Dm as createTransformComponent,Da as createTransformStore,Wr as createVariable,we as createZone,Eo as crossfadeTransitionShader,cr as cylinderCollision,he as cylinderMesh,C as debugState,Fo as defaultTouchControls,Em as defineBehavior,ga as delay,rt as destroy,ie as dispatchStageState,B as dot,xa as emitRuntimeGoal,ia as emitRuntimeRicochet,da as emitRuntimeTriggerRegionEnter,pe as entitySpawner,ro as entityThumbnailCache,T as exp,Ta as fadeOpacity,Gm as fireCooldown,Mm as fireShooter2DIfRequested,d as float,w as floor,Bo as focusEntity,z as fract,Wo as gameConfig,Nm as getCooldown,Om as getCooldownStore,yo as getDisplayAspect,Pm as getEntityFacingAngle2D,O as getGlobal,q as getGlobals,_ as getHoveredEntity,U as getHoveredEntityId,Aa as getPosition,Lo as getPresetResolution,ar as getRotation,Y as getSelectedEntity,Q as getSelectedEntityId,kr as getVariable,Ca as getVelocity,_a as getZylemBridge,la as globalChange,Sa as globalChanges,Vm as hasAnyWorldBoundary2DHit,qm as hasAnyWorldBoundary3DHit,xe as initStageStateDispatcher,t as isGLSLShader,No as isManagedRenderEntity,e as isTSLShader,So as isWebGPUSupported,uo as joystickBaseSvg,To as joystickThumbSvg,D as length,W as max,lo as mergeInputConfigs,k as min,h as mix,G as mod,Ea as move,va as moveBy,qa as moveForwardXY,Za as moveTo,Ga as moveX,Oa as moveXY,Pa as moveXZ,Ma as moveY,Na as moveZ,S as normalize,Ao as normalizeVec2,Co as normalizeVec3,o as objectVertexShader,P as onGlobalChange,V as onGlobalChanges,Fa as onPress,Wa as onRelease,wr as onVariableChange,zr as onVariableChanges,pr as packCollisionGroups,wa as parallel,vo as parseResolution,Am as particleEffect,Cm as particlePresets,oe as pickZylemLine,sr as pillCollision,ye as pillMesh,sa as pingPongBeep,nr as planeCollision,l as positionWorld,n as positionWorldDirection,j as pow,dr as pyramidCollision,Se as pyramidMesh,Hm as registerCooldown,H as registerDebugEntityResolver,zo as registerEntityFocusContext,za as repeat,Ba as repeatForever,Im as resetCooldown,La as resetEntityOpacity,Va as resetVelocity,Jm as resolveAim2D,go as resolveButtonAccent,I as resolveDebugEntity,Go as resolveRenderCategory,bo as resolveTouchTheme,ca as ricochetSound,ba as rotateBy,Qo as rotateEuler,Jo as rotateInDirection,Uo as rotateX,Ro as rotateY,Ko as rotateYEuler,Xo as rotateZ,Ya as screenCenterLookDeltas,Xa as screenCenterLookTargets,ka as sequence,ce as setCameraFeed,K as setDebugTool,M as setGlobal,X as setHoveredEntityId,J as setPaused,Ha as setPosition,Ia as setPositionX,Ja as setPositionY,Ka as setPositionZ,tr as setRotation,mr as setRotationDegrees,or as setRotationDegreesX,_o as setRotationDegreesY,er as setRotationDegreesZ,$o as setRotationX,Yo as setRotationY,rr as setRotationZ,$ as setSelectedEntity,R as setSelectedEntityId,Br as setStageFrameProfilerEnabled,Fr as setVariable,Ua as shortestAngleDelta,v as sin,y as smoothstep,xr as sphereCollision,ne as sphereMesh,Ar as stageConfig,Jr as stageState,r as standardShader,F as step,ja as throttle,Km as tickCooldowns,f as time,Ho as toThreeVector2,Io as toThreeVector3,jo as touchButtonSvg,Zo as touchThemes,a as uniform,Qm as updateBoundaryRicochet,eo as useArrowsForAxes,mo as useArrowsForDirections,to as useArrowsForSecondaryAxes,Rm as useBehavior,fo as useIJKLForAxes,xo as useIJKLForDirections,so as useMouse,io as useMouseLook,co as useScreenCenterLook,no as useVirtualControls,po as useWASDForAxes,ao as useWASDForDirections,Mo as usesManagedRenderPath,p as uv,ha as variableChange,ya as variableChanges,E as vec2,x as vec3,i as vec4,Hr as vessel,Ra as wrapAround3D,Qa as wrapAroundXY,lr as zoneCollision,wo as zylemEventBus};
|
|
1
|
+
import{a as s,b as n,c as l,d as S,e as h,f as y,g as L,h as v,i as Z,j as b,k as g,l as u,m as T,n as j,o as F,p as W,q as k,r as w,s as z,t as B,u as D,v as E,w as G}from"./chunk-QB3NL7VQ.js";import"./chunk-BIGH6D34.js";import"./chunk-MSCVL5OK.js";import{a as Lp,b as vp,c as Zp}from"./chunk-HNCTOJP7.js";import{a as bp}from"./chunk-QVIUZEYA.js";import{a as gp,b as up,c as Tp,d as jp,e as Fp,f as Wp,g as kp,h as wp,i as zp,j as Bp,k as Dp,l as Ep,m as Gp,n as Mp,o as Np,p as Op}from"./chunk-47DG7I7M.js";import{A as cf,B as sf,C as nf,a as Pp,b as Vp,c as qp,d as Ap,e as Cp,f as Hp,g as Ip,h as Jp,i as Kp,j as Qp,k as Rp,l as Up,m as Xp,n as Yp,o as _p,p as $p,q as of,r as rf,s as ef,t as tf,u as mf,v as af,w as pf,x as ff,y as xf,z as df}from"./chunk-JNFFTNMH.js";import{a as jo,b as Fo,c as Wo,d as ko,e as No,f as Xe,g as Ye,h as it,i as dt,j as ct,k as st,l as nt,m as lt,n as St,o as ht}from"./chunk-LD4KDRYL.js";import{a as To,c as Se,d as he,e as ye,f as je,g as Fe,h as Ne,i as Oe,k as Pe,l as Ve,m as qe,n as Ae,o as Ce,p as He,q as Ie,r as Je,s as Ke,t as Re,v as Ue}from"./chunk-FYQNZCIP.js";import{a as le}from"./chunk-7GYFZKK7.js";import{a as io,b as co}from"./chunk-Q2YDBMVY.js";import{c as De,d as Ee,e as Ge,f as Me}from"./chunk-BCFFS3FP.js";import"./chunk-QDQ4QMAI.js";import"./chunk-AE3CTVHY.js";import{f as Ro}from"./chunk-DQQA3VJH.js";import{a as Vo,b as qo,c as Ao,d as Co,e as Ho,f as Io,g as Jo,h as Ko,i as Qo}from"./chunk-VJZMSBKP.js";import{a as C,b as H,c as I,d as J,e as K,f as Q,h as R,j as U,l as X,m as Y,n as _,o as $,p as oo,q as ro,r as eo,s as to,t as mo,u as ao,w as po,x as fo,y as xo}from"./chunk-DECK4UEC.js";import{b as be}from"./chunk-WBQ5TNRZ.js";import{a as yt,b as Lt,c as vt,d as Zt,e as bt}from"./chunk-GHJQ2HKI.js";import{a as _e,b as $e,c as ot,d as rt,e as et,f as tt,g as mt,h as at,i as pt,j as ft,l as xt}from"./chunk-YOVE25NW.js";import{a as Le,b as ve,c as Ze,d as ge,e as ue,f as Te}from"./chunk-MXO4VGDB.js";import{A as oe,B as re,C as ee,D as te,E as me,F as ae,G as pe,H as fe,I as xe,J as ie,K as de,L as ce,M as se,N as ne,b as kr,c as wr,d as zr,e as Br,f as Dr,g as Er,h as Gr,i as Mr,j as Nr,k as Or,l as Pr,m as Vr,n as qr,o as Ar,p as Cr,q as Hr,r as Ir,s as Jr,t as Kr,u as Qr,v as Rr,w as Ur,x as Xr,y as Yr,z as $r}from"./chunk-BMRFDDMR.js";import{c as vr,d as Zr,e as br,f as gr,g as ur,h as Tr,i as jr,j as Fr,u as Wr,z as _r}from"./chunk-SAQA4SXW.js";import{a as o,b as r,h as e,i as t,k as m,l as a,m as p,n as f,o as x,p as i,q as d,r as c}from"./chunk-7NYP4YAG.js";import{a as Oo,b as Po}from"./chunk-AIQ6IVT5.js";import"./chunk-QXVH6POE.js";import{b as Lr}from"./chunk-EVYHPR3J.js";import{$ as bm,$a as ba,A as Rt,Aa as Rm,B as Ut,Ba as Um,C as Xt,Ca as Xm,D as Yt,Da as Ym,E as _t,Ea as _m,F as $t,Fa as $m,G as om,Ga as oa,H as rm,Ha as ra,I as em,Ia as ea,J as tm,Ja as ta,K as mm,Ka as ma,L as am,La as aa,M as pm,Ma as pa,N as fm,Na as fa,O as xm,Oa as xa,P as im,Pa as ia,Q as dm,Qa as da,R as cm,Ra as ca,S as sm,Sa as sa,T as nm,Ta as na,U as lm,Ua as la,V as Sm,Va as Sa,W as hm,Wa as ha,X as ym,Xa as ya,Y as Lm,Ya as La,Z as vm,Za as va,_ as Zm,_a as Za,a as gt,aa as gm,ab as ga,b as ut,ba as um,bb as ua,c as Tt,ca as Tm,cb as Ta,d as jt,da as jm,db as ja,e as Ft,ea as Fm,eb as Fa,f as Wt,fa as Wm,fb as Wa,g as kt,ga as km,gb as ka,h as wt,ha as wm,hb as wa,i as zt,ia as zm,ib as za,j as Bt,ja as Bm,k as Dt,ka as Dm,l as Et,la as Em,m as Gt,ma as Gm,n as Mt,na as Mm,o as Nt,oa as Nm,p as Ot,pa as Om,q as Pt,qa as Pm,r as Vt,ra as Vm,s as qt,sa as qm,t as At,ta as Am,u as Ct,ua as Cm,v as Ht,va as Hm,w as It,wa as Im,x as Jt,xa as Jm,y as Kt,ya as Km,z as Qt,za as Qm}from"./chunk-XK63E4SX.js";import{a as Ba,b as Da,c as Ea}from"./chunk-ZRT3ZQVH.js";import{a as Ga,b as Ma,c as Na,d as Oa}from"./chunk-WQ3WMMZD.js";import{h as We,i as ke,j as we,k as ze,l as Be}from"./chunk-D2PATZCC.js";import{e as M,f as N,g as O,h as P,i as V,j as q,m as A}from"./chunk-4QLJUQSJ.js";import{a as Uo,b as Xo,c as Yo,d as _o,g as $o,h as or,i as rr,j as er}from"./chunk-7WRQ2UAN.js";import{A as dp,B as cp,C as sp,D as np,E as lp,a as Pa,b as Va,c as qa,d as Aa,e as Ca,f as Ha,g as Ia,h as Ja,i as Ka,j as Qa,k as Ra,l as Ua,m as Xa,n as Ya,o as _a,p as $a,q as op,r as rp,s as ep,t as tp,u as mp,v as ap,w as pp,x as fp,y as xp,z as ip}from"./chunk-IPWUDOV5.js";import{a as Qe}from"./chunk-BH53MBAZ.js";import{a as tr,b as mr,c as ar,d as pr,e as fr,f as xr,g as ir,h as dr,i as cr,j as sr,k as nr,l as lr,m as Sr,n as hr,o as yr}from"./chunk-XRP4JJXL.js";import{a as Sp,b as hp,c as yp}from"./chunk-7QF6YTEZ.js";import"./chunk-ORIDWL3T.js";import{a as wo,b as zo,c as Bo,d as Do,e as Eo,f as Go,g as Mo}from"./chunk-PCFF4LLO.js";import{a as so,b as no,c as lo,d as So,e as ho,f as yo,g as Lo,h as vo,i as Zo,j as bo,k as go,l as uo}from"./chunk-UG22Z42P.js";export{Le as ACTOR_TYPE,jo as AspectRatio,Gr as BOX_TYPE,Zp as BRIDGE_READY_EVENT,gt as BoundaryRicochet3DCoordinator,ut as BoundaryRicochetCoordinator,qr as CONE_TYPE,Kr as CYLINDER_TYPE,He as CameraManager,Pe as CameraPipeline,Ie as CameraWrapper,af as ColorJsonSchema,De as ConstructionGrid,Tt as CooldownBehavior,I as DEFAULT_SNAP_SETTINGS,$r as DISK_TYPE,jt as Destructible3DBehavior,Ft as DestructibleMesh,Jp as EntityJsonSchema,Vp as EntitySchema,io as EntityThumbnailCache,Oo as EventEmitterDelegate,ge as FOG_TYPE,Wt as FirstPersonBehavior,kt as FirstPersonEvent,wt as FirstPersonFSM,Ae as FirstPersonPerspective,Dt as FirstPersonPresentation,zt as FirstPersonShooterCoordinator,Bt as FirstPersonState,qe as Fixed2DPerspective,c as Fn,Et as FractureOptions,it as Game,Ro as GameBridge,nf as GameConfigJsonSchema,sf as GameDeviceConfigJsonSchema,mf as GameInputConfigSchema,tf as GameInputPlayerConfigSchema,Ea as Howl,Gt as Jumper2DBehavior,Mt as Jumper2DEvent,Nt as Jumper2DFSM,Ot as Jumper2DState,Pt as Jumper3DBehavior,Vt as Jumper3DEvent,qt as Jumper3DFSM,At as Jumper3DState,Qp as KeyboardMappingSchema,ce as LIGHT_TYPE,mt as LINE_TYPE,Hp as LineEntityDataSchema,ef as MouseConfigSchema,Rp as MouseMappingSchema,Ct as MultidirectionalSpaceShooterCoordinator,yt as PARTICLE_SYSTEM_TYPE,Ur as PILL_TYPE,ee as PLANE_TYPE,Hr as PYRAMID_TYPE,Ht as ParticleEmitterBehavior,Oe as Perspectives,It as Platformer2DBehavior,Jt as Platformer2DEvent,Kt as Platformer2DFSM,Qt as Platformer2DState,Rt as Platformer3DBehavior,Ut as Platformer3DEvent,Xt as Platformer3DFSM,Yt as Platformer3DState,xe as RECT_TYPE,ba as RUNTIME_BOUNDARY_2D_BEHAVIOR_KEY,ga as RUNTIME_DYNAMIC_CIRCLE_BODY_2D_BEHAVIOR_KEY,ua as RUNTIME_GOAL_ZONE_2D_BEHAVIOR_KEY,Ta as RUNTIME_PLAYER_INPUT_2D_BEHAVIOR_KEY,ja as RUNTIME_RICOCHET_2D_BEHAVIOR_KEY,Fa as RUNTIME_TRIGGER_REGION_2D_BEHAVIOR_KEY,je as RenderBundleManager,Fe as RenderStrategyManager,cf as ResolutionInputSchema,_t as Ricochet2DBehavior,$t as Ricochet2DEvent,om as Ricochet2DFSM,rm as Ricochet2DState,em as Ricochet3DBehavior,tm as Ricochet3DEvent,mm as Ricochet3DFSM,am as Ricochet3DState,Sa as RuntimeBoundary2DBehavior,ha as RuntimeDynamicCircleBody2DBehavior,ya as RuntimeGoalZone2DBehavior,La as RuntimePlayerInput2DBehavior,va as RuntimeRicochet2DBehavior,Za as RuntimeTriggerRegion2DBehavior,Or as SPHERE_TYPE,rt as SPRITE_TYPE,st as STAGE_STATE_CHANGE,pm as ScreenVisibilityBehavior,fm as ScreenVisibilityFSM,xm as ScreenWrapBehavior,im as ScreenWrapEvent,dm as ScreenWrapFSM,cm as ScreenWrapState,sm as Shooter2DBehavior,be as SimulationBody,Ip as SpriteEntityDataSchema,xf as StageAssetLoaderConfigSchema,Bp as StageBodyKind,Dp as StageBoundaryDim,df as StageConfigJsonSchema,Ep as StageEventType,ff as StageGLTFAssetLoaderConfigSchema,Kp as StageJsonSchema,Ye as StageManager,Gp as StageRicochetDim,Mp as StageRicochetReflection,qp as StageSchema,Np as StageTopDownPlane,_e as TEXT_TYPE,C as TRANSFORM_TOOLS,Ap as TextEntityDataSchema,Ve as ThirdPersonPerspective,nm as ThrusterBehavior,lm as ThrusterEvent,Sm as ThrusterFSM,hm as ThrusterState,ym as TopDownMovementBehavior,Lm as TopDownShooterCoordinator,Me as TransformGizmo,Xo as VEC2_ONE,Uo as VEC2_ZERO,_o as VEC3_ONE,Yo as VEC3_ZERO,pf as Vec3ComponentsSchema,Pp as Vector2Schema,Cp as Vector3TupleSchema,Yp as VirtualTouchButtonConfigSchema,$p as VirtualTouchButtonsConfigSchema,rf as VirtualTouchConfigSchema,_p as VirtualTouchJoystickConfigSchema,of as VirtualTouchJoysticksConfigSchema,Xp as VirtualTouchPositionSchema,Up as VirtualTouchStyleSchema,vm as WorldBoundary2DBehavior,Zm as WorldBoundary2DEvent,bm as WorldBoundary2DFSM,gm as WorldBoundary2DState,um as WorldBoundary3DBehavior,Tm as WorldBoundary3DEvent,jm as WorldBoundary3DFSM,Fm as WorldBoundary3DState,ae as ZONE_TYPE,ve as ZylemActor,Mr as ZylemBox,Ar as ZylemCone,Qr as ZylemCylinder,oe as ZylemDisk,ue as ZylemFog,bp as ZylemGameElement,se as ZylemLight,pt as ZylemLine,Lt as ZylemParticleSystem,Xr as ZylemPill,te as ZylemPlane,Ir as ZylemPyramid,ie as ZylemRect,Pr as ZylemSphere,et as ZylemSprite,$e as ZylemText,pe as ZylemZone,u as abs,vp as announceBridgeReady,Qe as applyTransformChanges,g as asin,b as atan,Wa as bindRuntimeDynamicCircleBody2DHandle,vr as boxCollision,kr as boxMesh,up as buildBoxCollider,jp as buildCapsuleCollider,Wp as buildConvexHullCollider,Fp as buildCylinderCollider,wp as buildHeightfieldCollider,gp as buildRuntimeBody,Tp as buildSphereCollider,kp as buildTrimeshCollider,zp as bundleRuntimeCollision,Ha as callFunc,L as clamp,A as clearGlobalSubscriptions,Ee as closestAxisValue,Wm as computeWorldBoundary2DHits,km as computeWorldBoundary3DHits,br as coneCollision,zr as coneMesh,Z as cos,Wr as create,Ze as createActor,s as createBackgroundShader,Nr as createBox,Je as createCamera,Cr as createCone,Zt as createCooldownIcon,Rr as createCylinder,re as createDisk,_r as createEntity,xt as createEntityFactory,wm as createFirstPersonInputComponent,zm as createFirstPersonMovementComponent,Bm as createFirstPersonStateComponent,Te as createFog,St as createFollowTarget,dt as createGame,N as createGlobal,Dm as createJumpConfig2D,Em as createJumpConfig3D,Gm as createJumpInput2D,Mm as createJumpInput3D,Nm as createJumpState2D,Om as createJumpState3D,ne as createLight,ft as createLine,m as createNodeMaterialFromTSL,vt as createParticleSystem,Ce as createPerspective,Pm as createPhysicsBodyComponent,Yr as createPill,me as createPlane,Vm as createPlatformer2DInputComponent,qm as createPlatformer2DMovementComponent,Am as createPlatformer2DStateComponent,Cm as createPlatformer3DInputComponent,Hm as createPlatformer3DMovementComponent,Im as createPlatformer3DStateComponent,Jr as createPyramid,de as createRect,Jm as createShooter2DStateComponent,Op as createSimulation,Vr as createSphere,tt as createSprite,Ue as createStage,ot as createText,Km as createThrusterInputComponent,Qm as createThrusterMovementComponent,Rm as createThrusterStateComponent,Um as createTopDownMovementComponent,Xm as createTopDownMovementInputComponent,Ym as createTopDownMovementStateComponent,_m as createTransformComponent,_a as createTransformStore,ke as createVariable,fe as createZone,le as crossfadeTransitionShader,ur as cylinderCollision,Dr as cylinderMesh,J as debugState,Mo as defaultTouchControls,$m as defineBehavior,Ko as degreesToRadians,Ca as delay,bt as destroy,lt as dispatchStageState,B as dot,ka as emitRuntimeGoal,wa as emitRuntimeRicochet,za as emitRuntimeTriggerRegionEnter,ct as entitySpawner,co as entityThumbnailCache,Ao as eulerToQuaternion,T as exp,Ia as fadeOpacity,oa as fireCooldown,ra as fireShooter2DIfRequested,d as float,w as floor,qo as focusEntity,z as fract,No as gameConfig,ea as getCooldown,ta as getCooldownStore,Fo as getDisplayAspect,ma as getEntityFacingAngle2D,O as getGlobal,q as getGlobals,fo as getHoveredEntity,mo as getHoveredEntityId,fp as getPosition,Wo as getPresetResolution,yr as getRotation,po as getSelectedEntity,X as getSelectedEntityId,_ as getSelectedEntityIds,oo as getSnapSettings,we as getVariable,xp as getVelocity,Lp as getZylemBridge,Ga as globalChange,Ma as globalChanges,aa as hasAnyWorldBoundary2DHit,pa as hasAnyWorldBoundary3DHit,nt as initStageStateDispatcher,Ge as intersectPlane,t as isGLSLShader,ye as isManagedRenderEntity,e as isTSLShader,H as isTransformTool,To as isWebGPUSupported,Do as joystickBaseSvg,Eo as joystickThumbSvg,D as length,W as max,uo as mergeInputConfigs,k as min,h as mix,G as mod,$a as move,Va as moveBy,pp as moveForwardXY,qa as moveTo,op as moveX,tp as moveXY,mp as moveXZ,rp as moveY,ep as moveZ,S as normalize,$o as normalizeVec2,or as normalizeVec3,o as objectVertexShader,P as onGlobalChange,V as onGlobalChanges,Ka as onPress,Qa as onRelease,ze as onVariableChange,Be as onVariableChanges,Lr as packCollisionGroups,Ua as parallel,ko as parseResolution,fa as particleEffect,xa as particlePresets,at as pickZylemLine,Tr as pillCollision,Er as pillMesh,Da as pingPongBeep,jr as planeCollision,l as positionWorld,n as positionWorldDirection,j as pow,gr as pyramidCollision,Br as pyramidMesh,Co as quaternionToEuler,Qo as radiansToDegrees,ia as registerCooldown,K as registerDebugEntityResolver,Vo as registerEntityFocusContext,Xa as repeat,Ya as repeatForever,da as resetCooldown,Pa as resetEntityOpacity,ap as resetVelocity,ca as resolveAim2D,Bo as resolveButtonAccent,Q as resolveDebugEntity,Se as resolveRenderCategory,zo as resolveTouchTheme,Ba as ricochetSound,Aa as rotateBy,ar as rotateEuler,tr as rotateInDirection,fr as rotateX,pr as rotateY,mr as rotateYEuler,xr as rotateZ,yp as screenCenterLookDeltas,hp as screenCenterLookTargets,Ra as sequence,to as setAddType,ht as setCameraFeed,U as setDebugTool,M as setGlobal,eo as setGridVisible,ao as setHoveredEntityId,R as setPaused,ip as setPosition,dp as setPositionX,cp as setPositionY,sp as setPositionZ,Sr as setRotation,hr as setRotationDegrees,sr as setRotationDegreesX,dr as setRotationDegreesY,lr as setRotationDegreesZ,cr as setRotationX,ir as setRotationY,nr as setRotationZ,xo as setSelectedEntity,Y as setSelectedEntityId,$ as setSelectedEntityIds,ro as setSnapSettings,Ne as setStageFrameProfilerEnabled,We as setVariable,Sp as shortestAngleDelta,v as sin,y as smoothstep,Jo as snapScale,Ho as snapToIncrement,Io as snapVec3,Zr as sphereCollision,wr as sphereMesh,Ke as stageConfig,Xe as stageState,r as standardShader,F as step,Ja as throttle,sa as tickCooldowns,f as time,rr as toThreeVector2,er as toThreeVector3,Go as touchButtonSvg,wo as touchThemes,a as uniform,na as updateBoundaryRicochet,so as useArrowsForAxes,lo as useArrowsForDirections,no as useArrowsForSecondaryAxes,la as useBehavior,yo as useIJKLForAxes,Lo as useIJKLForDirections,bo as useMouse,vo as useMouseLook,Zo as useScreenCenterLook,go as useVirtualControls,ho as useWASDForAxes,So as useWASDForDirections,he as usesManagedRenderPath,p as uv,Na as variableChange,Oa as variableChanges,E as vec2,x as vec3,i as vec4,Re as vessel,lp as wrapAround3D,np as wrapAroundXY,Fr as zoneCollision,Po as zylemEventBus};
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StageBodyKindValue, StageBodyConfig, StageColliderConfig } from '@zylem/behaviors/core';
|
|
2
2
|
export { BehaviorRuntime, EntityDefinition, EntityHandle, Simulation, SimulationBodyDefinition, SimulationColliderDefinition, SimulationEvent, SimulationFrame, SimulationOptions, StageBodyConfig, StageBodyInfo, StageBodyKind, StageBodyKindValue, StageBoundaryDim, StageColliderConfig, StageColliderShape, StageDebugRender, StageEvent, StageEventType, StagePose, StageRaycastHit, StageRenderSlot, StageRicochetDim, StageRicochetReflection, StageTopDownPlane, createSimulation } from '@zylem/behaviors/core';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { p as packCollisionGroups } from './collision-builder-
|
|
3
|
+
export { a as SimulationBody, S as SimulationStepClock } from './simulation-body-zQw-emOr.js';
|
|
4
|
+
import { e as Vec3Input } from './vector-D3eDzvcA.js';
|
|
5
|
+
export { p as packCollisionGroups } from './collision-builder-BckxkdmA.js';
|
|
6
6
|
import 'three';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EntityHandle, Simulation } from '@zylem/behaviors/core';
|
|
2
|
-
import { Vector3, Vector2 } from 'three';
|
|
3
2
|
|
|
4
3
|
interface PhysicsVector3 {
|
|
5
4
|
x: number;
|
|
@@ -128,42 +127,4 @@ declare class SimulationBody implements PhysicsRenderPoseProvider {
|
|
|
128
127
|
private writeLivePose;
|
|
129
128
|
}
|
|
130
129
|
|
|
131
|
-
type
|
|
132
|
-
type Vec3 = Vector3 | Vec3Components;
|
|
133
|
-
type Vec2Components = {
|
|
134
|
-
x: number;
|
|
135
|
-
y: number;
|
|
136
|
-
};
|
|
137
|
-
type Vec3Components = {
|
|
138
|
-
x: number;
|
|
139
|
-
y: number;
|
|
140
|
-
z: number;
|
|
141
|
-
};
|
|
142
|
-
type Vec2Tuple = readonly [number?, number?] & {
|
|
143
|
-
x?: number;
|
|
144
|
-
y?: number;
|
|
145
|
-
};
|
|
146
|
-
type Vec3Tuple = readonly [number?, number?, number?] & {
|
|
147
|
-
x?: number;
|
|
148
|
-
y?: number;
|
|
149
|
-
z?: number;
|
|
150
|
-
};
|
|
151
|
-
type Vec2Input = Vec2 | {
|
|
152
|
-
x?: number;
|
|
153
|
-
y?: number;
|
|
154
|
-
} | Vec2Tuple;
|
|
155
|
-
type Vec3Input = Vec3 | {
|
|
156
|
-
x?: number;
|
|
157
|
-
y?: number;
|
|
158
|
-
z?: number;
|
|
159
|
-
} | Vec3Tuple;
|
|
160
|
-
declare const VEC2_ZERO: Readonly<Vec2Components>;
|
|
161
|
-
declare const VEC2_ONE: Readonly<Vec2Components>;
|
|
162
|
-
declare const VEC3_ZERO: Readonly<Vec3Components>;
|
|
163
|
-
declare const VEC3_ONE: Readonly<Vec3Components>;
|
|
164
|
-
declare function normalizeVec2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vec2Components;
|
|
165
|
-
declare function normalizeVec3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vec3Components;
|
|
166
|
-
declare function toThreeVector2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vector2;
|
|
167
|
-
declare function toThreeVector3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vector3;
|
|
168
|
-
|
|
169
|
-
export { type SimulationStepClock as S, type Vec2 as V, type Vec2Components as a, type Vec2Input as b, type Vec3 as c, type Vec3Components as d, type Vec3Input as e, VEC2_ONE as f, VEC2_ZERO as g, VEC3_ONE as h, VEC3_ZERO as i, normalizeVec3 as j, toThreeVector3 as k, SimulationBody as l, normalizeVec2 as n, toThreeVector2 as t };
|
|
130
|
+
export { type SimulationStepClock as S, SimulationBody as a };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Vector3, Vector2 } from 'three';
|
|
2
|
+
|
|
3
|
+
type Vec2 = Vector2;
|
|
4
|
+
type Vec3 = Vector3 | Vec3Components;
|
|
5
|
+
type Vec2Components = {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
};
|
|
9
|
+
type Vec3Components = {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
z: number;
|
|
13
|
+
};
|
|
14
|
+
type Vec2Tuple = readonly [number?, number?] & {
|
|
15
|
+
x?: number;
|
|
16
|
+
y?: number;
|
|
17
|
+
};
|
|
18
|
+
type Vec3Tuple = readonly [number?, number?, number?] & {
|
|
19
|
+
x?: number;
|
|
20
|
+
y?: number;
|
|
21
|
+
z?: number;
|
|
22
|
+
};
|
|
23
|
+
type Vec2Input = Vec2 | {
|
|
24
|
+
x?: number;
|
|
25
|
+
y?: number;
|
|
26
|
+
} | Vec2Tuple;
|
|
27
|
+
type Vec3Input = Vec3 | {
|
|
28
|
+
x?: number;
|
|
29
|
+
y?: number;
|
|
30
|
+
z?: number;
|
|
31
|
+
} | Vec3Tuple;
|
|
32
|
+
declare const VEC2_ZERO: Readonly<Vec2Components>;
|
|
33
|
+
declare const VEC2_ONE: Readonly<Vec2Components>;
|
|
34
|
+
declare const VEC3_ZERO: Readonly<Vec3Components>;
|
|
35
|
+
declare const VEC3_ONE: Readonly<Vec3Components>;
|
|
36
|
+
declare function normalizeVec2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vec2Components;
|
|
37
|
+
declare function normalizeVec3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vec3Components;
|
|
38
|
+
declare function toThreeVector2(input?: Vec2Input | null, defaults?: Vec2Input | Partial<Vec2Components>): Vector2;
|
|
39
|
+
declare function toThreeVector3(input?: Vec3Input | null, defaults?: Vec3Input | Partial<Vec3Components>): Vector3;
|
|
40
|
+
|
|
41
|
+
export { type Vec2 as V, type Vec2Components as a, type Vec2Input as b, type Vec3 as c, type Vec3Components as d, type Vec3Input as e, VEC2_ONE as f, VEC2_ZERO as g, VEC3_ONE as h, VEC3_ZERO as i, normalizeVec3 as j, toThreeVector3 as k, normalizeVec2 as n, toThreeVector2 as t };
|