Skip to content

Commit

Permalink
Reuse strahl types
Browse files Browse the repository at this point in the history
  • Loading branch information
StuckiSimon committed Aug 24, 2024
1 parent b20f5ae commit ea7259f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/src/components/TracerExperiment/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import React from "react";
import { BindingParams, Pane } from "tweakpane";
import { convertHexToRGB, OpenPBRMaterial, PathTracerOptions } from "strahl";
import {
Color,
convertHexToRGB,
OpenPBRMaterial,
PathTracerOptions,
} from "strahl";
import styles from "./styles.module.css";
import clsx from "clsx";
import usePathTracer from "@site/src/hooks/usePathTracer";
Expand All @@ -20,8 +25,7 @@ function convertNormalizedToHex(c: number) {
return hex.padStart(2, "0");
}

// todo: use exported type from strahl
function convertRGBToHex(c: ReturnType<typeof convertHexToRGB>) {
function convertRGBToHex(c: Color) {
return (
"#" +
convertNormalizedToHex(c[0]) +
Expand Down

0 comments on commit ea7259f

Please sign in to comment.