diff --git a/src/deprecation.js b/src/deprecation.js index 91acdab..d62336f 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -18,12 +18,12 @@ }; core.DisplayObjectContainer = function () { - window.console.warn("The Strip class has been renamed to Mesh, please use Container from now"); + window.console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on"); return new core.Container(); }; core.Strip = function (texture) { - window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now"); + window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now on"); return new extras.mesh.Mesh(texture); }; diff --git a/src/deprecation.js b/src/deprecation.js index 91acdab..d62336f 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -18,12 +18,12 @@ }; core.DisplayObjectContainer = function () { - window.console.warn("The Strip class has been renamed to Mesh, please use Container from now"); + window.console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on"); return new core.Container(); }; core.Strip = function (texture) { - window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now"); + window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now on"); return new extras.mesh.Mesh(texture); }; diff --git a/src/extras/mesh/Mesh.js b/src/extras/mesh/Mesh.js index 485da9f..30431ae 100644 --- a/src/extras/mesh/Mesh.js +++ b/src/extras/mesh/Mesh.js @@ -9,7 +9,7 @@ * @param [vertices] {Float32Arrif you want to specify the vertices * @param [uvs] {Float32Array} if you want to specify the uvs * @param [indices] {Uint16Array} if you want to specify the indices - * @param [drawMode] {number} the drawMode, can be any of the Mesh.DrawModes consts + * @param [drawMode] {number} the drawMode, can be any of the Mesh.DRAW_MODES consts */ function Mesh(texture, vertices, uvs, indices, drawMode) { @@ -71,11 +71,11 @@ this.canvasPadding = 0; /** - * The way the Mesh should be drawn, can be any of the Mesh.DrawModes consts + * The way the Mesh should be drawn, can be any of the Mesh.DRAW_MODES consts * * @member {number} */ - this.drawMode = drawMode || Mesh.DrawModes.TRIANGLE_MESH; + this.drawMode = drawMode || Mesh.DRAW_MODES.TRIANGLE_MESH; } // constructor @@ -114,7 +114,7 @@ context.setTransform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty); } - if (this.drawMode === Mesh.DrawModes.TRIANGLE_MESH) + if (this.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH) { this._renderCanvasTriangleMesh(context); } @@ -377,11 +377,11 @@ * * @static * @constant - * @property {object} DrawModes - * @property {number} DrawModes.TRIANGLE_MESH - * @property {number} DrawModes.TRIANGLES + * @property {object} DRAW_MODES + * @property {number} DRAW_MODES.TRIANGLE_MESH + * @property {number} DRAW_MODES.TRIANGLES */ -Mesh.DrawModes = { +Mesh.DRAW_MODES = { TRIANGLE_MESH: 0, TRIANGLES: 1 }; diff --git a/src/deprecation.js b/src/deprecation.js index 91acdab..d62336f 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -18,12 +18,12 @@ }; core.DisplayObjectContainer = function () { - window.console.warn("The Strip class has been renamed to Mesh, please use Container from now"); + window.console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on"); return new core.Container(); }; core.Strip = function (texture) { - window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now"); + window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now on"); return new extras.mesh.Mesh(texture); }; diff --git a/src/extras/mesh/Mesh.js b/src/extras/mesh/Mesh.js index 485da9f..30431ae 100644 --- a/src/extras/mesh/Mesh.js +++ b/src/extras/mesh/Mesh.js @@ -9,7 +9,7 @@ * @param [vertices] {Float32Arrif you want to specify the vertices * @param [uvs] {Float32Array} if you want to specify the uvs * @param [indices] {Uint16Array} if you want to specify the indices - * @param [drawMode] {number} the drawMode, can be any of the Mesh.DrawModes consts + * @param [drawMode] {number} the drawMode, can be any of the Mesh.DRAW_MODES consts */ function Mesh(texture, vertices, uvs, indices, drawMode) { @@ -71,11 +71,11 @@ this.canvasPadding = 0; /** - * The way the Mesh should be drawn, can be any of the Mesh.DrawModes consts + * The way the Mesh should be drawn, can be any of the Mesh.DRAW_MODES consts * * @member {number} */ - this.drawMode = drawMode || Mesh.DrawModes.TRIANGLE_MESH; + this.drawMode = drawMode || Mesh.DRAW_MODES.TRIANGLE_MESH; } // constructor @@ -114,7 +114,7 @@ context.setTransform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty); } - if (this.drawMode === Mesh.DrawModes.TRIANGLE_MESH) + if (this.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH) { this._renderCanvasTriangleMesh(context); } @@ -377,11 +377,11 @@ * * @static * @constant - * @property {object} DrawModes - * @property {number} DrawModes.TRIANGLE_MESH - * @property {number} DrawModes.TRIANGLES + * @property {object} DRAW_MODES + * @property {number} DRAW_MODES.TRIANGLE_MESH + * @property {number} DRAW_MODES.TRIANGLES */ -Mesh.DrawModes = { +Mesh.DRAW_MODES = { TRIANGLE_MESH: 0, TRIANGLES: 1 }; diff --git a/src/extras/mesh/webgl/MeshRenderer.js b/src/extras/mesh/webgl/MeshRenderer.js index 5eaabce..2dd7678 100644 --- a/src/extras/mesh/webgl/MeshRenderer.js +++ b/src/extras/mesh/webgl/MeshRenderer.js @@ -79,7 +79,7 @@ texture = mesh.texture.baseTexture, shader = renderer.shaderManager.plugins.meshShader; -// var drawMode = mesh.drawMode === Strip.DrawModes.TRIANGLE_STRIP ? gl.TRIANGLE_STRIP : gl.TRIANGLES; +// var drawMode = mesh.drawMode === Strip.DRAW_MODES.TRIANGLE_STRIP ? gl.TRIANGLE_STRIP : gl.TRIANGLES; var drawMode = gl.TRIANGLE_STRIP; renderer.blendModeManager.setBlendMode(mesh.blendMode); diff --git a/src/deprecation.js b/src/deprecation.js index 91acdab..d62336f 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -18,12 +18,12 @@ }; core.DisplayObjectContainer = function () { - window.console.warn("The Strip class has been renamed to Mesh, please use Container from now"); + window.console.warn("DisplayObjectContainer has been shortened to Container, please use Container from now on"); return new core.Container(); }; core.Strip = function (texture) { - window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now"); + window.console.warn("The Strip class has been renamed to Mesh, please use Mesh from now on"); return new extras.mesh.Mesh(texture); }; diff --git a/src/extras/mesh/Mesh.js b/src/extras/mesh/Mesh.js index 485da9f..30431ae 100644 --- a/src/extras/mesh/Mesh.js +++ b/src/extras/mesh/Mesh.js @@ -9,7 +9,7 @@ * @param [vertices] {Float32Arrif you want to specify the vertices * @param [uvs] {Float32Array} if you want to specify the uvs * @param [indices] {Uint16Array} if you want to specify the indices - * @param [drawMode] {number} the drawMode, can be any of the Mesh.DrawModes consts + * @param [drawMode] {number} the drawMode, can be any of the Mesh.DRAW_MODES consts */ function Mesh(texture, vertices, uvs, indices, drawMode) { @@ -71,11 +71,11 @@ this.canvasPadding = 0; /** - * The way the Mesh should be drawn, can be any of the Mesh.DrawModes consts + * The way the Mesh should be drawn, can be any of the Mesh.DRAW_MODES consts * * @member {number} */ - this.drawMode = drawMode || Mesh.DrawModes.TRIANGLE_MESH; + this.drawMode = drawMode || Mesh.DRAW_MODES.TRIANGLE_MESH; } // constructor @@ -114,7 +114,7 @@ context.setTransform(transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty); } - if (this.drawMode === Mesh.DrawModes.TRIANGLE_MESH) + if (this.drawMode === Mesh.DRAW_MODES.TRIANGLE_MESH) { this._renderCanvasTriangleMesh(context); } @@ -377,11 +377,11 @@ * * @static * @constant - * @property {object} DrawModes - * @property {number} DrawModes.TRIANGLE_MESH - * @property {number} DrawModes.TRIANGLES + * @property {object} DRAW_MODES + * @property {number} DRAW_MODES.TRIANGLE_MESH + * @property {number} DRAW_MODES.TRIANGLES */ -Mesh.DrawModes = { +Mesh.DRAW_MODES = { TRIANGLE_MESH: 0, TRIANGLES: 1 }; diff --git a/src/extras/mesh/webgl/MeshRenderer.js b/src/extras/mesh/webgl/MeshRenderer.js index 5eaabce..2dd7678 100644 --- a/src/extras/mesh/webgl/MeshRenderer.js +++ b/src/extras/mesh/webgl/MeshRenderer.js @@ -79,7 +79,7 @@ texture = mesh.texture.baseTexture, shader = renderer.shaderManager.plugins.meshShader; -// var drawMode = mesh.drawMode === Strip.DrawModes.TRIANGLE_STRIP ? gl.TRIANGLE_STRIP : gl.TRIANGLES; +// var drawMode = mesh.drawMode === Strip.DRAW_MODES.TRIANGLE_STRIP ? gl.TRIANGLE_STRIP : gl.TRIANGLES; var drawMode = gl.TRIANGLE_STRIP; renderer.blendModeManager.setBlendMode(mesh.blendMode); diff --git a/src/spine/Spine.js b/src/spine/Spine.js index 58645ae..8d165c2 100644 --- a/src/spine/Spine.js +++ b/src/spine/Spine.js @@ -290,7 +290,7 @@ var texture = new core.Texture(baseTexture); var strip = new core.Strip(texture); - strip.drawMode = core.Strip.DrawModes.TRIANGLES; + strip.drawMode = core.Strip.DRAW_MODES.TRIANGLES; strip.canvasPadding = 1.5; strip.vertices = new Float32Array(attachment.uvs.length);