super-three 0.133.3 → 0.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/three.js +1059 -783
- package/build/three.min.js +1 -1
- package/build/three.module.js +1424 -895
- package/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff +0 -0
- package/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff2 +0 -0
- package/examples/fonts/open-sans/open-sans.css +9 -0
- package/examples/fonts/tabler-icons/fonts/tabler-icons.eot +0 -0
- package/examples/fonts/tabler-icons/fonts/tabler-icons.svg +3966 -0
- package/examples/fonts/tabler-icons/fonts/tabler-icons.ttf +0 -0
- package/examples/fonts/tabler-icons/fonts/tabler-icons.woff +0 -0
- package/examples/fonts/tabler-icons/fonts/tabler-icons.woff2 +0 -0
- package/examples/fonts/tabler-icons/tabler-icons.min.css +4 -0
- package/examples/js/animation/CCDIKSolver.js +0 -1
- package/examples/js/animation/MMDPhysics.js +1 -3
- package/examples/js/controls/ArcballControls.js +99 -72
- package/examples/js/controls/DragControls.js +7 -0
- package/examples/js/controls/OrbitControls.js +5 -36
- package/examples/js/controls/TrackballControls.js +3 -2
- package/examples/js/controls/TransformControls.js +24 -1
- package/examples/js/csm/CSM.js +2 -2
- package/examples/js/csm/CSMFrustum.js +133 -0
- package/examples/js/curves/CurveExtras.js +0 -2
- package/examples/js/effects/AsciiEffect.js +2 -9
- package/examples/js/exporters/GLTFExporter.js +148 -64
- package/examples/js/exporters/USDZExporter.js +45 -26
- package/examples/js/geometries/TeapotGeometry.js +0 -1
- package/examples/js/interactive/SelectionBox.js +2 -0
- package/examples/js/interactive/SelectionHelper.js +22 -7
- package/examples/js/lights/RectAreaLightUniformsLib.js +4 -0
- package/examples/js/lines/LineMaterial.js +58 -20
- package/examples/js/lines/LineSegments2.js +29 -24
- package/examples/js/loaders/3DMLoader.js +24 -11
- package/examples/js/loaders/3MFLoader.js +2 -2
- package/examples/js/loaders/AMFLoader.js +0 -2
- package/examples/js/loaders/ColladaLoader.js +61 -4
- package/examples/js/loaders/EXRLoader.js +185 -262
- package/examples/js/loaders/FBXLoader.js +4 -5
- package/examples/js/loaders/GLTFLoader.js +96 -33
- package/examples/js/loaders/HDRCubeTextureLoader.js +0 -8
- package/examples/js/loaders/KTX2Loader.js +23 -2
- package/examples/js/loaders/KTXLoader.js +1 -1
- package/examples/js/loaders/LDrawLoader.js +26 -30
- package/examples/js/loaders/LUT3dlLoader.js +2 -0
- package/examples/js/loaders/LUTCubeLoader.js +2 -0
- package/examples/js/loaders/LWOLoader.js +8 -6
- package/examples/js/loaders/LogLuvLoader.js +766 -0
- package/examples/js/loaders/MMDLoader.js +0 -1
- package/examples/js/loaders/NRRDLoader.js +9 -2
- package/examples/js/loaders/OBJLoader.js +0 -2
- package/examples/js/loaders/PLYLoader.js +33 -8
- package/examples/js/loaders/RGBELoader.js +2 -16
- package/examples/js/loaders/RGBMLoader.js +55 -5
- package/examples/js/loaders/SVGLoader.js +9 -5
- package/examples/js/loaders/TDSLoader.js +237 -271
- package/examples/js/loaders/VOXLoader.js +1 -0
- package/examples/js/loaders/VRMLLoader.js +2 -1
- package/examples/js/loaders/lwo/LWO2Parser.js +1 -0
- package/examples/js/loaders/lwo/LWO3Parser.js +4 -2
- package/examples/js/math/ImprovedNoise.js +1 -1
- package/examples/js/misc/GPUComputationRenderer.js +3 -1
- package/examples/js/objects/Lensflare.js +2 -10
- package/examples/js/objects/MarchingCubes.js +42 -128
- package/examples/js/objects/Reflector.js +7 -0
- package/examples/js/objects/Refractor.js +7 -0
- package/examples/js/objects/Sky.js +1 -1
- package/examples/js/objects/Water.js +2 -2
- package/examples/js/objects/Water2.js +4 -7
- package/examples/js/postprocessing/GlitchPass.js +3 -1
- package/examples/js/postprocessing/SSAOPass.js +1 -0
- package/examples/js/renderers/CSS2DRenderer.js +4 -4
- package/examples/js/renderers/CSS3DRenderer.js +4 -4
- package/examples/js/shaders/ConvolutionShader.js +0 -1
- package/examples/js/shaders/FXAAShader.js +1 -1
- package/examples/js/shaders/FilmShader.js +1 -1
- package/examples/js/shaders/GammaCorrectionShader.js +1 -1
- package/examples/js/shaders/HorizontalBlurShader.js +1 -2
- package/examples/js/shaders/SSRShader.js +1 -1
- package/examples/js/shaders/SSRrShader.js +1 -1
- package/examples/js/shaders/VerticalBlurShader.js +1 -2
- package/examples/js/utils/GeometryUtils.js +1 -1
- package/examples/js/utils/RoughnessMipmapper.js +18 -28
- package/examples/jsm/animation/CCDIKSolver.js +0 -1
- package/examples/jsm/animation/MMDPhysics.js +0 -2
- package/examples/jsm/controls/ArcballControls.js +80 -77
- package/examples/jsm/controls/DragControls.js +7 -0
- package/examples/jsm/controls/OrbitControls.js +9 -51
- package/examples/jsm/controls/TrackballControls.js +1 -1
- package/examples/jsm/controls/TransformControls.js +24 -1
- package/examples/jsm/csm/CSM.js +3 -3
- package/examples/jsm/csm/{Frustum.js → CSMFrustum.js} +3 -3
- package/examples/jsm/curves/CurveExtras.js +0 -2
- package/examples/jsm/effects/AsciiEffect.js +2 -9
- package/examples/jsm/exporters/GLTFExporter.js +161 -75
- package/examples/jsm/exporters/USDZExporter.js +47 -26
- package/examples/jsm/geometries/TeapotGeometry.js +0 -1
- package/examples/jsm/interactive/SelectionBox.js +1 -0
- package/examples/jsm/interactive/SelectionHelper.js +19 -7
- package/examples/jsm/libs/flow.module.js +3338 -0
- package/examples/jsm/libs/lil-gui.module.min.js +8 -0
- package/examples/jsm/libs/rhino3dm/rhino3dm.wasm +0 -0
- package/examples/jsm/lights/RectAreaLightUniformsLib.js +7 -0
- package/examples/jsm/lines/LineMaterial.js +59 -23
- package/examples/jsm/lines/LineSegments2.js +22 -18
- package/examples/jsm/loaders/3DMLoader.js +18 -12
- package/examples/jsm/loaders/3MFLoader.js +2 -2
- package/examples/jsm/loaders/AMFLoader.js +0 -2
- package/examples/jsm/loaders/ColladaLoader.js +61 -4
- package/examples/jsm/loaders/EXRLoader.js +184 -293
- package/examples/jsm/loaders/FBXLoader.js +4 -5
- package/examples/jsm/loaders/GLTFLoader.js +101 -37
- package/examples/jsm/loaders/HDRCubeTextureLoader.js +1 -14
- package/examples/jsm/loaders/KTX2Loader.js +30 -2
- package/examples/jsm/loaders/KTXLoader.js +1 -1
- package/examples/jsm/loaders/LDrawLoader.js +23 -24
- package/examples/jsm/loaders/LUT3dlLoader.js +2 -0
- package/examples/jsm/loaders/LUTCubeLoader.js +2 -0
- package/examples/jsm/loaders/LWOLoader.js +8 -6
- package/examples/jsm/loaders/LogLuvLoader.js +606 -0
- package/examples/jsm/loaders/MMDLoader.js +0 -1
- package/examples/jsm/loaders/NRRDLoader.js +10 -2
- package/examples/jsm/loaders/OBJLoader.js +0 -2
- package/examples/jsm/loaders/PLYLoader.js +34 -8
- package/examples/jsm/loaders/RGBELoader.js +0 -20
- package/examples/jsm/loaders/RGBMLoader.js +61 -7
- package/examples/jsm/loaders/SVGLoader.js +9 -6
- package/examples/jsm/loaders/TDSLoader.js +236 -275
- package/examples/jsm/loaders/VOXLoader.js +1 -0
- package/examples/jsm/loaders/VRMLLoader.js +2 -1
- package/examples/jsm/loaders/lwo/LWO2Parser.js +1 -0
- package/examples/jsm/loaders/lwo/LWO3Parser.js +2 -2
- package/examples/jsm/math/ImprovedNoise.js +1 -1
- package/examples/jsm/misc/GPUComputationRenderer.js +3 -1
- package/examples/jsm/node-editor/NodeEditor.js +456 -0
- package/examples/jsm/node-editor/accessors/NormalEditor.js +30 -0
- package/examples/jsm/node-editor/accessors/PositionEditor.js +30 -0
- package/examples/jsm/node-editor/accessors/UVEditor.js +26 -0
- package/examples/jsm/node-editor/display/BlendEditor.js +43 -0
- package/examples/jsm/node-editor/examples/animate-uv.json +1 -0
- package/examples/jsm/node-editor/examples/fake-top-light.json +1 -0
- package/examples/jsm/node-editor/examples/oscillator-color.json +1 -0
- package/examples/jsm/node-editor/examples/rim.json +1 -0
- package/examples/jsm/node-editor/inputs/ColorEditor.js +91 -0
- package/examples/jsm/node-editor/inputs/FloatEditor.js +24 -0
- package/examples/jsm/node-editor/inputs/SliderEditor.js +68 -0
- package/examples/jsm/node-editor/inputs/Vector2Editor.js +28 -0
- package/examples/jsm/node-editor/inputs/Vector3Editor.js +30 -0
- package/examples/jsm/node-editor/inputs/Vector4Editor.js +37 -0
- package/examples/jsm/node-editor/materials/StandardMaterialEditor.js +108 -0
- package/examples/jsm/node-editor/math/DotEditor.js +36 -0
- package/examples/jsm/node-editor/math/InvertEditor.js +38 -0
- package/examples/jsm/node-editor/math/LimiterEditor.js +48 -0
- package/examples/jsm/node-editor/math/NormalizeEditor.js +26 -0
- package/examples/jsm/node-editor/math/OperatorEditor.js +50 -0
- package/examples/jsm/node-editor/math/PowerEditor.js +34 -0
- package/examples/jsm/node-editor/math/TrigonometryEditor.js +39 -0
- package/examples/jsm/node-editor/procedural/CheckerEditor.js +26 -0
- package/examples/jsm/node-editor/utils/OscillatorEditor.js +42 -0
- package/examples/jsm/node-editor/utils/TimerEditor.js +57 -0
- package/examples/jsm/nodes/core/NodeBuilder.js +2 -2
- package/examples/jsm/nodes/materials/StandardNodeMaterial.js +1 -1
- package/examples/jsm/nodes/materials/nodes/StandardNode.js +7 -6
- package/examples/jsm/nodes/math/MathNode.js +12 -0
- package/examples/jsm/nodes/misc/BumpMapNode.js +1 -1
- package/examples/jsm/nodes/misc/TextureCubeUVNode.js +1 -4
- package/examples/jsm/nodes/utils/ColorSpaceNode.js +1 -164
- package/examples/jsm/objects/Lensflare.js +3 -14
- package/examples/jsm/objects/MarchingCubes.js +46 -152
- package/examples/jsm/objects/Reflector.js +7 -0
- package/examples/jsm/objects/Refractor.js +7 -0
- package/examples/jsm/objects/Sky.js +1 -1
- package/examples/jsm/objects/Water.js +2 -2
- package/examples/jsm/objects/Water2.js +4 -8
- package/examples/jsm/postprocessing/AdaptiveToneMappingPass.js +1 -1
- package/examples/jsm/postprocessing/AfterimagePass.js +1 -1
- package/examples/jsm/postprocessing/BloomPass.js +1 -1
- package/examples/jsm/postprocessing/BokehPass.js +1 -1
- package/examples/jsm/postprocessing/ClearPass.js +1 -1
- package/examples/jsm/postprocessing/CubeTexturePass.js +1 -1
- package/examples/jsm/postprocessing/DotScreenPass.js +1 -1
- package/examples/jsm/postprocessing/EffectComposer.js +3 -3
- package/examples/jsm/postprocessing/FilmPass.js +1 -1
- package/examples/jsm/postprocessing/GlitchPass.js +4 -2
- package/examples/jsm/postprocessing/HalftonePass.js +1 -1
- package/examples/jsm/postprocessing/MaskPass.js +1 -1
- package/examples/jsm/postprocessing/OutlinePass.js +1 -1
- package/examples/jsm/postprocessing/RenderPass.js +1 -1
- package/examples/jsm/postprocessing/SAOPass.js +2 -2
- package/examples/jsm/postprocessing/SMAAPass.js +1 -1
- package/examples/jsm/postprocessing/SSAARenderPass.js +1 -1
- package/examples/jsm/postprocessing/SSAOPass.js +2 -1
- package/examples/jsm/postprocessing/SSRPass.js +1 -1
- package/examples/jsm/postprocessing/SSRrPass.js +1 -1
- package/examples/jsm/postprocessing/SavePass.js +1 -1
- package/examples/jsm/postprocessing/ShaderPass.js +1 -1
- package/examples/jsm/postprocessing/TAARenderPass.js +1 -1
- package/examples/jsm/postprocessing/TexturePass.js +1 -1
- package/examples/jsm/postprocessing/UnrealBloomPass.js +1 -1
- package/examples/jsm/renderers/CSS2DRenderer.js +5 -4
- package/examples/jsm/renderers/CSS3DRenderer.js +5 -4
- package/examples/jsm/renderers/nodes/Nodes.js +15 -13
- package/examples/jsm/renderers/nodes/ShaderNode.js +194 -41
- package/examples/jsm/renderers/nodes/accessors/MaterialNode.js +6 -6
- package/examples/jsm/renderers/nodes/accessors/ModelViewProjectionNode.js +5 -5
- package/examples/jsm/renderers/nodes/accessors/NormalNode.js +14 -3
- package/examples/jsm/renderers/nodes/accessors/PointUVNode.js +3 -3
- package/examples/jsm/renderers/nodes/accessors/PositionNode.js +15 -5
- package/examples/jsm/renderers/nodes/accessors/SkinningNode.js +107 -0
- package/examples/jsm/renderers/nodes/accessors/UVNode.js +7 -5
- package/examples/jsm/renderers/nodes/core/ArrayInputNode.js +3 -3
- package/examples/jsm/renderers/nodes/core/AttributeNode.js +6 -0
- package/examples/jsm/renderers/nodes/core/BypassNode.js +38 -0
- package/examples/jsm/renderers/nodes/core/CodeNode.js +3 -3
- package/examples/jsm/renderers/nodes/core/ContextNode.js +4 -19
- package/examples/jsm/renderers/nodes/core/ExpressionNode.js +13 -2
- package/examples/jsm/renderers/nodes/core/FunctionNode.js +19 -132
- package/examples/jsm/renderers/nodes/core/InputNode.js +13 -3
- package/examples/jsm/renderers/nodes/core/Node.js +32 -10
- package/examples/jsm/renderers/nodes/core/NodeBuilder.js +146 -128
- package/examples/jsm/renderers/nodes/core/NodeFunction.js +22 -0
- package/examples/jsm/renderers/nodes/core/NodeFunctionInput.js +4 -4
- package/examples/jsm/renderers/nodes/core/NodeKeywords.js +18 -179
- package/examples/jsm/renderers/nodes/core/NodeParser.js +11 -0
- package/examples/jsm/renderers/nodes/core/NodeVar.js +2 -2
- package/examples/jsm/renderers/nodes/core/PropertyNode.js +14 -2
- package/examples/jsm/renderers/nodes/core/TempNode.js +10 -13
- package/examples/jsm/renderers/nodes/core/VarNode.js +12 -7
- package/examples/jsm/renderers/nodes/core/VaryNode.js +23 -8
- package/examples/jsm/renderers/nodes/core/constants.js +2 -0
- package/examples/jsm/renderers/nodes/display/ColorSpaceNode.js +60 -43
- package/examples/jsm/renderers/nodes/display/NormalMapNode.js +21 -22
- package/examples/jsm/renderers/nodes/functions/BSDFs.js +64 -101
- package/examples/jsm/renderers/nodes/functions/PhysicalMaterialFunctions.js +27 -0
- package/examples/jsm/renderers/nodes/inputs/BufferNode.js +25 -0
- package/examples/jsm/renderers/nodes/inputs/IntNode.js +17 -0
- package/examples/jsm/renderers/nodes/inputs/TextureNode.js +10 -2
- package/examples/jsm/renderers/nodes/lights/LightContextNode.js +20 -14
- package/examples/jsm/renderers/nodes/lights/LightNode.js +32 -36
- package/examples/jsm/renderers/nodes/math/CondNode.js +60 -0
- package/examples/jsm/renderers/nodes/math/MathNode.js +90 -37
- package/examples/jsm/renderers/nodes/math/OperatorNode.js +124 -31
- package/examples/jsm/renderers/nodes/parsers/GLSLNodeFunction.js +137 -0
- package/examples/jsm/renderers/nodes/parsers/GLSLNodeParser.js +14 -0
- package/examples/jsm/renderers/nodes/parsers/WGSLNodeFunction.js +89 -0
- package/examples/jsm/renderers/nodes/parsers/WGSLNodeParser.js +14 -0
- package/examples/jsm/renderers/nodes/procedural/CheckerNode.js +7 -9
- package/examples/jsm/renderers/nodes/utils/ArrayElementNode.js +31 -0
- package/examples/jsm/renderers/nodes/utils/ConvertNode.js +33 -0
- package/examples/jsm/renderers/nodes/utils/JoinNode.js +7 -7
- package/examples/jsm/renderers/nodes/utils/OscNode.js +58 -0
- package/examples/jsm/renderers/nodes/utils/SplitNode.js +18 -8
- package/examples/jsm/renderers/nodes/utils/SpriteSheetUVNode.js +7 -7
- package/examples/jsm/renderers/nodes/utils/TimerNode.js +1 -1
- package/examples/jsm/renderers/webgl/nodes/SlotNode.js +22 -0
- package/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.js +192 -95
- package/examples/jsm/renderers/webgl/nodes/WebGLNodes.js +2 -2
- package/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.js +2 -2
- package/examples/jsm/renderers/webgpu/WebGPUBackground.js +1 -1
- package/examples/jsm/renderers/webgpu/WebGPUBindings.js +10 -9
- package/examples/jsm/renderers/webgpu/WebGPUComputePipelines.js +2 -4
- package/examples/jsm/renderers/webgpu/WebGPUProgrammableStage.js +2 -4
- package/examples/jsm/renderers/webgpu/WebGPURenderPipeline.js +15 -23
- package/examples/jsm/renderers/webgpu/WebGPURenderPipelines.js +44 -65
- package/examples/jsm/renderers/webgpu/WebGPURenderer.js +12 -28
- package/examples/jsm/renderers/webgpu/WebGPUTextureUtils.js +61 -28
- package/examples/jsm/renderers/webgpu/WebGPUTextures.js +34 -27
- package/examples/jsm/renderers/webgpu/constants.js +2 -2
- package/examples/jsm/renderers/webgpu/nodes/WebGPUNodeBuilder.js +453 -95
- package/examples/jsm/renderers/webgpu/nodes/WebGPUNodes.js +1 -1
- package/examples/jsm/shaders/ConvolutionShader.js +0 -1
- package/examples/jsm/shaders/FXAAShader.js +1 -1
- package/examples/jsm/shaders/FilmShader.js +1 -1
- package/examples/jsm/shaders/GammaCorrectionShader.js +1 -1
- package/examples/jsm/shaders/HorizontalBlurShader.js +1 -2
- package/examples/jsm/shaders/SSRShader.js +1 -1
- package/examples/jsm/shaders/SSRrShader.js +1 -1
- package/examples/jsm/shaders/VerticalBlurShader.js +1 -2
- package/examples/jsm/utils/GeometryUtils.js +1 -1
- package/examples/jsm/utils/RoughnessMipmapper.js +19 -31
- package/examples/jsm/utils/WorkerPool.js +11 -11
- package/examples/jsm/webxr/OculusHandPointerModel.js +6 -6
- package/package.json +24 -18
- package/src/Three.Legacy.js +18 -0
- package/src/Three.js +1 -3
- package/src/cameras/StereoCamera.js +8 -7
- package/src/constants.js +1 -8
- package/src/core/Layers.js +7 -1
- package/src/core/Object3D.js +3 -1
- package/src/extras/PMREMGenerator.js +23 -109
- package/src/extras/core/Interpolations.js +1 -1
- package/src/geometries/LatheGeometry.js +70 -47
- package/src/helpers/CameraHelper.js +1 -1
- package/src/loaders/FileLoader.js +98 -144
- package/src/loaders/ImageLoader.js +9 -4
- package/src/loaders/LoaderUtils.js +26 -0
- package/src/loaders/MaterialLoader.js +7 -4
- package/src/loaders/ObjectLoader.js +2 -0
- package/src/materials/Material.js +4 -4
- package/src/materials/MeshPhysicalMaterial.js +20 -14
- package/src/math/Color.js +0 -38
- package/src/math/MathUtils.js +5 -16
- package/src/math/Ray.js +2 -2
- package/src/math/Sphere.js +10 -1
- package/src/objects/Skeleton.js +1 -0
- package/src/renderers/WebGLMultisampleRenderTarget.js +7 -1
- package/src/renderers/WebGLRenderer.js +105 -132
- package/src/renderers/shaders/ShaderChunk/bsdfs.glsl.js +2 -2
- package/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.js +2 -24
- package/src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js +0 -74
- package/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js +0 -1
- package/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.js +19 -6
- package/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js +28 -2
- package/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.js +1 -1
- package/src/renderers/shaders/ShaderLib/meshphysical.glsl.js +23 -5
- package/src/renderers/shaders/ShaderLib/vsm.glsl.js +2 -1
- package/src/renderers/shaders/ShaderLib.js +6 -4
- package/src/renderers/shaders/UniformsLib.js +1 -2
- package/src/renderers/webgl/WebGLCapabilities.js +0 -2
- package/src/renderers/webgl/WebGLExtensions.js +1 -0
- package/src/renderers/webgl/WebGLMaterials.js +27 -15
- package/src/renderers/webgl/WebGLMorphtargets.js +1 -0
- package/src/renderers/webgl/WebGLProgram.js +11 -24
- package/src/renderers/webgl/WebGLPrograms.js +194 -33
- package/src/renderers/webgl/WebGLRenderLists.js +4 -14
- package/src/renderers/webgl/WebGLShaderCache.js +120 -0
- package/src/renderers/webgl/WebGLShadowMap.js +14 -5
- package/src/renderers/webgl/WebGLState.js +76 -17
- package/src/renderers/webgl/WebGLTextures.js +367 -61
- package/src/renderers/webgl/WebGLUniforms.js +45 -1
- package/src/renderers/webxr/WebXRManager.js +77 -109
- package/src/scenes/Scene.js +1 -1
- package/src/textures/DataTexture.js +0 -2
- package/src/textures/DataTexture2DArray.js +0 -2
- package/src/textures/DataTexture3D.js +0 -2
- package/src/textures/FramebufferTexture.js +25 -0
- package/src/textures/Texture.js +6 -0
- package/examples/js/controls/DeviceOrientationControls.js +0 -147
- package/examples/js/libs/dat.gui.min.js +0 -14
- package/examples/jsm/controls/DeviceOrientationControls.js +0 -153
- package/examples/jsm/libs/dat.gui.module.js +0 -3575
- package/examples/jsm/libs/glslang.js +0 -78
- package/examples/jsm/libs/glslang.wasm +0 -0
- package/examples/jsm/renderers/nodes/consts/MathConsts.js +0 -7
- package/examples/jsm/renderers/nodes/core/ConstNode.js +0 -39
- package/examples/jsm/renderers/nodes/core/NodeSlot.js +0 -13
- package/examples/jsm/renderers/nodes/core/StructNode.js +0 -80
- package/examples/jsm/renderers/nodes/core/StructVarNode.js +0 -75
- package/examples/jsm/renderers/nodes/functions/EncodingFunctions.js +0 -99
- package/examples/jsm/renderers/nodes/functions/MathFunctions.js +0 -47
- package/examples/jsm/renderers/webgpu/nodes/ShaderLib.js +0 -152
- package/src/extras/objects/ImmediateRenderObject.js +0 -31
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
// 0.0.15
|
|
2
|
-
var Module = (function() {
|
|
3
|
-
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
|
|
4
|
-
|
|
5
|
-
return (
|
|
6
|
-
function(Module) {
|
|
7
|
-
Module = Module || {};
|
|
8
|
-
|
|
9
|
-
var c;c||(c=typeof Module !== 'undefined' ? Module : {});
|
|
10
|
-
c.compileGLSLZeroCopy=function(a,b,d,e){d=!!d;switch(b){case "vertex":var g=0;break;case "fragment":g=4;break;case "compute":g=5;break;default:throw Error("shader_stage must be 'vertex', 'fragment', or 'compute'.");}switch(e||"1.0"){case "1.0":var f=65536;break;case "1.1":f=65792;break;case "1.2":f=66048;break;case "1.3":f=66304;break;case "1.4":f=66560;break;case "1.5":f=66816;break;default:throw Error("spirv_version must be '1.0' ~ '1.5'.");}e=c._malloc(4);b=c._malloc(4);var h=aa([a,g,d,f,e,b]);
|
|
11
|
-
d=k(e);a=k(b);c._free(e);c._free(b);if(0===h)throw Error("GLSL compilation failed");e={};d/=4;e.data=c.HEAPU32.subarray(d,d+a);e.free=function(){c._destroy_output_buffer(h)};return e};c.compileGLSL=function(a,b,d,e){a=c.compileGLSLZeroCopy(a,b,d,e);b=a.data.slice();a.free();return b};var p={},q;for(q in c)c.hasOwnProperty(q)&&(p[q]=c[q]);var r="./this.program",t=!1,u=!1;t="object"===typeof window;u="function"===typeof importScripts;var v="",w;
|
|
12
|
-
if(t||u)u?v=self.location.href:document.currentScript&&(v=document.currentScript.src),_scriptDir&&(v=_scriptDir),0!==v.indexOf("blob:")?v=v.substr(0,v.lastIndexOf("/")+1):v="",u&&(w=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var x=c.print||console.log.bind(console),y=c.printErr||console.warn.bind(console);for(q in p)p.hasOwnProperty(q)&&(c[q]=p[q]);p=null;c.thisProgram&&(r=c.thisProgram);var A;
|
|
13
|
-
c.wasmBinary&&(A=c.wasmBinary);"object"!==typeof WebAssembly&&y("no native wasm support detected");function k(a){var b="i32";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return B[a>>0];case "i8":return B[a>>0];case "i16":return ba[a>>1];case "i32":return C[a>>2];case "i64":return C[a>>2];case "float":return ca[a>>2];case "double":return da[a>>3];default:D("invalid type for getValue: "+b)}return null}var E,ea=new WebAssembly.Table({initial:859,maximum:859,element:"anyfunc"}),fa=!1;
|
|
14
|
-
function ha(){var a=c._convert_glsl_to_spirv;a||D("Assertion failed: Cannot call unknown function convert_glsl_to_spirv, make sure it is exported");return a}
|
|
15
|
-
function aa(a){var b="string number boolean number number number".split(" "),d={string:function(a){var b=0;if(null!==a&&void 0!==a&&0!==a){var d=(a.length<<2)+1;b=G(d);ia(a,H,b,d)}return b},array:function(a){var b=G(a.length);B.set(a,b);return b}},e=ha(),g=[],f=0;if(a)for(var h=0;h<a.length;h++){var n=d[b[h]];n?(0===f&&(f=ja()),g[h]=n(a[h])):g[h]=a[h]}a=e.apply(null,g);0!==f&&ka(f);return a}var la="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;
|
|
16
|
-
function I(a,b,d){var e=b+d;for(d=b;a[d]&&!(d>=e);)++d;if(16<d-b&&a.subarray&&la)return la.decode(a.subarray(b,d));for(e="";b<d;){var g=a[b++];if(g&128){var f=a[b++]&63;if(192==(g&224))e+=String.fromCharCode((g&31)<<6|f);else{var h=a[b++]&63;g=224==(g&240)?(g&15)<<12|f<<6|h:(g&7)<<18|f<<12|h<<6|a[b++]&63;65536>g?e+=String.fromCharCode(g):(g-=65536,e+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else e+=String.fromCharCode(g)}return e}
|
|
17
|
-
function ia(a,b,d,e){if(0<e){e=d+e-1;for(var g=0;g<a.length;++g){var f=a.charCodeAt(g);if(55296<=f&&57343>=f){var h=a.charCodeAt(++g);f=65536+((f&1023)<<10)|h&1023}if(127>=f){if(d>=e)break;b[d++]=f}else{if(2047>=f){if(d+1>=e)break;b[d++]=192|f>>6}else{if(65535>=f){if(d+2>=e)break;b[d++]=224|f>>12}else{if(d+3>=e)break;b[d++]=240|f>>18;b[d++]=128|f>>12&63}b[d++]=128|f>>6&63}b[d++]=128|f&63}}b[d]=0}}"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");var J,B,H,ba,C,ca,da;
|
|
18
|
-
function ma(a){J=a;c.HEAP8=B=new Int8Array(a);c.HEAP16=ba=new Int16Array(a);c.HEAP32=C=new Int32Array(a);c.HEAPU8=H=new Uint8Array(a);c.HEAPU16=new Uint16Array(a);c.HEAPU32=new Uint32Array(a);c.HEAPF32=ca=new Float32Array(a);c.HEAPF64=da=new Float64Array(a)}var na=c.TOTAL_MEMORY||16777216;c.wasmMemory?E=c.wasmMemory:E=new WebAssembly.Memory({initial:na/65536});E&&(J=E.buffer);na=J.byteLength;ma(J);C[84916]=5582704;
|
|
19
|
-
function K(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var d=b.J;"number"===typeof d?void 0===b.H?c.dynCall_v(d):c.dynCall_vi(d,b.H):d(void 0===b.H?null:b.H)}}}var oa=[],pa=[],qa=[],ra=[];function sa(){var a=c.preRun.shift();oa.unshift(a)}var L=0,M=null,N=null;c.preloadedImages={};c.preloadedAudios={};function D(a){if(c.onAbort)c.onAbort(a);x(a);y(a);fa=!0;throw new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");}
|
|
20
|
-
function ta(){var a=O;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var O="glslang.wasm";if(!ta()){var ua=O;O=c.locateFile?c.locateFile(ua,v):v+ua}function wa(){try{if(A)return new Uint8Array(A);if(w)return w(O);throw"both async and sync fetching of the wasm failed";}catch(a){D(a)}}
|
|
21
|
-
function xa(){return A||!t&&!u||"function"!==typeof fetch?new Promise(function(a){a(wa())}):fetch(O,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+O+"'";return a.arrayBuffer()}).catch(function(){return wa()})}pa.push({J:function(){ya()}});var za=[null,[],[]],P=0;function Aa(){P+=4;return C[P-4>>2]}var Q={},Ba={};
|
|
22
|
-
function Ca(){if(!R){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:r},b;for(b in Ba)a[b]=Ba[b];var d=[];for(b in a)d.push(b+"="+a[b]);R=d}return R}var R;function S(a){return 0===a%4&&(0!==a%100||0===a%400)}function T(a,b){for(var d=0,e=0;e<=b;d+=a[e++]);return d}var U=[31,29,31,30,31,30,31,31,30,31,30,31],W=[31,28,31,30,31,30,31,31,30,31,30,31];
|
|
23
|
-
function X(a,b){for(a=new Date(a.getTime());0<b;){var d=a.getMonth(),e=(S(a.getFullYear())?U:W)[d];if(b>e-a.getDate())b-=e-a.getDate()+1,a.setDate(1),11>d?a.setMonth(d+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}
|
|
24
|
-
function Da(a,b,d,e){function g(a,b,d){for(a="number"===typeof a?a.toString():a||"";a.length<b;)a=d[0]+a;return a}function f(a,b){return g(a,b,"0")}function h(a,b){function V(a){return 0>a?-1:0<a?1:0}var d;0===(d=V(a.getFullYear()-b.getFullYear()))&&0===(d=V(a.getMonth()-b.getMonth()))&&(d=V(a.getDate()-b.getDate()));return d}function n(a){switch(a.getDay()){case 0:return new Date(a.getFullYear()-1,11,29);case 1:return a;case 2:return new Date(a.getFullYear(),0,3);case 3:return new Date(a.getFullYear(),
|
|
25
|
-
0,2);case 4:return new Date(a.getFullYear(),0,1);case 5:return new Date(a.getFullYear()-1,11,31);case 6:return new Date(a.getFullYear()-1,11,30)}}function z(a){a=X(new Date(a.A+1900,0,1),a.G);var b=n(new Date(a.getFullYear()+1,0,4));return 0>=h(n(new Date(a.getFullYear(),0,4)),a)?0>=h(b,a)?a.getFullYear()+1:a.getFullYear():a.getFullYear()-1}var m=C[e+40>>2];e={N:C[e>>2],M:C[e+4>>2],D:C[e+8>>2],C:C[e+12>>2],B:C[e+16>>2],A:C[e+20>>2],F:C[e+24>>2],G:C[e+28>>2],X:C[e+32>>2],L:C[e+36>>2],O:m?m?I(H,m,void 0):
|
|
26
|
-
"":""};d=d?I(H,d,void 0):"";m={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in m)d=d.replace(new RegExp(l,"g"),m[l]);var F="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
|
|
27
|
-
va="January February March April May June July August September October November December".split(" ");m={"%a":function(a){return F[a.F].substring(0,3)},"%A":function(a){return F[a.F]},"%b":function(a){return va[a.B].substring(0,3)},"%B":function(a){return va[a.B]},"%C":function(a){return f((a.A+1900)/100|0,2)},"%d":function(a){return f(a.C,2)},"%e":function(a){return g(a.C,2," ")},"%g":function(a){return z(a).toString().substring(2)},"%G":function(a){return z(a)},"%H":function(a){return f(a.D,2)},
|
|
28
|
-
"%I":function(a){a=a.D;0==a?a=12:12<a&&(a-=12);return f(a,2)},"%j":function(a){return f(a.C+T(S(a.A+1900)?U:W,a.B-1),3)},"%m":function(a){return f(a.B+1,2)},"%M":function(a){return f(a.M,2)},"%n":function(){return"\n"},"%p":function(a){return 0<=a.D&&12>a.D?"AM":"PM"},"%S":function(a){return f(a.N,2)},"%t":function(){return"\t"},"%u":function(a){return a.F||7},"%U":function(a){var b=new Date(a.A+1900,0,1),d=0===b.getDay()?b:X(b,7-b.getDay());a=new Date(a.A+1900,a.B,a.C);return 0>h(d,a)?f(Math.ceil((31-
|
|
29
|
-
d.getDate()+(T(S(a.getFullYear())?U:W,a.getMonth()-1)-31)+a.getDate())/7),2):0===h(d,b)?"01":"00"},"%V":function(a){var b=n(new Date(a.A+1900,0,4)),d=n(new Date(a.A+1901,0,4)),e=X(new Date(a.A+1900,0,1),a.G);return 0>h(e,b)?"53":0>=h(d,e)?"01":f(Math.ceil((b.getFullYear()<a.A+1900?a.G+32-b.getDate():a.G+1-b.getDate())/7),2)},"%w":function(a){return a.F},"%W":function(a){var b=new Date(a.A,0,1),d=1===b.getDay()?b:X(b,0===b.getDay()?1:7-b.getDay()+1);a=new Date(a.A+1900,a.B,a.C);return 0>h(d,a)?f(Math.ceil((31-
|
|
30
|
-
d.getDate()+(T(S(a.getFullYear())?U:W,a.getMonth()-1)-31)+a.getDate())/7),2):0===h(d,b)?"01":"00"},"%y":function(a){return(a.A+1900).toString().substring(2)},"%Y":function(a){return a.A+1900},"%z":function(a){a=a.L;var b=0<=a;a=Math.abs(a)/60;return(b?"+":"-")+String("0000"+(a/60*100+a%60)).slice(-4)},"%Z":function(a){return a.O},"%%":function(){return"%"}};for(l in m)0<=d.indexOf(l)&&(d=d.replace(new RegExp(l,"g"),m[l](e)));l=Ea(d);if(l.length>b)return 0;B.set(l,a);return l.length-1}
|
|
31
|
-
function Ea(a){for(var b=0,d=0;d<a.length;++d){var e=a.charCodeAt(d);55296<=e&&57343>=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++b:b=2047>=e?b+2:65535>=e?b+3:b+4}b=Array(b+1);ia(a,b,0,b.length);return b}
|
|
32
|
-
var Ga={f:function(){},c:function(){c.___errno_location&&(C[c.___errno_location()>>2]=63);return-1},n:function(a,b){P=b;try{var d=Aa();var e=Aa();if(-1===d||0===e)var g=-28;else{var f=Q.K[d];if(f&&e===f.U){var h=(void 0).T(f.S);Q.R(d,h,e,f.flags,f.offset);(void 0).W(h);Q.K[d]=null;f.P&&Fa(f.V)}g=0}return g}catch(n){return D(n),-n.I}},a:function(){},b:function(){D()},k:function(a,b,d){H.set(H.subarray(b,b+d),a)},l:function(a){var b=B.length;if(2147418112<a)return!1;for(var d=1;4>=d;d*=2){var e=b*(1+
|
|
33
|
-
.2/d);e=Math.min(e,a+100663296);e=Math.max(16777216,a,e);0<e%65536&&(e+=65536-e%65536);a:{try{E.grow(Math.min(2147418112,e)-J.byteLength+65535>>16);ma(E.buffer);var g=1;break a}catch(f){}g=void 0}if(g)return!0}return!1},d:function(a,b){var d=0;Ca().forEach(function(e,g){var f=b+d;g=C[a+4*g>>2]=f;for(f=0;f<e.length;++f)B[g++>>0]=e.charCodeAt(f);B[g>>0]=0;d+=e.length+1});return 0},e:function(a,b){var d=Ca();C[a>>2]=d.length;var e=0;d.forEach(function(a){e+=a.length+1});C[b>>2]=e;return 0},h:function(){return 0},
|
|
34
|
-
j:function(){return 0},g:function(a,b,d,e){try{for(var g=0,f=0;f<d;f++){for(var h=C[b+8*f>>2],n=C[b+(8*f+4)>>2],z=0;z<n;z++){var m=H[h+z],l=za[a];0===m||10===m?((1===a?x:y)(I(l,0)),l.length=0):l.push(m)}g+=n}C[e>>2]=g;return 0}catch(F){return D(F),F.I}},memory:E,o:function(){},i:function(){},m:function(a,b,d,e){return Da(a,b,d,e)},table:ea},Ha=function(){function a(a){c.asm=a.exports;L--;c.monitorRunDependencies&&c.monitorRunDependencies(L);0==L&&(null!==M&&(clearInterval(M),M=null),N&&(a=N,N=null,
|
|
35
|
-
a()))}function b(b){a(b.instance)}function d(a){return xa().then(function(a){return WebAssembly.instantiate(a,e)}).then(a,function(a){y("failed to asynchronously prepare wasm: "+a);D(a)})}var e={env:Ga,wasi_snapshot_preview1:Ga};L++;c.monitorRunDependencies&&c.monitorRunDependencies(L);if(c.instantiateWasm)try{return c.instantiateWasm(e,a)}catch(g){return y("Module.instantiateWasm callback failed with error: "+g),!1}(function(){if(A||"function"!==typeof WebAssembly.instantiateStreaming||ta()||"function"!==
|
|
36
|
-
typeof fetch)return d(b);fetch(O,{credentials:"same-origin"}).then(function(a){return WebAssembly.instantiateStreaming(a,e).then(b,function(a){y("wasm streaming compile failed: "+a);y("falling back to ArrayBuffer instantiation");d(b)})})})();return{}}();c.asm=Ha;var ya=c.___wasm_call_ctors=function(){return(ya=c.___wasm_call_ctors=c.asm.p).apply(null,arguments)};c._convert_glsl_to_spirv=function(){return(c._convert_glsl_to_spirv=c.asm.q).apply(null,arguments)};
|
|
37
|
-
c._destroy_output_buffer=function(){return(c._destroy_output_buffer=c.asm.r).apply(null,arguments)};c._malloc=function(){return(c._malloc=c.asm.s).apply(null,arguments)};var Fa=c._free=function(){return(Fa=c._free=c.asm.t).apply(null,arguments)},ja=c.stackSave=function(){return(ja=c.stackSave=c.asm.u).apply(null,arguments)},G=c.stackAlloc=function(){return(G=c.stackAlloc=c.asm.v).apply(null,arguments)},ka=c.stackRestore=function(){return(ka=c.stackRestore=c.asm.w).apply(null,arguments)};
|
|
38
|
-
c.dynCall_vi=function(){return(c.dynCall_vi=c.asm.x).apply(null,arguments)};c.dynCall_v=function(){return(c.dynCall_v=c.asm.y).apply(null,arguments)};c.asm=Ha;var Y;c.then=function(a){if(Y)a(c);else{var b=c.onRuntimeInitialized;c.onRuntimeInitialized=function(){b&&b();a(c)}}return c};N=function Ia(){Y||Z();Y||(N=Ia)};
|
|
39
|
-
function Z(){function a(){if(!Y&&(Y=!0,!fa)){K(pa);K(qa);if(c.onRuntimeInitialized)c.onRuntimeInitialized();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var a=c.postRun.shift();ra.unshift(a)}K(ra)}}if(!(0<L)){if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)sa();K(oa);0<L||(c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1);a()},1)):a())}}c.run=Z;
|
|
40
|
-
if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.pop()();Z();
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return Module
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
})();
|
|
47
|
-
if (typeof exports === 'object' && typeof module === 'object')
|
|
48
|
-
module.exports = Module;
|
|
49
|
-
else if (typeof define === 'function' && define['amd'])
|
|
50
|
-
define([], function() { return Module; });
|
|
51
|
-
else if (typeof exports === 'object')
|
|
52
|
-
exports["Module"] = Module;
|
|
53
|
-
export default (() => {
|
|
54
|
-
const initialize = () => {
|
|
55
|
-
return new Promise(resolve => {
|
|
56
|
-
Module({
|
|
57
|
-
locateFile() {
|
|
58
|
-
const i = import.meta.url.lastIndexOf('/')
|
|
59
|
-
return import.meta.url.substring(0, i) + '/glslang.wasm';
|
|
60
|
-
},
|
|
61
|
-
onRuntimeInitialized() {
|
|
62
|
-
resolve({
|
|
63
|
-
compileGLSLZeroCopy: this.compileGLSLZeroCopy,
|
|
64
|
-
compileGLSL: this.compileGLSL,
|
|
65
|
-
});
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
let instance;
|
|
72
|
-
return () => {
|
|
73
|
-
if (!instance) {
|
|
74
|
-
instance = initialize();
|
|
75
|
-
}
|
|
76
|
-
return instance;
|
|
77
|
-
};
|
|
78
|
-
})();
|
|
Binary file
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import ConstNode from '../core/ConstNode.js';
|
|
2
|
-
|
|
3
|
-
export const PI = new ConstNode( '3.141592653589793', 'float', 'PI' );
|
|
4
|
-
export const RECIPROCAL_PI = new ConstNode( '0.3183098861837907', 'float', 'RECIPROCAL_PI' );
|
|
5
|
-
export const EPSILON = new ConstNode( '1e-6', 'float', 'EPSILON' );
|
|
6
|
-
|
|
7
|
-
export const DEFAULT_SPECULAR_COEFFICIENT = new ConstNode( '0.04', 'float', 'DEFAULT_SPECULAR_COEFFICIENT' );
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import CodeNode from './CodeNode.js';
|
|
2
|
-
|
|
3
|
-
class ConstNode extends CodeNode {
|
|
4
|
-
|
|
5
|
-
constructor( code = '', type = '', name = '' ) {
|
|
6
|
-
|
|
7
|
-
super( code, type );
|
|
8
|
-
|
|
9
|
-
this.includes = [];
|
|
10
|
-
|
|
11
|
-
this.name = name;
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
generate( builder ) {
|
|
16
|
-
|
|
17
|
-
const code = super.generate( builder );
|
|
18
|
-
|
|
19
|
-
const nodeCode = builder.getCodeFromNode( this, this.getNodeType( builder ) );
|
|
20
|
-
|
|
21
|
-
if ( this.name !== '' ) {
|
|
22
|
-
|
|
23
|
-
// use a custom property name
|
|
24
|
-
|
|
25
|
-
nodeCode.name = this.name;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const propertyName = builder.getPropertyName( nodeCode );
|
|
30
|
-
|
|
31
|
-
nodeCode.code = `#define ${propertyName} ${code}`;
|
|
32
|
-
|
|
33
|
-
return propertyName;
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default ConstNode;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import CodeNode from './CodeNode.js';
|
|
2
|
-
import StructVarNode from './StructVarNode.js';
|
|
3
|
-
|
|
4
|
-
class StructNode extends CodeNode {
|
|
5
|
-
|
|
6
|
-
constructor( inputs = {}, name = '' ) {
|
|
7
|
-
|
|
8
|
-
super();
|
|
9
|
-
|
|
10
|
-
this.inputs = inputs;
|
|
11
|
-
this.name = name;
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
getNodeType( builder ) {
|
|
16
|
-
|
|
17
|
-
if ( this.name !== '' ) {
|
|
18
|
-
|
|
19
|
-
return this.name;
|
|
20
|
-
|
|
21
|
-
} else {
|
|
22
|
-
|
|
23
|
-
const codeNode = builder.getCodeFromNode( this, 'code' );
|
|
24
|
-
|
|
25
|
-
return codeNode.name;
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
create( inputs = {} ) {
|
|
32
|
-
|
|
33
|
-
return new StructVarNode( this, inputs );
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
generate( builder, output ) {
|
|
38
|
-
|
|
39
|
-
const type = this.getNodeType( builder );
|
|
40
|
-
const inputs = this.inputs;
|
|
41
|
-
|
|
42
|
-
let code = `struct ${type} {\n`;
|
|
43
|
-
|
|
44
|
-
for ( const inputName in inputs ) {
|
|
45
|
-
|
|
46
|
-
const inputType = inputs[ inputName ];
|
|
47
|
-
|
|
48
|
-
code += `\t${inputType} ${inputName};\n`;
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
code += `};`;
|
|
53
|
-
|
|
54
|
-
this.code = code;
|
|
55
|
-
|
|
56
|
-
super.generate( builder, output );
|
|
57
|
-
|
|
58
|
-
if ( output === 'var' ) {
|
|
59
|
-
|
|
60
|
-
const nodeData = builder.getDataFromNode( this );
|
|
61
|
-
|
|
62
|
-
if ( nodeData.index === undefined ) {
|
|
63
|
-
|
|
64
|
-
nodeData.index = 0;
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return `structVar${nodeData.index ++}`;
|
|
69
|
-
|
|
70
|
-
} else {
|
|
71
|
-
|
|
72
|
-
return code;
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default StructNode;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import Node from './Node.js';
|
|
2
|
-
import FloatNode from '../inputs/FloatNode.js';
|
|
3
|
-
|
|
4
|
-
const zeroValue = new FloatNode( 0 ).setConst( true );
|
|
5
|
-
|
|
6
|
-
class StructVarNode extends Node {
|
|
7
|
-
|
|
8
|
-
constructor( struct, inputs = {} ) {
|
|
9
|
-
|
|
10
|
-
super();
|
|
11
|
-
|
|
12
|
-
this.struct = struct;
|
|
13
|
-
this.inputs = inputs;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getNodeType( builder ) {
|
|
18
|
-
|
|
19
|
-
return this.struct.getNodeType( builder );
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
generate( builder ) {
|
|
24
|
-
|
|
25
|
-
const type = this.getNodeType( builder );
|
|
26
|
-
|
|
27
|
-
const struct = this.struct;
|
|
28
|
-
|
|
29
|
-
const inputs = this.inputs;
|
|
30
|
-
const structInputs = this.struct.inputs;
|
|
31
|
-
|
|
32
|
-
const nodeData = builder.getDataFromNode( this );
|
|
33
|
-
|
|
34
|
-
let property = nodeData.property;
|
|
35
|
-
|
|
36
|
-
if ( property === undefined ) {
|
|
37
|
-
|
|
38
|
-
property = struct.build( builder, 'var' );
|
|
39
|
-
|
|
40
|
-
const inputsSnippets = [];
|
|
41
|
-
|
|
42
|
-
for ( const inputName in structInputs ) {
|
|
43
|
-
|
|
44
|
-
const inputType = structInputs[ inputName ];
|
|
45
|
-
const input = inputs[ inputName ];
|
|
46
|
-
|
|
47
|
-
let inputSnippet = null;
|
|
48
|
-
|
|
49
|
-
if ( input !== undefined ) {
|
|
50
|
-
|
|
51
|
-
inputSnippet = input.build( builder, inputType );
|
|
52
|
-
|
|
53
|
-
} else {
|
|
54
|
-
|
|
55
|
-
inputSnippet = zeroValue.build( builder, inputType );
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
inputsSnippets.push( inputSnippet );
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
builder.addFlowCode( `${type} ${property} = ${type}( ${inputsSnippets.join( ', ' )} )` );
|
|
64
|
-
|
|
65
|
-
nodeData.property = property;
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return property;
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export default StructVarNode;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import CodeNode from '../core/CodeNode.js';
|
|
2
|
-
import FunctionNode from '../core/FunctionNode.js';
|
|
3
|
-
|
|
4
|
-
export const LinearToLinear = new FunctionNode( `
|
|
5
|
-
vec4 ( in vec4 value ) {
|
|
6
|
-
return value;
|
|
7
|
-
}` );
|
|
8
|
-
|
|
9
|
-
export const GammaToLinear = new FunctionNode( `
|
|
10
|
-
vec4 ( in vec4 value, in float gammaFactor ) {
|
|
11
|
-
return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );
|
|
12
|
-
}` );
|
|
13
|
-
|
|
14
|
-
export const LinearToGamma = new FunctionNode( `
|
|
15
|
-
vec4 ( in vec4 value, in float gammaFactor ) {
|
|
16
|
-
return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );
|
|
17
|
-
}` );
|
|
18
|
-
|
|
19
|
-
export const sRGBToLinear = new FunctionNode( `
|
|
20
|
-
vec4 ( in vec4 value ) {
|
|
21
|
-
return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
|
|
22
|
-
}` );
|
|
23
|
-
|
|
24
|
-
export const LinearTosRGB = new FunctionNode( `
|
|
25
|
-
vec4 ( in vec4 value ) {
|
|
26
|
-
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
|
|
27
|
-
}` );
|
|
28
|
-
|
|
29
|
-
export const RGBEToLinear = new FunctionNode( `
|
|
30
|
-
vec4 ( in vec4 value ) {
|
|
31
|
-
return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );
|
|
32
|
-
}` );
|
|
33
|
-
|
|
34
|
-
export const LinearToRGBE = new FunctionNode( `
|
|
35
|
-
vec4 ( in vec4 value ) {
|
|
36
|
-
float maxComponent = max( max( value.r, value.g ), value.b );
|
|
37
|
-
float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );
|
|
38
|
-
return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );
|
|
39
|
-
// return vec4( value.brg, ( 3.0 + 128.0 ) / 256.0 );
|
|
40
|
-
}` );
|
|
41
|
-
|
|
42
|
-
// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html
|
|
43
|
-
export const RGBMToLinear = new FunctionNode( `
|
|
44
|
-
vec4 ( in vec4 value, in float maxRange ) {
|
|
45
|
-
return vec4( value.rgb * value.a * maxRange, 1.0 );
|
|
46
|
-
}` );
|
|
47
|
-
|
|
48
|
-
export const LinearToRGBM = new FunctionNode( `
|
|
49
|
-
vec4 ( in vec4 value, in float maxRange ) {
|
|
50
|
-
float maxRGB = max( value.r, max( value.g, value.b ) );
|
|
51
|
-
float M = clamp( maxRGB / maxRange, 0.0, 1.0 );
|
|
52
|
-
M = ceil( M * 255.0 ) / 255.0;
|
|
53
|
-
return vec4( value.rgb / ( M * maxRange ), M );
|
|
54
|
-
}` );
|
|
55
|
-
|
|
56
|
-
// reference: http://iwasbeingirony.blogspot.ca/2010/06/difference-between-rgbm-and-rgbd.html
|
|
57
|
-
export const RGBDToLinear = new FunctionNode( `
|
|
58
|
-
vec4 ( in vec4 value, in float maxRange ) {
|
|
59
|
-
return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );
|
|
60
|
-
}` );
|
|
61
|
-
|
|
62
|
-
export const LinearToRGBD = new FunctionNode( `
|
|
63
|
-
vec4 ( in vec4 value, in float maxRange ) {
|
|
64
|
-
float maxRGB = max( value.r, max( value.g, value.b ) );
|
|
65
|
-
float D = max( maxRange / maxRGB, 1.0 );
|
|
66
|
-
// NOTE: The implementation with min causes the shader to not compile on
|
|
67
|
-
// a common Alcatel A502DL in Chrome 78/Android 8.1. Some research suggests
|
|
68
|
-
// that the chipset is Mediatek MT6739 w/ IMG PowerVR GE8100 GPU.
|
|
69
|
-
// D = min( floor( D ) / 255.0, 1.0 );
|
|
70
|
-
D = clamp( floor( D ) / 255.0, 0.0, 1.0 );
|
|
71
|
-
return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );
|
|
72
|
-
}` );
|
|
73
|
-
|
|
74
|
-
// LogLuv reference: http://graphicrants.blogspot.ca/2009/04/rgbm-color-encoding.html
|
|
75
|
-
export const cLogLuvM = new CodeNode( 'const mat3 cLogLuvMNode = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );' );
|
|
76
|
-
export const LinearToLogLuv = new FunctionNode( `
|
|
77
|
-
vec4 ( in vec4 value ) {
|
|
78
|
-
vec3 Xp_Y_XYZp = cLogLuvMNode * value.rgb;
|
|
79
|
-
Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );
|
|
80
|
-
vec4 vResult;
|
|
81
|
-
vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;
|
|
82
|
-
float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;
|
|
83
|
-
vResult.w = fract( Le );
|
|
84
|
-
vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;
|
|
85
|
-
return vResult;
|
|
86
|
-
}` ).setIncludes( [ cLogLuvM ] );
|
|
87
|
-
|
|
88
|
-
// Inverse M matrix, for decoding
|
|
89
|
-
export const cLogLuvInverseM = new CodeNode( 'const mat3 cLogLuvInverseMNode = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );' );
|
|
90
|
-
export const LogLuvToLinear = new FunctionNode( `
|
|
91
|
-
vec4 ( in vec4 value ) {
|
|
92
|
-
float Le = value.z * 255.0 + value.w;
|
|
93
|
-
vec3 Xp_Y_XYZp;
|
|
94
|
-
Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );
|
|
95
|
-
Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;
|
|
96
|
-
Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;
|
|
97
|
-
vec3 vRGB = cLogLuvInverseMNode * Xp_Y_XYZp.rgb;
|
|
98
|
-
return vec4( max( vRGB, 0.0 ), 1.0 );
|
|
99
|
-
}` ).setIncludes( [ cLogLuvInverseM ] );
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { PI } from '../consts/MathConsts.js';
|
|
2
|
-
import CodeNode from '../core/CodeNode.js';
|
|
3
|
-
import FunctionNode from '../core/FunctionNode.js';
|
|
4
|
-
|
|
5
|
-
// variadic macros
|
|
6
|
-
export const saturateMacro = new CodeNode( '#define saturate(a) clamp( a, 0.0, 1.0 )' );
|
|
7
|
-
export const whiteComplementMacro = new CodeNode( '#define whiteComplement(a) ( 1.0 - saturate( a ) )' );
|
|
8
|
-
|
|
9
|
-
export const transformDirection = new FunctionNode( `
|
|
10
|
-
vec3 ( in vec3 dir, in mat4 matrix ) {
|
|
11
|
-
|
|
12
|
-
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
13
|
-
|
|
14
|
-
}` );
|
|
15
|
-
|
|
16
|
-
export const inverseTransformDirection = new FunctionNode( `
|
|
17
|
-
vec3 ( in vec3 dir, in mat4 matrix ) {
|
|
18
|
-
|
|
19
|
-
// dir can be either a direction vector or a normal vector
|
|
20
|
-
// upper-left 3x3 of matrix is assumed to be orthogonal
|
|
21
|
-
|
|
22
|
-
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
|
|
23
|
-
|
|
24
|
-
}` );
|
|
25
|
-
|
|
26
|
-
export const pow2 = new FunctionNode( 'float pow2( const in float x ) { return x*x; }' );
|
|
27
|
-
export const pow3 = new FunctionNode( 'float pow3( const in float x ) { return x*x*x; }' );
|
|
28
|
-
export const pow4 = new FunctionNode( 'float pow4( const in float x ) { float x2 = x*x; return x2*x2; }' );
|
|
29
|
-
|
|
30
|
-
export const average = new FunctionNode( 'float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }' );
|
|
31
|
-
|
|
32
|
-
export const max3 = new FunctionNode( 'float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }' );
|
|
33
|
-
|
|
34
|
-
// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.
|
|
35
|
-
// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/
|
|
36
|
-
export const rand = new FunctionNode( `
|
|
37
|
-
highp float rand( const in vec2 uv ) {
|
|
38
|
-
|
|
39
|
-
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
|
|
40
|
-
|
|
41
|
-
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, 3.141592653589793 );
|
|
42
|
-
|
|
43
|
-
return fract(sin(sn) * c);
|
|
44
|
-
|
|
45
|
-
}` ).setIncludes( [ PI ] );
|
|
46
|
-
|
|
47
|
-
export const precisionSafeLength = new FunctionNode( 'float precisionSafeLength( vec3 v ) { return length( v ); }' );
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
const ShaderLib = {
|
|
2
|
-
|
|
3
|
-
common: {
|
|
4
|
-
|
|
5
|
-
vertexShader:
|
|
6
|
-
`#version 450
|
|
7
|
-
|
|
8
|
-
void main(){
|
|
9
|
-
|
|
10
|
-
NODE_CODE
|
|
11
|
-
|
|
12
|
-
NODE_CODE_MVP
|
|
13
|
-
gl_Position = NODE_MVP;
|
|
14
|
-
|
|
15
|
-
}`,
|
|
16
|
-
|
|
17
|
-
fragmentShader:
|
|
18
|
-
`#version 450
|
|
19
|
-
|
|
20
|
-
layout(location = 0) out vec4 outColor;
|
|
21
|
-
|
|
22
|
-
void main() {
|
|
23
|
-
|
|
24
|
-
NODE_CODE
|
|
25
|
-
|
|
26
|
-
MaterialDiffuseColor = vec4( 1.0 );
|
|
27
|
-
|
|
28
|
-
#ifdef NODE_COLOR
|
|
29
|
-
|
|
30
|
-
NODE_CODE_COLOR
|
|
31
|
-
|
|
32
|
-
MaterialDiffuseColor = NODE_COLOR;
|
|
33
|
-
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
#ifdef NODE_OPACITY
|
|
37
|
-
|
|
38
|
-
NODE_CODE_OPACITY
|
|
39
|
-
|
|
40
|
-
MaterialDiffuseColor.a *= NODE_OPACITY;
|
|
41
|
-
|
|
42
|
-
#endif
|
|
43
|
-
|
|
44
|
-
#ifdef NODE_ALPHA_TEST
|
|
45
|
-
|
|
46
|
-
NODE_CODE_ALPHA_TEST
|
|
47
|
-
if ( MaterialDiffuseColor.a < NODE_ALPHA_TEST ) discard;
|
|
48
|
-
|
|
49
|
-
#endif
|
|
50
|
-
|
|
51
|
-
#ifdef NODE_LIGHT
|
|
52
|
-
|
|
53
|
-
NODE_CODE_LIGHT
|
|
54
|
-
|
|
55
|
-
outColor.rgb = NODE_LIGHT;
|
|
56
|
-
outColor.a = MaterialDiffuseColor.a;
|
|
57
|
-
|
|
58
|
-
#else
|
|
59
|
-
|
|
60
|
-
outColor = MaterialDiffuseColor;
|
|
61
|
-
|
|
62
|
-
#endif
|
|
63
|
-
|
|
64
|
-
}`
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
standard: {
|
|
69
|
-
|
|
70
|
-
vertexShader:
|
|
71
|
-
`#version 450
|
|
72
|
-
|
|
73
|
-
void main(){
|
|
74
|
-
|
|
75
|
-
NODE_CODE
|
|
76
|
-
|
|
77
|
-
NODE_CODE_MVP
|
|
78
|
-
gl_Position = NODE_MVP;
|
|
79
|
-
|
|
80
|
-
}`,
|
|
81
|
-
|
|
82
|
-
fragmentShader:
|
|
83
|
-
`#version 450
|
|
84
|
-
|
|
85
|
-
layout(location = 0) out vec4 outColor;
|
|
86
|
-
|
|
87
|
-
void main() {
|
|
88
|
-
|
|
89
|
-
NODE_CODE
|
|
90
|
-
|
|
91
|
-
MaterialDiffuseColor = vec4( 1.0 );
|
|
92
|
-
MaterialMetalness = 1.0;
|
|
93
|
-
MaterialRoughness = 1.0;
|
|
94
|
-
|
|
95
|
-
#ifdef NODE_COLOR
|
|
96
|
-
|
|
97
|
-
NODE_CODE_COLOR
|
|
98
|
-
|
|
99
|
-
MaterialDiffuseColor = NODE_COLOR;
|
|
100
|
-
|
|
101
|
-
#endif
|
|
102
|
-
|
|
103
|
-
#ifdef NODE_OPACITY
|
|
104
|
-
|
|
105
|
-
NODE_CODE_OPACITY
|
|
106
|
-
|
|
107
|
-
MaterialDiffuseColor.a *= NODE_OPACITY;
|
|
108
|
-
|
|
109
|
-
#endif
|
|
110
|
-
|
|
111
|
-
#ifdef NODE_ALPHA_TEST
|
|
112
|
-
|
|
113
|
-
NODE_CODE_ALPHA_TEST
|
|
114
|
-
if ( MaterialDiffuseColor.a < NODE_ALPHA_TEST ) discard;
|
|
115
|
-
|
|
116
|
-
#endif
|
|
117
|
-
|
|
118
|
-
NODE_CODE_METALNESS
|
|
119
|
-
MaterialMetalness = NODE_METALNESS;
|
|
120
|
-
|
|
121
|
-
NODE_CODE_ROUGHNESS
|
|
122
|
-
MaterialRoughness = NODE_ROUGHNESS;
|
|
123
|
-
|
|
124
|
-
#ifdef NODE_NORMAL
|
|
125
|
-
|
|
126
|
-
NODE_CODE_NORMAL
|
|
127
|
-
TransformedNormalView = NODE_NORMAL;
|
|
128
|
-
|
|
129
|
-
#endif
|
|
130
|
-
|
|
131
|
-
MaterialDiffuseColor.rgb = MaterialDiffuseColor.rgb * ( 1.0 - MaterialMetalness );
|
|
132
|
-
|
|
133
|
-
#ifdef NODE_LIGHT
|
|
134
|
-
|
|
135
|
-
NODE_CODE_LIGHT
|
|
136
|
-
|
|
137
|
-
outColor.rgb = NODE_LIGHT;
|
|
138
|
-
outColor.a = MaterialDiffuseColor.a;
|
|
139
|
-
|
|
140
|
-
#else
|
|
141
|
-
|
|
142
|
-
outColor = MaterialDiffuseColor;
|
|
143
|
-
|
|
144
|
-
#endif
|
|
145
|
-
|
|
146
|
-
}`
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export default ShaderLib;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Object3D } from '../../core/Object3D.js';
|
|
2
|
-
|
|
3
|
-
class ImmediateRenderObject extends Object3D {
|
|
4
|
-
|
|
5
|
-
constructor( material ) {
|
|
6
|
-
|
|
7
|
-
super();
|
|
8
|
-
|
|
9
|
-
this.material = material;
|
|
10
|
-
this.render = function ( /* renderCallback */ ) {};
|
|
11
|
-
|
|
12
|
-
this.hasPositions = false;
|
|
13
|
-
this.hasNormals = false;
|
|
14
|
-
this.hasColors = false;
|
|
15
|
-
this.hasUvs = false;
|
|
16
|
-
|
|
17
|
-
this.positionArray = null;
|
|
18
|
-
this.normalArray = null;
|
|
19
|
-
this.colorArray = null;
|
|
20
|
-
this.uvArray = null;
|
|
21
|
-
|
|
22
|
-
this.count = 0;
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
ImmediateRenderObject.prototype.isImmediateRenderObject = true;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export { ImmediateRenderObject };
|