🎉 Add test mode
This commit is contained in:
+5
-1
@@ -117,6 +117,9 @@ if (utils.isInShellProcess()) {
|
||||
|
||||
const color = Clutter.Color.from_string(settings.get_string('energize-b-color'))[1];
|
||||
|
||||
// If we are currently performing integration test, the animation uses a fixed seed.
|
||||
const testMode = settings.get_boolean('test-mode');
|
||||
|
||||
this.set_shader_source(`
|
||||
|
||||
// Inject some common shader snippets.
|
||||
@@ -124,7 +127,8 @@ if (utils.isInShellProcess()) {
|
||||
${shaderSnippets.noise()}
|
||||
${shaderSnippets.edgeMask()}
|
||||
|
||||
const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
|
||||
const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
|
||||
${testMode ? 0 : Math.random()});
|
||||
const float SHOWER_TIME = 0.3;
|
||||
const float SHOWER_WIDTH = 0.3;
|
||||
const float STREAK_TIME = 0.6;
|
||||
|
||||
Reference in New Issue
Block a user