compatibilizes ballrenderer with cartocss
This commit is contained in:
parent
eb4d739bca
commit
59a84690c2
@ -223,6 +223,7 @@ var ballRenderer = require('./ball.js');
|
|||||||
// the torque tile
|
// the torque tile
|
||||||
//
|
//
|
||||||
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars, pos) {
|
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars, pos) {
|
||||||
|
shaderVars = shaderVars || { zoom: tile.z, 'frame-offset': frame_offset }
|
||||||
if (!this._canvas) return;
|
if (!this._canvas) return;
|
||||||
|
|
||||||
var prof = Profiler.metric('torque.renderer.point.renderTile').start();
|
var prof = Profiler.metric('torque.renderer.point.renderTile').start();
|
||||||
@ -245,7 +246,10 @@ var ballRenderer = require('./ball.js');
|
|||||||
if (c) {
|
if (c) {
|
||||||
var x = tile.x[posIdx];
|
var x = tile.x[posIdx];
|
||||||
var y = tileMax - tile.y[posIdx]; // flip mercator
|
var y = tileMax - tile.y[posIdx]; // flip mercator
|
||||||
this.ballRenderer.addBall(pos.x + x, pos.y + y);
|
var st = shader.getStyle({
|
||||||
|
value: c
|
||||||
|
}, shaderVars);
|
||||||
|
this.ballRenderer.addBall(pos.x + x, pos.y + y, st);
|
||||||
// var sp = sprites[c];
|
// var sp = sprites[c];
|
||||||
// if (sp === undefined) {
|
// if (sp === undefined) {
|
||||||
// sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars));
|
// sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars));
|
||||||
@ -369,6 +373,7 @@ var ballRenderer = require('./ball.js');
|
|||||||
|
|
||||||
},
|
},
|
||||||
applyFilters: function(){
|
applyFilters: function(){
|
||||||
|
return;
|
||||||
if(this._style){
|
if(this._style){
|
||||||
if(this._style['image-filters']){
|
if(this._style['image-filters']){
|
||||||
function gradientKey(imf){
|
function gradientKey(imf){
|
||||||
|
Loading…
Reference in New Issue
Block a user