@pixi/canvas-mesh
Advanced tools
Comparing version 5.0.0-rc.2 to 5.0.0-rc.3
/*! | ||
* @pixi/canvas-mesh - v5.0.0-rc.2 | ||
* Compiled Mon, 18 Feb 2019 23:45:28 UTC | ||
* @pixi/canvas-mesh - v5.0.0-rc.3 | ||
* Compiled Fri, 22 Mar 2019 16:33:44 UTC | ||
* | ||
@@ -5,0 +5,0 @@ * @pixi/canvas-mesh is licensed under the MIT License. |
/*! | ||
* @pixi/canvas-mesh - v5.0.0-rc.2 | ||
* Compiled Mon, 18 Feb 2019 23:45:28 UTC | ||
* @pixi/canvas-mesh - v5.0.0-rc.3 | ||
* Compiled Fri, 22 Mar 2019 16:33:44 UTC | ||
* | ||
@@ -35,3 +35,3 @@ * @pixi/canvas-mesh is licensed under the MIT License. | ||
*/ | ||
CanvasMeshRenderer.prototype.render = function render (mesh$$1) | ||
CanvasMeshRenderer.prototype.render = function render (mesh) | ||
{ | ||
@@ -41,6 +41,6 @@ var renderer = this.renderer; | ||
var transform = mesh$$1.worldTransform; | ||
var transform = mesh.worldTransform; | ||
var res = renderer.resolution; | ||
if (mesh$$1.roundPixels) | ||
if (mesh.roundPixels) | ||
{ | ||
@@ -68,12 +68,12 @@ context.setTransform( | ||
renderer.context.globalAlpha = mesh$$1.worldAlpha; | ||
renderer.setBlendMode(mesh$$1.blendMode); | ||
renderer.context.globalAlpha = mesh.worldAlpha; | ||
renderer.setBlendMode(mesh.blendMode); | ||
if (mesh$$1.drawMode !== constants.DRAW_MODES.TRIANGLES) | ||
if (mesh.drawMode !== constants.DRAW_MODES.TRIANGLES) | ||
{ | ||
this._renderTriangleMesh(mesh$$1); | ||
this._renderTriangleMesh(mesh); | ||
} | ||
else | ||
{ | ||
this._renderTriangles(mesh$$1); | ||
this._renderTriangles(mesh); | ||
} | ||
@@ -88,6 +88,6 @@ }; | ||
*/ | ||
CanvasMeshRenderer.prototype._renderTriangleMesh = function _renderTriangleMesh (mesh$$1) | ||
CanvasMeshRenderer.prototype._renderTriangleMesh = function _renderTriangleMesh (mesh) | ||
{ | ||
// draw triangles!! | ||
var length = mesh$$1.geometry.buffers[0].data.length; | ||
var length = mesh.geometry.buffers[0].data.length; | ||
@@ -99,3 +99,3 @@ for (var i = 0; i < length - 2; i++) | ||
this._renderDrawTriangle(mesh$$1, index, (index + 2), (index + 4)); | ||
this._renderDrawTriangle(mesh, index, (index + 2), (index + 4)); | ||
} | ||
@@ -110,6 +110,6 @@ }; | ||
*/ | ||
CanvasMeshRenderer.prototype._renderTriangles = function _renderTriangles (mesh$$1) | ||
CanvasMeshRenderer.prototype._renderTriangles = function _renderTriangles (mesh) | ||
{ | ||
// draw triangles!! | ||
var indices = mesh$$1.geometry.getIndex().data; | ||
var indices = mesh.geometry.getIndex().data; | ||
var length = indices.length; | ||
@@ -124,3 +124,3 @@ | ||
this._renderDrawTriangle(mesh$$1, index0, index1, index2); | ||
this._renderDrawTriangle(mesh, index0, index1, index2); | ||
} | ||
@@ -138,8 +138,8 @@ }; | ||
*/ | ||
CanvasMeshRenderer.prototype._renderDrawTriangle = function _renderDrawTriangle (mesh$$1, index0, index1, index2) | ||
CanvasMeshRenderer.prototype._renderDrawTriangle = function _renderDrawTriangle (mesh, index0, index1, index2) | ||
{ | ||
var context = this.renderer.context; | ||
var vertices = mesh$$1.geometry.buffers[0].data; | ||
var uvs = mesh$$1.uvs; | ||
var texture = mesh$$1.texture; | ||
var vertices = mesh.geometry.buffers[0].data; | ||
var uvs = mesh.uvs; | ||
var texture = mesh.texture; | ||
@@ -170,8 +170,8 @@ if (!texture.valid) | ||
var canvasPadding = mesh$$1.canvasPadding / this.renderer.resolution; | ||
var canvasPadding = mesh.canvasPadding / this.renderer.resolution; | ||
if (canvasPadding > 0) | ||
{ | ||
var paddingX = canvasPadding / Math.abs(mesh$$1.worldTransform.a); | ||
var paddingY = canvasPadding / Math.abs(mesh$$1.worldTransform.d); | ||
var paddingX = canvasPadding / Math.abs(mesh.worldTransform.a); | ||
var paddingY = canvasPadding / Math.abs(mesh.worldTransform.d); | ||
var centerX = (x0 + x1 + x2) / 3; | ||
@@ -256,6 +256,6 @@ var centerY = (y0 + y1 + y2) / 3; | ||
*/ | ||
CanvasMeshRenderer.prototype.renderMeshFlat = function renderMeshFlat (mesh$$1) | ||
CanvasMeshRenderer.prototype.renderMeshFlat = function renderMeshFlat (mesh) | ||
{ | ||
var context = this.renderer.context; | ||
var vertices = mesh$$1.geometry.getAttribute('aVertexPosition').data; | ||
var vertices = mesh.geometry.getAttribute('aVertexPosition').data; | ||
var length = vertices.length / 2; | ||
@@ -321,5 +321,5 @@ | ||
*/ | ||
mesh.MeshMaterial.prototype._renderCanvas = function _renderCanvas(renderer, mesh$$1) | ||
mesh.MeshMaterial.prototype._renderCanvas = function _renderCanvas(renderer, mesh) | ||
{ | ||
renderer.plugins.mesh.render(mesh$$1); | ||
renderer.plugins.mesh.render(mesh); | ||
}; | ||
@@ -326,0 +326,0 @@ |
{ | ||
"name": "@pixi/canvas-mesh", | ||
"version": "5.0.0-rc.2", | ||
"version": "5.0.0-rc.3", | ||
"main": "lib/canvas-mesh.js", | ||
"module": "lib/canvas-mesh.es.js", | ||
"bundle": "dist/canvas-mesh.js", | ||
"description": "Canvas mixin for the mesh package", | ||
@@ -22,15 +23,16 @@ "author": "Mat Groves", | ||
"files": [ | ||
"lib" | ||
"lib", | ||
"dist" | ||
], | ||
"dependencies": { | ||
"@pixi/canvas-renderer": "^5.0.0-rc.2", | ||
"@pixi/constants": "^5.0.0-rc.2", | ||
"@pixi/mesh": "^5.0.0-rc.2", | ||
"@pixi/mesh-extras": "^5.0.0-rc.2", | ||
"@pixi/settings": "^5.0.0-rc.2" | ||
"@pixi/canvas-renderer": "^5.0.0-rc.3", | ||
"@pixi/constants": "^5.0.0-rc.3", | ||
"@pixi/mesh": "^5.0.0-rc.3", | ||
"@pixi/mesh-extras": "^5.0.0-rc.3", | ||
"@pixi/settings": "^5.0.0-rc.3" | ||
}, | ||
"devDependencies": { | ||
"floss": "^2.1.5" | ||
"floss": "^2.2.0" | ||
}, | ||
"gitHead": "53b354f4e01d3baee7223756dd09a3163ad29d0f" | ||
"gitHead": "8bd27c8b903ae2c8f90d91d64e82d65b19ac1cdb" | ||
} |
Sorry, the diff of this file is not supported yet
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
158600
11
1421
Updated@pixi/constants@^5.0.0-rc.3
Updated@pixi/mesh@^5.0.0-rc.3
Updated@pixi/settings@^5.0.0-rc.3