update logo

improve font resolution logic
generate icons
improve timeline
This commit is contained in:
2023-05-28 22:57:13 +02:00
parent 1baa3ae736
commit 28613c9214
38 changed files with 204 additions and 221 deletions

View File

@@ -3,6 +3,7 @@ import { Keyframes } from "./Keyframe";
import { Interpolation } from "./Interpolation";
export const Vec2 = z.array(z.number()).length(2);
export const Vec3 = z.array(z.number()).length(3);
export const AnimatedNumber = z.object({
keyframes: Keyframes,
@@ -12,6 +13,10 @@ export const AnimatedVec2 = z.object({
keyframes: z.array(AnimatedNumber).length(2),
});
export const AnimatedVec3 = z.object({
keyframes: z.array(AnimatedNumber).length(3),
});
export function staticAnimatedNumber(
number: number
): z.infer<typeof AnimatedNumber> {
@@ -33,35 +38,22 @@ export function staticAnimatedNumber(
export function staticAnimatedVec2(
x: number,
y: number
): z.infer<typeof AnimatedVec2> {
return {
keyframes: [staticAnimatedNumber(x), staticAnimatedNumber(y)],
};
}
export function staticAnimatedVec3(
x: number,
y: number,
z: number
): z.infer<typeof AnimatedVec2> {
return {
keyframes: [
{
keyframes: {
values: [
{
interpolation: {
type: "Linear",
},
value: x,
offset: 0,
},
],
},
},
{
keyframes: {
values: [
{
interpolation: {
type: "Linear",
},
value: y,
offset: 0,
},
],
},
},
staticAnimatedNumber(x),
staticAnimatedNumber(y),
staticAnimatedNumber(z),
],
};
}