weex-gcanvas
Advanced tools
Comparing version 0.5.4 to 0.5.5
@@ -29,2 +29,8 @@ var GBridge = require("./gutil").GBridge; | ||
if(typeof CmdType == "undefined"){ | ||
var CmdType = { | ||
Render : 1, | ||
}; | ||
} | ||
var G_UseGBridge = 1; | ||
@@ -645,4 +651,4 @@ var G_NeedRender = false; | ||
G_NeedRender = true; | ||
var type = 0x60000000; //ContextType.ContextWebGL << 30 | MethodType.Sync << 29 | ||
var result = GBridge.callExtendCallNative({"className":"WXGCanvasCallNative", "contextId": this.componentId, "type":type, "args":"render"}); | ||
var type = 0x60000001; //ContextType.ContextWebGL << 30 | MethodType.Sync << 29 | CmdType.Render | ||
var result = GBridge.callExtendCallNative({"className":"WXGCanvasCallNative", "contextId": this.componentId, "type":type}); | ||
} | ||
@@ -718,2 +724,3 @@ }; | ||
//new array or size | ||
GContextWebGL.prototype.bufferData = function(target, array, usage){ | ||
@@ -757,3 +764,3 @@ var cmd = (this.bufferDataId + target + "," + GetArrayType(array) + "," + GarrToBase64(array) + "," + usage + ";"); | ||
GContextWebGL.prototype.colorMask = function(red, green, blue, alpha){ | ||
var cmd = (this.colorMaskId + red?1:0 + "," + green?1:0 + "," + blue?1:0 + "," + alpha?1:0 + ";"); | ||
var cmd = (this.colorMaskId + (red?1:0) + "," + (green?1:0) + "," + (blue?1:0) + "," + (alpha?1:0) + ";"); | ||
WebGLCallNative(this.componentId, cmd); | ||
@@ -1196,3 +1203,3 @@ }; | ||
GContextWebGL.prototype.pixelStorei = function(pname, param){ | ||
var cmd = (this.pixelStoreiId + pname + "," + param?1:0 + ";"); | ||
var cmd = (this.pixelStoreiId + pname + "," + (param?1:0) + ";"); | ||
WebGLCallNative(this.componentId, cmd); | ||
@@ -1221,3 +1228,3 @@ }; | ||
GContextWebGL.prototype.sampleCoverage = function(value, invert){ | ||
var cmd = (this.sampleCoverageId + value + "," + invert?1:0 + ";"); | ||
var cmd = (this.sampleCoverageId + value + "," + (invert?1:0) + ";"); | ||
WebGLCallNative(this.componentId, cmd); | ||
@@ -1343,3 +1350,2 @@ }; | ||
} | ||
} | ||
@@ -1355,3 +1361,3 @@ else if( argc == 9) | ||
var cmd = (this.texSubImage2DId + argc + "," + target + "," + level + "," + xoffset + "," + yoffset + "," + | ||
width + "," + height + "," + format + "," + type + "," + GarrToBase64(array) + ";"); | ||
width + "," + height + "," + format + "," + type + "," + GetArrayType(array) + "," + GarrToBase64(array) + ";"); | ||
WebGLCallNative(this.componentId, cmd); | ||
@@ -1392,3 +1398,3 @@ } | ||
GContextWebGL.prototype.uniform1i = function(location, value){ | ||
var cmd = (this.uniform1iId + location+ "," + value?1:0 + ";"); | ||
var cmd = (this.uniform1iId + location+ "," + (value?1:0) + ";"); | ||
WebGLCallNative(this.componentId, cmd); | ||
@@ -1395,0 +1401,0 @@ }; |
{ | ||
"name": "weex-gcanvas", | ||
"version": "0.5.4", | ||
"version": "0.5.5", | ||
"main":"gcanvas.js", | ||
@@ -5,0 +5,0 @@ "platform": [ |
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
115592
3211