smaller fixes
This commit is contained in:
parent
148eff81ff
commit
f0efda1d5f
|
@ -56,7 +56,6 @@ export default (store) => (next) => (action) => {
|
||||||
historicalTime,
|
historicalTime,
|
||||||
historicalCanvasSize,
|
historicalCanvasSize,
|
||||||
);
|
);
|
||||||
renderer.forceNextRender = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,7 @@ class Renderer {
|
||||||
this.historicalCanvasMaxTiledZoom = getMaxTiledZoom(
|
this.historicalCanvasMaxTiledZoom = getMaxTiledZoom(
|
||||||
historicalCanvasSize,
|
historicalCanvasSize,
|
||||||
);
|
);
|
||||||
|
this.forceNextRender = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
getColorIndexOfPixel(cx, cy, historical: boolean = false) {
|
getColorIndexOfPixel(cx, cy, historical: boolean = false) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ bluebird.promisifyAll(redis.Multi.prototype);
|
||||||
|
|
||||||
//ATTENTION Make suer to set the rdis URLs right!!!
|
//ATTENTION Make suer to set the rdis URLs right!!!
|
||||||
const url = "redis://localhost:6379";
|
const url = "redis://localhost:6379";
|
||||||
const redis = redis.createClient(url, { return_buffers: true });
|
const redisc = redis.createClient(url, { return_buffers: true });
|
||||||
|
|
||||||
const CANVAS_SIZE = 4096;
|
const CANVAS_SIZE = 4096;
|
||||||
const TILE_SIZE = 256;
|
const TILE_SIZE = 256;
|
||||||
|
@ -22,12 +22,12 @@ async function move() {
|
||||||
for (let x = CHUNKS_XY - 1; x >= 0; x--) {
|
for (let x = CHUNKS_XY - 1; x >= 0; x--) {
|
||||||
for (let y = CHUNKS_XY - 1; y >= 0; y--) {
|
for (let y = CHUNKS_XY - 1; y >= 0; y--) {
|
||||||
const key = `ch:1:${x}:${y}`;
|
const key = `ch:1:${x}:${y}`;
|
||||||
const chunk = await redis.getAsync(key);
|
const chunk = await redisc.getAsync(key);
|
||||||
if (chunk) {
|
if (chunk) {
|
||||||
const buffer = new Uint8Array(chunk);
|
const buffer = new Uint8Array(chunk);
|
||||||
const newKey = `ch:1:${x + offset}:${y + offset}`
|
const newKey = `ch:1:${x + offset}:${y + offset}`
|
||||||
await redis.setAsync(newKey, Buffer.from(buffer.buffer));
|
await redisc.setAsync(newKey, Buffer.from(buffer.buffer));
|
||||||
await redis.delAsync(key);
|
await redisc.delAsync(key);
|
||||||
console.log('Moved Chunk ', key, ' to ', newKey);
|
console.log('Moved Chunk ', key, ' to ', newKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user