-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: janusweb
action: commit
revision:
path_from:
revision_from: 1a6a2b0af19b8afe562f90f652e4e26e6239e33f:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 1a6a2b0af19b8afe562f90f652e4e26e6239e33f
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Fri Oct 20 00:11:28 2017 -0700

    Handle anim_id changes from scripts

diff --git a/scripts/janusbase.js b/scripts/janusbase.js

index 1778c8c7f731c60690f5a6043a90a34a78b560d3..

index ..a66071e689e9b10c0f8a2e6dfdb9ba97826e99a1 100644

--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -29,7 +29,7 @@ elation.require(['engine.things.generic', 'utils.template'], function() {
         rotate_axis: { type: 'string', default: '0 1 0' },
         rotate_deg_per_sec: { type: 'string' },
         onclick: { type: 'object' },
-        anim_id: { type: 'string' },
+        anim_id: { type: 'string', set: this.updateAnimation },
         anim_transition_time: { type: 'float', default: .2 },
         collision_id: { type: 'string', set: this.updateCollider },
         collision_pos: { type: 'vector3', default: new THREE.Vector3(0,0,0), set: this.updateCollider },
@@ -443,6 +443,10 @@ console.error('dunno what this is', other);
         });
       }
     }
+    this.updateAnimation = function() {
+      // Triggered whenever this.anim_id changes
+      this.setAnimation(this.anim_id);
+    }
     this.setAnimation = function(anim_id) {
       if (!this.activeanimation || anim_id != this.anim_id) {
         if (!this.animationmixer) return;

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 16:57:02 2024