Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

weex-gcanvas

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weex-gcanvas - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

40

gwebgl.js

@@ -621,2 +621,17 @@ var GBridge = require("./gutil").GBridge;

//字符串split使用
function GetArrayType(array)
{
//1 - uint8 array
//2 - uint16 array
//4 - uint32 array
//14 - float32 array
var bytes = array.BYTES_PER_ELEMENT;
if( bytes == 4 && (array instanceof Float32Array) )
{
return 10+bytes;
}
return bytes;
}
//////////////////////////////////////////////////////////////////////////

@@ -744,3 +759,4 @@ // GWebGLActiveInfos

GContextWebGL.prototype.bufferData = function(target, array, usage){
var cmd = (this.bufferDataId + target + "," + array.BYTES_PER_ELEMENT + "," + GarrToBase64(array) + "," + usage + ";");
var cmd = (this.bufferDataId + target + "," + GetArrayType(array) + "," + GarrToBase64(array) + "," + usage + ";");
WebGLCallNative(this.componentId, cmd);

@@ -751,3 +767,3 @@ };

GContextWebGL.prototype.bufferSubData = function(target, offset, array){
var cmd = (this.bufferSubDataId + target + "," + offset + "," + array.BYTES_PER_ELEMENT + "," + GarrToBase64(array) + ";");
var cmd = (this.bufferSubDataId + target + "," + offset + "," + GetArrayType(array) + "," + GarrToBase64(array) + ";");
WebGLCallNative(this.componentId, cmd);

@@ -795,3 +811,3 @@ };

var cmd = (this.compressedTexImage2DId + target + "," + level + "," + internalformat + "," + width + "," +
height + "," + border + "," + array.BYTES_PER_ELEMENT + "," + GarrToBase64(array) + ";");
height + "," + border + "," + GetArrayType(array) + "," + GarrToBase64(array) + ";");
WebGLCallNative(this.componentId, cmd);

@@ -803,3 +819,3 @@ };

var cmd = (this.compressedTexSubImage2DId + target + "," + level + "," + xoffset + "," + yoffset + "," + width + "," +
height + "," + format + "," + array.BYTES_PER_ELEMENT + "," + GarrToBase64(array) + ";");
height + "," + format + "," + GetArrayType(array) + "," + GarrToBase64(array) + ";");
WebGLCallNative(this.componentId, cmd);

@@ -1016,2 +1032,4 @@ }

ext.vertexAttribDivisorANGLE = gl.vertexAttribDivisorANGLE;
ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
}

@@ -1027,2 +1045,7 @@ else if( name == "OES_vertex_array_object" )

ext.VERTEX_ARRAY_BINDING_OES = 0x85B5;
ext.OES_vertex_array_object = 1;
ext.OES_texture_float = 1;
ext.OES_element_index_uint = 1;
}

@@ -1123,3 +1146,5 @@ else if( name == "OES_texture_float" )

var cmd = (this.getSupportedExtensionsId + ";");
return WebGLCallNative(this.componentId, cmd);
var resultString = WebGLCallNative(this.componentId, cmd);
var resultArray = resultString.split(",");
return resultArray;
};

@@ -1226,4 +1251,3 @@

var pixelsString = WebGLCallNative(this.componentId, cmd);
var pixelsArray = retPixels.split(",");
return pixelsArray;
var pixelsArray = pixelsString.split(",");
};

@@ -1325,3 +1349,3 @@

width + "," + height + "," + border + "," + format + "," + type + "," +
array.BYTES_PER_ELEMENT + "," + GarrToBase64(array) + ";");
GetArrayType(array) + "," + GarrToBase64(array) + ";");
WebGLCallNative(this.componentId, cmd);

@@ -1328,0 +1352,0 @@ }

2

package.json
{
"name": "weex-gcanvas",
"version": "0.5.2",
"version": "0.5.3",
"main":"gcanvas.js",

@@ -5,0 +5,0 @@ "platform": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc