@zephyr3d/scene 0.8.0 → 0.8.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/dist/animation/animationset.js +220 -1
- package/dist/animation/animationset.js.map +1 -1
- package/dist/animation/ik/ccd_solver.js +3 -4
- package/dist/animation/ik/ccd_solver.js.map +1 -1
- package/dist/animation/ik/fabrik_solver.js +3 -4
- package/dist/animation/ik/fabrik_solver.js.map +1 -1
- package/dist/animation/ik/ik_pole_constraint.js +7 -2
- package/dist/animation/ik/ik_pole_constraint.js.map +1 -1
- package/dist/animation/ik/ik_utils.js +0 -79
- package/dist/animation/ik/ik_utils.js.map +1 -1
- package/dist/animation/ik/two_bone_ik_solver.js +3 -4
- package/dist/animation/ik/two_bone_ik_solver.js.map +1 -1
- package/dist/animation/skeleton.js +157 -125
- package/dist/animation/skeleton.js.map +1 -1
- package/dist/animation/spring/spring_bone.js +240 -0
- package/dist/animation/spring/spring_bone.js.map +1 -0
- package/dist/animation/spring/spring_bone_collider.js +198 -0
- package/dist/animation/spring/spring_bone_collider.js.map +1 -0
- package/dist/animation/spring/spring_bone_constraint.js +170 -0
- package/dist/animation/spring/spring_bone_constraint.js.map +1 -0
- package/dist/animation/spring/spring_bone_system.js +328 -0
- package/dist/animation/spring/spring_bone_system.js.map +1 -0
- package/dist/asset/model.js +2 -2
- package/dist/index.d.ts +17 -0
- package/dist/material/mixins/pbr/common.js +20 -17
- package/dist/material/mixins/pbr/common.js.map +1 -1
- package/dist/render/gpu_picking.js +100 -0
- package/dist/render/gpu_picking.js.map +1 -0
- package/dist/render/rendergraph/device_pool_allocator.js +41 -0
- package/dist/render/rendergraph/device_pool_allocator.js.map +1 -0
- package/dist/render/rendergraph/executor.js +146 -0
- package/dist/render/rendergraph/executor.js.map +1 -0
- package/dist/render/rendergraph/forward_plus_builder.js +414 -0
- package/dist/render/rendergraph/forward_plus_builder.js.map +1 -0
- package/dist/render/rendergraph/rendergraph.js +306 -0
- package/dist/render/rendergraph/rendergraph.js.map +1 -0
- package/dist/render/rendergraph/types.js +57 -0
- package/dist/render/rendergraph/types.js.map +1 -0
- package/dist/render/sky_motion_vector.js +85 -0
- package/dist/render/sky_motion_vector.js.map +1 -0
- package/dist/utility/serialization/scene/animation.js +3 -3
- package/dist/utility/serialization/scene/node.js +1 -1
- package/package.json +2 -2
- package/dist/animation/ik/ik_chain_builder.js +0 -68
- package/dist/animation/ik/ik_chain_builder.js.map +0 -1
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js +0 -38
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js.map +0 -1
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js +0 -10
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js.map +0 -1
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js +0 -127
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js.map +0 -1
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js +0 -263
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js.map +0 -1
- package/dist/src/animation/animation.js +0 -127
- package/dist/src/animation/animation.js.map +0 -1
- package/dist/src/animation/animationset.js +0 -255
- package/dist/src/animation/animationset.js.map +0 -1
- package/dist/src/animation/animationtrack.js +0 -34
- package/dist/src/animation/animationtrack.js.map +0 -1
- package/dist/src/animation/eulerrotationtrack.js +0 -52
- package/dist/src/animation/eulerrotationtrack.js.map +0 -1
- package/dist/src/animation/morphtarget.js +0 -93
- package/dist/src/animation/morphtarget.js.map +0 -1
- package/dist/src/animation/morphtrack.js +0 -70
- package/dist/src/animation/morphtrack.js.map +0 -1
- package/dist/src/animation/proptrack.js +0 -161
- package/dist/src/animation/proptrack.js.map +0 -1
- package/dist/src/animation/rotationtrack.js +0 -51
- package/dist/src/animation/rotationtrack.js.map +0 -1
- package/dist/src/animation/scaletrack.js +0 -50
- package/dist/src/animation/scaletrack.js.map +0 -1
- package/dist/src/animation/skeleton.js +0 -204
- package/dist/src/animation/skeleton.js.map +0 -1
- package/dist/src/animation/translationtrack.js +0 -50
- package/dist/src/animation/translationtrack.js.map +0 -1
- package/dist/src/app/app.js +0 -129
- package/dist/src/app/app.js.map +0 -1
- package/dist/src/app/inputmgr.js +0 -267
- package/dist/src/app/inputmgr.js.map +0 -1
- package/dist/src/asset/assetmanager.js +0 -404
- package/dist/src/asset/assetmanager.js.map +0 -1
- package/dist/src/asset/builtin.js +0 -337
- package/dist/src/asset/builtin.js.map +0 -1
- package/dist/src/asset/loaders/dds/dds.js +0 -470
- package/dist/src/asset/loaders/dds/dds.js.map +0 -1
- package/dist/src/asset/loaders/dds/dds_loader.js +0 -28
- package/dist/src/asset/loaders/dds/dds_loader.js.map +0 -1
- package/dist/src/asset/loaders/gltf/gltf_loader.js +0 -1265
- package/dist/src/asset/loaders/gltf/gltf_loader.js.map +0 -1
- package/dist/src/asset/loaders/gltf/helpers.js +0 -327
- package/dist/src/asset/loaders/gltf/helpers.js.map +0 -1
- package/dist/src/asset/loaders/hdr/hdr.js +0 -180
- package/dist/src/asset/loaders/hdr/hdr.js.map +0 -1
- package/dist/src/asset/loaders/image/tga_Loader.js +0 -116
- package/dist/src/asset/loaders/image/tga_Loader.js.map +0 -1
- package/dist/src/asset/loaders/image/webimage_loader.js +0 -63
- package/dist/src/asset/loaders/image/webimage_loader.js.map +0 -1
- package/dist/src/asset/loaders/loader.js +0 -45
- package/dist/src/asset/loaders/loader.js.map +0 -1
- package/dist/src/asset/model.js +0 -414
- package/dist/src/asset/model.js.map +0 -1
- package/dist/src/blitter/bilateralblur.js +0 -221
- package/dist/src/blitter/bilateralblur.js.map +0 -1
- package/dist/src/blitter/blitter.js +0 -390
- package/dist/src/blitter/blitter.js.map +0 -1
- package/dist/src/blitter/box.js +0 -118
- package/dist/src/blitter/box.js.map +0 -1
- package/dist/src/blitter/copy.js +0 -22
- package/dist/src/blitter/copy.js.map +0 -1
- package/dist/src/blitter/gaussianblur.js +0 -228
- package/dist/src/blitter/gaussianblur.js.map +0 -1
- package/dist/src/camera/base.js +0 -92
- package/dist/src/camera/base.js.map +0 -1
- package/dist/src/camera/camera.js +0 -1005
- package/dist/src/camera/camera.js.map +0 -1
- package/dist/src/camera/fps.js +0 -238
- package/dist/src/camera/fps.js.map +0 -1
- package/dist/src/camera/orbit.js +0 -245
- package/dist/src/camera/orbit.js.map +0 -1
- package/dist/src/camera/orthocamera.js +0 -167
- package/dist/src/camera/orthocamera.js.map +0 -1
- package/dist/src/camera/perspectivecamera.js +0 -141
- package/dist/src/camera/perspectivecamera.js.map +0 -1
- package/dist/src/index.js +0 -120
- package/dist/src/index.js.map +0 -1
- package/dist/src/material/blinn.js +0 -81
- package/dist/src/material/blinn.js.map +0 -1
- package/dist/src/material/grassmaterial.js +0 -113
- package/dist/src/material/grassmaterial.js.map +0 -1
- package/dist/src/material/lambert.js +0 -92
- package/dist/src/material/lambert.js.map +0 -1
- package/dist/src/material/material.js +0 -301
- package/dist/src/material/material.js.map +0 -1
- package/dist/src/material/meshmaterial.js +0 -704
- package/dist/src/material/meshmaterial.js.map +0 -1
- package/dist/src/material/mixins/albedocolor.js +0 -76
- package/dist/src/material/mixins/albedocolor.js.map +0 -1
- package/dist/src/material/mixins/foliage.js +0 -47
- package/dist/src/material/mixins/foliage.js.map +0 -1
- package/dist/src/material/mixins/lightmodel/blinnphong.js +0 -112
- package/dist/src/material/mixins/lightmodel/blinnphong.js.map +0 -1
- package/dist/src/material/mixins/lightmodel/lambert.js +0 -58
- package/dist/src/material/mixins/lightmodel/lambert.js.map +0 -1
- package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js +0 -178
- package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js.map +0 -1
- package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js +0 -139
- package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js.map +0 -1
- package/dist/src/material/mixins/lit.js +0 -476
- package/dist/src/material/mixins/lit.js.map +0 -1
- package/dist/src/material/mixins/pbr/common.js +0 -918
- package/dist/src/material/mixins/pbr/common.js.map +0 -1
- package/dist/src/material/mixins/texture.js +0 -172
- package/dist/src/material/mixins/texture.js.map +0 -1
- package/dist/src/material/mixins/vertexcolor.js +0 -56
- package/dist/src/material/mixins/vertexcolor.js.map +0 -1
- package/dist/src/material/particle.js +0 -178
- package/dist/src/material/particle.js.map +0 -1
- package/dist/src/material/pbrmr.js +0 -97
- package/dist/src/material/pbrmr.js.map +0 -1
- package/dist/src/material/pbrsg.js +0 -97
- package/dist/src/material/pbrsg.js.map +0 -1
- package/dist/src/material/shader/helper.js +0 -1209
- package/dist/src/material/shader/helper.js.map +0 -1
- package/dist/src/material/terrain-cm.js +0 -606
- package/dist/src/material/terrain-cm.js.map +0 -1
- package/dist/src/material/terrainmaterial.js +0 -375
- package/dist/src/material/terrainmaterial.js.map +0 -1
- package/dist/src/material/unlit.js +0 -41
- package/dist/src/material/unlit.js.map +0 -1
- package/dist/src/material/water.js +0 -417
- package/dist/src/material/water.js.map +0 -1
- package/dist/src/posteffect/bloom.js +0 -361
- package/dist/src/posteffect/bloom.js.map +0 -1
- package/dist/src/posteffect/compositor.js +0 -226
- package/dist/src/posteffect/compositor.js.map +0 -1
- package/dist/src/posteffect/fxaa.js +0 -273
- package/dist/src/posteffect/fxaa.js.map +0 -1
- package/dist/src/posteffect/grayscale.js +0 -69
- package/dist/src/posteffect/grayscale.js.map +0 -1
- package/dist/src/posteffect/motionblur.js +0 -96
- package/dist/src/posteffect/motionblur.js.map +0 -1
- package/dist/src/posteffect/posteffect.js +0 -126
- package/dist/src/posteffect/posteffect.js.map +0 -1
- package/dist/src/posteffect/sao.js +0 -324
- package/dist/src/posteffect/sao.js.map +0 -1
- package/dist/src/posteffect/ssr.js +0 -489
- package/dist/src/posteffect/ssr.js.map +0 -1
- package/dist/src/posteffect/taa.js +0 -172
- package/dist/src/posteffect/taa.js.map +0 -1
- package/dist/src/posteffect/tonemap.js +0 -94
- package/dist/src/posteffect/tonemap.js.map +0 -1
- package/dist/src/render/abuffer_oit.js +0 -361
- package/dist/src/render/abuffer_oit.js.map +0 -1
- package/dist/src/render/clipmap.js +0 -851
- package/dist/src/render/clipmap.js.map +0 -1
- package/dist/src/render/cluster_light.js +0 -333
- package/dist/src/render/cluster_light.js.map +0 -1
- package/dist/src/render/cull_visitor.js +0 -187
- package/dist/src/render/cull_visitor.js.map +0 -1
- package/dist/src/render/depthpass.js +0 -68
- package/dist/src/render/depthpass.js.map +0 -1
- package/dist/src/render/drawable_mixin.js +0 -227
- package/dist/src/render/drawable_mixin.js.map +0 -1
- package/dist/src/render/envlight.js +0 -463
- package/dist/src/render/envlight.js.map +0 -1
- package/dist/src/render/fbm_wavegenerator.js +0 -251
- package/dist/src/render/fbm_wavegenerator.js.map +0 -1
- package/dist/src/render/fft_wavegenerator.js +0 -1006
- package/dist/src/render/fft_wavegenerator.js.map +0 -1
- package/dist/src/render/fullscreenquad.js +0 -38
- package/dist/src/render/fullscreenquad.js.map +0 -1
- package/dist/src/render/gerstner_wavegenerator.js +0 -314
- package/dist/src/render/gerstner_wavegenerator.js.map +0 -1
- package/dist/src/render/globalbindgroup_allocator.js +0 -60
- package/dist/src/render/globalbindgroup_allocator.js.map +0 -1
- package/dist/src/render/hzb.js +0 -273
- package/dist/src/render/hzb.js.map +0 -1
- package/dist/src/render/lightpass.js +0 -172
- package/dist/src/render/lightpass.js.map +0 -1
- package/dist/src/render/objectcolorpass.js +0 -51
- package/dist/src/render/objectcolorpass.js.map +0 -1
- package/dist/src/render/primitive.js +0 -364
- package/dist/src/render/primitive.js.map +0 -1
- package/dist/src/render/render_queue.js +0 -467
- package/dist/src/render/render_queue.js.map +0 -1
- package/dist/src/render/renderbundle_wrapper.js +0 -152
- package/dist/src/render/renderbundle_wrapper.js.map +0 -1
- package/dist/src/render/renderer.js +0 -455
- package/dist/src/render/renderer.js.map +0 -1
- package/dist/src/render/renderpass.js +0 -200
- package/dist/src/render/renderpass.js.map +0 -1
- package/dist/src/render/shadowmap_pass.js +0 -56
- package/dist/src/render/shadowmap_pass.js.map +0 -1
- package/dist/src/render/sky.js +0 -1103
- package/dist/src/render/sky.js.map +0 -1
- package/dist/src/render/weightedblended_oit.js +0 -168
- package/dist/src/render/weightedblended_oit.js.map +0 -1
- package/dist/src/scene/batchgroup.js +0 -162
- package/dist/src/scene/batchgroup.js.map +0 -1
- package/dist/src/scene/environment.js +0 -209
- package/dist/src/scene/environment.js.map +0 -1
- package/dist/src/scene/graph_node.js +0 -72
- package/dist/src/scene/graph_node.js.map +0 -1
- package/dist/src/scene/light.js +0 -416
- package/dist/src/scene/light.js.map +0 -1
- package/dist/src/scene/mesh.js +0 -341
- package/dist/src/scene/mesh.js.map +0 -1
- package/dist/src/scene/octree.js +0 -649
- package/dist/src/scene/octree.js.map +0 -1
- package/dist/src/scene/particlesys.js +0 -738
- package/dist/src/scene/particlesys.js.map +0 -1
- package/dist/src/scene/raycast_visitor.js +0 -103
- package/dist/src/scene/raycast_visitor.js.map +0 -1
- package/dist/src/scene/scene.js +0 -284
- package/dist/src/scene/scene.js.map +0 -1
- package/dist/src/scene/scene_node.js +0 -732
- package/dist/src/scene/scene_node.js.map +0 -1
- package/dist/src/scene/terrain/grass.js +0 -278
- package/dist/src/scene/terrain/grass.js.map +0 -1
- package/dist/src/scene/terrain/heightfield.js +0 -475
- package/dist/src/scene/terrain/heightfield.js.map +0 -1
- package/dist/src/scene/terrain/patch.js +0 -530
- package/dist/src/scene/terrain/patch.js.map +0 -1
- package/dist/src/scene/terrain/quadtree.js +0 -461
- package/dist/src/scene/terrain/quadtree.js.map +0 -1
- package/dist/src/scene/terrain/terrain.js +0 -246
- package/dist/src/scene/terrain/terrain.js.map +0 -1
- package/dist/src/scene/terrain-cm/grass.js +0 -594
- package/dist/src/scene/terrain-cm/grass.js.map +0 -1
- package/dist/src/scene/terrain-cm/grassmaterial.js +0 -159
- package/dist/src/scene/terrain-cm/grassmaterial.js.map +0 -1
- package/dist/src/scene/terrain-cm/terrain-cm.js +0 -538
- package/dist/src/scene/terrain-cm/terrain-cm.js.map +0 -1
- package/dist/src/scene/water.js +0 -374
- package/dist/src/scene/water.js.map +0 -1
- package/dist/src/shaders/atmosphere.js +0 -957
- package/dist/src/shaders/atmosphere.js.map +0 -1
- package/dist/src/shaders/fog.js +0 -112
- package/dist/src/shaders/fog.js.map +0 -1
- package/dist/src/shaders/misc.js +0 -266
- package/dist/src/shaders/misc.js.map +0 -1
- package/dist/src/shaders/noise.js +0 -222
- package/dist/src/shaders/noise.js.map +0 -1
- package/dist/src/shaders/pbr.js +0 -51
- package/dist/src/shaders/pbr.js.map +0 -1
- package/dist/src/shaders/shadow.js +0 -636
- package/dist/src/shaders/shadow.js.map +0 -1
- package/dist/src/shaders/ssr.js +0 -490
- package/dist/src/shaders/ssr.js.map +0 -1
- package/dist/src/shaders/temporal.js +0 -215
- package/dist/src/shaders/temporal.js.map +0 -1
- package/dist/src/shaders/water.js +0 -756
- package/dist/src/shaders/water.js.map +0 -1
- package/dist/src/shadow/esm.js +0 -237
- package/dist/src/shadow/esm.js.map +0 -1
- package/dist/src/shadow/pcf_opt.js +0 -181
- package/dist/src/shadow/pcf_opt.js.map +0 -1
- package/dist/src/shadow/pcf_pd.js +0 -189
- package/dist/src/shadow/pcf_pd.js.map +0 -1
- package/dist/src/shadow/shader.js +0 -37
- package/dist/src/shadow/shader.js.map +0 -1
- package/dist/src/shadow/shadow_impl.js +0 -15
- package/dist/src/shadow/shadow_impl.js.map +0 -1
- package/dist/src/shadow/shadowmapper.js +0 -790
- package/dist/src/shadow/shadowmapper.js.map +0 -1
- package/dist/src/shadow/ssm.js +0 -159
- package/dist/src/shadow/ssm.js.map +0 -1
- package/dist/src/shadow/vsm.js +0 -297
- package/dist/src/shadow/vsm.js.map +0 -1
- package/dist/src/shapes/box.js +0 -386
- package/dist/src/shapes/box.js.map +0 -1
- package/dist/src/shapes/cylinder.js +0 -125
- package/dist/src/shapes/cylinder.js.map +0 -1
- package/dist/src/shapes/plane.js +0 -88
- package/dist/src/shapes/plane.js.map +0 -1
- package/dist/src/shapes/shape.js +0 -87
- package/dist/src/shapes/shape.js.map +0 -1
- package/dist/src/shapes/sphere.js +0 -114
- package/dist/src/shapes/sphere.js.map +0 -1
- package/dist/src/shapes/tetrahedron.js +0 -188
- package/dist/src/shapes/tetrahedron.js.map +0 -1
- package/dist/src/shapes/torus.js +0 -111
- package/dist/src/shapes/torus.js.map +0 -1
- package/dist/src/utility/aabbtree.js +0 -400
- package/dist/src/utility/aabbtree.js.map +0 -1
- package/dist/src/utility/bounding_volume.js +0 -29
- package/dist/src/utility/bounding_volume.js.map +0 -1
- package/dist/src/utility/debug.js +0 -28
- package/dist/src/utility/debug.js.map +0 -1
- package/dist/src/utility/draco/decoder.js +0 -116
- package/dist/src/utility/draco/decoder.js.map +0 -1
- package/dist/src/utility/misc.js +0 -105
- package/dist/src/utility/misc.js.map +0 -1
- package/dist/src/utility/panorama.js +0 -163
- package/dist/src/utility/panorama.js.map +0 -1
- package/dist/src/utility/pmrem.js +0 -354
- package/dist/src/utility/pmrem.js.map +0 -1
- package/dist/src/utility/rendermipmap.js +0 -115
- package/dist/src/utility/rendermipmap.js.map +0 -1
- package/dist/src/utility/serialization/json.js +0 -402
- package/dist/src/utility/serialization/json.js.map +0 -1
- package/dist/src/utility/serialization/manager.js +0 -623
- package/dist/src/utility/serialization/manager.js.map +0 -1
- package/dist/src/utility/serialization/scene/animation.js +0 -248
- package/dist/src/utility/serialization/scene/animation.js.map +0 -1
- package/dist/src/utility/serialization/scene/batch.js +0 -59
- package/dist/src/utility/serialization/scene/batch.js.map +0 -1
- package/dist/src/utility/serialization/scene/camera.js +0 -790
- package/dist/src/utility/serialization/scene/camera.js.map +0 -1
- package/dist/src/utility/serialization/scene/common.js +0 -222
- package/dist/src/utility/serialization/scene/common.js.map +0 -1
- package/dist/src/utility/serialization/scene/light.js +0 -575
- package/dist/src/utility/serialization/scene/light.js.map +0 -1
- package/dist/src/utility/serialization/scene/material.js +0 -1111
- package/dist/src/utility/serialization/scene/material.js.map +0 -1
- package/dist/src/utility/serialization/scene/mesh.js +0 -148
- package/dist/src/utility/serialization/scene/mesh.js.map +0 -1
- package/dist/src/utility/serialization/scene/misc.js +0 -39
- package/dist/src/utility/serialization/scene/misc.js.map +0 -1
- package/dist/src/utility/serialization/scene/node.js +0 -451
- package/dist/src/utility/serialization/scene/node.js.map +0 -1
- package/dist/src/utility/serialization/scene/particle.js +0 -425
- package/dist/src/utility/serialization/scene/particle.js.map +0 -1
- package/dist/src/utility/serialization/scene/primitive.js +0 -692
- package/dist/src/utility/serialization/scene/primitive.js.map +0 -1
- package/dist/src/utility/serialization/scene/scene.js +0 -704
- package/dist/src/utility/serialization/scene/scene.js.map +0 -1
- package/dist/src/utility/serialization/scene/terrain.js +0 -488
- package/dist/src/utility/serialization/scene/terrain.js.map +0 -1
- package/dist/src/utility/serialization/scene/water.js +0 -465
- package/dist/src/utility/serialization/scene/water.js.map +0 -1
- package/dist/src/utility/shprojector.js +0 -297
- package/dist/src/utility/shprojector.js.map +0 -1
- package/dist/src/utility/textures/ggxlut.js +0 -213
- package/dist/src/utility/textures/ggxlut.js.map +0 -1
- package/dist/src/utility/textures/gradientnoise.js +0 -62
- package/dist/src/utility/textures/gradientnoise.js.map +0 -1
- package/dist/src/utility/textures/randomnoise.js +0 -41
- package/dist/src/utility/textures/randomnoise.js.map +0 -1
- package/dist/src/values.js +0 -162
- package/dist/src/values.js.map +0 -1
- package/dist/utility/blueprint/material/common.js +0 -7
- package/dist/utility/blueprint/material/common.js.map +0 -1
- package/dist/utility/serialization/blueprint/constants.js +0 -255
- package/dist/utility/serialization/blueprint/constants.js.map +0 -1
- package/dist/utility/serialization/blueprint/material/constants.js +0 -203
- package/dist/utility/serialization/blueprint/material/constants.js.map +0 -1
- package/dist/utility/serialization/blueprint/material/texture.js +0 -165
- package/dist/utility/serialization/blueprint/material/texture.js.map +0 -1
|
@@ -1,704 +0,0 @@
|
|
|
1
|
-
import { Scene } from '../../../scene/scene.js';
|
|
2
|
-
import { Application } from '../../../app/app.js';
|
|
3
|
-
import { panoramaToCubemap } from '../../panorama.js';
|
|
4
|
-
import { prefilterCubemap } from '../../pmrem.js';
|
|
5
|
-
import { NodeHierarchy } from './node.js';
|
|
6
|
-
import { Vector3, Vector4 } from '@zephyr3d/base';
|
|
7
|
-
import { JSONData, JSONArray } from '../json.js';
|
|
8
|
-
|
|
9
|
-
/** @internal */ function getSceneClass(manager) {
|
|
10
|
-
return {
|
|
11
|
-
ctor: Scene,
|
|
12
|
-
name: 'Scene',
|
|
13
|
-
createFunc () {
|
|
14
|
-
return {
|
|
15
|
-
obj: new Scene()
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
getProps () {
|
|
19
|
-
return [
|
|
20
|
-
{
|
|
21
|
-
name: 'Name',
|
|
22
|
-
type: 'string',
|
|
23
|
-
default: '',
|
|
24
|
-
isHidden () {
|
|
25
|
-
return true;
|
|
26
|
-
},
|
|
27
|
-
get (value) {
|
|
28
|
-
value.str[0] = this.name;
|
|
29
|
-
},
|
|
30
|
-
set (value) {
|
|
31
|
-
this.name = value.str[0];
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'EnvLightType',
|
|
36
|
-
phase: 0,
|
|
37
|
-
type: 'string',
|
|
38
|
-
options: {
|
|
39
|
-
enum: {
|
|
40
|
-
labels: [
|
|
41
|
-
'None',
|
|
42
|
-
'Constant',
|
|
43
|
-
'Hemispheric',
|
|
44
|
-
'IBL',
|
|
45
|
-
'IBL-SH'
|
|
46
|
-
],
|
|
47
|
-
values: [
|
|
48
|
-
'none',
|
|
49
|
-
'constant',
|
|
50
|
-
'hemisphere',
|
|
51
|
-
'ibl',
|
|
52
|
-
'ibl-sh'
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
default: 'ibl',
|
|
57
|
-
get (value) {
|
|
58
|
-
value.str[0] = this.env.light.type;
|
|
59
|
-
},
|
|
60
|
-
set (value) {
|
|
61
|
-
this.env.light.type = value.str[0];
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'AmbientColor',
|
|
66
|
-
type: 'rgb',
|
|
67
|
-
phase: 1,
|
|
68
|
-
default: [
|
|
69
|
-
0.2,
|
|
70
|
-
0.2,
|
|
71
|
-
0.2
|
|
72
|
-
],
|
|
73
|
-
options: {
|
|
74
|
-
animatable: true
|
|
75
|
-
},
|
|
76
|
-
get (value) {
|
|
77
|
-
const color = this.env.light.ambientColor;
|
|
78
|
-
value.num[0] = color.x;
|
|
79
|
-
value.num[1] = color.y;
|
|
80
|
-
value.num[2] = color.z;
|
|
81
|
-
},
|
|
82
|
-
set (value) {
|
|
83
|
-
this.env.light.ambientColor.setXYZW(value.num[0], value.num[1], value.num[2], 1);
|
|
84
|
-
},
|
|
85
|
-
isValid () {
|
|
86
|
-
return this.env.light.type === 'constant';
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
name: 'AmbientUp',
|
|
91
|
-
type: 'rgb',
|
|
92
|
-
phase: 1,
|
|
93
|
-
default: [
|
|
94
|
-
0.3,
|
|
95
|
-
0.5,
|
|
96
|
-
0.8
|
|
97
|
-
],
|
|
98
|
-
options: {
|
|
99
|
-
animatable: true
|
|
100
|
-
},
|
|
101
|
-
get (value) {
|
|
102
|
-
const color = this.env.light.ambientUp;
|
|
103
|
-
value.num[0] = color.x;
|
|
104
|
-
value.num[1] = color.y;
|
|
105
|
-
value.num[2] = color.z;
|
|
106
|
-
},
|
|
107
|
-
set (value) {
|
|
108
|
-
this.env.light.ambientUp.setXYZW(value.num[0], value.num[1], value.num[2], 1);
|
|
109
|
-
},
|
|
110
|
-
isValid () {
|
|
111
|
-
return this.env.light.type === 'hemisphere';
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: 'AmbientDown',
|
|
116
|
-
type: 'rgb',
|
|
117
|
-
phase: 1,
|
|
118
|
-
default: [
|
|
119
|
-
0.2,
|
|
120
|
-
0.2,
|
|
121
|
-
0.2
|
|
122
|
-
],
|
|
123
|
-
options: {
|
|
124
|
-
animatable: true
|
|
125
|
-
},
|
|
126
|
-
get (value) {
|
|
127
|
-
const color = this.env.light.ambientDown;
|
|
128
|
-
value.num[0] = color.x;
|
|
129
|
-
value.num[1] = color.y;
|
|
130
|
-
value.num[2] = color.z;
|
|
131
|
-
},
|
|
132
|
-
set (value) {
|
|
133
|
-
this.env.light.ambientDown.setXYZW(value.num[0], value.num[1], value.num[2], 1);
|
|
134
|
-
},
|
|
135
|
-
isValid () {
|
|
136
|
-
return this.env.light.type === 'hemisphere';
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: 'EnvLightStrength',
|
|
141
|
-
type: 'float',
|
|
142
|
-
phase: 0,
|
|
143
|
-
options: {
|
|
144
|
-
animatable: true,
|
|
145
|
-
minValue: 0,
|
|
146
|
-
maxValue: 10
|
|
147
|
-
},
|
|
148
|
-
default: 1,
|
|
149
|
-
get (value) {
|
|
150
|
-
value.num[0] = this.env.light.strength;
|
|
151
|
-
},
|
|
152
|
-
set (value) {
|
|
153
|
-
this.env.light.strength = value.num[0];
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'SHWindowWeights',
|
|
158
|
-
type: 'vec3',
|
|
159
|
-
options: {
|
|
160
|
-
minValue: 0,
|
|
161
|
-
maxValue: 1
|
|
162
|
-
},
|
|
163
|
-
default: [
|
|
164
|
-
1,
|
|
165
|
-
1,
|
|
166
|
-
1
|
|
167
|
-
],
|
|
168
|
-
get (value) {
|
|
169
|
-
const weights = this.env.sky.shWindowWeights;
|
|
170
|
-
value.num[0] = weights.x;
|
|
171
|
-
value.num[1] = weights.y;
|
|
172
|
-
value.num[2] = weights.z;
|
|
173
|
-
},
|
|
174
|
-
set (value) {
|
|
175
|
-
this.env.sky.shWindowWeights = new Vector3(value.num[0], value.num[1], value.num[2]);
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: 'RadianceConvSamples',
|
|
180
|
-
type: 'int',
|
|
181
|
-
options: {
|
|
182
|
-
minValue: 1,
|
|
183
|
-
maxValue: 2048
|
|
184
|
-
},
|
|
185
|
-
default: 64,
|
|
186
|
-
get (value) {
|
|
187
|
-
value.num[0] = this.env.sky.radianceConvSamples;
|
|
188
|
-
},
|
|
189
|
-
set (value) {
|
|
190
|
-
this.env.sky.radianceConvSamples = value.num[0];
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: 'IrradianceConvSamples',
|
|
195
|
-
type: 'int',
|
|
196
|
-
options: {
|
|
197
|
-
minValue: 1,
|
|
198
|
-
maxValue: 2048
|
|
199
|
-
},
|
|
200
|
-
default: 256,
|
|
201
|
-
get (value) {
|
|
202
|
-
value.num[0] = this.env.sky.irradianceConvSamples;
|
|
203
|
-
},
|
|
204
|
-
set (value) {
|
|
205
|
-
this.env.sky.irradianceConvSamples = value.num[0];
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: 'SkyType',
|
|
210
|
-
type: 'string',
|
|
211
|
-
phase: 0,
|
|
212
|
-
options: {
|
|
213
|
-
enum: {
|
|
214
|
-
labels: [
|
|
215
|
-
'None',
|
|
216
|
-
'Color',
|
|
217
|
-
'SkyBox',
|
|
218
|
-
'Scatter'
|
|
219
|
-
],
|
|
220
|
-
values: [
|
|
221
|
-
'none',
|
|
222
|
-
'color',
|
|
223
|
-
'skybox',
|
|
224
|
-
'scatter'
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
default: 'scatter',
|
|
229
|
-
get (value) {
|
|
230
|
-
value.str[0] = this.env.sky.skyType;
|
|
231
|
-
},
|
|
232
|
-
set (value) {
|
|
233
|
-
this.env.sky.skyType = value.str[0];
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: 'SkyColor',
|
|
238
|
-
type: 'rgb',
|
|
239
|
-
phase: 1,
|
|
240
|
-
default: [
|
|
241
|
-
1,
|
|
242
|
-
1,
|
|
243
|
-
1
|
|
244
|
-
],
|
|
245
|
-
options: {
|
|
246
|
-
animatable: true
|
|
247
|
-
},
|
|
248
|
-
isValid () {
|
|
249
|
-
return this.env.sky.skyType === 'color';
|
|
250
|
-
},
|
|
251
|
-
get (value) {
|
|
252
|
-
const color = this.env.sky.skyColor;
|
|
253
|
-
value.num[0] = color.x;
|
|
254
|
-
value.num[1] = color.y;
|
|
255
|
-
value.num[2] = color.z;
|
|
256
|
-
},
|
|
257
|
-
set (value) {
|
|
258
|
-
this.env.sky.skyColor = new Vector4(value.num[0], value.num[1], value.num[2], 1);
|
|
259
|
-
this.env.sky.invalidate();
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
name: 'FogType',
|
|
264
|
-
type: 'string',
|
|
265
|
-
phase: 0,
|
|
266
|
-
options: {
|
|
267
|
-
enum: {
|
|
268
|
-
labels: [
|
|
269
|
-
'None',
|
|
270
|
-
'Linear',
|
|
271
|
-
'Exp',
|
|
272
|
-
'Exp2',
|
|
273
|
-
'ExponentialHeight'
|
|
274
|
-
],
|
|
275
|
-
values: [
|
|
276
|
-
'none',
|
|
277
|
-
'linear',
|
|
278
|
-
'exp',
|
|
279
|
-
'exp2',
|
|
280
|
-
'height_fog'
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
default: 'none',
|
|
285
|
-
get (value) {
|
|
286
|
-
value.str[0] = this.env.sky.fogType;
|
|
287
|
-
},
|
|
288
|
-
set (value) {
|
|
289
|
-
this.env.sky.fogType = value.str[0];
|
|
290
|
-
}
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
type: 'float',
|
|
294
|
-
name: 'HeightFogDensity',
|
|
295
|
-
default: 0.04,
|
|
296
|
-
options: {
|
|
297
|
-
group: 'HeightFog',
|
|
298
|
-
label: 'Density',
|
|
299
|
-
minValue: 0,
|
|
300
|
-
maxValue: 1
|
|
301
|
-
},
|
|
302
|
-
isValid () {
|
|
303
|
-
return this.env.sky.fogType === 'height_fog';
|
|
304
|
-
},
|
|
305
|
-
get (value) {
|
|
306
|
-
value.num[0] = this.env.sky.heightFogDensity;
|
|
307
|
-
},
|
|
308
|
-
set (value) {
|
|
309
|
-
this.env.sky.heightFogDensity = value.num[0];
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
name: 'HeightFogFalloff',
|
|
314
|
-
type: 'float',
|
|
315
|
-
default: 0.2,
|
|
316
|
-
options: {
|
|
317
|
-
group: 'HeightFog',
|
|
318
|
-
label: 'Falloff',
|
|
319
|
-
minValue: 0,
|
|
320
|
-
maxValue: 1
|
|
321
|
-
},
|
|
322
|
-
isValid () {
|
|
323
|
-
return this.env.sky.fogType === 'height_fog';
|
|
324
|
-
},
|
|
325
|
-
get (value) {
|
|
326
|
-
value.num[0] = this.env.sky.heightFogFalloff;
|
|
327
|
-
},
|
|
328
|
-
set (value) {
|
|
329
|
-
this.env.sky.heightFogFalloff = value.num[0];
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
name: 'HeightFogStartHeight',
|
|
334
|
-
type: 'float',
|
|
335
|
-
default: 0,
|
|
336
|
-
options: {
|
|
337
|
-
group: 'HeightFog',
|
|
338
|
-
label: 'StartHeight',
|
|
339
|
-
minValue: 0,
|
|
340
|
-
maxValue: 1000
|
|
341
|
-
},
|
|
342
|
-
isValid () {
|
|
343
|
-
return this.env.sky.fogType === 'height_fog';
|
|
344
|
-
},
|
|
345
|
-
get (value) {
|
|
346
|
-
value.num[0] = this.env.sky.heightFogStartHeight;
|
|
347
|
-
},
|
|
348
|
-
set (value) {
|
|
349
|
-
this.env.sky.heightFogStartHeight = value.num[0];
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
name: 'HeightFogColor',
|
|
354
|
-
type: 'rgb',
|
|
355
|
-
phase: 1,
|
|
356
|
-
default: [
|
|
357
|
-
0,
|
|
358
|
-
0,
|
|
359
|
-
0
|
|
360
|
-
],
|
|
361
|
-
options: {
|
|
362
|
-
group: 'HeightFog',
|
|
363
|
-
label: 'FogColor',
|
|
364
|
-
animatable: true
|
|
365
|
-
},
|
|
366
|
-
isValid () {
|
|
367
|
-
return this.env.sky.fogType === 'height_fog';
|
|
368
|
-
},
|
|
369
|
-
get (value) {
|
|
370
|
-
const color = this.env.sky.heightFogColor;
|
|
371
|
-
value.num[0] = color.x;
|
|
372
|
-
value.num[1] = color.y;
|
|
373
|
-
value.num[2] = color.z;
|
|
374
|
-
},
|
|
375
|
-
set (value) {
|
|
376
|
-
this.env.sky.heightFogColor = new Vector3(value.num[0], value.num[1], value.num[2]);
|
|
377
|
-
}
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
name: 'HeightFogStartDistance',
|
|
381
|
-
type: 'float',
|
|
382
|
-
default: 0,
|
|
383
|
-
options: {
|
|
384
|
-
group: 'HeightFog',
|
|
385
|
-
label: 'StartDistance'
|
|
386
|
-
},
|
|
387
|
-
isValid () {
|
|
388
|
-
return this.env.sky.fogType === 'height_fog';
|
|
389
|
-
},
|
|
390
|
-
get (value) {
|
|
391
|
-
value.num[0] = this.env.sky.heightFogStartDistance;
|
|
392
|
-
},
|
|
393
|
-
set (value) {
|
|
394
|
-
this.env.sky.heightFogStartDistance = value.num[0];
|
|
395
|
-
}
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
name: 'HeightFogMaxOpacity',
|
|
399
|
-
type: 'float',
|
|
400
|
-
options: {
|
|
401
|
-
group: 'HeightFog',
|
|
402
|
-
label: 'MaxOpacity',
|
|
403
|
-
minValue: 0,
|
|
404
|
-
maxValue: 1
|
|
405
|
-
},
|
|
406
|
-
default: 1,
|
|
407
|
-
isValid () {
|
|
408
|
-
return this.env.sky.fogType === 'height_fog';
|
|
409
|
-
},
|
|
410
|
-
get (value) {
|
|
411
|
-
value.num[0] = this.env.sky.heightFogMaxOpacity;
|
|
412
|
-
},
|
|
413
|
-
set (value) {
|
|
414
|
-
this.env.sky.heightFogMaxOpacity = value.num[0];
|
|
415
|
-
}
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
name: 'HeightFogAtmosphereStrength',
|
|
419
|
-
type: 'float',
|
|
420
|
-
options: {
|
|
421
|
-
group: 'HeightFog',
|
|
422
|
-
label: 'AtmosphereStrength',
|
|
423
|
-
minValue: 0,
|
|
424
|
-
maxValue: 10
|
|
425
|
-
},
|
|
426
|
-
default: 1,
|
|
427
|
-
isValid () {
|
|
428
|
-
return this.env.sky.fogType === 'height_fog';
|
|
429
|
-
},
|
|
430
|
-
get (value) {
|
|
431
|
-
value.num[0] = this.env.sky.heightFogAtmosphereContribution;
|
|
432
|
-
},
|
|
433
|
-
set (value) {
|
|
434
|
-
this.env.sky.heightFogAtmosphereContribution = value.num[0];
|
|
435
|
-
}
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
name: 'HeightFogDirExponent',
|
|
439
|
-
type: 'float',
|
|
440
|
-
default: 4,
|
|
441
|
-
options: {
|
|
442
|
-
group: 'HeightFog',
|
|
443
|
-
label: 'DirectionalExponent'
|
|
444
|
-
},
|
|
445
|
-
isValid () {
|
|
446
|
-
return this.env.sky.fogType === 'height_fog';
|
|
447
|
-
},
|
|
448
|
-
get (value) {
|
|
449
|
-
value.num[0] = this.env.sky.heightFogDirExponent;
|
|
450
|
-
},
|
|
451
|
-
set (value) {
|
|
452
|
-
this.env.sky.heightFogDirExponent = value.num[0];
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
{
|
|
456
|
-
name: 'HeightFogDirColor',
|
|
457
|
-
type: 'rgb',
|
|
458
|
-
default: [
|
|
459
|
-
0,
|
|
460
|
-
0,
|
|
461
|
-
0
|
|
462
|
-
],
|
|
463
|
-
options: {
|
|
464
|
-
group: 'HeightFog',
|
|
465
|
-
label: 'DirectionalInscattering'
|
|
466
|
-
},
|
|
467
|
-
isValid () {
|
|
468
|
-
return this.env.sky.fogType === 'height_fog';
|
|
469
|
-
},
|
|
470
|
-
get (value) {
|
|
471
|
-
value.num[0] = this.env.sky.heightFogDirColor.x;
|
|
472
|
-
value.num[1] = this.env.sky.heightFogDirColor.y;
|
|
473
|
-
value.num[2] = this.env.sky.heightFogDirColor.z;
|
|
474
|
-
},
|
|
475
|
-
set (value) {
|
|
476
|
-
this.env.sky.heightFogDirColor = new Vector3(value.num[0], value.num[1], value.num[2]);
|
|
477
|
-
}
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
name: 'AerialPerspectiveDistance',
|
|
481
|
-
type: 'float',
|
|
482
|
-
phase: 1,
|
|
483
|
-
options: {
|
|
484
|
-
animatable: true,
|
|
485
|
-
minValue: 1,
|
|
486
|
-
maxValue: 50000
|
|
487
|
-
},
|
|
488
|
-
default: 1,
|
|
489
|
-
get (value) {
|
|
490
|
-
value.num[0] = this.env.sky.aerialPerspectiveDistance;
|
|
491
|
-
},
|
|
492
|
-
set (value) {
|
|
493
|
-
this.env.sky.aerialPerspectiveDistance = value.num[0];
|
|
494
|
-
},
|
|
495
|
-
isValid () {
|
|
496
|
-
return this.env.sky.skyType === 'scatter';
|
|
497
|
-
}
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
name: 'CameraHeightScale',
|
|
501
|
-
type: 'float',
|
|
502
|
-
phase: 1,
|
|
503
|
-
options: {
|
|
504
|
-
animatable: true,
|
|
505
|
-
minValue: 1,
|
|
506
|
-
maxValue: 1000
|
|
507
|
-
},
|
|
508
|
-
default: 1,
|
|
509
|
-
get (value) {
|
|
510
|
-
value.num[0] = this.env.sky.cameraHeightScale;
|
|
511
|
-
},
|
|
512
|
-
set (value) {
|
|
513
|
-
this.env.sky.cameraHeightScale = value.num[0];
|
|
514
|
-
},
|
|
515
|
-
isValid () {
|
|
516
|
-
return this.env.sky.skyType === 'scatter';
|
|
517
|
-
}
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
name: 'AtmosphereExposure',
|
|
521
|
-
type: 'float',
|
|
522
|
-
options: {
|
|
523
|
-
animatable: true,
|
|
524
|
-
minValue: 0,
|
|
525
|
-
maxValue: 8
|
|
526
|
-
},
|
|
527
|
-
default: 1,
|
|
528
|
-
get (value) {
|
|
529
|
-
value.num[0] = this.env.sky.atmosphereExposure;
|
|
530
|
-
},
|
|
531
|
-
set (value) {
|
|
532
|
-
this.env.sky.atmosphereExposure = value.num[0];
|
|
533
|
-
},
|
|
534
|
-
isValid () {
|
|
535
|
-
return this.env.sky.skyType === 'scatter';
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
name: 'Cloudy',
|
|
540
|
-
type: 'float',
|
|
541
|
-
default: 0.6,
|
|
542
|
-
phase: 1,
|
|
543
|
-
options: {
|
|
544
|
-
animatable: true,
|
|
545
|
-
minValue: 0,
|
|
546
|
-
maxValue: 1
|
|
547
|
-
},
|
|
548
|
-
get (value) {
|
|
549
|
-
value.num[0] = this.env.sky.cloudy;
|
|
550
|
-
},
|
|
551
|
-
set (value) {
|
|
552
|
-
this.env.sky.cloudy = value.num[0];
|
|
553
|
-
},
|
|
554
|
-
isValid () {
|
|
555
|
-
return this.env.sky.skyType === 'scatter';
|
|
556
|
-
}
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
name: 'CloudIntensity',
|
|
560
|
-
type: 'float',
|
|
561
|
-
default: 40,
|
|
562
|
-
phase: 1,
|
|
563
|
-
options: {
|
|
564
|
-
animatable: true,
|
|
565
|
-
minValue: 0,
|
|
566
|
-
maxValue: 200
|
|
567
|
-
},
|
|
568
|
-
get (value) {
|
|
569
|
-
value.num[0] = this.env.sky.cloudIntensity;
|
|
570
|
-
},
|
|
571
|
-
set (value) {
|
|
572
|
-
this.env.sky.cloudIntensity = value.num[0];
|
|
573
|
-
},
|
|
574
|
-
isValid () {
|
|
575
|
-
return this.env.sky.skyType === 'scatter';
|
|
576
|
-
}
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
name: 'Wind',
|
|
580
|
-
type: 'vec2',
|
|
581
|
-
default: [
|
|
582
|
-
0,
|
|
583
|
-
0
|
|
584
|
-
],
|
|
585
|
-
phase: 1,
|
|
586
|
-
options: {
|
|
587
|
-
animatable: true,
|
|
588
|
-
minValue: -100,
|
|
589
|
-
maxValue: 100
|
|
590
|
-
},
|
|
591
|
-
get (value) {
|
|
592
|
-
value.num[0] = this.env.sky.wind.x;
|
|
593
|
-
value.num[1] = this.env.sky.wind.y;
|
|
594
|
-
},
|
|
595
|
-
set (value) {
|
|
596
|
-
this.env.sky.wind.setXY(value.num[0], value.num[1]);
|
|
597
|
-
},
|
|
598
|
-
isValid () {
|
|
599
|
-
return this.env.sky.skyType === 'scatter';
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
name: 'PanoramaTexture',
|
|
604
|
-
type: 'object',
|
|
605
|
-
phase: 1,
|
|
606
|
-
get (value) {
|
|
607
|
-
value.str[0] = this.env.sky.panoramaTextureAsset;
|
|
608
|
-
},
|
|
609
|
-
async set (value) {
|
|
610
|
-
if (value.str[0]) {
|
|
611
|
-
const assetId = value.str[0];
|
|
612
|
-
let tex;
|
|
613
|
-
try {
|
|
614
|
-
tex = await manager.fetchTexture(assetId);
|
|
615
|
-
} catch (err) {
|
|
616
|
-
console.error(`Load asset failed: ${value.str[0]}: ${err}`);
|
|
617
|
-
tex = null;
|
|
618
|
-
}
|
|
619
|
-
if (tex?.isTexture2D()) {
|
|
620
|
-
const device = Application.instance.device;
|
|
621
|
-
const skyBoxTexture = this.env.sky.skyboxTexture ?? device.createCubeTexture('rgba16f', 1024);
|
|
622
|
-
const radianceMap = this.env.light.radianceMap ?? device.createCubeTexture('rgba16f', 256);
|
|
623
|
-
const irradianceMap = this.env.light.irradianceMap ?? device.createCubeTexture('rgba16f', 64, {
|
|
624
|
-
samplerOptions: {
|
|
625
|
-
mipFilter: 'none'
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
panoramaToCubemap(tex, skyBoxTexture);
|
|
629
|
-
prefilterCubemap(skyBoxTexture, 'ggx', radianceMap);
|
|
630
|
-
prefilterCubemap(skyBoxTexture, 'lambertian', irradianceMap);
|
|
631
|
-
this.env.sky.skyboxTexture = skyBoxTexture;
|
|
632
|
-
this.env.light.radianceMap = radianceMap;
|
|
633
|
-
this.env.light.irradianceMap = irradianceMap;
|
|
634
|
-
this.env.sky.panoramaTextureAsset = assetId;
|
|
635
|
-
this.env.sky.invalidate();
|
|
636
|
-
tex.dispose();
|
|
637
|
-
} else {
|
|
638
|
-
console.error('Invalid skybox texture');
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
isValid () {
|
|
643
|
-
return this.env.sky.skyType === 'skybox';
|
|
644
|
-
}
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
name: 'NodeHierarchy',
|
|
648
|
-
type: 'object',
|
|
649
|
-
isHidden () {
|
|
650
|
-
return true;
|
|
651
|
-
},
|
|
652
|
-
get (value) {
|
|
653
|
-
value.object = [
|
|
654
|
-
new NodeHierarchy(this, this.rootNode)
|
|
655
|
-
];
|
|
656
|
-
},
|
|
657
|
-
set (value) {
|
|
658
|
-
const nodeHierarchy = value.object[0];
|
|
659
|
-
nodeHierarchy.rootNode.remove();
|
|
660
|
-
for (const child of nodeHierarchy.rootNode.children.slice()){
|
|
661
|
-
child.get().parent = this.rootNode;
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
name: 'MainCamera',
|
|
667
|
-
type: 'string',
|
|
668
|
-
isHidden () {
|
|
669
|
-
return true;
|
|
670
|
-
},
|
|
671
|
-
get (value) {
|
|
672
|
-
value.str[0] = this.mainCamera?.persistentId ?? '';
|
|
673
|
-
},
|
|
674
|
-
set (value) {
|
|
675
|
-
this.mainCamera = value.str[0] ? this.findNodeById(value.str[0]) : null;
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
name: 'Metadata',
|
|
680
|
-
type: 'object',
|
|
681
|
-
default: null,
|
|
682
|
-
options: {
|
|
683
|
-
objectTypes: [
|
|
684
|
-
JSONData,
|
|
685
|
-
JSONArray
|
|
686
|
-
]
|
|
687
|
-
},
|
|
688
|
-
isNullable () {
|
|
689
|
-
return true;
|
|
690
|
-
},
|
|
691
|
-
get (value) {
|
|
692
|
-
value.object[0] = this.metaData ? Array.isArray(this.metaData) ? new JSONArray(null, this.metaData) : new JSONData(null, this.metaData) : null;
|
|
693
|
-
},
|
|
694
|
-
set (value) {
|
|
695
|
-
this.metaData = value?.object[0]?.data ?? null;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
];
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
export { getSceneClass };
|
|
704
|
-
//# sourceMappingURL=scene.js.map
|