mirror of
https://github.com/bspeice/speice.io
synced 2025-07-29 03:25:03 -04:00
Add a reset button
Probably overkill, but I kinda like it.
This commit is contained in:
@ -14,8 +14,8 @@ export interface PainterProps {
|
||||
export const PainterContext = createContext<PainterProps>(null);
|
||||
|
||||
interface CanvasProps {
|
||||
width: number;
|
||||
height: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
@ -125,6 +125,8 @@ export default function Canvas({width, height, children}: CanvasProps) {
|
||||
const [painter, setPainter] = useState<Iterator<ImageData>>(null);
|
||||
useEffect(() => setAnimHolder({ painter }), [painter]);
|
||||
|
||||
width = width ?? 500;
|
||||
height = height ?? 500;
|
||||
return (
|
||||
<>
|
||||
<center>
|
||||
|
@ -20,4 +20,9 @@
|
||||
|
||||
.inputElement > p {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.inputReset {
|
||||
display: flex;
|
||||
float: right;
|
||||
}
|
@ -36,8 +36,8 @@ export const xform2Coefs = {
|
||||
d: -0.031367, e: 0.031393, f: 0,
|
||||
}
|
||||
export const xform2CoefsPost = {
|
||||
a: 1, b: 0, c: 0.241352,
|
||||
d: 0, e: 1, f: 0.271521,
|
||||
a: 1, b: 0, c: 0.24,
|
||||
d: 0, e: 1, f: 0.27,
|
||||
}
|
||||
export const xform2Variations: VariationBlend = [
|
||||
[1, linear],
|
||||
|
Reference in New Issue
Block a user