janusweb 1.5.56 → 1.7.1
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.
- package/.github/workflows/deploy.yml +71 -0
- package/Dockerfile +14 -0
- package/README.md +258 -19
- package/janusxr.com/.args +2 -0
- package/janusxr.com/.init.lua +30 -0
- package/media/assets/webui/apps/comms/voip.js +27 -25
- package/media/assets/webui/apps/editor/editor.js +16 -0
- package/media/assets/webui/apps/locomotion/locomotion-assets.json +3 -0
- package/media/assets/webui/apps/locomotion/teleport.mp3 +0 -0
- package/media/assets/webui/apps/locomotion/teleporter.js +75 -43
- package/media/assets/webui/apps/navigation/navigation.js +6 -1
- package/media/assets/webui/apps/xrfragment/level0-sidecarfile.js +308 -0
- package/media/assets/webui/apps/xrfragment/level2-hyperlink.js +265 -0
- package/media/assets/webui/apps/xrfragment/level7-engine-prefixes.export.js +93 -0
- package/media/assets/webui/apps/xrfragment/level7-engine-prefixes.import.js +229 -0
- package/media/assets/webui/apps/xrfragment/patch/metaquest-fix-flickering.js +15 -0
- package/media/assets/webui/apps/xrfragment/xrfragment.json +14 -0
- package/media/assets/webui/apps/xrmenu/images/teleport.png +0 -0
- package/media/assets/webui/apps/xrmenu/xrmenu-assets.json +2 -1
- package/media/assets/webui/apps/xrmenu/xrmenu.js +39 -15
- package/media/assets/webui/default.json +1 -0
- package/media/images/portal.svg +130 -0
- package/media/index.html +48 -1
- package/package.json +1 -1
- package/scripts/client.js +24 -0
- package/scripts/config.js +12 -1
- package/scripts/janusbase.js +14 -22
- package/scripts/janusghost.js +2 -2
- package/scripts/janusparagraph.js +195 -12
- package/scripts/janusplayer.js +9 -6
- package/scripts/room.js +91 -44
- package/scripts/sound.js +1 -1
- package/scripts/text.js +2 -1
- package/scripts/translators/paragraph/html-xml-rss.js +47 -0
- package/scripts/translators/peertube.js +89 -0
- package/scripts/translators/xrfragments.js +93 -0
- package/tests/room/paragraph.xml +47 -0
- package/utils/build.sh +1 -0
- package/utils/clean-build.sh +5 -0
- package/utils/dev-link.sh +75 -0
- package/utils/release.binary.sh +36 -0
- package/utils/release.docker.sh +11 -0
|
@@ -13,6 +13,7 @@ janus.registerElement('xrmenu', {
|
|
|
13
13
|
renderorder: 9,
|
|
14
14
|
});
|
|
15
15
|
*/
|
|
16
|
+
console.log("creating xrmenu")
|
|
16
17
|
|
|
17
18
|
this.worldpos = V();
|
|
18
19
|
this.worlddir = V();
|
|
@@ -82,25 +83,22 @@ janus.registerElement('xrmenu', {
|
|
|
82
83
|
image_id: 'xrmenu-button-sound',
|
|
83
84
|
//onactivate: (ev) => this.engine.client.stopXR(),
|
|
84
85
|
}),
|
|
86
|
+
teleport: this.createObject('xrmenu-button', {
|
|
87
|
+
pos: V(.68, 0, 0),
|
|
88
|
+
label: 'Teleport',
|
|
89
|
+
image_id: 'xrmenu-button-teleport',
|
|
90
|
+
toggle: true,
|
|
91
|
+
enabled: room.teleport,
|
|
92
|
+
//onactivate: (ev) => this.engine.client.stopXR(),
|
|
93
|
+
}),
|
|
85
94
|
};
|
|
86
95
|
this.buttons.home.addEventListener('activate', ev => janus.navigateHome());
|
|
87
96
|
this.buttons.back.addEventListener('activate', ev => janus.navigateBack());
|
|
88
97
|
this.buttons.reset.addEventListener('activate', ev => player.reset_position());
|
|
89
98
|
this.buttons.reload.addEventListener('activate', ev => location.reload());
|
|
90
99
|
this.buttons.exitvr.addEventListener('activate', ev => this.engine.client.stopXR());
|
|
91
|
-
this.buttons.sound.addEventListener('activate', ev =>
|
|
92
|
-
|
|
93
|
-
this.panels['sound'] = this.buttons.sound.createObject('xrmenu-popup', {
|
|
94
|
-
content: 'janus-voip-picker'
|
|
95
|
-
});
|
|
96
|
-
} else {
|
|
97
|
-
if (this.panels['sound'].parent === this.buttons.sound) {
|
|
98
|
-
this.buttons.sound.removeChild(this.panels['sound']);
|
|
99
|
-
} else {
|
|
100
|
-
this.buttons.sound.appendChild(this.panels['sound']);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
});
|
|
100
|
+
this.buttons.sound.addEventListener('activate', ev => this.toggleSound());
|
|
101
|
+
this.buttons.teleport.addEventListener('activate', ev => this.toggleTeleport());
|
|
104
102
|
this.reflow();
|
|
105
103
|
});
|
|
106
104
|
},
|
|
@@ -116,6 +114,23 @@ janus.registerElement('xrmenu', {
|
|
|
116
114
|
button.pos.x = (-width / 2) + (this.buttonwidth * this.buttonmargin * (i + .5)) ;
|
|
117
115
|
}
|
|
118
116
|
},
|
|
117
|
+
toggleSound(){
|
|
118
|
+
if (!this.panels['sound']) {
|
|
119
|
+
this.panels['sound'] = this.buttons.sound.createObject('xrmenu-popup', {
|
|
120
|
+
content: 'janus-voip-picker'
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
if (this.panels['sound'].parent === this.buttons.sound) {
|
|
124
|
+
this.buttons.sound.removeChild(this.panels['sound']);
|
|
125
|
+
} else {
|
|
126
|
+
this.buttons.sound.appendChild(this.panels['sound']);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
toggleTeleport(){
|
|
131
|
+
room.teleport = !room.teleport
|
|
132
|
+
this.buttons.teleport.state(room.teleport)
|
|
133
|
+
},
|
|
119
134
|
/*
|
|
120
135
|
update() {
|
|
121
136
|
let worldpos = this.localToWorld(this.worldpos.set(0,0,0));
|
|
@@ -135,16 +150,20 @@ janus.registerElement('xrmenu', {
|
|
|
135
150
|
janus.registerElement('xrmenu-button', {
|
|
136
151
|
onactivate: null,
|
|
137
152
|
image_id: '',
|
|
153
|
+
toggle: false,
|
|
154
|
+
enabled: true,
|
|
138
155
|
|
|
139
156
|
create() {
|
|
140
157
|
this.button = this.createObject('object', {
|
|
141
158
|
id: 'plane',
|
|
142
159
|
scale: V(.1, .1, .02),
|
|
143
160
|
col: '#fff',
|
|
144
|
-
pos: V(0, 0, .01),
|
|
161
|
+
pos: V(0, 0, this.enabled ? 0.01 : 0 ),
|
|
145
162
|
collision_id: 'cube',
|
|
146
163
|
image_id: this.image_id,
|
|
147
164
|
renderorder: 10,
|
|
165
|
+
emissive: this.enabled ? (this.toggle ? '#FFF' : '#595')
|
|
166
|
+
: '#555',
|
|
148
167
|
});
|
|
149
168
|
this.button.addEventListener('mouseover', ev => this.handleMouseOver(ev));
|
|
150
169
|
this.button.addEventListener('mouseout', ev => this.handleMouseOut(ev));
|
|
@@ -153,9 +172,11 @@ janus.registerElement('xrmenu-button', {
|
|
|
153
172
|
this.button.addEventListener('click', ev => this.handleClick(ev));
|
|
154
173
|
},
|
|
155
174
|
handleMouseOver(ev) {
|
|
175
|
+
if( this.toggle ) return
|
|
156
176
|
this.button.emissive = '#595';
|
|
157
177
|
},
|
|
158
178
|
handleMouseOut(ev) {
|
|
179
|
+
if( this.toggle ) return
|
|
159
180
|
this.button.emissive = '#555';
|
|
160
181
|
},
|
|
161
182
|
handleMouseDown(ev) {
|
|
@@ -164,7 +185,10 @@ janus.registerElement('xrmenu-button', {
|
|
|
164
185
|
handleMouseUp(ev) {
|
|
165
186
|
this.button.pos.z = .01;
|
|
166
187
|
},
|
|
167
|
-
|
|
188
|
+
state(enabled){
|
|
189
|
+
this.button.emissive = (this.enabled = enabled) ? '#FFF' : '#555'
|
|
190
|
+
this.button.pos.z = enabled ? .01 : 0
|
|
191
|
+
},
|
|
168
192
|
handleClick(ev) {
|
|
169
193
|
this.dispatchEvent({type: 'activate'});
|
|
170
194
|
},
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
width="79.375008mm"
|
|
6
|
+
height="158.75mm"
|
|
7
|
+
viewBox="0 0 79.375007 158.75"
|
|
8
|
+
version="1.1"
|
|
9
|
+
id="svg1"
|
|
10
|
+
xml:space="preserve"
|
|
11
|
+
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
|
|
12
|
+
sodipodi:docname="portal.svg"
|
|
13
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
14
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
15
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
16
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
17
|
+
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
|
18
|
+
id="namedview1"
|
|
19
|
+
pagecolor="#ffffff"
|
|
20
|
+
bordercolor="#000000"
|
|
21
|
+
borderopacity="0.25"
|
|
22
|
+
inkscape:showpageshadow="2"
|
|
23
|
+
inkscape:pageopacity="0.0"
|
|
24
|
+
inkscape:pagecheckerboard="0"
|
|
25
|
+
inkscape:deskcolor="#d1d1d1"
|
|
26
|
+
inkscape:document-units="mm"
|
|
27
|
+
inkscape:zoom="0.73673541"
|
|
28
|
+
inkscape:cx="48.185549"
|
|
29
|
+
inkscape:cy="464.88875"
|
|
30
|
+
inkscape:window-width="1920"
|
|
31
|
+
inkscape:window-height="1030"
|
|
32
|
+
inkscape:window-x="0"
|
|
33
|
+
inkscape:window-y="26"
|
|
34
|
+
inkscape:window-maximized="1"
|
|
35
|
+
inkscape:current-layer="layer1" /><defs
|
|
36
|
+
id="defs1"><inkscape:path-effect
|
|
37
|
+
effect="fillet_chamfer"
|
|
38
|
+
id="path-effect6"
|
|
39
|
+
is_visible="true"
|
|
40
|
+
lpeversion="1"
|
|
41
|
+
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,7.2009148,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,6.7344665,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,5.7643969,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,7.2192412,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0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0,0,1,0,0,0,1"
|
|
42
|
+
radius="0"
|
|
43
|
+
unit="px"
|
|
44
|
+
method="auto"
|
|
45
|
+
mode="F"
|
|
46
|
+
chamfer_steps="1"
|
|
47
|
+
flexible="false"
|
|
48
|
+
use_knot_distance="true"
|
|
49
|
+
apply_no_radius="true"
|
|
50
|
+
apply_with_radius="true"
|
|
51
|
+
only_selected="false"
|
|
52
|
+
hide_knots="false" /><inkscape:path-effect
|
|
53
|
+
effect="fillet_chamfer"
|
|
54
|
+
id="path-effect5"
|
|
55
|
+
is_visible="true"
|
|
56
|
+
lpeversion="1"
|
|
57
|
+
nodesatellites_param="F,0,0,1,0,6.191627,0,1 @ F,0,0,1,0,7.505764,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
|
58
|
+
radius="0"
|
|
59
|
+
unit="px"
|
|
60
|
+
method="auto"
|
|
61
|
+
mode="F"
|
|
62
|
+
chamfer_steps="1"
|
|
63
|
+
flexible="false"
|
|
64
|
+
use_knot_distance="true"
|
|
65
|
+
apply_no_radius="true"
|
|
66
|
+
apply_with_radius="true"
|
|
67
|
+
only_selected="false"
|
|
68
|
+
hide_knots="false" /><inkscape:path-effect
|
|
69
|
+
effect="fillet_chamfer"
|
|
70
|
+
id="path-effect4"
|
|
71
|
+
is_visible="true"
|
|
72
|
+
lpeversion="1"
|
|
73
|
+
nodesatellites_param="F,0,0,1,0,5.2792018,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
|
74
|
+
radius="0"
|
|
75
|
+
unit="px"
|
|
76
|
+
method="auto"
|
|
77
|
+
mode="F"
|
|
78
|
+
chamfer_steps="1"
|
|
79
|
+
flexible="false"
|
|
80
|
+
use_knot_distance="true"
|
|
81
|
+
apply_no_radius="true"
|
|
82
|
+
apply_with_radius="true"
|
|
83
|
+
only_selected="false"
|
|
84
|
+
hide_knots="false" /><inkscape:path-effect
|
|
85
|
+
effect="fillet_chamfer"
|
|
86
|
+
id="path-effect3"
|
|
87
|
+
is_visible="true"
|
|
88
|
+
lpeversion="1"
|
|
89
|
+
nodesatellites_param="F,0,0,1,0,0,0,1 @ F,0,0,1,0,5.7643974,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,6.1418531,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0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,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 | F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,0,0,1"
|
|
90
|
+
radius="0"
|
|
91
|
+
unit="px"
|
|
92
|
+
method="auto"
|
|
93
|
+
mode="F"
|
|
94
|
+
chamfer_steps="1"
|
|
95
|
+
flexible="false"
|
|
96
|
+
use_knot_distance="true"
|
|
97
|
+
apply_no_radius="true"
|
|
98
|
+
apply_with_radius="true"
|
|
99
|
+
only_selected="false"
|
|
100
|
+
hide_knots="false" /><linearGradient
|
|
101
|
+
id="linearGradient2"
|
|
102
|
+
inkscape:collect="always"><stop
|
|
103
|
+
style="stop-color:#364051;stop-opacity:0.26459038;"
|
|
104
|
+
offset="0"
|
|
105
|
+
id="stop2" /><stop
|
|
106
|
+
style="stop-color:#4a6483;stop-opacity:0.49411765;"
|
|
107
|
+
offset="0.38955703"
|
|
108
|
+
id="stop5" /><stop
|
|
109
|
+
style="stop-color:#947ac4;stop-opacity:1;"
|
|
110
|
+
offset="1"
|
|
111
|
+
id="stop3" /></linearGradient><linearGradient
|
|
112
|
+
inkscape:collect="always"
|
|
113
|
+
xlink:href="#linearGradient2"
|
|
114
|
+
id="linearGradient3"
|
|
115
|
+
x1="127.20676"
|
|
116
|
+
y1="190.95575"
|
|
117
|
+
x2="125.82147"
|
|
118
|
+
y2="111.5928"
|
|
119
|
+
gradientUnits="userSpaceOnUse"
|
|
120
|
+
gradientTransform="translate(-22.266022,-50.996373)" /></defs><g
|
|
121
|
+
inkscape:label="Layer 1"
|
|
122
|
+
inkscape:groupmode="layer"
|
|
123
|
+
id="layer1"
|
|
124
|
+
transform="translate(-64.560526,-20.90281)"><path
|
|
125
|
+
style="fill:url(#linearGradient3);stroke:none"
|
|
126
|
+
d="M 64.560526,100.27781 V 28.103725 a 7.2009148,7.2009148 135 0 1 7.200915,-7.200915 h 32.486589 32.95303 a 6.7344665,6.7344665 45 0 1 6.73447,6.734466 v 72.640534 l 0,73.6106 a 5.7643969,5.7643969 135 0 1 -5.7644,5.7644 h -33.9231 -32.468263 a 7.2192412,7.2192412 45 0 1 -7.219241,-7.21924 z m 47.103984,29.96041 c 3.30617,-0.89658 6.16277,-2.11655 8.7251,-3.72622 6.98934,-4.39076 11.53086,-10.56792 13.83499,-18.8177 0.48271,-1.72835 0.5565,-2.71166 0.5565,-7.41649 0,-4.704823 -0.0738,-5.688133 -0.5565,-7.416483 -2.30413,-8.24978 -6.84565,-14.42695 -13.83499,-18.8177 -2.5689,-1.6138 -5.43589,-2.83688 -8.7251,-3.72217 -2.55776,-0.68843 -9.42862,-0.95176 -12.402534,-0.47534 -10.8555,1.73904 -20.28912,9.58188 -23.99411,19.94801 -1.2723,3.55973 -1.72805,6.32622 -1.72707,10.483683 9.6e-4,4.08141 0.44822,6.87117 1.64645,10.26947 1.03429,2.9334 1.66772,4.17255 3.62059,7.08285 4.34347,6.47292 11.22797,11.10147 19.09019,12.83461 3.158324,0.69621 10.829344,0.56999 13.766484,-0.22652 z m -11.914404,-1.57307 c -13.08222,-2.28643 -23.09848,-13.06889 -24.03518,-25.87379 -0.64646,-8.837263 2.21242,-16.696163 8.28145,-22.765193 6.04898,-6.04898 13.79151,-8.88345 22.632904,-8.28572 11.92033,0.8059 22.16853,9.45106 25.46177,21.479 0.51415,1.87781 0.59239,2.81007 0.59239,7.058363 0,4.2483 -0.0782,5.18056 -0.59239,7.05837 -2.99448,10.9368 -11.36764,18.84373 -22.34177,21.09776 -1.91619,0.39357 -8.23426,0.53966 -9.999174,0.23121 z m 1.164184,-11.67565 c -2.463224,-1.79225 -5.168364,-5.26924 -6.569154,-8.44346 l -0.49623,-1.12448 h -2.87023 c -1.97121,0 -2.87024,0.0944 -2.87024,0.30147 0,0.43057 1.47343,2.76695 2.60716,4.13412 2.35223,2.83656 7.61793,5.74857 10.595564,5.85951 0.56836,0.0212 0.52671,-0.0552 -0.39687,-0.72716 z m 8.03494,0.37347 c 3.18248,-0.84719 6.87927,-3.15195 8.83123,-5.50582 1.13372,-1.36717 2.60715,-3.70355 2.60715,-4.13412 0,-0.20822 -0.92068,-0.29876 -2.97656,-0.29273 l -2.97657,0.009 -1.10778,2.30636 c -1.27253,2.64936 -3.14145,5.05872 -5.2672,6.79035 -1.61221,1.3133 -1.46174,1.45319 0.88973,0.82722 z m -5.49495,-5.04661 v -4.8948 h -3.968754 c -2.71819,0 -3.96875,0.092 -3.96875,0.29204 0,0.80418 2.18452,4.28343 3.70416,5.89957 1.368124,1.45499 3.805444,3.55555 4.167194,3.59142 0.0364,0.004 0.0661,-2.1961 0.0661,-4.88823 z m 5.15937,1.855 c 1.80981,-1.83861 3.13335,-3.76242 3.9611,-5.75761 l 0.41163,-0.99219 h -3.9723 -3.9723 v 4.91281 4.91281 l 0.85989,-0.59713 c 0.47294,-0.32843 1.69334,-1.44384 2.71198,-2.47869 z m -15.337294,-8.80032 c -0.0992,-0.25466 -0.3097,-1.50481 -0.46779,-2.77812 -0.27657,-2.22771 -0.0302,-6.130013 0.46779,-7.408343 0.16538,-0.42455 -0.0719,-0.46302 -2.85627,-0.46302 h -3.03663 l -0.36511,1.25677 c -0.21641,0.74491 -0.36512,2.49603 -0.36512,4.299483 0,1.80346 0.14871,3.55458 0.36512,4.29948 l 0.36511,1.25677 h 3.03663 c 2.78435,0 3.02165,-0.0385 2.85627,-0.46302 z m 10.177924,-5.09323 v -5.556253 h -4.346874 -4.34687 l -0.32567,1.52136 c -0.41827,1.95392 -0.41827,6.115873 0,8.069793 l 0.32567,1.52135 h 4.34687 4.346874 z m 10.36219,4.43177 c 0.42701,-1.46197 0.42701,-7.401563 0,-8.863543 l -0.32842,-1.12448 h -4.22314 -4.22313 v 5.556253 5.55625 h 4.22313 4.22314 z m 7.66123,-0.13229 c 0.21641,-0.7449 0.36512,-2.49602 0.36512,-4.29948 0,-1.803453 -0.14871,-3.554573 -0.36512,-4.299483 l -0.36511,-1.25677 h -3.03315 -3.03315 l 0.22326,1.38907 c 0.1228,0.76398 0.22327,2.63922 0.22327,4.167183 0,1.52797 -0.10047,3.40321 -0.22327,4.16719 l -0.22326,1.38906 h 3.03315 3.03315 z M 94.345136,92.009577 c 1.40079,-3.17422 4.10593,-6.6512 6.569154,-8.44346 1.19166,-0.86706 0.84372,-0.96209 -1.367474,-0.37346 -3.18248,0.84719 -6.87926,3.15195 -8.83122,5.50582 -1.13373,1.36716 -2.60716,3.70355 -2.60716,4.13412 0,0.20704 0.89903,0.30146 2.87024,0.30146 h 2.87023 z m 9.109144,-3.78302 v -4.9075 l -1.12839,0.77635 c -1.88197,1.29483 -4.751514,4.5327 -5.817124,6.5638 -0.5456,1.03993 -0.99199,2.02219 -0.99199,2.18282 0,0.20001 1.25056,0.29203 3.96875,0.29203 h 3.968754 z m 9.12047,3.91532 c -1.13224,-2.72914 -4.20629,-6.5233 -6.67308,-8.2363 l -0.85989,-0.59713 v 4.91281 4.9128 h 3.9723 3.9723 z m 7.81286,0.69072 c 0,-0.43057 -1.47343,-2.76696 -2.60715,-4.13412 -1.95196,-2.35387 -5.64875,-4.65863 -8.83123,-5.50582 -2.35147,-0.62597 -2.50194,-0.48608 -0.88973,0.82722 2.12575,1.73162 3.99467,4.14099 5.2672,6.79035 l 1.10778,2.30636 2.97657,0.009 c 2.05588,0.006 2.97656,-0.0845 2.97656,-0.29273 z"
|
|
127
|
+
id="path1"
|
|
128
|
+
sodipodi:nodetypes="cccccccccsssscssssssssscssssscsccscssssccssccssccccssscccsscccccsssssscssscssccccssccccsscccccccsssscccssscccssssssscsccssssccsscccccssssssccss"
|
|
129
|
+
inkscape:path-effect="#path-effect6"
|
|
130
|
+
inkscape:original-d="m 64.560526,100.27781 v -79.375 h 39.687504 39.6875 v 79.375 79.375 h -39.6875 -39.687504 z m 47.103984,29.96041 c 3.30617,-0.89658 6.16277,-2.11655 8.7251,-3.72622 6.98934,-4.39076 11.53086,-10.56792 13.83499,-18.8177 0.48271,-1.72835 0.5565,-2.71166 0.5565,-7.41649 0,-4.704823 -0.0738,-5.688133 -0.5565,-7.416483 -2.30413,-8.24978 -6.84565,-14.42695 -13.83499,-18.8177 -2.5689,-1.6138 -5.43589,-2.83688 -8.7251,-3.72217 -2.55776,-0.68843 -9.42862,-0.95176 -12.402534,-0.47534 -10.8555,1.73904 -20.28912,9.58188 -23.99411,19.94801 -1.2723,3.55973 -1.72805,6.32622 -1.72707,10.483683 9.6e-4,4.08141 0.44822,6.87117 1.64645,10.26947 1.03429,2.9334 1.66772,4.17255 3.62059,7.08285 4.34347,6.47292 11.22797,11.10147 19.09019,12.83461 3.158324,0.69621 10.829344,0.56999 13.766484,-0.22652 z m -11.914404,-1.57307 c -13.08222,-2.28643 -23.09848,-13.06889 -24.03518,-25.87379 -0.64646,-8.837263 2.21242,-16.696163 8.28145,-22.765193 6.04898,-6.04898 13.79151,-8.88345 22.632904,-8.28572 11.92033,0.8059 22.16853,9.45106 25.46177,21.479 0.51415,1.87781 0.59239,2.81007 0.59239,7.058363 0,4.2483 -0.0782,5.18056 -0.59239,7.05837 -2.99448,10.9368 -11.36764,18.84373 -22.34177,21.09776 -1.91619,0.39357 -8.23426,0.53966 -9.999174,0.23121 z m 1.164184,-11.67565 c -2.463224,-1.79225 -5.168364,-5.26924 -6.569154,-8.44346 l -0.49623,-1.12448 h -2.87023 c -1.97121,0 -2.87024,0.0944 -2.87024,0.30147 0,0.43057 1.47343,2.76695 2.60716,4.13412 2.35223,2.83656 7.61793,5.74857 10.595564,5.85951 0.56836,0.0212 0.52671,-0.0552 -0.39687,-0.72716 z m 8.03494,0.37347 c 3.18248,-0.84719 6.87927,-3.15195 8.83123,-5.50582 1.13372,-1.36717 2.60715,-3.70355 2.60715,-4.13412 0,-0.20822 -0.92068,-0.29876 -2.97656,-0.29273 l -2.97657,0.009 -1.10778,2.30636 c -1.27253,2.64936 -3.14145,5.05872 -5.2672,6.79035 -1.61221,1.3133 -1.46174,1.45319 0.88973,0.82722 z m -5.49495,-5.04661 v -4.8948 h -3.968754 c -2.71819,0 -3.96875,0.092 -3.96875,0.29204 0,0.80418 2.18452,4.28343 3.70416,5.89957 1.368124,1.45499 3.805444,3.55555 4.167194,3.59142 0.0364,0.004 0.0661,-2.1961 0.0661,-4.88823 z m 5.15937,1.855 c 1.80981,-1.83861 3.13335,-3.76242 3.9611,-5.75761 l 0.41163,-0.99219 h -3.9723 -3.9723 v 4.91281 4.91281 l 0.85989,-0.59713 c 0.47294,-0.32843 1.69334,-1.44384 2.71198,-2.47869 z m -15.337294,-8.80032 c -0.0992,-0.25466 -0.3097,-1.50481 -0.46779,-2.77812 -0.27657,-2.22771 -0.0302,-6.130013 0.46779,-7.408343 0.16538,-0.42455 -0.0719,-0.46302 -2.85627,-0.46302 h -3.03663 l -0.36511,1.25677 c -0.21641,0.74491 -0.36512,2.49603 -0.36512,4.299483 0,1.80346 0.14871,3.55458 0.36512,4.29948 l 0.36511,1.25677 h 3.03663 c 2.78435,0 3.02165,-0.0385 2.85627,-0.46302 z m 10.177924,-5.09323 v -5.556253 h -4.346874 -4.34687 l -0.32567,1.52136 c -0.41827,1.95392 -0.41827,6.115873 0,8.069793 l 0.32567,1.52135 h 4.34687 4.346874 z m 10.36219,4.43177 c 0.42701,-1.46197 0.42701,-7.401563 0,-8.863543 l -0.32842,-1.12448 h -4.22314 -4.22313 v 5.556253 5.55625 h 4.22313 4.22314 z m 7.66123,-0.13229 c 0.21641,-0.7449 0.36512,-2.49602 0.36512,-4.29948 0,-1.803453 -0.14871,-3.554573 -0.36512,-4.299483 l -0.36511,-1.25677 h -3.03315 -3.03315 l 0.22326,1.38907 c 0.1228,0.76398 0.22327,2.63922 0.22327,4.167183 0,1.52797 -0.10047,3.40321 -0.22327,4.16719 l -0.22326,1.38906 h 3.03315 3.03315 z M 94.345136,92.009577 c 1.40079,-3.17422 4.10593,-6.6512 6.569154,-8.44346 1.19166,-0.86706 0.84372,-0.96209 -1.367474,-0.37346 -3.18248,0.84719 -6.87926,3.15195 -8.83122,5.50582 -1.13373,1.36716 -2.60716,3.70355 -2.60716,4.13412 0,0.20704 0.89903,0.30146 2.87024,0.30146 h 2.87023 z m 9.109144,-3.78302 v -4.9075 l -1.12839,0.77635 c -1.88197,1.29483 -4.751514,4.5327 -5.817124,6.5638 -0.5456,1.03993 -0.99199,2.02219 -0.99199,2.18282 0,0.20001 1.25056,0.29203 3.96875,0.29203 h 3.968754 z m 9.12047,3.91532 c -1.13224,-2.72914 -4.20629,-6.5233 -6.67308,-8.2363 l -0.85989,-0.59713 v 4.91281 4.9128 h 3.9723 3.9723 z m 7.81286,0.69072 c 0,-0.43057 -1.47343,-2.76696 -2.60715,-4.13412 -1.95196,-2.35387 -5.64875,-4.65863 -8.83123,-5.50582 -2.35147,-0.62597 -2.50194,-0.48608 -0.88973,0.82722 2.12575,1.73162 3.99467,4.14099 5.2672,6.79035 l 1.10778,2.30636 2.97657,0.009 c 2.05588,0.006 2.97656,-0.0845 2.97656,-0.29273 z" /></g></svg>
|
package/media/index.html
CHANGED
|
@@ -34,8 +34,55 @@
|
|
|
34
34
|
<script src="janusweb.js"></script>
|
|
35
35
|
</head>
|
|
36
36
|
<body>
|
|
37
|
-
<janus-viewer src="
|
|
37
|
+
<janus-viewer src="./index.html"></janus-viewer> <!-- project this document in 3D -->
|
|
38
38
|
</body>
|
|
39
39
|
</html>
|
|
40
40
|
|
|
41
|
+
<!--
|
|
41
42
|
|
|
43
|
+
<fireboxroom>
|
|
44
|
+
<assets></assets>
|
|
45
|
+
<room use_local_asset="room_plane" fwd="0 0 1">
|
|
46
|
+
<object js_id="links" rotation="0 180 0">
|
|
47
|
+
|
|
48
|
+
<link js_id="1" pos="3 0 10" xdir="-0.866027 0 0.499998" ydir="0 1 0" zdir="-0.499998 0 -0.866027" url="https://www.reddit.com/r/vrsites" col="#ffffff" scale="1.5 3 1" draw_glow="false" >
|
|
49
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
50
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
51
|
+
</paragraph>
|
|
52
|
+
</link>
|
|
53
|
+
|
|
54
|
+
<link js_id="3" pos="5 0 8.5" xdir="-0.707109 0 0.707105" ydir="0 1 0" zdir="-0.707105 0 -0.707109" url="https://vesta.janusxr.org" col="#ffffff" scale="1.5 3 1" draw_glow="false">
|
|
55
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
56
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
57
|
+
</paragraph>
|
|
58
|
+
</link>
|
|
59
|
+
|
|
60
|
+
<link js_id="2" pos="-3 0 10" xdir="-0.866024 0 -0.500002" ydir="0 1 0" zdir="0.500002 0 -0.866024" url="workspaces" col="#ffffff" scale="1.5 3 1" draw_glow="false">
|
|
61
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
62
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
63
|
+
</paragraph>
|
|
64
|
+
</link>
|
|
65
|
+
|
|
66
|
+
<link js_id="4" pos="-5 0 8.5" xdir="-0.707106 0 -0.707108" ydir="0 1 0" zdir="0.707108 0 -0.707106" url="bookmarks" col="#ffffff" scale="1.5 3 1" draw_glow="false">
|
|
67
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
68
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
69
|
+
</paragraph>
|
|
70
|
+
</link>
|
|
71
|
+
|
|
72
|
+
<link js_id="0" pos="0 0 10.8" xdir="-1 0 -0.000002" ydir="0 1 0" zdir="0.000002 0 -1" url="https://www.janusxr.org/newlobby/index.html" col="#ffffff" scale="1.5 3 1" draw_glow="false">
|
|
73
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
74
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
75
|
+
</paragraph>
|
|
76
|
+
</link>
|
|
77
|
+
|
|
78
|
+
<link js_id="5" pos="-6.51 0 6.5" rotation="-180 65 -180" url="https://xrforge.isvery.ninja" col="#ffffff" scale="1.5 3 1" draw_glow="false">
|
|
79
|
+
<paragraph js_id="p" width="300" height="700" pos="0 1.53 0.05" transparent="true" scale="0.7 1.68 1" lighting="false">
|
|
80
|
+
<![CDATA[ <img src="media/images/portal.svg" width="300" height="700"/> ]]>
|
|
81
|
+
</paragraph>
|
|
82
|
+
</link>
|
|
83
|
+
|
|
84
|
+
</object>
|
|
85
|
+
</room>
|
|
86
|
+
</fireboxroom>
|
|
87
|
+
|
|
88
|
+
-->
|
package/package.json
CHANGED
package/scripts/client.js
CHANGED
|
@@ -152,6 +152,30 @@ elation.require(['elements.elements', 'elements', 'engine.engine', 'engine.asset
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
+
this.initProxies()
|
|
156
|
+
}
|
|
157
|
+
initProxies() {
|
|
158
|
+
elation.engine.assets = new Proxy(elation.engine.assets,{
|
|
159
|
+
get(me,k){
|
|
160
|
+
if( k == "corsproxy" && me[k] ){
|
|
161
|
+
const p = elation.config.get("engine.assets.corsproxies")
|
|
162
|
+
if( ! p?.length ){
|
|
163
|
+
return me[k] // nothing to roundrobin
|
|
164
|
+
}else{ // roundrobin proxies
|
|
165
|
+
if( !p.index ) p.index = 0
|
|
166
|
+
const corsproxy = p[ p.index ]
|
|
167
|
+
elation.config.set("engine.assets.corsproxy", corsproxy )
|
|
168
|
+
p.index = (p.index + 1) % p.length
|
|
169
|
+
return corsproxy
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return me[k]
|
|
173
|
+
},
|
|
174
|
+
set(me,k,v){
|
|
175
|
+
me[k] = v
|
|
176
|
+
return true
|
|
177
|
+
}
|
|
178
|
+
})
|
|
155
179
|
}
|
|
156
180
|
initButtons() {
|
|
157
181
|
this.sharebutton = elation.ui.button({classname: 'janusweb_sharing', label: 'Share'});
|
package/scripts/config.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
elation.config.set('janusweb.network.host', 'wss://presence.janusxr.org:5567'); // Default presence server
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
proxies = [
|
|
4
|
+
'https://p.janusxr.org/',
|
|
5
|
+
'https://cors.xrforge.isvery.ninja/'
|
|
6
|
+
]
|
|
7
|
+
elation.config.set('engine.assets.corsproxy', proxies[0]); // CORS proxy URL
|
|
8
|
+
elation.config.set('engine.assets.corsproxies', [] ); // rotate **online** proxies only
|
|
9
|
+
proxies.map( (url) =>
|
|
10
|
+
fetch(url,{method:'HEAD'})
|
|
11
|
+
.then( (res) => res.ok && elation.config.get("engine.assets.corsproxies").push(url) )
|
|
12
|
+
)
|
|
13
|
+
|
|
3
14
|
elation.config.set('engine.assets.workers', 'auto'); // Number of workers to use for asset parsing
|
|
4
15
|
//elation.config.set('engine.assets.image.maxsize', 16384);
|
|
5
16
|
elation.config.set('engine.assets.image.anisotropy', 16);
|
package/scripts/janusbase.js
CHANGED
|
@@ -350,8 +350,10 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
|
|
|
350
350
|
room: ['property', 'room'],
|
|
351
351
|
parts: ['property', 'jsparts'],
|
|
352
352
|
js_id: ['property', 'js_id'],
|
|
353
|
+
jsid: ['property', 'js_id'],
|
|
353
354
|
pos: ['property', 'position'],
|
|
354
355
|
rotation: ['property', 'rotation'],
|
|
356
|
+
angular: ['property', 'angular'],
|
|
355
357
|
scale: ['property', 'scale'],
|
|
356
358
|
//rotation_order: ['property', 'rotation_order'],
|
|
357
359
|
col: ['property', 'color'],
|
|
@@ -377,6 +379,7 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
|
|
|
377
379
|
gazetime: ['property', 'gazetime'],
|
|
378
380
|
layers: ['property', 'layers'],
|
|
379
381
|
renderorder: ['property', 'renderorder'],
|
|
382
|
+
lighting: [ 'property', 'lighting' ],
|
|
380
383
|
|
|
381
384
|
pickable: [ 'property', 'pickable'],
|
|
382
385
|
collidable: [ 'property', 'collidable'],
|
|
@@ -674,15 +677,15 @@ elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], f
|
|
|
674
677
|
let object = args.object;
|
|
675
678
|
if (args.mesh_verts) {
|
|
676
679
|
let geo = new THREE.BufferGeometry();
|
|
677
|
-
geo.
|
|
680
|
+
geo.setAttribute( 'position', new THREE.Float32BufferAttribute( args.mesh_verts, 3 ) );
|
|
678
681
|
if (args.mesh_faces) {
|
|
679
682
|
geo.setIndex(args.mesh_faces);
|
|
680
683
|
}
|
|
681
684
|
if (args.mesh_normals) {
|
|
682
|
-
geo.
|
|
685
|
+
geo.setAttribute( 'normal', new THREE.Float32BufferAttribute( args.mesh_normals, 3 ) );
|
|
683
686
|
}
|
|
684
687
|
if (args.mesh_uvs) {
|
|
685
|
-
geo.
|
|
688
|
+
geo.setAttribute( 'uv', new THREE.Float32BufferAttribute( args.mesh_uvs, 2 ) );
|
|
686
689
|
}
|
|
687
690
|
object = new THREE.Mesh(geo, new THREE.MeshPhongMaterial());
|
|
688
691
|
}
|
|
@@ -1328,30 +1331,19 @@ console.log('its null', k, this[k], prop);
|
|
|
1328
1331
|
}
|
|
1329
1332
|
//if (this[k] !== prop.default && this[k] !== null && this[k] !== undefined) {
|
|
1330
1333
|
}
|
|
1331
|
-
|
|
1334
|
+
|
|
1335
|
+
if (!parent) parent = this.parent || room;
|
|
1336
|
+
|
|
1337
|
+
let clone = parent.createObject(this.tag, props);
|
|
1338
|
+
|
|
1332
1339
|
if (cloneChildren) {
|
|
1333
1340
|
let children = this.children;
|
|
1334
1341
|
props.children = [];
|
|
1335
1342
|
for (let i = 0; i < children.length; i++) {
|
|
1336
|
-
props.children.push(children[i].clone(true,
|
|
1343
|
+
props.children.push(children[i].clone(true, clone));
|
|
1337
1344
|
}
|
|
1338
1345
|
}
|
|
1339
|
-
|
|
1340
|
-
if (!parent) parent = this.parent || room;
|
|
1341
|
-
|
|
1342
|
-
return parent.createObject(this.tag, props);
|
|
1343
|
-
/*
|
|
1344
|
-
{
|
|
1345
|
-
pos: this.pos.clone(),
|
|
1346
|
-
rotation: this.rotation.clone(),
|
|
1347
|
-
scale: this.scale.clone(),
|
|
1348
|
-
color: this.color.clone(),
|
|
1349
|
-
lighting: this.lighting,
|
|
1350
|
-
id: this.id,
|
|
1351
|
-
js_id: this.js_id + '_copy',
|
|
1352
|
-
collision_id: this.collision_id,
|
|
1353
|
-
});
|
|
1354
|
-
*/
|
|
1346
|
+
return clone;
|
|
1355
1347
|
}
|
|
1356
1348
|
this.addControlContext = function(name, defs) {
|
|
1357
1349
|
let legacydefs = {};
|
|
@@ -1375,7 +1367,7 @@ console.log('clone', props);
|
|
|
1375
1367
|
}
|
|
1376
1368
|
}];
|
|
1377
1369
|
}
|
|
1378
|
-
return this.engine.systems.controls.addContext(name, legacydefs);
|
|
1370
|
+
return this.engine.systems.controls.addContext(name, legacydefs, this);
|
|
1379
1371
|
}
|
|
1380
1372
|
this.activateControlContext = function(name) {
|
|
1381
1373
|
this.engine.systems.controls.activateContext(name, this);
|
package/scripts/janusghost.js
CHANGED
|
@@ -313,7 +313,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
313
313
|
if (!animasset.loaded) {
|
|
314
314
|
let animationsLoaded = false;
|
|
315
315
|
elation.events.add(animasset, 'asset_load_complete', ev => {
|
|
316
|
-
if (!animationsLoaded) {
|
|
316
|
+
if (!animationsLoaded && animasset.animations) {
|
|
317
317
|
animationsLoaded = true;
|
|
318
318
|
if (this.body.animationmixer) {
|
|
319
319
|
this.cloneAnimations(animasset);
|
|
@@ -323,7 +323,7 @@ elation.require(['janusweb.janusbase', 'engine.things.leapmotion'], function() {
|
|
|
323
323
|
});
|
|
324
324
|
animasset.load();
|
|
325
325
|
} else {
|
|
326
|
-
if (this.body.animationmixer) {
|
|
326
|
+
if (this.body.animationmixer && animasset.animations) {
|
|
327
327
|
this.cloneAnimations(animasset);
|
|
328
328
|
}
|
|
329
329
|
//this.body.setAnimation('idle');
|