-- 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: 7d33b4b1ce8f4264651b6f9adee13c1999403b9d:
path_to:
revision_to:

git.thebackupbox.net

janusweb

git://git.thebackupbox.net/janusweb

commit 7d33b4b1ce8f4264651b6f9adee13c1999403b9d
Author: James Baicoianu <james_github@baicoianu.com>
Date:   Mon Jan 2 22:12:17 2017 -0800

    Added tests and assets

diff --git a/media/assets/github-identicon.png b/media/assets/github-identicon.png
new file mode 100644
index 0000000000000000000000000000000000000000..f172c26ad481ee63b2add980cf5bd24ccc1789ce
Binary files /dev/null and b/media/assets/github-identicon.png differ
diff --git a/media/assets/rooms/room1.jpg b/media/assets/rooms/room1.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..819d19053a655c87a7fe6642d77d5aa268933b85
Binary files /dev/null and b/media/assets/rooms/room1.jpg differ
diff --git a/media/assets/rooms/tile_d.png b/media/assets/rooms/tile_d.png
new file mode 100644
index 0000000000000000000000000000000000000000..ca52855e182cde34cf2e9a189a8777738dc054ec
Binary files /dev/null and b/media/assets/rooms/tile_d.png differ
diff --git a/media/assets/rooms/tile_g.png b/media/assets/rooms/tile_g.png
new file mode 100644
index 0000000000000000000000000000000000000000..63ad232a5d76e381792fe3ecd4c8db01b849b51b
Binary files /dev/null and b/media/assets/rooms/tile_g.png differ
diff --git a/media/assets/rooms/tile_n.png b/media/assets/rooms/tile_n.png
new file mode 100644
index 0000000000000000000000000000000000000000..89b87c856d267c48575cfe2e31922eebd17b72ab
Binary files /dev/null and b/media/assets/rooms/tile_n.png differ
diff --git a/media/assets/rooms/tile_s.png b/media/assets/rooms/tile_s.png
new file mode 100644
index 0000000000000000000000000000000000000000..32992e28eaa708b1973136dbdf06bd7e31366b78
Binary files /dev/null and b/media/assets/rooms/tile_s.png differ
diff --git a/media/tests/collisions.html b/media/tests/collisions.html
new file mode 100644
index 0000000000000000000000000000000000000000..0f11cce43bcdef2b1e21821cd543487a190ae747
--- /dev/null
+++ b/media/tests/collisions.html
@@ -0,0 +1,8 @@
+<FireBoxRoom>
+<Assets>
+<AssetScript src="collisions.js" />
+</Assets>
+<Room use_local_asset="room1" pos="0 0 0" xdir="1 0 0" ydir="0 1 0" zdir="0 0 1">
+</Room>
+</FireBoxRoom>
+
diff --git a/media/tests/collisions.js b/media/tests/collisions.js
new file mode 100644
index 0000000000000000000000000000000000000000..3ba4199b94396872d8cdbcc1f630e16f1028e824
--- /dev/null
+++ b/media/tests/collisions.js
@@ -0,0 +1,21 @@
+
+room.onClick = function()
+{
+  //rain 10 cubes from the top
+  for (var i=0; i<10; ++i) {
+    room.createObject("Object", {id:"cube", collision_id:"cube", pos:Vector(Math.random()*10-5, 16.0, Math.random()*10-5), vel:Vector(Math.random()*.1-.05, Math.random()*.1-.05, Math.random()*.1-.05), col:Vector(Math.random(), Math.random(), Math.random()), scale:Vector(Math.random(), Math.random(), Math.random()), collision_static:"false"});
+  }
+
+  //shoot a sphere from the face
+  var p = new Vector();
+  p.x = player.pos.x;
+  p.y = player.pos.y + 1.5;
+  p.z = player.pos.z;
+
+  var v = new Vector();
+  v.x = player.view_dir.x * 10.0;
+  v.y = player.view_dir.y * 10.0;
+  v.z = player.view_dir.z * 10.0;
+
+  room.createObject("Object", {id:"sphere", collision_id:"sphere", pos:p, vel:v, scale:Vector(0.5,0.5,0.5), col:Vector(Math.random(), Math.random(), Math.random()), collision_static:"false"});
+}
diff --git a/media/tests/ghosts.html b/media/tests/ghosts.html
new file mode 100644
index 0000000000000000000000000000000000000000..a9f349c443b0c941d7302dc45747492569dac1b1
--- /dev/null
+++ b/media/tests/ghosts.html
@@ -0,0 +1,153 @@
+<FireBoxRoom>
+  <Assets>
+    <AssetGhost id="Smack Johnson" src="http://www.thevrbar.com/ghosts/bar.txt" />
+    <AssetObject id="rikku_head" src="http://vrsites.com/avatars/chibiif/head_male.obj" mtl="http://vrsites.com/avatars/chibiif/mtls3/head_male7.mtl" />
+    <AssetObject id="rikku_body" src="http://vrsites.com/avatars/chibiif/body_male.obj" mtl="http://vrsites.com/avatars/chibiif/mtls3/body_male7.mtl" />
+
+
+<AssetImage id="wavey" src="http://www.janusvr.com/newlobby/PBR/water/Wavey_normal_map_by_ShnitzelKiller.gif" />
+
+<AssetObject id="ghost_square_9" src="https://gitlab.com/alusion/404A/raw/master/2/square_9.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_9.mtl" />
+<AssetObject id="ghost_square_10" src="https://gitlab.com/alusion/404A/raw/master/2/square_10.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_10.mtl" />
+<AssetObject id="ghost_square_11" src="https://gitlab.com/alusion/404A/raw/master/2/square_11.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_11.mtl" />
+<AssetObject id="ghost_square_12" src="https://gitlab.com/alusion/404A/raw/master/2/square_12.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_12.mtl" />
+<AssetObject id="ghost_square_13" src="https://gitlab.com/alusion/404A/raw/master/2/square_13.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_13.mtl" />
+<AssetObject id="ghost_square_14" src="https://gitlab.com/alusion/404A/raw/master/2/square_14.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_14.mtl" />
+<AssetObject id="ghost_square_15" src="https://gitlab.com/alusion/404A/raw/master/2/square_15.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_15.mtl" />
+<AssetObject id="ghost_square_16" src="https://gitlab.com/alusion/404A/raw/master/2/square_16.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_16.mtl" />
+<AssetObject id="ghost_square_17" src="https://gitlab.com/alusion/404A/raw/master/2/square_17.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_17.mtl" />
+<AssetObject id="ghost_square_18" src="https://gitlab.com/alusion/404A/raw/master/2/square_18.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_18.mtl" />
+<AssetObject id="ghost_square_19" src="https://gitlab.com/alusion/404A/raw/master/2/square_19.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_19.mtl" />
+<AssetObject id="ghost_meme_1" src="https://gitlab.com/alusion/404A/raw/master/1/meme_1.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_1.mtl" />
+<AssetObject id="ghost_meme_2" src="https://gitlab.com/alusion/404A/raw/master/1/meme_2.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_2.mtl" />
+<AssetObject id="ghost_meme_3" src="https://gitlab.com/alusion/404A/raw/master/1/meme_3.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_3.mtl" />
+<AssetObject id="ghost_meme_4" src="https://gitlab.com/alusion/404A/raw/master/1/meme_4.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_4.mtl" />
+<AssetObject id="ghost_meme_5" src="https://gitlab.com/alusion/404A/raw/master/1/meme_5.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_5.mtl" />
+<AssetObject id="ghost_meme_6" src="https://gitlab.com/alusion/404A/raw/master/1/meme_6.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_6.mtl" />
+<AssetObject id="gallery" src="https://ipfs.io/ipfs/Qmdo1vTZeYTVDHvE4ahfMwcD1SE4SX7E78Y5qhp4wUohSV/hollywood.obj.gz" mtl="https://ipfs.io/ipfs/Qmdo1vTZeYTVDHvE4ahfMwcD1SE4SX7E78Y5qhp4wUohSV/hollywood.mtl" />
+<AssetObject id="ghost_meme_7" src="https://gitlab.com/alusion/404A/raw/master/1/meme_7.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_7.mtl" />
+<AssetObject id="ghost_meme_8" src="https://gitlab.com/alusion/404A/raw/master/1/meme_8.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_8.mtl" />
+<AssetObject id="ghost_meme_10" src="https://gitlab.com/alusion/404A/raw/master/1/meme_10.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_10.mtl" />
+<AssetObject id="ghost_meme_9" src="https://gitlab.com/alusion/404A/raw/master/1/meme_9.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_9.mtl" />
+<AssetObject id="ghost_meme_11" src="https://gitlab.com/alusion/404A/raw/master/1/meme_11.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_11.mtl" />
+<AssetObject id="ghost_meme_12" src="https://gitlab.com/alusion/404A/raw/master/1/meme_12.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_12.mtl" />
+<AssetObject id="ghost_meme_13" src="https://gitlab.com/alusion/404A/raw/master/1/meme_13.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_13.mtl" />
+<AssetObject id="ghost_meme_14" src="https://gitlab.com/alusion/404A/raw/master/1/meme_14.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_14.mtl" />
+<AssetObject id="ghost_meme_15" src="https://gitlab.com/alusion/404A/raw/master/1/meme_15.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_15.mtl" />
+<AssetObject id="ghost_meme_16" src="https://gitlab.com/alusion/404A/raw/master/1/meme_16.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_16.mtl" />
+<AssetObject id="ghost_meme_17" src="https://gitlab.com/alusion/404A/raw/master/1/meme_17.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_17.mtl" />
+<AssetObject id="ghost_meme_18" src="https://gitlab.com/alusion/404A/raw/master/1/meme_18.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_18.mtl" />
+<AssetObject id="ghost_meme_19" src="https://gitlab.com/alusion/404A/raw/master/1/meme_19.obj" mtl="https://gitlab.com/alusion/404A/raw/master/1/meme_19.mtl" />
+<AssetObject id="ghost_tall_1" src="https://gitlab.com/alusion/404A/raw/master/3/tall_1.obj" mtl="https://gitlab.com/alusion/404A/raw/master/3/tall_1.mtl" />
+<AssetObject id="ghost_tall_2" src="https://gitlab.com/alusion/404A/raw/master/3/tall_2.obj" mtl="https://gitlab.com/alusion/404A/raw/master/3/tall_2.mtl" />
+<AssetObject id="ghost_square_1" src="https://gitlab.com/alusion/404A/raw/master/2/square_1.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_1.mtl" />
+<AssetObject id="ghost_tall_3" src="https://gitlab.com/alusion/404A/raw/master/3/tall_3.obj" mtl="https://gitlab.com/alusion/404A/raw/master/3/tall_3.mtl" />
+<AssetObject id="ghost_square_2" src="https://gitlab.com/alusion/404A/raw/master/2/square_2.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_2.mtl" />
+<AssetObject id="ghost_tall_4" src="https://gitlab.com/alusion/404A/raw/master/3/tall_4.obj" mtl="https://gitlab.com/alusion/404A/raw/master/3/tall_4.mtl" />
+<AssetObject id="ghost_square_3" src="https://gitlab.com/alusion/404A/raw/master/2/square_3.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_3.mtl" />
+<AssetObject id="ghost_square_4" src="https://gitlab.com/alusion/404A/raw/master/2/square_4.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_4.mtl" />
+<AssetObject id="ghost_square_5" src="https://gitlab.com/alusion/404A/raw/master/2/square_5.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_5.mtl" />
+<AssetObject id="ghost_square_6" src="https://gitlab.com/alusion/404A/raw/master/2/square_6.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_6.mtl" />
+<AssetObject id="ghost_square_7" src="https://gitlab.com/alusion/404A/raw/master/2/square_7.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_7.mtl" />
+<AssetObject id="ghost_square_8" src="https://gitlab.com/alusion/404A/raw/master/2/square_8.obj" mtl="https://gitlab.com/alusion/404A/raw/master/2/square_8.mtl" />
+<AssetImage id="black" src="https://ipfs.io/ipfs/Qmdo1vTZeYTVDHvE4ahfMwcD1SE4SX7E78Y5qhp4wUohSV/black.gif" tex_clamp="true" />
+<AssetImage id="particle24" src="https://ipfs.io/ipfs/Qmdo1vTZeYTVDHvE4ahfMwcD1SE4SX7E78Y5qhp4wUohSV/particle.png" />
+<AssetGhost id="tall_1" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_t_1.txt" />
+<AssetGhost id="tall_2" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_t_2.txt" />
+<AssetGhost id="tall_3" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_t_3.txt" />
+<AssetGhost id="tall_4" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_t_4.txt" />
+<AssetGhost id="square_10" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_10.txt" />
+<AssetGhost id="square_11" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_11.txt" />
+<AssetGhost id="square_12" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_12.txt" />
+<AssetGhost id="square_13" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_13.txt" />
+<AssetGhost id="meme_10" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_10.txt" />
+<AssetGhost id="square_14" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_14.txt" />
+<AssetGhost id="meme_11" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_11.txt" />
+<AssetGhost id="square_15" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_15.txt" />
+<AssetGhost id="meme_12" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_12.txt" />
+<AssetGhost id="square_16" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_16.txt" />
+<AssetGhost id="meme_13" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_13.txt" />
+<AssetGhost id="square_17" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_17.txt" />
+<AssetGhost id="meme_14" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_14.txt" />
+<AssetGhost id="square_18" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_18.txt" />
+<AssetGhost id="square_19" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_19.txt" />
+<AssetGhost id="meme_15" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_15.txt" />
+<AssetGhost id="meme_16" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_16.txt" />
+<AssetGhost id="meme_17" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_17.txt" />
+<AssetGhost id="meme_18" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_18.txt" />
+<AssetGhost id="meme_19" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_19.txt" />
+<AssetGhost id="square_1" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_1.txt" />
+<AssetGhost id="square_2" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_2.txt" />
+<AssetGhost id="square_3" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_3.txt" />
+<AssetGhost id="square_4" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_4.txt" />
+<AssetGhost id="square_5" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_5.txt" />
+<AssetGhost id="square_6" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_6.txt" />
+<AssetGhost id="square_7" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_7.txt" />
+<AssetGhost id="sonic" src="sonic.txt" />
+<AssetGhost id="square_8" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_8.txt" />
+<AssetGhost id="square_9" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_s_9.txt" />
+<AssetGhost id="meme_1" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_1.txt" />
+<AssetGhost id="meme_2" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_2.txt" />
+<AssetGhost id="meme_3" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_3.txt" />
+<AssetGhost id="meme_4" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_4.txt" />
+<AssetGhost id="meme_5" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_5.txt" />
+<AssetGhost id="meme_6" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_6.txt" />
+<AssetGhost id="meme_7" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_7.txt" />
+<AssetGhost id="meme_8" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_8.txt" />
+<AssetGhost id="meme_9" src="https://gitlab.com/alusion/404A/raw/master/ghosts/g_m_9.txt" />
+
+<AssetImage id="sky_left" src="http://janusvr.com/newlobby/images/skybox/pano_l.jpg" tex_compress="true" />
+<AssetImage id="sky_right" src="http://janusvr.com/newlobby/images/skybox/pano_r.jpg" tex_compress="true" />
+<AssetImage id="sky_front" src="http://janusvr.com/newlobby/images/skybox/pano_f.jpg" tex_compress="true" />
+<AssetImage id="sky_back" src="http://janusvr.com/newlobby/images/skybox/pano_b.jpg" tex_compress="true" />
+<AssetImage id="sky_up" src="http://janusvr.com/newlobby/images/skybox/pano_u.jpg" tex_compress="true" />
+
+  </Assets>
+  <Room use_local_asset="room_plane" skybox_down_id="sky_left" skybox_left_id="sky_left" skybox_right_id="sky_right" skybox_front_id="sky_front" skybox_back_id="sky_back" skybox_up_id="sky_up">
+    <Ghost id="Smack Johnson" js_id="14" pos="-10.384 -0.006 10.447" xdir="-0.405535 0 0.91408" ydir="0.353697 0.922104 0.156919" zdir="-0.842876 0.386943 -0.373945" scale="1.4 1.6 1.4" lighting="false" head_id="rikku_head" body_id="rikku_body" auto_play="true" />
+
+<Image id="wavey" pos="0 0 5" />
+
+<Ghost id="meme_1" js_id="2" pos="-9.25394 0.199 0.279165" xdir="-0.088896 0 -0.996041" ydir="0.125557 0.992023 -0.011206" zdir="0.988096 -0.126056 -0.088187" scale="0.8 0.8 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_1" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_2" js_id="3" pos="-6.92499 0.199 3.6055" xdir="-0.487861 0 -0.872922" ydir="0.23589 0.962795 -0.131835" zdir="0.840445 -0.270231 -0.46971" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_2" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_3" js_id="4" pos="-8.74621 0.199 2.35081" xdir="0.043621 0 -0.999048" ydir="-0.102145 0.99476 -0.00446" zdir="0.993813 0.102242 0.043393" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_3" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_4" js_id="5" pos="-8.20628 0.199 -4.94603" xdir="0.997684 0 -0.068016" ydir="0.001425 0.99978 0.020904" zdir="0.068001 -0.020952 0.997465" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_4" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_5" js_id="6" pos="-5.2794 0.199 -3.45712" xdir="0.17365 0 -0.984807" ydir="-0.056584 0.998348 -0.009977" zdir="0.983181 0.057457 0.173363" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_5" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_6" js_id="7" pos="-5.20422 0.199 -0.814924" xdir="-0.432085 0 0.901833" ydir="-0.098381 0.994032 -0.047136" zdir="-0.896451 -0.10909 -0.429506" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_6" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_7" js_id="8" pos="-14.2968 0.081168 4.59925" xdir="-0.964558 0 -0.263869" ydir="0.040826 0.987958 -0.149237" zdir="0.260692 -0.154721 -0.952943" scale="0.5 0.5 0.5" lighting="false" body_id="ghost_meme_7" anim_id="walk" eye_ipd="0.065" userid_pos="0 0.5 0" cull_face="none" />
+<Ghost id="meme_8" js_id="9" pos="-9.0087 0.199 1.09385" xdir="-0.489394 0 -0.872063" ydir="0.124608 0.989739 -0.069929" zdir="0.863114 -0.142889 -0.484372" scale="0.9 0.9 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_8" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_10" js_id="10" pos="-10.968996 0.199 -5.152064" xdir="0.735712 0 -0.677294" ydir="0.142147 0.977728 0.154408" zdir="0.66221 -0.209875 0.719327" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_10" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_11" js_id="11" pos="-10.4058 0.199 -1.79817" xdir="0.778252 0 -0.627953" ydir="0.008777 0.999902 0.010878" zdir="0.627891 -0.013978 0.778175" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_11" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_12" js_id="12" pos="-4.92489 0.199 2.84109" xdir="0.047866 0 -0.998854" ydir="0.035274 0.999376 0.00169" zdir="0.998231 -0.035314 0.047837" scale="0.5 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_12" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_13" js_id="13" pos="-8.047082 0.199 2.963739" xdir="-0.989239 0 -0.146308" ydir="0.051039 0.937179 -0.345094" zdir="0.137117 -0.348848 -0.927094" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_13" anim_id="walk_back" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_14" js_id="14" pos="-7.6552 0.199 5.80038" xdir="-0.854454 0 -0.519528" ydir="-0.003617 0.999976 0.005948" zdir="0.519515 0.006961 -0.854433" scale="0.7 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_14" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_16" js_id="15" pos="-9.10474 0.199 3.82793" xdir="-0.140096 0 -0.990138" ydir="0.20318 0.978719 -0.028748" zdir="0.969067 -0.205203 -0.137115" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_16" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="meme_17" js_id="16" pos="-20.8883 0.139772 -3.9113" xdir="0.317304 0 -0.948324" ydir="-0.08232 0.996225 -0.027544" zdir="0.944744 0.086806 0.316106" scale="6 6 6" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_17" anim_id="fly" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_18" js_id="17" pos="-5.52569 0.199 5.52474" xdir="-0.96126 0 0.275642" ydir="0.007687 0.999611 0.026808" zdir="-0.275535 0.027889 -0.960886" scale="0.7 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_18" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="meme_19" js_id="18" pos="-5.95394 0.199 -5.05708" xdir="0.818154 0 0.574999" ydir="-0.030065 0.998632 0.042779" zdir="-0.574212 -0.052288 0.817035" scale="0.7 0.5 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_meme_19" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_1" js_id="19" pos="0.831405 0.486659 -11.5626" xdir="0.861628 0 0.50754" ydir="-0.030048 0.998246 0.051012" zdir="-0.50665 -0.059204 0.860117" scale="0.8 0.8 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_1" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_2" js_id="20" pos="1.63239 0.198996 4.52706" xdir="-0.724172 0 0.689619" ydir="-0.093903 0.990686 -0.098608" zdir="-0.683196 -0.136166 -0.717427" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_2" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_3" js_id="21" pos="5.89059 0.199016 -16.3971" xdir="-0.993735 0 -0.111766" ydir="0.009749 0.996188 -0.086683" zdir="0.11134 -0.08723 -0.989947" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_3" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_4" js_id="22" pos="4.62561 0.382415 -3.11506" xdir="0.028334 0 -0.999599" ydir="0.089538 0.99598 0.002538" zdir="0.99558 -0.089574 0.02822" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_4" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_5" js_id="23" pos="-6.43343 0.468337 -7.61318" xdir="0.650773 0 -0.759272" ydir="0.167836 0.975263 0.143853" zdir="0.74049 -0.221049 0.634675" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_5" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_6" js_id="24" pos="1.98396 0.430481 -6.5561" xdir="0.599024 0 0.800731" ydir="-0.07365 0.995761 0.055097" zdir="-0.797337 -0.091978 0.596485" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_6" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_7" js_id="25" pos="5.07311 0.383175 -7.18429" xdir="0.053373 0 0.998575" ydir="-0.011385 0.999935 0.000609" zdir="-0.99851 -0.011401 0.053369" scale="0.5 0.5 0.5" lighting="false" body_id="ghost_square_7" anim_id="idle" eye_ipd="0.065" userid_pos="0 0.5 0" loop="true" cull_face="none" />
+<Ghost id="square_8" js_id="26" pos="0.374996 0.198993 7.48048" xdir="-0.919818 0 -0.392345" ydir="0.056713 0.989497 -0.13296" zdir="0.388224 -0.14455 -0.910158" scale="0.9 0.9 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_8" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_10" js_id="27" pos="-13.5926 6.68404 -22.7388" xdir="0.411332 0 -0.911486" ydir="-0.006496 0.999975 -0.002932" zdir="0.911463 0.007127 0.411321" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_10" anim_id="fly" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_11" js_id="28" pos="-5.60565 0.426972 -9.91452" xdir="0.516541 0 -0.856262" ydir="0.298099 0.937443 0.179829" zdir="0.802697 -0.34814 0.484228" scale="0.7 0.7 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_11" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_12" js_id="29" pos="-2.51059 0.409974 -11.8551" xdir="-0.999566 0 0.029463" ydir="-0.002221 0.997155 -0.075345" zdir="-0.029379 -0.075378 -0.996722" scale="0.5 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_12" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_13" js_id="30" pos="2.578884 0.425525 -10.34707" xdir="0.528431 0 0.848976" ydir="-0.182311 0.976671 0.113476" zdir="-0.829171 -0.214742 0.516103" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_13" anim_id="walk" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_14" js_id="31" pos="-2.14487 0.28904 1.56811" xdir="0.941468 0 0.337104" ydir="-0.061539 0.983196 0.171868" zdir="-0.331439 -0.182553 0.925647" scale="0.7 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_14" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_16" js_id="32" pos="-1.67382 0.443983 -7.62133" xdir="0.995601 0 0.093694" ydir="-0.004532 0.99883 0.048156" zdir="-0.093584 -0.048368 0.994436" scale="0.6 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_16" anim_id="idle" userid_pos="0 0.3 0" loop="true" auto_play="true" cull_face="none" />
+<Ghost id="square_17" js_id="33" pos="6.86532 0.335066 -4.8066" xdir="-0.177102 0 0.984193" ydir="-0.161903 0.986377 -0.029134" zdir="-0.970784 -0.164503 -0.174689" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_17" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_18" js_id="34" pos="11.9168 4.24603 9.28465" xdir="-0.299058 0 0.954235" ydir="-0.203383 0.977022 -0.06374" zdir="-0.932309 -0.213137 -0.292186" scale="0.7 0.6 1" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_18" anim_id="fly" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="square_19" js_id="35" pos="0.381205 0.45032 -3.31567" xdir="0.977048 0 -0.21302" ydir="0.048761 0.973449 0.223651" zdir="0.207364 -0.228905 0.951106" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_square_19" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="tall_1" js_id="36" pos="5.10184 0.367604 3.45168" xdir="-0.289026 0 0.957321" ydir="-0.097892 0.994758 -0.029555" zdir="-0.952303 -0.102256 -0.287511" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_tall_1" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="tall_2" js_id="37" pos="-8.06138 0.433211 -10.6534" xdir="0.642783 0 -0.766048" ydir="0.070462 0.995761 0.059124" zdir="0.762801 -0.091981 0.640058" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_tall_2" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="tall_3" js_id="38" pos="-9.77844 0.422884 -7.9997" xdir="0.756991 0 -0.653425" ydir="0.038686 0.998246 0.044817" zdir="0.652279 -0.059205 0.755663" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_tall_3" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+<Ghost id="tall_4" js_id="39" pos="2.10075 0.332017 -0.671791" xdir="0.245314 0 0.969444" ydir="-0.149834 0.987984 0.037915" zdir="-0.957795 -0.154557 0.242366" lighting="false" shader_id="room_shader" head_pos="0 0 0" body_id="ghost_tall_4" anim_id="idle" userid_pos="0 0.3 0" auto_play="true" cull_face="none" />
+  </Room>
+</FireBoxRoom>
+
+
+
diff --git a/media/tests/imageid.html b/media/tests/imageid.html
new file mode 100644
index 0000000000000000000000000000000000000000..e441f033e5fdc4e51b7c5079dcdc50a5e09ac1a9
--- /dev/null
+++ b/media/tests/imageid.html
@@ -0,0 +1,13 @@
+<FireBoxRoom>
+  <Assets>
+    <AssetImage id="image01" src="http://i.imgur.com/fQNpfqE.jpg" />
+    <AssetImage id="image02" src="http://i.imgur.com/othVumj.png" />
+    <AssetImage id="image03" src="http://i.imgur.com/FDBINBk.jpg" />
+  </Assets>
+  <Room use_local_asset="room1">
+    <Object id="plane" image_id="image01" pos="-2 1 1"/>
+    <Object id="plane" image_id="image02" pos="0 1 1"/>
+    <Object id="plane" image_id="image03" pos="2 1 1"/>
+  </Room>
+</FireBoxRoom>
+
diff --git a/media/tests/images/water2.png b/media/tests/images/water2.png
new file mode 100644
index 0000000000000000000000000000000000000000..69e8bd453fb19367eaaef96a0e44fe1c6a8fd680
Binary files /dev/null and b/media/tests/images/water2.png differ
diff --git a/media/tests/keyboard.html b/media/tests/keyboard.html
new file mode 100644
index 0000000000000000000000000000000000000000..97e72b99e08ad559d5d4a2f23c63409462208b9e
--- /dev/null
+++ b/media/tests/keyboard.html
@@ -0,0 +1,8 @@
+<FireBoxRoom>
+  <Assets>
+    <AssetScript src="keyboard.js" />
+  </Assets>
+  <Room use_local_asset="room1">
+    <Text js_id="keystatus" pos="0 1.5 5" scale="2 2 2" zdir="0 0 -1">Hello</Text>
+  </Room>
+</FireBoxRoom>
diff --git a/media/tests/keyboard.js b/media/tests/keyboard.js
new file mode 100644
index 0000000000000000000000000000000000000000..ebbb7067455d5ea8835c3a97fb4b74e45640975d
--- /dev/null
+++ b/media/tests/keyboard.js
@@ -0,0 +1,8 @@
+room.onKeyDown = function(ev) {
+  console.log('key down!', ev);
+  room.objects['keystatus'].text = 'Pressed: ' + ev.keyCode;
+}
+room.onKeyUp = function(ev) {
+  console.log('key up!', ev);
+  room.objects['keystatus'].text = 'Released: ' + ev.keyCode;
+}
diff --git a/media/tests/lights.html b/media/tests/lights.html
new file mode 100644
index 0000000000000000000000000000000000000000..108c833af23d5709343a0da38d45e0bb46aec8de
--- /dev/null
+++ b/media/tests/lights.html
@@ -0,0 +1,11 @@
+<FireBoxRoom>
+  <Assets>
+  </Assets>
+  <Room use_local_asset="room1">
+    <Light js_id="14" pos="0 7.5 0" xdir="1 0 0" ydir="0 1 0" zdir="0 0 1" col="#aaffaa" light_intensity="100" light_cone_angle="0.8" light_cone_exponent="20" light_range="12" />
+
+    <Light js_id="15" pos="0 8 6.7" ydir="0 0.707107 0.707107" zdir="0 -0.707107 0.707107" col="#aaffaa" rotate_axis="0 -0.05 1" rotate_deg_per_sec="15" light_intensity="500" light_cone_angle="0.925" light_cone_exponent="125" light_range="70">
+
+  </Room>
+</FireBoxRoom>
+
diff --git a/media/tests/models/gltf.html b/media/tests/models/gltf.html
new file mode 100644
index 0000000000000000000000000000000000000000..a75b857a0650cdca08a310f005e61cd53cd9e8c6
--- /dev/null
+++ b/media/tests/models/gltf.html
@@ -0,0 +1,19 @@
+<fireboxroom>
+  <assets>
+    <AssetObject id="gltf_monster" src="https://threejs.org/examples/models/gltf/monster/glTF-MaterialsCommon/monster.gltf" />
+    <AssetObject id="gltf_duck" src="https://threejs.org/examples/models/gltf/duck/glTF-MaterialsCommon/duck.gltf" />
+    <AssetObject id="gltf_guy" src="https://threejs.org/examples/models/gltf/CesiumMan/glTF-MaterialsCommon/Cesium_Man.gltf" />
+    <AssetObject id="gltf_truck" src="https://threejs.org/examples/models/gltf/CesiumMilkTruck/glTF-MaterialsCommon/CesiumMilkTruck.gltf" />
+
+  </assets>
+  <room use_local_asset="room1">
+
+    <object id="gltf_monster" pos="5 1 0" scale=".1 .1 .1"/>
+    <object id="gltf_duck" pos="0 1 -5" />
+    <object id="gltf_guy" pos="-5 1 0" />
+    <object id="gltf_truck" pos="0 1 5" />
+    <object id="avatar_test" pos="0 1 1" />
+
+  </room>
+</fireboxroom>
+
diff --git a/media/tests/particles2.html b/media/tests/particles2.html
new file mode 100644
index 0000000000000000000000000000000000000000..d08a1421bbc4da73c428c4f66e98dac6f5023967
--- /dev/null
+++ b/media/tests/particles2.html
@@ -0,0 +1,25 @@
+<FireBoxRoom>
+  <Assets>
+    <AssetImage id="water_particle" src="images/water2.png" />
+    <AssetImage id="water_particle2" src="http://www.janusvr.com/newlobby/images/water3.png" tex_compress="true" />
+    <AssetImage id="particle24" src="http://www.janusvr.com/home2/sparkle.png" />
+
+    <AssetObject id="monkey" src="models/monkey-nomaterial-smooth.obj" />
+  </Assets>
+  <Room>
+    <!-- Particle pos="0 1 5" count="5" rand_pos="1 1 1" col="1 0 0" loop="true" / -->
+
+<!--
+<Particle pos="-.11 4.09 -.88" scale=".111 .11 .11" vel="-.5 0 -1.2" accel="0 -9.8 0" rate="100" count="200" lighting="false" image_id="water_particle" duration="1" fade_in="0.1" fade_out="0.1" loop="true" rand_pos=".25 0.1 0" rand_vel="1 0 -.5" rand_accel="0 0.5 0" col="0.8 0.8 1 0.5" rand_col="0 0 0.3" blend_src="src_alpha" blend_dest="one" />
+<Particle pos="-.11 4.09 .9" scale=".11 .08 .08" vel="-.5 0 1.2" accel="0 -9.8 0" rate="100" count="200" lighting="false" image_id="water_particle" duration="1" fade_in="0.1" fade_out="0.1" loop="true" rand_pos=".25 0.1 0" rand_vel="1 0 .5" rand_accel="0 0.5 0" col="0.8 0.8 1 0.5" rand_col="0 0 0.3" blend_src="src_alpha" blend_dest="one" />
+<Particle pos="-.11 4.09 -.91" scale=".111 .11 .11" vel="-.5 0 -1.2" accel="0 -9.8 0" rate="100" count="200" lighting="false" image_id="water_particle2" duration="1" fade_in="0.2" fade_out="0.2" loop="true" rand_pos=".25 0.1 0" rand_vel="1 0 -.5" rand_accel="0 0.5 0" col="0.8 0.8 1 0.5" rand_col="0 0 0.3" blend_src="src_alpha" blend_dest="one" />
+<Particle pos="-.11 4.09 .92" scale=".11 .09 .09" vel="-.5 0 1.2" accel="0 -9.8 0" rate="100" count="200" lighting="false" image_id="water_particle2" duration="1" fade_in="0.2" fade_out="0.2" loop="true" rand_pos=".25 0.1 0" rand_vel="1 0 .5" rand_accel="0 0.5 0" col="0.8 0.8 1 0.5" rand_col="0 0 0.3" blend_src="src_alpha" blend_dest="one" />
+-->
+<Particle pos="0 0 5" scale=".05 .05 .05" vel="0 0 0" accel="0 0 0" rate="10000" count="20000" lighting="false" emitter_id="monkey" duration="2" fade_in="0.2" fade_out="0.2" loop="true" rand_pos=".3 .3 .3" rand_vel=".2 .2 .2" rand_accel=".1 .1 .1" col="1 0.2 0.2 0.5" rand_col="0 0 0" blend_src="src_alpha" blend_dest="one" image_id="particle24" />
+
+<Particle pos="4 0 5" scale=".1 .1 .1" vel="0 0 0" accel="0 0 0" rate="2904" count="2904" lighting="false" emitter_id="monkey" duration="0" fade_in="0.2" fade_out="0.2" loop="true" col="0.0 0.0 1.0 1.0" rand_col="0 0 0" blend_src="src_alpha" blend_dest="one" image_id="particle24" />
+
+
+  </Room>
+</FireBoxRoom>
+
diff --git a/media/tests/photospheres.html b/media/tests/photospheres.html
new file mode 100644
index 0000000000000000000000000000000000000000..6bed3f0a8428dc87b66bd83439fd2c47b5acef05
--- /dev/null
+++ b/media/tests/photospheres.html
@@ -0,0 +1,24 @@
+<FireBoxRoom>
+<Assets>
+
+#Sphere
+<aAssetObject id="sphere" src="http://www.thevrdudes.com/VRexperts/oculusV2/sphere.obj" />
+
+#Images
+<AssetImage id="image1" src="http://www.thevrbar.com/gallery/nuke/1.jpg" tex_clamp="true" />
+<AssetImage id="image2" src="http://www.thevrbar.com/gallery/nuke/2.jpg" tex_clamp="true" />
+<AssetImage id="image3" src="http://www.thevrbar.com/gallery/nuke/3.jpg" tex_clamp="true" />
+
+<AssetVideo id="video1" src="http://meobets.com/~bai/360vid.mp4" tex_clamp="true" />
+
+</Assets>
+
+<Room visible="false" pos="0 0 0" xdir="1 0 0" ydir="0 1 0" zdir="0 0 1">
+
+#Put images in the scene on spheres
+<Object id="sphere" lighting="false" image_id="image1" pos="0 -4 0" xdir="0 0 -1" ydir="-0 1 0" zdir="1 0 0" scale="10 10 10" cull_face="front" />
+<Object id="sphere" lighting="false" image_id="image2" pos="20 -4 0" xdir="0 0 -1" ydir="-0 1 0" zdir="1 0 0" scale="10 10 10" cull_face="front" />
+<aObject id="sphere" lighting="false" image_id="image3" pos="40 -4 0" xdir="0 0 -1" ydir="-0 1 0" zdir="1 0 0" scale="10 10 10" cull_face="front" />
+
+</Room>
+</FireBoxRoom>
diff --git a/media/tests/portal.html b/media/tests/portal.html
new file mode 100644
index 0000000000000000000000000000000000000000..3398bda4262583572c0aba385af89c560ac119db
--- /dev/null
+++ b/media/tests/portal.html
@@ -0,0 +1,9 @@
+<FireBoxRoom>
+  <Assets>
+  </Assets>
+  <Room use_local_asset="room1">
+    <Link url="http://www.janusvr.com/index.html" scale="2.5 2.5 1" pos="0 0 5" zdir="0 0 -1" auto_load="true" />
+    <Link url="http://www.janusvr.com/" scale="2.5 2.5 1" pos="2 0 4" zdir="0 0 -1" pdir="-0.7071 0 -0.7071" auto_load="true" />
+  </Room>
+</FireBoxRoom>
+
diff --git a/media/tests/scripts.html b/media/tests/scripts.html
new file mode 100644
index 0000000000000000000000000000000000000000..cd9127795aec73c2c9da423f57b2406d17686e39
--- /dev/null
+++ b/media/tests/scripts.html
@@ -0,0 +1,8 @@
+<fireboxroom>
+  <assets>
+    <aassetscript src="https://dl.dropboxusercontent.com/u/79926041/inventory/sudoku.js" />
+    <AssetScript src="scripttest.js" />
+  </assets>
+  <room use_local_asset="room_plane">
+  </room>
+</fireboxroom>
diff --git a/media/tests/scripts2.html b/media/tests/scripts2.html
new file mode 100644
index 0000000000000000000000000000000000000000..461e2617e050ac5f0e439f91fbed2aa88e729d3c
--- /dev/null
+++ b/media/tests/scripts2.html
@@ -0,0 +1,9 @@
+<fireboxroom>
+  <assets>
+    <assetscript src="scripttest2.js" />
+  </assets>
+  <room>
+    <link url="scripts.html" pos="0,0,5" />
+  </room>
+</fireboxroom>
+
diff --git a/media/tests/scripttest.js b/media/tests/scripttest.js
new file mode 100644
index 0000000000000000000000000000000000000000..7524f862117be15f76fb4a7cc5e063b0155e9267
--- /dev/null
+++ b/media/tests/scripttest.js
@@ -0,0 +1,94 @@
+print('this is the test script!');
+//print('the room url is', janus.currenturl());
+room.poop = 1;
+var selectedObject = false, selectedColor = [1,1,1];
+
+room.onLoad = function() {
+  print('the room loaded!: ' + uniqueId());
+debugger;
+  room.createObject('object', {js_id: 'box', id: 'cube', pos: Vector(0, 1, 7), scale: Vector(2, 2, 0.1), col: Vector(1, 0, 0)});
+  room.createObject('text', {js_id: 'mytext', text: 'whazzup', pos: Vector(0, 1, 5), fwd: Vector(1,0,0), zdir: Vector(1,0,0), col: '#ff00ff'});
+}
+room.update = function() {
+console.log('do shit in room 1');
+  if (player.pos.x > 10) player.pos.x = 10;
+  if (player.pos.x < -10) player.pos.x = -10;
+  if (player.pos.z > 10) player.pos.z = 10;
+  if (player.pos.z < -10) player.pos.z = -10;
+
+  var obj = room.objects[player.cursor_object];
+/*
+  if (obj && obj !== selectedObject) {
+    selectedColor = Vector(obj.col.x, obj.col.y, obj.col.z);
+    selectedObject = obj;
+    obj.col = Vector(0,0,1);
+  } else if (selectedObject) {
+    selectedObject.col = selectedColor;
+    selectedObject = false;
+    selectedColor = false;
+  }
+*/
+}
+room.onKeyDown = function(ev) {
+  //print('KEY ME: "' + ev.keyCode + '"');
+  if (ev.keyCode == 'I') {
+    room.objects['mytext'].vel.y = 0.5;
+  }
+  if (ev.keyCode == 'K') {
+    room.objects['mytext'].vel.y = -0.5;
+  }
+  if (ev.keyCode == 'J') {
+    room.objects['mytext'].vel.x = -0.5;
+  }
+  if (ev.keyCode == 'L') {
+    room.objects['mytext'].vel.x = 0.5;
+  }
+  if (ev.keyCode == 'U') {
+    room.objects['mytext'].vel.z = -0.5;
+  }
+  if (ev.keyCode == 'O') {
+    room.objects['mytext'].vel.z = 0.5;
+  }
+  //print('test');
+}
+room.onKeyUp = function(ev) {
+  if (ev.keyCode == 'I') {
+    room.objects['mytext'].vel.y = 0;
+  }
+  if (ev.keyCode == 'K') {
+    room.objects['mytext'].vel.y = 0;
+  }
+  if (ev.keyCode == 'J') {
+    room.objects['mytext'].vel.x = 0;
+  }
+  if (ev.keyCode == 'L') {
+    room.objects['mytext'].vel.x = 0;
+  }
+  if (ev.keyCode == 'U') {
+    room.objects['mytext'].vel.z = 0;
+  }
+  if (ev.keyCode == 'O') {
+    room.objects['mytext'].vel.z = 0;
+  }
+}
+room.onMouseDown = function(ev) {
+  //print('MOUSE DOWN', player.cursor_object);
+  var obj = room.objects[player.cursor_object];
+  if (obj) {
+    selectedColor = Vector(obj.col.r, obj.col.g, obj.col.b);
+    selectedObject = obj;
+    obj.col = Vector(0,1,0);
+  }
+}
+room.onMouseUp = function(ev) {
+  //print('MOUSE UP', ev);
+  if (selectedObject && selectedColor) {
+    selectedObject.col = selectedColor;
+print('set color!', selectedColor);
+    selectedObject = false;
+    selectedColor = false;
+  }
+}
+room.onClick = function(ev) {
+  //print('CLICK', ev);
+}
diff --git a/media/tests/scripttest2.js b/media/tests/scripttest2.js
new file mode 100644
index 0000000000000000000000000000000000000000..e042e294112b472f3a2c030cc1ff27a3f868bf3f
--- /dev/null
+++ b/media/tests/scripttest2.js
@@ -0,0 +1,3 @@
+room.update = function() {
+  console.log('do shit in room 2', room.objects);
+}
diff --git a/media/tests/settimeout.html b/media/tests/settimeout.html
new file mode 100644
index 0000000000000000000000000000000000000000..5b39602a66f1ea5aa3f3879d29fc02867491539c
--- /dev/null
+++ b/media/tests/settimeout.html
@@ -0,0 +1,12 @@
+<FireBoxRoom>
+  <Assets>
+   <AssetSound id="bonk" src="sounds/bonk.wav" />
+   <AssetSound id="bloop" src="sounds/bloop.wav" />
+   <AssetScript src="settimeout.js" />
+  </Assets>
+  <Room use_local_asset="room_plane">
+    <Link pos="2 0 2" url="settimeout2.html" />
+  </Room>
+</FireBoxRoom>
+
+
diff --git a/media/tests/settimeout.js b/media/tests/settimeout.js
new file mode 100644
index 0000000000000000000000000000000000000000..ee62ecd53a6f55652c18ef4fd571770258126de1
--- /dev/null
+++ b/media/tests/settimeout.js
@@ -0,0 +1,43 @@
+var num = 0;
+var rowsize = 24;
+var conetimer = false;
+var cubetimer = false;
+
+room.onLoad = function() {
+  spawnSpheres();
+
+  conetimer = setInterval(function() {
+    room.playSound('bloop');
+    spawnSingleObject('cone');
+  }, 5000);
+}
+
+room.onMouseDown = function() {
+  spawnSingleObject('cube');
+  if (cubetimer) {
+    clearInterval(cubetimer);
+  }
+  cubetimer = setInterval(function() {
+    spawnSingleObject('cube');
+  }, 100);
+}
+room.onMouseUp = function() {
+  //spawnSingleObject('cylinder');
+  if (cubetimer) {
+    clearInterval(cubetimer);
+  }
+}
+
+room.update = function() {
+}
+
+function spawnSingleObject(type) {
+  var pos = num++ * 2;
+  room.createObject('Object', {id: type, js_id: 'thing_' + num, pos: Vector(pos % rowsize, Math.floor(pos / rowsize), 5), color: '1 0 0'});
+}
+
+function spawnSpheres() {
+  room.playSound('bonk');
+  spawnSingleObject('sphere');
+  setTimeout(spawnSpheres, 1000);
+}
diff --git a/media/tests/settimeout2.html b/media/tests/settimeout2.html
new file mode 100644
index 0000000000000000000000000000000000000000..89e9175450dfde2bfab64aa7ef3aff49cbb6ecd9
--- /dev/null
+++ b/media/tests/settimeout2.html
@@ -0,0 +1,13 @@
+<fireboxroom>
+  <Assets>
+   <AssetSound id="bonk" src="sounds/bonk.wav" />
+   <AssetSound id="bloop" src="sounds/bloop.wav" />
+   <AssetScript src="settimeout2.js" />
+  </Assets>
+  <Room use_local_asset="room_plane">
+    <Link pos="2 0 2" url="settimeout.html" />
+  </Room>
+</fireboxroom>
+
+
+
diff --git a/media/tests/settimeout2.js b/media/tests/settimeout2.js
new file mode 100644
index 0000000000000000000000000000000000000000..73c29980443d37bfb265812c33568f0c30543c1a
--- /dev/null
+++ b/media/tests/settimeout2.js
@@ -0,0 +1,33 @@
+var cubetimer = false;
+var num = 0,
+    rowsize = 20;
+
+room.onLoad = function() {
+  setInterval(function() {
+    room.playSound('bloop');
+    spawnSingleObject('sphere');
+  }, 2000);
+}
+room.update = function() {
+}
+
+room.onMouseDown = function() {
+  spawnSingleObject('cube');
+  if (cubetimer) {
+    clearInterval(cubetimer);
+  }
+  cubetimer = setInterval(function() {
+    spawnSingleObject('cube');
+  }, 100);
+}
+room.onMouseUp = function() {
+  //spawnSingleObject('cylinder');
+  if (cubetimer) {
+    clearInterval(cubetimer);
+  }
+}
+
+function spawnSingleObject(type) {
+  var pos = num++ * 2;
+  room.createObject('Object', {id: type, js_id: 'thing_' + num, pos: Vector(pos % rowsize, Math.floor(pos / rowsize), 5), color: '1 0 0'});
+}
diff --git a/media/tests/sounds/bloop.wav b/media/tests/sounds/bloop.wav
new file mode 100644
index 0000000000000000000000000000000000000000..1d76ff3e211e90e52b87214d7114cd3efde9edff
Binary files /dev/null and b/media/tests/sounds/bloop.wav differ
diff --git a/media/tests/sounds/bonk.wav b/media/tests/sounds/bonk.wav
new file mode 100644
index 0000000000000000000000000000000000000000..5bf7d517c38c30f6cb8afbd4cb4fec44f2ed8745
Binary files /dev/null and b/media/tests/sounds/bonk.wav differ
diff --git a/media/tests/textures.html b/media/tests/textures.html
new file mode 100644
index 0000000000000000000000000000000000000000..8848344e44e6aeffdb6f1dc7a910bfa27bde69fc
--- /dev/null
+++ b/media/tests/textures.html
@@ -0,0 +1,27 @@
+<fireboxroom>
+  <assets>
+    <assetobject id="monkey-nomaterial-flat-obj" src="models/monkey-nomaterial-flat.obj" />
+    <assetobject id="monkey-nomaterial-flat-dae" src="models/monkey-nomaterial-flat.dae" />
+    <assetobject id="monkey-nomaterial-flat-fbx" src="models/monkey-nomaterial-flat.fbx" />
+    <assetobject id="monkey-nomaterial-smooth-obj" src="models/monkey-nomaterial-smooth.obj" />
+    <assetobject id="monkey-nomaterial-smooth-dae" src="models/monkey-nomaterial-smooth.dae" />
+    <assetobject id="monkey-nomaterial-smooth-fbx" src="models/monkey-nomaterial-smooth.fbx" />
+    <assetobject id="monkey-material-flat-obj" src="models/monkey-material-flat.obj" mtl="models/monkey-material-flat.mtl" />
+    <assetobject id="monkey-material-flat-dae" src="models/monkey-material-flat.dae" />
+    <assetobject id="monkey-material-flat-fbx" src="models/monkey-material-flat.fbx" />
+    <assetobject id="monkey-material-flat-ascii-fbx" src="models/monkey-material-flat-ascii.fbx" />
+    <assetobject id="monkey-material-smooth-obj" src="models/monkey-material-smooth.obj" />
+    <assetobject id="monkey-material-smooth-dae" src="models/monkey-material-smooth.dae" />
+    <assetobject id="monkey-material-smooth-fbx" src="models/monkey-material-smooth.fbx" />
+
+    <assetimage id="texture-diffuse" src="models/metal07-diffuse.png" />
+    <assetimage id="texture-normal" src="models/metal07-normal.png" />
+    <assetimage id="texture-specular" src="models/metal07-specular.png" />
+  </assets>
+  <room>
+
+    <object id="monkey-material-flat-obj" pos="-8 1 0" />
+    <aobject id="monkey-material-flat-dae" pos="-6 1 0" />
+
+  </room>
+</fireboxroom>
diff --git a/media/tests/vivecrash.html b/media/tests/vivecrash.html
new file mode 100644
index 0000000000000000000000000000000000000000..9aa39e7c8509616244f6f1fea927a424c93c56db
--- /dev/null
+++ b/media/tests/vivecrash.html
@@ -0,0 +1,10 @@
+<FireBoxRoom>
+  <Assets>
+   <AssetScript src="vivecrash.js" />
+  </Assets>
+  <Room use_local_asset="room_plane">
+  </Room>
+</FireBoxRoom>
+
+
+
diff --git a/media/tests/vivecrash.js b/media/tests/vivecrash.js
new file mode 100644
index 0000000000000000000000000000000000000000..8be80862c14f8713d802ae1d72b3ba0ecbb977f2
--- /dev/null
+++ b/media/tests/vivecrash.js
@@ -0,0 +1,73 @@
+var cube, sphere;
+
+var label1, label2, label3, hud;
+var axis;
+
+room.onLoad = function() {
+  cube = room.createObject('Object', {
+    id: 'cube',
+    js_id: 'wtfd00d',
+    pos: Vector(1,0,5),
+    scale: Vector(0.1,0.1,0.1),
+    col: Vector(1,0,0)
+  });
+  sphere = room.createObject('Object', {
+    id: 'sphere',
+    js_id: 'wtfd00d2',
+    pos: Vector(-1,0,5),
+    scale: Vector(0.1,0.1,0.1),
+    col: Vector(1,0,0)
+  });
+
+  axis = room.createObject('Object', {
+    id: 'cylinder',
+    js_id: 'axisdir',
+    scale: V(.1,1,.1),
+    pos: V(0,0,0)
+  });
+  hud = room.createObject('Text', {
+    js_id: 'hud',
+    scale: V(1,1,1),
+    pos: V(0,1,0)
+  });
+
+  label1 = room.createObject('Text', {
+    js_id: 'label1',
+    pos: V(0.5,0.1,0)
+  });
+  label2 = room.createObject('Text', {
+    js_id: 'label2',
+    pos: V(0.5,0.05,0)
+  });
+  label3 = room.createObject('Text', {
+    js_id: 'label3',
+    pos: V(0.5,0,0)
+  });
+
+  hud.appendChild(label1);
+  hud.appendChild(label2);
+  hud.appendChild(label3);
+}
+
+room.update = function() {
+  label1.text = 'Player: ' + player.pos.x + ', ' + player.pos.y + ', ' + player.pos.z;
+  label2.text = 'Head  : ' + player.head_pos.x + ', ' + player.head_pos.y + ', ' + player.head_pos.z;
+  label3.text = 'Hand  : ' + player.hand0_pos.x + ', ' + player.hand0_pos.y + ', ' + player.hand0_pos.z;
+
+  hud.pos = translate(player.pos, player.head_pos);
+  hud.zdir = player.zdir;
+
+  if (player.hand0_active) {
+    cube.col = V(0,1,0);
+    //cube.pos = translate(player.hand0_pos, player.pos);
+    cube.pos = player.hand0_pos;
+  } else {
+    cube.col = V(1,0,0);
+  }
+  if (player.hand1_active) {
+    sphere.col = V(0,1,0);
+    sphere.pos = player.hand1_pos;
+  } else {
+    sphere.col = V(1,0,0);
+  }
+}

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

-- Response ended

-- Page fetched on Sun Jun 2 15:15:19 2024