Dies ist das Repository meines kleinen Portfolios.
Im Hintergrund läuft eine Planetensimulation, geschrieben in JavaScript und Three.js.
Die zu sehenden Texturen stammen von:
https://www.solarsystemscope.com/textures/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
542 B
40 lines
542 B
4 years ago
|
import { Material } from './Material.js';
|
||
|
import { Color } from '../math/Color.js';
|
||
|
|
||
|
/**
|
||
|
* parameters = {
|
||
|
* color: <THREE.Color>
|
||
|
* }
|
||
|
*/
|
||
|
|
||
|
class ShadowMaterial extends Material {
|
||
|
|
||
|
constructor( parameters ) {
|
||
|
|
||
|
super();
|
||
|
|
||
|
this.type = 'ShadowMaterial';
|
||
|
|
||
|
this.color = new Color( 0x000000 );
|
||
|
this.transparent = true;
|
||
|
|
||
|
this.setValues( parameters );
|
||
|
|
||
|
}
|
||
|
|
||
|
copy( source ) {
|
||
|
|
||
|
super.copy( source );
|
||
|
|
||
|
this.color.copy( source.color );
|
||
|
|
||
|
return this;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
ShadowMaterial.prototype.isShadowMaterial = true;
|
||
|
|
||
|
export { ShadowMaterial };
|