28 lines
410 B
JavaScript
28 lines
410 B
JavaScript
|
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;
|
||
|
}
|
||
|
}
|