@woosh/meep-engine 2.107.0 → 2.108.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bundle-worker-image-decoder.js +1 -1
- package/build/meep.cjs +255 -172
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +255 -173
- package/editor/tools/paint/TerrainHeightPaintTool.js +5 -5
- package/package.json +1 -1
- package/src/core/binary/float_to_uint8.d.ts +7 -0
- package/src/core/binary/float_to_uint8.d.ts.map +1 -0
- package/src/core/binary/{float2uint8.js → float_to_uint8.js} +1 -1
- package/src/core/binary/int32_to_binary_string.d.ts +3 -2
- package/src/core/binary/int32_to_binary_string.d.ts.map +1 -1
- package/src/core/binary/int32_to_binary_string.js +18 -14
- package/src/core/binary/split_by_3.spec.d.ts +2 -0
- package/src/core/binary/split_by_3.spec.d.ts.map +1 -0
- package/src/core/binary/split_by_3.spec.js +22 -0
- package/src/core/binary/to_half_float_uint16.d.ts.map +1 -1
- package/src/core/binary/to_half_float_uint16.js +7 -5
- package/src/core/binary/uint8_to_float.d.ts +7 -0
- package/src/core/binary/uint8_to_float.d.ts.map +1 -0
- package/src/core/binary/{uint82float.js → uint8_to_float.js} +1 -1
- package/src/core/binary/uint8_to_float.spec.d.ts +2 -0
- package/src/core/binary/uint8_to_float.spec.d.ts.map +1 -0
- package/src/core/binary/uint8_to_float.spec.js +7 -0
- package/src/core/codegen/codeToBlob.d.ts +8 -0
- package/src/core/codegen/codeToBlob.d.ts.map +1 -0
- package/src/core/codegen/codeToBlob.js +36 -0
- package/src/core/codegen/codeToURL.d.ts +8 -0
- package/src/core/codegen/codeToURL.d.ts.map +1 -0
- package/src/core/codegen/codeToURL.js +22 -0
- package/src/core/collection/array/array_shuffle.d.ts +8 -0
- package/src/core/collection/array/array_shuffle.d.ts.map +1 -0
- package/src/core/collection/array/array_shuffle.js +22 -0
- package/src/core/collection/array/array_shuffle.spec.d.ts +2 -0
- package/src/core/collection/array/array_shuffle.spec.d.ts.map +1 -0
- package/src/core/collection/array/{randomizeArrayElementOrder.spec.js → array_shuffle.spec.js} +4 -4
- package/src/core/collection/array/isArrayEqualStrict.d.ts.map +1 -1
- package/src/core/collection/array/isArrayEqualStrict.js +2 -2
- package/src/core/collection/array/iterator/ArrayIteratorRandom.js +2 -2
- package/src/core/collection/array/randomMultipleFromArray.js +2 -2
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +16 -11
- package/src/core/color/hsv/hsv2rgb.js +4 -4
- package/src/core/color/hsv/rgb2hsv.d.ts +3 -3
- package/src/core/color/hsv/rgb2hsv.d.ts.map +1 -1
- package/src/core/color/hsv/rgb2hsv.js +11 -18
- package/src/core/color/rgb2uint24.js +4 -4
- package/src/core/color/rgb_to_luminance.d.ts +9 -0
- package/src/core/color/rgb_to_luminance.d.ts.map +1 -0
- package/src/core/color/rgb_to_luminance.js +10 -0
- package/src/core/color/sRGB/linear_to_sRGB.d.ts +1 -0
- package/src/core/color/sRGB/linear_to_sRGB.d.ts.map +1 -1
- package/src/core/color/sRGB/linear_to_sRGB.js +4 -4
- package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/AABB3.js +4 -1
- package/src/core/geom/3d/aabb/aabb3_intersects_ray.js +3 -3
- package/src/core/geom/3d/shape/UnitSphereShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/UnitSphereShape3D.js +14 -14
- package/src/core/geom/3d/sphere/harmonics/README.md +16 -2
- package/src/core/geom/3d/sphere/harmonics/SH3_COEFFICIENTS.d.ts +6 -0
- package/src/core/geom/3d/sphere/harmonics/SH3_COEFFICIENTS.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/harmonics/SH3_COEFFICIENTS.js +17 -0
- package/src/core/geom/3d/sphere/harmonics/sh3_basis_at.d.ts.map +1 -1
- package/src/core/geom/3d/sphere/harmonics/sh3_basis_at.js +21 -9
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.d.ts +3 -3
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.d.ts.map +1 -1
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +35 -206
- package/src/core/geom/3d/sphere/harmonics/sh3_rotate.d.ts +8 -0
- package/src/core/geom/3d/sphere/harmonics/sh3_rotate.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/harmonics/sh3_rotate.js +29 -0
- package/src/core/geom/3d/sphere/harmonics/sh3_sample_by_direction.js +10 -10
- package/src/core/geom/3d/sphere/harmonics/sh_index.d.ts +8 -0
- package/src/core/geom/3d/sphere/harmonics/sh_index.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/harmonics/sh_index.js +9 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band1.d.ts +8 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band1.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band1.js +44 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band2.d.ts +8 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band2.d.ts.map +1 -0
- package/src/core/geom/3d/sphere/harmonics/sh_rotate_band2.js +86 -0
- package/src/core/geom/3d/sphere/in_sphere3d_robust.d.ts.map +1 -1
- package/src/core/geom/3d/sphere/in_sphere3d_robust.js +2 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts +20 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +53 -7
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.spec.js +2 -2
- package/src/core/geom/3d/tetrahedra/build_tetrahedral_mesh_buffer_geometry.d.ts +1 -1
- package/src/core/geom/3d/tetrahedra/build_tetrahedral_mesh_buffer_geometry.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/build_tetrahedral_mesh_buffer_geometry.js +12 -7
- package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.d.ts +13 -0
- package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.js +135 -0
- package/src/core/geom/3d/tetrahedra/prototypeTetrahedraBuilder.js +38 -24
- package/src/core/geom/3d/tetrahedra/{compute_circumsphere.d.ts → tetrahedron_compute_circumsphere.d.ts} +3 -5
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_circumsphere.d.ts.map +1 -0
- package/src/core/geom/3d/tetrahedra/{compute_circumsphere.js → tetrahedron_compute_circumsphere.js} +2 -4
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/tetrahedra/tetrahedron_compute_signed_volume.js +3 -1
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +4 -3
- package/src/core/geom/mat3/m3_multiply_vec3.d.ts +8 -0
- package/src/core/geom/mat3/m3_multiply_vec3.d.ts.map +1 -0
- package/src/core/geom/mat3/m3_multiply_vec3.js +21 -0
- package/src/core/geom/random/randomPointInSphere.d.ts +1 -1
- package/src/core/geom/random/randomPointInSphere.js +2 -2
- package/src/core/geom/random/randomPointOnSphere.d.ts +3 -3
- package/src/core/geom/random/randomPointOnSphere.d.ts.map +1 -1
- package/src/core/geom/random/randomPointOnSphere.js +5 -9
- package/src/core/geom/vec2/v2_cross_product.d.ts +15 -0
- package/src/core/geom/vec2/v2_cross_product.d.ts.map +1 -0
- package/src/core/geom/vec2/v2_cross_product.js +21 -0
- package/src/core/geom/vec3/v3_slerp.d.ts +1 -0
- package/src/core/geom/vec3/v3_slerp.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_slerp.js +1 -0
- package/src/core/graph/MultiNode.d.ts +1 -1
- package/src/core/graph/MultiNode.js +1 -1
- package/src/core/graph/WeightedEdge.d.ts +6 -4
- package/src/core/graph/WeightedEdge.d.ts.map +1 -1
- package/src/core/graph/WeightedEdge.js +3 -0
- package/src/core/graph/coloring/colorizeGraph.js +19 -19
- package/src/core/graph/convert_graph_to_dot_string.d.ts +1 -1
- package/src/core/graph/convert_graph_to_dot_string.d.ts.map +1 -1
- package/src/core/graph/convert_graph_to_dot_string.js +10 -6
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts +9 -0
- package/src/core/graph/graph_compute_adjacency_matrix.d.ts.map +1 -0
- package/src/core/graph/{graph_adjacency_matrix.js → graph_compute_adjacency_matrix.js} +1 -2
- package/src/core/graph/graph_compute_degree_matrix.d.ts +10 -0
- package/src/core/graph/graph_compute_degree_matrix.d.ts.map +1 -0
- package/src/core/graph/graph_compute_degree_matrix.js +23 -0
- package/src/core/graph/graph_compute_distance_matrix.d.ts +13 -0
- package/src/core/graph/graph_compute_distance_matrix.d.ts.map +1 -0
- package/src/core/graph/graph_compute_distance_matrix.js +103 -0
- package/src/core/graph/{graph_laplacian_matrix.d.ts → graph_compute_laplacian_matrix.d.ts} +2 -2
- package/src/core/graph/graph_compute_laplacian_matrix.d.ts.map +1 -0
- package/src/core/graph/{graph_laplacian_matrix.js → graph_compute_laplacian_matrix.js} +6 -6
- package/src/core/graph/graph_k_means_cluster.d.ts.map +1 -1
- package/src/core/graph/graph_k_means_cluster.js +4 -119
- package/src/core/graph/{coarsen_graph.d.ts → mn_graph_coarsen.d.ts} +2 -2
- package/src/core/graph/mn_graph_coarsen.d.ts.map +1 -0
- package/src/core/graph/{coarsen_graph.js → mn_graph_coarsen.js} +1 -1
- package/src/core/graph/mn_graph_coarsen.spec.d.ts +2 -0
- package/src/core/graph/mn_graph_coarsen.spec.d.ts.map +1 -0
- package/src/core/graph/{coarsen_graph.spec.js → mn_graph_coarsen.spec.js} +4 -4
- package/src/core/graph/mn_graph_collapse_weighted_edge.d.ts +1 -0
- package/src/core/graph/mn_graph_collapse_weighted_edge.d.ts.map +1 -1
- package/src/core/graph/mn_graph_collapse_weighted_edge.js +7 -1
- package/src/core/math/physics/brdf/brdf_burley.d.ts.map +1 -1
- package/src/core/math/physics/brdf/brdf_burley.js +9 -1
- package/src/core/math/physics/brdf/{D_GGX.d.ts → diffuse_GGX.d.ts} +2 -2
- package/src/core/math/physics/brdf/diffuse_GGX.d.ts.map +1 -0
- package/src/core/math/physics/brdf/{D_GGX.js → diffuse_GGX.js} +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick.d.ts +3 -0
- package/src/core/math/physics/brdf/fresnel_Schlick.d.ts.map +1 -0
- package/src/core/math/physics/brdf/fresnel_Schlick.js +3 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +9 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +12 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_original.d.ts +9 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_original.d.ts.map +1 -0
- package/src/core/math/physics/brdf/fresnel_Schlick_original.js +10 -0
- package/src/core/math/physics/bsdf/bsdf_schlick.d.ts.map +1 -1
- package/src/core/math/physics/bsdf/bsdf_schlick.js +3 -11
- package/src/core/math/physics/ior_to_reflectivity.d.ts +7 -0
- package/src/core/math/physics/ior_to_reflectivity.d.ts.map +1 -0
- package/src/core/math/physics/ior_to_reflectivity.js +9 -0
- package/src/core/math/physics/pdf/README.md +1 -0
- package/src/core/math/physics/pdf/pdf_GGX.d.ts +16 -0
- package/src/core/math/physics/pdf/pdf_GGX.d.ts.map +1 -0
- package/src/core/math/physics/pdf/pdf_GGX.js +25 -0
- package/src/core/math/physics/reflectivity_to_ior.d.ts +7 -0
- package/src/core/math/physics/reflectivity_to_ior.d.ts.map +1 -0
- package/src/core/math/physics/reflectivity_to_ior.js +8 -0
- package/src/core/process/task/util/randomCountTask.js +3 -3
- package/src/core/process/worker/WorkerBuilder.d.ts.map +1 -1
- package/src/core/process/worker/WorkerBuilder.js +5 -35
- package/src/engine/EngineHarness.d.ts +10 -1
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +22 -11
- package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/ArrayBufferLoader.js +17 -10
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts +25 -11
- package/src/engine/asset/loaders/image/png/PNGReader.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/png/PNGReader.js +38 -24
- package/src/engine/asset/loaders/material/TextureAttachmensByMaterialType.d.ts.map +1 -1
- package/src/engine/asset/loaders/material/TextureAttachmensByMaterialType.js +5 -0
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +4 -4
- package/src/engine/graphics/GraphicsEngine.js +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js +4 -0
- package/src/engine/graphics/ecs/light/LightSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/LightSystem.js +2 -3
- package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.d.ts +6 -0
- package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/binding/three/ThreeLightBinding.js +22 -11
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.d.ts.map +1 -1
- package/src/engine/graphics/ecs/sprite/SpriteSystemPE.js +7 -7
- package/src/engine/graphics/impostors/octahedral/bake/prepare_bake_material.js +3 -3
- package/src/engine/graphics/render/forward_plus/model/DirectionalLight.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/DirectionalLight.js +25 -25
- package/src/engine/graphics/sh3/SH3VisualisationMaterial.d.ts.map +1 -1
- package/src/engine/graphics/sh3/SH3VisualisationMaterial.js +9 -6
- package/src/engine/graphics/sh3/fromCubeRenderTarget.d.ts +9 -0
- package/src/engine/graphics/sh3/fromCubeRenderTarget.d.ts.map +1 -0
- package/src/engine/graphics/sh3/fromCubeRenderTarget.js +145 -0
- package/src/engine/graphics/sh3/gi/tetrahedral_mesh_to_texture.d.ts +8 -0
- package/src/engine/graphics/sh3/gi/tetrahedral_mesh_to_texture.d.ts.map +1 -0
- package/src/engine/graphics/sh3/gi/tetrahedral_mesh_to_texture.js +51 -0
- package/src/engine/graphics/sh3/{LightProbeVolume.d.ts → lpv/LightProbeVolume.d.ts} +18 -7
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +340 -0
- package/src/engine/graphics/sh3/lpv/LightProbeVolumeSerializationAdapter.d.ts +18 -0
- package/src/engine/graphics/sh3/lpv/LightProbeVolumeSerializationAdapter.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/LightProbeVolumeSerializationAdapter.js +44 -0
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts +12 -0
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +122 -0
- package/src/engine/graphics/sh3/lpv/ProbeRenderer.d.ts +29 -0
- package/src/engine/graphics/sh3/lpv/ProbeRenderer.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/ProbeRenderer.js +35 -0
- package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts +27 -0
- package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js +158 -0
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.d.ts +11 -0
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/build_probes_for_scene.js +127 -0
- package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.d.ts +12 -0
- package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.d.ts.map +1 -0
- package/src/engine/graphics/sh3/lpv/probe_volume_to_textures.js +89 -0
- package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts +90 -0
- package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/PathTracedScene.js +352 -0
- package/src/engine/graphics/sh3/path_tracer/PathTracer.d.ts +5 -91
- package/src/engine/graphics/sh3/path_tracer/PathTracer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/PathTracer.js +41 -477
- package/src/engine/graphics/sh3/path_tracer/make_one_vector3.d.ts +1 -0
- package/src/engine/graphics/sh3/path_tracer/make_one_vector3.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/make_one_vector3.js +6 -3
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +38 -62
- package/src/engine/graphics/sh3/path_tracer/random_in_hemisphere.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/random_in_hemisphere.js +7 -1
- package/src/engine/graphics/sh3/path_tracer/sample_triangle_attribute.d.ts +2 -2
- package/src/engine/graphics/sh3/path_tracer/sample_triangle_attribute.d.ts.map +1 -1
- package/src/engine/graphics/sh3/path_tracer/sample_triangle_attribute.js +1 -1
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples.d.ts +10 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples.js +20 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples_2d.d.ts +10 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples_2d.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/generate_stratified_samples_2d.js +31 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/make_stratified_sample.d.ts +9 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/make_stratified_sample.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/sampling/make_stratified_sample.js +21 -0
- package/src/engine/graphics/sh3/path_tracer/texture/SoftwareTextureCache.d.ts +3 -0
- package/src/engine/graphics/sh3/path_tracer/texture/SoftwareTextureCache.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/texture/SoftwareTextureCache.js +3 -0
- package/src/engine/graphics/sh3/path_tracer/texture/apply_texture_clamping_to_coordinate.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/{apply_texture_clamping_to_coordinate.js → texture/apply_texture_clamping_to_coordinate.js} +2 -2
- package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts +11 -0
- package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/texture/sample_material.js +86 -0
- package/src/engine/graphics/sh3/path_tracer/texture/sample_texture.d.ts +10 -0
- package/src/engine/graphics/sh3/path_tracer/texture/sample_texture.d.ts.map +1 -0
- package/src/engine/graphics/sh3/path_tracer/texture/sample_texture.js +55 -0
- package/src/engine/graphics/sh3/path_tracer/vec3_uint8_to_float.js +4 -4
- package/src/engine/graphics/sh3/prototypeSH3Probe.js +145 -185
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts +5 -5
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.d.ts.map +1 -1
- package/src/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.js +8 -8
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.d.ts +13 -0
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.d.ts.map +1 -0
- package/src/engine/graphics/sh3/visualise_spherical_harmonic_sphere.js +54 -0
- package/src/engine/graphics/texture/AttributeDataTexture.d.ts +2 -2
- package/src/engine/graphics/texture/AttributeDataTexture.d.ts.map +1 -1
- package/src/engine/graphics/texture/AttributeDataTexture.js +11 -11
- package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/Sampler2D.js +2 -2
- package/src/engine/input/ecs/systems/InputControllerSystem.js +1 -1
- package/src/engine/network/convertPathToURL.d.ts +3 -1
- package/src/engine/network/convertPathToURL.d.ts.map +1 -1
- package/src/engine/network/convertPathToURL.js +68 -51
- package/src/engine/physics/fluid/SliceVisualiser.d.ts.map +1 -1
- package/src/engine/physics/fluid/SliceVisualiser.js +4 -4
- package/src/generation/filtering/numeric/CellFilterCache.d.ts.map +1 -1
- package/src/generation/filtering/numeric/CellFilterCache.js +1 -0
- package/src/view/elements/ColorPickerView.d.ts.map +1 -1
- package/src/view/elements/ColorPickerView.js +7 -7
- package/src/core/binary/float2uint8.d.ts +0 -7
- package/src/core/binary/float2uint8.d.ts.map +0 -1
- package/src/core/binary/uint82float.d.ts +0 -7
- package/src/core/binary/uint82float.d.ts.map +0 -1
- package/src/core/binary/uint82float.spec.d.ts +0 -2
- package/src/core/binary/uint82float.spec.d.ts.map +0 -1
- package/src/core/binary/uint82float.spec.js +0 -7
- package/src/core/collection/array/randomizeArrayElementOrder.d.ts +0 -8
- package/src/core/collection/array/randomizeArrayElementOrder.d.ts.map +0 -1
- package/src/core/collection/array/randomizeArrayElementOrder.js +0 -24
- package/src/core/collection/array/randomizeArrayElementOrder.spec.d.ts +0 -2
- package/src/core/collection/array/randomizeArrayElementOrder.spec.d.ts.map +0 -1
- package/src/core/geom/3d/tetrahedra/compute_circumsphere.d.ts.map +0 -1
- package/src/core/graph/coarsen_graph.d.ts.map +0 -1
- package/src/core/graph/coarsen_graph.spec.d.ts +0 -2
- package/src/core/graph/coarsen_graph.spec.d.ts.map +0 -1
- package/src/core/graph/graph_adjacency_matrix.d.ts +0 -9
- package/src/core/graph/graph_adjacency_matrix.d.ts.map +0 -1
- package/src/core/graph/graph_degree_matrix.d.ts +0 -9
- package/src/core/graph/graph_degree_matrix.d.ts.map +0 -1
- package/src/core/graph/graph_degree_matrix.js +0 -18
- package/src/core/graph/graph_laplacian_matrix.d.ts.map +0 -1
- package/src/core/math/physics/brdf/D_GGX.d.ts.map +0 -1
- package/src/engine/graphics/sh3/LightProbeVolume.d.ts.map +0 -1
- package/src/engine/graphics/sh3/LightProbeVolume.js +0 -609
- package/src/engine/graphics/sh3/path_tracer/apply_texture_clamping_to_coordinate.d.ts.map +0 -1
- package/src/engine/graphics/sh3/visualise_probe.d.ts +0 -12
- package/src/engine/graphics/sh3/visualise_probe.d.ts.map +0 -1
- package/src/engine/graphics/sh3/visualise_probe.js +0 -40
- /package/src/engine/graphics/sh3/path_tracer/{apply_texture_clamping_to_coordinate.d.ts → texture/apply_texture_clamping_to_coordinate.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgb_to_luminance.d.ts","sourceRoot":"","sources":["../../../../src/core/color/rgb_to_luminance.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oCALW,MAAM,KACN,MAAM,KACN,MAAM,GACL,MAAM,CAIjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linear_to_sRGB.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/sRGB/linear_to_sRGB.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"linear_to_sRGB.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/sRGB/linear_to_sRGB.js"],"names":[],"mappings":"AAAA,+DAMC;AAED;;;;;;GAMG;AACH,uCALW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,iBAC1B,MAAM,SACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,gBAC1B,MAAM,QAahB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
export function convert_channel_linear_to_sRGB(c) {
|
|
2
2
|
if (c < 0.0031308) {
|
|
3
3
|
return c * 12.92;
|
|
4
4
|
} else {
|
|
@@ -21,7 +21,7 @@ export function linear_to_sRGB(
|
|
|
21
21
|
const g = input[input_offset + 1];
|
|
22
22
|
const b = input[input_offset + 2];
|
|
23
23
|
|
|
24
|
-
output[output_offset] =
|
|
25
|
-
output[output_offset + 1] =
|
|
26
|
-
output[output_offset + 2] =
|
|
24
|
+
output[output_offset] = convert_channel_linear_to_sRGB(r);
|
|
25
|
+
output[output_offset + 1] = convert_channel_linear_to_sRGB(g);
|
|
26
|
+
output[output_offset + 2] = convert_channel_linear_to_sRGB(b);
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AABB3.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/aabb/AABB3.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AABB3.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/aabb/AABB3.js"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { assert } from "../../../assert.js";
|
|
2
|
+
import Vector3 from "../../Vector3.js";
|
|
2
3
|
import computeMortonCode from "../morton/Morton.js";
|
|
3
4
|
import { aabb3_array_intersects_point } from "./aabb3_array_intersects_point.js";
|
|
4
5
|
import { aabb3_build_corners } from "./aabb3_build_corners.js";
|
|
@@ -630,11 +631,13 @@ export class AABB3 {
|
|
|
630
631
|
* Get center position of the box
|
|
631
632
|
* @param {Vector3} target where to write result
|
|
632
633
|
*/
|
|
633
|
-
getCenter(target) {
|
|
634
|
+
getCenter(target = new Vector3()) {
|
|
634
635
|
const x = this.getCenterX();
|
|
635
636
|
const y = this.getCenterY();
|
|
636
637
|
const z = this.getCenterZ();
|
|
637
638
|
target.set(x, y, z);
|
|
639
|
+
|
|
640
|
+
return target;
|
|
638
641
|
}
|
|
639
642
|
|
|
640
643
|
|
|
@@ -35,7 +35,7 @@ export function aabb3_intersects_ray(
|
|
|
35
35
|
const diff_x = origin_x - center_x;
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
if (diff_x * direction_x >= 0
|
|
38
|
+
if (diff_x * direction_x >= 0 && abs(diff_x) > extents_x) {
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ export function aabb3_intersects_ray(
|
|
|
47
47
|
const diff_y = origin_y - center_y;
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
if (diff_y * direction_y >= 0
|
|
50
|
+
if (diff_y * direction_y >= 0 && abs(diff_y) > extents_y) {
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ export function aabb3_intersects_ray(
|
|
|
59
59
|
const diff_z = origin_z - center_z;
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
if (diff_z * direction_z >= 0
|
|
62
|
+
if (diff_z * direction_z >= 0 && abs(diff_z) > extents_z) {
|
|
63
63
|
return false;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnitSphereShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitSphereShape3D.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IACI,qBAEC;IAED,2BAEC;IAED,wCAQC;IAED,4DAYC;IAED,mEAEC;IAED,6CAMC;IAED,oCAMC;IAED,kFAEC;IAED,eAEC;CACJ;;;;
|
|
1
|
+
{"version":3,"file":"UnitSphereShape3D.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/shape/UnitSphereShape3D.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IACI,qBAEC;IAED,2BAEC;IAED,wCAQC;IAED,4DAYC;IAED,mEAEC;IAED,6CAMC;IAED,oCAMC;IAED,kFAEC;IAED,eAEC;CACJ;;;;gCAlE+B,sBAAsB"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
2
1
|
import { randomPointInSphere } from "../../random/randomPointInSphere.js";
|
|
3
2
|
import { v3_length } from "../../vec3/v3_length.js";
|
|
3
|
+
import { AbstractShape3D } from "./AbstractShape3D.js";
|
|
4
4
|
import { compute_signed_distance_gradient_by_sampling } from "./util/compute_signed_distance_gradient_by_sampling.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Sphere with diameter of
|
|
7
|
+
* Sphere with diameter of 2 (radius = 1)
|
|
8
8
|
*/
|
|
9
9
|
export class UnitSphereShape3D extends AbstractShape3D {
|
|
10
10
|
get volume() {
|
|
11
|
-
return
|
|
11
|
+
return (4 / 3) * Math.PI;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
get surface_area() {
|
|
15
|
-
return
|
|
15
|
+
return Math.PI * 4;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
compute_bounding_box(result) {
|
|
19
|
-
result[0] = -
|
|
20
|
-
result[1] = -
|
|
21
|
-
result[2] = -
|
|
19
|
+
result[0] = -1;
|
|
20
|
+
result[1] = -1;
|
|
21
|
+
result[2] = -1;
|
|
22
22
|
|
|
23
|
-
result[3] =
|
|
24
|
-
result[4] =
|
|
25
|
-
result[5] =
|
|
23
|
+
result[3] = 1;
|
|
24
|
+
result[4] = 1;
|
|
25
|
+
result[5] = 1;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
nearest_point_on_surface(result, reference) {
|
|
@@ -31,8 +31,8 @@ export class UnitSphereShape3D extends AbstractShape3D {
|
|
|
31
31
|
const r_y = reference[1];
|
|
32
32
|
const r_z = reference[2];
|
|
33
33
|
|
|
34
|
-
// normalize vector to
|
|
35
|
-
const d =
|
|
34
|
+
// normalize vector to 1 radius
|
|
35
|
+
const d = 1 / Math.hypot(r_x, r_y, r_z);
|
|
36
36
|
|
|
37
37
|
result[0] = r_x * d;
|
|
38
38
|
result[1] = r_y * d;
|
|
@@ -48,7 +48,7 @@ export class UnitSphereShape3D extends AbstractShape3D {
|
|
|
48
48
|
point[0],
|
|
49
49
|
point[1],
|
|
50
50
|
point[2]
|
|
51
|
-
) -
|
|
51
|
+
) - 1;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
contains_point(point) {
|
|
@@ -56,7 +56,7 @@ export class UnitSphereShape3D extends AbstractShape3D {
|
|
|
56
56
|
const y = point[1];
|
|
57
57
|
const z = point[2];
|
|
58
58
|
|
|
59
|
-
return (x * x + y * y + z * z) <
|
|
59
|
+
return (x * x + y * y + z * z) < 1;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
sample_random_point_in_volume(result, result_offset, random) {
|
|
@@ -8,8 +8,22 @@ There are basically 3 approaches,
|
|
|
8
8
|
* Optimization of the polynomial (generally to remove negative values)
|
|
9
9
|
* Piece-wise reconstruction
|
|
10
10
|
|
|
11
|
+
## Coefficients of SH basis
|
|
12
|
+
see [3] (Stupid Spherical Harmonics)
|
|
13
|
+
|
|
14
|
+
1.0 / (2.0 * M_SQRT_PI), // 0: 0 0
|
|
15
|
+
-M_SQRT_3 / (2.0 * M_SQRT_PI), // 1: 1 -1
|
|
16
|
+
M_SQRT_3 / (2.0 * M_SQRT_PI), // 2: 1 0
|
|
17
|
+
-M_SQRT_3 / (2.0 * M_SQRT_PI), // 3: 1 1
|
|
18
|
+
M_SQRT_15 / (2.0 * M_SQRT_PI), // 4: 2 -2
|
|
19
|
+
-M_SQRT_15 / (2.0 * M_SQRT_PI), // 5: 2 -1
|
|
20
|
+
M_SQRT_5 / (4.0 * M_SQRT_PI), // 6: 2 0
|
|
21
|
+
-M_SQRT_15 / (2.0 * M_SQRT_PI), // 7: 2 1
|
|
22
|
+
M_SQRT_15 / (4.0 * M_SQRT_PI) // 8: 2 2
|
|
23
|
+
|
|
11
24
|
### References:
|
|
12
25
|
|
|
13
26
|
---
|
|
14
|
-
* 2008 - GDC - Stupid Spherical Harmonics (SH) Tricks by Peter-Pike Sloan
|
|
15
|
-
* [Computing product of 2 sphecial harmonics](https://github.com/ruba/cortex-vfx/blob/c256b7274516a02fa64a0260351b86f1d6ebe8c2/include/IECore/SphericalHarmonicsAlgo.inl)
|
|
27
|
+
* [1] 2008 - GDC - Stupid Spherical Harmonics (SH) Tricks by Peter-Pike Sloan
|
|
28
|
+
* [2] [Computing product of 2 sphecial harmonics](https://github.com/ruba/cortex-vfx/blob/c256b7274516a02fa64a0260351b86f1d6ebe8c2/include/IECore/SphericalHarmonicsAlgo.inl)
|
|
29
|
+
* [3] Stupid Spherical Harmonics
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SH3_COEFFICIENTS.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/SH3_COEFFICIENTS.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,+BAFU,YAAY,CAcnB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @readonly
|
|
3
|
+
* @type {Float32Array}
|
|
4
|
+
*/
|
|
5
|
+
export const SH3_COEFFICIENTS = new Float32Array([
|
|
6
|
+
0.28209479177387814, // 0: 0 0
|
|
7
|
+
|
|
8
|
+
-0.4886025119029199, // 1: 1 -1
|
|
9
|
+
0.4886025119029199, // 2: 1 0
|
|
10
|
+
-0.4886025119029199, // 3: 1 1
|
|
11
|
+
|
|
12
|
+
1.0925484305920792, // 4: 2 -2
|
|
13
|
+
-1.0925484305920792, // 5: 2 -1
|
|
14
|
+
0.31539156525252005, // 6: 2 0
|
|
15
|
+
-1.0925484305920792, // 7: 2 1
|
|
16
|
+
0.5462742152960396 // 8: 2 2
|
|
17
|
+
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sh3_basis_at.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_basis_at.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sh3_basis_at.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_basis_at.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,gCALW,MAAM,KACN,MAAM,KACN,MAAM,WACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,YAAY,GAAC,YAAY,QA+B9D"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { assert } from "../../../../assert.js";
|
|
2
|
+
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* evaluate the basis functions
|
|
3
6
|
* shBasis is an Array[ 9 ]
|
|
@@ -9,22 +12,31 @@
|
|
|
9
12
|
*/
|
|
10
13
|
export function sh3_basis_at(x, y, z, shBasis) {
|
|
11
14
|
|
|
15
|
+
assert.isNumber(x,'x');
|
|
16
|
+
assert.notNaN(x,'x');
|
|
17
|
+
|
|
18
|
+
assert.isNumber(y,'y');
|
|
19
|
+
assert.notNaN(y,'y');
|
|
20
|
+
|
|
21
|
+
assert.isNumber(z,'z');
|
|
22
|
+
assert.notNaN(z,'z');
|
|
23
|
+
|
|
12
24
|
// normal is assumed to be unit length
|
|
13
25
|
|
|
14
26
|
|
|
15
27
|
// band 0
|
|
16
|
-
shBasis[0] = 0.
|
|
28
|
+
shBasis[0] = 0.28209479177387814;
|
|
17
29
|
|
|
18
30
|
// band 1
|
|
19
|
-
shBasis[1] = 0.
|
|
20
|
-
shBasis[2] = 0.
|
|
21
|
-
shBasis[3] = 0.
|
|
31
|
+
shBasis[1] = -0.4886025119029199 * y;
|
|
32
|
+
shBasis[2] = 0.4886025119029199 * z;
|
|
33
|
+
shBasis[3] = -0.4886025119029199 * x;
|
|
22
34
|
|
|
23
35
|
// band 2
|
|
24
|
-
shBasis[4] = 1.
|
|
25
|
-
shBasis[5] = 1.
|
|
26
|
-
shBasis[6] = 0.
|
|
27
|
-
shBasis[7] = 1.
|
|
28
|
-
shBasis[8] = 0.
|
|
36
|
+
shBasis[4] = 1.0925484305920792 * x * y;
|
|
37
|
+
shBasis[5] = -1.0925484305920792 * y * z;
|
|
38
|
+
shBasis[6] = 0.31539156525252005 * (3 * z * z - 1);
|
|
39
|
+
shBasis[7] = -1.0925484305920792 * x * z;
|
|
40
|
+
shBasis[8] = 0.5462742152960396 * (x * x - y * y);
|
|
29
41
|
|
|
30
42
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* @param {number[]|Float32Array} result
|
|
3
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
4
4
|
* @param {number} result_offset
|
|
5
|
-
* @param {number[]|Float32Array} harmonics
|
|
5
|
+
* @param {number[]|Float32Array|Float64Array} harmonics
|
|
6
6
|
* @param {number} harmonics_offset
|
|
7
7
|
* @param {number} dimension_count
|
|
8
8
|
*/
|
|
9
|
-
export function sh3_dering_optimize_positive(result: number[] | Float32Array, result_offset: number, harmonics: number[] | Float32Array, harmonics_offset: number, dimension_count?: number): void;
|
|
9
|
+
export function sh3_dering_optimize_positive(result: number[] | Float32Array | Float64Array, result_offset: number, harmonics: number[] | Float32Array | Float64Array, harmonics_offset: number, dimension_count?: number): void;
|
|
10
10
|
//# sourceMappingURL=sh3_dering_optimize_positive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sh3_dering_optimize_positive.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sh3_dering_optimize_positive.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js"],"names":[],"mappings":"AAkSA;;;;;;;GAOG;AACH,qDANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,aACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,oBAClC,MAAM,oBACN,MAAM,QAIhB"}
|
|
@@ -2,172 +2,27 @@ import { mat3, vec3 } from "gl-matrix";
|
|
|
2
2
|
import { assert } from "../../../../assert.js";
|
|
3
3
|
import { array_copy } from "../../../../collection/array/array_copy.js";
|
|
4
4
|
import { min2 } from "../../../../math/min2.js";
|
|
5
|
+
import { SH3_COEFFICIENTS } from "./SH3_COEFFICIENTS.js";
|
|
6
|
+
import { sh3_rotate } from "./sh3_rotate.js";
|
|
7
|
+
import { sh_index } from "./sh_index.js";
|
|
5
8
|
|
|
6
9
|
/*
|
|
7
10
|
@see https://github.com/Bestmaker602/olacziy/blob/212b64ea5f1856b390cdf7629801243f76a4466d/libs/ibl/src/CubemapSH.cpp
|
|
8
11
|
*/
|
|
9
12
|
|
|
10
13
|
|
|
11
|
-
const F_PI = 3.14159265358979323846264338327950288;
|
|
12
|
-
const F_SQRT1_2 = 0.707106781186547524400844362104849039;
|
|
13
|
-
const M_SQRT_3 = 1.7320508076;
|
|
14
|
-
|
|
15
|
-
const M_SQRT_PI = 1.7724538509;
|
|
16
|
-
const M_SQRT_5 = 2.2360679775;
|
|
17
|
-
const M_SQRT_15 = 3.8729833462;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {number[]} M 5x5 matrix
|
|
22
|
-
* @param {number[]} x vec5
|
|
23
|
-
* @return {number[]} vec5
|
|
24
|
-
*/
|
|
25
|
-
function multiply_5d(M, x) {
|
|
26
|
-
return [
|
|
27
|
-
M[0] * x[0] + M[5] * x[1] + M[10] * x[2] + M[15] * x[3] + M[20] * x[4],
|
|
28
|
-
M[1] * x[0] + M[6] * x[1] + M[11] * x[2] + M[16] * x[3] + M[21] * x[4],
|
|
29
|
-
M[2] * x[0] + M[7] * x[1] + M[12] * x[2] + M[17] * x[3] + M[22] * x[4],
|
|
30
|
-
M[3] * x[0] + M[8] * x[1] + M[13] * x[2] + M[18] * x[3] + M[23] * x[4],
|
|
31
|
-
M[4] * x[0] + M[9] * x[1] + M[14] * x[2] + M[19] * x[3] + M[24] * x[4]
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* compute Index of spherical harmonics coefficient
|
|
37
|
-
* @param {number} m signed offset from zonal harmonic
|
|
38
|
-
* @param {number} l band
|
|
39
|
-
* @return {number}
|
|
40
|
-
*/
|
|
41
|
-
function sh_index(m, l) {
|
|
42
|
-
return l * (l + 1) + m;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/*
|
|
47
|
-
* utilities to rotate very low order spherical harmonics (up to 3rd band)
|
|
48
|
-
* @param {number[]} band1
|
|
49
|
-
* @param {number[]} M 3x3 matrix
|
|
50
|
-
* @returns {number[]}
|
|
51
|
-
*/
|
|
52
|
-
function rotateShericalHarmonicBand1(band1, M) {
|
|
53
|
-
|
|
54
|
-
// inverse() is not constexpr -- so we pre-calculate it in mathematica
|
|
55
|
-
//
|
|
56
|
-
// constexpr float3 N0{ 1, 0, 0 };
|
|
57
|
-
// constexpr float3 N1{ 0, 1, 0 };
|
|
58
|
-
// constexpr float3 N2{ 0, 0, 1 };
|
|
59
|
-
//
|
|
60
|
-
// constexpr mat3f A1 = { // this is the projection of N0, N1, N2 to SH space
|
|
61
|
-
// float3{ -N0.y, N0.z, -N0.x },
|
|
62
|
-
// float3{ -N1.y, N1.z, -N1.x },
|
|
63
|
-
// float3{ -N2.y, N2.z, -N2.x }
|
|
64
|
-
// };
|
|
65
|
-
//
|
|
66
|
-
// const mat3f invA1 = inverse(A1);
|
|
67
|
-
|
|
68
|
-
const invA1TimesK = [
|
|
69
|
-
0, -1, 0,
|
|
70
|
-
0, 0, 1,
|
|
71
|
-
-1, 0, 0
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
const R1OverK = [
|
|
75
|
-
-M[1], M[2], -M[0],
|
|
76
|
-
-M[4], M[5], -M[3],
|
|
77
|
-
-M[7], M[8], -M[6]
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
mat3.scale(invA1TimesK, invA1TimesK, band1);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
mat3.multiply(R1OverK, R1OverK, invA1TimesK);
|
|
85
|
-
|
|
86
|
-
return R1OverK;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* This projects a vec3 to SH2/k space (i.e. we premultiply by 1/k)
|
|
91
|
-
* below can't be constexpr
|
|
92
|
-
* @param {number} x
|
|
93
|
-
* @param {number} y
|
|
94
|
-
* @param {number} z
|
|
95
|
-
* @return {number[]} vec5
|
|
96
|
-
*/
|
|
97
|
-
function project_v3_to_sh(x, y, z) {
|
|
98
|
-
return [
|
|
99
|
-
(y * x),
|
|
100
|
-
-(y * z),
|
|
101
|
-
1 / (2 * M_SQRT_3) * ((3 * z * z - 1)),
|
|
102
|
-
-(z * x),
|
|
103
|
-
0.5 * ((x * x - y * y))
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
*
|
|
109
|
-
* @param {number[]} band2 vec5
|
|
110
|
-
* @param {number[]} M mat3
|
|
111
|
-
* @return {number[]} vec5
|
|
112
|
-
*/
|
|
113
|
-
function rotateShericalHarmonicBand2(band2, M) {
|
|
114
|
-
const n = F_SQRT1_2;
|
|
115
|
-
|
|
116
|
-
// Below we precompute (with help of Mathematica):
|
|
117
|
-
// constexpr float3 N0{ 1, 0, 0 };
|
|
118
|
-
// constexpr float3 N1{ 0, 0, 1 };
|
|
119
|
-
// constexpr float3 N2{ n, n, 0 };
|
|
120
|
-
// constexpr float3 N3{ n, 0, n };
|
|
121
|
-
// constexpr float3 N4{ 0, n, n };
|
|
122
|
-
// constexpr float M_SQRT_PI = 1.7724538509f;
|
|
123
|
-
// constexpr float M_SQRT_15 = 3.8729833462f;
|
|
124
|
-
// constexpr float k = M_SQRT_15 / (2.0f * M_SQRT_PI);
|
|
125
|
-
// --> k * inverse(mat5{project(N0), project(N1), project(N2), project(N3), project(N4)})
|
|
126
|
-
const invATimesK = [
|
|
127
|
-
0, 1, 2, 0, 0,
|
|
128
|
-
-1, 0, 0, 0, -2,
|
|
129
|
-
0, M_SQRT_3, 0, 0, 0,
|
|
130
|
-
1, 1, 0, -2, 0,
|
|
131
|
-
2, 1, 0, 0, 0
|
|
132
|
-
];
|
|
133
|
-
|
|
134
|
-
// this is: invA * k * band2
|
|
135
|
-
// 5x5 matrix by vec5 (this a lot of zeroes and constants, which the compiler should eliminate)
|
|
136
|
-
const invATimesKTimesBand2 = multiply_5d(invATimesK, band2);
|
|
137
|
-
|
|
138
|
-
// this is: mat5{project(N0), project(N1), project(N2), project(N3), project(N4)} / k
|
|
139
|
-
// (the 1/k comes from project(), see above)
|
|
140
|
-
const ROverK =
|
|
141
|
-
project_v3_to_sh(M[0], M[1], M[2]) // M * N0
|
|
142
|
-
.concat(project_v3_to_sh(M[6], M[7], M[8])) // M * N1
|
|
143
|
-
.concat(project_v3_to_sh(n * (M[0] + M[3]), n * (M[1] + M[4]), n * (M[2] + M[5]))) // M * N2
|
|
144
|
-
.concat(project_v3_to_sh(n * (M[0] + M[6]), n * (M[1] + M[7]), n * (M[2] + M[8]))) // M * N3
|
|
145
|
-
.concat(project_v3_to_sh(n * (M[3] + M[6]), n * (M[4] + M[7]), n * (M[5] + M[8]))) // M * N4
|
|
146
|
-
;
|
|
147
|
-
|
|
148
|
-
// notice how "k" disappears
|
|
149
|
-
// this is: (R / k) * (invA * k) * band2 == R * invA * band2
|
|
150
|
-
const result = multiply_5d(ROverK, invATimesKTimesBand2);
|
|
151
|
-
|
|
152
|
-
return result;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
14
|
/**
|
|
156
15
|
* SH from environment with high dynamic range (or high frequencies -- high dynamic range creates
|
|
157
16
|
* high frequencies) exhibit "ringing" and negative values when reconstructed.
|
|
158
17
|
* To mitigate this, we need to low-pass the input image -- or equivalently window the SH by
|
|
159
18
|
* coefficient that tapper towards zero with the band.
|
|
160
19
|
*
|
|
161
|
-
* We use ideas and techniques from
|
|
162
|
-
*
|
|
163
|
-
* Deringing Spherical Harmonics
|
|
164
|
-
* by Peter-Pike Sloan
|
|
165
|
-
* https://www.ppsloan.org/publications/shdering.pdf
|
|
166
|
-
* @param {number} w
|
|
20
|
+
* We use ideas and techniques from Stupid Spherical Harmonics (SH) Deringing Spherical Harmonics by Peter-Pike Sloan ( see https://www.ppsloan.org/publications/shdering.pdf )
|
|
21
|
+
* @param {number} w cutoff
|
|
167
22
|
* @param {number} l
|
|
168
23
|
* @returns {number}
|
|
169
24
|
*/
|
|
170
|
-
function
|
|
25
|
+
function sinc_window(l, w) {
|
|
171
26
|
if (l === 0) {
|
|
172
27
|
return 1.0;
|
|
173
28
|
} else if (l >= w) {
|
|
@@ -176,7 +31,7 @@ function sincWindow(l, w) {
|
|
|
176
31
|
|
|
177
32
|
// we use a sinc window scaled to the desired window size in bands units
|
|
178
33
|
// a sinc window only has zonal harmonics
|
|
179
|
-
let x = (
|
|
34
|
+
let x = (Math.PI * l) / w;
|
|
180
35
|
|
|
181
36
|
x = Math.sin(x) / x;
|
|
182
37
|
|
|
@@ -188,52 +43,15 @@ function sincWindow(l, w) {
|
|
|
188
43
|
}
|
|
189
44
|
|
|
190
45
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* @param {number[]}
|
|
194
|
-
* @param {number[]} M mat3
|
|
195
|
-
*/
|
|
196
|
-
function rotate_sh3_bands(result, sh, M) {
|
|
197
|
-
|
|
198
|
-
const b0 = sh[0];
|
|
199
|
-
const band1 = [sh[1], sh[2], sh[3]];
|
|
200
|
-
const b1 = rotateShericalHarmonicBand1(band1, M);
|
|
201
|
-
const band2 = [sh[4], sh[5], sh[6], sh[7], sh[8]];
|
|
202
|
-
const b2 = rotateShericalHarmonicBand2(band2, M);
|
|
203
|
-
|
|
204
|
-
result[0] = b0;
|
|
205
|
-
|
|
206
|
-
result[1] = b1[0];
|
|
207
|
-
result[2] = b1[1];
|
|
208
|
-
result[3] = b1[2];
|
|
209
|
-
|
|
210
|
-
result[4] = b2[0];
|
|
211
|
-
result[5] = b2[1];
|
|
212
|
-
result[6] = b2[2];
|
|
213
|
-
result[7] = b2[3];
|
|
214
|
-
result[8] = b2[4];
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
*
|
|
219
|
-
* @param {number[]} input_sh3 sh3
|
|
46
|
+
* Minimum values encoded on the spherical harmonics
|
|
47
|
+
* Lets us find ringing artifacts, which are cases where harmonics encode a negative value
|
|
48
|
+
* @param {number[]|Float32Array} input_sh3 sh3
|
|
220
49
|
* @returns {number}
|
|
221
50
|
*/
|
|
222
|
-
function
|
|
51
|
+
function sh3_min(input_sh3) {
|
|
223
52
|
// See "Deringing Spherical Harmonics" by Peter-Pike Sloan
|
|
224
53
|
// https://www.ppsloan.org/publications/shdering.pdf
|
|
225
54
|
|
|
226
|
-
const A = [
|
|
227
|
-
1.0 / (2.0 * M_SQRT_PI), // 0: 0 0
|
|
228
|
-
-M_SQRT_3 / (2.0 * M_SQRT_PI), // 1: 1 -1
|
|
229
|
-
M_SQRT_3 / (2.0 * M_SQRT_PI), // 2: 1 0
|
|
230
|
-
-M_SQRT_3 / (2.0 * M_SQRT_PI), // 3: 1 1
|
|
231
|
-
M_SQRT_15 / (2.0 * M_SQRT_PI), // 4: 2 -2
|
|
232
|
-
-M_SQRT_15 / (2.0 * M_SQRT_PI), // 5: 2 -1
|
|
233
|
-
M_SQRT_5 / (4.0 * M_SQRT_PI), // 6: 2 0
|
|
234
|
-
-M_SQRT_15 / (2.0 * M_SQRT_PI), // 7: 2 1
|
|
235
|
-
M_SQRT_15 / (4.0 * M_SQRT_PI) // 8: 2 2
|
|
236
|
-
];
|
|
237
55
|
|
|
238
56
|
// first this to do is to rotate the SH to align Z with the optimal linear direction
|
|
239
57
|
const dir = vec3.fromValues(-input_sh3[3], -input_sh3[1], input_sh3[2]);
|
|
@@ -259,7 +77,7 @@ function shmin(input_sh3) {
|
|
|
259
77
|
|
|
260
78
|
const f = new Float32Array(9);
|
|
261
79
|
|
|
262
|
-
|
|
80
|
+
sh3_rotate(f, input_sh3, M);
|
|
263
81
|
// here we're guaranteed to have normalize(float3{ -f[3], -f[1], f[2] }) == { 0, 0, 1 }
|
|
264
82
|
|
|
265
83
|
|
|
@@ -270,7 +88,7 @@ function shmin(input_sh3) {
|
|
|
270
88
|
// of z such as: m2min = -m2max * (1 - z^2) = m2max * z^2 - m2max
|
|
271
89
|
// with m2max = A[8] * std::sqrt(f[8] * f[8] + f[4] * f[4]);
|
|
272
90
|
// We can therefore include this in the ZH min computation (which is function of z^2 as well)
|
|
273
|
-
const m2max =
|
|
91
|
+
const m2max = SH3_COEFFICIENTS[8] * Math.sqrt(f[8] * f[8] + f[4] * f[4]);
|
|
274
92
|
|
|
275
93
|
// Find the min of the zonal harmonics
|
|
276
94
|
// -----------------------------------
|
|
@@ -286,9 +104,9 @@ function shmin(input_sh3) {
|
|
|
286
104
|
//
|
|
287
105
|
// We also needs to check that -1 < z < 1, otherwise the min is either in z = -1 or 1
|
|
288
106
|
//
|
|
289
|
-
const a = 3 *
|
|
290
|
-
const b =
|
|
291
|
-
const c =
|
|
107
|
+
const a = 3 * SH3_COEFFICIENTS[6] * f[6] + m2max;
|
|
108
|
+
const b = SH3_COEFFICIENTS[2] * f[2];
|
|
109
|
+
const c = SH3_COEFFICIENTS[0] * f[0] - SH3_COEFFICIENTS[6] * f[6] - m2max;
|
|
292
110
|
|
|
293
111
|
const zmin = -b / (2.0 * a);
|
|
294
112
|
const m0min_z = a * zmin * zmin + b * zmin + c;
|
|
@@ -304,7 +122,7 @@ function shmin(input_sh3) {
|
|
|
304
122
|
// The function considered is:
|
|
305
123
|
// Y(x, y, z) = A[5] * f[5] * s.y * s.z
|
|
306
124
|
// + A[7] * f[7] * s.z * s.x
|
|
307
|
-
const d =
|
|
125
|
+
const d = SH3_COEFFICIENTS[4] * Math.sqrt(f[5] * f[5] + f[7] * f[7]);
|
|
308
126
|
|
|
309
127
|
// the |m|=1 function is minimal in -0.5 -- use that to skip the Newton's loop when possible
|
|
310
128
|
let minimum = m0min - 0.5 * d;
|
|
@@ -315,7 +133,7 @@ function shmin(input_sh3) {
|
|
|
315
133
|
|
|
316
134
|
|
|
317
135
|
let dz;
|
|
318
|
-
let z = -
|
|
136
|
+
let z = -Math.SQRT1_2; // we start guessing at the min of |m|=1 function
|
|
319
137
|
do {
|
|
320
138
|
minimum = func_(z, a, b, c, d); // evaluate our function
|
|
321
139
|
dz = increment_(z, a, b, d); // refine our guess by this amount
|
|
@@ -366,14 +184,22 @@ function increment_(x, a, b, d) {
|
|
|
366
184
|
* @param {number} numBands
|
|
367
185
|
*/
|
|
368
186
|
function windowing(f, cutoff, numBands) {
|
|
187
|
+
|
|
369
188
|
for (let l = 0; l < numBands; l++) {
|
|
370
|
-
|
|
189
|
+
|
|
190
|
+
const w = sinc_window(l, cutoff);
|
|
191
|
+
|
|
371
192
|
f[sh_index(0, l)] *= w;
|
|
193
|
+
|
|
372
194
|
for (let m = 1; m <= l; m++) {
|
|
195
|
+
|
|
373
196
|
f[sh_index(-m, l)] *= w;
|
|
374
197
|
f[sh_index(m, l)] *= w;
|
|
198
|
+
|
|
375
199
|
}
|
|
200
|
+
|
|
376
201
|
}
|
|
202
|
+
|
|
377
203
|
return f;
|
|
378
204
|
}
|
|
379
205
|
|
|
@@ -390,7 +216,8 @@ function windowing(f, cutoff, numBands) {
|
|
|
390
216
|
function windowSH(
|
|
391
217
|
output, output_offset,
|
|
392
218
|
input, input_offset,
|
|
393
|
-
numBands, channel_count,
|
|
219
|
+
numBands, channel_count,
|
|
220
|
+
cutoff = 0
|
|
394
221
|
) {
|
|
395
222
|
assert.isNonNegativeInteger(channel_count, 'channel_count');
|
|
396
223
|
assert.greaterThan(channel_count, 0, 'channel_count must be greater than 0');
|
|
@@ -424,7 +251,9 @@ function windowSH(
|
|
|
424
251
|
|
|
425
252
|
const m = 0.5 * (l + r);
|
|
426
253
|
|
|
427
|
-
|
|
254
|
+
windowing(SH, m, numBands);
|
|
255
|
+
|
|
256
|
+
if (sh3_min(SH) < 0) {
|
|
428
257
|
r = m;
|
|
429
258
|
} else {
|
|
430
259
|
l = m;
|
|
@@ -442,7 +271,7 @@ function windowSH(
|
|
|
442
271
|
|
|
443
272
|
for (let l = 0; l < numBands; l++) {
|
|
444
273
|
// scale each band individually
|
|
445
|
-
|
|
274
|
+
const w = sinc_window(l, cutoff);
|
|
446
275
|
|
|
447
276
|
// write zonal harmonic
|
|
448
277
|
for (let i = 0; i < channel_count; i++) {
|
|
@@ -461,9 +290,9 @@ function windowSH(
|
|
|
461
290
|
|
|
462
291
|
/**
|
|
463
292
|
*
|
|
464
|
-
* @param {number[]|Float32Array} result
|
|
293
|
+
* @param {number[]|Float32Array|Float64Array} result
|
|
465
294
|
* @param {number} result_offset
|
|
466
|
-
* @param {number[]|Float32Array} harmonics
|
|
295
|
+
* @param {number[]|Float32Array|Float64Array} harmonics
|
|
467
296
|
* @param {number} harmonics_offset
|
|
468
297
|
* @param {number} dimension_count
|
|
469
298
|
*/
|