gl-texture2d
Advanced tools
Comparing version 2.0.8 to 2.0.9
{ | ||
"name": "gl-texture2d", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "WebGL texture wrapper", | ||
@@ -31,9 +31,9 @@ "main": "texture.js", | ||
"devDependencies": { | ||
"a-big-triangle": "^1.0.0", | ||
"baboon-image": "^1.0.0", | ||
"gl-now": "^1.3.1", | ||
"baboon-image": "^1.0.0", | ||
"glslify": "^1.4.0", | ||
"a-big-triangle": "^1.0.0" | ||
"gl-shader": "^4.0.1", | ||
"glslify": "^1.4.0" | ||
}, | ||
"dependencies": { | ||
"webglew": "^1.0.4", | ||
"ndarray": "^1.0.15", | ||
@@ -40,0 +40,0 @@ "typedarray-pool": "^1.0.0", |
@@ -7,3 +7,3 @@ gl-texture2d | ||
[Try it in your browser right now](http://gl-modules.github.io/gl-texture2d/) | ||
[Try it in your browser right now](http://stackgl.github.io/gl-texture2d/) | ||
@@ -191,2 +191,2 @@ ```javascript | ||
# Credits | ||
(c) 2013-2014 Mikola Lysenko. MIT License | ||
(c) 2013-2014 Mikola Lysenko. MIT License |
@@ -6,3 +6,2 @@ 'use strict' | ||
var pool = require('typedarray-pool') | ||
var webglew = require('webglew') | ||
@@ -122,3 +121,3 @@ module.exports = createTexture2D | ||
if(this.type === gl.FLOAT && linearTypes.indexOf(v) >= 0) { | ||
if(!webglew(gl).texture_float_linear) { | ||
if(!gl.getExtension('OES_texture_float_linear')) { | ||
v = gl.NEAREST | ||
@@ -142,3 +141,3 @@ } | ||
if(this.type === gl.FLOAT && linearTypes.indexOf(v) >= 0) { | ||
if(!webglew(gl).texture_float_linear) { | ||
if(!gl.getExtension('OES_texture_float_linear')) { | ||
v = gl.NEAREST | ||
@@ -162,3 +161,3 @@ } | ||
if(psamples !== this._anisoSamples) { | ||
var ext = webglew(this.gl).EXT_texture_filter_anisotropic | ||
var ext = gl.getExtension('EXT_texture_filter_anisotropic') | ||
if(ext) { | ||
@@ -227,3 +226,3 @@ this.gl.texParameterf(this.gl.TEXTURE_2D, ext.TEXTURE_MAX_ANISOTROPY_EXT, this._anisoSamples) | ||
return this._shapeVector | ||
}, | ||
}, | ||
set: function(x) { | ||
@@ -282,3 +281,3 @@ if(!Array.isArray(x)) { | ||
this.gl.generateMipmap(this.gl.TEXTURE_2D) | ||
//Update mip levels | ||
@@ -333,7 +332,7 @@ var l = Math.min(this._shape[0], this._shape[1]) | ||
if(shape.length === 3) { | ||
return (stride[2] === 1) && | ||
return (stride[2] === 1) && | ||
(stride[1] === shape[0]*shape[2]) && | ||
(stride[0] === shape[2]) | ||
} | ||
return (stride[0] === 1) && | ||
return (stride[0] === 1) && | ||
(stride[1] === shape[0]) | ||
@@ -454,3 +453,3 @@ } | ||
} | ||
if(type === gl.FLOAT && !webglew(gl).texture_float) { | ||
if(type === gl.FLOAT && !gl.getExtension('OES_texture_float')) { | ||
throw new Error('gl-texture2d: Floating point textures not supported on this platform') | ||
@@ -512,3 +511,3 @@ } | ||
} | ||
if(type === gl.FLOAT && !webglew(gl).texture_float) { | ||
if(type === gl.FLOAT && !gl.getExtension('OES_texture_float')) { | ||
type = gl.UNSIGNED_BYTE | ||
@@ -515,0 +514,0 @@ packed = false |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24563
3
191
5
531
- Removedwebglew@^1.0.4
- Removedweak-map@1.0.8(transitive)
- Removedwebglew@1.0.5(transitive)