From a8943fc9245f09033b34d2b291e1a6c496ae6bc1 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Fri, 30 Jun 2023 12:53:10 +0200 Subject: [PATCH] update colors --- app/src/services/render.service.ts | 32 ++++++++++++++++++++++++++++++ web/src/components/Button.astro | 3 ++- web/src/styles/global.css | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 app/src/services/render.service.ts diff --git a/app/src/services/render.service.ts b/app/src/services/render.service.ts new file mode 100644 index 0000000..baf629e --- /dev/null +++ b/app/src/services/render.service.ts @@ -0,0 +1,32 @@ +import { Timeline } from "primitives/Timeline"; +// TODO: publish package maybe provide wrapper etc. +import * as creatorWasm from "../../../lib/creator_rs/pkg"; +import { z } from "zod"; +import { useTimelineStore } from "stores/timeline.store"; +import { useEntitiesStore } from "stores/entities.store"; +import { useRenderStateStore } from "stores/render-state.store"; + +export class RenderService { + render() { + + } + + calculate() { + const timelineStore = useTimelineStore.getState(); + const entitiesStore = useEntitiesStore.getState(); + const renderStateStore = useRenderStateStore.getState(); + + + let timeline: z.input = { + ...timelineStore, + entities: entitiesStore.entities, + render_state: renderStateStore.renderState + } + + timeline = Timeline.parse(timeline); + + const renderedEntities = creatorWasm.calculate_timeline_from_json_at_curr_frame(JSON.stringify(timeline)); + + console.log(renderedEntities); + } +} \ No newline at end of file diff --git a/web/src/components/Button.astro b/web/src/components/Button.astro index eadd72d..1e7dd08 100644 --- a/web/src/components/Button.astro +++ b/web/src/components/Button.astro @@ -15,7 +15,8 @@ export const button = cva( variants: { variant: { default: "bg-main text-neutral hocus:bg-main/80", - primary: "bg-primary/50 text-main hocus:bg-primary/80", + primary: + "bg-primary dark:bg-primary/50 text-neutral dark:text-main hocus:bg-primary/80 dark:hocus:bg-primary/80", destructive: "bg-error text-destructive-foreground hocus:bg-destructive/90", outline: diff --git a/web/src/styles/global.css b/web/src/styles/global.css index dbf9ec6..28906c2 100644 --- a/web/src/styles/global.css +++ b/web/src/styles/global.css @@ -6,7 +6,7 @@ :root { --color-main: 0 0% 0%; --color-main: 0 0% 10%; - --color-primary: 0 0% 0%; + --color-primary: 280 80% 50%; --color-neutral: 0 0% 100%; --color-neutral-accent: 0 0% 93%; --color-highlight: 264 100% 50%;