From 3e75a62456f32c7cbc18a23f78d51bf732d6d076 Mon Sep 17 00:00:00 2001 From: sid597 Date: Thu, 1 May 2025 16:55:49 +0530 Subject: [PATCH] update token usage --- src/app/electric_flow.cljc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/electric_flow.cljc b/src/app/electric_flow.cljc index fc43621..332b0da 100644 --- a/src/app/electric_flow.cljc +++ b/src/app/electric_flow.cljc @@ -142,8 +142,7 @@ (e/defn Render-with-webgpu [] - (let [nu (e/watch !offset) - spend (e/Token nu) + (let [[spend e] (e/Token offset) dv (e/snapshot device) con (e/snapshot context) fmat (e/snapshot format)] @@ -155,8 +154,8 @@ (when (some? spend) (let [rects-data (flatten (into [] (vals all-rects))) rects-ids (into [] (keys all-rects)) - [cx cy] nu - [off-x off-y] (spend (e/Task (m/sleep 25 nu))) + [cx cy] offset + [off-x off-y] (spend (e/Task (m/sleep 25 offset))) rx (e/amb cx off-x) ry (e/amb cy off-y) texts (reduce