@pibbl/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +19 -0
- package/README.md +76 -0
- package/THIRD_PARTY_NOTICES.txt +205 -0
- package/dist/features/particles/index.d.ts +7 -0
- package/dist/features/particles/index.js +26 -0
- package/dist/features/particles/index.js.map +7 -0
- package/dist/features/particles/index.mjs +1 -0
- package/dist/features/particles/lib/canvas/birth-ledger.d.ts +69 -0
- package/dist/features/particles/lib/canvas/birth-ledger.js +752 -0
- package/dist/features/particles/lib/canvas/birth-ledger.js.map +7 -0
- package/dist/features/particles/lib/canvas/component.d.ts +14 -0
- package/dist/features/particles/lib/canvas/component.js +249 -0
- package/dist/features/particles/lib/canvas/component.js.map +7 -0
- package/dist/features/particles/lib/canvas/executor.d.ts +31 -0
- package/dist/features/particles/lib/canvas/executor.js +537 -0
- package/dist/features/particles/lib/canvas/executor.js.map +7 -0
- package/dist/features/particles/lib/canvas/primitive.d.ts +14 -0
- package/dist/features/particles/lib/canvas/primitive.js +50 -0
- package/dist/features/particles/lib/canvas/primitive.js.map +7 -0
- package/dist/features/particles/lib/canvas/raster-cache.d.ts +13 -0
- package/dist/features/particles/lib/canvas/raster-cache.js +106 -0
- package/dist/features/particles/lib/canvas/raster-cache.js.map +7 -0
- package/dist/features/particles/lib/color.d.ts +7 -0
- package/dist/features/particles/lib/color.js +159 -0
- package/dist/features/particles/lib/color.js.map +7 -0
- package/dist/features/particles/lib/compiler.d.ts +134 -0
- package/dist/features/particles/lib/compiler.js +443 -0
- package/dist/features/particles/lib/compiler.js.map +7 -0
- package/dist/features/particles/lib/curve.d.ts +19 -0
- package/dist/features/particles/lib/curve.js +129 -0
- package/dist/features/particles/lib/curve.js.map +7 -0
- package/dist/features/particles/lib/definition-records.d.ts +58 -0
- package/dist/features/particles/lib/definition-records.js +500 -0
- package/dist/features/particles/lib/definition-records.js.map +7 -0
- package/dist/features/particles/lib/definition.d.ts +18 -0
- package/dist/features/particles/lib/definition.js +602 -0
- package/dist/features/particles/lib/definition.js.map +7 -0
- package/dist/features/particles/lib/emission.d.ts +54 -0
- package/dist/features/particles/lib/emission.js +184 -0
- package/dist/features/particles/lib/emission.js.map +7 -0
- package/dist/features/particles/lib/flow/field.d.ts +81 -0
- package/dist/features/particles/lib/flow/field.js +585 -0
- package/dist/features/particles/lib/flow/field.js.map +7 -0
- package/dist/features/particles/lib/flow/hook.d.ts +158 -0
- package/dist/features/particles/lib/flow/hook.js +215 -0
- package/dist/features/particles/lib/flow/hook.js.map +7 -0
- package/dist/features/particles/lib/flow/population.d.ts +25 -0
- package/dist/features/particles/lib/flow/population.js +104 -0
- package/dist/features/particles/lib/flow/population.js.map +7 -0
- package/dist/features/particles/lib/particle.d.ts +113 -0
- package/dist/features/particles/lib/particle.js +192 -0
- package/dist/features/particles/lib/particle.js.map +7 -0
- package/dist/features/particles/lib/random.d.ts +16 -0
- package/dist/features/particles/lib/random.js +61 -0
- package/dist/features/particles/lib/random.js.map +7 -0
- package/dist/features/particles/lib/sample.d.ts +32 -0
- package/dist/features/particles/lib/sample.js +397 -0
- package/dist/features/particles/lib/sample.js.map +7 -0
- package/dist/features/particles/lib/signal-inputs.d.ts +6 -0
- package/dist/features/particles/lib/signal-inputs.js +41 -0
- package/dist/features/particles/lib/signal-inputs.js.map +7 -0
- package/dist/features/particles/lib/system/binding.d.ts +59 -0
- package/dist/features/particles/lib/system/binding.js +122 -0
- package/dist/features/particles/lib/system/binding.js.map +7 -0
- package/dist/features/particles/lib/system/controller.d.ts +58 -0
- package/dist/features/particles/lib/system/controller.js +1446 -0
- package/dist/features/particles/lib/system/controller.js.map +7 -0
- package/dist/features/particles/lib/system/hook.d.ts +13 -0
- package/dist/features/particles/lib/system/hook.js +52 -0
- package/dist/features/particles/lib/system/hook.js.map +7 -0
- package/dist/features/particles/lib/system/ownership.d.ts +26 -0
- package/dist/features/particles/lib/system/ownership.js +128 -0
- package/dist/features/particles/lib/system/ownership.js.map +7 -0
- package/dist/features/particles/lib/types.d.ts +983 -0
- package/dist/features/physics/2d-geometry.d.ts +216 -0
- package/dist/features/physics/2d-geometry.js +59 -0
- package/dist/features/physics/2d-geometry.js.map +7 -0
- package/dist/features/physics/2d-geometry.mjs +1 -0
- package/dist/features/physics/2d-testing.d.ts +80 -0
- package/dist/features/physics/2d-testing.js +141 -0
- package/dist/features/physics/2d-testing.js.map +7 -0
- package/dist/features/physics/2d-testing.mjs +1 -0
- package/dist/features/physics/2d.d.ts +165 -0
- package/dist/features/physics/2d.js +119 -0
- package/dist/features/physics/2d.js.map +7 -0
- package/dist/features/physics/2d.mjs +1 -0
- package/dist/features/physics/lib/2d/canvas/components.d.ts +46 -0
- package/dist/features/physics/lib/2d/canvas/components.js +212 -0
- package/dist/features/physics/lib/2d/canvas/components.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/custom.d.ts +24 -0
- package/dist/features/physics/lib/2d/canvas/custom.js +45 -0
- package/dist/features/physics/lib/2d/canvas/custom.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/debug.d.ts +23 -0
- package/dist/features/physics/lib/2d/canvas/debug.js +53 -0
- package/dist/features/physics/lib/2d/canvas/debug.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/inference.d.ts +9 -0
- package/dist/features/physics/lib/2d/canvas/inference.js +704 -0
- package/dist/features/physics/lib/2d/canvas/inference.js.map +7 -0
- package/dist/features/physics/lib/2d/canvas/presentation.d.ts +11 -0
- package/dist/features/physics/lib/2d/canvas/presentation.js +169 -0
- package/dist/features/physics/lib/2d/canvas/presentation.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/analytic.d.ts +15 -0
- package/dist/features/physics/lib/2d/collision/analytic.js +151 -0
- package/dist/features/physics/lib/2d/collision/analytic.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/casts.d.ts +37 -0
- package/dist/features/physics/lib/2d/collision/casts.js +631 -0
- package/dist/features/physics/lib/2d/collision/casts.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/epa.d.ts +21 -0
- package/dist/features/physics/lib/2d/collision/epa.js +102 -0
- package/dist/features/physics/lib/2d/collision/epa.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/gjk.d.ts +28 -0
- package/dist/features/physics/lib/2d/collision/gjk.js +233 -0
- package/dist/features/physics/lib/2d/collision/gjk.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/manifold.d.ts +35 -0
- package/dist/features/physics/lib/2d/collision/manifold.js +238 -0
- package/dist/features/physics/lib/2d/collision/manifold.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/pairs.d.ts +10 -0
- package/dist/features/physics/lib/2d/collision/pairs.js +285 -0
- package/dist/features/physics/lib/2d/collision/pairs.js.map +7 -0
- package/dist/features/physics/lib/2d/collision/support.d.ts +20 -0
- package/dist/features/physics/lib/2d/collision/support.js +155 -0
- package/dist/features/physics/lib/2d/collision/support.js.map +7 -0
- package/dist/features/physics/lib/2d/inspection-types.d.ts +159 -0
- package/dist/features/physics/lib/2d/math.d.ts +27 -0
- package/dist/features/physics/lib/2d/math.js +314 -0
- package/dist/features/physics/lib/2d/math.js.map +7 -0
- package/dist/features/physics/lib/2d/numeric-policy.d.ts +24 -0
- package/dist/features/physics/lib/2d/numeric-policy.js +51 -0
- package/dist/features/physics/lib/2d/numeric-policy.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.d.ts +148 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.js +305 -0
- package/dist/features/physics/lib/2d/runtime/body-handle.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/context.d.ts +9 -0
- package/dist/features/physics/lib/2d/runtime/context.js +57 -0
- package/dist/features/physics/lib/2d/runtime/context.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/controller.d.ts +106 -0
- package/dist/features/physics/lib/2d/runtime/controller.js +1317 -0
- package/dist/features/physics/lib/2d/runtime/controller.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.d.ts +153 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.js +526 -0
- package/dist/features/physics/lib/2d/runtime/descriptors.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/events.d.ts +56 -0
- package/dist/features/physics/lib/2d/runtime/events.js +153 -0
- package/dist/features/physics/lib/2d/runtime/events.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.d.ts +22 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.js +192 -0
- package/dist/features/physics/lib/2d/runtime/obstacles.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/ownership.d.ts +41 -0
- package/dist/features/physics/lib/2d/runtime/ownership.js +46 -0
- package/dist/features/physics/lib/2d/runtime/ownership.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/trace.d.ts +32 -0
- package/dist/features/physics/lib/2d/runtime/trace.js +22 -0
- package/dist/features/physics/lib/2d/runtime/trace.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/world-component.d.ts +18 -0
- package/dist/features/physics/lib/2d/runtime/world-component.js +41 -0
- package/dist/features/physics/lib/2d/runtime/world-component.js.map +7 -0
- package/dist/features/physics/lib/2d/runtime/world-props.d.ts +16 -0
- package/dist/features/physics/lib/2d/shape-records.d.ts +60 -0
- package/dist/features/physics/lib/2d/shape-records.js +26 -0
- package/dist/features/physics/lib/2d/shape-records.js.map +7 -0
- package/dist/features/physics/lib/2d/shapes.d.ts +191 -0
- package/dist/features/physics/lib/2d/shapes.js +543 -0
- package/dist/features/physics/lib/2d/shapes.js.map +7 -0
- package/dist/features/physics/lib/2d/types.d.ts +713 -0
- package/dist/features/physics/lib/2d/types.js +1 -0
- package/dist/features/physics/lib/2d/types.js.map +7 -0
- package/dist/features/physics/lib/2d/world/broad-phase.d.ts +77 -0
- package/dist/features/physics/lib/2d/world/broad-phase.js +762 -0
- package/dist/features/physics/lib/2d/world/broad-phase.js.map +7 -0
- package/dist/features/physics/lib/2d/world/ccd.d.ts +19 -0
- package/dist/features/physics/lib/2d/world/ccd.js +265 -0
- package/dist/features/physics/lib/2d/world/ccd.js.map +7 -0
- package/dist/features/physics/lib/2d/world/contact-cache.d.ts +81 -0
- package/dist/features/physics/lib/2d/world/contact-cache.js +497 -0
- package/dist/features/physics/lib/2d/world/contact-cache.js.map +7 -0
- package/dist/features/physics/lib/2d/world/integrator.d.ts +11 -0
- package/dist/features/physics/lib/2d/world/integrator.js +99 -0
- package/dist/features/physics/lib/2d/world/integrator.js.map +7 -0
- package/dist/features/physics/lib/2d/world/queries.d.ts +62 -0
- package/dist/features/physics/lib/2d/world/queries.js +424 -0
- package/dist/features/physics/lib/2d/world/queries.js.map +7 -0
- package/dist/features/physics/lib/2d/world/rapier-engine.js +7054 -0
- package/dist/features/physics/lib/2d/world/rapier-engine.js.map +7 -0
- package/dist/features/physics/lib/2d/world/rapier.d.ts +50 -0
- package/dist/features/physics/lib/2d/world/rapier.js +655 -0
- package/dist/features/physics/lib/2d/world/rapier.js.map +7 -0
- package/dist/features/physics/lib/2d/world/solver.d.ts +58 -0
- package/dist/features/physics/lib/2d/world/solver.js +660 -0
- package/dist/features/physics/lib/2d/world/solver.js.map +7 -0
- package/dist/features/physics/lib/2d/world/storage.d.ts +96 -0
- package/dist/features/physics/lib/2d/world/storage.js +371 -0
- package/dist/features/physics/lib/2d/world/storage.js.map +7 -0
- package/dist/features/physics/lib/2d/world/world.d.ts +265 -0
- package/dist/features/physics/lib/2d/world/world.js +1713 -0
- package/dist/features/physics/lib/2d/world/world.js.map +7 -0
- package/dist/features/physics/lib/shared/signal-inputs.d.ts +5 -0
- package/dist/features/physics/lib/shared/signal-inputs.js +20 -0
- package/dist/features/physics/lib/shared/signal-inputs.js.map +7 -0
- package/dist/features/physics/lib/shared/validation.d.ts +5 -0
- package/dist/features/physics/lib/shared/validation.js +48 -0
- package/dist/features/physics/lib/shared/validation.js.map +7 -0
- package/dist/features/sprites/formats/aseprite.js +23 -0
- package/dist/features/sprites/formats/aseprite.js.map +7 -0
- package/dist/features/sprites/formats/aseprite.mjs +1 -0
- package/dist/features/sprites/formats/texture-packer.js +14 -0
- package/dist/features/sprites/formats/texture-packer.js.map +7 -0
- package/dist/features/sprites/formats/texture-packer.mjs +1 -0
- package/dist/features/sprites/index.js +9 -0
- package/dist/features/sprites/index.js.map +7 -0
- package/dist/features/sprites/index.mjs +1 -0
- package/dist/features/sprites/loader.js +63 -0
- package/dist/features/sprites/loader.js.map +7 -0
- package/dist/features/sprites/model.js +64 -0
- package/dist/features/sprites/model.js.map +7 -0
- package/dist/features/sprites/sprite.js +31 -0
- package/dist/features/sprites/sprite.js.map +7 -0
- package/dist/features/textures/index.d.ts +22 -0
- package/dist/features/textures/index.js +31 -0
- package/dist/features/textures/index.js.map +7 -0
- package/dist/features/textures/index.mjs +1 -0
- package/dist/features/textures/lib/definitions.d.ts +117 -0
- package/dist/features/textures/lib/definitions.js +179 -0
- package/dist/features/textures/lib/definitions.js.map +7 -0
- package/dist/features/textures/lib/electric-boundary.d.ts +3 -0
- package/dist/features/textures/lib/electric-boundary.js +11 -0
- package/dist/features/textures/lib/electric-boundary.js.map +7 -0
- package/dist/features/textures/lib/electric-shared.d.ts +69 -0
- package/dist/features/textures/lib/electric-shared.js +43 -0
- package/dist/features/textures/lib/electric-shared.js.map +7 -0
- package/dist/features/textures/lib/electric-sources.d.ts +50 -0
- package/dist/features/textures/lib/electric-sources.js +43 -0
- package/dist/features/textures/lib/electric-sources.js.map +7 -0
- package/dist/features/textures/lib/lightning.d.ts +72 -0
- package/dist/features/textures/lib/lightning.js +139 -0
- package/dist/features/textures/lib/lightning.js.map +7 -0
- package/dist/features/textures/lib/material-field.d.ts +12 -0
- package/dist/features/textures/lib/material-field.js +31 -0
- package/dist/features/textures/lib/material-field.js.map +7 -0
- package/dist/features/textures/lib/palette.d.ts +45 -0
- package/dist/features/textures/lib/palette.js +52 -0
- package/dist/features/textures/lib/palette.js.map +7 -0
- package/dist/features/textures/lib/presentation.d.ts +54 -0
- package/dist/features/textures/lib/presentation.js +83 -0
- package/dist/features/textures/lib/presentation.js.map +7 -0
- package/dist/features/textures/lib/procedural-texture.d.ts +44 -0
- package/dist/features/textures/lib/procedural-texture.js +110 -0
- package/dist/features/textures/lib/procedural-texture.js.map +7 -0
- package/dist/features/textures/lib/rain-drops.d.ts +96 -0
- package/dist/features/textures/lib/rain-drops.js +322 -0
- package/dist/features/textures/lib/rain-drops.js.map +7 -0
- package/dist/features/textures/lib/reaction-diffusion.d.ts +67 -0
- package/dist/features/textures/lib/reaction-diffusion.js +210 -0
- package/dist/features/textures/lib/reaction-diffusion.js.map +7 -0
- package/dist/features/textures/lib/simulation.d.ts +16 -0
- package/dist/features/textures/lib/simulation.js +85 -0
- package/dist/features/textures/lib/simulation.js.map +7 -0
- package/dist/features/textures/lib/tendrils.d.ts +57 -0
- package/dist/features/textures/lib/tendrils.js +216 -0
- package/dist/features/textures/lib/tendrils.js.map +7 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/cellular-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/electric.d.ts +88 -0
- package/dist/features/textures/lib/wasm/electric.js +299 -0
- package/dist/features/textures/lib/wasm/electric.js.map +7 -0
- package/dist/features/textures/lib/wasm/ink-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/ink-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/ink-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/lightning-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/marble-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/marble-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/marble-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/memory.d.ts +31 -0
- package/dist/features/textures/lib/wasm/memory.js +103 -0
- package/dist/features/textures/lib/wasm/memory.js.map +7 -0
- package/dist/features/textures/lib/wasm/paper-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/paper-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/paper-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/tendrils-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/water-surface-bytes.js.map +7 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.d.ts +1 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.js +5 -0
- package/dist/features/textures/lib/wasm/water-waves-bytes.js.map +7 -0
- package/dist/features/textures/lib/water-surface.d.ts +92 -0
- package/dist/features/textures/lib/water-surface.js +378 -0
- package/dist/features/textures/lib/water-surface.js.map +7 -0
- package/dist/features/textures/lib/water-waves.d.ts +60 -0
- package/dist/features/textures/lib/water-waves.js +154 -0
- package/dist/features/textures/lib/water-waves.js.map +7 -0
- package/dist/features/viz/index.d.ts +28 -0
- package/dist/features/viz/index.js +45 -0
- package/dist/features/viz/index.js.map +7 -0
- package/dist/features/viz/index.mjs +1 -0
- package/dist/features/viz/lib/anchored-layout.d.ts +104 -0
- package/dist/features/viz/lib/anchored-layout.js +166 -0
- package/dist/features/viz/lib/anchored-layout.js.map +7 -0
- package/dist/features/viz/lib/axis.d.ts +10 -0
- package/dist/features/viz/lib/axis.js +116 -0
- package/dist/features/viz/lib/axis.js.map +7 -0
- package/dist/features/viz/lib/band-scale.d.ts +3 -0
- package/dist/features/viz/lib/band-scale.js +57 -0
- package/dist/features/viz/lib/band-scale.js.map +7 -0
- package/dist/features/viz/lib/bar-fill.d.ts +16 -0
- package/dist/features/viz/lib/bar-fill.js +53 -0
- package/dist/features/viz/lib/bar-fill.js.map +7 -0
- package/dist/features/viz/lib/bar-series.d.ts +150 -0
- package/dist/features/viz/lib/bar-series.js +152 -0
- package/dist/features/viz/lib/bar-series.js.map +7 -0
- package/dist/features/viz/lib/hover-card.d.ts +92 -0
- package/dist/features/viz/lib/hover-card.js +146 -0
- package/dist/features/viz/lib/hover-card.js.map +7 -0
- package/dist/features/viz/lib/hover-data.d.ts +12 -0
- package/dist/features/viz/lib/hover-data.js +50 -0
- package/dist/features/viz/lib/hover-data.js.map +7 -0
- package/dist/features/viz/lib/hover-placement.d.ts +46 -0
- package/dist/features/viz/lib/hover-placement.js +51 -0
- package/dist/features/viz/lib/hover-placement.js.map +7 -0
- package/dist/features/viz/lib/hover-queries.d.ts +60 -0
- package/dist/features/viz/lib/hover-queries.js +185 -0
- package/dist/features/viz/lib/hover-queries.js.map +7 -0
- package/dist/features/viz/lib/hover-types.d.ts +277 -0
- package/dist/features/viz/lib/layout-pie.d.ts +13 -0
- package/dist/features/viz/lib/layout-pie.js +159 -0
- package/dist/features/viz/lib/layout-pie.js.map +7 -0
- package/dist/features/viz/lib/line-series.d.ts +11 -0
- package/dist/features/viz/lib/line-series.js +89 -0
- package/dist/features/viz/lib/line-series.js.map +7 -0
- package/dist/features/viz/lib/linear-scale.d.ts +3 -0
- package/dist/features/viz/lib/linear-scale.js +70 -0
- package/dist/features/viz/lib/linear-scale.js.map +7 -0
- package/dist/features/viz/lib/nearest.d.ts +82 -0
- package/dist/features/viz/lib/nearest.js +51 -0
- package/dist/features/viz/lib/nearest.js.map +7 -0
- package/dist/features/viz/lib/paint.d.ts +2 -0
- package/dist/features/viz/lib/paint.js +17 -0
- package/dist/features/viz/lib/paint.js.map +7 -0
- package/dist/features/viz/lib/pie-layout.d.ts +31 -0
- package/dist/features/viz/lib/pie-layout.js +324 -0
- package/dist/features/viz/lib/pie-layout.js.map +7 -0
- package/dist/features/viz/lib/pie-slices.d.ts +51 -0
- package/dist/features/viz/lib/pie-slices.js +50 -0
- package/dist/features/viz/lib/pie-slices.js.map +7 -0
- package/dist/features/viz/lib/pie-types.d.ts +215 -0
- package/dist/features/viz/lib/plot-series.d.ts +13 -0
- package/dist/features/viz/lib/plot-series.js +53 -0
- package/dist/features/viz/lib/plot-series.js.map +7 -0
- package/dist/features/viz/lib/plot-types.d.ts +63 -0
- package/dist/features/viz/lib/point-data.d.ts +5 -0
- package/dist/features/viz/lib/point-data.js +17 -0
- package/dist/features/viz/lib/point-data.js.map +7 -0
- package/dist/features/viz/lib/point-geometry.d.ts +2 -0
- package/dist/features/viz/lib/point-geometry.js +24 -0
- package/dist/features/viz/lib/point-geometry.js.map +7 -0
- package/dist/features/viz/lib/point-series.d.ts +11 -0
- package/dist/features/viz/lib/point-series.js +118 -0
- package/dist/features/viz/lib/point-series.js.map +7 -0
- package/dist/features/viz/lib/point-types.d.ts +94 -0
- package/dist/features/viz/lib/scale-adjust.d.ts +11 -0
- package/dist/features/viz/lib/scale-adjust.js +25 -0
- package/dist/features/viz/lib/scale-adjust.js.map +7 -0
- package/dist/features/viz/lib/scale-context.d.ts +8 -0
- package/dist/features/viz/lib/scale-context.js +61 -0
- package/dist/features/viz/lib/scale-context.js.map +7 -0
- package/dist/features/viz/lib/scale.d.ts +11 -0
- package/dist/features/viz/lib/scale.js +80 -0
- package/dist/features/viz/lib/scale.js.map +7 -0
- package/dist/features/viz/lib/types.d.ts +414 -0
- package/dist/features/viz/lib/use-scale.d.ts +20 -0
- package/dist/features/viz/lib/use-scale.js +10 -0
- package/dist/features/viz/lib/use-scale.js.map +7 -0
- package/dist/filters/displacement-gpu.d.ts +38 -0
- package/dist/filters/displacement-gpu.js +243 -0
- package/dist/filters/displacement-gpu.js.map +7 -0
- package/dist/filters/displacement-math.d.ts +5 -0
- package/dist/filters/displacement-math.js +22 -0
- package/dist/filters/displacement-math.js.map +7 -0
- package/dist/filters/displacement.d.ts +13 -0
- package/dist/filters/displacement.js +65 -0
- package/dist/filters/displacement.js.map +7 -0
- package/dist/filters/filter-executor.d.ts +21 -0
- package/dist/filters/filter-executor.js +120 -0
- package/dist/filters/filter-executor.js.map +7 -0
- package/dist/filters/native-canvas-filter.d.ts +4 -0
- package/dist/filters/native-canvas-filter.js +105 -0
- package/dist/filters/native-canvas-filter.js.map +7 -0
- package/dist/filters/native-color.d.ts +2 -0
- package/dist/filters/native-color.js +200 -0
- package/dist/filters/native-color.js.map +7 -0
- package/dist/filters/native-operations.d.ts +8 -0
- package/dist/filters/native-operations.js +7 -0
- package/dist/filters/native-operations.js.map +7 -0
- package/dist/filters/native.d.ts +113 -0
- package/dist/filters/native.js +115 -0
- package/dist/filters/native.js.map +7 -0
- package/dist/filters/reflected-light.d.ts +12 -0
- package/dist/filters/reflected-light.js +93 -0
- package/dist/filters/reflected-light.js.map +7 -0
- package/dist/filters/reflection-gpu.d.ts +58 -0
- package/dist/filters/reflection-gpu.js +266 -0
- package/dist/filters/reflection-gpu.js.map +7 -0
- package/dist/filters/render-displacement-boundary.d.ts +12 -0
- package/dist/filters/render-displacement-boundary.js +116 -0
- package/dist/filters/render-displacement-boundary.js.map +7 -0
- package/dist/filters/render-reflection-boundary.d.ts +15 -0
- package/dist/filters/render-reflection-boundary.js +127 -0
- package/dist/filters/render-reflection-boundary.js.map +7 -0
- package/dist/filters.d.ts +5 -0
- package/dist/filters.js +29 -0
- package/dist/filters.js.map +7 -0
- package/dist/filters.mjs +1 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.js +300 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +1 -0
- package/dist/internal.d.ts +160 -0
- package/dist/internal.js +320 -0
- package/dist/internal.js.map +7 -0
- package/dist/internal.mjs +1 -0
- package/dist/jsx-dev-runtime.d.ts +35 -0
- package/dist/jsx-dev-runtime.js +6 -0
- package/dist/jsx-dev-runtime.js.map +7 -0
- package/dist/jsx-dev-runtime.mjs +1 -0
- package/dist/jsx-runtime.d.ts +35 -0
- package/dist/jsx-runtime.js +7 -0
- package/dist/jsx-runtime.js.map +7 -0
- package/dist/jsx-runtime.mjs +1 -0
- package/dist/lib/animation/definition.d.ts +140 -0
- package/dist/lib/animation/definition.js +605 -0
- package/dist/lib/animation/definition.js.map +7 -0
- package/dist/lib/animation/easing.d.ts +55 -0
- package/dist/lib/animation/easing.js +112 -0
- package/dist/lib/animation/easing.js.map +7 -0
- package/dist/lib/animation/evaluate.d.ts +118 -0
- package/dist/lib/animation/evaluate.js +2398 -0
- package/dist/lib/animation/evaluate.js.map +7 -0
- package/dist/lib/animation/playback.d.ts +30 -0
- package/dist/lib/animation/playback.js +932 -0
- package/dist/lib/animation/playback.js.map +7 -0
- package/dist/lib/animation/program.d.ts +145 -0
- package/dist/lib/animation/program.js +741 -0
- package/dist/lib/animation/program.js.map +7 -0
- package/dist/lib/animation/spring.d.ts +30 -0
- package/dist/lib/animation/spring.js +324 -0
- package/dist/lib/animation/spring.js.map +7 -0
- package/dist/lib/animation/types.d.ts +418 -0
- package/dist/lib/animation/writer-leases.d.ts +47 -0
- package/dist/lib/animation/writer-leases.js +314 -0
- package/dist/lib/animation/writer-leases.js.map +7 -0
- package/dist/lib/backend/canvas-2d-backend.d.ts +4 -0
- package/dist/lib/backend/canvas-2d-backend.js +97 -0
- package/dist/lib/backend/canvas-2d-backend.js.map +7 -0
- package/dist/lib/backend/types.d.ts +309 -0
- package/dist/lib/backend/types.js +26 -0
- package/dist/lib/backend/types.js.map +7 -0
- package/dist/lib/components/arc-geometry.d.ts +4 -0
- package/dist/lib/components/arc-geometry.js +46 -0
- package/dist/lib/components/arc-geometry.js.map +7 -0
- package/dist/lib/components/arc.d.ts +55 -0
- package/dist/lib/components/arc.js +91 -0
- package/dist/lib/components/arc.js.map +7 -0
- package/dist/lib/components/circle.d.ts +49 -0
- package/dist/lib/components/circle.js +46 -0
- package/dist/lib/components/circle.js.map +7 -0
- package/dist/lib/components/clip.d.ts +43 -0
- package/dist/lib/components/clip.js +24 -0
- package/dist/lib/components/clip.js.map +7 -0
- package/dist/lib/components/ellipse.d.ts +53 -0
- package/dist/lib/components/ellipse.js +59 -0
- package/dist/lib/components/ellipse.js.map +7 -0
- package/dist/lib/components/g.d.ts +56 -0
- package/dist/lib/components/g.js +24 -0
- package/dist/lib/components/g.js.map +7 -0
- package/dist/lib/components/horizontal-line.d.ts +56 -0
- package/dist/lib/components/horizontal-line.js +71 -0
- package/dist/lib/components/horizontal-line.js.map +7 -0
- package/dist/lib/components/html-box.d.ts +16 -0
- package/dist/lib/components/html-box.js +57 -0
- package/dist/lib/components/html-box.js.map +7 -0
- package/dist/lib/components/img.d.ts +24 -0
- package/dist/lib/components/img.js +150 -0
- package/dist/lib/components/img.js.map +7 -0
- package/dist/lib/components/layer-node-equality.d.ts +65 -0
- package/dist/lib/components/layer-node-equality.js +91 -0
- package/dist/lib/components/layer-node-equality.js.map +7 -0
- package/dist/lib/components/layer.d.ts +34 -0
- package/dist/lib/components/layer.js +172 -0
- package/dist/lib/components/layer.js.map +7 -0
- package/dist/lib/components/line.d.ts +51 -0
- package/dist/lib/components/line.js +76 -0
- package/dist/lib/components/line.js.map +7 -0
- package/dist/lib/components/path.d.ts +28 -0
- package/dist/lib/components/path.js +47 -0
- package/dist/lib/components/path.js.map +7 -0
- package/dist/lib/components/polygon.d.ts +45 -0
- package/dist/lib/components/polygon.js +93 -0
- package/dist/lib/components/polygon.js.map +7 -0
- package/dist/lib/components/rect.d.ts +24 -0
- package/dist/lib/components/rect.js +83 -0
- package/dist/lib/components/rect.js.map +7 -0
- package/dist/lib/components/regular-polygon.d.ts +102 -0
- package/dist/lib/components/regular-polygon.js +112 -0
- package/dist/lib/components/regular-polygon.js.map +7 -0
- package/dist/lib/components/rounded-corner-style.d.ts +7 -0
- package/dist/lib/components/rounded-corner-style.js +40 -0
- package/dist/lib/components/rounded-corner-style.js.map +7 -0
- package/dist/lib/components/shape-style.d.ts +7 -0
- package/dist/lib/components/shape-style.js +52 -0
- package/dist/lib/components/shape-style.js.map +7 -0
- package/dist/lib/components/star.d.ts +56 -0
- package/dist/lib/components/star.js +98 -0
- package/dist/lib/components/star.js.map +7 -0
- package/dist/lib/components/structural-events.d.ts +10 -0
- package/dist/lib/components/structural-events.js +8 -0
- package/dist/lib/components/structural-events.js.map +7 -0
- package/dist/lib/components/svg-path.d.ts +23 -0
- package/dist/lib/components/svg-path.js +25 -0
- package/dist/lib/components/svg-path.js.map +7 -0
- package/dist/lib/components/text-layout.d.ts +31 -0
- package/dist/lib/components/text-layout.js +139 -0
- package/dist/lib/components/text-layout.js.map +7 -0
- package/dist/lib/components/text.d.ts +29 -0
- package/dist/lib/components/text.js +174 -0
- package/dist/lib/components/text.js.map +7 -0
- package/dist/lib/components/vertical-line.d.ts +57 -0
- package/dist/lib/components/vertical-line.js +71 -0
- package/dist/lib/components/vertical-line.js.map +7 -0
- package/dist/lib/components/wedge.d.ts +55 -0
- package/dist/lib/components/wedge.js +93 -0
- package/dist/lib/components/wedge.js.map +7 -0
- package/dist/lib/define-primitive.d.ts +82 -0
- package/dist/lib/define-primitive.js +85 -0
- package/dist/lib/define-primitive.js.map +7 -0
- package/dist/lib/development.d.ts +2 -0
- package/dist/lib/development.js +5 -0
- package/dist/lib/development.js.map +7 -0
- package/dist/lib/element/children.d.ts +16 -0
- package/dist/lib/element/children.js +333 -0
- package/dist/lib/element/children.js.map +7 -0
- package/dist/lib/element/create-element.d.ts +34 -0
- package/dist/lib/element/create-element.js +75 -0
- package/dist/lib/element/create-element.js.map +7 -0
- package/dist/lib/element/fragment.d.ts +15 -0
- package/dist/lib/element/fragment.js +11 -0
- package/dist/lib/element/fragment.js.map +7 -0
- package/dist/lib/element/jsx-runtime.d.ts +48 -0
- package/dist/lib/element/jsx-runtime.js +16 -0
- package/dist/lib/element/jsx-runtime.js.map +7 -0
- package/dist/lib/element/metadata.d.ts +96 -0
- package/dist/lib/element/metadata.js +160 -0
- package/dist/lib/element/metadata.js.map +7 -0
- package/dist/lib/element/resolve-primitive-inputs.d.ts +12 -0
- package/dist/lib/element/resolve-primitive-inputs.js +83 -0
- package/dist/lib/element/resolve-primitive-inputs.js.map +7 -0
- package/dist/lib/element/types.d.ts +123 -0
- package/dist/lib/element-enhancers.d.ts +134 -0
- package/dist/lib/element-enhancers.js +193 -0
- package/dist/lib/element-enhancers.js.map +7 -0
- package/dist/lib/events/adapters/clipboard.d.ts +9 -0
- package/dist/lib/events/adapters/clipboard.js +23 -0
- package/dist/lib/events/adapters/clipboard.js.map +7 -0
- package/dist/lib/events/adapters/drag.d.ts +12 -0
- package/dist/lib/events/adapters/drag.js +29 -0
- package/dist/lib/events/adapters/drag.js.map +7 -0
- package/dist/lib/events/adapters/editing.d.ts +15 -0
- package/dist/lib/events/adapters/editing.js +41 -0
- package/dist/lib/events/adapters/editing.js.map +7 -0
- package/dist/lib/events/adapters/keyboard-focus.d.ts +12 -0
- package/dist/lib/events/adapters/keyboard-focus.js +36 -0
- package/dist/lib/events/adapters/keyboard-focus.js.map +7 -0
- package/dist/lib/events/adapters/mouse.d.ts +17 -0
- package/dist/lib/events/adapters/mouse.js +32 -0
- package/dist/lib/events/adapters/mouse.js.map +7 -0
- package/dist/lib/events/adapters/pointer.d.ts +19 -0
- package/dist/lib/events/adapters/pointer.js +40 -0
- package/dist/lib/events/adapters/pointer.js.map +7 -0
- package/dist/lib/events/adapters/touch.d.ts +16 -0
- package/dist/lib/events/adapters/touch.js +36 -0
- package/dist/lib/events/adapters/touch.js.map +7 -0
- package/dist/lib/events/adapters/wheel.d.ts +10 -0
- package/dist/lib/events/adapters/wheel.js +16 -0
- package/dist/lib/events/adapters/wheel.js.map +7 -0
- package/dist/lib/events/boundary-transitions.d.ts +9 -0
- package/dist/lib/events/boundary-transitions.js +16 -0
- package/dist/lib/events/boundary-transitions.js.map +7 -0
- package/dist/lib/events/dispatch.d.ts +21 -0
- package/dist/lib/events/dispatch.js +1078 -0
- package/dist/lib/events/dispatch.js.map +7 -0
- package/dist/lib/events/event-definitions.d.ts +23 -0
- package/dist/lib/events/event-definitions.js +74 -0
- package/dist/lib/events/event-definitions.js.map +7 -0
- package/dist/lib/events/event-facade.d.ts +19 -0
- package/dist/lib/events/event-facade.js +188 -0
- package/dist/lib/events/event-facade.js.map +7 -0
- package/dist/lib/events/event-path.d.ts +3 -0
- package/dist/lib/events/event-path.js +43 -0
- package/dist/lib/events/event-path.js.map +7 -0
- package/dist/lib/events/hit-test.d.ts +13 -0
- package/dist/lib/events/hit-test.js +135 -0
- package/dist/lib/events/hit-test.js.map +7 -0
- package/dist/lib/events/native-listener-hub.d.ts +10 -0
- package/dist/lib/events/native-listener-hub.js +72 -0
- package/dist/lib/events/native-listener-hub.js.map +7 -0
- package/dist/lib/events/paint-entry.d.ts +66 -0
- package/dist/lib/events/paint-entry.js +30 -0
- package/dist/lib/events/paint-entry.js.map +7 -0
- package/dist/lib/events/pointer-capture.d.ts +23 -0
- package/dist/lib/events/pointer-capture.js +339 -0
- package/dist/lib/events/pointer-capture.js.map +7 -0
- package/dist/lib/events/propagation.d.ts +7 -0
- package/dist/lib/events/propagation.js +56 -0
- package/dist/lib/events/propagation.js.map +7 -0
- package/dist/lib/events/registrations.d.ts +120 -0
- package/dist/lib/events/registrations.js +397 -0
- package/dist/lib/events/registrations.js.map +7 -0
- package/dist/lib/events/resolver-input.d.ts +25 -0
- package/dist/lib/events/resolver-input.js +62 -0
- package/dist/lib/events/resolver-input.js.map +7 -0
- package/dist/lib/events/types.d.ts +596 -0
- package/dist/lib/execute-render.d.ts +9 -0
- package/dist/lib/execute-render.js +195 -0
- package/dist/lib/execute-render.js.map +7 -0
- package/dist/lib/filter/canvas-state.d.ts +2 -0
- package/dist/lib/filter/canvas-state.js +31 -0
- package/dist/lib/filter/canvas-state.js.map +7 -0
- package/dist/lib/filter/filter-region.d.ts +33 -0
- package/dist/lib/filter/filter-region.js +291 -0
- package/dist/lib/filter/filter-region.js.map +7 -0
- package/dist/lib/filter/filter-surface-pool.d.ts +38 -0
- package/dist/lib/filter/filter-surface-pool.js +252 -0
- package/dist/lib/filter/filter-surface-pool.js.map +7 -0
- package/dist/lib/filter/render-filter-boundary.d.ts +14 -0
- package/dist/lib/filter/render-filter-boundary.js +211 -0
- package/dist/lib/filter/render-filter-boundary.js.map +7 -0
- package/dist/lib/focus/directional-navigation.d.ts +12 -0
- package/dist/lib/focus/directional-navigation.js +86 -0
- package/dist/lib/focus/directional-navigation.js.map +7 -0
- package/dist/lib/focus/dom-focus-host.d.ts +13 -0
- package/dist/lib/focus/dom-focus-host.js +352 -0
- package/dist/lib/focus/dom-focus-host.js.map +7 -0
- package/dist/lib/focus/dom-tab-stops.d.ts +3 -0
- package/dist/lib/focus/dom-tab-stops.js +71 -0
- package/dist/lib/focus/dom-tab-stops.js.map +7 -0
- package/dist/lib/focus/focus-events.d.ts +4 -0
- package/dist/lib/focus/focus-events.js +78 -0
- package/dist/lib/focus/focus-events.js.map +7 -0
- package/dist/lib/focus/focus-manager.d.ts +121 -0
- package/dist/lib/focus/focus-manager.js +1131 -0
- package/dist/lib/focus/focus-manager.js.map +7 -0
- package/dist/lib/focus/geometry.d.ts +4 -0
- package/dist/lib/focus/geometry.js +64 -0
- package/dist/lib/focus/geometry.js.map +7 -0
- package/dist/lib/focus/html-focus-region.d.ts +27 -0
- package/dist/lib/focus/keyboard-defaults.d.ts +7 -0
- package/dist/lib/focus/keyboard-defaults.js +110 -0
- package/dist/lib/focus/keyboard-defaults.js.map +7 -0
- package/dist/lib/focus/policy-components.d.ts +45 -0
- package/dist/lib/focus/policy-components.js +94 -0
- package/dist/lib/focus/policy-components.js.map +7 -0
- package/dist/lib/focus/types.d.ts +37 -0
- package/dist/lib/focus/types.js +7 -0
- package/dist/lib/focus/types.js.map +7 -0
- package/dist/lib/geometry/circle.d.ts +22 -0
- package/dist/lib/geometry/circle.js +13 -0
- package/dist/lib/geometry/circle.js.map +7 -0
- package/dist/lib/geometry/circular-sweep.d.ts +54 -0
- package/dist/lib/geometry/circular-sweep.js +95 -0
- package/dist/lib/geometry/circular-sweep.js.map +7 -0
- package/dist/lib/geometry/ellipse.d.ts +26 -0
- package/dist/lib/geometry/ellipse.js +17 -0
- package/dist/lib/geometry/ellipse.js.map +7 -0
- package/dist/lib/geometry/line.d.ts +20 -0
- package/dist/lib/geometry/line.js +15 -0
- package/dist/lib/geometry/line.js.map +7 -0
- package/dist/lib/geometry/path-arc.d.ts +25 -0
- package/dist/lib/geometry/path-arc.js +57 -0
- package/dist/lib/geometry/path-arc.js.map +7 -0
- package/dist/lib/geometry/path-bend-guide.d.ts +31 -0
- package/dist/lib/geometry/path-bend-guide.js +282 -0
- package/dist/lib/geometry/path-bend-guide.js.map +7 -0
- package/dist/lib/geometry/path-bend-spans.d.ts +31 -0
- package/dist/lib/geometry/path-bend-spans.js +109 -0
- package/dist/lib/geometry/path-bend-spans.js.map +7 -0
- package/dist/lib/geometry/path-bending.d.ts +90 -0
- package/dist/lib/geometry/path-bending.js +202 -0
- package/dist/lib/geometry/path-bending.js.map +7 -0
- package/dist/lib/geometry/path-conversion.d.ts +19 -0
- package/dist/lib/geometry/path-conversion.js +114 -0
- package/dist/lib/geometry/path-conversion.js.map +7 -0
- package/dist/lib/geometry/path-geometry.d.ts +218 -0
- package/dist/lib/geometry/path-geometry.js +557 -0
- package/dist/lib/geometry/path-geometry.js.map +7 -0
- package/dist/lib/geometry/path-radial.d.ts +15 -0
- package/dist/lib/geometry/path-radial.js +107 -0
- package/dist/lib/geometry/path-radial.js.map +7 -0
- package/dist/lib/geometry/path-transforms.d.ts +233 -0
- package/dist/lib/geometry/path-transforms.js +478 -0
- package/dist/lib/geometry/path-transforms.js.map +7 -0
- package/dist/lib/geometry/path-utilities.d.ts +78 -0
- package/dist/lib/geometry/path-utilities.js +341 -0
- package/dist/lib/geometry/path-utilities.js.map +7 -0
- package/dist/lib/geometry/path-wang.d.ts +18 -0
- package/dist/lib/geometry/path-wang.js +136 -0
- package/dist/lib/geometry/path-wang.js.map +7 -0
- package/dist/lib/geometry/path-warp-bezier.d.ts +17 -0
- package/dist/lib/geometry/path-warp-bezier.js +109 -0
- package/dist/lib/geometry/path-warp-bezier.js.map +7 -0
- package/dist/lib/geometry/path-warp.d.ts +27 -0
- package/dist/lib/geometry/path-warp.js +165 -0
- package/dist/lib/geometry/path-warp.js.map +7 -0
- package/dist/lib/geometry/polygon.d.ts +21 -0
- package/dist/lib/geometry/polygon.js +12 -0
- package/dist/lib/geometry/polygon.js.map +7 -0
- package/dist/lib/geometry/rectangle.d.ts +38 -0
- package/dist/lib/geometry/rectangle.js +22 -0
- package/dist/lib/geometry/rectangle.js.map +7 -0
- package/dist/lib/geometry/regular-polygon.d.ts +88 -0
- package/dist/lib/geometry/regular-polygon.js +67 -0
- package/dist/lib/geometry/regular-polygon.js.map +7 -0
- package/dist/lib/geometry/resolve-path.d.ts +4 -0
- package/dist/lib/geometry/resolve-path.js +16 -0
- package/dist/lib/geometry/resolve-path.js.map +7 -0
- package/dist/lib/geometry/rounded-corners.d.ts +28 -0
- package/dist/lib/geometry/rounded-corners.js +118 -0
- package/dist/lib/geometry/rounded-corners.js.map +7 -0
- package/dist/lib/geometry/star.d.ts +39 -0
- package/dist/lib/geometry/star.js +90 -0
- package/dist/lib/geometry/star.js.map +7 -0
- package/dist/lib/geometry/svg-path.d.ts +21 -0
- package/dist/lib/geometry/svg-path.js +7 -0
- package/dist/lib/geometry/svg-path.js.map +7 -0
- package/dist/lib/geometry/transform-bend.d.ts +46 -0
- package/dist/lib/geometry/transform-bend.js +219 -0
- package/dist/lib/geometry/transform-bend.js.map +7 -0
- package/dist/lib/geometry/transform-guide.d.ts +57 -0
- package/dist/lib/geometry/transform-guide.js +157 -0
- package/dist/lib/geometry/transform-guide.js.map +7 -0
- package/dist/lib/geometry/transform-math.d.ts +21 -0
- package/dist/lib/geometry/transform-math.js +91 -0
- package/dist/lib/geometry/transform-math.js.map +7 -0
- package/dist/lib/geometry/transform-mesh.d.ts +39 -0
- package/dist/lib/geometry/transform-mesh.js +129 -0
- package/dist/lib/geometry/transform-mesh.js.map +7 -0
- package/dist/lib/geometry/validation.d.ts +6 -0
- package/dist/lib/geometry/validation.js +42 -0
- package/dist/lib/geometry/validation.js.map +7 -0
- package/dist/lib/global-state.d.ts +63 -0
- package/dist/lib/global-state.js +176 -0
- package/dist/lib/global-state.js.map +7 -0
- package/dist/lib/hooks/hook-slot.d.ts +30 -0
- package/dist/lib/hooks/hook-slot.js +66 -0
- package/dist/lib/hooks/hook-slot.js.map +7 -0
- package/dist/lib/hooks/use-animated-value.d.ts +24 -0
- package/dist/lib/hooks/use-animated-value.js +169 -0
- package/dist/lib/hooks/use-animated-value.js.map +7 -0
- package/dist/lib/hooks/use-canvas-context.d.ts +10 -0
- package/dist/lib/hooks/use-canvas-context.js +13 -0
- package/dist/lib/hooks/use-canvas-context.js.map +7 -0
- package/dist/lib/hooks/use-computed.d.ts +13 -0
- package/dist/lib/hooks/use-computed.js +91 -0
- package/dist/lib/hooks/use-computed.js.map +7 -0
- package/dist/lib/hooks/use-const.d.ts +10 -0
- package/dist/lib/hooks/use-const.js +15 -0
- package/dist/lib/hooks/use-const.js.map +7 -0
- package/dist/lib/hooks/use-cursor.d.ts +16 -0
- package/dist/lib/hooks/use-cursor.js +51 -0
- package/dist/lib/hooks/use-cursor.js.map +7 -0
- package/dist/lib/hooks/use-event-listener.d.ts +10 -0
- package/dist/lib/hooks/use-event-listener.js +24 -0
- package/dist/lib/hooks/use-event-listener.js.map +7 -0
- package/dist/lib/hooks/use-event-target.d.ts +14 -0
- package/dist/lib/hooks/use-event-target.js +30 -0
- package/dist/lib/hooks/use-event-target.js.map +7 -0
- package/dist/lib/hooks/use-layout-box.d.ts +9 -0
- package/dist/lib/hooks/use-layout-box.js +8 -0
- package/dist/lib/hooks/use-layout-box.js.map +7 -0
- package/dist/lib/hooks/use-line-path.d.ts +14 -0
- package/dist/lib/hooks/use-line-path.js +13 -0
- package/dist/lib/hooks/use-line-path.js.map +7 -0
- package/dist/lib/hooks/use-paint-target.d.ts +3 -0
- package/dist/lib/hooks/use-paint-target.js +34 -0
- package/dist/lib/hooks/use-paint-target.js.map +7 -0
- package/dist/lib/hooks/use-playback.d.ts +21 -0
- package/dist/lib/hooks/use-playback.js +87 -0
- package/dist/lib/hooks/use-playback.js.map +7 -0
- package/dist/lib/hooks/use-reaction.d.ts +19 -0
- package/dist/lib/hooks/use-reaction.js +245 -0
- package/dist/lib/hooks/use-reaction.js.map +7 -0
- package/dist/lib/hooks/use-rect-path.d.ts +20 -0
- package/dist/lib/hooks/use-rect-path.js +25 -0
- package/dist/lib/hooks/use-rect-path.js.map +7 -0
- package/dist/lib/hooks/use-ref.d.ts +17 -0
- package/dist/lib/hooks/use-ref.js +8 -0
- package/dist/lib/hooks/use-ref.js.map +7 -0
- package/dist/lib/hooks/use-region.d.ts +11 -0
- package/dist/lib/hooks/use-region.js +34 -0
- package/dist/lib/hooks/use-region.js.map +7 -0
- package/dist/lib/hooks/use-signal.d.ts +12 -0
- package/dist/lib/hooks/use-signal.js +12 -0
- package/dist/lib/hooks/use-signal.js.map +7 -0
- package/dist/lib/hooks/use-svg-path.d.ts +11 -0
- package/dist/lib/hooks/use-svg-path.js +13 -0
- package/dist/lib/hooks/use-svg-path.js.map +7 -0
- package/dist/lib/hooks/use-value-memo-slot.d.ts +12 -0
- package/dist/lib/hooks/use-value-memo-slot.js +45 -0
- package/dist/lib/hooks/use-value-memo-slot.js.map +7 -0
- package/dist/lib/hooks/use-visibility-transition.d.ts +103 -0
- package/dist/lib/hooks/use-visibility-transition.js +195 -0
- package/dist/lib/hooks/use-visibility-transition.js.map +7 -0
- package/dist/lib/html/html-service.d.ts +30 -0
- package/dist/lib/html/html-service.js +281 -0
- package/dist/lib/html/html-service.js.map +7 -0
- package/dist/lib/html/overlay-config.d.ts +3 -0
- package/dist/lib/html/overlay-config.js +37 -0
- package/dist/lib/html/overlay-config.js.map +7 -0
- package/dist/lib/html/portable-clips.d.ts +4 -0
- package/dist/lib/html/portable-clips.js +20 -0
- package/dist/lib/html/portable-clips.js.map +7 -0
- package/dist/lib/html/types.d.ts +110 -0
- package/dist/lib/layout/absolute.d.ts +57 -0
- package/dist/lib/layout/absolute.js +348 -0
- package/dist/lib/layout/absolute.js.map +7 -0
- package/dist/lib/layout/box.d.ts +19 -0
- package/dist/lib/layout/box.js +209 -0
- package/dist/lib/layout/box.js.map +7 -0
- package/dist/lib/layout/context.d.ts +13 -0
- package/dist/lib/layout/context.js +42 -0
- package/dist/lib/layout/context.js.map +7 -0
- package/dist/lib/layout/diagnostics.d.ts +15 -0
- package/dist/lib/layout/diagnostics.js +30 -0
- package/dist/lib/layout/diagnostics.js.map +7 -0
- package/dist/lib/layout/flex.d.ts +64 -0
- package/dist/lib/layout/flex.js +803 -0
- package/dist/lib/layout/flex.js.map +7 -0
- package/dist/lib/layout/flow.d.ts +53 -0
- package/dist/lib/layout/flow.js +400 -0
- package/dist/lib/layout/flow.js.map +7 -0
- package/dist/lib/layout/grid.d.ts +64 -0
- package/dist/lib/layout/grid.js +597 -0
- package/dist/lib/layout/grid.js.map +7 -0
- package/dist/lib/layout/measure.d.ts +19 -0
- package/dist/lib/layout/measure.js +144 -0
- package/dist/lib/layout/measure.js.map +7 -0
- package/dist/lib/layout/overlay.d.ts +42 -0
- package/dist/lib/layout/overlay.js +151 -0
- package/dist/lib/layout/overlay.js.map +7 -0
- package/dist/lib/layout/place-child.d.ts +12 -0
- package/dist/lib/layout/place-child.js +72 -0
- package/dist/lib/layout/place-child.js.map +7 -0
- package/dist/lib/layout/positioning-diagnostics.d.ts +3 -0
- package/dist/lib/layout/positioning-diagnostics.js +15 -0
- package/dist/lib/layout/positioning-diagnostics.js.map +7 -0
- package/dist/lib/layout/types.d.ts +78 -0
- package/dist/lib/manipulation/controller-types.d.ts +299 -0
- package/dist/lib/manipulation/controller.d.ts +57 -0
- package/dist/lib/manipulation/controller.js +464 -0
- package/dist/lib/manipulation/controller.js.map +7 -0
- package/dist/lib/manipulation/coordinates.d.ts +9 -0
- package/dist/lib/manipulation/coordinates.js +55 -0
- package/dist/lib/manipulation/coordinates.js.map +7 -0
- package/dist/lib/manipulation/degrees.d.ts +10 -0
- package/dist/lib/manipulation/degrees.js +9 -0
- package/dist/lib/manipulation/degrees.js.map +7 -0
- package/dist/lib/manipulation/frame.d.ts +24 -0
- package/dist/lib/manipulation/frame.js +101 -0
- package/dist/lib/manipulation/frame.js.map +7 -0
- package/dist/lib/manipulation/geometry.d.ts +4 -0
- package/dist/lib/manipulation/geometry.js +26 -0
- package/dist/lib/manipulation/geometry.js.map +7 -0
- package/dist/lib/manipulation/handles.d.ts +298 -0
- package/dist/lib/manipulation/handles.js +598 -0
- package/dist/lib/manipulation/handles.js.map +7 -0
- package/dist/lib/manipulation/manipulable.d.ts +65 -0
- package/dist/lib/manipulation/manipulable.js +47 -0
- package/dist/lib/manipulation/manipulable.js.map +7 -0
- package/dist/lib/manipulation/ownership.d.ts +15 -0
- package/dist/lib/manipulation/ownership.js +80 -0
- package/dist/lib/manipulation/ownership.js.map +7 -0
- package/dist/lib/manipulation/snap.d.ts +6 -0
- package/dist/lib/manipulation/snap.js +40 -0
- package/dist/lib/manipulation/snap.js.map +7 -0
- package/dist/lib/manipulation/solve.d.ts +2 -0
- package/dist/lib/manipulation/solve.js +563 -0
- package/dist/lib/manipulation/solve.js.map +7 -0
- package/dist/lib/manipulation/types.d.ts +178 -0
- package/dist/lib/mount-pibbl.d.ts +25 -0
- package/dist/lib/mount-pibbl.js +278 -0
- package/dist/lib/mount-pibbl.js.map +7 -0
- package/dist/lib/optional-services.d.ts +8 -0
- package/dist/lib/optional-services.js +11 -0
- package/dist/lib/optional-services.js.map +7 -0
- package/dist/lib/pibbl.d.ts +17 -0
- package/dist/lib/pibbl.js +21 -0
- package/dist/lib/pibbl.js.map +7 -0
- package/dist/lib/primitive-presentation.d.ts +24 -0
- package/dist/lib/primitive-presentation.js +102 -0
- package/dist/lib/primitive-presentation.js.map +7 -0
- package/dist/lib/render-layer/controller.d.ts +67 -0
- package/dist/lib/render-layer/controller.js +603 -0
- package/dist/lib/render-layer/controller.js.map +7 -0
- package/dist/lib/render-layer/define-render-layer.d.ts +17 -0
- package/dist/lib/render-layer/define-render-layer.js +90 -0
- package/dist/lib/render-layer/define-render-layer.js.map +7 -0
- package/dist/lib/render-layer/types.d.ts +315 -0
- package/dist/lib/render-target.d.ts +27 -0
- package/dist/lib/render-target.js +118 -0
- package/dist/lib/render-target.js.map +7 -0
- package/dist/lib/render-transaction.d.ts +10 -0
- package/dist/lib/render-transaction.js +46 -0
- package/dist/lib/render-transaction.js.map +7 -0
- package/dist/lib/render.d.ts +3 -0
- package/dist/lib/render.js +385 -0
- package/dist/lib/render.js.map +7 -0
- package/dist/lib/scheduler/realm-scheduler.d.ts +52 -0
- package/dist/lib/scheduler/realm-scheduler.js +964 -0
- package/dist/lib/scheduler/realm-scheduler.js.map +7 -0
- package/dist/lib/scheduler/renderer-participant.d.ts +257 -0
- package/dist/lib/scheduler/renderer-participant.js +216 -0
- package/dist/lib/scheduler/renderer-participant.js.map +7 -0
- package/dist/lib/scheduler/simulation-participant.d.ts +103 -0
- package/dist/lib/scheduler/simulation-participant.js +229 -0
- package/dist/lib/scheduler/simulation-participant.js.map +7 -0
- package/dist/lib/scheduler/testing.d.ts +56 -0
- package/dist/lib/scheduler/testing.js +71 -0
- package/dist/lib/scheduler/testing.js.map +7 -0
- package/dist/lib/scheduler/types.d.ts +103 -0
- package/dist/lib/signals/edge.d.ts +44 -0
- package/dist/lib/signals/edge.js +245 -0
- package/dist/lib/signals/edge.js.map +7 -0
- package/dist/lib/signals/graph.d.ts +220 -0
- package/dist/lib/signals/graph.js +1035 -0
- package/dist/lib/signals/graph.js.map +7 -0
- package/dist/lib/signals/input-provision.d.ts +3 -0
- package/dist/lib/signals/input-provision.js +67 -0
- package/dist/lib/signals/input-provision.js.map +7 -0
- package/dist/lib/signals/render-consumer.d.ts +21 -0
- package/dist/lib/signals/render-consumer.js +218 -0
- package/dist/lib/signals/render-consumer.js.map +7 -0
- package/dist/lib/signals/resolve-signal-value.d.ts +10 -0
- package/dist/lib/signals/resolve-signal-value.js +17 -0
- package/dist/lib/signals/resolve-signal-value.js.map +7 -0
- package/dist/lib/signals/types.d.ts +80 -0
- package/dist/lib/style/diagnostics.d.ts +83 -0
- package/dist/lib/style/diagnostics.js +63 -0
- package/dist/lib/style/diagnostics.js.map +7 -0
- package/dist/lib/style/empty-style.d.ts +3 -0
- package/dist/lib/style/empty-style.js +5 -0
- package/dist/lib/style/empty-style.js.map +7 -0
- package/dist/lib/style/filter-types.d.ts +243 -0
- package/dist/lib/style/filter-types.js +5 -0
- package/dist/lib/style/filter-types.js.map +7 -0
- package/dist/lib/style/filter.d.ts +7 -0
- package/dist/lib/style/filter.js +50 -0
- package/dist/lib/style/filter.js.map +7 -0
- package/dist/lib/style/normalize.d.ts +18 -0
- package/dist/lib/style/normalize.js +50 -0
- package/dist/lib/style/normalize.js.map +7 -0
- package/dist/lib/style/positioning.d.ts +32 -0
- package/dist/lib/style/positioning.js +81 -0
- package/dist/lib/style/positioning.js.map +7 -0
- package/dist/lib/style/resolve-built-in.d.ts +6 -0
- package/dist/lib/style/resolve-built-in.js +58 -0
- package/dist/lib/style/resolve-built-in.js.map +7 -0
- package/dist/lib/style/resolve-dispatch.d.ts +20 -0
- package/dist/lib/style/resolve-dispatch.js +167 -0
- package/dist/lib/style/resolve-dispatch.js.map +7 -0
- package/dist/lib/style/resolve-length.d.ts +16 -0
- package/dist/lib/style/resolve-length.js +54 -0
- package/dist/lib/style/resolve-length.js.map +7 -0
- package/dist/lib/style/responsive.d.ts +31 -0
- package/dist/lib/style/responsive.js +172 -0
- package/dist/lib/style/responsive.js.map +7 -0
- package/dist/lib/style/types.d.ts +338 -0
- package/dist/lib/surface/resolve-surface.d.ts +4 -0
- package/dist/lib/surface/resolve-surface.js +184 -0
- package/dist/lib/surface/resolve-surface.js.map +7 -0
- package/dist/lib/surface/root-surface.d.ts +7 -0
- package/dist/lib/surface/root-surface.js +171 -0
- package/dist/lib/surface/root-surface.js.map +7 -0
- package/dist/lib/surface/transform.d.ts +4 -0
- package/dist/lib/surface/transform.js +16 -0
- package/dist/lib/surface/transform.js.map +7 -0
- package/dist/lib/surface/types.d.ts +132 -0
- package/dist/lib/teardowns.d.ts +14 -0
- package/dist/lib/teardowns.js +50 -0
- package/dist/lib/teardowns.js.map +7 -0
- package/dist/lib/textures/texture-protocol.d.ts +124 -0
- package/dist/lib/textures/texture-protocol.js +40 -0
- package/dist/lib/textures/texture-protocol.js.map +7 -0
- package/dist/lib/textures/texture.d.ts +170 -0
- package/dist/lib/textures/texture.js +385 -0
- package/dist/lib/textures/texture.js.map +7 -0
- package/dist/lib/transitions/bifrost.d.ts +47 -0
- package/dist/lib/transitions/bifrost.js +91 -0
- package/dist/lib/transitions/bifrost.js.map +7 -0
- package/dist/lib/transitions/binding.d.ts +14 -0
- package/dist/lib/transitions/binding.js +35 -0
- package/dist/lib/transitions/binding.js.map +7 -0
- package/dist/lib/transitions/capture.d.ts +21 -0
- package/dist/lib/transitions/capture.js +91 -0
- package/dist/lib/transitions/capture.js.map +7 -0
- package/dist/lib/transitions/common.d.ts +130 -0
- package/dist/lib/transitions/common.js +57 -0
- package/dist/lib/transitions/common.js.map +7 -0
- package/dist/lib/transitions/define-transition.d.ts +64 -0
- package/dist/lib/transitions/define-transition.js +31 -0
- package/dist/lib/transitions/define-transition.js.map +7 -0
- package/dist/lib/transitions/embers-physics.d.ts +114 -0
- package/dist/lib/transitions/embers-physics.js +161 -0
- package/dist/lib/transitions/embers-physics.js.map +7 -0
- package/dist/lib/transitions/embers.d.ts +67 -0
- package/dist/lib/transitions/embers.js +196 -0
- package/dist/lib/transitions/embers.js.map +7 -0
- package/dist/lib/transitions/fade.d.ts +41 -0
- package/dist/lib/transitions/fade.js +31 -0
- package/dist/lib/transitions/fade.js.map +7 -0
- package/dist/lib/transitions/hologram.d.ts +47 -0
- package/dist/lib/transitions/hologram.js +94 -0
- package/dist/lib/transitions/hologram.js.map +7 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.js +5 -0
- package/dist/lib/transitions/wasm/bifrost-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.d.ts +1 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.js +27 -0
- package/dist/lib/transitions/wasm/bifrost-kernel.js.map +7 -0
- package/dist/lib/transitions/wasm/embers-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/embers-bytes.js +5 -0
- package/dist/lib/transitions/wasm/embers-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/hologram-bytes.d.ts +1 -0
- package/dist/lib/transitions/wasm/hologram-bytes.js +5 -0
- package/dist/lib/transitions/wasm/hologram-bytes.js.map +7 -0
- package/dist/lib/transitions/wasm/kernel.d.ts +7 -0
- package/dist/lib/transitions/wasm/kernel.js +26 -0
- package/dist/lib/transitions/wasm/kernel.js.map +7 -0
- package/dist/lib/types.d.ts +570 -0
- package/dist/lib/update.d.ts +8 -0
- package/dist/lib/update.js +20 -0
- package/dist/lib/update.js.map +7 -0
- package/dist/lib/util/get-2d-context.d.ts +2 -0
- package/dist/lib/util/get-2d-context.js +11 -0
- package/dist/lib/util/get-2d-context.js.map +7 -0
- package/dist/lib/util/get-mouse-coordinates.d.ts +2 -0
- package/dist/lib/util/get-mouse-coordinates.js +32 -0
- package/dist/lib/util/get-mouse-coordinates.js.map +7 -0
- package/dist/lib/util/is-hit.d.ts +11 -0
- package/dist/lib/util/is-hit.js +52 -0
- package/dist/lib/util/is-hit.js.map +7 -0
- package/dist/lib/util/is-transparent.d.ts +1 -0
- package/dist/lib/util/is-transparent.js +8 -0
- package/dist/lib/util/is-transparent.js.map +7 -0
- package/dist/lib/util/pixel-grid-adjustments.d.ts +8 -0
- package/dist/lib/util/pixel-grid-adjustments.js +28 -0
- package/dist/lib/util/pixel-grid-adjustments.js.map +7 -0
- package/dist/lib/util/push-clipping-path.d.ts +6 -0
- package/dist/lib/util/push-clipping-path.js +28 -0
- package/dist/lib/util/push-clipping-path.js.map +7 -0
- package/dist/lib/util/wire-common-events.d.ts +2 -0
- package/dist/lib/util/wire-common-events.js +15 -0
- package/dist/lib/util/wire-common-events.js.map +7 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +7 -0
- package/dist/types.mjs +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
const COLLIDER_SENSOR_2D = 1 << 0;
|
|
2
|
+
const CONTACT_EVENT_BEGIN_2D = 1;
|
|
3
|
+
const CONTACT_EVENT_END_2D = 2;
|
|
4
|
+
const OVERLAP_EVENT_BEGIN_2D = 3;
|
|
5
|
+
const OVERLAP_EVENT_END_2D = 4;
|
|
6
|
+
const POINTS_PER_CONTACT = 2;
|
|
7
|
+
class ContactCache2D {
|
|
8
|
+
contactCount = 0;
|
|
9
|
+
firstColliderIndices;
|
|
10
|
+
firstColliderGenerations;
|
|
11
|
+
secondColliderIndices;
|
|
12
|
+
secondColliderGenerations;
|
|
13
|
+
firstBodyIndices;
|
|
14
|
+
firstBodyGenerations;
|
|
15
|
+
secondBodyIndices;
|
|
16
|
+
secondBodyGenerations;
|
|
17
|
+
sensorFlags;
|
|
18
|
+
mixedFriction;
|
|
19
|
+
mixedRestitution;
|
|
20
|
+
normalX;
|
|
21
|
+
normalY;
|
|
22
|
+
firstLeafIndices;
|
|
23
|
+
secondLeafIndices;
|
|
24
|
+
pointCounts;
|
|
25
|
+
pointFirstX;
|
|
26
|
+
pointFirstY;
|
|
27
|
+
pointSecondX;
|
|
28
|
+
pointSecondY;
|
|
29
|
+
pointSeparations;
|
|
30
|
+
pointFirstFeatures;
|
|
31
|
+
pointSecondFeatures;
|
|
32
|
+
pointNormalImpulses;
|
|
33
|
+
pointTangentImpulses;
|
|
34
|
+
stagingFirstColliderIndices;
|
|
35
|
+
stagingFirstColliderGenerations;
|
|
36
|
+
stagingSecondColliderIndices;
|
|
37
|
+
stagingSecondColliderGenerations;
|
|
38
|
+
stagingFirstBodyIndices;
|
|
39
|
+
stagingFirstBodyGenerations;
|
|
40
|
+
stagingSecondBodyIndices;
|
|
41
|
+
stagingSecondBodyGenerations;
|
|
42
|
+
stagingSensorFlags;
|
|
43
|
+
stagingMixedFriction;
|
|
44
|
+
stagingMixedRestitution;
|
|
45
|
+
stagingNormalX;
|
|
46
|
+
stagingNormalY;
|
|
47
|
+
stagingFirstLeafIndices;
|
|
48
|
+
stagingSecondLeafIndices;
|
|
49
|
+
stagingPointCounts;
|
|
50
|
+
stagingPointFirstX;
|
|
51
|
+
stagingPointFirstY;
|
|
52
|
+
stagingPointSecondX;
|
|
53
|
+
stagingPointSecondY;
|
|
54
|
+
stagingPointSeparations;
|
|
55
|
+
stagingPointFirstFeatures;
|
|
56
|
+
stagingPointSecondFeatures;
|
|
57
|
+
stagingPointNormalImpulses;
|
|
58
|
+
stagingPointTangentImpulses;
|
|
59
|
+
eventCount = 0;
|
|
60
|
+
eventTypes;
|
|
61
|
+
eventFirstColliderIndices;
|
|
62
|
+
eventFirstColliderGenerations;
|
|
63
|
+
eventSecondColliderIndices;
|
|
64
|
+
eventSecondColliderGenerations;
|
|
65
|
+
constructor(initialCapacity = 4) {
|
|
66
|
+
const capacity = normalizedCapacity(initialCapacity);
|
|
67
|
+
this.firstColliderIndices = new Int32Array(capacity);
|
|
68
|
+
this.firstColliderGenerations = new Uint32Array(capacity);
|
|
69
|
+
this.secondColliderIndices = new Int32Array(capacity);
|
|
70
|
+
this.secondColliderGenerations = new Uint32Array(capacity);
|
|
71
|
+
this.firstBodyIndices = new Int32Array(capacity);
|
|
72
|
+
this.firstBodyGenerations = new Uint32Array(capacity);
|
|
73
|
+
this.secondBodyIndices = new Int32Array(capacity);
|
|
74
|
+
this.secondBodyGenerations = new Uint32Array(capacity);
|
|
75
|
+
this.sensorFlags = new Uint8Array(capacity);
|
|
76
|
+
this.mixedFriction = new Float64Array(capacity);
|
|
77
|
+
this.mixedRestitution = new Float64Array(capacity);
|
|
78
|
+
this.normalX = new Float64Array(capacity);
|
|
79
|
+
this.normalY = new Float64Array(capacity);
|
|
80
|
+
this.firstLeafIndices = new Int32Array(capacity);
|
|
81
|
+
this.secondLeafIndices = new Int32Array(capacity);
|
|
82
|
+
this.pointCounts = new Uint8Array(capacity);
|
|
83
|
+
this.pointFirstX = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
84
|
+
this.pointFirstY = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
85
|
+
this.pointSecondX = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
86
|
+
this.pointSecondY = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
87
|
+
this.pointSeparations = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
88
|
+
this.pointFirstFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);
|
|
89
|
+
this.pointSecondFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);
|
|
90
|
+
this.pointNormalImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
91
|
+
this.pointTangentImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
92
|
+
this.stagingFirstColliderIndices = new Int32Array(capacity);
|
|
93
|
+
this.stagingFirstColliderGenerations = new Uint32Array(capacity);
|
|
94
|
+
this.stagingSecondColliderIndices = new Int32Array(capacity);
|
|
95
|
+
this.stagingSecondColliderGenerations = new Uint32Array(capacity);
|
|
96
|
+
this.stagingFirstBodyIndices = new Int32Array(capacity);
|
|
97
|
+
this.stagingFirstBodyGenerations = new Uint32Array(capacity);
|
|
98
|
+
this.stagingSecondBodyIndices = new Int32Array(capacity);
|
|
99
|
+
this.stagingSecondBodyGenerations = new Uint32Array(capacity);
|
|
100
|
+
this.stagingSensorFlags = new Uint8Array(capacity);
|
|
101
|
+
this.stagingMixedFriction = new Float64Array(capacity);
|
|
102
|
+
this.stagingMixedRestitution = new Float64Array(capacity);
|
|
103
|
+
this.stagingNormalX = new Float64Array(capacity);
|
|
104
|
+
this.stagingNormalY = new Float64Array(capacity);
|
|
105
|
+
this.stagingFirstLeafIndices = new Int32Array(capacity);
|
|
106
|
+
this.stagingSecondLeafIndices = new Int32Array(capacity);
|
|
107
|
+
this.stagingPointCounts = new Uint8Array(capacity);
|
|
108
|
+
this.stagingPointFirstX = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
109
|
+
this.stagingPointFirstY = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
110
|
+
this.stagingPointSecondX = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
111
|
+
this.stagingPointSecondY = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
112
|
+
this.stagingPointSeparations = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
113
|
+
this.stagingPointFirstFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);
|
|
114
|
+
this.stagingPointSecondFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);
|
|
115
|
+
this.stagingPointNormalImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
116
|
+
this.stagingPointTangentImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);
|
|
117
|
+
this.eventTypes = new Uint8Array(capacity * 2);
|
|
118
|
+
this.eventFirstColliderIndices = new Int32Array(capacity * 2);
|
|
119
|
+
this.eventFirstColliderGenerations = new Uint32Array(capacity * 2);
|
|
120
|
+
this.eventSecondColliderIndices = new Int32Array(capacity * 2);
|
|
121
|
+
this.eventSecondColliderGenerations = new Uint32Array(capacity * 2);
|
|
122
|
+
}
|
|
123
|
+
ensureCapacity(required) {
|
|
124
|
+
if (required <= this.firstColliderIndices.length) return;
|
|
125
|
+
let capacity = this.firstColliderIndices.length;
|
|
126
|
+
while (capacity < required) capacity *= 2;
|
|
127
|
+
this.firstColliderIndices = growInt32(this.firstColliderIndices, capacity);
|
|
128
|
+
this.firstColliderGenerations = growUint32(this.firstColliderGenerations, capacity);
|
|
129
|
+
this.secondColliderIndices = growInt32(this.secondColliderIndices, capacity);
|
|
130
|
+
this.secondColliderGenerations = growUint32(this.secondColliderGenerations, capacity);
|
|
131
|
+
this.firstBodyIndices = growInt32(this.firstBodyIndices, capacity);
|
|
132
|
+
this.firstBodyGenerations = growUint32(this.firstBodyGenerations, capacity);
|
|
133
|
+
this.secondBodyIndices = growInt32(this.secondBodyIndices, capacity);
|
|
134
|
+
this.secondBodyGenerations = growUint32(this.secondBodyGenerations, capacity);
|
|
135
|
+
this.sensorFlags = growUint8(this.sensorFlags, capacity);
|
|
136
|
+
this.mixedFriction = growFloat64(this.mixedFriction, capacity);
|
|
137
|
+
this.mixedRestitution = growFloat64(this.mixedRestitution, capacity);
|
|
138
|
+
this.normalX = growFloat64(this.normalX, capacity);
|
|
139
|
+
this.normalY = growFloat64(this.normalY, capacity);
|
|
140
|
+
this.firstLeafIndices = growInt32(this.firstLeafIndices, capacity);
|
|
141
|
+
this.secondLeafIndices = growInt32(this.secondLeafIndices, capacity);
|
|
142
|
+
this.pointCounts = growUint8(this.pointCounts, capacity);
|
|
143
|
+
this.pointFirstX = growFloat64(this.pointFirstX, capacity * POINTS_PER_CONTACT);
|
|
144
|
+
this.pointFirstY = growFloat64(this.pointFirstY, capacity * POINTS_PER_CONTACT);
|
|
145
|
+
this.pointSecondX = growFloat64(this.pointSecondX, capacity * POINTS_PER_CONTACT);
|
|
146
|
+
this.pointSecondY = growFloat64(this.pointSecondY, capacity * POINTS_PER_CONTACT);
|
|
147
|
+
this.pointSeparations = growFloat64(this.pointSeparations, capacity * POINTS_PER_CONTACT);
|
|
148
|
+
this.pointFirstFeatures = growInt32(this.pointFirstFeatures, capacity * POINTS_PER_CONTACT);
|
|
149
|
+
this.pointSecondFeatures = growInt32(this.pointSecondFeatures, capacity * POINTS_PER_CONTACT);
|
|
150
|
+
this.pointNormalImpulses = growFloat64(this.pointNormalImpulses, capacity * POINTS_PER_CONTACT);
|
|
151
|
+
this.pointTangentImpulses = growFloat64(this.pointTangentImpulses, capacity * POINTS_PER_CONTACT);
|
|
152
|
+
this.stagingFirstColliderIndices = growInt32(this.stagingFirstColliderIndices, capacity);
|
|
153
|
+
this.stagingFirstColliderGenerations = growUint32(this.stagingFirstColliderGenerations, capacity);
|
|
154
|
+
this.stagingSecondColliderIndices = growInt32(this.stagingSecondColliderIndices, capacity);
|
|
155
|
+
this.stagingSecondColliderGenerations = growUint32(this.stagingSecondColliderGenerations, capacity);
|
|
156
|
+
this.stagingFirstBodyIndices = growInt32(this.stagingFirstBodyIndices, capacity);
|
|
157
|
+
this.stagingFirstBodyGenerations = growUint32(this.stagingFirstBodyGenerations, capacity);
|
|
158
|
+
this.stagingSecondBodyIndices = growInt32(this.stagingSecondBodyIndices, capacity);
|
|
159
|
+
this.stagingSecondBodyGenerations = growUint32(this.stagingSecondBodyGenerations, capacity);
|
|
160
|
+
this.stagingSensorFlags = growUint8(this.stagingSensorFlags, capacity);
|
|
161
|
+
this.stagingMixedFriction = growFloat64(this.stagingMixedFriction, capacity);
|
|
162
|
+
this.stagingMixedRestitution = growFloat64(this.stagingMixedRestitution, capacity);
|
|
163
|
+
this.stagingNormalX = growFloat64(this.stagingNormalX, capacity);
|
|
164
|
+
this.stagingNormalY = growFloat64(this.stagingNormalY, capacity);
|
|
165
|
+
this.stagingFirstLeafIndices = growInt32(this.stagingFirstLeafIndices, capacity);
|
|
166
|
+
this.stagingSecondLeafIndices = growInt32(this.stagingSecondLeafIndices, capacity);
|
|
167
|
+
this.stagingPointCounts = growUint8(this.stagingPointCounts, capacity);
|
|
168
|
+
this.stagingPointFirstX = growFloat64(this.stagingPointFirstX, capacity * POINTS_PER_CONTACT);
|
|
169
|
+
this.stagingPointFirstY = growFloat64(this.stagingPointFirstY, capacity * POINTS_PER_CONTACT);
|
|
170
|
+
this.stagingPointSecondX = growFloat64(this.stagingPointSecondX, capacity * POINTS_PER_CONTACT);
|
|
171
|
+
this.stagingPointSecondY = growFloat64(this.stagingPointSecondY, capacity * POINTS_PER_CONTACT);
|
|
172
|
+
this.stagingPointSeparations = growFloat64(this.stagingPointSeparations, capacity * POINTS_PER_CONTACT);
|
|
173
|
+
this.stagingPointFirstFeatures = growInt32(this.stagingPointFirstFeatures, capacity * POINTS_PER_CONTACT);
|
|
174
|
+
this.stagingPointSecondFeatures = growInt32(this.stagingPointSecondFeatures, capacity * POINTS_PER_CONTACT);
|
|
175
|
+
this.stagingPointNormalImpulses = growFloat64(this.stagingPointNormalImpulses, capacity * POINTS_PER_CONTACT);
|
|
176
|
+
this.stagingPointTangentImpulses = growFloat64(this.stagingPointTangentImpulses, capacity * POINTS_PER_CONTACT);
|
|
177
|
+
this.ensureEventCapacity(capacity * 2);
|
|
178
|
+
}
|
|
179
|
+
ensureEventCapacity(required) {
|
|
180
|
+
if (required <= this.eventTypes.length) return;
|
|
181
|
+
let capacity = this.eventTypes.length;
|
|
182
|
+
while (capacity < required) capacity *= 2;
|
|
183
|
+
this.eventTypes = growUint8(this.eventTypes, capacity);
|
|
184
|
+
this.eventFirstColliderIndices = growInt32(this.eventFirstColliderIndices, capacity);
|
|
185
|
+
this.eventFirstColliderGenerations = growUint32(this.eventFirstColliderGenerations, capacity);
|
|
186
|
+
this.eventSecondColliderIndices = growInt32(this.eventSecondColliderIndices, capacity);
|
|
187
|
+
this.eventSecondColliderGenerations = growUint32(this.eventSecondColliderGenerations, capacity);
|
|
188
|
+
}
|
|
189
|
+
swapGenerations(nextCount, nextEventCount) {
|
|
190
|
+
let int32 = this.firstColliderIndices;
|
|
191
|
+
this.firstColliderIndices = this.stagingFirstColliderIndices;
|
|
192
|
+
this.stagingFirstColliderIndices = int32;
|
|
193
|
+
let uint32 = this.firstColliderGenerations;
|
|
194
|
+
this.firstColliderGenerations = this.stagingFirstColliderGenerations;
|
|
195
|
+
this.stagingFirstColliderGenerations = uint32;
|
|
196
|
+
int32 = this.secondColliderIndices;
|
|
197
|
+
this.secondColliderIndices = this.stagingSecondColliderIndices;
|
|
198
|
+
this.stagingSecondColliderIndices = int32;
|
|
199
|
+
uint32 = this.secondColliderGenerations;
|
|
200
|
+
this.secondColliderGenerations = this.stagingSecondColliderGenerations;
|
|
201
|
+
this.stagingSecondColliderGenerations = uint32;
|
|
202
|
+
int32 = this.firstBodyIndices;
|
|
203
|
+
this.firstBodyIndices = this.stagingFirstBodyIndices;
|
|
204
|
+
this.stagingFirstBodyIndices = int32;
|
|
205
|
+
uint32 = this.firstBodyGenerations;
|
|
206
|
+
this.firstBodyGenerations = this.stagingFirstBodyGenerations;
|
|
207
|
+
this.stagingFirstBodyGenerations = uint32;
|
|
208
|
+
int32 = this.secondBodyIndices;
|
|
209
|
+
this.secondBodyIndices = this.stagingSecondBodyIndices;
|
|
210
|
+
this.stagingSecondBodyIndices = int32;
|
|
211
|
+
uint32 = this.secondBodyGenerations;
|
|
212
|
+
this.secondBodyGenerations = this.stagingSecondBodyGenerations;
|
|
213
|
+
this.stagingSecondBodyGenerations = uint32;
|
|
214
|
+
let uint8 = this.sensorFlags;
|
|
215
|
+
this.sensorFlags = this.stagingSensorFlags;
|
|
216
|
+
this.stagingSensorFlags = uint8;
|
|
217
|
+
let float64 = this.mixedFriction;
|
|
218
|
+
this.mixedFriction = this.stagingMixedFriction;
|
|
219
|
+
this.stagingMixedFriction = float64;
|
|
220
|
+
float64 = this.mixedRestitution;
|
|
221
|
+
this.mixedRestitution = this.stagingMixedRestitution;
|
|
222
|
+
this.stagingMixedRestitution = float64;
|
|
223
|
+
float64 = this.normalX;
|
|
224
|
+
this.normalX = this.stagingNormalX;
|
|
225
|
+
this.stagingNormalX = float64;
|
|
226
|
+
float64 = this.normalY;
|
|
227
|
+
this.normalY = this.stagingNormalY;
|
|
228
|
+
this.stagingNormalY = float64;
|
|
229
|
+
int32 = this.firstLeafIndices;
|
|
230
|
+
this.firstLeafIndices = this.stagingFirstLeafIndices;
|
|
231
|
+
this.stagingFirstLeafIndices = int32;
|
|
232
|
+
int32 = this.secondLeafIndices;
|
|
233
|
+
this.secondLeafIndices = this.stagingSecondLeafIndices;
|
|
234
|
+
this.stagingSecondLeafIndices = int32;
|
|
235
|
+
uint8 = this.pointCounts;
|
|
236
|
+
this.pointCounts = this.stagingPointCounts;
|
|
237
|
+
this.stagingPointCounts = uint8;
|
|
238
|
+
float64 = this.pointFirstX;
|
|
239
|
+
this.pointFirstX = this.stagingPointFirstX;
|
|
240
|
+
this.stagingPointFirstX = float64;
|
|
241
|
+
float64 = this.pointFirstY;
|
|
242
|
+
this.pointFirstY = this.stagingPointFirstY;
|
|
243
|
+
this.stagingPointFirstY = float64;
|
|
244
|
+
float64 = this.pointSecondX;
|
|
245
|
+
this.pointSecondX = this.stagingPointSecondX;
|
|
246
|
+
this.stagingPointSecondX = float64;
|
|
247
|
+
float64 = this.pointSecondY;
|
|
248
|
+
this.pointSecondY = this.stagingPointSecondY;
|
|
249
|
+
this.stagingPointSecondY = float64;
|
|
250
|
+
float64 = this.pointSeparations;
|
|
251
|
+
this.pointSeparations = this.stagingPointSeparations;
|
|
252
|
+
this.stagingPointSeparations = float64;
|
|
253
|
+
int32 = this.pointFirstFeatures;
|
|
254
|
+
this.pointFirstFeatures = this.stagingPointFirstFeatures;
|
|
255
|
+
this.stagingPointFirstFeatures = int32;
|
|
256
|
+
int32 = this.pointSecondFeatures;
|
|
257
|
+
this.pointSecondFeatures = this.stagingPointSecondFeatures;
|
|
258
|
+
this.stagingPointSecondFeatures = int32;
|
|
259
|
+
float64 = this.pointNormalImpulses;
|
|
260
|
+
this.pointNormalImpulses = this.stagingPointNormalImpulses;
|
|
261
|
+
this.stagingPointNormalImpulses = float64;
|
|
262
|
+
float64 = this.pointTangentImpulses;
|
|
263
|
+
this.pointTangentImpulses = this.stagingPointTangentImpulses;
|
|
264
|
+
this.stagingPointTangentImpulses = float64;
|
|
265
|
+
this.contactCount = nextCount;
|
|
266
|
+
this.eventCount = nextEventCount;
|
|
267
|
+
}
|
|
268
|
+
writeStagingContact(target, firstColliderIndex, firstColliderGeneration, secondColliderIndex, secondColliderGeneration, colliders, manifold, oldContact) {
|
|
269
|
+
this.stagingFirstColliderIndices[target] = firstColliderIndex;
|
|
270
|
+
this.stagingFirstColliderGenerations[target] = firstColliderGeneration;
|
|
271
|
+
this.stagingSecondColliderIndices[target] = secondColliderIndex;
|
|
272
|
+
this.stagingSecondColliderGenerations[target] = secondColliderGeneration;
|
|
273
|
+
this.stagingFirstBodyIndices[target] = colliders.bodyIndices[firstColliderIndex];
|
|
274
|
+
this.stagingFirstBodyGenerations[target] = colliders.bodyGenerations[firstColliderIndex];
|
|
275
|
+
this.stagingSecondBodyIndices[target] = colliders.bodyIndices[secondColliderIndex];
|
|
276
|
+
this.stagingSecondBodyGenerations[target] = colliders.bodyGenerations[secondColliderIndex];
|
|
277
|
+
const sensor = ((colliders.flags[firstColliderIndex] | colliders.flags[secondColliderIndex]) & COLLIDER_SENSOR_2D) !== 0;
|
|
278
|
+
this.stagingSensorFlags[target] = sensor ? 1 : 0;
|
|
279
|
+
const firstFriction = materialNumberAt(
|
|
280
|
+
colliders,
|
|
281
|
+
firstColliderIndex,
|
|
282
|
+
"friction",
|
|
283
|
+
0.5
|
|
284
|
+
);
|
|
285
|
+
const secondFriction = materialNumberAt(
|
|
286
|
+
colliders,
|
|
287
|
+
secondColliderIndex,
|
|
288
|
+
"friction",
|
|
289
|
+
0.5
|
|
290
|
+
);
|
|
291
|
+
this.stagingMixedFriction[target] = Math.sqrt(
|
|
292
|
+
firstFriction * secondFriction
|
|
293
|
+
);
|
|
294
|
+
this.stagingMixedRestitution[target] = Math.max(
|
|
295
|
+
materialNumberAt(colliders, firstColliderIndex, "restitution", 0),
|
|
296
|
+
materialNumberAt(colliders, secondColliderIndex, "restitution", 0)
|
|
297
|
+
);
|
|
298
|
+
this.stagingNormalX[target] = manifold.normalX;
|
|
299
|
+
this.stagingNormalY[target] = manifold.normalY;
|
|
300
|
+
this.stagingFirstLeafIndices[target] = manifold.firstLeaf;
|
|
301
|
+
this.stagingSecondLeafIndices[target] = manifold.secondLeaf;
|
|
302
|
+
const pointCount = Math.min(POINTS_PER_CONTACT, manifold.points.length);
|
|
303
|
+
this.stagingPointCounts[target] = pointCount;
|
|
304
|
+
let firstPoint = 0;
|
|
305
|
+
let secondPoint = 1;
|
|
306
|
+
if (pointCount === 2 && compareManifoldPoints(manifold.points[0], manifold.points[1]) > 0) {
|
|
307
|
+
firstPoint = 1;
|
|
308
|
+
secondPoint = 0;
|
|
309
|
+
}
|
|
310
|
+
for (let pointIndex = 0; pointIndex < POINTS_PER_CONTACT; pointIndex += 1) {
|
|
311
|
+
const targetPoint = target * POINTS_PER_CONTACT + pointIndex;
|
|
312
|
+
if (pointIndex >= pointCount) {
|
|
313
|
+
clearStagingPoint(this, targetPoint);
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
const sourcePoint = manifold.points[pointIndex === 0 ? firstPoint : secondPoint];
|
|
317
|
+
this.stagingPointFirstX[targetPoint] = sourcePoint.firstX;
|
|
318
|
+
this.stagingPointFirstY[targetPoint] = sourcePoint.firstY;
|
|
319
|
+
this.stagingPointSecondX[targetPoint] = sourcePoint.secondX;
|
|
320
|
+
this.stagingPointSecondY[targetPoint] = sourcePoint.secondY;
|
|
321
|
+
this.stagingPointSeparations[targetPoint] = sourcePoint.separation;
|
|
322
|
+
this.stagingPointFirstFeatures[targetPoint] = sourcePoint.firstFeature;
|
|
323
|
+
this.stagingPointSecondFeatures[targetPoint] = sourcePoint.secondFeature;
|
|
324
|
+
const oldPoint = oldContact < 0 ? -1 : this.findMatchingPoint(oldContact, manifold.firstLeaf, manifold.secondLeaf, sourcePoint.firstFeature, sourcePoint.secondFeature);
|
|
325
|
+
this.stagingPointNormalImpulses[targetPoint] = oldPoint < 0 ? 0 : this.pointNormalImpulses[oldPoint];
|
|
326
|
+
this.stagingPointTangentImpulses[targetPoint] = oldPoint < 0 ? 0 : this.pointTangentImpulses[oldPoint];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
findMatchingPoint(oldContact, firstLeaf, secondLeaf, firstFeature, secondFeature) {
|
|
330
|
+
if (this.firstLeafIndices[oldContact] !== firstLeaf || this.secondLeafIndices[oldContact] !== secondLeaf) return -1;
|
|
331
|
+
const base = oldContact * POINTS_PER_CONTACT;
|
|
332
|
+
for (let point = 0; point < this.pointCounts[oldContact]; point += 1) {
|
|
333
|
+
const index = base + point;
|
|
334
|
+
if (this.pointFirstFeatures[index] === firstFeature && this.pointSecondFeatures[index] === secondFeature) return index;
|
|
335
|
+
}
|
|
336
|
+
return -1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
function updateSortedContactCache2D(cache, pairs, colliders, manifoldProvider) {
|
|
340
|
+
cache.ensureCapacity(cache.contactCount + pairs.pairCount);
|
|
341
|
+
cache.ensureEventCapacity(cache.contactCount + pairs.pairCount);
|
|
342
|
+
let oldContact = 0;
|
|
343
|
+
let pair = 0;
|
|
344
|
+
let nextContact = 0;
|
|
345
|
+
let nextEvent = 0;
|
|
346
|
+
while (oldContact < cache.contactCount || pair < pairs.pairCount) {
|
|
347
|
+
let firstIndex;
|
|
348
|
+
let firstGeneration;
|
|
349
|
+
let secondIndex;
|
|
350
|
+
let secondGeneration;
|
|
351
|
+
let matchesOld = false;
|
|
352
|
+
if (oldContact >= cache.contactCount) {
|
|
353
|
+
firstIndex = pairs.pairFirstColliderIndices[pair];
|
|
354
|
+
firstGeneration = pairs.pairFirstColliderGenerations[pair];
|
|
355
|
+
secondIndex = pairs.pairSecondColliderIndices[pair];
|
|
356
|
+
secondGeneration = pairs.pairSecondColliderGenerations[pair];
|
|
357
|
+
pair += 1;
|
|
358
|
+
} else if (pair >= pairs.pairCount) {
|
|
359
|
+
firstIndex = cache.firstColliderIndices[oldContact];
|
|
360
|
+
firstGeneration = cache.firstColliderGenerations[oldContact];
|
|
361
|
+
secondIndex = cache.secondColliderIndices[oldContact];
|
|
362
|
+
secondGeneration = cache.secondColliderGenerations[oldContact];
|
|
363
|
+
matchesOld = true;
|
|
364
|
+
oldContact += 1;
|
|
365
|
+
} else {
|
|
366
|
+
const comparison = compareContactToPair(
|
|
367
|
+
cache,
|
|
368
|
+
oldContact,
|
|
369
|
+
pairs.pairFirstColliderIndices[pair],
|
|
370
|
+
pairs.pairFirstColliderGenerations[pair],
|
|
371
|
+
pairs.pairSecondColliderIndices[pair],
|
|
372
|
+
pairs.pairSecondColliderGenerations[pair]
|
|
373
|
+
);
|
|
374
|
+
if (comparison <= 0) {
|
|
375
|
+
firstIndex = cache.firstColliderIndices[oldContact];
|
|
376
|
+
firstGeneration = cache.firstColliderGenerations[oldContact];
|
|
377
|
+
secondIndex = cache.secondColliderIndices[oldContact];
|
|
378
|
+
secondGeneration = cache.secondColliderGenerations[oldContact];
|
|
379
|
+
matchesOld = true;
|
|
380
|
+
oldContact += 1;
|
|
381
|
+
if (comparison === 0) pair += 1;
|
|
382
|
+
} else {
|
|
383
|
+
firstIndex = pairs.pairFirstColliderIndices[pair];
|
|
384
|
+
firstGeneration = pairs.pairFirstColliderGenerations[pair];
|
|
385
|
+
secondIndex = pairs.pairSecondColliderIndices[pair];
|
|
386
|
+
secondGeneration = pairs.pairSecondColliderGenerations[pair];
|
|
387
|
+
pair += 1;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
const collidersLive = colliders.has(firstIndex, firstGeneration) && colliders.has(secondIndex, secondGeneration);
|
|
391
|
+
const sameBody = collidersLive && colliders.bodyIndices[firstIndex] === colliders.bodyIndices[secondIndex] && colliders.bodyGenerations[firstIndex] === colliders.bodyGenerations[secondIndex];
|
|
392
|
+
const manifold = collidersLive && !sameBody ? manifoldProvider(firstIndex, secondIndex) : null;
|
|
393
|
+
if (manifold !== null && manifold.points.length > 0) {
|
|
394
|
+
const oldIndex = matchesOld ? oldContact - 1 : -1;
|
|
395
|
+
const sensor = ((colliders.flags[firstIndex] | colliders.flags[secondIndex]) & COLLIDER_SENSOR_2D) !== 0;
|
|
396
|
+
const changesSensorState = oldIndex >= 0 && cache.sensorFlags[oldIndex] !== 0 !== sensor;
|
|
397
|
+
cache.writeStagingContact(
|
|
398
|
+
nextContact,
|
|
399
|
+
firstIndex,
|
|
400
|
+
firstGeneration,
|
|
401
|
+
secondIndex,
|
|
402
|
+
secondGeneration,
|
|
403
|
+
colliders,
|
|
404
|
+
manifold,
|
|
405
|
+
changesSensorState ? -1 : oldIndex
|
|
406
|
+
);
|
|
407
|
+
if (changesSensorState) {
|
|
408
|
+
nextEvent = writeEndEvent(cache, nextEvent, oldIndex);
|
|
409
|
+
nextEvent = writeBeginEvent(cache, nextEvent, nextContact);
|
|
410
|
+
} else if (!matchesOld) {
|
|
411
|
+
nextEvent = writeBeginEvent(cache, nextEvent, nextContact);
|
|
412
|
+
}
|
|
413
|
+
nextContact += 1;
|
|
414
|
+
} else if (matchesOld) {
|
|
415
|
+
nextEvent = writeEndEvent(cache, nextEvent, oldContact - 1);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
cache.swapGenerations(nextContact, nextEvent);
|
|
419
|
+
}
|
|
420
|
+
function compareContactToPair(cache, contact, firstIndex, firstGeneration, secondIndex, secondGeneration) {
|
|
421
|
+
return compareIdentity(cache.firstColliderIndices[contact], cache.firstColliderGenerations[contact], firstIndex, firstGeneration) || compareIdentity(cache.secondColliderIndices[contact], cache.secondColliderGenerations[contact], secondIndex, secondGeneration);
|
|
422
|
+
}
|
|
423
|
+
function compareIdentity(firstIndex, firstGeneration, secondIndex, secondGeneration) {
|
|
424
|
+
return firstIndex - secondIndex || firstGeneration - secondGeneration;
|
|
425
|
+
}
|
|
426
|
+
function writeBeginEvent(cache, event, stagingContact) {
|
|
427
|
+
cache.eventTypes[event] = cache.stagingSensorFlags[stagingContact] !== 0 ? OVERLAP_EVENT_BEGIN_2D : CONTACT_EVENT_BEGIN_2D;
|
|
428
|
+
cache.eventFirstColliderIndices[event] = cache.stagingFirstColliderIndices[stagingContact];
|
|
429
|
+
cache.eventFirstColliderGenerations[event] = cache.stagingFirstColliderGenerations[stagingContact];
|
|
430
|
+
cache.eventSecondColliderIndices[event] = cache.stagingSecondColliderIndices[stagingContact];
|
|
431
|
+
cache.eventSecondColliderGenerations[event] = cache.stagingSecondColliderGenerations[stagingContact];
|
|
432
|
+
return event + 1;
|
|
433
|
+
}
|
|
434
|
+
function writeEndEvent(cache, event, contact) {
|
|
435
|
+
cache.eventTypes[event] = cache.sensorFlags[contact] !== 0 ? OVERLAP_EVENT_END_2D : CONTACT_EVENT_END_2D;
|
|
436
|
+
cache.eventFirstColliderIndices[event] = cache.firstColliderIndices[contact];
|
|
437
|
+
cache.eventFirstColliderGenerations[event] = cache.firstColliderGenerations[contact];
|
|
438
|
+
cache.eventSecondColliderIndices[event] = cache.secondColliderIndices[contact];
|
|
439
|
+
cache.eventSecondColliderGenerations[event] = cache.secondColliderGenerations[contact];
|
|
440
|
+
return event + 1;
|
|
441
|
+
}
|
|
442
|
+
function materialNumberAt(colliders, colliderIndex, property, fallback) {
|
|
443
|
+
const material = colliders.materials[colliderIndex];
|
|
444
|
+
return material?.[property] ?? fallback;
|
|
445
|
+
}
|
|
446
|
+
function compareManifoldPoints(first, second) {
|
|
447
|
+
return first.firstFeature - second.firstFeature || first.secondFeature - second.secondFeature || first.firstX - second.firstX || first.firstY - second.firstY || first.secondX - second.secondX || first.secondY - second.secondY;
|
|
448
|
+
}
|
|
449
|
+
function clearStagingPoint(cache, point) {
|
|
450
|
+
cache.stagingPointFirstX[point] = 0;
|
|
451
|
+
cache.stagingPointFirstY[point] = 0;
|
|
452
|
+
cache.stagingPointSecondX[point] = 0;
|
|
453
|
+
cache.stagingPointSecondY[point] = 0;
|
|
454
|
+
cache.stagingPointSeparations[point] = 0;
|
|
455
|
+
cache.stagingPointFirstFeatures[point] = 0;
|
|
456
|
+
cache.stagingPointSecondFeatures[point] = 0;
|
|
457
|
+
cache.stagingPointNormalImpulses[point] = 0;
|
|
458
|
+
cache.stagingPointTangentImpulses[point] = 0;
|
|
459
|
+
}
|
|
460
|
+
function normalizedCapacity(initialCapacity) {
|
|
461
|
+
if (!Number.isInteger(initialCapacity) || initialCapacity < 1) {
|
|
462
|
+
throw new RangeError("initialCapacity must be a positive integer.");
|
|
463
|
+
}
|
|
464
|
+
let capacity = 1;
|
|
465
|
+
while (capacity < initialCapacity) capacity *= 2;
|
|
466
|
+
return capacity;
|
|
467
|
+
}
|
|
468
|
+
function growInt32(source, capacity) {
|
|
469
|
+
const result = new Int32Array(capacity);
|
|
470
|
+
result.set(source);
|
|
471
|
+
return result;
|
|
472
|
+
}
|
|
473
|
+
function growUint32(source, capacity) {
|
|
474
|
+
const result = new Uint32Array(capacity);
|
|
475
|
+
result.set(source);
|
|
476
|
+
return result;
|
|
477
|
+
}
|
|
478
|
+
function growUint8(source, capacity) {
|
|
479
|
+
const result = new Uint8Array(capacity);
|
|
480
|
+
result.set(source);
|
|
481
|
+
return result;
|
|
482
|
+
}
|
|
483
|
+
function growFloat64(source, capacity) {
|
|
484
|
+
const result = new Float64Array(capacity);
|
|
485
|
+
result.set(source);
|
|
486
|
+
return result;
|
|
487
|
+
}
|
|
488
|
+
export {
|
|
489
|
+
COLLIDER_SENSOR_2D,
|
|
490
|
+
CONTACT_EVENT_BEGIN_2D,
|
|
491
|
+
CONTACT_EVENT_END_2D,
|
|
492
|
+
ContactCache2D,
|
|
493
|
+
OVERLAP_EVENT_BEGIN_2D,
|
|
494
|
+
OVERLAP_EVENT_END_2D,
|
|
495
|
+
updateSortedContactCache2D
|
|
496
|
+
};
|
|
497
|
+
//# sourceMappingURL=contact-cache.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/features/physics/lib/2d/world/contact-cache.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PrivateManifold2D } from \"../collision/manifold.js\";\nimport type { ColliderStore2D } from \"./storage.js\";\n\nexport const COLLIDER_SENSOR_2D = 1 << 0;\n\nexport const CONTACT_EVENT_BEGIN_2D = 1;\nexport const CONTACT_EVENT_END_2D = 2;\nexport const OVERLAP_EVENT_BEGIN_2D = 3;\nexport const OVERLAP_EVENT_END_2D = 4;\n\nconst POINTS_PER_CONTACT = 2;\n\nexport interface SortedColliderPairs2D {\n readonly pairFirstColliderIndices: Int32Array;\n readonly pairFirstColliderGenerations: Uint32Array;\n readonly pairSecondColliderIndices: Int32Array;\n readonly pairSecondColliderGenerations: Uint32Array;\n readonly pairCount: number;\n}\n\nexport type PrivateManifoldProvider2D = (\n firstColliderIndex: number,\n secondColliderIndex: number,\n) => PrivateManifold2D | null;\n\nexport class ContactCache2D {\n contactCount = 0;\n firstColliderIndices: Int32Array;\n firstColliderGenerations: Uint32Array;\n secondColliderIndices: Int32Array;\n secondColliderGenerations: Uint32Array;\n firstBodyIndices: Int32Array;\n firstBodyGenerations: Uint32Array;\n secondBodyIndices: Int32Array;\n secondBodyGenerations: Uint32Array;\n sensorFlags: Uint8Array;\n mixedFriction: Float64Array;\n mixedRestitution: Float64Array;\n normalX: Float64Array;\n normalY: Float64Array;\n firstLeafIndices: Int32Array;\n secondLeafIndices: Int32Array;\n pointCounts: Uint8Array;\n pointFirstX: Float64Array;\n pointFirstY: Float64Array;\n pointSecondX: Float64Array;\n pointSecondY: Float64Array;\n pointSeparations: Float64Array;\n pointFirstFeatures: Int32Array;\n pointSecondFeatures: Int32Array;\n pointNormalImpulses: Float64Array;\n pointTangentImpulses: Float64Array;\n\n stagingFirstColliderIndices: Int32Array;\n stagingFirstColliderGenerations: Uint32Array;\n stagingSecondColliderIndices: Int32Array;\n stagingSecondColliderGenerations: Uint32Array;\n stagingFirstBodyIndices: Int32Array;\n stagingFirstBodyGenerations: Uint32Array;\n stagingSecondBodyIndices: Int32Array;\n stagingSecondBodyGenerations: Uint32Array;\n stagingSensorFlags: Uint8Array;\n stagingMixedFriction: Float64Array;\n stagingMixedRestitution: Float64Array;\n stagingNormalX: Float64Array;\n stagingNormalY: Float64Array;\n stagingFirstLeafIndices: Int32Array;\n stagingSecondLeafIndices: Int32Array;\n stagingPointCounts: Uint8Array;\n stagingPointFirstX: Float64Array;\n stagingPointFirstY: Float64Array;\n stagingPointSecondX: Float64Array;\n stagingPointSecondY: Float64Array;\n stagingPointSeparations: Float64Array;\n stagingPointFirstFeatures: Int32Array;\n stagingPointSecondFeatures: Int32Array;\n stagingPointNormalImpulses: Float64Array;\n stagingPointTangentImpulses: Float64Array;\n\n eventCount = 0;\n eventTypes: Uint8Array;\n eventFirstColliderIndices: Int32Array;\n eventFirstColliderGenerations: Uint32Array;\n eventSecondColliderIndices: Int32Array;\n eventSecondColliderGenerations: Uint32Array;\n\n constructor(initialCapacity = 4) {\n const capacity = normalizedCapacity(initialCapacity);\n this.firstColliderIndices = new Int32Array(capacity);\n this.firstColliderGenerations = new Uint32Array(capacity);\n this.secondColliderIndices = new Int32Array(capacity);\n this.secondColliderGenerations = new Uint32Array(capacity);\n this.firstBodyIndices = new Int32Array(capacity);\n this.firstBodyGenerations = new Uint32Array(capacity);\n this.secondBodyIndices = new Int32Array(capacity);\n this.secondBodyGenerations = new Uint32Array(capacity);\n this.sensorFlags = new Uint8Array(capacity);\n this.mixedFriction = new Float64Array(capacity);\n this.mixedRestitution = new Float64Array(capacity);\n this.normalX = new Float64Array(capacity);\n this.normalY = new Float64Array(capacity);\n this.firstLeafIndices = new Int32Array(capacity);\n this.secondLeafIndices = new Int32Array(capacity);\n this.pointCounts = new Uint8Array(capacity);\n this.pointFirstX = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointFirstY = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointSecondX = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointSecondY = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointSeparations = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointFirstFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);\n this.pointSecondFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);\n this.pointNormalImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.pointTangentImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);\n\n this.stagingFirstColliderIndices = new Int32Array(capacity);\n this.stagingFirstColliderGenerations = new Uint32Array(capacity);\n this.stagingSecondColliderIndices = new Int32Array(capacity);\n this.stagingSecondColliderGenerations = new Uint32Array(capacity);\n this.stagingFirstBodyIndices = new Int32Array(capacity);\n this.stagingFirstBodyGenerations = new Uint32Array(capacity);\n this.stagingSecondBodyIndices = new Int32Array(capacity);\n this.stagingSecondBodyGenerations = new Uint32Array(capacity);\n this.stagingSensorFlags = new Uint8Array(capacity);\n this.stagingMixedFriction = new Float64Array(capacity);\n this.stagingMixedRestitution = new Float64Array(capacity);\n this.stagingNormalX = new Float64Array(capacity);\n this.stagingNormalY = new Float64Array(capacity);\n this.stagingFirstLeafIndices = new Int32Array(capacity);\n this.stagingSecondLeafIndices = new Int32Array(capacity);\n this.stagingPointCounts = new Uint8Array(capacity);\n this.stagingPointFirstX = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointFirstY = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondX = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondY = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointSeparations = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointFirstFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondFeatures = new Int32Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointNormalImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);\n this.stagingPointTangentImpulses = new Float64Array(capacity * POINTS_PER_CONTACT);\n\n this.eventTypes = new Uint8Array(capacity * 2);\n this.eventFirstColliderIndices = new Int32Array(capacity * 2);\n this.eventFirstColliderGenerations = new Uint32Array(capacity * 2);\n this.eventSecondColliderIndices = new Int32Array(capacity * 2);\n this.eventSecondColliderGenerations = new Uint32Array(capacity * 2);\n }\n\n ensureCapacity(required: number): void {\n if (required <= this.firstColliderIndices.length) return;\n let capacity = this.firstColliderIndices.length;\n while (capacity < required) capacity *= 2;\n this.firstColliderIndices = growInt32(this.firstColliderIndices, capacity);\n this.firstColliderGenerations = growUint32(this.firstColliderGenerations, capacity);\n this.secondColliderIndices = growInt32(this.secondColliderIndices, capacity);\n this.secondColliderGenerations = growUint32(this.secondColliderGenerations, capacity);\n this.firstBodyIndices = growInt32(this.firstBodyIndices, capacity);\n this.firstBodyGenerations = growUint32(this.firstBodyGenerations, capacity);\n this.secondBodyIndices = growInt32(this.secondBodyIndices, capacity);\n this.secondBodyGenerations = growUint32(this.secondBodyGenerations, capacity);\n this.sensorFlags = growUint8(this.sensorFlags, capacity);\n this.mixedFriction = growFloat64(this.mixedFriction, capacity);\n this.mixedRestitution = growFloat64(this.mixedRestitution, capacity);\n this.normalX = growFloat64(this.normalX, capacity);\n this.normalY = growFloat64(this.normalY, capacity);\n this.firstLeafIndices = growInt32(this.firstLeafIndices, capacity);\n this.secondLeafIndices = growInt32(this.secondLeafIndices, capacity);\n this.pointCounts = growUint8(this.pointCounts, capacity);\n this.pointFirstX = growFloat64(this.pointFirstX, capacity * POINTS_PER_CONTACT);\n this.pointFirstY = growFloat64(this.pointFirstY, capacity * POINTS_PER_CONTACT);\n this.pointSecondX = growFloat64(this.pointSecondX, capacity * POINTS_PER_CONTACT);\n this.pointSecondY = growFloat64(this.pointSecondY, capacity * POINTS_PER_CONTACT);\n this.pointSeparations = growFloat64(this.pointSeparations, capacity * POINTS_PER_CONTACT);\n this.pointFirstFeatures = growInt32(this.pointFirstFeatures, capacity * POINTS_PER_CONTACT);\n this.pointSecondFeatures = growInt32(this.pointSecondFeatures, capacity * POINTS_PER_CONTACT);\n this.pointNormalImpulses = growFloat64(this.pointNormalImpulses, capacity * POINTS_PER_CONTACT);\n this.pointTangentImpulses = growFloat64(this.pointTangentImpulses, capacity * POINTS_PER_CONTACT);\n\n this.stagingFirstColliderIndices = growInt32(this.stagingFirstColliderIndices, capacity);\n this.stagingFirstColliderGenerations = growUint32(this.stagingFirstColliderGenerations, capacity);\n this.stagingSecondColliderIndices = growInt32(this.stagingSecondColliderIndices, capacity);\n this.stagingSecondColliderGenerations = growUint32(this.stagingSecondColliderGenerations, capacity);\n this.stagingFirstBodyIndices = growInt32(this.stagingFirstBodyIndices, capacity);\n this.stagingFirstBodyGenerations = growUint32(this.stagingFirstBodyGenerations, capacity);\n this.stagingSecondBodyIndices = growInt32(this.stagingSecondBodyIndices, capacity);\n this.stagingSecondBodyGenerations = growUint32(this.stagingSecondBodyGenerations, capacity);\n this.stagingSensorFlags = growUint8(this.stagingSensorFlags, capacity);\n this.stagingMixedFriction = growFloat64(this.stagingMixedFriction, capacity);\n this.stagingMixedRestitution = growFloat64(this.stagingMixedRestitution, capacity);\n this.stagingNormalX = growFloat64(this.stagingNormalX, capacity);\n this.stagingNormalY = growFloat64(this.stagingNormalY, capacity);\n this.stagingFirstLeafIndices = growInt32(this.stagingFirstLeafIndices, capacity);\n this.stagingSecondLeafIndices = growInt32(this.stagingSecondLeafIndices, capacity);\n this.stagingPointCounts = growUint8(this.stagingPointCounts, capacity);\n this.stagingPointFirstX = growFloat64(this.stagingPointFirstX, capacity * POINTS_PER_CONTACT);\n this.stagingPointFirstY = growFloat64(this.stagingPointFirstY, capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondX = growFloat64(this.stagingPointSecondX, capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondY = growFloat64(this.stagingPointSecondY, capacity * POINTS_PER_CONTACT);\n this.stagingPointSeparations = growFloat64(this.stagingPointSeparations, capacity * POINTS_PER_CONTACT);\n this.stagingPointFirstFeatures = growInt32(this.stagingPointFirstFeatures, capacity * POINTS_PER_CONTACT);\n this.stagingPointSecondFeatures = growInt32(this.stagingPointSecondFeatures, capacity * POINTS_PER_CONTACT);\n this.stagingPointNormalImpulses = growFloat64(this.stagingPointNormalImpulses, capacity * POINTS_PER_CONTACT);\n this.stagingPointTangentImpulses = growFloat64(this.stagingPointTangentImpulses, capacity * POINTS_PER_CONTACT);\n this.ensureEventCapacity(capacity * 2);\n }\n\n ensureEventCapacity(required: number): void {\n if (required <= this.eventTypes.length) return;\n let capacity = this.eventTypes.length;\n while (capacity < required) capacity *= 2;\n this.eventTypes = growUint8(this.eventTypes, capacity);\n this.eventFirstColliderIndices = growInt32(this.eventFirstColliderIndices, capacity);\n this.eventFirstColliderGenerations = growUint32(this.eventFirstColliderGenerations, capacity);\n this.eventSecondColliderIndices = growInt32(this.eventSecondColliderIndices, capacity);\n this.eventSecondColliderGenerations = growUint32(this.eventSecondColliderGenerations, capacity);\n }\n\n swapGenerations(nextCount: number, nextEventCount: number): void {\n let int32 = this.firstColliderIndices;\n this.firstColliderIndices = this.stagingFirstColliderIndices;\n this.stagingFirstColliderIndices = int32;\n let uint32 = this.firstColliderGenerations;\n this.firstColliderGenerations = this.stagingFirstColliderGenerations;\n this.stagingFirstColliderGenerations = uint32;\n int32 = this.secondColliderIndices;\n this.secondColliderIndices = this.stagingSecondColliderIndices;\n this.stagingSecondColliderIndices = int32;\n uint32 = this.secondColliderGenerations;\n this.secondColliderGenerations = this.stagingSecondColliderGenerations;\n this.stagingSecondColliderGenerations = uint32;\n int32 = this.firstBodyIndices;\n this.firstBodyIndices = this.stagingFirstBodyIndices;\n this.stagingFirstBodyIndices = int32;\n uint32 = this.firstBodyGenerations;\n this.firstBodyGenerations = this.stagingFirstBodyGenerations;\n this.stagingFirstBodyGenerations = uint32;\n int32 = this.secondBodyIndices;\n this.secondBodyIndices = this.stagingSecondBodyIndices;\n this.stagingSecondBodyIndices = int32;\n uint32 = this.secondBodyGenerations;\n this.secondBodyGenerations = this.stagingSecondBodyGenerations;\n this.stagingSecondBodyGenerations = uint32;\n let uint8 = this.sensorFlags;\n this.sensorFlags = this.stagingSensorFlags;\n this.stagingSensorFlags = uint8;\n let float64 = this.mixedFriction;\n this.mixedFriction = this.stagingMixedFriction;\n this.stagingMixedFriction = float64;\n float64 = this.mixedRestitution;\n this.mixedRestitution = this.stagingMixedRestitution;\n this.stagingMixedRestitution = float64;\n float64 = this.normalX;\n this.normalX = this.stagingNormalX;\n this.stagingNormalX = float64;\n float64 = this.normalY;\n this.normalY = this.stagingNormalY;\n this.stagingNormalY = float64;\n int32 = this.firstLeafIndices;\n this.firstLeafIndices = this.stagingFirstLeafIndices;\n this.stagingFirstLeafIndices = int32;\n int32 = this.secondLeafIndices;\n this.secondLeafIndices = this.stagingSecondLeafIndices;\n this.stagingSecondLeafIndices = int32;\n uint8 = this.pointCounts;\n this.pointCounts = this.stagingPointCounts;\n this.stagingPointCounts = uint8;\n float64 = this.pointFirstX;\n this.pointFirstX = this.stagingPointFirstX;\n this.stagingPointFirstX = float64;\n float64 = this.pointFirstY;\n this.pointFirstY = this.stagingPointFirstY;\n this.stagingPointFirstY = float64;\n float64 = this.pointSecondX;\n this.pointSecondX = this.stagingPointSecondX;\n this.stagingPointSecondX = float64;\n float64 = this.pointSecondY;\n this.pointSecondY = this.stagingPointSecondY;\n this.stagingPointSecondY = float64;\n float64 = this.pointSeparations;\n this.pointSeparations = this.stagingPointSeparations;\n this.stagingPointSeparations = float64;\n int32 = this.pointFirstFeatures;\n this.pointFirstFeatures = this.stagingPointFirstFeatures;\n this.stagingPointFirstFeatures = int32;\n int32 = this.pointSecondFeatures;\n this.pointSecondFeatures = this.stagingPointSecondFeatures;\n this.stagingPointSecondFeatures = int32;\n float64 = this.pointNormalImpulses;\n this.pointNormalImpulses = this.stagingPointNormalImpulses;\n this.stagingPointNormalImpulses = float64;\n float64 = this.pointTangentImpulses;\n this.pointTangentImpulses = this.stagingPointTangentImpulses;\n this.stagingPointTangentImpulses = float64;\n this.contactCount = nextCount;\n this.eventCount = nextEventCount;\n }\n\n writeStagingContact(\n target: number,\n firstColliderIndex: number,\n firstColliderGeneration: number,\n secondColliderIndex: number,\n secondColliderGeneration: number,\n colliders: ColliderStore2D,\n manifold: PrivateManifold2D,\n oldContact: number,\n ): void {\n this.stagingFirstColliderIndices[target] = firstColliderIndex;\n this.stagingFirstColliderGenerations[target] = firstColliderGeneration;\n this.stagingSecondColliderIndices[target] = secondColliderIndex;\n this.stagingSecondColliderGenerations[target] = secondColliderGeneration;\n this.stagingFirstBodyIndices[target] = colliders.bodyIndices[firstColliderIndex]!;\n this.stagingFirstBodyGenerations[target] = colliders.bodyGenerations[firstColliderIndex]!;\n this.stagingSecondBodyIndices[target] = colliders.bodyIndices[secondColliderIndex]!;\n this.stagingSecondBodyGenerations[target] = colliders.bodyGenerations[secondColliderIndex]!;\n const sensor =\n ((colliders.flags[firstColliderIndex]! | colliders.flags[secondColliderIndex]!) & COLLIDER_SENSOR_2D) !== 0;\n this.stagingSensorFlags[target] = sensor ? 1 : 0;\n const firstFriction = materialNumberAt(\n colliders,\n firstColliderIndex,\n \"friction\",\n 0.5,\n );\n const secondFriction = materialNumberAt(\n colliders,\n secondColliderIndex,\n \"friction\",\n 0.5,\n );\n this.stagingMixedFriction[target] = Math.sqrt(\n firstFriction * secondFriction,\n );\n this.stagingMixedRestitution[target] = Math.max(\n materialNumberAt(colliders, firstColliderIndex, \"restitution\", 0),\n materialNumberAt(colliders, secondColliderIndex, \"restitution\", 0),\n );\n this.stagingNormalX[target] = manifold.normalX;\n this.stagingNormalY[target] = manifold.normalY;\n this.stagingFirstLeafIndices[target] = manifold.firstLeaf;\n this.stagingSecondLeafIndices[target] = manifold.secondLeaf;\n const pointCount = Math.min(POINTS_PER_CONTACT, manifold.points.length);\n this.stagingPointCounts[target] = pointCount;\n let firstPoint = 0;\n let secondPoint = 1;\n if (pointCount === 2 && compareManifoldPoints(manifold.points[0]!, manifold.points[1]!) > 0) {\n firstPoint = 1;\n secondPoint = 0;\n }\n for (let pointIndex = 0; pointIndex < POINTS_PER_CONTACT; pointIndex += 1) {\n const targetPoint = target * POINTS_PER_CONTACT + pointIndex;\n if (pointIndex >= pointCount) {\n clearStagingPoint(this, targetPoint);\n continue;\n }\n const sourcePoint = manifold.points[pointIndex === 0 ? firstPoint : secondPoint]!;\n this.stagingPointFirstX[targetPoint] = sourcePoint.firstX;\n this.stagingPointFirstY[targetPoint] = sourcePoint.firstY;\n this.stagingPointSecondX[targetPoint] = sourcePoint.secondX;\n this.stagingPointSecondY[targetPoint] = sourcePoint.secondY;\n this.stagingPointSeparations[targetPoint] = sourcePoint.separation;\n this.stagingPointFirstFeatures[targetPoint] = sourcePoint.firstFeature;\n this.stagingPointSecondFeatures[targetPoint] = sourcePoint.secondFeature;\n const oldPoint = oldContact < 0\n ? -1\n : this.findMatchingPoint(oldContact, manifold.firstLeaf, manifold.secondLeaf, sourcePoint.firstFeature, sourcePoint.secondFeature);\n this.stagingPointNormalImpulses[targetPoint] = oldPoint < 0 ? 0 : this.pointNormalImpulses[oldPoint]!;\n this.stagingPointTangentImpulses[targetPoint] = oldPoint < 0 ? 0 : this.pointTangentImpulses[oldPoint]!;\n }\n }\n\n private findMatchingPoint(\n oldContact: number,\n firstLeaf: number,\n secondLeaf: number,\n firstFeature: number,\n secondFeature: number,\n ): number {\n if (\n this.firstLeafIndices[oldContact] !== firstLeaf ||\n this.secondLeafIndices[oldContact] !== secondLeaf\n ) return -1;\n const base = oldContact * POINTS_PER_CONTACT;\n for (let point = 0; point < this.pointCounts[oldContact]!; point += 1) {\n const index = base + point;\n if (\n this.pointFirstFeatures[index] === firstFeature &&\n this.pointSecondFeatures[index] === secondFeature\n ) return index;\n }\n return -1;\n }\n}\n\nexport function updateSortedContactCache2D(\n cache: ContactCache2D,\n pairs: SortedColliderPairs2D,\n colliders: ColliderStore2D,\n manifoldProvider: PrivateManifoldProvider2D,\n): void {\n cache.ensureCapacity(cache.contactCount + pairs.pairCount);\n cache.ensureEventCapacity(cache.contactCount + pairs.pairCount);\n let oldContact = 0;\n let pair = 0;\n let nextContact = 0;\n let nextEvent = 0;\n\n while (oldContact < cache.contactCount || pair < pairs.pairCount) {\n let firstIndex: number;\n let firstGeneration: number;\n let secondIndex: number;\n let secondGeneration: number;\n let matchesOld = false;\n if (oldContact >= cache.contactCount) {\n firstIndex = pairs.pairFirstColliderIndices[pair]!;\n firstGeneration = pairs.pairFirstColliderGenerations[pair]!;\n secondIndex = pairs.pairSecondColliderIndices[pair]!;\n secondGeneration = pairs.pairSecondColliderGenerations[pair]!;\n pair += 1;\n } else if (pair >= pairs.pairCount) {\n firstIndex = cache.firstColliderIndices[oldContact]!;\n firstGeneration = cache.firstColliderGenerations[oldContact]!;\n secondIndex = cache.secondColliderIndices[oldContact]!;\n secondGeneration = cache.secondColliderGenerations[oldContact]!;\n matchesOld = true;\n oldContact += 1;\n } else {\n const comparison = compareContactToPair(\n cache,\n oldContact,\n pairs.pairFirstColliderIndices[pair]!,\n pairs.pairFirstColliderGenerations[pair]!,\n pairs.pairSecondColliderIndices[pair]!,\n pairs.pairSecondColliderGenerations[pair]!,\n );\n if (comparison <= 0) {\n firstIndex = cache.firstColliderIndices[oldContact]!;\n firstGeneration = cache.firstColliderGenerations[oldContact]!;\n secondIndex = cache.secondColliderIndices[oldContact]!;\n secondGeneration = cache.secondColliderGenerations[oldContact]!;\n matchesOld = true;\n oldContact += 1;\n if (comparison === 0) pair += 1;\n } else {\n firstIndex = pairs.pairFirstColliderIndices[pair]!;\n firstGeneration = pairs.pairFirstColliderGenerations[pair]!;\n secondIndex = pairs.pairSecondColliderIndices[pair]!;\n secondGeneration = pairs.pairSecondColliderGenerations[pair]!;\n pair += 1;\n }\n }\n const collidersLive =\n colliders.has(firstIndex, firstGeneration) &&\n colliders.has(secondIndex, secondGeneration);\n const sameBody =\n collidersLive &&\n colliders.bodyIndices[firstIndex] === colliders.bodyIndices[secondIndex] &&\n colliders.bodyGenerations[firstIndex] === colliders.bodyGenerations[secondIndex];\n const manifold = collidersLive && !sameBody\n ? manifoldProvider(firstIndex, secondIndex)\n : null;\n if (manifold !== null && manifold.points.length > 0) {\n const oldIndex = matchesOld ? oldContact - 1 : -1;\n const sensor =\n ((colliders.flags[firstIndex]! | colliders.flags[secondIndex]!) &\n COLLIDER_SENSOR_2D) !==\n 0;\n const changesSensorState =\n oldIndex >= 0 && (cache.sensorFlags[oldIndex] !== 0) !== sensor;\n cache.writeStagingContact(\n nextContact,\n firstIndex,\n firstGeneration,\n secondIndex,\n secondGeneration,\n colliders,\n manifold,\n changesSensorState ? -1 : oldIndex,\n );\n if (changesSensorState) {\n nextEvent = writeEndEvent(cache, nextEvent, oldIndex);\n nextEvent = writeBeginEvent(cache, nextEvent, nextContact);\n } else if (!matchesOld) {\n nextEvent = writeBeginEvent(cache, nextEvent, nextContact);\n }\n nextContact += 1;\n } else if (matchesOld) {\n nextEvent = writeEndEvent(cache, nextEvent, oldContact - 1);\n }\n }\n cache.swapGenerations(nextContact, nextEvent);\n}\n\nfunction compareContactToPair(\n cache: ContactCache2D,\n contact: number,\n firstIndex: number,\n firstGeneration: number,\n secondIndex: number,\n secondGeneration: number,\n): number {\n return (\n compareIdentity(cache.firstColliderIndices[contact]!, cache.firstColliderGenerations[contact]!, firstIndex, firstGeneration) ||\n compareIdentity(cache.secondColliderIndices[contact]!, cache.secondColliderGenerations[contact]!, secondIndex, secondGeneration)\n );\n}\n\nfunction compareIdentity(\n firstIndex: number,\n firstGeneration: number,\n secondIndex: number,\n secondGeneration: number,\n): number {\n return firstIndex - secondIndex || firstGeneration - secondGeneration;\n}\n\nfunction writeBeginEvent(\n cache: ContactCache2D,\n event: number,\n stagingContact: number,\n): number {\n cache.eventTypes[event] = cache.stagingSensorFlags[stagingContact] !== 0\n ? OVERLAP_EVENT_BEGIN_2D\n : CONTACT_EVENT_BEGIN_2D;\n cache.eventFirstColliderIndices[event] =\n cache.stagingFirstColliderIndices[stagingContact]!;\n cache.eventFirstColliderGenerations[event] =\n cache.stagingFirstColliderGenerations[stagingContact]!;\n cache.eventSecondColliderIndices[event] =\n cache.stagingSecondColliderIndices[stagingContact]!;\n cache.eventSecondColliderGenerations[event] =\n cache.stagingSecondColliderGenerations[stagingContact]!;\n return event + 1;\n}\n\nfunction writeEndEvent(cache: ContactCache2D, event: number, contact: number): number {\n cache.eventTypes[event] = cache.sensorFlags[contact] !== 0\n ? OVERLAP_EVENT_END_2D\n : CONTACT_EVENT_END_2D;\n cache.eventFirstColliderIndices[event] = cache.firstColliderIndices[contact]!;\n cache.eventFirstColliderGenerations[event] = cache.firstColliderGenerations[contact]!;\n cache.eventSecondColliderIndices[event] = cache.secondColliderIndices[contact]!;\n cache.eventSecondColliderGenerations[event] = cache.secondColliderGenerations[contact]!;\n return event + 1;\n}\n\nfunction materialNumberAt(\n colliders: ColliderStore2D,\n colliderIndex: number,\n property: \"friction\" | \"restitution\",\n fallback: number,\n): number {\n const material = colliders.materials[colliderIndex] as Partial<{\n friction: number;\n restitution: number;\n }> | null;\n return material?.[property] ?? fallback;\n}\n\nfunction compareManifoldPoints(\n first: PrivateManifold2D[\"points\"][number],\n second: PrivateManifold2D[\"points\"][number],\n): number {\n return (\n first.firstFeature - second.firstFeature ||\n first.secondFeature - second.secondFeature ||\n first.firstX - second.firstX ||\n first.firstY - second.firstY ||\n first.secondX - second.secondX ||\n first.secondY - second.secondY\n );\n}\n\nfunction clearStagingPoint(cache: ContactCache2D, point: number): void {\n cache.stagingPointFirstX[point] = 0;\n cache.stagingPointFirstY[point] = 0;\n cache.stagingPointSecondX[point] = 0;\n cache.stagingPointSecondY[point] = 0;\n cache.stagingPointSeparations[point] = 0;\n cache.stagingPointFirstFeatures[point] = 0;\n cache.stagingPointSecondFeatures[point] = 0;\n cache.stagingPointNormalImpulses[point] = 0;\n cache.stagingPointTangentImpulses[point] = 0;\n}\n\nfunction normalizedCapacity(initialCapacity: number): number {\n if (!Number.isInteger(initialCapacity) || initialCapacity < 1) {\n throw new RangeError(\"initialCapacity must be a positive integer.\");\n }\n let capacity = 1;\n while (capacity < initialCapacity) capacity *= 2;\n return capacity;\n}\n\nfunction growInt32(source: Int32Array, capacity: number): Int32Array {\n const result = new Int32Array(capacity);\n result.set(source);\n return result;\n}\n\nfunction growUint32(source: Uint32Array, capacity: number): Uint32Array {\n const result = new Uint32Array(capacity);\n result.set(source);\n return result;\n}\n\nfunction growUint8(source: Uint8Array, capacity: number): Uint8Array {\n const result = new Uint8Array(capacity);\n result.set(source);\n return result;\n}\n\nfunction growFloat64(source: Float64Array, capacity: number): Float64Array {\n const result = new Float64Array(capacity);\n result.set(source);\n return result;\n}\n"],
|
|
5
|
+
"mappings": "AAGO,MAAM,qBAAqB,KAAK;AAEhC,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAEpC,MAAM,qBAAqB;AAepB,MAAM,eAAe;AAAA,EAC1B,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,YAAY,kBAAkB,GAAG;AAC/B,UAAM,WAAW,mBAAmB,eAAe;AACnD,SAAK,uBAAuB,IAAI,WAAW,QAAQ;AACnD,SAAK,2BAA2B,IAAI,YAAY,QAAQ;AACxD,SAAK,wBAAwB,IAAI,WAAW,QAAQ;AACpD,SAAK,4BAA4B,IAAI,YAAY,QAAQ;AACzD,SAAK,mBAAmB,IAAI,WAAW,QAAQ;AAC/C,SAAK,uBAAuB,IAAI,YAAY,QAAQ;AACpD,SAAK,o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Q;AACvC,SAAO,IAAI,MAAM;AACjB,SAAO;AACT;AAEA,SAAS,UAAU,QAAoB,UAA8B;AACnE,QAAM,SAAS,IAAI,WAAW,QAAQ;AACtC,SAAO,IAAI,MAAM;AACjB,SAAO;AACT;AAEA,SAAS,YAAY,QAAsB,UAAgC;AACzE,QAAM,SAAS,IAAI,aAAa,QAAQ;AACxC,SAAO,IAAI,MAAM;AACjB,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BodyStore2D } from "./storage.js";
|
|
2
|
+
export declare const BODY_TYPE_DYNAMIC_2D: number;
|
|
3
|
+
export declare const BODY_TYPE_KINEMATIC_2D: number;
|
|
4
|
+
export declare const BODY_FIXED_ROTATION_2D: number;
|
|
5
|
+
export declare function applyForceAtPointToCandidateBody2D(bodies: BodyStore2D, bodyIndex: number, bodyGeneration: number, forceX: number, forceY: number, pointX: number, pointY: number): boolean;
|
|
6
|
+
export declare function applyTorqueToCandidateBody2D(bodies: BodyStore2D, bodyIndex: number, bodyGeneration: number, torque: number): boolean;
|
|
7
|
+
export declare function applyImpulseAtPointToCandidateBody2D(bodies: BodyStore2D, bodyIndex: number, bodyGeneration: number, impulseX: number, impulseY: number, pointX: number, pointY: number): boolean;
|
|
8
|
+
export declare function integrateCandidateBodies2D(bodies: BodyStore2D, bodyIndices: Int32Array, bodyCount: number, gravityX: number, gravityY: number, dt: number): void;
|
|
9
|
+
/** Integrate acceleration separately so resting constraints act before position drift. */
|
|
10
|
+
export declare function integrateCandidateVelocities2D(bodies: BodyStore2D, bodyIndices: Int32Array, bodyCount: number, gravityX: number, gravityY: number, dt: number): void;
|
|
11
|
+
export declare function integrateCandidatePoses2D(bodies: BodyStore2D, bodyIndices: Int32Array, bodyCount: number, dt: number): void;
|