From 9dddf78ccc035b27de5439ef5209f10636802a16 Mon Sep 17 00:00:00 2001 From: Gavin McDonald Date: Sat, 1 Sep 2018 22:59:09 -0400 Subject: [PATCH] 'now' and 'lastNow' as draw parameters --- src/sketch.js | 3 +++ src/tessellate.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/sketch.js b/src/sketch.js index 3b99ef5..4a73a81 100644 --- a/src/sketch.js +++ b/src/sketch.js @@ -58,6 +58,9 @@ export default class Sketch { this.canvas.width = this.container.offsetWidth; this.canvas.height = this.container.offsetHeight; + this.context.lastUTC = this.context.utc || null; + this.context.utc = Date.now(); + this.context.now = now; this.context.lastNow = this.lastNow; diff --git a/src/tessellate.js b/src/tessellate.js index 7327b24..54e7c26 100644 --- a/src/tessellate.js +++ b/src/tessellate.js @@ -223,6 +223,9 @@ export class Tessellate { height, width, scale: this.cartographer.getScale(), + lastNow: context.lastUTC, + now: context.utc, + tilePoints: this.getTilePoints({ upperLeftX: 0, upperLeftY: 0,