repo: janusweb
action: commit
revision: 
path_from: 
revision_from: e3ef13591dc5166288ca7e8fc46f09e9a20e1615:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit e3ef13591dc5166288ca7e8fc46f09e9a20e1615
Author: James Baicoianu 
Date:   Sat May 8 13:51:42 2021 -0700

    Added room.cursor_opacity

diff --git a/scripts/room.js b/scripts/room.js
index a49fd47f693e0c046309820738eaf38141e21cfb..
index ..b4a2b1a6d99374b94e93acebf810b7011555bbe6 100644
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -60,6 +60,7 @@ elation.require([
         'teleport': { type: 'bool', default: true, set: this.updateTeleport },
         'locked': { type: 'bool', default: false },
         'cursor_visible': { type: 'bool', default: true },
+        'cursor_opacity': { type: 'float', default: .8 },
         'use_local_asset': { type: 'string', set: this.updateLocalAsset },
         'col': { type: 'color', set: this.updateLocalAsset },
         'private': { type: 'bool', default: false },
@@ -227,7 +228,7 @@ elation.require([
       player.properties.movestrength = 80 * this.properties.walk_speed;
       player.properties.runstrength = 80 * this.properties.run_speed;
       player.cursor_visible = (!janus.hmd ? elation.utils.any(this.cursor_visible, true) : false);
-      player.cursor_opacity = 1;
+      player.cursor_opacity = elation.utils.any(this.cursor_opacity, .8);
       // FIXME - for some reason the above call sometimes orients the player backwards.  Doing it on a delay fixes it...
       //setTimeout(elation.bind(player, player.reset_position), 0);
     }
@@ -855,6 +856,7 @@ elation.require([
         this.properties.walk_speed = room.walk_speed || 1.8;
         this.properties.run_speed = room.run_speed || 5.4;
         this.properties.cursor_visible = room.cursor_visible;
+        this.properties.cursor_opacity = room.cursor_opacity;

         let cookieStorageID = 'cookies.' + this.url;
         if (cookieStorageID in localStorage) {

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