@woosh/meep-engine 2.164.0 → 2.165.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +137 -108
- package/build/bundle-worker-image-decoder.js +1 -1
- package/build/bundle-worker-terrain.js +1 -1
- package/package.json +1 -1
- package/samples/generation/SampleGenerator0.js +3 -3
- package/samples/generation/filters/SampleGroundMoistureFilter.js +63 -56
- package/samples/generation/filters/SampleNoise20_0.js +6 -1
- package/samples/generation/themes/SampleTheme0.js +47 -47
- package/src/core/binary/BitImage2.d.ts +91 -0
- package/src/core/binary/BitImage2.d.ts.map +1 -0
- package/src/core/binary/BitImage2.js +242 -0
- package/src/core/color/YCoCg/rgb_to_ycocg.d.ts +17 -0
- package/src/core/color/YCoCg/rgb_to_ycocg.d.ts.map +1 -0
- package/src/core/color/YCoCg/rgb_to_ycocg.js +20 -0
- package/src/core/color/YCoCg/ycocg_to_rgb.d.ts +14 -0
- package/src/core/color/YCoCg/ycocg_to_rgb.d.ts.map +1 -0
- package/src/core/color/YCoCg/ycocg_to_rgb.js +17 -0
- package/src/core/geom/2d/oriented-box/min_area_rect_2d.d.ts +22 -0
- package/src/core/geom/2d/oriented-box/min_area_rect_2d.d.ts.map +1 -0
- package/src/core/geom/2d/oriented-box/min_area_rect_2d.js +69 -0
- package/src/core/geom/2d/packing/skyline.d.ts +116 -0
- package/src/core/geom/2d/packing/skyline.d.ts.map +1 -0
- package/src/core/geom/2d/packing/skyline.js +258 -0
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +18 -0
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -0
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +86 -0
- package/src/core/geom/3d/atlas/ATLAS_PORT_PLAN.md +486 -0
- package/src/core/geom/3d/atlas/BFF_PLAN.md +174 -0
- package/src/core/geom/3d/atlas/Chart.d.ts +58 -0
- package/src/core/geom/3d/atlas/Chart.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/Chart.js +77 -0
- package/src/core/geom/3d/atlas/REVIEW_02.md +392 -0
- package/src/core/geom/3d/atlas/atlas_bench_lib.d.ts +73 -0
- package/src/core/geom/3d/atlas/atlas_bench_lib.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_bench_lib.js +315 -0
- package/src/core/geom/3d/atlas/atlas_chart_type.d.ts +17 -0
- package/src/core/geom/3d/atlas/atlas_chart_type.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_chart_type.js +16 -0
- package/src/core/geom/3d/atlas/atlas_compute_charts.d.ts +25 -0
- package/src/core/geom/3d/atlas/atlas_compute_charts.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_compute_charts.js +188 -0
- package/src/core/geom/3d/atlas/atlas_extract_chart.d.ts +17 -0
- package/src/core/geom/3d/atlas/atlas_extract_chart.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_extract_chart.js +107 -0
- package/src/core/geom/3d/atlas/atlas_generate.d.ts +39 -0
- package/src/core/geom/3d/atlas/atlas_generate.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_generate.js +43 -0
- package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts +84 -0
- package/src/core/geom/3d/atlas/atlas_test_fixtures.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_test_fixtures.js +266 -0
- package/src/core/geom/3d/atlas/atlas_write_chart_uvs.d.ts +25 -0
- package/src/core/geom/3d/atlas/atlas_write_chart_uvs.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/atlas_write_chart_uvs.js +36 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.d.ts +22 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_dihedrals.js +62 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.d.ts +9 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/data/atlas_build_edge_lengths.js +33 -0
- package/src/core/geom/3d/atlas/data/atlas_build_face_areas.d.ts +9 -0
- package/src/core/geom/3d/atlas/data/atlas_build_face_areas.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/data/atlas_build_face_areas.js +50 -0
- package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.d.ts +27 -0
- package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/io/atlas_mesh_weld_colocals.js +39 -0
- package/src/core/geom/3d/atlas/io/bt_loop_uv.d.ts +22 -0
- package/src/core/geom/3d/atlas/io/bt_loop_uv.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/io/bt_loop_uv.js +57 -0
- package/src/core/geom/3d/atlas/pack/ChartPlacement.d.ts +36 -0
- package/src/core/geom/3d/atlas/pack/ChartPlacement.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/pack/ChartPlacement.js +46 -0
- package/src/core/geom/3d/atlas/pack/atlas_pack_charts.d.ts +62 -0
- package/src/core/geom/3d/atlas/pack/atlas_pack_charts.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/pack/atlas_pack_charts.js +551 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.d.ts +22 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_param_validity.js +73 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.d.ts +37 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_bff.js +270 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.d.ts +23 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_lscm.js +224 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.d.ts +14 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_parameterize_ortho.js +38 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.d.ts +22 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_chart_stretch_metric.js +86 -0
- package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.d.ts +20 -0
- package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/atlas_piecewise_resegment.js +183 -0
- package/src/core/geom/3d/atlas/param/fit_plane_basis.d.ts +27 -0
- package/src/core/geom/3d/atlas/param/fit_plane_basis.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/param/fit_plane_basis.js +66 -0
- package/src/core/geom/3d/atlas/segment/RegionGraph.d.ts +31 -0
- package/src/core/geom/3d/atlas/segment/RegionGraph.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/RegionGraph.js +40 -0
- package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.d.ts +23 -0
- package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_build_region_graph.js +136 -0
- package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.d.ts +24 -0
- package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_compute_planar_regions.js +77 -0
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts +27 -0
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +113 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts +44 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts.js +275 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.d.ts +22 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.d.ts.map +1 -0
- package/src/core/geom/3d/atlas/segment/atlas_segment_charts_atomic.js +199 -0
- package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.d.ts +32 -0
- package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.d.ts.map +1 -0
- package/src/core/geom/3d/line/line3_compute_point_segment_point_distance_unfolded.js +64 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts +20 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_from_rotation_translation_scale.js +66 -0
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.d.ts.map +1 -1
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +13 -11
- package/src/core/geom/3d/sphere/sphere_compute_bounding_of_2_spheres.d.ts.map +1 -1
- package/src/core/geom/3d/sphere/sphere_compute_bounding_of_2_spheres.js +4 -3
- package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/decimate_edge_collapse_snap.js +4 -3
- package/src/core/geom/3d/topology/simplify/quadratic/Quadric3.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/quadratic/Quadric3.js +4 -3
- package/src/core/geom/3d/topology/simplify/quadratic/apply_border_penalty_to_vertex_quadrics.d.ts.map +1 -1
- package/src/core/geom/3d/topology/simplify/quadratic/apply_border_penalty_to_vertex_quadrics.js +10 -6
- package/src/core/geom/3d/topology/struct/TopoMesh.js +2 -2
- package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts +0 -2
- package/src/core/geom/3d/topology/struct/TopoTriangle.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/TopoTriangle.js +2 -2
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_face_find_path_polyanya.js +8 -27
- package/src/core/geom/vec3/v3_cotangent.d.ts +20 -0
- package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_cotangent.js +29 -0
- package/src/core/geom/vec3/v3_matrix3_multiply.d.ts +19 -0
- package/src/core/geom/vec3/v3_matrix3_multiply.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_matrix3_multiply.js +30 -0
- package/src/core/geom/vec3/v3_multiply.d.ts +16 -0
- package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -0
- package/src/core/geom/vec3/v3_multiply.js +19 -0
- package/src/core/math/linalg/cg/cg_solve.d.ts +24 -0
- package/src/core/math/linalg/cg/cg_solve.d.ts.map +1 -0
- package/src/core/math/linalg/cg/cg_solve.js +106 -0
- package/src/core/math/linalg/cg/cg_solve_normal_equations.d.ts +21 -0
- package/src/core/math/linalg/cg/cg_solve_normal_equations.d.ts.map +1 -0
- package/src/core/math/linalg/cg/cg_solve_normal_equations.js +59 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts +19 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.d.ts.map +1 -0
- package/src/core/math/linalg/eigen/matrix_symmetric_3x3_eigen.js +117 -0
- package/src/core/math/linalg/sparse/SparseMatrixCSR.d.ts +50 -0
- package/src/core/math/linalg/sparse/SparseMatrixCSR.d.ts.map +1 -0
- package/src/core/math/linalg/sparse/SparseMatrixCSR.js +88 -0
- package/src/core/math/linalg/sparse/spm_matvec.d.ts +9 -0
- package/src/core/math/linalg/sparse/spm_matvec.d.ts.map +1 -0
- package/src/core/math/linalg/sparse/spm_matvec.js +22 -0
- package/src/core/math/linalg/sparse/spm_matvec_transpose.d.ts +12 -0
- package/src/core/math/linalg/sparse/spm_matvec_transpose.d.ts.map +1 -0
- package/src/core/math/linalg/sparse/spm_matvec_transpose.js +29 -0
- package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.d.ts +39 -0
- package/src/core/math/physics/mie/MIE_PARTICLES_STANDARD_PRECOMPUTED.js +22 -1
- package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.d.ts.map +1 -1
- package/src/core/math/physics/mie/compute_mie_particle_properties_rgb.js +32 -9
- package/src/core/math/physics/mie/compute_mie_phase.d.ts +2 -3
- package/src/core/math/physics/mie/compute_mie_phase.d.ts.map +1 -1
- package/src/core/math/physics/mie/compute_mie_phase.js +1 -3
- package/src/core/math/physics/mie/lorenz_mie_coefs.d.ts +0 -1
- package/src/core/math/physics/mie/lorenz_mie_coefs.d.ts.map +1 -1
- package/src/core/math/physics/mie/lorenz_mie_coefs.js +0 -7
- package/src/engine/REVIEW_2026_07_03.md +211 -0
- package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts.map +1 -1
- package/src/engine/animation/curve/actionProcessorOperations/curveActions.js +3 -2
- package/src/engine/animation/curve/compression/sample_animation_curve_to_float_array.js +1 -1
- package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
- package/src/engine/animation/keyed2/AnimationTrackPlayback.js +3 -1
- package/src/engine/asset/loaders/image/png/filter/png_filter_unFilterNone.js +2 -2
- package/src/engine/asset/preloader/AssetPreloader.d.ts.map +1 -1
- package/src/engine/asset/preloader/AssetPreloader.js +6 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +5 -2
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +1 -0
- package/src/engine/ecs/EntityManager.js +1 -1
- package/src/engine/ecs/EntityObserver.js +1 -1
- package/src/engine/ecs/animation/AnimationClip.js +1 -1
- package/src/engine/ecs/attachment/AttachmentSystem.js +2 -2
- package/src/engine/ecs/attachment/TransformAttachmentBinding.d.ts.map +1 -1
- package/src/engine/ecs/attachment/TransformAttachmentBinding.js +14 -3
- package/src/engine/ecs/fow/FogOfWar.js +2 -2
- package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.d.ts.map +1 -1
- package/src/engine/ecs/fow/shader/screenSpaceFogOfWarShader.js +8 -0
- package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.js +3 -3
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts +3 -1
- package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
- package/src/engine/ecs/gui/position/ViewportPosition.js +4 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts +10 -0
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts.map +1 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +43 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts +93 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectDeSerializer.js +315 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts +48 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/BinaryObjectSerializer.js +331 -0
- package/src/engine/ecs/storage/binary/object-v2/DESIGN.md +199 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts +53 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectBinaryFormat.js +57 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts +53 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/ObjectSerializationAdapter.js +56 -0
- package/src/engine/ecs/storage/binary/object-v2/README.md +110 -0
- package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts +13 -0
- package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/objectStringCodec.js +48 -0
- package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +29 -0
- package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +1 -0
- package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.js +44 -0
- package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/Terrain.js +4 -3
- package/src/engine/ecs/terrain/tiles/TerrainTile.js +2 -2
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +9 -8
- package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +2 -1
- package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts.map +1 -1
- package/src/engine/graphics/camera/makeScreenScissorFrustum.js +11 -10
- package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.d.ts.map +1 -1
- package/src/engine/graphics/canvas/canvas2d_draw_linear_scale.js +3 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +2 -2
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.d.ts.map +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/writeAnimationGraphDefinitionToJSON.js +2 -0
- package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/Camera.js +4 -0
- package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/auto_set_camera_clipping_planes.js +7 -2
- package/src/engine/graphics/ecs/camera/set_camera_aspect_ratio.js +1 -1
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
- package/src/engine/graphics/ecs/decal/v2/prototypeDecalSystem.js +2 -2
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.js +4 -1
- package/src/engine/graphics/ecs/light/binding/LightBinding.js +2 -2
- package/src/engine/graphics/ecs/mesh/MeshSystem.js +1 -1
- package/src/engine/graphics/ecs/mesh/SkeletonUtils.js +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +0 -1
- package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.js +1 -1
- package/src/engine/graphics/ecs/path/tube/build/computeFrenetFrames.d.ts.map +1 -1
- package/src/engine/graphics/ecs/path/tube/build/computeFrenetFrames.js +8 -7
- package/src/engine/graphics/ecs/water/WaterSystem.d.ts +6 -0
- package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/water/WaterSystem.js +12 -1
- package/src/engine/graphics/geometry/MikkT/AvgTSpace.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/AvgTSpace.js +11 -6
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +2 -3
- package/src/engine/graphics/geometry/MikkT/CalcTexArea.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/CalcTexArea.js +3 -4
- package/src/engine/graphics/geometry/MikkT/DegenEpilogue.js +4 -4
- package/src/engine/graphics/geometry/MikkT/EvalTspace.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/EvalTspace.js +11 -8
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +7 -8
- package/src/engine/graphics/geometry/MikkT/GenerateTSpaces.js +8 -8
- package/src/engine/graphics/geometry/MikkT/InitTriInfo.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/InitTriInfo.js +30 -25
- package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +7 -7
- package/src/engine/graphics/geometry/MikkT/NormalizeSafe.d.ts +0 -1
- package/src/engine/graphics/geometry/MikkT/NormalizeSafe.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/NormalizeSafe.js +6 -4
- package/src/engine/graphics/geometry/MikkT/STSpace.d.ts +0 -2
- package/src/engine/graphics/geometry/MikkT/STSpace.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/STSpace.js +3 -3
- package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.d.ts +0 -2
- package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.js +0 -1
- package/src/engine/graphics/geometry/buffered/ensureGeometryBoundingSphere.js +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/query/bvh32_geometry_nearest.js +0 -15
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +10 -10
- package/src/engine/graphics/geometry/optimization/merge/merge_geometry_hierarchy.js +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts +0 -2
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +4 -3
- package/src/engine/graphics/impostors/octahedral/grid/HemiOctahedralUvEncoder.js +2 -2
- package/src/engine/graphics/impostors/octahedral/grid/UvEncoder.d.ts +17 -7
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.js +2 -2
- package/src/engine/graphics/material/SplatMaterial.js +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +3 -2
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.js +3 -3
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +4 -3
- package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/group/ParticleGroup.js +3 -2
- package/src/engine/graphics/render/forward_plus/LightManager.js +2 -2
- package/src/engine/graphics/render/forward_plus/model/Decal.d.ts +0 -2
- package/src/engine/graphics/render/forward_plus/model/Decal.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/Decal.js +3 -3
- package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js +1 -1
- package/src/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +4 -3
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +6 -4
- package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts +1 -8
- package/src/engine/graphics/sh3/gi/material/MaterialTransformer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/gi/material/MaterialTransformer.js +2 -14
- package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts +9 -0
- package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.d.ts.map +1 -0
- package/src/engine/graphics/sh3/gi/material/ProbeResolutionStage.js +14 -0
- package/src/engine/graphics/sh3/lightmap/ARTIFACTS_PLAN.md +146 -0
- package/src/engine/graphics/sh3/lightmap/CODE_REVIEW.md +121 -0
- package/src/engine/graphics/sh3/lightmap/LIGHTMAPPER_REVIEW.md +183 -0
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts +90 -0
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/bake_lightmap_for_scene.js +681 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.d.ts +32 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_build_geometry.js +155 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_denoise.d.ts +49 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_denoise.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_denoise.js +136 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts +19 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_dilate.js +89 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_gather.d.ts +54 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_gather.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_gather.js +168 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts +30 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_rasterize_triangle.js +145 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.d.ts +38 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/lightmap_seam_fix.js +152 -0
- package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.d.ts +2 -0
- package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lightmap/prototypeLightmapBaker.js +186 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts +69 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGrid.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGrid.js +173 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts +24 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/LightProbeGridBaker.js +88 -0
- package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts +20 -0
- package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/build_light_probe_grid_for_scene.js +79 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts +11 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_obtain_storage_cached.js +84 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts +29 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/light_probe_grid_textures.js +160 -0
- package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts +23 -0
- package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/LightProbeGridMaterialTransformer.js +228 -0
- package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts +2 -0
- package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/chunk_lpg_get_irradiance_at.js +24 -0
- package/src/engine/graphics/sh3/lpg/material/common.d.ts +3 -0
- package/src/engine/graphics/sh3/lpg/material/common.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/common.js +73 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts +6 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_fragment_shader.js +42 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts +6 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/build_vertex_shader.js +49 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts +9 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_fragment/space_fragment_transform_shader.js +12 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts +6 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_fragment_shader.js +30 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts +6 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/build_vertex_shader.js +41 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts +3 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.frag.js +15 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts +3 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/preamble.vert.js +9 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts +9 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/material/space_vertex/space_vertex_transform_shader.js +12 -0
- package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts +20 -0
- package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.js +59 -0
- package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/PathTracer.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +8 -0
- package/src/engine/graphics/sh3/path_tracer/prepare_scene_gltf.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/prepare_scene_gltf.js +6 -4
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +3 -3
- package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/texture/sample_material.js +5 -4
- package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts +2 -0
- package/src/engine/graphics/sh3/prototypeLightProbeGrid.d.ts.map +1 -0
- package/src/engine/graphics/sh3/prototypeLightProbeGrid.js +170 -0
- package/src/engine/graphics/sh3/sky/hosek/prototype_hosek.js +2 -2
- package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +1 -1
- package/src/engine/graphics/texture/atlas/CachingTextureAtlas.js +1 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_copy_with_margins.js +3 -3
- package/src/engine/graphics/util/build_max_height_pyramid.d.ts.map +1 -1
- package/src/engine/graphics/util/build_max_height_pyramid.js +5 -2
- package/src/engine/grid/transform2grid/Transform2GridPositionSystem.js +1 -1
- package/src/engine/input/devices/KeyboardDevice.d.ts +61 -14
- package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
- package/src/engine/input/devices/KeyboardDevice.js +41 -15
- package/src/engine/input/devices/isHTMLElementFocusable.d.ts.map +1 -1
- package/src/engine/input/devices/isHTMLElementFocusable.js +2 -9
- package/src/engine/input/ecs/components/InputBinding.d.ts +7 -1
- package/src/engine/input/ecs/components/InputBinding.d.ts.map +1 -1
- package/src/engine/input/ecs/components/InputBinding.js +8 -1
- package/src/engine/input/ecs/systems/InputControllerSystem.js +1 -1
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +2 -1
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -1
- package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js +6 -2
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDatabase.js +2 -4
- package/src/engine/logging/elastic/ElasticSearchLogger.d.ts +1 -2
- package/src/engine/logging/elastic/ElasticSearchLogger.d.ts.map +1 -1
- package/src/engine/logging/elastic/ElasticSearchLogger.js +14 -10
- package/src/engine/navigation/ecs/path_following/PathFollower.js +1 -1
- package/src/engine/navigation/grid/find_path_on_grid_astar.d.ts.map +1 -1
- package/src/engine/navigation/grid/find_path_on_grid_astar.js +5 -2
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +17 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
- package/src/engine/scene/SceneManager.d.ts.map +1 -1
- package/src/engine/scene/SceneManager.js +4 -2
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +9 -0
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +6 -1
- package/src/engine/sound/material/concrete/json/serializeSoundMaterialToJSON.js +1 -1
- package/src/engine/sound/simulation/prototypeAcousticSolver.js +261 -143
- package/src/generation/theme/ThemeEngine.d.ts +9 -0
- package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
- package/src/generation/theme/ThemeEngine.js +37 -2
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { GUI } from "dat.gui";
|
|
2
|
+
import '../../../../../../../css/game.scss';
|
|
3
|
+
import { Color } from "../../../core/color/Color.js";
|
|
4
|
+
import { kelvin_to_rgb } from "../../../core/color/kelvin/kelvin_to_rgb.js";
|
|
5
|
+
import { AABB3 } from "../../../core/geom/3d/aabb/AABB3.js";
|
|
6
|
+
import Vector3 from "../../../core/geom/Vector3.js";
|
|
7
|
+
import { max2 } from "../../../core/math/max2.js";
|
|
8
|
+
import { min2 } from "../../../core/math/min2.js";
|
|
9
|
+
import { RAD_TO_DEG } from "../../../core/math/RAD_TO_DEG.js";
|
|
10
|
+
import { v3_length } from "../../../core/geom/vec3/v3_length.js";
|
|
11
|
+
import { GLTFAssetLoader } from "../../asset/loaders/GLTFAssetLoader.js";
|
|
12
|
+
import GUIElementSystem from "../../ecs/gui/GUIElementSystem.js";
|
|
13
|
+
import ViewportPositionSystem from "../../ecs/gui/position/ViewportPositionSystem.js";
|
|
14
|
+
import { TransformAttachmentSystem } from "../../ecs/transform-attachment/TransformAttachmentSystem.js";
|
|
15
|
+
import { EngineHarness } from "../../EngineHarness.js";
|
|
16
|
+
import { Camera } from "../ecs/camera/Camera.js";
|
|
17
|
+
import { focal_length_to_fov } from "../ecs/camera/focal_length_to_fov.js";
|
|
18
|
+
import TopDownCameraController from "../ecs/camera/topdown/TopDownCameraController.js";
|
|
19
|
+
import LightSystem from "../ecs/light/LightSystem.js";
|
|
20
|
+
import { SGMeshSystem } from "../ecs/mesh-v2/aggregate/SGMeshSystem.js";
|
|
21
|
+
import { ShadedGeometry } from "../ecs/mesh-v2/ShadedGeometry.js";
|
|
22
|
+
import { ShadedGeometryFlags } from "../ecs/mesh-v2/ShadedGeometryFlags.js";
|
|
23
|
+
import { ShadedGeometrySystem } from "../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
24
|
+
import { three_object_to_entity_composition } from "../ecs/mesh-v2/three_object_to_entity_composition.js";
|
|
25
|
+
import { GizmoRenderingPlugin } from "../render/gizmo/GizmoRenderingPlugin.js";
|
|
26
|
+
import { ProbeResolutionStage } from "./gi/material/ProbeResolutionStage.js";
|
|
27
|
+
import { light_probe_grid_bake_via_task } from "./lpg/build_light_probe_grid_for_scene.js";
|
|
28
|
+
import { LightProbeGrid } from "./lpg/LightProbeGrid.js";
|
|
29
|
+
import { light_probe_grid_obtain_storage_cached } from "./lpg/light_probe_grid_obtain_storage_cached.js";
|
|
30
|
+
import { LightProbeGridMaterialTransformer } from "./lpg/material/LightProbeGridMaterialTransformer.js";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @param {Engine} engine
|
|
35
|
+
* @return {Promise<void>}
|
|
36
|
+
*/
|
|
37
|
+
async function main(engine) {
|
|
38
|
+
const grid = new LightProbeGrid();
|
|
39
|
+
|
|
40
|
+
const transformer = new LightProbeGridMaterialTransformer({
|
|
41
|
+
grid,
|
|
42
|
+
stage: ProbeResolutionStage.Fragment
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
engine.graphics.getMaterialManager().addCompileStep(transformer);
|
|
46
|
+
|
|
47
|
+
await EngineHarness.buildBasics({
|
|
48
|
+
engine,
|
|
49
|
+
showFps: false,
|
|
50
|
+
enableWater: false,
|
|
51
|
+
enableTerrain: false,
|
|
52
|
+
enableLights: false,
|
|
53
|
+
cameraFarDistance: 200,
|
|
54
|
+
cameraController: false,
|
|
55
|
+
focus: { x: 0, y: 0, z: 0 },
|
|
56
|
+
pitch: 1,
|
|
57
|
+
yaw: -1.54,
|
|
58
|
+
distance: 54,
|
|
59
|
+
cameraFieldOfView: focal_length_to_fov(50, 25) * RAD_TO_DEG
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const sun_color = new Color();
|
|
63
|
+
|
|
64
|
+
kelvin_to_rgb(sun_color, 0, 5000);
|
|
65
|
+
|
|
66
|
+
await EngineHarness.buildLights({
|
|
67
|
+
engine,
|
|
68
|
+
shadowmapResolution: 4096,
|
|
69
|
+
ambientIntensity: 0.0,
|
|
70
|
+
sun: sun_color,
|
|
71
|
+
sunIntensity: 3,
|
|
72
|
+
sunDirection: new Vector3(1.2, -1, 0.2)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
engine.graphics.getRenderer().setClearColor('#1e3441', 1);
|
|
76
|
+
|
|
77
|
+
const ecd = engine.entityManager.dataset;
|
|
78
|
+
|
|
79
|
+
const path = 'data/models/pica_pica/pica_pica.gltf';
|
|
80
|
+
|
|
81
|
+
const mesh_asset = await engine.assetManager.promise(path, 'model/gltf+json');
|
|
82
|
+
const gltf = mesh_asset.gltf;
|
|
83
|
+
|
|
84
|
+
const composition = three_object_to_entity_composition(gltf.scene);
|
|
85
|
+
|
|
86
|
+
composition.traverse(n => {
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @type {ShadedGeometry}
|
|
90
|
+
*/
|
|
91
|
+
const sg = n.entity.getComponent(ShadedGeometry);
|
|
92
|
+
|
|
93
|
+
if (sg === null) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
sg.writeFlag(ShadedGeometryFlags.CastShadow | ShadedGeometryFlags.ReceiveShadow, true);
|
|
98
|
+
|
|
99
|
+
const material = sg.material;
|
|
100
|
+
if (material !== null) {
|
|
101
|
+
material.depthTest = true;
|
|
102
|
+
material.depthWrite = true;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
composition.build(ecd);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @type {AABB3}
|
|
110
|
+
*/
|
|
111
|
+
const mesh_bounds = mesh_asset.boundingBox;
|
|
112
|
+
|
|
113
|
+
const model_footprint = v3_length(mesh_bounds.getExtentsX(), mesh_bounds.getExtentsY(), mesh_bounds.getExtentsZ());
|
|
114
|
+
|
|
115
|
+
const camera = ecd.getAnyComponent(Camera);
|
|
116
|
+
camera.component.clip_far = max2(100, model_footprint * 3);
|
|
117
|
+
const camera_controller = ecd.getComponent(camera.entity, TopDownCameraController);
|
|
118
|
+
camera_controller.distanceMax = model_footprint * 2;
|
|
119
|
+
camera_controller.distanceMin = min2(camera_controller.distanceMin, model_footprint * 0.01);
|
|
120
|
+
mesh_bounds.getCenter(camera_controller.target)
|
|
121
|
+
|
|
122
|
+
const spacing = model_footprint * 0.1;
|
|
123
|
+
|
|
124
|
+
console.time('getGrid');
|
|
125
|
+
await light_probe_grid_obtain_storage_cached({ engine, path, grid, spacing });
|
|
126
|
+
console.timeEnd('getGrid');
|
|
127
|
+
|
|
128
|
+
console.log('LPG:', grid);
|
|
129
|
+
|
|
130
|
+
transformer.update();
|
|
131
|
+
|
|
132
|
+
const gui = new GUI();
|
|
133
|
+
gui.add(transformer, 'intensity').min(0).max(10);
|
|
134
|
+
|
|
135
|
+
gui.add({
|
|
136
|
+
async bake() {
|
|
137
|
+
const grid_bounds = new AABB3(0, 0, 0, 1, 1, 1);
|
|
138
|
+
grid_bounds.copy(mesh_bounds);
|
|
139
|
+
grid_bounds.grow(spacing * 1.05);
|
|
140
|
+
|
|
141
|
+
grid.build(
|
|
142
|
+
grid_bounds,
|
|
143
|
+
max2(2, Math.ceil(grid_bounds.getExtentsX() / spacing) + 1),
|
|
144
|
+
max2(2, Math.ceil(grid_bounds.getExtentsY() / spacing) + 1),
|
|
145
|
+
max2(2, Math.ceil(grid_bounds.getExtentsZ() / spacing) + 1)
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
await light_probe_grid_bake_via_task(grid, ecd, engine);
|
|
149
|
+
|
|
150
|
+
transformer.update();
|
|
151
|
+
}
|
|
152
|
+
}, "bake").name("Bake");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
new EngineHarness().initialize({
|
|
156
|
+
configuration(config, engine) {
|
|
157
|
+
config.addSystem(new ShadedGeometrySystem(engine));
|
|
158
|
+
config.addSystem(new LightSystem(engine, {
|
|
159
|
+
shadowResolution: 8192
|
|
160
|
+
}));
|
|
161
|
+
config.addSystem(new SGMeshSystem(engine));
|
|
162
|
+
config.addSystem(new TransformAttachmentSystem());
|
|
163
|
+
config.addSystem(new GUIElementSystem(engine.gui.view, engine));
|
|
164
|
+
config.addSystem(new ViewportPositionSystem(engine.gui.view.size));
|
|
165
|
+
|
|
166
|
+
config.addLoader('model/gltf+json', new GLTFAssetLoader());
|
|
167
|
+
|
|
168
|
+
config.addPlugin(GizmoRenderingPlugin);
|
|
169
|
+
}
|
|
170
|
+
}).then(main);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v3_normalize_array } from "../../../../../core/geom/vec3/v3_normalize_array.js";
|
|
2
2
|
import { CanvasView } from "../../../../../view/elements/CanvasView.js";
|
|
3
3
|
import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
|
|
4
4
|
import sampler2D2Canvas from "../../../texture/sampler/sampler2d_to_html_canvas.js";
|
|
@@ -52,7 +52,7 @@ for (let i = 0; i < sampler.width; i++) {
|
|
|
52
52
|
|
|
53
53
|
const direction = [v_x, v_z, v_y];
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
v3_normalize_array(direction, 0, direction, 0);
|
|
56
56
|
|
|
57
57
|
sky(color, 0, direction, 0);
|
|
58
58
|
|
|
@@ -150,7 +150,7 @@ export class CachingTextureAtlas extends AbstractTextureAtlas {
|
|
|
150
150
|
* @private
|
|
151
151
|
*/
|
|
152
152
|
__evict_all() {
|
|
153
|
-
for (let i = this.__cached_patches.length - 1; i
|
|
153
|
+
for (let i = this.__cached_patches.length - 1; i >= 0; i--) {
|
|
154
154
|
this.__evict(i);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
@@ -90,7 +90,7 @@ export function sampler2d_scale_down_lanczos(source, destination, lobes = 2) {
|
|
|
90
90
|
const ratio_x = source_width / d_w;
|
|
91
91
|
const ratio_y = source_height / d_h;
|
|
92
92
|
|
|
93
|
-
const rcp_ratio_y = 2 /
|
|
93
|
+
const rcp_ratio_y = 2 / ratio_y;
|
|
94
94
|
const rcp_ratio_x = 2 / ratio_x;
|
|
95
95
|
|
|
96
96
|
|
|
@@ -121,7 +121,7 @@ export function sampler2d_copy_with_margins(
|
|
|
121
121
|
|
|
122
122
|
//Write Bottom-left margin
|
|
123
123
|
sOffset = (sourceY + height - 1) * sRowSize + sourceX * dItemSize;
|
|
124
|
-
for (y = destinationY +
|
|
124
|
+
for (y = destinationY + height, yMax = Math.min(destination.height, y + marginBottom); y < yMax; y++) {
|
|
125
125
|
dA = y * dRowSize;
|
|
126
126
|
|
|
127
127
|
for (x = Math.max(0, destinationX - marginLeft), xMax = destinationX; x < xMax; x++) {
|
|
@@ -135,7 +135,7 @@ export function sampler2d_copy_with_margins(
|
|
|
135
135
|
}
|
|
136
136
|
//Write Bottom margin
|
|
137
137
|
sA = (sourceY + height - 1) * sRowSize;
|
|
138
|
-
for (y = destinationY +
|
|
138
|
+
for (y = destinationY + height, yMax = Math.min(destination.height, y + marginBottom); y < yMax; y++) {
|
|
139
139
|
dA = y * dRowSize;
|
|
140
140
|
|
|
141
141
|
for (x = 0; x < width; x++) {
|
|
@@ -149,7 +149,7 @@ export function sampler2d_copy_with_margins(
|
|
|
149
149
|
}
|
|
150
150
|
//Write Bottom-right margin
|
|
151
151
|
sOffset = (sourceY + height - 1) * sRowSize + (sourceX + width - 1) * dItemSize;
|
|
152
|
-
for (y = destinationY +
|
|
152
|
+
for (y = destinationY + height, yMax = Math.min(destination.height, y + marginBottom); y < yMax; y++) {
|
|
153
153
|
dA = y * dRowSize;
|
|
154
154
|
|
|
155
155
|
for (x = destinationX + width, xMax = Math.min(destination.width, x + marginRight); x < xMax; x++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build_max_height_pyramid.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/util/build_max_height_pyramid.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8DAFa,kBAAkB,
|
|
1
|
+
{"version":3,"file":"build_max_height_pyramid.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/util/build_max_height_pyramid.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8DAFa,kBAAkB,CA8G9B;mCA3I4F,OAAO"}
|
|
@@ -44,8 +44,11 @@ export function build_max_height_pyramid(sampler) {
|
|
|
44
44
|
let prevData = sampler.data;
|
|
45
45
|
|
|
46
46
|
while (prevW > 1 || prevH > 1) {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
// round UP so an odd dimension's last row/column is still folded
|
|
48
|
+
// into a coarse texel (the sx1/sy1 clamps below cover the overhang);
|
|
49
|
+
// a floor here would drop it and make the Hi-Z pyramid under-report.
|
|
50
|
+
const curW = Math.max(1, (prevW + 1) >> 1);
|
|
51
|
+
const curH = Math.max(1, (prevH + 1) >> 1);
|
|
49
52
|
const curData = new Float32Array(curW * curH);
|
|
50
53
|
|
|
51
54
|
const lastSrcX = prevW - 1;
|
|
@@ -1,14 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export default KeyboardDevice;
|
|
2
|
+
/**
|
|
3
|
+
* Provides keyboard input.
|
|
4
|
+
* Listens for key events on a DOM element and provides signals and state for key presses.
|
|
5
|
+
* NOTE: if the bound element loses focus within the page (e.g. you hold "A" and click on some other element),
|
|
6
|
+
* the key remains pressed and the eventual physical release is picked up at the window level.
|
|
7
|
+
* NOTE: when the window itself loses focus (e.g. switching to another application), key releases can no longer
|
|
8
|
+
* be observed at all, so any "pressed" keys are forcibly released with the appropriate signal.
|
|
9
|
+
*
|
|
10
|
+
* @author Alex Goldring
|
|
11
|
+
* @copyright Company Named Limited (c) 2026
|
|
12
|
+
*/
|
|
13
|
+
declare class KeyboardDevice {
|
|
14
|
+
/**
|
|
15
|
+
* @param {EventTarget|Element} domElement The DOM element to listen for keyboard events on. This element *must* be focusable (e.g., have a `tabindex` attribute).
|
|
16
|
+
* @throws {TypeError} If the provided `domElement` is not focusable and doesn't have a `tabindex` attribute.
|
|
17
|
+
*/
|
|
18
|
+
constructor(domElement: EventTarget | Element);
|
|
19
|
+
/**
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
readonly on: {
|
|
23
|
+
/**
|
|
24
|
+
* Fires when any key is pressed
|
|
25
|
+
* @type {Signal<KeyboardEvent>}
|
|
26
|
+
*/
|
|
27
|
+
down: Signal<KeyboardEvent>;
|
|
28
|
+
/**
|
|
29
|
+
* Fires when any key is released
|
|
30
|
+
* @type {Signal<KeyboardEvent>}
|
|
31
|
+
*/
|
|
32
|
+
up: Signal<KeyboardEvent>;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* See {@link KeyCodes} for valid IDs
|
|
36
|
+
* @readonly
|
|
37
|
+
* @type {Object<InputDeviceSwitch>}
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* const is_enter_pressed = keyboard.keys.enter.is_down;
|
|
41
|
+
*/
|
|
42
|
+
readonly keys: any;
|
|
43
|
+
/**
|
|
44
|
+
* The DOM element being listened to.
|
|
45
|
+
* @type {EventTarget}
|
|
46
|
+
*/
|
|
47
|
+
domElement: EventTarget;
|
|
48
|
+
/**
|
|
49
|
+
* Starts listening for keyboard events on the associated DOM element.
|
|
50
|
+
* @returns {void}
|
|
51
|
+
*/
|
|
52
|
+
start(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Stops listening for keyboard events.
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
stop(): void;
|
|
58
|
+
#private;
|
|
59
|
+
}
|
|
60
|
+
import Signal from "../../../core/events/signal/Signal.js";
|
|
61
|
+
//# sourceMappingURL=KeyboardDevice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAYA
|
|
1
|
+
{"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAYA;;;;;;;;;;GAUG;AACH;IA4BI;;;OAGG;IACH,wBAHW,WAAW,GAAC,OAAO,EAgC7B;IA3DD;;OAEG;IACH;QACI;;;WAGG;cADO,OAAO,aAAa,CAAC;QAG/B;;;WAGG;YADO,OAAO,aAAa,CAAC;MAGjC;IAEF;;;;;;;OAOG;IACH,mBAAU;IAkBN;;;OAGG;IACH,YAFU,WAAW,CAEO;IA2HhC;;;OAGG;IACH,SAFa,IAAI,CAWhB;IAED;;;OAGG;IACH,QAFa,IAAI,CAUhB;;CAEJ;mBA/NkB,uCAAuC"}
|
|
@@ -13,8 +13,10 @@ const codeToKeyNameMap = [];
|
|
|
13
13
|
/**
|
|
14
14
|
* Provides keyboard input.
|
|
15
15
|
* Listens for key events on a DOM element and provides signals and state for key presses.
|
|
16
|
-
* NOTE:
|
|
17
|
-
*
|
|
16
|
+
* NOTE: if the bound element loses focus within the page (e.g. you hold "A" and click on some other element),
|
|
17
|
+
* the key remains pressed and the eventual physical release is picked up at the window level.
|
|
18
|
+
* NOTE: when the window itself loses focus (e.g. switching to another application), key releases can no longer
|
|
19
|
+
* be observed at all, so any "pressed" keys are forcibly released with the appropriate signal.
|
|
18
20
|
*
|
|
19
21
|
* @author Alex Goldring
|
|
20
22
|
* @copyright Company Named Limited (c) 2026
|
|
@@ -60,7 +62,7 @@ class KeyboardDevice {
|
|
|
60
62
|
!isHTMLElementFocusable(domElement)
|
|
61
63
|
&& domElement.getAttribute('tabindex') === null
|
|
62
64
|
) {
|
|
63
|
-
new TypeError('Supplied element is not inherently focusable and does not have tabindex attribute, so it must have a tabindex attribute in order to be able receive keyboard events. Something like tabindex=0 would suffice.');
|
|
65
|
+
throw new TypeError('Supplied element is not inherently focusable and does not have tabindex attribute, so it must have a tabindex attribute in order to be able receive keyboard events. Something like tabindex=0 would suffice.');
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
/**
|
|
@@ -149,12 +151,41 @@ class KeyboardDevice {
|
|
|
149
151
|
|
|
150
152
|
}
|
|
151
153
|
|
|
154
|
+
/**
|
|
155
|
+
* Recovery handler for key releases that happen while the bound element does not have focus.
|
|
156
|
+
* Covers the scenario where a key is pressed on the element, focus is then lost to another
|
|
157
|
+
* element in the page (e.g. via a mouse click), and only then is the physical key released.
|
|
158
|
+
* Registered on window in the bubble phase, so for keys released while the element still has
|
|
159
|
+
* focus the element-scoped handler runs first and this one sees the key as already released.
|
|
160
|
+
*
|
|
161
|
+
* @param {KeyboardEvent} event
|
|
162
|
+
*/
|
|
163
|
+
#handlerWindowKeyUp = (event) => {
|
|
164
|
+
const keyName = codeToKeyNameMap[event.keyCode];
|
|
165
|
+
|
|
166
|
+
if (keyName === undefined) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const button = this.keys[keyName];
|
|
171
|
+
|
|
172
|
+
if (button.is_up) {
|
|
173
|
+
// key is not tracked as pressed; either it was never pressed via this device,
|
|
174
|
+
// or the element-scoped handler has already processed this release
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
this.on.up.send1(event);
|
|
179
|
+
|
|
180
|
+
button.release();
|
|
181
|
+
}
|
|
182
|
+
|
|
152
183
|
/**
|
|
153
184
|
*
|
|
154
185
|
* @param {FocusEvent} event
|
|
155
186
|
*/
|
|
156
|
-
#
|
|
157
|
-
//
|
|
187
|
+
#handleWindowBlurEvent = (event) => {
|
|
188
|
+
// Window lost focus, we won't be able to capture key-up events
|
|
158
189
|
// release all keys
|
|
159
190
|
for (let keyName in KeyCodes) {
|
|
160
191
|
this.keys[keyName].release();
|
|
@@ -170,12 +201,10 @@ class KeyboardDevice {
|
|
|
170
201
|
el.addEventListener(KeyboardEvents.KeyDown, this.#handlerKeyDown);
|
|
171
202
|
el.addEventListener(KeyboardEvents.KeyUp, this.#handlerKeyUp);
|
|
172
203
|
|
|
173
|
-
|
|
204
|
+
// catch releases of tracked keys that happen after the element lost focus within the page
|
|
205
|
+
window.addEventListener(KeyboardEvents.KeyUp, this.#handlerWindowKeyUp);
|
|
174
206
|
|
|
175
|
-
|
|
176
|
-
el.addEventListener('focusout', this.#handleGlobalBlurEvent);
|
|
177
|
-
|
|
178
|
-
window.addEventListener('blur', this.#handleGlobalBlurEvent);
|
|
207
|
+
window.addEventListener('blur', this.#handleWindowBlurEvent);
|
|
179
208
|
}
|
|
180
209
|
|
|
181
210
|
/**
|
|
@@ -187,12 +216,9 @@ class KeyboardDevice {
|
|
|
187
216
|
el.removeEventListener(KeyboardEvents.KeyDown, this.#handlerKeyDown);
|
|
188
217
|
el.removeEventListener(KeyboardEvents.KeyUp, this.#handlerKeyUp);
|
|
189
218
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
//https://w3c.github.io/uievents/#event-type-focusout
|
|
193
|
-
el.removeEventListener('focusout', this.#handleGlobalBlurEvent);
|
|
219
|
+
window.removeEventListener(KeyboardEvents.KeyUp, this.#handlerWindowKeyUp);
|
|
194
220
|
|
|
195
|
-
window.removeEventListener('blur', this.#
|
|
221
|
+
window.removeEventListener('blur', this.#handleWindowBlurEvent);
|
|
196
222
|
}
|
|
197
223
|
|
|
198
224
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isHTMLElementFocusable.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/isHTMLElementFocusable.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isHTMLElementFocusable.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/isHTMLElementFocusable.js"],"names":[],"mappings":"AAeA;;;GAGG;AACH,2CAFW,OAAO,WASjB"}
|
|
@@ -5,17 +5,10 @@
|
|
|
5
5
|
* @returns {boolean}
|
|
6
6
|
*/
|
|
7
7
|
function isInstanceOf(thing, klass) {
|
|
8
|
-
|
|
8
|
+
// constructors are functions; the check also guards against the class being absent in the environment
|
|
9
|
+
if (typeof klass !== "function") {
|
|
9
10
|
return false;
|
|
10
11
|
}
|
|
11
|
-
if (klass === null) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (typeof klass !== "object") {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
|
|
20
13
|
return thing instanceof klass;
|
|
21
14
|
}
|
|
@@ -4,8 +4,9 @@ export class InputBinding {
|
|
|
4
4
|
* @param {string} path
|
|
5
5
|
* @param {function} listener
|
|
6
6
|
* @param {boolean} [exclusive=false]
|
|
7
|
+
* @param {number} [priority=0] higher priority bindings on the same path are dispatched first
|
|
7
8
|
*/
|
|
8
|
-
constructor({ path, listener, exclusive }: string);
|
|
9
|
+
constructor({ path, listener, exclusive, priority }: string);
|
|
9
10
|
/**
|
|
10
11
|
*
|
|
11
12
|
* @type {string}
|
|
@@ -21,5 +22,10 @@ export class InputBinding {
|
|
|
21
22
|
* @type {boolean}
|
|
22
23
|
*/
|
|
23
24
|
exclusive: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Higher priority bindings on the same path are dispatched first.
|
|
27
|
+
* @type {number}
|
|
28
|
+
*/
|
|
29
|
+
priority: number;
|
|
24
30
|
}
|
|
25
31
|
//# sourceMappingURL=InputBinding.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBinding.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/components/InputBinding.js"],"names":[],"mappings":"AAEA;IACI
|
|
1
|
+
{"version":3,"file":"InputBinding.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/input/ecs/components/InputBinding.js"],"names":[],"mappings":"AAEA;IACI;;;;;;OAMG;IACH,qDALW,MAAM,EA+BhB;IApBG;;;OAGG;IACH,MAFU,MAAM,CAEA;IAChB;;;OAGG;IACH,mBAAwB;IACxB;;;OAGG;IACH,WAFU,OAAO,CAES;IAC1B;;;OAGG;IACH,UAFU,MAAM,CAEQ;CAE/B"}
|
|
@@ -6,11 +6,13 @@ export class InputBinding {
|
|
|
6
6
|
* @param {string} path
|
|
7
7
|
* @param {function} listener
|
|
8
8
|
* @param {boolean} [exclusive=false]
|
|
9
|
+
* @param {number} [priority=0] higher priority bindings on the same path are dispatched first
|
|
9
10
|
*/
|
|
10
|
-
constructor({ path, listener, exclusive = false }) {
|
|
11
|
+
constructor({ path, listener, exclusive = false, priority = 0 }) {
|
|
11
12
|
assert.isString(path, 'path');
|
|
12
13
|
assert.isFunction(listener, 'listener');
|
|
13
14
|
assert.isBoolean(exclusive, 'exclusive');
|
|
15
|
+
assert.isNumber(priority, 'priority');
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
*
|
|
@@ -27,5 +29,10 @@ export class InputBinding {
|
|
|
27
29
|
* @type {boolean}
|
|
28
30
|
*/
|
|
29
31
|
this.exclusive = exclusive;
|
|
32
|
+
/**
|
|
33
|
+
* Higher priority bindings on the same path are dispatched first.
|
|
34
|
+
* @type {number}
|
|
35
|
+
*/
|
|
36
|
+
this.priority = priority;
|
|
30
37
|
}
|
|
31
38
|
}
|
|
@@ -5,9 +5,10 @@ export class OverrideContextBehavior extends AbstractDecoratorBehavior {
|
|
|
5
5
|
* @param {Behavior} source
|
|
6
6
|
* @return {OverrideContextBehavior}
|
|
7
7
|
*/
|
|
8
|
-
static from(context: any, source: Behavior): OverrideContextBehavior;
|
|
8
|
+
static from(context: any, source: Behavior<any>): OverrideContextBehavior;
|
|
9
9
|
__override_context: {};
|
|
10
10
|
tick(timeDelta: any): import("../BehaviorStatus.js").BehaviorStatus;
|
|
11
11
|
}
|
|
12
12
|
import { AbstractDecoratorBehavior } from "./AbstractDecoratorBehavior.js";
|
|
13
|
+
import { Behavior } from "../Behavior.js";
|
|
13
14
|
//# sourceMappingURL=OverrideContextBehavior.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverrideContextBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverrideContextBehavior.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/intelligence/behavior/decorator/OverrideContextBehavior.js"],"names":[],"mappings":"AAGA;IAII;;;;;OAKG;IACH,kDAFY,uBAAuB,CASlC;IAfD,uBAAwB;IAiBxB,oEAIC;CAYJ;0CArCyC,gCAAgC;yBADjD,gBAAgB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Behavior } from "../Behavior.js";
|
|
1
2
|
import { AbstractDecoratorBehavior } from "./AbstractDecoratorBehavior.js";
|
|
2
3
|
|
|
3
4
|
export class OverrideContextBehavior extends AbstractDecoratorBehavior {
|
|
@@ -26,10 +27,13 @@ export class OverrideContextBehavior extends AbstractDecoratorBehavior {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
initialize(context) {
|
|
29
|
-
super.initialize(context);
|
|
30
|
-
|
|
31
30
|
const child_context = Object.assign({}, context, this.__override_context);
|
|
32
31
|
|
|
33
32
|
this.__source.initialize(child_context);
|
|
33
|
+
|
|
34
|
+
// NOTE: deliberately not super.initialize() — AbstractDecoratorBehavior
|
|
35
|
+
// would re-initialize the source a second time with the un-overridden
|
|
36
|
+
// context. Do only the Behavior-level self-init.
|
|
37
|
+
Behavior.prototype.initialize.call(this, context);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticKnowledgeDatabase.d.ts","sourceRoot":"","sources":["../../../../../src/engine/knowledge/database/StaticKnowledgeDatabase.js"],"names":[],"mappings":"mCAWU,MAAM;;;;;;;AAShB;IAEI;;;OAGG;IACH,SAFU,aAAa,oBAAoB,CAAC,CAEmC;IAG/E;;;;OAIG;IACH,gBAAa;IAQb;;;OAGG;IACH,qCAEC;IAGD;;OAEG;IACH,cAUC;IAED;;;;;OAKG;IACH,QAJW,MAAM,QACN,MAAM,yCAiChB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,0CAAmC,SAAS,CAkBxD;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,gCAA4B,SAAS,CAUjD;IAGD;;;OAGG;IACH,wBAcC;IAED;;;;OAIG;IACH,qDAiBC;IAGD;;;;;;OAMG;IACH,qBAQC;IAED;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"StaticKnowledgeDatabase.d.ts","sourceRoot":"","sources":["../../../../../src/engine/knowledge/database/StaticKnowledgeDatabase.js"],"names":[],"mappings":"mCAWU,MAAM;;;;;;;AAShB;IAEI;;;OAGG;IACH,SAFU,aAAa,oBAAoB,CAAC,CAEmC;IAG/E;;;;OAIG;IACH,gBAAa;IAQb;;;OAGG;IACH,qCAEC;IAGD;;OAEG;IACH,cAUC;IAED;;;;;OAKG;IACH,QAJW,MAAM,QACN,MAAM,yCAiChB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,0CAAmC,SAAS,CAkBxD;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,gCAA4B,SAAS,CAUjD;IAGD;;;OAGG;IACH,wBAcC;IAED;;;;OAIG;IACH,qDAiBC;IAGD;;;;;;OAMG;IACH,qBAQC;IAED;;;;;OAKG;IACH,mEAiBC;IAED;;;;;;;OAOG;IACH,qBAeC;IAED;;;;;;OAMG;IACH,mBAIC;IAED;;;;;OAKG;IACH,mEAmCC;IAGL,mCAA2D;;CAF1D;yBAnTwB,qCAAqC;mDAIX,yCAAyC"}
|
|
@@ -214,7 +214,7 @@ export class StaticKnowledgeDatabase {
|
|
|
214
214
|
|
|
215
215
|
const promise = this.__link_table(d, am, executor);
|
|
216
216
|
|
|
217
|
-
promise.catch((e) => {
|
|
217
|
+
return promise.catch((e) => {
|
|
218
218
|
/**
|
|
219
219
|
*
|
|
220
220
|
* @type {StaticKnowledgeDataTable}
|
|
@@ -225,9 +225,7 @@ export class StaticKnowledgeDatabase {
|
|
|
225
225
|
});
|
|
226
226
|
});
|
|
227
227
|
|
|
228
|
-
return Promise.all(
|
|
229
|
-
promises
|
|
230
|
-
]);
|
|
228
|
+
return Promise.all(promises);
|
|
231
229
|
}
|
|
232
230
|
|
|
233
231
|
/**
|
|
@@ -38,7 +38,7 @@ export class ElasticSearchLogger extends LoggerBackend {
|
|
|
38
38
|
* @type {number}
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
|
-
private
|
|
41
|
+
private __timeout;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
44
|
* @type {any}
|
|
@@ -46,7 +46,6 @@ export class ElasticSearchLogger extends LoggerBackend {
|
|
|
46
46
|
*/
|
|
47
47
|
private __bound_flush;
|
|
48
48
|
flush(): void;
|
|
49
|
-
__timeout: number | NodeJS.Timeout;
|
|
50
49
|
__prod(): void;
|
|
51
50
|
log(level: any, message: any): void;
|
|
52
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElasticSearchLogger.d.ts","sourceRoot":"","sources":["../../../../../src/engine/logging/elastic/ElasticSearchLogger.js"],"names":[],"mappings":"AAmCA;IACI;;;OAqDC;IA/CG;;;;OAIG;IACH,iBAA2B;IAE3B;;;;OAIG;IACH,qBAAuB;IACvB;;;;OAIG;IACH,wBAA2B;IAE3B;;;;OAIG;IACH,cAAgB;IAEhB;;;;OAIG;IACH,iBAAsB;IAEtB;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"ElasticSearchLogger.d.ts","sourceRoot":"","sources":["../../../../../src/engine/logging/elastic/ElasticSearchLogger.js"],"names":[],"mappings":"AAmCA;IACI;;;OAqDC;IA/CG;;;;OAIG;IACH,iBAA2B;IAE3B;;;;OAIG;IACH,qBAAuB;IACvB;;;;OAIG;IACH,wBAA2B;IAE3B;;;;OAIG;IACH,cAAgB;IAEhB;;;;OAIG;IACH,iBAAsB;IAEtB;;;;OAIG;IACH,kBAAmB;IAEnB;;;;OAIG;IACH,sBAA0C;IAG9C,cA2CC;IAED,eAOC;IAED,oCAUC;CACJ;8BA3J6B,qBAAqB"}
|