Skip to content

Commit

Permalink
rename render classes
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Feb 7, 2016
1 parent ac8260e commit 0ec3c26
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ goog.provide('main');

goog.require('spine');
goog.require('atlas');
goog.require('renderCtx2D');
goog.require('renderWebGL');
goog.require('RenderCtx2D');
goog.require('RenderWebGL');

main.start = function() {
document.body.style.margin = '0px';
Expand Down Expand Up @@ -73,12 +73,12 @@ main.start = function() {

window.addEventListener('resize', function() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
canvas.style.width = canvas.width + 'px';
canvas.height = window.innerHeight;
canvas.style.height = canvas.height + 'px';
});

var render_ctx2d = new renderCtx2D(ctx);
var render_ctx2d = new RenderCtx2D(ctx);

var canvas_gl = document.createElement('canvas');
canvas_gl.width = window.innerWidth;
Expand All @@ -99,7 +99,7 @@ main.start = function() {
canvas_gl.style.height = canvas_gl.height + 'px';
});

var render_webgl = new renderWebGL(gl);
var render_webgl = new RenderWebGL(gl);

var camera_x = 0;
var camera_y = canvas.height / 3;
Expand Down
16 changes: 8 additions & 8 deletions demo/render-ctx2d.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
goog.provide('renderCtx2D');
goog.provide('RenderCtx2D');

/**
* @constructor
* @param {CanvasRenderingContext2D} ctx
*/
renderCtx2D = function(ctx) {
RenderCtx2D = function(ctx) {
var render = this;
render.ctx = ctx;
render.images = {};
Expand All @@ -19,7 +19,7 @@ renderCtx2D = function(ctx) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderCtx2D.prototype.dropPose = function(spine_pose, atlas_data) {
RenderCtx2D.prototype.dropPose = function(spine_pose, atlas_data) {
var render = this;
render.images = {};
render.skin_info_map = {};
Expand All @@ -31,7 +31,7 @@ renderCtx2D.prototype.dropPose = function(spine_pose, atlas_data) {
* @param {atlas.Data} atlas_data
* @param {Object.<string,HTMLImageElement>} images
*/
renderCtx2D.prototype.loadPose = function(spine_pose, atlas_data, images) {
RenderCtx2D.prototype.loadPose = function(spine_pose, atlas_data, images) {
var render = this;

spine_pose.data.iterateSkins(function(skin_key, skin) {
Expand Down Expand Up @@ -98,7 +98,7 @@ renderCtx2D.prototype.loadPose = function(spine_pose, atlas_data, images) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderCtx2D.prototype.updatePose = function(spine_pose, atlas_data) {
RenderCtx2D.prototype.updatePose = function(spine_pose, atlas_data) {
var render = this;

spine_pose.iterateAttachments(function(slot_key, slot, skin_slot, attachment_key, attachment) {
Expand Down Expand Up @@ -223,7 +223,7 @@ renderCtx2D.prototype.updatePose = function(spine_pose, atlas_data) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderCtx2D.prototype.drawPose = function(spine_pose, atlas_data) {
RenderCtx2D.prototype.drawPose = function(spine_pose, atlas_data) {
var render = this;
var ctx = render.ctx;

Expand Down Expand Up @@ -305,7 +305,7 @@ renderCtx2D.prototype.drawPose = function(spine_pose, atlas_data) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderCtx2D.prototype.drawDebugPose = function(spine_pose, atlas_data) {
RenderCtx2D.prototype.drawDebugPose = function(spine_pose, atlas_data) {
var render = this;
var ctx = render.ctx;

Expand Down Expand Up @@ -387,7 +387,7 @@ renderCtx2D.prototype.drawDebugPose = function(spine_pose, atlas_data) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderCtx2D.prototype.drawDebugData = function(spine_pose, atlas_data) {
RenderCtx2D.prototype.drawDebugData = function(spine_pose, atlas_data) {
var render = this;
var ctx = render.ctx;

Expand Down
10 changes: 5 additions & 5 deletions demo/render-webgl.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
goog.provide('renderWebGL');
goog.provide('RenderWebGL');

/**
* @constructor
* @param {WebGLRenderingContext} gl
*/
renderWebGL = function(gl) {
RenderWebGL = function(gl) {
var render = this;
render.gl = gl;
if (!gl) {
Expand Down Expand Up @@ -131,7 +131,7 @@ renderWebGL = function(gl) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderWebGL.prototype.dropPose = function(spine_pose, atlas_data) {
RenderWebGL.prototype.dropPose = function(spine_pose, atlas_data) {
var render = this;
var gl = render.gl;
if (!gl) {
Expand Down Expand Up @@ -205,7 +205,7 @@ renderWebGL.prototype.dropPose = function(spine_pose, atlas_data) {
* @param {atlas.Data} atlas_data
* @param {Object.<string,HTMLImageElement>} images
*/
renderWebGL.prototype.loadPose = function(spine_pose, atlas_data, images) {
RenderWebGL.prototype.loadPose = function(spine_pose, atlas_data, images) {
var render = this;
var gl = render.gl;
if (!gl) {
Expand Down Expand Up @@ -484,7 +484,7 @@ renderWebGL.prototype.loadPose = function(spine_pose, atlas_data, images) {
* @param {spine.Pose} spine_pose
* @param {atlas.Data} atlas_data
*/
renderWebGL.prototype.drawPose = function(spine_pose, atlas_data) {
RenderWebGL.prototype.drawPose = function(spine_pose, atlas_data) {
var render = this;
var gl = render.gl;
if (!gl) {
Expand Down

0 comments on commit 0ec3c26

Please sign in to comment.