This commit is contained in:
Justin Garza
2025-01-12 20:22:59 -05:00
parent fc6aa44204
commit 56dbc7265c
5 changed files with 430 additions and 453 deletions
+7 -1
View File
@@ -65,8 +65,10 @@ export var Shader = GObject.registerClass({
// vfunc_build_pipeline()) from the resource file resources/shaders/<nick>.glsl
// resolving any #includes in this file.
_init(nick) {
log(`Shader initialized with params: ${JSON.stringify(nick)}`);
this._nick = nick;
// This will call vfunc_build_pipeline().
super._init();
@@ -96,6 +98,7 @@ export var Shader = GObject.registerClass({
// Clean up if the animation finished or was interrupted.
this._timeline.connect('stopped', (t, finished) => {
// log(`Shader initialized with params: ${JSON.stringify(t)}`);
this.endAnimation();
});
}
@@ -151,6 +154,9 @@ export var Shader = GObject.registerClass({
endAnimation() {
// This will call endAnimation() again, so we can return for now.
if (this._timeline.is_playing()) {
// log(`Shader initialized with params:
// ${JSON.stringify(this._timeline.is_playing())}`);
this._timeline.stop();
return;
}