@woosh/meep-engine 3.78.3 → 3.79.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/CHANGELOG.md +80 -13
- package/editor/view/node-graph/NodeGraphView.d.ts +1 -1
- package/editor/view/node-graph/NodeGraphView.js +1 -1
- package/package.json +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts +2 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.d.ts.map +1 -1
- package/src/core/math/physics/brdf/fresnel_Schlick_optimized.js +2 -1
- package/src/core/math/snap_to_integer.d.ts +13 -0
- package/src/core/math/snap_to_integer.d.ts.map +1 -0
- package/src/core/math/snap_to_integer.js +20 -0
- package/src/core/model/node-graph/NodeGraph.d.ts +0 -1
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +0 -1
- package/src/engine/asset/GameAssetType.d.ts +2 -0
- package/src/engine/asset/GameAssetType.js +10 -0
- package/src/engine/asset/guessAssetType.d.ts.map +1 -1
- package/src/engine/asset/guessAssetType.js +4 -0
- package/src/engine/asset/load_model_scene_bundle.d.ts +1 -1
- package/src/engine/asset/load_model_scene_bundle.js +2 -2
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.d.ts +42 -0
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/MTFSceneBundleAssetLoader.js +83 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.d.ts +36 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.d.ts.map +1 -0
- package/src/engine/asset/loaders/MTFTextureAssetLoader.js +78 -0
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.d.ts +6 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.d.ts.map +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +8 -2
- package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +1 -1
- package/src/engine/graphics/hair/groom_bind_to_mesh.js +1 -1
- package/src/engine/graphics/hair/groom_build_guides.d.ts +1 -1
- package/src/engine/graphics/hair/groom_build_guides.js +1 -1
- package/src/engine/graphics/impostors/voxel/README.md +11 -11
- package/src/engine/physics/cloth/collider/ClothColliderKind.js +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +1 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts +2 -3
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.d.ts.map +1 -1
- package/src/engine/physics/cloth/solver/constraint/cloth_backstop_row.js +2 -3
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts +0 -2
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +0 -5
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerCubic.js +5 -3
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.d.ts.map +1 -1
- package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +5 -3
- package/src/generation/grid/coords/grid_to_texel.d.ts +7 -1
- package/src/generation/grid/coords/grid_to_texel.d.ts.map +1 -1
- package/src/generation/grid/coords/grid_to_texel.js +11 -1
- package/src/generation/grid/coords/grid_to_texel_span.d.ts +15 -0
- package/src/generation/grid/coords/grid_to_texel_span.d.ts.map +1 -0
- package/src/generation/grid/coords/grid_to_texel_span.js +38 -0
- package/src/generation/grid/coords/texel_to_grid.d.ts +2 -1
- package/src/generation/grid/coords/texel_to_grid.d.ts.map +1 -1
- package/src/generation/grid/coords/texel_to_grid.js +6 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts +32 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskWaveFunctionCollapse.js +114 -9
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts +8 -0
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +91 -29
- package/src/generation/grid/layers/GridDataLayer.d.ts +21 -2
- package/src/generation/grid/layers/GridDataLayer.d.ts.map +1 -1
- package/src/generation/grid/layers/GridDataLayer.js +43 -4
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts +7 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionPlaceTags.js +42 -16
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts +5 -0
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.d.ts.map +1 -1
- package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +32 -9
- package/src/generation/rules/CellMatcherLayerBitMaskTest.d.ts.map +1 -1
- package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts +4 -2
- package/src/generation/wfc/GridWFCCompiledTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCCompiledTileSet.js +2 -2
- package/src/generation/wfc/GridWFCTileSet.d.ts +16 -7
- package/src/generation/wfc/GridWFCTileSet.d.ts.map +1 -1
- package/src/generation/wfc/GridWFCTileSet.js +32 -8
- package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +2 -2
- package/src/shade/playground/particle_editor/README.md +2 -2
- package/src/shade/playground/probe_clipmap/index.html +1 -1
- package/src/shade/playground/screen_probes/README.md +5 -5
- package/src/shade/playground/screen_probes/main.js +1 -1
- package/src/shade/playground/tonemap_sdr/README.md +3 -2
- package/src/shade/playground/vgeo_scene/README.md +1 -3
- package/src/shade/playground/vgeo_scene/main.js +3 -3
- package/src/shade/renderer/Renderer.d.ts +3 -3
- package/src/shade/renderer/Renderer.js +4 -4
- package/src/shade/renderer/ShadeIndirectLightingMode.js +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +1 -1
- package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.d.ts +33 -0
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/animation/ShadeAnimationClipSerializationAdapter.js +196 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.d.ts +25 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/animation/SkinSerializationAdapter.js +85 -0
- package/src/shade/renderer/camera/PerspectiveCamera.js +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts +11 -13
- package/src/shade/renderer/deferred/tonemap/ColorGrade.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/ColorGrade.js +11 -13
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/TONE_MAP_OPERATOR_ACES.js +6 -7
- package/src/shade/renderer/deferred/tonemap/ToneMapper.d.ts +1 -1
- package/src/shade/renderer/deferred/tonemap/ToneMapper.js +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts +6 -8
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.d.ts.map +1 -1
- package/src/shade/renderer/deferred/tonemap/m3_white_balance_rec709.js +7 -10
- package/src/shade/renderer/geometry/sdf/MESH_SDF.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/MESH_SDF.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_classify.js +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/bake/shader_mesh_sdf_evaluate.js +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +1 -2
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +1 -2
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_scene_point_query_volume_sign.js +2 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/surface/MESH_SURFACE_BAKE.js +1 -1
- package/src/shade/renderer/geometry/virtual/build/level/vgeo_build_cluster_graph.js +1 -1
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/format/page/VGEO_DEFAULT_PAGE_SIZE.js +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.d.ts +2 -2
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_access.js +4 -4
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.d.ts +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/chunk_vgeo_cut_instance.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/cut/shader_vgeo_cut_collect.js +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.d.ts +3 -3
- package/src/shade/renderer/geometry/virtual/runtime/layout/VGEO_INSTANCE_OFFSET.js +3 -3
- package/src/shade/renderer/global_illumination/brick4/README.md +2 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +4 -6
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/BRICK_MOVERS.js +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.d.ts +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/chunk_mesh_brick_texel.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +28 -35
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +21 -24
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +8 -8
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_brdf_density.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_interpolate.js +3 -5
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_lighting_history.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +2 -3
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.d.ts +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_screen_march.js +4 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_surface.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_brick.js +2 -4
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +13 -17
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_importance.js +11 -14
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.d.ts +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_pick.js +2 -2
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.d.ts +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_place.js +9 -9
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +15 -18
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +16 -19
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts +10 -11
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_trace_screen.js +11 -12
- package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -1
- package/src/shade/renderer/hair/GPUHairSystem.js +16 -7
- package/src/shade/renderer/hair/HAIR.d.ts +5 -3
- package/src/shade/renderer/hair/HAIR.d.ts.map +1 -1
- package/src/shade/renderer/hair/HAIR.js +6 -4
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +9 -8
- package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_bsdf.js +10 -9
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +5 -6
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -1
- package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +5 -6
- package/src/shade/renderer/hair/hair_lighting.d.ts +3 -3
- package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -1
- package/src/shade/renderer/hair/hair_lighting.js +4 -5
- package/src/shade/renderer/hair/hair_scattering_lut.d.ts +5 -5
- package/src/shade/renderer/hair/hair_scattering_lut.js +5 -5
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts +10 -10
- package/src/shade/renderer/hair/hair_shadow_draw.d.ts.map +1 -1
- package/src/shade/renderer/hair/hair_shadow_draw.js +21 -17
- package/src/shade/renderer/hair/shader_hair_cull.d.ts.map +1 -1
- package/src/shade/renderer/hair/shader_hair_cull.js +6 -2
- package/src/shade/renderer/hair/shader_hair_roots.d.ts +2 -2
- package/src/shade/renderer/hair/shader_hair_roots.js +2 -2
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts +5 -4
- package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts.map +1 -1
- package/src/shade/renderer/hair/shader_hair_shadow_list.js +10 -12
- package/src/shade/renderer/light/environment/DEFINES.d.ts +1 -1
- package/src/shade/renderer/light/environment/DEFINES.js +1 -1
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +2 -2
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.d.ts +38 -0
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/loader/SceneNodeSerializationAdapter.js +198 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.d.ts +88 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTFTexture.js +159 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.d.ts +30 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTFTextureSerializationAdapter.js +136 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_MAGIC.js +6 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.d.ts +8 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_PACKAGE_VERSION.js +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_MAGIC.js +6 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.d.ts +7 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/MTF_TEXTURE_VERSION.js +6 -0
- package/src/shade/renderer/loader/mtf/load_mtf.d.ts +41 -0
- package/src/shade/renderer/loader/mtf/load_mtf.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/load_mtf.js +73 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.d.ts +19 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_bundle_textures.js +57 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.d.ts +9 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_encode_texture.js +78 -0
- package/src/shade/renderer/loader/mtf/mtf_export.d.ts +45 -0
- package/src/shade/renderer/loader/mtf/mtf_export.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_export.js +161 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.d.ts +9 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_is_texture.js +12 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.d.ts +24 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_collection.js +37 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.d.ts +27 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_scene.js +121 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.d.ts +18 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_read_textures.js +51 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.d.ts +21 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_resolve_uri.js +98 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.d.ts +25 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_serialization_registry.js +51 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.d.ts +20 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_read.js +80 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.d.ts +24 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_select.js +42 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.d.ts +31 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_texture_write.js +87 -0
- package/src/shade/renderer/loader/mtf/mtf_write.d.ts +36 -0
- package/src/shade/renderer/loader/mtf/mtf_write.d.ts.map +1 -0
- package/src/shade/renderer/loader/mtf/mtf_write.js +161 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.d.ts +39 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.d.ts.map +1 -0
- package/src/shade/renderer/material/StandardShadeMaterialSerializationAdapter.js +207 -0
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts +1 -2
- package/src/shade/renderer/material/dispatch/MaterialDispatch.d.ts.map +1 -1
- package/src/shade/renderer/material/dispatch/MaterialDispatch.js +1 -2
- package/src/shade/renderer/material/standard/fragment_gbuffer.d.ts.map +1 -1
- package/src/shade/renderer/material/standard/fragment_gbuffer.js +2 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.d.ts +1 -1
- package/src/shade/renderer/material/util/dielectric_specular_color.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_CONFIG.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_PRESETS.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_SETTINGS_STRUCT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DOF2_TEXTURE_FORMAT.js +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +3 -4
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +3 -4
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +1 -1
- package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +1 -1
- package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/gtao/ao_reproject_shader.js +2 -3
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts +1 -2
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/motion_blur/MOTION_BLUR_CONFIG.js +1 -2
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts +2 -3
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/taa/chunk_fsr2_compute_depth_clip.js +2 -3
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/postprocess/taa/filter_blackman_harris.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +1 -1
- package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +1 -1
- package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +3 -3
- package/src/shade/renderer/restir/di/ReSTIRDI.js +3 -3
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.d.ts +1 -1
- package/src/shade/renderer/restir/di/chunk_restir_trace_visibility.js +1 -1
- package/src/shade/renderer/scene/optimization/source_to_sampler2d.d.ts.map +1 -1
- package/src/shade/renderer/scene/optimization/source_to_sampler2d.js +3 -1
- package/src/shade/renderer/scene/serialization/STANDARD_MATERIAL_SERIALIZED_BYTE_SIZE.d.ts +5 -5
- package/src/shade/renderer/scene/serialization/STANDARD_MATERIAL_SERIALIZED_BYTE_SIZE.js +5 -5
- package/src/shade/renderer/scene/serialization/deserialize_scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/deserialize_scene.js +491 -528
- package/src/shade/renderer/scene/serialization/serialize_scene.d.ts +0 -10
- package/src/shade/renderer/scene/serialization/serialize_scene.d.ts.map +1 -1
- package/src/shade/renderer/scene/serialization/serialize_scene.js +15 -71
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_MIN_DIELECTRICS_F0.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +1 -2
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts +4 -5
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/conversion/chunk_CRM_REC709_AP1.js +4 -5
- package/src/shade/renderer/shader/chunk/color/grade/chunk_color_grade.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +2 -2
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +14 -17
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +18 -21
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_filter_blackman_harris229.js +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +3 -4
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +3 -4
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +1 -1
- package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +3 -3
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +6 -8
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +8 -10
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +5 -7
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -1
- package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +5 -7
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.d.ts +11 -0
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.d.ts.map +1 -0
- package/src/shade/renderer/texture/format/gpu_texture_format_without_srgb.js +14 -0
- package/src/shade/renderer/texture/texture_role_image_quality.d.ts +10 -0
- package/src/shade/renderer/texture/texture_role_image_quality.d.ts.map +1 -0
- package/src/shade/renderer/texture/texture_role_image_quality.js +29 -0
- package/src/shade/renderer/texture/virtual/README.md +257 -257
- package/src/shade/renderer/volumetrics/shader_volumetrics_build_lighting.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
### MTF: a model package in the engine's own form
|
|
6
|
+
|
|
7
|
+
- **Added:** MTF, meep transfer format (`shade/renderer/loader/mtf/DESIGN.md`). A package, `.mtf`, holds a model
|
|
8
|
+
as the engine uses it: nodes, meshlet geometry with its tree, materials, skins and animation clips, each written
|
|
9
|
+
by a `BinaryClassSerializationAdapter` in a `BinaryCollectionSerializer` collection, so a package written at an
|
|
10
|
+
earlier version of a class is brought up to date on read. Textures are files outside the package, named by URI
|
|
11
|
+
and shared by any number of packages: one file a GPU format (`.mtt`, the texels as a device takes them, mip
|
|
12
|
+
levels coarsest first) and a fallback that may be any image. A device fetches the one file it can sample.
|
|
13
|
+
- **Added:** `load_mtf(url, { assetManager, scope, texture_support })`, and `MTFSceneBundleAssetLoader` for
|
|
14
|
+
`GameAssetType.ModelMTF`, constructed with `gpu_texture_compression_support(device)`. It registers
|
|
15
|
+
`MTFTextureAssetLoader` (`GameAssetType.TextureMTF`) itself. `guessAssetType` knows `.mtf` and `.mtt`, and
|
|
16
|
+
`load_model_scene_bundle` takes a package.
|
|
17
|
+
- **Added:** `mtf_write(bundle, texture_variants)` and `mtf_texture_write(texel_data)`, and over them
|
|
18
|
+
`mtf_export({ bundle, name, optimize, encode_texture })`, which returns every file of a model by its path.
|
|
19
|
+
`optimize` runs `scene_optimize` on the bundle first. `encode_texture` builds a texture's files; the default
|
|
20
|
+
writes an AVIF fallback for decoded pixels, a texture file for texels every device samples, and no block formats.
|
|
21
|
+
- **Added:** `StandardShadeMaterialSerializationAdapter`, `SceneNodeSerializationAdapter`,
|
|
22
|
+
`SkinSerializationAdapter` and `ShadeAnimationClipSerializationAdapter`. A clip's record holds each curve once
|
|
23
|
+
and its channels name curves by index, so curves shared between components stay shared.
|
|
24
|
+
- **Changed:** a SHADE scene's materials are written and read through `StandardShadeMaterialSerializationAdapter`.
|
|
25
|
+
The bytes are the same. `material_write_standard` is no longer exported from `serialize_scene.js`, and a scene
|
|
26
|
+
whose material names a texture the file does not hold is now refused on read.
|
|
27
|
+
- **Fixed:** `scene_optimize` threw `ImageBitmap is not defined` outside a browser when a material's texture was
|
|
28
|
+
already texels in a GPU format.
|
|
29
|
+
- **Added:** `BinaryCollectionSerializer.initialize({ dictionary })`. `false` writes every value whole. The
|
|
30
|
+
dictionary, still on by default, writes a value equal to an earlier one as a reference to it, which loses
|
|
31
|
+
whatever the class's `equals` does not look at; a package is written with it off.
|
|
32
|
+
- **Added:** `gpu_texture_format_without_srgb(format)`: the name stored texels go under.
|
|
33
|
+
- **Added:** `@woosh/gltf2mtf`, a package of its own beside the engine (`packages/gltf2mtf`): a command that
|
|
34
|
+
converts glTF and GLB models to MTF, `npx @woosh/gltf2mtf <models> --out <folder>`. The textures of every model
|
|
35
|
+
go to one folder the packages share, a file named by a digest of what it holds, so models that use the same image
|
|
36
|
+
share one file, in one run and across runs. Images are written as AVIF on every core but one, or copied with
|
|
37
|
+
`--images copy`. The scene optimizer runs over each model first, unless `--no-optimize` is given.
|
|
38
|
+
|
|
5
39
|
### Generation: wave function collapse over a grid
|
|
6
40
|
|
|
7
41
|
- **Added:** `GridTaskWaveFunctionCollapse`, a grid task that lays the tiles of a `GridWFCTileSet` over the whole
|
|
@@ -14,6 +48,39 @@
|
|
|
14
48
|
turns and compiled to a `WFCRuleTable`. `add_piece` makes a piece of several cells, joined edge to edge, that only
|
|
15
49
|
ever appears whole; `compile().lint()` names a tile showing a socket nothing answers and tiles that can never share
|
|
16
50
|
a result (`WFC_DESIGN.md` §13).
|
|
51
|
+
- **Added:** `GridTaskWaveFunctionCollapse` is laid on a `GridDataLayer`, named by `layer`, and leaves its result
|
|
52
|
+
there: each texel holds the value of the tile laid on it, written before any tile's action runs, so the stages
|
|
53
|
+
after it read what was laid as they read any layer. `GridWFCTileSet.add` and `add_piece` take that `value`; it is
|
|
54
|
+
the prototype's index unless given. At resolution `1/n` a tile stands for a block of `n` by `n` cells, for art that
|
|
55
|
+
size — a paving slab two cells across — and the layer has to be stretched. A restriction holds on a block when every
|
|
56
|
+
one of its cells matches, so a restriction and its negation never both hold on one; a tile's action runs once for
|
|
57
|
+
its block, written from the block's first cell and turned about the block's centre; a row or column of blocks the
|
|
58
|
+
grid cuts short holds no tile. At resolution 1 a tile is a cell.
|
|
59
|
+
|
|
60
|
+
### Generation: a grid layer can be stretched over the grid
|
|
61
|
+
|
|
62
|
+
- **Added:** `GridDataLayer` `stretch` (`GridDataLayer.from(id, type, resolution, stretch)`). A stretched layer's
|
|
63
|
+
texel `t` covers the cells from `t / resolution` to `(t + 1) / resolution`, counted from the grid's first corner,
|
|
64
|
+
and the layer has as many texels as covering the grid takes, so a grid of any size will do: at resolution 0.25 a
|
|
65
|
+
ten-cell grid is three texels, the last reaching past its edge. Unstretched, as before, texel `t` is centred on
|
|
66
|
+
cell `t / resolution` and the grid must be a whole number of texels; at resolution ½ that leaves the last cell of
|
|
67
|
+
the grid past the last texel (`generation/COORDINATES.md`, `WFC_DESIGN.md` §13).
|
|
68
|
+
- **Changed:** `grid_to_texel` and `texel_to_grid` take the layer's `stretch` after its resolution, and every reader
|
|
69
|
+
and writer of a layer goes through them. `CellFilterSampleLayerLinear` and `CellFilterSampleLayerCubic` map by the
|
|
70
|
+
layer's resolution rather than by the ratio of its sampler to the grid, which is the same wherever the grid sized
|
|
71
|
+
the sampler. A write to a stretched layer finer than the grid fills every texel of its cell (`grid_to_texel_span`),
|
|
72
|
+
so a sampling filter at the cell reads back what was written.
|
|
73
|
+
- **Fixed:** `GridCellActionPlaceTags` and `GridTaskBuildSourceDistanceMap` honour a layer's resolution. Tags land
|
|
74
|
+
in the texels a writer at their cell would set, where `CellMatcherLayerBitMaskTest` reads them, and on a coarser
|
|
75
|
+
layer combine in the texel holding their cells. The distance map searches the layer's texels: on a coarser layer a
|
|
76
|
+
texel is a source if any of its cells is and passable if all of them are, so a wall one cell thick still stops it;
|
|
77
|
+
distances are in cells, counted in whole steps and converted to the layer's type once, at the end. Both assumed
|
|
78
|
+
resolution 1: tags landed on the texel numbered like their cell, and the distance map indexed the layer by cell.
|
|
79
|
+
- **Fixed:** a position off the grid neither matches `CellMatcherLayerBitMaskTest` nor is written by
|
|
80
|
+
`GridCellActionWriteFilterToLayer` or `GridCellActionPlaceTags`, even where a texel of a coarser layer reaches it;
|
|
81
|
+
the bounds are checked in grid space. At resolution 1 nothing changes.
|
|
82
|
+
- **Fixed:** a layer added to a grid of one cell gets its texel. A layer started out sized for one cell with an empty
|
|
83
|
+
sampler, so resizing it to one cell was skipped.
|
|
17
84
|
|
|
18
85
|
### Cloth: a cloth that slides is not pulled back to where it landed
|
|
19
86
|
|
|
@@ -344,11 +411,11 @@ Migrating:
|
|
|
344
411
|
- **Added:** `ColorGrade`, as `renderer.tone_mapper.grade`, neutral by default and baked into the tone mapper's LUTs
|
|
345
412
|
ahead of the operator, so it costs nothing per pixel. Any change bakes both LUTs again; a LUT the user supplies is
|
|
346
413
|
not graded. In order:
|
|
347
|
-
- white balance:
|
|
414
|
+
- white balance: a temperature and tint white balance (`white_temperature`, `white_tint`), Planckian and daylight
|
|
348
415
|
loci, Bradford to D65;
|
|
349
|
-
- primaries
|
|
350
|
-
`
|
|
351
|
-
|
|
416
|
+
- primaries in AP1: saturation, contrast, gamma, gain and offset for `global`, `shadows`, `midtones` and
|
|
417
|
+
`highlights` (`ColorGradeZone`, each a `Vector4` of RGB and master), blended by `shadows_max`, `highlights_min`
|
|
418
|
+
and `highlights_max`;
|
|
352
419
|
- hue curves: `hue_shift` (degrees), `hue_saturation` (chroma multiplier) and `hue_lightness` (stops), each an
|
|
353
420
|
`AnimationCurve` over the OkLCh hue in degrees. Lightness is exposure at the colour's chromaticity, weighted by
|
|
354
421
|
its saturation against the Rec.709 gamut's edge at its hue, so greys never move.
|
|
@@ -366,11 +433,11 @@ Migrating:
|
|
|
366
433
|
### Tone mapping through a baked 3D LUT
|
|
367
434
|
|
|
368
435
|
- **Added:** `ToneMapper`, owned by the renderer as `renderer.tone_mapper`, made by `initialize`. It bakes its
|
|
369
|
-
`operator` into a 3D LUT per output, at `lut_resolution` (default 32
|
|
436
|
+
`operator` into a 3D LUT per output, at `lut_resolution` (default 32; at least 2, at most the
|
|
370
437
|
device's `maxTextureDimension3D`), and draws every frame through one trilinear fetch. A LUT is baked again only
|
|
371
438
|
when the operator, the resolution or, for HDR, the display's peak (`tone_mapper.display.peak_nits`) changes. A
|
|
372
439
|
LUT maps the PQ signal of exposed scene-linear Rec.709 to the PQ signal of linear Rec.2020 display light, 1 at
|
|
373
|
-
the paper white on both sides; scene colour past 10000 cd/m² (49.3 × SDR white) clamps there
|
|
440
|
+
the paper white on both sides; scene colour past 10000 cd/m² (49.3 × SDR white) clamps there.
|
|
374
441
|
- **Added:** `ToneMapOperator` (a `CodeChunk` defining `tone_map_operator(scene, peak_nits)`, plus `declare`
|
|
375
442
|
and `bind` for bindings of its own), and the built-ins `TONE_MAP_OPERATOR_ACES` (the default),
|
|
376
443
|
`TONE_MAP_OPERATOR_GT7`, `TONE_MAP_OPERATOR_PBR_NEUTRAL` and `TONE_MAP_OPERATOR_NONE`, unchanged in what
|
|
@@ -725,7 +792,7 @@ Migrating:
|
|
|
725
792
|
it traces, just before it traces them; the 819 limit still bounds those, the path tracer and the
|
|
726
793
|
bakers.
|
|
727
794
|
- **Changed:** a probe ray's hit that no card sees, or on a row with no card set (virtual geometry, a
|
|
728
|
-
pair still capturing), brings back no light
|
|
795
|
+
pair still capturing), brings back no light. It took the material's colour factor × its
|
|
729
796
|
textures' means. The colour factor alone, from the scene's table, was measured first and made Sponza's
|
|
730
797
|
bounce-lit gallery 60% brighter on screen; black makes it 27% darker than the means (mean luma 29.3 →
|
|
731
798
|
21.5) and the sunlit nave 1% darker. Virtual geometry has no cards yet, so its surfaces bounce no light.
|
|
@@ -1640,22 +1707,22 @@ Migrating:
|
|
|
1640
1707
|
place of `joint_t_norms`, `joint_radii` and `joint_lengths`. A joint whose span holds no segment is rigid
|
|
1641
1708
|
(compliance 0). `build_tree_wind_rig` returns `null` for a single joint: joint 0 is the anchored trunk base.
|
|
1642
1709
|
|
|
1643
|
-
### ACES
|
|
1710
|
+
### ACES is the default tone mapping
|
|
1644
1711
|
|
|
1645
1712
|
- **Added:** `ShadeToneMappingMode.ACES`, and **Breaking:** it is the renderer's default, where GT7 was. Every
|
|
1646
1713
|
default look changes. Set `renderer.tone_mapping_mode = ShadeToneMappingMode.GT7` to keep the previous one.
|
|
1647
|
-
- SDR is
|
|
1648
|
-
and
|
|
1714
|
+
- SDR is a filmic curve on ACES at fixed settings, with gamut expansion
|
|
1715
|
+
and blue correction around it, evaluated per pixel. An exposed 0.18 shows at 0.18 of SDR white, as
|
|
1649
1716
|
with GT7, at a mid-tone contrast of 1.36 against GT7's 1.05. Shadows are deeper, highlights brighter, and
|
|
1650
1717
|
saturation 12–15% higher on the volumetrics playground.
|
|
1651
|
-
- HDR
|
|
1718
|
+
- HDR keeps the SDR look past 100 cd/m². The SDR picture goes back through the inverse ACES 2.0
|
|
1652
1719
|
output transform for an SDR display, then out through ACES 2.0 for the display's headroom over the paper white.
|
|
1653
1720
|
Both are limited to Rec.709, the SDR picture's gamut, so as the headroom shrinks to none the HDR picture becomes
|
|
1654
1721
|
the SDR one. Mid-grey rises with the peak, as ACES 2.0 is designed to: 0.26 of SDR white at 1000 cd/m².
|
|
1655
1722
|
- The inverse is limited where OpenColorIO's is ill-conditioned. Its decompression is clamped at the estimated
|
|
1656
1723
|
gamut boundary, held to a gain of 5, and faded out over the last unit of J before white. Without these limits, a
|
|
1657
|
-
bright tinted highlight, whose SDR picture
|
|
1658
|
-
white between neighbouring scene values.
|
|
1724
|
+
bright tinted highlight, whose SDR picture the filmic curve clips onto the gamut's surface, jumps by up to a
|
|
1725
|
+
quarter of SDR white between neighbouring scene values.
|
|
1659
1726
|
- **New:** `TonemapAces2Tables`, the HDR pass's two ACES 2.0 output transforms. They are built on the first HDR frame
|
|
1660
1727
|
and rebuilt only when the display's peak changes (7–13 ms).
|
|
1661
1728
|
- **New:** `aces2_transform_block_write`, OpenColorIO 2.6.0's ACES 2.0 parameter and gamut-table setup, and the WGSL
|
|
@@ -109,7 +109,7 @@ export class NodeGraphView extends View {
|
|
|
109
109
|
* Three gestures want that background — moving the view, pulling a selection box across it, and
|
|
110
110
|
* asking for the add-node menu — and a canvas that guessed between them would keep getting it
|
|
111
111
|
* wrong. They are told apart by which button began the gesture, the way graph editors of this
|
|
112
|
-
* kind have long settled it
|
|
112
|
+
* kind have long settled it:
|
|
113
113
|
*
|
|
114
114
|
* | gesture | what it does |
|
|
115
115
|
* |--------------------------|-------------------------------------------------------|
|
|
@@ -858,7 +858,7 @@ export class NodeGraphView extends View {
|
|
|
858
858
|
* Three gestures want that background — moving the view, pulling a selection box across it, and
|
|
859
859
|
* asking for the add-node menu — and a canvas that guessed between them would keep getting it
|
|
860
860
|
* wrong. They are told apart by which button began the gesture, the way graph editors of this
|
|
861
|
-
* kind have long settled it
|
|
861
|
+
* kind have long settled it:
|
|
862
862
|
*
|
|
863
863
|
* | gesture | what it does |
|
|
864
864
|
* |--------------------------|-------------------------------------------------------|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
|
-
* Optimized variant
|
|
3
|
+
* Optimized variant: the spherical Gaussian approximation of Schlick's Fresnel term, from Karis 2013,
|
|
4
|
+
* "Real Shading in Unreal Engine 4", SIGGRAPH 2013 course notes
|
|
4
5
|
* https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
|
|
5
6
|
* @param {number} dotVH
|
|
6
7
|
* @return {number}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fresnel_Schlick_optimized.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/brdf/fresnel_Schlick_optimized.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"fresnel_Schlick_optimized.d.ts","sourceRoot":"","sources":["../../../../../../src/core/math/physics/brdf/fresnel_Schlick_optimized.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,iDAHW,MAAM,GACL,MAAM,CAIjB"}
|
|
@@ -2,7 +2,8 @@ import { exp2 } from "../../exp2.js";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
|
-
* Optimized variant
|
|
5
|
+
* Optimized variant: the spherical Gaussian approximation of Schlick's Fresnel term, from Karis 2013,
|
|
6
|
+
* "Real Shading in Unreal Engine 4", SIGGRAPH 2013 course notes
|
|
6
7
|
* https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf
|
|
7
8
|
* @param {number} dotVH
|
|
8
9
|
* @return {number}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `v`, or the whole number it lies within rounding error of.
|
|
3
|
+
*
|
|
4
|
+
* A product or quotient of two doubles, each within half an ulp of the number meant, lands within `Number.EPSILON` of
|
|
5
|
+
* the result meant, relative to it. So where that result is a whole number this gives it back exactly — `525 * (1/75)`
|
|
6
|
+
* is 7.000000000000001 and `1 / (1/93)` is 92.99999999999999 in doubles — and anything further from a whole number is
|
|
7
|
+
* returned as it is.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} v
|
|
10
|
+
* @returns {number}
|
|
11
|
+
*/
|
|
12
|
+
export function snap_to_integer(v: number): number;
|
|
13
|
+
//# sourceMappingURL=snap_to_integer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snap_to_integer.d.ts","sourceRoot":"","sources":["../../../../src/core/math/snap_to_integer.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,mCAHW,MAAM,GACJ,MAAM,CAUlB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `v`, or the whole number it lies within rounding error of.
|
|
3
|
+
*
|
|
4
|
+
* A product or quotient of two doubles, each within half an ulp of the number meant, lands within `Number.EPSILON` of
|
|
5
|
+
* the result meant, relative to it. So where that result is a whole number this gives it back exactly — `525 * (1/75)`
|
|
6
|
+
* is 7.000000000000001 and `1 / (1/93)` is 92.99999999999999 in doubles — and anything further from a whole number is
|
|
7
|
+
* returned as it is.
|
|
8
|
+
*
|
|
9
|
+
* @param {number} v
|
|
10
|
+
* @returns {number}
|
|
11
|
+
*/
|
|
12
|
+
export function snap_to_integer(v) {
|
|
13
|
+
const whole = Math.round(v);
|
|
14
|
+
|
|
15
|
+
if (Math.abs(v - whole) <= Math.abs(whole) * Number.EPSILON) {
|
|
16
|
+
return whole;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return v;
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeGraph.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/node-graph/NodeGraph.js"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"NodeGraph.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/node-graph/NodeGraph.js"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH;IAEI;;;;OAIG;IACH,uBAAmB;IAEnB;;;;;OAKG;IACH,6BAAyB;IAEzB;;;;;OAKG;IACH,4BAA0B;IAE1B;;;;;OAKG;IACH,kCAAgC;IAQhC;;;;OAIG;IACH,sBAEC;IAED;;;;;;;;;;;;;;OAcG;IACH;QACI;;;WAGG;;QAGH;;;WAGG;;QAGH;;;WAGG;;QAGH;;;WAGG;;MAEL;IAEF;;OAEG;IACH,cAQC;IAED;;;OAGG;IACH,YAFW,SAAS,QAYnB;IAED;;;OAGG;IACH,SAFa,SAAS,CAQrB;IAED;;;;;;OAMG;IACH,aAHW,SAAS,GACP;QAAC,WAAW,EAAC,UAAU,EAAE,CAAC;QAAC,KAAK,EAAC,YAAY,EAAE,CAAA;KAAC,CAe5D;IAED;;;;;;;;;OASG;IACH;QAJmC,KAAK,EAA7B,YAAY,EAAE;QACS,WAAW,GAAlC,UAAU,EAAE;QACV;QAAC,WAAW,EAAC,UAAU,EAAE,CAAC;QAAC,KAAK,EAAC,YAAY,EAAE,CAAA;KAAC,CAmF5D;IAED;;;;OAIG;IACH,8BAHoB,YAAY,+BAK/B;IAED;;;;OAIG;IACH,oCAHoB,UAAU,+BAK7B;IAED;;;;OAIG;IACH,YAFY,YAAY,EAAE,CAIzB;IAED;;;;OAIG;IACH,kBAFY,UAAU,EAAE,CAIvB;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAgBnB;IAED;;;;OAIG;IACH,qDAFa,YAAY,EAAE,CAsB1B;IAED;;;;OAIG;IACH,0DAFa,YAAY,EAAE,CAqB1B;IAED;;;;OAIG;IACH,YAHW,MAAM,GACJ,YAAY,GAAC,SAAS,CAkBlC;IAED;;;;;OAKG;IACH,gBAJW,MAAM,GACJ,YAAY,CAWxB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,UAAU,GAAC,SAAS,CAgBhC;IAED;;;;;OAKG;IACH,+BAJW,MAAM,WACN,MAAM,GACJ,4BAA0B,SAAS,CAY/C;IAED;;;;OAIG;IACH,mCAFa,MAAM,CAclB;IAED;;;OAGG;IACH,cAFW,YAAY,QAkBtB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,OAAO,CA8BnB;IAED;;;;;;;;OAQG;IACH,uCANW,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,GACJ,MAAM,CAqClB;IAED;;;;;;;;;;;;;OAaG;IACH,6BAZW,MAAM,cACN,MAAM,cACN,MAAM,cACN,MAAM,OACN,MAAM,GAKJ,MAAM,CAqElB;IAED;;;;;;;OAOG;IACH,0BAHW,UAAU,GACR,MAAM,CA4BlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,OAAO,CA6BnB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,UACN,MAAM,EAAE,GACN,MAAM,CAyBlB;IAED,mBAEC;IAGL;;;;;;;;OAQG;IACH,sBAFU,OAAO,CAEc;;CAX9B;6BAhvB4B,wBAAwB;2BAD1B,iBAAiB"}
|
|
@@ -12,7 +12,6 @@ import { PortDirection } from "./node/PortDirection.js";
|
|
|
12
12
|
* Notable contemporary examples include:
|
|
13
13
|
* * SideFX Houdini
|
|
14
14
|
* * Blender - geometry nodes, shaders
|
|
15
|
-
* * Unreal Engine - blueprints
|
|
16
15
|
* * Grasshopper
|
|
17
16
|
* @see https://en.wikipedia.org/wiki/Node_graph_architecture
|
|
18
17
|
*/
|
|
@@ -13,6 +13,16 @@ export const GameAssetType = {
|
|
|
13
13
|
* bytes do.
|
|
14
14
|
*/
|
|
15
15
|
ModelUSD: "model/vnd.usd",
|
|
16
|
+
/**
|
|
17
|
+
* An MTF package, `.mtf`: a model in the engine's own form (`load_mtf`). Its textures are files outside it,
|
|
18
|
+
* each a {@link GameAssetType.TextureMTF}.
|
|
19
|
+
*/
|
|
20
|
+
ModelMTF: "x-meep/mtf",
|
|
21
|
+
/**
|
|
22
|
+
* One encoding of a texture an MTF package names, as a `ShadeImage`: an MTF texture file, `.mtt`, or any
|
|
23
|
+
* image, told apart by the file's first bytes.
|
|
24
|
+
*/
|
|
25
|
+
TextureMTF: "x-meep/mtf-texture",
|
|
16
26
|
ArrayBuffer: "arraybuffer",
|
|
17
27
|
/**
|
|
18
28
|
* No loader produces one. Both texture types meant a three `Texture` — a renderer's own object
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guessAssetType.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/guessAssetType.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,oCAHW,MAAM,GACJ,MAAM,GAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"guessAssetType.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/guessAssetType.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,oCAHW,MAAM,GACJ,MAAM,GAAC,IAAI,CAsDvB"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* preload filled.
|
|
9
9
|
*
|
|
10
10
|
* @param {AssetManager} assetManager
|
|
11
|
-
* @param {string} url `.gltf`, `.glb`,
|
|
11
|
+
* @param {string} url `.gltf`, `.glb`, any USD flavour — `.usd`, `.usda`, `.usdz` — or an MTF package, `.mtf`
|
|
12
12
|
* @returns {Promise<SceneBundle>} the loaded model itself, shared by every caller — see
|
|
13
13
|
* {@link GLTFSceneBundleAssetLoader}
|
|
14
14
|
*/
|
|
@@ -12,7 +12,7 @@ import { guessAssetType } from "./guessAssetType.js";
|
|
|
12
12
|
* preload filled.
|
|
13
13
|
*
|
|
14
14
|
* @param {AssetManager} assetManager
|
|
15
|
-
* @param {string} url `.gltf`, `.glb`,
|
|
15
|
+
* @param {string} url `.gltf`, `.glb`, any USD flavour — `.usd`, `.usda`, `.usdz` — or an MTF package, `.mtf`
|
|
16
16
|
* @returns {Promise<SceneBundle>} the loaded model itself, shared by every caller — see
|
|
17
17
|
* {@link GLTFSceneBundleAssetLoader}
|
|
18
18
|
*/
|
|
@@ -21,7 +21,7 @@ export async function load_model_scene_bundle(assetManager, url) {
|
|
|
21
21
|
|
|
22
22
|
assert.isOneOf(
|
|
23
23
|
type,
|
|
24
|
-
[GameAssetType.ModelGLTF, GameAssetType.ModelGLTF_JSON, GameAssetType.ModelUSD],
|
|
24
|
+
[GameAssetType.ModelGLTF, GameAssetType.ModelGLTF_JSON, GameAssetType.ModelUSD, GameAssetType.ModelMTF],
|
|
25
25
|
`asset type of '${url}'`
|
|
26
26
|
);
|
|
27
27
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../../../shade/renderer/loader/SceneBundle.js").SceneBundle} SceneBundle
|
|
3
|
+
* @typedef {import("../AssetRequestScope.js").AssetRequestScope} AssetRequestScope
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* An MTF package — `.mtf` — as the {@link SceneBundle} it holds ({@link GameAssetType.ModelMTF}): its nodes,
|
|
7
|
+
* geometries and materials, with its skins and clips.
|
|
8
|
+
*
|
|
9
|
+
* The asset hands out **that same bundle** to every caller, as the glTF and USD loaders do: a bundle is the model
|
|
10
|
+
* as loaded, and a placement is made from the prefab compiled from it.
|
|
11
|
+
*
|
|
12
|
+
* The package's textures are requested back through the manager under this load's scope, one file a texture:
|
|
13
|
+
* the encoding this loader's device can sample. They are cached, counted and cancelled like everything else, and
|
|
14
|
+
* a texture several packages name is loaded once.
|
|
15
|
+
*
|
|
16
|
+
* @extends AssetLoader<*, SceneBundle>
|
|
17
|
+
*
|
|
18
|
+
* @author Alex Goldring
|
|
19
|
+
* @copyright Company Named Limited (c) 2026
|
|
20
|
+
*/
|
|
21
|
+
export class MTFSceneBundleAssetLoader extends AssetLoader<any, import("../../../shade/renderer/loader/SceneBundle.js").SceneBundle> {
|
|
22
|
+
/**
|
|
23
|
+
* @param {Set<GPUTextureFormat>} texture_support what the device can sample, from
|
|
24
|
+
* `gpu_texture_compression_support(device)`. An empty set loads every texture from its fallback
|
|
25
|
+
*/
|
|
26
|
+
constructor(texture_support: Set<GPUTextureFormat>);
|
|
27
|
+
/**
|
|
28
|
+
* @param {AssetRequestScope} scope
|
|
29
|
+
* @param {string} path
|
|
30
|
+
* @param {function(Asset): void} success
|
|
31
|
+
* @param {function} failure
|
|
32
|
+
* @param {function(number, number): void} progress
|
|
33
|
+
* @returns {Promise<Asset>}
|
|
34
|
+
*/
|
|
35
|
+
load(scope: AssetRequestScope, path: string, success: (arg0: Asset<any>) => void, failure: Function, progress: (arg0: number, arg1: number) => void): Promise<Asset<any>>;
|
|
36
|
+
#private;
|
|
37
|
+
}
|
|
38
|
+
export type SceneBundle = import("../../../shade/renderer/loader/SceneBundle.js").SceneBundle;
|
|
39
|
+
export type AssetRequestScope = import("../AssetRequestScope.js").AssetRequestScope;
|
|
40
|
+
import { AssetLoader } from "./AssetLoader.js";
|
|
41
|
+
import { Asset } from "../Asset.js";
|
|
42
|
+
//# sourceMappingURL=MTFSceneBundleAssetLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MTFSceneBundleAssetLoader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/loaders/MTFSceneBundleAssetLoader.js"],"names":[],"mappings":"AAOA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;IAMI;;;OAGG;IACH,6BAHW,qBAAqB,EAU/B;IAcD;;;;;;;OAOG;IACH,YAPW,iBAAiB,QACjB,MAAM,iCACW,IAAI,sCAEZ,MAAM,QAAE,MAAM,KAAG,IAAI,GAC5B,mBAAc,CAgB1B;;CACJ;0BA1EY,OAAO,+CAA+C,EAAE,WAAW;gCACnE,OAAO,yBAAyB,EAAE,iBAAiB;4BALpC,kBAAkB;sBAFxB,aAAa"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { assert } from "../../../core/assert.js";
|
|
2
|
+
import { load_mtf } from "../../../shade/renderer/loader/mtf/load_mtf.js";
|
|
3
|
+
import { Asset } from "../Asset.js";
|
|
4
|
+
import { GameAssetType } from "../GameAssetType.js";
|
|
5
|
+
import { AssetLoader } from "./AssetLoader.js";
|
|
6
|
+
import { MTFTextureAssetLoader } from "./MTFTextureAssetLoader.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {import("../../../shade/renderer/loader/SceneBundle.js").SceneBundle} SceneBundle
|
|
10
|
+
* @typedef {import("../AssetRequestScope.js").AssetRequestScope} AssetRequestScope
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* An MTF package — `.mtf` — as the {@link SceneBundle} it holds ({@link GameAssetType.ModelMTF}): its nodes,
|
|
15
|
+
* geometries and materials, with its skins and clips.
|
|
16
|
+
*
|
|
17
|
+
* The asset hands out **that same bundle** to every caller, as the glTF and USD loaders do: a bundle is the model
|
|
18
|
+
* as loaded, and a placement is made from the prefab compiled from it.
|
|
19
|
+
*
|
|
20
|
+
* The package's textures are requested back through the manager under this load's scope, one file a texture:
|
|
21
|
+
* the encoding this loader's device can sample. They are cached, counted and cancelled like everything else, and
|
|
22
|
+
* a texture several packages name is loaded once.
|
|
23
|
+
*
|
|
24
|
+
* @extends AssetLoader<*, SceneBundle>
|
|
25
|
+
*
|
|
26
|
+
* @author Alex Goldring
|
|
27
|
+
* @copyright Company Named Limited (c) 2026
|
|
28
|
+
*/
|
|
29
|
+
export class MTFSceneBundleAssetLoader extends AssetLoader {
|
|
30
|
+
/**
|
|
31
|
+
* @type {Set<GPUTextureFormat>}
|
|
32
|
+
*/
|
|
33
|
+
#texture_support;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param {Set<GPUTextureFormat>} texture_support what the device can sample, from
|
|
37
|
+
* `gpu_texture_compression_support(device)`. An empty set loads every texture from its fallback
|
|
38
|
+
*/
|
|
39
|
+
constructor(texture_support) {
|
|
40
|
+
super();
|
|
41
|
+
|
|
42
|
+
assert.defined(texture_support, 'texture_support');
|
|
43
|
+
assert.notNull(texture_support, 'texture_support');
|
|
44
|
+
|
|
45
|
+
this.#texture_support = texture_support;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @param {import("../AssetManager.js").AssetManager} assetManager
|
|
50
|
+
* @param {*} context
|
|
51
|
+
*/
|
|
52
|
+
async link(assetManager, context) {
|
|
53
|
+
if (assetManager.getLoaderByType(GameAssetType.TextureMTF) === undefined) {
|
|
54
|
+
await assetManager.registerLoader(GameAssetType.TextureMTF, new MTFTextureAssetLoader());
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
await super.link(assetManager, context);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @param {AssetRequestScope} scope
|
|
62
|
+
* @param {string} path
|
|
63
|
+
* @param {function(Asset): void} success
|
|
64
|
+
* @param {function} failure
|
|
65
|
+
* @param {function(number, number): void} progress
|
|
66
|
+
* @returns {Promise<Asset>}
|
|
67
|
+
*/
|
|
68
|
+
async load(scope, path, success, failure, progress) {
|
|
69
|
+
// the path goes on un-resolved, as every path derived from it does: the manager keys its cache on it
|
|
70
|
+
const bundle = await load_mtf(path, {
|
|
71
|
+
assetManager: this.assetManager,
|
|
72
|
+
scope,
|
|
73
|
+
texture_support: this.#texture_support,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// no honest byte size, as for every other model: see GLTFSceneBundleAssetLoader
|
|
77
|
+
const asset = new Asset(() => bundle, 1);
|
|
78
|
+
|
|
79
|
+
success(asset);
|
|
80
|
+
|
|
81
|
+
return asset;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import("../AssetRequestScope.js").AssetRequestScope} AssetRequestScope
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* One encoding of a texture an MTF package names, as the {@link ShadeImage} a texture is made over
|
|
6
|
+
* ({@link GameAssetType.TextureMTF}).
|
|
7
|
+
*
|
|
8
|
+
* What the file is, is told by how it opens and not by its name. An MTF texture file is read as the texels it
|
|
9
|
+
* holds, in the GPU format it states, its levels views of the fetched bytes. Anything else is an image — a
|
|
10
|
+
* texture's fallback may be any the platform decodes — and goes the way a glTF's images do, through
|
|
11
|
+
* {@link ImageBitmapAssetLoader}.
|
|
12
|
+
*
|
|
13
|
+
* The asset hands out the one image, so every package that names the file holds the same one.
|
|
14
|
+
*
|
|
15
|
+
* @extends AssetLoader<*, ShadeImage>
|
|
16
|
+
*
|
|
17
|
+
* @author Alex Goldring
|
|
18
|
+
* @copyright Company Named Limited (c) 2026
|
|
19
|
+
*/
|
|
20
|
+
export class MTFTextureAssetLoader extends AssetLoader<any, ShadeImage> {
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* @param {AssetRequestScope} scope
|
|
24
|
+
* @param {string} path
|
|
25
|
+
* @param {function(Asset): void} success
|
|
26
|
+
* @param {function} failure
|
|
27
|
+
* @param {function(number, number): void} progress
|
|
28
|
+
* @returns {Promise<Asset>}
|
|
29
|
+
*/
|
|
30
|
+
load(scope: AssetRequestScope, path: string, success: (arg0: Asset<any>) => void, failure: Function, progress: (arg0: number, arg1: number) => void): Promise<Asset<any>>;
|
|
31
|
+
}
|
|
32
|
+
export type AssetRequestScope = import("../AssetRequestScope.js").AssetRequestScope;
|
|
33
|
+
import { ShadeImage } from "../../../shade/renderer/texture/source/ShadeImage.js";
|
|
34
|
+
import { AssetLoader } from "./AssetLoader.js";
|
|
35
|
+
import { Asset } from "../Asset.js";
|
|
36
|
+
//# sourceMappingURL=MTFTextureAssetLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MTFTextureAssetLoader.d.ts","sourceRoot":"","sources":["../../../../../src/engine/asset/loaders/MTFTextureAssetLoader.js"],"names":[],"mappings":"AASA;;GAEG;AAEH;;;;;;;;;;;;;;;GAeG;AACH;;IAiBI;;;;;;;OAOG;IACH,YAPW,iBAAiB,QACjB,MAAM,iCACW,IAAI,sCAEZ,MAAM,QAAE,MAAM,KAAG,IAAI,GAC5B,mBAAc,CAwB1B;CACJ;gCAnEY,OAAO,yBAAyB,EAAE,iBAAiB;2BARrC,sDAAsD;4BAIrD,kBAAkB;sBAHxB,aAAa"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { mtf_is_texture } from "../../../shade/renderer/loader/mtf/mtf_is_texture.js";
|
|
2
|
+
import { mtf_texture_read } from "../../../shade/renderer/loader/mtf/mtf_texture_read.js";
|
|
3
|
+
import { ShadeImage } from "../../../shade/renderer/texture/source/ShadeImage.js";
|
|
4
|
+
import { Asset } from "../Asset.js";
|
|
5
|
+
import { GameAssetType } from "../GameAssetType.js";
|
|
6
|
+
import { ArrayBufferLoader } from "./ArrayBufferLoader.js";
|
|
7
|
+
import { AssetLoader } from "./AssetLoader.js";
|
|
8
|
+
import { ImageBitmapAssetLoader } from "./image/ImageBitmapAssetLoader.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {import("../AssetRequestScope.js").AssetRequestScope} AssetRequestScope
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* One encoding of a texture an MTF package names, as the {@link ShadeImage} a texture is made over
|
|
16
|
+
* ({@link GameAssetType.TextureMTF}).
|
|
17
|
+
*
|
|
18
|
+
* What the file is, is told by how it opens and not by its name. An MTF texture file is read as the texels it
|
|
19
|
+
* holds, in the GPU format it states, its levels views of the fetched bytes. Anything else is an image — a
|
|
20
|
+
* texture's fallback may be any the platform decodes — and goes the way a glTF's images do, through
|
|
21
|
+
* {@link ImageBitmapAssetLoader}.
|
|
22
|
+
*
|
|
23
|
+
* The asset hands out the one image, so every package that names the file holds the same one.
|
|
24
|
+
*
|
|
25
|
+
* @extends AssetLoader<*, ShadeImage>
|
|
26
|
+
*
|
|
27
|
+
* @author Alex Goldring
|
|
28
|
+
* @copyright Company Named Limited (c) 2026
|
|
29
|
+
*/
|
|
30
|
+
export class MTFTextureAssetLoader extends AssetLoader {
|
|
31
|
+
/**
|
|
32
|
+
* @param {import("../AssetManager.js").AssetManager} assetManager
|
|
33
|
+
* @param {*} context
|
|
34
|
+
*/
|
|
35
|
+
async link(assetManager, context) {
|
|
36
|
+
if (assetManager.getLoaderByType(GameAssetType.ArrayBuffer) === undefined) {
|
|
37
|
+
await assetManager.registerLoader(GameAssetType.ArrayBuffer, new ArrayBufferLoader());
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (assetManager.getLoaderByType(GameAssetType.ImageBitmap) === undefined) {
|
|
41
|
+
await assetManager.registerLoader(GameAssetType.ImageBitmap, new ImageBitmapAssetLoader());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
await super.link(assetManager, context);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param {AssetRequestScope} scope
|
|
49
|
+
* @param {string} path
|
|
50
|
+
* @param {function(Asset): void} success
|
|
51
|
+
* @param {function} failure
|
|
52
|
+
* @param {function(number, number): void} progress
|
|
53
|
+
* @returns {Promise<Asset>}
|
|
54
|
+
*/
|
|
55
|
+
async load(scope, path, success, failure, progress) {
|
|
56
|
+
const bytes = await this.assetManager.promise(path, GameAssetType.ArrayBuffer, { scope, progress });
|
|
57
|
+
|
|
58
|
+
/** @type {ArrayBuffer} */
|
|
59
|
+
const data = bytes.create();
|
|
60
|
+
|
|
61
|
+
let image;
|
|
62
|
+
|
|
63
|
+
if (mtf_is_texture(data)) {
|
|
64
|
+
image = ShadeImage.fromTexelData(mtf_texture_read(data));
|
|
65
|
+
} else {
|
|
66
|
+
// the same bytes, asked for again as a picture: the manager already holds them
|
|
67
|
+
const bitmap = await this.assetManager.promise(path, GameAssetType.ImageBitmap, { scope });
|
|
68
|
+
|
|
69
|
+
image = ShadeImage.fromImageBitmap(bitmap.create());
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const asset = new Asset(() => image, data.byteLength);
|
|
73
|
+
|
|
74
|
+
success(asset);
|
|
75
|
+
|
|
76
|
+
return asset;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -70,11 +70,16 @@ export class BinaryCollectionSerializer {
|
|
|
70
70
|
* @param {Object} [options]
|
|
71
71
|
* @param {function(string,Class, BinaryClassSerializationAdapter):[]} [options.adapterOptionsSupplier]
|
|
72
72
|
* @param {function(string):*} [options.problemConsumer]
|
|
73
|
+
* @param {boolean} [options.dictionary] whether a value equal to one already written is written as a
|
|
74
|
+
* reference to it. On by default, for a class that has `hash` and `equals`; a reader makes of a reference a
|
|
75
|
+
* new value from the first one's bytes, so it is only safe where the class's `equals` sees everything its
|
|
76
|
+
* adapter writes. Turn it off where it does not, or where the caller already writes each value once
|
|
73
77
|
* @returns {boolean}
|
|
74
78
|
*/
|
|
75
|
-
initialize({ adapterOptionsSupplier, problemConsumer }?: {
|
|
79
|
+
initialize({ adapterOptionsSupplier, problemConsumer, dictionary }?: {
|
|
76
80
|
adapterOptionsSupplier?: (arg0: string, arg1: Class, arg2: BinaryClassSerializationAdapter) => [];
|
|
77
81
|
problemConsumer?: (arg0: string) => any;
|
|
82
|
+
dictionary?: boolean;
|
|
78
83
|
}): boolean;
|
|
79
84
|
finalize(): void;
|
|
80
85
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BinaryCollectionSerializer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js"],"names":[],"mappings":"AAMA;IAEI;;;OAGG;IACH,iBAAgB;IAEhB;;;OAGG;IACH,eAAc;IAEd;;;OAGG;IACH,gBAAe;IAGf;;;OAGG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,4BAA4B;IAE5B;;;OAGG;IACH,qBAAiB;IAGjB;;;OAGG;IACH,qBAAiB;IAEjB;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,mBAEG;IAEH;;;OAGG;IACH,oBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,yDAKC;IAGD;;;OAGG;IACH,sCAKC;IAED;;;OAGG;IACH,mBAFa,MAAM,CAIlB;IAED
|
|
1
|
+
{"version":3,"file":"BinaryCollectionSerializer.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js"],"names":[],"mappings":"AAMA;IAEI;;;OAGG;IACH,iBAAgB;IAEhB;;;OAGG;IACH,eAAc;IAEd;;;OAGG;IACH,gBAAe;IAGf;;;OAGG;IACH,kBAAiB;IAEjB;;;;OAIG;IACH,4BAA4B;IAE5B;;;OAGG;IACH,qBAAiB;IAGjB;;;OAGG;IACH,qBAAiB;IAEjB;;;OAGG;IACH,sBAAkB;IAElB;;;OAGG;IACH,mBAEG;IAEH;;;OAGG;IACH,oBAFW,MAAM,QAMhB;IAED;;;OAGG;IACH,yDAKC;IAGD;;;OAGG;IACH,sCAKC;IAED;;;OAGG;IACH,mBAFa,MAAM,CAIlB;IAED;;;;;;;;;;OAUG;IACH;QARgF,sBAAsB,UAAlF,MAAM,yDAAyC,EAAE;QAC7B,eAAe,UAAnC,MAAM;QACG,UAAU,GAA5B,OAAO;QAIL,OAAO,CA8DnB;IAED,iBA4BC;IAED;;;;OAIG;IACH,wBAEC;IAED;;;;OAIG;IACH,cAHW,MAAM,kBA4ChB;CAGJ"}
|