@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,42 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { it } from "vitest";
|
|
3
|
+
import type { State } from "../../data/state/state.js";
|
|
4
|
+
import type { ConformanceCase } from "../../data/state/conformance-case.js";
|
|
5
|
+
import { expectStateMatches } from "../../data/state/expect-state-matches.js";
|
|
6
|
+
import type { CoreDatabase } from "../core-database/core-database.js";
|
|
7
|
+
import { createStore } from "./create-store.js";
|
|
8
|
+
import { fromState } from "./from-state.js";
|
|
9
|
+
import { toState } from "./to-state.js";
|
|
10
|
+
|
|
11
|
+
// The conformance runner, bound to THIS feature's projection (`fromState` /
|
|
12
|
+
// `toState`). For each case it proves the one conformance property
|
|
13
|
+
//
|
|
14
|
+
// toState(apply(fromState(before), args)) ≡ spec(before, args)
|
|
15
|
+
//
|
|
16
|
+
// in two asserted halves:
|
|
17
|
+
// 1. `spec(before, args) ≡ after` — keeps the shared case honest (a
|
|
18
|
+
// mis-authored `after` is caught here, independent of the ecs path).
|
|
19
|
+
// 2. seed `fromState(before)` → run the caller's `apply` → `toState ≡ after`
|
|
20
|
+
// — the ecs implementation reproduces the pure transform.
|
|
21
|
+
//
|
|
22
|
+
// `apply` receives the seeded writable store and calls the raw transaction
|
|
23
|
+
// function directly (a transaction is `(store, args) => void`, so no `Database`
|
|
24
|
+
// is involved). tictactoe's transactions take plain data args (a board index,
|
|
25
|
+
// or nothing), so no entity resolution is needed in `apply`. Entity collections
|
|
26
|
+
// compare as multisets; scalars and resources exactly (see `expectStateMatches`).
|
|
27
|
+
export const expectConforms = <Args>(config: {
|
|
28
|
+
readonly cases: readonly ConformanceCase<Args>[];
|
|
29
|
+
readonly spec: (before: State, args: Args) => State;
|
|
30
|
+
readonly apply: (store: CoreDatabase.Store, args: Args) => void;
|
|
31
|
+
}): void => {
|
|
32
|
+
for (const testCase of config.cases) {
|
|
33
|
+
it(testCase.name, () => {
|
|
34
|
+
expectStateMatches(config.spec(testCase.before, testCase.args), testCase.after);
|
|
35
|
+
|
|
36
|
+
const store = createStore();
|
|
37
|
+
fromState(store, testCase.before);
|
|
38
|
+
config.apply(store, testCase.args);
|
|
39
|
+
expectStateMatches(toState(store), testCase.after);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import type { State } from "../../data/state/state.js";
|
|
3
|
+
import { PlayerMark } from "../../data/player-mark/player-mark.js";
|
|
4
|
+
import type { CoreDatabase } from "../core-database/core-database.js";
|
|
5
|
+
|
|
6
|
+
// Seed a store to exactly match a `data/` `State`: clear every placed mark, set
|
|
7
|
+
// the scalar resources, then insert one PlacedMark entity per occupied board
|
|
8
|
+
// cell. The inverse of `toState`. Test-only — the bridge that lets an ecs
|
|
9
|
+
// mutation be checked against the pure transform it stands for (see
|
|
10
|
+
// `expect-conforms.ts`).
|
|
11
|
+
//
|
|
12
|
+
// Clearing iterates tail→head so each delete is from the tail (no hole-fill
|
|
13
|
+
// shift). The board string carries the marks (tictactoe stores each mark as an
|
|
14
|
+
// entity), so `PlayerMark.is` narrows each cell and skips the blanks.
|
|
15
|
+
export const fromState = (store: CoreDatabase.Store, state: State): void => {
|
|
16
|
+
for (const arch of store.queryArchetypes(store.archetypes.PlacedMark.components)) {
|
|
17
|
+
for (let row = arch.rowCount - 1; row >= 0; row--) {
|
|
18
|
+
store.delete(arch.columns.id.get(row));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
store.resources.firstPlayer = state.firstPlayer;
|
|
22
|
+
store.resources.xWins = state.xWins;
|
|
23
|
+
store.resources.oWins = state.oWins;
|
|
24
|
+
store.resources.draws = state.draws;
|
|
25
|
+
for (let index = 0; index < state.board.length; index++) {
|
|
26
|
+
const cell = state.board[index];
|
|
27
|
+
if (PlayerMark.is(cell)) {
|
|
28
|
+
store.archetypes.PlacedMark.insert({ mark: cell, index });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// Guards the projection itself. `fromState` and `toState` are the bridge every
|
|
4
|
+
// transaction conformance test trusts; a symmetric bug in the pair (e.g. both
|
|
5
|
+
// dropping the same field) would cancel out and mask a real ecs defect. This
|
|
6
|
+
// identity test — `toState(fromState(s)) ≡ s` over representative states —
|
|
7
|
+
// proves the projection round-trips faithfully on its own.
|
|
8
|
+
import { describe, it } from "vitest";
|
|
9
|
+
import type { State } from "../../data/state/state.js";
|
|
10
|
+
import { expectStateMatches } from "../../data/state/expect-state-matches.js";
|
|
11
|
+
import { createStore } from "./create-store.js";
|
|
12
|
+
import { fromState } from "./from-state.js";
|
|
13
|
+
import { toState } from "./to-state.js";
|
|
14
|
+
|
|
15
|
+
const states: readonly { readonly name: string; readonly state: State }[] = [
|
|
16
|
+
{
|
|
17
|
+
name: "a full board with non-zero counters",
|
|
18
|
+
state: { board: "XOXXOOOXX", firstPlayer: "O", xWins: 3, oWins: 2, draws: 1 },
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "an empty board (just the resources)",
|
|
22
|
+
state: { board: " ", firstPlayer: "X", xWins: 0, oWins: 0, draws: 0 },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "a game in progress",
|
|
26
|
+
state: { board: "X O X ", firstPlayer: "O", xWins: 1, oWins: 0, draws: 0 },
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
describe("ecs/conformance projection round-trips (toState ∘ fromState ≡ identity)", () => {
|
|
31
|
+
for (const { name, state } of states) {
|
|
32
|
+
it(name, () => {
|
|
33
|
+
const store = createStore();
|
|
34
|
+
fromState(store, state);
|
|
35
|
+
expectStateMatches(toState(store), state);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import type { State } from "../../data/state/state.js";
|
|
3
|
+
import { BoardState } from "../../data/board-state/board-state.js";
|
|
4
|
+
import type { PlacedMark } from "../../data/placed-mark/placed-mark.js";
|
|
5
|
+
import type { CoreDatabase } from "../core-database/core-database.js";
|
|
6
|
+
|
|
7
|
+
// Read a store back into a `data/` `State` — the inverse of `fromState`. The
|
|
8
|
+
// placed marks are read through the PlacedMark archetype's full component set
|
|
9
|
+
// (not an incidental single column) and folded into the compact board string,
|
|
10
|
+
// then joined with the scalar resources. Test-only.
|
|
11
|
+
const readBoard = (store: CoreDatabase.Store): BoardState => {
|
|
12
|
+
const marks: PlacedMark[] = [];
|
|
13
|
+
for (const arch of store.queryArchetypes(store.archetypes.PlacedMark.components)) {
|
|
14
|
+
for (let row = 0; row < arch.rowCount; row++) {
|
|
15
|
+
marks.push({
|
|
16
|
+
mark: arch.columns.mark.get(row),
|
|
17
|
+
index: arch.columns.index.get(row),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return BoardState.fromMarks(marks);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const toState = (store: CoreDatabase.Store): State => ({
|
|
25
|
+
board: readBoard(store),
|
|
26
|
+
firstPlayer: store.resources.firstPlayer,
|
|
27
|
+
xWins: store.resources.xWins,
|
|
28
|
+
oWins: store.resources.oWins,
|
|
29
|
+
draws: store.resources.draws,
|
|
30
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { Schema } from "@adobe/data/schema";
|
|
4
|
+
import type { Assert, Equal } from "@adobe/data/types";
|
|
5
|
+
import type { PlacedMark as PlacedMarkRow } from "../../data/placed-mark/placed-mark.js";
|
|
6
|
+
import { components } from "./components.js";
|
|
7
|
+
|
|
8
|
+
export const archetypes = Database.archetypes(components, {
|
|
9
|
+
PlacedMark: ["mark", "index"],
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
// Drift guard: the archetype's inferred row shape must equal the PlacedMark
|
|
13
|
+
// data type. Fails to compile if the component set and the type diverge.
|
|
14
|
+
const placedMarkSchema = Schema.fromArchetype(components, archetypes.PlacedMark);
|
|
15
|
+
type _PlacedMarkMatches = Assert<
|
|
16
|
+
Equal<Schema.ToType<typeof placedMarkSchema>, PlacedMarkRow>
|
|
17
|
+
>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { CellIndex } from "../../data/cell-index/cell-index.js";
|
|
4
|
+
import { PlayerMark } from "../../data/player-mark/player-mark.js";
|
|
5
|
+
|
|
6
|
+
export const components = Database.components({
|
|
7
|
+
document: {
|
|
8
|
+
mark: PlayerMark.schema,
|
|
9
|
+
index: CellIndex.schema,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import type { Store } from "@adobe/data/ecs";
|
|
4
|
+
import { components } from "./components.js";
|
|
5
|
+
import { resources } from "./resources.js";
|
|
6
|
+
import { archetypes } from "./archetypes.js";
|
|
7
|
+
|
|
8
|
+
// The core schema: all components, resources, and archetypes for the feature,
|
|
9
|
+
// grouped by scope inside components.ts / resources.ts. tictactoe is
|
|
10
|
+
// document-only (shared + durable) — no settings/presence/session state.
|
|
11
|
+
const coreDatabasePlugin = Database.Plugin.create({
|
|
12
|
+
components,
|
|
13
|
+
resources,
|
|
14
|
+
archetypes,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type CoreDatabase = Database.Plugin.ToDatabase<typeof coreDatabasePlugin>;
|
|
18
|
+
|
|
19
|
+
// Resolved component map, declared at module scope so the imported `Store`
|
|
20
|
+
// namespace isn't shadowed by `CoreDatabase.Store` below.
|
|
21
|
+
type CoreComponents = Store.Components<
|
|
22
|
+
Database.Plugin.ToStore<typeof coreDatabasePlugin>
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
export namespace CoreDatabase {
|
|
26
|
+
export const plugin = coreDatabasePlugin;
|
|
27
|
+
/**
|
|
28
|
+
* The store this database's transactions operate on: entities, resources,
|
|
29
|
+
* archetypes, index handles, and the initiating `userId`. A store *is* the
|
|
30
|
+
* transaction context — there is no separate transaction type.
|
|
31
|
+
*/
|
|
32
|
+
export type Store = Database.Plugin.ToStore<typeof coreDatabasePlugin>;
|
|
33
|
+
/** Index-declaration type bound to this database's components. */
|
|
34
|
+
export type Index = Database.Index<CoreComponents>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { PlayerMark } from "../../data/player-mark/player-mark.js";
|
|
4
|
+
import { Score } from "../../data/score/score.js";
|
|
5
|
+
|
|
6
|
+
export const resources = Database.resources({
|
|
7
|
+
document: {
|
|
8
|
+
firstPlayer: PlayerMark.schema,
|
|
9
|
+
xWins: Score.schema,
|
|
10
|
+
oWins: Score.schema,
|
|
11
|
+
draws: Score.schema,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// The assembled feature database. Its topmost layer is `service-database`
|
|
4
|
+
// (adds the AI agent services). Every consumer — `ui/`, the app entry,
|
|
5
|
+
// `ecs/conformance/` — references `FeatureDatabase`, never the topmost layer,
|
|
6
|
+
// so adding or dropping a layer changes only this one line.
|
|
7
|
+
export { ServiceDatabase as FeatureDatabase } from "./service-database/service-database.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { CoreDatabase } from "../core-database/core-database.js";
|
|
4
|
+
import * as indexes from "./indexes/index.js";
|
|
5
|
+
|
|
6
|
+
const indexDatabasePlugin = Database.Plugin.create({
|
|
7
|
+
extends: CoreDatabase.plugin,
|
|
8
|
+
indexes,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type IndexDatabase = Database.Plugin.ToDatabase<typeof indexDatabasePlugin>;
|
|
12
|
+
|
|
13
|
+
export namespace IndexDatabase {
|
|
14
|
+
export const plugin = indexDatabasePlugin;
|
|
15
|
+
export type Store = Database.Plugin.ToStore<typeof indexDatabasePlugin>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import type { CoreDatabase } from "../../core-database/core-database.js";
|
|
3
|
+
|
|
4
|
+
// O(1) lookup of the mark occupying a given cell. Unique: a cell holds at most
|
|
5
|
+
// one mark, so `db.indexes.byCell.get({ index }) → Entity | null`.
|
|
6
|
+
export const byCell = {
|
|
7
|
+
key: "index",
|
|
8
|
+
unique: true,
|
|
9
|
+
} as const satisfies CoreDatabase.Index;
|
package/references/data-lit-tictactoe/src/features/main/ecs/service-database/service-database.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { AgenticService } from "@adobe/data/service";
|
|
4
|
+
import { ComputedDatabase } from "../computed-database/computed-database.js";
|
|
5
|
+
import {
|
|
6
|
+
createAgentService,
|
|
7
|
+
createRootAgentService,
|
|
8
|
+
} from "./services/index.js";
|
|
9
|
+
|
|
10
|
+
const serviceDatabasePlugin = Database.Plugin.create({
|
|
11
|
+
extends: ComputedDatabase.plugin,
|
|
12
|
+
services: {
|
|
13
|
+
agent: (db): AgenticService => createRootAgentService(db),
|
|
14
|
+
agentX: (db): AgenticService => createAgentService(db, "X"),
|
|
15
|
+
agentO: (db): AgenticService => createAgentService(db, "O"),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type ServiceDatabase = Database.Plugin.ToDatabase<
|
|
20
|
+
typeof serviceDatabasePlugin
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
export namespace ServiceDatabase {
|
|
24
|
+
export const plugin = serviceDatabasePlugin;
|
|
25
|
+
export type Store = Database.Plugin.ToStore<typeof serviceDatabasePlugin>;
|
|
26
|
+
}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
-
|
|
3
|
-
import { Database } from "@adobe/data/ecs";
|
|
4
2
|
import { Observe } from "@adobe/data/observe";
|
|
5
3
|
import { AgenticService } from "@adobe/data/service";
|
|
6
|
-
import { BoardState } from "
|
|
7
|
-
import type { PlayerMark } from "
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
4
|
+
import { BoardState } from "../../../data/board-state/board-state.js";
|
|
5
|
+
import type { PlayerMark } from "../../../data/player-mark/player-mark.js";
|
|
6
|
+
import { board as boardComputed } from "../../computed-database/computed/board.js";
|
|
7
|
+
import type { ComputedDatabase } from "../../computed-database/computed-database.js";
|
|
10
8
|
|
|
11
9
|
const roleDescription = (mark: PlayerMark): string =>
|
|
12
10
|
`You are playing as ${mark} in tic-tac-toe. Play to the best of your ability.`;
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Build an {@link AgenticService} that plays a single mark. The service
|
|
14
|
+
* exposes the board, whether it is the agent's turn, the winner, and the
|
|
15
|
+
* `playMove` / `resetGame` actions gated on those conditions.
|
|
16
|
+
*/
|
|
17
|
+
export const createAgentService = (
|
|
18
|
+
db: ComputedDatabase,
|
|
16
19
|
agentMark: PlayerMark,
|
|
17
20
|
): AgenticService => {
|
|
18
|
-
const board = db
|
|
21
|
+
const board = boardComputed(db);
|
|
19
22
|
const isGameOver = Observe.withFilter(board, BoardState.isGameOver);
|
|
20
|
-
const currentPlayer = Observe.withFilter(
|
|
21
|
-
|
|
22
|
-
(nextBoard) =>
|
|
23
|
-
BoardState.currentPlayer(nextBoard, db.resources.firstPlayer),
|
|
23
|
+
const currentPlayer = Observe.withFilter(board, (nextBoard) =>
|
|
24
|
+
BoardState.currentPlayer(nextBoard, db.resources.firstPlayer),
|
|
24
25
|
);
|
|
25
26
|
const yourTurn = Observe.withMap(
|
|
26
27
|
Observe.fromProperties({ isGameOver, currentPlayer }),
|
|
@@ -88,30 +89,3 @@ const createTictactoeAgentService = (
|
|
|
88
89
|
},
|
|
89
90
|
});
|
|
90
91
|
};
|
|
91
|
-
|
|
92
|
-
const tictactoeLinkDescriptions = { x: "Play as X", o: "Play as O" } as const;
|
|
93
|
-
|
|
94
|
-
const createTictactoeRootAgentService = (
|
|
95
|
-
db: TictactoeDatabase,
|
|
96
|
-
): AgenticService => {
|
|
97
|
-
const root = AgenticService.create({
|
|
98
|
-
interface: {
|
|
99
|
-
x: { type: "link", description: tictactoeLinkDescriptions.x },
|
|
100
|
-
o: { type: "link", description: tictactoeLinkDescriptions.o },
|
|
101
|
-
},
|
|
102
|
-
implementation: {
|
|
103
|
-
x: createTictactoeAgentService(db, "X"),
|
|
104
|
-
o: createTictactoeAgentService(db, "O"),
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
return { ...root, linkDescriptions: tictactoeLinkDescriptions } as AgenticService;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const agentPlugin = Database.Plugin.create({
|
|
111
|
-
extends: tictactoePlugin,
|
|
112
|
-
services: {
|
|
113
|
-
agent: (db): AgenticService => createTictactoeRootAgentService(db),
|
|
114
|
-
agentX: (db): AgenticService => createTictactoeAgentService(db, "X"),
|
|
115
|
-
agentO: (db): AgenticService => createTictactoeAgentService(db, "O"),
|
|
116
|
-
},
|
|
117
|
-
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { AgenticService } from "@adobe/data/service";
|
|
3
|
+
import type { ComputedDatabase } from "../../computed-database/computed-database.js";
|
|
4
|
+
import { createAgentService } from "./create-agent-service.js";
|
|
5
|
+
|
|
6
|
+
const linkDescriptions = { x: "Play as X", o: "Play as O" } as const;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Root agent exposing the two mark-specific agents as links, so a supervising
|
|
10
|
+
* agent can choose which side to drive.
|
|
11
|
+
*/
|
|
12
|
+
export const createRootAgentService = (
|
|
13
|
+
db: ComputedDatabase,
|
|
14
|
+
): AgenticService => {
|
|
15
|
+
const root = AgenticService.create({
|
|
16
|
+
interface: {
|
|
17
|
+
x: { type: "link", description: linkDescriptions.x },
|
|
18
|
+
o: { type: "link", description: linkDescriptions.o },
|
|
19
|
+
},
|
|
20
|
+
implementation: {
|
|
21
|
+
x: createAgentService(db, "X"),
|
|
22
|
+
o: createAgentService(db, "O"),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
return { ...root, linkDescriptions } as AgenticService;
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Database } from "@adobe/data/ecs";
|
|
3
|
+
import { IndexDatabase } from "../index-database/index-database.js";
|
|
4
|
+
import * as transactions from "./transactions/index.js";
|
|
5
|
+
|
|
6
|
+
const transactionDatabasePlugin = Database.Plugin.create({
|
|
7
|
+
extends: IndexDatabase.plugin,
|
|
8
|
+
transactions,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type TransactionDatabase = Database.Plugin.ToDatabase<
|
|
12
|
+
typeof transactionDatabasePlugin
|
|
13
|
+
>;
|
|
14
|
+
|
|
15
|
+
export namespace TransactionDatabase {
|
|
16
|
+
export const plugin = transactionDatabasePlugin;
|
|
17
|
+
export type Store = Database.Plugin.ToStore<typeof transactionDatabasePlugin>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// `playMove` conforms to `State.playMove`. Both take a plain board index, so the
|
|
4
|
+
// `apply` closure calls the raw transaction directly on the seeded store — no
|
|
5
|
+
// entity resolution needed. Every branch of the move guard (legal placement,
|
|
6
|
+
// alternation, win, occupied / out-of-bounds / game-over no-ops) is covered by
|
|
7
|
+
// the shared cases.
|
|
8
|
+
import { describe } from "vitest";
|
|
9
|
+
import { State } from "../../../data/state/state.js";
|
|
10
|
+
import { cases } from "../../../data/state/play-move.cases.js";
|
|
11
|
+
import { expectConforms } from "../../conformance/expect-conforms.js";
|
|
12
|
+
import { playMove } from "./play-move.js";
|
|
13
|
+
|
|
14
|
+
describe("playMove transaction conforms to State.playMove", () => {
|
|
15
|
+
expectConforms({
|
|
16
|
+
cases,
|
|
17
|
+
spec: State.playMove,
|
|
18
|
+
apply: playMove,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { BoardState } from "../../../data/board-state/board-state.js";
|
|
3
|
+
import { PlayMoveArgs } from "../../../data/play-move-args/play-move-args.js";
|
|
4
|
+
import type { CoreDatabase } from "../../core-database/core-database.js";
|
|
5
|
+
import { readBoard } from "./read-board.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Play the current player's mark into `index` by creating a PlacedMark entity.
|
|
9
|
+
* In sync/P2P mode (`t.userId` set) a peer may only play their own mark;
|
|
10
|
+
* illegal or out-of-turn moves are silently ignored so the transaction stays
|
|
11
|
+
* idempotent under replay.
|
|
12
|
+
*/
|
|
13
|
+
export const playMove = (t: CoreDatabase.Store, { index }: PlayMoveArgs) => {
|
|
14
|
+
const board = readBoard(t);
|
|
15
|
+
const mark = BoardState.currentPlayer(board, t.resources.firstPlayer);
|
|
16
|
+
if (t.userId !== undefined && t.userId !== mark) return;
|
|
17
|
+
if (!PlayMoveArgs.canPlayMove({ board, index }).ok) return;
|
|
18
|
+
t.archetypes.PlacedMark.insert({ mark, index });
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { BoardState } from "../../../data/board-state/board-state.js";
|
|
3
|
+
import type { PlacedMark } from "../../../data/placed-mark/placed-mark.js";
|
|
4
|
+
import type { CoreDatabase } from "../../core-database/core-database.js";
|
|
5
|
+
|
|
6
|
+
// Synchronously project the placed-mark entities into a BoardState snapshot,
|
|
7
|
+
// for transactions that need the current board (playMove, restartGame). The
|
|
8
|
+
// board computed does the same projection reactively.
|
|
9
|
+
export const readBoard = (t: CoreDatabase.Store): BoardState => {
|
|
10
|
+
const marks: PlacedMark[] = [];
|
|
11
|
+
for (const arch of t.queryArchetypes(t.archetypes.PlacedMark.components)) {
|
|
12
|
+
for (let row = 0; row < arch.rowCount; row++) {
|
|
13
|
+
marks.push({
|
|
14
|
+
mark: arch.columns.mark.get(row),
|
|
15
|
+
index: arch.columns.index.get(row),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return BoardState.fromMarks(marks);
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
//
|
|
3
|
+
// `restartGame` conforms to `State.restartGame`. It takes no args, so the
|
|
4
|
+
// `apply` closure just dispatches the raw transaction on the seeded store. The
|
|
5
|
+
// shared cases cover each scoreboard outcome — X win, O win, draw, and an
|
|
6
|
+
// unfinished restart that bumps no counter.
|
|
7
|
+
import { describe } from "vitest";
|
|
8
|
+
import { State } from "../../../data/state/state.js";
|
|
9
|
+
import { cases } from "../../../data/state/restart-game.cases.js";
|
|
10
|
+
import { expectConforms } from "../../conformance/expect-conforms.js";
|
|
11
|
+
import { restartGame } from "./restart-game.js";
|
|
12
|
+
|
|
13
|
+
describe("restartGame transaction conforms to State.restartGame", () => {
|
|
14
|
+
expectConforms({
|
|
15
|
+
cases,
|
|
16
|
+
spec: State.restartGame,
|
|
17
|
+
apply: restartGame,
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { BoardState } from "../../../data/board-state/board-state.js";
|
|
3
|
+
import { PlayerMark } from "../../../data/player-mark/player-mark.js";
|
|
4
|
+
import type { CoreDatabase } from "../../core-database/core-database.js";
|
|
5
|
+
import { readBoard } from "./read-board.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Tally the finished game into the win/draw counters, hand the first move to
|
|
9
|
+
* the opposite player, and clear the board by deleting every PlacedMark entity.
|
|
10
|
+
*/
|
|
11
|
+
export const restartGame = (t: CoreDatabase.Store) => {
|
|
12
|
+
const board = readBoard(t);
|
|
13
|
+
const winner = BoardState.getWinner(board);
|
|
14
|
+
const status = BoardState.deriveStatus(board);
|
|
15
|
+
if (winner === "X") t.resources.xWins = t.resources.xWins + 1;
|
|
16
|
+
else if (winner === "O") t.resources.oWins = t.resources.oWins + 1;
|
|
17
|
+
else if (status === "draw") t.resources.draws = t.resources.draws + 1;
|
|
18
|
+
t.resources.firstPlayer = PlayerMark.opponent[t.resources.firstPlayer];
|
|
19
|
+
|
|
20
|
+
for (const arch of t.queryArchetypes(t.archetypes.PlacedMark.components)) {
|
|
21
|
+
for (let row = arch.rowCount - 1; row >= 0; row--) {
|
|
22
|
+
t.delete(arch.columns.id.get(row));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
2
|
|
|
3
3
|
import { customElement } from "lit/decorators.js";
|
|
4
|
-
import { TictactoeElement } from "
|
|
4
|
+
import { TictactoeElement } from "../tictactoe-element.js";
|
|
5
5
|
import { styles } from "./tictactoe-app.css.js";
|
|
6
6
|
import * as presentation from "./tictactoe-app-presentation.js";
|
|
7
7
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
// @vitest-environment jsdom
|
|
3
|
+
// jsdom only so the lazy child-element wrappers (`void import(...)`) can load;
|
|
4
|
+
// the assertions never touch the DOM.
|
|
5
|
+
import { describe, it, expect } from "vitest";
|
|
6
|
+
import { Template } from "@adobe/data-lit";
|
|
7
|
+
import { render } from "./tictactoe-app-presentation.js";
|
|
8
|
+
|
|
9
|
+
describe("tictactoe-app-presentation", () => {
|
|
10
|
+
it("mounts the board and the hud", () => {
|
|
11
|
+
const t = Template.from(render());
|
|
12
|
+
expect(t.has("<tictactoe-board")).toBe(true);
|
|
13
|
+
expect(t.has("<tictactoe-hud")).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
|
|
3
|
+
import { html, type TemplateResult } from "lit";
|
|
4
|
+
import type { ComputedDatabase } from "../../ecs/computed-database/computed-database.js";
|
|
5
|
+
|
|
6
|
+
type TictactoeService = ComputedDatabase;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Generic over `S` so callers may pass a database built from any plugin
|
|
10
|
+
* that extends the base game database (for example one that adds AI agents
|
|
11
|
+
* or peer presence). The element class itself is typed on the minimal
|
|
12
|
+
* `ComputedDatabase` surface and ignores the extra capabilities.
|
|
13
|
+
*/
|
|
14
|
+
export const Tictactoe = <S extends TictactoeService>(args: { service: S }): TemplateResult => {
|
|
15
|
+
void import("./tictactoe-app-element.js");
|
|
16
|
+
return html`<tictactoe-app .service=${args.service}></tictactoe-app>`;
|
|
17
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
2
|
|
|
3
3
|
import { customElement } from "lit/decorators.js";
|
|
4
|
-
import { TictactoeElement } from "
|
|
4
|
+
import { TictactoeElement } from "../tictactoe-element.js";
|
|
5
5
|
import { styles } from "./tictactoe-board.css.js";
|
|
6
6
|
import * as presentation from "./tictactoe-board-presentation.js";
|
|
7
7
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
// @vitest-environment jsdom
|
|
3
|
+
// jsdom only so the lazy cell wrapper (`void import(...)`) can load; the
|
|
4
|
+
// assertions never touch the DOM.
|
|
5
|
+
import { describe, it, expect } from "vitest";
|
|
6
|
+
import { Template } from "@adobe/data-lit";
|
|
7
|
+
import { render } from "./tictactoe-board-presentation.js";
|
|
8
|
+
|
|
9
|
+
describe("tictactoe-board-presentation", () => {
|
|
10
|
+
it("renders a 3x3 board of nine cells", () => {
|
|
11
|
+
const t = Template.from(render());
|
|
12
|
+
expect(t.has("board")).toBe(true);
|
|
13
|
+
expect(t.has("<tictactoe-cell")).toBe(true);
|
|
14
|
+
expect(t.children).toHaveLength(9);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// © 2026 Adobe. MIT License. See /LICENSE for details.
|
|
2
|
+
import { Observe } from "@adobe/data/observe";
|
|
3
|
+
import type { UIService } from "@adobe/data/service";
|
|
4
|
+
import { BoardCell } from "../../data/board-cell/board-cell.js";
|
|
5
|
+
import { GameStatus } from "../../data/game-status/game-status.js";
|
|
6
|
+
import type { ComputedDatabase } from "../../ecs/computed-database/computed-database.js";
|
|
7
|
+
|
|
8
|
+
// Reactive per-cell view. The mark is looked up through the `byCell` index —
|
|
9
|
+
// the cell binds to whichever entity occupies its board position — while
|
|
10
|
+
// winning-line membership and playability come from the game-level computeds.
|
|
11
|
+
export const observeCell = (
|
|
12
|
+
db: UIService.FromService<ComputedDatabase>,
|
|
13
|
+
index: number,
|
|
14
|
+
) =>
|
|
15
|
+
Observe.withMap(
|
|
16
|
+
Observe.fromProperties({
|
|
17
|
+
occupants: Observe.fromKeys(
|
|
18
|
+
db.indexes.byCell.observe({ index }),
|
|
19
|
+
(id) => db.observe.entity(id),
|
|
20
|
+
),
|
|
21
|
+
winningLine: db.computed.winningLine,
|
|
22
|
+
status: db.computed.status,
|
|
23
|
+
}),
|
|
24
|
+
({ occupants, winningLine, status }) => {
|
|
25
|
+
const cell: BoardCell = occupants[0]?.mark ?? BoardCell.blank;
|
|
26
|
+
return {
|
|
27
|
+
cell,
|
|
28
|
+
isWinning: winningLine?.includes(index) ?? false,
|
|
29
|
+
isPlayable: GameStatus.isActive(status) && cell === BoardCell.blank,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
);
|