Skip to content

Commit

Permalink
Add DataCubeTexure
Browse files Browse the repository at this point in the history
  • Loading branch information
donmccurdy committed Sep 6, 2023
1 parent 53cf86d commit 99fd5d6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/textures/DataCubeTexture.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Texture } from './Texture.js';
import { CubeReflectionMapping } from '../constants.js';

class DataCubeTexture extends Texture {

constructor( data ) {

super( data, CubeReflectionMapping );

this.isDataCubeTexture = true;
this.isCubeTexture = true;

this.image = { data, width: data[ 0 ].width, height: data[ 0 ].height };

this.generateMipmaps = false;
this.flipY = false;
this.unpackAlignment = 1;

}

get images() {

return this.image;

}

set images( value ) {

this.image = value;

}

}

export { DataCubeTexture };

0 comments on commit 99fd5d6

Please sign in to comment.