mr-crocs-adventures/js/effects/FullscreenEffectFactory.js

28 lines
410 B
JavaScript
Raw Normal View History

2024-12-08 16:53:56 +01:00
import {SnowEffect} from "./SnowEffect.js";
export class FullscreenEffectFactory
{
static EFFECTS = {
[SnowEffect.NAME]: SnowEffect,
}
getEffect(name)
{
return new FullscreenEffectFactory.EFFECTS[name]();
}
static getNames()
{
const names = [];
for (const name in FullscreenEffectFactory.EFFECTS) {
console.log(name);
names.push(name);
}
console.log(names);
return names;
}
}