@woosh/meep-engine 2.56.1 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/Editor.js +4 -4
- package/editor/ecs/component/editors/ColorEditor.js +1 -1
- package/editor/ecs/component/editors/ImagePathEditor.js +2 -2
- package/editor/ecs/component/editors/{LargeStrongEditor.js → LargeStringEditor.js} +1 -1
- package/editor/process/symbolic/buildThreeJSHelperEntity.js +3 -3
- package/editor/process/symbolic/makeGridPositionSymbolDisplay.js +3 -3
- package/editor/process/symbolic/makePositionedIconDisplaySymbol.js +3 -3
- package/editor/tools/GridPaintTool.js +3 -3
- package/editor/tools/TopDownCameraControlTool.js +1 -1
- package/editor/tools/TransformTool.js +1 -1
- package/editor/tools/engine/Tool.js +9 -23
- package/editor/tools/engine/ToolEngine.js +5 -7
- package/editor/tools/paint/TerrainHeightPaintTool.js +2 -2
- package/editor/tools/paint/TerrainPaintTool.js +2 -2
- package/editor/tools/paint/TerrainTexturePaintTool.js +2 -2
- package/editor/tools/v2/prototypeTransformControls.js +3 -3
- package/editor/view/ecs/ComponentControlView.js +2 -1
- package/package.json +1 -1
- package/samples/generation/main.js +2 -2
- package/samples/terrain/from_image.js +2 -2
- package/samples/terrain/from_image_2.js +4 -4
- package/src/core/binary/byteArrayToString.js +28 -0
- package/src/core/binary/downloadAsFile.js +28 -0
- package/src/core/binary/downloadUrlAsFile.js +14 -0
- package/src/core/binary/jsonToStringToByteArray.js +27 -0
- package/src/core/binary/stringToByteArray.js +24 -0
- package/src/core/bvh2/BinaryNode.spec.js +2 -1
- package/src/core/bvh2/bvh3/query/compute_tight_near_far_clipping_planes.js +1 -1
- package/src/core/bvh2/traversal/ThreeClippingPlaneComputingBVHVisitor.js +1 -1
- package/src/core/bvh2/traversal/__process_point_if_within_planes.js +1 -1
- package/src/core/cache/LoadingCache.js +3 -2
- package/src/core/collection/array/arraySetSortingDiff.spec.js +12 -12
- package/src/core/collection/array/weightedRandomFromArray.js +2 -2
- package/src/core/color/Color.js +6 -6
- package/src/core/color/Color.spec.js +27 -1
- package/src/core/color/YCbCr/YCbCr.spec.js +16 -0
- package/src/core/color/{YCbCr_to_rgb_uint24.js → YCbCr/YCbCr_to_rgb_uint24.js} +6 -6
- package/src/core/color/YCbCr/rgb_to_YCbCr_uint24.js +16 -0
- package/src/core/color/{hex2rgb.js → hex/hex2rgb.js} +1 -1
- package/src/core/color/{rgb2hex.js → hex/rgb2hex.js} +1 -1
- package/src/core/color/{hsv2rgb.js → hsv/hsv2rgb.js} +3 -3
- package/src/core/color/hsv/rgb2hsv.js +49 -0
- package/src/core/color/{kelvin_to_rgb.js → kelvin/kelvin_to_rgb.js} +1 -1
- package/src/core/color/{kelvin_to_rgb.spec.js → kelvin/kelvin_to_rgb.spec.js} +2 -2
- package/src/core/color/{prototype_kelvin_to_rgb.js → kelvin/prototype_kelvin_to_rgb.js} +5 -5
- package/src/core/color/{rgb_to_kelvin.spec.js → kelvin/rgb_to_kelvin.spec.js} +1 -1
- package/src/core/color/{parseColor.js → parse_color.js} +5 -5
- package/src/core/color/parse_color.spec.js +18 -0
- package/src/core/color/rgb2uint24.js +3 -3
- package/src/core/color/sRGB/sRGB.spec.js +16 -0
- package/src/core/color/xyz/XYZ.spec.js +16 -0
- package/src/core/color/xyz/rgb_to_xyz.js +15 -0
- package/src/core/color/xyz/xyz_to_rgb.js +14 -0
- package/src/core/events/signal/Signal.js +5 -0
- package/src/core/events/signal/{signalAggregateByTimeWindow.js → signal_aggregate_by_time_window.js} +1 -1
- package/src/core/events/signal/{SignalUtils.js → signal_filter.js} +1 -2
- package/src/core/fsm/simple/SimpleStateMachine.spec.js +34 -2
- package/src/core/geom/2d/spline_bezier2_2d.js +26 -0
- package/src/core/geom/2d/spline_bezier2_2d.spec.js +16 -0
- package/src/core/geom/3d/SurfacePoint3.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_compute_plane_side.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_detailed_volume_intersection.js +1 -1
- package/src/core/geom/3d/aabb/aabb3_transformed_compute_plane_side.js +1 -1
- package/src/core/geom/3d/compute_circle_bounding_box.js +1 -1
- package/src/core/geom/3d/cone/computeConeBoundingBox.js +1 -1
- package/src/core/geom/3d/frustum/frustum3_computeNearestPointToPoint.js +1 -1
- package/src/core/geom/3d/line/line3_computeSegmentPointDistance_sqr.js +1 -1
- package/src/core/geom/3d/line/line3_compute_nearest_point_to_point.js +1 -1
- package/src/core/geom/3d/matrix/m4_multiply.js +2 -2
- package/src/core/geom/3d/matrix/m4_multiply.spec.js +11 -0
- package/src/core/geom/3d/matrix/m4_multiply_alphatensor.spec.js +11 -0
- package/src/core/geom/3d/morton/split_by_2.js +1 -1
- package/src/core/geom/3d/normal/hemioct/unit_hemioct.spec.js +1 -1
- package/src/core/geom/3d/normal/spherical/sphere_map_transform.js +1 -1
- package/src/core/geom/3d/plane/is_point_within_planes.js +1 -1
- package/src/core/geom/3d/plane/lerp_planes_to_array.js +1 -1
- package/src/core/geom/3d/plane/plane3_compute_convex_3_plane_intersection.js +1 -1
- package/src/core/geom/3d/plane/plane3_compute_line_segment_intersection.js +1 -1
- package/src/core/geom/3d/plane/plane3_compute_ray_intersection.js +1 -1
- package/src/core/geom/3d/plane/plane3_lerp.js +2 -2
- package/src/core/geom/3d/plane/plane3_projectPoint.js +1 -1
- package/src/core/geom/3d/plane/plane3_slerp.js +3 -3
- package/src/core/geom/3d/ray/ray_computeNearestPointToPoint.js +1 -1
- package/src/core/geom/3d/ray/ray_distance_to_point.js +1 -1
- package/src/core/geom/3d/shape/UnionShape3D.js +3 -3
- package/src/core/geom/3d/shape/UnitCubeShape3D.js +1 -1
- package/src/core/geom/3d/shape/UnitSphereShape3D.js +1 -1
- package/src/core/geom/3d/shape/util/shape_to_visual_entity.js +10 -10
- package/src/core/geom/3d/sphere/sphere_intersects_ray.js +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +6 -0
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.js +1 -1
- package/src/core/geom/3d/tetrahedra/compute_bounding_simplex_3d.spec.js +1 -1
- package/src/core/geom/3d/tetrahedra/compute_circumsphere.js +1 -1
- package/src/core/geom/3d/tetrahedra/delaunay/compute_delaunay_tetrahedral_mesh.js +1 -0
- package/src/core/geom/3d/tetrahedra/delaunay/compute_delaunay_tetrahedral_mesh.spec.js +10 -2
- package/src/core/geom/3d/tetrahedra/prototypeTetrahedraBuilder.js +2 -2
- package/src/core/geom/3d/topology/bounds/computeTriangleClusterNormalBoundingCone.js +1 -1
- package/src/core/geom/3d/topology/samples/sampleFloodFill.js +4 -4
- package/src/core/geom/3d/topology/simplify/compute_face_normal_change_dot_product.js +1 -1
- package/src/core/geom/3d/topology/simplify/quadratic/Quadratic3.js +1 -1
- package/src/core/geom/3d/topology/simplify/tm_edge_collapse_is_degenerate_flip.js +2 -2
- package/src/core/geom/3d/topology/struct/TopoVertex.js +1 -1
- package/src/core/geom/3d/topology/util/compute_face_connection_weight.js +2 -2
- package/src/core/geom/3d/triangle/computeTrianglePlaneSide.js +1 -1
- package/src/core/geom/3d/triangle/computeTriangleRayIntersection.js +1 -1
- package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentricEdge.js +1 -1
- package/src/core/geom/3d/v3_compute_triangle_normal.js +1 -1
- package/src/core/geom/Quaternion.js +1 -1
- package/src/core/geom/Vector3.js +7 -7
- package/src/core/geom/Vector3.spec.js +68 -1
- package/src/core/geom/mat2/m2_add.js +17 -0
- package/src/core/geom/mat2/m2_determinant.js +8 -0
- package/src/core/geom/mat2/m2_multiply.js +17 -0
- package/src/core/geom/mat2/m2_multiply_scalar.js +18 -0
- package/src/core/geom/mat2/m2_multiply_transposed.js +18 -0
- package/src/core/geom/mat2/m2_sub_transposed.js +17 -0
- package/src/{view → core/geom/mat3}/m3_cm_compose_transform.js +0 -29
- package/src/core/geom/mat3/m3_cm_extract_rotation.js +8 -0
- package/src/core/geom/mat3/m3_cm_from_translation.js +19 -0
- package/src/{view/multiplyMatrices3.js → core/geom/mat3/m3_multiply.js} +2 -2
- package/src/{view → core/geom/mat3}/m3_rm_compose_transform.js +0 -9
- package/src/core/geom/mat3/m3_rm_extract_scale.js +7 -0
- package/src/core/geom/{3d/vector/allocate_v3.js → vec3/v3_allocate.js} +1 -1
- package/src/core/geom/{v3_angle_between.js → vec3/v3_angle_between.js} +1 -1
- package/src/core/geom/vec3/v3_dot_array_array.js +20 -0
- package/src/core/geom/{v3_lerp.js → vec3/v3_lerp.js} +1 -1
- package/src/core/graph/SquareMatrix.js +26 -3
- package/src/core/graph/SquareMatrix.spec.js +52 -2
- package/src/core/math/clamp01.js +1 -0
- package/src/core/math/fract.js +3 -1
- package/src/core/math/inverseLerp.js +7 -5
- package/src/core/math/lerp.js +5 -5
- package/src/core/math/physics/spring/computeHookeForce.js +9 -0
- package/src/core/math/remap.js +19 -0
- package/src/core/math/remap.spec.js +15 -0
- package/src/core/math/smoothStep.spec.js +16 -0
- package/src/core/math/spline/spline_bezier2.js +13 -0
- package/src/core/math/spline/spline_bezier2.spec.js +13 -0
- package/src/core/model/object/compareValues.js +2 -2
- package/src/core/model/object/read_property.js +10 -2
- package/src/core/model/object/write_property.js +3 -23
- package/src/core/model/object/write_property.spec.js +26 -0
- package/src/core/primitives/numbers/number_pretty_print.spec.js +19 -0
- package/src/core/process/action/AsynchronousDelayAction.js +2 -2
- package/src/core/process/executor/profile/ConcurrentExecutorProfiler.js +1 -1
- package/src/engine/EngineHarness.js +7 -7
- package/src/engine/EntityCreator.js +5 -5
- package/src/engine/__module.js +1 -1
- package/src/engine/achievements/AchievementManager.js +2 -2
- package/src/engine/animation/AnimationUtils.js +4 -4
- package/src/engine/animation/behavior/animateProperty.js +2 -2
- package/src/engine/animation/curve/draw/build_plot_entity_from_array.js +3 -3
- package/src/engine/animation/playAnimationTrack.js +3 -3
- package/src/engine/animation/playTrackRealTime.js +3 -3
- package/src/engine/animation/removeEntityWithMeshParticlesEffect.js +2 -2
- package/src/engine/control/ControlContext.js +7 -7
- package/src/engine/ecs/{EntityBuilder.d.ts → Entity.d.ts} +5 -5
- package/src/engine/ecs/{EntityBuilder.js → Entity.js} +29 -29
- package/src/engine/ecs/{EntityBuilder.spec.js → Entity.spec.js} +17 -17
- package/src/engine/ecs/EntityBlueprint.d.ts +2 -2
- package/src/engine/ecs/EntityBlueprint.js +3 -3
- package/src/engine/ecs/EntityBlueprint.spec.js +2 -2
- package/src/engine/ecs/{EntityBuilderFlags.js → EntityFlags.js} +1 -1
- package/src/engine/ecs/EntityObserver.spec.js +8 -8
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +5 -5
- package/src/engine/ecs/foliage/ecs/InstancedMeshUtils.js +3 -3
- package/src/engine/ecs/gui/menu/radial/RadialContextMenu.d.ts +2 -2
- package/src/engine/ecs/gui/menu/radial/RadialContextMenu.js +5 -5
- package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +2 -2
- package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.js +2 -2
- package/src/engine/ecs/parent/EntityNode.d.ts +3 -3
- package/src/engine/ecs/parent/EntityNode.js +5 -5
- package/src/engine/ecs/parent/testHuDPerf.js +2 -2
- package/src/engine/ecs/speaker/VoiceSystem.js +5 -5
- package/src/engine/ecs/systems/SteeringSystem.js +1 -1
- package/src/engine/ecs/terrain/ecs/splat/SplatMapOptimizerDebugger.js +1 -1
- package/src/engine/ecs/tooltip/testTooltipComponentSystem.js +3 -3
- package/src/engine/graphics/camera/makeOrbitalCameraController.js +3 -3
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +3 -3
- package/src/engine/graphics/debug/createDebugLabel.js +3 -3
- package/src/engine/graphics/ecs/camera/Camera.js +1 -1
- package/src/engine/graphics/ecs/camera/CameraClippingPlaneComputer.js +1 -1
- package/src/engine/graphics/ecs/camera/filter/setup_filtered_camera_controller.js +3 -3
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +3 -11
- package/src/engine/graphics/ecs/decal/v2/prototypeDecalEditor.js +3 -3
- package/src/engine/graphics/ecs/decal/v2/prototypeDecalSystem.js +14 -14
- package/src/engine/graphics/ecs/highlight/Highlight.js +20 -102
- package/src/engine/graphics/ecs/mesh/Mesh.js +12 -18
- package/src/engine/graphics/ecs/mesh/MeshSystem.js +41 -26
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +1 -1
- package/src/engine/graphics/ecs/mesh-v2/aggregate/prototypeSGMesh.js +3 -3
- package/src/engine/graphics/ecs/mesh-v2/sample/prototypeShadedGeometry.js +5 -5
- package/src/engine/graphics/ecs/mesh-v2/sample/prototype_sg_raycast.js +6 -6
- package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.js +3 -3
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +3 -3
- package/src/engine/graphics/ecs/path/tube/build/TubePathBuilder.js +4 -4
- package/src/engine/graphics/ecs/path/tube/build/makeTubeGeometry.js +1 -1
- package/src/engine/graphics/ecs/path/tube/build/make_cap.js +3 -3
- package/src/engine/graphics/ecs/path/tube/build/make_ring_vertices.js +1 -1
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +3 -3
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +2 -2
- package/src/engine/graphics/ecs/sprite/prototypeSpriteSystem.js +2 -2
- package/src/engine/graphics/geometry/MikkT/InitTriInfo.js +5 -6
- package/src/engine/graphics/geometry/MikkT/MikkTSpace.js +3 -3
- package/src/engine/graphics/geometry/MikkT/NormalizeSafe.js +1 -2
- package/src/engine/graphics/geometry/MikkT/STSpace.js +3 -3
- package/src/engine/graphics/geometry/MikkT/v3_scale_dot_sub_normalize.js +2 -2
- package/src/engine/graphics/geometry/bvh/buffered/BVHGeometryRaycaster.js +1 -1
- package/src/engine/graphics/geometry/clipping/ClippedGeometry.js +1 -1
- package/src/engine/graphics/geometry/optimization/merge/prototypeGeometryMerge.js +4 -4
- package/src/engine/graphics/impostors/octahedral/prototypeBaker.js +7 -7
- package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.js +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +102 -95
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.spec.js +25 -0
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +0 -35
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.spec.js +39 -2
- package/src/engine/graphics/particles/particular/engine/renderers/billboard/prototypeBillboardRenderer.js +2 -2
- package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +22 -6
- package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.d.ts +2 -2
- package/src/engine/graphics/particles/particular/engine/utils/volume/ParticleVolume.js +3 -3
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +10 -10
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +2 -2
- package/src/engine/graphics/render/buffer/simple-fx/taa/prototypeTAA.js +2 -2
- package/src/engine/graphics/render/forward_plus/LightManager.js +1 -1
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +13 -13
- package/src/engine/graphics/render/forward_plus/prototype/prototypeLightManager.js +3 -3
- package/src/engine/graphics/render/forward_plus/query/detailed_sphere_frustum_intersection_test.js +1 -1
- package/src/engine/graphics/render/layers/RenderLayerUtils.js +1 -1
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +8 -7
- package/src/engine/graphics/sh3/LightProbeVolume.js +3 -3
- package/src/engine/graphics/sh3/path_tracer/PathTracer.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +2 -2
- package/src/engine/graphics/sh3/path_tracer/random_in_hemisphere.js +1 -1
- package/src/engine/graphics/sh3/path_tracer/ray_hit_apply_transform.js +1 -1
- package/src/engine/graphics/sh3/path_tracer/ray_reflect.js +1 -1
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +3 -3
- package/src/engine/graphics/sh3/sky/hosek/data.js +3744 -0
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.js +10 -3786
- package/src/engine/graphics/sh3/visualise_probe.js +3 -3
- package/src/engine/graphics/shadows/testShadowMapRendering.js +3 -3
- package/src/engine/graphics/texture/atlas/AbstractTextureAtlas.js +1 -1
- package/src/engine/graphics/texture/atlas/AtlasPatch.js +0 -1
- package/src/engine/graphics/texture/atlas/AtlasPatchFlag.js +8 -1
- package/src/engine/graphics/texture/atlas/CachingTextureAtlas.js +25 -0
- package/src/engine/graphics/texture/atlas/CachingTextureAtlas.spec.js +54 -0
- package/src/engine/graphics/texture/atlas/ManagedTextureAtlas.js +101 -160
- package/src/engine/graphics/texture/atlas/TextureAtlas.js +18 -1
- package/src/engine/graphics/texture/sampler/downloadSamplerAsPNG.js +1 -1
- package/src/engine/graphics/texture/sampler/sampler2d_ensure_uint8_RGBA.js +22 -0
- package/src/engine/graphics/texture/sprite/prototypeSpriteCutoutGeometry.js +2 -2
- package/src/engine/graphics/util/projectSphere.js +1 -1
- package/src/engine/input/ecs/controllers/KeyboardCameraController.js +2 -2
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +2 -2
- package/src/engine/intelligence/behavior/composite/ParallelBehavior.spec.js +13 -12
- package/src/engine/navigation/ecs/components/Path.js +1 -1
- package/src/engine/physics/fluid/prototype.js +3 -3
- package/src/engine/physics/mls-mpm/MLS_MPM.js +11 -106
- package/src/engine/reference/v2/Reference.js +6 -2
- package/src/engine/save/storage/JsonStringCodec.js +1 -1
- package/src/engine/save/storage/LocalStorage.js +2 -1
- package/src/engine/sound/ecs/emitter/SoundEmitter.js +7 -7
- package/src/engine/sound/ecs/emitter/SoundTrack.js +6 -6
- package/src/engine/ui/GUIEngine.js +4 -4
- package/src/engine/ui/notification/NotificationManager.js +3 -3
- package/src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js +1 -1
- package/src/generation/grid/generation/road/GridTaskGenerateRoads.js +2 -4
- package/src/generation/markers/debug/visualizeMarkers.js +2 -2
- package/src/generation/markers/prototypeGridCellActionPlaceMarker.js +2 -2
- package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.js +2 -2
- package/src/generation/theme/ThemeEngine.js +2 -2
- package/src/generation/theme/ThemeEngine.spec.js +7 -0
- package/src/view/View.js +21 -13
- package/src/view/elements/ColorPickerView.js +2 -2
- package/src/view/minimap/gl/MarkerGL.js +20 -18
- package/src/view/minimap/gl/MinimapMarkersGL.js +2 -1
- package/editor/tools/FoliagePaintTool.js +0 -168
- package/editor/tools/engine/ToolStateMachine.js +0 -53
- package/src/core/NumberFormat.js +0 -4
- package/src/core/binary/ByteArrayTools.js +0 -137
- package/src/core/binary/NaiveBitSet.js +0 -69
- package/src/core/binary/objects/StandardTypeBuilder.js +0 -126
- package/src/core/binary/serde/JsonSerializer.js +0 -113
- package/src/core/color/rgb2hsv.js +0 -47
- package/src/core/color/rgb_to_YCbCr_uint24.js +0 -16
- package/src/core/fsm/StateMachine.js +0 -440
- package/src/core/fsm/Transition.js +0 -65
- package/src/core/geom/Bezier.js +0 -24
- package/src/core/geom/Bezier.spec.js +0 -16
- package/src/core/math/spline/quadraticCurve.js +0 -11
- package/src/core/math/spline/quadraticCurve.spec.js +0 -13
- package/src/core/primitives/numbers/compareNumbers.js +0 -9
- package/src/engine/graphics/ecs/decal/Decal.js +0 -10
- package/src/engine/graphics/ecs/decal/DecalSystem.js +0 -99
- package/src/engine/graphics/ecs/decal/threejs/DecalGeometry.js +0 -298
- package/src/engine/graphics/ecs/trail/Trail.js +0 -83
- package/src/engine/graphics/ecs/trail/TrailMaterial.js +0 -67
- package/src/engine/graphics/ecs/trail/TrailMaterial2.js +0 -73
- package/src/engine/graphics/ecs/trail/TrailSystem.js +0 -162
- package/src/engine/graphics/ecs/water2/NodeWaterShader1.js +0 -213
- package/src/engine/graphics/ecs/water2/shader/JBWaterShader.js +0 -315
- package/src/engine/graphics/geometry/MikkT/Length.js +0 -10
- package/src/engine/graphics/texture/ImageLoader.js +0 -33
- package/src/engine/graphics/three/DDSLoader.js +0 -286
- package/src/engine/graphics/three/Water2.js +0 -343
- package/src/engine/physics/spring/computeHookeForce.js +0 -9
- package/src/engine/reference/v1/ReferenceManager.js +0 -124
- /package/src/core/color/{hex2rgb.spec.js → hex/hex2rgb.spec.js} +0 -0
- /package/src/core/color/{rgb2hex.spec.js → hex/rgb2hex.spec.js} +0 -0
- /package/src/core/color/{hsv2rgb.spec.js → hsv/hsv2rgb.spec.js} +0 -0
- /package/src/core/color/{rgb_to_kelvin.js → kelvin/rgb_to_kelvin.js} +0 -0
- /package/src/core/color/{linear_to_sRGB.js → sRGB/linear_to_sRGB.js} +0 -0
- /package/src/core/color/{sRGB_to_linear.js → sRGB/sRGB_to_linear.js} +0 -0
- /package/src/core/geom/{m3_determinant.js → mat3/m3_determinant.js} +0 -0
- /package/src/core/geom/{v3_distance.js → vec3/v3_distance.js} +0 -0
- /package/src/core/geom/{v3_distance_above_plane.js → vec3/v3_distance_above_plane.js} +0 -0
- /package/src/core/geom/{v3_distance_above_plane.spec.js → vec3/v3_distance_above_plane.spec.js} +0 -0
- /package/src/core/geom/{v3_distance_sqr.d.ts → vec3/v3_distance_sqr.d.ts} +0 -0
- /package/src/core/geom/{v3_distance_sqr.js → vec3/v3_distance_sqr.js} +0 -0
- /package/src/core/geom/{v3_dot.js → vec3/v3_dot.js} +0 -0
- /package/src/core/geom/{v3_length.js → vec3/v3_length.js} +0 -0
- /package/src/core/geom/{v3_length_sqr.js → vec3/v3_length_sqr.js} +0 -0
- /package/src/core/geom/{v3_slerp.js → vec3/v3_slerp.js} +0 -0
|
@@ -5,7 +5,7 @@ import { composeMatrix4 } from "../../../../../util/composeMatrix4.js";
|
|
|
5
5
|
import Quaternion from "../../../../../../../core/geom/Quaternion.js";
|
|
6
6
|
import { ParticleEmitter } from "../../emitter/ParticleEmitter.js";
|
|
7
7
|
import { Transform } from "../../../../../../ecs/transform/Transform.js";
|
|
8
|
-
import
|
|
8
|
+
import Entity from "../../../../../../ecs/Entity.js";
|
|
9
9
|
import { vec3 } from "gl-matrix";
|
|
10
10
|
import { AttributeValue } from "./AttributeValue.js";
|
|
11
11
|
import { PARTICULAR_PARTICLE_SPECIFICATION } from "../../emitter/PARTICULAR_PARTICLE_SPECIFICATION.js";
|
|
@@ -193,7 +193,7 @@ export class ParticleVolume {
|
|
|
193
193
|
*/
|
|
194
194
|
this.__sampling_function = SamplingFunctionKind.Random;
|
|
195
195
|
|
|
196
|
-
const eb = new
|
|
196
|
+
const eb = new Entity();
|
|
197
197
|
|
|
198
198
|
eb.add(this.__emitter)
|
|
199
199
|
.add(SerializationMetadata.Transient)
|
|
@@ -201,7 +201,7 @@ export class ParticleVolume {
|
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
203
|
*
|
|
204
|
-
* @type {
|
|
204
|
+
* @type {Entity}
|
|
205
205
|
*/
|
|
206
206
|
this.entity = eb;
|
|
207
207
|
|
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "../../../../../render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
32
32
|
import Vector2 from "../../../../../../../core/geom/Vector2.js";
|
|
33
33
|
import Vector3 from "../../../../../../../core/geom/Vector3.js";
|
|
34
|
-
import
|
|
34
|
+
import Entity from "../../../../../../ecs/Entity.js";
|
|
35
35
|
import { Transform } from "../../../../../../ecs/transform/Transform.js";
|
|
36
36
|
import Mesh from "../../../../../ecs/mesh/Mesh.js";
|
|
37
37
|
import { AABB3 } from "../../../../../../../core/geom/3d/aabb/AABB3.js";
|
|
@@ -211,7 +211,7 @@ function make_shape_vis_toggle(engine) {
|
|
|
211
211
|
const entities = TagSystem.find_entities_with_tag(SHAPE_VISUAL_ENTITY_TAG, ecd);
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
const builders = entities.map(e =>
|
|
214
|
+
const builders = entities.map(e => Entity.readFromDataset(e, ecd));
|
|
215
215
|
|
|
216
216
|
function toggle() {
|
|
217
217
|
if (builders.length <= 1) {
|
|
@@ -238,7 +238,7 @@ function make_shape_vis_toggle(engine) {
|
|
|
238
238
|
}
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
-
new
|
|
241
|
+
new Entity()
|
|
242
242
|
.add(GUIElement.fromView(buttonView))
|
|
243
243
|
.build(ecd);
|
|
244
244
|
|
|
@@ -259,11 +259,11 @@ function mat_from_aabb3(aabb3) {
|
|
|
259
259
|
*
|
|
260
260
|
* @param {string} url
|
|
261
261
|
* @param {EntityComponentDataset} ecd
|
|
262
|
-
* @returns {
|
|
262
|
+
* @returns {Entity}
|
|
263
263
|
*/
|
|
264
264
|
function load_model(url, ecd) {
|
|
265
265
|
|
|
266
|
-
const b = new
|
|
266
|
+
const b = new Entity();
|
|
267
267
|
b
|
|
268
268
|
.add(new Transform())
|
|
269
269
|
.add(Mesh.fromJSON({
|
|
@@ -917,7 +917,7 @@ async function main(engine) {
|
|
|
917
917
|
function make_box_editor(engine, transform = new Transform()) {
|
|
918
918
|
const controls = new TransformControls(engine.graphics.camera, engine.graphics.domElement);
|
|
919
919
|
|
|
920
|
-
const eb = new
|
|
920
|
+
const eb = new Entity();
|
|
921
921
|
const g_unit_cube = makeHelperBoxGeometry(1, 1, 1);
|
|
922
922
|
|
|
923
923
|
const ecd = engine.entityManager.dataset;
|
|
@@ -953,10 +953,10 @@ function make_box_editor(engine, transform = new Transform()) {
|
|
|
953
953
|
// make camera controller holder
|
|
954
954
|
const entity = TagSystem.find_entities_with_tag('CameraController', ecd)[0];
|
|
955
955
|
|
|
956
|
-
const camera_controls =
|
|
956
|
+
const camera_controls = Entity.readFromDataset(entity, ecd);
|
|
957
957
|
|
|
958
958
|
|
|
959
|
-
new
|
|
959
|
+
new Entity()
|
|
960
960
|
.add(r_controls)
|
|
961
961
|
.add(new Transform())
|
|
962
962
|
.add(new InputController([
|
|
@@ -1148,7 +1148,7 @@ function make_symbol_view({
|
|
|
1148
1148
|
const vp = new ViewportPosition();
|
|
1149
1149
|
vp.anchor.set(0.5, 1);
|
|
1150
1150
|
|
|
1151
|
-
const entity = new
|
|
1151
|
+
const entity = new Entity()
|
|
1152
1152
|
.add(GUIElement.fromView(symbol_view))
|
|
1153
1153
|
.add(new HeadsUpDisplay())
|
|
1154
1154
|
.add(vp)
|
|
@@ -1214,7 +1214,7 @@ async function make_demo_volume({
|
|
|
1214
1214
|
|
|
1215
1215
|
v.attributes.color.lookup = lut;
|
|
1216
1216
|
|
|
1217
|
-
new
|
|
1217
|
+
new Entity()
|
|
1218
1218
|
.add(BehaviorComponent.fromOne(RepeatBehavior.from(new ActionBehavior((time) => {
|
|
1219
1219
|
time_total += time;
|
|
1220
1220
|
|
|
@@ -44,7 +44,7 @@ import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
|
44
44
|
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
45
45
|
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
46
46
|
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
47
|
-
import
|
|
47
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
48
48
|
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
49
49
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
50
50
|
import { CopyShader } from "three/examples/jsm/shaders/CopyShader.js";
|
|
@@ -313,7 +313,7 @@ function main(engine) {
|
|
|
313
313
|
for (let i = 0; i < 10; i++) {
|
|
314
314
|
for (let j = 0; j < 10; j++) {
|
|
315
315
|
|
|
316
|
-
new
|
|
316
|
+
new Entity()
|
|
317
317
|
.add(Transform.fromJSON({
|
|
318
318
|
position: {
|
|
319
319
|
x: 60 + i * 10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EngineHarness } from "../../../../../EngineHarness.js";
|
|
2
|
-
import
|
|
2
|
+
import Entity from "../../../../../ecs/Entity.js";
|
|
3
3
|
import { Transform } from "../../../../../ecs/transform/Transform.js";
|
|
4
4
|
import { ShadedGeometry } from "../../../../ecs/mesh-v2/ShadedGeometry.js";
|
|
5
5
|
import { BoxBufferGeometry, MeshStandardMaterial } from "three";
|
|
@@ -29,7 +29,7 @@ async function main(engine) {
|
|
|
29
29
|
|
|
30
30
|
for (let i = 0; i < 5; i++) {
|
|
31
31
|
for (let j = 0; j < 5; j++) {
|
|
32
|
-
const entityBuilder = new
|
|
32
|
+
const entityBuilder = new Entity();
|
|
33
33
|
|
|
34
34
|
if (random() > 0.5) {
|
|
35
35
|
entityBuilder.add(Highlight.fromOne(random(), random(), random()));
|
|
@@ -37,7 +37,7 @@ import { writeSample2DDataToDataTexture } from "../../texture/sampler/writeSampl
|
|
|
37
37
|
import { Decal } from "./model/Decal.js";
|
|
38
38
|
import { ReferencedTextureAtlas } from "../../texture/atlas/ReferencedTextureAtlas.js";
|
|
39
39
|
import { v3_morton_encode_transformed } from "../../../../core/geom/3d/morton/v3_morton_encode_transformed.js";
|
|
40
|
-
import { v3_distance } from "../../../../core/geom/v3_distance.js";
|
|
40
|
+
import { v3_distance } from "../../../../core/geom/vec3/v3_distance.js";
|
|
41
41
|
import { array_copy } from "../../../../core/collection/array/array_copy.js";
|
|
42
42
|
import { arrayQuickSort } from "../../../../core/collection/array/arrayQuickSort.js";
|
|
43
43
|
import { frustum_from_camera } from "../../ecs/camera/frustum_from_camera.js";
|
|
@@ -54,7 +54,7 @@ import { makeEngineOptionsModel } from "../../../../../../../model/game/options/
|
|
|
54
54
|
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
55
55
|
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
56
56
|
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
57
|
-
import
|
|
57
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
58
58
|
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
59
59
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
60
60
|
import { ForwardPlusRenderingPlugin } from "./ForwardPlusRenderingPlugin.js";
|
|
@@ -62,7 +62,7 @@ import { OrbitingBehavior } from "../../../../../../../model/game/util/behavior/
|
|
|
62
62
|
import { BehaviorComponent } from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
63
63
|
import { Light } from "../../../ecs/light/Light.js";
|
|
64
64
|
import { LightType } from "../../../ecs/light/LightType.js";
|
|
65
|
-
import {
|
|
65
|
+
import { parse_color } from "../../../../../core/color/parse_color.js";
|
|
66
66
|
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
67
67
|
import { makeHelperSphereGeometry } from "../../../../../../editor/process/symbolic/makeHelperSphereGeometry.js";
|
|
68
68
|
import TopDownCameraController from "../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
@@ -197,7 +197,7 @@ function makeLight(position, radius, color, intensity = 1) {
|
|
|
197
197
|
light.color.fromUint(color);
|
|
198
198
|
} else {
|
|
199
199
|
|
|
200
|
-
const c =
|
|
200
|
+
const c = parse_color(color);
|
|
201
201
|
|
|
202
202
|
light.color.setRGB(c[0] / 255, c[1] / 255, c[2] / 255);
|
|
203
203
|
}
|
|
@@ -230,7 +230,7 @@ function makeLight(position, radius, color, intensity = 1) {
|
|
|
230
230
|
const renderable = new Renderable(visual_group);
|
|
231
231
|
renderable.matrixAutoUpdate = true;
|
|
232
232
|
|
|
233
|
-
return new
|
|
233
|
+
return new Entity()
|
|
234
234
|
.add(Transform.fromJSON({
|
|
235
235
|
position: {
|
|
236
236
|
x: position[0],
|
|
@@ -260,7 +260,7 @@ function setup_scene_0(engine, ecd) {
|
|
|
260
260
|
key_light_transform.position.set(10, 10, 0);
|
|
261
261
|
key_light_transform.lookAt(new Vector3(0, 0, 0));
|
|
262
262
|
|
|
263
|
-
new
|
|
263
|
+
new Entity()
|
|
264
264
|
.add(light_key)
|
|
265
265
|
.add(key_light_transform)
|
|
266
266
|
.build(ecd);
|
|
@@ -350,7 +350,7 @@ function setup_scene_0(engine, ecd) {
|
|
|
350
350
|
.build(ecd);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
new
|
|
353
|
+
new Entity()
|
|
354
354
|
.add(ParticleEmitter.fromJSON({
|
|
355
355
|
"parameters": [
|
|
356
356
|
{
|
|
@@ -515,7 +515,7 @@ function setup_scene_0(engine, ecd) {
|
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
|
|
518
|
-
new
|
|
518
|
+
new Entity()
|
|
519
519
|
.add(Transform.fromJSON({
|
|
520
520
|
position: offset,
|
|
521
521
|
scale: {
|
|
@@ -563,7 +563,7 @@ function setup_scene_3(engine, ecd) {
|
|
|
563
563
|
fill_light_transform.position.set(40, 15, 30);
|
|
564
564
|
fill_light_transform.lookAt(new Vector3(30, 0, 20));
|
|
565
565
|
|
|
566
|
-
new
|
|
566
|
+
new Entity()
|
|
567
567
|
.add(light_fill)
|
|
568
568
|
.add(fill_light_transform)
|
|
569
569
|
.build(ecd);
|
|
@@ -662,7 +662,7 @@ function setup_scene_3(engine, ecd) {
|
|
|
662
662
|
.build(ecd);
|
|
663
663
|
}
|
|
664
664
|
|
|
665
|
-
new
|
|
665
|
+
new Entity()
|
|
666
666
|
.add(ParticleEmitter.fromJSON({
|
|
667
667
|
"parameters": [
|
|
668
668
|
{
|
|
@@ -836,7 +836,7 @@ function setup_scene_3(engine, ecd) {
|
|
|
836
836
|
}
|
|
837
837
|
|
|
838
838
|
|
|
839
|
-
new
|
|
839
|
+
new Entity()
|
|
840
840
|
.add(Transform.fromJSON({
|
|
841
841
|
position: offset,
|
|
842
842
|
scale: {
|
|
@@ -877,7 +877,7 @@ function setup_scene_3(engine, ecd) {
|
|
|
877
877
|
continue;
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
-
new
|
|
880
|
+
new Entity()
|
|
881
881
|
.add(Transform.fromJSON({
|
|
882
882
|
position: p,
|
|
883
883
|
scale: {
|
|
@@ -983,7 +983,7 @@ function setup_scene_2(engine, ecd) {
|
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
|
|
986
|
-
new
|
|
986
|
+
new Entity()
|
|
987
987
|
.add(Transform.fromJSON({
|
|
988
988
|
position: offset,
|
|
989
989
|
scale: {
|
|
@@ -1095,7 +1095,7 @@ function makeKnot(engine, position, scale, rotation) {
|
|
|
1095
1095
|
|
|
1096
1096
|
transform.scale.multiplyScalar(scale);
|
|
1097
1097
|
|
|
1098
|
-
return new
|
|
1098
|
+
return new Entity()
|
|
1099
1099
|
.add(new Renderable(mesh))
|
|
1100
1100
|
.add(transform);
|
|
1101
1101
|
}
|
|
@@ -25,7 +25,7 @@ import { MouseEvents } from "../../../../input/devices/events/MouseEvents.js";
|
|
|
25
25
|
import { RingBuffer } from "../../../../../core/collection/RingBuffer.js";
|
|
26
26
|
import { query_bvh_frustum_from_objects } from "../query/query_bvh_frustum_from_objects.js";
|
|
27
27
|
import { FPlusDebugMaterial } from "../materials/FPlusDebugMaterial.js";
|
|
28
|
-
import {
|
|
28
|
+
import { parse_color } from "../../../../../core/color/parse_color.js";
|
|
29
29
|
import { buildLightClusterWidget } from "../debug/buildLightClusterWidget.js";
|
|
30
30
|
import domify from "../../../../../view/DOM.js";
|
|
31
31
|
import { createScreenGrid } from "../debug/createScreenGrid.js";
|
|
@@ -237,7 +237,7 @@ function addSpotLight(position, direction, color, distance = 1, angle = 1, penum
|
|
|
237
237
|
light.color.fromUint(color);
|
|
238
238
|
} else {
|
|
239
239
|
|
|
240
|
-
const c =
|
|
240
|
+
const c = parse_color(color);
|
|
241
241
|
|
|
242
242
|
light.color.setRGB(c[0] / 255, c[1] / 255, c[2] / 255);
|
|
243
243
|
}
|
|
@@ -281,7 +281,7 @@ function addPointLight({
|
|
|
281
281
|
light.color.fromUint(color);
|
|
282
282
|
} else {
|
|
283
283
|
|
|
284
|
-
const c =
|
|
284
|
+
const c = parse_color(color);
|
|
285
285
|
|
|
286
286
|
light.color.setRGB(c[0] / 255, c[1] / 255, c[2] / 255);
|
|
287
287
|
}
|
package/src/engine/graphics/render/forward_plus/query/detailed_sphere_frustum_intersection_test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v3_distance_sqr } from "../../../../../core/geom/v3_distance_sqr.js";
|
|
1
|
+
import { v3_distance_sqr } from "../../../../../core/geom/vec3/v3_distance_sqr.js";
|
|
2
2
|
import { biplanar_edge_mapping, triplanar_corner_mapping } from "./cube_mapping.js";
|
|
3
3
|
import {
|
|
4
4
|
line3_computeSegmentPointDistance_sqr
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v3_distance_above_plane } from "../../../../core/geom/v3_distance_above_plane.js";
|
|
1
|
+
import { v3_distance_above_plane } from "../../../../core/geom/vec3/v3_distance_above_plane.js";
|
|
2
2
|
import {
|
|
3
3
|
plane3_three_compute_convex_3_plane_intersection
|
|
4
4
|
} from "../../../../core/geom/3d/plane/plane3_three_compute_convex_3_plane_intersection.js";
|
|
@@ -43,7 +43,7 @@ import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
|
43
43
|
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
44
44
|
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
45
45
|
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
46
|
-
import
|
|
46
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
47
47
|
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
48
48
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
49
49
|
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
@@ -67,6 +67,7 @@ import { mat4 } from "gl-matrix";
|
|
|
67
67
|
import { randomFloatBetween } from "../../../../../core/math/random/randomFloatBetween.js";
|
|
68
68
|
import { load_and_set_cubemap_v0 } from "../../../load_and_set_cubemap_v0.js";
|
|
69
69
|
import { number_pretty_print } from "../../../../../core/primitives/numbers/number_pretty_print.js";
|
|
70
|
+
import { AABB3 } from "../../../../../core/geom/3d/aabb/AABB3.js";
|
|
70
71
|
|
|
71
72
|
const engineHarness = new EngineHarness();
|
|
72
73
|
|
|
@@ -206,7 +207,7 @@ function prepare_query_test(hiz, graphics, ecd) {
|
|
|
206
207
|
|
|
207
208
|
/**
|
|
208
209
|
*
|
|
209
|
-
* @type {
|
|
210
|
+
* @type {Entity[]}
|
|
210
211
|
*/
|
|
211
212
|
const entities = [];
|
|
212
213
|
const labels = [];
|
|
@@ -222,7 +223,7 @@ function prepare_query_test(hiz, graphics, ecd) {
|
|
|
222
223
|
|
|
223
224
|
mat4.copy(projection, world_inverse);
|
|
224
225
|
mat4.multiply(projection, camera_projection, projection);
|
|
225
|
-
const aabb = new
|
|
226
|
+
const aabb = new AABB3();
|
|
226
227
|
|
|
227
228
|
const query_size = query.getSize();
|
|
228
229
|
|
|
@@ -238,7 +239,7 @@ function prepare_query_test(hiz, graphics, ecd) {
|
|
|
238
239
|
*/
|
|
239
240
|
const mesh = entity.getComponent(Mesh);
|
|
240
241
|
|
|
241
|
-
mesh.
|
|
242
|
+
mesh.getBoundingBox(aabb);
|
|
242
243
|
|
|
243
244
|
query.setElement(i, aabb, projection);
|
|
244
245
|
}
|
|
@@ -261,7 +262,7 @@ function prepare_query_test(hiz, graphics, ecd) {
|
|
|
261
262
|
|
|
262
263
|
labels[i] = v;
|
|
263
264
|
|
|
264
|
-
const entityBuilder = new
|
|
265
|
+
const entityBuilder = new Entity();
|
|
265
266
|
|
|
266
267
|
entities[i] = entityBuilder;
|
|
267
268
|
|
|
@@ -326,7 +327,7 @@ function prepare_query_test(hiz, graphics, ecd) {
|
|
|
326
327
|
});
|
|
327
328
|
|
|
328
329
|
|
|
329
|
-
new
|
|
330
|
+
new Entity()
|
|
330
331
|
.add(ViewportPosition.fromJSON({
|
|
331
332
|
offset: new Vector2(10, 276)
|
|
332
333
|
}))
|
|
@@ -425,7 +426,7 @@ function main(engine) {
|
|
|
425
426
|
|
|
426
427
|
prepare_query_test(hiz, graphics, ecd);
|
|
427
428
|
|
|
428
|
-
new
|
|
429
|
+
new Entity()
|
|
429
430
|
.add(ViewportPosition.fromJSON({
|
|
430
431
|
offset: new Vector2(10, 10)
|
|
431
432
|
}))
|
|
@@ -6,7 +6,7 @@ import { visualise_probe } from "./visualise_probe.js";
|
|
|
6
6
|
import {
|
|
7
7
|
build_tetrahedral_mesh_buffer_geometry
|
|
8
8
|
} from "../../../core/geom/3d/tetrahedra/build_tetrahedral_mesh_buffer_geometry.js";
|
|
9
|
-
import
|
|
9
|
+
import Entity from "../../ecs/Entity.js";
|
|
10
10
|
import { ShadedGeometry } from "../ecs/mesh-v2/ShadedGeometry.js";
|
|
11
11
|
import {
|
|
12
12
|
CubeCamera,
|
|
@@ -27,7 +27,7 @@ import { ThreeLightCache } from "../ecs/light/three/ThreeLightCache.js";
|
|
|
27
27
|
import { applyTransformToThreeObject } from "../ecs/mesh/applyTransformToThreeObject.js";
|
|
28
28
|
import { build_three_object } from "../ecs/mesh-v2/build_three_object.js";
|
|
29
29
|
import { ShadedGeometryFlags } from "../ecs/mesh-v2/ShadedGeometryFlags.js";
|
|
30
|
-
import { v3_length_sqr } from "../../../core/geom/v3_length_sqr.js";
|
|
30
|
+
import { v3_length_sqr } from "../../../core/geom/vec3/v3_length_sqr.js";
|
|
31
31
|
import { sh3_dering_optimize_positive } from "../../../core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js";
|
|
32
32
|
import { sh3_basis_at } from "../../../core/geom/3d/sphere/harmonics/sh3_basis_at.js";
|
|
33
33
|
|
|
@@ -571,7 +571,7 @@ export class LightProbeVolume {
|
|
|
571
571
|
sg.clearFlag(ShadedGeometryFlags.CastShadow);
|
|
572
572
|
sg.clearFlag(ShadedGeometryFlags.ReceiveShadow);
|
|
573
573
|
|
|
574
|
-
new
|
|
574
|
+
new Entity()
|
|
575
575
|
.add(sg)
|
|
576
576
|
.add(new Transform())
|
|
577
577
|
.build(ecd);
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
sRGBEncoding,
|
|
20
20
|
UnsignedByteType
|
|
21
21
|
} from "three";
|
|
22
|
-
import { linear_to_sRGB } from "../../../../core/color/linear_to_sRGB.js";
|
|
22
|
+
import { linear_to_sRGB } from "../../../../core/color/sRGB/linear_to_sRGB.js";
|
|
23
23
|
import { sample_triangle_attribute } from "./sample_triangle_attribute.js";
|
|
24
24
|
import { vec3_uint8_to_float } from "./vec3_uint8_to_float.js";
|
|
25
25
|
import { apply_texture_clamping_to_coordinate } from "./apply_texture_clamping_to_coordinate.js";
|
|
26
26
|
import { ebvh_sort_for_traversal_depth_first } from "../../../../core/bvh2/bvh3/ebvh_sort_for_traversal_depth_first.js";
|
|
27
|
-
import { v3_dot } from "../../../../core/geom/v3_dot.js";
|
|
27
|
+
import { v3_dot } from "../../../../core/geom/vec3/v3_dot.js";
|
|
28
28
|
import { make_one_vector3 } from "./make_one_vector3.js";
|
|
29
29
|
import { transform_normal_m4 } from "./ray_hit_apply_transform.js";
|
|
30
30
|
import { ray3_array_compose } from "../../../../core/geom/3d/ray/ray3_array_compose.js";
|
|
@@ -20,7 +20,7 @@ import Vector3 from "../../../../core/geom/Vector3.js";
|
|
|
20
20
|
import { sampler2d_scale } from "../../texture/sampler/resize/sampler2d_scale.js";
|
|
21
21
|
import { seededRandom } from "../../../../core/math/random/seededRandom.js";
|
|
22
22
|
import { mat4, vec3 } from "gl-matrix";
|
|
23
|
-
import { v3_distance } from "../../../../core/geom/v3_distance.js";
|
|
23
|
+
import { v3_distance } from "../../../../core/geom/vec3/v3_distance.js";
|
|
24
24
|
import ConcurrentExecutor from "../../../../core/process/executor/ConcurrentExecutor.js";
|
|
25
25
|
import Task from "../../../../core/process/task/Task.js";
|
|
26
26
|
import { TaskSignal } from "../../../../core/process/task/TaskSignal.js";
|
|
@@ -36,7 +36,7 @@ import { Color } from "../../../../core/color/Color.js";
|
|
|
36
36
|
import { min2 } from "../../../../core/math/min2.js";
|
|
37
37
|
import { makeGeometryIndexed } from "../../geometry/buffered/makeGeometryIndexed.js";
|
|
38
38
|
import { DirectionalLight } from "../../render/forward_plus/model/DirectionalLight.js";
|
|
39
|
-
import { kelvin_to_rgb } from "../../../../core/color/kelvin_to_rgb.js";
|
|
39
|
+
import { kelvin_to_rgb } from "../../../../core/color/kelvin/kelvin_to_rgb.js";
|
|
40
40
|
import { number_pretty_print } from "../../../../core/primitives/numbers/number_pretty_print.js";
|
|
41
41
|
|
|
42
42
|
document.body.style.margin = 0;
|
|
@@ -3,7 +3,7 @@ import { seededRandom } from "../../../core/math/random/seededRandom.js";
|
|
|
3
3
|
import { ShadedGeometrySystem } from "../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
4
4
|
import { GizmoRenderingPlugin } from "../render/gizmo/GizmoRenderingPlugin.js";
|
|
5
5
|
import { LightProbeVolume } from "./LightProbeVolume.js";
|
|
6
|
-
import
|
|
6
|
+
import Entity from "../../ecs/Entity.js";
|
|
7
7
|
import { ShadedGeometry } from "../ecs/mesh-v2/ShadedGeometry.js";
|
|
8
8
|
import {
|
|
9
9
|
ClampToEdgeWrapping,
|
|
@@ -123,7 +123,7 @@ function make_plane({
|
|
|
123
123
|
sg.writeFlag(ShadedGeometryFlags.CastShadow, shadow);
|
|
124
124
|
sg.writeFlag(ShadedGeometryFlags.ReceiveShadow, shadow);
|
|
125
125
|
|
|
126
|
-
return new
|
|
126
|
+
return new Entity()
|
|
127
127
|
.add(sg)
|
|
128
128
|
.add(t1);
|
|
129
129
|
|
|
@@ -320,7 +320,7 @@ async function main(engine) {
|
|
|
320
320
|
|
|
321
321
|
for (let i = 0; i < 16; i++) {
|
|
322
322
|
|
|
323
|
-
new
|
|
323
|
+
new Entity()
|
|
324
324
|
.add(Transform.fromJSON({
|
|
325
325
|
position: {
|
|
326
326
|
x: randomFloatBetween(random, mesh_asset.boundingBox.x0, mesh_asset.boundingBox.x1),
|