Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/lib/Bend/BendVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,12 @@ export function createBend(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof BendOptions] !== value,
)
)
return;
Object.assign(config, next);
syncScroll();
start();
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Blaze/BlazeVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,12 @@ export function createBlaze(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof BlazeOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Bubble/BubbleVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,12 @@ export function createBubble(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof BubbleOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Cloth/ClothVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,12 @@ export function createCloth(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof ClothOptions] !== value,
)
)
return;
Object.assign(config, next);
syncBacking();
start();
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Clouds/CloudsVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,12 @@ export function createClouds(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof CloudsOptions] !== value,
)
)
return;
Object.assign(config, next);
syncCanvasSize();
syncBaseColor();
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Droplets/DropletsVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,12 @@ export function createDroplets(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof DropletsOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Frost/FrostVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,12 @@ export function createFrost(
start();
},
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof FrostOptions] !== value,
)
)
return;
const { quality, ...rest } = next;
const qualityChanged =
quality !== undefined && quality !== config.quality;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Glass/GlassVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,12 @@ export function createGlass(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof GlassOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Glitch/GlitchVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ export function createGlitch(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof GlitchOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Grid/GridVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,12 @@ export function createGrid(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof GridOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/HexFloat/HexFloatVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,12 @@ export function createHexFloat(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof HexFloatOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Laser/LaserVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,12 @@ export function createLaser(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof LaserOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Liquid/LiquidVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,12 @@ export function createLiquid(
start();
},
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof LiquidOptions] !== value,
)
)
return;
const { simResolution, dyeResolution, ...rest } = next;
void simResolution;
void dyeResolution;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Magnify/MagnifyVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,12 @@ export function createMagnify(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof MagnifyOptions] !== value,
)
)
return;
const previousZoom = config.zoom;
Object.assign(config, next);
if (!config.scrollZoom || config.zoom !== previousZoom) {
Expand Down
7 changes: 7 additions & 0 deletions src/lib/ParticleReveal/ParticleRevealVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ export function createParticleReveal(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) =>
config[key as keyof ParticleRevealOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
7 changes: 7 additions & 0 deletions src/lib/ParticleScroll/ParticleScrollVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,13 @@ export function createParticleScroll(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) =>
config[key as keyof ParticleScrollOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Peel/PeelVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,12 @@ export function createPeel(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof PeelOptions] !== value,
)
)
return;
Object.assign(config, next);
syncShineColor();
start();
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Ripple/RippleVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,12 @@ export function createRipple(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof RippleOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/Shatter/ShatterVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,12 @@ export function createShatter(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof ShatterOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
6 changes: 6 additions & 0 deletions src/lib/VHS/VHSVanilla.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,12 @@ export function createVHS(

return {
setOptions(next) {
if (
!Object.entries(next).some(
([key, value]) => config[key as keyof VHSOptions] !== value,
)
)
return;
Object.assign(config, next);
start();
},
Expand Down
Loading