@naivemap/mapbox-gl-image-layer 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +3 -0
- package/dist/js/index.js +3 -0
- package/package.json +2 -2
package/dist/es/index.js
CHANGED
|
@@ -67,6 +67,9 @@ var ImageLayer = /** @class */ (function () {
|
|
|
67
67
|
gl.activeTexture(gl.TEXTURE0);
|
|
68
68
|
gl.bindTexture(gl.TEXTURE_2D, this._texture);
|
|
69
69
|
gl.uniform1i(gl.getUniformLocation(this._program, 'u_sampler'), 0);
|
|
70
|
+
// aplha
|
|
71
|
+
gl.enable(gl.BLEND);
|
|
72
|
+
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
70
73
|
gl.drawElements(gl.TRIANGLES, this._arrugado.trigs.length, gl.UNSIGNED_SHORT, 0);
|
|
71
74
|
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
|
72
75
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
package/dist/js/index.js
CHANGED
|
@@ -69,6 +69,9 @@ var ImageLayer = /** @class */ (function () {
|
|
|
69
69
|
gl.activeTexture(gl.TEXTURE0);
|
|
70
70
|
gl.bindTexture(gl.TEXTURE_2D, this._texture);
|
|
71
71
|
gl.uniform1i(gl.getUniformLocation(this._program, 'u_sampler'), 0);
|
|
72
|
+
// aplha
|
|
73
|
+
gl.enable(gl.BLEND);
|
|
74
|
+
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
72
75
|
gl.drawElements(gl.TRIANGLES, this._arrugado.trigs.length, gl.UNSIGNED_SHORT, 0);
|
|
73
76
|
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
|
74
77
|
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naivemap/mapbox-gl-image-layer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Load a static image of any projection via Arrugator and Proj4js.",
|
|
5
5
|
"author": "huanglii <li.huangli@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/naivemap/mapbox-gl-layers#readme",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"@types/proj4": "^2.5.2",
|
|
54
54
|
"npm-run-all": "^4.1.5"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "f5a144f620e91292a2f81175e4847971e2f9fb6a"
|
|
57
57
|
}
|