@zephyr3d/scene 0.9.2 → 0.9.3
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 +135 -135
- package/dist/animation/animationset.js.map +1 -1
- package/dist/animation/ik/ik_chain_builder.js +68 -0
- package/dist/animation/ik/ik_chain_builder.js.map +1 -0
- package/dist/animation/ik/ik_pole_constraint.js +2 -7
- package/dist/animation/ik/ik_pole_constraint.js.map +1 -1
- package/dist/animation/joint_dynamics/controller.js +146 -146
- package/dist/animation/joint_dynamics/controller.js.map +1 -1
- package/dist/animation/joint_dynamics/math.js +16 -0
- package/dist/animation/joint_dynamics/math.js.map +1 -0
- package/dist/animation/spring/spring_particle.js +4 -4
- package/dist/animation/spring/spring_particle.js.map +1 -1
- package/dist/animation/spring/spring_system.js +75 -75
- package/dist/animation/spring/spring_system.js.map +1 -1
- package/dist/animation/spring2/constraints.js.map +1 -1
- package/dist/animation/spring2/controller.js +64 -64
- package/dist/animation/spring2/controller.js.map +1 -1
- package/dist/animation/spring2/math.js.map +1 -1
- package/dist/animation/spring2/spring_system.js +8 -8
- package/dist/animation/spring2/spring_system.js.map +1 -1
- package/dist/asset/model.js +57 -57
- package/dist/asset/model.js.map +1 -1
- package/dist/camera/camera.js +184 -184
- package/dist/camera/camera.js.map +1 -1
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -1
- package/dist/material/material.js +288 -288
- package/dist/material/material.js.map +1 -1
- package/dist/material/shader/helper.js +281 -278
- package/dist/material/shader/helper.js.map +1 -1
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js +38 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimemgr.js.map +1 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js +10 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/runtimescript.js.map +1 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js +127 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptingsystem.js.map +1 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js +263 -0
- package/dist/node_modules/@zephyr3d/runtime/dist/runtime/scriptregistry.js.map +1 -0
- package/dist/render/cluster_light.js +3 -4
- package/dist/render/cluster_light.js.map +1 -1
- package/dist/render/rendergraph/history_resource_manager.js +93 -93
- package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
- package/dist/render/rendergraph/history_resources.js +3 -3
- package/dist/render/rendergraph/history_resources.js.map +1 -1
- package/dist/render/rendergraph/types.js +22 -22
- package/dist/render/rendergraph/types.js.map +1 -1
- package/dist/scene/mesh.js +80 -80
- package/dist/scene/mesh.js.map +1 -1
- package/dist/scene/scene_node.js +228 -228
- package/dist/scene/scene_node.js.map +1 -1
- package/dist/shapes/torus.js +90 -59
- package/dist/shapes/torus.js.map +1 -1
- package/dist/src/animation/animation.js +127 -0
- package/dist/src/animation/animation.js.map +1 -0
- package/dist/src/animation/animationset.js +255 -0
- package/dist/src/animation/animationset.js.map +1 -0
- package/dist/src/animation/animationtrack.js +34 -0
- package/dist/src/animation/animationtrack.js.map +1 -0
- package/dist/src/animation/eulerrotationtrack.js +52 -0
- package/dist/src/animation/eulerrotationtrack.js.map +1 -0
- package/dist/src/animation/morphtarget.js +93 -0
- package/dist/src/animation/morphtarget.js.map +1 -0
- package/dist/src/animation/morphtrack.js +70 -0
- package/dist/src/animation/morphtrack.js.map +1 -0
- package/dist/src/animation/proptrack.js +161 -0
- package/dist/src/animation/proptrack.js.map +1 -0
- package/dist/src/animation/rotationtrack.js +51 -0
- package/dist/src/animation/rotationtrack.js.map +1 -0
- package/dist/src/animation/scaletrack.js +50 -0
- package/dist/src/animation/scaletrack.js.map +1 -0
- package/dist/src/animation/skeleton.js +204 -0
- package/dist/src/animation/skeleton.js.map +1 -0
- package/dist/src/animation/translationtrack.js +50 -0
- package/dist/src/animation/translationtrack.js.map +1 -0
- package/dist/src/app/app.js +129 -0
- package/dist/src/app/app.js.map +1 -0
- package/dist/src/app/inputmgr.js +267 -0
- package/dist/src/app/inputmgr.js.map +1 -0
- package/dist/src/asset/assetmanager.js +404 -0
- package/dist/src/asset/assetmanager.js.map +1 -0
- package/dist/src/asset/builtin.js +337 -0
- package/dist/src/asset/builtin.js.map +1 -0
- package/dist/src/asset/loaders/dds/dds.js +470 -0
- package/dist/src/asset/loaders/dds/dds.js.map +1 -0
- package/dist/src/asset/loaders/dds/dds_loader.js +28 -0
- package/dist/src/asset/loaders/dds/dds_loader.js.map +1 -0
- package/dist/src/asset/loaders/gltf/gltf_loader.js +1265 -0
- package/dist/src/asset/loaders/gltf/gltf_loader.js.map +1 -0
- package/dist/src/asset/loaders/gltf/helpers.js +327 -0
- package/dist/src/asset/loaders/gltf/helpers.js.map +1 -0
- package/dist/src/asset/loaders/hdr/hdr.js +180 -0
- package/dist/src/asset/loaders/hdr/hdr.js.map +1 -0
- package/dist/src/asset/loaders/image/tga_Loader.js +116 -0
- package/dist/src/asset/loaders/image/tga_Loader.js.map +1 -0
- package/dist/src/asset/loaders/image/webimage_loader.js +63 -0
- package/dist/src/asset/loaders/image/webimage_loader.js.map +1 -0
- package/dist/src/asset/loaders/loader.js +45 -0
- package/dist/src/asset/loaders/loader.js.map +1 -0
- package/dist/src/asset/model.js +414 -0
- package/dist/src/asset/model.js.map +1 -0
- package/dist/src/blitter/bilateralblur.js +221 -0
- package/dist/src/blitter/bilateralblur.js.map +1 -0
- package/dist/src/blitter/blitter.js +390 -0
- package/dist/src/blitter/blitter.js.map +1 -0
- package/dist/src/blitter/box.js +118 -0
- package/dist/src/blitter/box.js.map +1 -0
- package/dist/src/blitter/copy.js +22 -0
- package/dist/src/blitter/copy.js.map +1 -0
- package/dist/src/blitter/gaussianblur.js +228 -0
- package/dist/src/blitter/gaussianblur.js.map +1 -0
- package/dist/src/camera/base.js +92 -0
- package/dist/src/camera/base.js.map +1 -0
- package/dist/src/camera/camera.js +1005 -0
- package/dist/src/camera/camera.js.map +1 -0
- package/dist/src/camera/fps.js +238 -0
- package/dist/src/camera/fps.js.map +1 -0
- package/dist/src/camera/orbit.js +245 -0
- package/dist/src/camera/orbit.js.map +1 -0
- package/dist/src/camera/orthocamera.js +167 -0
- package/dist/src/camera/orthocamera.js.map +1 -0
- package/dist/src/camera/perspectivecamera.js +141 -0
- package/dist/src/camera/perspectivecamera.js.map +1 -0
- package/dist/src/index.js +120 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/material/blinn.js +81 -0
- package/dist/src/material/blinn.js.map +1 -0
- package/dist/src/material/grassmaterial.js +113 -0
- package/dist/src/material/grassmaterial.js.map +1 -0
- package/dist/src/material/lambert.js +92 -0
- package/dist/src/material/lambert.js.map +1 -0
- package/dist/src/material/material.js +301 -0
- package/dist/src/material/material.js.map +1 -0
- package/dist/src/material/meshmaterial.js +704 -0
- package/dist/src/material/meshmaterial.js.map +1 -0
- package/dist/src/material/mixins/albedocolor.js +76 -0
- package/dist/src/material/mixins/albedocolor.js.map +1 -0
- package/dist/src/material/mixins/foliage.js +47 -0
- package/dist/src/material/mixins/foliage.js.map +1 -0
- package/dist/src/material/mixins/lightmodel/blinnphong.js +112 -0
- package/dist/src/material/mixins/lightmodel/blinnphong.js.map +1 -0
- package/dist/src/material/mixins/lightmodel/lambert.js +58 -0
- package/dist/src/material/mixins/lightmodel/lambert.js.map +1 -0
- package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js +178 -0
- package/dist/src/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -0
- package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js +139 -0
- package/dist/src/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -0
- package/dist/src/material/mixins/lit.js +476 -0
- package/dist/src/material/mixins/lit.js.map +1 -0
- package/dist/src/material/mixins/pbr/common.js +918 -0
- package/dist/src/material/mixins/pbr/common.js.map +1 -0
- package/dist/src/material/mixins/texture.js +172 -0
- package/dist/src/material/mixins/texture.js.map +1 -0
- package/dist/src/material/mixins/vertexcolor.js +56 -0
- package/dist/src/material/mixins/vertexcolor.js.map +1 -0
- package/dist/src/material/particle.js +178 -0
- package/dist/src/material/particle.js.map +1 -0
- package/dist/src/material/pbrmr.js +97 -0
- package/dist/src/material/pbrmr.js.map +1 -0
- package/dist/src/material/pbrsg.js +97 -0
- package/dist/src/material/pbrsg.js.map +1 -0
- package/dist/src/material/shader/helper.js +1209 -0
- package/dist/src/material/shader/helper.js.map +1 -0
- package/dist/src/material/terrain-cm.js +606 -0
- package/dist/src/material/terrain-cm.js.map +1 -0
- package/dist/src/material/terrainmaterial.js +375 -0
- package/dist/src/material/terrainmaterial.js.map +1 -0
- package/dist/src/material/unlit.js +41 -0
- package/dist/src/material/unlit.js.map +1 -0
- package/dist/src/material/water.js +417 -0
- package/dist/src/material/water.js.map +1 -0
- package/dist/src/posteffect/bloom.js +361 -0
- package/dist/src/posteffect/bloom.js.map +1 -0
- package/dist/src/posteffect/compositor.js +226 -0
- package/dist/src/posteffect/compositor.js.map +1 -0
- package/dist/src/posteffect/fxaa.js +273 -0
- package/dist/src/posteffect/fxaa.js.map +1 -0
- package/dist/src/posteffect/grayscale.js +69 -0
- package/dist/src/posteffect/grayscale.js.map +1 -0
- package/dist/src/posteffect/motionblur.js +96 -0
- package/dist/src/posteffect/motionblur.js.map +1 -0
- package/dist/src/posteffect/posteffect.js +126 -0
- package/dist/src/posteffect/posteffect.js.map +1 -0
- package/dist/src/posteffect/sao.js +324 -0
- package/dist/src/posteffect/sao.js.map +1 -0
- package/dist/src/posteffect/ssr.js +489 -0
- package/dist/src/posteffect/ssr.js.map +1 -0
- package/dist/src/posteffect/taa.js +172 -0
- package/dist/src/posteffect/taa.js.map +1 -0
- package/dist/src/posteffect/tonemap.js +94 -0
- package/dist/src/posteffect/tonemap.js.map +1 -0
- package/dist/src/render/abuffer_oit.js +361 -0
- package/dist/src/render/abuffer_oit.js.map +1 -0
- package/dist/src/render/clipmap.js +851 -0
- package/dist/src/render/clipmap.js.map +1 -0
- package/dist/src/render/cluster_light.js +333 -0
- package/dist/src/render/cluster_light.js.map +1 -0
- package/dist/src/render/cull_visitor.js +187 -0
- package/dist/src/render/cull_visitor.js.map +1 -0
- package/dist/src/render/depthpass.js +68 -0
- package/dist/src/render/depthpass.js.map +1 -0
- package/dist/src/render/drawable_mixin.js +227 -0
- package/dist/src/render/drawable_mixin.js.map +1 -0
- package/dist/src/render/envlight.js +463 -0
- package/dist/src/render/envlight.js.map +1 -0
- package/dist/src/render/fbm_wavegenerator.js +251 -0
- package/dist/src/render/fbm_wavegenerator.js.map +1 -0
- package/dist/src/render/fft_wavegenerator.js +1006 -0
- package/dist/src/render/fft_wavegenerator.js.map +1 -0
- package/dist/src/render/fullscreenquad.js +38 -0
- package/dist/src/render/fullscreenquad.js.map +1 -0
- package/dist/src/render/gerstner_wavegenerator.js +314 -0
- package/dist/src/render/gerstner_wavegenerator.js.map +1 -0
- package/dist/src/render/globalbindgroup_allocator.js +60 -0
- package/dist/src/render/globalbindgroup_allocator.js.map +1 -0
- package/dist/src/render/hzb.js +273 -0
- package/dist/src/render/hzb.js.map +1 -0
- package/dist/src/render/lightpass.js +172 -0
- package/dist/src/render/lightpass.js.map +1 -0
- package/dist/src/render/objectcolorpass.js +51 -0
- package/dist/src/render/objectcolorpass.js.map +1 -0
- package/dist/src/render/primitive.js +364 -0
- package/dist/src/render/primitive.js.map +1 -0
- package/dist/src/render/render_queue.js +467 -0
- package/dist/src/render/render_queue.js.map +1 -0
- package/dist/src/render/renderbundle_wrapper.js +152 -0
- package/dist/src/render/renderbundle_wrapper.js.map +1 -0
- package/dist/src/render/renderer.js +455 -0
- package/dist/src/render/renderer.js.map +1 -0
- package/dist/src/render/renderpass.js +200 -0
- package/dist/src/render/renderpass.js.map +1 -0
- package/dist/src/render/shadowmap_pass.js +56 -0
- package/dist/src/render/shadowmap_pass.js.map +1 -0
- package/dist/src/render/sky.js +1103 -0
- package/dist/src/render/sky.js.map +1 -0
- package/dist/src/render/weightedblended_oit.js +168 -0
- package/dist/src/render/weightedblended_oit.js.map +1 -0
- package/dist/src/scene/batchgroup.js +162 -0
- package/dist/src/scene/batchgroup.js.map +1 -0
- package/dist/src/scene/environment.js +209 -0
- package/dist/src/scene/environment.js.map +1 -0
- package/dist/src/scene/graph_node.js +72 -0
- package/dist/src/scene/graph_node.js.map +1 -0
- package/dist/src/scene/light.js +416 -0
- package/dist/src/scene/light.js.map +1 -0
- package/dist/src/scene/mesh.js +341 -0
- package/dist/src/scene/mesh.js.map +1 -0
- package/dist/src/scene/octree.js +649 -0
- package/dist/src/scene/octree.js.map +1 -0
- package/dist/src/scene/particlesys.js +738 -0
- package/dist/src/scene/particlesys.js.map +1 -0
- package/dist/src/scene/raycast_visitor.js +103 -0
- package/dist/src/scene/raycast_visitor.js.map +1 -0
- package/dist/src/scene/scene.js +284 -0
- package/dist/src/scene/scene.js.map +1 -0
- package/dist/src/scene/scene_node.js +732 -0
- package/dist/src/scene/scene_node.js.map +1 -0
- package/dist/src/scene/terrain/grass.js +278 -0
- package/dist/src/scene/terrain/grass.js.map +1 -0
- package/dist/src/scene/terrain/heightfield.js +475 -0
- package/dist/src/scene/terrain/heightfield.js.map +1 -0
- package/dist/src/scene/terrain/patch.js +530 -0
- package/dist/src/scene/terrain/patch.js.map +1 -0
- package/dist/src/scene/terrain/quadtree.js +461 -0
- package/dist/src/scene/terrain/quadtree.js.map +1 -0
- package/dist/src/scene/terrain/terrain.js +246 -0
- package/dist/src/scene/terrain/terrain.js.map +1 -0
- package/dist/src/scene/terrain-cm/grass.js +594 -0
- package/dist/src/scene/terrain-cm/grass.js.map +1 -0
- package/dist/src/scene/terrain-cm/grassmaterial.js +159 -0
- package/dist/src/scene/terrain-cm/grassmaterial.js.map +1 -0
- package/dist/src/scene/terrain-cm/terrain-cm.js +538 -0
- package/dist/src/scene/terrain-cm/terrain-cm.js.map +1 -0
- package/dist/src/scene/water.js +374 -0
- package/dist/src/scene/water.js.map +1 -0
- package/dist/src/shaders/atmosphere.js +957 -0
- package/dist/src/shaders/atmosphere.js.map +1 -0
- package/dist/src/shaders/fog.js +112 -0
- package/dist/src/shaders/fog.js.map +1 -0
- package/dist/src/shaders/misc.js +266 -0
- package/dist/src/shaders/misc.js.map +1 -0
- package/dist/src/shaders/noise.js +222 -0
- package/dist/src/shaders/noise.js.map +1 -0
- package/dist/src/shaders/pbr.js +51 -0
- package/dist/src/shaders/pbr.js.map +1 -0
- package/dist/src/shaders/shadow.js +636 -0
- package/dist/src/shaders/shadow.js.map +1 -0
- package/dist/src/shaders/ssr.js +490 -0
- package/dist/src/shaders/ssr.js.map +1 -0
- package/dist/src/shaders/temporal.js +215 -0
- package/dist/src/shaders/temporal.js.map +1 -0
- package/dist/src/shaders/water.js +756 -0
- package/dist/src/shaders/water.js.map +1 -0
- package/dist/src/shadow/esm.js +237 -0
- package/dist/src/shadow/esm.js.map +1 -0
- package/dist/src/shadow/pcf_opt.js +181 -0
- package/dist/src/shadow/pcf_opt.js.map +1 -0
- package/dist/src/shadow/pcf_pd.js +189 -0
- package/dist/src/shadow/pcf_pd.js.map +1 -0
- package/dist/src/shadow/shader.js +37 -0
- package/dist/src/shadow/shader.js.map +1 -0
- package/dist/src/shadow/shadow_impl.js +15 -0
- package/dist/src/shadow/shadow_impl.js.map +1 -0
- package/dist/src/shadow/shadowmapper.js +790 -0
- package/dist/src/shadow/shadowmapper.js.map +1 -0
- package/dist/src/shadow/ssm.js +159 -0
- package/dist/src/shadow/ssm.js.map +1 -0
- package/dist/src/shadow/vsm.js +297 -0
- package/dist/src/shadow/vsm.js.map +1 -0
- package/dist/src/shapes/box.js +386 -0
- package/dist/src/shapes/box.js.map +1 -0
- package/dist/src/shapes/cylinder.js +125 -0
- package/dist/src/shapes/cylinder.js.map +1 -0
- package/dist/src/shapes/plane.js +88 -0
- package/dist/src/shapes/plane.js.map +1 -0
- package/dist/src/shapes/shape.js +87 -0
- package/dist/src/shapes/shape.js.map +1 -0
- package/dist/src/shapes/sphere.js +114 -0
- package/dist/src/shapes/sphere.js.map +1 -0
- package/dist/src/shapes/tetrahedron.js +188 -0
- package/dist/src/shapes/tetrahedron.js.map +1 -0
- package/dist/src/shapes/torus.js +111 -0
- package/dist/src/shapes/torus.js.map +1 -0
- package/dist/src/utility/aabbtree.js +400 -0
- package/dist/src/utility/aabbtree.js.map +1 -0
- package/dist/src/utility/bounding_volume.js +29 -0
- package/dist/src/utility/bounding_volume.js.map +1 -0
- package/dist/src/utility/debug.js +28 -0
- package/dist/src/utility/debug.js.map +1 -0
- package/dist/src/utility/draco/decoder.js +116 -0
- package/dist/src/utility/draco/decoder.js.map +1 -0
- package/dist/src/utility/misc.js +105 -0
- package/dist/src/utility/misc.js.map +1 -0
- package/dist/src/utility/panorama.js +163 -0
- package/dist/src/utility/panorama.js.map +1 -0
- package/dist/src/utility/pmrem.js +354 -0
- package/dist/src/utility/pmrem.js.map +1 -0
- package/dist/src/utility/rendermipmap.js +115 -0
- package/dist/src/utility/rendermipmap.js.map +1 -0
- package/dist/src/utility/serialization/json.js +402 -0
- package/dist/src/utility/serialization/json.js.map +1 -0
- package/dist/src/utility/serialization/manager.js +623 -0
- package/dist/src/utility/serialization/manager.js.map +1 -0
- package/dist/src/utility/serialization/scene/animation.js +248 -0
- package/dist/src/utility/serialization/scene/animation.js.map +1 -0
- package/dist/src/utility/serialization/scene/batch.js +59 -0
- package/dist/src/utility/serialization/scene/batch.js.map +1 -0
- package/dist/src/utility/serialization/scene/camera.js +790 -0
- package/dist/src/utility/serialization/scene/camera.js.map +1 -0
- package/dist/src/utility/serialization/scene/common.js +222 -0
- package/dist/src/utility/serialization/scene/common.js.map +1 -0
- package/dist/src/utility/serialization/scene/light.js +575 -0
- package/dist/src/utility/serialization/scene/light.js.map +1 -0
- package/dist/src/utility/serialization/scene/material.js +1111 -0
- package/dist/src/utility/serialization/scene/material.js.map +1 -0
- package/dist/src/utility/serialization/scene/mesh.js +148 -0
- package/dist/src/utility/serialization/scene/mesh.js.map +1 -0
- package/dist/src/utility/serialization/scene/misc.js +39 -0
- package/dist/src/utility/serialization/scene/misc.js.map +1 -0
- package/dist/src/utility/serialization/scene/node.js +451 -0
- package/dist/src/utility/serialization/scene/node.js.map +1 -0
- package/dist/src/utility/serialization/scene/particle.js +425 -0
- package/dist/src/utility/serialization/scene/particle.js.map +1 -0
- package/dist/src/utility/serialization/scene/primitive.js +692 -0
- package/dist/src/utility/serialization/scene/primitive.js.map +1 -0
- package/dist/src/utility/serialization/scene/scene.js +704 -0
- package/dist/src/utility/serialization/scene/scene.js.map +1 -0
- package/dist/src/utility/serialization/scene/terrain.js +488 -0
- package/dist/src/utility/serialization/scene/terrain.js.map +1 -0
- package/dist/src/utility/serialization/scene/water.js +465 -0
- package/dist/src/utility/serialization/scene/water.js.map +1 -0
- package/dist/src/utility/shprojector.js +297 -0
- package/dist/src/utility/shprojector.js.map +1 -0
- package/dist/src/utility/textures/ggxlut.js +213 -0
- package/dist/src/utility/textures/ggxlut.js.map +1 -0
- package/dist/src/utility/textures/gradientnoise.js +62 -0
- package/dist/src/utility/textures/gradientnoise.js.map +1 -0
- package/dist/src/utility/textures/randomnoise.js +41 -0
- package/dist/src/utility/textures/randomnoise.js.map +1 -0
- package/dist/src/values.js +162 -0
- package/dist/src/values.js.map +1 -0
- package/dist/utility/blueprint/material/common.js +7 -0
- package/dist/utility/blueprint/material/common.js.map +1 -0
- package/dist/utility/blueprint/material/ir.js +489 -489
- package/dist/utility/blueprint/material/ir.js.map +1 -1
- package/dist/utility/serialization/blueprint/constants.js +255 -0
- package/dist/utility/serialization/blueprint/constants.js.map +1 -0
- package/dist/utility/serialization/blueprint/material/constants.js +203 -0
- package/dist/utility/serialization/blueprint/material/constants.js.map +1 -0
- package/dist/utility/serialization/blueprint/material/texture.js +165 -0
- package/dist/utility/serialization/blueprint/material/texture.js.map +1 -0
- package/dist/utility/serialization/manager.js +271 -271
- package/dist/utility/serialization/manager.js.map +1 -1
- package/dist/utility/serialization/scene/animation.js.map +1 -1
- package/dist/utility/serialization/scene/camera.js.map +1 -1
- package/dist/utility/serialization/scene/common.js.map +1 -1
- package/dist/utility/serialization/scene/light.js.map +1 -1
- package/dist/utility/serialization/scene/material.js.map +1 -1
- package/dist/utility/serialization/scene/mesh.js.map +1 -1
- package/dist/utility/serialization/scene/node.js.map +1 -1
- package/dist/utility/serialization/scene/particle.js.map +1 -1
- package/dist/utility/serialization/scene/primitive.js.map +1 -1
- package/dist/utility/serialization/scene/scene.js.map +1 -1
- package/dist/utility/serialization/scene/terrain.js.map +1 -1
- package/dist/utility/serialization/types.js +4 -4
- package/dist/utility/serialization/types.js.map +1 -1
- package/dist/values.js +49 -53
- package/dist/values.js.map +1 -1
- package/package.json +1 -1
- package/dist/animation/joint_dynamics/vrm_spring_bone.js +0 -46
- package/dist/animation/joint_dynamics/vrm_spring_bone.js.map +0 -1
- package/dist/animation/spring/spring_bone.js +0 -240
- package/dist/animation/spring/spring_bone.js.map +0 -1
- package/dist/animation/spring/spring_bone_collider.js +0 -198
- package/dist/animation/spring/spring_bone_collider.js.map +0 -1
- package/dist/animation/spring/spring_bone_constraint.js +0 -170
- package/dist/animation/spring/spring_bone_constraint.js.map +0 -1
- package/dist/animation/spring/spring_bone_system.js +0 -328
- package/dist/animation/spring/spring_bone_system.js.map +0 -1
- package/dist/render/sky_motion_vector.js +0 -85
- package/dist/render/sky_motion_vector.js.map +0 -1
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import '@zephyr3d/base';
|
|
2
|
+
import '../../../values.js';
|
|
3
|
+
import '@zephyr3d/device';
|
|
4
|
+
import '../../../material/shader/helper.js';
|
|
5
|
+
import '../../../material/lambert.js';
|
|
6
|
+
import '../../../material/blinn.js';
|
|
7
|
+
import '../../../material/unlit.js';
|
|
8
|
+
import '../../../material/particle.js';
|
|
9
|
+
import '../../../material/meshmaterial.js';
|
|
10
|
+
import '../../../material/grassmaterial.js';
|
|
11
|
+
import '../../../material/terrainmaterial.js';
|
|
12
|
+
import '../../../material/terrain-cm.js';
|
|
13
|
+
import '../../../material/pbrmr.js';
|
|
14
|
+
import '../../../material/pbrsg.js';
|
|
15
|
+
import '../../../render/renderer.js';
|
|
16
|
+
import { Primitive } from '../../../render/primitive.js';
|
|
17
|
+
import '../../../render/sky.js';
|
|
18
|
+
import '../../../render/clipmap.js';
|
|
19
|
+
import '../../../shaders/atmosphere.js';
|
|
20
|
+
import { BoxShape, BoxFrameShape } from '../../../shapes/box.js';
|
|
21
|
+
import { CylinderShape } from '../../../shapes/cylinder.js';
|
|
22
|
+
import { TorusShape } from '../../../shapes/torus.js';
|
|
23
|
+
import { PlaneShape } from '../../../shapes/plane.js';
|
|
24
|
+
import { SphereShape } from '../../../shapes/sphere.js';
|
|
25
|
+
import '../../../shapes/tetrahedron.js';
|
|
26
|
+
|
|
27
|
+
/** @internal */ function getPrimitiveClass() {
|
|
28
|
+
return {
|
|
29
|
+
ctor: Primitive,
|
|
30
|
+
name: 'Primitive',
|
|
31
|
+
createFunc (ctx, initParams) {
|
|
32
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
33
|
+
if (primitive) {
|
|
34
|
+
return {
|
|
35
|
+
obj: primitive,
|
|
36
|
+
loadProps: false
|
|
37
|
+
};
|
|
38
|
+
} else {
|
|
39
|
+
primitive = new Primitive();
|
|
40
|
+
primitive.persistentId = initParams.persistentId;
|
|
41
|
+
return {
|
|
42
|
+
obj: primitive,
|
|
43
|
+
loadProps: true
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
getInitParams (obj) {
|
|
48
|
+
return {
|
|
49
|
+
persistentId: obj.persistentId
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
getProps () {
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/** @internal */ function getBoxShapeClass() {
|
|
58
|
+
return {
|
|
59
|
+
ctor: BoxShape,
|
|
60
|
+
parent: Primitive,
|
|
61
|
+
name: 'BoxShape',
|
|
62
|
+
createFunc (ctx, initParams) {
|
|
63
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
64
|
+
if (primitive) {
|
|
65
|
+
return {
|
|
66
|
+
obj: primitive,
|
|
67
|
+
loadProps: false
|
|
68
|
+
};
|
|
69
|
+
} else {
|
|
70
|
+
primitive = new BoxShape({
|
|
71
|
+
size: 1
|
|
72
|
+
});
|
|
73
|
+
primitive.persistentId = initParams.persistentId;
|
|
74
|
+
return {
|
|
75
|
+
obj: primitive,
|
|
76
|
+
loadProps: true
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
getInitParams (obj) {
|
|
81
|
+
return {
|
|
82
|
+
persistentId: obj.persistentId
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
getProps () {
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
name: 'Size',
|
|
89
|
+
type: 'vec3',
|
|
90
|
+
default: [
|
|
91
|
+
1,
|
|
92
|
+
1,
|
|
93
|
+
1
|
|
94
|
+
],
|
|
95
|
+
get (value) {
|
|
96
|
+
value.num[0] = this.options.sizeX ?? this.options.size;
|
|
97
|
+
value.num[1] = this.options.sizeY ?? this.options.size;
|
|
98
|
+
value.num[2] = this.options.sizeZ ?? this.options.size;
|
|
99
|
+
},
|
|
100
|
+
set (value) {
|
|
101
|
+
this.options = {
|
|
102
|
+
...this.options,
|
|
103
|
+
sizeX: value.num[0],
|
|
104
|
+
sizeY: value.num[1],
|
|
105
|
+
sizeZ: value.num[2]
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Anchor',
|
|
111
|
+
type: 'vec3',
|
|
112
|
+
default: [
|
|
113
|
+
0.5,
|
|
114
|
+
0.5,
|
|
115
|
+
0.5
|
|
116
|
+
],
|
|
117
|
+
get (value) {
|
|
118
|
+
value.num[0] = this.options.anchorX ?? this.options.anchor;
|
|
119
|
+
value.num[1] = this.options.anchorY ?? this.options.anchor;
|
|
120
|
+
value.num[2] = this.options.anchorZ ?? this.options.anchor;
|
|
121
|
+
},
|
|
122
|
+
set (value) {
|
|
123
|
+
this.options = {
|
|
124
|
+
...this.options,
|
|
125
|
+
anchorX: value.num[0],
|
|
126
|
+
anchorY: value.num[1],
|
|
127
|
+
anchorZ: value.num[2]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** @internal */ function getBoxFrameShapeClass() {
|
|
136
|
+
return {
|
|
137
|
+
ctor: BoxFrameShape,
|
|
138
|
+
parent: Primitive,
|
|
139
|
+
name: 'BoxFrameShape',
|
|
140
|
+
createFunc (ctx, initParams) {
|
|
141
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
142
|
+
if (primitive) {
|
|
143
|
+
return {
|
|
144
|
+
obj: primitive,
|
|
145
|
+
loadProps: false
|
|
146
|
+
};
|
|
147
|
+
} else {
|
|
148
|
+
primitive = new BoxFrameShape({
|
|
149
|
+
size: 1
|
|
150
|
+
});
|
|
151
|
+
primitive.persistentId = initParams.persistentId;
|
|
152
|
+
return {
|
|
153
|
+
obj: primitive,
|
|
154
|
+
loadProps: true
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
getInitParams (obj) {
|
|
159
|
+
return {
|
|
160
|
+
persistentId: obj.persistentId
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
getProps () {
|
|
164
|
+
return [
|
|
165
|
+
{
|
|
166
|
+
name: 'Size',
|
|
167
|
+
type: 'vec3',
|
|
168
|
+
default: [
|
|
169
|
+
1,
|
|
170
|
+
1,
|
|
171
|
+
1
|
|
172
|
+
],
|
|
173
|
+
get (value) {
|
|
174
|
+
value.num[0] = this.options.sizeX ?? this.options.size;
|
|
175
|
+
value.num[1] = this.options.sizeY ?? this.options.size;
|
|
176
|
+
value.num[2] = this.options.sizeZ ?? this.options.size;
|
|
177
|
+
},
|
|
178
|
+
set (value) {
|
|
179
|
+
this.options = {
|
|
180
|
+
...this.options,
|
|
181
|
+
sizeX: value.num[0],
|
|
182
|
+
sizeY: value.num[1],
|
|
183
|
+
sizeZ: value.num[2]
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: 'Anchor',
|
|
189
|
+
type: 'vec3',
|
|
190
|
+
default: [
|
|
191
|
+
0.5,
|
|
192
|
+
0.5,
|
|
193
|
+
0.5
|
|
194
|
+
],
|
|
195
|
+
get (value) {
|
|
196
|
+
value.num[0] = this.options.anchorX ?? this.options.anchor;
|
|
197
|
+
value.num[1] = this.options.anchorY ?? this.options.anchor;
|
|
198
|
+
value.num[2] = this.options.anchorZ ?? this.options.anchor;
|
|
199
|
+
},
|
|
200
|
+
set (value) {
|
|
201
|
+
this.options = {
|
|
202
|
+
...this.options,
|
|
203
|
+
anchorX: value.num[0],
|
|
204
|
+
anchorY: value.num[1],
|
|
205
|
+
anchorZ: value.num[2]
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
/** @internal */ function getTorusShapeClass() {
|
|
214
|
+
return {
|
|
215
|
+
ctor: TorusShape,
|
|
216
|
+
parent: Primitive,
|
|
217
|
+
name: 'TorusShape',
|
|
218
|
+
createFunc (ctx, initParams) {
|
|
219
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
220
|
+
if (primitive) {
|
|
221
|
+
return {
|
|
222
|
+
obj: primitive,
|
|
223
|
+
loadProps: false
|
|
224
|
+
};
|
|
225
|
+
} else {
|
|
226
|
+
primitive = new TorusShape();
|
|
227
|
+
primitive.persistentId = initParams.persistentId;
|
|
228
|
+
return {
|
|
229
|
+
obj: primitive,
|
|
230
|
+
loadProps: true
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
getInitParams (obj) {
|
|
235
|
+
return {
|
|
236
|
+
persistentId: obj.persistentId
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
getProps () {
|
|
240
|
+
return [
|
|
241
|
+
{
|
|
242
|
+
name: 'NumSlices',
|
|
243
|
+
type: 'int',
|
|
244
|
+
options: {
|
|
245
|
+
minValue: 3,
|
|
246
|
+
maxValue: 100
|
|
247
|
+
},
|
|
248
|
+
default: 40,
|
|
249
|
+
get (value) {
|
|
250
|
+
value.num[0] = this.options.numSlices;
|
|
251
|
+
},
|
|
252
|
+
set (value) {
|
|
253
|
+
this.options = {
|
|
254
|
+
...this.options,
|
|
255
|
+
numSlices: Math.max(3, Math.min(100, value.num[0]))
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'NumSegments',
|
|
261
|
+
type: 'int',
|
|
262
|
+
options: {
|
|
263
|
+
minValue: 3,
|
|
264
|
+
maxValue: 100
|
|
265
|
+
},
|
|
266
|
+
default: 16,
|
|
267
|
+
get (value) {
|
|
268
|
+
value.num[0] = this.options.numSegments;
|
|
269
|
+
},
|
|
270
|
+
set (value) {
|
|
271
|
+
this.options = {
|
|
272
|
+
...this.options,
|
|
273
|
+
numSegments: Math.max(3, Math.min(100, value.num[0]))
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: 'OuterRadius',
|
|
279
|
+
type: 'float',
|
|
280
|
+
options: {
|
|
281
|
+
minValue: 0,
|
|
282
|
+
maxValue: 9999
|
|
283
|
+
},
|
|
284
|
+
default: 1,
|
|
285
|
+
get (value) {
|
|
286
|
+
value.num[0] = this.options.outerRadius;
|
|
287
|
+
},
|
|
288
|
+
set (value) {
|
|
289
|
+
this.options = {
|
|
290
|
+
...this.options,
|
|
291
|
+
outerRadius: value.num[0]
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: 'InnerRadius',
|
|
297
|
+
type: 'float',
|
|
298
|
+
options: {
|
|
299
|
+
minValue: 0,
|
|
300
|
+
maxValue: 9999
|
|
301
|
+
},
|
|
302
|
+
default: 0.3,
|
|
303
|
+
get (value) {
|
|
304
|
+
value.num[0] = this.options.innerRadius;
|
|
305
|
+
},
|
|
306
|
+
set (value) {
|
|
307
|
+
this.options = {
|
|
308
|
+
...this.options,
|
|
309
|
+
innerRadius: value.num[0]
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: 'RadialDetail',
|
|
315
|
+
type: 'int',
|
|
316
|
+
options: {
|
|
317
|
+
minValue: 3,
|
|
318
|
+
maxValue: 100
|
|
319
|
+
},
|
|
320
|
+
default: 20,
|
|
321
|
+
get (value) {
|
|
322
|
+
value.num[0] = this.options.radialDetail;
|
|
323
|
+
},
|
|
324
|
+
set (value) {
|
|
325
|
+
this.options = {
|
|
326
|
+
...this.options,
|
|
327
|
+
radialDetail: Math.max(3, Math.min(100, value.num[0]))
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
];
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/** @internal */ function getPlaneShapeClass() {
|
|
336
|
+
return {
|
|
337
|
+
ctor: PlaneShape,
|
|
338
|
+
parent: Primitive,
|
|
339
|
+
name: 'PlaneShape',
|
|
340
|
+
createFunc (ctx, initParams) {
|
|
341
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
342
|
+
if (primitive) {
|
|
343
|
+
return {
|
|
344
|
+
obj: primitive,
|
|
345
|
+
loadProps: false
|
|
346
|
+
};
|
|
347
|
+
} else {
|
|
348
|
+
primitive = new PlaneShape({
|
|
349
|
+
size: 1
|
|
350
|
+
});
|
|
351
|
+
primitive.persistentId = initParams.persistentId;
|
|
352
|
+
return {
|
|
353
|
+
obj: primitive,
|
|
354
|
+
loadProps: true
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
getInitParams (obj) {
|
|
359
|
+
return {
|
|
360
|
+
persistentId: obj.persistentId
|
|
361
|
+
};
|
|
362
|
+
},
|
|
363
|
+
getProps () {
|
|
364
|
+
return [
|
|
365
|
+
{
|
|
366
|
+
name: 'Size',
|
|
367
|
+
type: 'vec2',
|
|
368
|
+
default: [
|
|
369
|
+
1,
|
|
370
|
+
1
|
|
371
|
+
],
|
|
372
|
+
get (value) {
|
|
373
|
+
value.num[0] = this.options.sizeX ?? this.options.size;
|
|
374
|
+
value.num[1] = this.options.sizeY ?? this.options.size;
|
|
375
|
+
},
|
|
376
|
+
set (value) {
|
|
377
|
+
this.options = {
|
|
378
|
+
...this.options,
|
|
379
|
+
sizeX: value.num[0],
|
|
380
|
+
sizeY: value.num[1]
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: 'Resolution',
|
|
386
|
+
type: 'int2',
|
|
387
|
+
default: [
|
|
388
|
+
1,
|
|
389
|
+
1
|
|
390
|
+
],
|
|
391
|
+
get (value) {
|
|
392
|
+
value.num[0] = this.options.resolutionX ?? this.options.resolution;
|
|
393
|
+
value.num[1] = this.options.resolutionY ?? this.options.resolution;
|
|
394
|
+
},
|
|
395
|
+
set (value) {
|
|
396
|
+
this.options = {
|
|
397
|
+
...this.options,
|
|
398
|
+
resolutionX: value.num[0],
|
|
399
|
+
resolutionY: value.num[1]
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'Anchor',
|
|
405
|
+
type: 'vec2',
|
|
406
|
+
default: [
|
|
407
|
+
0.5,
|
|
408
|
+
0.5
|
|
409
|
+
],
|
|
410
|
+
options: {
|
|
411
|
+
minValue: 0,
|
|
412
|
+
maxValue: 1
|
|
413
|
+
},
|
|
414
|
+
get (value) {
|
|
415
|
+
value.num[0] = this.options.anchorX ?? this.options.anchor;
|
|
416
|
+
value.num[1] = this.options.anchorY ?? this.options.anchor;
|
|
417
|
+
},
|
|
418
|
+
set (value) {
|
|
419
|
+
this.options = {
|
|
420
|
+
...this.options,
|
|
421
|
+
anchorX: value.num[0],
|
|
422
|
+
anchorY: value.num[1]
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
name: 'TwoSided',
|
|
428
|
+
type: 'bool',
|
|
429
|
+
default: false,
|
|
430
|
+
get (value) {
|
|
431
|
+
value.bool[0] = this.options.twoSided;
|
|
432
|
+
},
|
|
433
|
+
set (value) {
|
|
434
|
+
this.options = {
|
|
435
|
+
...this.options,
|
|
436
|
+
twoSided: value.bool[0]
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
];
|
|
441
|
+
}
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
/** @internal */ function getCylinderShapeClass() {
|
|
445
|
+
return {
|
|
446
|
+
ctor: CylinderShape,
|
|
447
|
+
parent: Primitive,
|
|
448
|
+
name: 'CylinderShape',
|
|
449
|
+
createFunc (ctx, initParams) {
|
|
450
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
451
|
+
if (primitive) {
|
|
452
|
+
return {
|
|
453
|
+
obj: primitive,
|
|
454
|
+
loadProps: false
|
|
455
|
+
};
|
|
456
|
+
} else {
|
|
457
|
+
primitive = new CylinderShape();
|
|
458
|
+
primitive.persistentId = initParams.persistentId;
|
|
459
|
+
return {
|
|
460
|
+
obj: primitive,
|
|
461
|
+
loadProps: true
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
getInitParams (obj) {
|
|
466
|
+
return {
|
|
467
|
+
persistentId: obj.persistentId
|
|
468
|
+
};
|
|
469
|
+
},
|
|
470
|
+
getProps () {
|
|
471
|
+
return [
|
|
472
|
+
{
|
|
473
|
+
name: 'Height',
|
|
474
|
+
type: 'float',
|
|
475
|
+
default: 1,
|
|
476
|
+
get (value) {
|
|
477
|
+
value.num[0] = this.options.height;
|
|
478
|
+
},
|
|
479
|
+
set (value) {
|
|
480
|
+
this.options = {
|
|
481
|
+
...this.options,
|
|
482
|
+
height: value.num[0]
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
name: 'BottomRadius',
|
|
488
|
+
type: 'float',
|
|
489
|
+
default: 1,
|
|
490
|
+
options: {
|
|
491
|
+
minValue: 0,
|
|
492
|
+
maxValue: 9999
|
|
493
|
+
},
|
|
494
|
+
get (value) {
|
|
495
|
+
value.num[0] = this.options.bottomRadius;
|
|
496
|
+
},
|
|
497
|
+
set (value) {
|
|
498
|
+
this.options = {
|
|
499
|
+
...this.options,
|
|
500
|
+
bottomRadius: value.num[0]
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: 'TopRadius',
|
|
506
|
+
type: 'float',
|
|
507
|
+
default: 1,
|
|
508
|
+
options: {
|
|
509
|
+
minValue: 0,
|
|
510
|
+
maxValue: 9999
|
|
511
|
+
},
|
|
512
|
+
get (value) {
|
|
513
|
+
value.num[0] = this.options.topRadius;
|
|
514
|
+
},
|
|
515
|
+
set (value) {
|
|
516
|
+
this.options = {
|
|
517
|
+
...this.options,
|
|
518
|
+
topRadius: value.num[0]
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: 'HeightDetail',
|
|
524
|
+
type: 'int',
|
|
525
|
+
default: 1,
|
|
526
|
+
options: {
|
|
527
|
+
minValue: 1,
|
|
528
|
+
maxValue: 100
|
|
529
|
+
},
|
|
530
|
+
get (value) {
|
|
531
|
+
value.num[0] = this.options.heightDetail;
|
|
532
|
+
},
|
|
533
|
+
set (value) {
|
|
534
|
+
this.options = {
|
|
535
|
+
...this.options,
|
|
536
|
+
heightDetail: Math.max(1, Math.min(value.num[0], 100))
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: 'RadialDetail',
|
|
542
|
+
type: 'int',
|
|
543
|
+
default: 20,
|
|
544
|
+
options: {
|
|
545
|
+
minValue: 2,
|
|
546
|
+
maxValue: 100
|
|
547
|
+
},
|
|
548
|
+
get (value) {
|
|
549
|
+
value.num[0] = this.options.radialDetail;
|
|
550
|
+
},
|
|
551
|
+
set (value) {
|
|
552
|
+
this.options = {
|
|
553
|
+
...this.options,
|
|
554
|
+
radialDetail: Math.max(2, Math.min(value.num[0], 100))
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: 'Anchor',
|
|
560
|
+
type: 'float',
|
|
561
|
+
default: 0,
|
|
562
|
+
options: {
|
|
563
|
+
minValue: 0,
|
|
564
|
+
maxValue: 1
|
|
565
|
+
},
|
|
566
|
+
get (value) {
|
|
567
|
+
value.num[0] = this.options.anchor;
|
|
568
|
+
},
|
|
569
|
+
set (value) {
|
|
570
|
+
this.options = {
|
|
571
|
+
...this.options,
|
|
572
|
+
anchor: value.num[0]
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
name: 'TopCap',
|
|
578
|
+
type: 'bool',
|
|
579
|
+
default: true,
|
|
580
|
+
get (value) {
|
|
581
|
+
value.bool[0] = this.options.topCap;
|
|
582
|
+
},
|
|
583
|
+
set (value) {
|
|
584
|
+
this.options = {
|
|
585
|
+
...this.options,
|
|
586
|
+
topCap: value.bool[0]
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
name: 'BottomCap',
|
|
592
|
+
type: 'bool',
|
|
593
|
+
default: true,
|
|
594
|
+
get (value) {
|
|
595
|
+
value.bool[0] = this.options.bottomCap;
|
|
596
|
+
},
|
|
597
|
+
set (value) {
|
|
598
|
+
this.options = {
|
|
599
|
+
...this.options,
|
|
600
|
+
bottomCap: value.bool[0]
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
];
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
/** @internal */ function getSphereShapeClass() {
|
|
609
|
+
return {
|
|
610
|
+
ctor: SphereShape,
|
|
611
|
+
parent: Primitive,
|
|
612
|
+
name: 'SphereShape',
|
|
613
|
+
createFunc (ctx, initParams) {
|
|
614
|
+
let primitive = Primitive.findPrimitiveById(initParams.persistentId);
|
|
615
|
+
if (primitive) {
|
|
616
|
+
return {
|
|
617
|
+
obj: primitive,
|
|
618
|
+
loadProps: false
|
|
619
|
+
};
|
|
620
|
+
} else {
|
|
621
|
+
primitive = new SphereShape();
|
|
622
|
+
primitive.persistentId = initParams.persistentId;
|
|
623
|
+
return {
|
|
624
|
+
obj: primitive,
|
|
625
|
+
loadProps: true
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
getInitParams (obj) {
|
|
630
|
+
return {
|
|
631
|
+
persistentId: obj.persistentId
|
|
632
|
+
};
|
|
633
|
+
},
|
|
634
|
+
getProps () {
|
|
635
|
+
return [
|
|
636
|
+
{
|
|
637
|
+
name: 'Radius',
|
|
638
|
+
type: 'float',
|
|
639
|
+
default: 1,
|
|
640
|
+
get (value) {
|
|
641
|
+
value.num[0] = this.options.radius;
|
|
642
|
+
},
|
|
643
|
+
set (value) {
|
|
644
|
+
this.options = {
|
|
645
|
+
...this.options,
|
|
646
|
+
radius: value.num[0]
|
|
647
|
+
};
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
name: 'VerticalDetail',
|
|
652
|
+
type: 'int',
|
|
653
|
+
options: {
|
|
654
|
+
minValue: 2,
|
|
655
|
+
maxValue: 100
|
|
656
|
+
},
|
|
657
|
+
default: 20,
|
|
658
|
+
get (value) {
|
|
659
|
+
value.num[0] = this.options.verticalDetail;
|
|
660
|
+
},
|
|
661
|
+
set (value) {
|
|
662
|
+
this.options = {
|
|
663
|
+
...this.options,
|
|
664
|
+
verticalDetail: Math.max(2, Math.min(value.num[0], 100))
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: 'HorizontalDetail',
|
|
670
|
+
type: 'int',
|
|
671
|
+
options: {
|
|
672
|
+
minValue: 2,
|
|
673
|
+
maxValue: 100
|
|
674
|
+
},
|
|
675
|
+
default: 20,
|
|
676
|
+
get (value) {
|
|
677
|
+
value.num[0] = this.options.horizonalDetail;
|
|
678
|
+
},
|
|
679
|
+
set (value) {
|
|
680
|
+
this.options = {
|
|
681
|
+
...this.options,
|
|
682
|
+
horizonalDetail: Math.max(2, Math.min(value.num[0], 100))
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
];
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
export { getBoxFrameShapeClass, getBoxShapeClass, getCylinderShapeClass, getPlaneShapeClass, getPrimitiveClass, getSphereShapeClass, getTorusShapeClass };
|
|
692
|
+
//# sourceMappingURL=primitive.js.map
|