✨ Tweak clang-format style
This commit is contained in:
+4
-5
@@ -134,9 +134,8 @@ if (utils.isInShellProcess()) {
|
||||
// this texture is also re-created each time. This could be improved in the future!
|
||||
const shardData = GdkPixbuf.Pixbuf.new_from_resource('/img/shards.png');
|
||||
this._shardTexture = new Clutter.Image();
|
||||
this._shardTexture.set_data(
|
||||
shardData.get_pixels(), Cogl.PixelFormat.RGB_888, shardData.width,
|
||||
shardData.height, shardData.rowstride);
|
||||
this._shardTexture.set_data(shardData.get_pixels(), Cogl.PixelFormat.RGB_888,
|
||||
shardData.width, shardData.height, shardData.rowstride);
|
||||
|
||||
// Usually, the shards fly away from the center of the window.
|
||||
let epicenterX = 0.5;
|
||||
@@ -232,8 +231,8 @@ if (utils.isInShellProcess()) {
|
||||
const pipeline = this.get_pipeline();
|
||||
|
||||
// Use linear filtering for the window texture.
|
||||
pipeline.set_layer_filters(
|
||||
0, Cogl.PipelineFilter.LINEAR, Cogl.PipelineFilter.LINEAR);
|
||||
pipeline.set_layer_filters(0, Cogl.PipelineFilter.LINEAR,
|
||||
Cogl.PipelineFilter.LINEAR);
|
||||
|
||||
// Bind the shard texture.
|
||||
pipeline.set_layer_texture(1, this._shardTexture.get_texture());
|
||||
|
||||
+2
-2
@@ -233,9 +233,9 @@ if (utils.isInShellProcess()) {
|
||||
const gradient = [];
|
||||
for (let i = 1; i <= 5; i++) {
|
||||
const color =
|
||||
Clutter.Color.from_string(settings.get_string('fire-color-' + i))[1];
|
||||
Clutter.Color.from_string(settings.get_string('fire-color-' + i))[1];
|
||||
gradient.push(`vec4(${color.red / 255}, ${color.green / 255}, ${
|
||||
color.blue / 255}, ${color.alpha / 255})`);
|
||||
color.blue / 255}, ${color.alpha / 255})`);
|
||||
}
|
||||
|
||||
this.set_shader_source(`
|
||||
|
||||
+5
-5
@@ -129,14 +129,14 @@ if (utils.isInShellProcess()) {
|
||||
const fontData = GdkPixbuf.Pixbuf.new_from_resource('/img/matrixFont.png');
|
||||
this._fontTexture = new Clutter.Image();
|
||||
this._fontTexture.set_data(
|
||||
fontData.get_pixels(),
|
||||
fontData.has_alpha ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888,
|
||||
fontData.width, fontData.height, fontData.rowstride);
|
||||
fontData.get_pixels(),
|
||||
fontData.has_alpha ? Cogl.PixelFormat.RGBA_8888 : Cogl.PixelFormat.RGB_888,
|
||||
fontData.width, fontData.height, fontData.rowstride);
|
||||
|
||||
const trailColor =
|
||||
Clutter.Color.from_string(settings.get_string('matrix-trail-color'))[1];
|
||||
Clutter.Color.from_string(settings.get_string('matrix-trail-color'))[1];
|
||||
const tipColor =
|
||||
Clutter.Color.from_string(settings.get_string('matrix-tip-color'))[1];
|
||||
Clutter.Color.from_string(settings.get_string('matrix-tip-color'))[1];
|
||||
|
||||
// The technique for this effect was inspired by
|
||||
// https://www.shadertoy.com/view/ldccW4, however the implementation is quite
|
||||
|
||||
+3
-4
@@ -125,12 +125,11 @@ if (utils.isInShellProcess()) {
|
||||
// See assets/README.md for how this texture was created.
|
||||
const clawData = GdkPixbuf.Pixbuf.new_from_resource('/img/claws.png');
|
||||
this._clawTexture = new Clutter.Image();
|
||||
this._clawTexture.set_data(
|
||||
clawData.get_pixels(), Cogl.PixelFormat.RGB_888, clawData.width,
|
||||
clawData.height, clawData.rowstride);
|
||||
this._clawTexture.set_data(clawData.get_pixels(), Cogl.PixelFormat.RGB_888,
|
||||
clawData.width, clawData.height, clawData.rowstride);
|
||||
|
||||
const color =
|
||||
Clutter.Color.from_string(settings.get_string('claw-scratch-color'))[1];
|
||||
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');
|
||||
|
||||
Reference in New Issue
Block a user