fills grid with nulls instead of zeroes
This commit is contained in:
parent
1696e524c1
commit
642f1c2a1d
13
Makefile
13
Makefile
@ -9,20 +9,10 @@ JS_CLIENT_FILES= lib/torque/*.js \
|
|||||||
lib/torque/leaflet/canvas_layer.js \
|
lib/torque/leaflet/canvas_layer.js \
|
||||||
lib/torque/leaflet/torque.js
|
lib/torque/leaflet/torque.js
|
||||||
|
|
||||||
all: dist/torque.js dist/torque.full.js add-header
|
|
||||||
|
|
||||||
dist/torque.full.uncompressed.js: dist_folder dist/torque.uncompressed.js
|
dist/torque.full.uncompressed.js: dist_folder dist/torque.uncompressed.js
|
||||||
$(BROWSERIFY) lib/torque/index.js --standalone torque > dist/torque.full.uncompressed.js
|
$(BROWSERIFY) lib/torque/index.js --standalone torque > dist/torque.full.uncompressed.js
|
||||||
|
|
||||||
dist/torque.full.js: dist_folder dist/torque.full.uncompressed.js
|
|
||||||
$(UGLIFYJS) dist/torque.full.uncompressed.js > dist/torque.full.js
|
|
||||||
|
|
||||||
dist/torque.uncompressed.js: dist_folder $(JS_CLIENT_FILES)
|
|
||||||
$(BROWSERIFY) lib/torque/index.js --no-bundle-external --standalone torque > dist/torque.uncompressed.js
|
|
||||||
|
|
||||||
dist/torque.js: dist_folder dist/torque.uncompressed.js
|
|
||||||
$(UGLIFYJS) dist/torque.uncompressed.js > dist/torque.js
|
|
||||||
|
|
||||||
dist_folder:
|
dist_folder:
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|
||||||
@ -31,9 +21,6 @@ dist: dist_folder dist/torque.js
|
|||||||
clean-results:
|
clean-results:
|
||||||
-@rm test/results/*.png
|
-@rm test/results/*.png
|
||||||
|
|
||||||
add-header:
|
|
||||||
node lib/header.js
|
|
||||||
|
|
||||||
prepare-test-suite:
|
prepare-test-suite:
|
||||||
browserify test/suite.js > test/suite-bundle.js
|
browserify test/suite.js > test/suite-bundle.js
|
||||||
|
|
||||||
|
@ -233,9 +233,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
|||||||
this.renderer.firstTileCoords = {coord: this._tiles[min.k].coord, pos:this.getTilePos(this._tiles[min.k].coord)};
|
this.renderer.firstTileCoords = {coord: this._tiles[min.k].coord, pos:this.getTilePos(this._tiles[min.k].coord)};
|
||||||
|
|
||||||
var valsPerTile = 256/this.options.resolution;
|
var valsPerTile = 256/this.options.resolution;
|
||||||
this.renderer.globalGrid = Array.apply(null, Array(this.renderer.tileDimensions.h * valsPerTile)).map(Number.prototype.valueOf,0);
|
this.renderer.globalGrid = new Array(this.renderer.tileDimensions.h * valsPerTile).fill(null);
|
||||||
for (var i = 0; i < this.renderer.globalGrid.length; i++){
|
for (var i = 0; i < this.renderer.globalGrid.length; i++){
|
||||||
this.renderer.globalGrid[i] = Array.apply(null, Array(this.renderer.tileDimensions.w * valsPerTile)).map(Number.prototype.valueOf,0);
|
this.renderer.globalGrid[i] = new Array(this.renderer.tileDimensions.w * valsPerTile).fill(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(t in this._tiles) {
|
for(t in this._tiles) {
|
||||||
|
Loading…
Reference in New Issue
Block a user