From eb4d739bcafac98a62fc70c1011a5e68ef53e14e Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Tue, 12 May 2015 12:13:34 +0200 Subject: [PATCH] adds compatibility with default renderer --- lib/torque/renderer/point.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/torque/renderer/point.js b/lib/torque/renderer/point.js index 0aec7c3..6e44c0b 100644 --- a/lib/torque/renderer/point.js +++ b/lib/torque/renderer/point.js @@ -177,21 +177,21 @@ var ballRenderer = require('./ball.js'); if(typeof this.ballRenderer === "undefined"){ this.ballRenderer = new ballRenderer(this._canvas); } - this._renderTile(tile, key, 0, null, null, null, pos); - // var prof = Profiler.metric('torque.renderer.point.renderLayers').start(); - // var layers = this._shader.getLayers(); - // for(var i = 0, n = layers.length; i < n; ++i ) { - // var layer = layers[i]; - // if (layer.name() !== "Map") { - // var sprites = this._sprites[i] || (this._sprites[i] = {}); - // // frames for each layer - // for(var fr = 0; fr < layer.frames().length; ++fr) { - // var frame = layer.frames()[fr]; - // var fr_sprites = sprites[frame] || (sprites[frame] = []); - // this._renderTile(tile, key - frame, frame, fr_sprites, layer); - // } - // } - // } + // this._renderTile(tile, key, 0, null, null, null, pos); + var prof = Profiler.metric('torque.renderer.point.renderLayers').start(); + var layers = this._shader.getLayers(); + for(var i = 0, n = layers.length; i < n; ++i ) { + var layer = layers[i]; + if (layer.name() !== "Map") { + var sprites = this._sprites[i] || (this._sprites[i] = {}); + // frames for each layer + for(var fr = 0; fr < layer.frames().length; ++fr) { + var frame = layer.frames()[fr]; + var fr_sprites = sprites[frame] || (sprites[frame] = []); + this._renderTile(tile, key - frame, frame, fr_sprites, layer, null, pos); + } + } + } // prof.end(true); },