🎉 Add test mode

This commit is contained in:
Simon Schneegans
2022-03-03 20:00:24 +01:00
parent 59c01999b2
commit 69aadfd643
7 changed files with 43 additions and 10 deletions
+5 -1
View File
@@ -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;