-
Notifications
You must be signed in to change notification settings - Fork 0
/
stack-sepal.ir
1 lines (1 loc) · 5.86 KB
/
stack-sepal.ir
1
{:definitions {"main/dispatch!" ["defn" "dispatch!" ["op" "op-data"] ["let" [["new-tick" ["get-tick"]] ["new-store" ["updater-fn" "@store-ref" "op" "op-data" "new-tick"]]] ["reset!" "store-ref" "new-store"]]], "comp.branch/render" ["defn" "render" ["n" "x" "y"] ["fn" ["state" "mutate!" "instant" "tick"] ["rect" ["{}" [":style" "style-box"]] ["translate" ["{}" [":style" ["compute-position" "x" "y"]]] ["scale" ["{}" [":style" ["{}" [":ratio" ["compute-ratio" "x" "y"]]]]] ["rotate" ["{}" [":style" ["{}" [":angle" ["compute-angle" "x" "y"]]]]] ["if" ["pos?" "n"] ["comp-branch" ["dec" "n"] "x" "y"]]]]] ["translate" ["{}" [":style" ["compute-position-2" "x" "y"]]] ["scale" ["{}" [":style" ["{}" [":ratio" ["compute-ratio-2" "x" "y"]]]]] ["rotate" ["{}" [":style" ["{}" [":angle" ["compute-angle-2" "x" "y"]]]]] ["if" ["pos?" "n"] ["comp-branch" ["dec" "n"] "x" "y"]]]]]]]], "schema/task" ["def" "task" ["{}" [":text" "|"] [":id" "nil"] [":done?" "false"]]], "main/on-jsload!" ["defn" "on-jsload!" [] ["js/cancelAnimationFrame" "@loop-ref"] ["js/requestAnimationFrame" "render-loop!"] [".log" "js/console" "|code updated."]], "comp.branch/compute-angle" ["defn" "compute-angle" ["x" "y"] ["-" "0" "90" ["*" "180" ["/" ["js/Math.atan" ["/" ["+" "r" "x"] ["+" "y" "r"]]] "js/Math.PI"]]]], "comp.branch/compute-ratio" ["defn" "compute-ratio" ["x" "y"] ["/" ["js/Math.sqrt" ["+" ["js/Math.pow" ["+" "y" "r"] "2"] ["js/Math.pow" ["+" "x" "r"] "2"]]] "2" "r"]], "comp.branch/compute-position-2" ["defn" "compute-position-2" ["x" "y"] ["{}" [":x" ["+" ["/" ["-" "x" "y"] "2"]]] [":y" ["-" ["/" ["+" "x" "y"] "2"] "r"]]]], "main/-main" ["defn" "-main" [] ["devtools/install!"] ["enable-console-print!"] ["let" [["target" [".querySelector" "js/document" "|#app"]]] ["configure-canvas" "target"] ["setup-events" "target" "dispatch!"] [".addEventListener" "target" "|mousemove" "handle-move"] ["js/requestAnimationFrame" "render-loop!"]]], "comp.container/render" ["defn" "render" ["timestamp" "store"] ["fn" ["state" "mutate!" "instant" "tick"] ["--" ".log" "js/console" "state"] ["translate" ["{}" [":style" ["{}" [":x" "0"] [":y" "300"]]]] ["comp-branch" "6" [":x" "store"] [":y" "store"]]]]], "comp.branch/compute-ratio-2" ["defn" "compute-ratio-2" ["x" "y"] ["/" ["js/Math.sqrt" ["+" ["js/Math.pow" ["-" "x" "r"] "2"] ["js/Math.pow" ["+" "y" "r"] "2"]]] "2" "r"]], "main/loop-ref" ["defonce" "loop-ref" ["atom" "nil"]], "comp.container/comp-container" ["def" "comp-container" ["create-comp" ":container" "render"]], "main/store-ref" ["defonce" "store-ref" ["atom" ["{}" [":x" "0"] [":y" "0"]]]], "main/handle-move" ["defn" "handle-move" ["event"] ["dispatch!" ":move" ["{}" [":x" ["-" [".-clientX" "event"] ["/" [".-innerWidth" "js/window"] "2"]]] [":y" ["-" [".-clientY" "event"] "300" ["/" [".-innerHeight" "js/window"] "2"]]]]]], "comp.branch/style-box" ["def" "style-box" ["{}" [":w" ["*" "2" "r"]] [":h" ["*" "2" "r"]] [":fill-style" ["hsl" "240" "80" "80"]]]], "main/render-loop!" ["defn" "render-loop!" ["timestamp"] ["let" [["target" [".querySelector" "js/document" "|#app"]]] ["render-page" ["comp-container" "timestamp" "@store-ref"] "states-ref" "target"] ["reset!" "loop-ref" ["js/requestAnimationFrame" "render-loop!"]]]], "comp.branch/compute-angle-2" ["defn" "compute-angle-2" ["x" "y"] ["*" "180" ["/" ["js/Math.atan" ["/" ["+" "y" "r"] ["-" "x" "r"]]] "js/Math.PI"]]], "main/states-ref" ["defonce" "states-ref" ["atom" ["{}"]]], "comp.branch/r" ["def" "r" "100"], "updater.core/updater-fn" ["defn" "updater-fn" ["store" "op" "op-data" "tick"] ["--" ".log" "js/console" "|store update:" "op" "op-data" "tick"] ["case" "op" [":move" ["merge" "store" "op-data"]] "store"]], "comp.branch/comp-branch" ["def" "comp-branch" ["create-comp" ":branch" "render"]], "comp.branch/compute-position" ["defn" "compute-position" ["x" "y"] ["{}" [":x" ["/" ["+" "x" "y"] "2"]] [":y" ["-" ["/" ["-" "y" "x"] "2"] "r"]]]]}, :namespaces {"schema" ["ns" "box-tree.schema"], "comp.container" ["ns" "box-tree.comp.container" [":require" ["[]" "hsl.core" ":refer" ["[]" "hsl"]] ["[]" "quamolit.alias" ":refer" ["[]" "create-comp" "group" "text" "rect"]] ["[]" "box-tree.comp.branch" ":refer" ["[]" "comp-branch"]] ["[]" "quamolit.render.element" ":refer" ["[]" "translate"]]]], "main" ["ns" "box-tree.main" [":require" ["[]" "box-tree.comp.container" ":refer" ["[]" "comp-container"]] ["[]" "quamolit.core" ":refer" ["[]" "render-page" "configure-canvas" "setup-events"]] ["[]" "quamolit.util.time" ":refer" ["[]" "get-tick"]] ["[]" "box-tree.updater.core" ":refer" ["[]" "updater-fn"]] ["[]" "devtools.core" ":as" "devtools"]]], "updater.core" ["ns" "box-tree.updater.core" [":require" ["[]" "box-tree.schema" ":as" "schema"]]], "comp.branch" ["ns" "box-tree.comp.branch" [":require" ["[]" "hsl.core" ":refer" ["[]" "hsl"]] ["[]" "quamolit.alias" ":refer" ["[]" "create-comp" "group" "text" "rect"]] ["[]" "quamolit.render.element" ":refer" ["[]" "translate" "scale" "rotate"]]]]}, :procedures {"render.flatten" [], "util.order" [], "comp.portal" [], "comp.icons-table" [], "render.element" [], "comp.raindrop" [], "comp.code-table" [], "comp.solar" [["declare" "comp-solar"]], "comp.debug" [], "comp.task" [], "controller.resolve" [], "comp.digits" [], "util.list" [], "schema" [], "comp.container" [], "comp.raining" [], "comp.todolist" [], "util.iterate" [], "comp.folding-fan" [], "main" [["set!" "js/window.onload" "-main"] ["set!" "js/window.onresize" ["fn" ["event"] ["let" [["target" [".querySelector" "js/document" "|#app"]]] ["configure-canvas" "target"]]]]], "render.expand" [["declare" "expand-component"]], "comp.clock" [], "comp.fade-in-out" [], "comp.icon-play" [], "updater.core" [], "render.paint" [], "comp.icon-increase" [], "comp.branch" [], "comp.folder" [], "util.time" [], "alias" [], "util.detect" [], "comp.file-card" [], "comp.binary-tree" [["declare" "comp-binary-tree"]], "comp.task-toggler" [], "core" [], "comp.ring" [], "comp.finder" [], "util.keyboard" []}, :package "box-tree"}