├── CNAME
├── README.md
├── images
├── bg-1.png
├── comp-1.png
├── desk-1.png
├── keeb-1.png
├── mat-1.png
├── mouse-1.png
└── wall-1.png
├── index.html
├── node_modules
└── three
│ ├── LICENSE
│ ├── README.md
│ ├── build
│ ├── three.cjs
│ ├── three.js
│ ├── three.min.js
│ └── three.module.js
│ ├── examples
│ ├── fonts
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── droid
│ │ │ ├── NOTICE
│ │ │ ├── README.txt
│ │ │ ├── droid_sans_bold.typeface.json
│ │ │ ├── droid_sans_mono_regular.typeface.json
│ │ │ ├── droid_sans_regular.typeface.json
│ │ │ ├── droid_serif_bold.typeface.json
│ │ │ └── droid_serif_regular.typeface.json
│ │ ├── gentilis_bold.typeface.json
│ │ ├── gentilis_regular.typeface.json
│ │ ├── helvetiker_bold.typeface.json
│ │ ├── helvetiker_regular.typeface.json
│ │ ├── open-sans
│ │ │ ├── open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff
│ │ │ ├── open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff2
│ │ │ └── open-sans.css
│ │ ├── optimer_bold.typeface.json
│ │ ├── optimer_regular.typeface.json
│ │ ├── tabler-icons
│ │ │ ├── fonts
│ │ │ │ ├── tabler-icons.eot
│ │ │ │ ├── tabler-icons.svg
│ │ │ │ ├── tabler-icons.ttf
│ │ │ │ ├── tabler-icons.woff
│ │ │ │ └── tabler-icons.woff2
│ │ │ └── tabler-icons.min.css
│ │ └── ttf
│ │ │ ├── README.md
│ │ │ └── kenpixel.ttf
│ ├── js
│ │ ├── animation
│ │ │ ├── AnimationClipCreator.js
│ │ │ ├── CCDIKSolver.js
│ │ │ ├── MMDAnimationHelper.js
│ │ │ └── MMDPhysics.js
│ │ ├── cameras
│ │ │ └── CinematicCamera.js
│ │ ├── controls
│ │ │ ├── ArcballControls.js
│ │ │ ├── DragControls.js
│ │ │ ├── FirstPersonControls.js
│ │ │ ├── FlyControls.js
│ │ │ ├── OrbitControls.js
│ │ │ ├── PointerLockControls.js
│ │ │ ├── TrackballControls.js
│ │ │ ├── TransformControls.js
│ │ │ └── experimental
│ │ │ │ └── CameraControls.js
│ │ ├── csm
│ │ │ ├── CSM.js
│ │ │ ├── CSMFrustum.js
│ │ │ ├── CSMHelper.js
│ │ │ ├── CSMShader.js
│ │ │ └── Frustum.js
│ │ ├── curves
│ │ │ ├── CurveExtras.js
│ │ │ ├── NURBSCurve.js
│ │ │ ├── NURBSSurface.js
│ │ │ └── NURBSUtils.js
│ │ ├── deprecated
│ │ │ └── Geometry.js
│ │ ├── effects
│ │ │ ├── AnaglyphEffect.js
│ │ │ ├── AsciiEffect.js
│ │ │ ├── OutlineEffect.js
│ │ │ ├── ParallaxBarrierEffect.js
│ │ │ ├── PeppersGhostEffect.js
│ │ │ └── StereoEffect.js
│ │ ├── environments
│ │ │ ├── DebugEnvironment.js
│ │ │ └── RoomEnvironment.js
│ │ ├── exporters
│ │ │ ├── ColladaExporter.js
│ │ │ ├── DRACOExporter.js
│ │ │ ├── EXRExporter.js
│ │ │ ├── GLTFExporter.js
│ │ │ ├── MMDExporter.js
│ │ │ ├── OBJExporter.js
│ │ │ ├── PLYExporter.js
│ │ │ ├── STLExporter.js
│ │ │ └── USDZExporter.js
│ │ ├── geometries
│ │ │ ├── BoxLineGeometry.js
│ │ │ ├── ConvexGeometry.js
│ │ │ ├── DecalGeometry.js
│ │ │ ├── LightningStrike.js
│ │ │ ├── ParametricGeometries.js
│ │ │ ├── ParametricGeometry.js
│ │ │ ├── RoundedBoxGeometry.js
│ │ │ ├── TeapotGeometry.js
│ │ │ └── TextGeometry.js
│ │ ├── helpers
│ │ │ ├── LightProbeHelper.js
│ │ │ ├── OctreeHelper.js
│ │ │ ├── PositionalAudioHelper.js
│ │ │ ├── RectAreaLightHelper.js
│ │ │ ├── VertexNormalsHelper.js
│ │ │ ├── VertexTangentsHelper.js
│ │ │ └── ViewHelper.js
│ │ ├── interactive
│ │ │ ├── HTMLMesh.js
│ │ │ ├── InteractiveGroup.js
│ │ │ ├── SelectionBox.js
│ │ │ └── SelectionHelper.js
│ │ ├── libs
│ │ │ ├── ammo.wasm.js
│ │ │ ├── ammo.wasm.wasm
│ │ │ ├── basis
│ │ │ │ ├── README.md
│ │ │ │ ├── basis_transcoder.js
│ │ │ │ └── basis_transcoder.wasm
│ │ │ ├── chevrotain.min.js
│ │ │ ├── draco
│ │ │ │ ├── README.md
│ │ │ │ ├── draco_decoder.js
│ │ │ │ ├── draco_decoder.wasm
│ │ │ │ ├── draco_encoder.js
│ │ │ │ ├── draco_wasm_wrapper.js
│ │ │ │ └── gltf
│ │ │ │ │ ├── draco_decoder.js
│ │ │ │ │ ├── draco_decoder.wasm
│ │ │ │ │ ├── draco_encoder.js
│ │ │ │ │ └── draco_wasm_wrapper.js
│ │ │ ├── fflate.min.js
│ │ │ ├── lottie_canvas.js
│ │ │ ├── meshopt_decoder.js
│ │ │ ├── opentype.min.js
│ │ │ └── stats.min.js
│ │ ├── lights
│ │ │ ├── LightProbeGenerator.js
│ │ │ └── RectAreaLightUniformsLib.js
│ │ ├── lines
│ │ │ ├── Line2.js
│ │ │ ├── LineGeometry.js
│ │ │ ├── LineMaterial.js
│ │ │ ├── LineSegments2.js
│ │ │ ├── LineSegmentsGeometry.js
│ │ │ ├── Wireframe.js
│ │ │ └── WireframeGeometry2.js
│ │ ├── loaders
│ │ │ ├── 3DMLoader.js
│ │ │ ├── 3MFLoader.js
│ │ │ ├── AMFLoader.js
│ │ │ ├── BVHLoader.js
│ │ │ ├── BasisTextureLoader.js
│ │ │ ├── ColladaLoader.js
│ │ │ ├── DDSLoader.js
│ │ │ ├── DRACOLoader.js
│ │ │ ├── EXRLoader.js
│ │ │ ├── FBXLoader.js
│ │ │ ├── FontLoader.js
│ │ │ ├── GCodeLoader.js
│ │ │ ├── GLTFLoader.js
│ │ │ ├── HDRCubeTextureLoader.js
│ │ │ ├── KMZLoader.js
│ │ │ ├── KTX2Loader.js
│ │ │ ├── KTXLoader.js
│ │ │ ├── LDrawLoader.js
│ │ │ ├── LUT3dlLoader.js
│ │ │ ├── LUTCubeLoader.js
│ │ │ ├── LWOLoader.js
│ │ │ ├── LogLuvLoader.js
│ │ │ ├── LottieLoader.js
│ │ │ ├── MD2Loader.js
│ │ │ ├── MDDLoader.js
│ │ │ ├── MMDLoader.js
│ │ │ ├── MTLLoader.js
│ │ │ ├── NRRDLoader.js
│ │ │ ├── OBJLoader.js
│ │ │ ├── PCDLoader.js
│ │ │ ├── PDBLoader.js
│ │ │ ├── PLYLoader.js
│ │ │ ├── PRWMLoader.js
│ │ │ ├── PVRLoader.js
│ │ │ ├── RGBELoader.js
│ │ │ ├── RGBMLoader.js
│ │ │ ├── STLLoader.js
│ │ │ ├── SVGLoader.js
│ │ │ ├── TDSLoader.js
│ │ │ ├── TGALoader.js
│ │ │ ├── TTFLoader.js
│ │ │ ├── TiltLoader.js
│ │ │ ├── VOXLoader.js
│ │ │ ├── VRMLLoader.js
│ │ │ ├── VTKLoader.js
│ │ │ ├── XYZLoader.js
│ │ │ └── lwo
│ │ │ │ ├── IFFParser.js
│ │ │ │ ├── LWO2Parser.js
│ │ │ │ └── LWO3Parser.js
│ │ ├── math
│ │ │ ├── Capsule.js
│ │ │ ├── ColorConverter.js
│ │ │ ├── ConvexHull.js
│ │ │ ├── ImprovedNoise.js
│ │ │ ├── Lut.js
│ │ │ ├── MeshSurfaceSampler.js
│ │ │ ├── OBB.js
│ │ │ ├── Octree.js
│ │ │ └── SimplexNoise.js
│ │ ├── misc
│ │ │ ├── ConvexObjectBreaker.js
│ │ │ ├── GPUComputationRenderer.js
│ │ │ ├── Gyroscope.js
│ │ │ ├── MD2Character.js
│ │ │ ├── MD2CharacterComplex.js
│ │ │ ├── MorphAnimMesh.js
│ │ │ ├── MorphBlendMesh.js
│ │ │ ├── ProgressiveLightMap.js
│ │ │ ├── RollerCoaster.js
│ │ │ ├── TubePainter.js
│ │ │ ├── Volume.js
│ │ │ └── VolumeSlice.js
│ │ ├── modifiers
│ │ │ ├── CurveModifier.js
│ │ │ ├── EdgeSplitModifier.js
│ │ │ ├── SimplifyModifier.js
│ │ │ └── TessellateModifier.js
│ │ ├── objects
│ │ │ ├── Lensflare.js
│ │ │ ├── LightningStorm.js
│ │ │ ├── MarchingCubes.js
│ │ │ ├── Reflector.js
│ │ │ ├── ReflectorForSSRPass.js
│ │ │ ├── Refractor.js
│ │ │ ├── ShadowMesh.js
│ │ │ ├── Sky.js
│ │ │ ├── Water.js
│ │ │ └── Water2.js
│ │ ├── physics
│ │ │ ├── AmmoPhysics.js
│ │ │ └── OimoPhysics.js
│ │ ├── postprocessing
│ │ │ ├── AdaptiveToneMappingPass.js
│ │ │ ├── AfterimagePass.js
│ │ │ ├── BloomPass.js
│ │ │ ├── BokehPass.js
│ │ │ ├── ClearPass.js
│ │ │ ├── CubeTexturePass.js
│ │ │ ├── DotScreenPass.js
│ │ │ ├── EffectComposer.js
│ │ │ ├── FilmPass.js
│ │ │ ├── GlitchPass.js
│ │ │ ├── HalftonePass.js
│ │ │ ├── LUTPass.js
│ │ │ ├── MaskPass.js
│ │ │ ├── OutlinePass.js
│ │ │ ├── Pass.js
│ │ │ ├── RenderPass.js
│ │ │ ├── SAOPass.js
│ │ │ ├── SMAAPass.js
│ │ │ ├── SSAARenderPass.js
│ │ │ ├── SSAOPass.js
│ │ │ ├── SSRPass.js
│ │ │ ├── SSRrPass.js
│ │ │ ├── SavePass.js
│ │ │ ├── ShaderPass.js
│ │ │ ├── TAARenderPass.js
│ │ │ ├── TexturePass.js
│ │ │ └── UnrealBloomPass.js
│ │ ├── renderers
│ │ │ ├── CSS2DRenderer.js
│ │ │ ├── CSS3DRenderer.js
│ │ │ ├── Projector.js
│ │ │ └── SVGRenderer.js
│ │ ├── shaders
│ │ │ ├── ACESFilmicToneMappingShader.js
│ │ │ ├── AfterimageShader.js
│ │ │ ├── BasicShader.js
│ │ │ ├── BleachBypassShader.js
│ │ │ ├── BlendShader.js
│ │ │ ├── BokehShader.js
│ │ │ ├── BokehShader2.js
│ │ │ ├── BrightnessContrastShader.js
│ │ │ ├── ColorCorrectionShader.js
│ │ │ ├── ColorifyShader.js
│ │ │ ├── ConvolutionShader.js
│ │ │ ├── CopyShader.js
│ │ │ ├── DOFMipMapShader.js
│ │ │ ├── DepthLimitedBlurShader.js
│ │ │ ├── DigitalGlitch.js
│ │ │ ├── DotScreenShader.js
│ │ │ ├── FXAAShader.js
│ │ │ ├── FilmShader.js
│ │ │ ├── FocusShader.js
│ │ │ ├── FreiChenShader.js
│ │ │ ├── GammaCorrectionShader.js
│ │ │ ├── GodRaysShader.js
│ │ │ ├── HalftoneShader.js
│ │ │ ├── HorizontalBlurShader.js
│ │ │ ├── HorizontalTiltShiftShader.js
│ │ │ ├── HueSaturationShader.js
│ │ │ ├── KaleidoShader.js
│ │ │ ├── LuminosityHighPassShader.js
│ │ │ ├── LuminosityShader.js
│ │ │ ├── MMDToonShader.js
│ │ │ ├── MirrorShader.js
│ │ │ ├── NormalMapShader.js
│ │ │ ├── PixelShader.js
│ │ │ ├── RGBShiftShader.js
│ │ │ ├── SAOShader.js
│ │ │ ├── SMAAShader.js
│ │ │ ├── SSAOShader.js
│ │ │ ├── SSRShader.js
│ │ │ ├── SSRrShader.js
│ │ │ ├── SepiaShader.js
│ │ │ ├── SobelOperatorShader.js
│ │ │ ├── SubsurfaceScatteringShader.js
│ │ │ ├── TechnicolorShader.js
│ │ │ ├── ToneMapShader.js
│ │ │ ├── ToonShader.js
│ │ │ ├── TriangleBlurShader.js
│ │ │ ├── UnpackDepthRGBAShader.js
│ │ │ ├── VerticalBlurShader.js
│ │ │ ├── VerticalTiltShiftShader.js
│ │ │ ├── VignetteShader.js
│ │ │ ├── VolumeShader.js
│ │ │ └── WaterRefractionShader.js
│ │ ├── textures
│ │ │ └── FlakesTexture.js
│ │ └── utils
│ │ │ ├── BufferGeometryUtils.js
│ │ │ ├── CameraUtils.js
│ │ │ ├── GPUStatsPanel.js
│ │ │ ├── GeometryCompressionUtils.js
│ │ │ ├── GeometryUtils.js
│ │ │ ├── LDrawUtils.js
│ │ │ ├── PackedPhongMaterial.js
│ │ │ ├── SceneUtils.js
│ │ │ ├── ShadowMapViewer.js
│ │ │ ├── SkeletonUtils.js
│ │ │ ├── UVsDebug.js
│ │ │ └── WorkerPool.js
│ └── jsm
│ │ ├── animation
│ │ ├── AnimationClipCreator.js
│ │ ├── CCDIKSolver.js
│ │ ├── MMDAnimationHelper.js
│ │ └── MMDPhysics.js
│ │ ├── cameras
│ │ └── CinematicCamera.js
│ │ ├── capabilities
│ │ ├── WebGL.js
│ │ └── WebGPU.js
│ │ ├── controls
│ │ ├── ArcballControls.js
│ │ ├── DragControls.js
│ │ ├── FirstPersonControls.js
│ │ ├── FlyControls.js
│ │ ├── OrbitControls.js
│ │ ├── PointerLockControls.js
│ │ ├── TrackballControls.js
│ │ ├── TransformControls.js
│ │ └── experimental
│ │ │ └── CameraControls.js
│ │ ├── csm
│ │ ├── CSM.js
│ │ ├── CSMFrustum.js
│ │ ├── CSMHelper.js
│ │ └── CSMShader.js
│ │ ├── curves
│ │ ├── CurveExtras.js
│ │ ├── NURBSCurve.js
│ │ ├── NURBSSurface.js
│ │ └── NURBSUtils.js
│ │ ├── deprecated
│ │ └── Geometry.js
│ │ ├── effects
│ │ ├── AnaglyphEffect.js
│ │ ├── AsciiEffect.js
│ │ ├── OutlineEffect.js
│ │ ├── ParallaxBarrierEffect.js
│ │ ├── PeppersGhostEffect.js
│ │ └── StereoEffect.js
│ │ ├── environments
│ │ ├── DebugEnvironment.js
│ │ └── RoomEnvironment.js
│ │ ├── exporters
│ │ ├── ColladaExporter.js
│ │ ├── DRACOExporter.js
│ │ ├── EXRExporter.js
│ │ ├── GLTFExporter.js
│ │ ├── MMDExporter.js
│ │ ├── OBJExporter.js
│ │ ├── PLYExporter.js
│ │ ├── STLExporter.js
│ │ └── USDZExporter.js
│ │ ├── geometries
│ │ ├── BoxLineGeometry.js
│ │ ├── ConvexGeometry.js
│ │ ├── DecalGeometry.js
│ │ ├── LightningStrike.js
│ │ ├── ParametricGeometries.js
│ │ ├── ParametricGeometry.js
│ │ ├── RoundedBoxGeometry.js
│ │ ├── TeapotGeometry.js
│ │ └── TextGeometry.js
│ │ ├── helpers
│ │ ├── LightProbeHelper.js
│ │ ├── OctreeHelper.js
│ │ ├── PositionalAudioHelper.js
│ │ ├── RectAreaLightHelper.js
│ │ ├── VertexNormalsHelper.js
│ │ ├── VertexTangentsHelper.js
│ │ └── ViewHelper.js
│ │ ├── interactive
│ │ ├── HTMLMesh.js
│ │ ├── InteractiveGroup.js
│ │ ├── SelectionBox.js
│ │ └── SelectionHelper.js
│ │ ├── libs
│ │ ├── OimoPhysics
│ │ │ ├── OimoPhysics.js
│ │ │ └── index.js
│ │ ├── chevrotain.module.min.js
│ │ ├── ecsy.module.js
│ │ ├── fflate.module.js
│ │ ├── flow.module.js
│ │ ├── ktx-parse.module.js
│ │ ├── lil-gui.module.min.js
│ │ ├── meshopt_decoder.module.js
│ │ ├── mmdparser.module.js
│ │ ├── motion-controllers.module.js
│ │ ├── opentype.module.min.js
│ │ ├── potpack.module.js
│ │ ├── rhino3dm
│ │ │ ├── rhino3dm.js
│ │ │ ├── rhino3dm.module.js
│ │ │ └── rhino3dm.wasm
│ │ ├── stats.module.js
│ │ └── tween.module.min.js
│ │ ├── lights
│ │ ├── LightProbeGenerator.js
│ │ └── RectAreaLightUniformsLib.js
│ │ ├── lines
│ │ ├── Line2.js
│ │ ├── LineGeometry.js
│ │ ├── LineMaterial.js
│ │ ├── LineSegments2.js
│ │ ├── LineSegmentsGeometry.js
│ │ ├── Wireframe.js
│ │ └── WireframeGeometry2.js
│ │ ├── loaders
│ │ ├── 3DMLoader.js
│ │ ├── 3MFLoader.js
│ │ ├── AMFLoader.js
│ │ ├── BVHLoader.js
│ │ ├── BasisTextureLoader.js
│ │ ├── ColladaLoader.js
│ │ ├── DDSLoader.js
│ │ ├── DRACOLoader.js
│ │ ├── EXRLoader.js
│ │ ├── FBXLoader.js
│ │ ├── FontLoader.js
│ │ ├── GCodeLoader.js
│ │ ├── GLTFLoader.js
│ │ ├── HDRCubeTextureLoader.js
│ │ ├── IFCLoader.js
│ │ ├── KMZLoader.js
│ │ ├── KTX2Loader.js
│ │ ├── KTXLoader.js
│ │ ├── LDrawLoader.js
│ │ ├── LUT3dlLoader.js
│ │ ├── LUTCubeLoader.js
│ │ ├── LWOLoader.js
│ │ ├── LogLuvLoader.js
│ │ ├── LottieLoader.js
│ │ ├── MD2Loader.js
│ │ ├── MDDLoader.js
│ │ ├── MMDLoader.js
│ │ ├── MTLLoader.js
│ │ ├── NRRDLoader.js
│ │ ├── OBJLoader.js
│ │ ├── PCDLoader.js
│ │ ├── PDBLoader.js
│ │ ├── PLYLoader.js
│ │ ├── PRWMLoader.js
│ │ ├── PVRLoader.js
│ │ ├── RGBELoader.js
│ │ ├── RGBMLoader.js
│ │ ├── STLLoader.js
│ │ ├── SVGLoader.js
│ │ ├── TDSLoader.js
│ │ ├── TGALoader.js
│ │ ├── TTFLoader.js
│ │ ├── TiltLoader.js
│ │ ├── VOXLoader.js
│ │ ├── VRMLLoader.js
│ │ ├── VTKLoader.js
│ │ ├── XYZLoader.js
│ │ ├── ifc
│ │ │ ├── web-ifc-api.js
│ │ │ └── web-ifc.wasm
│ │ └── lwo
│ │ │ ├── IFFParser.js
│ │ │ ├── LWO2Parser.js
│ │ │ └── LWO3Parser.js
│ │ ├── math
│ │ ├── Capsule.js
│ │ ├── ColorConverter.js
│ │ ├── ConvexHull.js
│ │ ├── ImprovedNoise.js
│ │ ├── Lut.js
│ │ ├── MeshSurfaceSampler.js
│ │ ├── OBB.js
│ │ ├── Octree.js
│ │ └── SimplexNoise.js
│ │ ├── misc
│ │ ├── ConvexObjectBreaker.js
│ │ ├── GPUComputationRenderer.js
│ │ ├── Gyroscope.js
│ │ ├── MD2Character.js
│ │ ├── MD2CharacterComplex.js
│ │ ├── MorphAnimMesh.js
│ │ ├── MorphBlendMesh.js
│ │ ├── ProgressiveLightMap.js
│ │ ├── RollerCoaster.js
│ │ ├── TubePainter.js
│ │ ├── Volume.js
│ │ └── VolumeSlice.js
│ │ ├── modifiers
│ │ ├── CurveModifier.js
│ │ ├── EdgeSplitModifier.js
│ │ ├── SimplifyModifier.js
│ │ └── TessellateModifier.js
│ │ ├── node-editor
│ │ ├── NodeEditor.js
│ │ ├── accessors
│ │ │ ├── NormalEditor.js
│ │ │ ├── PositionEditor.js
│ │ │ └── UVEditor.js
│ │ ├── core
│ │ │ ├── BaseNode.js
│ │ │ └── FileEditor.js
│ │ ├── display
│ │ │ ├── BlendEditor.js
│ │ │ └── NormalMapEditor.js
│ │ ├── examples
│ │ │ ├── animate-uv.json
│ │ │ ├── fake-top-light.json
│ │ │ ├── oscillator-color.json
│ │ │ └── rim.json
│ │ ├── inputs
│ │ │ ├── ColorEditor.js
│ │ │ ├── FloatEditor.js
│ │ │ ├── SliderEditor.js
│ │ │ ├── TextureEditor.js
│ │ │ ├── Vector2Editor.js
│ │ │ ├── Vector3Editor.js
│ │ │ └── Vector4Editor.js
│ │ ├── materials
│ │ │ ├── BasicMaterialEditor.js
│ │ │ ├── PointsMaterialEditor.js
│ │ │ └── StandardMaterialEditor.js
│ │ ├── math
│ │ │ ├── AngleEditor.js
│ │ │ ├── DotEditor.js
│ │ │ ├── InvertEditor.js
│ │ │ ├── LimiterEditor.js
│ │ │ ├── NormalizeEditor.js
│ │ │ ├── OperatorEditor.js
│ │ │ ├── PowerEditor.js
│ │ │ └── TrigonometryEditor.js
│ │ ├── procedural
│ │ │ └── CheckerEditor.js
│ │ ├── scene
│ │ │ ├── MeshEditor.js
│ │ │ ├── Object3DEditor.js
│ │ │ └── PointsEditor.js
│ │ └── utils
│ │ │ ├── JoinEditor.js
│ │ │ ├── OscillatorEditor.js
│ │ │ ├── PreviewEditor.js
│ │ │ ├── SplitEditor.js
│ │ │ └── TimerEditor.js
│ │ ├── nodes
│ │ ├── Nodes.js
│ │ ├── ShaderNode.js
│ │ ├── accessors
│ │ │ ├── CameraNode.js
│ │ │ ├── MaterialNode.js
│ │ │ ├── MaterialReferenceNode.js
│ │ │ ├── ModelNode.js
│ │ │ ├── ModelViewProjectionNode.js
│ │ │ ├── NormalNode.js
│ │ │ ├── Object3DNode.js
│ │ │ ├── PointUVNode.js
│ │ │ ├── PositionNode.js
│ │ │ ├── ReferenceNode.js
│ │ │ ├── SkinningNode.js
│ │ │ └── UVNode.js
│ │ ├── core
│ │ │ ├── ArrayInputNode.js
│ │ │ ├── AttributeNode.js
│ │ │ ├── BypassNode.js
│ │ │ ├── CodeNode.js
│ │ │ ├── ContextNode.js
│ │ │ ├── ExpressionNode.js
│ │ │ ├── FunctionCallNode.js
│ │ │ ├── FunctionNode.js
│ │ │ ├── InputNode.js
│ │ │ ├── Node.js
│ │ │ ├── NodeAttribute.js
│ │ │ ├── NodeBuilder.js
│ │ │ ├── NodeCode.js
│ │ │ ├── NodeFrame.js
│ │ │ ├── NodeFunction.js
│ │ │ ├── NodeFunctionInput.js
│ │ │ ├── NodeKeywords.js
│ │ │ ├── NodeParser.js
│ │ │ ├── NodeUniform.js
│ │ │ ├── NodeUtils.js
│ │ │ ├── NodeVar.js
│ │ │ ├── NodeVary.js
│ │ │ ├── PropertyNode.js
│ │ │ ├── TempNode.js
│ │ │ ├── VarNode.js
│ │ │ ├── VaryNode.js
│ │ │ └── constants.js
│ │ ├── display
│ │ │ ├── ColorSpaceNode.js
│ │ │ └── NormalMapNode.js
│ │ ├── functions
│ │ │ ├── BSDFs.js
│ │ │ └── PhysicalMaterialFunctions.js
│ │ ├── inputs
│ │ │ ├── BufferNode.js
│ │ │ ├── ColorNode.js
│ │ │ ├── FloatNode.js
│ │ │ ├── IntNode.js
│ │ │ ├── Matrix3Node.js
│ │ │ ├── Matrix4Node.js
│ │ │ ├── TextureNode.js
│ │ │ ├── Vector2Node.js
│ │ │ ├── Vector3Node.js
│ │ │ └── Vector4Node.js
│ │ ├── lights
│ │ │ ├── LightContextNode.js
│ │ │ ├── LightNode.js
│ │ │ └── LightsNode.js
│ │ ├── loaders
│ │ │ ├── NodeLoader.js
│ │ │ ├── NodeMaterialLoader.js
│ │ │ └── NodeObjectLoader.js
│ │ ├── materials
│ │ │ ├── LineBasicNodeMaterial.js
│ │ │ ├── Materials.js
│ │ │ ├── MeshBasicNodeMaterial.js
│ │ │ ├── MeshStandardNodeMaterial.js
│ │ │ ├── NodeMaterial.js
│ │ │ └── PointsNodeMaterial.js
│ │ ├── math
│ │ │ ├── CondNode.js
│ │ │ ├── MathNode.js
│ │ │ └── OperatorNode.js
│ │ ├── parsers
│ │ │ ├── GLSLNodeFunction.js
│ │ │ ├── GLSLNodeParser.js
│ │ │ ├── WGSLNodeFunction.js
│ │ │ └── WGSLNodeParser.js
│ │ ├── procedural
│ │ │ └── CheckerNode.js
│ │ └── utils
│ │ │ ├── ArrayElementNode.js
│ │ │ ├── ConvertNode.js
│ │ │ ├── JoinNode.js
│ │ │ ├── OscNode.js
│ │ │ ├── SplitNode.js
│ │ │ ├── SpriteSheetUVNode.js
│ │ │ └── TimerNode.js
│ │ ├── objects
│ │ ├── Lensflare.js
│ │ ├── LightningStorm.js
│ │ ├── MarchingCubes.js
│ │ ├── Reflector.js
│ │ ├── ReflectorForSSRPass.js
│ │ ├── Refractor.js
│ │ ├── ShadowMesh.js
│ │ ├── Sky.js
│ │ ├── Water.js
│ │ └── Water2.js
│ │ ├── offscreen
│ │ ├── jank.js
│ │ ├── offscreen.js
│ │ └── scene.js
│ │ ├── package.json
│ │ ├── physics
│ │ ├── AmmoPhysics.js
│ │ └── OimoPhysics.js
│ │ ├── postprocessing
│ │ ├── AdaptiveToneMappingPass.js
│ │ ├── AfterimagePass.js
│ │ ├── BloomPass.js
│ │ ├── BokehPass.js
│ │ ├── ClearPass.js
│ │ ├── CubeTexturePass.js
│ │ ├── DotScreenPass.js
│ │ ├── EffectComposer.js
│ │ ├── FilmPass.js
│ │ ├── GlitchPass.js
│ │ ├── HalftonePass.js
│ │ ├── LUTPass.js
│ │ ├── MaskPass.js
│ │ ├── OutlinePass.js
│ │ ├── Pass.js
│ │ ├── RenderPass.js
│ │ ├── SAOPass.js
│ │ ├── SMAAPass.js
│ │ ├── SSAARenderPass.js
│ │ ├── SSAOPass.js
│ │ ├── SSRPass.js
│ │ ├── SSRrPass.js
│ │ ├── SavePass.js
│ │ ├── ShaderPass.js
│ │ ├── TAARenderPass.js
│ │ ├── TexturePass.js
│ │ └── UnrealBloomPass.js
│ │ ├── renderers
│ │ ├── CSS2DRenderer.js
│ │ ├── CSS3DRenderer.js
│ │ ├── Projector.js
│ │ ├── SVGRenderer.js
│ │ ├── webgl
│ │ │ └── nodes
│ │ │ │ ├── SlotNode.js
│ │ │ │ ├── WebGLNodeBuilder.js
│ │ │ │ ├── WebGLNodes.js
│ │ │ │ └── WebGLPhysicalContextNode.js
│ │ └── webgpu
│ │ │ ├── WebGPUAttributes.js
│ │ │ ├── WebGPUBackground.js
│ │ │ ├── WebGPUBinding.js
│ │ │ ├── WebGPUBindings.js
│ │ │ ├── WebGPUBufferUtils.js
│ │ │ ├── WebGPUComputePipelines.js
│ │ │ ├── WebGPUGeometries.js
│ │ │ ├── WebGPUInfo.js
│ │ │ ├── WebGPUObjects.js
│ │ │ ├── WebGPUProgrammableStage.js
│ │ │ ├── WebGPUProperties.js
│ │ │ ├── WebGPURenderLists.js
│ │ │ ├── WebGPURenderPipeline.js
│ │ │ ├── WebGPURenderPipelines.js
│ │ │ ├── WebGPURenderer.js
│ │ │ ├── WebGPUSampledTexture.js
│ │ │ ├── WebGPUSampler.js
│ │ │ ├── WebGPUStorageBuffer.js
│ │ │ ├── WebGPUTextureRenderer.js
│ │ │ ├── WebGPUTextureUtils.js
│ │ │ ├── WebGPUTextures.js
│ │ │ ├── WebGPUUniform.js
│ │ │ ├── WebGPUUniformBuffer.js
│ │ │ ├── WebGPUUniformsGroup.js
│ │ │ ├── constants.js
│ │ │ └── nodes
│ │ │ ├── WebGPUNodeBuilder.js
│ │ │ ├── WebGPUNodeSampledTexture.js
│ │ │ ├── WebGPUNodeSampler.js
│ │ │ ├── WebGPUNodeUniform.js
│ │ │ ├── WebGPUNodeUniformsGroup.js
│ │ │ └── WebGPUNodes.js
│ │ ├── shaders
│ │ ├── ACESFilmicToneMappingShader.js
│ │ ├── AfterimageShader.js
│ │ ├── BasicShader.js
│ │ ├── BleachBypassShader.js
│ │ ├── BlendShader.js
│ │ ├── BokehShader.js
│ │ ├── BokehShader2.js
│ │ ├── BrightnessContrastShader.js
│ │ ├── ColorCorrectionShader.js
│ │ ├── ColorifyShader.js
│ │ ├── ConvolutionShader.js
│ │ ├── CopyShader.js
│ │ ├── DOFMipMapShader.js
│ │ ├── DepthLimitedBlurShader.js
│ │ ├── DigitalGlitch.js
│ │ ├── DotScreenShader.js
│ │ ├── FXAAShader.js
│ │ ├── FilmShader.js
│ │ ├── FocusShader.js
│ │ ├── FreiChenShader.js
│ │ ├── GammaCorrectionShader.js
│ │ ├── GodRaysShader.js
│ │ ├── HalftoneShader.js
│ │ ├── HorizontalBlurShader.js
│ │ ├── HorizontalTiltShiftShader.js
│ │ ├── HueSaturationShader.js
│ │ ├── KaleidoShader.js
│ │ ├── LuminosityHighPassShader.js
│ │ ├── LuminosityShader.js
│ │ ├── MMDToonShader.js
│ │ ├── MirrorShader.js
│ │ ├── NormalMapShader.js
│ │ ├── PixelShader.js
│ │ ├── RGBShiftShader.js
│ │ ├── SAOShader.js
│ │ ├── SMAAShader.js
│ │ ├── SSAOShader.js
│ │ ├── SSRShader.js
│ │ ├── SSRrShader.js
│ │ ├── SepiaShader.js
│ │ ├── SobelOperatorShader.js
│ │ ├── SubsurfaceScatteringShader.js
│ │ ├── TechnicolorShader.js
│ │ ├── ToneMapShader.js
│ │ ├── ToonShader.js
│ │ ├── TriangleBlurShader.js
│ │ ├── UnpackDepthRGBAShader.js
│ │ ├── VerticalBlurShader.js
│ │ ├── VerticalTiltShiftShader.js
│ │ ├── VignetteShader.js
│ │ ├── VolumeShader.js
│ │ └── WaterRefractionShader.js
│ │ ├── textures
│ │ └── FlakesTexture.js
│ │ ├── utils
│ │ ├── BufferGeometryUtils.js
│ │ ├── CameraUtils.js
│ │ ├── GPUStatsPanel.js
│ │ ├── GeometryCompressionUtils.js
│ │ ├── GeometryUtils.js
│ │ ├── LDrawUtils.js
│ │ ├── PackedPhongMaterial.js
│ │ ├── SceneUtils.js
│ │ ├── ShadowMapViewer.js
│ │ ├── SkeletonUtils.js
│ │ ├── UVsDebug.js
│ │ └── WorkerPool.js
│ │ └── webxr
│ │ ├── ARButton.js
│ │ ├── OculusHandModel.js
│ │ ├── OculusHandPointerModel.js
│ │ ├── Text2D.js
│ │ ├── VRButton.js
│ │ ├── XRControllerModelFactory.js
│ │ ├── XREstimatedLight.js
│ │ ├── XRHandMeshModel.js
│ │ ├── XRHandModelFactory.js
│ │ └── XRHandPrimitiveModel.js
│ ├── package.json
│ └── src
│ ├── Three.Legacy.js
│ ├── Three.js
│ ├── animation
│ ├── AnimationAction.js
│ ├── AnimationClip.js
│ ├── AnimationMixer.js
│ ├── AnimationObjectGroup.js
│ ├── AnimationUtils.js
│ ├── KeyframeTrack.js
│ ├── PropertyBinding.js
│ ├── PropertyMixer.js
│ └── tracks
│ │ ├── BooleanKeyframeTrack.js
│ │ ├── ColorKeyframeTrack.js
│ │ ├── NumberKeyframeTrack.js
│ │ ├── QuaternionKeyframeTrack.js
│ │ ├── StringKeyframeTrack.js
│ │ └── VectorKeyframeTrack.js
│ ├── audio
│ ├── Audio.js
│ ├── AudioAnalyser.js
│ ├── AudioContext.js
│ ├── AudioListener.js
│ └── PositionalAudio.js
│ ├── cameras
│ ├── ArrayCamera.js
│ ├── Camera.js
│ ├── CubeCamera.js
│ ├── OrthographicCamera.js
│ ├── PerspectiveCamera.js
│ └── StereoCamera.js
│ ├── constants.js
│ ├── core
│ ├── BufferAttribute.js
│ ├── BufferGeometry.js
│ ├── Clock.js
│ ├── EventDispatcher.js
│ ├── GLBufferAttribute.js
│ ├── InstancedBufferAttribute.js
│ ├── InstancedBufferGeometry.js
│ ├── InstancedInterleavedBuffer.js
│ ├── InterleavedBuffer.js
│ ├── InterleavedBufferAttribute.js
│ ├── Layers.js
│ ├── Object3D.js
│ ├── Raycaster.js
│ └── Uniform.js
│ ├── extras
│ ├── DataUtils.js
│ ├── Earcut.js
│ ├── ImageUtils.js
│ ├── PMREMGenerator.js
│ ├── ShapeUtils.js
│ ├── core
│ │ ├── Curve.js
│ │ ├── CurvePath.js
│ │ ├── Interpolations.js
│ │ ├── Path.js
│ │ ├── Shape.js
│ │ └── ShapePath.js
│ └── curves
│ │ ├── ArcCurve.js
│ │ ├── CatmullRomCurve3.js
│ │ ├── CubicBezierCurve.js
│ │ ├── CubicBezierCurve3.js
│ │ ├── Curves.js
│ │ ├── EllipseCurve.js
│ │ ├── LineCurve.js
│ │ ├── LineCurve3.js
│ │ ├── QuadraticBezierCurve.js
│ │ ├── QuadraticBezierCurve3.js
│ │ └── SplineCurve.js
│ ├── geometries
│ ├── BoxGeometry.js
│ ├── CircleGeometry.js
│ ├── ConeGeometry.js
│ ├── CylinderGeometry.js
│ ├── DodecahedronGeometry.js
│ ├── EdgesGeometry.js
│ ├── ExtrudeGeometry.js
│ ├── Geometries.js
│ ├── IcosahedronGeometry.js
│ ├── LatheGeometry.js
│ ├── OctahedronGeometry.js
│ ├── PlaneGeometry.js
│ ├── PolyhedronGeometry.js
│ ├── RingGeometry.js
│ ├── ShapeGeometry.js
│ ├── SphereGeometry.js
│ ├── TetrahedronGeometry.js
│ ├── TorusGeometry.js
│ ├── TorusKnotGeometry.js
│ ├── TubeGeometry.js
│ └── WireframeGeometry.js
│ ├── helpers
│ ├── ArrowHelper.js
│ ├── AxesHelper.js
│ ├── Box3Helper.js
│ ├── BoxHelper.js
│ ├── CameraHelper.js
│ ├── DirectionalLightHelper.js
│ ├── GridHelper.js
│ ├── HemisphereLightHelper.js
│ ├── PlaneHelper.js
│ ├── PointLightHelper.js
│ ├── PolarGridHelper.js
│ ├── SkeletonHelper.js
│ └── SpotLightHelper.js
│ ├── lights
│ ├── AmbientLight.js
│ ├── AmbientLightProbe.js
│ ├── DirectionalLight.js
│ ├── DirectionalLightShadow.js
│ ├── HemisphereLight.js
│ ├── HemisphereLightProbe.js
│ ├── Light.js
│ ├── LightProbe.js
│ ├── LightShadow.js
│ ├── PointLight.js
│ ├── PointLightShadow.js
│ ├── RectAreaLight.js
│ ├── SpotLight.js
│ └── SpotLightShadow.js
│ ├── loaders
│ ├── AnimationLoader.js
│ ├── AudioLoader.js
│ ├── BufferGeometryLoader.js
│ ├── Cache.js
│ ├── CompressedTextureLoader.js
│ ├── CubeTextureLoader.js
│ ├── DataTextureLoader.js
│ ├── FileLoader.js
│ ├── ImageBitmapLoader.js
│ ├── ImageLoader.js
│ ├── Loader.js
│ ├── LoaderUtils.js
│ ├── LoadingManager.js
│ ├── MaterialLoader.js
│ ├── ObjectLoader.js
│ └── TextureLoader.js
│ ├── materials
│ ├── LineBasicMaterial.js
│ ├── LineDashedMaterial.js
│ ├── Material.js
│ ├── Materials.js
│ ├── MeshBasicMaterial.js
│ ├── MeshDepthMaterial.js
│ ├── MeshDistanceMaterial.js
│ ├── MeshLambertMaterial.js
│ ├── MeshMatcapMaterial.js
│ ├── MeshNormalMaterial.js
│ ├── MeshPhongMaterial.js
│ ├── MeshPhysicalMaterial.js
│ ├── MeshStandardMaterial.js
│ ├── MeshToonMaterial.js
│ ├── PointsMaterial.js
│ ├── RawShaderMaterial.js
│ ├── ShaderMaterial.js
│ ├── ShadowMaterial.js
│ └── SpriteMaterial.js
│ ├── math
│ ├── Box2.js
│ ├── Box3.js
│ ├── Color.js
│ ├── Cylindrical.js
│ ├── Euler.js
│ ├── Frustum.js
│ ├── Interpolant.js
│ ├── Line3.js
│ ├── MathUtils.js
│ ├── Matrix3.js
│ ├── Matrix4.js
│ ├── Plane.js
│ ├── Quaternion.js
│ ├── Ray.js
│ ├── Sphere.js
│ ├── Spherical.js
│ ├── SphericalHarmonics3.js
│ ├── Triangle.js
│ ├── Vector2.js
│ ├── Vector3.js
│ ├── Vector4.js
│ └── interpolants
│ │ ├── CubicInterpolant.js
│ │ ├── DiscreteInterpolant.js
│ │ ├── LinearInterpolant.js
│ │ └── QuaternionLinearInterpolant.js
│ ├── objects
│ ├── Bone.js
│ ├── Group.js
│ ├── InstancedMesh.js
│ ├── LOD.js
│ ├── Line.js
│ ├── LineLoop.js
│ ├── LineSegments.js
│ ├── Mesh.js
│ ├── Points.js
│ ├── Skeleton.js
│ ├── SkinnedMesh.js
│ └── Sprite.js
│ ├── renderers
│ ├── WebGL1Renderer.js
│ ├── WebGL3DRenderTarget.js
│ ├── WebGLArrayRenderTarget.js
│ ├── WebGLCubeRenderTarget.js
│ ├── WebGLMultipleRenderTargets.js
│ ├── WebGLRenderTarget.js
│ ├── WebGLRenderer.js
│ ├── shaders
│ │ ├── ShaderChunk.js
│ │ ├── ShaderChunk
│ │ │ ├── alphamap_fragment.glsl.js
│ │ │ ├── alphamap_pars_fragment.glsl.js
│ │ │ ├── alphatest_fragment.glsl.js
│ │ │ ├── alphatest_pars_fragment.glsl.js
│ │ │ ├── aomap_fragment.glsl.js
│ │ │ ├── aomap_pars_fragment.glsl.js
│ │ │ ├── begin_vertex.glsl.js
│ │ │ ├── beginnormal_vertex.glsl.js
│ │ │ ├── bsdfs.glsl.js
│ │ │ ├── bumpmap_pars_fragment.glsl.js
│ │ │ ├── clearcoat_normal_fragment_begin.glsl.js
│ │ │ ├── clearcoat_normal_fragment_maps.glsl.js
│ │ │ ├── clearcoat_pars_fragment.glsl.js
│ │ │ ├── clipping_planes_fragment.glsl.js
│ │ │ ├── clipping_planes_pars_fragment.glsl.js
│ │ │ ├── clipping_planes_pars_vertex.glsl.js
│ │ │ ├── clipping_planes_vertex.glsl.js
│ │ │ ├── color_fragment.glsl.js
│ │ │ ├── color_pars_fragment.glsl.js
│ │ │ ├── color_pars_vertex.glsl.js
│ │ │ ├── color_vertex.glsl.js
│ │ │ ├── common.glsl.js
│ │ │ ├── cube_uv_reflection_fragment.glsl.js
│ │ │ ├── default_fragment.glsl.js
│ │ │ ├── default_vertex.glsl.js
│ │ │ ├── defaultnormal_vertex.glsl.js
│ │ │ ├── displacementmap_pars_vertex.glsl.js
│ │ │ ├── displacementmap_vertex.glsl.js
│ │ │ ├── dithering_fragment.glsl.js
│ │ │ ├── dithering_pars_fragment.glsl.js
│ │ │ ├── emissivemap_fragment.glsl.js
│ │ │ ├── emissivemap_pars_fragment.glsl.js
│ │ │ ├── encodings_fragment.glsl.js
│ │ │ ├── encodings_pars_fragment.glsl.js
│ │ │ ├── envmap_common_pars_fragment.glsl.js
│ │ │ ├── envmap_fragment.glsl.js
│ │ │ ├── envmap_pars_fragment.glsl.js
│ │ │ ├── envmap_pars_vertex.glsl.js
│ │ │ ├── envmap_physical_pars_fragment.glsl.js
│ │ │ ├── envmap_vertex.glsl.js
│ │ │ ├── fog_fragment.glsl.js
│ │ │ ├── fog_pars_fragment.glsl.js
│ │ │ ├── fog_pars_vertex.glsl.js
│ │ │ ├── fog_vertex.glsl.js
│ │ │ ├── gradientmap_pars_fragment.glsl.js
│ │ │ ├── lightmap_fragment.glsl.js
│ │ │ ├── lightmap_pars_fragment.glsl.js
│ │ │ ├── lights_fragment_begin.glsl.js
│ │ │ ├── lights_fragment_end.glsl.js
│ │ │ ├── lights_fragment_maps.glsl.js
│ │ │ ├── lights_lambert_vertex.glsl.js
│ │ │ ├── lights_pars_begin.glsl.js
│ │ │ ├── lights_phong_fragment.glsl.js
│ │ │ ├── lights_phong_pars_fragment.glsl.js
│ │ │ ├── lights_physical_fragment.glsl.js
│ │ │ ├── lights_physical_pars_fragment.glsl.js
│ │ │ ├── lights_toon_fragment.glsl.js
│ │ │ ├── lights_toon_pars_fragment.glsl.js
│ │ │ ├── logdepthbuf_fragment.glsl.js
│ │ │ ├── logdepthbuf_pars_fragment.glsl.js
│ │ │ ├── logdepthbuf_pars_vertex.glsl.js
│ │ │ ├── logdepthbuf_vertex.glsl.js
│ │ │ ├── map_fragment.glsl.js
│ │ │ ├── map_pars_fragment.glsl.js
│ │ │ ├── map_particle_fragment.glsl.js
│ │ │ ├── map_particle_pars_fragment.glsl.js
│ │ │ ├── metalnessmap_fragment.glsl.js
│ │ │ ├── metalnessmap_pars_fragment.glsl.js
│ │ │ ├── morphcolor_vertex.glsl.js
│ │ │ ├── morphnormal_vertex.glsl.js
│ │ │ ├── morphtarget_pars_vertex.glsl.js
│ │ │ ├── morphtarget_vertex.glsl.js
│ │ │ ├── normal_fragment_begin.glsl.js
│ │ │ ├── normal_fragment_maps.glsl.js
│ │ │ ├── normal_pars_fragment.glsl.js
│ │ │ ├── normal_pars_vertex.glsl.js
│ │ │ ├── normal_vertex.glsl.js
│ │ │ ├── normalmap_pars_fragment.glsl.js
│ │ │ ├── output_fragment.glsl.js
│ │ │ ├── packing.glsl.js
│ │ │ ├── premultiplied_alpha_fragment.glsl.js
│ │ │ ├── project_vertex.glsl.js
│ │ │ ├── roughnessmap_fragment.glsl.js
│ │ │ ├── roughnessmap_pars_fragment.glsl.js
│ │ │ ├── shadowmap_pars_fragment.glsl.js
│ │ │ ├── shadowmap_pars_vertex.glsl.js
│ │ │ ├── shadowmap_vertex.glsl.js
│ │ │ ├── shadowmask_pars_fragment.glsl.js
│ │ │ ├── skinbase_vertex.glsl.js
│ │ │ ├── skinning_pars_vertex.glsl.js
│ │ │ ├── skinning_vertex.glsl.js
│ │ │ ├── skinnormal_vertex.glsl.js
│ │ │ ├── specularmap_fragment.glsl.js
│ │ │ ├── specularmap_pars_fragment.glsl.js
│ │ │ ├── tonemapping_fragment.glsl.js
│ │ │ ├── tonemapping_pars_fragment.glsl.js
│ │ │ ├── transmission_fragment.glsl.js
│ │ │ ├── transmission_pars_fragment.glsl.js
│ │ │ ├── uv2_pars_fragment.glsl.js
│ │ │ ├── uv2_pars_vertex.glsl.js
│ │ │ ├── uv2_vertex.glsl.js
│ │ │ ├── uv_pars_fragment.glsl.js
│ │ │ ├── uv_pars_vertex.glsl.js
│ │ │ ├── uv_vertex.glsl.js
│ │ │ └── worldpos_vertex.glsl.js
│ │ ├── ShaderLib.js
│ │ ├── ShaderLib
│ │ │ ├── background.glsl.js
│ │ │ ├── cube.glsl.js
│ │ │ ├── depth.glsl.js
│ │ │ ├── distanceRGBA.glsl.js
│ │ │ ├── equirect.glsl.js
│ │ │ ├── linedashed.glsl.js
│ │ │ ├── meshbasic.glsl.js
│ │ │ ├── meshlambert.glsl.js
│ │ │ ├── meshmatcap.glsl.js
│ │ │ ├── meshnormal.glsl.js
│ │ │ ├── meshphong.glsl.js
│ │ │ ├── meshphysical.glsl.js
│ │ │ ├── meshtoon.glsl.js
│ │ │ ├── points.glsl.js
│ │ │ ├── shadow.glsl.js
│ │ │ ├── sprite.glsl.js
│ │ │ └── vsm.glsl.js
│ │ ├── UniformsLib.js
│ │ └── UniformsUtils.js
│ ├── webgl
│ │ ├── WebGLAnimation.js
│ │ ├── WebGLAttributes.js
│ │ ├── WebGLBackground.js
│ │ ├── WebGLBindingStates.js
│ │ ├── WebGLBufferRenderer.js
│ │ ├── WebGLCapabilities.js
│ │ ├── WebGLClipping.js
│ │ ├── WebGLCubeMaps.js
│ │ ├── WebGLCubeUVMaps.js
│ │ ├── WebGLExtensions.js
│ │ ├── WebGLGeometries.js
│ │ ├── WebGLIndexedBufferRenderer.js
│ │ ├── WebGLInfo.js
│ │ ├── WebGLLights.js
│ │ ├── WebGLMaterials.js
│ │ ├── WebGLMorphtargets.js
│ │ ├── WebGLObjects.js
│ │ ├── WebGLProgram.js
│ │ ├── WebGLPrograms.js
│ │ ├── WebGLProperties.js
│ │ ├── WebGLRenderLists.js
│ │ ├── WebGLRenderStates.js
│ │ ├── WebGLShader.js
│ │ ├── WebGLShaderCache.js
│ │ ├── WebGLShadowMap.js
│ │ ├── WebGLState.js
│ │ ├── WebGLTextures.js
│ │ ├── WebGLUniforms.js
│ │ └── WebGLUtils.js
│ └── webxr
│ │ ├── WebXRController.js
│ │ └── WebXRManager.js
│ ├── scenes
│ ├── Fog.js
│ ├── FogExp2.js
│ └── Scene.js
│ ├── textures
│ ├── CanvasTexture.js
│ ├── CompressedTexture.js
│ ├── CubeTexture.js
│ ├── Data3DTexture.js
│ ├── DataArrayTexture.js
│ ├── DataTexture.js
│ ├── DepthTexture.js
│ ├── FramebufferTexture.js
│ ├── Source.js
│ ├── Texture.js
│ └── VideoTexture.js
│ └── utils.js
├── package-lock.json
├── package.json
└── style.css
/CNAME:
--------------------------------------------------------------------------------
1 | cuter.computer
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cuter.computer
2 |
3 | a VERY GOOD website
4 |
--------------------------------------------------------------------------------
/images/bg-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/bg-1.png
--------------------------------------------------------------------------------
/images/comp-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/comp-1.png
--------------------------------------------------------------------------------
/images/desk-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/desk-1.png
--------------------------------------------------------------------------------
/images/keeb-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/keeb-1.png
--------------------------------------------------------------------------------
/images/mat-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/mat-1.png
--------------------------------------------------------------------------------
/images/mouse-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/mouse-1.png
--------------------------------------------------------------------------------
/images/wall-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/images/wall-1.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | cuter.computer
5 | cuter computers for all
6 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/node_modules/three/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright © 2010-2022 three.js authors
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/README.md:
--------------------------------------------------------------------------------
1 | ## MgOpen typefaces
2 |
3 | # Source and License
4 |
5 | https://web.archive.org/web/20050528114140/https://ellak.gr/fonts/mgopen/index.en
6 |
7 | # Usage
8 |
9 | Use Facetype.js to generate typeface.json fonts: https://gero3.github.io/facetype.js/
10 |
11 | Collection of Google fonts as typeface data for usage with three.js: https://github.com/components-ai/typefaces
12 |
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/droid/README.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2008 The Android Open Source Project
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
15 | ##########
16 |
17 | This directory contains the fonts for the platform. They are licensed
18 | under the Apache 2 license.
19 |
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/open-sans/open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff2
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/open-sans/open-sans.css:
--------------------------------------------------------------------------------
1 | /* open-sans-regular - cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese */
2 | @font-face {
3 | font-family: 'Open Sans';
4 | font-style: normal;
5 | font-weight: 400;
6 | src: local('Open Sans Regular'), local('OpenSans-Regular'),
7 | url('./open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
8 | url('./open-sans-v15-cyrillic-ext_greek_greek-ext_cyrillic_latin_latin-ext_vietnamese-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
9 | }
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.eot
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.ttf
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.woff
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/tabler-icons/fonts/tabler-icons.woff2
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/ttf/README.md:
--------------------------------------------------------------------------------
1 | # Kenney Fonts
2 |
3 | ## Source
4 |
5 | https://www.kenney.nl/assets/kenney-fonts
6 |
7 | ## License
8 |
9 | CC0 1.0 Universal (CC0 1.0) Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/)
10 |
--------------------------------------------------------------------------------
/node_modules/three/examples/fonts/ttf/kenpixel.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/fonts/ttf/kenpixel.ttf
--------------------------------------------------------------------------------
/node_modules/three/examples/js/libs/ammo.wasm.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/js/libs/ammo.wasm.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/js/libs/basis/basis_transcoder.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/js/libs/basis/basis_transcoder.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/js/libs/draco/draco_decoder.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/js/libs/draco/draco_decoder.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/js/libs/draco/gltf/draco_decoder.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/js/libs/draco/gltf/draco_decoder.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/js/lines/Line2.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | class Line2 extends THREE.LineSegments2 {
4 |
5 | constructor( geometry = new THREE.LineGeometry(), material = new THREE.LineMaterial( {
6 | color: Math.random() * 0xffffff
7 | } ) ) {
8 |
9 | super( geometry, material );
10 | this.type = 'Line2';
11 |
12 | }
13 |
14 | }
15 |
16 | Line2.prototype.isLine2 = true;
17 |
18 | THREE.Line2 = Line2;
19 |
20 | } )();
21 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/lines/WireframeGeometry2.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | class WireframeGeometry2 extends THREE.LineSegmentsGeometry {
4 |
5 | constructor( geometry ) {
6 |
7 | super();
8 | this.type = 'WireframeGeometry2';
9 | this.fromWireframeGeometry( new THREE.WireframeGeometry( geometry ) ); // set colors, maybe
10 |
11 | }
12 |
13 | }
14 |
15 | WireframeGeometry2.prototype.isWireframeGeometry2 = true;
16 |
17 | THREE.WireframeGeometry2 = WireframeGeometry2;
18 |
19 | } )();
20 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/postprocessing/ClearPass.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | class ClearPass extends THREE.Pass {
4 |
5 | constructor( clearColor, clearAlpha ) {
6 |
7 | super();
8 | this.needsSwap = false;
9 | this.clearColor = clearColor !== undefined ? clearColor : 0x000000;
10 | this.clearAlpha = clearAlpha !== undefined ? clearAlpha : 0;
11 | this._oldClearColor = new THREE.Color();
12 |
13 | }
14 |
15 | render( renderer, writeBuffer, readBuffer
16 | /*, deltaTime, maskActive */
17 | ) {
18 |
19 | let oldClearAlpha;
20 |
21 | if ( this.clearColor ) {
22 |
23 | renderer.getClearColor( this._oldClearColor );
24 | oldClearAlpha = renderer.getClearAlpha();
25 | renderer.setClearColor( this.clearColor, this.clearAlpha );
26 |
27 | }
28 |
29 | renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
30 | renderer.clear();
31 |
32 | if ( this.clearColor ) {
33 |
34 | renderer.setClearColor( this._oldClearColor, oldClearAlpha );
35 |
36 | }
37 |
38 | }
39 |
40 | }
41 |
42 | THREE.ClearPass = ClearPass;
43 |
44 | } )();
45 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/BasicShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Simple test shader
5 | */
6 | const BasicShader = {
7 | uniforms: {},
8 | vertexShader:
9 | /* glsl */
10 | `
11 |
12 | void main() {
13 |
14 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
15 |
16 | }`,
17 | fragmentShader:
18 | /* glsl */
19 | `
20 |
21 | void main() {
22 |
23 | gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );
24 |
25 | }`
26 | };
27 |
28 | THREE.BasicShader = BasicShader;
29 |
30 | } )();
31 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/BlendShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Blend two textures
5 | */
6 | const BlendShader = {
7 | uniforms: {
8 | 'tDiffuse1': {
9 | value: null
10 | },
11 | 'tDiffuse2': {
12 | value: null
13 | },
14 | 'mixRatio': {
15 | value: 0.5
16 | },
17 | 'opacity': {
18 | value: 1.0
19 | }
20 | },
21 | vertexShader:
22 | /* glsl */
23 | `
24 |
25 | varying vec2 vUv;
26 |
27 | void main() {
28 |
29 | vUv = uv;
30 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
31 |
32 | }`,
33 | fragmentShader:
34 | /* glsl */
35 | `
36 |
37 | uniform float opacity;
38 | uniform float mixRatio;
39 |
40 | uniform sampler2D tDiffuse1;
41 | uniform sampler2D tDiffuse2;
42 |
43 | varying vec2 vUv;
44 |
45 | void main() {
46 |
47 | vec4 texel1 = texture2D( tDiffuse1, vUv );
48 | vec4 texel2 = texture2D( tDiffuse2, vUv );
49 | gl_FragColor = opacity * mix( texel1, texel2, mixRatio );
50 |
51 | }`
52 | };
53 |
54 | THREE.BlendShader = BlendShader;
55 |
56 | } )();
57 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/ColorCorrectionShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Color correction
5 | */
6 |
7 | const ColorCorrectionShader = {
8 | uniforms: {
9 | 'tDiffuse': {
10 | value: null
11 | },
12 | 'powRGB': {
13 | value: new THREE.Vector3( 2, 2, 2 )
14 | },
15 | 'mulRGB': {
16 | value: new THREE.Vector3( 1, 1, 1 )
17 | },
18 | 'addRGB': {
19 | value: new THREE.Vector3( 0, 0, 0 )
20 | }
21 | },
22 | vertexShader:
23 | /* glsl */
24 | `
25 |
26 | varying vec2 vUv;
27 |
28 | void main() {
29 |
30 | vUv = uv;
31 |
32 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
33 |
34 | }`,
35 | fragmentShader:
36 | /* glsl */
37 | `
38 |
39 | uniform sampler2D tDiffuse;
40 | uniform vec3 powRGB;
41 | uniform vec3 mulRGB;
42 | uniform vec3 addRGB;
43 |
44 | varying vec2 vUv;
45 |
46 | void main() {
47 |
48 | gl_FragColor = texture2D( tDiffuse, vUv );
49 | gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );
50 |
51 | }`
52 | };
53 |
54 | THREE.ColorCorrectionShader = ColorCorrectionShader;
55 |
56 | } )();
57 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/ColorifyShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Colorify shader
5 | */
6 |
7 | const ColorifyShader = {
8 | uniforms: {
9 | 'tDiffuse': {
10 | value: null
11 | },
12 | 'color': {
13 | value: new THREE.Color( 0xffffff )
14 | }
15 | },
16 | vertexShader:
17 | /* glsl */
18 | `
19 |
20 | varying vec2 vUv;
21 |
22 | void main() {
23 |
24 | vUv = uv;
25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
26 |
27 | }`,
28 | fragmentShader:
29 | /* glsl */
30 | `
31 |
32 | uniform vec3 color;
33 | uniform sampler2D tDiffuse;
34 |
35 | varying vec2 vUv;
36 |
37 | void main() {
38 |
39 | vec4 texel = texture2D( tDiffuse, vUv );
40 |
41 | vec3 luma = vec3( 0.299, 0.587, 0.114 );
42 | float v = dot( texel.xyz, luma );
43 |
44 | gl_FragColor = vec4( v * color, texel.w );
45 |
46 | }`
47 | };
48 |
49 | THREE.ColorifyShader = ColorifyShader;
50 |
51 | } )();
52 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/CopyShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Full-screen textured quad shader
5 | */
6 | const CopyShader = {
7 | uniforms: {
8 | 'tDiffuse': {
9 | value: null
10 | },
11 | 'opacity': {
12 | value: 1.0
13 | }
14 | },
15 | vertexShader:
16 | /* glsl */
17 | `
18 |
19 | varying vec2 vUv;
20 |
21 | void main() {
22 |
23 | vUv = uv;
24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
25 |
26 | }`,
27 | fragmentShader:
28 | /* glsl */
29 | `
30 |
31 | uniform float opacity;
32 |
33 | uniform sampler2D tDiffuse;
34 |
35 | varying vec2 vUv;
36 |
37 | void main() {
38 |
39 | vec4 texel = texture2D( tDiffuse, vUv );
40 | gl_FragColor = opacity * texel;
41 |
42 | }`
43 | };
44 |
45 | THREE.CopyShader = CopyShader;
46 |
47 | } )();
48 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/GammaCorrectionShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Gamma Correction Shader
5 | * http://en.wikipedia.org/wiki/gamma_correction
6 | */
7 | const GammaCorrectionShader = {
8 | uniforms: {
9 | 'tDiffuse': {
10 | value: null
11 | }
12 | },
13 | vertexShader:
14 | /* glsl */
15 | `
16 |
17 | varying vec2 vUv;
18 |
19 | void main() {
20 |
21 | vUv = uv;
22 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
23 |
24 | }`,
25 | fragmentShader:
26 | /* glsl */
27 | `
28 |
29 | uniform sampler2D tDiffuse;
30 |
31 | varying vec2 vUv;
32 |
33 | void main() {
34 |
35 | vec4 tex = texture2D( tDiffuse, vUv );
36 |
37 | gl_FragColor = LinearTosRGB( tex );
38 |
39 | }`
40 | };
41 |
42 | THREE.GammaCorrectionShader = GammaCorrectionShader;
43 |
44 | } )();
45 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/LuminosityShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Luminosity
5 | * http://en.wikipedia.org/wiki/Luminosity
6 | */
7 | const LuminosityShader = {
8 | uniforms: {
9 | 'tDiffuse': {
10 | value: null
11 | }
12 | },
13 | vertexShader:
14 | /* glsl */
15 | `
16 |
17 | varying vec2 vUv;
18 |
19 | void main() {
20 |
21 | vUv = uv;
22 |
23 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
24 |
25 | }`,
26 | fragmentShader:
27 | /* glsl */
28 | `
29 |
30 | #include
31 |
32 | uniform sampler2D tDiffuse;
33 |
34 | varying vec2 vUv;
35 |
36 | void main() {
37 |
38 | vec4 texel = texture2D( tDiffuse, vUv );
39 |
40 | float l = linearToRelativeLuminance( texel.rgb );
41 |
42 | gl_FragColor = vec4( l, l, l, texel.w );
43 |
44 | }`
45 | };
46 |
47 | THREE.LuminosityShader = LuminosityShader;
48 |
49 | } )();
50 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/MirrorShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Mirror Shader
5 | * Copies half the input to the other half
6 | *
7 | * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom)
8 | */
9 | const MirrorShader = {
10 | uniforms: {
11 | 'tDiffuse': {
12 | value: null
13 | },
14 | 'side': {
15 | value: 1
16 | }
17 | },
18 | vertexShader:
19 | /* glsl */
20 | `
21 |
22 | varying vec2 vUv;
23 |
24 | void main() {
25 |
26 | vUv = uv;
27 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
28 |
29 | }`,
30 | fragmentShader:
31 | /* glsl */
32 | `
33 |
34 | uniform sampler2D tDiffuse;
35 | uniform int side;
36 |
37 | varying vec2 vUv;
38 |
39 | void main() {
40 |
41 | vec2 p = vUv;
42 | if (side == 0){
43 | if (p.x > 0.5) p.x = 1.0 - p.x;
44 | }else if (side == 1){
45 | if (p.x < 0.5) p.x = 1.0 - p.x;
46 | }else if (side == 2){
47 | if (p.y < 0.5) p.y = 1.0 - p.y;
48 | }else if (side == 3){
49 | if (p.y > 0.5) p.y = 1.0 - p.y;
50 | }
51 | vec4 color = texture2D(tDiffuse, p);
52 | gl_FragColor = color;
53 |
54 | }`
55 | };
56 |
57 | THREE.MirrorShader = MirrorShader;
58 |
59 | } )();
60 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/PixelShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Pixelation shader
5 | */
6 | const PixelShader = {
7 | uniforms: {
8 | 'tDiffuse': {
9 | value: null
10 | },
11 | 'resolution': {
12 | value: null
13 | },
14 | 'pixelSize': {
15 | value: 1
16 | }
17 | },
18 | vertexShader:
19 | /* glsl */
20 | `
21 |
22 | varying highp vec2 vUv;
23 |
24 | void main() {
25 |
26 | vUv = uv;
27 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
28 |
29 | }`,
30 | fragmentShader:
31 | /* glsl */
32 | `
33 |
34 | uniform sampler2D tDiffuse;
35 | uniform float pixelSize;
36 | uniform vec2 resolution;
37 |
38 | varying highp vec2 vUv;
39 |
40 | void main(){
41 |
42 | vec2 dxy = pixelSize / resolution;
43 | vec2 coord = dxy * floor( vUv / dxy );
44 | gl_FragColor = texture2D(tDiffuse, coord);
45 |
46 | }`
47 | };
48 |
49 | THREE.PixelShader = PixelShader;
50 |
51 | } )();
52 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/SepiaShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Sepia tone shader
5 | * based on glfx.js sepia shader
6 | * https://github.com/evanw/glfx.js
7 | */
8 | const SepiaShader = {
9 | uniforms: {
10 | 'tDiffuse': {
11 | value: null
12 | },
13 | 'amount': {
14 | value: 1.0
15 | }
16 | },
17 | vertexShader:
18 | /* glsl */
19 | `
20 |
21 | varying vec2 vUv;
22 |
23 | void main() {
24 |
25 | vUv = uv;
26 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
27 |
28 | }`,
29 | fragmentShader:
30 | /* glsl */
31 | `
32 |
33 | uniform float amount;
34 |
35 | uniform sampler2D tDiffuse;
36 |
37 | varying vec2 vUv;
38 |
39 | void main() {
40 |
41 | vec4 color = texture2D( tDiffuse, vUv );
42 | vec3 c = color.rgb;
43 |
44 | color.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );
45 | color.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );
46 | color.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );
47 |
48 | gl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );
49 |
50 | }`
51 | };
52 |
53 | THREE.SepiaShader = SepiaShader;
54 |
55 | } )();
56 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/TechnicolorShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Technicolor Shader
5 | * Simulates the look of the two-strip technicolor process popular in early 20th century films.
6 | * More historical info here: http://www.widescreenmuseum.com/oldcolor/technicolor1.htm
7 | * Demo here: http://charliehoey.com/technicolor_shader/shader_test.html
8 | */
9 | const TechnicolorShader = {
10 | uniforms: {
11 | 'tDiffuse': {
12 | value: null
13 | }
14 | },
15 | vertexShader:
16 | /* glsl */
17 | `
18 |
19 | varying vec2 vUv;
20 |
21 | void main() {
22 |
23 | vUv = uv;
24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
25 |
26 | }`,
27 | fragmentShader:
28 | /* glsl */
29 | `
30 |
31 | uniform sampler2D tDiffuse;
32 | varying vec2 vUv;
33 |
34 | void main() {
35 |
36 | vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );
37 | vec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);
38 |
39 | gl_FragColor = newTex;
40 |
41 | }`
42 | };
43 |
44 | THREE.TechnicolorShader = TechnicolorShader;
45 |
46 | } )();
47 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/UnpackDepthRGBAShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Unpack RGBA depth shader
5 | * - show RGBA encoded depth as monochrome color
6 | */
7 | const UnpackDepthRGBAShader = {
8 | uniforms: {
9 | 'tDiffuse': {
10 | value: null
11 | },
12 | 'opacity': {
13 | value: 1.0
14 | }
15 | },
16 | vertexShader:
17 | /* glsl */
18 | `
19 |
20 | varying vec2 vUv;
21 |
22 | void main() {
23 |
24 | vUv = uv;
25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
26 |
27 | }`,
28 | fragmentShader:
29 | /* glsl */
30 | `
31 |
32 | uniform float opacity;
33 |
34 | uniform sampler2D tDiffuse;
35 |
36 | varying vec2 vUv;
37 |
38 | #include
39 |
40 | void main() {
41 |
42 | float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );
43 | gl_FragColor = vec4( vec3( depth ), opacity );
44 |
45 | }`
46 | };
47 |
48 | THREE.UnpackDepthRGBAShader = UnpackDepthRGBAShader;
49 |
50 | } )();
51 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/shaders/VignetteShader.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | /**
4 | * Vignette shader
5 | * based on PaintEffect postprocess from ro.me
6 | * http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js
7 | */
8 | const VignetteShader = {
9 | uniforms: {
10 | 'tDiffuse': {
11 | value: null
12 | },
13 | 'offset': {
14 | value: 1.0
15 | },
16 | 'darkness': {
17 | value: 1.0
18 | }
19 | },
20 | vertexShader:
21 | /* glsl */
22 | `
23 |
24 | varying vec2 vUv;
25 |
26 | void main() {
27 |
28 | vUv = uv;
29 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
30 |
31 | }`,
32 | fragmentShader:
33 | /* glsl */
34 | `
35 |
36 | uniform float offset;
37 | uniform float darkness;
38 |
39 | uniform sampler2D tDiffuse;
40 |
41 | varying vec2 vUv;
42 |
43 | void main() {
44 |
45 | // Eskil's vignette
46 |
47 | vec4 texel = texture2D( tDiffuse, vUv );
48 | vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );
49 | gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );
50 |
51 | }`
52 | };
53 |
54 | THREE.VignetteShader = VignetteShader;
55 |
56 | } )();
57 |
--------------------------------------------------------------------------------
/node_modules/three/examples/js/textures/FlakesTexture.js:
--------------------------------------------------------------------------------
1 | ( function () {
2 |
3 | class FlakesTexture {
4 |
5 | constructor( width = 512, height = 512 ) {
6 |
7 | const canvas = document.createElement( 'canvas' );
8 | canvas.width = width;
9 | canvas.height = height;
10 | const context = canvas.getContext( '2d' );
11 | context.fillStyle = 'rgb(127,127,255)';
12 | context.fillRect( 0, 0, width, height );
13 |
14 | for ( let i = 0; i < 4000; i ++ ) {
15 |
16 | const x = Math.random() * width;
17 | const y = Math.random() * height;
18 | const r = Math.random() * 3 + 3;
19 | let nx = Math.random() * 2 - 1;
20 | let ny = Math.random() * 2 - 1;
21 | let nz = 1.5;
22 | const l = Math.sqrt( nx * nx + ny * ny + nz * nz );
23 | nx /= l;
24 | ny /= l;
25 | nz /= l;
26 | context.fillStyle = 'rgb(' + ( nx * 127 + 127 ) + ',' + ( ny * 127 + 127 ) + ',' + nz * 255 + ')';
27 | context.beginPath();
28 | context.arc( x, y, r, 0, Math.PI * 2 );
29 | context.fill();
30 |
31 | }
32 |
33 | return canvas;
34 |
35 | }
36 |
37 | }
38 |
39 | THREE.FlakesTexture = FlakesTexture;
40 |
41 | } )();
42 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/capabilities/WebGPU.js:
--------------------------------------------------------------------------------
1 | class WebGPU {
2 |
3 | static isAvailable() {
4 |
5 | return ( navigator.gpu !== undefined );
6 |
7 | }
8 |
9 | static getErrorMessage() {
10 |
11 | const message = 'Your browser does not support WebGPU';
12 |
13 | const element = document.createElement( 'div' );
14 | element.id = 'webgpumessage';
15 | element.style.fontFamily = 'monospace';
16 | element.style.fontSize = '13px';
17 | element.style.fontWeight = 'normal';
18 | element.style.textAlign = 'center';
19 | element.style.background = '#fff';
20 | element.style.color = '#000';
21 | element.style.padding = '1.5em';
22 | element.style.width = '400px';
23 | element.style.margin = '5em auto 0';
24 |
25 | element.innerHTML = message;
26 |
27 | return element;
28 |
29 | }
30 |
31 | }
32 |
33 | export default WebGPU;
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/lines/Line2.js:
--------------------------------------------------------------------------------
1 | import { LineSegments2 } from '../lines/LineSegments2.js';
2 | import { LineGeometry } from '../lines/LineGeometry.js';
3 | import { LineMaterial } from '../lines/LineMaterial.js';
4 |
5 | class Line2 extends LineSegments2 {
6 |
7 | constructor( geometry = new LineGeometry(), material = new LineMaterial( { color: Math.random() * 0xffffff } ) ) {
8 |
9 | super( geometry, material );
10 |
11 | this.type = 'Line2';
12 |
13 | }
14 |
15 | }
16 |
17 | Line2.prototype.isLine2 = true;
18 |
19 | export { Line2 };
20 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/lines/WireframeGeometry2.js:
--------------------------------------------------------------------------------
1 | import {
2 | WireframeGeometry
3 | } from 'three';
4 | import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js';
5 |
6 | class WireframeGeometry2 extends LineSegmentsGeometry {
7 |
8 | constructor( geometry ) {
9 |
10 | super();
11 |
12 | this.type = 'WireframeGeometry2';
13 |
14 | this.fromWireframeGeometry( new WireframeGeometry( geometry ) );
15 |
16 | // set colors, maybe
17 |
18 | }
19 |
20 | }
21 |
22 | WireframeGeometry2.prototype.isWireframeGeometry2 = true;
23 |
24 | export { WireframeGeometry2 };
25 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/loaders/ifc/web-ifc.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bailey/cuter.computer/80fa6881af30b42f561ea86118f6da2978768565/node_modules/three/examples/jsm/loaders/ifc/web-ifc.wasm
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/accessors/NormalEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { NormalNode } from 'three-nodes/Nodes.js';
4 |
5 | export class NormalEditor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new NormalNode();
10 |
11 | super( 'Normal', 3, node, 200 );
12 |
13 | const optionsField = new SelectInput( [
14 | { name: 'Local', value: NormalNode.LOCAL },
15 | { name: 'World', value: NormalNode.WORLD },
16 | { name: 'View', value: NormalNode.VIEW },
17 | { name: 'Geometry', value: NormalNode.GEOMETRY }
18 | ], NormalNode.LOCAL ).onChange( () => {
19 |
20 | node.scope = optionsField.getValue();
21 |
22 | this.invalidate();
23 |
24 | } );
25 |
26 | this.add( new Element().add( optionsField ) );
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/accessors/PositionEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { PositionNode } from 'three-nodes/Nodes.js';
4 |
5 | export class PositionEditor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new PositionNode();
10 |
11 | super( 'Position', 3, node, 200 );
12 |
13 | const optionsField = new SelectInput( [
14 | { name: 'Local', value: PositionNode.LOCAL },
15 | { name: 'World', value: PositionNode.WORLD },
16 | { name: 'View', value: PositionNode.VIEW },
17 | { name: 'View Direction', value: PositionNode.VIEW_DIRECTION }
18 | ], PositionNode.LOCAL ).onChange( () => {
19 |
20 | node.scope = optionsField.getValue();
21 |
22 | this.invalidate();
23 |
24 | } );
25 |
26 | this.add( new Element().add( optionsField ) );
27 |
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/accessors/UVEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { UVNode } from 'three-nodes/Nodes.js';
4 |
5 | export class UVEditor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new UVNode();
10 |
11 | super( 'UV', 2, node, 200 );
12 |
13 | const optionsField = new SelectInput( [ '1', '2' ], 0 ).onChange( () => {
14 |
15 | node.index = Number( optionsField.getValue() );
16 |
17 | this.invalidate();
18 |
19 | } );
20 |
21 | this.add( new LabelElement( 'Channel' ).add( optionsField ) );
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/core/FileEditor.js:
--------------------------------------------------------------------------------
1 | import { StringInput, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 |
4 | export class FileEditor extends BaseNode {
5 |
6 | constructor( file ) {
7 |
8 | super( 'File', 1, file, 250 );
9 |
10 | this.file = file;
11 | this.nameInput = new StringInput( file.name ).setReadOnly( true );
12 |
13 | this.add( new Element().add( this.nameInput ) );
14 |
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/display/BlendEditor.js:
--------------------------------------------------------------------------------
1 | import { LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { MathNode, FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | const NULL_VALUE = new FloatNode();
6 | const ONE_VALUE = new FloatNode( 1 );
7 |
8 | export class BlendEditor extends BaseNode {
9 |
10 | constructor() {
11 |
12 | const node = new MathNode( MathNode.MIX, NULL_VALUE, NULL_VALUE, ONE_VALUE );
13 |
14 | super( 'Blend', 3, node, 200 );
15 |
16 | const aElement = new LabelElement( 'Base' ).setInput( 3 );
17 | const bElement = new LabelElement( 'Blend' ).setInput( 3 );
18 | const cElement = new LabelElement( 'Opacity' ).setInput( 1 );
19 |
20 | aElement.onConnect( () => {
21 |
22 | node.aNode = aElement.getLinkedObject() || NULL_VALUE;
23 |
24 | } );
25 |
26 | bElement.onConnect( () => {
27 |
28 | node.bNode = bElement.getLinkedObject() || NULL_VALUE;
29 |
30 | } );
31 |
32 | cElement.onConnect( () => {
33 |
34 | node.cNode = cElement.getLinkedObject() || ONE_VALUE;
35 |
36 | } );
37 |
38 | this.add( aElement )
39 | .add( bElement )
40 | .add( cElement );
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/inputs/FloatEditor.js:
--------------------------------------------------------------------------------
1 | import { NumberInput, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | export class FloatEditor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new FloatNode();
10 |
11 | super( 'Float', 1, node, 150 );
12 |
13 | const field = new NumberInput().setTagColor( 'red' ).onChange( () => {
14 |
15 | node.value = field.getValue();
16 |
17 | } );
18 |
19 | this.add( new Element().add( field ) );
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/inputs/Vector2Editor.js:
--------------------------------------------------------------------------------
1 | import { NumberInput, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { Vector2Node } from 'three-nodes/Nodes.js';
4 |
5 | export class Vector2Editor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new Vector2Node();
10 |
11 | super( 'Vector 2', 2, node );
12 |
13 | const onUpdate = () => {
14 |
15 | node.value.x = fieldX.getValue();
16 | node.value.y = fieldY.getValue();
17 |
18 | };
19 |
20 | const fieldX = new NumberInput().setTagColor( 'red' ).onChange( onUpdate );
21 | const fieldY = new NumberInput().setTagColor( 'green' ).onChange( onUpdate );
22 |
23 | this.add( new LabelElement( 'XY' ).add( fieldX ).add( fieldY ) );
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/inputs/Vector3Editor.js:
--------------------------------------------------------------------------------
1 | import { NumberInput, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { Vector3Node } from 'three-nodes/Nodes.js';
4 |
5 | export class Vector3Editor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new Vector3Node();
10 |
11 | super( 'Vector 3', 3, node, 325 );
12 |
13 | const onUpdate = () => {
14 |
15 | node.value.x = fieldX.getValue();
16 | node.value.y = fieldY.getValue();
17 | node.value.z = fieldZ.getValue();
18 |
19 | };
20 |
21 | const fieldX = new NumberInput().setTagColor( 'red' ).onChange( onUpdate );
22 | const fieldY = new NumberInput().setTagColor( 'green' ).onChange( onUpdate );
23 | const fieldZ = new NumberInput().setTagColor( 'blue' ).onChange( onUpdate );
24 |
25 | this.add( new LabelElement( 'XYZ' ).add( fieldX ).add( fieldY ).add( fieldZ ) );
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/inputs/Vector4Editor.js:
--------------------------------------------------------------------------------
1 | import { NumberInput, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { Vector4Node } from 'three-nodes/Nodes.js';
4 |
5 | export class Vector4Editor extends BaseNode {
6 |
7 | constructor() {
8 |
9 | const node = new Vector4Node();
10 |
11 | super( 'Vector 4', 4, node, 350 );
12 |
13 | const onUpdate = () => {
14 |
15 | node.value.x = fieldX.getValue();
16 | node.value.y = fieldY.getValue();
17 | node.value.z = fieldZ.getValue();
18 | node.value.w = fieldW.getValue();
19 |
20 | };
21 |
22 | const fieldX = new NumberInput().setTagColor( 'red' ).onChange( onUpdate );
23 | const fieldY = new NumberInput().setTagColor( 'green' ).onChange( onUpdate );
24 | const fieldZ = new NumberInput().setTagColor( 'blue' ).onChange( onUpdate );
25 | const fieldW = new NumberInput( 1 ).setTagColor( 'white' ).onChange( onUpdate );
26 |
27 | this.add( new LabelElement( 'XYZW' )
28 | .add( fieldX )
29 | .add( fieldY )
30 | .add( fieldZ )
31 | .add( fieldW )
32 | );
33 |
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/math/AngleEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, Element, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { MathNode, Vector3Node } from 'three-nodes/Nodes.js';
4 |
5 | const DEFAULT_VALUE = new Vector3Node();
6 |
7 | export class AngleEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new MathNode( MathNode.SIN, DEFAULT_VALUE );
12 |
13 | super( 'Angle', 1, node, 175 );
14 |
15 | const optionsField = new SelectInput( [
16 | { name: 'Degrees to Radians', value: MathNode.RAD },
17 | { name: 'Radians to Degrees', value: MathNode.DEG }
18 | ], MathNode.RAD ).onChange( () => {
19 |
20 | node.method = optionsField.getValue();
21 |
22 | this.invalidate();
23 |
24 | } );
25 |
26 | const input = new LabelElement( 'A' ).setInput( 1 );
27 |
28 | input.onConnect( () => {
29 |
30 | node.aNode = input.getLinkedObject() || DEFAULT_VALUE;
31 |
32 | } );
33 |
34 | this.add( new Element().add( optionsField ) )
35 | .add( input );
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/math/DotEditor.js:
--------------------------------------------------------------------------------
1 | import { LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { MathNode, FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | const NULL_VALUE = new FloatNode();
6 |
7 | export class DotEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new MathNode( MathNode.DOT, NULL_VALUE, NULL_VALUE );
12 |
13 | super( 'Dot Product', 1, node, 175 );
14 |
15 | const aElement = new LabelElement( 'A' ).setInput( 3 );
16 | const bElement = new LabelElement( 'B' ).setInput( 3 );
17 |
18 | aElement.onConnect( () => {
19 |
20 | node.aNode = aElement.getLinkedObject() || NULL_VALUE;
21 |
22 | } );
23 |
24 | bElement.onConnect( () => {
25 |
26 | node.bNode = bElement.getLinkedObject() || NULL_VALUE;
27 |
28 | } );
29 |
30 | this.add( aElement )
31 | .add( bElement );
32 |
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/math/InvertEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { MathNode, FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | const DEFAULT_VALUE = new FloatNode();
6 |
7 | export class InvertEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new MathNode( MathNode.INVERT, DEFAULT_VALUE );
12 |
13 | super( 'Invert / Negate', 1, node, 175 );
14 |
15 | const optionsField = new SelectInput( [
16 | { name: 'Invert ( 1 - Source )', value: MathNode.INVERT },
17 | { name: 'Negate ( - Source )', value: MathNode.NEGATE }
18 | ], MathNode.INVERT ).onChange( () => {
19 |
20 | node.method = optionsField.getValue();
21 |
22 | this.invalidate();
23 |
24 | } );
25 |
26 | const input = new LabelElement( 'Source' ).setInput( 1 );
27 |
28 | input.onConnect( () => {
29 |
30 | node.aNode = input.getLinkedObject() || DEFAULT_VALUE;
31 |
32 | } );
33 |
34 | this.add( new LabelElement( 'Method' ).add( optionsField ) )
35 | .add( input );
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/math/NormalizeEditor.js:
--------------------------------------------------------------------------------
1 | import { LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { MathNode, Vector3Node } from 'three-nodes/Nodes.js';
4 |
5 | const DEFAULT_VALUE = new Vector3Node();
6 |
7 | export class NormalizeEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new MathNode( MathNode.NORMALIZE, DEFAULT_VALUE );
12 |
13 | super( 'Normalize', 3, node, 175 );
14 |
15 | const input = new LabelElement( 'A' ).setInput( 3 );
16 |
17 | input.onConnect( () => {
18 |
19 | node.aNode = input.getLinkedObject() || DEFAULT_VALUE;
20 |
21 | } );
22 |
23 | this.add( input );
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/procedural/CheckerEditor.js:
--------------------------------------------------------------------------------
1 | import { LabelElement } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { CheckerNode, UVNode } from 'three-nodes/Nodes.js';
4 |
5 | const defaultUV = new UVNode();
6 |
7 | export class CheckerEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new CheckerNode( defaultUV );
12 |
13 | super( 'Checker', 1, node, 200 );
14 |
15 | const field = new LabelElement( 'UV' ).setInput( 2 );
16 |
17 | field.onConnect( () => {
18 |
19 | node.uvNode = field.getLinkedObject() || defaultUV;
20 |
21 | } );
22 |
23 | this.add( field );
24 |
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/utils/OscillatorEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, LabelElement, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { OscNode, FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | const NULL_VALUE = new FloatNode();
6 |
7 | export class OscillatorEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new OscNode( OscNode.SINE, NULL_VALUE );
12 |
13 | super( 'Oscillator', 1, node, 175 );
14 |
15 | const methodInput = new SelectInput( [
16 | { name: 'Sine', value: OscNode.SINE },
17 | { name: 'Square', value: OscNode.SQUARE },
18 | { name: 'Triangle', value: OscNode.TRIANGLE },
19 | { name: 'Sawtooth', value: OscNode.SAWTOOTH }
20 | ], OscNode.SINE );
21 |
22 | methodInput.onChange( () => {
23 |
24 | node.method = methodInput.getValue();
25 |
26 | this.invalidate();
27 |
28 | } );
29 |
30 | const timeElement = new LabelElement( 'Time' ).setInput( 1 );
31 |
32 | timeElement.onConnect( () => {
33 |
34 | node.timeNode = timeElement.getLinkedObject() || NULL_VALUE;
35 |
36 | } );
37 |
38 | this.add( new Element().add( methodInput ) )
39 | .add( timeElement );
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/node-editor/utils/SplitEditor.js:
--------------------------------------------------------------------------------
1 | import { SelectInput, Element } from '../../libs/flow.module.js';
2 | import { BaseNode } from '../core/BaseNode.js';
3 | import { SplitNode, FloatNode } from 'three-nodes/Nodes.js';
4 |
5 | const NULL_VALUE = new FloatNode();
6 |
7 | export class SplitEditor extends BaseNode {
8 |
9 | constructor() {
10 |
11 | const node = new SplitNode( NULL_VALUE, 'x' );
12 |
13 | super( 'Split', 1, node, 175 );
14 |
15 | const componentsField = new SelectInput( [
16 | { name: 'X | R', value: 'x' },
17 | { name: 'Y | G', value: 'y' },
18 | { name: 'Z | B', value: 'z' },
19 | { name: 'W | A', value: 'w' }
20 | ], node.components ).onChange( () => {
21 |
22 | node.components = componentsField.getValue();
23 |
24 | this.invalidate();
25 |
26 | } );
27 |
28 | const componentsElement = new Element().add( componentsField ).setInput( 1 )
29 | .onConnect( () => {
30 |
31 | node.node = componentsElement.getLinkedObject() || NULL_VALUE;
32 |
33 | } );
34 |
35 | this.add( componentsElement );
36 |
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/accessors/MaterialReferenceNode.js:
--------------------------------------------------------------------------------
1 | import ReferenceNode from './ReferenceNode.js';
2 |
3 | class MaterialReferenceNode extends ReferenceNode {
4 |
5 | constructor( property, inputType, material = null ) {
6 |
7 | super( property, inputType, material );
8 |
9 | this.material = material;
10 |
11 | }
12 |
13 | update( frame ) {
14 |
15 | this.object = this.material !== null ? this.material : frame.material;
16 |
17 | super.update( frame );
18 |
19 | }
20 |
21 | }
22 |
23 | export default MaterialReferenceNode;
24 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/accessors/ModelNode.js:
--------------------------------------------------------------------------------
1 | import Object3DNode from './Object3DNode.js';
2 |
3 | class ModelNode extends Object3DNode {
4 |
5 | constructor( scope = ModelNode.VIEW_MATRIX ) {
6 |
7 | super( scope );
8 |
9 | }
10 |
11 | }
12 |
13 | export default ModelNode;
14 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/accessors/ModelViewProjectionNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 | import CameraNode from '../accessors/CameraNode.js';
3 | import ModelNode from '../accessors/ModelNode.js';
4 | import OperatorNode from '../math/OperatorNode.js';
5 | import PositionNode from '../accessors/PositionNode.js';
6 |
7 | class ModelViewProjectionNode extends Node {
8 |
9 | constructor( position = new PositionNode() ) {
10 |
11 | super( 'vec4' );
12 |
13 | this.position = position;
14 |
15 | }
16 |
17 | generate( builder ) {
18 |
19 | const position = this.position;
20 |
21 | const mvpMatrix = new OperatorNode( '*', new CameraNode( CameraNode.PROJECTION_MATRIX ), new ModelNode( ModelNode.VIEW_MATRIX ) );
22 | const mvpNode = new OperatorNode( '*', mvpMatrix, position );
23 |
24 | return mvpNode.build( builder );
25 |
26 | }
27 |
28 | }
29 |
30 | export default ModelViewProjectionNode;
31 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/accessors/PointUVNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 |
3 | class PointUVNode extends Node {
4 |
5 | constructor() {
6 |
7 | super( 'vec2' );
8 |
9 | }
10 |
11 | generate( /*builder*/ ) {
12 |
13 | return 'vec2( gl_PointCoord.x, 1.0 - gl_PointCoord.y )';
14 |
15 | }
16 |
17 | }
18 |
19 | PointUVNode.prototype.isPointUVNode = true;
20 |
21 | export default PointUVNode;
22 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/accessors/UVNode.js:
--------------------------------------------------------------------------------
1 | import AttributeNode from '../core/AttributeNode.js';
2 |
3 | class UVNode extends AttributeNode {
4 |
5 | constructor( index = 0 ) {
6 |
7 | super( null, 'vec2' );
8 |
9 | this.index = index;
10 |
11 | }
12 |
13 | getAttributeName( /*builder*/ ) {
14 |
15 | const index = this.index;
16 |
17 | return 'uv' + ( index > 0 ? index + 1 : '' );
18 |
19 | }
20 |
21 | serialize( data ) {
22 |
23 | super.serialize( data );
24 |
25 | data.index = this.index;
26 |
27 | }
28 |
29 | deserialize( data ) {
30 |
31 | super.deserialize( data );
32 |
33 | this.index = data.index;
34 |
35 | }
36 |
37 | }
38 |
39 | UVNode.prototype.isUVNode = true;
40 |
41 | export default UVNode;
42 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/ArrayInputNode.js:
--------------------------------------------------------------------------------
1 | import InputNode from './InputNode.js';
2 |
3 | class ArrayInputNode extends InputNode {
4 |
5 | constructor( nodes = [] ) {
6 |
7 | super();
8 |
9 | this.nodes = nodes;
10 |
11 | }
12 |
13 | getNodeType( builder ) {
14 |
15 | return this.nodes[ 0 ].getNodeType( builder );
16 |
17 | }
18 |
19 | }
20 |
21 | ArrayInputNode.prototype.isArrayInputNode = true;
22 |
23 | export default ArrayInputNode;
24 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/AttributeNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 | import VaryNode from './VaryNode.js';
3 |
4 | class AttributeNode extends Node {
5 |
6 | constructor( attributeName, nodeType ) {
7 |
8 | super( nodeType );
9 |
10 | this._attributeName = attributeName;
11 |
12 | }
13 |
14 | getHash( builder ) {
15 |
16 | return this.getAttributeName( builder );
17 |
18 | }
19 |
20 | setAttributeName( attributeName ) {
21 |
22 | this._attributeName = attributeName;
23 |
24 | return this;
25 |
26 | }
27 |
28 | getAttributeName( /*builder*/ ) {
29 |
30 | return this._attributeName;
31 |
32 | }
33 |
34 | generate( builder ) {
35 |
36 | const attribute = builder.getAttribute( this.getAttributeName( builder ), this.getNodeType( builder ) );
37 |
38 | if ( builder.isShaderStage( 'vertex' ) ) {
39 |
40 | return attribute.name;
41 |
42 | } else {
43 |
44 | const nodeVary = new VaryNode( this );
45 |
46 | return nodeVary.build( builder, attribute.type );
47 |
48 | }
49 |
50 | }
51 |
52 | }
53 |
54 | export default AttributeNode;
55 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/BypassNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 |
3 | class BypassNode extends Node {
4 |
5 | constructor( returnNode, callNode ) {
6 |
7 | super();
8 |
9 | this.outputNode = returnNode;
10 | this.callNode = callNode;
11 |
12 | }
13 |
14 | getNodeType( builder ) {
15 |
16 | return this.outputNode.getNodeType( builder );
17 |
18 | }
19 |
20 | generate( builder, output ) {
21 |
22 | const snippet = this.callNode.build( builder, 'void' );
23 |
24 | if ( snippet !== '' ) {
25 |
26 | builder.addFlowCode( snippet );
27 |
28 | }
29 |
30 | return this.outputNode.build( builder, output );
31 |
32 | }
33 |
34 | }
35 |
36 | BypassNode.prototype.isBypassNode = true;
37 |
38 | export default BypassNode;
39 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/ContextNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 |
3 | class ContextNode extends Node {
4 |
5 | constructor( node, context = {} ) {
6 |
7 | super();
8 |
9 | this.node = node;
10 | this.context = context;
11 |
12 | }
13 |
14 | getNodeType( builder ) {
15 |
16 | return this.node.getNodeType( builder );
17 |
18 | }
19 |
20 | generate( builder, output ) {
21 |
22 | const previousContext = builder.getContext();
23 |
24 | builder.setContext( Object.assign( {}, builder.context, this.context ) );
25 |
26 | const snippet = this.node.build( builder, output );
27 |
28 | builder.setContext( previousContext );
29 |
30 | return snippet;
31 |
32 | }
33 |
34 | }
35 |
36 | ContextNode.prototype.isContextNode = true;
37 |
38 | export default ContextNode;
39 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/ExpressionNode.js:
--------------------------------------------------------------------------------
1 | import TempNode from './TempNode.js';
2 |
3 | class ExpressionNode extends TempNode {
4 |
5 | constructor( snipped = '', nodeType = 'void' ) {
6 |
7 | super( nodeType );
8 |
9 | this.snipped = snipped;
10 |
11 | }
12 |
13 | generate( builder ) {
14 |
15 | const type = this.getNodeType( builder );
16 | const snipped = this.snipped;
17 |
18 | if ( type === 'void' ) {
19 |
20 | builder.addFlowCode( snipped );
21 |
22 | } else {
23 |
24 | return `( ${ snipped } )`;
25 |
26 | }
27 |
28 | }
29 |
30 | }
31 |
32 | export default ExpressionNode;
33 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeAttribute.js:
--------------------------------------------------------------------------------
1 | class NodeAttribute {
2 |
3 | constructor( name, type ) {
4 |
5 | this.name = name;
6 | this.type = type;
7 |
8 | }
9 |
10 | }
11 |
12 | NodeAttribute.prototype.isNodeAttribute = true;
13 |
14 | export default NodeAttribute;
15 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeCode.js:
--------------------------------------------------------------------------------
1 | class NodeCode {
2 |
3 | constructor( name, type, code = '' ) {
4 |
5 | this.name = name;
6 | this.type = type;
7 | this.code = code;
8 |
9 | Object.defineProperty( this, 'isNodeCode', { value: true } );
10 |
11 | }
12 |
13 | }
14 |
15 | export default NodeCode;
16 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeFrame.js:
--------------------------------------------------------------------------------
1 | import { NodeUpdateType } from './constants.js';
2 |
3 | class NodeFrame {
4 |
5 | constructor() {
6 |
7 | this.time = 0;
8 | this.deltaTime = 0;
9 |
10 | this.frameId = 0;
11 |
12 | this.startTime = null;
13 |
14 | this.updateMap = new WeakMap();
15 |
16 | this.renderer = null;
17 | this.material = null;
18 | this.camera = null;
19 | this.object = null;
20 |
21 | }
22 |
23 | updateNode( node ) {
24 |
25 | if ( node.updateType === NodeUpdateType.Frame ) {
26 |
27 | if ( this.updateMap.get( node ) !== this.frameId ) {
28 |
29 | this.updateMap.set( node, this.frameId );
30 |
31 | node.update( this );
32 |
33 | }
34 |
35 | } else if ( node.updateType === NodeUpdateType.Object ) {
36 |
37 | node.update( this );
38 |
39 | }
40 |
41 | }
42 |
43 | update() {
44 |
45 | this.frameId ++;
46 |
47 | if ( this.lastTime === undefined ) this.lastTime = performance.now();
48 |
49 | this.deltaTime = ( performance.now() - this.lastTime ) / 1000;
50 |
51 | this.lastTime = performance.now();
52 |
53 | this.time += this.deltaTime;
54 |
55 | }
56 |
57 | }
58 |
59 | export default NodeFrame;
60 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeFunction.js:
--------------------------------------------------------------------------------
1 | class NodeFunction {
2 |
3 | constructor( type, inputs, name = '', presicion = '' ) {
4 |
5 | this.type = type;
6 | this.inputs = inputs;
7 | this.name = name;
8 | this.presicion = presicion;
9 |
10 | }
11 |
12 | getCode( /*name = this.name*/ ) {
13 |
14 | console.warn( 'Abstract function.' );
15 |
16 | }
17 |
18 | }
19 |
20 | NodeFunction.isNodeFunction = true;
21 |
22 | export default NodeFunction;
23 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeFunctionInput.js:
--------------------------------------------------------------------------------
1 | class NodeFunctionInput {
2 |
3 | constructor( type, name, count = null, qualifier = '', isConst = false ) {
4 |
5 | this.type = type;
6 | this.name = name;
7 | this.count = count;
8 | this.qualifier = qualifier;
9 | this.isConst = isConst;
10 |
11 | }
12 |
13 | }
14 |
15 | NodeFunctionInput.isNodeFunctionInput = true;
16 |
17 | export default NodeFunctionInput;
18 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeParser.js:
--------------------------------------------------------------------------------
1 | class NodeParser {
2 |
3 | parseFunction( /*source*/ ) {
4 |
5 | console.warn( 'Abstract function.' );
6 |
7 | }
8 |
9 | }
10 |
11 | export default NodeParser;
12 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeUniform.js:
--------------------------------------------------------------------------------
1 | class NodeUniform {
2 |
3 | constructor( name, type, node, needsUpdate = undefined ) {
4 |
5 | this.name = name;
6 | this.type = type;
7 | this.node = node;
8 | this.needsUpdate = needsUpdate;
9 |
10 | }
11 |
12 | get value() {
13 |
14 | return this.node.value;
15 |
16 | }
17 |
18 | set value( val ) {
19 |
20 | this.node.value = val;
21 |
22 | }
23 |
24 | }
25 |
26 | NodeUniform.prototype.isNodeUniform = true;
27 |
28 | export default NodeUniform;
29 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeUtils.js:
--------------------------------------------------------------------------------
1 | export const getNodesKeys = ( object ) => {
2 |
3 | const props = [];
4 |
5 | for ( const name in object ) {
6 |
7 | const value = object[ name ];
8 |
9 | if ( value && value.isNode === true ) {
10 |
11 | props.push( name );
12 |
13 | }
14 |
15 | }
16 |
17 | return props;
18 |
19 | };
20 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeVar.js:
--------------------------------------------------------------------------------
1 | class NodeVar {
2 |
3 | constructor( name, type ) {
4 |
5 | this.name = name;
6 | this.type = type;
7 |
8 | }
9 |
10 | }
11 |
12 | NodeVar.prototype.isNodeVar = true;
13 |
14 | export default NodeVar;
15 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/NodeVary.js:
--------------------------------------------------------------------------------
1 | class NodeVary {
2 |
3 | constructor( name, type ) {
4 |
5 | this.name = name;
6 | this.type = type;
7 |
8 | }
9 |
10 | }
11 |
12 | NodeVary.prototype.isNodeVary = true;
13 |
14 | export default NodeVary;
15 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/PropertyNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 |
3 | class PropertyNode extends Node {
4 |
5 | constructor( name = null, nodeType = 'vec4' ) {
6 |
7 | super( nodeType );
8 |
9 | this.name = name;
10 |
11 | }
12 |
13 | getHash( builder ) {
14 |
15 | return this.name || super.getHash( builder );
16 |
17 | }
18 |
19 | generate( builder ) {
20 |
21 | const nodeVary = builder.getVarFromNode( this, this.getNodeType( builder ) );
22 | const name = this.name;
23 |
24 | if ( name !== null ) {
25 |
26 | nodeVary.name = name;
27 |
28 | }
29 |
30 | return builder.getPropertyName( nodeVary );
31 |
32 | }
33 |
34 | }
35 |
36 | export default PropertyNode;
37 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/TempNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 |
3 | class TempNode extends Node {
4 |
5 | constructor( type ) {
6 |
7 | super( type );
8 |
9 | }
10 |
11 | build( builder, output ) {
12 |
13 | const type = builder.getVectorType( this.getNodeType( builder, output ) );
14 | const nodeData = builder.getDataFromNode( this );
15 |
16 | if ( builder.context.temp !== false && type !== 'void ' && output !== 'void' && nodeData.dependenciesCount > 1 ) {
17 |
18 | if ( nodeData.snippet === undefined ) {
19 |
20 | const snippet = super.build( builder, type );
21 |
22 | const nodeVar = builder.getVarFromNode( this, type );
23 | const propertyName = builder.getPropertyName( nodeVar );
24 |
25 | builder.addFlowCode( `${propertyName} = ${snippet}` );
26 |
27 | nodeData.snippet = snippet;
28 | nodeData.propertyName = propertyName;
29 |
30 | }
31 |
32 | return builder.format( nodeData.propertyName, type, output );
33 |
34 | }
35 |
36 | return super.build( builder, output );
37 |
38 | }
39 |
40 | }
41 |
42 | export default TempNode;
43 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/VarNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 |
3 | class VarNode extends Node {
4 |
5 | constructor( node, name = null, nodeType = null ) {
6 |
7 | super( nodeType );
8 |
9 | this.node = node;
10 | this.name = name;
11 |
12 | }
13 |
14 | getHash( builder ) {
15 |
16 | return this.name || super.getHash( builder );
17 |
18 | }
19 |
20 | getNodeType( builder ) {
21 |
22 | return super.getNodeType( builder ) || this.node.getNodeType( builder );
23 |
24 | }
25 |
26 | generate( builder ) {
27 |
28 | const type = builder.getVectorType( this.getNodeType( builder ) );
29 | const node = this.node;
30 | const name = this.name;
31 |
32 | const snippet = node.build( builder, type );
33 | const nodeVar = builder.getVarFromNode( this, type );
34 |
35 | if ( name !== null ) {
36 |
37 | nodeVar.name = name;
38 |
39 | }
40 |
41 | const propertyName = builder.getPropertyName( nodeVar );
42 |
43 | builder.addFlowCode( `${propertyName} = ${snippet}` );
44 |
45 | return propertyName;
46 |
47 | }
48 |
49 | }
50 |
51 | export default VarNode;
52 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/VaryNode.js:
--------------------------------------------------------------------------------
1 | import Node from './Node.js';
2 | import { NodeShaderStage } from './constants.js';
3 |
4 | class VaryNode extends Node {
5 |
6 | constructor( node, name = null ) {
7 |
8 | super();
9 |
10 | this.node = node;
11 | this.name = name;
12 |
13 | }
14 |
15 | getHash( builder ) {
16 |
17 | return this.name || super.getHash( builder );
18 |
19 | }
20 |
21 | getNodeType( builder ) {
22 |
23 | // VaryNode is auto type
24 |
25 | return this.node.getNodeType( builder );
26 |
27 | }
28 |
29 | generate( builder ) {
30 |
31 | const type = this.getNodeType( builder );
32 | const node = this.node;
33 | const name = this.name;
34 |
35 | const nodeVary = builder.getVaryFromNode( this, type );
36 |
37 | if ( name !== null ) {
38 |
39 | nodeVary.name = name;
40 |
41 | }
42 |
43 | const propertyName = builder.getPropertyName( nodeVary, NodeShaderStage.Vertex );
44 |
45 | // force node run in vertex stage
46 | builder.flowNodeFromShaderStage( NodeShaderStage.Vertex, node, type, propertyName );
47 |
48 | return builder.getPropertyName( nodeVary );
49 |
50 | }
51 |
52 | }
53 |
54 | export default VaryNode;
55 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/core/constants.js:
--------------------------------------------------------------------------------
1 | export const NodeShaderStage = {
2 | Vertex: 'vertex',
3 | Fragment: 'fragment'
4 | };
5 |
6 | export const NodeUpdateType = {
7 | None: 'none',
8 | Frame: 'frame',
9 | Object: 'object'
10 | };
11 |
12 | export const NodeType = {
13 | Boolean: 'bool',
14 | Integer: 'int',
15 | Float: 'float',
16 | Vector2: 'vec2',
17 | Vector3: 'vec3',
18 | Vector4: 'vec4',
19 | Matrix3: 'mat3',
20 | Matrix4: 'mat4'
21 | };
22 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/functions/PhysicalMaterialFunctions.js:
--------------------------------------------------------------------------------
1 | import { ShaderNode,
2 | add, max, min, abs, dFdx, dFdy,
3 | normalGeometry
4 | } from '../ShaderNode.js';
5 |
6 | export const getGeometryRoughness = new ShaderNode( () => {
7 |
8 | const dxy = max( abs( dFdx( normalGeometry ) ), abs( dFdy( normalGeometry ) ) );
9 | const geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
10 |
11 | return geometryRoughness;
12 |
13 | } );
14 |
15 | export const getRoughness = new ShaderNode( ( inputs ) => {
16 |
17 | const { roughness } = inputs;
18 |
19 | const geometryRoughness = getGeometryRoughness();
20 |
21 | let roughnessFactor = max( roughness, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.
22 | roughnessFactor = add( roughnessFactor, geometryRoughness );
23 | roughnessFactor = min( roughnessFactor, 1.0 );
24 |
25 | return roughnessFactor;
26 |
27 | } );
28 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/BufferNode.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 |
3 | class BufferNode extends InputNode {
4 |
5 | constructor( value, bufferType, bufferCount = 0 ) {
6 |
7 | super( 'buffer' );
8 |
9 | this.value = value;
10 | this.bufferType = bufferType;
11 | this.bufferCount = bufferCount;
12 |
13 | }
14 |
15 | getNodeType( /* builder */ ) {
16 |
17 | return this.bufferType;
18 |
19 | }
20 |
21 | }
22 |
23 | BufferNode.prototype.isBufferNode = true;
24 |
25 | export default BufferNode;
26 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/ColorNode.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Color } from 'three';
3 |
4 | class ColorNode extends InputNode {
5 |
6 | constructor( value = new Color() ) {
7 |
8 | super( 'color' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | serialize( data ) {
15 |
16 | super.serialize( data );
17 |
18 | const { r, g, b } = this.value;
19 |
20 | data.r = r;
21 | data.g = g;
22 | data.b = b;
23 |
24 | }
25 |
26 | deserialize( data ) {
27 |
28 | super.serialize( data );
29 |
30 | const { r, g, b } = data;
31 | const value = this.value;
32 |
33 | value.r = r;
34 | value.g = g;
35 | value.b = b;
36 |
37 | }
38 |
39 | }
40 |
41 | ColorNode.prototype.isColorNode = true;
42 |
43 | export default ColorNode;
44 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/FloatNode.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 |
3 | class FloatNode extends InputNode {
4 |
5 | constructor( value = 0 ) {
6 |
7 | super( 'float' );
8 |
9 | this.value = value;
10 |
11 | }
12 |
13 | serialize( data ) {
14 |
15 | super.serialize( data );
16 |
17 | data.value = this.value;
18 |
19 | }
20 |
21 | deserialize( data ) {
22 |
23 | super.serialize( data );
24 |
25 | data.value = this.value;
26 |
27 | }
28 |
29 | }
30 |
31 | FloatNode.prototype.isFloatNode = true;
32 |
33 | export default FloatNode;
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/IntNode.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 |
3 | class IntNode extends InputNode {
4 |
5 | constructor( value = 0 ) {
6 |
7 | super( 'int' );
8 |
9 | this.value = value;
10 |
11 | }
12 |
13 | serialize( data ) {
14 |
15 | super.serialize( data );
16 |
17 | data.value = this.value;
18 |
19 | }
20 |
21 | deserialize( data ) {
22 |
23 | super.serialize( data );
24 |
25 | this.value = data.value;
26 |
27 | }
28 |
29 | }
30 |
31 | IntNode.prototype.isIntNode = true;
32 |
33 | export default IntNode;
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/Matrix3Node.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Matrix3 } from 'three';
3 |
4 | class Matrix3Node extends InputNode {
5 |
6 | constructor( value = new Matrix3() ) {
7 |
8 | super( 'mat3' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | }
15 |
16 | Matrix3Node.prototype.isMatrix3Node = true;
17 |
18 | export default Matrix3Node;
19 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/Matrix4Node.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Matrix4 } from 'three';
3 |
4 | class Matrix4Node extends InputNode {
5 |
6 | constructor( value = new Matrix4() ) {
7 |
8 | super( 'mat4' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | }
15 |
16 | Matrix4Node.prototype.isMatrix4Node = true;
17 |
18 | export default Matrix4Node;
19 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/Vector2Node.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Vector2 } from 'three';
3 |
4 | class Vector2Node extends InputNode {
5 |
6 | constructor( value = new Vector2() ) {
7 |
8 | super( 'vec2' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | serialize( data ) {
15 |
16 | super.serialize( data );
17 |
18 | const { x, y } = this.value;
19 |
20 | data.x = x;
21 | data.y = y;
22 |
23 | }
24 |
25 | deserialize( data ) {
26 |
27 | super.serialize( data );
28 |
29 | const { x, y } = data;
30 | const value = this.value;
31 |
32 | value.x = x;
33 | value.y = y;
34 |
35 | }
36 |
37 | }
38 |
39 | Vector2Node.prototype.isVector2Node = true;
40 |
41 | export default Vector2Node;
42 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/Vector3Node.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Vector3 } from 'three';
3 |
4 | class Vector3Node extends InputNode {
5 |
6 | constructor( value = new Vector3() ) {
7 |
8 | super( 'vec3' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | serialize( data ) {
15 |
16 | super.serialize( data );
17 |
18 | const { x, y, z } = this.value;
19 |
20 | data.x = x;
21 | data.y = y;
22 | data.z = z;
23 |
24 | }
25 |
26 | deserialize( data ) {
27 |
28 | super.serialize( data );
29 |
30 | const { x, y, z } = data;
31 | const value = this.value;
32 |
33 | value.x = x;
34 | value.y = y;
35 | value.z = z;
36 |
37 | }
38 |
39 | }
40 |
41 | Vector3Node.prototype.isVector3Node = true;
42 |
43 | export default Vector3Node;
44 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/inputs/Vector4Node.js:
--------------------------------------------------------------------------------
1 | import InputNode from '../core/InputNode.js';
2 | import { Vector4 } from 'three';
3 |
4 | class Vector4Node extends InputNode {
5 |
6 | constructor( value = new Vector4() ) {
7 |
8 | super( 'vec4' );
9 |
10 | this.value = value;
11 |
12 | }
13 |
14 | serialize( data ) {
15 |
16 | super.serialize( data );
17 |
18 | const { x, y, z, w } = this.value;
19 |
20 | data.x = x;
21 | data.y = y;
22 | data.z = z;
23 | data.w = w;
24 |
25 | }
26 |
27 | deserialize( data ) {
28 |
29 | super.serialize( data );
30 |
31 | const { x, y, z, w } = data;
32 | const value = this.value;
33 |
34 | value.x = x;
35 | value.y = y;
36 | value.z = z;
37 | value.w = w;
38 |
39 | }
40 |
41 | }
42 |
43 | Vector4Node.prototype.isVector4Node = true;
44 |
45 | export default Vector4Node;
46 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/lights/LightsNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 | import LightNode from './LightNode.js';
3 |
4 | class LightsNode extends Node {
5 |
6 | constructor( lightNodes = [] ) {
7 |
8 | super( 'vec3' );
9 |
10 | this.lightNodes = lightNodes;
11 |
12 | }
13 |
14 | generate( builder ) {
15 |
16 | const lightNodes = this.lightNodes;
17 |
18 | for ( const lightNode of lightNodes ) {
19 |
20 | lightNode.build( builder );
21 |
22 | }
23 |
24 | return 'vec3( 0.0 )';
25 |
26 | }
27 |
28 | static fromLights( lights ) {
29 |
30 | const lightNodes = [];
31 |
32 | for ( const light of lights ) {
33 |
34 | lightNodes.push( new LightNode( light ) );
35 |
36 | }
37 |
38 | return new LightsNode( lightNodes );
39 |
40 | }
41 |
42 | }
43 |
44 | export default LightsNode;
45 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/loaders/NodeMaterialLoader.js:
--------------------------------------------------------------------------------
1 | import { MaterialLoader } from 'three';
2 |
3 | class NodeMaterialLoader extends MaterialLoader {
4 |
5 | constructor( manager ) {
6 |
7 | super( manager );
8 |
9 | this.nodes = {};
10 |
11 | }
12 |
13 | parse( json ) {
14 |
15 | const material = super.parse( json );
16 |
17 | const nodes = this.nodes;
18 | const inputNodes = json.inputNodes;
19 |
20 | for ( const property in inputNodes ) {
21 |
22 | const uuid = inputNodes[ property ];
23 |
24 | material[ property ] = nodes[ uuid ];
25 |
26 | }
27 |
28 | return material;
29 |
30 | }
31 |
32 | setNodes( value ) {
33 |
34 | this.nodes = value;
35 |
36 | return this;
37 |
38 | }
39 |
40 | }
41 |
42 | export default NodeMaterialLoader;
43 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/materials/LineBasicNodeMaterial.js:
--------------------------------------------------------------------------------
1 | import NodeMaterial from './NodeMaterial.js';
2 | import { LineBasicMaterial } from 'three';
3 |
4 | const defaultValues = new LineBasicMaterial();
5 |
6 | class LineBasicNodeMaterial extends NodeMaterial {
7 |
8 | constructor( parameters ) {
9 |
10 | super();
11 |
12 | this.colorNode = null;
13 | this.opacityNode = null;
14 |
15 | this.alphaTestNode = null;
16 |
17 | this.lightNode = null;
18 |
19 | this.positionNode = null;
20 |
21 | this.setDefaultValues( defaultValues );
22 |
23 | this.setValues( parameters );
24 |
25 | }
26 |
27 | copy( source ) {
28 |
29 | this.colorNode = source.colorNode;
30 | this.opacityNode = source.opacityNode;
31 |
32 | this.alphaTestNode = source.alphaTestNode;
33 |
34 | this.lightNode = source.lightNode;
35 |
36 | this.positionNode = source.positionNode;
37 |
38 | return super.copy( source );
39 |
40 | }
41 |
42 | }
43 |
44 | LineBasicNodeMaterial.prototype.isNodeMaterial = true;
45 |
46 | export default LineBasicNodeMaterial;
47 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/materials/Materials.js:
--------------------------------------------------------------------------------
1 | import LineBasicNodeMaterial from './LineBasicNodeMaterial.js';
2 | import MeshBasicNodeMaterial from './MeshBasicNodeMaterial.js';
3 | import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js';
4 | import PointsNodeMaterial from './PointsNodeMaterial.js';
5 | import { Material } from 'three';
6 |
7 | export {
8 | LineBasicNodeMaterial,
9 | MeshBasicNodeMaterial,
10 | MeshStandardNodeMaterial,
11 | PointsNodeMaterial
12 | };
13 |
14 | const materialLib = {
15 | LineBasicNodeMaterial,
16 | MeshBasicNodeMaterial,
17 | MeshStandardNodeMaterial,
18 | PointsNodeMaterial
19 | };
20 |
21 | const fromTypeFunction = Material.fromType;
22 |
23 | Material.fromType = function ( type ) {
24 |
25 | if ( materialLib[ type ] !== undefined ) {
26 |
27 | return new materialLib[ type ]();
28 |
29 | }
30 |
31 | return fromTypeFunction.call( this, type );
32 |
33 | };
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.js:
--------------------------------------------------------------------------------
1 | import NodeMaterial from './NodeMaterial.js';
2 | import { MeshBasicMaterial } from 'three';
3 |
4 | const defaultValues = new MeshBasicMaterial();
5 |
6 | class MeshBasicNodeMaterial extends NodeMaterial {
7 |
8 | constructor( parameters ) {
9 |
10 | super();
11 |
12 | this.colorNode = null;
13 | this.opacityNode = null;
14 |
15 | this.alphaTestNode = null;
16 |
17 | this.lightNode = null;
18 |
19 | this.positionNode = null;
20 |
21 | this.setDefaultValues( defaultValues );
22 |
23 | this.setValues( parameters );
24 |
25 | }
26 |
27 | copy( source ) {
28 |
29 | this.colorNode = source.colorNode;
30 | this.opacityNode = source.opacityNode;
31 |
32 | this.alphaTestNode = source.alphaTestNode;
33 |
34 | this.lightNode = source.lightNode;
35 |
36 | this.positionNode = source.positionNode;
37 |
38 | return super.copy( source );
39 |
40 | }
41 |
42 | }
43 |
44 | MeshBasicNodeMaterial.prototype.isNodeMaterial = true;
45 |
46 | export default MeshBasicNodeMaterial;
47 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/materials/PointsNodeMaterial.js:
--------------------------------------------------------------------------------
1 | import NodeMaterial from './NodeMaterial.js';
2 | import { PointsMaterial } from 'three';
3 |
4 | const defaultValues = new PointsMaterial();
5 |
6 | class PointsNodeMaterial extends NodeMaterial {
7 |
8 | constructor( parameters ) {
9 |
10 | super();
11 |
12 | this.colorNode = null;
13 | this.opacityNode = null;
14 |
15 | this.alphaTestNode = null;
16 |
17 | this.lightNode = null;
18 |
19 | this.sizeNode = null;
20 |
21 | this.positionNode = null;
22 |
23 | this.setDefaultValues( defaultValues );
24 |
25 | this.setValues( parameters );
26 |
27 | }
28 |
29 | copy( source ) {
30 |
31 | this.colorNode = source.colorNode;
32 | this.opacityNode = source.opacityNode;
33 |
34 | this.alphaTestNode = source.alphaTestNode;
35 |
36 | this.lightNode = source.lightNode;
37 |
38 | this.sizeNode = source.sizeNode;
39 |
40 | this.positionNode = source.positionNode;
41 |
42 | return super.copy( source );
43 |
44 | }
45 |
46 | }
47 |
48 | PointsNodeMaterial.prototype.isNodeMaterial = true;
49 |
50 | export default PointsNodeMaterial;
51 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/parsers/GLSLNodeParser.js:
--------------------------------------------------------------------------------
1 | import NodeParser from '../core/NodeParser.js';
2 | import GLSLNodeFunction from './GLSLNodeFunction.js';
3 |
4 | class GLSLNodeParser extends NodeParser {
5 |
6 | parseFunction( source ) {
7 |
8 | return new GLSLNodeFunction( source );
9 |
10 | }
11 |
12 | }
13 |
14 | export default GLSLNodeParser;
15 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/parsers/WGSLNodeParser.js:
--------------------------------------------------------------------------------
1 | import NodeParser from '../core/NodeParser.js';
2 | import WGSLNodeFunction from './WGSLNodeFunction.js';
3 |
4 | class WGSLNodeParser extends NodeParser {
5 |
6 | parseFunction( source ) {
7 |
8 | return new WGSLNodeFunction( source );
9 |
10 | }
11 |
12 | }
13 |
14 | export default WGSLNodeParser;
15 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/procedural/CheckerNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 | import UVNode from '../accessors/UVNode.js';
3 |
4 | import { ShaderNode, add, mul, floor, mod, sign } from '../ShaderNode.js';
5 |
6 | const checkerShaderNode = new ShaderNode( ( inputs ) => {
7 |
8 | const uv = mul( inputs.uv, 2.0 );
9 |
10 | const cx = floor( uv.x );
11 | const cy = floor( uv.y );
12 | const result = mod( add( cx, cy ), 2.0 );
13 |
14 | return sign( result );
15 |
16 | } );
17 |
18 | class CheckerNode extends Node {
19 |
20 | constructor( uvNode = new UVNode() ) {
21 |
22 | super( 'float' );
23 |
24 | this.uvNode = uvNode;
25 |
26 | }
27 |
28 | generate( builder ) {
29 |
30 | return checkerShaderNode( { uv: this.uvNode } ).build( builder );
31 |
32 | }
33 |
34 | }
35 |
36 | export default CheckerNode;
37 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/utils/ArrayElementNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 |
3 | class ArrayElementNode extends Node {
4 |
5 | constructor( node, indexNode ) {
6 |
7 | super();
8 |
9 | this.node = node;
10 | this.indexNode = indexNode;
11 |
12 | }
13 |
14 | getNodeType( builder ) {
15 |
16 | return this.node.getNodeType( builder );
17 |
18 | }
19 |
20 | generate( builder ) {
21 |
22 | const nodeSnippet = this.node.build( builder );
23 | const indexSnippet = this.indexNode.build( builder, 'int' );
24 |
25 | return `${nodeSnippet}[ ${indexSnippet} ]`;
26 |
27 | }
28 |
29 | }
30 |
31 | export default ArrayElementNode;
32 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/utils/ConvertNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 |
3 | class ConvertNode extends Node {
4 |
5 | constructor( node, convertTo ) {
6 |
7 | super();
8 |
9 | this.node = node;
10 | this.convertTo = convertTo;
11 |
12 | }
13 |
14 | getNodeType( /*builder*/ ) {
15 |
16 | return this.convertTo;
17 |
18 | }
19 |
20 | generate( builder ) {
21 |
22 | const convertTo = this.convertTo;
23 |
24 | const convertToSnippet = builder.getType( convertTo );
25 | const nodeSnippet = this.node.build( builder, convertTo );
26 |
27 | return `${ convertToSnippet }( ${ nodeSnippet } )`;
28 |
29 | }
30 |
31 | }
32 |
33 | export default ConvertNode;
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/nodes/utils/JoinNode.js:
--------------------------------------------------------------------------------
1 | import Node from '../core/Node.js';
2 |
3 | class JoinNode extends Node {
4 |
5 | constructor( nodes = [] ) {
6 |
7 | super();
8 |
9 | this.nodes = nodes;
10 |
11 | }
12 |
13 | getNodeType( builder ) {
14 |
15 | return builder.getTypeFromLength( this.nodes.reduce( ( count, cur ) => count + builder.getTypeLength( cur.getNodeType( builder ) ), 0 ) );
16 |
17 | }
18 |
19 | generate( builder ) {
20 |
21 | const type = this.getNodeType( builder );
22 | const nodes = this.nodes;
23 |
24 | const snippetValues = [];
25 |
26 | for ( let i = 0; i < nodes.length; i ++ ) {
27 |
28 | const input = nodes[ i ];
29 |
30 | const inputSnippet = input.build( builder );
31 |
32 | snippetValues.push( inputSnippet );
33 |
34 | }
35 |
36 | return `${ builder.getType( type ) }( ${ snippetValues.join( ', ' ) } )`;
37 |
38 | }
39 |
40 | }
41 |
42 | export default JoinNode;
43 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/offscreen/jank.js:
--------------------------------------------------------------------------------
1 | let interval = null;
2 | let result = null;
3 |
4 | function initJank() {
5 |
6 | const button = document.getElementById( 'button' );
7 | button.addEventListener( 'click', function () {
8 |
9 | if ( interval === null ) {
10 |
11 | interval = setInterval( jank, 1000 / 60 );
12 |
13 | button.textContent = 'STOP JANK';
14 |
15 | } else {
16 |
17 | clearInterval( interval );
18 | interval = null;
19 |
20 | button.textContent = 'START JANK';
21 | result.textContent = '';
22 |
23 | }
24 |
25 | } );
26 |
27 | result = document.getElementById( 'result' );
28 |
29 | }
30 |
31 | function jank() {
32 |
33 | let number = 0;
34 |
35 | for ( let i = 0; i < 10000000; i ++ ) {
36 |
37 | number += Math.random();
38 |
39 | }
40 |
41 | result.textContent = number;
42 |
43 | }
44 |
45 | export default initJank;
46 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/offscreen/offscreen.js:
--------------------------------------------------------------------------------
1 | import init from './scene.js';
2 |
3 | self.onmessage = function ( message ) {
4 |
5 | const data = message.data;
6 | init( data.drawingSurface, data.width, data.height, data.pixelRatio, data.path );
7 |
8 | };
9 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "type": "module"
3 | }
4 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/postprocessing/ClearPass.js:
--------------------------------------------------------------------------------
1 | import {
2 | Color
3 | } from 'three';
4 | import { Pass } from './Pass.js';
5 |
6 | class ClearPass extends Pass {
7 |
8 | constructor( clearColor, clearAlpha ) {
9 |
10 | super();
11 |
12 | this.needsSwap = false;
13 |
14 | this.clearColor = ( clearColor !== undefined ) ? clearColor : 0x000000;
15 | this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0;
16 | this._oldClearColor = new Color();
17 |
18 | }
19 |
20 | render( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {
21 |
22 | let oldClearAlpha;
23 |
24 | if ( this.clearColor ) {
25 |
26 | renderer.getClearColor( this._oldClearColor );
27 | oldClearAlpha = renderer.getClearAlpha();
28 |
29 | renderer.setClearColor( this.clearColor, this.clearAlpha );
30 |
31 | }
32 |
33 | renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
34 | renderer.clear();
35 |
36 | if ( this.clearColor ) {
37 |
38 | renderer.setClearColor( this._oldClearColor, oldClearAlpha );
39 |
40 | }
41 |
42 | }
43 |
44 | }
45 |
46 | export { ClearPass };
47 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgl/nodes/SlotNode.js:
--------------------------------------------------------------------------------
1 | import Node from 'three-nodes/core/Node.js';
2 |
3 | class SlotNode extends Node {
4 |
5 | constructor( node, name, nodeType ) {
6 |
7 | super( nodeType );
8 |
9 | this.node = node;
10 | this.name = name;
11 |
12 | }
13 |
14 | generate( builder ) {
15 |
16 | return this.node.build( builder, this.getNodeType( builder ) );
17 |
18 | }
19 |
20 | }
21 |
22 | export default SlotNode;
23 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgl/nodes/WebGLNodes.js:
--------------------------------------------------------------------------------
1 | import { WebGLNodeBuilder } from './WebGLNodeBuilder.js';
2 | import NodeFrame from 'three-nodes/core/NodeFrame.js';
3 |
4 | import { Material } from 'three';
5 |
6 | const builders = new WeakMap();
7 | export const nodeFrame = new NodeFrame();
8 |
9 | Material.prototype.onBuild = function ( object, parameters, renderer ) {
10 |
11 | builders.set( this, new WebGLNodeBuilder( object, renderer, parameters ).build() );
12 |
13 | };
14 |
15 | Material.prototype.onBeforeRender = function ( renderer, scene, camera, geometry, object ) {
16 |
17 | const nodeBuilder = builders.get( this );
18 |
19 | if ( nodeBuilder !== undefined ) {
20 |
21 | nodeFrame.material = this;
22 | nodeFrame.camera = camera;
23 | nodeFrame.object = object;
24 | nodeFrame.renderer = renderer;
25 |
26 | for ( const node of nodeBuilder.updateNodes ) {
27 |
28 | nodeFrame.updateNode( node );
29 |
30 | }
31 |
32 | }
33 |
34 | };
35 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.js:
--------------------------------------------------------------------------------
1 | import ContextNode from 'three-nodes/core/ContextNode.js';
2 | import NormalNode from 'three-nodes/accessors/NormalNode.js';
3 | import ExpressionNode from 'three-nodes/core/ExpressionNode.js';
4 | import FloatNode from 'three-nodes/inputs/FloatNode.js';
5 |
6 | class WebGLPhysicalContextNode extends ContextNode {
7 |
8 | static RADIANCE = 'radiance';
9 | static IRRADIANCE = 'irradiance';
10 |
11 | constructor( scope, node ) {
12 |
13 | super( node, 'vec3' );
14 |
15 | this.scope = scope;
16 |
17 | }
18 |
19 | generate( builder, output ) {
20 |
21 | const scope = this.scope;
22 |
23 | let roughness = null;
24 |
25 | if ( scope === WebGLPhysicalContextNode.RADIANCE ) {
26 |
27 | roughness = new ExpressionNode( 'roughnessFactor', 'float' );
28 |
29 | } else if ( scope === WebGLPhysicalContextNode.IRRADIANCE ) {
30 |
31 | roughness = new FloatNode( 1.0 ).setConst( true );
32 |
33 | this.context.uv = new NormalNode( NormalNode.WORLD );
34 |
35 | }
36 |
37 | this.context.roughness = roughness;
38 |
39 | return super.generate( builder, output );
40 |
41 | }
42 |
43 | }
44 |
45 | export default WebGLPhysicalContextNode;
46 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUBinding.js:
--------------------------------------------------------------------------------
1 | class WebGPUBinding {
2 |
3 | constructor( name = '' ) {
4 |
5 | this.name = name;
6 | this.visibility = null;
7 |
8 | this.type = null; // read-only
9 |
10 | this.isShared = false;
11 |
12 | }
13 |
14 | setVisibility( visibility ) {
15 |
16 | this.visibility = visibility;
17 |
18 | }
19 |
20 | }
21 |
22 | export default WebGPUBinding;
23 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUBufferUtils.js:
--------------------------------------------------------------------------------
1 | import { GPUChunkSize } from './constants.js';
2 |
3 | function getFloatLength( floatLength ) {
4 |
5 | // ensure chunk size alignment (STD140 layout)
6 |
7 | return floatLength + ( ( GPUChunkSize - ( floatLength % GPUChunkSize ) ) % GPUChunkSize );
8 |
9 | }
10 |
11 | function getVectorLength( count, vectorLength = 4 ) {
12 |
13 | const strideLength = getStrideLength( vectorLength );
14 |
15 | const floatLength = strideLength * count;
16 |
17 | return getFloatLength( floatLength );
18 |
19 | }
20 |
21 | function getStrideLength( vectorLength ) {
22 |
23 | const strideLength = 4;
24 |
25 | return vectorLength + ( ( strideLength - ( vectorLength % strideLength ) ) % strideLength );
26 |
27 | }
28 |
29 | export {
30 | getFloatLength,
31 | getVectorLength,
32 | getStrideLength
33 | };
34 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUObjects.js:
--------------------------------------------------------------------------------
1 | class WebGPUObjects {
2 |
3 | constructor( geometries, info ) {
4 |
5 | this.geometries = geometries;
6 | this.info = info;
7 |
8 | this.updateMap = new WeakMap();
9 |
10 | }
11 |
12 | update( object ) {
13 |
14 | const geometry = object.geometry;
15 | const updateMap = this.updateMap;
16 | const frame = this.info.render.frame;
17 |
18 | if ( geometry.isBufferGeometry !== true ) {
19 |
20 | throw new Error( 'THREE.WebGPURenderer: This renderer only supports THREE.BufferGeometry for geometries.' );
21 |
22 | }
23 |
24 | if ( updateMap.get( geometry ) !== frame ) {
25 |
26 | this.geometries.update( geometry );
27 |
28 | updateMap.set( geometry, frame );
29 |
30 | }
31 |
32 | }
33 |
34 | dispose() {
35 |
36 | this.updateMap = new WeakMap();
37 |
38 | }
39 |
40 | }
41 |
42 | export default WebGPUObjects;
43 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUProgrammableStage.js:
--------------------------------------------------------------------------------
1 | let _id = 0;
2 |
3 | class WebGPUProgrammableStage {
4 |
5 | constructor( device, code, type ) {
6 |
7 | this.id = _id ++;
8 |
9 | this.code = code;
10 | this.type = type;
11 | this.usedTimes = 0;
12 |
13 | this.stage = {
14 | module: device.createShaderModule( { code } ),
15 | entryPoint: 'main'
16 | };
17 |
18 | }
19 |
20 | }
21 |
22 | export default WebGPUProgrammableStage;
23 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUProperties.js:
--------------------------------------------------------------------------------
1 | class WebGPUProperties {
2 |
3 | constructor() {
4 |
5 | this.properties = new WeakMap();
6 |
7 | }
8 |
9 | get( object ) {
10 |
11 | let map = this.properties.get( object );
12 |
13 | if ( map === undefined ) {
14 |
15 | map = {};
16 | this.properties.set( object, map );
17 |
18 | }
19 |
20 | return map;
21 |
22 | }
23 |
24 | remove( object ) {
25 |
26 | this.properties.delete( object );
27 |
28 | }
29 |
30 | dispose() {
31 |
32 | this.properties = new WeakMap();
33 |
34 | }
35 |
36 | }
37 |
38 | export default WebGPUProperties;
39 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUSampler.js:
--------------------------------------------------------------------------------
1 | import WebGPUBinding from './WebGPUBinding.js';
2 | import { GPUBindingType } from './constants.js';
3 |
4 | class WebGPUSampler extends WebGPUBinding {
5 |
6 | constructor( name, texture ) {
7 |
8 | super( name );
9 |
10 | this.texture = texture;
11 |
12 | this.type = GPUBindingType.Sampler;
13 | this.visibility = GPUShaderStage.FRAGMENT;
14 |
15 | this.samplerGPU = null; // set by the renderer
16 |
17 | }
18 |
19 | getTexture() {
20 |
21 | return this.texture;
22 |
23 | }
24 |
25 | }
26 |
27 | WebGPUSampler.prototype.isSampler = true;
28 |
29 | export default WebGPUSampler;
30 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUStorageBuffer.js:
--------------------------------------------------------------------------------
1 | import WebGPUBinding from './WebGPUBinding.js';
2 | import { GPUBindingType } from './constants.js';
3 |
4 | class WebGPUStorageBuffer extends WebGPUBinding {
5 |
6 | constructor( name, attribute ) {
7 |
8 | super( name );
9 |
10 | this.type = GPUBindingType.StorageBuffer;
11 |
12 | this.usage = GPUBufferUsage.VERTEX | GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_DST;
13 |
14 | this.attribute = attribute;
15 | this.bufferGPU = null; // set by the renderer
16 |
17 | }
18 |
19 | }
20 |
21 | WebGPUStorageBuffer.prototype.isStorageBuffer = true;
22 |
23 | export default WebGPUStorageBuffer;
24 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUTextureRenderer.js:
--------------------------------------------------------------------------------
1 | import { WebGLRenderTarget } from 'three';
2 |
3 | class WebGPUTextureRenderer {
4 |
5 | constructor( renderer, options = {} ) {
6 |
7 | this.renderer = renderer;
8 |
9 | // @TODO: Consider to introduce WebGPURenderTarget or rename WebGLRenderTarget to just RenderTarget
10 |
11 | this.renderTarget = new WebGLRenderTarget( options );
12 |
13 | }
14 |
15 | getTexture() {
16 |
17 | return this.renderTarget.texture;
18 |
19 | }
20 |
21 | setSize( width, height ) {
22 |
23 | this.renderTarget.setSize( width, height );
24 |
25 | }
26 |
27 | render( scene, camera ) {
28 |
29 | const renderer = this.renderer;
30 | const renderTarget = this.renderTarget;
31 |
32 | renderer.setRenderTarget( renderTarget );
33 | renderer.render( scene, camera );
34 | renderer.setRenderTarget( null );
35 |
36 | }
37 |
38 | }
39 |
40 | export default WebGPUTextureRenderer;
41 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/WebGPUUniformBuffer.js:
--------------------------------------------------------------------------------
1 | import WebGPUBinding from './WebGPUBinding.js';
2 | import { getFloatLength } from './WebGPUBufferUtils.js';
3 |
4 | import { GPUBindingType } from './constants.js';
5 |
6 | class WebGPUUniformBuffer extends WebGPUBinding {
7 |
8 | constructor( name, buffer = null ) {
9 |
10 | super( name );
11 |
12 | this.bytesPerElement = Float32Array.BYTES_PER_ELEMENT;
13 | this.type = GPUBindingType.UniformBuffer;
14 | this.visibility = GPUShaderStage.VERTEX;
15 |
16 | this.usage = GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST;
17 |
18 | this.buffer = buffer;
19 | this.bufferGPU = null; // set by the renderer
20 |
21 | }
22 |
23 | getByteLength() {
24 |
25 | return getFloatLength( this.buffer.byteLength );
26 |
27 | }
28 |
29 | getBuffer() {
30 |
31 | return this.buffer;
32 |
33 | }
34 |
35 | update() {
36 |
37 | return true;
38 |
39 | }
40 |
41 | }
42 |
43 | WebGPUUniformBuffer.prototype.isUniformBuffer = true;
44 |
45 | export default WebGPUUniformBuffer;
46 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/nodes/WebGPUNodeSampledTexture.js:
--------------------------------------------------------------------------------
1 | import { WebGPUSampledTexture } from '../WebGPUSampledTexture.js';
2 |
3 | class WebGPUNodeSampledTexture extends WebGPUSampledTexture {
4 |
5 | constructor( name, textureNode ) {
6 |
7 | super( name, textureNode.value );
8 |
9 | this.textureNode = textureNode;
10 |
11 | }
12 |
13 | getTexture() {
14 |
15 | return this.textureNode.value;
16 |
17 | }
18 |
19 | }
20 |
21 | export { WebGPUNodeSampledTexture };
22 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/nodes/WebGPUNodeSampler.js:
--------------------------------------------------------------------------------
1 | import WebGPUSampler from '../WebGPUSampler.js';
2 |
3 | class WebGPUNodeSampler extends WebGPUSampler {
4 |
5 | constructor( name, textureNode ) {
6 |
7 | super( name, textureNode.value );
8 |
9 | this.textureNode = textureNode;
10 |
11 | }
12 |
13 | getTexture() {
14 |
15 | return this.textureNode.value;
16 |
17 | }
18 |
19 | }
20 |
21 | export default WebGPUNodeSampler;
22 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/renderers/webgpu/nodes/WebGPUNodeUniformsGroup.js:
--------------------------------------------------------------------------------
1 | import WebGPUUniformsGroup from '../WebGPUUniformsGroup.js';
2 |
3 | class WebGPUNodeUniformsGroup extends WebGPUUniformsGroup {
4 |
5 | constructor( shaderStage ) {
6 |
7 | super( 'nodeUniforms' );
8 |
9 | let shaderStageVisibility;
10 |
11 | if ( shaderStage === 'vertex' ) shaderStageVisibility = GPUShaderStage.VERTEX;
12 | else if ( shaderStage === 'fragment' ) shaderStageVisibility = GPUShaderStage.FRAGMENT;
13 |
14 | this.setVisibility( shaderStageVisibility );
15 |
16 | }
17 |
18 | }
19 |
20 | export default WebGPUNodeUniformsGroup;
21 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/AfterimageShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Afterimage shader
3 | * I created this effect inspired by a demo on codepen:
4 | * https://codepen.io/brunoimbrizi/pen/MoRJaN?page=1&
5 | */
6 |
7 | const AfterimageShader = {
8 |
9 | uniforms: {
10 |
11 | 'damp': { value: 0.96 },
12 | 'tOld': { value: null },
13 | 'tNew': { value: null }
14 |
15 | },
16 |
17 | vertexShader: /* glsl */`
18 |
19 | varying vec2 vUv;
20 |
21 | void main() {
22 |
23 | vUv = uv;
24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
25 |
26 | }`,
27 |
28 | fragmentShader: /* glsl */`
29 |
30 | uniform float damp;
31 |
32 | uniform sampler2D tOld;
33 | uniform sampler2D tNew;
34 |
35 | varying vec2 vUv;
36 |
37 | vec4 when_gt( vec4 x, float y ) {
38 |
39 | return max( sign( x - y ), 0.0 );
40 |
41 | }
42 |
43 | void main() {
44 |
45 | vec4 texelOld = texture2D( tOld, vUv );
46 | vec4 texelNew = texture2D( tNew, vUv );
47 |
48 | texelOld *= damp * when_gt( texelOld, 0.1 );
49 |
50 | gl_FragColor = max(texelNew, texelOld);
51 |
52 | }`
53 |
54 | };
55 |
56 | export { AfterimageShader };
57 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/BasicShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Simple test shader
3 | */
4 |
5 | const BasicShader = {
6 |
7 | uniforms: {},
8 |
9 | vertexShader: /* glsl */`
10 |
11 | void main() {
12 |
13 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
14 |
15 | }`,
16 |
17 | fragmentShader: /* glsl */`
18 |
19 | void main() {
20 |
21 | gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );
22 |
23 | }`
24 |
25 | };
26 |
27 | export { BasicShader };
28 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/BlendShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Blend two textures
3 | */
4 |
5 | const BlendShader = {
6 |
7 | uniforms: {
8 |
9 | 'tDiffuse1': { value: null },
10 | 'tDiffuse2': { value: null },
11 | 'mixRatio': { value: 0.5 },
12 | 'opacity': { value: 1.0 }
13 |
14 | },
15 |
16 | vertexShader: /* glsl */`
17 |
18 | varying vec2 vUv;
19 |
20 | void main() {
21 |
22 | vUv = uv;
23 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
24 |
25 | }`,
26 |
27 | fragmentShader: /* glsl */`
28 |
29 | uniform float opacity;
30 | uniform float mixRatio;
31 |
32 | uniform sampler2D tDiffuse1;
33 | uniform sampler2D tDiffuse2;
34 |
35 | varying vec2 vUv;
36 |
37 | void main() {
38 |
39 | vec4 texel1 = texture2D( tDiffuse1, vUv );
40 | vec4 texel2 = texture2D( tDiffuse2, vUv );
41 | gl_FragColor = opacity * mix( texel1, texel2, mixRatio );
42 |
43 | }`
44 |
45 | };
46 |
47 | export { BlendShader };
48 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/ColorCorrectionShader.js:
--------------------------------------------------------------------------------
1 | import {
2 | Vector3
3 | } from 'three';
4 |
5 | /**
6 | * Color correction
7 | */
8 |
9 | const ColorCorrectionShader = {
10 |
11 | uniforms: {
12 |
13 | 'tDiffuse': { value: null },
14 | 'powRGB': { value: new Vector3( 2, 2, 2 ) },
15 | 'mulRGB': { value: new Vector3( 1, 1, 1 ) },
16 | 'addRGB': { value: new Vector3( 0, 0, 0 ) }
17 |
18 | },
19 |
20 | vertexShader: /* glsl */`
21 |
22 | varying vec2 vUv;
23 |
24 | void main() {
25 |
26 | vUv = uv;
27 |
28 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
29 |
30 | }`,
31 |
32 | fragmentShader: /* glsl */`
33 |
34 | uniform sampler2D tDiffuse;
35 | uniform vec3 powRGB;
36 | uniform vec3 mulRGB;
37 | uniform vec3 addRGB;
38 |
39 | varying vec2 vUv;
40 |
41 | void main() {
42 |
43 | gl_FragColor = texture2D( tDiffuse, vUv );
44 | gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );
45 |
46 | }`
47 |
48 | };
49 |
50 | export { ColorCorrectionShader };
51 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/ColorifyShader.js:
--------------------------------------------------------------------------------
1 | import {
2 | Color
3 | } from 'three';
4 |
5 | /**
6 | * Colorify shader
7 | */
8 |
9 | const ColorifyShader = {
10 |
11 | uniforms: {
12 |
13 | 'tDiffuse': { value: null },
14 | 'color': { value: new Color( 0xffffff ) }
15 |
16 | },
17 |
18 | vertexShader: /* glsl */`
19 |
20 | varying vec2 vUv;
21 |
22 | void main() {
23 |
24 | vUv = uv;
25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
26 |
27 | }`,
28 |
29 | fragmentShader: /* glsl */`
30 |
31 | uniform vec3 color;
32 | uniform sampler2D tDiffuse;
33 |
34 | varying vec2 vUv;
35 |
36 | void main() {
37 |
38 | vec4 texel = texture2D( tDiffuse, vUv );
39 |
40 | vec3 luma = vec3( 0.299, 0.587, 0.114 );
41 | float v = dot( texel.xyz, luma );
42 |
43 | gl_FragColor = vec4( v * color, texel.w );
44 |
45 | }`
46 |
47 | };
48 |
49 | export { ColorifyShader };
50 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/CopyShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Full-screen textured quad shader
3 | */
4 |
5 | const CopyShader = {
6 |
7 | uniforms: {
8 |
9 | 'tDiffuse': { value: null },
10 | 'opacity': { value: 1.0 }
11 |
12 | },
13 |
14 | vertexShader: /* glsl */`
15 |
16 | varying vec2 vUv;
17 |
18 | void main() {
19 |
20 | vUv = uv;
21 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
22 |
23 | }`,
24 |
25 | fragmentShader: /* glsl */`
26 |
27 | uniform float opacity;
28 |
29 | uniform sampler2D tDiffuse;
30 |
31 | varying vec2 vUv;
32 |
33 | void main() {
34 |
35 | vec4 texel = texture2D( tDiffuse, vUv );
36 | gl_FragColor = opacity * texel;
37 |
38 | }`
39 |
40 | };
41 |
42 | export { CopyShader };
43 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/DOFMipMapShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Depth-of-field shader using mipmaps
3 | * - from Matt Handley @applmak
4 | * - requires power-of-2 sized render target with enabled mipmaps
5 | */
6 |
7 | const DOFMipMapShader = {
8 |
9 | uniforms: {
10 |
11 | 'tColor': { value: null },
12 | 'tDepth': { value: null },
13 | 'focus': { value: 1.0 },
14 | 'maxblur': { value: 1.0 }
15 |
16 | },
17 |
18 | vertexShader: /* glsl */`
19 |
20 | varying vec2 vUv;
21 |
22 | void main() {
23 |
24 | vUv = uv;
25 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
26 |
27 | }`,
28 |
29 | fragmentShader: /* glsl */`
30 |
31 | uniform float focus;
32 | uniform float maxblur;
33 |
34 | uniform sampler2D tColor;
35 | uniform sampler2D tDepth;
36 |
37 | varying vec2 vUv;
38 |
39 | void main() {
40 |
41 | vec4 depth = texture2D( tDepth, vUv );
42 |
43 | float factor = depth.x - focus;
44 |
45 | vec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );
46 |
47 | gl_FragColor = col;
48 | gl_FragColor.a = 1.0;
49 |
50 | }`
51 |
52 | };
53 |
54 | export { DOFMipMapShader };
55 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/GammaCorrectionShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Gamma Correction Shader
3 | * http://en.wikipedia.org/wiki/gamma_correction
4 | */
5 |
6 | const GammaCorrectionShader = {
7 |
8 | uniforms: {
9 |
10 | 'tDiffuse': { value: null }
11 |
12 | },
13 |
14 | vertexShader: /* glsl */`
15 |
16 | varying vec2 vUv;
17 |
18 | void main() {
19 |
20 | vUv = uv;
21 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
22 |
23 | }`,
24 |
25 | fragmentShader: /* glsl */`
26 |
27 | uniform sampler2D tDiffuse;
28 |
29 | varying vec2 vUv;
30 |
31 | void main() {
32 |
33 | vec4 tex = texture2D( tDiffuse, vUv );
34 |
35 | gl_FragColor = LinearTosRGB( tex );
36 |
37 | }`
38 |
39 | };
40 |
41 | export { GammaCorrectionShader };
42 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/LuminosityShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Luminosity
3 | * http://en.wikipedia.org/wiki/Luminosity
4 | */
5 |
6 | const LuminosityShader = {
7 |
8 | uniforms: {
9 |
10 | 'tDiffuse': { value: null }
11 |
12 | },
13 |
14 | vertexShader: /* glsl */`
15 |
16 | varying vec2 vUv;
17 |
18 | void main() {
19 |
20 | vUv = uv;
21 |
22 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
23 |
24 | }`,
25 |
26 | fragmentShader: /* glsl */`
27 |
28 | #include
29 |
30 | uniform sampler2D tDiffuse;
31 |
32 | varying vec2 vUv;
33 |
34 | void main() {
35 |
36 | vec4 texel = texture2D( tDiffuse, vUv );
37 |
38 | float l = linearToRelativeLuminance( texel.rgb );
39 |
40 | gl_FragColor = vec4( l, l, l, texel.w );
41 |
42 | }`
43 |
44 | };
45 |
46 | export { LuminosityShader };
47 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/MirrorShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Mirror Shader
3 | * Copies half the input to the other half
4 | *
5 | * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom)
6 | */
7 |
8 | const MirrorShader = {
9 |
10 | uniforms: {
11 |
12 | 'tDiffuse': { value: null },
13 | 'side': { value: 1 }
14 |
15 | },
16 |
17 | vertexShader: /* glsl */`
18 |
19 | varying vec2 vUv;
20 |
21 | void main() {
22 |
23 | vUv = uv;
24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
25 |
26 | }`,
27 |
28 | fragmentShader: /* glsl */`
29 |
30 | uniform sampler2D tDiffuse;
31 | uniform int side;
32 |
33 | varying vec2 vUv;
34 |
35 | void main() {
36 |
37 | vec2 p = vUv;
38 | if (side == 0){
39 | if (p.x > 0.5) p.x = 1.0 - p.x;
40 | }else if (side == 1){
41 | if (p.x < 0.5) p.x = 1.0 - p.x;
42 | }else if (side == 2){
43 | if (p.y < 0.5) p.y = 1.0 - p.y;
44 | }else if (side == 3){
45 | if (p.y > 0.5) p.y = 1.0 - p.y;
46 | }
47 | vec4 color = texture2D(tDiffuse, p);
48 | gl_FragColor = color;
49 |
50 | }`
51 |
52 | };
53 |
54 | export { MirrorShader };
55 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/NormalMapShader.js:
--------------------------------------------------------------------------------
1 | import {
2 | Vector2
3 | } from 'three';
4 |
5 | /**
6 | * Normal map shader
7 | * - compute normals from heightmap
8 | */
9 |
10 | const NormalMapShader = {
11 |
12 | uniforms: {
13 |
14 | 'heightMap': { value: null },
15 | 'resolution': { value: new Vector2( 512, 512 ) },
16 | 'scale': { value: new Vector2( 1, 1 ) },
17 | 'height': { value: 0.05 }
18 |
19 | },
20 |
21 | vertexShader: /* glsl */`
22 |
23 | varying vec2 vUv;
24 |
25 | void main() {
26 |
27 | vUv = uv;
28 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
29 |
30 | }`,
31 |
32 | fragmentShader: /* glsl */`
33 |
34 | uniform float height;
35 | uniform vec2 resolution;
36 | uniform sampler2D heightMap;
37 |
38 | varying vec2 vUv;
39 |
40 | void main() {
41 |
42 | float val = texture2D( heightMap, vUv ).x;
43 |
44 | float valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;
45 | float valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;
46 |
47 | gl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );
48 |
49 | }`
50 |
51 | };
52 |
53 | export { NormalMapShader };
54 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/PixelShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Pixelation shader
3 | */
4 |
5 | const PixelShader = {
6 |
7 | uniforms: {
8 |
9 | 'tDiffuse': { value: null },
10 | 'resolution': { value: null },
11 | 'pixelSize': { value: 1 },
12 |
13 | },
14 |
15 | vertexShader: /* glsl */`
16 |
17 | varying highp vec2 vUv;
18 |
19 | void main() {
20 |
21 | vUv = uv;
22 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
23 |
24 | }`,
25 |
26 | fragmentShader: /* glsl */`
27 |
28 | uniform sampler2D tDiffuse;
29 | uniform float pixelSize;
30 | uniform vec2 resolution;
31 |
32 | varying highp vec2 vUv;
33 |
34 | void main(){
35 |
36 | vec2 dxy = pixelSize / resolution;
37 | vec2 coord = dxy * floor( vUv / dxy );
38 | gl_FragColor = texture2D(tDiffuse, coord);
39 |
40 | }`
41 |
42 | };
43 |
44 | export { PixelShader };
45 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/SepiaShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sepia tone shader
3 | * based on glfx.js sepia shader
4 | * https://github.com/evanw/glfx.js
5 | */
6 |
7 | const SepiaShader = {
8 |
9 | uniforms: {
10 |
11 | 'tDiffuse': { value: null },
12 | 'amount': { value: 1.0 }
13 |
14 | },
15 |
16 | vertexShader: /* glsl */`
17 |
18 | varying vec2 vUv;
19 |
20 | void main() {
21 |
22 | vUv = uv;
23 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
24 |
25 | }`,
26 |
27 | fragmentShader: /* glsl */`
28 |
29 | uniform float amount;
30 |
31 | uniform sampler2D tDiffuse;
32 |
33 | varying vec2 vUv;
34 |
35 | void main() {
36 |
37 | vec4 color = texture2D( tDiffuse, vUv );
38 | vec3 c = color.rgb;
39 |
40 | color.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );
41 | color.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );
42 | color.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );
43 |
44 | gl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );
45 |
46 | }`
47 |
48 | };
49 |
50 | export { SepiaShader };
51 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/TechnicolorShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Technicolor Shader
3 | * Simulates the look of the two-strip technicolor process popular in early 20th century films.
4 | * More historical info here: http://www.widescreenmuseum.com/oldcolor/technicolor1.htm
5 | * Demo here: http://charliehoey.com/technicolor_shader/shader_test.html
6 | */
7 |
8 | const TechnicolorShader = {
9 |
10 | uniforms: {
11 |
12 | 'tDiffuse': { value: null }
13 |
14 | },
15 |
16 | vertexShader: /* glsl */`
17 |
18 | varying vec2 vUv;
19 |
20 | void main() {
21 |
22 | vUv = uv;
23 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
24 |
25 | }`,
26 |
27 | fragmentShader: /* glsl */`
28 |
29 | uniform sampler2D tDiffuse;
30 | varying vec2 vUv;
31 |
32 | void main() {
33 |
34 | vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );
35 | vec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);
36 |
37 | gl_FragColor = newTex;
38 |
39 | }`
40 |
41 | };
42 |
43 | export { TechnicolorShader };
44 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/UnpackDepthRGBAShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Unpack RGBA depth shader
3 | * - show RGBA encoded depth as monochrome color
4 | */
5 |
6 | const UnpackDepthRGBAShader = {
7 |
8 | uniforms: {
9 |
10 | 'tDiffuse': { value: null },
11 | 'opacity': { value: 1.0 }
12 |
13 | },
14 |
15 | vertexShader: /* glsl */`
16 |
17 | varying vec2 vUv;
18 |
19 | void main() {
20 |
21 | vUv = uv;
22 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
23 |
24 | }`,
25 |
26 | fragmentShader: /* glsl */`
27 |
28 | uniform float opacity;
29 |
30 | uniform sampler2D tDiffuse;
31 |
32 | varying vec2 vUv;
33 |
34 | #include
35 |
36 | void main() {
37 |
38 | float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );
39 | gl_FragColor = vec4( vec3( depth ), opacity );
40 |
41 | }`
42 |
43 | };
44 |
45 | export { UnpackDepthRGBAShader };
46 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/shaders/VignetteShader.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Vignette shader
3 | * based on PaintEffect postprocess from ro.me
4 | * http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js
5 | */
6 |
7 | const VignetteShader = {
8 |
9 | uniforms: {
10 |
11 | 'tDiffuse': { value: null },
12 | 'offset': { value: 1.0 },
13 | 'darkness': { value: 1.0 }
14 |
15 | },
16 |
17 | vertexShader: /* glsl */`
18 |
19 | varying vec2 vUv;
20 |
21 | void main() {
22 |
23 | vUv = uv;
24 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
25 |
26 | }`,
27 |
28 | fragmentShader: /* glsl */`
29 |
30 | uniform float offset;
31 | uniform float darkness;
32 |
33 | uniform sampler2D tDiffuse;
34 |
35 | varying vec2 vUv;
36 |
37 | void main() {
38 |
39 | // Eskil's vignette
40 |
41 | vec4 texel = texture2D( tDiffuse, vUv );
42 | vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );
43 | gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );
44 |
45 | }`
46 |
47 | };
48 |
49 | export { VignetteShader };
50 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/textures/FlakesTexture.js:
--------------------------------------------------------------------------------
1 | class FlakesTexture {
2 |
3 | constructor( width = 512, height = 512 ) {
4 |
5 | const canvas = document.createElement( 'canvas' );
6 | canvas.width = width;
7 | canvas.height = height;
8 |
9 | const context = canvas.getContext( '2d' );
10 | context.fillStyle = 'rgb(127,127,255)';
11 | context.fillRect( 0, 0, width, height );
12 |
13 | for ( let i = 0; i < 4000; i ++ ) {
14 |
15 | const x = Math.random() * width;
16 | const y = Math.random() * height;
17 | const r = Math.random() * 3 + 3;
18 |
19 | let nx = Math.random() * 2 - 1;
20 | let ny = Math.random() * 2 - 1;
21 | let nz = 1.5;
22 |
23 | const l = Math.sqrt( nx * nx + ny * ny + nz * nz );
24 |
25 | nx /= l; ny /= l; nz /= l;
26 |
27 | context.fillStyle = 'rgb(' + ( nx * 127 + 127 ) + ',' + ( ny * 127 + 127 ) + ',' + ( nz * 255 ) + ')';
28 | context.beginPath();
29 | context.arc( x, y, r, 0, Math.PI * 2 );
30 | context.fill();
31 |
32 | }
33 |
34 | return canvas;
35 |
36 | }
37 |
38 | }
39 |
40 | export { FlakesTexture };
41 |
--------------------------------------------------------------------------------
/node_modules/three/examples/jsm/webxr/Text2D.js:
--------------------------------------------------------------------------------
1 | import * as THREE from 'three';
2 |
3 | function createText( message, height ) {
4 |
5 | const canvas = document.createElement( 'canvas' );
6 | const context = canvas.getContext( '2d' );
7 | let metrics = null;
8 | const textHeight = 100;
9 | context.font = 'normal ' + textHeight + 'px Arial';
10 | metrics = context.measureText( message );
11 | const textWidth = metrics.width;
12 | canvas.width = textWidth;
13 | canvas.height = textHeight;
14 | context.font = 'normal ' + textHeight + 'px Arial';
15 | context.textAlign = 'center';
16 | context.textBaseline = 'middle';
17 | context.fillStyle = '#ffffff';
18 | context.fillText( message, textWidth / 2, textHeight / 2 );
19 |
20 | const texture = new THREE.Texture( canvas );
21 | texture.needsUpdate = true;
22 |
23 | const material = new THREE.MeshBasicMaterial( {
24 | color: 0xffffff,
25 | side: THREE.DoubleSide,
26 | map: texture,
27 | transparent: true,
28 | } );
29 | const geometry = new THREE.PlaneGeometry(
30 | ( height * textWidth ) / textHeight,
31 | height
32 | );
33 | const plane = new THREE.Mesh( geometry, material );
34 | return plane;
35 |
36 | }
37 |
38 | export { createText };
39 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/BooleanKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { InterpolateDiscrete } from '../../constants.js';
2 | import { KeyframeTrack } from '../KeyframeTrack.js';
3 |
4 | /**
5 | * A Track of Boolean keyframe values.
6 | */
7 | class BooleanKeyframeTrack extends KeyframeTrack {}
8 |
9 | BooleanKeyframeTrack.prototype.ValueTypeName = 'bool';
10 | BooleanKeyframeTrack.prototype.ValueBufferType = Array;
11 | BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;
12 | BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;
13 | BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
14 |
15 | // Note: Actually this track could have a optimized / compressed
16 | // representation of a single value and a custom interpolant that
17 | // computes "firstValue ^ isOdd( index )".
18 |
19 | export { BooleanKeyframeTrack };
20 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/ColorKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { KeyframeTrack } from '../KeyframeTrack.js';
2 |
3 | /**
4 | * A Track of keyframe values that represent color.
5 | */
6 | class ColorKeyframeTrack extends KeyframeTrack {}
7 |
8 | ColorKeyframeTrack.prototype.ValueTypeName = 'color';
9 | // ValueBufferType is inherited
10 | // DefaultInterpolation is inherited
11 |
12 | // Note: Very basic implementation and nothing special yet.
13 | // However, this is the place for color space parameterization.
14 |
15 | export { ColorKeyframeTrack };
16 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/NumberKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { KeyframeTrack } from '../KeyframeTrack.js';
2 |
3 | /**
4 | * A Track of numeric keyframe values.
5 | */
6 | class NumberKeyframeTrack extends KeyframeTrack {}
7 |
8 | NumberKeyframeTrack.prototype.ValueTypeName = 'number';
9 | // ValueBufferType is inherited
10 | // DefaultInterpolation is inherited
11 |
12 | export { NumberKeyframeTrack };
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/QuaternionKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { InterpolateLinear } from '../../constants.js';
2 | import { KeyframeTrack } from '../KeyframeTrack.js';
3 | import { QuaternionLinearInterpolant } from '../../math/interpolants/QuaternionLinearInterpolant.js';
4 |
5 | /**
6 | * A Track of quaternion keyframe values.
7 | */
8 | class QuaternionKeyframeTrack extends KeyframeTrack {
9 |
10 | InterpolantFactoryMethodLinear( result ) {
11 |
12 | return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );
13 |
14 | }
15 |
16 | }
17 |
18 | QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';
19 | // ValueBufferType is inherited
20 | QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;
21 | QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
22 |
23 | export { QuaternionKeyframeTrack };
24 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/StringKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { InterpolateDiscrete } from '../../constants.js';
2 | import { KeyframeTrack } from '../KeyframeTrack.js';
3 |
4 | /**
5 | * A Track that interpolates Strings
6 | */
7 | class StringKeyframeTrack extends KeyframeTrack {}
8 |
9 | StringKeyframeTrack.prototype.ValueTypeName = 'string';
10 | StringKeyframeTrack.prototype.ValueBufferType = Array;
11 | StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;
12 | StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;
13 | StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;
14 |
15 | export { StringKeyframeTrack };
16 |
--------------------------------------------------------------------------------
/node_modules/three/src/animation/tracks/VectorKeyframeTrack.js:
--------------------------------------------------------------------------------
1 | import { KeyframeTrack } from '../KeyframeTrack.js';
2 |
3 | /**
4 | * A Track of vectored keyframe values.
5 | */
6 | class VectorKeyframeTrack extends KeyframeTrack {}
7 |
8 | VectorKeyframeTrack.prototype.ValueTypeName = 'vector';
9 | // ValueBufferType is inherited
10 | // DefaultInterpolation is inherited
11 |
12 | export { VectorKeyframeTrack };
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/audio/AudioAnalyser.js:
--------------------------------------------------------------------------------
1 | class AudioAnalyser {
2 |
3 | constructor( audio, fftSize = 2048 ) {
4 |
5 | this.analyser = audio.context.createAnalyser();
6 | this.analyser.fftSize = fftSize;
7 |
8 | this.data = new Uint8Array( this.analyser.frequencyBinCount );
9 |
10 | audio.getOutput().connect( this.analyser );
11 |
12 | }
13 |
14 |
15 | getFrequencyData() {
16 |
17 | this.analyser.getByteFrequencyData( this.data );
18 |
19 | return this.data;
20 |
21 | }
22 |
23 | getAverageFrequency() {
24 |
25 | let value = 0;
26 | const data = this.getFrequencyData();
27 |
28 | for ( let i = 0; i < data.length; i ++ ) {
29 |
30 | value += data[ i ];
31 |
32 | }
33 |
34 | return value / data.length;
35 |
36 | }
37 |
38 | }
39 |
40 | export { AudioAnalyser };
41 |
--------------------------------------------------------------------------------
/node_modules/three/src/audio/AudioContext.js:
--------------------------------------------------------------------------------
1 | let _context;
2 |
3 | const AudioContext = {
4 |
5 | getContext: function () {
6 |
7 | if ( _context === undefined ) {
8 |
9 | _context = new ( window.AudioContext || window.webkitAudioContext )();
10 |
11 | }
12 |
13 | return _context;
14 |
15 | },
16 |
17 | setContext: function ( value ) {
18 |
19 | _context = value;
20 |
21 | }
22 |
23 | };
24 |
25 | export { AudioContext };
26 |
--------------------------------------------------------------------------------
/node_modules/three/src/cameras/ArrayCamera.js:
--------------------------------------------------------------------------------
1 | import { PerspectiveCamera } from './PerspectiveCamera.js';
2 |
3 | class ArrayCamera extends PerspectiveCamera {
4 |
5 | constructor( array = [] ) {
6 |
7 | super();
8 |
9 | this.cameras = array;
10 |
11 | }
12 |
13 | }
14 |
15 | ArrayCamera.prototype.isArrayCamera = true;
16 |
17 |
18 | export { ArrayCamera };
19 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/Clock.js:
--------------------------------------------------------------------------------
1 | class Clock {
2 |
3 | constructor( autoStart = true ) {
4 |
5 | this.autoStart = autoStart;
6 |
7 | this.startTime = 0;
8 | this.oldTime = 0;
9 | this.elapsedTime = 0;
10 |
11 | this.running = false;
12 |
13 | }
14 |
15 | start() {
16 |
17 | this.startTime = now();
18 |
19 | this.oldTime = this.startTime;
20 | this.elapsedTime = 0;
21 | this.running = true;
22 |
23 | }
24 |
25 | stop() {
26 |
27 | this.getElapsedTime();
28 | this.running = false;
29 | this.autoStart = false;
30 |
31 | }
32 |
33 | getElapsedTime() {
34 |
35 | this.getDelta();
36 | return this.elapsedTime;
37 |
38 | }
39 |
40 | getDelta() {
41 |
42 | let diff = 0;
43 |
44 | if ( this.autoStart && ! this.running ) {
45 |
46 | this.start();
47 | return 0;
48 |
49 | }
50 |
51 | if ( this.running ) {
52 |
53 | const newTime = now();
54 |
55 | diff = ( newTime - this.oldTime ) / 1000;
56 | this.oldTime = newTime;
57 |
58 | this.elapsedTime += diff;
59 |
60 | }
61 |
62 | return diff;
63 |
64 | }
65 |
66 | }
67 |
68 | function now() {
69 |
70 | return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732
71 |
72 | }
73 |
74 | export { Clock };
75 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/GLBufferAttribute.js:
--------------------------------------------------------------------------------
1 | class GLBufferAttribute {
2 |
3 | constructor( buffer, type, itemSize, elementSize, count ) {
4 |
5 | this.buffer = buffer;
6 | this.type = type;
7 | this.itemSize = itemSize;
8 | this.elementSize = elementSize;
9 | this.count = count;
10 |
11 | this.version = 0;
12 |
13 | }
14 |
15 | set needsUpdate( value ) {
16 |
17 | if ( value === true ) this.version ++;
18 |
19 | }
20 |
21 | setBuffer( buffer ) {
22 |
23 | this.buffer = buffer;
24 |
25 | return this;
26 |
27 | }
28 |
29 | setType( type, elementSize ) {
30 |
31 | this.type = type;
32 | this.elementSize = elementSize;
33 |
34 | return this;
35 |
36 | }
37 |
38 | setItemSize( itemSize ) {
39 |
40 | this.itemSize = itemSize;
41 |
42 | return this;
43 |
44 | }
45 |
46 | setCount( count ) {
47 |
48 | this.count = count;
49 |
50 | return this;
51 |
52 | }
53 |
54 | }
55 |
56 | GLBufferAttribute.prototype.isGLBufferAttribute = true;
57 |
58 | export { GLBufferAttribute };
59 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/InstancedBufferAttribute.js:
--------------------------------------------------------------------------------
1 | import { BufferAttribute } from './BufferAttribute.js';
2 |
3 | class InstancedBufferAttribute extends BufferAttribute {
4 |
5 | constructor( array, itemSize, normalized, meshPerAttribute = 1 ) {
6 |
7 | if ( typeof normalized === 'number' ) {
8 |
9 | meshPerAttribute = normalized;
10 |
11 | normalized = false;
12 |
13 | console.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );
14 |
15 | }
16 |
17 | super( array, itemSize, normalized );
18 |
19 | this.meshPerAttribute = meshPerAttribute;
20 |
21 | }
22 |
23 | copy( source ) {
24 |
25 | super.copy( source );
26 |
27 | this.meshPerAttribute = source.meshPerAttribute;
28 |
29 | return this;
30 |
31 | }
32 |
33 | toJSON() {
34 |
35 | const data = super.toJSON();
36 |
37 | data.meshPerAttribute = this.meshPerAttribute;
38 |
39 | data.isInstancedBufferAttribute = true;
40 |
41 | return data;
42 |
43 | }
44 |
45 | }
46 |
47 | InstancedBufferAttribute.prototype.isInstancedBufferAttribute = true;
48 |
49 | export { InstancedBufferAttribute };
50 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/InstancedBufferGeometry.js:
--------------------------------------------------------------------------------
1 | import { BufferGeometry } from './BufferGeometry.js';
2 |
3 | class InstancedBufferGeometry extends BufferGeometry {
4 |
5 | constructor() {
6 |
7 | super();
8 |
9 | this.type = 'InstancedBufferGeometry';
10 | this.instanceCount = Infinity;
11 |
12 | }
13 |
14 | copy( source ) {
15 |
16 | super.copy( source );
17 |
18 | this.instanceCount = source.instanceCount;
19 |
20 | return this;
21 |
22 | }
23 |
24 | clone() {
25 |
26 | return new this.constructor().copy( this );
27 |
28 | }
29 |
30 | toJSON() {
31 |
32 | const data = super.toJSON( this );
33 |
34 | data.instanceCount = this.instanceCount;
35 |
36 | data.isInstancedBufferGeometry = true;
37 |
38 | return data;
39 |
40 | }
41 |
42 | }
43 |
44 | InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;
45 |
46 | export { InstancedBufferGeometry };
47 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/InstancedInterleavedBuffer.js:
--------------------------------------------------------------------------------
1 | import { InterleavedBuffer } from './InterleavedBuffer.js';
2 |
3 | class InstancedInterleavedBuffer extends InterleavedBuffer {
4 |
5 | constructor( array, stride, meshPerAttribute = 1 ) {
6 |
7 | super( array, stride );
8 |
9 | this.meshPerAttribute = meshPerAttribute;
10 |
11 | }
12 |
13 | copy( source ) {
14 |
15 | super.copy( source );
16 |
17 | this.meshPerAttribute = source.meshPerAttribute;
18 |
19 | return this;
20 |
21 | }
22 |
23 | clone( data ) {
24 |
25 | const ib = super.clone( data );
26 |
27 | ib.meshPerAttribute = this.meshPerAttribute;
28 |
29 | return ib;
30 |
31 | }
32 |
33 | toJSON( data ) {
34 |
35 | const json = super.toJSON( data );
36 |
37 | json.isInstancedInterleavedBuffer = true;
38 | json.meshPerAttribute = this.meshPerAttribute;
39 |
40 | return json;
41 |
42 | }
43 |
44 | }
45 |
46 | InstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true;
47 |
48 | export { InstancedInterleavedBuffer };
49 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/Layers.js:
--------------------------------------------------------------------------------
1 | class Layers {
2 |
3 | constructor() {
4 |
5 | this.mask = 1 | 0;
6 |
7 | }
8 |
9 | set( channel ) {
10 |
11 | this.mask = ( 1 << channel | 0 ) >>> 0;
12 |
13 | }
14 |
15 | enable( channel ) {
16 |
17 | this.mask |= 1 << channel | 0;
18 |
19 | }
20 |
21 | enableAll() {
22 |
23 | this.mask = 0xffffffff | 0;
24 |
25 | }
26 |
27 | toggle( channel ) {
28 |
29 | this.mask ^= 1 << channel | 0;
30 |
31 | }
32 |
33 | disable( channel ) {
34 |
35 | this.mask &= ~ ( 1 << channel | 0 );
36 |
37 | }
38 |
39 | disableAll() {
40 |
41 | this.mask = 0;
42 |
43 | }
44 |
45 | test( layers ) {
46 |
47 | return ( this.mask & layers.mask ) !== 0;
48 |
49 | }
50 |
51 | isEnabled( channel ) {
52 |
53 | return ( this.mask & ( 1 << channel | 0 ) ) !== 0;
54 |
55 | }
56 |
57 | }
58 |
59 |
60 | export { Layers };
61 |
--------------------------------------------------------------------------------
/node_modules/three/src/core/Uniform.js:
--------------------------------------------------------------------------------
1 | class Uniform {
2 |
3 | constructor( value ) {
4 |
5 | if ( typeof value === 'string' ) {
6 |
7 | console.warn( 'THREE.Uniform: Type parameter is no longer needed.' );
8 | value = arguments[ 1 ];
9 |
10 | }
11 |
12 | this.value = value;
13 |
14 | }
15 |
16 | clone() {
17 |
18 | return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );
19 |
20 | }
21 |
22 | }
23 |
24 | export { Uniform };
25 |
--------------------------------------------------------------------------------
/node_modules/three/src/extras/curves/ArcCurve.js:
--------------------------------------------------------------------------------
1 | import { EllipseCurve } from './EllipseCurve.js';
2 |
3 | class ArcCurve extends EllipseCurve {
4 |
5 | constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {
6 |
7 | super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );
8 |
9 | this.type = 'ArcCurve';
10 |
11 | }
12 |
13 | }
14 |
15 | ArcCurve.prototype.isArcCurve = true;
16 |
17 | export { ArcCurve };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/extras/curves/Curves.js:
--------------------------------------------------------------------------------
1 | export { ArcCurve } from './ArcCurve.js';
2 | export { CatmullRomCurve3 } from './CatmullRomCurve3.js';
3 | export { CubicBezierCurve } from './CubicBezierCurve.js';
4 | export { CubicBezierCurve3 } from './CubicBezierCurve3.js';
5 | export { EllipseCurve } from './EllipseCurve.js';
6 | export { LineCurve } from './LineCurve.js';
7 | export { LineCurve3 } from './LineCurve3.js';
8 | export { QuadraticBezierCurve } from './QuadraticBezierCurve.js';
9 | export { QuadraticBezierCurve3 } from './QuadraticBezierCurve3.js';
10 | export { SplineCurve } from './SplineCurve.js';
11 |
--------------------------------------------------------------------------------
/node_modules/three/src/geometries/ConeGeometry.js:
--------------------------------------------------------------------------------
1 | import { CylinderGeometry } from './CylinderGeometry.js';
2 |
3 | class ConeGeometry extends CylinderGeometry {
4 |
5 | constructor( radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {
6 |
7 | super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );
8 |
9 | this.type = 'ConeGeometry';
10 |
11 | this.parameters = {
12 | radius: radius,
13 | height: height,
14 | radialSegments: radialSegments,
15 | heightSegments: heightSegments,
16 | openEnded: openEnded,
17 | thetaStart: thetaStart,
18 | thetaLength: thetaLength
19 | };
20 |
21 | }
22 |
23 | static fromJSON( data ) {
24 |
25 | return new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );
26 |
27 | }
28 |
29 | }
30 |
31 | export { ConeGeometry, ConeGeometry as ConeBufferGeometry };
32 |
--------------------------------------------------------------------------------
/node_modules/three/src/geometries/Geometries.js:
--------------------------------------------------------------------------------
1 | export * from './BoxGeometry.js';
2 | export * from './CircleGeometry.js';
3 | export * from './ConeGeometry.js';
4 | export * from './CylinderGeometry.js';
5 | export * from './DodecahedronGeometry.js';
6 | export * from './EdgesGeometry.js';
7 | export * from './ExtrudeGeometry.js';
8 | export * from './IcosahedronGeometry.js';
9 | export * from './LatheGeometry.js';
10 | export * from './OctahedronGeometry.js';
11 | export * from './PlaneGeometry.js';
12 | export * from './PolyhedronGeometry.js';
13 | export * from './RingGeometry.js';
14 | export * from './ShapeGeometry.js';
15 | export * from './SphereGeometry.js';
16 | export * from './TetrahedronGeometry.js';
17 | export * from './TorusGeometry.js';
18 | export * from './TorusKnotGeometry.js';
19 | export * from './TubeGeometry.js';
20 | export * from './WireframeGeometry.js';
21 |
--------------------------------------------------------------------------------
/node_modules/three/src/geometries/IcosahedronGeometry.js:
--------------------------------------------------------------------------------
1 | import { PolyhedronGeometry } from './PolyhedronGeometry.js';
2 |
3 | class IcosahedronGeometry extends PolyhedronGeometry {
4 |
5 | constructor( radius = 1, detail = 0 ) {
6 |
7 | const t = ( 1 + Math.sqrt( 5 ) ) / 2;
8 |
9 | const vertices = [
10 | - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, 0,
11 | 0, - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t,
12 | t, 0, - 1, t, 0, 1, - t, 0, - 1, - t, 0, 1
13 | ];
14 |
15 | const indices = [
16 | 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11,
17 | 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8,
18 | 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9,
19 | 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1
20 | ];
21 |
22 | super( vertices, indices, radius, detail );
23 |
24 | this.type = 'IcosahedronGeometry';
25 |
26 | this.parameters = {
27 | radius: radius,
28 | detail: detail
29 | };
30 |
31 | }
32 |
33 | static fromJSON( data ) {
34 |
35 | return new IcosahedronGeometry( data.radius, data.detail );
36 |
37 | }
38 |
39 | }
40 |
41 |
42 | export { IcosahedronGeometry, IcosahedronGeometry as IcosahedronBufferGeometry };
43 |
--------------------------------------------------------------------------------
/node_modules/three/src/geometries/OctahedronGeometry.js:
--------------------------------------------------------------------------------
1 | import { PolyhedronGeometry } from './PolyhedronGeometry.js';
2 |
3 | class OctahedronGeometry extends PolyhedronGeometry {
4 |
5 | constructor( radius = 1, detail = 0 ) {
6 |
7 | const vertices = [
8 | 1, 0, 0, - 1, 0, 0, 0, 1, 0,
9 | 0, - 1, 0, 0, 0, 1, 0, 0, - 1
10 | ];
11 |
12 | const indices = [
13 | 0, 2, 4, 0, 4, 3, 0, 3, 5,
14 | 0, 5, 2, 1, 2, 5, 1, 5, 3,
15 | 1, 3, 4, 1, 4, 2
16 | ];
17 |
18 | super( vertices, indices, radius, detail );
19 |
20 | this.type = 'OctahedronGeometry';
21 |
22 | this.parameters = {
23 | radius: radius,
24 | detail: detail
25 | };
26 |
27 | }
28 |
29 | static fromJSON( data ) {
30 |
31 | return new OctahedronGeometry( data.radius, data.detail );
32 |
33 | }
34 |
35 | }
36 |
37 | export { OctahedronGeometry, OctahedronGeometry as OctahedronBufferGeometry };
38 |
--------------------------------------------------------------------------------
/node_modules/three/src/geometries/TetrahedronGeometry.js:
--------------------------------------------------------------------------------
1 | import { PolyhedronGeometry } from './PolyhedronGeometry.js';
2 |
3 | class TetrahedronGeometry extends PolyhedronGeometry {
4 |
5 | constructor( radius = 1, detail = 0 ) {
6 |
7 | const vertices = [
8 | 1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1
9 | ];
10 |
11 | const indices = [
12 | 2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1
13 | ];
14 |
15 | super( vertices, indices, radius, detail );
16 |
17 | this.type = 'TetrahedronGeometry';
18 |
19 | this.parameters = {
20 | radius: radius,
21 | detail: detail
22 | };
23 |
24 | }
25 |
26 | static fromJSON( data ) {
27 |
28 | return new TetrahedronGeometry( data.radius, data.detail );
29 |
30 | }
31 |
32 | }
33 |
34 | export { TetrahedronGeometry, TetrahedronGeometry as TetrahedronBufferGeometry };
35 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/AmbientLight.js:
--------------------------------------------------------------------------------
1 | import { Light } from './Light.js';
2 |
3 | class AmbientLight extends Light {
4 |
5 | constructor( color, intensity ) {
6 |
7 | super( color, intensity );
8 |
9 | this.type = 'AmbientLight';
10 |
11 | }
12 |
13 | }
14 |
15 | AmbientLight.prototype.isAmbientLight = true;
16 |
17 | export { AmbientLight };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/AmbientLightProbe.js:
--------------------------------------------------------------------------------
1 | import { Color } from '../math/Color.js';
2 | import { LightProbe } from './LightProbe.js';
3 |
4 | class AmbientLightProbe extends LightProbe {
5 |
6 | constructor( color, intensity = 1 ) {
7 |
8 | super( undefined, intensity );
9 |
10 | const color1 = new Color().set( color );
11 |
12 | // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );
13 | this.sh.coefficients[ 0 ].set( color1.r, color1.g, color1.b ).multiplyScalar( 2 * Math.sqrt( Math.PI ) );
14 |
15 | }
16 |
17 | }
18 |
19 | AmbientLightProbe.prototype.isAmbientLightProbe = true;
20 |
21 | export { AmbientLightProbe };
22 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/DirectionalLight.js:
--------------------------------------------------------------------------------
1 | import { Light } from './Light.js';
2 | import { DirectionalLightShadow } from './DirectionalLightShadow.js';
3 | import { Object3D } from '../core/Object3D.js';
4 |
5 | class DirectionalLight extends Light {
6 |
7 | constructor( color, intensity ) {
8 |
9 | super( color, intensity );
10 |
11 | this.type = 'DirectionalLight';
12 |
13 | this.position.copy( Object3D.DefaultUp );
14 | this.updateMatrix();
15 |
16 | this.target = new Object3D();
17 |
18 | this.shadow = new DirectionalLightShadow();
19 |
20 | }
21 |
22 | dispose() {
23 |
24 | this.shadow.dispose();
25 |
26 | }
27 |
28 | copy( source ) {
29 |
30 | super.copy( source );
31 |
32 | this.target = source.target.clone();
33 | this.shadow = source.shadow.clone();
34 |
35 | return this;
36 |
37 | }
38 |
39 | }
40 |
41 | DirectionalLight.prototype.isDirectionalLight = true;
42 |
43 | export { DirectionalLight };
44 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/DirectionalLightShadow.js:
--------------------------------------------------------------------------------
1 | import { LightShadow } from './LightShadow.js';
2 | import { OrthographicCamera } from '../cameras/OrthographicCamera.js';
3 |
4 | class DirectionalLightShadow extends LightShadow {
5 |
6 | constructor() {
7 |
8 | super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
9 |
10 | }
11 |
12 | }
13 |
14 | DirectionalLightShadow.prototype.isDirectionalLightShadow = true;
15 |
16 | export { DirectionalLightShadow };
17 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/HemisphereLight.js:
--------------------------------------------------------------------------------
1 | import { Light } from './Light.js';
2 | import { Color } from '../math/Color.js';
3 | import { Object3D } from '../core/Object3D.js';
4 |
5 | class HemisphereLight extends Light {
6 |
7 | constructor( skyColor, groundColor, intensity ) {
8 |
9 | super( skyColor, intensity );
10 |
11 | this.type = 'HemisphereLight';
12 |
13 | this.position.copy( Object3D.DefaultUp );
14 | this.updateMatrix();
15 |
16 | this.groundColor = new Color( groundColor );
17 |
18 | }
19 |
20 | copy( source ) {
21 |
22 | Light.prototype.copy.call( this, source );
23 |
24 | this.groundColor.copy( source.groundColor );
25 |
26 | return this;
27 |
28 | }
29 |
30 | }
31 |
32 | HemisphereLight.prototype.isHemisphereLight = true;
33 |
34 | export { HemisphereLight };
35 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/HemisphereLightProbe.js:
--------------------------------------------------------------------------------
1 | import { Color } from '../math/Color.js';
2 | import { Vector3 } from '../math/Vector3.js';
3 | import { LightProbe } from './LightProbe.js';
4 |
5 | class HemisphereLightProbe extends LightProbe {
6 |
7 | constructor( skyColor, groundColor, intensity = 1 ) {
8 |
9 | super( undefined, intensity );
10 |
11 | const color1 = new Color().set( skyColor );
12 | const color2 = new Color().set( groundColor );
13 |
14 | const sky = new Vector3( color1.r, color1.g, color1.b );
15 | const ground = new Vector3( color2.r, color2.g, color2.b );
16 |
17 | // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );
18 | const c0 = Math.sqrt( Math.PI );
19 | const c1 = c0 * Math.sqrt( 0.75 );
20 |
21 | this.sh.coefficients[ 0 ].copy( sky ).add( ground ).multiplyScalar( c0 );
22 | this.sh.coefficients[ 1 ].copy( sky ).sub( ground ).multiplyScalar( c1 );
23 |
24 | }
25 |
26 | }
27 |
28 | HemisphereLightProbe.prototype.isHemisphereLightProbe = true;
29 |
30 | export { HemisphereLightProbe };
31 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/LightProbe.js:
--------------------------------------------------------------------------------
1 | import { SphericalHarmonics3 } from '../math/SphericalHarmonics3.js';
2 | import { Light } from './Light.js';
3 |
4 | class LightProbe extends Light {
5 |
6 | constructor( sh = new SphericalHarmonics3(), intensity = 1 ) {
7 |
8 | super( undefined, intensity );
9 |
10 | this.sh = sh;
11 |
12 | }
13 |
14 | copy( source ) {
15 |
16 | super.copy( source );
17 |
18 | this.sh.copy( source.sh );
19 |
20 | return this;
21 |
22 | }
23 |
24 | fromJSON( json ) {
25 |
26 | this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();
27 | this.sh.fromArray( json.sh );
28 |
29 | return this;
30 |
31 | }
32 |
33 | toJSON( meta ) {
34 |
35 | const data = super.toJSON( meta );
36 |
37 | data.object.sh = this.sh.toArray();
38 |
39 | return data;
40 |
41 | }
42 |
43 | }
44 |
45 | LightProbe.prototype.isLightProbe = true;
46 |
47 | export { LightProbe };
48 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/RectAreaLight.js:
--------------------------------------------------------------------------------
1 | import { Light } from './Light.js';
2 |
3 | class RectAreaLight extends Light {
4 |
5 | constructor( color, intensity, width = 10, height = 10 ) {
6 |
7 | super( color, intensity );
8 |
9 | this.type = 'RectAreaLight';
10 |
11 | this.width = width;
12 | this.height = height;
13 |
14 | }
15 |
16 | get power() {
17 |
18 | // compute the light's luminous power (in lumens) from its intensity (in nits)
19 | return this.intensity * this.width * this.height * Math.PI;
20 |
21 | }
22 |
23 | set power( power ) {
24 |
25 | // set the light's intensity (in nits) from the desired luminous power (in lumens)
26 | this.intensity = power / ( this.width * this.height * Math.PI );
27 |
28 | }
29 |
30 | copy( source ) {
31 |
32 | super.copy( source );
33 |
34 | this.width = source.width;
35 | this.height = source.height;
36 |
37 | return this;
38 |
39 | }
40 |
41 | toJSON( meta ) {
42 |
43 | const data = super.toJSON( meta );
44 |
45 | data.object.width = this.width;
46 | data.object.height = this.height;
47 |
48 | return data;
49 |
50 | }
51 |
52 | }
53 |
54 | RectAreaLight.prototype.isRectAreaLight = true;
55 |
56 | export { RectAreaLight };
57 |
--------------------------------------------------------------------------------
/node_modules/three/src/lights/SpotLightShadow.js:
--------------------------------------------------------------------------------
1 | import { LightShadow } from './LightShadow.js';
2 | import * as MathUtils from '../math/MathUtils.js';
3 | import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js';
4 |
5 | class SpotLightShadow extends LightShadow {
6 |
7 | constructor() {
8 |
9 | super( new PerspectiveCamera( 50, 1, 0.5, 500 ) );
10 |
11 | this.focus = 1;
12 |
13 | }
14 |
15 | updateMatrices( light ) {
16 |
17 | const camera = this.camera;
18 |
19 | const fov = MathUtils.RAD2DEG * 2 * light.angle * this.focus;
20 | const aspect = this.mapSize.width / this.mapSize.height;
21 | const far = light.distance || camera.far;
22 |
23 | if ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {
24 |
25 | camera.fov = fov;
26 | camera.aspect = aspect;
27 | camera.far = far;
28 | camera.updateProjectionMatrix();
29 |
30 | }
31 |
32 | super.updateMatrices( light );
33 |
34 | }
35 |
36 | copy( source ) {
37 |
38 | super.copy( source );
39 |
40 | this.focus = source.focus;
41 |
42 | return this;
43 |
44 | }
45 |
46 | }
47 |
48 | SpotLightShadow.prototype.isSpotLightShadow = true;
49 |
50 | export { SpotLightShadow };
51 |
--------------------------------------------------------------------------------
/node_modules/three/src/loaders/Cache.js:
--------------------------------------------------------------------------------
1 | const Cache = {
2 |
3 | enabled: false,
4 |
5 | files: {},
6 |
7 | add: function ( key, file ) {
8 |
9 | if ( this.enabled === false ) return;
10 |
11 | // console.log( 'THREE.Cache', 'Adding key:', key );
12 |
13 | this.files[ key ] = file;
14 |
15 | },
16 |
17 | get: function ( key ) {
18 |
19 | if ( this.enabled === false ) return;
20 |
21 | // console.log( 'THREE.Cache', 'Checking key:', key );
22 |
23 | return this.files[ key ];
24 |
25 | },
26 |
27 | remove: function ( key ) {
28 |
29 | delete this.files[ key ];
30 |
31 | },
32 |
33 | clear: function () {
34 |
35 | this.files = {};
36 |
37 | }
38 |
39 | };
40 |
41 |
42 | export { Cache };
43 |
--------------------------------------------------------------------------------
/node_modules/three/src/loaders/CubeTextureLoader.js:
--------------------------------------------------------------------------------
1 | import { ImageLoader } from './ImageLoader.js';
2 | import { CubeTexture } from '../textures/CubeTexture.js';
3 | import { Loader } from './Loader.js';
4 |
5 | class CubeTextureLoader extends Loader {
6 |
7 | constructor( manager ) {
8 |
9 | super( manager );
10 |
11 | }
12 |
13 | load( urls, onLoad, onProgress, onError ) {
14 |
15 | const texture = new CubeTexture();
16 |
17 | const loader = new ImageLoader( this.manager );
18 | loader.setCrossOrigin( this.crossOrigin );
19 | loader.setPath( this.path );
20 |
21 | let loaded = 0;
22 |
23 | function loadTexture( i ) {
24 |
25 | loader.load( urls[ i ], function ( image ) {
26 |
27 | texture.images[ i ] = image;
28 |
29 | loaded ++;
30 |
31 | if ( loaded === 6 ) {
32 |
33 | texture.needsUpdate = true;
34 |
35 | if ( onLoad ) onLoad( texture );
36 |
37 | }
38 |
39 | }, undefined, onError );
40 |
41 | }
42 |
43 | for ( let i = 0; i < urls.length; ++ i ) {
44 |
45 | loadTexture( i );
46 |
47 | }
48 |
49 | return texture;
50 |
51 | }
52 |
53 | }
54 |
55 |
56 | export { CubeTextureLoader };
57 |
--------------------------------------------------------------------------------
/node_modules/three/src/loaders/TextureLoader.js:
--------------------------------------------------------------------------------
1 | import { ImageLoader } from './ImageLoader.js';
2 | import { Texture } from '../textures/Texture.js';
3 | import { Loader } from './Loader.js';
4 |
5 | class TextureLoader extends Loader {
6 |
7 | constructor( manager ) {
8 |
9 | super( manager );
10 |
11 | }
12 |
13 | load( url, onLoad, onProgress, onError ) {
14 |
15 | const texture = new Texture();
16 |
17 | const loader = new ImageLoader( this.manager );
18 | loader.setCrossOrigin( this.crossOrigin );
19 | loader.setPath( this.path );
20 |
21 | loader.load( url, function ( image ) {
22 |
23 | texture.image = image;
24 | texture.needsUpdate = true;
25 |
26 | if ( onLoad !== undefined ) {
27 |
28 | onLoad( texture );
29 |
30 | }
31 |
32 | }, onProgress, onError );
33 |
34 | return texture;
35 |
36 | }
37 |
38 | }
39 |
40 |
41 | export { TextureLoader };
42 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/LineBasicMaterial.js:
--------------------------------------------------------------------------------
1 | import { Material } from './Material.js';
2 | import { Color } from '../math/Color.js';
3 |
4 | /**
5 | * parameters = {
6 | * color: ,
7 | * opacity: ,
8 | *
9 | * linewidth: ,
10 | * linecap: "round",
11 | * linejoin: "round"
12 | * }
13 | */
14 |
15 | class LineBasicMaterial extends Material {
16 |
17 | constructor( parameters ) {
18 |
19 | super();
20 |
21 | this.type = 'LineBasicMaterial';
22 |
23 | this.color = new Color( 0xffffff );
24 |
25 | this.linewidth = 1;
26 | this.linecap = 'round';
27 | this.linejoin = 'round';
28 |
29 | this.setValues( parameters );
30 |
31 | }
32 |
33 |
34 | copy( source ) {
35 |
36 | super.copy( source );
37 |
38 | this.color.copy( source.color );
39 |
40 | this.linewidth = source.linewidth;
41 | this.linecap = source.linecap;
42 | this.linejoin = source.linejoin;
43 |
44 | return this;
45 |
46 | }
47 |
48 | }
49 |
50 | LineBasicMaterial.prototype.isLineBasicMaterial = true;
51 |
52 | export { LineBasicMaterial };
53 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/LineDashedMaterial.js:
--------------------------------------------------------------------------------
1 | import { LineBasicMaterial } from './LineBasicMaterial.js';
2 |
3 | /**
4 | * parameters = {
5 | * color: ,
6 | * opacity: ,
7 | *
8 | * linewidth: ,
9 | *
10 | * scale: ,
11 | * dashSize: ,
12 | * gapSize:
13 | * }
14 | */
15 |
16 | class LineDashedMaterial extends LineBasicMaterial {
17 |
18 | constructor( parameters ) {
19 |
20 | super();
21 |
22 | this.type = 'LineDashedMaterial';
23 |
24 | this.scale = 1;
25 | this.dashSize = 3;
26 | this.gapSize = 1;
27 |
28 | this.setValues( parameters );
29 |
30 | }
31 |
32 | copy( source ) {
33 |
34 | super.copy( source );
35 |
36 | this.scale = source.scale;
37 | this.dashSize = source.dashSize;
38 | this.gapSize = source.gapSize;
39 |
40 | return this;
41 |
42 | }
43 |
44 | }
45 |
46 | LineDashedMaterial.prototype.isLineDashedMaterial = true;
47 |
48 | export { LineDashedMaterial };
49 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/PointsMaterial.js:
--------------------------------------------------------------------------------
1 | import { Material } from './Material.js';
2 | import { Color } from '../math/Color.js';
3 |
4 | /**
5 | * parameters = {
6 | * color: ,
7 | * opacity: ,
8 | * map: new THREE.Texture( ),
9 | * alphaMap: new THREE.Texture( ),
10 | *
11 | * size: ,
12 | * sizeAttenuation:
13 | *
14 | * }
15 | */
16 |
17 | class PointsMaterial extends Material {
18 |
19 | constructor( parameters ) {
20 |
21 | super();
22 |
23 | this.type = 'PointsMaterial';
24 |
25 | this.color = new Color( 0xffffff );
26 |
27 | this.map = null;
28 |
29 | this.alphaMap = null;
30 |
31 | this.size = 1;
32 | this.sizeAttenuation = true;
33 |
34 | this.setValues( parameters );
35 |
36 | }
37 |
38 | copy( source ) {
39 |
40 | super.copy( source );
41 |
42 | this.color.copy( source.color );
43 |
44 | this.map = source.map;
45 |
46 | this.alphaMap = source.alphaMap;
47 |
48 | this.size = source.size;
49 | this.sizeAttenuation = source.sizeAttenuation;
50 |
51 | return this;
52 |
53 | }
54 |
55 | }
56 |
57 | PointsMaterial.prototype.isPointsMaterial = true;
58 |
59 | export { PointsMaterial };
60 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/RawShaderMaterial.js:
--------------------------------------------------------------------------------
1 | import { ShaderMaterial } from './ShaderMaterial.js';
2 |
3 | class RawShaderMaterial extends ShaderMaterial {
4 |
5 | constructor( parameters ) {
6 |
7 | super( parameters );
8 |
9 | this.type = 'RawShaderMaterial';
10 |
11 | }
12 |
13 | }
14 |
15 | RawShaderMaterial.prototype.isRawShaderMaterial = true;
16 |
17 | export { RawShaderMaterial };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/ShadowMaterial.js:
--------------------------------------------------------------------------------
1 | import { Material } from './Material.js';
2 | import { Color } from '../math/Color.js';
3 |
4 | /**
5 | * parameters = {
6 | * color:
7 | * }
8 | */
9 |
10 | class ShadowMaterial extends Material {
11 |
12 | constructor( parameters ) {
13 |
14 | super();
15 |
16 | this.type = 'ShadowMaterial';
17 |
18 | this.color = new Color( 0x000000 );
19 | this.transparent = true;
20 |
21 | this.setValues( parameters );
22 |
23 | }
24 |
25 | copy( source ) {
26 |
27 | super.copy( source );
28 |
29 | this.color.copy( source.color );
30 |
31 | return this;
32 |
33 | }
34 |
35 | }
36 |
37 | ShadowMaterial.prototype.isShadowMaterial = true;
38 |
39 | export { ShadowMaterial };
40 |
--------------------------------------------------------------------------------
/node_modules/three/src/materials/SpriteMaterial.js:
--------------------------------------------------------------------------------
1 | import { Material } from './Material.js';
2 | import { Color } from '../math/Color.js';
3 |
4 | /**
5 | * parameters = {
6 | * color: ,
7 | * map: new THREE.Texture( ),
8 | * alphaMap: new THREE.Texture( ),
9 | * rotation: ,
10 | * sizeAttenuation:
11 | * }
12 | */
13 |
14 | class SpriteMaterial extends Material {
15 |
16 | constructor( parameters ) {
17 |
18 | super();
19 |
20 | this.type = 'SpriteMaterial';
21 |
22 | this.color = new Color( 0xffffff );
23 |
24 | this.map = null;
25 |
26 | this.alphaMap = null;
27 |
28 | this.rotation = 0;
29 |
30 | this.sizeAttenuation = true;
31 |
32 | this.transparent = true;
33 |
34 | this.setValues( parameters );
35 |
36 | }
37 |
38 | copy( source ) {
39 |
40 | super.copy( source );
41 |
42 | this.color.copy( source.color );
43 |
44 | this.map = source.map;
45 |
46 | this.alphaMap = source.alphaMap;
47 |
48 | this.rotation = source.rotation;
49 |
50 | this.sizeAttenuation = source.sizeAttenuation;
51 |
52 | return this;
53 |
54 | }
55 |
56 | }
57 |
58 | SpriteMaterial.prototype.isSpriteMaterial = true;
59 |
60 | export { SpriteMaterial };
61 |
--------------------------------------------------------------------------------
/node_modules/three/src/math/interpolants/DiscreteInterpolant.js:
--------------------------------------------------------------------------------
1 | import { Interpolant } from '../Interpolant.js';
2 |
3 | /**
4 | *
5 | * Interpolant that evaluates to the sample value at the position preceeding
6 | * the parameter.
7 | */
8 |
9 | class DiscreteInterpolant extends Interpolant {
10 |
11 | constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
12 |
13 | super( parameterPositions, sampleValues, sampleSize, resultBuffer );
14 |
15 | }
16 |
17 | interpolate_( i1 /*, t0, t, t1 */ ) {
18 |
19 | return this.copySampleValue_( i1 - 1 );
20 |
21 | }
22 |
23 | }
24 |
25 |
26 | export { DiscreteInterpolant };
27 |
--------------------------------------------------------------------------------
/node_modules/three/src/math/interpolants/LinearInterpolant.js:
--------------------------------------------------------------------------------
1 | import { Interpolant } from '../Interpolant.js';
2 |
3 | class LinearInterpolant extends Interpolant {
4 |
5 | constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
6 |
7 | super( parameterPositions, sampleValues, sampleSize, resultBuffer );
8 |
9 | }
10 |
11 | interpolate_( i1, t0, t, t1 ) {
12 |
13 | const result = this.resultBuffer,
14 | values = this.sampleValues,
15 | stride = this.valueSize,
16 |
17 | offset1 = i1 * stride,
18 | offset0 = offset1 - stride,
19 |
20 | weight1 = ( t - t0 ) / ( t1 - t0 ),
21 | weight0 = 1 - weight1;
22 |
23 | for ( let i = 0; i !== stride; ++ i ) {
24 |
25 | result[ i ] =
26 | values[ offset0 + i ] * weight0 +
27 | values[ offset1 + i ] * weight1;
28 |
29 | }
30 |
31 | return result;
32 |
33 | }
34 |
35 | }
36 |
37 |
38 | export { LinearInterpolant };
39 |
--------------------------------------------------------------------------------
/node_modules/three/src/math/interpolants/QuaternionLinearInterpolant.js:
--------------------------------------------------------------------------------
1 | import { Interpolant } from '../Interpolant.js';
2 | import { Quaternion } from '../Quaternion.js';
3 |
4 | /**
5 | * Spherical linear unit quaternion interpolant.
6 | */
7 |
8 | class QuaternionLinearInterpolant extends Interpolant {
9 |
10 | constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {
11 |
12 | super( parameterPositions, sampleValues, sampleSize, resultBuffer );
13 |
14 | }
15 |
16 | interpolate_( i1, t0, t, t1 ) {
17 |
18 | const result = this.resultBuffer,
19 | values = this.sampleValues,
20 | stride = this.valueSize,
21 |
22 | alpha = ( t - t0 ) / ( t1 - t0 );
23 |
24 | let offset = i1 * stride;
25 |
26 | for ( let end = offset + stride; offset !== end; offset += 4 ) {
27 |
28 | Quaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha );
29 |
30 | }
31 |
32 | return result;
33 |
34 | }
35 |
36 | }
37 |
38 |
39 | export { QuaternionLinearInterpolant };
40 |
--------------------------------------------------------------------------------
/node_modules/three/src/objects/Bone.js:
--------------------------------------------------------------------------------
1 | import { Object3D } from '../core/Object3D.js';
2 |
3 | class Bone extends Object3D {
4 |
5 | constructor() {
6 |
7 | super();
8 |
9 | this.type = 'Bone';
10 |
11 | }
12 |
13 | }
14 |
15 | Bone.prototype.isBone = true;
16 |
17 | export { Bone };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/objects/Group.js:
--------------------------------------------------------------------------------
1 | import { Object3D } from '../core/Object3D.js';
2 |
3 | class Group extends Object3D {
4 |
5 | constructor() {
6 |
7 | super();
8 |
9 | this.type = 'Group';
10 |
11 | }
12 |
13 | }
14 |
15 | Group.prototype.isGroup = true;
16 |
17 | export { Group };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/objects/LineLoop.js:
--------------------------------------------------------------------------------
1 | import { Line } from './Line.js';
2 |
3 | class LineLoop extends Line {
4 |
5 | constructor( geometry, material ) {
6 |
7 | super( geometry, material );
8 |
9 | this.type = 'LineLoop';
10 |
11 | }
12 |
13 | }
14 |
15 | LineLoop.prototype.isLineLoop = true;
16 |
17 | export { LineLoop };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/WebGL1Renderer.js:
--------------------------------------------------------------------------------
1 | import { WebGLRenderer } from './WebGLRenderer.js';
2 |
3 | class WebGL1Renderer extends WebGLRenderer {}
4 |
5 | WebGL1Renderer.prototype.isWebGL1Renderer = true;
6 |
7 | export { WebGL1Renderer };
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/WebGL3DRenderTarget.js:
--------------------------------------------------------------------------------
1 | import { WebGLRenderTarget } from './WebGLRenderTarget.js';
2 | import { Data3DTexture } from '../textures/Data3DTexture.js';
3 |
4 | class WebGL3DRenderTarget extends WebGLRenderTarget {
5 |
6 | constructor( width, height, depth ) {
7 |
8 | super( width, height );
9 |
10 | this.depth = depth;
11 |
12 | this.texture = new Data3DTexture( null, width, height, depth );
13 |
14 | this.texture.isRenderTargetTexture = true;
15 |
16 | }
17 |
18 | }
19 |
20 | WebGL3DRenderTarget.prototype.isWebGL3DRenderTarget = true;
21 |
22 | export { WebGL3DRenderTarget };
23 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/WebGLArrayRenderTarget.js:
--------------------------------------------------------------------------------
1 | import { WebGLRenderTarget } from './WebGLRenderTarget.js';
2 | import { DataArrayTexture } from '../textures/DataArrayTexture.js';
3 |
4 | class WebGLArrayRenderTarget extends WebGLRenderTarget {
5 |
6 | constructor( width, height, depth ) {
7 |
8 | super( width, height );
9 |
10 | this.depth = depth;
11 |
12 | this.texture = new DataArrayTexture( null, width, height, depth );
13 |
14 | this.texture.isRenderTargetTexture = true;
15 |
16 | }
17 |
18 | }
19 |
20 | WebGLArrayRenderTarget.prototype.isWebGLArrayRenderTarget = true;
21 |
22 | export { WebGLArrayRenderTarget };
23 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ALPHAMAP
3 |
4 | diffuseColor.a *= texture2D( alphaMap, vUv ).g;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ALPHAMAP
3 |
4 | uniform sampler2D alphaMap;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ALPHATEST
3 |
4 | if ( diffuseColor.a < alphaTest ) discard;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ALPHATEST
3 | uniform float alphaTest;
4 | #endif
5 | `;
6 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_AOMAP
3 |
4 | // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
5 | float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
6 |
7 | reflectedLight.indirectDiffuse *= ambientOcclusion;
8 |
9 | #if defined( USE_ENVMAP ) && defined( STANDARD )
10 |
11 | float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
12 |
13 | reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
14 |
15 | #endif
16 |
17 | #endif
18 | `;
19 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_AOMAP
3 |
4 | uniform sampler2D aoMap;
5 | uniform float aoMapIntensity;
6 |
7 | #endif
8 | `;
9 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | vec3 transformed = vec3( position );
3 | `;
4 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | vec3 objectNormal = vec3( normal );
3 |
4 | #ifdef USE_TANGENT
5 |
6 | vec3 objectTangent = vec3( tangent.xyz );
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_CLEARCOAT
3 |
4 | vec3 clearcoatNormal = geometryNormal;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_CLEARCOAT_NORMALMAP
3 |
4 | vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
5 | clearcoatMapN.xy *= clearcoatNormalScale;
6 |
7 | #ifdef USE_TANGENT
8 |
9 | clearcoatNormal = normalize( vTBN * clearcoatMapN );
10 |
11 | #else
12 |
13 | clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );
14 |
15 | #endif
16 |
17 | #endif
18 | `;
19 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 |
3 | #ifdef USE_CLEARCOATMAP
4 |
5 | uniform sampler2D clearcoatMap;
6 |
7 | #endif
8 |
9 | #ifdef USE_CLEARCOAT_ROUGHNESSMAP
10 |
11 | uniform sampler2D clearcoatRoughnessMap;
12 |
13 | #endif
14 |
15 | #ifdef USE_CLEARCOAT_NORMALMAP
16 |
17 | uniform sampler2D clearcoatNormalMap;
18 | uniform vec2 clearcoatNormalScale;
19 |
20 | #endif
21 | `;
22 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if NUM_CLIPPING_PLANES > 0
3 |
4 | vec4 plane;
5 |
6 | #pragma unroll_loop_start
7 | for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
8 |
9 | plane = clippingPlanes[ i ];
10 | if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
11 |
12 | }
13 | #pragma unroll_loop_end
14 |
15 | #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
16 |
17 | bool clipped = true;
18 |
19 | #pragma unroll_loop_start
20 | for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
21 |
22 | plane = clippingPlanes[ i ];
23 | clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
24 |
25 | }
26 | #pragma unroll_loop_end
27 |
28 | if ( clipped ) discard;
29 |
30 | #endif
31 |
32 | #endif
33 | `;
34 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if NUM_CLIPPING_PLANES > 0
3 |
4 | varying vec3 vClipPosition;
5 |
6 | uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if NUM_CLIPPING_PLANES > 0
3 |
4 | varying vec3 vClipPosition;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if NUM_CLIPPING_PLANES > 0
3 |
4 | vClipPosition = - mvPosition.xyz;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/color_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_COLOR_ALPHA )
3 |
4 | diffuseColor *= vColor;
5 |
6 | #elif defined( USE_COLOR )
7 |
8 | diffuseColor.rgb *= vColor;
9 |
10 | #endif
11 | `;
12 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_COLOR_ALPHA )
3 |
4 | varying vec4 vColor;
5 |
6 | #elif defined( USE_COLOR )
7 |
8 | varying vec3 vColor;
9 |
10 | #endif
11 | `;
12 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_COLOR_ALPHA )
3 |
4 | varying vec4 vColor;
5 |
6 | #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
7 |
8 | varying vec3 vColor;
9 |
10 | #endif
11 | `;
12 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/color_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_COLOR_ALPHA )
3 |
4 | vColor = vec4( 1.0 );
5 |
6 | #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
7 |
8 | vColor = vec3( 1.0 );
9 |
10 | #endif
11 |
12 | #ifdef USE_COLOR
13 |
14 | vColor *= color;
15 |
16 | #endif
17 |
18 | #ifdef USE_INSTANCING_COLOR
19 |
20 | vColor.xyz *= instanceColor.xyz;
21 |
22 | #endif
23 | `;
24 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/default_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | void main() {
3 | gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
4 | }
5 | `;
6 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/default_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | void main() {
3 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
4 | }
5 | `;
6 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | vec3 transformedNormal = objectNormal;
3 |
4 | #ifdef USE_INSTANCING
5 |
6 | // this is in lieu of a per-instance normal-matrix
7 | // shear transforms in the instance matrix are not supported
8 |
9 | mat3 m = mat3( instanceMatrix );
10 |
11 | transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
12 |
13 | transformedNormal = m * transformedNormal;
14 |
15 | #endif
16 |
17 | transformedNormal = normalMatrix * transformedNormal;
18 |
19 | #ifdef FLIP_SIDED
20 |
21 | transformedNormal = - transformedNormal;
22 |
23 | #endif
24 |
25 | #ifdef USE_TANGENT
26 |
27 | vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
28 |
29 | #ifdef FLIP_SIDED
30 |
31 | transformedTangent = - transformedTangent;
32 |
33 | #endif
34 |
35 | #endif
36 | `;
37 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_DISPLACEMENTMAP
3 |
4 | uniform sampler2D displacementMap;
5 | uniform float displacementScale;
6 | uniform float displacementBias;
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_DISPLACEMENTMAP
3 |
4 | transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef DITHERING
3 |
4 | gl_FragColor.rgb = dithering( gl_FragColor.rgb );
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef DITHERING
3 |
4 | // based on https://www.shadertoy.com/view/MslGR8
5 | vec3 dithering( vec3 color ) {
6 | //Calculate grid position
7 | float grid_position = rand( gl_FragCoord.xy );
8 |
9 | //Shift the individual colors differently, thus making it even harder to see the dithering pattern
10 | vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
11 |
12 | //modify shift acording to grid position.
13 | dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
14 |
15 | //shift the color by dither_shift
16 | return color + dither_shift_RGB;
17 | }
18 |
19 | #endif
20 | `;
21 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_EMISSIVEMAP
3 |
4 | vec4 emissiveColor = texture2D( emissiveMap, vUv );
5 |
6 | totalEmissiveRadiance *= emissiveColor.rgb;
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_EMISSIVEMAP
3 |
4 | uniform sampler2D emissiveMap;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/encodings_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | gl_FragColor = linearToOutputTexel( gl_FragColor );
3 | `;
4 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/encodings_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 |
3 | vec4 LinearToLinear( in vec4 value ) {
4 | return value;
5 | }
6 |
7 | vec4 LinearTosRGB( in vec4 value ) {
8 | 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 );
9 | }
10 |
11 | `;
12 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ENVMAP
3 |
4 | uniform float envMapIntensity;
5 | uniform float flipEnvMap;
6 |
7 | #ifdef ENVMAP_TYPE_CUBE
8 | uniform samplerCube envMap;
9 | #else
10 | uniform sampler2D envMap;
11 | #endif
12 |
13 | #endif
14 | `;
15 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ENVMAP
3 |
4 | uniform float reflectivity;
5 |
6 | #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
7 |
8 | #define ENV_WORLDPOS
9 |
10 | #endif
11 |
12 | #ifdef ENV_WORLDPOS
13 |
14 | varying vec3 vWorldPosition;
15 | uniform float refractionRatio;
16 | #else
17 | varying vec3 vReflect;
18 | #endif
19 |
20 | #endif
21 | `;
22 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ENVMAP
3 |
4 | #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
5 |
6 | #define ENV_WORLDPOS
7 |
8 | #endif
9 |
10 | #ifdef ENV_WORLDPOS
11 |
12 | varying vec3 vWorldPosition;
13 |
14 | #else
15 |
16 | varying vec3 vReflect;
17 | uniform float refractionRatio;
18 |
19 | #endif
20 |
21 | #endif
22 | `;
23 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ENVMAP
3 |
4 | #ifdef ENV_WORLDPOS
5 |
6 | vWorldPosition = worldPosition.xyz;
7 |
8 | #else
9 |
10 | vec3 cameraToVertex;
11 |
12 | if ( isOrthographic ) {
13 |
14 | cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
15 |
16 | } else {
17 |
18 | cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
19 |
20 | }
21 |
22 | vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
23 |
24 | #ifdef ENVMAP_MODE_REFLECTION
25 |
26 | vReflect = reflect( cameraToVertex, worldNormal );
27 |
28 | #else
29 |
30 | vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
31 |
32 | #endif
33 |
34 | #endif
35 |
36 | #endif
37 | `;
38 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_FOG
3 |
4 | #ifdef FOG_EXP2
5 |
6 | float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
7 |
8 | #else
9 |
10 | float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
11 |
12 | #endif
13 |
14 | gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
15 |
16 | #endif
17 | `;
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_FOG
3 |
4 | uniform vec3 fogColor;
5 | varying float vFogDepth;
6 |
7 | #ifdef FOG_EXP2
8 |
9 | uniform float fogDensity;
10 |
11 | #else
12 |
13 | uniform float fogNear;
14 | uniform float fogFar;
15 |
16 | #endif
17 |
18 | #endif
19 | `;
20 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_FOG
3 |
4 | varying float vFogDepth;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_FOG
3 |
4 | vFogDepth = - mvPosition.z;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 |
3 | #ifdef USE_GRADIENTMAP
4 |
5 | uniform sampler2D gradientMap;
6 |
7 | #endif
8 |
9 | vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
10 |
11 | // dotNL will be from -1.0 to 1.0
12 | float dotNL = dot( normal, lightDirection );
13 | vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
14 |
15 | #ifdef USE_GRADIENTMAP
16 |
17 | return vec3( texture2D( gradientMap, coord ).r );
18 |
19 | #else
20 |
21 | return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
22 |
23 | #endif
24 |
25 | }
26 | `;
27 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lightmap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_LIGHTMAP
3 |
4 | vec4 lightMapTexel = texture2D( lightMap, vUv2 );
5 | vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
6 |
7 | #ifndef PHYSICALLY_CORRECT_LIGHTS
8 |
9 | lightMapIrradiance *= PI;
10 |
11 | #endif
12 |
13 | reflectedLight.indirectDiffuse += lightMapIrradiance;
14 |
15 | #endif
16 | `;
17 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_LIGHTMAP
3 |
4 | uniform sampler2D lightMap;
5 | uniform float lightMapIntensity;
6 |
7 | #endif
8 | `;
9 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( RE_IndirectDiffuse )
3 |
4 | RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
5 |
6 | #endif
7 |
8 | #if defined( RE_IndirectSpecular )
9 |
10 | RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
11 |
12 | #endif
13 | `;
14 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( RE_IndirectDiffuse )
3 |
4 | #ifdef USE_LIGHTMAP
5 |
6 | vec4 lightMapTexel = texture2D( lightMap, vUv2 );
7 | vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
8 |
9 | #ifndef PHYSICALLY_CORRECT_LIGHTS
10 |
11 | lightMapIrradiance *= PI;
12 |
13 | #endif
14 |
15 | irradiance += lightMapIrradiance;
16 |
17 | #endif
18 |
19 | #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
20 |
21 | iblIrradiance += getIBLIrradiance( geometry.normal );
22 |
23 | #endif
24 |
25 | #endif
26 |
27 | #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
28 |
29 | radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );
30 |
31 | #ifdef USE_CLEARCOAT
32 |
33 | clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );
34 |
35 | #endif
36 |
37 | #endif
38 | `;
39 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | BlinnPhongMaterial material;
3 | material.diffuseColor = diffuseColor.rgb;
4 | material.specularColor = specular;
5 | material.specularShininess = shininess;
6 | material.specularStrength = specularStrength;
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | ToonMaterial material;
3 | material.diffuseColor = diffuseColor.rgb;
4 | `;
5 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | varying vec3 vViewPosition;
3 |
4 | struct ToonMaterial {
5 |
6 | vec3 diffuseColor;
7 |
8 | };
9 |
10 | void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
11 |
12 | vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
13 |
14 | reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
15 |
16 | }
17 |
18 | void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
19 |
20 | reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
21 |
22 | }
23 |
24 | #define RE_Direct RE_Direct_Toon
25 | #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon
26 |
27 | #define Material_LightProbeLOD( material ) (0)
28 | `;
29 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
3 |
4 | // Doing a strict comparison with == 1.0 can cause noise artifacts
5 | // on some platforms. See issue #17623.
6 | gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
3 |
4 | uniform float logDepthBufFC;
5 | varying float vFragDepth;
6 | varying float vIsPerspective;
7 |
8 | #endif
9 | `;
10 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_LOGDEPTHBUF
3 |
4 | #ifdef USE_LOGDEPTHBUF_EXT
5 |
6 | varying float vFragDepth;
7 | varying float vIsPerspective;
8 |
9 | #else
10 |
11 | uniform float logDepthBufFC;
12 |
13 | #endif
14 |
15 | #endif
16 | `;
17 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_LOGDEPTHBUF
3 |
4 | #ifdef USE_LOGDEPTHBUF_EXT
5 |
6 | vFragDepth = 1.0 + gl_Position.w;
7 | vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
8 |
9 | #else
10 |
11 | if ( isPerspectiveMatrix( projectionMatrix ) ) {
12 |
13 | gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
14 |
15 | gl_Position.z *= gl_Position.w;
16 |
17 | }
18 |
19 | #endif
20 |
21 | #endif
22 | `;
23 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/map_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_MAP
3 |
4 | vec4 sampledDiffuseColor = texture2D( map, vUv );
5 |
6 | #ifdef DECODE_VIDEO_TEXTURE
7 |
8 | // inline sRGB decode (TODO: Remove this code when https://crbug.com/1256340 is solved)
9 |
10 | sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
11 |
12 | #endif
13 |
14 | diffuseColor *= sampledDiffuseColor;
15 |
16 | #endif
17 | `;
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_MAP
3 |
4 | uniform sampler2D map;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_MAP ) || defined( USE_ALPHAMAP )
3 |
4 | vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
5 |
6 | #endif
7 |
8 | #ifdef USE_MAP
9 |
10 | diffuseColor *= texture2D( map, uv );
11 |
12 | #endif
13 |
14 | #ifdef USE_ALPHAMAP
15 |
16 | diffuseColor.a *= texture2D( alphaMap, uv ).g;
17 |
18 | #endif
19 | `;
20 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_MAP ) || defined( USE_ALPHAMAP )
3 |
4 | uniform mat3 uvTransform;
5 |
6 | #endif
7 |
8 | #ifdef USE_MAP
9 |
10 | uniform sampler2D map;
11 |
12 | #endif
13 |
14 | #ifdef USE_ALPHAMAP
15 |
16 | uniform sampler2D alphaMap;
17 |
18 | #endif
19 | `;
20 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | float metalnessFactor = metalness;
3 |
4 | #ifdef USE_METALNESSMAP
5 |
6 | vec4 texelMetalness = texture2D( metalnessMap, vUv );
7 |
8 | // reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
9 | metalnessFactor *= texelMetalness.b;
10 |
11 | #endif
12 | `;
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_METALNESSMAP
3 |
4 | uniform sampler2D metalnessMap;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
3 |
4 | // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:
5 | // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)
6 | // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting
7 | vColor *= morphTargetBaseInfluence;
8 |
9 | for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
10 |
11 | #if defined( USE_COLOR_ALPHA )
12 |
13 | if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
14 |
15 | #elif defined( USE_COLOR )
16 |
17 | if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]
18 |
19 | #endif
20 |
21 | }
22 |
23 | #endif
24 | `;
25 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_MORPHNORMALS
3 |
4 | // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:
5 | // When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)
6 | // When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting
7 | objectNormal *= morphTargetBaseInfluence;
8 |
9 | #ifdef MORPHTARGETS_TEXTURE
10 |
11 | for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
12 |
13 | if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
14 |
15 | }
16 |
17 | #else
18 |
19 | objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
20 | objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
21 | objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
22 | objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
23 |
24 | #endif
25 |
26 | #endif
27 | `;
28 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_MORPHTARGETS
3 |
4 | uniform float morphTargetBaseInfluence;
5 |
6 | #ifdef MORPHTARGETS_TEXTURE
7 |
8 | uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
9 | uniform sampler2DArray morphTargetsTexture;
10 | uniform vec2 morphTargetsTextureSize;
11 |
12 | vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
13 |
14 | float texelIndex = float( vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset );
15 | float y = floor( texelIndex / morphTargetsTextureSize.x );
16 | float x = texelIndex - y * morphTargetsTextureSize.x;
17 |
18 | vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );
19 | return texture( morphTargetsTexture, morphUV );
20 |
21 | }
22 |
23 | #else
24 |
25 | #ifndef USE_MORPHNORMALS
26 |
27 | uniform float morphTargetInfluences[ 8 ];
28 |
29 | #else
30 |
31 | uniform float morphTargetInfluences[ 4 ];
32 |
33 | #endif
34 |
35 | #endif
36 |
37 | #endif
38 | `;
39 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 |
3 | #ifdef OBJECTSPACE_NORMALMAP
4 |
5 | normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals
6 |
7 | #ifdef FLIP_SIDED
8 |
9 | normal = - normal;
10 |
11 | #endif
12 |
13 | #ifdef DOUBLE_SIDED
14 |
15 | normal = normal * faceDirection;
16 |
17 | #endif
18 |
19 | normal = normalize( normalMatrix * normal );
20 |
21 | #elif defined( TANGENTSPACE_NORMALMAP )
22 |
23 | vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
24 | mapN.xy *= normalScale;
25 |
26 | #ifdef USE_TANGENT
27 |
28 | normal = normalize( vTBN * mapN );
29 |
30 | #else
31 |
32 | normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );
33 |
34 | #endif
35 |
36 | #elif defined( USE_BUMPMAP )
37 |
38 | normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
39 |
40 | #endif
41 | `;
42 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifndef FLAT_SHADED
3 |
4 | varying vec3 vNormal;
5 |
6 | #ifdef USE_TANGENT
7 |
8 | varying vec3 vTangent;
9 | varying vec3 vBitangent;
10 |
11 | #endif
12 |
13 | #endif
14 | `;
15 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifndef FLAT_SHADED
3 |
4 | varying vec3 vNormal;
5 |
6 | #ifdef USE_TANGENT
7 |
8 | varying vec3 vTangent;
9 | varying vec3 vBitangent;
10 |
11 | #endif
12 |
13 | #endif
14 | `;
15 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED
3 |
4 | vNormal = normalize( transformedNormal );
5 |
6 | #ifdef USE_TANGENT
7 |
8 | vTangent = normalize( transformedTangent );
9 | vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
10 |
11 | #endif
12 |
13 | #endif
14 | `;
15 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/output_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef OPAQUE
3 | diffuseColor.a = 1.0;
4 | #endif
5 |
6 | // https://github.com/mrdoob/three.js/pull/22425
7 | #ifdef USE_TRANSMISSION
8 | diffuseColor.a *= transmissionAlpha + 0.1;
9 | #endif
10 |
11 | gl_FragColor = vec4( outgoingLight, diffuseColor.a );
12 | `;
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef PREMULTIPLIED_ALPHA
3 |
4 | // Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation.
5 | gl_FragColor.rgb *= gl_FragColor.a;
6 |
7 | #endif
8 | `;
9 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/project_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | vec4 mvPosition = vec4( transformed, 1.0 );
3 |
4 | #ifdef USE_INSTANCING
5 |
6 | mvPosition = instanceMatrix * mvPosition;
7 |
8 | #endif
9 |
10 | mvPosition = modelViewMatrix * mvPosition;
11 |
12 | gl_Position = projectionMatrix * mvPosition;
13 | `;
14 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | float roughnessFactor = roughness;
3 |
4 | #ifdef USE_ROUGHNESSMAP
5 |
6 | vec4 texelRoughness = texture2D( roughnessMap, vUv );
7 |
8 | // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture
9 | roughnessFactor *= texelRoughness.g;
10 |
11 | #endif
12 | `;
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_ROUGHNESSMAP
3 |
4 | uniform sampler2D roughnessMap;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_SKINNING
3 |
4 | mat4 boneMatX = getBoneMatrix( skinIndex.x );
5 | mat4 boneMatY = getBoneMatrix( skinIndex.y );
6 | mat4 boneMatZ = getBoneMatrix( skinIndex.z );
7 | mat4 boneMatW = getBoneMatrix( skinIndex.w );
8 |
9 | #endif
10 | `;
11 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_SKINNING
3 |
4 | vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
5 |
6 | vec4 skinned = vec4( 0.0 );
7 | skinned += boneMatX * skinVertex * skinWeight.x;
8 | skinned += boneMatY * skinVertex * skinWeight.y;
9 | skinned += boneMatZ * skinVertex * skinWeight.z;
10 | skinned += boneMatW * skinVertex * skinWeight.w;
11 |
12 | transformed = ( bindMatrixInverse * skinned ).xyz;
13 |
14 | #endif
15 | `;
16 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_SKINNING
3 |
4 | mat4 skinMatrix = mat4( 0.0 );
5 | skinMatrix += skinWeight.x * boneMatX;
6 | skinMatrix += skinWeight.y * boneMatY;
7 | skinMatrix += skinWeight.z * boneMatZ;
8 | skinMatrix += skinWeight.w * boneMatW;
9 | skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
10 |
11 | objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
12 |
13 | #ifdef USE_TANGENT
14 |
15 | objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
16 |
17 | #endif
18 |
19 | #endif
20 | `;
21 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | float specularStrength;
3 |
4 | #ifdef USE_SPECULARMAP
5 |
6 | vec4 texelSpecular = texture2D( specularMap, vUv );
7 | specularStrength = texelSpecular.r;
8 |
9 | #else
10 |
11 | specularStrength = 1.0;
12 |
13 | #endif
14 | `;
15 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_SPECULARMAP
3 |
4 | uniform sampler2D specularMap;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( TONE_MAPPING )
3 |
4 | gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_TRANSMISSION
3 |
4 | float transmissionAlpha = 1.0;
5 | float transmissionFactor = transmission;
6 | float thicknessFactor = thickness;
7 |
8 | #ifdef USE_TRANSMISSIONMAP
9 |
10 | transmissionFactor *= texture2D( transmissionMap, vUv ).r;
11 |
12 | #endif
13 |
14 | #ifdef USE_THICKNESSMAP
15 |
16 | thicknessFactor *= texture2D( thicknessMap, vUv ).g;
17 |
18 | #endif
19 |
20 | vec3 pos = vWorldPosition;
21 | vec3 v = normalize( cameraPosition - pos );
22 | vec3 n = inverseTransformDirection( normal, viewMatrix );
23 |
24 | vec4 transmission = getIBLVolumeRefraction(
25 | n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,
26 | pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
27 | attenuationColor, attenuationDistance );
28 |
29 | totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );
30 | transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );
31 | #endif
32 | `;
33 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv2_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
3 |
4 | varying vec2 vUv2;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv2_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
3 |
4 | attribute vec2 uv2;
5 | varying vec2 vUv2;
6 |
7 | uniform mat3 uv2Transform;
8 |
9 | #endif
10 | `;
11 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv2_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
3 |
4 | vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
3 |
4 | varying vec2 vUv;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_UV
3 |
4 | #ifdef UVS_VERTEX_ONLY
5 |
6 | vec2 vUv;
7 |
8 | #else
9 |
10 | varying vec2 vUv;
11 |
12 | #endif
13 |
14 | uniform mat3 uvTransform;
15 |
16 | #endif
17 | `;
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #ifdef USE_UV
3 |
4 | vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
5 |
6 | #endif
7 | `;
8 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.js:
--------------------------------------------------------------------------------
1 | export default /* glsl */`
2 | #if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )
3 |
4 | vec4 worldPosition = vec4( transformed, 1.0 );
5 |
6 | #ifdef USE_INSTANCING
7 |
8 | worldPosition = instanceMatrix * worldPosition;
9 |
10 | #endif
11 |
12 | worldPosition = modelMatrix * worldPosition;
13 |
14 | #endif
15 | `;
16 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderLib/background.glsl.js:
--------------------------------------------------------------------------------
1 | export const vertex = /* glsl */`
2 | varying vec2 vUv;
3 | uniform mat3 uvTransform;
4 |
5 | void main() {
6 |
7 | vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
8 |
9 | gl_Position = vec4( position.xy, 1.0, 1.0 );
10 |
11 | }
12 | `;
13 |
14 | export const fragment = /* glsl */`
15 | uniform sampler2D t2D;
16 |
17 | varying vec2 vUv;
18 |
19 | void main() {
20 |
21 | gl_FragColor = texture2D( t2D, vUv );
22 |
23 | #include
24 | #include
25 |
26 | }
27 | `;
28 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderLib/cube.glsl.js:
--------------------------------------------------------------------------------
1 | export const vertex = /* glsl */`
2 | varying vec3 vWorldDirection;
3 |
4 | #include
5 |
6 | void main() {
7 |
8 | vWorldDirection = transformDirection( position, modelMatrix );
9 |
10 | #include
11 | #include
12 |
13 | gl_Position.z = gl_Position.w; // set z to camera.far
14 |
15 | }
16 | `;
17 |
18 | export const fragment = /* glsl */`
19 | #include
20 | uniform float opacity;
21 |
22 | varying vec3 vWorldDirection;
23 |
24 | #include
25 |
26 | void main() {
27 |
28 | vec3 vReflect = vWorldDirection;
29 | #include
30 |
31 | gl_FragColor = envColor;
32 | gl_FragColor.a *= opacity;
33 |
34 | #include
35 | #include
36 |
37 | }
38 | `;
39 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/shaders/ShaderLib/equirect.glsl.js:
--------------------------------------------------------------------------------
1 | export const vertex = /* glsl */`
2 | varying vec3 vWorldDirection;
3 |
4 | #include
5 |
6 | void main() {
7 |
8 | vWorldDirection = transformDirection( position, modelMatrix );
9 |
10 | #include
11 | #include
12 |
13 | }
14 | `;
15 |
16 | export const fragment = /* glsl */`
17 | uniform sampler2D tEquirect;
18 |
19 | varying vec3 vWorldDirection;
20 |
21 | #include
22 |
23 | void main() {
24 |
25 | vec3 direction = normalize( vWorldDirection );
26 |
27 | vec2 sampleUV = equirectUv( direction );
28 |
29 | gl_FragColor = texture2D( tEquirect, sampleUV );
30 |
31 | #include
32 | #include
33 |
34 | }
35 | `;
36 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/webgl/WebGLAnimation.js:
--------------------------------------------------------------------------------
1 | function WebGLAnimation() {
2 |
3 | let context = null;
4 | let isAnimating = false;
5 | let animationLoop = null;
6 | let requestId = null;
7 |
8 | function onAnimationFrame( time, frame ) {
9 |
10 | animationLoop( time, frame );
11 |
12 | requestId = context.requestAnimationFrame( onAnimationFrame );
13 |
14 | }
15 |
16 | return {
17 |
18 | start: function () {
19 |
20 | if ( isAnimating === true ) return;
21 | if ( animationLoop === null ) return;
22 |
23 | requestId = context.requestAnimationFrame( onAnimationFrame );
24 |
25 | isAnimating = true;
26 |
27 | },
28 |
29 | stop: function () {
30 |
31 | context.cancelAnimationFrame( requestId );
32 |
33 | isAnimating = false;
34 |
35 | },
36 |
37 | setAnimationLoop: function ( callback ) {
38 |
39 | animationLoop = callback;
40 |
41 | },
42 |
43 | setContext: function ( value ) {
44 |
45 | context = value;
46 |
47 | }
48 |
49 | };
50 |
51 | }
52 |
53 | export { WebGLAnimation };
54 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/webgl/WebGLProperties.js:
--------------------------------------------------------------------------------
1 | function WebGLProperties() {
2 |
3 | let properties = new WeakMap();
4 |
5 | function get( object ) {
6 |
7 | let map = properties.get( object );
8 |
9 | if ( map === undefined ) {
10 |
11 | map = {};
12 | properties.set( object, map );
13 |
14 | }
15 |
16 | return map;
17 |
18 | }
19 |
20 | function remove( object ) {
21 |
22 | properties.delete( object );
23 |
24 | }
25 |
26 | function update( object, key, value ) {
27 |
28 | properties.get( object )[ key ] = value;
29 |
30 | }
31 |
32 | function dispose() {
33 |
34 | properties = new WeakMap();
35 |
36 | }
37 |
38 | return {
39 | get: get,
40 | remove: remove,
41 | update: update,
42 | dispose: dispose
43 | };
44 |
45 | }
46 |
47 |
48 | export { WebGLProperties };
49 |
--------------------------------------------------------------------------------
/node_modules/three/src/renderers/webgl/WebGLShader.js:
--------------------------------------------------------------------------------
1 | function WebGLShader( gl, type, string ) {
2 |
3 | const shader = gl.createShader( type );
4 |
5 | gl.shaderSource( shader, string );
6 | gl.compileShader( shader );
7 |
8 | return shader;
9 |
10 | }
11 |
12 | export { WebGLShader };
13 |
--------------------------------------------------------------------------------
/node_modules/three/src/scenes/Fog.js:
--------------------------------------------------------------------------------
1 | import { Color } from '../math/Color.js';
2 |
3 | class Fog {
4 |
5 | constructor( color, near = 1, far = 1000 ) {
6 |
7 | this.name = '';
8 |
9 | this.color = new Color( color );
10 |
11 | this.near = near;
12 | this.far = far;
13 |
14 | }
15 |
16 | clone() {
17 |
18 | return new Fog( this.color, this.near, this.far );
19 |
20 | }
21 |
22 | toJSON( /* meta */ ) {
23 |
24 | return {
25 | type: 'Fog',
26 | color: this.color.getHex(),
27 | near: this.near,
28 | far: this.far
29 | };
30 |
31 | }
32 |
33 | }
34 |
35 | Fog.prototype.isFog = true;
36 |
37 | export { Fog };
38 |
--------------------------------------------------------------------------------
/node_modules/three/src/scenes/FogExp2.js:
--------------------------------------------------------------------------------
1 | import { Color } from '../math/Color.js';
2 |
3 | class FogExp2 {
4 |
5 | constructor( color, density = 0.00025 ) {
6 |
7 | this.name = '';
8 |
9 | this.color = new Color( color );
10 | this.density = density;
11 |
12 | }
13 |
14 | clone() {
15 |
16 | return new FogExp2( this.color, this.density );
17 |
18 | }
19 |
20 | toJSON( /* meta */ ) {
21 |
22 | return {
23 | type: 'FogExp2',
24 | color: this.color.getHex(),
25 | density: this.density
26 | };
27 |
28 | }
29 |
30 | }
31 |
32 | FogExp2.prototype.isFogExp2 = true;
33 |
34 | export { FogExp2 };
35 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/CanvasTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 |
3 | class CanvasTexture extends Texture {
4 |
5 | constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {
6 |
7 | super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
8 |
9 | this.needsUpdate = true;
10 |
11 | }
12 |
13 | }
14 |
15 | CanvasTexture.prototype.isCanvasTexture = true;
16 |
17 | export { CanvasTexture };
18 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/CompressedTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 |
3 | class CompressedTexture extends Texture {
4 |
5 | constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
6 |
7 | super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
8 |
9 | this.image = { width: width, height: height };
10 | this.mipmaps = mipmaps;
11 |
12 | // no flipping for cube textures
13 | // (also flipping doesn't work for compressed textures )
14 |
15 | this.flipY = false;
16 |
17 | // can't generate mipmaps for compressed textures
18 | // mips must be embedded in DDS files
19 |
20 | this.generateMipmaps = false;
21 |
22 | }
23 |
24 | }
25 |
26 | CompressedTexture.prototype.isCompressedTexture = true;
27 |
28 | export { CompressedTexture };
29 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/CubeTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 | import { CubeReflectionMapping } from '../constants.js';
3 |
4 | class CubeTexture extends Texture {
5 |
6 | constructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {
7 |
8 | images = images !== undefined ? images : [];
9 | mapping = mapping !== undefined ? mapping : CubeReflectionMapping;
10 |
11 | super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
12 |
13 | this.flipY = false;
14 |
15 | }
16 |
17 | get images() {
18 |
19 | return this.image;
20 |
21 | }
22 |
23 | set images( value ) {
24 |
25 | this.image = value;
26 |
27 | }
28 |
29 | }
30 |
31 | CubeTexture.prototype.isCubeTexture = true;
32 |
33 | export { CubeTexture };
34 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/Data3DTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 | import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';
3 |
4 | class Data3DTexture extends Texture {
5 |
6 | constructor( data = null, width = 1, height = 1, depth = 1 ) {
7 |
8 | // We're going to add .setXXX() methods for setting properties later.
9 | // Users can still set in DataTexture3D directly.
10 | //
11 | // const texture = new THREE.DataTexture3D( data, width, height, depth );
12 | // texture.anisotropy = 16;
13 | //
14 | // See #14839
15 |
16 | super( null );
17 |
18 | this.image = { data, width, height, depth };
19 |
20 | this.magFilter = NearestFilter;
21 | this.minFilter = NearestFilter;
22 |
23 | this.wrapR = ClampToEdgeWrapping;
24 |
25 | this.generateMipmaps = false;
26 | this.flipY = false;
27 | this.unpackAlignment = 1;
28 |
29 | }
30 |
31 | }
32 |
33 | Data3DTexture.prototype.isData3DTexture = true;
34 |
35 | export { Data3DTexture };
36 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/DataArrayTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 | import { ClampToEdgeWrapping, NearestFilter } from '../constants.js';
3 |
4 | class DataArrayTexture extends Texture {
5 |
6 | constructor( data = null, width = 1, height = 1, depth = 1 ) {
7 |
8 | super( null );
9 |
10 | this.image = { data, width, height, depth };
11 |
12 | this.magFilter = NearestFilter;
13 | this.minFilter = NearestFilter;
14 |
15 | this.wrapR = ClampToEdgeWrapping;
16 |
17 | this.generateMipmaps = false;
18 | this.flipY = false;
19 | this.unpackAlignment = 1;
20 |
21 | }
22 |
23 | }
24 |
25 | DataArrayTexture.prototype.isDataArrayTexture = true;
26 |
27 | export { DataArrayTexture };
28 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/DataTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 | import { NearestFilter } from '../constants.js';
3 |
4 | class DataTexture extends Texture {
5 |
6 | constructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, encoding ) {
7 |
8 | super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
9 |
10 | this.image = { data: data, width: width, height: height };
11 |
12 | this.generateMipmaps = false;
13 | this.flipY = false;
14 | this.unpackAlignment = 1;
15 |
16 | }
17 |
18 | }
19 |
20 | DataTexture.prototype.isDataTexture = true;
21 |
22 | export { DataTexture };
23 |
--------------------------------------------------------------------------------
/node_modules/three/src/textures/FramebufferTexture.js:
--------------------------------------------------------------------------------
1 | import { Texture } from './Texture.js';
2 | import { NearestFilter } from '../constants.js';
3 |
4 | class FramebufferTexture extends Texture {
5 |
6 | constructor( width, height, format ) {
7 |
8 | super( { width, height } );
9 |
10 | this.format = format;
11 |
12 | this.magFilter = NearestFilter;
13 | this.minFilter = NearestFilter;
14 |
15 | this.generateMipmaps = false;
16 |
17 | this.needsUpdate = true;
18 |
19 | }
20 |
21 | }
22 |
23 | FramebufferTexture.prototype.isFramebufferTexture = true;
24 |
25 | export { FramebufferTexture };
26 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "three": {
6 | "version": "0.138.3",
7 | "resolved": "https://registry.npmjs.org/three/-/three-0.138.3.tgz",
8 | "integrity": "sha512-4t1cKC8gimNyJChJbaklg8W/qj3PpsLJUIFm5LIuAy/hVxxNm1ru2FGTSfbTSsuHmC/7ipsyuGKqrSAKLNtkzg=="
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "cuter-computer",
3 | "version": "1.0.0",
4 |
5 | "scripts": {
6 | "run": "python -m http.server"
7 | }
8 | }
--------------------------------------------------------------------------------