Download node_modules/three/src/lights/LightProbe.js from SimWorld-AI/industrial-harbor-viewer: direct link, hf CLI and curl.
- Browser
- Download file 679 Bytes
-
https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/lights/LightProbe.js
- Command line
-
hf download hf://spaces/SimWorld-AI/industrial-harbor-viewer/node_modules/three/src/lights/LightProbe.js
-
curl -L -o LightProbe.js https://huggingface.co/spaces/SimWorld-AI/industrial-harbor-viewer/resolve/main/node_modules/three/src/lights/LightProbe.js
679 Bytes
| import { SphericalHarmonics3 } from '../math/SphericalHarmonics3.js'; | |
| import { Light } from './Light.js'; | |
| class LightProbe extends Light { | |
| constructor( sh = new SphericalHarmonics3(), intensity = 1 ) { | |
| super( undefined, intensity ); | |
| this.isLightProbe = true; | |
| this.sh = sh; | |
| } | |
| copy( source ) { | |
| super.copy( source ); | |
| this.sh.copy( source.sh ); | |
| return this; | |
| } | |
| fromJSON( json ) { | |
| this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON(); | |
| this.sh.fromArray( json.sh ); | |
| return this; | |
| } | |
| toJSON( meta ) { | |
| const data = super.toJSON( meta ); | |
| data.object.sh = this.sh.toArray(); | |
| return data; | |
| } | |
| } | |
| export { LightProbe }; | |