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.
29 lines
720 B
29 lines
720 B
4 years ago
|
import { Texture } from './Texture.js';
|
||
|
|
||
|
class CompressedTexture extends Texture {
|
||
|
|
||
|
constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {
|
||
|
|
||
|
super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );
|
||
|
|
||
|
this.image = { width: width, height: height };
|
||
|
this.mipmaps = mipmaps;
|
||
|
|
||
|
// no flipping for cube textures
|
||
|
// (also flipping doesn't work for compressed textures )
|
||
|
|
||
|
this.flipY = false;
|
||
|
|
||
|
// can't generate mipmaps for compressed textures
|
||
|
// mips must be embedded in DDS files
|
||
|
|
||
|
this.generateMipmaps = false;
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
CompressedTexture.prototype.isCompressedTexture = true;
|
||
|
|
||
|
export { CompressedTexture };
|