@woosh/meep-engine 3.22.0 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/core/geom/3d/hash-grid/PointHashGrid3.d.ts +118 -0
- package/src/core/geom/3d/hash-grid/PointHashGrid3.d.ts.map +1 -0
- package/src/core/geom/3d/hash-grid/PointHashGrid3.js +283 -0
- package/src/core/geom/3d/shape/BoxShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/BoxShape3D.js +6 -17
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CapsuleShape3D.js +3 -14
- package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/CylinderShape3D.js +3 -21
- package/src/core/geom/3d/shape/PlaneShape3D.d.ts +105 -0
- package/src/core/geom/3d/shape/PlaneShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/PlaneShape3D.js +251 -0
- package/src/core/geom/3d/shape/SphereShape3D.js +3 -3
- package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.js +3 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts +14 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/type_adapters.js +15 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts +51 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_box.js +113 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts +46 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_capsule.js +82 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts +60 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_cylinder.js +126 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts +50 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_degenerate_normal.js +53 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts +52 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_plane.js +61 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts +41 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.d.ts.map +1 -0
- package/src/core/geom/3d/shape/sdf/sdf3_sphere.js +71 -0
- package/src/core/process/ConcurrencyGate.d.ts +103 -0
- package/src/core/process/ConcurrencyGate.d.ts.map +1 -0
- package/src/core/process/ConcurrencyGate.js +207 -0
- package/src/engine/asset/AssetManager.d.ts +10 -0
- package/src/engine/asset/AssetManager.d.ts.map +1 -1
- package/src/engine/asset/AssetManager.js +10 -0
- package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +30 -13
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts +26 -0
- package/src/engine/graphics3/pose/collect_entity_playbacks.d.ts.map +1 -0
- package/src/engine/graphics3/pose/collect_entity_playbacks.js +40 -0
- package/src/engine/graphics3/pose/query_entity_node_world_pose.d.ts.map +1 -1
- package/src/engine/graphics3/pose/query_entity_node_world_pose.js +74 -101
- package/src/engine/physics/cloth/MEASUREMENTS.md +1287 -4
- package/src/engine/physics/cloth/PLAN.md +1967 -1581
- package/src/engine/physics/cloth/build/ClothProxy.d.ts +147 -0
- package/src/engine/physics/cloth/build/ClothProxy.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/ClothProxy.js +207 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts +70 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.d.ts.map +1 -0
- package/src/engine/physics/cloth/build/cloth_proxy_from_joints.js +256 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts +176 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderIndex.js +435 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts +12 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +38 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts +120 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/ClothColliderRecord.js +137 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts +25 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_bounds.js +190 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts +44 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_pack.js +173 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts +94 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.d.ts.map +1 -0
- package/src/engine/physics/cloth/collider/cloth_collider_sdf.js +275 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts +126 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothCollider.js +199 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts +9 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderFlags.js +32 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts +114 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothColliderSystem.js +243 -0
- package/src/engine/physics/cloth/ecs/ClothDynamicsFlags.js +66 -57
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +109 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothInstance.js +479 -363
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts +95 -0
- package/src/engine/physics/cloth/ecs/ClothRig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/ClothRig.js +140 -0
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +30 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/ClothSystem.js +1021 -773
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts +90 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_build_rows.js +374 -0
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts +32 -3
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_dynamics_library.js +283 -254
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts +59 -0
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_gather_colliders.js +328 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts +13 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_reconstruct_pose.js +288 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts +58 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_rig.js +199 -0
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts +8 -63
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_seed_subtree.js +317 -645
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts +61 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back.d.ts.map +1 -1
- package/src/engine/physics/cloth/ecs/cloth_write_back.js +212 -449
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts +49 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.d.ts.map +1 -0
- package/src/engine/physics/cloth/ecs/cloth_write_back_rig.js +115 -0
- package/src/engine/physics/cloth/playground/README.md +155 -1
- package/src/engine/physics/cloth/playground/collide.html +178 -0
- package/src/engine/physics/cloth/playground/collide_build.d.ts +95 -0
- package/src/engine/physics/cloth/playground/collide_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/collide_build.js +315 -0
- package/src/engine/physics/cloth/playground/collide_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/collide_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/collide_main.js +720 -0
- package/src/engine/physics/cloth/playground/garment.html +182 -0
- package/src/engine/physics/cloth/playground/garment_build.d.ts +78 -0
- package/src/engine/physics/cloth/playground/garment_build.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/garment_build.js +359 -0
- package/src/engine/physics/cloth/playground/garment_main.d.ts +2 -0
- package/src/engine/physics/cloth/playground/garment_main.d.ts.map +1 -0
- package/src/engine/physics/cloth/playground/garment_main.js +633 -0
- package/src/engine/physics/cloth/solver/ClothState.d.ts +208 -5
- package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/ClothState.js +302 -8
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts +87 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_contact_find.js +343 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +112 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/cloth_self_find.js +448 -0
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts +4 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solve_vertex.js +16 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +112 -5
- package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_solver_constants.js +117 -6
- package/src/engine/physics/cloth/solver/cloth_step.d.ts +40 -9
- package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/cloth_step.js +122 -10
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +95 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +285 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +129 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +501 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts +75 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -0
- package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +202 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/shade/playground/vgeo_viewer/README.md +18 -0
- package/src/shade/playground/vgeo_viewer/main.js +87 -50
- package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUDatabase.js +191 -62
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts +94 -2
- package/src/shade/renderer/buffer/table/GPUTypedTable.d.ts.map +1 -1
- package/src/shade/renderer/buffer/table/GPUTypedTable.js +414 -2
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts +14 -0
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.d.ts.map +1 -0
- package/src/shade/renderer/buffer/table/GPU_TABLE_PARTIAL_UPLOAD_DESCRIPTOR_WORDS.js +13 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts +17 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.d.ts.map +1 -0
- package/src/shade/renderer/buffer/table/gpu_table_partial_upload_shader.js +116 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts +9 -4
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryBVHManager.js +843 -734
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts +12 -0
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.d.ts.map +1 -1
- package/src/shade/renderer/geometry/bvh/GPUGeometryMeshletsBVH.js +13 -0
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts +17 -0
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/GPUMeshletManager.js +185 -30
- package/src/shade/renderer/geometry/virtual/MICRON_COMPARISON_2026_08_20.md +17 -0
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +141 -24
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +204 -64
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +110 -10
- package/src/shade/renderer/geometry/virtual/VK_LOD_CLUSTERS_COMPARISON_2026_08_20.md +19 -0
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts +19 -6
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoByteSource.js +26 -7
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts +173 -14
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoContainerReader.js +458 -51
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts +49 -13
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/VGeoReadOptions.js +52 -14
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/VGEO_MAX_AUDIT_BYTES.js +19 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts +27 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_audit_container.js +48 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts +29 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/read/tool/vgeo_install_all_pages.js +60 -0
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts +8 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_fetch_byte_source.js +32 -2
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts +258 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.js +723 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts +49 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.js +50 -0
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts +3 -0
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/bindless/GPUBindlessTextureManager.js +121 -21
- package/src/shade/renderer/texture/virtual/README.md +6 -4
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.d.ts.map +1 -1
- package/src/shade/renderer/texture/virtual/VirtualTextureManager.js +7 -0
- package/src/shade/renderer/texture/virtual/source/VTSourceTiled.d.ts +3 -3
- package/src/shade/renderer/texture/virtual/source/VTSourceTiled.js +3 -3
- package/src/engine/ecs/system/SystemExecutionPhase.d.ts +0 -9
- package/src/engine/ecs/system/SystemExecutionPhase.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/NOTES.md +0 -128
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts +0 -6
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VT_DEFAULT_PAGE_RESOLUTION.js +0 -5
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +0 -49
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.js +0 -264
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts +0 -44
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureUsage.js +0 -228
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts +0 -3
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/VirtualTextureUsageShader.js +0 -73
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts +0 -14
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/ResidencyDebugView.js +0 -85
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts +0 -12
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/UsageDebugView.js +0 -63
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts +0 -12
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.js +0 -243
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts +0 -30
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/VirtualTextureTile.js +0 -39
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts +0 -9
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/compose_finger_print.js +0 -24
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts +0 -9
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/compose_tile_address.js +0 -26
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts +0 -11
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/decompose_finger_print.js +0 -12
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts +0 -7
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.js +0 -16
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts +0 -7
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.d.ts.map +0 -1
- package/src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.js +0 -35
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { CSS_ABSOLUTE_POSITIONING } from "../../../../../view/CSS_ABSOLUTE_POSITIONING.js";
|
|
2
|
-
import { CanvasView } from "../../../../../view/elements/CanvasView.js";
|
|
3
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
4
|
-
import { sampler2d_write_to_canvas_raw } from "../../sampler/sampler2d_write_to_canvas_raw.js";
|
|
5
|
-
|
|
6
|
-
export class ResidencyDebugView extends EmptyView {
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @type {VirtualTexturePage|null}
|
|
10
|
-
*/
|
|
11
|
-
texture = null;
|
|
12
|
-
|
|
13
|
-
#canvas = new CanvasView();
|
|
14
|
-
|
|
15
|
-
#previous_residency = new Uint32Array(1024);
|
|
16
|
-
|
|
17
|
-
#scale =1;
|
|
18
|
-
|
|
19
|
-
constructor({
|
|
20
|
-
scale = 1
|
|
21
|
-
} = {}) {
|
|
22
|
-
|
|
23
|
-
super({
|
|
24
|
-
css: {
|
|
25
|
-
position: "absolute",
|
|
26
|
-
boxShadow: "0 0 8px black",
|
|
27
|
-
background: "black"
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
this.#scale = scale;
|
|
32
|
-
this.#canvas.css(CSS_ABSOLUTE_POSITIONING);
|
|
33
|
-
|
|
34
|
-
this.addChild(this.#canvas);
|
|
35
|
-
|
|
36
|
-
this.#previous_residency.fill(-1);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
update() {
|
|
40
|
-
|
|
41
|
-
const t = this.texture;
|
|
42
|
-
if (t === null) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const canvas = this.#canvas;
|
|
47
|
-
const scale = this.#scale;
|
|
48
|
-
|
|
49
|
-
canvas.size.set(
|
|
50
|
-
t.page_texture_resolution[0] * scale,
|
|
51
|
-
t.page_texture_resolution[1] * scale,
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
this.size.copy(canvas.size);
|
|
55
|
-
|
|
56
|
-
const residentTiles = t.resident_tiles;
|
|
57
|
-
|
|
58
|
-
const temp = new CanvasView();
|
|
59
|
-
const tile_resolution = t.tile_resolution;
|
|
60
|
-
temp.size.setScalar(tile_resolution);
|
|
61
|
-
|
|
62
|
-
const tile_columns = t.page_texture_resolution[0] / tile_resolution;
|
|
63
|
-
|
|
64
|
-
for (let i = 0; i < residentTiles.length; i++) {
|
|
65
|
-
const tile = residentTiles[i];
|
|
66
|
-
|
|
67
|
-
const page_slot = tile.page_slot;
|
|
68
|
-
if (this.#previous_residency[page_slot] === tile.finger_print) {
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
sampler2d_write_to_canvas_raw(tile.data, temp.el);
|
|
73
|
-
const column = page_slot % tile_columns;
|
|
74
|
-
const row = (page_slot / tile_columns) | 0;
|
|
75
|
-
|
|
76
|
-
canvas.context2d.drawImage(
|
|
77
|
-
temp.el, 0, 0, tile_resolution, tile_resolution,
|
|
78
|
-
tile_resolution * column * scale, tile_resolution * row * scale,
|
|
79
|
-
tile_resolution * scale, tile_resolution * scale
|
|
80
|
-
);
|
|
81
|
-
|
|
82
|
-
this.#previous_residency[page_slot] = tile.finger_print;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export class UsageDebugView extends EmptyView {
|
|
2
|
-
constructor(opt: any);
|
|
3
|
-
set mip_levels(v: any);
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {VirtualTextureUsage} usage
|
|
7
|
-
*/
|
|
8
|
-
set usage(usage: VirtualTextureUsage);
|
|
9
|
-
#private;
|
|
10
|
-
}
|
|
11
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
12
|
-
//# sourceMappingURL=UsageDebugView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsageDebugView.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/debug/UsageDebugView.js"],"names":[],"mappings":"AAKA;IAMI,sBAcC;IAED,uBAEC;IAED;;;OAGG;IACH,sCAwBC;;CAGJ;sBA7DqB,2CAA2C"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import LabelView from "../../../../../view/common/LabelView.js";
|
|
2
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
3
|
-
import { decompose_finger_print } from "../tile/decompose_finger_print.js";
|
|
4
|
-
import { tile_address_to_finger_print } from "../tile/tile_address_to_finger_print.js";
|
|
5
|
-
|
|
6
|
-
export class UsageDebugView extends EmptyView {
|
|
7
|
-
#tileCount = new LabelView("")
|
|
8
|
-
#tiles = new EmptyView();
|
|
9
|
-
#mip_levels = 0;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
constructor(opt) {
|
|
13
|
-
super(opt);
|
|
14
|
-
|
|
15
|
-
this.addChild(this.#tileCount);
|
|
16
|
-
this.addChild(this.#tiles);
|
|
17
|
-
|
|
18
|
-
this.css({
|
|
19
|
-
position: "absolute",
|
|
20
|
-
left: "0",
|
|
21
|
-
top: "0",
|
|
22
|
-
background: "rgba(255,255,255,0.5)",
|
|
23
|
-
fontFamily: "monospace",
|
|
24
|
-
fontSize: "10px"
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
set mip_levels(v) {
|
|
29
|
-
this.#mip_levels = v;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @param {VirtualTextureUsage} usage
|
|
35
|
-
*/
|
|
36
|
-
set usage(usage) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.#tiles.removeAllChildren();
|
|
40
|
-
|
|
41
|
-
const occupancy = usage.occupancy;
|
|
42
|
-
const occupancyCount = usage.occupancy_count;
|
|
43
|
-
|
|
44
|
-
for (let i = 0; i < occupancyCount; i++) {
|
|
45
|
-
const occupancy_index = occupancy[i];
|
|
46
|
-
const fingerPrint = tile_address_to_finger_print(occupancy_index);
|
|
47
|
-
|
|
48
|
-
const count = usage.getCountByFingerprint(fingerPrint);
|
|
49
|
-
|
|
50
|
-
if (count <= 0) {
|
|
51
|
-
continue;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const { mip, x, y } = decompose_finger_print(fingerPrint);
|
|
55
|
-
|
|
56
|
-
this.#tiles.addChild(new LabelView(`ID: ${0} Level: ${mip} X: ${x} Y: ${y} USAGE: ${count}`));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
this.#tileCount.updateText(`Tile Count: ${occupancyCount}`);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export class UsagePyramidDebugView extends EmptyView {
|
|
2
|
-
setImageURL(url: any): void;
|
|
3
|
-
setTextureParameters(resolution: any, tile_size: any): void;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {VirtualTextureUsage} usage
|
|
7
|
-
*/
|
|
8
|
-
set usage(usage: VirtualTextureUsage);
|
|
9
|
-
#private;
|
|
10
|
-
}
|
|
11
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
12
|
-
//# sourceMappingURL=UsagePyramidDebugView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsagePyramidDebugView.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/debug/UsagePyramidDebugView.js"],"names":[],"mappings":"AAoHA;IAUI,4BAIC;IAgBD,4DA2CC;IAED;;;OAGG;IACH,sCA8CC;;CACJ;sBA/OqB,2CAA2C"}
|
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../../../core/assert.js";
|
|
2
|
-
import LabelView from "../../../../../view/common/LabelView.js";
|
|
3
|
-
import { CSS_ABSOLUTE_POSITIONING } from "../../../../../view/CSS_ABSOLUTE_POSITIONING.js";
|
|
4
|
-
import EmptyView from "../../../../../view/elements/EmptyView.js";
|
|
5
|
-
import { decompose_finger_print } from "../tile/decompose_finger_print.js";
|
|
6
|
-
import { tile_address_to_finger_print } from "../tile/tile_address_to_finger_print.js";
|
|
7
|
-
|
|
8
|
-
class TextureLODView extends EmptyView {
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @type {View[]}
|
|
13
|
-
*/
|
|
14
|
-
#tiles = [];
|
|
15
|
-
|
|
16
|
-
#resolution = [1, 1];
|
|
17
|
-
|
|
18
|
-
constructor({
|
|
19
|
-
resolution = [1, 1],
|
|
20
|
-
tile_size = 8
|
|
21
|
-
}) {
|
|
22
|
-
super({ css: CSS_ABSOLUTE_POSITIONING });
|
|
23
|
-
|
|
24
|
-
this.css({
|
|
25
|
-
background: "rgba(255,255,255,0.05)"
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
this.#resolution = resolution;
|
|
29
|
-
|
|
30
|
-
const width = resolution[0];
|
|
31
|
-
const height = resolution[1];
|
|
32
|
-
|
|
33
|
-
assert.isNonNegativeInteger(width, 'width');
|
|
34
|
-
assert.isNonNegativeInteger(height, 'height');
|
|
35
|
-
|
|
36
|
-
for (let j = 0; j < height; j++) {
|
|
37
|
-
for (let i = 0; i < width; i++) {
|
|
38
|
-
const tileView = new EmptyView({ css: CSS_ABSOLUTE_POSITIONING });
|
|
39
|
-
|
|
40
|
-
// const flipped_y = height - j - 1;
|
|
41
|
-
tileView.position.set(i * tile_size, j * tile_size);
|
|
42
|
-
// tileView.position.set(i * tile_size, flipped_y * tile_size);
|
|
43
|
-
tileView.size.set(tile_size, tile_size);
|
|
44
|
-
|
|
45
|
-
this.clearTile(tileView);
|
|
46
|
-
|
|
47
|
-
this.#tiles.push(tileView)
|
|
48
|
-
|
|
49
|
-
this.addChild(tileView);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
this.size.set(width * tile_size, height * tile_size);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const label = new LabelView(`${width} x ${height}`, {
|
|
57
|
-
css: {
|
|
58
|
-
...CSS_ABSOLUTE_POSITIONING,
|
|
59
|
-
color: '#FFFFFF',
|
|
60
|
-
textShadow: '0 0 2px black',
|
|
61
|
-
whiteSpace: "pre"
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
label.position.set(this.size.x + 4, (this.size.y - 20) * 0.5);
|
|
66
|
-
|
|
67
|
-
this.addChild(label);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
clear() {
|
|
71
|
-
const resolution = this.#resolution;
|
|
72
|
-
const count = resolution[0] * resolution[1];
|
|
73
|
-
for (let i = 0; i < count; i++) {
|
|
74
|
-
|
|
75
|
-
const view = this.#tiles[i];
|
|
76
|
-
|
|
77
|
-
this.clearTile(view);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @param {View} view
|
|
84
|
-
*/
|
|
85
|
-
clearTile(view) {
|
|
86
|
-
|
|
87
|
-
view.css({
|
|
88
|
-
background: "none"
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
view.visible = false;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
getTile(x, y) {
|
|
95
|
-
assert.isNonNegativeInteger(x, 'x');
|
|
96
|
-
assert.isNonNegativeInteger(y, 'y');
|
|
97
|
-
|
|
98
|
-
const resolution = this.#resolution;
|
|
99
|
-
|
|
100
|
-
// assert.lessThan(x, resolution[0]);
|
|
101
|
-
// assert.lessThan(y, resolution[1]);
|
|
102
|
-
|
|
103
|
-
const width = resolution[0];
|
|
104
|
-
|
|
105
|
-
const view = this.#tiles[x + width * y];
|
|
106
|
-
|
|
107
|
-
if (view === undefined) {
|
|
108
|
-
debugger
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return view;
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export class UsagePyramidDebugView extends EmptyView {
|
|
118
|
-
#levels = [];
|
|
119
|
-
#resolution = [1, 1];
|
|
120
|
-
#tile_size = 0;
|
|
121
|
-
|
|
122
|
-
#used_set = [];
|
|
123
|
-
#used_set_size = 0;
|
|
124
|
-
|
|
125
|
-
#image_url = null
|
|
126
|
-
|
|
127
|
-
setImageURL(url) {
|
|
128
|
-
this.#image_url = url;
|
|
129
|
-
|
|
130
|
-
this.#applyImageURL();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
#applyImageURL() {
|
|
134
|
-
|
|
135
|
-
const background = {
|
|
136
|
-
backgroundImage: this.#image_url === null ? "none" : `url(${this.#image_url})`,
|
|
137
|
-
backgroundSize: "contain"
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
this.#levels.forEach(l => {
|
|
141
|
-
|
|
142
|
-
l.css(background);
|
|
143
|
-
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
setTextureParameters(resolution, tile_size) {
|
|
148
|
-
if (this.#resolution[0] === resolution && this.#resolution[1] === resolution && this.#tile_size === tile_size) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
this.#tile_size = tile_size;
|
|
153
|
-
this.#resolution = [resolution, resolution];
|
|
154
|
-
|
|
155
|
-
this.#levels.splice(0, this.#levels.length);
|
|
156
|
-
this.removeAllChildren();
|
|
157
|
-
|
|
158
|
-
let size = resolution / tile_size;
|
|
159
|
-
|
|
160
|
-
assert.isNonNegativeInteger(size, 'size');
|
|
161
|
-
|
|
162
|
-
while (size > 0) {
|
|
163
|
-
const lod = new TextureLODView({
|
|
164
|
-
resolution: [size, size],
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
lod.css({
|
|
168
|
-
border: "1px solid rgba(0,0,0,0.7)"
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
this.#levels.push(lod);
|
|
172
|
-
|
|
173
|
-
this.addChild(lod);
|
|
174
|
-
|
|
175
|
-
size >>>= 1;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
this.#levels.reverse();
|
|
179
|
-
|
|
180
|
-
let y = 0;
|
|
181
|
-
for (let i = 0; i < this.#levels.length; i++) {
|
|
182
|
-
const level = this.#levels[i];
|
|
183
|
-
|
|
184
|
-
level.position.set(2, y);
|
|
185
|
-
|
|
186
|
-
y += level.size.y + 4;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
this.#applyImageURL();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
*
|
|
194
|
-
* @param {VirtualTextureUsage} usage
|
|
195
|
-
*/
|
|
196
|
-
set usage(usage) {
|
|
197
|
-
|
|
198
|
-
for (let i = 0; i < this.#used_set_size; i++) {
|
|
199
|
-
const finger_print = this.#used_set[i];
|
|
200
|
-
|
|
201
|
-
const { mip, x, y } = decompose_finger_print(finger_print);
|
|
202
|
-
|
|
203
|
-
const mipView = this.#levels[mip];
|
|
204
|
-
|
|
205
|
-
const tile = mipView.getTile(x, y);
|
|
206
|
-
|
|
207
|
-
mipView.clearTile(tile);
|
|
208
|
-
}
|
|
209
|
-
this.#used_set_size = 0;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const occupancy = usage.occupancy;
|
|
213
|
-
const occupancyCount = usage.occupancy_count;
|
|
214
|
-
|
|
215
|
-
for (let i = 0; i < occupancyCount; i++) {
|
|
216
|
-
const occupancy_index = occupancy[i];
|
|
217
|
-
const fingerPrint = tile_address_to_finger_print(occupancy_index);
|
|
218
|
-
|
|
219
|
-
const count = usage.getCountByFingerprint(fingerPrint);
|
|
220
|
-
|
|
221
|
-
if (count <= 0) {
|
|
222
|
-
continue;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const { mip, x, y } = decompose_finger_print(fingerPrint);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const mipView = this.#levels[mip];
|
|
229
|
-
|
|
230
|
-
const tile = mipView.getTile(x, y);
|
|
231
|
-
|
|
232
|
-
tile.css({
|
|
233
|
-
background: "rgba(255,0,0,0.8)"
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
tile.visible = true;
|
|
237
|
-
|
|
238
|
-
this.#used_set[this.#used_set_size] = fingerPrint;
|
|
239
|
-
this.#used_set_size++;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export class VirtualTextureTile {
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @type {number}
|
|
5
|
-
*/
|
|
6
|
-
finger_print: number;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @type {number}
|
|
10
|
-
*/
|
|
11
|
-
last_used_time: number;
|
|
12
|
-
/**
|
|
13
|
-
* Currently occupied page slot, only valid when page is resident
|
|
14
|
-
* @type {number}
|
|
15
|
-
*/
|
|
16
|
-
page_slot: number;
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @type {Sampler2D|null}
|
|
20
|
-
*/
|
|
21
|
-
data: Sampler2D | null;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {VirtualTextureTile} other
|
|
25
|
-
* @returns {boolean}
|
|
26
|
-
*/
|
|
27
|
-
equals(other: VirtualTextureTile): boolean;
|
|
28
|
-
hash(): number;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=VirtualTextureTile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualTextureTile.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/VirtualTextureTile.js"],"names":[],"mappings":"AAAA;IAEI;;;OAGG;IACH,cAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,gBAFU,MAAM,CAEG;IAEnB;;;OAGG;IACH,WAFU,MAAM,CAED;IAEf;;;OAGG;IACH,MAFU,YAAU,IAAI,CAEZ;IAEZ;;;;OAIG;IACH,cAHW,kBAAkB,GAChB,OAAO,CAInB;IAED,eAEC;CACJ"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export class VirtualTextureTile {
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @type {number}
|
|
6
|
-
*/
|
|
7
|
-
finger_print = 0;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @type {number}
|
|
12
|
-
*/
|
|
13
|
-
last_used_time = 0;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Currently occupied page slot, only valid when page is resident
|
|
17
|
-
* @type {number}
|
|
18
|
-
*/
|
|
19
|
-
page_slot = -1;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @type {Sampler2D|null}
|
|
24
|
-
*/
|
|
25
|
-
data = null;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @param {VirtualTextureTile} other
|
|
30
|
-
* @returns {boolean}
|
|
31
|
-
*/
|
|
32
|
-
equals(other) {
|
|
33
|
-
return this.finger_print === other.finger_print;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
hash() {
|
|
37
|
-
return this.finger_print;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose_finger_print.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/compose_finger_print.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,0CALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAgBlB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../../../core/assert.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {number} mip
|
|
6
|
-
* @param {number} x
|
|
7
|
-
* @param {number} y
|
|
8
|
-
* @returns {number}
|
|
9
|
-
*/
|
|
10
|
-
export function compose_finger_print(mip, x, y) {
|
|
11
|
-
// validate
|
|
12
|
-
assert.isNonNegativeInteger(x, 'x');
|
|
13
|
-
assert.isNonNegativeInteger(y, 'y');
|
|
14
|
-
assert.isNonNegativeInteger(mip, 'mip');
|
|
15
|
-
assert.lessThan(mip,32,'mip level is too high')
|
|
16
|
-
|
|
17
|
-
assert.lessThan(x, (1 << mip), 'x');
|
|
18
|
-
assert.lessThan(y, (1 << mip), 'y');
|
|
19
|
-
|
|
20
|
-
return (mip << 24)
|
|
21
|
-
| (x << 16)
|
|
22
|
-
| (y << 8)
|
|
23
|
-
;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compose_tile_address.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/compose_tile_address.js"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,0CALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,MAAM,CAiBlB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { assert } from "../../../../../core/assert.js";
|
|
2
|
-
import { split_by_2 } from "../../../../../core/binary/split_by_2.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param {number} mip
|
|
7
|
-
* @param {number} x
|
|
8
|
-
* @param {number} y
|
|
9
|
-
* @returns {number}
|
|
10
|
-
*/
|
|
11
|
-
export function compose_tile_address(mip, x, y) {
|
|
12
|
-
|
|
13
|
-
// figure out resolution of this mip level
|
|
14
|
-
const mip_resolution = 1 << mip;
|
|
15
|
-
|
|
16
|
-
assert.lessThan(x, mip_resolution);
|
|
17
|
-
assert.lessThan(y, mip_resolution);
|
|
18
|
-
|
|
19
|
-
// this is basically converting something like 0100 to 0011;
|
|
20
|
-
const mip_mask = mip_resolution - 1;
|
|
21
|
-
|
|
22
|
-
// where data for this mip starts
|
|
23
|
-
const index_offset = split_by_2(mip_mask);
|
|
24
|
-
|
|
25
|
-
return index_offset + x + y * mip_resolution;
|
|
26
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {number} finger_print
|
|
4
|
-
* @returns {{mip: number, x: number, y: number}}
|
|
5
|
-
*/
|
|
6
|
-
export function decompose_finger_print(finger_print: number): {
|
|
7
|
-
mip: number;
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=decompose_finger_print.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decompose_finger_print.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/decompose_finger_print.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qDAHW,MAAM,GACJ;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAC,CAQ/C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {number} finger_print
|
|
4
|
-
* @returns {{mip: number, x: number, y: number}}
|
|
5
|
-
*/
|
|
6
|
-
export function decompose_finger_print(finger_print) {
|
|
7
|
-
const mip = (finger_print >> 24) & 0xFF;
|
|
8
|
-
const x = (finger_print >> 16) & 0xFF;
|
|
9
|
-
const y = (finger_print >> 8) & 0xFF;
|
|
10
|
-
|
|
11
|
-
return { mip, x, y };
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"finger_print_to_tile_address.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/finger_print_to_tile_address.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,2DAHW,MAAM,GACJ,MAAM,CASlB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { compose_tile_address } from "./compose_tile_address.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param {number} finger_print
|
|
6
|
-
* @returns {number}
|
|
7
|
-
*/
|
|
8
|
-
export function finger_print_to_tile_address(finger_print) {
|
|
9
|
-
// decode fingerprint
|
|
10
|
-
const mip = (finger_print >> 24) & 0xFF;
|
|
11
|
-
const x = (finger_print >> 16) & 0xFF;
|
|
12
|
-
const y = (finger_print >> 8) & 0xFF;
|
|
13
|
-
|
|
14
|
-
return compose_tile_address(mip, x, y);
|
|
15
|
-
}
|
|
16
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tile_address_to_finger_print.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/virtual/tile/tile_address_to_finger_print.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,oDAHW,MAAM,GACJ,MAAM,CA4BlB"}
|