@woosh/meep-engine 3.27.0 → 3.28.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/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/src/core/geom/3d/mat4/m4_linear_determinant.d.ts +15 -0
- package/src/core/geom/3d/mat4/m4_linear_determinant.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_linear_determinant.js +24 -0
- package/src/core/geom/3d/mat4/m4_normal_matrix3.d.ts +4 -2
- package/src/core/geom/3d/mat4/m4_normal_matrix3.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_normal_matrix3.js +21 -11
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +38 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts +5 -1
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +834 -830
- package/src/shade/RENDERER_CONTRACT.md +19 -10
- package/src/shade/device/timing/GPU_PROFILER_PROPOSAL_2026_08_28.md +1 -1
- package/src/shade/playground/vgeo_runtime/README.md +27 -13
- package/src/shade/playground/vgeo_runtime/main.js +18 -5
- package/src/shade/playground/vgeo_runtime/sample_asset.d.ts +18 -0
- package/src/shade/playground/vgeo_runtime/sample_asset.d.ts.map +1 -0
- package/src/shade/playground/{vgeo_viewer → vgeo_runtime}/sample_asset.js +9 -8
- package/src/shade/playground/vgeo_scene/README.md +408 -0
- package/src/shade/playground/vgeo_scene/index.html +144 -0
- package/src/shade/playground/vgeo_scene/main.d.ts +2 -0
- package/src/shade/playground/vgeo_scene/main.d.ts.map +1 -0
- package/src/shade/playground/vgeo_scene/main.js +1716 -0
- package/src/shade/renderer/Renderer.d.ts +4 -1
- package/src/shade/renderer/Renderer.d.ts.map +1 -1
- package/src/shade/renderer/Renderer.js +5 -2
- package/src/shade/renderer/extension/RENDER_EXTENSION_DESIGN.md +1 -2
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +3 -29
- package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts +22 -0
- package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts.map +1 -0
- package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.js +49 -0
- package/src/shade/renderer/geometry/virtual/VGEO_FORMAT.md +4 -2
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_DESIGN.md +10 -8
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +12 -11
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts +1 -1
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js +1 -1
- package/src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.js +5 -9
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevel.d.ts +32 -0
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevel.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts +59 -0
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelSummary.d.ts +44 -0
- package/src/shade/renderer/geometry/virtual/build/level/VGeoLevelSummary.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.d.ts +36 -0
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_build_levels.js → level/vgeo_build_levels.js} +61 -95
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_root_group.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_root_group.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_build_root_group.js → level/vgeo_build_root_group.js} +1 -1
- package/src/shade/renderer/geometry/virtual/build/mesh/VirtualGeometryMesh.d.ts +73 -0
- package/src/shade/renderer/geometry/virtual/build/mesh/VirtualGeometryMesh.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{VirtualGeometryMesh.js → mesh/VirtualGeometryMesh.js} +7 -7
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts +29 -0
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_normals.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_compute_vertex_normals.js → mesh/vgeo_compute_vertex_normals.js} +3 -3
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_tangents.d.ts +31 -0
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_compute_vertex_tangents.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_compute_vertex_tangents.js → mesh/vgeo_compute_vertex_tangents.js} +5 -5
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.d.ts +46 -0
- package/src/shade/renderer/geometry/virtual/build/mesh/vgeo_normalize_source.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_normalize_source.js → mesh/vgeo_normalize_source.js} +9 -9
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_assemble_pages.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_assemble_pages.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_assemble_pages.js → page/vgeo_assemble_pages.js} +9 -9
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_build_page_nodes.d.ts +13 -0
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_build_page_nodes.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_build_page_nodes.js → page/vgeo_build_page_nodes.js} +4 -4
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_page_node_count.d.ts +22 -0
- package/src/shade/renderer/geometry/virtual/build/page/vgeo_page_node_count.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_page_node_count.js → page/vgeo_page_node_count.js} +2 -2
- package/src/shade/renderer/geometry/virtual/build/partition/VGeoFaceGraph.d.ts +52 -0
- package/src/shade/renderer/geometry/virtual/build/partition/VGeoFaceGraph.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{VGeoFaceGraph.js → partition/VGeoFaceGraph.js} +1 -1
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_graph_components.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_graph.d.ts +29 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_graph.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_partition_graph.js → partition/vgeo_partition_graph.js} +2 -2
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.d.ts +41 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_partition_subgraph.js +92 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set.d.ts +10 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_split_face_set.js → partition/vgeo_split_face_set.js} +12 -55
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/build/partition/vgeo_split_face_set_packed.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_split_face_set_packed.js → partition/vgeo_split_face_set_packed.js} +3 -3
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_bounding_sphere.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_bounding_sphere.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_bounding_sphere.js → sphere/vgeo_bounding_sphere.js} +3 -3
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_containing_sphere.d.ts +18 -0
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_containing_sphere.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_containing_sphere.js → sphere/vgeo_containing_sphere.js} +3 -3
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_sphere_inflate_to_contain.d.ts +9 -0
- package/src/shade/renderer/geometry/virtual/build/sphere/vgeo_sphere_inflate_to_contain.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_sphere_inflate_to_contain.js → sphere/vgeo_sphere_inflate_to_contain.js} +1 -1
- package/src/shade/renderer/geometry/virtual/build/submesh/VGeoGatheredFaces.d.ts +24 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/VGeoGatheredFaces.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/VGeoSubmesh.d.ts +20 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/VGeoSubmesh.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_extract_submesh.d.ts +14 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_extract_submesh.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_extract_submesh.js → submesh/vgeo_extract_submesh.js} +5 -5
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_gather_faces.d.ts +12 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_gather_faces.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_gather_faces.js → submesh/vgeo_gather_faces.js} +2 -2
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_narrow_indices.d.ts +11 -0
- package/src/shade/renderer/geometry/virtual/build/submesh/vgeo_narrow_indices.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/build/{vgeo_narrow_indices.js → submesh/vgeo_narrow_indices.js} +3 -3
- package/src/shade/renderer/geometry/virtual/build/vgeo_build.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/build/vgeo_build.js +9 -11
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.d.ts +8 -2
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/attribute/vgeo_attributes_read.js +8 -2
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.d.ts +15 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_GROUP_OFFSET.js +15 -0
- package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.d.ts +28 -0
- package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/payload/vgeo_encode_cluster_payload.js +7 -3
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/read/vgeo_read_page.js +9 -4
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_validate_container.js +18 -5
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/format/vgeo_write_container.js +9 -1
- package/src/shade/renderer/geometry/virtual/runtime/CUT_PLAN_2026_09_14.md +21 -2
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts +52 -2
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/GPUVirtualGeometryRuntime.js +97 -1
- package/src/shade/renderer/geometry/virtual/runtime/RUNTIME_PLAN.md +4 -4
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoFeedbackLoop.js +10 -0
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/VGeoResidency.js +59 -34
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +8 -8
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +11 -88
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts +19 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_arena.js +98 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts +31 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_claim.js +99 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.d.ts +17 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.d.ts.map +1 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_queue.js +39 -0
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_reseed.js +7 -63
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_seed.js +13 -30
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.d.ts.map +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_traverse.js +6 -52
- package/src/shade/renderer/loader/gltf/load_gltf.d.ts.map +1 -1
- package/src/shade/renderer/loader/gltf/load_gltf.js +0 -19
- package/src/shade/renderer/material/chunk_material_draw_side.d.ts +14 -0
- package/src/shade/renderer/material/chunk_material_draw_side.d.ts.map +1 -0
- package/src/shade/renderer/material/chunk_material_draw_side.js +34 -0
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +8 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
- package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +13 -1
- package/src/shade/renderer/rasterize/bucket/construct_primitive_state.d.ts +19 -5
- package/src/shade/renderer/rasterize/bucket/construct_primitive_state.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/construct_primitive_state.js +23 -5
- package/src/shade/renderer/rasterize/bucket/filter_materials_by_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/bucket/filter_materials_by_bucket.js +12 -5
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts +22 -0
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/bucket/rasterization_opaque_buckets.js +36 -0
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +15 -0
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -0
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +35 -0
- package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts +10 -1
- package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/RASTERIZATION_BUCKET_LIMIT.js +38 -29
- package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.d.ts +5 -0
- package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/bucket/chunk_rasterization_material_bucket.js +63 -55
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.js +1 -0
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/fast/graph_rasterize_scene_fast.js +44 -53
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.js +6 -2
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.js +6 -2
- package/src/shade/renderer/rasterize/forward/vertex_shader_chunk.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/forward/vertex_shader_chunk.js +19 -2
- package/src/shade/renderer/rasterize/native/avboit/AVBOIT_PLAN_2026_09_03.md +7 -4
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +3 -2
- package/src/shade/renderer/rasterize/native/chunk_rasterize_triangle.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/chunk_rasterize_triangle.js +15 -4
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +16 -5
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_pass_descriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_pass_descriptor.js +16 -5
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +2 -1
- package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/rasterization_shader_resources.js +4 -0
- package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/native/viz/viz_rasterization_alpha_tested_pass_descriptor.js +16 -7
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +78 -88
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +21 -31
- package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
- package/src/shade/renderer/scene/GPUSceneContext.js +2 -0
- package/src/shade/renderer/scene/NODE3D_STRUCT.d.ts +19 -0
- package/src/shade/renderer/scene/NODE3D_STRUCT.d.ts.map +1 -1
- package/src/shade/renderer/scene/NODE3D_STRUCT.js +34 -0
- package/src/shade/renderer/scene/chunk_node3d_flags.d.ts +9 -0
- package/src/shade/renderer/scene/chunk_node3d_flags.d.ts.map +1 -0
- package/src/shade/renderer/scene/chunk_node3d_flags.js +23 -0
- package/src/shade/renderer/scene/chunk_scene_database_access.d.ts.map +1 -1
- package/src/shade/renderer/scene/chunk_scene_database_access.js +15 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.d.ts.map +1 -1
- package/src/shade/renderer/scene/rows/GPUSceneRows.js +9 -1
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.d.ts +7 -0
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_compute_normal_matrix_from_m4.js +16 -4
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.d.ts +12 -0
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/mat4/chunk_mat4_linear_determinant.js +18 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.d.ts +24 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.d.ts.map +1 -0
- package/src/shade/renderer/shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.js +33 -0
- package/src/shade/playground/vgeo_viewer/README.md +0 -150
- package/src/shade/playground/vgeo_viewer/cut_geometry.js +0 -460
- package/src/shade/playground/vgeo_viewer/index.html +0 -77
- package/src/shade/playground/vgeo_viewer/main.js +0 -1343
- package/src/shade/playground/vgeo_viewer/select_cut.js +0 -481
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts +0 -258
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyManager.d.ts.map +0 -1
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts +0 -49
- package/src/shade/renderer/geometry/virtual/residency/VGeoResidencyOptions.d.ts.map +0 -1
- package/src/shade/renderer/loader/gltf/fix_up_material_sides.js +0 -109
- package/src/shade/renderer/rasterize/expand/graph_triangles_filter_by_material_side.js +0 -78
- package/src/shade/renderer/rasterize/expand/shader_filter_triangle_by_material_side.js +0 -100
- package/src/shade/renderer/rasterize/forward/chunk_material_side_should_draw.js +0 -26
- package/src/shade/renderer/shader/chunk/jobs/chunk_job_system.d.ts +0 -3
- package/src/shade/renderer/shader/chunk/jobs/chunk_job_system.d.ts.map +0 -1
- /package/src/shade/renderer/geometry/virtual/build/{VGeoLevel.js → level/VGeoLevel.js} +0 -0
- /package/src/shade/renderer/geometry/virtual/build/{VGeoLevelOptions.js → level/VGeoLevelOptions.js} +0 -0
- /package/src/shade/renderer/geometry/virtual/build/{VGeoLevelSummary.js → level/VGeoLevelSummary.js} +0 -0
- /package/src/shade/renderer/geometry/virtual/build/{vgeo_graph_components.js → partition/vgeo_graph_components.js} +0 -0
- /package/src/shade/renderer/geometry/virtual/build/{VGeoGatheredFaces.js → submesh/VGeoGatheredFaces.js} +0 -0
- /package/src/shade/renderer/geometry/virtual/build/{VGeoSubmesh.js → submesh/VGeoSubmesh.js} +0 -0
|
@@ -389,7 +389,10 @@ export class Renderer {
|
|
|
389
389
|
*
|
|
390
390
|
* @param {PerspectiveCamera} camera
|
|
391
391
|
* @param {Scene} scene
|
|
392
|
-
* @param {number} [time_delta_seconds]
|
|
392
|
+
* @param {number} [time_delta_seconds] simulation seconds this frame advances by — the particle
|
|
393
|
+
* simulation, the animation tick and exposure adaptation all step by it. Zero by default, which
|
|
394
|
+
* draws the current state and moves nothing; a fixed fraction of a second here instead would run
|
|
395
|
+
* the simulation at that rate no matter what the caller's clock was doing.
|
|
393
396
|
* @returns {boolean} whether frame was rendered, will return false if previous frame hasn't finished yet
|
|
394
397
|
*/
|
|
395
398
|
render(camera: PerspectiveCamera, scene: Scene, time_delta_seconds?: number): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"AA0GA;IAOI,0BAEC;IAED;;OAEG;IACH,0BAAQ;IAER;;;;;;OAMG;IACH,kDAEC;IAED;;OAEG;IACH,kBAAO;IAYP;;;OAGG;IACH,2BAEC;IAaD,wCAGC;IAED,uCAEC;IAED;;;;OAIG;IACH,wBAFU,yBAAyB,CAEoB;IAEvD;;;;;;;OAOG;IACH,mBAFU,qBAAqB,CAEkB;IAEjD;;;OAGG;IACH,QAFU,cAAc,CAEM;IAE9B;;;;;;;;;OASG;IACH,2BAFU,OAAO,CAEiB;IAElC,6BAA4B;IAC5B,8BAA4B;IAC5B;;;;OAIG;IACH,mCAAkC;IAClC;;;;;;;OAOG;IACH,mCAFU,OAAO,CAEyB;IAC1C,+BAA6B;IAC7B,4CAA0C;IAkB1C,qCAKC;IArBD;;;;;;;;;;OAUG;IACH,oCAGC;IASD;;;;;;;OAOG;IACH,0BAFU,OAAO,CAEe;IAQhC;;;;;OAKG;IACH,oCAOC;IAjBD,mCAEC;IAiBD;;;;;;;;;OASG;IACH,6BAFU,OAAO,CAEmB;IAWpC;;;;;OAKG;IACH,8BAA+C;IAE/C;;;;;;;;OAQG;IACH,6BAFU,OAAO,CAEmB;IAEpC;;;;;;;;;;;;;;OAcG;IACH,8BAFU,OAAO,CAEoB;IAErC;;;;;;;;;;OAUG;IACH,qBAFU,OAAO,CAEW;IAU5B;;;;;OAKG;IACH,wBAA0C;IAE1C;;;;;;;;OAQG;IACH,eAFU,UAAU,GAAC,QAAQ,CAEF;IAU3B;;;;OAIG;IACH,gCAAwD;IAExD;;;OAGG;IACH,4BAFU,OAAO,CAEiB;IAKlC;;;OAGG;IACH,yBAEC;IAOD;;;OAGG;IACH,gCAEC;IAcD;;;;;;;;;OASG;IACH,qBAA+B;IAE/B,wBAA+B;IAgB/B;;;OAGG;IACH,yCAeC;IAED;;;OAGG;IACH,wCAEC;IA0BD;;;OAGG;IACH,iCAEC;IAED;;;;OAIG;IACH,2BAEC;IAQD;;;OAGG;IACH,+CAIC;IAED;;;OAGG;IACH,gDAIC;IAwCD;;;OAGG;IACH,+BAcC;IA1BD;;;OAGG;IACH,0BAEC;IAsBD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,iBAFU,iBAAiB,GAAC,IAAI,CAET;IAEvB;;OAEG;IACH;;;;;;;;;;;;;;OAcG;IACH,yBAHW,eAAe,GACb,eAAe,CAI3B;IAED;;;;;OAKG;IACH,4BAHW,eAAe,GACb,OAAO,CAInB;IAED;;;OAGG;IACH,uBAHW,UAAU,GACR,MAAM,CAIlB;IAgBD;;;;OAIG;IACH,yBAHW,KAAK,GACJ,gBAAgB,CAW3B;IAED;;;OAGG;IACH,6BAYC;IAED;;;;OAIG;IACH,gCAHW,KAAK,GACH,2BAA2B,CAcvC;IAGD;;;OAGG;IACH,kBAFW,KAAK,QAyBf;IA8OD,oGAAoG;IACpG,kDAA2C;IAO3C;;;;OAIG;IACH,0BAEC;IAeD;;;;;;OAMG;IACH,qBAHW,eAAe,GACb,iBAAiB,CAW7B;IAgBD;;;;;;OAMG;IACH,cAFU,iBAAiB,CAEU;IAErC;;;;;;OAMG;IACH,eAgBC;IAiFD;;;;;;OAMG;IACH;QAJsC,OAAO;QACd,MAAM;QACT,UAAU,GAA3B,MAAM;sBAoOhB;IAED;;OAEG;IACH,gBAQC;IAQD,4BAwBC;IAqID;;;;;OAKG;IACH,UAHW,MAAM,KACN,MAAM,QAgBhB;IAoFD,0CAMC;IAED
|
|
1
|
+
{"version":3,"file":"Renderer.d.ts","sourceRoot":"","sources":["../../../../src/shade/renderer/Renderer.js"],"names":[],"mappings":"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"}
|
|
@@ -1720,13 +1720,16 @@ export class Renderer {
|
|
|
1720
1720
|
*
|
|
1721
1721
|
* @param {PerspectiveCamera} camera
|
|
1722
1722
|
* @param {Scene} scene
|
|
1723
|
-
* @param {number} [time_delta_seconds]
|
|
1723
|
+
* @param {number} [time_delta_seconds] simulation seconds this frame advances by — the particle
|
|
1724
|
+
* simulation, the animation tick and exposure adaptation all step by it. Zero by default, which
|
|
1725
|
+
* draws the current state and moves nothing; a fixed fraction of a second here instead would run
|
|
1726
|
+
* the simulation at that rate no matter what the caller's clock was doing.
|
|
1724
1727
|
* @returns {boolean} whether frame was rendered, will return false if previous frame hasn't finished yet
|
|
1725
1728
|
*/
|
|
1726
1729
|
render(
|
|
1727
1730
|
camera,
|
|
1728
1731
|
scene,
|
|
1729
|
-
time_delta_seconds = 0
|
|
1732
|
+
time_delta_seconds = 0
|
|
1730
1733
|
) {
|
|
1731
1734
|
if (this.#device_lost) {
|
|
1732
1735
|
// device is lost, can't render — and asking the context for a texture would throw
|
|
@@ -677,7 +677,7 @@ add_extension(e); remove_extension(e); extension_count(phase);
|
|
|
677
677
|
|
|
678
678
|
## 8. Migration
|
|
679
679
|
|
|
680
|
-
Nine live systems
|
|
680
|
+
Nine live systems and one probe. Every one of them is the same mechanical change:
|
|
681
681
|
a closure becomes a class, `context.color` becomes `frame.get(SceneColor).color`, and the return
|
|
682
682
|
value becomes a publication.
|
|
683
683
|
|
|
@@ -693,7 +693,6 @@ value becomes a publication.
|
|
|
693
693
|
| `DebugDrawSystem` | `AfterTransparency` | `after: [FogOfWarExtension]` |
|
|
694
694
|
| `Trail3DSystem` | `AfterTransparency` | — |
|
|
695
695
|
| `probeShadePassInjection` | all | the gate is rewritten and gains the two checks it is currently blind to: a G-buffer replacement, and an order flip |
|
|
696
|
-
| `vgeo_viewer` playground | `AfterTransparency` | prototype; mechanical |
|
|
697
696
|
|
|
698
697
|
**The `AfterTransparency` chain is settled, not open.** Fog of war is last among the content
|
|
699
698
|
extensions, because it conceals and therefore belongs over everything it is meant to conceal —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MeshletBatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/geometry/meshlet/MeshletBatch.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MeshletBatch.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/geometry/meshlet/MeshletBatch.js"],"names":[],"mappings":"AAwCA;;GAEG;AACH;IAiBI;;;OAGG;IACH,oCAGC;IAXD,+BAEC;IA6BD;;;OAGG;IACH,wCAGC;IAfD;;;OAGG;IACH,mCAEC;IAqBD;;;OAGG;IACH,yBAEC;IAdD;;;OAGG;IACH,oBAEC;IAUD;;;OAGG;IACH,QAFa,MAAM,CASlB;IAED;;;OAGG;IACH,cAFW,YAAY,WAQtB;IAED;;;;OAIG;IACH,YAFa,MAAM,CAoFlB;IAED;;;OAGG;IACH,iBAEC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACL,EAAE,CAeb;IAED;;;OAGG;IACH,yBAFW,MAAM;;;;MAgChB;IA4LD,qBA+BC;IAED;;;OAGG;IACH,gBAFW,QAAQ,QASlB;IAIL;;;;OAIG;IACH,yBAFU,OAAO,CAEoB;;CAPpC;uBA/eY,OAAO,gBAAgB,EAAE,QAAQ"}
|
|
@@ -11,10 +11,11 @@ import { aabb3_from_v3_array } from "../../../../core/geom/3d/aabb/aabb3_from_v3
|
|
|
11
11
|
import { round_up } from "../../../../core/math/round_up.js";
|
|
12
12
|
import { read_wgsl_type_value } from "../../shader/type/serde/read_gpu_typed_buffer.js";
|
|
13
13
|
import { write_wgsl_type_value } from "../../shader/type/serde/write_gpu_typed_buffer.js";
|
|
14
|
-
import { encode_normals_to_octahedral_u32 } from "../normals/encode_normals_to_octahedral_u32.js";
|
|
15
|
-
import { encode_tangents_to_u32 } from "../normals/encode_tangents_to_u32.js";
|
|
16
14
|
import { StandardAttributes } from "../StandardAttributes.js";
|
|
17
15
|
import { geometry_to_meshlets_meshoptimizer } from "./build/meshoptimizer/geometry_to_meshlets_meshoptimizer.js";
|
|
16
|
+
import {
|
|
17
|
+
ENCODED_ATTRIBUTE_DEFAULT_VALUES
|
|
18
|
+
} from "./encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.js";
|
|
18
19
|
import { ENCODED_ATTRIBUTE_SIZES } from "./encoding/ENCODED_ATTRIBUTE_SIZES.js";
|
|
19
20
|
import { ENCODED_ORDERED_ATTRIBUTES } from "./encoding/ENCODED_ORDERED_ATTRIBUTES.js";
|
|
20
21
|
import { MESHLET_ATTRIBUTE_COMPRESSION_FLAGS } from "./encoding/MESHLET_ATTRIBUTE_COMPRESSION_FLAGS.js";
|
|
@@ -30,33 +31,6 @@ import { meshlet_get_attribute_offset } from "./meshlet_get_attribute_offset.js"
|
|
|
30
31
|
*/
|
|
31
32
|
|
|
32
33
|
|
|
33
|
-
const ENCODED_ATTRIBUTE_DEFAULT_VALUES = {
|
|
34
|
-
[StandardAttributes.Color]: 0xFFFFFFFF,
|
|
35
|
-
[StandardAttributes.TextureCoordinates0]: [0, 0],
|
|
36
|
-
[StandardAttributes.TextureCoordinates1]: 0,
|
|
37
|
-
[StandardAttributes.Normal]: 0,
|
|
38
|
-
[StandardAttributes.Tangent]: 0,
|
|
39
|
-
[StandardAttributes.SkinningJoints]: [0,0],
|
|
40
|
-
// Single u32 with all four packed unorm8 weights at zero —
|
|
41
|
-
// matches the new 1-u32-per-vertex layout (was [0,0] for the
|
|
42
|
-
// old f16×4 / 2-u32 layout).
|
|
43
|
-
[StandardAttributes.SkinningWeights]: 0,
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
const default_normal = new Uint32Array(1);
|
|
48
|
-
encode_normals_to_octahedral_u32(default_normal, 0, 1, [0, 0, 1]);
|
|
49
|
-
|
|
50
|
-
ENCODED_ATTRIBUTE_DEFAULT_VALUES[StandardAttributes.Normal] = default_normal[0];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
{
|
|
54
|
-
const default_tangent = new Uint32Array(1);
|
|
55
|
-
encode_tangents_to_u32(default_tangent, 0, 1, [0, 0, 1, 1]);
|
|
56
|
-
|
|
57
|
-
ENCODED_ATTRIBUTE_DEFAULT_VALUES[StandardAttributes.Tangent] = default_tangent[0];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
34
|
const DEBUG_ATTRIBUTE_SIZE_TOTALS = {};
|
|
61
35
|
|
|
62
36
|
globalThis.meshlet_debug = DEBUG_ATTRIBUTE_SIZE_TOTALS;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What an attribute section holds, already encoded, when the geometry does not carry the attribute
|
|
3
|
+
* at all. The section is written once and flagged compressed, so this is the value every vertex of
|
|
4
|
+
* that meshlet reads.
|
|
5
|
+
*
|
|
6
|
+
* It lives in its own module because it is not private to the encoder that writes it: the virtual
|
|
7
|
+
* geometry builder produces payloads that must be **byte-identical** to these, and the only way to
|
|
8
|
+
* hold it to that is for its spec to compare against this object rather than against a copy of it.
|
|
9
|
+
* Every other table the two share — order, word sizes, compression flags — is already shared that
|
|
10
|
+
* way; this was the one that was not, and so the one whose drift nothing would have caught.
|
|
11
|
+
*
|
|
12
|
+
* Note what is deliberately asymmetric: colour's default is opaque white with its alpha byte set,
|
|
13
|
+
* while `encode_colors_to_u32` writes three channels and leaves alpha zero. A geometry with no
|
|
14
|
+
* colour channel therefore reads a different word than one whose every vertex is white. That is
|
|
15
|
+
* long-standing behaviour and changing it would change what every existing asset decodes to.
|
|
16
|
+
*
|
|
17
|
+
* Position has no entry: it is never absent.
|
|
18
|
+
*
|
|
19
|
+
* @type {Object<StandardAttributes, number|number[]>}
|
|
20
|
+
*/
|
|
21
|
+
export const ENCODED_ATTRIBUTE_DEFAULT_VALUES: any;
|
|
22
|
+
//# sourceMappingURL=ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts.map
|
package/src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ENCODED_ATTRIBUTE_DEFAULT_VALUES.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/meshlet/encoding/ENCODED_ATTRIBUTE_DEFAULT_VALUES.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mDAUE"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { encode_normals_to_octahedral_u32 } from "../../normals/encode_normals_to_octahedral_u32.js";
|
|
2
|
+
import { encode_tangents_to_u32 } from "../../normals/encode_tangents_to_u32.js";
|
|
3
|
+
import { StandardAttributes } from "../../StandardAttributes.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* What an attribute section holds, already encoded, when the geometry does not carry the attribute
|
|
7
|
+
* at all. The section is written once and flagged compressed, so this is the value every vertex of
|
|
8
|
+
* that meshlet reads.
|
|
9
|
+
*
|
|
10
|
+
* It lives in its own module because it is not private to the encoder that writes it: the virtual
|
|
11
|
+
* geometry builder produces payloads that must be **byte-identical** to these, and the only way to
|
|
12
|
+
* hold it to that is for its spec to compare against this object rather than against a copy of it.
|
|
13
|
+
* Every other table the two share — order, word sizes, compression flags — is already shared that
|
|
14
|
+
* way; this was the one that was not, and so the one whose drift nothing would have caught.
|
|
15
|
+
*
|
|
16
|
+
* Note what is deliberately asymmetric: colour's default is opaque white with its alpha byte set,
|
|
17
|
+
* while `encode_colors_to_u32` writes three channels and leaves alpha zero. A geometry with no
|
|
18
|
+
* colour channel therefore reads a different word than one whose every vertex is white. That is
|
|
19
|
+
* long-standing behaviour and changing it would change what every existing asset decodes to.
|
|
20
|
+
*
|
|
21
|
+
* Position has no entry: it is never absent.
|
|
22
|
+
*
|
|
23
|
+
* @type {Object<StandardAttributes, number|number[]>}
|
|
24
|
+
*/
|
|
25
|
+
export const ENCODED_ATTRIBUTE_DEFAULT_VALUES = {
|
|
26
|
+
[StandardAttributes.Color]: 0xFFFFFFFF,
|
|
27
|
+
[StandardAttributes.TextureCoordinates0]: [0, 0],
|
|
28
|
+
[StandardAttributes.TextureCoordinates1]: 0,
|
|
29
|
+
[StandardAttributes.Normal]: 0,
|
|
30
|
+
[StandardAttributes.Tangent]: 0,
|
|
31
|
+
[StandardAttributes.SkinningJoints]: [0, 0],
|
|
32
|
+
// Single u32 with all four packed unorm8 weights at zero — matches the 1-u32-per-vertex
|
|
33
|
+
// layout (was [0,0] for the old f16×4 / 2-u32 layout).
|
|
34
|
+
[StandardAttributes.SkinningWeights]: 0,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
{
|
|
38
|
+
const default_normal = new Uint32Array(1);
|
|
39
|
+
encode_normals_to_octahedral_u32(default_normal, 0, 1, [0, 0, 1]);
|
|
40
|
+
|
|
41
|
+
ENCODED_ATTRIBUTE_DEFAULT_VALUES[StandardAttributes.Normal] = default_normal[0];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
{
|
|
45
|
+
const default_tangent = new Uint32Array(1);
|
|
46
|
+
encode_tangents_to_u32(default_tangent, 0, 1, [0, 0, 1, 1]);
|
|
47
|
+
|
|
48
|
+
ENCODED_ATTRIBUTE_DEFAULT_VALUES[StandardAttributes.Tangent] = default_tangent[0];
|
|
49
|
+
}
|
|
@@ -28,8 +28,10 @@ consumer reads it, and `runtime/RUNTIME_PLAN.md` §4.8 says why: at the moment a
|
|
|
28
28
|
per-cluster test the cut has already passed is strictly tighter than any page-level test, so the
|
|
29
29
|
page-level one can never reject anything. Its consumer is prefetch, which is a later campaign.
|
|
30
30
|
|
|
31
|
-
`shade/playground/
|
|
32
|
-
|
|
31
|
+
`shade/playground/vgeo_runtime/` and `shade/playground/vgeo_scene/` drive the reader end to end
|
|
32
|
+
against a device, and `runtime/cut/__fixtures__/vgeo_select_cut.js` is a CPU reference traversal of the
|
|
33
|
+
cut rule this format was shaped around — the oracle the GPU cut is held to, and the only traversal
|
|
34
|
+
of it that is not a kernel.
|
|
33
35
|
|
|
34
36
|
## 1. Design constraints (inherited, binding)
|
|
35
37
|
|
|
@@ -15,12 +15,14 @@ RAM tier's budget, and `runtime/` is everything §7 describes — the selection
|
|
|
15
15
|
pass, the VRAM page pool, the feedback loop, and the seam through which VG instances enter the
|
|
16
16
|
meshlet pipeline ([runtime/RUNTIME_PLAN.md](./runtime/RUNTIME_PLAN.md)).
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`
|
|
23
|
-
|
|
18
|
+
`shade/playground/vgeo_runtime/` puts an ordinary `Mesh` in an ordinary `Scene` and draws it
|
|
19
|
+
entirely from a **GPU** cut through the meshlet pipeline — it proves the engine seam, and
|
|
20
|
+
`shade/playground/vgeo_scene/` opens a whole converted set at once, where the claim about a *scene*
|
|
21
|
+
is measured. What proves the DAG, the format and the clamp is not a page at all: it is
|
|
22
|
+
`runtime/cut/__fixtures__/vgeo_select_cut.js`, a CPU traversal of the same rule that every cut
|
|
23
|
+
spec is held to. A third playground once drew that traversal on screen through Shade's direct
|
|
24
|
+
geometry path, with its own renderer and its own streaming loop; once the GPU page could show
|
|
25
|
+
everything it showed, it was a second runtime for no gain, and it was retired. §10 says which milestone that leaves us
|
|
24
26
|
in, and the order the work actually arrived in.
|
|
25
27
|
|
|
26
28
|
## 1. What and why
|
|
@@ -280,7 +282,7 @@ Pinned:
|
|
|
280
282
|
*before* it is fetched. Below page granularity, each page carries a tree over its own groups
|
|
281
283
|
(format §6.1–6.2). Cost, measured: 0.3%–1.6% of asset size.
|
|
282
284
|
|
|
283
|
-
*What exists.* `
|
|
285
|
+
*What exists.* `runtime/cut/__fixtures__/vgeo_select_cut.js` is this rule on the CPU, against a
|
|
284
286
|
partially resident container: descend from the root's parentless groups, refine where
|
|
285
287
|
`project(parent) > τ`, take the cluster where it does not, and stop where the child group is
|
|
286
288
|
not selectable — recording the want that would unblock it. It is the reference the GPU pass
|
|
@@ -629,7 +631,7 @@ is the piece still missing, and M1 is where the work now starts.
|
|
|
629
631
|
Acceptance: crack-free under τ sweep and flythrough (incl. group-boundary polyline and
|
|
630
632
|
flip validation); drawn-triangle count tracks resolution, not source size; §3 build
|
|
631
633
|
validations green.
|
|
632
|
-
**Done**: the builder; a CPU cut (`
|
|
634
|
+
**Done**: the builder; a CPU cut (`runtime/cut/__fixtures__/vgeo_select_cut.js`) that is a traversal
|
|
633
635
|
rather than the flat pass planned here, and that runs against a partially resident container,
|
|
634
636
|
which was M2's job; τ-sweep watertightness as a spec (`build/vgeo_cut.spec.js` counts edges
|
|
635
637
|
used by one triangle instead of two, at a spread of thresholds, and wants zero); the
|
|
@@ -33,7 +33,7 @@ accepted-and-waiting one.
|
|
|
33
33
|
- **Cluster-count simplification target** `[M §2.2]`, and a minimum cluster fill through the
|
|
34
34
|
generalized leaf repack `[V §3.3]`.
|
|
35
35
|
- **Compactness-weighted cluster adjacency** `[M §2.3]` — `compactness()` in
|
|
36
|
-
`build/vgeo_build_levels.js`.
|
|
36
|
+
`build/level/vgeo_build_levels.js`.
|
|
37
37
|
- **Speculative groups, rejected individually** `[M §2.4]`.
|
|
38
38
|
- **Per-level summary table in the file head** `[V §4.1, §6.1]` — VGEO_FORMAT §4.1.
|
|
39
39
|
- **A traversal metric on the page DAG, and a group tree inside each page** `[V §2.1, §6.3]` —
|
|
@@ -72,12 +72,13 @@ accepted-and-waiting one.
|
|
|
72
72
|
362 non-root groups have split parents: 355 of 576 camera positions double-drew, up to 10.7%
|
|
73
73
|
of drawn triangles, before. Zero after. It reads as corrupt geometry rather than as a missing
|
|
74
74
|
page, which is why the tool that found it could not name it.
|
|
75
|
-
- **A CPU cut against a partially resident container** —
|
|
76
|
-
`
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
- **A CPU cut against a partially resident container** —
|
|
76
|
+
`runtime/cut/__fixtures__/vgeo_select_cut.js`. It is the runtime's rule rather than a debug
|
|
77
|
+
approximation of it, and `vgeo_select_cut.spec.js` holds it to the format's guarantees. A
|
|
78
|
+
`vgeo_viewer` playground used to draw it on screen through Shade's direct geometry path, which is
|
|
79
|
+
what made clamping, streaming and eviction watchable; once `playground/vgeo_runtime/` could show
|
|
80
|
+
all of that through the meshlet pipeline, the page was a second renderer and a second streaming
|
|
81
|
+
loop for no gain, and it was retired. The traversal stayed, because it is the oracle.
|
|
81
82
|
|
|
82
83
|
- **The GPU runtime** — `runtime/`, and [runtime/RUNTIME_PLAN.md](./runtime/RUNTIME_PLAN.md) for the
|
|
83
84
|
design and the adversarial review that reshaped it. The cut is a wavefront BFS over the page DAG
|
|
@@ -95,7 +96,7 @@ accepted-and-waiting one.
|
|
|
95
96
|
evaluator does not. §6 states the fact without stating it as a term of the rule, because §4 was
|
|
96
97
|
written for a traversal.
|
|
97
98
|
- **Page size decides whether that state is even reachable.** At the 8 KB pages
|
|
98
|
-
`
|
|
99
|
+
`vgeo_select_cut.spec.js` uses, a torus puts exactly one group in every page — so a blocked group is
|
|
99
100
|
a blocked page, no page is ever mixed, and no page is ever entered twice. Measured: 40 pages
|
|
100
101
|
withheld one at a time and 60 random residency subsets produced *no* mixed page. At 64 KB the
|
|
101
102
|
median page holds eight groups and it is ordinary. A spec for anything about mixed selectability
|
|
@@ -120,7 +121,7 @@ prefetch.
|
|
|
120
121
|
### 2.1 A partitioning fallback for when METIS fails `[M §3.3]`, `[V §3.2]` — LANDED
|
|
121
122
|
|
|
122
123
|
`core/graph/graph_partition_spectral.js` — recursive spectral bisection over CSR, matrix-free,
|
|
123
|
-
signature-compatible with `metis_partition_kway`. `build/vgeo_partition_graph.js` tries METIS
|
|
124
|
+
signature-compatible with `metis_partition_kway`. `build/partition/vgeo_partition_graph.js` tries METIS
|
|
124
125
|
and falls back to it; both of the builder's partitioning sites go through that wrapper.
|
|
125
126
|
|
|
126
127
|
Notes worth keeping:
|
|
@@ -212,7 +213,7 @@ installed page can be re-tested without walking back to its parent.
|
|
|
212
213
|
width at the top. This one has *no* paging question by construction: it is inside a page, it
|
|
213
214
|
ships and evicts with it, and it cannot dangle.
|
|
214
215
|
|
|
215
|
-
Both landed together; VGEO_FORMAT §6.1–6.2 specifies them, `build/vgeo_build_page_nodes.js`
|
|
216
|
+
Both landed together; VGEO_FORMAT §6.1–6.2 specifies them, `build/page/vgeo_build_page_nodes.js`
|
|
216
217
|
builds them. Notes worth keeping:
|
|
217
218
|
|
|
218
219
|
- The tree needs no partitioner. A page's groups arrive in Morton order of their centroid, so
|
|
@@ -243,7 +244,7 @@ for the first few bands, which are also the cheapest to walk.
|
|
|
243
244
|
LOD-metric sphere and error range (VGEO_FORMAT §5, §6.2), and every page carries a fanout-4 tree
|
|
244
245
|
over its own groups (§6.1). The writer emits them, `vgeo_validate_container` checks them
|
|
245
246
|
(§11.10–11.11) with corruption tests behind both checks, and **nothing reads either**.
|
|
246
|
-
`VGeoPage` records `node_count` and stops; `
|
|
247
|
+
`VGeoPage` records `node_count` and stops; `vgeo_select_cut` descends group by group.
|
|
247
248
|
|
|
248
249
|
This is not a defect to fix on its own account. Building a consumer for its own sake would fix
|
|
249
250
|
the interface before the pass that has to live with it, and the CPU traversal does not need the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VGeoBuildOptions.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IACI;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAEO;IAEvB;;;;;;;;;;;;;;;;OAgBG;IACH,aAFU,MAAM,CAEmB;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,YAFU,MAAM,CAEE;IAElB;;;;;;;;;;;;;;OAcG;IACH,mBAFU,MAAM,CAE2B;IAE3C;;OAEG;IACH,eAFU,gBAAgB,CAEa;CAC1C;iCA7FgC,
|
|
1
|
+
{"version":3,"file":"VGeoBuildOptions.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/geometry/virtual/build/VGeoBuildOptions.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH;IACI;;;;;;;;;;OAUG;IACH,OAFU,MAAM,CAEO;IAEvB;;;;;;;;;;;;;;;;OAgBG;IACH,aAFU,MAAM,CAEmB;IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,YAFU,MAAM,CAEE;IAElB;;;;;;;;;;;;;;OAcG;IACH,mBAFU,MAAM,CAE2B;IAE3C;;OAEG;IACH,eAFU,gBAAgB,CAEa;CAC1C;iCA7FgC,6BAA6B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LZ4_LEVEL } from "../../../../../core/binary/lz4/LZ4_LEVEL.js";
|
|
2
2
|
import { VGEO_CODEC_LZ4 } from "../format/frame/VGEO_CODEC_LZ4.js";
|
|
3
3
|
import { VGEO_DEFAULT_PAGE_SIZE } from "../format/page/VGEO_DEFAULT_PAGE_SIZE.js";
|
|
4
|
-
import { VGeoLevelOptions } from "./VGeoLevelOptions.js";
|
|
4
|
+
import { VGeoLevelOptions } from "./level/VGeoLevelOptions.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Knobs the builder pipeline exposes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gltf_open_document.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gltf_open_document.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/gltf/gltf_open_document.js"],"names":[],"mappings":"AAyEA;;;;;;;;;;GAUG;AACH,8CARW,cAAc,yBACL,MAAM,KAAG,cAAc,4CAK9B,YAAY,CA+ExB;+BArJ8B,qBAAqB;6BACvB,mBAAmB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../../../../core/assert.js";
|
|
2
|
+
import { Base64 } from "../../../../../../core/binary/base64/Base64.js";
|
|
2
3
|
import {
|
|
3
4
|
GLTF_BUFFER_VIEW_EXTENSIONS
|
|
4
5
|
} from "../../../../../../format/scene/gltf/ext/gltf_buffer_view_extensions.js";
|
|
@@ -26,6 +27,9 @@ import { GltfDocument } from "./GltfDocument.js";
|
|
|
26
27
|
/**
|
|
27
28
|
* Decode a `data:` URI's payload.
|
|
28
29
|
*
|
|
30
|
+
* Through {@link Base64} rather than `atob`: the decode is the engine's own, so the builder runs
|
|
31
|
+
* the same one everywhere and does not need a `atob` to exist on whatever it is running under.
|
|
32
|
+
*
|
|
29
33
|
* @param {string} uri
|
|
30
34
|
* @returns {Uint8Array}
|
|
31
35
|
* @throws {Error} for an encoding other than base64, which is the only one glTF defines
|
|
@@ -39,15 +43,7 @@ function read_data_uri(uri) {
|
|
|
39
43
|
throw new Error(`unsupported data URI encoding in '${header}'`);
|
|
40
44
|
}
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const result = new Uint8Array(binary.length);
|
|
45
|
-
|
|
46
|
-
for (let i = 0; i < binary.length; i++) {
|
|
47
|
-
result[i] = binary.charCodeAt(i);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return result;
|
|
46
|
+
return new Uint8Array(Base64.decode(uri.slice(comma + 1)));
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
/**
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One band of the DAG.
|
|
3
|
+
*
|
|
4
|
+
* A level is an ordinal, not a generation: `clusters` are the clusters the round of that index
|
|
5
|
+
* created, while `groups` are the groups the round *above* consumed — and those groups may hold
|
|
6
|
+
* clusters from any level at or below their own, because a cluster no round could use waits in the
|
|
7
|
+
* frontier until one can. What the ordinal guarantees is the only thing the format needs from it:
|
|
8
|
+
* every group sits strictly below the group holding its parents, so laying pages out by descending
|
|
9
|
+
* level makes every child reference point forward in the file.
|
|
10
|
+
*
|
|
11
|
+
* @author Alex Goldring
|
|
12
|
+
* @copyright Company Named Limited (c) 2026
|
|
13
|
+
*/
|
|
14
|
+
export class VGeoLevel {
|
|
15
|
+
/**
|
|
16
|
+
* `0` = leaves.
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
index: number;
|
|
20
|
+
/**
|
|
21
|
+
* The clusters this level's round created.
|
|
22
|
+
* @type {VirtualGeometryCluster[]}
|
|
23
|
+
*/
|
|
24
|
+
clusters: VirtualGeometryCluster[];
|
|
25
|
+
/**
|
|
26
|
+
* The groups that sit in this level's band — the ones the round above consumed. Empty for the
|
|
27
|
+
* top level until the caller assigns its root group.
|
|
28
|
+
* @type {VirtualGeometryGroup[]}
|
|
29
|
+
*/
|
|
30
|
+
groups: VirtualGeometryGroup[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=VGeoLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGeoLevel.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/level/VGeoLevel.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH;IACI;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,UAFU,wBAAwB,CAEpB;IAEd;;;;OAIG;IACH,QAFU,sBAAsB,CAEpB;CACf"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the round loop of {@link vgeo_build_levels} is allowed to behave.
|
|
3
|
+
*
|
|
4
|
+
* @author Alex Goldring
|
|
5
|
+
* @copyright Company Named Limited (c) 2026
|
|
6
|
+
*/
|
|
7
|
+
export class VGeoLevelOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Clusters a group starts out holding. Grows when a round fails to make progress — small groups
|
|
10
|
+
* starve the simplifier (the locked perimeter dominates), large ones lock a big spatial
|
|
11
|
+
* footprint into LOD lockstep.
|
|
12
|
+
* @type {number}
|
|
13
|
+
*/
|
|
14
|
+
group_size: number;
|
|
15
|
+
/**
|
|
16
|
+
* Fraction of a group's *clusters* the step above it should come to. The design's halving,
|
|
17
|
+
* stated as the thing the DAG is actually for.
|
|
18
|
+
*
|
|
19
|
+
* A triangle ratio is a means and this is the end, and asking directly is what keeps parents
|
|
20
|
+
* full: the simplifier is given the triangle count that many clusters hold, rather than half of
|
|
21
|
+
* whatever the children happened to contain. Where the children are already full the two are the
|
|
22
|
+
* same number. Where they are not, this asks for less destruction, because the reduction is
|
|
23
|
+
* available from packing the geometry better instead.
|
|
24
|
+
* @type {number}
|
|
25
|
+
*/
|
|
26
|
+
simplification_ratio: number;
|
|
27
|
+
/**
|
|
28
|
+
* How much error a single round is allowed to span, as a multiple of the band's floor. `1` would
|
|
29
|
+
* admit only the exact minimum and turn every distinct error value into its own round; a large
|
|
30
|
+
* value admits the whole frontier every time and is the level sweep this replaced.
|
|
31
|
+
*
|
|
32
|
+
* Four, measured. On a 98k-triangle sphere against a full sweep: 31% fewer clusters merged into
|
|
33
|
+
* groups more than twice as coarse as themselves, and 8% fewer at four times, for one extra
|
|
34
|
+
* level. Two is tighter on the first count — 41% fewer — but costs fourteen levels, and every
|
|
35
|
+
* level is a page band and a dependent fetch on the way down.
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
error_band_growth: number;
|
|
39
|
+
/**
|
|
40
|
+
* Least share of the frontier a round is allowed to work on, whatever the octave says.
|
|
41
|
+
*
|
|
42
|
+
* The octave alone offers no guarantee of progress: geometry whose error is spread thinly and
|
|
43
|
+
* continuously — a UV sphere, whose poles carry triangles a fraction of the size of its
|
|
44
|
+
* equator's — puts only a handful of clusters in any one octave, and the build inches forward a
|
|
45
|
+
* few merges per round. That is not merely slow, it is unbounded: `level_count` is a u8, and a
|
|
46
|
+
* round loop whose count scales with the cluster count rather than its logarithm will run out of
|
|
47
|
+
* levels on a real asset. Widening the band until it holds a fixed share of the frontier bounds
|
|
48
|
+
* the depth logarithmically, and costs error uniformity only where the octave had nothing.
|
|
49
|
+
* @type {number}
|
|
50
|
+
*/
|
|
51
|
+
error_band_min_fraction: number;
|
|
52
|
+
/**
|
|
53
|
+
* Refuse to build past this many levels. `level_count` is a u8 in the container, and a build
|
|
54
|
+
* that has not converged by then has something else wrong with it.
|
|
55
|
+
* @type {number}
|
|
56
|
+
*/
|
|
57
|
+
max_levels: number;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=VGeoLevelOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGeoLevelOptions.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/level/VGeoLevelOptions.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;IACI;;;;;OAKG;IACH,YAFU,MAAM,CAED;IAEf;;;;;;;;;;OAUG;IACH,sBAFU,MAAM,CAEW;IAE3B;;;;;;;;;;OAUG;IACH,mBAFU,MAAM,CAEM;IAEtB;;;;;;;;;;;OAWG;IACH,yBAFU,MAAM,CAEe;IAE/B;;;;OAIG;IACH,YAFU,MAAM,CAEC;CACpB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What one band of the DAG came to.
|
|
3
|
+
*
|
|
4
|
+
* The counts are not a frontier size and do not have to fall monotonically: `cluster_count` is what
|
|
5
|
+
* the round of this index *created*, and a round merges a band of comparable error rather than the
|
|
6
|
+
* whole frontier, so a later round can produce fewer clusters than an earlier one — or more, when it
|
|
7
|
+
* finally reaches geometry that had been waiting.
|
|
8
|
+
*
|
|
9
|
+
* @author Alex Goldring
|
|
10
|
+
* @copyright Company Named Limited (c) 2026
|
|
11
|
+
*/
|
|
12
|
+
export class VGeoLevelSummary {
|
|
13
|
+
level: number;
|
|
14
|
+
/**
|
|
15
|
+
* Clusters the round of this index created.
|
|
16
|
+
* @type {number}
|
|
17
|
+
*/
|
|
18
|
+
cluster_count: number;
|
|
19
|
+
/**
|
|
20
|
+
* Groups sitting in this band — the ones the round above consumed.
|
|
21
|
+
* @type {number}
|
|
22
|
+
*/
|
|
23
|
+
group_count: number;
|
|
24
|
+
triangle_count: number;
|
|
25
|
+
vertex_count: number;
|
|
26
|
+
/**
|
|
27
|
+
* Smallest object-space `r_e` any cluster of this level carries.
|
|
28
|
+
* @type {number}
|
|
29
|
+
*/
|
|
30
|
+
min_error: number;
|
|
31
|
+
/**
|
|
32
|
+
* Largest object-space `r_e` any cluster of this level carries. The root's is the ceiling for
|
|
33
|
+
* the whole asset; between two levels there is no ordering, for the same reason the counts have
|
|
34
|
+
* none.
|
|
35
|
+
* @type {number}
|
|
36
|
+
*/
|
|
37
|
+
max_error: number;
|
|
38
|
+
/**
|
|
39
|
+
* Largest LOD-metric sphere radius at this level.
|
|
40
|
+
* @type {number}
|
|
41
|
+
*/
|
|
42
|
+
max_sphere_radius: number;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=VGeoLevelSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VGeoLevelSummary.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/level/VGeoLevelSummary.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH;IACI,cAAU;IAEV;;;OAGG;IACH,eAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB,uBAAmB;IACnB,qBAAiB;IAEjB;;;OAGG;IACH,WAFU,MAAM,CAEF;IAEd;;;;;OAKG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,mBAFU,MAAM,CAEM;CACzB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the whole DAG, from a source mesh to a single root.
|
|
3
|
+
*
|
|
4
|
+
* @param {VirtualGeometryMesh} mesh the normalized source; consumed, not copied
|
|
5
|
+
* @param {VGeoLevelOptions} options
|
|
6
|
+
* @returns {VGeoLevel[]} leaves first; the last level holds exactly one cluster, the root
|
|
7
|
+
*/
|
|
8
|
+
export function vgeo_build_levels(mesh: VirtualGeometryMesh, options: VGeoLevelOptions): VGeoLevel[];
|
|
9
|
+
/**
|
|
10
|
+
* One cluster's geometry expressed against the frontier it came out of, which is what lets the next
|
|
11
|
+
* frontier be stitched from a mixture of freshly simplified clusters and untouched ones.
|
|
12
|
+
*/
|
|
13
|
+
export type VGeoContribution = {
|
|
14
|
+
positions: Float32Array;
|
|
15
|
+
/**
|
|
16
|
+
* local to {@link positions }
|
|
17
|
+
*/
|
|
18
|
+
indices: Uint32Array;
|
|
19
|
+
/**
|
|
20
|
+
* ids in the mesh {@link topology } belongs to
|
|
21
|
+
*/
|
|
22
|
+
local_vertex_ids: Uint32Array;
|
|
23
|
+
/**
|
|
24
|
+
* the same vertices, named in the frontier's mesh
|
|
25
|
+
*/
|
|
26
|
+
source_vertex_ids: Uint32Array;
|
|
27
|
+
/**
|
|
28
|
+
* the mesh {@link local_vertex_ids } name vertices of, whose
|
|
29
|
+
* vertex data block holds their attributes
|
|
30
|
+
*/
|
|
31
|
+
topology: BinaryTopology;
|
|
32
|
+
};
|
|
33
|
+
import { VirtualGeometryMesh } from "../mesh/VirtualGeometryMesh.js";
|
|
34
|
+
import { VGeoLevel } from "./VGeoLevel.js";
|
|
35
|
+
import { BinaryTopology } from "../../../../../../core/geom/3d/topology/struct/binary/BinaryTopology.js";
|
|
36
|
+
//# sourceMappingURL=vgeo_build_levels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vgeo_build_levels.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shade/renderer/geometry/virtual/build/level/vgeo_build_levels.js"],"names":[],"mappings":"AAqiDA;;;;;;GAMG;AACH,wCAJW,mBAAmB,8BAEjB,SAAS,EAAE,CA6KvB;;;;;;eAtgDa,YAAY;;;;aACZ,WAAW;;;;sBACX,WAAW;;;;uBACX,WAAW;;;;;cACX,cAAc;;oCA5KQ,gCAAgC;0BAD1C,gBAAgB;+BAjCI,yEAAyE"}
|