@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
|
@@ -4,7 +4,7 @@ import { aabb3_corner_edge_mapping } from "./aabb3_corner_edge_mapping.js";
|
|
|
4
4
|
import { aabb3_edge_corner_mapping } from "./aabb3_edge_corner_mapping.js";
|
|
5
5
|
import { plane3_compute_convex_3_plane_intersection } from "../plane/plane3_compute_convex_3_plane_intersection.js";
|
|
6
6
|
import { is_point_within_planes } from "../plane/is_point_within_planes.js";
|
|
7
|
-
import { v3_distance_above_plane } from "../../v3_distance_above_plane.js";
|
|
7
|
+
import { v3_distance_above_plane } from "../../vec3/v3_distance_above_plane.js";
|
|
8
8
|
import { EPSILON } from "../../../math/EPSILON.js";
|
|
9
9
|
import { plane3_compute_line_segment_intersection } from "../plane/plane3_compute_line_segment_intersection.js";
|
|
10
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { aabb3_build_corners } from "./aabb3_build_corners.js";
|
|
2
2
|
import { aabb3_matrix4_project_by_corners } from "./aabb3_matrix4_project_by_corners.js";
|
|
3
|
-
import { v3_distance_above_plane } from "../../v3_distance_above_plane.js";
|
|
3
|
+
import { v3_distance_above_plane } from "../../vec3/v3_distance_above_plane.js";
|
|
4
4
|
|
|
5
5
|
const scratch_corners = new Float32Array(24);
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { max2 } from "../../../math/max2.js";
|
|
2
2
|
import { min2 } from "../../../math/min2.js";
|
|
3
|
-
import { v3_angle_between } from "../../v3_angle_between.js";
|
|
3
|
+
import { v3_angle_between } from "../../vec3/v3_angle_between.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* NOTE: used stackoverflow answer as a basis for circle part: https://stackoverflow.com/questions/2592011/bounding-boxes-for-circle-and-arcs-in-3d
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Vector3 from "../../Vector3.js";
|
|
2
2
|
import { plane3_projectPoint } from "../plane/plane3_projectPoint.js";
|
|
3
3
|
import { ray_computeNearestPointToPoint } from "../ray/ray_computeNearestPointToPoint.js";
|
|
4
|
-
import { v3_distance_above_plane } from "../../v3_distance_above_plane.js";
|
|
4
|
+
import { v3_distance_above_plane } from "../../vec3/v3_distance_above_plane.js";
|
|
5
5
|
import {
|
|
6
6
|
plane3_three_compute_convex_3_plane_intersection
|
|
7
7
|
} from "../plane/plane3_three_compute_convex_3_plane_intersection.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {MATRIX_4_IDENTITY} from "./MATRIX_4_IDENTITY.js";
|
|
2
|
+
import {m4_multiply} from "./m4_multiply.js";
|
|
3
|
+
|
|
4
|
+
test("identity multiplication", () => {
|
|
5
|
+
|
|
6
|
+
const result = [];
|
|
7
|
+
|
|
8
|
+
m4_multiply(result, MATRIX_4_IDENTITY, MATRIX_4_IDENTITY);
|
|
9
|
+
|
|
10
|
+
expect(result).toEqual(MATRIX_4_IDENTITY);
|
|
11
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {m4_multiply_alphatensor} from "./m4_multiply_alphatensor.js";
|
|
2
|
+
import {MATRIX_4_IDENTITY} from "./MATRIX_4_IDENTITY.js";
|
|
3
|
+
|
|
4
|
+
test("identity multiplication", () => {
|
|
5
|
+
|
|
6
|
+
const result = [];
|
|
7
|
+
|
|
8
|
+
m4_multiply_alphatensor(result, MATRIX_4_IDENTITY, MATRIX_4_IDENTITY);
|
|
9
|
+
|
|
10
|
+
expect(result).toEqual(MATRIX_4_IDENTITY);
|
|
11
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* method to separate bits from a given integer 2 positions apart
|
|
3
3
|
*
|
|
4
|
-
* @example when input is ABC, output bits are
|
|
4
|
+
* @example when input is ABC, output bits are A0B0C
|
|
5
5
|
* @see https://github.com/Forceflow/libmorton/blob/234a443ca8e2c64f6385f1a9d6ee10a70d08a3fa/include/libmorton/morton2D.h#L99
|
|
6
6
|
* @param {number} a
|
|
7
7
|
* @returns {number}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { encode_unit_to_hemioct } from "./encode_unit3_hemioct.js";
|
|
2
|
-
import { v3_length } from "../../../v3_length.js";
|
|
2
|
+
import { v3_length } from "../../../vec3/v3_length.js";
|
|
3
3
|
import { decode_hemioct_to_unit } from "./decode_hemioct_to_unit.js";
|
|
4
4
|
|
|
5
5
|
test('encode-decode', () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { lerp } from "../../../math/lerp.js";
|
|
2
2
|
import Vector3 from "../../Vector3.js";
|
|
3
3
|
import { plane3_intersect_plane } from "./plane3_intersect_plane.js";
|
|
4
|
-
import { v3_dot } from "../../v3_dot.js";
|
|
5
|
-
import { v3_length } from "../../v3_length.js";
|
|
4
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
5
|
+
import { v3_length } from "../../vec3/v3_length.js";
|
|
6
6
|
|
|
7
7
|
const v0 = new Vector3();
|
|
8
8
|
const v1 = new Vector3();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { lerp } from "../../../math/lerp.js";
|
|
2
2
|
import Vector3 from "../../Vector3.js";
|
|
3
|
-
import { v3_dot } from "../../v3_dot.js";
|
|
4
|
-
import { v3_length_sqr } from "../../v3_length_sqr.js";
|
|
5
|
-
import { v3_slerp } from "../../v3_slerp.js";
|
|
3
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
4
|
+
import { v3_length_sqr } from "../../vec3/v3_length_sqr.js";
|
|
5
|
+
import { v3_slerp } from "../../vec3/v3_slerp.js";
|
|
6
6
|
import { EPSILON } from "../../../math/EPSILON.js";
|
|
7
7
|
|
|
8
8
|
const e = new Vector3();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
2
2
|
import { seededRandom } from "../../../math/random/seededRandom.js";
|
|
3
3
|
import { binarySearchHighIndex } from "../../../collection/array/binarySearchHighIndex.js";
|
|
4
|
-
import { compareNumbers } from "../../../primitives/numbers/compareNumbers.js";
|
|
5
4
|
import { min2 } from "../../../math/min2.js";
|
|
6
5
|
import { compute_signed_distance_gradient_by_sampling } from "./util/compute_signed_distance_gradient_by_sampling.js";
|
|
7
6
|
import { isArrayEqual } from "../../../collection/array/isArrayEqual.js";
|
|
8
7
|
import { max2 } from "../../../math/max2.js";
|
|
8
|
+
import { number_compare_ascending } from "../../../primitives/numbers/number_compare_ascending.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* To avoid severe performance overhead, we limit number of possible rejections
|
|
@@ -128,7 +128,7 @@ export class UnionShape3D extends AbstractShape3D {
|
|
|
128
128
|
const target_weight = random() * child_volume_sum;
|
|
129
129
|
|
|
130
130
|
// weighted search for a sample candidate, preferring larger volumes, resulting in more uniform sample distribution
|
|
131
|
-
const target_child_index = binarySearchHighIndex(child_volume_sums, target_weight,
|
|
131
|
+
const target_child_index = binarySearchHighIndex(child_volume_sums, target_weight, number_compare_ascending, 0, child_count - 1);
|
|
132
132
|
|
|
133
133
|
const child_0 = children[target_child_index];
|
|
134
134
|
|
|
@@ -248,7 +248,7 @@ export class UnionShape3D extends AbstractShape3D {
|
|
|
248
248
|
const target_weight = random() * this.__volume_sum;
|
|
249
249
|
|
|
250
250
|
// weighted search for a sample candidate, preferring larger volumes, resulting in more uniform sample distribution
|
|
251
|
-
const target_child_index = binarySearchHighIndex(this.__volume_sums, target_weight,
|
|
251
|
+
const target_child_index = binarySearchHighIndex(this.__volume_sums, target_weight, number_compare_ascending, 0, child_count - 1);
|
|
252
252
|
|
|
253
253
|
const child = children[target_child_index];
|
|
254
254
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
2
2
|
import { randomPointInBox } from "../../random/randomPointInBox.js";
|
|
3
|
-
import { v3_length } from "../../v3_length.js";
|
|
3
|
+
import { v3_length } from "../../vec3/v3_length.js";
|
|
4
4
|
import { max2 } from "../../../math/max2.js";
|
|
5
5
|
import { max3 } from "../../../math/max3.js";
|
|
6
6
|
import { min2 } from "../../../math/min2.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
2
2
|
import { randomPointInSphere } from "../../random/randomPointInSphere.js";
|
|
3
|
-
import { v3_length } from "../../v3_length.js";
|
|
3
|
+
import { v3_length } from "../../vec3/v3_length.js";
|
|
4
4
|
import { compute_signed_distance_gradient_by_sampling } from "./util/compute_signed_distance_gradient_by_sampling.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -2,7 +2,7 @@ import { UnionShape3D } from "../UnionShape3D.js";
|
|
|
2
2
|
import { UnitCubeShape3D } from "../UnitCubeShape3D.js";
|
|
3
3
|
import { UnitSphereShape3D } from "../UnitSphereShape3D.js";
|
|
4
4
|
import { TransformedShape3D } from "../TransformedShape3D.js";
|
|
5
|
-
import
|
|
5
|
+
import Entity from "../../../../../engine/ecs/Entity.js";
|
|
6
6
|
import { Transform } from "../../../../../engine/ecs/transform/Transform.js";
|
|
7
7
|
import { AttachmentSockets } from "../../../../../engine/ecs/sockets/AttachmentSockets.js";
|
|
8
8
|
import { Attachment } from "../../../../../engine/ecs/attachment/Attachment.js";
|
|
@@ -32,11 +32,11 @@ export const SHAPE_VISUAL_ENTITY_TAG = 'util/vis/Shape3D';
|
|
|
32
32
|
*
|
|
33
33
|
* @param {UnionShape3D} shape
|
|
34
34
|
* @param {EntityComponentDataset} ecd
|
|
35
|
-
* @returns {
|
|
35
|
+
* @returns {Entity}
|
|
36
36
|
*/
|
|
37
37
|
function composite_shape_to_entity(shape, ecd) {
|
|
38
38
|
|
|
39
|
-
const parent = new
|
|
39
|
+
const parent = new Entity();
|
|
40
40
|
parent
|
|
41
41
|
.add(new Transform())
|
|
42
42
|
.add(AttachmentSockets.fromJSON({
|
|
@@ -69,10 +69,10 @@ function composite_shape_to_entity(shape, ecd) {
|
|
|
69
69
|
*
|
|
70
70
|
* @param {UnitCubeShape3D} shape
|
|
71
71
|
* @param {EntityComponentDataset} ecd
|
|
72
|
-
* @returns {
|
|
72
|
+
* @returns {Entity}
|
|
73
73
|
*/
|
|
74
74
|
function cube_shape_to_entity(shape, ecd) {
|
|
75
|
-
const eb = new
|
|
75
|
+
const eb = new Entity();
|
|
76
76
|
|
|
77
77
|
eb.add(new Transform());
|
|
78
78
|
eb.add(Tag.fromOne(SHAPE_VISUAL_ENTITY_TAG));
|
|
@@ -88,10 +88,10 @@ function cube_shape_to_entity(shape, ecd) {
|
|
|
88
88
|
*
|
|
89
89
|
* @param {UnitSphereShape3D} shape
|
|
90
90
|
* @param {EntityComponentDataset} ecd
|
|
91
|
-
* @returns {
|
|
91
|
+
* @returns {Entity}
|
|
92
92
|
*/
|
|
93
93
|
function sphere_shape_to_entity(shape, ecd) {
|
|
94
|
-
const eb = new
|
|
94
|
+
const eb = new Entity();
|
|
95
95
|
|
|
96
96
|
eb.add(new Transform());
|
|
97
97
|
eb.add(Tag.fromOne(SHAPE_VISUAL_ENTITY_TAG));
|
|
@@ -107,12 +107,12 @@ function sphere_shape_to_entity(shape, ecd) {
|
|
|
107
107
|
*
|
|
108
108
|
* @param {TransformedShape3D} shape
|
|
109
109
|
* @param {EntityComponentDataset} ecd
|
|
110
|
-
* @returns {
|
|
110
|
+
* @returns {Entity}
|
|
111
111
|
*/
|
|
112
112
|
function transformed_shape_to_entity(shape, ecd) {
|
|
113
113
|
const subject = shape_to_visual_entity(shape.subject, ecd);
|
|
114
114
|
|
|
115
|
-
const parent = new
|
|
115
|
+
const parent = new Entity();
|
|
116
116
|
parent
|
|
117
117
|
.add(new Transform())
|
|
118
118
|
.add(AttachmentSockets.fromJSON({
|
|
@@ -142,7 +142,7 @@ function transformed_shape_to_entity(shape, ecd) {
|
|
|
142
142
|
*
|
|
143
143
|
* @param {AbstractShape3D} shape
|
|
144
144
|
* @param {EntityComponentDataset} ecd
|
|
145
|
-
* @returns {
|
|
145
|
+
* @returns {Entity}
|
|
146
146
|
*/
|
|
147
147
|
export function shape_to_visual_entity(shape, ecd) {
|
|
148
148
|
if (shape instanceof UnionShape3D) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v3_dot } from "../../v3_dot.js";
|
|
1
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
2
2
|
import { min2 } from "../../../math/min2.js";
|
|
3
3
|
import { max2 } from "../../../math/max2.js";
|
|
4
4
|
import { plane3_compute_convex_3_plane_intersection } from "../plane/plane3_compute_convex_3_plane_intersection.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { compute_bounding_simplex_3d } from "./compute_bounding_simplex_3d.js";
|
|
2
|
-
import { v3_distance } from "../../v3_distance.js";
|
|
2
|
+
import { v3_distance } from "../../vec3/v3_distance.js";
|
|
3
3
|
import { orient3d_fast } from "../plane/orient3d_fast.js";
|
|
4
4
|
|
|
5
5
|
test('one point', () => {
|
|
@@ -23,6 +23,7 @@ import { assert } from "../../../../assert.js";
|
|
|
23
23
|
export function compute_delaunay_tetrahedral_mesh(mesh, input, n = input.length / 3) {
|
|
24
24
|
assert.notNull(mesh, 'mesh');
|
|
25
25
|
assert.defined(mesh, 'mesh');
|
|
26
|
+
assert.equal(mesh.isTetrahedralMesh, true, 'mesh.isTetrahedralMesh !== true');
|
|
26
27
|
|
|
27
28
|
assert.isNonNegativeInteger(n, 'n');
|
|
28
29
|
|
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
import { compute_delaunay_tetrahedral_mesh } from "./compute_delaunay_tetrahedral_mesh.js";
|
|
6
|
+
import { TetrahedralMesh } from "../TetrahedralMesh.js";
|
|
2
7
|
|
|
3
8
|
test('single point', () => {
|
|
4
|
-
|
|
9
|
+
const mesh = new TetrahedralMesh();
|
|
10
|
+
|
|
11
|
+
compute_delaunay_tetrahedral_mesh(mesh, [1, 2, 3], 1);
|
|
5
12
|
});
|
|
6
13
|
|
|
7
14
|
test('exactly 4 points', () => {
|
|
8
|
-
|
|
15
|
+
const mesh = new TetrahedralMesh();
|
|
16
|
+
compute_delaunay_tetrahedral_mesh(mesh, [
|
|
9
17
|
-1, 0, 0,
|
|
10
18
|
1, 0, 0,
|
|
11
19
|
0.5, 1, 0,
|
|
@@ -3,7 +3,7 @@ import { compute_delaunay_tetrahedral_mesh } from "./delaunay/compute_delaunay_t
|
|
|
3
3
|
import { LineBasicMaterial } from "three";
|
|
4
4
|
import { ShadedGeometry } from "../../../../engine/graphics/ecs/mesh-v2/ShadedGeometry.js";
|
|
5
5
|
import { DrawMode } from "../../../../engine/graphics/ecs/mesh-v2/DrawMode.js";
|
|
6
|
-
import
|
|
6
|
+
import Entity from "../../../../engine/ecs/Entity.js";
|
|
7
7
|
import { Transform } from "../../../../engine/ecs/transform/Transform.js";
|
|
8
8
|
import { ShadedGeometrySystem } from "../../../../engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
9
9
|
import { GizmoRenderingPlugin } from "../../../../engine/graphics/render/gizmo/GizmoRenderingPlugin.js";
|
|
@@ -76,7 +76,7 @@ async function main(engine) {
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
new
|
|
79
|
+
new Entity()
|
|
80
80
|
.add(ShadedGeometry.from(geometry, new LineBasicMaterial({ color: 0xFF0000 }), DrawMode.LineSegments))
|
|
81
81
|
.add(Transform.fromJSON({
|
|
82
82
|
position: { x: offset[0], y: offset[1], z: offset[2] },
|
|
@@ -3,7 +3,7 @@ import { PointSet } from "../../../packing/miniball/PointSet.js";
|
|
|
3
3
|
import { ConicRay } from "../../../ConicRay.js";
|
|
4
4
|
import { array_copy } from "../../../../collection/array/array_copy.js";
|
|
5
5
|
import { min2 } from "../../../../math/min2.js";
|
|
6
|
-
import { v3_angle_between } from "../../../v3_angle_between.js";
|
|
6
|
+
import { v3_angle_between } from "../../../vec3/v3_angle_between.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Using Shirman and Abi-Ezzi method, compute bounding sphere of points, then build a cone from that
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EngineHarness } from "../../../../../engine/EngineHarness.js";
|
|
2
2
|
import { MeshBasicMaterial, MeshStandardMaterial, OctahedronBufferGeometry } from "three";
|
|
3
|
-
import
|
|
3
|
+
import Entity from "../../../../../engine/ecs/Entity.js";
|
|
4
4
|
import { ShadedGeometry } from "../../../../../engine/graphics/ecs/mesh-v2/ShadedGeometry.js";
|
|
5
5
|
import { Transform } from "../../../../../engine/ecs/transform/Transform.js";
|
|
6
6
|
import { ShadedGeometrySystem } from "../../../../../engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
@@ -12,7 +12,7 @@ import { compute_aabb_from_points } from "../../aabb/compute_aabb_from_points.js
|
|
|
12
12
|
import { AABB3 } from "../../../../geom/3d/aabb/AABB3.js";
|
|
13
13
|
import { mergeVertices } from "three/examples/jsm/utils/BufferGeometryUtils.js";
|
|
14
14
|
import { makeGeometryIndexed } from "../../../../../engine/graphics/geometry/buffered/makeGeometryIndexed.js";
|
|
15
|
-
import { v3_dot } from "../../../v3_dot.js";
|
|
15
|
+
import { v3_dot } from "../../../vec3/v3_dot.js";
|
|
16
16
|
import { TopoMesh } from "../struct/TopoMesh.js";
|
|
17
17
|
import { SGMeshSystem } from "../../../../../engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js";
|
|
18
18
|
import { SGMesh } from "../../../../../engine/graphics/ecs/mesh-v2/aggregate/SGMesh.js";
|
|
@@ -104,7 +104,7 @@ async function main(engine) {
|
|
|
104
104
|
|
|
105
105
|
const ecd = engine.entityManager.dataset;
|
|
106
106
|
|
|
107
|
-
const entityBuilder = new
|
|
107
|
+
const entityBuilder = new Entity();
|
|
108
108
|
entityBuilder
|
|
109
109
|
.add(SGMesh.fromURL(path))
|
|
110
110
|
.add(Transform.fromJSON({}))
|
|
@@ -151,7 +151,7 @@ async function main(engine) {
|
|
|
151
151
|
makeGeometryIndexed(source_geo);
|
|
152
152
|
source_geo = mergeVertices(source_geo, 0.002);
|
|
153
153
|
|
|
154
|
-
const entity_source = new
|
|
154
|
+
const entity_source = new Entity();
|
|
155
155
|
entity_source
|
|
156
156
|
.add(ShadedGeometry.from(source_geo, new MeshStandardMaterial({
|
|
157
157
|
color: '#b60000'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { query_edge_other_vertex } from "../query/query_edge_other_vertex.js";
|
|
2
2
|
import { query_face_next_vertex } from "../query/query_face_next_vertex.js";
|
|
3
3
|
import { query_face_prev_vertex } from "../query/query_face_prev_vertex.js";
|
|
4
|
-
import { v3_length_sqr } from "../../../v3_length_sqr.js";
|
|
5
|
-
import { v3_dot } from "../../../v3_dot.js";
|
|
4
|
+
import { v3_length_sqr } from "../../../vec3/v3_length_sqr.js";
|
|
5
|
+
import { v3_dot } from "../../../vec3/v3_dot.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @see https://github.com/blender/blender/blob/594f47ecd2d5367ca936cf6fc6ec8168c2b360d0/source/blender/bmesh/tools/bmesh_decimate_collapse.c#L164
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../../../assert.js";
|
|
2
2
|
import { array_push_if_unique } from "../../../../collection/array/array_push_if_unique.js";
|
|
3
3
|
import { array_remove_first } from "../../../../collection/array/array_remove_first.js";
|
|
4
|
-
import { v3_distance } from "../../../v3_distance.js";
|
|
4
|
+
import { v3_distance } from "../../../vec3/v3_distance.js";
|
|
5
5
|
|
|
6
6
|
export class TopoVertex {
|
|
7
7
|
constructor() {
|
|
@@ -8,7 +8,7 @@ import Signal from "../events/signal/Signal.js";
|
|
|
8
8
|
import { clamp } from "../math/clamp.js";
|
|
9
9
|
import { lerp } from "../math/lerp.js";
|
|
10
10
|
import Vector3 from "./Vector3.js";
|
|
11
|
-
import { v3_dot } from "./v3_dot.js";
|
|
11
|
+
import { v3_dot } from "./vec3/v3_dot.js";
|
|
12
12
|
import { min2 } from "../math/min2.js";
|
|
13
13
|
import { computeHashFloat } from "../primitives/numbers/computeHashFloat.js";
|
|
14
14
|
import { epsilonEquals } from "../math/epsilonEquals.js";
|
package/src/core/geom/Vector3.js
CHANGED
|
@@ -7,12 +7,12 @@ import { assert } from "../assert.js";
|
|
|
7
7
|
import Signal from "../events/signal/Signal.js";
|
|
8
8
|
import { lerp } from "../math/lerp.js";
|
|
9
9
|
import { sign } from "../math/sign.js";
|
|
10
|
-
import { v3_dot } from "./v3_dot.js";
|
|
11
|
-
import { v3_length_sqr } from "./v3_length_sqr.js";
|
|
12
|
-
import { v3_length } from "./v3_length.js";
|
|
13
|
-
import { v3_angle_between } from "./v3_angle_between.js";
|
|
14
|
-
import { v3_lerp } from "./v3_lerp.js";
|
|
15
|
-
import { v3_slerp } from "./v3_slerp.js";
|
|
10
|
+
import { v3_dot } from "./vec3/v3_dot.js";
|
|
11
|
+
import { v3_length_sqr } from "./vec3/v3_length_sqr.js";
|
|
12
|
+
import { v3_length } from "./vec3/v3_length.js";
|
|
13
|
+
import { v3_angle_between } from "./vec3/v3_angle_between.js";
|
|
14
|
+
import { v3_lerp } from "./vec3/v3_lerp.js";
|
|
15
|
+
import { v3_slerp } from "./vec3/v3_slerp.js";
|
|
16
16
|
import { computeHashFloat } from "../primitives/numbers/computeHashFloat.js";
|
|
17
17
|
import { epsilonEquals } from "../math/epsilonEquals.js";
|
|
18
18
|
import { EPSILON } from "../math/EPSILON.js";
|
|
@@ -992,7 +992,7 @@ class Vector3 {
|
|
|
992
992
|
* @returns {number}
|
|
993
993
|
*/
|
|
994
994
|
static dot(a, b) {
|
|
995
|
-
return
|
|
995
|
+
return v3_dot(a.x, a.y, a.z, b.x, b.y, b.z);
|
|
996
996
|
}
|
|
997
997
|
|
|
998
998
|
/**
|