diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 1dbaf99..51cc887 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -227,9 +227,9 @@ */ Mesh.prototype._renderCanvasDrawTriangle = function (context, vertices, uvs, index0, index1, index2) { - var textureSource = this.texture.baseTexture.source; - var textureWidth = this.texture.baseTexture.width; - var textureHeight = this.texture.baseTexture.height; + var textureSource = this._texture.baseTexture.source; + var textureWidth = this._texture.baseTexture.width; + var textureHeight = this._texture.baseTexture.height; var x0 = vertices[index0], x1 = vertices[index1], x2 = vertices[index2]; var y0 = vertices[index0 + 1], y1 = vertices[index1 + 1], y2 = vertices[index2 + 1]; diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 1dbaf99..51cc887 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -227,9 +227,9 @@ */ Mesh.prototype._renderCanvasDrawTriangle = function (context, vertices, uvs, index0, index1, index2) { - var textureSource = this.texture.baseTexture.source; - var textureWidth = this.texture.baseTexture.width; - var textureHeight = this.texture.baseTexture.height; + var textureSource = this._texture.baseTexture.source; + var textureWidth = this._texture.baseTexture.width; + var textureHeight = this._texture.baseTexture.height; var x0 = vertices[index0], x1 = vertices[index1], x2 = vertices[index2]; var y0 = vertices[index0 + 1], y1 = vertices[index1 + 1], y2 = vertices[index2 + 1]; diff --git a/src/mesh/Rope.js b/src/mesh/Rope.js index 3111c26..e8c1c60 100644 --- a/src/mesh/Rope.js +++ b/src/mesh/Rope.js @@ -65,7 +65,7 @@ var points = this.points; // if too little points, or texture hasn't got UVs set yet just move on. - if (points.length < 1 || !this.texture._uvs) + if (points.length < 1 || !this._texture._uvs) { return; } @@ -75,7 +75,7 @@ var indices = this.indices; var colors = this.colors; - var textureUvs = this.texture._uvs; + var textureUvs = this._texture._uvs; var offset = new core.math.Point(textureUvs.x0, textureUvs.y0); var factor = new core.math.Point(textureUvs.x2 - textureUvs.x0, textureUvs.y2 - textureUvs.y0); @@ -180,7 +180,7 @@ } perpLength = Math.sqrt(perpX * perpX + perpY * perpY); - num = this.texture.height / 2; //(20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio; + num = this._texture.height / 2; //(20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio; perpX /= perpLength; perpY /= perpLength; diff --git a/src/mesh/Mesh.js b/src/mesh/Mesh.js index 1dbaf99..51cc887 100644 --- a/src/mesh/Mesh.js +++ b/src/mesh/Mesh.js @@ -227,9 +227,9 @@ */ Mesh.prototype._renderCanvasDrawTriangle = function (context, vertices, uvs, index0, index1, index2) { - var textureSource = this.texture.baseTexture.source; - var textureWidth = this.texture.baseTexture.width; - var textureHeight = this.texture.baseTexture.height; + var textureSource = this._texture.baseTexture.source; + var textureWidth = this._texture.baseTexture.width; + var textureHeight = this._texture.baseTexture.height; var x0 = vertices[index0], x1 = vertices[index1], x2 = vertices[index2]; var y0 = vertices[index0 + 1], y1 = vertices[index1 + 1], y2 = vertices[index2 + 1]; diff --git a/src/mesh/Rope.js b/src/mesh/Rope.js index 3111c26..e8c1c60 100644 --- a/src/mesh/Rope.js +++ b/src/mesh/Rope.js @@ -65,7 +65,7 @@ var points = this.points; // if too little points, or texture hasn't got UVs set yet just move on. - if (points.length < 1 || !this.texture._uvs) + if (points.length < 1 || !this._texture._uvs) { return; } @@ -75,7 +75,7 @@ var indices = this.indices; var colors = this.colors; - var textureUvs = this.texture._uvs; + var textureUvs = this._texture._uvs; var offset = new core.math.Point(textureUvs.x0, textureUvs.y0); var factor = new core.math.Point(textureUvs.x2 - textureUvs.x0, textureUvs.y2 - textureUvs.y0); @@ -180,7 +180,7 @@ } perpLength = Math.sqrt(perpX * perpX + perpY * perpY); - num = this.texture.height / 2; //(20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio; + num = this._texture.height / 2; //(20 + Math.abs(Math.sin((i + this.count) * 0.3) * 50) )* ratio; perpX /= perpLength; perpY /= perpLength; diff --git a/src/mesh/webgl/MeshRenderer.js b/src/mesh/webgl/MeshRenderer.js index 998c36f..099062b 100644 --- a/src/mesh/webgl/MeshRenderer.js +++ b/src/mesh/webgl/MeshRenderer.js @@ -77,7 +77,7 @@ var renderer = this.renderer, gl = renderer.gl, - texture = mesh.texture.baseTexture, + texture = mesh._texture.baseTexture, shader = renderer.shaderManager.plugins.meshShader; var drawMode = mesh.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH ? gl.TRIANGLE_STRIP : gl.TRIANGLES;