@adobe/data 0.9.82 → 0.9.84
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/cache/functions/cached.d.ts +8 -0
- package/dist/cache/functions/cached.js +13 -0
- package/dist/cache/functions/cached.js.map +1 -0
- package/dist/cache/functions/cached.test.d.ts +1 -0
- package/dist/cache/functions/cached.test.js +49 -0
- package/dist/cache/functions/cached.test.js.map +1 -0
- package/dist/cache/functions/index.d.ts +1 -0
- package/dist/cache/functions/index.js +1 -0
- package/dist/cache/functions/index.js.map +1 -1
- package/dist/ecs/archetype/archetype.d.ts +23 -0
- package/dist/ecs/archetype/archetype.js.map +1 -1
- package/dist/ecs/database/concurrency/concurrency-strategy.d.ts +4 -3
- package/dist/ecs/database/create-plugin.d.ts +2 -1
- package/dist/ecs/database/create-plugin.js.map +1 -1
- package/dist/ecs/database/database.d.ts +27 -14
- package/dist/ecs/database/database.index.performance.test.js +32 -25
- package/dist/ecs/database/database.index.performance.test.js.map +1 -1
- package/dist/ecs/database/database.index.type-test.js +25 -0
- package/dist/ecs/database/database.index.type-test.js.map +1 -1
- package/dist/ecs/database/database.js +14 -0
- package/dist/ecs/database/database.js.map +1 -1
- package/dist/ecs/database/database.partition.test.d.ts +1 -0
- package/dist/ecs/database/database.partition.test.js +45 -0
- package/dist/ecs/database/database.partition.test.js.map +1 -0
- package/dist/ecs/database/database.partition.type-test.d.ts +1 -0
- package/dist/ecs/database/database.partition.type-test.js +41 -0
- package/dist/ecs/database/database.partition.type-test.js.map +1 -0
- package/dist/ecs/database/database.reset.test.js +13 -6
- package/dist/ecs/database/database.reset.test.js.map +1 -1
- package/dist/ecs/database/deep-extends-chain.type-test.d.ts +463 -463
- package/dist/ecs/database/facets/archetypes.d.ts +17 -0
- package/dist/ecs/database/facets/archetypes.js +18 -0
- package/dist/ecs/database/facets/archetypes.js.map +1 -0
- package/dist/ecs/database/facets/components.d.ts +17 -0
- package/dist/ecs/database/facets/components.js +18 -0
- package/dist/ecs/database/facets/components.js.map +1 -0
- package/dist/ecs/database/facets/facets.test.d.ts +1 -0
- package/dist/ecs/database/facets/facets.test.js +54 -0
- package/dist/ecs/database/facets/facets.test.js.map +1 -0
- package/dist/ecs/database/facets/resources.d.ts +17 -0
- package/dist/ecs/database/facets/resources.js +18 -0
- package/dist/ecs/database/facets/resources.js.map +1 -0
- package/dist/ecs/database/facets/stamp-scopes.d.ts +46 -0
- package/dist/ecs/database/facets/stamp-scopes.js +26 -0
- package/dist/ecs/database/facets/stamp-scopes.js.map +1 -0
- package/dist/ecs/database/index.d.ts +0 -1
- package/dist/ecs/database/index.js +0 -1
- package/dist/ecs/database/index.js.map +1 -1
- package/dist/ecs/database/observe-select-entities.performance.test.js +12 -4
- package/dist/ecs/database/observe-select-entities.performance.test.js.map +1 -1
- package/dist/ecs/database/observed/observed-database.d.ts +3 -3
- package/dist/ecs/database/reconciling/create-rebase-replay-applier.js +1 -1
- package/dist/ecs/database/reconciling/create-rebase-replay-applier.js.map +1 -1
- package/dist/ecs/database/reconciling/reconciling-entry.d.ts +3 -2
- package/dist/ecs/database/reconciling/reconciling-entry.js.map +1 -1
- package/dist/ecs/database/to-system-database.d.ts +17 -0
- package/dist/ecs/database/to-system-database.js +5 -0
- package/dist/ecs/database/to-system-database.js.map +1 -0
- package/dist/ecs/database/to-system-database.test.d.ts +1 -0
- package/dist/ecs/database/to-system-database.test.js +22 -0
- package/dist/ecs/database/to-system-database.test.js.map +1 -0
- package/dist/ecs/database/transactional-store/coalesce-actions.test.js +13 -4
- package/dist/ecs/database/transactional-store/coalesce-actions.test.js.map +1 -1
- package/dist/ecs/database/transactional-store/create-transactional-store.js.map +1 -1
- package/dist/ecs/database/transactional-store/transactional-store.d.ts +5 -16
- package/dist/ecs/optional-components.d.ts +1 -0
- package/dist/ecs/store/core/core.d.ts +33 -8
- package/dist/ecs/store/core/create-core.d.ts +12 -2
- package/dist/ecs/store/core/create-core.js +144 -22
- package/dist/ecs/store/core/create-core.js.map +1 -1
- package/dist/ecs/store/core/create-core.partition.test.d.ts +1 -0
- package/dist/ecs/store/core/create-core.partition.test.js +229 -0
- package/dist/ecs/store/core/create-core.partition.test.js.map +1 -0
- package/dist/ecs/store/core/select-entities.js +87 -21
- package/dist/ecs/store/core/select-entities.js.map +1 -1
- package/dist/ecs/store/core/select-entities.partition.test.d.ts +1 -0
- package/dist/ecs/store/core/select-entities.partition.test.js +93 -0
- package/dist/ecs/store/core/select-entities.partition.test.js.map +1 -0
- package/dist/ecs/store/entity-select-options.d.ts +5 -1
- package/dist/ecs/store/partition.d.ts +63 -0
- package/dist/ecs/store/partition.js +3 -0
- package/dist/ecs/store/partition.js.map +1 -0
- package/dist/ecs/store/partition.type-test.d.ts +1 -0
- package/dist/ecs/store/partition.type-test.js +15 -0
- package/dist/ecs/store/partition.type-test.js.map +1 -0
- package/dist/ecs/store/public/create-store.d.ts +3 -1
- package/dist/ecs/store/public/create-store.js +19 -50
- package/dist/ecs/store/public/create-store.js.map +1 -1
- package/dist/ecs/store/public/create-store.partition.test.d.ts +1 -0
- package/dist/ecs/store/public/create-store.partition.test.js +111 -0
- package/dist/ecs/store/public/create-store.partition.test.js.map +1 -0
- package/dist/ecs/store/public/create-store.partition.type-test.d.ts +1 -0
- package/dist/ecs/store/public/create-store.partition.type-test.js +61 -0
- package/dist/ecs/store/public/create-store.partition.type-test.js.map +1 -0
- package/dist/ecs/store/store.d.ts +22 -10
- package/dist/ecs/store/store.js.map +1 -1
- package/dist/ecs/store/transaction-functions.d.ts +6 -5
- package/dist/equals-unordered.d.ts +13 -0
- package/dist/equals-unordered.js +64 -0
- package/dist/equals-unordered.js.map +1 -0
- package/dist/equals-unordered.test.d.ts +1 -0
- package/dist/equals-unordered.test.js +35 -0
- package/dist/equals-unordered.test.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/math/line2/interpolate.d.ts +3 -0
- package/dist/math/line2/interpolate.js +7 -0
- package/dist/math/line2/interpolate.js.map +1 -0
- package/dist/math/line2/intersects.d.ts +2 -0
- package/dist/math/line2/intersects.js +29 -0
- package/dist/math/line2/intersects.js.map +1 -0
- package/dist/math/line2/public.d.ts +3 -1
- package/dist/math/line2/public.js +3 -1
- package/dist/math/line2/public.js.map +1 -1
- package/dist/math/line2/sub-line.d.ts +2 -0
- package/dist/math/line2/sub-line.js +9 -0
- package/dist/math/line2/sub-line.js.map +1 -0
- package/dist/math/line3/closest-point-on-line.d.ts +10 -0
- package/dist/math/line3/closest-point-on-line.js +29 -0
- package/dist/math/line3/closest-point-on-line.js.map +1 -0
- package/dist/math/line3/direction.d.ts +7 -0
- package/dist/math/line3/direction.js +12 -0
- package/dist/math/line3/direction.js.map +1 -0
- package/dist/math/line3/interpolate.d.ts +3 -0
- package/dist/math/line3/interpolate.js +7 -0
- package/dist/math/line3/interpolate.js.map +1 -0
- package/dist/math/line3/public.d.ts +4 -1
- package/dist/math/line3/public.js +4 -1
- package/dist/math/line3/public.js.map +1 -1
- package/dist/math/line3/sub-line.d.ts +2 -0
- package/dist/math/line3/sub-line.js +9 -0
- package/dist/math/line3/sub-line.js.map +1 -0
- package/dist/math/mat4x4/add.d.ts +2 -0
- package/dist/math/mat4x4/add.js +8 -0
- package/dist/math/mat4x4/add.js.map +1 -0
- package/dist/math/mat4x4/determinant.d.ts +2 -0
- package/dist/math/mat4x4/determinant.js +18 -0
- package/dist/math/mat4x4/determinant.js.map +1 -0
- package/dist/math/mat4x4/identity.d.ts +2 -0
- package/dist/math/mat4x4/identity.js +8 -0
- package/dist/math/mat4x4/identity.js.map +1 -0
- package/dist/math/mat4x4/inverse.d.ts +2 -0
- package/dist/math/mat4x4/inverse.js +41 -0
- package/dist/math/mat4x4/inverse.js.map +1 -0
- package/dist/math/mat4x4/look-at.d.ts +3 -0
- package/dist/math/mat4x4/look-at.js +23 -0
- package/dist/math/mat4x4/look-at.js.map +1 -0
- package/dist/math/mat4x4/multiply-vec3.d.ts +3 -0
- package/dist/math/mat4x4/multiply-vec3.js +7 -0
- package/dist/math/mat4x4/multiply-vec3.js.map +1 -0
- package/dist/math/mat4x4/multiply-vec4.d.ts +3 -0
- package/dist/math/mat4x4/multiply-vec4.js +8 -0
- package/dist/math/mat4x4/multiply-vec4.js.map +1 -0
- package/dist/math/mat4x4/multiply.d.ts +2 -0
- package/dist/math/mat4x4/multiply.js +15 -0
- package/dist/math/mat4x4/multiply.js.map +1 -0
- package/dist/math/mat4x4/orthographic.d.ts +2 -0
- package/dist/math/mat4x4/orthographic.js +13 -0
- package/dist/math/mat4x4/orthographic.js.map +1 -0
- package/dist/math/mat4x4/perspective.d.ts +2 -0
- package/dist/math/mat4x4/perspective.js +23 -0
- package/dist/math/mat4x4/perspective.js.map +1 -0
- package/dist/math/mat4x4/public.d.ts +19 -1
- package/dist/math/mat4x4/public.js +19 -1
- package/dist/math/mat4x4/public.js.map +1 -1
- package/dist/math/mat4x4/rotation-x.d.ts +2 -0
- package/dist/math/mat4x4/rotation-x.js +12 -0
- package/dist/math/mat4x4/rotation-x.js.map +1 -0
- package/dist/math/mat4x4/rotation-y.d.ts +2 -0
- package/dist/math/mat4x4/rotation-y.js +12 -0
- package/dist/math/mat4x4/rotation-y.js.map +1 -0
- package/dist/math/mat4x4/rotation-z.d.ts +2 -0
- package/dist/math/mat4x4/rotation-z.js +12 -0
- package/dist/math/mat4x4/rotation-z.js.map +1 -0
- package/dist/math/mat4x4/scale.d.ts +2 -0
- package/dist/math/mat4x4/scale.js +8 -0
- package/dist/math/mat4x4/scale.js.map +1 -0
- package/dist/math/mat4x4/scaling.d.ts +2 -0
- package/dist/math/mat4x4/scaling.js +8 -0
- package/dist/math/mat4x4/scaling.js.map +1 -0
- package/dist/math/mat4x4/subtract.d.ts +2 -0
- package/dist/math/mat4x4/subtract.js +8 -0
- package/dist/math/mat4x4/subtract.js.map +1 -0
- package/dist/math/mat4x4/translation.d.ts +2 -0
- package/dist/math/mat4x4/translation.js +8 -0
- package/dist/math/mat4x4/translation.js.map +1 -0
- package/dist/math/mat4x4/transpose.d.ts +2 -0
- package/dist/math/mat4x4/transpose.js +8 -0
- package/dist/math/mat4x4/transpose.js.map +1 -0
- package/dist/math/mat4x4/zero.d.ts +2 -0
- package/dist/math/mat4x4/zero.js +8 -0
- package/dist/math/mat4x4/zero.js.map +1 -0
- package/dist/math/plane/contains-point.d.ts +3 -0
- package/dist/math/plane/contains-point.js +5 -0
- package/dist/math/plane/contains-point.js.map +1 -0
- package/dist/math/plane/distance.d.ts +3 -0
- package/dist/math/plane/distance.js +4 -0
- package/dist/math/plane/distance.js.map +1 -0
- package/dist/math/plane/is-point-behind.d.ts +3 -0
- package/dist/math/plane/is-point-behind.js +4 -0
- package/dist/math/plane/is-point-behind.js.map +1 -0
- package/dist/math/plane/is-point-in-front.d.ts +3 -0
- package/dist/math/plane/is-point-in-front.js +4 -0
- package/dist/math/plane/is-point-in-front.js.map +1 -0
- package/dist/math/plane/is.d.ts +2 -0
- package/dist/math/plane/is.js +5 -0
- package/dist/math/plane/is.js.map +1 -0
- package/dist/math/plane/line-intersection.d.ts +9 -0
- package/dist/math/plane/line-intersection.js +26 -0
- package/dist/math/plane/line-intersection.js.map +1 -0
- package/dist/math/plane/public.d.ts +7 -1
- package/dist/math/plane/public.js +7 -1
- package/dist/math/plane/public.js.map +1 -1
- package/dist/math/plane/signed-distance.d.ts +3 -0
- package/dist/math/plane/signed-distance.js +4 -0
- package/dist/math/plane/signed-distance.js.map +1 -0
- package/dist/math/quat/add.d.ts +2 -0
- package/dist/math/quat/add.js +8 -0
- package/dist/math/quat/add.js.map +1 -0
- package/dist/math/quat/align-to.d.ts +12 -0
- package/dist/math/quat/align-to.js +43 -0
- package/dist/math/quat/align-to.js.map +1 -0
- package/dist/math/quat/conjugate.d.ts +2 -0
- package/dist/math/quat/conjugate.js +3 -0
- package/dist/math/quat/conjugate.js.map +1 -0
- package/dist/math/quat/distance.d.ts +2 -0
- package/dist/math/quat/distance.js +5 -0
- package/dist/math/quat/distance.js.map +1 -0
- package/dist/math/quat/dot.d.ts +2 -0
- package/dist/math/quat/dot.js +3 -0
- package/dist/math/quat/dot.js.map +1 -0
- package/dist/math/quat/from-axis-angle.d.ts +3 -0
- package/dist/math/quat/from-axis-angle.js +14 -0
- package/dist/math/quat/from-axis-angle.js.map +1 -0
- package/dist/math/quat/from-euler.d.ts +2 -0
- package/dist/math/quat/from-euler.js +16 -0
- package/dist/math/quat/from-euler.js.map +1 -0
- package/dist/math/quat/identity.d.ts +2 -0
- package/dist/math/quat/identity.js +3 -0
- package/dist/math/quat/identity.js.map +1 -0
- package/dist/math/quat/inverse.d.ts +2 -0
- package/dist/math/quat/inverse.js +11 -0
- package/dist/math/quat/inverse.js.map +1 -0
- package/dist/math/quat/length-squared.d.ts +2 -0
- package/dist/math/quat/length-squared.js +3 -0
- package/dist/math/quat/length-squared.js.map +1 -0
- package/dist/math/quat/length.d.ts +2 -0
- package/dist/math/quat/length.js +3 -0
- package/dist/math/quat/length.js.map +1 -0
- package/dist/math/quat/lerp.d.ts +2 -0
- package/dist/math/quat/lerp.js +8 -0
- package/dist/math/quat/lerp.js.map +1 -0
- package/dist/math/quat/look-at.d.ts +3 -0
- package/dist/math/quat/look-at.js +49 -0
- package/dist/math/quat/look-at.js.map +1 -0
- package/dist/math/quat/multiply.d.ts +2 -0
- package/dist/math/quat/multiply.js +8 -0
- package/dist/math/quat/multiply.js.map +1 -0
- package/dist/math/quat/negate.d.ts +2 -0
- package/dist/math/quat/negate.js +3 -0
- package/dist/math/quat/negate.js.map +1 -0
- package/dist/math/quat/normalize.d.ts +2 -0
- package/dist/math/quat/normalize.js +8 -0
- package/dist/math/quat/normalize.js.map +1 -0
- package/dist/math/quat/public.d.ts +23 -1
- package/dist/math/quat/public.js +23 -1
- package/dist/math/quat/public.js.map +1 -1
- package/dist/math/quat/rotate-vec3.d.ts +3 -0
- package/dist/math/quat/rotate-vec3.js +15 -0
- package/dist/math/quat/rotate-vec3.js.map +1 -0
- package/dist/math/quat/scale.d.ts +2 -0
- package/dist/math/quat/scale.js +3 -0
- package/dist/math/quat/scale.js.map +1 -0
- package/dist/math/quat/schema.js +1 -1
- package/dist/math/quat/schema.js.map +1 -1
- package/dist/math/quat/slerp.d.ts +2 -0
- package/dist/math/quat/slerp.js +22 -0
- package/dist/math/quat/slerp.js.map +1 -0
- package/dist/math/quat/subtract.d.ts +2 -0
- package/dist/math/quat/subtract.js +8 -0
- package/dist/math/quat/subtract.js.map +1 -0
- package/dist/math/quat/to-axis-angle.d.ts +6 -0
- package/dist/math/quat/to-axis-angle.js +13 -0
- package/dist/math/quat/to-axis-angle.js.map +1 -0
- package/dist/math/quat/to-euler.d.ts +3 -0
- package/dist/math/quat/to-euler.js +22 -0
- package/dist/math/quat/to-euler.js.map +1 -0
- package/dist/math/quat/to-mat4.d.ts +8 -0
- package/dist/math/quat/to-mat4.js +25 -0
- package/dist/math/quat/to-mat4.js.map +1 -0
- package/dist/math/vec2/f32/abs.d.ts +2 -0
- package/dist/math/vec2/f32/abs.js +3 -0
- package/dist/math/vec2/f32/abs.js.map +1 -0
- package/dist/math/vec2/f32/acos.d.ts +2 -0
- package/dist/math/vec2/f32/acos.js +3 -0
- package/dist/math/vec2/f32/acos.js.map +1 -0
- package/dist/math/vec2/f32/acosh.d.ts +2 -0
- package/dist/math/vec2/f32/acosh.js +3 -0
- package/dist/math/vec2/f32/acosh.js.map +1 -0
- package/dist/math/vec2/f32/add.d.ts +2 -0
- package/dist/math/vec2/f32/add.js +3 -0
- package/dist/math/vec2/f32/add.js.map +1 -0
- package/dist/math/vec2/f32/asin.d.ts +2 -0
- package/dist/math/vec2/f32/asin.js +3 -0
- package/dist/math/vec2/f32/asin.js.map +1 -0
- package/dist/math/vec2/f32/asinh.d.ts +2 -0
- package/dist/math/vec2/f32/asinh.js +3 -0
- package/dist/math/vec2/f32/asinh.js.map +1 -0
- package/dist/math/vec2/f32/atan.d.ts +2 -0
- package/dist/math/vec2/f32/atan.js +3 -0
- package/dist/math/vec2/f32/atan.js.map +1 -0
- package/dist/math/vec2/f32/atanh.d.ts +2 -0
- package/dist/math/vec2/f32/atanh.js +3 -0
- package/dist/math/vec2/f32/atanh.js.map +1 -0
- package/dist/math/vec2/f32/ceil.d.ts +2 -0
- package/dist/math/vec2/f32/ceil.js +3 -0
- package/dist/math/vec2/f32/ceil.js.map +1 -0
- package/dist/math/vec2/f32/clamp.d.ts +2 -0
- package/dist/math/vec2/f32/clamp.js +5 -0
- package/dist/math/vec2/f32/clamp.js.map +1 -0
- package/dist/math/vec2/f32/cos.d.ts +2 -0
- package/dist/math/vec2/f32/cos.js +3 -0
- package/dist/math/vec2/f32/cos.js.map +1 -0
- package/dist/math/vec2/f32/cosh.d.ts +2 -0
- package/dist/math/vec2/f32/cosh.js +3 -0
- package/dist/math/vec2/f32/cosh.js.map +1 -0
- package/dist/math/vec2/f32/distance.d.ts +2 -0
- package/dist/math/vec2/f32/distance.js +5 -0
- package/dist/math/vec2/f32/distance.js.map +1 -0
- package/dist/math/vec2/f32/dot.d.ts +2 -0
- package/dist/math/vec2/f32/dot.js +3 -0
- package/dist/math/vec2/f32/dot.js.map +1 -0
- package/dist/math/vec2/f32/equals.d.ts +2 -0
- package/dist/math/vec2/f32/equals.js +3 -0
- package/dist/math/vec2/f32/equals.js.map +1 -0
- package/dist/math/vec2/f32/exp.d.ts +2 -0
- package/dist/math/vec2/f32/exp.js +3 -0
- package/dist/math/vec2/f32/exp.js.map +1 -0
- package/dist/math/vec2/f32/exp2.d.ts +2 -0
- package/dist/math/vec2/f32/exp2.js +3 -0
- package/dist/math/vec2/f32/exp2.js.map +1 -0
- package/dist/math/vec2/f32/faceforward.d.ts +2 -0
- package/dist/math/vec2/f32/faceforward.js +5 -0
- package/dist/math/vec2/f32/faceforward.js.map +1 -0
- package/dist/math/vec2/f32/floor.d.ts +2 -0
- package/dist/math/vec2/f32/floor.js +3 -0
- package/dist/math/vec2/f32/floor.js.map +1 -0
- package/dist/math/vec2/f32/fract.d.ts +2 -0
- package/dist/math/vec2/f32/fract.js +3 -0
- package/dist/math/vec2/f32/fract.js.map +1 -0
- package/dist/math/vec2/f32/length.d.ts +2 -0
- package/dist/math/vec2/f32/length.js +3 -0
- package/dist/math/vec2/f32/length.js.map +1 -0
- package/dist/math/vec2/f32/log.d.ts +2 -0
- package/dist/math/vec2/f32/log.js +3 -0
- package/dist/math/vec2/f32/log.js.map +1 -0
- package/dist/math/vec2/f32/log2.d.ts +2 -0
- package/dist/math/vec2/f32/log2.js +3 -0
- package/dist/math/vec2/f32/log2.js.map +1 -0
- package/dist/math/vec2/f32/max.d.ts +2 -0
- package/dist/math/vec2/f32/max.js +3 -0
- package/dist/math/vec2/f32/max.js.map +1 -0
- package/dist/math/vec2/f32/min.d.ts +2 -0
- package/dist/math/vec2/f32/min.js +3 -0
- package/dist/math/vec2/f32/min.js.map +1 -0
- package/dist/math/vec2/f32/mix.d.ts +2 -0
- package/dist/math/vec2/f32/mix.js +6 -0
- package/dist/math/vec2/f32/mix.js.map +1 -0
- package/dist/math/vec2/f32/mod.d.ts +2 -0
- package/dist/math/vec2/f32/mod.js +6 -0
- package/dist/math/vec2/f32/mod.js.map +1 -0
- package/dist/math/vec2/f32/modf.d.ts +5 -0
- package/dist/math/vec2/f32/modf.js +6 -0
- package/dist/math/vec2/f32/modf.js.map +1 -0
- package/dist/math/vec2/f32/negate.d.ts +2 -0
- package/dist/math/vec2/f32/negate.js +3 -0
- package/dist/math/vec2/f32/negate.js.map +1 -0
- package/dist/math/vec2/f32/normalize.d.ts +2 -0
- package/dist/math/vec2/f32/normalize.js +8 -0
- package/dist/math/vec2/f32/normalize.js.map +1 -0
- package/dist/math/vec2/f32/pow.d.ts +2 -0
- package/dist/math/vec2/f32/pow.js +6 -0
- package/dist/math/vec2/f32/pow.js.map +1 -0
- package/dist/math/vec2/f32/public.d.ts +46 -1
- package/dist/math/vec2/f32/public.js +46 -1
- package/dist/math/vec2/f32/public.js.map +1 -1
- package/dist/math/vec2/f32/reflect.d.ts +2 -0
- package/dist/math/vec2/f32/reflect.js +9 -0
- package/dist/math/vec2/f32/reflect.js.map +1 -0
- package/dist/math/vec2/f32/refract.d.ts +2 -0
- package/dist/math/vec2/f32/refract.js +14 -0
- package/dist/math/vec2/f32/refract.js.map +1 -0
- package/dist/math/vec2/f32/round.d.ts +2 -0
- package/dist/math/vec2/f32/round.js +3 -0
- package/dist/math/vec2/f32/round.js.map +1 -0
- package/dist/math/vec2/f32/scale.d.ts +2 -0
- package/dist/math/vec2/f32/scale.js +3 -0
- package/dist/math/vec2/f32/scale.js.map +1 -0
- package/dist/math/vec2/f32/sign.d.ts +2 -0
- package/dist/math/vec2/f32/sign.js +3 -0
- package/dist/math/vec2/f32/sign.js.map +1 -0
- package/dist/math/vec2/f32/sin.d.ts +2 -0
- package/dist/math/vec2/f32/sin.js +3 -0
- package/dist/math/vec2/f32/sin.js.map +1 -0
- package/dist/math/vec2/f32/sinh.d.ts +2 -0
- package/dist/math/vec2/f32/sinh.js +3 -0
- package/dist/math/vec2/f32/sinh.js.map +1 -0
- package/dist/math/vec2/f32/smoothstep.d.ts +2 -0
- package/dist/math/vec2/f32/smoothstep.js +7 -0
- package/dist/math/vec2/f32/smoothstep.js.map +1 -0
- package/dist/math/vec2/f32/sqrt.d.ts +2 -0
- package/dist/math/vec2/f32/sqrt.js +3 -0
- package/dist/math/vec2/f32/sqrt.js.map +1 -0
- package/dist/math/vec2/f32/step.d.ts +2 -0
- package/dist/math/vec2/f32/step.js +6 -0
- package/dist/math/vec2/f32/step.js.map +1 -0
- package/dist/math/vec2/f32/subtract.d.ts +2 -0
- package/dist/math/vec2/f32/subtract.js +3 -0
- package/dist/math/vec2/f32/subtract.js.map +1 -0
- package/dist/math/vec2/f32/tan.d.ts +2 -0
- package/dist/math/vec2/f32/tan.js +3 -0
- package/dist/math/vec2/f32/tan.js.map +1 -0
- package/dist/math/vec2/f32/tanh.d.ts +2 -0
- package/dist/math/vec2/f32/tanh.js +3 -0
- package/dist/math/vec2/f32/tanh.js.map +1 -0
- package/dist/math/vec2/f32/trunc.d.ts +2 -0
- package/dist/math/vec2/f32/trunc.js +3 -0
- package/dist/math/vec2/f32/trunc.js.map +1 -0
- package/dist/math/vec2/f32/zero.d.ts +2 -0
- package/dist/math/vec2/f32/zero.js +3 -0
- package/dist/math/vec2/f32/zero.js.map +1 -0
- package/dist/math/vec2/i32/abs.d.ts +2 -0
- package/dist/math/vec2/i32/abs.js +3 -0
- package/dist/math/vec2/i32/abs.js.map +1 -0
- package/dist/math/vec2/i32/add.d.ts +2 -0
- package/dist/math/vec2/i32/add.js +3 -0
- package/dist/math/vec2/i32/add.js.map +1 -0
- package/dist/math/vec2/i32/bitwise-and.d.ts +2 -0
- package/dist/math/vec2/i32/bitwise-and.js +3 -0
- package/dist/math/vec2/i32/bitwise-and.js.map +1 -0
- package/dist/math/vec2/i32/bitwise-not.d.ts +2 -0
- package/dist/math/vec2/i32/bitwise-not.js +3 -0
- package/dist/math/vec2/i32/bitwise-not.js.map +1 -0
- package/dist/math/vec2/i32/bitwise-or.d.ts +2 -0
- package/dist/math/vec2/i32/bitwise-or.js +3 -0
- package/dist/math/vec2/i32/bitwise-or.js.map +1 -0
- package/dist/math/vec2/i32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec2/i32/bitwise-xor.js +3 -0
- package/dist/math/vec2/i32/bitwise-xor.js.map +1 -0
- package/dist/math/vec2/i32/clamp.d.ts +2 -0
- package/dist/math/vec2/i32/clamp.js +5 -0
- package/dist/math/vec2/i32/clamp.js.map +1 -0
- package/dist/math/vec2/i32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec2/i32/count-leading-zeros.js +7 -0
- package/dist/math/vec2/i32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec2/i32/count-one-bits.d.ts +2 -0
- package/dist/math/vec2/i32/count-one-bits.js +7 -0
- package/dist/math/vec2/i32/count-one-bits.js.map +1 -0
- package/dist/math/vec2/i32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec2/i32/count-trailing-zeros.js +7 -0
- package/dist/math/vec2/i32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec2/i32/equals.d.ts +2 -0
- package/dist/math/vec2/i32/equals.js +3 -0
- package/dist/math/vec2/i32/equals.js.map +1 -0
- package/dist/math/vec2/i32/max.d.ts +2 -0
- package/dist/math/vec2/i32/max.js +3 -0
- package/dist/math/vec2/i32/max.js.map +1 -0
- package/dist/math/vec2/i32/min.d.ts +2 -0
- package/dist/math/vec2/i32/min.js +3 -0
- package/dist/math/vec2/i32/min.js.map +1 -0
- package/dist/math/vec2/i32/negate.d.ts +2 -0
- package/dist/math/vec2/i32/negate.js +3 -0
- package/dist/math/vec2/i32/negate.js.map +1 -0
- package/dist/math/vec2/i32/public.d.ts +20 -1
- package/dist/math/vec2/i32/public.js +20 -1
- package/dist/math/vec2/i32/public.js.map +1 -1
- package/dist/math/vec2/i32/reverse-bits.d.ts +2 -0
- package/dist/math/vec2/i32/reverse-bits.js +7 -0
- package/dist/math/vec2/i32/reverse-bits.js.map +1 -0
- package/dist/math/vec2/i32/scale.d.ts +2 -0
- package/dist/math/vec2/i32/scale.js +3 -0
- package/dist/math/vec2/i32/scale.js.map +1 -0
- package/dist/math/vec2/i32/shift-left.d.ts +2 -0
- package/dist/math/vec2/i32/shift-left.js +3 -0
- package/dist/math/vec2/i32/shift-left.js.map +1 -0
- package/dist/math/vec2/i32/shift-right.d.ts +2 -0
- package/dist/math/vec2/i32/shift-right.js +7 -0
- package/dist/math/vec2/i32/shift-right.js.map +1 -0
- package/dist/math/vec2/i32/subtract.d.ts +2 -0
- package/dist/math/vec2/i32/subtract.js +3 -0
- package/dist/math/vec2/i32/subtract.js.map +1 -0
- package/dist/math/vec2/i32/zero.d.ts +2 -0
- package/dist/math/vec2/i32/zero.js +3 -0
- package/dist/math/vec2/i32/zero.js.map +1 -0
- package/dist/math/vec2/public.d.ts +1 -1
- package/dist/math/vec2/public.js +1 -1
- package/dist/math/vec2/public.js.map +1 -1
- package/dist/math/vec2/u32/add.d.ts +2 -0
- package/dist/math/vec2/u32/add.js +6 -0
- package/dist/math/vec2/u32/add.js.map +1 -0
- package/dist/math/vec2/u32/bitwise-and.d.ts +2 -0
- package/dist/math/vec2/u32/bitwise-and.js +6 -0
- package/dist/math/vec2/u32/bitwise-and.js.map +1 -0
- package/dist/math/vec2/u32/bitwise-not.d.ts +2 -0
- package/dist/math/vec2/u32/bitwise-not.js +3 -0
- package/dist/math/vec2/u32/bitwise-not.js.map +1 -0
- package/dist/math/vec2/u32/bitwise-or.d.ts +2 -0
- package/dist/math/vec2/u32/bitwise-or.js +6 -0
- package/dist/math/vec2/u32/bitwise-or.js.map +1 -0
- package/dist/math/vec2/u32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec2/u32/bitwise-xor.js +6 -0
- package/dist/math/vec2/u32/bitwise-xor.js.map +1 -0
- package/dist/math/vec2/u32/clamp.d.ts +2 -0
- package/dist/math/vec2/u32/clamp.js +5 -0
- package/dist/math/vec2/u32/clamp.js.map +1 -0
- package/dist/math/vec2/u32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec2/u32/count-leading-zeros.js +7 -0
- package/dist/math/vec2/u32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec2/u32/count-one-bits.d.ts +2 -0
- package/dist/math/vec2/u32/count-one-bits.js +7 -0
- package/dist/math/vec2/u32/count-one-bits.js.map +1 -0
- package/dist/math/vec2/u32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec2/u32/count-trailing-zeros.js +7 -0
- package/dist/math/vec2/u32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec2/u32/equals.d.ts +2 -0
- package/dist/math/vec2/u32/equals.js +3 -0
- package/dist/math/vec2/u32/equals.js.map +1 -0
- package/dist/math/vec2/u32/max.d.ts +2 -0
- package/dist/math/vec2/u32/max.js +6 -0
- package/dist/math/vec2/u32/max.js.map +1 -0
- package/dist/math/vec2/u32/min.d.ts +2 -0
- package/dist/math/vec2/u32/min.js +6 -0
- package/dist/math/vec2/u32/min.js.map +1 -0
- package/dist/math/vec2/u32/negate.d.ts +2 -0
- package/dist/math/vec2/u32/negate.js +3 -0
- package/dist/math/vec2/u32/negate.js.map +1 -0
- package/dist/math/vec2/u32/public.d.ts +19 -1
- package/dist/math/vec2/u32/public.js +19 -1
- package/dist/math/vec2/u32/public.js.map +1 -1
- package/dist/math/vec2/u32/reverse-bits.d.ts +2 -0
- package/dist/math/vec2/u32/reverse-bits.js +7 -0
- package/dist/math/vec2/u32/reverse-bits.js.map +1 -0
- package/dist/math/vec2/u32/scale.d.ts +2 -0
- package/dist/math/vec2/u32/scale.js +3 -0
- package/dist/math/vec2/u32/scale.js.map +1 -0
- package/dist/math/vec2/u32/shift-left.d.ts +2 -0
- package/dist/math/vec2/u32/shift-left.js +3 -0
- package/dist/math/vec2/u32/shift-left.js.map +1 -0
- package/dist/math/vec2/u32/shift-right.d.ts +2 -0
- package/dist/math/vec2/u32/shift-right.js +7 -0
- package/dist/math/vec2/u32/shift-right.js.map +1 -0
- package/dist/math/vec2/u32/subtract.d.ts +2 -0
- package/dist/math/vec2/u32/subtract.js +6 -0
- package/dist/math/vec2/u32/subtract.js.map +1 -0
- package/dist/math/vec2/u32/zero.d.ts +2 -0
- package/dist/math/vec2/u32/zero.js +3 -0
- package/dist/math/vec2/u32/zero.js.map +1 -0
- package/dist/math/vec3/f32/abs.d.ts +2 -0
- package/dist/math/vec3/f32/abs.js +3 -0
- package/dist/math/vec3/f32/abs.js.map +1 -0
- package/dist/math/vec3/f32/acos.d.ts +2 -0
- package/dist/math/vec3/f32/acos.js +3 -0
- package/dist/math/vec3/f32/acos.js.map +1 -0
- package/dist/math/vec3/f32/acosh.d.ts +2 -0
- package/dist/math/vec3/f32/acosh.js +3 -0
- package/dist/math/vec3/f32/acosh.js.map +1 -0
- package/dist/math/vec3/f32/add.d.ts +2 -0
- package/dist/math/vec3/f32/add.js +7 -0
- package/dist/math/vec3/f32/add.js.map +1 -0
- package/dist/math/vec3/f32/asin.d.ts +2 -0
- package/dist/math/vec3/f32/asin.js +3 -0
- package/dist/math/vec3/f32/asin.js.map +1 -0
- package/dist/math/vec3/f32/asinh.d.ts +2 -0
- package/dist/math/vec3/f32/asinh.js +3 -0
- package/dist/math/vec3/f32/asinh.js.map +1 -0
- package/dist/math/vec3/f32/atan.d.ts +2 -0
- package/dist/math/vec3/f32/atan.js +3 -0
- package/dist/math/vec3/f32/atan.js.map +1 -0
- package/dist/math/vec3/f32/atanh.d.ts +2 -0
- package/dist/math/vec3/f32/atanh.js +3 -0
- package/dist/math/vec3/f32/atanh.js.map +1 -0
- package/dist/math/vec3/f32/ceil.d.ts +2 -0
- package/dist/math/vec3/f32/ceil.js +3 -0
- package/dist/math/vec3/f32/ceil.js.map +1 -0
- package/dist/math/vec3/f32/clamp.d.ts +2 -0
- package/dist/math/vec3/f32/clamp.js +5 -0
- package/dist/math/vec3/f32/clamp.js.map +1 -0
- package/dist/math/vec3/f32/cos.d.ts +2 -0
- package/dist/math/vec3/f32/cos.js +3 -0
- package/dist/math/vec3/f32/cos.js.map +1 -0
- package/dist/math/vec3/f32/cosh.d.ts +2 -0
- package/dist/math/vec3/f32/cosh.js +3 -0
- package/dist/math/vec3/f32/cosh.js.map +1 -0
- package/dist/math/vec3/f32/cross.d.ts +2 -0
- package/dist/math/vec3/f32/cross.js +7 -0
- package/dist/math/vec3/f32/cross.js.map +1 -0
- package/dist/math/vec3/f32/distance-squared.d.ts +2 -0
- package/dist/math/vec3/f32/distance-squared.js +8 -0
- package/dist/math/vec3/f32/distance-squared.js.map +1 -0
- package/dist/math/vec3/f32/distance.d.ts +2 -0
- package/dist/math/vec3/f32/distance.js +5 -0
- package/dist/math/vec3/f32/distance.js.map +1 -0
- package/dist/math/vec3/f32/dot.d.ts +2 -0
- package/dist/math/vec3/f32/dot.js +3 -0
- package/dist/math/vec3/f32/dot.js.map +1 -0
- package/dist/math/vec3/f32/equals.d.ts +2 -0
- package/dist/math/vec3/f32/equals.js +3 -0
- package/dist/math/vec3/f32/equals.js.map +1 -0
- package/dist/math/vec3/f32/exp.d.ts +2 -0
- package/dist/math/vec3/f32/exp.js +3 -0
- package/dist/math/vec3/f32/exp.js.map +1 -0
- package/dist/math/vec3/f32/exp2.d.ts +2 -0
- package/dist/math/vec3/f32/exp2.js +3 -0
- package/dist/math/vec3/f32/exp2.js.map +1 -0
- package/dist/math/vec3/f32/faceforward.d.ts +2 -0
- package/dist/math/vec3/f32/faceforward.js +5 -0
- package/dist/math/vec3/f32/faceforward.js.map +1 -0
- package/dist/math/vec3/f32/floor.d.ts +2 -0
- package/dist/math/vec3/f32/floor.js +3 -0
- package/dist/math/vec3/f32/floor.js.map +1 -0
- package/dist/math/vec3/f32/fract.d.ts +2 -0
- package/dist/math/vec3/f32/fract.js +7 -0
- package/dist/math/vec3/f32/fract.js.map +1 -0
- package/dist/math/vec3/f32/length-squared.d.ts +2 -0
- package/dist/math/vec3/f32/length-squared.js +3 -0
- package/dist/math/vec3/f32/length-squared.js.map +1 -0
- package/dist/math/vec3/f32/length.d.ts +2 -0
- package/dist/math/vec3/f32/length.js +3 -0
- package/dist/math/vec3/f32/length.js.map +1 -0
- package/dist/math/vec3/f32/log.d.ts +2 -0
- package/dist/math/vec3/f32/log.js +3 -0
- package/dist/math/vec3/f32/log.js.map +1 -0
- package/dist/math/vec3/f32/log2.d.ts +2 -0
- package/dist/math/vec3/f32/log2.js +3 -0
- package/dist/math/vec3/f32/log2.js.map +1 -0
- package/dist/math/vec3/f32/max.d.ts +2 -0
- package/dist/math/vec3/f32/max.js +7 -0
- package/dist/math/vec3/f32/max.js.map +1 -0
- package/dist/math/vec3/f32/min.d.ts +2 -0
- package/dist/math/vec3/f32/min.js +7 -0
- package/dist/math/vec3/f32/min.js.map +1 -0
- package/dist/math/vec3/f32/mix.d.ts +2 -0
- package/dist/math/vec3/f32/mix.js +7 -0
- package/dist/math/vec3/f32/mix.js.map +1 -0
- package/dist/math/vec3/f32/mod.d.ts +2 -0
- package/dist/math/vec3/f32/mod.js +7 -0
- package/dist/math/vec3/f32/mod.js.map +1 -0
- package/dist/math/vec3/f32/modf.d.ts +5 -0
- package/dist/math/vec3/f32/modf.js +6 -0
- package/dist/math/vec3/f32/modf.js.map +1 -0
- package/dist/math/vec3/f32/multiply.d.ts +5 -0
- package/dist/math/vec3/f32/multiply.js +10 -0
- package/dist/math/vec3/f32/multiply.js.map +1 -0
- package/dist/math/vec3/f32/negate.d.ts +2 -0
- package/dist/math/vec3/f32/negate.js +3 -0
- package/dist/math/vec3/f32/negate.js.map +1 -0
- package/dist/math/vec3/f32/normalize.d.ts +2 -0
- package/dist/math/vec3/f32/normalize.js +8 -0
- package/dist/math/vec3/f32/normalize.js.map +1 -0
- package/dist/math/vec3/f32/one.d.ts +2 -0
- package/dist/math/vec3/f32/one.js +3 -0
- package/dist/math/vec3/f32/one.js.map +1 -0
- package/dist/math/vec3/f32/pow.d.ts +2 -0
- package/dist/math/vec3/f32/pow.js +7 -0
- package/dist/math/vec3/f32/pow.js.map +1 -0
- package/dist/math/vec3/f32/public.d.ts +52 -1
- package/dist/math/vec3/f32/public.js +52 -1
- package/dist/math/vec3/f32/public.js.map +1 -1
- package/dist/math/vec3/f32/random.d.ts +2 -0
- package/dist/math/vec3/f32/random.js +5 -0
- package/dist/math/vec3/f32/random.js.map +1 -0
- package/dist/math/vec3/f32/reflect.d.ts +2 -0
- package/dist/math/vec3/f32/reflect.js +9 -0
- package/dist/math/vec3/f32/reflect.js.map +1 -0
- package/dist/math/vec3/f32/refract.d.ts +2 -0
- package/dist/math/vec3/f32/refract.js +14 -0
- package/dist/math/vec3/f32/refract.js.map +1 -0
- package/dist/math/vec3/f32/round.d.ts +2 -0
- package/dist/math/vec3/f32/round.js +3 -0
- package/dist/math/vec3/f32/round.js.map +1 -0
- package/dist/math/vec3/f32/scale.d.ts +2 -0
- package/dist/math/vec3/f32/scale.js +3 -0
- package/dist/math/vec3/f32/scale.js.map +1 -0
- package/dist/math/vec3/f32/sign.d.ts +2 -0
- package/dist/math/vec3/f32/sign.js +3 -0
- package/dist/math/vec3/f32/sign.js.map +1 -0
- package/dist/math/vec3/f32/sin.d.ts +2 -0
- package/dist/math/vec3/f32/sin.js +3 -0
- package/dist/math/vec3/f32/sin.js.map +1 -0
- package/dist/math/vec3/f32/sinh.d.ts +2 -0
- package/dist/math/vec3/f32/sinh.js +3 -0
- package/dist/math/vec3/f32/sinh.js.map +1 -0
- package/dist/math/vec3/f32/smoothstep.d.ts +2 -0
- package/dist/math/vec3/f32/smoothstep.js +12 -0
- package/dist/math/vec3/f32/smoothstep.js.map +1 -0
- package/dist/math/vec3/f32/sqrt.d.ts +2 -0
- package/dist/math/vec3/f32/sqrt.js +3 -0
- package/dist/math/vec3/f32/sqrt.js.map +1 -0
- package/dist/math/vec3/f32/step.d.ts +2 -0
- package/dist/math/vec3/f32/step.js +7 -0
- package/dist/math/vec3/f32/step.js.map +1 -0
- package/dist/math/vec3/f32/subtract.d.ts +2 -0
- package/dist/math/vec3/f32/subtract.js +7 -0
- package/dist/math/vec3/f32/subtract.js.map +1 -0
- package/dist/math/vec3/f32/tan.d.ts +2 -0
- package/dist/math/vec3/f32/tan.js +3 -0
- package/dist/math/vec3/f32/tan.js.map +1 -0
- package/dist/math/vec3/f32/tanh.d.ts +2 -0
- package/dist/math/vec3/f32/tanh.js +3 -0
- package/dist/math/vec3/f32/tanh.js.map +1 -0
- package/dist/math/vec3/f32/trunc.d.ts +2 -0
- package/dist/math/vec3/f32/trunc.js +3 -0
- package/dist/math/vec3/f32/trunc.js.map +1 -0
- package/dist/math/vec3/f32/zero.d.ts +2 -0
- package/dist/math/vec3/f32/zero.js +3 -0
- package/dist/math/vec3/f32/zero.js.map +1 -0
- package/dist/math/vec3/i32/abs.d.ts +2 -0
- package/dist/math/vec3/i32/abs.js +3 -0
- package/dist/math/vec3/i32/abs.js.map +1 -0
- package/dist/math/vec3/i32/add.d.ts +2 -0
- package/dist/math/vec3/i32/add.js +7 -0
- package/dist/math/vec3/i32/add.js.map +1 -0
- package/dist/math/vec3/i32/bitwise-and.d.ts +2 -0
- package/dist/math/vec3/i32/bitwise-and.js +7 -0
- package/dist/math/vec3/i32/bitwise-and.js.map +1 -0
- package/dist/math/vec3/i32/bitwise-not.d.ts +2 -0
- package/dist/math/vec3/i32/bitwise-not.js +3 -0
- package/dist/math/vec3/i32/bitwise-not.js.map +1 -0
- package/dist/math/vec3/i32/bitwise-or.d.ts +2 -0
- package/dist/math/vec3/i32/bitwise-or.js +7 -0
- package/dist/math/vec3/i32/bitwise-or.js.map +1 -0
- package/dist/math/vec3/i32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec3/i32/bitwise-xor.js +7 -0
- package/dist/math/vec3/i32/bitwise-xor.js.map +1 -0
- package/dist/math/vec3/i32/clamp.d.ts +2 -0
- package/dist/math/vec3/i32/clamp.js +5 -0
- package/dist/math/vec3/i32/clamp.js.map +1 -0
- package/dist/math/vec3/i32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec3/i32/count-leading-zeros.js +8 -0
- package/dist/math/vec3/i32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec3/i32/count-one-bits.d.ts +2 -0
- package/dist/math/vec3/i32/count-one-bits.js +8 -0
- package/dist/math/vec3/i32/count-one-bits.js.map +1 -0
- package/dist/math/vec3/i32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec3/i32/count-trailing-zeros.js +8 -0
- package/dist/math/vec3/i32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec3/i32/equals.d.ts +2 -0
- package/dist/math/vec3/i32/equals.js +3 -0
- package/dist/math/vec3/i32/equals.js.map +1 -0
- package/dist/math/vec3/i32/max.d.ts +2 -0
- package/dist/math/vec3/i32/max.js +7 -0
- package/dist/math/vec3/i32/max.js.map +1 -0
- package/dist/math/vec3/i32/min.d.ts +2 -0
- package/dist/math/vec3/i32/min.js +7 -0
- package/dist/math/vec3/i32/min.js.map +1 -0
- package/dist/math/vec3/i32/multiply.d.ts +2 -0
- package/dist/math/vec3/i32/multiply.js +7 -0
- package/dist/math/vec3/i32/multiply.js.map +1 -0
- package/dist/math/vec3/i32/negate.d.ts +2 -0
- package/dist/math/vec3/i32/negate.js +3 -0
- package/dist/math/vec3/i32/negate.js.map +1 -0
- package/dist/math/vec3/i32/one.d.ts +2 -0
- package/dist/math/vec3/i32/one.js +3 -0
- package/dist/math/vec3/i32/one.js.map +1 -0
- package/dist/math/vec3/i32/public.d.ts +22 -1
- package/dist/math/vec3/i32/public.js +22 -1
- package/dist/math/vec3/i32/public.js.map +1 -1
- package/dist/math/vec3/i32/reverse-bits.d.ts +2 -0
- package/dist/math/vec3/i32/reverse-bits.js +8 -0
- package/dist/math/vec3/i32/reverse-bits.js.map +1 -0
- package/dist/math/vec3/i32/scale.d.ts +2 -0
- package/dist/math/vec3/i32/scale.js +3 -0
- package/dist/math/vec3/i32/scale.js.map +1 -0
- package/dist/math/vec3/i32/shift-left.d.ts +2 -0
- package/dist/math/vec3/i32/shift-left.js +3 -0
- package/dist/math/vec3/i32/shift-left.js.map +1 -0
- package/dist/math/vec3/i32/shift-right.d.ts +2 -0
- package/dist/math/vec3/i32/shift-right.js +8 -0
- package/dist/math/vec3/i32/shift-right.js.map +1 -0
- package/dist/math/vec3/i32/subtract.d.ts +2 -0
- package/dist/math/vec3/i32/subtract.js +7 -0
- package/dist/math/vec3/i32/subtract.js.map +1 -0
- package/dist/math/vec3/i32/zero.d.ts +2 -0
- package/dist/math/vec3/i32/zero.js +3 -0
- package/dist/math/vec3/i32/zero.js.map +1 -0
- package/dist/math/vec3/public.d.ts +1 -1
- package/dist/math/vec3/public.js +1 -1
- package/dist/math/vec3/public.js.map +1 -1
- package/dist/math/vec3/u32/add.d.ts +2 -0
- package/dist/math/vec3/u32/add.js +7 -0
- package/dist/math/vec3/u32/add.js.map +1 -0
- package/dist/math/vec3/u32/bitwise-and.d.ts +2 -0
- package/dist/math/vec3/u32/bitwise-and.js +7 -0
- package/dist/math/vec3/u32/bitwise-and.js.map +1 -0
- package/dist/math/vec3/u32/bitwise-not.d.ts +2 -0
- package/dist/math/vec3/u32/bitwise-not.js +3 -0
- package/dist/math/vec3/u32/bitwise-not.js.map +1 -0
- package/dist/math/vec3/u32/bitwise-or.d.ts +2 -0
- package/dist/math/vec3/u32/bitwise-or.js +7 -0
- package/dist/math/vec3/u32/bitwise-or.js.map +1 -0
- package/dist/math/vec3/u32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec3/u32/bitwise-xor.js +7 -0
- package/dist/math/vec3/u32/bitwise-xor.js.map +1 -0
- package/dist/math/vec3/u32/clamp.d.ts +2 -0
- package/dist/math/vec3/u32/clamp.js +5 -0
- package/dist/math/vec3/u32/clamp.js.map +1 -0
- package/dist/math/vec3/u32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec3/u32/count-leading-zeros.js +8 -0
- package/dist/math/vec3/u32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec3/u32/count-one-bits.d.ts +2 -0
- package/dist/math/vec3/u32/count-one-bits.js +8 -0
- package/dist/math/vec3/u32/count-one-bits.js.map +1 -0
- package/dist/math/vec3/u32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec3/u32/count-trailing-zeros.js +8 -0
- package/dist/math/vec3/u32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec3/u32/equals.d.ts +2 -0
- package/dist/math/vec3/u32/equals.js +3 -0
- package/dist/math/vec3/u32/equals.js.map +1 -0
- package/dist/math/vec3/u32/max.d.ts +2 -0
- package/dist/math/vec3/u32/max.js +7 -0
- package/dist/math/vec3/u32/max.js.map +1 -0
- package/dist/math/vec3/u32/min.d.ts +2 -0
- package/dist/math/vec3/u32/min.js +7 -0
- package/dist/math/vec3/u32/min.js.map +1 -0
- package/dist/math/vec3/u32/multiply.d.ts +2 -0
- package/dist/math/vec3/u32/multiply.js +7 -0
- package/dist/math/vec3/u32/multiply.js.map +1 -0
- package/dist/math/vec3/u32/negate.d.ts +2 -0
- package/dist/math/vec3/u32/negate.js +3 -0
- package/dist/math/vec3/u32/negate.js.map +1 -0
- package/dist/math/vec3/u32/one.d.ts +2 -0
- package/dist/math/vec3/u32/one.js +3 -0
- package/dist/math/vec3/u32/one.js.map +1 -0
- package/dist/math/vec3/u32/public.d.ts +22 -1
- package/dist/math/vec3/u32/public.js +22 -1
- package/dist/math/vec3/u32/public.js.map +1 -1
- package/dist/math/vec3/u32/reverse-bits.d.ts +2 -0
- package/dist/math/vec3/u32/reverse-bits.js +8 -0
- package/dist/math/vec3/u32/reverse-bits.js.map +1 -0
- package/dist/math/vec3/u32/scale.d.ts +2 -0
- package/dist/math/vec3/u32/scale.js +7 -0
- package/dist/math/vec3/u32/scale.js.map +1 -0
- package/dist/math/vec3/u32/shift-left.d.ts +2 -0
- package/dist/math/vec3/u32/shift-left.js +7 -0
- package/dist/math/vec3/u32/shift-left.js.map +1 -0
- package/dist/math/vec3/u32/shift-right.d.ts +2 -0
- package/dist/math/vec3/u32/shift-right.js +8 -0
- package/dist/math/vec3/u32/shift-right.js.map +1 -0
- package/dist/math/vec3/u32/subtract.d.ts +2 -0
- package/dist/math/vec3/u32/subtract.js +7 -0
- package/dist/math/vec3/u32/subtract.js.map +1 -0
- package/dist/math/vec3/u32/volume.d.ts +2 -0
- package/dist/math/vec3/u32/volume.js +3 -0
- package/dist/math/vec3/u32/volume.js.map +1 -0
- package/dist/math/vec3/u32/zero.d.ts +2 -0
- package/dist/math/vec3/u32/zero.js +3 -0
- package/dist/math/vec3/u32/zero.js.map +1 -0
- package/dist/math/vec4/f32/abs.d.ts +2 -0
- package/dist/math/vec4/f32/abs.js +3 -0
- package/dist/math/vec4/f32/abs.js.map +1 -0
- package/dist/math/vec4/f32/acos.d.ts +2 -0
- package/dist/math/vec4/f32/acos.js +3 -0
- package/dist/math/vec4/f32/acos.js.map +1 -0
- package/dist/math/vec4/f32/acosh.d.ts +2 -0
- package/dist/math/vec4/f32/acosh.js +3 -0
- package/dist/math/vec4/f32/acosh.js.map +1 -0
- package/dist/math/vec4/f32/add.d.ts +2 -0
- package/dist/math/vec4/f32/add.js +8 -0
- package/dist/math/vec4/f32/add.js.map +1 -0
- package/dist/math/vec4/f32/asin.d.ts +2 -0
- package/dist/math/vec4/f32/asin.js +3 -0
- package/dist/math/vec4/f32/asin.js.map +1 -0
- package/dist/math/vec4/f32/asinh.d.ts +2 -0
- package/dist/math/vec4/f32/asinh.js +3 -0
- package/dist/math/vec4/f32/asinh.js.map +1 -0
- package/dist/math/vec4/f32/atan.d.ts +2 -0
- package/dist/math/vec4/f32/atan.js +3 -0
- package/dist/math/vec4/f32/atan.js.map +1 -0
- package/dist/math/vec4/f32/atanh.d.ts +2 -0
- package/dist/math/vec4/f32/atanh.js +3 -0
- package/dist/math/vec4/f32/atanh.js.map +1 -0
- package/dist/math/vec4/f32/ceil.d.ts +2 -0
- package/dist/math/vec4/f32/ceil.js +3 -0
- package/dist/math/vec4/f32/ceil.js.map +1 -0
- package/dist/math/vec4/f32/clamp.d.ts +2 -0
- package/dist/math/vec4/f32/clamp.js +5 -0
- package/dist/math/vec4/f32/clamp.js.map +1 -0
- package/dist/math/vec4/f32/cos.d.ts +2 -0
- package/dist/math/vec4/f32/cos.js +3 -0
- package/dist/math/vec4/f32/cos.js.map +1 -0
- package/dist/math/vec4/f32/cosh.d.ts +2 -0
- package/dist/math/vec4/f32/cosh.js +3 -0
- package/dist/math/vec4/f32/cosh.js.map +1 -0
- package/dist/math/vec4/f32/distance.d.ts +2 -0
- package/dist/math/vec4/f32/distance.js +5 -0
- package/dist/math/vec4/f32/distance.js.map +1 -0
- package/dist/math/vec4/f32/dot.d.ts +2 -0
- package/dist/math/vec4/f32/dot.js +3 -0
- package/dist/math/vec4/f32/dot.js.map +1 -0
- package/dist/math/vec4/f32/exp.d.ts +2 -0
- package/dist/math/vec4/f32/exp.js +3 -0
- package/dist/math/vec4/f32/exp.js.map +1 -0
- package/dist/math/vec4/f32/exp2.d.ts +2 -0
- package/dist/math/vec4/f32/exp2.js +3 -0
- package/dist/math/vec4/f32/exp2.js.map +1 -0
- package/dist/math/vec4/f32/faceforward.d.ts +2 -0
- package/dist/math/vec4/f32/faceforward.js +5 -0
- package/dist/math/vec4/f32/faceforward.js.map +1 -0
- package/dist/math/vec4/f32/floor.d.ts +2 -0
- package/dist/math/vec4/f32/floor.js +3 -0
- package/dist/math/vec4/f32/floor.js.map +1 -0
- package/dist/math/vec4/f32/fract.d.ts +2 -0
- package/dist/math/vec4/f32/fract.js +8 -0
- package/dist/math/vec4/f32/fract.js.map +1 -0
- package/dist/math/vec4/f32/length.d.ts +2 -0
- package/dist/math/vec4/f32/length.js +3 -0
- package/dist/math/vec4/f32/length.js.map +1 -0
- package/dist/math/vec4/f32/log.d.ts +2 -0
- package/dist/math/vec4/f32/log.js +3 -0
- package/dist/math/vec4/f32/log.js.map +1 -0
- package/dist/math/vec4/f32/log2.d.ts +2 -0
- package/dist/math/vec4/f32/log2.js +3 -0
- package/dist/math/vec4/f32/log2.js.map +1 -0
- package/dist/math/vec4/f32/max.d.ts +2 -0
- package/dist/math/vec4/f32/max.js +8 -0
- package/dist/math/vec4/f32/max.js.map +1 -0
- package/dist/math/vec4/f32/min.d.ts +2 -0
- package/dist/math/vec4/f32/min.js +8 -0
- package/dist/math/vec4/f32/min.js.map +1 -0
- package/dist/math/vec4/f32/mix.d.ts +2 -0
- package/dist/math/vec4/f32/mix.js +8 -0
- package/dist/math/vec4/f32/mix.js.map +1 -0
- package/dist/math/vec4/f32/mod.d.ts +2 -0
- package/dist/math/vec4/f32/mod.js +8 -0
- package/dist/math/vec4/f32/mod.js.map +1 -0
- package/dist/math/vec4/f32/modf.d.ts +5 -0
- package/dist/math/vec4/f32/modf.js +6 -0
- package/dist/math/vec4/f32/modf.js.map +1 -0
- package/dist/math/vec4/f32/multiply.d.ts +2 -0
- package/dist/math/vec4/f32/multiply.js +8 -0
- package/dist/math/vec4/f32/multiply.js.map +1 -0
- package/dist/math/vec4/f32/negate.d.ts +2 -0
- package/dist/math/vec4/f32/negate.js +3 -0
- package/dist/math/vec4/f32/negate.js.map +1 -0
- package/dist/math/vec4/f32/normalize.d.ts +2 -0
- package/dist/math/vec4/f32/normalize.js +8 -0
- package/dist/math/vec4/f32/normalize.js.map +1 -0
- package/dist/math/vec4/f32/pow.d.ts +2 -0
- package/dist/math/vec4/f32/pow.js +8 -0
- package/dist/math/vec4/f32/pow.js.map +1 -0
- package/dist/math/vec4/f32/public.d.ts +45 -1
- package/dist/math/vec4/f32/public.js +45 -1
- package/dist/math/vec4/f32/public.js.map +1 -1
- package/dist/math/vec4/f32/reflect.d.ts +2 -0
- package/dist/math/vec4/f32/reflect.js +9 -0
- package/dist/math/vec4/f32/reflect.js.map +1 -0
- package/dist/math/vec4/f32/refract.d.ts +2 -0
- package/dist/math/vec4/f32/refract.js +14 -0
- package/dist/math/vec4/f32/refract.js.map +1 -0
- package/dist/math/vec4/f32/round.d.ts +2 -0
- package/dist/math/vec4/f32/round.js +3 -0
- package/dist/math/vec4/f32/round.js.map +1 -0
- package/dist/math/vec4/f32/scale.d.ts +2 -0
- package/dist/math/vec4/f32/scale.js +3 -0
- package/dist/math/vec4/f32/scale.js.map +1 -0
- package/dist/math/vec4/f32/sign.d.ts +2 -0
- package/dist/math/vec4/f32/sign.js +3 -0
- package/dist/math/vec4/f32/sign.js.map +1 -0
- package/dist/math/vec4/f32/sin.d.ts +2 -0
- package/dist/math/vec4/f32/sin.js +3 -0
- package/dist/math/vec4/f32/sin.js.map +1 -0
- package/dist/math/vec4/f32/sinh.d.ts +2 -0
- package/dist/math/vec4/f32/sinh.js +3 -0
- package/dist/math/vec4/f32/sinh.js.map +1 -0
- package/dist/math/vec4/f32/smoothstep.d.ts +2 -0
- package/dist/math/vec4/f32/smoothstep.js +14 -0
- package/dist/math/vec4/f32/smoothstep.js.map +1 -0
- package/dist/math/vec4/f32/sqrt.d.ts +2 -0
- package/dist/math/vec4/f32/sqrt.js +3 -0
- package/dist/math/vec4/f32/sqrt.js.map +1 -0
- package/dist/math/vec4/f32/step.d.ts +2 -0
- package/dist/math/vec4/f32/step.js +8 -0
- package/dist/math/vec4/f32/step.js.map +1 -0
- package/dist/math/vec4/f32/subtract.d.ts +2 -0
- package/dist/math/vec4/f32/subtract.js +8 -0
- package/dist/math/vec4/f32/subtract.js.map +1 -0
- package/dist/math/vec4/f32/tan.d.ts +2 -0
- package/dist/math/vec4/f32/tan.js +3 -0
- package/dist/math/vec4/f32/tan.js.map +1 -0
- package/dist/math/vec4/f32/tanh.d.ts +2 -0
- package/dist/math/vec4/f32/tanh.js +3 -0
- package/dist/math/vec4/f32/tanh.js.map +1 -0
- package/dist/math/vec4/f32/trunc.d.ts +2 -0
- package/dist/math/vec4/f32/trunc.js +3 -0
- package/dist/math/vec4/f32/trunc.js.map +1 -0
- package/dist/math/vec4/i32/abs.d.ts +2 -0
- package/dist/math/vec4/i32/abs.js +3 -0
- package/dist/math/vec4/i32/abs.js.map +1 -0
- package/dist/math/vec4/i32/add.d.ts +2 -0
- package/dist/math/vec4/i32/add.js +8 -0
- package/dist/math/vec4/i32/add.js.map +1 -0
- package/dist/math/vec4/i32/bitwise-and.d.ts +2 -0
- package/dist/math/vec4/i32/bitwise-and.js +8 -0
- package/dist/math/vec4/i32/bitwise-and.js.map +1 -0
- package/dist/math/vec4/i32/bitwise-not.d.ts +2 -0
- package/dist/math/vec4/i32/bitwise-not.js +3 -0
- package/dist/math/vec4/i32/bitwise-not.js.map +1 -0
- package/dist/math/vec4/i32/bitwise-or.d.ts +2 -0
- package/dist/math/vec4/i32/bitwise-or.js +8 -0
- package/dist/math/vec4/i32/bitwise-or.js.map +1 -0
- package/dist/math/vec4/i32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec4/i32/bitwise-xor.js +8 -0
- package/dist/math/vec4/i32/bitwise-xor.js.map +1 -0
- package/dist/math/vec4/i32/clamp.d.ts +2 -0
- package/dist/math/vec4/i32/clamp.js +5 -0
- package/dist/math/vec4/i32/clamp.js.map +1 -0
- package/dist/math/vec4/i32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec4/i32/count-leading-zeros.js +9 -0
- package/dist/math/vec4/i32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec4/i32/count-one-bits.d.ts +2 -0
- package/dist/math/vec4/i32/count-one-bits.js +9 -0
- package/dist/math/vec4/i32/count-one-bits.js.map +1 -0
- package/dist/math/vec4/i32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec4/i32/count-trailing-zeros.js +9 -0
- package/dist/math/vec4/i32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec4/i32/equals.d.ts +2 -0
- package/dist/math/vec4/i32/equals.js +3 -0
- package/dist/math/vec4/i32/equals.js.map +1 -0
- package/dist/math/vec4/i32/max.d.ts +2 -0
- package/dist/math/vec4/i32/max.js +8 -0
- package/dist/math/vec4/i32/max.js.map +1 -0
- package/dist/math/vec4/i32/min.d.ts +2 -0
- package/dist/math/vec4/i32/min.js +8 -0
- package/dist/math/vec4/i32/min.js.map +1 -0
- package/dist/math/vec4/i32/multiply.d.ts +2 -0
- package/dist/math/vec4/i32/multiply.js +8 -0
- package/dist/math/vec4/i32/multiply.js.map +1 -0
- package/dist/math/vec4/i32/negate.d.ts +2 -0
- package/dist/math/vec4/i32/negate.js +3 -0
- package/dist/math/vec4/i32/negate.js.map +1 -0
- package/dist/math/vec4/i32/one.d.ts +2 -0
- package/dist/math/vec4/i32/one.js +3 -0
- package/dist/math/vec4/i32/one.js.map +1 -0
- package/dist/math/vec4/i32/public.d.ts +22 -1
- package/dist/math/vec4/i32/public.js +22 -1
- package/dist/math/vec4/i32/public.js.map +1 -1
- package/dist/math/vec4/i32/reverse-bits.d.ts +2 -0
- package/dist/math/vec4/i32/reverse-bits.js +9 -0
- package/dist/math/vec4/i32/reverse-bits.js.map +1 -0
- package/dist/math/vec4/i32/scale.d.ts +2 -0
- package/dist/math/vec4/i32/scale.js +3 -0
- package/dist/math/vec4/i32/scale.js.map +1 -0
- package/dist/math/vec4/i32/shift-left.d.ts +2 -0
- package/dist/math/vec4/i32/shift-left.js +3 -0
- package/dist/math/vec4/i32/shift-left.js.map +1 -0
- package/dist/math/vec4/i32/shift-right.d.ts +2 -0
- package/dist/math/vec4/i32/shift-right.js +9 -0
- package/dist/math/vec4/i32/shift-right.js.map +1 -0
- package/dist/math/vec4/i32/subtract.d.ts +2 -0
- package/dist/math/vec4/i32/subtract.js +8 -0
- package/dist/math/vec4/i32/subtract.js.map +1 -0
- package/dist/math/vec4/i32/zero.d.ts +2 -0
- package/dist/math/vec4/i32/zero.js +3 -0
- package/dist/math/vec4/i32/zero.js.map +1 -0
- package/dist/math/vec4/public.d.ts +1 -1
- package/dist/math/vec4/public.js +1 -1
- package/dist/math/vec4/public.js.map +1 -1
- package/dist/math/vec4/u32/add.d.ts +2 -0
- package/dist/math/vec4/u32/add.js +8 -0
- package/dist/math/vec4/u32/add.js.map +1 -0
- package/dist/math/vec4/u32/bitwise-and.d.ts +2 -0
- package/dist/math/vec4/u32/bitwise-and.js +8 -0
- package/dist/math/vec4/u32/bitwise-and.js.map +1 -0
- package/dist/math/vec4/u32/bitwise-not.d.ts +2 -0
- package/dist/math/vec4/u32/bitwise-not.js +3 -0
- package/dist/math/vec4/u32/bitwise-not.js.map +1 -0
- package/dist/math/vec4/u32/bitwise-or.d.ts +2 -0
- package/dist/math/vec4/u32/bitwise-or.js +8 -0
- package/dist/math/vec4/u32/bitwise-or.js.map +1 -0
- package/dist/math/vec4/u32/bitwise-xor.d.ts +2 -0
- package/dist/math/vec4/u32/bitwise-xor.js +8 -0
- package/dist/math/vec4/u32/bitwise-xor.js.map +1 -0
- package/dist/math/vec4/u32/clamp.d.ts +2 -0
- package/dist/math/vec4/u32/clamp.js +5 -0
- package/dist/math/vec4/u32/clamp.js.map +1 -0
- package/dist/math/vec4/u32/count-leading-zeros.d.ts +2 -0
- package/dist/math/vec4/u32/count-leading-zeros.js +9 -0
- package/dist/math/vec4/u32/count-leading-zeros.js.map +1 -0
- package/dist/math/vec4/u32/count-one-bits.d.ts +2 -0
- package/dist/math/vec4/u32/count-one-bits.js +9 -0
- package/dist/math/vec4/u32/count-one-bits.js.map +1 -0
- package/dist/math/vec4/u32/count-trailing-zeros.d.ts +2 -0
- package/dist/math/vec4/u32/count-trailing-zeros.js +9 -0
- package/dist/math/vec4/u32/count-trailing-zeros.js.map +1 -0
- package/dist/math/vec4/u32/equals.d.ts +2 -0
- package/dist/math/vec4/u32/equals.js +3 -0
- package/dist/math/vec4/u32/equals.js.map +1 -0
- package/dist/math/vec4/u32/max.d.ts +2 -0
- package/dist/math/vec4/u32/max.js +8 -0
- package/dist/math/vec4/u32/max.js.map +1 -0
- package/dist/math/vec4/u32/min.d.ts +2 -0
- package/dist/math/vec4/u32/min.js +8 -0
- package/dist/math/vec4/u32/min.js.map +1 -0
- package/dist/math/vec4/u32/multiply.d.ts +2 -0
- package/dist/math/vec4/u32/multiply.js +8 -0
- package/dist/math/vec4/u32/multiply.js.map +1 -0
- package/dist/math/vec4/u32/negate.d.ts +2 -0
- package/dist/math/vec4/u32/negate.js +3 -0
- package/dist/math/vec4/u32/negate.js.map +1 -0
- package/dist/math/vec4/u32/one.d.ts +2 -0
- package/dist/math/vec4/u32/one.js +3 -0
- package/dist/math/vec4/u32/one.js.map +1 -0
- package/dist/math/vec4/u32/public.d.ts +21 -1
- package/dist/math/vec4/u32/public.js +21 -1
- package/dist/math/vec4/u32/public.js.map +1 -1
- package/dist/math/vec4/u32/reverse-bits.d.ts +2 -0
- package/dist/math/vec4/u32/reverse-bits.js +9 -0
- package/dist/math/vec4/u32/reverse-bits.js.map +1 -0
- package/dist/math/vec4/u32/scale.d.ts +2 -0
- package/dist/math/vec4/u32/scale.js +8 -0
- package/dist/math/vec4/u32/scale.js.map +1 -0
- package/dist/math/vec4/u32/shift-left.d.ts +2 -0
- package/dist/math/vec4/u32/shift-left.js +8 -0
- package/dist/math/vec4/u32/shift-left.js.map +1 -0
- package/dist/math/vec4/u32/shift-right.d.ts +2 -0
- package/dist/math/vec4/u32/shift-right.js +9 -0
- package/dist/math/vec4/u32/shift-right.js.map +1 -0
- package/dist/math/vec4/u32/subtract.d.ts +2 -0
- package/dist/math/vec4/u32/subtract.js +8 -0
- package/dist/math/vec4/u32/subtract.js.map +1 -0
- package/dist/math/vec4/u32/zero.d.ts +2 -0
- package/dist/math/vec4/u32/zero.js +3 -0
- package/dist/math/vec4/u32/zero.js.map +1 -0
- package/dist/schema/from-archetype.d.ts +7 -4
- package/dist/schema/from-archetype.js +3 -3
- package/dist/schema/from-archetype.js.map +1 -1
- package/dist/schema/from-object-properties.d.ts +15 -0
- package/dist/schema/from-object-properties.js +9 -0
- package/dist/schema/from-object-properties.js.map +1 -0
- package/dist/schema/from-object-properties.test.d.ts +1 -0
- package/dist/schema/from-object-properties.test.js +49 -0
- package/dist/schema/from-object-properties.test.js.map +1 -0
- package/dist/schema/from-object-properties.type-test.d.ts +1 -0
- package/dist/schema/from-object-properties.type-test.js +37 -0
- package/dist/schema/from-object-properties.type-test.js.map +1 -0
- package/dist/schema/from-struct-properties.d.ts +8 -0
- package/dist/schema/from-struct-properties.js +7 -0
- package/dist/schema/from-struct-properties.js.map +1 -0
- package/dist/schema/from-struct-properties.test.d.ts +1 -0
- package/dist/schema/from-struct-properties.test.js +28 -0
- package/dist/schema/from-struct-properties.test.js.map +1 -0
- package/dist/schema/from-struct-properties.type-test.d.ts +1 -0
- package/dist/schema/from-struct-properties.type-test.js +11 -0
- package/dist/schema/from-struct-properties.type-test.js.map +1 -0
- package/dist/schema/guid/guid.performance.test.js +0 -3
- package/dist/schema/guid/guid.performance.test.js.map +1 -1
- package/dist/schema/public.d.ts +2 -1
- package/dist/schema/public.js +2 -1
- package/dist/schema/public.js.map +1 -1
- package/dist/schema/schema.d.ts +2 -0
- package/dist/service/service.d.ts +1 -1
- package/dist/service/ui-service/from-service.d.ts +19 -3
- package/dist/service/ui-service/from-service.transaction.type-test.d.ts +1 -0
- package/dist/service/ui-service/from-service.transaction.type-test.js +14 -0
- package/dist/service/ui-service/from-service.transaction.type-test.js.map +1 -0
- package/dist/service/ui-service/is-valid.d.ts +5 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/async-args-provider.d.ts +17 -0
- package/dist/types/async-args-provider.js +3 -0
- package/dist/types/async-args-provider.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/references/data-lit/package.json +6 -2
- package/references/data-lit/src/elements/database-element.ts +36 -1
- package/references/data-lit/src/elements/database-element.type-test.ts +20 -0
- package/references/data-lit/src/index.ts +1 -0
- package/references/data-lit/src/testing/template/from.test.ts +47 -0
- package/references/data-lit/src/testing/template/from.ts +86 -0
- package/references/data-lit/src/testing/template/public.ts +3 -0
- package/references/data-lit/src/testing/template/query.ts +27 -0
- package/references/data-lit/src/testing/template/template.ts +4 -0
- package/references/data-lit-tictactoe/package.json +6 -2
- package/references/data-lit-tictactoe/src/features/main/data/board-cell/blank.ts +5 -0
- package/references/data-lit-tictactoe/src/features/main/data/board-cell/board-cell.ts +5 -0
- package/references/data-lit-tictactoe/src/{types/play-move-args → features/main/data/board-cell}/public.ts +1 -2
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/board-state.ts +2 -2
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/create-initial-board.ts +2 -2
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/current-player.ts +2 -2
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/derive-status.ts +4 -4
- package/references/data-lit-tictactoe/src/features/main/data/board-state/from-marks.ts +11 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/get-move-count.ts +1 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/get-winner.ts +4 -4
- package/references/data-lit-tictactoe/src/features/main/data/board-state/get-winning-line.ts +15 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/is-board-full.ts +1 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/is-game-over.ts +3 -3
- package/references/data-lit-tictactoe/src/features/main/data/board-state/public.ts +13 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/schema.ts +3 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/board-state/set-board-cell.ts +3 -3
- package/references/data-lit-tictactoe/src/features/main/data/cell-index/cell-index.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/cell-index/public.ts +2 -0
- package/references/data-lit-tictactoe/src/features/main/data/cell-index/schema.ts +9 -0
- package/references/data-lit-tictactoe/src/features/main/data/game-status/game-status.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/game-status/is-active.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/game-status/public.ts +3 -0
- package/references/data-lit-tictactoe/src/features/main/data/game-status/schema.ts +7 -0
- package/references/data-lit-tictactoe/src/features/main/data/move-reject-reason/move-reject-reason.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/move-reject-reason/public.ts +2 -0
- package/references/data-lit-tictactoe/src/features/main/data/move-reject-reason/schema.ts +7 -0
- package/references/data-lit-tictactoe/src/features/main/data/placed-mark/placed-mark.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/placed-mark/public.ts +2 -0
- package/references/data-lit-tictactoe/src/features/main/data/placed-mark/schema.ts +12 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/play-move-args/can-play-move.ts +9 -5
- package/references/data-lit-tictactoe/src/{types → features/main/data}/play-move-args/play-move-args.ts +1 -1
- package/references/data-lit-tictactoe/src/features/main/data/play-move-args/public.ts +3 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/is.ts +2 -2
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/mark-color.ts +1 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/opponent.ts +1 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/player-mark.ts +2 -2
- package/references/data-lit-tictactoe/src/features/main/data/player-mark/public.ts +7 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/schema.ts +1 -1
- package/references/data-lit-tictactoe/src/{types → features/main/data}/player-mark/values.ts +2 -2
- package/references/data-lit-tictactoe/src/features/main/data/score/public.ts +2 -0
- package/references/data-lit-tictactoe/src/features/main/data/score/schema.ts +9 -0
- package/references/data-lit-tictactoe/src/features/main/data/score/score.ts +6 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/conformance-case.ts +13 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/expect-state-matches.ts +36 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/play-move.cases.ts +47 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/play-move.test.ts +13 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/play-move.ts +20 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/public.ts +3 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/restart-game.cases.ts +34 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/restart-game.test.ts +13 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/restart-game.ts +18 -0
- package/references/data-lit-tictactoe/src/features/main/data/state/state.ts +15 -0
- package/references/data-lit-tictactoe/src/features/main/data/winning-line/lines.ts +14 -0
- package/references/data-lit-tictactoe/src/features/main/data/winning-line/public.ts +2 -0
- package/references/data-lit-tictactoe/src/{types → features/main/data/winning-line}/winning-line.ts +1 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/board.ts +22 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/current-player.ts +12 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/index.ts +9 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/is-game-over.ts +10 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/move-count.ts +10 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/state.ts +29 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/status.ts +10 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/winner.ts +10 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed/winning-line.ts +10 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/computed-database/computed-database.ts +18 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/conformance/create-store.ts +12 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/conformance/expect-conforms.ts +42 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/conformance/from-state.ts +31 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/conformance/projection.test.ts +38 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/conformance/to-state.ts +30 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/core-database/archetypes.ts +17 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/core-database/components.ts +11 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/core-database/core-database.ts +35 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/core-database/resources.ts +13 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/feature-database.ts +7 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/index-database/index-database.ts +16 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/index-database/indexes/by-cell.ts +9 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/index-database/indexes/index.ts +2 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/service-database/service-database.ts +26 -0
- package/references/data-lit-tictactoe/src/{state/agent-plugin.ts → features/main/ecs/service-database/services/create-agent-service.ts} +14 -40
- package/references/data-lit-tictactoe/src/features/main/ecs/service-database/services/create-root-agent-service.ts +26 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/service-database/services/index.ts +3 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transaction-database.ts +18 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/index.ts +3 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/play-move.test.ts +20 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/play-move.ts +19 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/read-board.ts +20 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/restart-game.test.ts +19 -0
- package/references/data-lit-tictactoe/src/features/main/ecs/transaction-database/transactions/restart-game.ts +25 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-app/tictactoe-app-element.ts +1 -1
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-app/tictactoe-app-presentation.test.ts +15 -0
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-app/tictactoe-app.ts +17 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-board/tictactoe-board-element.ts +1 -1
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-board/tictactoe-board-presentation.test.ts +16 -0
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-cell/observe-cell.ts +32 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-cell/tictactoe-cell-element.ts +8 -12
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-cell/tictactoe-cell-presentation.test.ts +41 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-cell/tictactoe-cell-presentation.ts +1 -1
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-element.ts +20 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-hud/tictactoe-hud-element.ts +8 -20
- package/references/data-lit-tictactoe/src/features/main/ui/tictactoe-hud/tictactoe-hud-presentation.test.ts +45 -0
- package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-hud/tictactoe-hud-presentation.ts +12 -2
- package/references/data-lit-tictactoe/src/index.ts +14 -8
- package/references/data-lit-tictactoe/src/main.ts +6 -6
- package/references/data-react/package.json +3 -2
- package/references/data-react-hello/package.json +2 -1
- package/references/data-react-pixie/package.json +2 -1
- package/references/data-lit-tictactoe/src/elements/tictactoe-app/tictactoe-app.ts +0 -18
- package/references/data-lit-tictactoe/src/state/tictactoe-plugin.ts +0 -64
- package/references/data-lit-tictactoe/src/tictactoe-element.ts +0 -15
- package/references/data-lit-tictactoe/src/types/board-cell.ts +0 -5
- package/references/data-lit-tictactoe/src/types/board-state/get-cell.ts +0 -7
- package/references/data-lit-tictactoe/src/types/board-state/get-winning-line.ts +0 -25
- package/references/data-lit-tictactoe/src/types/board-state/is-cell-playable.ts +0 -13
- package/references/data-lit-tictactoe/src/types/board-state/is-cell-winning.ts +0 -9
- package/references/data-lit-tictactoe/src/types/board-state/public.ts +0 -15
- package/references/data-lit-tictactoe/src/types/game-status.ts +0 -3
- package/references/data-lit-tictactoe/src/types/move-reject-reason.ts +0 -7
- package/references/data-lit-tictactoe/src/types/player-mark/public.ts +0 -7
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-app/tictactoe-app-presentation.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-app/tictactoe-app.css.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-board/tictactoe-board-presentation.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-board/tictactoe-board.css.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-board/tictactoe-board.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-cell/tictactoe-cell.css.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-cell/tictactoe-cell.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-hud/tictactoe-hud.css.ts +0 -0
- /package/references/data-lit-tictactoe/src/{elements → features/main/ui}/tictactoe-hud/tictactoe-hud.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partition.type-test.js","sourceRoot":"","sources":["../../../src/ecs/store/partition.type-test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAwFvD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AACxC,iCAAiC;AACjC,8DAA8D;AAC9D,MAAM,CAAC,OAAO,CAAC;AACf,+CAA+C;AAC/C,MAAM,CAAC,QAAQ,CAAC;AAKhB,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;AACxC,2EAA2E;AAC3E,yCAAyC;AACzC,mFAAmF;AACnF,MAAM,CAAC,OAAO,CAAC"}
|
|
@@ -4,4 +4,6 @@ import { Store } from "../store.js";
|
|
|
4
4
|
import { FromSchemas } from "../../../schema/from-schemas.js";
|
|
5
5
|
import { ResourceSchemas } from "../../resource-schemas.js";
|
|
6
6
|
import { ArchetypeComponents } from "../archetype-components.js";
|
|
7
|
-
|
|
7
|
+
import { PartitionKeysOf } from "../partition.js";
|
|
8
|
+
import { IndexDeclarations } from "../index-types.js";
|
|
9
|
+
export declare function createStore<CS extends ComponentSchemas = {}, RS extends ResourceSchemas = {}, A extends ArchetypeComponents<StringKeyof<CS>> = {}, IX extends IndexDeclarations<FromSchemas<CS>, A> = {}>(schema?: Store.Schema<CS, RS, A, IX>): Store<FromSchemas<CS>, FromSchemas<RS>, A, IX, PartitionKeysOf<CS>>;
|
|
@@ -21,7 +21,7 @@ export function createStore(schema) {
|
|
|
21
21
|
const resourceSchemas = {};
|
|
22
22
|
const archetypeComponentNames = {};
|
|
23
23
|
const componentAndResourceSchemas = {};
|
|
24
|
-
const core = createCore(componentAndResourceSchemas);
|
|
24
|
+
const core = createCore(componentAndResourceSchemas, (archetype) => decorateArchetypeForIndexes(archetype));
|
|
25
25
|
// Index registry. Owned at the Store layer because index state is
|
|
26
26
|
// *derived* from store data, and every mutation that needs to keep
|
|
27
27
|
// indexes in sync flows through Store methods (insert / update /
|
|
@@ -165,57 +165,25 @@ export function createStore(schema) {
|
|
|
165
165
|
return selectEntities(core, include, options);
|
|
166
166
|
};
|
|
167
167
|
const archetypes = {};
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
* (`store.archetypes.X`, `store.ensureArchetype([...])`) all return the
|
|
176
|
-
* same wrapper reference — code that uses `===` to compare archetypes
|
|
177
|
-
* keeps working.
|
|
178
|
-
*/
|
|
179
|
-
const archetypeWrapCache = new WeakMap();
|
|
180
|
-
const wrapArchetypeForIndexes = (archetype) => {
|
|
181
|
-
const cached = archetypeWrapCache.get(archetype);
|
|
182
|
-
if (cached)
|
|
183
|
-
return cached;
|
|
168
|
+
// Decorate an archetype's `insert` in place with index maintenance. The core
|
|
169
|
+
// calls this (via `onArchetypeCreated`) the moment any archetype is created —
|
|
170
|
+
// direct or a lazily-created partition value-child — so every write path
|
|
171
|
+
// (direct insert, router routing, migration target) shares one maintained
|
|
172
|
+
// insert. No Proxy and no forwarding wrapper: the archetype you hold *is* the
|
|
173
|
+
// index-maintaining one, and `===` identity is preserved for free.
|
|
174
|
+
const decorateArchetypeForIndexes = (archetype) => {
|
|
184
175
|
const rawInsert = archetype.insert.bind(archetype);
|
|
185
|
-
|
|
186
|
-
//
|
|
187
|
-
//
|
|
176
|
+
archetype.insert = (values) => {
|
|
177
|
+
// Pre-check unique constraints before the column mutation so a
|
|
178
|
+
// collision throws without partially mutating the store. The
|
|
179
|
+
// archetype's id + component set let the registry dispatch to only
|
|
180
|
+
// the applicable indexes.
|
|
188
181
|
indexRegistry.checkUniqueAvailableForInsert(archetype, values);
|
|
189
182
|
const entity = rawInsert(values);
|
|
190
183
|
indexRegistry.applyInsert(entity, archetype, values);
|
|
191
184
|
return entity;
|
|
192
185
|
};
|
|
193
|
-
const wrapped = new Proxy(archetype, {
|
|
194
|
-
get(target, prop, receiver) {
|
|
195
|
-
if (prop === "insert")
|
|
196
|
-
return wrappedInsert;
|
|
197
|
-
return Reflect.get(target, prop, receiver);
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
archetypeWrapCache.set(archetype, wrapped);
|
|
201
|
-
return wrapped;
|
|
202
186
|
};
|
|
203
|
-
const ensureArchetype = ((componentNames) => {
|
|
204
|
-
return wrapArchetypeForIndexes(core.ensureArchetype(componentNames));
|
|
205
|
-
});
|
|
206
|
-
// `queryArchetypes` and `locate` also surface archetypes — wrap them
|
|
207
|
-
// so `===` comparisons against `store.archetypes.X` continue to hold.
|
|
208
|
-
// Cached wrappers guarantee identity stability per raw archetype.
|
|
209
|
-
const queryArchetypes = ((include, options) => {
|
|
210
|
-
const raw = core.queryArchetypes(include, options);
|
|
211
|
-
return raw.map((a) => wrapArchetypeForIndexes(a));
|
|
212
|
-
});
|
|
213
|
-
const locate = ((entity) => {
|
|
214
|
-
const loc = core.locate(entity);
|
|
215
|
-
if (loc === null)
|
|
216
|
-
return null;
|
|
217
|
-
return { archetype: wrapArchetypeForIndexes(loc.archetype), row: loc.row };
|
|
218
|
-
});
|
|
219
187
|
const updateEntity = (entity, values) => {
|
|
220
188
|
indexRegistry.checkUniqueAvailableForUpdate(entity, values);
|
|
221
189
|
// `update` can move the entity to a different archetype (when it
|
|
@@ -269,8 +237,9 @@ export function createStore(schema) {
|
|
|
269
237
|
continue;
|
|
270
238
|
}
|
|
271
239
|
archetypeComponentNames[name] = newComponents;
|
|
272
|
-
|
|
273
|
-
|
|
240
|
+
// Insert is already index-maintaining (decorated at creation), and a
|
|
241
|
+
// partitioned archetype resolves to a Router — both surfaced directly.
|
|
242
|
+
archetypes[name] = core.ensureArchetype(["id", ...newComponents]);
|
|
274
243
|
}
|
|
275
244
|
// indexes: registry enforces (===)-or-throw on same name and
|
|
276
245
|
// structural duplicate detection across names. A new RuntimeIndex
|
|
@@ -288,10 +257,10 @@ export function createStore(schema) {
|
|
|
288
257
|
return store;
|
|
289
258
|
};
|
|
290
259
|
const store = {
|
|
260
|
+
// `ensureArchetype` / `queryArchetypes` / `locate` come straight from
|
|
261
|
+
// `core`: inserts are decorated at creation, so no Store-layer wrapping
|
|
262
|
+
// is needed and `===` identity holds (the raw archetype is the handle).
|
|
291
263
|
...core,
|
|
292
|
-
ensureArchetype,
|
|
293
|
-
queryArchetypes,
|
|
294
|
-
locate,
|
|
295
264
|
update: updateEntity,
|
|
296
265
|
delete: deleteEntity,
|
|
297
266
|
resources,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-store.js","sourceRoot":"","sources":["../../../../src/ecs/store/public/create-store.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAQvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EACH,mBAAmB,GAGtB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-store.js","sourceRoot":"","sources":["../../../../src/ecs/store/public/create-store.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAQvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EACH,mBAAmB,GAGtB,MAAM,wCAAwC,CAAC;AAIhD,MAAM,UAAU,WAAW,CAMvB,MAAoC;IAEpC,MAAM,SAAS,GAAG,MAAa,CAAC;IAChC,MAAM,cAAc,GAChB,SAAS;QACT,OAAO,SAAS,KAAK,QAAQ;QAC7B,YAAY,IAAI,SAAS;QACzB,WAAW,IAAI,SAAS;QACxB,YAAY,IAAI,SAAS,CAAC;IAE9B,MAAM,gBAAgB,GAAgC,cAAc;QAChE,CAAC,CAAC,SAAS;QACX,CAAC,CAAC;YACE,UAAU,EAAE,EAAQ;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ENSE for details.
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { createStore } from "./create-store.js";
|
|
4
|
+
import { constBufferType } from "../../../typed-buffer/create-const-buffer.js";
|
|
5
|
+
// `cell` partitions; `name` is uniquely indexed. `as const` preserves the
|
|
6
|
+
// `partition: true` literal (so the store is typed with the discrimination) and
|
|
7
|
+
// the index declaration (so `store.indexes.byName` is typed).
|
|
8
|
+
const schema = {
|
|
9
|
+
components: {
|
|
10
|
+
cell: { type: "integer", partition: true },
|
|
11
|
+
name: { type: "string" },
|
|
12
|
+
},
|
|
13
|
+
resources: {},
|
|
14
|
+
archetypes: { Spatial: ["cell", "name"] },
|
|
15
|
+
indexes: { byName: { key: "name", unique: true } },
|
|
16
|
+
};
|
|
17
|
+
const makeStore = () => createStore(schema);
|
|
18
|
+
describe("Store partition integration", () => {
|
|
19
|
+
it("dynamically extends with a partition component AFTER creation; N values → N archetypes, each with a const column", () => {
|
|
20
|
+
// Start with an empty store, then extend — exercises live (post-construction)
|
|
21
|
+
// partition detection, not the schema passed at creation.
|
|
22
|
+
const store = createStore().extend(schema);
|
|
23
|
+
// The dynamically-added partitioned archetype is a Router (no dense view).
|
|
24
|
+
const spatial = store.archetypes.Spatial;
|
|
25
|
+
expect("columns" in spatial).toBe(false);
|
|
26
|
+
// Insert N entities with N distinct partition values.
|
|
27
|
+
const N = 5;
|
|
28
|
+
const entities = Array.from({ length: N }, (_, i) => spatial.insert({ cell: i, name: `e${i}` }));
|
|
29
|
+
// Query the archetypes — exactly N, one per distinct value.
|
|
30
|
+
const archetypes = store.queryArchetypes(["cell", "name"]);
|
|
31
|
+
expect(archetypes.length).toBe(N);
|
|
32
|
+
// Every distinct value lives in its own archetype, and each still carries
|
|
33
|
+
// a named `cell` column that is a const typed buffer (zero per-row bytes).
|
|
34
|
+
const valuesSeen = new Set();
|
|
35
|
+
for (const arch of archetypes) {
|
|
36
|
+
expect(arch.rowCount).toBe(1);
|
|
37
|
+
const cellColumn = arch.columns.cell;
|
|
38
|
+
expect(cellColumn.type).toBe(constBufferType);
|
|
39
|
+
expect(cellColumn.typedArrayElementSizeInBytes).toBe(0);
|
|
40
|
+
valuesSeen.add(cellColumn.get(0));
|
|
41
|
+
}
|
|
42
|
+
expect([...valuesSeen].sort((a, b) => a - b)).toEqual([0, 1, 2, 3, 4]);
|
|
43
|
+
// The index (also added dynamically) resolves each routed entity.
|
|
44
|
+
for (let i = 0; i < N; i++) {
|
|
45
|
+
expect(store.indexes.byName.get({ name: `e${i}` })).toBe(entities[i]);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
it("store.archetypes.<PartitionedName> is a Proxy-free Router that routes inserts", () => {
|
|
49
|
+
const store = makeStore();
|
|
50
|
+
const spatial = store.archetypes.Spatial;
|
|
51
|
+
expect(typeof spatial.insert).toBe("function");
|
|
52
|
+
expect("columns" in spatial).toBe(false); // a family has no dense view
|
|
53
|
+
const a = spatial.insert({ cell: 1, name: "a" });
|
|
54
|
+
const b = spatial.insert({ cell: 2, name: "b" });
|
|
55
|
+
expect(store.locate(a).archetype).not.toBe(store.locate(b).archetype);
|
|
56
|
+
expect(store.get(a, "cell")).toBe(1);
|
|
57
|
+
expect(store.get(b, "cell")).toBe(2);
|
|
58
|
+
});
|
|
59
|
+
it("maintains indexes on routed inserts (find across value-children)", () => {
|
|
60
|
+
const store = makeStore();
|
|
61
|
+
const spatial = store.archetypes.Spatial;
|
|
62
|
+
const a = spatial.insert({ cell: 1, name: "alice" });
|
|
63
|
+
const b = spatial.insert({ cell: 2, name: "bob" });
|
|
64
|
+
expect(store.indexes.byName.get({ name: "alice" })).toBe(a);
|
|
65
|
+
expect(store.indexes.byName.get({ name: "bob" })).toBe(b);
|
|
66
|
+
});
|
|
67
|
+
it("enforces a unique index across different value-children, atomically", () => {
|
|
68
|
+
const store = makeStore();
|
|
69
|
+
const spatial = store.archetypes.Spatial;
|
|
70
|
+
const first = spatial.insert({ cell: 1, name: "dup" });
|
|
71
|
+
// Same name, different cell → different archetype, still a unique conflict.
|
|
72
|
+
expect(() => spatial.insert({ cell: 2, name: "dup" })).toThrow(/[Uu]nique/);
|
|
73
|
+
// The original row is intact (atomic — no partial mutation).
|
|
74
|
+
expect(store.indexes.byName.get({ name: "dup" })).toBe(first);
|
|
75
|
+
});
|
|
76
|
+
it("queryArchetypes `where` filters value-children at the store layer", () => {
|
|
77
|
+
const store = makeStore();
|
|
78
|
+
const spatial = store.archetypes.Spatial;
|
|
79
|
+
spatial.insert({ cell: 1, name: "a" });
|
|
80
|
+
spatial.insert({ cell: 2, name: "b" });
|
|
81
|
+
spatial.insert({ cell: 2, name: "c" });
|
|
82
|
+
const cell2 = store.queryArchetypes(["cell", "name"], { where: { cell: 2 } });
|
|
83
|
+
expect(cell2.length).toBe(1);
|
|
84
|
+
expect(cell2[0].rowCount).toBe(2);
|
|
85
|
+
});
|
|
86
|
+
it("store.ensureArchetype routes (no value) and resolves concrete (with value)", () => {
|
|
87
|
+
const store = makeStore();
|
|
88
|
+
const router = store.ensureArchetype(["id", "cell", "name"]);
|
|
89
|
+
expect("columns" in router).toBe(false);
|
|
90
|
+
router.insert({ cell: 5, name: "x" });
|
|
91
|
+
const concrete = store.ensureArchetype(["id", "cell", "name"], { cell: 5 });
|
|
92
|
+
expect(concrete.columns).toBeDefined();
|
|
93
|
+
expect(concrete.rowCount).toBe(1);
|
|
94
|
+
});
|
|
95
|
+
it("index find works when inserting via the concrete-child path too", () => {
|
|
96
|
+
const store = makeStore();
|
|
97
|
+
const concrete = store.ensureArchetype(["id", "cell", "name"], { cell: 9 });
|
|
98
|
+
const e = concrete.insert({ cell: 9, name: "zed" });
|
|
99
|
+
expect(store.indexes.byName.get({ name: "zed" })).toBe(e);
|
|
100
|
+
});
|
|
101
|
+
it("index updates when a partition-value change migrates an entity", () => {
|
|
102
|
+
const store = makeStore();
|
|
103
|
+
const spatial = store.archetypes.Spatial;
|
|
104
|
+
const e = spatial.insert({ cell: 1, name: "mover" });
|
|
105
|
+
store.update(e, { cell: 2 });
|
|
106
|
+
// Entity moved value-children; the name index still resolves it.
|
|
107
|
+
expect(store.get(e, "cell")).toBe(2);
|
|
108
|
+
expect(store.indexes.byName.get({ name: "mover" })).toBe(e);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=create-store.partition.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-store.partition.test.js","sourceRoot":"","sources":["../../../../src/ecs/store/public/create-store.partition.test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AAE/E,0EAA0E;AAC1E,gFAAgF;AAChF,8DAA8D;AAC9D,MAAM,MAAM,GAAG;IACX,UAAU,EAAE;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE;QAC1C,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC3B;IACD,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IACzC,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;CAC5C,CAAC;AAEX,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAE5C,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,kHAAkH,EAAE,GAAG,EAAE;QACxH,8EAA8E;QAC9E,0DAA0D;QAC1D,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE3C,2EAA2E;QAC3E,MA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,EAAE,OAAO,EAAE,CAAC,CAAC;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAC7B,iEAAiE;QACjE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// Compile-time (red/green) verification of the partition public surface on
|
|
4
|
+
// `Store` — discrimination of `store.archetypes.<Name>` and `ensureArchetype`,
|
|
5
|
+
// and the partition-keyed `queryArchetypes` where. Bodies live in never-called
|
|
6
|
+
// functions so the file type-checks without executing.
|
|
7
|
+
import { createStore } from "./create-store.js";
|
|
8
|
+
// store.archetypes.<Name> — discriminated per declared name
|
|
9
|
+
function _archetypesMap() {
|
|
10
|
+
// A partitioned named archetype is a Router — write via insert, no dense view.
|
|
11
|
+
store.archetypes.Spatial.insert({ cell: 1, position: 2 });
|
|
12
|
+
// @ts-expect-error - Spatial is a partition family (Router), not a concrete Archetype
|
|
13
|
+
store.archetypes.Spatial.columns;
|
|
14
|
+
// @ts-expect-error - a Router has no rowCount
|
|
15
|
+
store.archetypes.Spatial.rowCount;
|
|
16
|
+
// A non-partitioned named archetype is a concrete Archetype.
|
|
17
|
+
store.archetypes.Mob.columns;
|
|
18
|
+
store.archetypes.Mob.rowCount;
|
|
19
|
+
store.archetypes.Mob.insert({ position: 1, health: 100 });
|
|
20
|
+
}
|
|
21
|
+
// store.ensureArchetype(keys, values?) — discriminated
|
|
22
|
+
function _ensureArchetype() {
|
|
23
|
+
// Partition key present, no value → Router (insert only).
|
|
24
|
+
const router = store.ensureArchetype(["id", "cell", "position"]);
|
|
25
|
+
router.insert({ cell: 1, position: 2 });
|
|
26
|
+
// @ts-expect-error - a partition family (Router) has no columns
|
|
27
|
+
router.columns;
|
|
28
|
+
// Partition value supplied → concrete Archetype (dense access).
|
|
29
|
+
const concrete = store.ensureArchetype(["id", "cell", "position"], { cell: 7 });
|
|
30
|
+
concrete.columns;
|
|
31
|
+
concrete.rowCount;
|
|
32
|
+
// No partition component in the set → concrete Archetype.
|
|
33
|
+
const plain = store.ensureArchetype(["id", "position"]);
|
|
34
|
+
plain.columns;
|
|
35
|
+
// @ts-expect-error - partition value must match the component's type (cell is number)
|
|
36
|
+
store.ensureArchetype(["id", "cell", "position"], { cell: "nope" });
|
|
37
|
+
}
|
|
38
|
+
// queryArchetypes where — keyed to partition components only
|
|
39
|
+
function _queryWhere() {
|
|
40
|
+
store.queryArchetypes(["cell", "position"], { where: { cell: 7 } });
|
|
41
|
+
// @ts-expect-error - `position` is not a partition component; not archetype-decidable
|
|
42
|
+
store.queryArchetypes(["cell", "position"], { where: { position: 1 } });
|
|
43
|
+
// @ts-expect-error - partition where value must match the component type (cell is number)
|
|
44
|
+
store.queryArchetypes(["cell"], { where: { cell: "x" } });
|
|
45
|
+
}
|
|
46
|
+
// createStore return threads PK (inference, not just Store.FromSchema)
|
|
47
|
+
function _inferenceCheck() {
|
|
48
|
+
const s = createStore({
|
|
49
|
+
components: {
|
|
50
|
+
cell: { type: "integer", partition: true },
|
|
51
|
+
position: { type: "number" },
|
|
52
|
+
},
|
|
53
|
+
resources: {},
|
|
54
|
+
archetypes: { Spatial: ["cell", "position"] },
|
|
55
|
+
});
|
|
56
|
+
s.archetypes.Spatial.insert({ cell: 1, position: 2 });
|
|
57
|
+
// @ts-expect-error - inferred Spatial is a Router (partition family), no columns
|
|
58
|
+
s.archetypes.Spatial.columns;
|
|
59
|
+
return s;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=create-store.partition.type-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-store.partition.type-test.js","sourceRoot":"","sources":["../../../../src/ecs/store/public/create-store.partition.type-test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,EAAE;AACF,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,uDAAuD;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAmBhD,4DAA4D;AAC5D,SAAS,cAAc;IACnB,+EAA+E;IAC/E,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IAC1D,sFAAsF;IACtF,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC;IACjC,8CAA8C;IAC9C,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC;IAElC,6DAA6D;IAC7D,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC;IAC7B,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC9B,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,uDAAuD;AACvD,SAAS,gBAAgB;IACrB,0DAA0D;IAC1D,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IACjE,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IACxC,gEAAgE;IAChE,MAAM,CAAC,OAAO,CA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,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;KACvC,CAAC,CAAC;IACZ,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IACtD,iFAAiF;IACjF,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,OAAO,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { IntersectTuple, Simplify, StringKeyof } from "../../types/types.js";
|
|
|
6
6
|
import { Components } from "./components.js";
|
|
7
7
|
import { ArchetypeComponents } from "./archetype-components.js";
|
|
8
8
|
import { Archetype, ReadonlyArchetype } from "../archetype/archetype.js";
|
|
9
|
+
import { HasPartitionKey, PartitionKeysOf, ArchetypeOrRouter } from "./partition.js";
|
|
9
10
|
import { EntitySelectOptions } from "./entity-select-options.js";
|
|
10
11
|
import { Undoable } from "../database/undoable.js";
|
|
11
12
|
import { FromSchemas } from "../../schema/from-schemas.js";
|
|
@@ -25,14 +26,16 @@ interface BaseStore<C extends object = never> {
|
|
|
25
26
|
*/
|
|
26
27
|
toData(copy?: boolean): unknown;
|
|
27
28
|
}
|
|
28
|
-
export interface ReadonlyStore<C extends Components = never, R extends ResourceComponents = never, A extends ArchetypeComponents<StringKeyof<C>> = never, IX extends IndexDeclarations<C> = {}> extends BaseStore<C>, ReadonlyCore<C> {
|
|
29
|
+
export interface ReadonlyStore<C extends Components = never, R extends ResourceComponents = never, A extends ArchetypeComponents<StringKeyof<C>> = never, IX extends IndexDeclarations<C> = {}, PK extends string = never> extends BaseStore<C>, ReadonlyCore<C, PK> {
|
|
29
30
|
readonly resources: {
|
|
30
31
|
readonly [K in StringKeyof<R>]: R[K];
|
|
31
32
|
};
|
|
32
33
|
readonly archetypes: {
|
|
33
|
-
readonly [K in StringKeyof<A>]:
|
|
34
|
-
[
|
|
35
|
-
}
|
|
34
|
+
readonly [K in StringKeyof<A>]: ArchetypeOrRouter<HasPartitionKey<A[K][number], PK>, RequiredComponents & {
|
|
35
|
+
[Col in A[K][number]]: (C & RequiredComponents & OptionalComponents)[Col];
|
|
36
|
+
}, ReadonlyArchetype<RequiredComponents & {
|
|
37
|
+
[Col in A[K][number]]: (C & RequiredComponents & OptionalComponents)[Col];
|
|
38
|
+
}>>;
|
|
36
39
|
};
|
|
37
40
|
readonly indexes: {
|
|
38
41
|
readonly [K in keyof IX]: Index.Handle<C, IX[K]>;
|
|
@@ -42,19 +45,28 @@ export type ToReadonlyStore<T extends Store> = T extends Store<infer C, infer R>
|
|
|
42
45
|
/**
|
|
43
46
|
* Store is the main interface for storing components, entities and resources.
|
|
44
47
|
*/
|
|
45
|
-
export interface Store<C extends Components = {}, R extends ResourceComponents = {}, A extends ArchetypeComponents<StringKeyof<C>> = {}, IX extends IndexDeclarations<C> = {}> extends BaseStore<C>, Core<C> {
|
|
48
|
+
export interface Store<C extends Components = {}, R extends ResourceComponents = {}, A extends ArchetypeComponents<StringKeyof<C>> = {}, IX extends IndexDeclarations<C> = {}, PK extends string = never> extends BaseStore<C>, Core<C, PK> {
|
|
46
49
|
/**
|
|
47
50
|
* This is used when a store is used to represent a transaction.
|
|
48
51
|
* For most stores, this is ignored if it is set.
|
|
49
52
|
*/
|
|
50
53
|
undoable?: Undoable;
|
|
54
|
+
/**
|
|
55
|
+
* The user on whose behalf the current transaction is running, set by
|
|
56
|
+
* the dispatcher for the duration of a transaction body and `undefined`
|
|
57
|
+
* otherwise. A store *is* the context a transaction operates on; there is
|
|
58
|
+
* no separate transaction-context type.
|
|
59
|
+
*/
|
|
60
|
+
readonly userId?: number | string | undefined;
|
|
51
61
|
readonly resources: {
|
|
52
62
|
-readonly [K in StringKeyof<R>]: R[K];
|
|
53
63
|
};
|
|
54
64
|
readonly archetypes: {
|
|
55
|
-
-readonly [K in StringKeyof<A>]:
|
|
56
|
-
[
|
|
57
|
-
}
|
|
65
|
+
-readonly [K in StringKeyof<A>]: ArchetypeOrRouter<HasPartitionKey<A[K][number], PK>, RequiredComponents & {
|
|
66
|
+
[Col in A[K][number]]: (C & RequiredComponents & OptionalComponents)[Col];
|
|
67
|
+
}, Archetype<RequiredComponents & {
|
|
68
|
+
[Col in A[K][number]]: (C & RequiredComponents & OptionalComponents)[Col];
|
|
69
|
+
}>>;
|
|
58
70
|
};
|
|
59
71
|
/**
|
|
60
72
|
* Index handles keyed by user-chosen name. Returned handles are the
|
|
@@ -68,7 +80,7 @@ export interface Store<C extends Components = {}, R extends ResourceComponents =
|
|
|
68
80
|
/** Wipe all entities and reset resources to plugin defaults. O(num_archetypes + num_resources). */
|
|
69
81
|
reset(): void;
|
|
70
82
|
fromData(data: unknown): void;
|
|
71
|
-
extend<S extends Store.Schema>(schema: S): S extends Store.Schema<infer XC, infer XR, infer XA, infer XIX> ? Store<C & XC
|
|
83
|
+
extend<S extends Store.Schema>(schema: S): S extends Store.Schema<infer XC, infer XR, infer XA, infer XIX> ? Store<C & FromSchemas<XC>, R & FromSchemas<XR>, A & XA, IX & XIX, PK | PartitionKeysOf<XC>> : never;
|
|
72
84
|
}
|
|
73
85
|
export declare namespace Store {
|
|
74
86
|
type Components<S extends Store> = S extends Store<infer C, infer R, infer A> ? C : never;
|
|
@@ -82,7 +94,7 @@ export declare namespace Store {
|
|
|
82
94
|
readonly archetypes: A;
|
|
83
95
|
readonly indexes?: IX;
|
|
84
96
|
};
|
|
85
|
-
type FromSchema<T> = T extends Store.Schema<infer CS, infer RS, infer A, infer IX> ? Store<FromSchemas<CS>, FromSchemas<RS>, A, IX
|
|
97
|
+
type FromSchema<T> = T extends Store.Schema<infer CS, infer RS, infer A, infer IX> ? Store<FromSchemas<CS>, FromSchemas<RS>, A, IX, PartitionKeysOf<CS>> : never;
|
|
86
98
|
namespace Schema {
|
|
87
99
|
type Intersect<T extends readonly Schema<any, any, any, any>[]> = Store.Schema<{} & IntersectTuple<{
|
|
88
100
|
[K in keyof T]: T[K] extends Schema<infer C, any, any, any> ? C : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/ecs/store/store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/ecs/store/store.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAiFvD,2DAA2D;AAC3D,MAAM,KAAW,KAAK,CAsHrB;AAtHD,WAAiB,KAAK;IAuBlB,IAAiB,MAAM,CA4FtB;IA5FD,WAAiB,MAAM;QAsCnB;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;QACH,SAAgB,MAAM,CAOlB,MAKE,EACF,YAAgB;YAEhB,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,OAAO,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;YAClF,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBAC7C,OAAO;oBACH,UAAU,EAAE,EAAE,GAAG,GAAG,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE;oBACrD,SAAS,EAAE,EAAE,GAAG,GAAG,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE;oBAClD,UAAU,EAAE,EAAE,GAAG,GAAG,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE;oBACrD,OAAO,EAAE,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE;iBAC/C,CAAA;YACL,CAAC,EACG,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAS,CACxD,CAAC;QACN,CAAC;QA1Be,aAAM,SA0BrB,CAAA;IAEL,CAAC,EA5FgB,MAAM,GAAN,YAAM,KAAN,YAAM,QA4FtB;IAEY,YAAM,GAAG,WAAW,CAAC;AACtC,CAAC,EAtHgB,KAAK,KAAL,KAAK,QAsHrB;AAiCD,wEAAwE;AACxE,2EAA2E;AAC3E,MAAM,cAAc,GAAG;IACnB,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC3E,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;CAC3E,CAAC"}
|
|
@@ -4,11 +4,12 @@ import { ResourceComponents } from "./resource-components.js";
|
|
|
4
4
|
import { ArchetypeComponents } from "./archetype-components.js";
|
|
5
5
|
import { StringKeyof } from "../../types/types.js";
|
|
6
6
|
import { IndexDeclarations } from "./index-types.js";
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
export type AsyncArgsProvider
|
|
10
|
-
export type
|
|
11
|
-
|
|
7
|
+
import type { Store } from "./store.js";
|
|
8
|
+
import type { AsyncArgsProvider } from "../../types/async-args-provider.js";
|
|
9
|
+
export type { AsyncArgsProvider };
|
|
10
|
+
export type TransactionDeclaration<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C>>, IX extends IndexDeclarations<C> = {}, PK extends string = never, Input extends any | void = any> = (t: Store<C, R, A, IX, PK>, input: Input) => void | Entity;
|
|
11
|
+
export type TransactionDeclarations<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C>>, IX extends IndexDeclarations<C> = {}, PK extends string = never> = {
|
|
12
|
+
readonly [Q: string]: TransactionDeclaration<C, R, A, IX, PK>;
|
|
12
13
|
};
|
|
13
14
|
/**
|
|
14
15
|
* Converts from TransactionDeclarations to TransactionFunctions by removing
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep equality that **ignores ordering**: arrays are compared as multisets
|
|
3
|
+
* (same elements, any order) and objects by key/value regardless of key order.
|
|
4
|
+
*
|
|
5
|
+
* For JSON-style values — primitives, plain objects, and arrays. Use `equals`
|
|
6
|
+
* for the faster order-sensitive variant (and for typed buffers, which are
|
|
7
|
+
* ordered sequences).
|
|
8
|
+
*
|
|
9
|
+
* Array matching is O(n²) (each element pairs with a distinct partner), which
|
|
10
|
+
* is intended for modest collections such as a conformance `State`, not large
|
|
11
|
+
* hot-path arrays.
|
|
12
|
+
*/
|
|
13
|
+
export declare function equalsUnordered(a: unknown, b: unknown): boolean;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
/**
|
|
3
|
+
* Deep equality that **ignores ordering**: arrays are compared as multisets
|
|
4
|
+
* (same elements, any order) and objects by key/value regardless of key order.
|
|
5
|
+
*
|
|
6
|
+
* For JSON-style values — primitives, plain objects, and arrays. Use `equals`
|
|
7
|
+
* for the faster order-sensitive variant (and for typed buffers, which are
|
|
8
|
+
* ordered sequences).
|
|
9
|
+
*
|
|
10
|
+
* Array matching is O(n²) (each element pairs with a distinct partner), which
|
|
11
|
+
* is intended for modest collections such as a conformance `State`, not large
|
|
12
|
+
* hot-path arrays.
|
|
13
|
+
*/
|
|
14
|
+
export function equalsUnordered(a, b) {
|
|
15
|
+
// 1 Primitives / identical reference
|
|
16
|
+
if (Object.is(a, b))
|
|
17
|
+
return true;
|
|
18
|
+
if (a == null || b == null)
|
|
19
|
+
return false;
|
|
20
|
+
if (typeof a !== "object" || typeof b !== "object")
|
|
21
|
+
return false;
|
|
22
|
+
// 2 Arrays — multiset match. `equalsUnordered` is an equivalence relation,
|
|
23
|
+
// so equal elements are interchangeable and greedy first-match finds a
|
|
24
|
+
// perfect pairing iff one exists.
|
|
25
|
+
const aIsArr = Array.isArray(a);
|
|
26
|
+
const bIsArr = Array.isArray(b);
|
|
27
|
+
if (aIsArr || bIsArr) {
|
|
28
|
+
if (aIsArr !== bIsArr)
|
|
29
|
+
return false;
|
|
30
|
+
const aa = a;
|
|
31
|
+
const bb = b;
|
|
32
|
+
if (aa.length !== bb.length)
|
|
33
|
+
return false;
|
|
34
|
+
const used = new Array(bb.length).fill(false);
|
|
35
|
+
for (const x of aa) {
|
|
36
|
+
let matched = false;
|
|
37
|
+
for (let j = 0; j < bb.length; j++) {
|
|
38
|
+
if (!used[j] && equalsUnordered(x, bb[j])) {
|
|
39
|
+
used[j] = true;
|
|
40
|
+
matched = true;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (!matched)
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
// 3 Plain objects — key order irrelevant.
|
|
50
|
+
const ao = a;
|
|
51
|
+
const bo = b;
|
|
52
|
+
let keyBalance = 0;
|
|
53
|
+
for (const k in ao) {
|
|
54
|
+
keyBalance++;
|
|
55
|
+
if (!(k in bo))
|
|
56
|
+
return false;
|
|
57
|
+
if (!equalsUnordered(ao[k], bo[k]))
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
for (const _ in bo)
|
|
61
|
+
keyBalance--;
|
|
62
|
+
return keyBalance === 0;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=equals-unordered.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equals-unordered.js","sourceRoot":"","sources":["../src/equals-unordered.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,CAAU,EAAE,CAAU;IACpD,sCAAsC;IACtC,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI;QAAE,OAAO,KAAK,CAAC;IACzC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CA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C,IAAI,EAAE,EAAE,CAAC;QACnB,UAAU,EAAE,CAAC;QACb,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7B,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IACnD,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,CAAC;IACjC,OAAO,UAAU,KAAK,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { describe, it, expect } from "vitest";
|
|
3
|
+
import { equalsUnordered } from "./equals-unordered.js";
|
|
4
|
+
describe("equalsUnordered", () => {
|
|
5
|
+
it("matches primitives like deep equality", () => {
|
|
6
|
+
expect(equalsUnordered(1, 1)).toBe(true);
|
|
7
|
+
expect(equalsUnordered("a", "a")).toBe(true);
|
|
8
|
+
expect(equalsUnordered(1, 2)).toBe(false);
|
|
9
|
+
expect(equalsUnordered(null, undefined)).toBe(false);
|
|
10
|
+
expect(equalsUnordered(NaN, NaN)).toBe(true); // Object.is
|
|
11
|
+
});
|
|
12
|
+
it("ignores object key order", () => {
|
|
13
|
+
expect(equalsUnordered({ a: 1, b: 2 }, { b: 2, a: 1 })).toBe(true);
|
|
14
|
+
expect(equalsUnordered({ a: 1 }, { a: 1, b: 2 })).toBe(false);
|
|
15
|
+
expect(equalsUnordered({ a: 1, b: 2 }, { a: 1 })).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
it("ignores array order (multiset)", () => {
|
|
18
|
+
expect(equalsUnordered([1, 2, 3], [3, 1, 2])).toBe(true);
|
|
19
|
+
expect(equalsUnordered([{ x: 1 }, { x: 2 }], [{ x: 2 }, { x: 1 }])).toBe(true);
|
|
20
|
+
});
|
|
21
|
+
it("respects array multiplicity", () => {
|
|
22
|
+
expect(equalsUnordered([1, 1, 2], [1, 2, 2])).toBe(false);
|
|
23
|
+
expect(equalsUnordered([1, 1, 2], [2, 1, 1])).toBe(true);
|
|
24
|
+
expect(equalsUnordered([1, 2], [1, 2, 3])).toBe(false);
|
|
25
|
+
});
|
|
26
|
+
it("recurses through nested order differences", () => {
|
|
27
|
+
const a = { items: [{ tags: ["x", "y"] }, { tags: ["z"] }], meta: { a: 1, b: 2 } };
|
|
28
|
+
const b = { meta: { b: 2, a: 1 }, items: [{ tags: ["z"] }, { tags: ["y", "x"] }] };
|
|
29
|
+
expect(equalsUnordered(a, b)).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
it("distinguishes arrays from objects", () => {
|
|
32
|
+
expect(equalsUnordered([], {})).toBe(false);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=equals-unordered.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equals-unordered.test.js","sourceRoot":"","sources":["../src/equals-unordered.test.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1C,MA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,IAAI,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;QAC3C,MAAM,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { type Data } from "./data.js";
|
|
2
2
|
export { type IsData, type Primitive, type EqualReadonly, type IsFullyReadonly } from "./is-data.js";
|
|
3
3
|
export { equals } from "./equals.js";
|
|
4
|
+
export { equalsUnordered } from "./equals-unordered.js";
|
|
4
5
|
export { normalize } from "./normalize.js";
|
|
5
6
|
export { mutableClone } from "./mutable-clone.js";
|
|
6
7
|
export { type Mutable, type MutableArray, type MutableTuple, type MutableObject } from "./mutable.js";
|