🚚 Move effect sources to separate directory
This commit is contained in:
@@ -9,7 +9,7 @@ DOMAIN := schneegans.github.com
|
||||
ZIP_NAME := $(NAME)@$(DOMAIN).zip
|
||||
|
||||
# Some of the recipes below depend on some of these files.
|
||||
JS_FILES = $(wildcard src/*.js extension.js prefs.js)
|
||||
JS_FILES = $(wildcard src/*.js src/*/*.js extension.js prefs.js)
|
||||
UI_FILES = $(shell find resources -type f -and \( -name "*.ui" \))
|
||||
RESOURCE_FILES = $(shell find resources -mindepth 2 -type f)
|
||||
LOCALES_PO = $(wildcard po/*.po)
|
||||
|
||||
@@ -78,7 +78,7 @@ Just remember to replace `simple-fade` with your custom name!
|
||||
|
||||
### 2. Creating the Effect Class
|
||||
|
||||
You will have to create a new GLSL file called `resources/shaders/simple-fade.frag` and a new JavaScript source file called `src/SimpleFade.js`.
|
||||
You will have to create a new GLSL file called `resources/shaders/simple-fade.frag` and a new JavaScript source file called `src/effects/SimpleFade.js`.
|
||||
Simply paste the following source code to the respective file.
|
||||
Please study this code carefully, all of it is explained with inline comments.
|
||||
|
||||
@@ -239,7 +239,7 @@ Like this:
|
||||
```javascript
|
||||
const ALL_EFFECTS = [
|
||||
...
|
||||
new Me.imports.src.SimpleFade.SimpleFade(),
|
||||
new Me.imports.src.effects.SimpleFade.SimpleFade(),
|
||||
...
|
||||
];
|
||||
```
|
||||
|
||||
+20
-20
@@ -51,26 +51,26 @@ class Extension {
|
||||
|
||||
// New effects must be registered here and in prefs.js.
|
||||
this._ALL_EFFECTS = [
|
||||
new Me.imports.src.Apparition.Apparition(),
|
||||
new Me.imports.src.BrokenGlass.BrokenGlass(),
|
||||
new Me.imports.src.Doom.Doom(),
|
||||
new Me.imports.src.EnergizeA.EnergizeA(),
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Glide.Glide(),
|
||||
new Me.imports.src.Glitch.Glitch(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
new Me.imports.src.Pixelate.Pixelate(),
|
||||
new Me.imports.src.PixelWheel.PixelWheel(),
|
||||
new Me.imports.src.PixelWipe.PixelWipe(),
|
||||
new Me.imports.src.Portal.Portal(),
|
||||
new Me.imports.src.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.TRexAttack.TRexAttack(),
|
||||
new Me.imports.src.TVEffect.TVEffect(),
|
||||
new Me.imports.src.TVGlitch.TVGlitch(),
|
||||
new Me.imports.src.Wisps.Wisps(),
|
||||
new Me.imports.src.effects.Apparition.Apparition(),
|
||||
new Me.imports.src.effects.BrokenGlass.BrokenGlass(),
|
||||
new Me.imports.src.effects.Doom.Doom(),
|
||||
new Me.imports.src.effects.EnergizeA.EnergizeA(),
|
||||
new Me.imports.src.effects.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.effects.Fire.Fire(),
|
||||
new Me.imports.src.effects.Glide.Glide(),
|
||||
new Me.imports.src.effects.Glitch.Glitch(),
|
||||
new Me.imports.src.effects.Hexagon.Hexagon(),
|
||||
new Me.imports.src.effects.Incinerate.Incinerate(),
|
||||
new Me.imports.src.effects.Matrix.Matrix(),
|
||||
new Me.imports.src.effects.Pixelate.Pixelate(),
|
||||
new Me.imports.src.effects.PixelWheel.PixelWheel(),
|
||||
new Me.imports.src.effects.PixelWipe.PixelWipe(),
|
||||
new Me.imports.src.effects.Portal.Portal(),
|
||||
new Me.imports.src.effects.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.effects.TRexAttack.TRexAttack(),
|
||||
new Me.imports.src.effects.TVEffect.TVEffect(),
|
||||
new Me.imports.src.effects.TVGlitch.TVGlitch(),
|
||||
new Me.imports.src.effects.Wisps.Wisps(),
|
||||
];
|
||||
|
||||
// Load all of our resources.
|
||||
|
||||
@@ -48,26 +48,26 @@ var PreferencesDialog = class PreferencesDialog {
|
||||
|
||||
// New effects must be registered here and in extension.js.
|
||||
this._ALL_EFFECTS = [
|
||||
new Me.imports.src.Apparition.Apparition(),
|
||||
new Me.imports.src.BrokenGlass.BrokenGlass(),
|
||||
new Me.imports.src.Doom.Doom(),
|
||||
new Me.imports.src.EnergizeA.EnergizeA(),
|
||||
new Me.imports.src.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.Fire.Fire(),
|
||||
new Me.imports.src.Glide.Glide(),
|
||||
new Me.imports.src.Glitch.Glitch(),
|
||||
new Me.imports.src.Hexagon.Hexagon(),
|
||||
new Me.imports.src.Incinerate.Incinerate(),
|
||||
new Me.imports.src.Matrix.Matrix(),
|
||||
new Me.imports.src.Pixelate.Pixelate(),
|
||||
new Me.imports.src.PixelWheel.PixelWheel(),
|
||||
new Me.imports.src.PixelWipe.PixelWipe(),
|
||||
new Me.imports.src.Portal.Portal(),
|
||||
new Me.imports.src.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.TRexAttack.TRexAttack(),
|
||||
new Me.imports.src.TVEffect.TVEffect(),
|
||||
new Me.imports.src.TVGlitch.TVGlitch(),
|
||||
new Me.imports.src.Wisps.Wisps(),
|
||||
new Me.imports.src.effects.Apparition.Apparition(),
|
||||
new Me.imports.src.effects.BrokenGlass.BrokenGlass(),
|
||||
new Me.imports.src.effects.Doom.Doom(),
|
||||
new Me.imports.src.effects.EnergizeA.EnergizeA(),
|
||||
new Me.imports.src.effects.EnergizeB.EnergizeB(),
|
||||
new Me.imports.src.effects.Fire.Fire(),
|
||||
new Me.imports.src.effects.Glide.Glide(),
|
||||
new Me.imports.src.effects.Glitch.Glitch(),
|
||||
new Me.imports.src.effects.Hexagon.Hexagon(),
|
||||
new Me.imports.src.effects.Incinerate.Incinerate(),
|
||||
new Me.imports.src.effects.Matrix.Matrix(),
|
||||
new Me.imports.src.effects.Pixelate.Pixelate(),
|
||||
new Me.imports.src.effects.PixelWheel.PixelWheel(),
|
||||
new Me.imports.src.effects.PixelWipe.PixelWipe(),
|
||||
new Me.imports.src.effects.Portal.Portal(),
|
||||
new Me.imports.src.effects.SnapOfDisintegration.SnapOfDisintegration(),
|
||||
new Me.imports.src.effects.TRexAttack.TRexAttack(),
|
||||
new Me.imports.src.effects.TVEffect.TVEffect(),
|
||||
new Me.imports.src.effects.TVGlitch.TVGlitch(),
|
||||
new Me.imports.src.effects.Wisps.Wisps(),
|
||||
];
|
||||
|
||||
// Load all of our resources.
|
||||
|
||||
Reference in New Issue
Block a user