janusweb 1.5.32 → 1.5.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG +39 -0
  2. package/media/assets/webui/apps/avatar/avatar.js +2 -1
  3. package/media/assets/webui/apps/buttons/buttons.html +2 -2
  4. package/media/assets/webui/apps/buttons/buttons.js +2 -2
  5. package/media/assets/webui/apps/comms/voip.js +2 -4
  6. package/media/assets/webui/apps/editor/codemirror/addon/hint/javascript-hint.js +162 -0
  7. package/media/assets/webui/apps/editor/codemirror/addon/hint/show-hint.css +36 -0
  8. package/media/assets/webui/apps/editor/codemirror/addon/hint/show-hint.js +529 -0
  9. package/media/assets/webui/apps/editor/codemirror/addon/hint/xml-hint.js +140 -0
  10. package/media/assets/webui/apps/editor/codemirror/keymap/vim.js +5734 -0
  11. package/media/assets/webui/apps/editor/codemirror/lib/codemirror.css +350 -0
  12. package/media/assets/webui/apps/editor/codemirror/lib/codemirror.js +9800 -0
  13. package/media/assets/webui/apps/editor/codemirror/lib/jmldark.css +33 -0
  14. package/media/assets/webui/apps/editor/codemirror/mode/css/css.js +864 -0
  15. package/media/assets/webui/apps/editor/codemirror/mode/htmlmixed/htmlmixed.js +153 -0
  16. package/media/assets/webui/apps/editor/codemirror/mode/javascript/javascript.js +942 -0
  17. package/media/assets/webui/apps/editor/codemirror/mode/xml/xml.js +413 -0
  18. package/media/assets/webui/apps/editor/editor.css +3 -0
  19. package/media/assets/webui/apps/editor/editor.js +407 -9
  20. package/media/assets/webui/apps/editor/editor.json +6 -3
  21. package/media/assets/webui/apps/inventory/inventory.js +2 -2
  22. package/media/assets/webui/apps/locomotion/teleporter.js +8 -7
  23. package/media/assets/webui/apps/navigation/navigation.js +12 -12
  24. package/media/assets/webui/apps/vfs/browserfs/browserfs.js +8 -0
  25. package/media/assets/webui/apps/vfs/vfs.css +52 -0
  26. package/media/assets/webui/apps/vfs/vfs.js +452 -0
  27. package/media/assets/webui/apps/vfs/vfs.json +10 -0
  28. package/media/assets/webui/default.json +2 -1
  29. package/media/assets/webui/themes/default.css +29 -2
  30. package/media/lib/physx/physx.release.js +21 -0
  31. package/media/lib/physx/physx.release.wasm +0 -0
  32. package/media/manifest.json +5 -5
  33. package/media/service-worker.js +7 -0
  34. package/package.json +2 -9
  35. package/scripts/client.js +65 -45
  36. package/scripts/config.js +2 -0
  37. package/scripts/elements/linesegments.js +5 -2
  38. package/scripts/image.js +7 -1
  39. package/scripts/janusbase.js +28 -11
  40. package/scripts/janusghost.js +4 -3
  41. package/scripts/janusparagraph.js +5 -3
  42. package/scripts/janusparticle.js +25 -14
  43. package/scripts/janusplayer.js +25 -10
  44. package/scripts/janusweb.js +22 -3
  45. package/scripts/janusxrplayer.js +4 -1
  46. package/scripts/multiplayermanager.js +3 -3
  47. package/scripts/object.js +172 -82
  48. package/scripts/portal.js +12 -10
  49. package/scripts/room.js +113 -54
  50. package/scripts/sound.js +0 -1
  51. package/scripts/text.js +10 -2
  52. package/scripts/translators/janusvfs.js +20 -0
  53. package/scripts/video.js +1 -1
  54. package/scripts/websurface.js +11 -2
  55. package/utils/build.sh +3 -0
  56. package/utils/init.sh +1 -1
package/CHANGELOG CHANGED
@@ -1,3 +1,42 @@
1
+ JanusWeb 1.5
2
+ ============
3
+ - Threejs upgrade to r133
4
+ - Skeletal and morphtarget animation support
5
+ - Lighting and material improvements
6
+ - Transmission
7
+ - Clearcoat
8
+ - HDRI envmaps (EXR)
9
+ - Improved shadow mapping
10
+ - light_style parameter for Quake-style light patterns
11
+ - DRACO glTF compression
12
+ - Avatar improvements
13
+ - Ready Player Me
14
+ - Animation packs
15
+ - Morph targets for speaking, blinking, etc
16
+ - Smarter fading
17
+ - Third person camera option
18
+ - WebXR improvements
19
+ - Stripped out all legacy WebVR and draft WebXR code
20
+ - Optimized performance
21
+ - WebXR Layers for equi video playback
22
+ - WebXR Navigation
23
+ - In-VR UI
24
+ - Collision improvements
25
+ - New collision combos: sphere/mesh, capsule/mesh, capsule/capsule
26
+ - Audio Improvements
27
+ - Room audio graph support
28
+ - HiFi VOIP backend support
29
+ - Configurable VOIP backend per room
30
+ - Experimental / future Stuff
31
+ - AR with plane detection and lighting estimation
32
+ - Swappable physics backends
33
+ - NVIDIA PhysX / multi-threaded physics
34
+ - TensorFlow.js integration - BlazePose full-body tracking, FacePose, HandPose
35
+ - Hybrid standalone XR HMD + desktop processing using local network WebRTC
36
+ - Continued performance improvements
37
+ - iOS support
38
+ - Patreon and Gitcoin donation pages
39
+
1
40
  JanusWeb 1.3
2
41
  ============
3
42
  - Engine improvements
@@ -1,3 +1,4 @@
1
+ /*
1
2
  janus.registerElement('avatar_simple', {
2
3
  headsrc: 'media/assets/hoverscreen.obj',
3
4
  bodysrc: '',
@@ -35,7 +36,7 @@ janus.registerElement('avatar_rigged', {
35
36
  updateXR(pose, referenceSpace) {
36
37
  }
37
38
  });
38
-
39
+ */
39
40
  elation.elements.define('janus-avatar-picker', class extends elation.elements.base {
40
41
  init() {
41
42
  this.defineAttribute('src', { type: 'string' });
@@ -1,12 +1,12 @@
1
1
  <ui-buttonbar>
2
2
  {#showedit}<janus-ui-editor-button title="Edit">Edit</janus-ui-editor-button>{/showedit}
3
- {#showshare}<janus-button-share title="Share Link">Share</janus-button-share>{/showshare}
3
+ <!-- {#showshare}<janus-button-share title="Share Link">Share</janus-button-share>{/showshare} -->
4
4
  {#showfullscreen}<ui-button name="fullscreen" onclick="janus.engine.client.toggleFullscreen()" title="Fullscreen">⛶</ui-button>{/showfullscreen}
5
5
  {#showvr}<janus-button-webvr title="Enter VR"></janus-button-webvr>{/showvr}
6
6
  {#showar}<janus-button-webar title="Enter AR"></janus-button-webar>{/showar}
7
7
  {#showaudio}<janus-button-audio title="Audio Settings">Audio</janus-button-audio>{/showaudio}
8
8
  {#showvoip}<janus-button-voip title="Voice Settings">Voice</janus-button-voip>{/showvoip}
9
9
  {#showsettings}<janus-ui-settings-button title="Settings">Config</janus-ui-settings-button>{/showsettings}
10
- {#showdebug}<janus-button-debug title="Debug">Debug</janus-button-debug>{/showdebug}
10
+ <!-- {#showdebug}<janus-button-debug title="Debug">Debug</janus-button-debug>{/showdebug} -->
11
11
  </ui-buttonbar>
12
12
 
@@ -3,14 +3,14 @@ elation.elements.define('janus.ui.buttons', class extends elation.elements.base
3
3
  super.init();
4
4
  this.defineAttributes({
5
5
  showedit: { type: 'boolean', default: true },
6
- showshare: { type: 'boolean', default: true },
6
+ showshare: { type: 'boolean', default: false },
7
7
  showfullscreen: { type: 'boolean', default: true },
8
8
  showvr: { type: 'boolean', default: true },
9
9
  showar: { type: 'boolean', default: true },
10
10
  showsettings: { type: 'boolean', default: true },
11
11
  showaudio: { type: 'boolean', default: true },
12
12
  showvoip: { type: 'boolean', default: true },
13
- showdebug: { type: 'boolean', default: true },
13
+ showdebug: { type: 'boolean', default: false },
14
14
  });
15
15
  }
16
16
  create() {
@@ -259,7 +259,7 @@ console.log('voip picker select?', ev);
259
259
  }
260
260
  });
261
261
 
262
- elation.events.add(janus.engine, 'engine_frame', ev => this.handleFrameUpdate(ev))
262
+ elation.events.add(janus.engine, 'engine_frame', ev => this.handleFrameUpdate(ev));
263
263
 
264
264
  let newUserDataSubscription = new HighFidelityAudio.UserDataSubscription({
265
265
  components: [
@@ -511,7 +511,6 @@ elation.elements.define('janus-voip-remoteuser', class extends elation.elements.
511
511
  'muted': { type: 'boolean', default: false },
512
512
  'hasaudio': { type: 'boolean', default: false },
513
513
  'hasvideo': { type: 'boolean', default: false },
514
- 'hasvideo': { type: 'boolean', default: false },
515
514
  'averagevolume': { type: 'float', default: 0 },
516
515
  'speaking': { type: 'boolean', default: false },
517
516
  'threshold': { type: 'float', default: .2 },
@@ -878,12 +877,11 @@ elation.elements.define('janus-voip-picker-audio', class extends elation.element
878
877
  // FIXME - I'm not really using these UI elements properly here, I shouldn't be mucking with the HTML elements directly
879
878
  inputs.select.innerHTML = '';
880
879
  let hasWebcamPermission = true;
881
- let webcamDisabled;
882
880
  if (cameras) {
883
881
  cameras.select.innerHTML = '';
884
882
  //outputs.select.innerHTML = '';
885
883
 
886
- webcamDisabled = elation.elements.create('option', {innerHTML: 'Disabled', value: 'none', append: cameras.select});
884
+ this.webcamDisabledElement = elation.elements.create('option', {innerHTML: 'Disabled', value: 'none', append: cameras.select});
887
885
  }
888
886
  devices.forEach(d => {
889
887
  if (d.kind == 'audioinput') {
@@ -0,0 +1,162 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: https://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ var Pos = CodeMirror.Pos;
13
+
14
+ function forEach(arr, f) {
15
+ for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
16
+ }
17
+
18
+ function arrayContains(arr, item) {
19
+ if (!Array.prototype.indexOf) {
20
+ var i = arr.length;
21
+ while (i--) {
22
+ if (arr[i] === item) {
23
+ return true;
24
+ }
25
+ }
26
+ return false;
27
+ }
28
+ return arr.indexOf(item) != -1;
29
+ }
30
+
31
+ function scriptHint(editor, keywords, getToken, options) {
32
+ // Find the token at the cursor
33
+ var cur = editor.getCursor(), token = getToken(editor, cur);
34
+ if (/\b(?:string|comment)\b/.test(token.type)) return;
35
+ var innerMode = CodeMirror.innerMode(editor.getMode(), token.state);
36
+ if (innerMode.mode.helperType === "json") return;
37
+ token.state = innerMode.state;
38
+
39
+ // If it's not a 'word-style' token, ignore the token.
40
+ if (!/^[\w$_]*$/.test(token.string)) {
41
+ token = {start: cur.ch, end: cur.ch, string: "", state: token.state,
42
+ type: token.string == "." ? "property" : null};
43
+ } else if (token.end > cur.ch) {
44
+ token.end = cur.ch;
45
+ token.string = token.string.slice(0, cur.ch - token.start);
46
+ }
47
+
48
+ var tprop = token;
49
+ // If it is a property, find out what it is a property of.
50
+ while (tprop.type == "property") {
51
+ tprop = getToken(editor, Pos(cur.line, tprop.start));
52
+ if (tprop.string != ".") return;
53
+ tprop = getToken(editor, Pos(cur.line, tprop.start));
54
+ if (!context) var context = [];
55
+ context.push(tprop);
56
+ }
57
+ return {list: getCompletions(token, context, keywords, options),
58
+ from: Pos(cur.line, token.start),
59
+ to: Pos(cur.line, token.end)};
60
+ }
61
+
62
+ function javascriptHint(editor, options) {
63
+ return scriptHint(editor, javascriptKeywords,
64
+ function (e, cur) {return e.getTokenAt(cur);},
65
+ options);
66
+ };
67
+ CodeMirror.registerHelper("hint", "javascript", javascriptHint);
68
+
69
+ function getCoffeeScriptToken(editor, cur) {
70
+ // This getToken, it is for coffeescript, imitates the behavior of
71
+ // getTokenAt method in javascript.js, that is, returning "property"
72
+ // type and treat "." as independent token.
73
+ var token = editor.getTokenAt(cur);
74
+ if (cur.ch == token.start + 1 && token.string.charAt(0) == '.') {
75
+ token.end = token.start;
76
+ token.string = '.';
77
+ token.type = "property";
78
+ }
79
+ else if (/^\.[\w$_]*$/.test(token.string)) {
80
+ token.type = "property";
81
+ token.start++;
82
+ token.string = token.string.replace(/\./, '');
83
+ }
84
+ return token;
85
+ }
86
+
87
+ function coffeescriptHint(editor, options) {
88
+ return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);
89
+ }
90
+ CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);
91
+
92
+ var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +
93
+ "toUpperCase toLowerCase split concat match replace search").split(" ");
94
+ var arrayProps = ("length concat join splice push pop shift unshift slice reverse sort indexOf " +
95
+ "lastIndexOf every some filter forEach map reduce reduceRight ").split(" ");
96
+ var funcProps = "prototype apply call bind".split(" ");
97
+ var javascriptKeywords = ("break case catch class const continue debugger default delete do else export extends false finally for function " +
98
+ "if in import instanceof new null return super switch this throw true try typeof var void while with yield").split(" ");
99
+ var coffeescriptKeywords = ("and break catch class continue delete do else extends false finally for " +
100
+ "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");
101
+
102
+ function forAllProps(obj, callback) {
103
+ if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) {
104
+ for (var name in obj) callback(name)
105
+ } else {
106
+ for (var o = obj; o; o = Object.getPrototypeOf(o))
107
+ Object.getOwnPropertyNames(o).forEach(callback)
108
+ }
109
+ }
110
+
111
+ function getCompletions(token, context, keywords, options) {
112
+ var found = [], start = token.string, global = options && options.globalScope || window;
113
+ function maybeAdd(str) {
114
+ if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);
115
+ }
116
+ function gatherCompletions(obj) {
117
+ if (typeof obj == "string") forEach(stringProps, maybeAdd);
118
+ else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
119
+ else if (obj instanceof Function) forEach(funcProps, maybeAdd);
120
+ forAllProps(obj, maybeAdd)
121
+ }
122
+
123
+ if (context && context.length) {
124
+ // If this is a property, see if it belongs to some object we can
125
+ // find in the current environment.
126
+ var obj = context.pop(), base;
127
+ if (obj.type && obj.type.indexOf("variable") === 0) {
128
+ if (options && options.additionalContext)
129
+ base = options.additionalContext[obj.string];
130
+ if (!options || options.useGlobalScope !== false)
131
+ base = base || global[obj.string];
132
+ } else if (obj.type == "string") {
133
+ base = "";
134
+ } else if (obj.type == "atom") {
135
+ base = 1;
136
+ } else if (obj.type == "function") {
137
+ if (global.jQuery != null && (obj.string == '$' || obj.string == 'jQuery') &&
138
+ (typeof global.jQuery == 'function'))
139
+ base = global.jQuery();
140
+ else if (global._ != null && (obj.string == '_') && (typeof global._ == 'function'))
141
+ base = global._();
142
+ }
143
+ while (base != null && context.length)
144
+ base = base[context.pop().string];
145
+ if (base != null) gatherCompletions(base);
146
+ } else {
147
+ // If not, just look in the global object, any local scope, and optional additional-context
148
+ // (reading into JS mode internals to get at the local and global variables)
149
+ for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
150
+ for (var c = token.state.context; c; c = c.prev)
151
+ for (var v = c.vars; v; v = v.next) maybeAdd(v.name)
152
+ for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);
153
+ if (options && options.additionalContext != null)
154
+ for (var key in options.additionalContext)
155
+ maybeAdd(key);
156
+ if (!options || options.useGlobalScope !== false)
157
+ gatherCompletions(global);
158
+ forEach(keywords, maybeAdd);
159
+ }
160
+ return found;
161
+ }
162
+ });
@@ -0,0 +1,36 @@
1
+ .CodeMirror-hints {
2
+ position: absolute;
3
+ z-index: 10;
4
+ overflow: hidden;
5
+ list-style: none;
6
+
7
+ margin: 0;
8
+ padding: 2px;
9
+
10
+ -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
11
+ -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
12
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);
13
+ border-radius: 3px;
14
+ border: 1px solid silver;
15
+
16
+ background: white;
17
+ font-size: 90%;
18
+ font-family: monospace;
19
+
20
+ max-height: 20em;
21
+ overflow-y: auto;
22
+ }
23
+
24
+ .CodeMirror-hint {
25
+ margin: 0;
26
+ padding: 0 4px;
27
+ border-radius: 2px;
28
+ white-space: pre;
29
+ color: black;
30
+ cursor: pointer;
31
+ }
32
+
33
+ li.CodeMirror-hint-active {
34
+ background: #08f;
35
+ color: white;
36
+ }