mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Snow fullscreen effect implemented
This commit is contained in:
27
js/effects/FullscreenEffectFactory.js
Normal file
27
js/effects/FullscreenEffectFactory.js
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user