🎉 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
@@ -132,6 +132,9 @@ if (utils.isInShellProcess()) {
const color =
Clutter.Color.from_string(settings.get_string('claw-scratch-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.
@@ -141,7 +144,8 @@ if (utils.isInShellProcess()) {
// See assets/README.md for how this texture was created.
uniform sampler2D uClawTexture;
const vec2 SEED = vec2(${Math.random()}, ${Math.random()});
const vec2 SEED = vec2(${testMode ? 0 : Math.random()},
${testMode ? 0 : Math.random()});
const float CLAW_SIZE = ${settings.get_double('claw-scratch-scale')};
const float NUM_CLAWS = ${settings.get_int('claw-scratch-count')};
const float WARP_INTENSITY = 1.0 + ${settings.get_double('claw-scratch-warp')};