mirror of
https://github.com/bspeice/speice.io
synced 2025-07-02 06:16:22 -04:00
Checkpoint for histogram
It takes a lot of render time to get a usable result, and it's not that interesting. Committing so I can save the work if I want to revisit it, but abandoning the idea for now.
This commit is contained in:
@ -24,6 +24,12 @@ import {VariationEditor, VariationProps} from "./VariationEditor";
|
||||
import {CoefEditor} from "./CoefEditor";
|
||||
import {Transform} from "../src/transform";
|
||||
|
||||
export const transforms: [number, Transform][] = [
|
||||
[xform1Weight, transformPost(buildTransform(xform1Coefs, xform1Variations), xform1CoefsPost)],
|
||||
[xform2Weight, transformPost(buildTransform(xform2Coefs, xform2Variations), xform2CoefsPost)],
|
||||
[xform3Weight, transformPost(buildTransform(xform3Coefs, xform3Variations), xform3CoefsPost)]
|
||||
];
|
||||
|
||||
export default function FlameFinal() {
|
||||
const {width, height, setPainter} = useContext(PainterContext);
|
||||
|
||||
@ -43,12 +49,6 @@ export default function FlameFinal() {
|
||||
const resetXformFinalCoefsPost = () => setXformFinalCoefsPost(xformFinalCoefsPostDefault);
|
||||
|
||||
useEffect(() => {
|
||||
const transforms: [number, Transform][] = [
|
||||
[xform1Weight, transformPost(buildTransform(xform1Coefs, xform1Variations), xform1CoefsPost)],
|
||||
[xform2Weight, transformPost(buildTransform(xform2Coefs, xform2Variations), xform2CoefsPost)],
|
||||
[xform3Weight, transformPost(buildTransform(xform3Coefs, xform3Variations), xform3CoefsPost)]
|
||||
];
|
||||
|
||||
const finalBlend = buildBlend(xformFinalCoefs, xformFinalVariations);
|
||||
const finalTransform = buildTransform(xformFinalCoefs, finalBlend);
|
||||
const finalPost = transformPost(finalTransform, xformFinalCoefsPost);
|
||||
|
@ -142,11 +142,10 @@ The sliders below change the variation weights for each transform (the $v_{ij}$
|
||||
try changing them around to see which parts of the image are controlled by
|
||||
each transform.
|
||||
|
||||
import BrowserOnly from "@docusaurus/BrowserOnly";
|
||||
import Canvas from "../src/Canvas";
|
||||
import FlameBlend from "./FlameBlend";
|
||||
|
||||
<Canvas><BrowserOnly>{() => <FlameBlend/>}</BrowserOnly></Canvas>
|
||||
<Canvas><FlameBlend/></Canvas>
|
||||
|
||||
## Post transforms
|
||||
|
||||
@ -161,10 +160,10 @@ $$
|
||||
|
||||
import FlamePost from "./FlamePost";
|
||||
|
||||
<Canvas><BrowserOnly>{() => <FlamePost/>}</BrowserOnly></Canvas>
|
||||
<Canvas><FlamePost/></Canvas>
|
||||
|
||||
## Final transform
|
||||
|
||||
import FlameFinal from "./FlameFinal";
|
||||
|
||||
<Canvas><BrowserOnly>{() => <FlameFinal/>}</BrowserOnly></Canvas>
|
||||
<Canvas><FlameFinal/></Canvas>
|
Reference in New Issue
Block a user