43 lines
633 B
JavaScript
Executable File
43 lines
633 B
JavaScript
Executable File
/*
|
|
* Copyright 2013, kaj dijkstra ,
|
|
* Author, Kaj Dijkstra.
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
|
|
/**
|
|
* texture
|
|
**/
|
|
class texture{
|
|
|
|
constructor( ){
|
|
|
|
this.data;
|
|
this.dataType = false;
|
|
|
|
this.width = 1024;
|
|
this.height = 1024;
|
|
|
|
this.name;
|
|
this.address;
|
|
|
|
this.glTexture = gl.createTexture();
|
|
this.face = gl.TEXTURE_2D;//this.gl2.TEXTURE_CUBE_MAP_POSITIVE_X
|
|
|
|
}
|
|
|
|
setViewport( viewport ){
|
|
|
|
this.viewport = viewport;
|
|
this.gl = viewport.gl;
|
|
|
|
this.glTexture = this.gl.createTexture();
|
|
this.face = this.gl.TEXTURE_2D;//this.gl2.TEXTURE_CUBE_MAP_POSITIVE_X
|
|
}
|
|
}
|
|
|
|
|
|
export {texture as default};
|
|
|