@daneren2005/shared-memory-physics 1.7.3 → 1.9.0
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/README.md +125 -2
- package/dist/actions/add-physical-world-data.d.ts +2 -0
- package/dist/actions/combine-dynamics-commands.d.ts +2 -0
- package/dist/{systems/dynamics.d.ts → actions/dynamics-commands.d.ts} +1 -7
- package/dist/actions/find-dynamics-command-offset.d.ts +2 -0
- package/dist/actions/find-dynamics-command.d.ts +2 -0
- package/dist/actions/get-spatial-map.d.ts +3 -0
- package/dist/actions/integrate-dynamics.d.ts +3 -0
- package/dist/actions/queue-dynamics-vector.d.ts +2 -0
- package/dist/actions/queue-velocity-assignment.d.ts +2 -0
- package/dist/actions/set-entity-position.d.ts +7 -0
- package/dist/actions/snap-entity.d.ts +9 -0
- package/dist/actions/start-spawn-interpolation.d.ts +16 -0
- package/dist/actions/update-spatial-map.d.ts +3 -0
- package/dist/components/body-component-constants.d.ts +15 -0
- package/dist/components/body-component.d.ts +0 -15
- package/dist/components/bounciness-component-constants.d.ts +2 -0
- package/dist/components/bounciness-component.d.ts +0 -2
- package/dist/components/dynamics-component-constants.d.ts +4 -0
- package/dist/components/dynamics-component.d.ts +0 -4
- package/dist/components/interpolation-component-constants.d.ts +18 -0
- package/dist/components/interpolation-component.d.ts +0 -40
- package/dist/components/navigation-component-constants.d.ts +11 -0
- package/dist/components/navigation-component.d.ts +31 -0
- package/dist/components/polygon-component-constants.d.ts +4 -0
- package/dist/components/polygon-component.d.ts +0 -4
- package/dist/components/registry.d.ts +9 -0
- package/dist/components/transform-component-constants.d.ts +6 -0
- package/dist/components/transform-component.d.ts +0 -6
- package/dist/components/velocity-component-constants.d.ts +4 -0
- package/dist/components/velocity-component.d.ts +0 -4
- package/dist/constants.d.ts +5 -0
- package/dist/index.d.ts +48 -17
- package/dist/index.js +1156 -420
- package/dist/index.js.map +1 -1
- package/dist/pathfinding/follow-path.d.ts +9 -0
- package/dist/pathfinding/grid-a-star.d.ts +29 -0
- package/dist/pathfinding/line-of-sight.d.ts +2 -0
- package/dist/pathfinding/min-heap.d.ts +14 -0
- package/dist/pathfinding/nav-grid.d.ts +42 -0
- package/dist/pathfinding/navigation-state.d.ts +20 -0
- package/dist/pathfinding/path-blockers.d.ts +29 -0
- package/dist/pathfinding/path-search.d.ts +27 -0
- package/dist/pathfinding/pathfinding-system.d.ts +27 -0
- package/dist/pathfinding/pathfinding-update.d.ts +36 -0
- package/dist/pathfinding/smooth-path.d.ts +3 -0
- package/dist/systems/collision.d.ts +1 -2
- package/dist/systems/interpolation-update.d.ts +0 -2
- package/dist/systems/physics-system.d.ts +4 -5
- package/dist/systems/physics-update.d.ts +2 -5
- package/dist/world.d.ts +0 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,72 @@
|
|
|
1
|
+
export { COLLIDABLE_QUERY, DEFAULT_PHYSICS_STEP_MS, POSITION_UPDATED_EVENT } from './constants';
|
|
1
2
|
export { default as transformDefinition } from './components/transform-component';
|
|
2
|
-
export { TRANSFORM_X_INDEX, TRANSFORM_Y_INDEX, TRANSFORM_WIDTH_INDEX, TRANSFORM_HEIGHT_INDEX, TRANSFORM_ANGLE_INDEX, TRANSFORM_SIZE, } from './components/transform-component';
|
|
3
|
+
export { TRANSFORM_X_INDEX, TRANSFORM_Y_INDEX, TRANSFORM_WIDTH_INDEX, TRANSFORM_HEIGHT_INDEX, TRANSFORM_ANGLE_INDEX, TRANSFORM_SIZE, } from './components/transform-component-constants';
|
|
3
4
|
export type { TransformComponent, TransformConfig, TransformSerialization, } from './components/transform-component';
|
|
4
5
|
export { default as velocityDefinition } from './components/velocity-component';
|
|
5
|
-
export { VELOCITY_X_INDEX, VELOCITY_Y_INDEX, VELOCITY_DAMPING_INDEX, VELOCITY_SIZE, } from './components/velocity-component';
|
|
6
|
+
export { VELOCITY_X_INDEX, VELOCITY_Y_INDEX, VELOCITY_DAMPING_INDEX, VELOCITY_SIZE, } from './components/velocity-component-constants';
|
|
6
7
|
export type { VelocityComponent, VelocityConfig, VelocitySerialization, } from './components/velocity-component';
|
|
7
8
|
export { default as dynamicsDefinition } from './components/dynamics-component';
|
|
8
|
-
export { DYNAMICS_ACCELERATION_X_INDEX, DYNAMICS_ACCELERATION_Y_INDEX, DYNAMICS_INVERSE_MASS_INDEX, DYNAMICS_SIZE, } from './components/dynamics-component';
|
|
9
|
+
export { DYNAMICS_ACCELERATION_X_INDEX, DYNAMICS_ACCELERATION_Y_INDEX, DYNAMICS_INVERSE_MASS_INDEX, DYNAMICS_SIZE, } from './components/dynamics-component-constants';
|
|
9
10
|
export type { DynamicsComponent, DynamicsConfig, DynamicsSerialization, } from './components/dynamics-component';
|
|
10
11
|
export { default as bodyDefinition, canCollide, isSensor, isContinuous, blocksPath, isDying, markDying, bodyShape } from './components/body-component';
|
|
11
|
-
export { SHAPE_RECTANGLE, SHAPE_CIRCLE, SHAPE_CAPSULE, SHAPE_POLYGON, DEFAULT_COLLIDE_CATEGORY, DEFAULT_COLLIDE_MASK, BODY_FLAGS_INDEX, BODY_SHAPE_MASK, BODY_SENSOR_FLAG, BODY_CCD_FLAG, BODY_DYING_FLAG, BODY_BLOCKS_PATH_FLAG, BODY_CATEGORY_INDEX, BODY_MASK_INDEX, BODY_SIZE, } from './components/body-component';
|
|
12
|
+
export { SHAPE_RECTANGLE, SHAPE_CIRCLE, SHAPE_CAPSULE, SHAPE_POLYGON, DEFAULT_COLLIDE_CATEGORY, DEFAULT_COLLIDE_MASK, BODY_FLAGS_INDEX, BODY_SHAPE_MASK, BODY_SENSOR_FLAG, BODY_CCD_FLAG, BODY_DYING_FLAG, BODY_BLOCKS_PATH_FLAG, BODY_CATEGORY_INDEX, BODY_MASK_INDEX, BODY_SIZE, } from './components/body-component-constants';
|
|
12
13
|
export type { BodyComponent, BodyConfig, } from './components/body-component';
|
|
13
14
|
export { default as polygonDefinition, preparePolygon } from './components/polygon-component';
|
|
14
|
-
export { MAX_POLYGON_VERTICES, POLYGON_VERTEX_COUNT_INDEX, POLYGON_VERTICES_INDEX, POLYGON_SIZE, } from './components/polygon-component';
|
|
15
|
+
export { MAX_POLYGON_VERTICES, POLYGON_VERTEX_COUNT_INDEX, POLYGON_VERTICES_INDEX, POLYGON_SIZE, } from './components/polygon-component-constants';
|
|
15
16
|
export type { PolygonComponent, PolygonConfig, PolygonVertex, PreparedPolygon } from './components/polygon-component';
|
|
16
17
|
export { default as bouncinessDefinition } from './components/bounciness-component';
|
|
17
|
-
export { BOUNCINESS_INDEX, BOUNCINESS_SIZE, } from './components/bounciness-component';
|
|
18
|
+
export { BOUNCINESS_INDEX, BOUNCINESS_SIZE, } from './components/bounciness-component-constants';
|
|
18
19
|
export type { BouncinessComponent, BouncinessConfig, } from './components/bounciness-component';
|
|
19
|
-
export { default as interpolationDefinition
|
|
20
|
-
export { INTERPOLATION_X_INDEX, INTERPOLATION_Y_INDEX, INTERPOLATION_SYNCED_TICK_INDEX, INTERPOLATION_DURATION_INDEX, INTERPOLATION_TICK_INDEX, INTERPOLATION_TOTAL_DURATION_INDEX, INTERPOLATION_SYNCED_DURATION_INDEX, INTERPOLATION_REMAINING_DURATION_INDEX, INTERPOLATION_TARGET_X_INDEX, INTERPOLATION_TARGET_Y_INDEX, INTERPOLATION_SYNCED_STEP_DURATION_INDEX, INTERPOLATION_CHANNEL_INDEX, INTERPOLATION_PREVIOUS_X_INDEX, INTERPOLATION_PREVIOUS_Y_INDEX, INTERPOLATION_PREVIOUS_DURATION_INDEX, INTERPOLATION_PREVIOUS_TOTAL_DURATION_INDEX, INTERPOLATION_PREVIOUS_TICK_INDEX, INTERPOLATION_SIZE, } from './components/interpolation-component';
|
|
21
|
-
export type { InterpolationComponent, InterpolationConfig,
|
|
22
|
-
export {
|
|
23
|
-
export
|
|
24
|
-
export {
|
|
20
|
+
export { default as interpolationDefinition } from './components/interpolation-component';
|
|
21
|
+
export { INTERPOLATION_X_INDEX, INTERPOLATION_Y_INDEX, INTERPOLATION_SYNCED_TICK_INDEX, INTERPOLATION_DURATION_INDEX, INTERPOLATION_TICK_INDEX, INTERPOLATION_TOTAL_DURATION_INDEX, INTERPOLATION_SYNCED_DURATION_INDEX, INTERPOLATION_REMAINING_DURATION_INDEX, INTERPOLATION_TARGET_X_INDEX, INTERPOLATION_TARGET_Y_INDEX, INTERPOLATION_SYNCED_STEP_DURATION_INDEX, INTERPOLATION_CHANNEL_INDEX, INTERPOLATION_PREVIOUS_X_INDEX, INTERPOLATION_PREVIOUS_Y_INDEX, INTERPOLATION_PREVIOUS_DURATION_INDEX, INTERPOLATION_PREVIOUS_TOTAL_DURATION_INDEX, INTERPOLATION_PREVIOUS_TICK_INDEX, INTERPOLATION_SIZE, } from './components/interpolation-component-constants';
|
|
22
|
+
export type { InterpolationComponent, InterpolationConfig, } from './components/interpolation-component';
|
|
23
|
+
export { default as navigationDefinition, isNavigating, isPathPending, isUnreachable, navigateTo, navigationGoal, requestPath, setNavigationGoal, stopNavigating, waypoint, waypointX, waypointY, writePath, } from './components/navigation-component';
|
|
24
|
+
export { NAVIGATION_REQUEST_INDEX, NAVIGATION_RESULT_INDEX, NAVIGATION_OUTCOME_INDEX, NAVIGATION_WAYPOINT_INDEX, NAVIGATION_WAYPOINT_COUNT_INDEX, NAVIGATION_ACTIVE_INDEX, NAVIGATION_GOAL_X_INDEX, NAVIGATION_GOAL_Y_INDEX, NAVIGATION_WAYPOINTS_INDEX, NAVIGATION_MAX_WAYPOINTS, NAVIGATION_SIZE, } from './components/navigation-component-constants';
|
|
25
|
+
export type { NavigationComponent, NavigationConfig } from './components/navigation-component';
|
|
26
|
+
export { physicsRegistry, navigationRegistry } from './components/registry';
|
|
27
|
+
export type { NavigationComponents, PhysicsComponents, PhysicsUpdateComponents, InterpolationComponents, InterpolationUpdateComponents, } from './components/registry';
|
|
28
|
+
export { default as PhysicalWorld } from './world';
|
|
25
29
|
export type { PhysicalSystemWorld, PhysicalWorldData, PhysicalWorldSource, PhysicalWorldEntity, PhysicalWorldFilter, PhysicalWorldOptions, } from './world';
|
|
26
30
|
export { shapesOverlap, contactNormal, shapeHalfWidth, shapeHalfHeight, shapeIsEmpty, shapeRadius, capsuleHalfLength, capsuleCoreAngle, boundsHalfWidth, boundsHalfHeight, orientedBoxesOverlap, segmentSegmentDistanceSquared, segmentBoxDistanceSquared, pointSegmentDistanceSquared, } from './math/shapes';
|
|
27
31
|
export type { Vector } from './math/shapes';
|
|
28
32
|
export { polygonShapesOverlap, polygonContactNormal } from './math/polygons';
|
|
29
|
-
export { default as CollisionBroadphase
|
|
33
|
+
export { default as CollisionBroadphase } from './systems/collision';
|
|
30
34
|
export type { CollisionComponents, CollisionContact, CollisionEntity, CollisionFunction, MoveResult, MovingEntity, SweepResult } from './systems/collision';
|
|
31
35
|
export { default as SpatialIndex } from './systems/spatial-index';
|
|
32
36
|
export type { SpatialComponents, SpatialEntity, SpatialFilter } from './systems/spatial-index';
|
|
33
|
-
export {
|
|
37
|
+
export { setEntityPosition } from './actions/set-entity-position';
|
|
38
|
+
export { updateSpatialMap } from './actions/update-spatial-map';
|
|
39
|
+
export { getSpatialMap } from './actions/get-spatial-map';
|
|
40
|
+
export { addPhysicalWorldData } from './actions/add-physical-world-data';
|
|
41
|
+
export { snapEntity } from './actions/snap-entity';
|
|
42
|
+
export type { SnappableEntity } from './actions/snap-entity';
|
|
43
|
+
export { startSpawnInterpolation } from './actions/start-spawn-interpolation';
|
|
44
|
+
export type { SpawnableEntity, SpawnInterpolationOptions } from './actions/start-spawn-interpolation';
|
|
45
|
+
export { default as integrateDynamics } from './actions/integrate-dynamics';
|
|
46
|
+
export type { DynamicsCommand, DynamicsCommandBuffer, DynamicsCommandQueue, DynamicsCommands, DynamicsWorld } from './actions/dynamics-commands';
|
|
47
|
+
export { default as physicsUpdate, createPhysicsUpdate } from './systems/physics-update';
|
|
34
48
|
export type { DeathInterpolationEntity, PhysicsCallbackWorld, PhysicsGroupConfig, PhysicsUpdateFunction, PhysicsUpdateMetadata, PhysicsUpdateOptions, PhysicsWorld } from './systems/physics-update';
|
|
35
|
-
export { default as PhysicsSystem
|
|
49
|
+
export { default as PhysicsSystem } from './systems/physics-system';
|
|
36
50
|
export type { PhysicsSystemConfig, VelocityAssignment } from './systems/physics-system';
|
|
37
|
-
export { default as
|
|
38
|
-
export type {
|
|
51
|
+
export { default as NavGrid } from './pathfinding/nav-grid';
|
|
52
|
+
export type { Rect, TileRange } from './pathfinding/nav-grid';
|
|
53
|
+
export { default as GridAStar } from './pathfinding/grid-a-star';
|
|
54
|
+
export type { GridAStarOptions } from './pathfinding/grid-a-star';
|
|
55
|
+
export { default as MinHeap } from './pathfinding/min-heap';
|
|
56
|
+
export { PathStatus } from './pathfinding/path-search';
|
|
57
|
+
export type { PathRequest, PathResult, PathSearch, PathStatusValue, Point } from './pathfinding/path-search';
|
|
58
|
+
export { sweepCost } from './pathfinding/line-of-sight';
|
|
59
|
+
export { smoothPath } from './pathfinding/smooth-path';
|
|
60
|
+
export { FollowStep, followPath } from './pathfinding/follow-path';
|
|
61
|
+
export type { FollowStepValue } from './pathfinding/follow-path';
|
|
62
|
+
export { PATH_BLOCKERS_QUERY, PATH_GATES_QUERY, applyRectChanges, blockerRect, pathBlockerQueries, } from './pathfinding/path-blockers';
|
|
63
|
+
export type { PathBlockerComponents, PathBlockerDelta, PathBlockerQueryOptions } from './pathfinding/path-blockers';
|
|
64
|
+
export { applyPathBlockerChanges, applyPathGateChanges, blockingRects, createNavigationState, navigationGridFor, setNavigationTerrainSpeed, } from './pathfinding/navigation-state';
|
|
65
|
+
export type { NavigationState } from './pathfinding/navigation-state';
|
|
66
|
+
export { DEFAULT_PATH_SEARCH_ITERATION_BUDGET, createPathfindingUpdate, pathfindingUpdate } from './pathfinding/pathfinding-update';
|
|
67
|
+
export type { PathfindingInitData, PathfindingUpdateComponents, PathfindingUpdateFunction, PathfindingUpdateMetadata, PathfindingUpdateOptions, PathfindingWorld, } from './pathfinding/pathfinding-update';
|
|
68
|
+
export { default as PathfindingSystem } from './pathfinding/pathfinding-system';
|
|
69
|
+
export type { PathfindingSystemConfig } from './pathfinding/pathfinding-system';
|
|
39
70
|
export { default as interpolationUpdate } from './systems/interpolation-update';
|
|
40
71
|
export type { InterpolationWorld } from './systems/interpolation-update';
|
|
41
72
|
export { default as InterpolationSystem } from './systems/interpolation-system';
|