-- 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: 60a0403c1fa37fdabf19394ee394549e89bbb9f5:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 60a0403c1fa37fdabf19394ee394549e89bbb9f5
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Fri Oct 18 03:57:30 2019 -0700

    Allow passing of attributes for object autocreation

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

index a0615a01b0f236e763517e1a9f1ed27f3cda08df..

index ..9b0bc39574e2aae1a57a523e1709e0609fde24e3 100644

--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -424,7 +424,13 @@ console.log('got collider', collider, collision_id);
       }
       if (!asset && autocreate) {
         // Asset definition wasn't found, so we'll assume it's a URL and define a new asset
-        this.room.loadNewAsset(type, {id: id, src: id}, false);
+        let assetargs = {id: id, src: id};
+        if (typeof autocreate == 'object') {
+          for (let k in autocreate) {
+            assetargs[k] = autocreate[k];
+          }
+        }
+        this.room.loadNewAsset(type, assetargs, false);
         asset = this.room.getAsset(type, id);
       }

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

-- Response ended

-- Page fetched on Sun Jun 2 18:18:29 2024