@woosh/meep-engine 2.138.17 → 2.138.19
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 +2 -2
- package/build/bundle-worker-image-decoder.js +1 -1
- package/editor/actions/concrete/ActionUpdateTexture.d.ts +12 -0
- package/editor/actions/concrete/ActionUpdateTexture.d.ts.map +1 -0
- package/editor/actions/concrete/ArrayCopyAction.d.ts +20 -0
- package/editor/actions/concrete/ArrayCopyAction.d.ts.map +1 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts +11 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +47 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts +38 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts +23 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +1 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +19 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +1 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts +10 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts +15 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts.map +1 -0
- package/editor/ecs/component/FieldDescriptor.d.ts +27 -0
- package/editor/ecs/component/FieldDescriptor.d.ts.map +1 -0
- package/editor/ecs/component/FieldValueAdapter.d.ts +7 -0
- package/editor/ecs/component/FieldValueAdapter.d.ts.map +1 -0
- package/editor/ecs/component/createFieldEditor.d.ts +9 -0
- package/editor/ecs/component/createFieldEditor.d.ts.map +1 -0
- package/editor/ecs/component/createObjectEditor.d.ts +14 -0
- package/editor/ecs/component/createObjectEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts.map +1 -1
- package/editor/ecs/component/findNearestRegisteredType.d.ts +8 -0
- package/editor/ecs/component/findNearestRegisteredType.d.ts.map +1 -0
- package/editor/process/ObstacleGridDisplayProcess.d.ts.map +1 -1
- package/editor/process/symbolic/makeGridPositionSymbolDisplay.d.ts.map +1 -1
- package/editor/tools/GridPaintTool.d.ts +17 -0
- package/editor/tools/GridPaintTool.d.ts.map +1 -0
- package/editor/tools/SelectionTool.d.ts +27 -0
- package/editor/tools/SelectionTool.d.ts.map +1 -0
- package/editor/tools/TopDownCameraControlTool.d.ts +13 -0
- package/editor/tools/TopDownCameraControlTool.d.ts.map +1 -0
- package/editor/view/ecs/ComponentControlFactory.d.ts.map +1 -0
- package/editor/view/ecs/ComponentControlView.d.ts.map +1 -1
- package/editor/view/ecs/EntityEditor.d.ts.map +1 -0
- package/editor/view/ecs/EntityList.d.ts.map +1 -0
- package/editor/view/ecs/HierarchicalEntityListView.d.ts.map +1 -0
- package/editor/view/node-graph/NodeGraphEditorView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeView.d.ts.map +1 -1
- package/editor/view/node-graph/PortView.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/binary/BinaryBuffer.d.ts +1 -1
- package/src/core/binary/BinaryBuffer.js +1 -1
- package/src/core/binary/BitSet.d.ts +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/cache/Cache.js +1 -1
- package/src/core/cache/LoadingCache.js +1 -1
- package/src/core/collection/list/List.js +1 -1
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/core/collection/table/RowFirstTable.d.ts +1 -1
- package/src/core/collection/table/RowFirstTable.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.d.ts +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +1 -1
- package/src/core/color/oklab/compute_max_saturation.d.ts +1 -1
- package/src/core/color/oklab/compute_max_saturation.js +1 -1
- package/src/core/color/oklab/find_cusp.d.ts +1 -1
- package/src/core/color/oklab/find_cusp.js +1 -1
- package/src/core/color/oklab/find_gamut_intersection.d.ts +1 -1
- package/src/core/color/oklab/find_gamut_intersection.js +1 -1
- package/src/core/color/oklab/okhsv_to_linear_srgb.d.ts +1 -1
- package/src/core/color/oklab/okhsv_to_linear_srgb.js +1 -1
- package/src/core/color/oklab/oklab_to_linear_srgb.d.ts +1 -1
- package/src/core/color/oklab/oklab_to_linear_srgb.js +1 -1
- package/src/core/color/oklab/oklab_to_xyz.d.ts +1 -1
- package/src/core/color/oklab/oklab_to_xyz.js +1 -1
- package/src/core/color/oklab/xyz_to_oklab.d.ts +1 -1
- package/src/core/color/oklab/xyz_to_oklab.js +1 -1
- package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.d.ts +1 -1
- package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_nearest_point_on_surface.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_nearest_point_on_surface.js +57 -65
- package/src/core/geom/3d/octahedra/octahedral_uv_wrap.d.ts +1 -1
- package/src/core/geom/3d/octahedra/octahedral_uv_wrap.js +1 -1
- package/src/core/geom/3d/quaternion/quat_decode_from_uint32.d.ts +1 -1
- package/src/core/geom/3d/quaternion/quat_decode_from_uint32.js +1 -1
- package/src/core/geom/3d/quaternion/quat_encode_to_uint32.d.ts +1 -1
- package/src/core/geom/3d/quaternion/quat_encode_to_uint32.js +1 -1
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts +74 -3
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts +37 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/CapsuleShape3D.js +210 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts +5 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PointShape3D.js +52 -14
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts +75 -12
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/TransformedShape3D.js +12 -3
- package/src/core/geom/3d/shape/UnionShape3D.d.ts +47 -5
- package/src/core/geom/3d/shape/UnionShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts +12 -5
- package/src/core/geom/3d/shape/UnitCubeShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts +17 -5
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.js +4 -1
- package/src/core/geom/3d/shape/json/type_adapters.d.ts +17 -2
- package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/type_adapters.js +18 -2
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.d.ts.map +1 -1
- package/src/core/geom/3d/shape/util/compute_signed_distance_gradient_by_sampling.js +51 -48
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.d.ts +1 -1
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.js +1 -1
- package/src/core/geom/ConicRay.d.ts +1 -1
- package/src/core/geom/ConicRay.js +1 -1
- package/src/core/geom/Quaternion.d.ts +2 -2
- package/src/core/geom/Quaternion.js +2 -2
- package/src/core/geom/Vector1.d.ts +1 -1
- package/src/core/geom/Vector1.js +1 -1
- package/src/core/geom/Vector2.d.ts +1 -1
- package/src/core/geom/Vector2.js +1 -1
- package/src/core/geom/Vector3.d.ts +1 -1
- package/src/core/geom/Vector3.js +1 -1
- package/src/core/geom/packing/miniball/Miniball.d.ts +1 -1
- package/src/core/geom/packing/miniball/Miniball.js +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_decode.d.ts +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_decode.js +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_encode.d.ts +1 -1
- package/src/core/geom/vec3/serialization/v3_binary_equality_encode.js +1 -1
- package/src/core/math/spline/spline3_hermite.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite.js +1 -1
- package/src/core/math/spline/spline3_hermite_bounds.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_bounds.js +1 -1
- package/src/core/math/spline/spline3_hermite_bounds_t.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_bounds_t.js +1 -1
- package/src/core/math/spline/spline3_hermite_to_monomial.d.ts +1 -1
- package/src/core/math/spline/spline3_hermite_to_monomial.js +1 -1
- package/src/core/model/ObservedBoolean.d.ts +1 -1
- package/src/core/model/ObservedBoolean.js +1 -1
- package/src/core/model/ObservedString.d.ts +1 -1
- package/src/core/model/ObservedString.js +1 -1
- package/src/core/process/undo/Action.js +1 -1
- package/src/core/process/undo/ActionProcessor.js +1 -1
- package/src/engine/animation/curve/AnimationCurve.d.ts +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +1 -1
- package/src/engine/animation/curve/Keyframe.d.ts +1 -1
- package/src/engine/animation/curve/Keyframe.js +1 -1
- package/src/engine/animation/curve/animation_curve_compute_aabb.d.ts +1 -1
- package/src/engine/animation/curve/animation_curve_compute_aabb.js +1 -1
- package/src/engine/animation/curve/animation_curve_optimize.d.ts +1 -1
- package/src/engine/animation/curve/animation_curve_optimize.js +2 -2
- package/src/engine/asset/loaders/image/jpeg/JpegImage.js +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.js +27 -7
- package/src/engine/asset/loaders/image/png/crc32.d.ts +1 -1
- package/src/engine/asset/loaders/image/png/crc32.js +1 -1
- package/src/engine/control/first-person/DESIGN.md +616 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +229 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerController.js +176 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +251 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +205 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +151 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -0
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +799 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.d.ts +23 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.d.ts.map +1 -0
- package/src/engine/control/first-person/math/computeJumpFromApex.js +23 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.d.ts +23 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.d.ts.map +1 -0
- package/src/engine/control/first-person/math/criticallyDampedSpring.js +34 -0
- package/src/engine/control/first-person/math/dampedSpringStep.d.ts +23 -0
- package/src/engine/control/first-person/math/dampedSpringStep.d.ts.map +1 -0
- package/src/engine/control/first-person/math/dampedSpringStep.js +72 -0
- package/src/engine/control/first-person/math/stepTowards.d.ts +12 -0
- package/src/engine/control/first-person/math/stepTowards.d.ts.map +1 -0
- package/src/engine/control/first-person/math/stepTowards.js +20 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts +69 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.d.ts.map +1 -0
- package/src/engine/control/first-person/pose/FirstPersonPose.js +91 -0
- package/src/engine/control/first-person/prototype_first_person_controller.d.ts +2 -0
- package/src/engine/control/first-person/prototype_first_person_controller.d.ts.map +1 -0
- package/src/engine/control/first-person/prototype_first_person_controller.js +314 -0
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +1 -1
- package/src/engine/ecs/EntityManager.d.ts +1 -1
- package/src/engine/ecs/EntityManager.js +1 -1
- package/src/engine/ecs/EntityObserver.js +1 -1
- package/src/engine/ecs/EntityReference.d.ts +1 -1
- package/src/engine/ecs/EntityReference.js +1 -1
- package/src/engine/ecs/System.js +1 -1
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts +2 -2
- package/src/engine/ecs/attachment/AttachmentSystem.d.ts.map +1 -1
- package/src/engine/ecs/grid/HeightMap2AOMap.d.ts.map +1 -1
- package/src/engine/ecs/grid/HeightMap2AOMap.js +3 -2
- package/src/engine/ecs/guid/UUID.d.ts +1 -1
- package/src/engine/ecs/guid/UUID.js +1 -1
- package/src/engine/ecs/name/Name.d.ts +1 -1
- package/src/engine/ecs/name/Name.js +1 -1
- package/src/engine/ecs/parent/ParentEntity.js +1 -1
- package/src/engine/ecs/storage/BinaryBufferDeSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/BinaryBufferDeSerializer.js +1 -1
- package/src/engine/ecs/storage/BinaryBufferSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/BinaryBufferSerializer.js +1 -1
- package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.js +1 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.d.ts +1 -1
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +1 -1
- package/src/engine/ecs/transform/Transform.d.ts +1 -1
- package/src/engine/ecs/transform/Transform.js +1 -1
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +10 -1
- package/src/engine/graphics/impostors/voxel/README.md +149 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.d.ts +91 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorBaker.js +376 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.d.ts +128 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/VoxelImpostorDescription.js +141 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.d.ts +38 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/bake/read_atlas_to_samples.js +338 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.d.ts +43 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/bake/voxelize_samples.js +192 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.d.ts +2 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/prototype_voxel_impostors.js +343 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.d.ts +13 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderDepthV0.js +99 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.d.ts +19 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderLitV0.js +231 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.d.ts +5 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderNormalsV0.js +70 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.d.ts +13 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderV0.js +127 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.d.ts +5 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/shader/VoxelImpostorShaderViewportDepthV0.js +68 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.d.ts +27 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.d.ts.map +1 -0
- package/src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.js +96 -0
- package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.d.ts +113 -29
- package/src/engine/graphics/render/forward_plus/SPECIFICATION.md +1 -1
- package/src/engine/graphics/shaders/AmbientOcclusionShader.d.ts.map +1 -1
- package/src/engine/graphics/shaders/AmbientOcclusionShader.js +20 -5
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.d.ts +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.js +1 -1
- package/src/engine/graphics/util/build_max_height_pyramid.d.ts +21 -14
- package/src/engine/graphics/util/build_max_height_pyramid.d.ts.map +1 -1
- package/src/engine/graphics/util/build_max_height_pyramid.js +107 -70
- package/src/engine/input/devices/InputDeviceSwitch.js +1 -1
- package/src/engine/input/devices/KeyboardDevice.js +1 -1
- package/src/engine/input/devices/PointerDevice.js +1 -1
- package/src/engine/intelligence/behavior/Behavior.js +1 -1
- package/src/engine/intelligence/behavior/SelectorBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/SelectorBehavior.js +1 -1
- package/src/engine/intelligence/behavior/behavior_to_dot.d.ts +1 -1
- package/src/engine/intelligence/behavior/behavior_to_dot.js +1 -1
- package/src/engine/intelligence/behavior/composite/CompositeBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/CompositeBehavior.js +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.js +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/composite/SequenceBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatBehavior.js +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorComponent.js +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.js +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/DieBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/EntityBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/KillBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/SendEventBehavior.js +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/ActionBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/FailingBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/PromiseBehavior.js +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.js +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedElement.d.ts +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedElement.js +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/BranchBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/DelayBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/LogMessageBehavior.js +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +1 -1
- package/src/engine/intelligence/behavior/util/RandomDelayBehavior.js +1 -1
- package/src/engine/intelligence/blackboard/Blackboard.js +1 -1
- package/src/engine/intelligence/mcts/MonteCarlo.d.ts +1 -1
- package/src/engine/intelligence/mcts/MonteCarlo.js +1 -1
- package/src/engine/intelligence/mcts/MoveEdge.d.ts +1 -1
- package/src/engine/intelligence/mcts/MoveEdge.js +1 -1
- package/src/engine/intelligence/mcts/StateNode.d.ts +1 -1
- package/src/engine/intelligence/mcts/StateNode.js +1 -1
- package/src/engine/intelligence/resource/ActionSequence.d.ts +1 -1
- package/src/engine/intelligence/resource/ActionSequence.js +1 -1
- package/src/engine/intelligence/resource/Resource.d.ts +1 -1
- package/src/engine/intelligence/resource/Resource.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocation.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocation.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationBid.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationBid.js +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationSolver.d.ts +1 -1
- package/src/engine/intelligence/resource/ResourceAllocationSolver.js +1 -1
- package/src/engine/intelligence/resource/StrategicResourceAllocator.d.ts +1 -1
- package/src/engine/intelligence/resource/StrategicResourceAllocator.js +1 -1
- package/src/engine/intelligence/resource/TacticalModule.d.ts +1 -1
- package/src/engine/intelligence/resource/TacticalModule.js +1 -1
- package/src/engine/network/NetworkSession.d.ts +1 -1
- package/src/engine/network/NetworkSession.js +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/TransformReplicationAdapter.js +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.js +1 -1
- package/src/engine/network/core/quantize/quantize_float.d.ts +1 -1
- package/src/engine/network/core/quantize/quantize_float.js +1 -1
- package/src/engine/network/core/quantize/quantize_position.d.ts +1 -1
- package/src/engine/network/core/quantize/quantize_position.js +1 -1
- package/src/engine/network/core/sequence/ack_bitfield.d.ts +1 -1
- package/src/engine/network/core/sequence/ack_bitfield.js +1 -1
- package/src/engine/network/core/sequence/seq16.d.ts +1 -1
- package/src/engine/network/core/sequence/seq16.js +1 -1
- package/src/engine/network/core/sequence/seq32.d.ts +1 -1
- package/src/engine/network/core/sequence/seq32.js +1 -1
- package/src/engine/network/diagnostics/BandwidthMeter.d.ts +1 -1
- package/src/engine/network/diagnostics/BandwidthMeter.js +1 -1
- package/src/engine/network/diagnostics/ReplayLog.d.ts +1 -1
- package/src/engine/network/diagnostics/ReplayLog.js +1 -1
- package/src/engine/network/diagnostics/SyncTest.d.ts +1 -1
- package/src/engine/network/diagnostics/SyncTest.js +1 -1
- package/src/engine/network/ecs/NetworkSystem.d.ts +1 -1
- package/src/engine/network/ecs/NetworkSystem.js +1 -1
- package/src/engine/network/ecs/components/NetworkIdentity.d.ts +1 -1
- package/src/engine/network/ecs/components/NetworkIdentity.js +1 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts +1 -1
- package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.js +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.d.ts +1 -1
- package/src/engine/network/orchestrator/NetworkPeer.js +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +1 -1
- package/src/engine/network/replication/Replicator.d.ts +1 -1
- package/src/engine/network/replication/Replicator.js +1 -1
- package/src/engine/network/replication/ScopeFilter.d.ts +2 -2
- package/src/engine/network/replication/ScopeFilter.js +2 -2
- package/src/engine/network/sim/ActionLog.d.ts +1 -1
- package/src/engine/network/sim/ActionLog.js +1 -1
- package/src/engine/network/sim/BinaryInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/sim/BinaryInterpolationAdapter.js +1 -1
- package/src/engine/network/sim/InterpolationLog.d.ts +1 -1
- package/src/engine/network/sim/InterpolationLog.js +1 -1
- package/src/engine/network/sim/ReplicatedComponentRegistry.d.ts +1 -1
- package/src/engine/network/sim/ReplicatedComponentRegistry.js +1 -1
- package/src/engine/network/sim/RewindEngine.d.ts +1 -1
- package/src/engine/network/sim/RewindEngine.js +1 -1
- package/src/engine/network/sim/SimAction.d.ts +1 -1
- package/src/engine/network/sim/SimAction.js +1 -1
- package/src/engine/network/sim/SimActionExecutor.d.ts +1 -1
- package/src/engine/network/sim/SimActionExecutor.js +1 -1
- package/src/engine/network/sim/SimActionRegistry.d.ts +1 -1
- package/src/engine/network/sim/SimActionRegistry.js +1 -1
- package/src/engine/network/sim/SmoothingState.js +1 -1
- package/src/engine/network/sim/Snapshotter.d.ts +1 -1
- package/src/engine/network/sim/Snapshotter.js +1 -1
- package/src/engine/network/sim/SpeculationLog.d.ts +1 -1
- package/src/engine/network/sim/SpeculationLog.js +1 -1
- package/src/engine/network/state/Baseline.d.ts +1 -1
- package/src/engine/network/state/Baseline.js +1 -1
- package/src/engine/network/state/ChangedEntitySet.d.ts +1 -1
- package/src/engine/network/state/ChangedEntitySet.js +1 -1
- package/src/engine/network/state/InputRing.d.ts +1 -1
- package/src/engine/network/state/InputRing.js +1 -1
- package/src/engine/network/state/MutationLedger.d.ts +1 -1
- package/src/engine/network/state/MutationLedger.js +1 -1
- package/src/engine/network/state/PriorityAccumulator.d.ts +1 -1
- package/src/engine/network/state/PriorityAccumulator.js +1 -1
- package/src/engine/network/state/ReplicationSlotTable.d.ts +1 -1
- package/src/engine/network/state/ReplicationSlotTable.js +1 -1
- package/src/engine/network/time/AdaptiveRenderDelay.d.ts +1 -1
- package/src/engine/network/time/AdaptiveRenderDelay.js +1 -1
- package/src/engine/network/time/JitterBuffer.d.ts +1 -1
- package/src/engine/network/time/JitterBuffer.js +1 -1
- package/src/engine/network/time/TimeDilation.d.ts +1 -1
- package/src/engine/network/time/TimeDilation.js +1 -1
- package/src/engine/network/time/TimeSync.d.ts +1 -1
- package/src/engine/network/time/TimeSync.js +1 -1
- package/src/engine/network/transport/Channel.d.ts.map +1 -1
- package/src/engine/network/transport/Channel.js +3 -6
- package/src/engine/network/transport/LoopbackTransport.d.ts +1 -1
- package/src/engine/network/transport/LoopbackTransport.js +1 -1
- package/src/engine/network/transport/ReliableCommandPipeline.d.ts +1 -1
- package/src/engine/network/transport/ReliableCommandPipeline.js +1 -1
- package/src/engine/network/transport/Transport.d.ts +1 -1
- package/src/engine/network/transport/Transport.js +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/NodeUDPTransport.js +2 -2
- package/src/engine/network/transport/adapters/SimulatedTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/SimulatedTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebSocketTransport.js +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.d.ts +1 -1
- package/src/engine/network/transport/adapters/WebTransportTransport.js +1 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.d.ts +1 -1
- package/src/engine/network/transport/fragments/FragmentAssembler.js +1 -1
- package/src/engine/network/transport/fragments/FragmentRetention.d.ts +1 -1
- package/src/engine/network/transport/fragments/FragmentRetention.js +1 -1
- package/src/engine/network/transport/fragments/packet_size.d.ts +1 -1
- package/src/engine/network/transport/fragments/packet_size.js +1 -1
- package/src/engine/simulation/Ticker.d.ts +1 -1
- package/src/engine/simulation/Ticker.js +1 -1
- package/src/engine/sound/SoundEngine.js +1 -1
- package/src/engine/ui/DraggableAspect.d.ts +1 -1
- package/src/engine/ui/DraggableAspect.js +1 -1
- package/src/view/View.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make_voxel_impostor_geometry.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/impostors/voxel/util/make_voxel_impostor_geometry.js"],"names":[],"mappings":"AA6CA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qFAFa,uBAAuB,CA4BnC;wCAxFM,OAAO"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BufferAttribute,
|
|
3
|
+
InstancedBufferGeometry,
|
|
4
|
+
InstancedInterleavedBuffer,
|
|
5
|
+
InterleavedBufferAttribute,
|
|
6
|
+
Sphere,
|
|
7
|
+
Vector3
|
|
8
|
+
} from "three";
|
|
9
|
+
import {
|
|
10
|
+
VOXEL_POINT_OFFSET_ALBEDO,
|
|
11
|
+
VOXEL_POINT_OFFSET_NORMAL,
|
|
12
|
+
VOXEL_POINT_OFFSET_ORM,
|
|
13
|
+
VOXEL_POINT_OFFSET_POSITION,
|
|
14
|
+
VOXEL_POINT_STRIDE
|
|
15
|
+
} from "../VoxelImpostorDescription.js";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Unit quad in the XY plane, centred on origin. Each instance picks
|
|
20
|
+
* one of these four corners; the shader places it in view space at a
|
|
21
|
+
* world-space offset around the instance's iPosition, producing a
|
|
22
|
+
* camera-facing billboard.
|
|
23
|
+
*
|
|
24
|
+
* @type {Float32Array}
|
|
25
|
+
*/
|
|
26
|
+
const QUAD_POSITIONS = new Float32Array([
|
|
27
|
+
-0.5, -0.5, 0,
|
|
28
|
+
0.5, -0.5, 0,
|
|
29
|
+
0.5, 0.5, 0,
|
|
30
|
+
-0.5, 0.5, 0,
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
const QUAD_UVS = new Float32Array([
|
|
34
|
+
0, 0,
|
|
35
|
+
1, 0,
|
|
36
|
+
1, 1,
|
|
37
|
+
0, 1,
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
const QUAD_INDICES = new Uint16Array([
|
|
41
|
+
0, 1, 2,
|
|
42
|
+
0, 2, 3,
|
|
43
|
+
]);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* InstancedBufferGeometry with one instance per voxel. Each instance is
|
|
48
|
+
* a unit quad whose vertex shader pushes the quad to a world-space
|
|
49
|
+
* footprint around the voxel's iPosition. Because the splat's size is
|
|
50
|
+
* specified in world units, it scales correctly with viewing distance:
|
|
51
|
+
*
|
|
52
|
+
* - At the impostor's design distance (where one voxel projects to
|
|
53
|
+
* about one screen pixel), the quad covers a single pixel.
|
|
54
|
+
* - Closer in, the quad expands to cover the same voxel cell on
|
|
55
|
+
* screen — no holes.
|
|
56
|
+
* - Farther out, the quad shrinks below a pixel — no z-fighting.
|
|
57
|
+
*
|
|
58
|
+
* This is the camera-facing-billboard reading of the Witcher 4 "voxel
|
|
59
|
+
* point" — the on-screen size of each voxel is whatever its world-space
|
|
60
|
+
* cell projects to, not a fixed screen size. Shadows work for free
|
|
61
|
+
* because the depth caster, rendered with the same shader from the
|
|
62
|
+
* light's view, also produces world-sized splats in light space.
|
|
63
|
+
*
|
|
64
|
+
* The interleaved point buffer is shared across iPosition / iNormal /
|
|
65
|
+
* iAlbedo / iORM via offsets — one GPU upload covers the lot.
|
|
66
|
+
*
|
|
67
|
+
* @param {VoxelImpostorDescription} description
|
|
68
|
+
* @returns {InstancedBufferGeometry}
|
|
69
|
+
*/
|
|
70
|
+
export function make_voxel_impostor_geometry(description) {
|
|
71
|
+
const geometry = new InstancedBufferGeometry();
|
|
72
|
+
|
|
73
|
+
geometry.setAttribute('position', new BufferAttribute(QUAD_POSITIONS, 3));
|
|
74
|
+
geometry.setAttribute('uv', new BufferAttribute(QUAD_UVS, 2));
|
|
75
|
+
geometry.setIndex(new BufferAttribute(QUAD_INDICES, 1));
|
|
76
|
+
|
|
77
|
+
const interleaved = new InstancedInterleavedBuffer(description.points, VOXEL_POINT_STRIDE);
|
|
78
|
+
|
|
79
|
+
geometry.setAttribute('iPosition', new InterleavedBufferAttribute(interleaved, 3, VOXEL_POINT_OFFSET_POSITION));
|
|
80
|
+
geometry.setAttribute('iNormal', new InterleavedBufferAttribute(interleaved, 3, VOXEL_POINT_OFFSET_NORMAL));
|
|
81
|
+
geometry.setAttribute('iAlbedo', new InterleavedBufferAttribute(interleaved, 3, VOXEL_POINT_OFFSET_ALBEDO));
|
|
82
|
+
geometry.setAttribute('iORM', new InterleavedBufferAttribute(interleaved, 3, VOXEL_POINT_OFFSET_ORM));
|
|
83
|
+
|
|
84
|
+
geometry.instanceCount = description.point_count;
|
|
85
|
+
|
|
86
|
+
// The point cloud occupies the bake's bounding sphere; each splat
|
|
87
|
+
// extends at most half a voxel-cell past its centre, which is
|
|
88
|
+
// already absorbed by the sphere's bake-time radius. Add a small
|
|
89
|
+
// margin so frustum culling doesn't pop voxels at the edge.
|
|
90
|
+
geometry.boundingSphere = new Sphere(
|
|
91
|
+
new Vector3(description.offset[0], description.offset[1], description.offset[2]),
|
|
92
|
+
description.sphere_radius + description.voxel_size * 0.5
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
return geometry;
|
|
96
|
+
}
|
|
@@ -1,29 +1,113 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
1
|
+
export class ParticleVolume {
|
|
2
|
+
__emitter: ParticleEmitter;
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @type {Transform}
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
private __transform;
|
|
9
|
+
/**
|
|
10
|
+
* Particle count per unit of volume
|
|
11
|
+
* @type {number}
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
private __density;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @type {AbstractShape3D}
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
private __shape;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {SamplingFunctionKind|number}
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private __sampling_function;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {Entity}
|
|
30
|
+
*/
|
|
31
|
+
entity: Entity;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {Object<AttributeValue>}
|
|
35
|
+
*/
|
|
36
|
+
attributes: any;
|
|
37
|
+
get shape(): AbstractShape3D;
|
|
38
|
+
/**
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
private init_attributes;
|
|
42
|
+
get emitter(): ParticleEmitter;
|
|
43
|
+
get transform(): Transform;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param {number} [density]
|
|
47
|
+
* @param {number} [particle_size]
|
|
48
|
+
* @param {AbstractShape3D} [shape]
|
|
49
|
+
* @param {boolean} sort
|
|
50
|
+
* @param {boolean} lighting
|
|
51
|
+
* @param {string} [sprite]
|
|
52
|
+
* @param {SamplingFunctionKind|number} [sampling_function]
|
|
53
|
+
*/
|
|
54
|
+
from({ density, particle_size, shape, sort, lighting, sprite, sampling_function }?: number): void;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @param {number} density
|
|
58
|
+
* @param {boolean} [is_density_size_adjusted]
|
|
59
|
+
* @param {number} [particle_size]
|
|
60
|
+
* @param {Object} shape
|
|
61
|
+
* @param {boolean} [is_sorted]
|
|
62
|
+
* @param {boolean} [is_lit]
|
|
63
|
+
* @param {string} sprite
|
|
64
|
+
* @param {Object<Object>} [attributes]
|
|
65
|
+
* @param {string} [sampling_function]
|
|
66
|
+
*/
|
|
67
|
+
fromJSON({ density, is_density_size_adjusted, particle_size, shape, is_sorted, is_lit, sprite, attributes, sampling_function }: number): void;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @private
|
|
71
|
+
*/
|
|
72
|
+
private __ensure_initialized;
|
|
73
|
+
__distribute_grid(): void;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @param {function} random
|
|
77
|
+
* @private
|
|
78
|
+
*/
|
|
79
|
+
private __distribute;
|
|
80
|
+
/**
|
|
81
|
+
* Distribute particles in the volume
|
|
82
|
+
* @param {function():number} random
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private __distribute_random;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
private __write_attributes;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @param {number} index
|
|
94
|
+
* @private
|
|
95
|
+
*/
|
|
96
|
+
private __write_attribute;
|
|
97
|
+
build(): void;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @param {number} r
|
|
101
|
+
* @param {number} g
|
|
102
|
+
* @param {number} b
|
|
103
|
+
* @param {number} a
|
|
104
|
+
*/
|
|
105
|
+
setColor(r: number, g: number, b: number, a: number): void;
|
|
106
|
+
}
|
|
107
|
+
export namespace ParticleVolume {
|
|
108
|
+
let typeName: string;
|
|
109
|
+
}
|
|
110
|
+
import { ParticleEmitter } from "../../emitter/ParticleEmitter.js";
|
|
111
|
+
import Entity from "../../../../../../ecs/Entity.js";
|
|
112
|
+
import { Transform } from "../../../../../../ecs/transform/Transform.js";
|
|
113
|
+
//# sourceMappingURL=ParticleVolume.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmbientOcclusionShader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/shaders/AmbientOcclusionShader.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH;IAFyB,OAAO,GAArB,MAAM;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AmbientOcclusionShader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/shaders/AmbientOcclusionShader.js"],"names":[],"mappings":";AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH;IAFyB,OAAO,GAArB,MAAM;;;;;;;;;;;;;;;;;;;;;;EA4ThB;wBA/X8B,OAAO"}
|
|
@@ -93,10 +93,15 @@ function AmbientOcclusionShader({ numRays = DEFAULT_NUM_RAYS } = {}) {
|
|
|
93
93
|
|
|
94
94
|
fragmentShader: `
|
|
95
95
|
// three.js auto-prefixes float/int precision; declare highp for
|
|
96
|
-
// the heightmap sampler so R32F reads keep full precision
|
|
97
|
-
|
|
96
|
+
// the heightmap sampler so R32F reads keep full precision.
|
|
97
|
+
//
|
|
98
|
+
// The pyramid is stored as a DataTexture2DArray with one mip per
|
|
99
|
+
// layer (all at full mip-0 resolution; smaller mips are nearest-
|
|
100
|
+
// upscaled). This sidesteps a three.js r136 upload bug for
|
|
101
|
+
// DataTexture custom mipmap chains — see build_max_height_pyramid.
|
|
102
|
+
precision highp sampler2DArray;
|
|
98
103
|
|
|
99
|
-
uniform
|
|
104
|
+
uniform sampler2DArray heightMap;
|
|
100
105
|
uniform vec2 worldSize;
|
|
101
106
|
uniform vec2 heightMapSize;
|
|
102
107
|
uniform int maxMipLevel;
|
|
@@ -217,8 +222,18 @@ function AmbientOcclusionShader({ numRays = DEFAULT_NUM_RAYS } = {}) {
|
|
|
217
222
|
// Heightmap utilities
|
|
218
223
|
// ============================================================
|
|
219
224
|
|
|
225
|
+
// Sample mip-0 (the original heightmap) at uv. Layer 0 of the
|
|
226
|
+
// 2D array holds the un-reduced heightmap data.
|
|
220
227
|
float sample_height(vec2 uv) {
|
|
221
|
-
return
|
|
228
|
+
return texture(heightMap, vec3(uv, 0.0)).r;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Sample max-height at a specific Hi-Z level. Mip k lives in
|
|
232
|
+
// layer k, nearest-upscaled to mip-0 resolution. NearestFilter
|
|
233
|
+
// on the array snaps the layer to integer 'mip' and returns
|
|
234
|
+
// the underlying mip-k texel containing uv.
|
|
235
|
+
float sample_max_height(vec2 uv, int mip) {
|
|
236
|
+
return texture(heightMap, vec3(uv, float(mip))).r;
|
|
222
237
|
}
|
|
223
238
|
|
|
224
239
|
// Central-difference normal in world space. Faster than building
|
|
@@ -293,7 +308,7 @@ function AmbientOcclusionShader({ numRays = DEFAULT_NUM_RAYS } = {}) {
|
|
|
293
308
|
float t_exit = min(t_to_boundary.x, t_to_boundary.y) + T_EPS;
|
|
294
309
|
|
|
295
310
|
// Max occluder height in this cell at this mip
|
|
296
|
-
float max_h =
|
|
311
|
+
float max_h = sample_max_height(cell_center, mip);
|
|
297
312
|
|
|
298
313
|
// Ray height is linear in t, so the minimum across the
|
|
299
314
|
// cell is at one of the endpoints
|
|
@@ -24,7 +24,7 @@ import { computeHashFloat } from "../../../../core/primitives/numbers/computeHas
|
|
|
24
24
|
* Inspired by OpenGL's glsl sampler2d API
|
|
25
25
|
* @class
|
|
26
26
|
* @author Alex Goldring
|
|
27
|
-
* @copyright Company Named Limited (c)
|
|
27
|
+
* @copyright Company Named Limited (c) 2026
|
|
28
28
|
*/
|
|
29
29
|
export class Sampler2D {
|
|
30
30
|
/**
|
package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {number} emptyValue
|
|
6
6
|
*
|
|
7
7
|
* @author Alex Goldring
|
|
8
|
-
* @copyright Company Named Limited (c)
|
|
8
|
+
* @copyright Company Named Limited (c) 2026
|
|
9
9
|
*/
|
|
10
10
|
export function computeSignedDistanceField_NaiveFlood(source: Sampler2D, destination: Sampler2D, emptyValue: number): void;
|
|
11
11
|
//# sourceMappingURL=computeSignedDistanceField_NaiveFlood.d.ts.map
|
package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_NaiveFlood.js
CHANGED
|
@@ -8,7 +8,7 @@ import { BitSet } from "../../../../../core/binary/BitSet.js";
|
|
|
8
8
|
* @param {number} emptyValue
|
|
9
9
|
*
|
|
10
10
|
* @author Alex Goldring
|
|
11
|
-
* @copyright Company Named Limited (c)
|
|
11
|
+
* @copyright Company Named Limited (c) 2026
|
|
12
12
|
*/
|
|
13
13
|
export function computeSignedDistanceField_NaiveFlood(
|
|
14
14
|
source,
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Build a max-reduction
|
|
3
|
-
*
|
|
2
|
+
* Build a max-reduction Hi-Z height pyramid from a single-channel float
|
|
3
|
+
* heightmap sampler.
|
|
4
4
|
*
|
|
5
|
-
* Each
|
|
6
|
-
* of level k-1 it covers. A ray trace can then skip whole cells
|
|
7
|
-
* the ray's height is strictly above the cell's max-height at
|
|
8
|
-
* cell can be advanced past without checking any finer level.
|
|
5
|
+
* Each pyramid level k holds, per texel, the maximum height across the 2×2
|
|
6
|
+
* block of level k-1 it covers. A ray trace can then skip whole cells
|
|
7
|
+
* safely: if the ray's height is strictly above the cell's max-height at
|
|
8
|
+
* any level, the cell can be advanced past without checking any finer level.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* Storage layout — **DataTexture2DArray, one mip per layer**, all layers at
|
|
11
|
+
* full mip-0 resolution. Smaller mips are nearest-upscaled into their layer.
|
|
12
|
+
* The shader samples mip k via `texture(heightMap, vec3(uv, float(k)))`.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* are
|
|
14
|
+
* This sidesteps the three.js r136 bug in `WebGLTextures.uploadTexture`
|
|
15
|
+
* where DataTexture custom mipmap chains are uploaded with `texSubImage2D`
|
|
16
|
+
* called with level hardcoded to 0 — every "mip" smashes the previous one
|
|
17
|
+
* into level 0 and the actual mip levels 1..N are left uninitialized. The
|
|
18
|
+
* 2DArray upload path uses one `texSubImage3D` call to level 0 covering
|
|
19
|
+
* all layers, so it works correctly.
|
|
20
|
+
*
|
|
21
|
+
* Memory cost is (mip_count × W × H × 4) bytes versus (≈ 4/3 × W × H × 4)
|
|
22
|
+
* for a true mip pyramid — about a 3× overhead, traded for correctness.
|
|
16
23
|
*
|
|
17
24
|
* Non-power-of-two heightmaps are handled by halving with floor and stopping
|
|
18
25
|
* once both dimensions reach 1.
|
|
19
26
|
*
|
|
20
27
|
* @param {Sampler2D} sampler single-channel Float32 heightmap (itemSize=1)
|
|
21
|
-
* @returns {
|
|
28
|
+
* @returns {DataTexture2DArray} R32F array texture; depth = mip count
|
|
22
29
|
*/
|
|
23
|
-
export function build_max_height_pyramid(sampler: Sampler2D):
|
|
24
|
-
import {
|
|
30
|
+
export function build_max_height_pyramid(sampler: Sampler2D): DataTexture2DArray;
|
|
31
|
+
import { DataTexture2DArray } from "three";
|
|
25
32
|
//# sourceMappingURL=build_max_height_pyramid.d.ts.map
|
|
@@ -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":"
|
|
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,CA2G9B;mCAxI4F,OAAO"}
|
|
@@ -1,100 +1,137 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ClampToEdgeWrapping,
|
|
3
|
-
DataTexture,
|
|
4
|
-
FloatType,
|
|
5
|
-
NearestFilter,
|
|
6
|
-
NearestMipmapNearestFilter,
|
|
7
|
-
RedFormat
|
|
8
|
-
} from "three";
|
|
1
|
+
import { ClampToEdgeWrapping, DataTexture2DArray, FloatType, NearestFilter, RedFormat } from "three";
|
|
9
2
|
|
|
10
3
|
/**
|
|
11
|
-
* Build a max-reduction
|
|
12
|
-
*
|
|
4
|
+
* Build a max-reduction Hi-Z height pyramid from a single-channel float
|
|
5
|
+
* heightmap sampler.
|
|
13
6
|
*
|
|
14
|
-
* Each
|
|
15
|
-
* of level k-1 it covers. A ray trace can then skip whole cells
|
|
16
|
-
* the ray's height is strictly above the cell's max-height at
|
|
17
|
-
* cell can be advanced past without checking any finer level.
|
|
7
|
+
* Each pyramid level k holds, per texel, the maximum height across the 2×2
|
|
8
|
+
* block of level k-1 it covers. A ray trace can then skip whole cells
|
|
9
|
+
* safely: if the ray's height is strictly above the cell's max-height at
|
|
10
|
+
* any level, the cell can be advanced past without checking any finer level.
|
|
18
11
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
12
|
+
* Storage layout — **DataTexture2DArray, one mip per layer**, all layers at
|
|
13
|
+
* full mip-0 resolution. Smaller mips are nearest-upscaled into their layer.
|
|
14
|
+
* The shader samples mip k via `texture(heightMap, vec3(uv, float(k)))`.
|
|
22
15
|
*
|
|
23
|
-
*
|
|
24
|
-
* are
|
|
16
|
+
* This sidesteps the three.js r136 bug in `WebGLTextures.uploadTexture`
|
|
17
|
+
* where DataTexture custom mipmap chains are uploaded with `texSubImage2D`
|
|
18
|
+
* called with level hardcoded to 0 — every "mip" smashes the previous one
|
|
19
|
+
* into level 0 and the actual mip levels 1..N are left uninitialized. The
|
|
20
|
+
* 2DArray upload path uses one `texSubImage3D` call to level 0 covering
|
|
21
|
+
* all layers, so it works correctly.
|
|
22
|
+
*
|
|
23
|
+
* Memory cost is (mip_count × W × H × 4) bytes versus (≈ 4/3 × W × H × 4)
|
|
24
|
+
* for a true mip pyramid — about a 3× overhead, traded for correctness.
|
|
25
25
|
*
|
|
26
26
|
* Non-power-of-two heightmaps are handled by halving with floor and stopping
|
|
27
27
|
* once both dimensions reach 1.
|
|
28
28
|
*
|
|
29
29
|
* @param {Sampler2D} sampler single-channel Float32 heightmap (itemSize=1)
|
|
30
|
-
* @returns {
|
|
30
|
+
* @returns {DataTexture2DArray} R32F array texture; depth = mip count
|
|
31
31
|
*/
|
|
32
32
|
export function build_max_height_pyramid(sampler) {
|
|
33
33
|
const w0 = sampler.width;
|
|
34
34
|
const h0 = sampler.height;
|
|
35
35
|
|
|
36
|
+
// Step 1: build the conventional mip pyramid in JS
|
|
36
37
|
/** @type {Array<{data: Float32Array, width: number, height: number}>} */
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (c > m) m = c;
|
|
75
|
-
if (d > m) m = d;
|
|
76
|
-
|
|
77
|
-
curData[y * curW + x] = m;
|
|
38
|
+
const mips = [];
|
|
39
|
+
mips.push({ data: sampler.data, width: w0, height: h0 });
|
|
40
|
+
|
|
41
|
+
{
|
|
42
|
+
let prevW = w0;
|
|
43
|
+
let prevH = h0;
|
|
44
|
+
let prevData = sampler.data;
|
|
45
|
+
|
|
46
|
+
while (prevW > 1 || prevH > 1) {
|
|
47
|
+
const curW = Math.max(1, prevW >> 1);
|
|
48
|
+
const curH = Math.max(1, prevH >> 1);
|
|
49
|
+
const curData = new Float32Array(curW * curH);
|
|
50
|
+
|
|
51
|
+
const lastSrcX = prevW - 1;
|
|
52
|
+
const lastSrcY = prevH - 1;
|
|
53
|
+
|
|
54
|
+
for (let y = 0; y < curH; y++) {
|
|
55
|
+
const sy0 = y << 1;
|
|
56
|
+
const sy1 = Math.min(sy0 + 1, lastSrcY);
|
|
57
|
+
const row0 = sy0 * prevW;
|
|
58
|
+
const row1 = sy1 * prevW;
|
|
59
|
+
|
|
60
|
+
for (let x = 0; x < curW; x++) {
|
|
61
|
+
const sx0 = x << 1;
|
|
62
|
+
const sx1 = Math.min(sx0 + 1, lastSrcX);
|
|
63
|
+
|
|
64
|
+
const a = prevData[row0 + sx0];
|
|
65
|
+
const b = prevData[row0 + sx1];
|
|
66
|
+
const c = prevData[row1 + sx0];
|
|
67
|
+
const d = prevData[row1 + sx1];
|
|
68
|
+
|
|
69
|
+
let m = a > b ? a : b;
|
|
70
|
+
if (c > m) m = c;
|
|
71
|
+
if (d > m) m = d;
|
|
72
|
+
|
|
73
|
+
curData[y * curW + x] = m;
|
|
74
|
+
}
|
|
78
75
|
}
|
|
76
|
+
|
|
77
|
+
mips.push({ data: curData, width: curW, height: curH });
|
|
78
|
+
|
|
79
|
+
prevW = curW;
|
|
80
|
+
prevH = curH;
|
|
81
|
+
prevData = curData;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Step 2: pack each mip nearest-upscaled to w0 × h0 as a layer of the
|
|
86
|
+
// array texture. Layer k holds mip k blown up; sampling with NearestFilter
|
|
87
|
+
// at any uv returns mip k's value at that uv exactly.
|
|
88
|
+
const depth = mips.length;
|
|
89
|
+
const layerSize = w0 * h0;
|
|
90
|
+
const layered = new Float32Array(depth * layerSize);
|
|
91
|
+
|
|
92
|
+
for (let k = 0; k < depth; k++) {
|
|
93
|
+
const mip = mips[k];
|
|
94
|
+
const mw = mip.width;
|
|
95
|
+
const mh = mip.height;
|
|
96
|
+
const mdata = mip.data;
|
|
97
|
+
|
|
98
|
+
const layerOffset = k * layerSize;
|
|
99
|
+
|
|
100
|
+
if (mw === w0 && mh === h0) {
|
|
101
|
+
// Level 0 — direct copy
|
|
102
|
+
layered.set(mdata, layerOffset);
|
|
103
|
+
continue;
|
|
79
104
|
}
|
|
80
105
|
|
|
81
|
-
|
|
106
|
+
// Nearest-upscale: dst (x, y) → src (floor(x * mw / w0), floor(y * mh / h0))
|
|
107
|
+
// Works for both POT and NPO2 reductions.
|
|
108
|
+
for (let y = 0; y < h0; y++) {
|
|
109
|
+
const sy = Math.min(mh - 1, ((y * mh) / h0) | 0);
|
|
110
|
+
const srcRow = sy * mw;
|
|
111
|
+
const dstRow = layerOffset + y * w0;
|
|
82
112
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
113
|
+
for (let x = 0; x < w0; x++) {
|
|
114
|
+
const sx = Math.min(mw - 1, ((x * mw) / w0) | 0);
|
|
115
|
+
layered[dstRow + x] = mdata[srcRow + sx];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
86
118
|
}
|
|
87
119
|
|
|
88
|
-
const tex = new
|
|
89
|
-
tex.
|
|
90
|
-
tex.
|
|
91
|
-
tex.
|
|
120
|
+
const tex = new DataTexture2DArray(layered, w0, h0, depth);
|
|
121
|
+
tex.format = RedFormat;
|
|
122
|
+
tex.type = FloatType;
|
|
123
|
+
tex.internalFormat = 'R32F';
|
|
124
|
+
tex.minFilter = NearestFilter;
|
|
92
125
|
tex.magFilter = NearestFilter;
|
|
93
126
|
tex.wrapS = ClampToEdgeWrapping;
|
|
94
127
|
tex.wrapT = ClampToEdgeWrapping;
|
|
95
|
-
tex.
|
|
128
|
+
tex.generateMipmaps = false;
|
|
96
129
|
tex.flipY = false;
|
|
97
130
|
tex.needsUpdate = true;
|
|
98
131
|
|
|
132
|
+
// Expose the depth so callers can plumb `maxMipLevel` to the shader
|
|
133
|
+
// without re-deriving it
|
|
134
|
+
tex.userData.mipCount = depth;
|
|
135
|
+
|
|
99
136
|
return tex;
|
|
100
137
|
}
|
|
@@ -4,7 +4,7 @@ import Signal from "../../../core/events/signal/Signal.js";
|
|
|
4
4
|
* Representation of an input device key/button
|
|
5
5
|
*
|
|
6
6
|
* @author Alex Goldring
|
|
7
|
-
* @copyright Company Named Limited (c)
|
|
7
|
+
* @copyright Company Named Limited (c) 2026
|
|
8
8
|
*/
|
|
9
9
|
export class InputDeviceSwitch {
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@ const codeToKeyNameMap = [];
|
|
|
17
17
|
* For example, if you hold "A" and click over into another application window - A will be forcibly released with appropriate signal.
|
|
18
18
|
*
|
|
19
19
|
* @author Alex Goldring
|
|
20
|
-
* @copyright Company Named Limited (c)
|
|
20
|
+
* @copyright Company Named Limited (c) 2026
|
|
21
21
|
*/
|
|
22
22
|
class KeyboardDevice {
|
|
23
23
|
|
|
@@ -228,7 +228,7 @@ export function readPositionFromMouseEvent(result, event, source = event.target)
|
|
|
228
228
|
* Abstracts Mouse and Touch interfaces as single "pointer" device.
|
|
229
229
|
*
|
|
230
230
|
* @author Alex Goldring
|
|
231
|
-
* @copyright Company Named Limited (c)
|
|
231
|
+
* @copyright Company Named Limited (c) 2026
|
|
232
232
|
*/
|
|
233
233
|
export class PointerDevice {
|
|
234
234
|
|
|
@@ -7,7 +7,7 @@ import { BehaviorStatus } from "./BehaviorStatus.js";
|
|
|
7
7
|
* @see https://en.wikipedia.org/wiki/Behavior_tree_(artificial_intelligence,_robotics_and_control)
|
|
8
8
|
* @template CTX
|
|
9
9
|
* @author Alex Goldring
|
|
10
|
-
* @copyright Company Named Limited (c)
|
|
10
|
+
* @copyright Company Named Limited (c) 2026
|
|
11
11
|
*/
|
|
12
12
|
export class Behavior {
|
|
13
13
|
|