Buckets:
| 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 }; | |
Xet Storage Details
- Size:
- 679 Bytes
- Xet hash:
- abf0ca192e40adf96352ad37eaa32b4c8dff9e12576f7c10e47395b1ad35a984
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.