@gnsx/three 0.185.16 → 0.186.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.cjs +10 -82600
- package/build/three.core.js +1303 -728
- package/build/three.module.js +439 -338
- package/build/three.tsl.js +74 -44
- package/build/three.webgpu.js +6036 -2184
- package/build/three.webgpu.nodes.js +6020 -2184
- package/examples/jsm/Addons.js +6 -6
- package/examples/jsm/controls/ArcballControls.js +1 -1
- package/examples/jsm/controls/FirstPersonControls.js +44 -20
- package/examples/jsm/controls/OrbitControls.js +9 -0
- package/examples/jsm/controls/TrackballControls.js +109 -4
- package/examples/jsm/csm/CSMShadowNode.js +13 -0
- package/examples/jsm/exporters/GLTFExporter.js +23 -7
- package/examples/jsm/exporters/USDZExporter.js +2 -2
- package/examples/jsm/generators/CityGenerator.js +377 -45
- package/examples/jsm/generators/ForestGenerator.js +12 -12
- package/examples/jsm/generators/TerrainGenerator.js +49 -37
- package/examples/jsm/generators/TreeGenerator.js +70 -76
- package/examples/jsm/generators/city/BenchGenerator.js +127 -0
- package/examples/jsm/generators/city/CarGenerator.js +479 -0
- package/examples/jsm/generators/city/CityGeneratorUtils.js +31 -0
- package/examples/jsm/generators/city/HydrantGenerator.js +106 -0
- package/examples/jsm/generators/city/InstancedMeshGenerator.js +86 -0
- package/examples/jsm/generators/city/PersonGenerator.js +447 -0
- package/examples/jsm/generators/city/SidewalkGenerator.js +33 -38
- package/examples/jsm/generators/city/SkyscraperGenerator.js +448 -48
- package/examples/jsm/generators/city/StreetTreeGenerator.js +231 -0
- package/examples/jsm/generators/city/StreetlightGenerator.js +100 -0
- package/examples/jsm/generators/city/TrafficlightGenerator.js +106 -0
- package/examples/jsm/generators/city/TrashcanGenerator.js +100 -0
- package/examples/jsm/geometries/BoxLineGeometry.js +1 -1
- package/examples/jsm/geometries/ParametricGeometry.js +1 -1
- package/examples/jsm/geometries/RoundedBoxGeometry.js +1 -1
- package/examples/jsm/gpgpu/CountingSort.js +271 -0
- package/examples/jsm/helpers/LightProbeGridHelper.js +60 -239
- package/examples/jsm/helpers/LightProbeGridHelperWebGL.js +221 -0
- package/examples/jsm/inspector/Extension.js +94 -0
- package/examples/jsm/inspector/Inspector.js +145 -41
- package/examples/jsm/inspector/RendererInspector.js +100 -52
- package/examples/jsm/inspector/extensions/color-grading/ColorGrading.js +2609 -0
- package/examples/jsm/inspector/extensions/color-grading/ColorWheel.js +352 -0
- package/examples/jsm/inspector/extensions/color-grading/CurveEditor.js +599 -0
- package/examples/jsm/inspector/extensions/color-grading/LUT3DStyle.js +1201 -0
- package/examples/jsm/inspector/extensions/color-grading/LUTMath.js +788 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/BrightnessModule.js +72 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ColorWheelModule.js +112 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ContrastModule.js +82 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/CurvesModule.js +109 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureHueModule.js +110 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ExposureModule.js +73 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/HueModule.js +78 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/ImportedCubeModule.js +89 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/Module.js +285 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/OutputModule.js +101 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/RendererModule.js +225 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SatVibranceModule.js +102 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/SaturationModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/VibranceModule.js +76 -0
- package/examples/jsm/inspector/extensions/color-grading/modules/WhiteBalanceModule.js +86 -0
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.js +26 -31
- package/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.js +1 -0
- package/examples/jsm/inspector/tabs/Memory.js +0 -2
- package/examples/jsm/inspector/tabs/Settings.js +4 -0
- package/examples/jsm/inspector/tabs/Timeline.js +223 -171
- package/examples/jsm/inspector/tabs/Viewer.js +515 -21
- package/examples/jsm/inspector/ui/List.js +15 -9
- package/examples/jsm/inspector/ui/Profiler.js +170 -14
- package/examples/jsm/inspector/ui/Style.js +269 -23
- package/examples/jsm/inspector/ui/Tab.js +2 -0
- package/examples/jsm/inspector/ui/Values.js +14 -2
- package/examples/jsm/interactive/HTMLMesh.js +19 -3
- package/examples/jsm/lighting/LightProbeGrid.js +484 -889
- package/examples/jsm/lighting/LightProbeGridUtils.js +107 -0
- package/examples/jsm/lighting/LightProbeGridWebGL.js +841 -0
- package/examples/jsm/lighting/vxgi/VXGIConeTracer.js +194 -0
- package/examples/jsm/lighting/vxgi/VXGINode.js +660 -0
- package/examples/jsm/lighting/vxgi/VXGISceneCollector.js +478 -0
- package/examples/jsm/lighting/vxgi/VXGIVolume.js +1430 -0
- package/examples/jsm/lights/SunLight.js +95 -0
- package/examples/jsm/lights/SunLightNode.js +56 -0
- package/examples/jsm/lights/SunLightShadow.js +319 -0
- package/examples/jsm/lights/SunShadowNode.js +312 -0
- package/examples/jsm/loaders/3DMLoader.js +150 -49
- package/examples/jsm/loaders/3MFLoader.js +202 -1
- package/examples/jsm/loaders/FBXLoader.js +81 -5
- package/examples/jsm/loaders/GLTFGaussianSplatLoaderExtension.js +330 -0
- package/examples/jsm/loaders/GLTFLoader.js +79 -14
- package/examples/jsm/loaders/GaussianSplatPLYLoader.js +386 -0
- package/examples/jsm/loaders/KSPLATLoader.js +463 -0
- package/examples/jsm/loaders/MaterialXLoader.js +111 -1010
- package/examples/jsm/loaders/PCDLoader.js +1 -1
- package/examples/jsm/loaders/SPLATLoader.js +139 -0
- package/examples/jsm/loaders/SPZLoader.js +561 -0
- package/examples/jsm/loaders/materialx/MaterialXArchive.js +108 -0
- package/examples/jsm/loaders/materialx/MaterialXDocument.js +878 -0
- package/examples/jsm/loaders/materialx/MaterialXHextile.js +183 -0
- package/examples/jsm/loaders/materialx/MaterialXInterfaceValidation.js +376 -0
- package/examples/jsm/loaders/materialx/MaterialXLog.js +75 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeInterfaceRegistry.js +4 -0
- package/examples/jsm/loaders/materialx/MaterialXNodeLibrary.js +1021 -0
- package/examples/jsm/loaders/materialx/MaterialXSurfaceMappings.js +661 -0
- package/examples/jsm/loaders/materialx/MaterialXUtils.js +57 -0
- package/examples/jsm/loaders/materialx/compile/MaterialXCompileRegistry.js +997 -0
- package/examples/jsm/loaders/materialx/parse/MaterialXParser.js +28 -0
- package/examples/jsm/loaders/usd/USDAParser.js +15 -2
- package/examples/jsm/loaders/usd/USDCParser.js +1 -4
- package/examples/jsm/loaders/usd/USDComposer.js +80 -42
- package/examples/jsm/materials/WoodNodeMaterial.js +6 -108
- package/examples/jsm/misc/RollerCoaster.js +2 -2
- package/examples/jsm/misc/SculptGL.LICENSE.txt +21 -0
- package/examples/jsm/misc/Sculptor.js +1679 -0
- package/examples/jsm/misc/SculptorMesh.js +1504 -0
- package/examples/jsm/misc/SculptorTools.js +1180 -0
- package/examples/jsm/misc/SculptorUtils.js +345 -0
- package/examples/jsm/misc/TubePainter.js +28 -16
- package/examples/jsm/misc/VolumeSlice.js +24 -24
- package/examples/jsm/modifiers/SimplifyModifier.js +63 -556
- package/examples/jsm/objects/GaussianSplat.js +1039 -0
- package/examples/jsm/objects/Sky.js +66 -45
- package/examples/jsm/objects/SkyMesh.js +70 -51
- package/examples/jsm/physics/JoltPhysics.js +1 -1
- package/examples/jsm/postprocessing/AfterimagePass.js +4 -2
- package/examples/jsm/postprocessing/BloomPass.js +2 -2
- package/examples/jsm/postprocessing/GTAOPass.js +1 -1
- package/examples/jsm/postprocessing/OutlinePass.js +5 -5
- package/examples/jsm/postprocessing/SAOPass.js +1 -1
- package/examples/jsm/postprocessing/SSAOPass.js +1 -1
- package/examples/jsm/postprocessing/SSRPass.js +4 -2
- package/examples/jsm/postprocessing/SavePass.js +1 -1
- package/examples/jsm/postprocessing/TAARenderPass.js +1 -1
- package/examples/jsm/postprocessing/UnrealBloomPass.js +30 -13
- package/examples/jsm/renderers/CSS2DRenderer.js +29 -5
- package/examples/jsm/shaders/DepthLimitedBlurShader.js +4 -1
- package/examples/jsm/shaders/ExposureShader.js +1 -1
- package/examples/jsm/shaders/FilmShader.js +2 -1
- package/examples/jsm/transpiler/AST.js +21 -2
- package/examples/jsm/transpiler/GLSLDecoder.js +498 -8
- package/examples/jsm/transpiler/TSLEncoder.js +82 -10
- package/examples/jsm/transpiler/WGSLEncoder.js +33 -4
- package/examples/jsm/tsl/WebGLNodesHandler.js +29 -39
- package/examples/jsm/tsl/display/AfterImageNode.js +2 -0
- package/examples/jsm/tsl/display/AnaglyphPassNode.js +3 -2
- package/examples/jsm/tsl/display/BilateralBlurNode.js +5 -2
- package/examples/jsm/tsl/display/BloomNode.js +55 -30
- package/examples/jsm/tsl/display/DenoiseNode.js +21 -1
- package/examples/jsm/tsl/display/DepthOfFieldNode.js +24 -6
- package/examples/jsm/tsl/display/DotScreenNode.js +11 -11
- package/examples/jsm/tsl/display/FSR1Node.js +8 -4
- package/examples/jsm/tsl/display/GTAONode.js +199 -86
- package/examples/jsm/tsl/display/GaussianBlurNode.js +65 -52
- package/examples/jsm/tsl/display/GodraysNode.js +5 -2
- package/examples/jsm/tsl/display/ImportanceSampledEnvironment.js +2 -2
- package/examples/jsm/tsl/display/LensflareNode.js +5 -2
- package/examples/jsm/tsl/display/OITPassNode.js +352 -0
- package/examples/jsm/tsl/display/OutlineNode.js +2 -0
- package/examples/jsm/tsl/display/ParallaxBarrierPassNode.js +3 -2
- package/examples/jsm/tsl/display/RGBShiftNode.js +9 -9
- package/examples/jsm/tsl/display/RecurrentDenoiseNode.js +7 -4
- package/examples/jsm/tsl/display/RetroPassNode.js +1 -1
- package/examples/jsm/tsl/display/SMAANode.js +22 -61
- package/examples/jsm/tsl/display/SSAAPassNode.js +2 -4
- package/examples/jsm/tsl/display/SSAONode.js +436 -0
- package/examples/jsm/tsl/display/SSGINode.js +5 -2
- package/examples/jsm/tsl/display/SSRNode.js +7 -2
- package/examples/jsm/tsl/display/SSSNode.js +5 -2
- package/examples/jsm/tsl/display/SharpenNode.js +5 -4
- package/examples/jsm/tsl/display/StereoCompositePassNode.js +1 -3
- package/examples/jsm/tsl/display/StereoPassNode.js +1 -3
- package/examples/jsm/tsl/display/TAAUNode.js +22 -125
- package/examples/jsm/tsl/display/TRAANode.js +16 -142
- package/examples/jsm/tsl/display/TemporalReprojectNode.js +21 -15
- package/examples/jsm/tsl/display/depthAwareBlur.js +63 -0
- package/examples/jsm/tsl/display/hashBlur.js +3 -2
- package/examples/jsm/tsl/lighting/ClusteredLightsNode.js +38 -27
- package/examples/jsm/tsl/lighting/LightProbeGridNode.js +136 -0
- package/examples/jsm/tsl/math/voronoiNoise.js +112 -0
- package/examples/jsm/tsl/shadows/TileShadowNode.js +4 -6
- package/examples/jsm/tsl/utils/Raymarching.js +5 -5
- package/examples/jsm/tsl/utils/SoftParticles.js +60 -0
- package/examples/jsm/tsl/utils/TAAUtils.js +195 -0
- package/examples/jsm/utils/BufferGeometryUtils.js +14 -14
- package/examples/jsm/utils/GaussianSplatUtils.js +229 -0
- package/examples/jsm/utils/WebGLTextureUtils.js +1 -1
- package/examples/jsm/utils/WebGPUTextureUtils.js +1 -1
- package/examples/jsm/webxr/WebGLXRFallback.js +2 -16
- package/examples/jsm/webxr/XRControllerModelFactory.js +16 -4
- package/package.json +9 -16
- package/src/Three.Core.js +2 -1
- package/src/Three.TSL.js +73 -43
- package/src/Three.WebGPU.Nodes.js +1 -0
- package/src/Three.WebGPU.js +1 -0
- package/src/animation/AnimationClip.js +15 -2
- package/src/animation/AnimationObjectGroup.js +18 -6
- package/src/animation/AnimationUtils.js +26 -0
- package/src/animation/KeyframeTrack.js +37 -0
- package/src/constants.js +23 -1
- package/src/core/BufferAttribute.js +3 -2
- package/src/core/BufferGeometry.js +1 -1
- package/src/core/InterleavedBuffer.js +5 -1
- package/src/core/Object3D.js +40 -12
- package/src/core/Raycaster.js +4 -0
- package/src/core/RenderTarget.js +99 -9
- package/src/core/RenderTarget3D.js +12 -8
- package/src/extras/Controls.js +0 -8
- package/src/extras/PMREMGenerator.js +99 -205
- package/src/geometries/TorusGeometry.js +1 -1
- package/src/helpers/ArrowHelper.js +2 -0
- package/src/helpers/AxesHelper.js +2 -0
- package/src/helpers/Box3Helper.js +2 -0
- package/src/helpers/BoxHelper.js +2 -0
- package/src/helpers/CameraHelper.js +2 -0
- package/src/helpers/DirectionalLightHelper.js +2 -0
- package/src/helpers/GridHelper.js +2 -0
- package/src/helpers/HemisphereLightHelper.js +2 -0
- package/src/helpers/PlaneHelper.js +2 -0
- package/src/helpers/PointLightHelper.js +2 -0
- package/src/helpers/PolarGridHelper.js +2 -0
- package/src/helpers/SkeletonHelper.js +2 -0
- package/src/helpers/SpotLightHelper.js +2 -0
- package/src/lights/Light.js +0 -10
- package/src/lights/LightShadow.js +43 -12
- package/src/lights/SpotLightShadow.js +18 -0
- package/src/loaders/BufferGeometryLoader.js +5 -0
- package/src/loaders/ImageBitmapLoader.js +3 -1
- package/src/loaders/ObjectLoader.js +8 -5
- package/src/materials/Material.js +80 -57
- package/src/materials/MeshPhysicalMaterial.js +32 -0
- package/src/materials/nodes/Line2NodeMaterial.js +17 -8
- package/src/materials/nodes/MeshPhysicalNodeMaterial.js +42 -5
- package/src/materials/nodes/NodeMaterial.js +19 -13
- package/src/materials/nodes/PointsNodeMaterial.js +2 -1
- package/src/materials/nodes/manager/NodeMaterialObserver.js +282 -55
- package/src/math/Frustum.js +9 -0
- package/src/math/FrustumArray.js +1 -1
- package/src/math/MathUtils.js +5 -3
- package/src/math/Matrix4.js +2 -9
- package/src/math/Plane.js +30 -1
- package/src/math/Quaternion.js +0 -10
- package/src/math/Ray.js +95 -45
- package/src/math/Triangle.js +0 -2
- package/src/math/Vector3.js +2 -2
- package/src/math/Vector4.js +0 -4
- package/src/math/interpolants/BezierInterpolant.js +36 -23
- package/src/nodes/Nodes.js +2 -0
- package/src/nodes/TSL.js +11 -3
- package/src/nodes/accessors/Batch.js +85 -13
- package/src/nodes/accessors/BufferAttributeNode.js +1 -1
- package/src/nodes/accessors/BuiltinNode.js +1 -1
- package/src/nodes/accessors/Instance.js +19 -18
- package/src/nodes/accessors/MaterialNode.js +9 -0
- package/src/nodes/accessors/ModelNode.js +85 -9
- package/src/nodes/accessors/ReferenceBaseNode.js +1 -70
- package/src/nodes/accessors/ReferenceElementNode.js +72 -0
- package/src/nodes/accessors/ReferenceNode.js +1 -70
- package/src/nodes/accessors/Skinning.js +124 -12
- package/src/nodes/accessors/StorageTextureNode.js +7 -3
- package/src/nodes/accessors/Texture3DNode.js +1 -1
- package/src/nodes/accessors/TextureNode.js +51 -21
- package/src/nodes/accessors/TextureSizeNode.js +4 -2
- package/src/nodes/accessors/UniformArrayNode.js +30 -5
- package/src/nodes/code/CodeNode.js +1 -1
- package/src/nodes/code/FunctionNode.js +12 -2
- package/src/nodes/core/ArrayNode.js +2 -2
- package/src/nodes/core/ContextNode.js +57 -4
- package/src/nodes/core/IndexNode.js +69 -4
- package/src/nodes/core/InspectorNode.js +2 -2
- package/src/nodes/core/MRTNode.js +44 -2
- package/src/nodes/core/Node.js +6 -3
- package/src/nodes/core/NodeBuilder.js +65 -50
- package/src/nodes/core/NodeFrame.js +11 -3
- package/src/nodes/core/NodeUtils.js +88 -0
- package/src/nodes/core/PropertyNode.js +8 -0
- package/src/nodes/core/StackNode.js +0 -1
- package/src/nodes/core/StructNode.js +4 -3
- package/src/nodes/core/UniformGroupNode.js +3 -2
- package/src/nodes/core/UniformNode.js +26 -12
- package/src/nodes/core/VarNode.js +0 -1
- package/src/nodes/display/BumpMapNode.js +2 -2
- package/src/nodes/display/ColorAdjustment.js +1 -1
- package/src/nodes/display/PassNode.js +76 -15
- package/src/nodes/display/ScreenNode.js +22 -65
- package/src/nodes/fog/Fog.js +4 -4
- package/src/nodes/functions/BSDF/BRDF_GGX.js +6 -6
- package/src/nodes/functions/BSDF/BRDF_Sheen.js +1 -1
- package/src/nodes/functions/BSDF/DFGLUT.js +2 -1
- package/src/nodes/functions/BSDF/LTC.js +1 -1
- package/src/nodes/functions/PhongLightingModel.js +1 -1
- package/src/nodes/functions/PhysicalLightingModel.js +83 -25
- package/src/nodes/functions/ToonLightingModel.js +2 -2
- package/src/nodes/functions/material/getParallaxCorrectNormal.js +3 -3
- package/src/nodes/gpgpu/AtomicFunctionNode.js +64 -13
- package/src/nodes/gpgpu/BarrierNode.js +13 -4
- package/src/nodes/gpgpu/ComputeBuiltinNode.js +1 -1
- package/src/nodes/gpgpu/ComputeNode.js +20 -17
- package/src/nodes/gpgpu/SubgroupFunctionNode.js +165 -37
- package/src/nodes/gpgpu/WorkgroupInfoNode.js +44 -6
- package/src/nodes/lighting/EnvironmentNode.js +40 -4
- package/src/nodes/lighting/LightsNode.js +20 -4
- package/src/nodes/lighting/ShadowBaseNode.js +158 -1
- package/src/nodes/lighting/ShadowFilterNode.js +2 -106
- package/src/nodes/lighting/ShadowNode.js +22 -91
- package/src/nodes/materialx/{lib/mx_hsv.js → MaterialXColor.js} +3 -6
- package/src/nodes/materialx/{lib/mx_transform_color.js → MaterialXColorTransform.js} +3 -6
- package/src/nodes/materialx/MaterialXCore.js +37 -0
- package/src/nodes/materialx/MaterialXNodes.js +64 -72
- package/src/nodes/materialx/{lib/mx_noise.js → MaterialXNoise.js} +426 -197
- package/src/nodes/math/BitcountNode.js +24 -4
- package/src/nodes/math/MathNode.js +4 -4
- package/src/nodes/math/MathUtils.js +15 -4
- package/src/nodes/math/OperatorNode.js +2 -2
- package/src/nodes/math/PackFloatNode.js +29 -1
- package/src/nodes/math/Packed4x8IntegerNode.js +433 -0
- package/src/nodes/math/UnpackFloatNode.js +30 -2
- package/src/nodes/parsers/GLSLNodeFunction.js +1 -1
- package/src/nodes/pmrem/PMREMNode.js +1 -1
- package/src/nodes/pmrem/PMREMUtils.js +31 -74
- package/src/nodes/shapes/Shapes.js +1 -1
- package/src/nodes/tsl/TSLCore.js +1 -31
- package/src/nodes/utils/EventNode.js +75 -0
- package/src/nodes/utils/LoopNode.js +54 -13
- package/src/nodes/utils/PostProcessingUtils.js +23 -2
- package/src/nodes/utils/RTTNode.js +97 -32
- package/src/nodes/utils/ReflectorNode.js +8 -4
- package/src/nodes/utils/RotateNode.js +85 -8
- package/src/nodes/utils/SpriteUtils.js +58 -23
- package/src/objects/BatchedMesh.js +6 -0
- package/src/objects/InstancedMesh.js +1 -1
- package/src/objects/LOD.js +1 -1
- package/src/objects/Line.js +12 -0
- package/src/objects/Mesh.js +12 -0
- package/src/objects/Points.js +12 -0
- package/src/objects/Sprite.js +12 -0
- package/src/renderers/WebGLRenderer.js +93 -27
- package/src/renderers/common/Animation.js +12 -2
- package/src/renderers/common/Backend.js +38 -10
- package/src/renderers/common/BindGroup.js +0 -1
- package/src/renderers/common/Bindings.js +50 -4
- package/src/renderers/common/BundleGroup.js +4 -0
- package/src/renderers/common/ClippingContext.js +11 -1
- package/src/renderers/common/Color4.js +9 -0
- package/src/renderers/common/Constants.js +0 -5
- package/src/renderers/common/DirectRenderPipeline.js +233 -0
- package/src/renderers/common/Geometries.js +24 -3
- package/src/renderers/common/Info.js +3 -3
- package/src/renderers/common/InspectorBase.js +37 -8
- package/src/renderers/common/Lighting.js +11 -4
- package/src/renderers/common/Pipelines.js +6 -4
- package/src/renderers/common/QuadMesh.js +16 -2
- package/src/renderers/common/RenderContext.js +8 -0
- package/src/renderers/common/RenderList.js +53 -19
- package/src/renderers/common/RenderLists.js +58 -11
- package/src/renderers/common/RenderObject.js +14 -0
- package/src/renderers/common/RenderObjects.js +14 -9
- package/src/renderers/common/RenderPipeline.js +52 -44
- package/src/renderers/common/Renderer.js +226 -55
- package/src/renderers/common/Storage3DTexture.js +16 -0
- package/src/renderers/common/Textures.js +3 -3
- package/src/renderers/common/XRManager.js +79 -72
- package/src/renderers/common/extras/PMREMGenerator.js +76 -144
- package/src/renderers/common/nodes/NodeManager.js +144 -6
- package/src/renderers/common/nodes/NodeStorageBuffer.js +3 -1
- package/src/renderers/common/nodes/NodeUniformBuffer.js +3 -1
- package/src/renderers/shaders/DFGLUTData.js +2 -1
- package/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js +4 -2
- package/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js +48 -0
- package/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js +53 -4
- package/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js +20 -2
- package/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.js +20 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +6 -0
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +61 -57
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.js +82 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.js +9 -0
- package/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.js +8 -1
- package/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.js +15 -0
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +4 -0
- package/src/renderers/shaders/ShaderLib.js +1 -0
- package/src/renderers/shaders/UniformsLib.js +16 -0
- package/src/renderers/webgl/WebGLAnimation.js +2 -2
- package/src/renderers/webgl/WebGLCapabilities.js +2 -2
- package/src/renderers/webgl/WebGLLights.js +74 -4
- package/src/renderers/webgl/WebGLMaterials.js +6 -0
- package/src/renderers/webgl/WebGLOutput.js +36 -24
- package/src/renderers/webgl/WebGLProgram.js +3 -0
- package/src/renderers/webgl/WebGLPrograms.js +8 -0
- package/src/renderers/webgl/WebGLRenderLists.js +6 -10
- package/src/renderers/webgl/WebGLShadowMap.js +47 -44
- package/src/renderers/webgl/WebGLTextures.js +7 -7
- package/src/renderers/webgl-fallback/WebGLBackend.js +153 -45
- package/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.js +83 -29
- package/src/renderers/webgl-fallback/utils/WebGLState.js +163 -17
- package/src/renderers/webgl-fallback/utils/WebGLTextureUtils.js +32 -5
- package/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.js +11 -4
- package/src/renderers/webgpu/WebGPUBackend.js +513 -145
- package/src/renderers/webgpu/nodes/WGSLNodeBuilder.js +99 -20
- package/src/renderers/webgpu/nodes/WGSLNodeFunction.js +2 -1
- package/src/renderers/webgpu/utils/WebGPUAttributeUtils.js +3 -12
- package/src/renderers/webgpu/utils/WebGPUBindingUtils.js +24 -14
- package/src/renderers/webgpu/utils/WebGPUPipelineUtils.js +80 -14
- package/src/renderers/webgpu/utils/WebGPUTextureUtils.js +62 -7
- package/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.js +9 -3
- package/src/renderers/webgpu/utils/WebGPUUtils.js +16 -4
- package/src/renderers/webxr/WebXRManager.js +25 -2
- package/src/scenes/Scene.js +3 -3
- package/src/textures/CompressedArrayTexture.js +16 -0
- package/src/textures/Data3DTexture.js +16 -0
- package/src/textures/DataArrayTexture.js +16 -0
- package/src/textures/DepthTexture.js +3 -3
- package/src/textures/Texture.js +3 -3
- package/src/textures/{Source.js → TextureSource.js} +39 -8
- package/build/three.core.min.js +0 -6
- package/build/three.module.min.js +0 -6
- package/build/three.tsl.min.js +0 -6
- package/build/three.webgpu.min.js +0 -6
- package/build/three.webgpu.nodes.min.js +0 -6
- package/examples/jsm/libs/ecsy.module.js +0 -1792
- package/examples/jsm/loaders/LottieLoader.js +0 -130
- package/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.js +0 -52
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class Style {
|
|
2
2
|
|
|
3
|
-
static init( container ) {
|
|
3
|
+
static init( container, nonce = null ) {
|
|
4
4
|
|
|
5
5
|
const css = /* css */`
|
|
6
6
|
@scope (.three-inspector) {
|
|
@@ -20,6 +20,20 @@ export class Style {
|
|
|
20
20
|
--color-call: rgba(255, 185, 34, 1);
|
|
21
21
|
--font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
22
22
|
--font-mono: 'Courier New', Courier, monospace;
|
|
23
|
+
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
z-index: 1000;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
color-scheme: dark;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:scope * {
|
|
36
|
+
pointer-events: auto;
|
|
23
37
|
}
|
|
24
38
|
|
|
25
39
|
.profiler-panel, .profiler-toggle, .detached-tab-panel,
|
|
@@ -33,7 +47,7 @@ export class Style {
|
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
.profiler-toggle {
|
|
36
|
-
position:
|
|
50
|
+
position: absolute;
|
|
37
51
|
top: 15px;
|
|
38
52
|
right: 15px;
|
|
39
53
|
background-color: rgba(30, 30, 36, 0.85);
|
|
@@ -41,7 +55,7 @@ export class Style {
|
|
|
41
55
|
border-radius: 12px 6px 6px 12px;
|
|
42
56
|
color: var(--text-primary);
|
|
43
57
|
cursor: pointer;
|
|
44
|
-
z-index:
|
|
58
|
+
z-index: 1002;
|
|
45
59
|
transition: all 0.2s ease-in-out;
|
|
46
60
|
/*font-size: 14px;*/
|
|
47
61
|
font-size: 15px;
|
|
@@ -68,14 +82,14 @@ export class Style {
|
|
|
68
82
|
opacity: 0.5;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
|
-
.profiler-toggle.
|
|
85
|
+
.profiler-toggle.toggle-left {
|
|
72
86
|
right: auto;
|
|
73
87
|
left: 15px;
|
|
74
88
|
border-radius: 6px 12px 12px 6px;
|
|
75
89
|
flex-direction: row-reverse;
|
|
76
90
|
}
|
|
77
91
|
|
|
78
|
-
.profiler-toggle.
|
|
92
|
+
.profiler-toggle.toggle-left .builtin-tabs-container {
|
|
79
93
|
border-right: none;
|
|
80
94
|
border-left: 1px solid #262636;
|
|
81
95
|
}
|
|
@@ -227,7 +241,7 @@ export class Style {
|
|
|
227
241
|
}
|
|
228
242
|
|
|
229
243
|
.profiler-mini-panel {
|
|
230
|
-
position:
|
|
244
|
+
position: absolute;
|
|
231
245
|
top: 60px;
|
|
232
246
|
right: 15px;
|
|
233
247
|
background-color: rgba(30, 30, 36, 0.85);
|
|
@@ -252,7 +266,7 @@ export class Style {
|
|
|
252
266
|
transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
253
267
|
}
|
|
254
268
|
|
|
255
|
-
.profiler-mini-panel.
|
|
269
|
+
.profiler-mini-panel.toggle-left {
|
|
256
270
|
right: auto;
|
|
257
271
|
left: 15px;
|
|
258
272
|
}
|
|
@@ -263,20 +277,14 @@ export class Style {
|
|
|
263
277
|
transform: translateY(0) scale(1);
|
|
264
278
|
}
|
|
265
279
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
top: auto !important;
|
|
270
|
-
bottom: 15px !important;
|
|
271
|
-
z-index: 10005 !important;
|
|
280
|
+
.profiler-toggle.toggle-bottom {
|
|
281
|
+
top: auto;
|
|
282
|
+
bottom: 15px;
|
|
272
283
|
}
|
|
273
284
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
bottom: 60px !important;
|
|
278
|
-
max-height: calc(100vh - 120px) !important;
|
|
279
|
-
z-index: 10006 !important;
|
|
285
|
+
.profiler-mini-panel.toggle-bottom {
|
|
286
|
+
top: auto;
|
|
287
|
+
bottom: 60px;
|
|
280
288
|
}
|
|
281
289
|
|
|
282
290
|
.profiler-mini-panel::-webkit-scrollbar {
|
|
@@ -401,6 +409,8 @@ export class Style {
|
|
|
401
409
|
margin-left: 6px;
|
|
402
410
|
cursor: help;
|
|
403
411
|
position: relative;
|
|
412
|
+
vertical-align: middle;
|
|
413
|
+
top: -1px;
|
|
404
414
|
}
|
|
405
415
|
|
|
406
416
|
.info-icon.active {
|
|
@@ -560,7 +570,7 @@ export class Style {
|
|
|
560
570
|
}
|
|
561
571
|
|
|
562
572
|
.profiler-panel {
|
|
563
|
-
position:
|
|
573
|
+
position: absolute;
|
|
564
574
|
z-index: 1001 !important;
|
|
565
575
|
bottom: 0;
|
|
566
576
|
left: 0;
|
|
@@ -589,7 +599,8 @@ export class Style {
|
|
|
589
599
|
}
|
|
590
600
|
|
|
591
601
|
.profiler-panel.maximized {
|
|
592
|
-
height:
|
|
602
|
+
height: 100%;
|
|
603
|
+
z-index: 10000 !important;
|
|
593
604
|
}
|
|
594
605
|
|
|
595
606
|
/* Position-specific styles */
|
|
@@ -1070,6 +1081,7 @@ export class Style {
|
|
|
1070
1081
|
|
|
1071
1082
|
.list-item-row {
|
|
1072
1083
|
display: grid;
|
|
1084
|
+
grid-template-columns: var(--list-grid-template, none);
|
|
1073
1085
|
align-items: center;
|
|
1074
1086
|
padding: 4px 8px;
|
|
1075
1087
|
border-radius: 3px;
|
|
@@ -1161,6 +1173,7 @@ export class Style {
|
|
|
1161
1173
|
|
|
1162
1174
|
.list-header {
|
|
1163
1175
|
display: grid;
|
|
1176
|
+
grid-template-columns: var(--list-grid-template, none);
|
|
1164
1177
|
align-items: center;
|
|
1165
1178
|
padding: 4px 8px;
|
|
1166
1179
|
font-weight: 600;
|
|
@@ -1191,6 +1204,7 @@ export class Style {
|
|
|
1191
1204
|
|
|
1192
1205
|
.list-children-container.closed {
|
|
1193
1206
|
max-height: 0;
|
|
1207
|
+
display: none !important;
|
|
1194
1208
|
}
|
|
1195
1209
|
|
|
1196
1210
|
.item-toggler {
|
|
@@ -1426,6 +1440,7 @@ export class Style {
|
|
|
1426
1440
|
font-family: var(--font-mono);
|
|
1427
1441
|
width: 100%;
|
|
1428
1442
|
box-sizing: border-box;
|
|
1443
|
+
color-scheme: dark;
|
|
1429
1444
|
}
|
|
1430
1445
|
|
|
1431
1446
|
.param-control input:focus {
|
|
@@ -1689,7 +1704,7 @@ export class Style {
|
|
|
1689
1704
|
}
|
|
1690
1705
|
|
|
1691
1706
|
.drag-preview-indicator {
|
|
1692
|
-
position:
|
|
1707
|
+
position: absolute;
|
|
1693
1708
|
background-color: rgba(0, 170, 255, 0.2);
|
|
1694
1709
|
border: 2px dashed var(--color-accent);
|
|
1695
1710
|
z-index: 999;
|
|
@@ -1699,7 +1714,7 @@ export class Style {
|
|
|
1699
1714
|
|
|
1700
1715
|
/* Detached Tab Windows */
|
|
1701
1716
|
.detached-tab-panel {
|
|
1702
|
-
position:
|
|
1717
|
+
position: absolute;
|
|
1703
1718
|
width: 500px;
|
|
1704
1719
|
height: 400px;
|
|
1705
1720
|
background: var(--profiler-background);
|
|
@@ -2008,6 +2023,16 @@ export class Style {
|
|
|
2008
2023
|
background-color: rgba(255, 255, 255, 0.05);
|
|
2009
2024
|
}
|
|
2010
2025
|
|
|
2026
|
+
select {
|
|
2027
|
+
color-scheme: dark;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
select option,
|
|
2031
|
+
option {
|
|
2032
|
+
background-color: #1e1e24;
|
|
2033
|
+
color: var(--text-primary);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2011
2036
|
.select {
|
|
2012
2037
|
background: var(--profiler-background);
|
|
2013
2038
|
border: 1px solid var(--profiler-border);
|
|
@@ -2018,6 +2043,7 @@ export class Style {
|
|
|
2018
2043
|
font-size: 12px;
|
|
2019
2044
|
outline: none;
|
|
2020
2045
|
cursor: pointer;
|
|
2046
|
+
color-scheme: dark;
|
|
2021
2047
|
appearance: none;
|
|
2022
2048
|
-webkit-appearance: none;
|
|
2023
2049
|
-moz-appearance: none;
|
|
@@ -2041,10 +2067,230 @@ export class Style {
|
|
|
2041
2067
|
touch-action: none;
|
|
2042
2068
|
}
|
|
2043
2069
|
|
|
2070
|
+
.node-canvas-wrapper .node-canvas-split-btn {
|
|
2071
|
+
position: absolute;
|
|
2072
|
+
top: 5px;
|
|
2073
|
+
left: 5px;
|
|
2074
|
+
background: rgba(30, 30, 36, 0.85);
|
|
2075
|
+
border: 1px solid var(--profiler-border);
|
|
2076
|
+
color: var(--text-primary);
|
|
2077
|
+
border-radius: 4px;
|
|
2078
|
+
padding: 4px;
|
|
2079
|
+
cursor: pointer;
|
|
2080
|
+
opacity: 1;
|
|
2081
|
+
transition: background-color 0.2s, border-color 0.2s, color 0.2s;
|
|
2082
|
+
display: flex;
|
|
2083
|
+
align-items: center;
|
|
2084
|
+
justify-content: center;
|
|
2085
|
+
z-index: 10;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
.node-canvas-wrapper .node-canvas-split-btn:hover {
|
|
2089
|
+
background-color: var(--color-accent);
|
|
2090
|
+
border-color: var(--color-accent);
|
|
2091
|
+
color: white;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
.node-canvas-wrapper .node-canvas-split-btn.active,
|
|
2095
|
+
.node-canvas-wrapper .node-canvas-fullscreen-btn.active {
|
|
2096
|
+
background-color: var(--color-accent) !important;
|
|
2097
|
+
border-color: var(--color-accent) !important;
|
|
2098
|
+
color: white !important;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
.split-screen-overlay {
|
|
2102
|
+
position: absolute;
|
|
2103
|
+
top: 0;
|
|
2104
|
+
left: 0;
|
|
2105
|
+
width: 100%;
|
|
2106
|
+
height: 100%;
|
|
2107
|
+
pointer-events: none !important;
|
|
2108
|
+
z-index: 999;
|
|
2109
|
+
touch-action: none;
|
|
2110
|
+
overflow: hidden;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
.split-screen-line {
|
|
2114
|
+
position: absolute;
|
|
2115
|
+
top: 0;
|
|
2116
|
+
bottom: 0;
|
|
2117
|
+
width: 1px;
|
|
2118
|
+
left: 50%;
|
|
2119
|
+
background-color: transparent;
|
|
2120
|
+
cursor: ew-resize;
|
|
2121
|
+
pointer-events: auto !important;
|
|
2122
|
+
z-index: 10;
|
|
2123
|
+
touch-action: none;
|
|
2124
|
+
transition: background-color 0.15s ease-out;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
.split-screen-line:hover,
|
|
2128
|
+
.split-screen-line:active,
|
|
2129
|
+
.split-screen-line.active {
|
|
2130
|
+
background-color: var(--color-accent);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
.split-screen-line::before {
|
|
2134
|
+
content: '';
|
|
2135
|
+
position: absolute;
|
|
2136
|
+
top: 0;
|
|
2137
|
+
bottom: 0;
|
|
2138
|
+
left: -12px;
|
|
2139
|
+
width: 25px;
|
|
2140
|
+
background: transparent;
|
|
2141
|
+
cursor: ew-resize;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
.split-screen-line::after {
|
|
2145
|
+
content: '';
|
|
2146
|
+
position: absolute;
|
|
2147
|
+
top: -1px;
|
|
2148
|
+
bottom: -1px;
|
|
2149
|
+
left: -5px;
|
|
2150
|
+
width: 11px;
|
|
2151
|
+
pointer-events: none;
|
|
2152
|
+
background-image:
|
|
2153
|
+
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E"),
|
|
2154
|
+
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
2155
|
+
background-position: top center, bottom center;
|
|
2156
|
+
background-repeat: no-repeat;
|
|
2157
|
+
opacity: 1;
|
|
2158
|
+
transition: opacity 0.15s ease-out;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
.split-screen-line:hover::after,
|
|
2162
|
+
.split-screen-line:active::after,
|
|
2163
|
+
.split-screen-line.active::after {
|
|
2164
|
+
opacity: 1;
|
|
2165
|
+
background-image:
|
|
2166
|
+
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E"),
|
|
2167
|
+
url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
/* Grid Mode styles for List component */
|
|
2171
|
+
.list-scroll-wrapper:has(> .list-container.grid-mode) {
|
|
2172
|
+
width: 100% !important;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.list-container.grid-mode {
|
|
2176
|
+
min-width: 0 !important;
|
|
2177
|
+
width: 100% !important;
|
|
2178
|
+
box-sizing: border-box;
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
.list-container.grid-mode .list-header {
|
|
2182
|
+
display: none !important;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
.list-container.grid-mode .list-children-container {
|
|
2186
|
+
display: flex;
|
|
2187
|
+
flex-wrap: wrap;
|
|
2188
|
+
gap: 15px;
|
|
2189
|
+
padding-left: 0 !important;
|
|
2190
|
+
margin-top: 10px;
|
|
2191
|
+
margin-bottom: 15px;
|
|
2192
|
+
width: 100%;
|
|
2193
|
+
box-sizing: border-box;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
.list-container.grid-mode .list-children-container > .list-item-wrapper {
|
|
2197
|
+
display: inline-block;
|
|
2198
|
+
width: 160px;
|
|
2199
|
+
margin: 0;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
.list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row {
|
|
2203
|
+
display: flex;
|
|
2204
|
+
flex-direction: column;
|
|
2205
|
+
align-items: center;
|
|
2206
|
+
justify-content: flex-start;
|
|
2207
|
+
/*background-color: var(--profiler-header);
|
|
2208
|
+
border: 1px solid var(--profiler-border);*/
|
|
2209
|
+
border-radius: 6px;
|
|
2210
|
+
padding: 8px;
|
|
2211
|
+
gap: 8px;
|
|
2212
|
+
width: 100%;
|
|
2213
|
+
box-sizing: border-box;
|
|
2214
|
+
grid-template-columns: none !important;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
.list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:first-child {
|
|
2218
|
+
width: 140px;
|
|
2219
|
+
height: 140px;
|
|
2220
|
+
display: flex;
|
|
2221
|
+
align-items: center;
|
|
2222
|
+
justify-content: center;
|
|
2223
|
+
padding: 0;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:not(:first-child) {
|
|
2227
|
+
width: 100%;
|
|
2228
|
+
text-align: center !important;
|
|
2229
|
+
font-size: 11px;
|
|
2230
|
+
font-weight: 500;
|
|
2231
|
+
color: var(--text-primary);
|
|
2232
|
+
white-space: normal;
|
|
2233
|
+
word-break: break-all;
|
|
2234
|
+
justify-content: center !important;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
/* Timeline Info & Details */
|
|
2238
|
+
.timeline-detail-block {
|
|
2239
|
+
font-size: 11px;
|
|
2240
|
+
margin-left: 8px;
|
|
2241
|
+
color: var(--text-secondary);
|
|
2242
|
+
opacity: 1;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
.timeline-detail-key,
|
|
2246
|
+
.timeline-detail-sep,
|
|
2247
|
+
.timeline-call-count {
|
|
2248
|
+
opacity: 0.5;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
.timeline-detail-value {
|
|
2252
|
+
color: var(--text-secondary);
|
|
2253
|
+
opacity: 1;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
.timeline-info-group {
|
|
2257
|
+
display: inline-flex;
|
|
2258
|
+
align-items: center;
|
|
2259
|
+
margin-left: 12px;
|
|
2260
|
+
flex-shrink: 0;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
.timeline-info-dot {
|
|
2264
|
+
width: 6px;
|
|
2265
|
+
height: 6px;
|
|
2266
|
+
border-radius: 50%;
|
|
2267
|
+
margin-right: 6px;
|
|
2268
|
+
flex-shrink: 0;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.timeline-info-dot.fps {
|
|
2272
|
+
background-color: var(--color-fps);
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
.timeline-info-dot.call {
|
|
2276
|
+
background-color: var(--color-call);
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
.timeline-info-dot.red {
|
|
2280
|
+
background-color: var(--color-red);
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2044
2283
|
}
|
|
2045
2284
|
`;
|
|
2046
2285
|
|
|
2047
2286
|
const styleElement = document.createElement( 'style' );
|
|
2287
|
+
|
|
2288
|
+
if ( nonce ) {
|
|
2289
|
+
|
|
2290
|
+
styleElement.nonce = nonce;
|
|
2291
|
+
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2048
2294
|
styleElement.textContent = css;
|
|
2049
2295
|
|
|
2050
2296
|
container.appendChild( styleElement );
|
|
@@ -10,16 +10,20 @@ class Value extends EventDispatcher {
|
|
|
10
10
|
this.domElement.className = 'param-control';
|
|
11
11
|
|
|
12
12
|
this._onChangeFunction = null;
|
|
13
|
+
this._changeTimeout = null;
|
|
14
|
+
this._debounceTime = 0;
|
|
13
15
|
|
|
14
16
|
this.addEventListener( 'change', ( e ) => {
|
|
15
17
|
|
|
16
18
|
// defer to avoid issues when changing multiple values in the same call stack
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
clearTimeout( this._changeTimeout );
|
|
21
|
+
|
|
22
|
+
this._changeTimeout = setTimeout( () => {
|
|
19
23
|
|
|
20
24
|
if ( this._onChangeFunction ) this._onChangeFunction( e.value );
|
|
21
25
|
|
|
22
|
-
} );
|
|
26
|
+
}, this._debounceTime );
|
|
23
27
|
|
|
24
28
|
} );
|
|
25
29
|
|
|
@@ -53,6 +57,14 @@ class Value extends EventDispatcher {
|
|
|
53
57
|
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
debounce( time ) {
|
|
61
|
+
|
|
62
|
+
this._debounceTime = time;
|
|
63
|
+
|
|
64
|
+
return this;
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
56
68
|
show() {
|
|
57
69
|
|
|
58
70
|
this.dispatchEvent( { type: 'show' } );
|
|
@@ -90,8 +90,9 @@ class HTMLTexture extends CanvasTexture {
|
|
|
90
90
|
this.magFilter = LinearFilter;
|
|
91
91
|
this.generateMipmaps = false;
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
this.scheduleUpdate = null;
|
|
94
|
+
|
|
95
|
+
const scheduleUpdate = () => {
|
|
95
96
|
|
|
96
97
|
if ( ! this.scheduleUpdate ) {
|
|
97
98
|
|
|
@@ -100,13 +101,25 @@ class HTMLTexture extends CanvasTexture {
|
|
|
100
101
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// Create an observer on the DOM, and run html2canvas update in the next loop
|
|
107
|
+
|
|
108
|
+
const observer = new MutationObserver( scheduleUpdate );
|
|
109
|
+
|
|
110
|
+
// The state of form controls lives in properties (checked, value) which
|
|
111
|
+
// are not reported by MutationObserver, so listen to their events as well.
|
|
112
|
+
|
|
113
|
+
dom.addEventListener( 'input', scheduleUpdate );
|
|
114
|
+
dom.addEventListener( 'change', scheduleUpdate );
|
|
104
115
|
|
|
105
116
|
const config = { attributes: true, childList: true, subtree: true, characterData: true };
|
|
106
117
|
observer.observe( dom, config );
|
|
107
118
|
|
|
108
119
|
this.observer = observer;
|
|
109
120
|
|
|
121
|
+
this._scheduleUpdate = scheduleUpdate;
|
|
122
|
+
|
|
110
123
|
}
|
|
111
124
|
|
|
112
125
|
dispatchDOMEvent( event ) {
|
|
@@ -136,6 +149,9 @@ class HTMLTexture extends CanvasTexture {
|
|
|
136
149
|
|
|
137
150
|
}
|
|
138
151
|
|
|
152
|
+
this.dom.removeEventListener( 'input', this._scheduleUpdate );
|
|
153
|
+
this.dom.removeEventListener( 'change', this._scheduleUpdate );
|
|
154
|
+
|
|
139
155
|
this.scheduleUpdate = clearTimeout( this.scheduleUpdate );
|
|
140
156
|
|
|
141
157
|
super.dispose();
|