Skip to content

Commit

Permalink
feature: add missing trans effects
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Oct 26, 2023
1 parent e08c969 commit aa40916
Show file tree
Hide file tree
Showing 3 changed files with 534 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/schema/effect-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const effectList = z.object({
inBufferInvert: z.boolean(),
outBufferInvert: z.boolean(),
enableOnBeat: z.boolean(),
enableOnBeatFor: z.number().int().min(0).safe(), // TODO validate
enableOnBeatFor: z.number().int().min(0).safe(), // TODO verify
code: z.object({
enabled: z.boolean(),
init: z.string(),
Expand Down
9 changes: 5 additions & 4 deletions src/schema/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const RENDER_GROUP = z.literal('Render');
const HEX_COLOR = z.string().regex(/^#[0-9A-F]{6}$/);
const HEX_COLORS_16 = HEX_COLOR.array().min(1).max(16);
const RANGE_0_32 = z.number().int().min(0).max(32);
const RANGE_0_5 = z.number().int().min(0).max(5);
const RANGE_1_64 = z.number().int().min(1).max(64);
const RANGE_1_100 = z.number().int().min(1).max(100);
const RANGE_16_16 = z.number().int().min(-16).max(16);
Expand Down Expand Up @@ -68,7 +69,7 @@ export const dotGrid = z
type: z.literal('DotGrid'),
group: RENDER_GROUP,
colors: HEX_COLORS_16,
spacing: z.number().int().min(0).safe(), // TODO validate 0, UINT32_MAX
spacing: z.number().int().min(0).safe(), // TODO verify 0, UINT32_MAX
speedX: RANGE_16_16,
speedY: RANGE_16_16,
blendMode: z.union([
Expand Down Expand Up @@ -184,10 +185,10 @@ export const starfield = z
z.literal('ADDITIVE'),
z.literal('FIFTY_FIFTY'),
]),
// WarpSpeed: 6, TODO
WarpSpeed: z.number().min(0).max(500),
MaxStars_set: RANGE_100_4095,
onbeat: NUMBERIC_BOOLEAN,
// spdBeat: 4, // TODO
spdBeat: RANGE_0_5,
durFrames: RANGE_1_100
})
.required();
Expand Down Expand Up @@ -219,7 +220,7 @@ export const texer2 = z
.object({
type: z.literal('TexerII'),
group: RENDER_GROUP,
imageSrc: z.string().max(260), // Windows 10 allows 32,767
imageSrc: z.string().max(260), // PS: Windows 10 allows 32,767
resizing: z.boolean(),
wrapAround: z.boolean(),
colorFiltering: z.boolean(),
Expand Down
Loading

0 comments on commit aa40916

Please sign in to comment.