speice.io/posts/2023/06/flam3/5a-gasket.ts

49 lines
798 B
TypeScript
Raw Normal View History

import { RendererFlame, Transform, linear } from "./2a-variations";
import { RendererLogarithmic } from "./3c-logarithmic";
export const transformGasket1 = new Transform(
{
a: 0.5,
b: 0,
c: 0,
d: 0,
e: 0.5,
f: 0,
},
[[1, linear]]
);
export const transformGasket2 = new Transform(
{
a: 0.5,
b: 0,
c: 0.5,
d: 0,
e: 0.5,
f: 0,
},
[[1, linear]]
);
export const transformGasket3 = new Transform(
{
a: 0.5,
b: 0,
c: 0,
d: 0,
e: 0.5,
f: 0.5,
},
[[1, linear]]
);
export const transformGasket: [number, Transform][] = [
[1 / 3, transformGasket1],
[1 / 3, transformGasket2],
[1 / 3, transformGasket3],
];
export function buildGasketFlame(size: number) {
return new RendererFlame(size, transformGasket);
}