-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
87 lines (76 loc) · 5.63 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<title>Unity game in WebVR | JanusWeb</title>
<link rel="stylesheet" type="text/css" href="janusweb.css" media="all" />
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, maximum-scale=1.0, width=device-width" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@bai0" />
<meta name="twitter:title" content="Unity game in WebVR | JanusWeb" />
<meta name="twitter:description" content="Unity embed test - Tanks!" />
<meta name="twitter:image:alt" content="Tanks!" />
<meta property="og:app_id" content="1197654320349894" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Unity game in WebVR | JanusWeb" />
<meta property="og:description" content="Unity embed test - Tanks!" />
<meta charset="utf-8">
</head>
<body>
<script src="systems/unity/Tanks/TemplateData/UnityProgress.js"></script>
<script src="systems/unity/Tanks/Build/UnityLoader.js"></script>
<script>
//var gameInstance = UnityLoader.instantiate("gameContainer", "systems/unity/Tanks/Build/tanks.json", {onProgress: UnityProgress});
</script>
<div id="gameContainer" style="width: 512px; height: 512px"></div>
<FireBoxRoom>
<Assets>
<AssetImage id="sky_left" hasalpha="false" src="sky/day_left.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="sky_up" hasalpha="false" src="sky/day_up.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="sky_back" hasalpha="false" src="sky/day_back.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="sky_front" hasalpha="false" src="sky/day_front.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="sky_right" hasalpha="false" src="sky/day_right.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="sky_down" hasalpha="false" src="sky/day_down.png" tex_clamp="true" tex_colorspace="sRGB" />
<AssetImage id="button" src="logo/button.png" />
<AssetImage id="button_loading" src="logo/button_loading.png" />
<AssetImage id="tankslogo" src="logo/tanks.jpg" />
<AssetImage id="button_esc" src="logo/button_esc.png" />
<AssetObject id="room" src="models/tanks.obj.gz" mtl="models/tanks.mtl" />
<AssetObject id="screen" src="models/computerscreen.obj" mtl="models/computerscreen.mtl" />
<AssetObject id="mountains" src="models/mountains.dae.gz" tex0="models/ground.png" />
<AssetObject id="arcade" src="models/arcadebox.obj.gz" mtl="models/arcadebox.mtl" />
<AssetObject id="crate" src="models/crate.obj.gz" mtl="models/crate.mtl" />
<AssetScript src="unity-tanks.js" />
<AssetScript src="scripts/showcase.js" />
<AssetScript src="scripts/teleporter.js" />
<AssetSound id="teleport" src="http://www.wolfensteingoodies.com/archives/olddoom/sounds/dstelept.wav" />
</Assets>
<Room pos="-0.33 0.5 1" bloom="0.48" ambient="0.4 0.4 0.4" pbr="true" xdir="1 0 0" ydir="0 1 0" zdir="-0 0 1" skybox_right_id="sky_right" skybox_left_id="sky_left" skybox_up_id="sky_up" skybox_down_id="sky_down" skybox_front_id="sky_front" skybox_back_id="sky_back" far_dist="5000" walk_speed="1.2" fog="true" fog_mode="linear" fog_density="0.1" fog_start="0.1" fog_end="1000" fog_col="#000000" cursor_visible="false" >
<Light js_id="15" pos="0 9 -4" xdir="0 0 0" ydir="0 0 0" zdir="0 -1 0" col="#ffe5bf" light_intensity="12" light_cone_angle="0.8" light_cone_exponent="40" light_range="12" light_shadow="true" />
<Object id="room" js_id="A_5769-1-1517717550" pos="12.6 0 -8.4" xdir="0.999391 0.000001 0.034908" ydir="-0.000001 1 -0" zdir="-0.034908 0 0.999391" cull_face="none" collision_id="room" />
<Object id="mountains" pos="-39 0 16" />
<Object id="crate" js_id="A_5769-4-1517870406" pos="-0.3 0.37 2.6" xdir="1 -0 0" ydir="0 1 0" zdir="0 -0 1" scale="1.1 0.55 0.7" collision_id="cube" />
<Object id="arcade" js_id="A_5769-2-1517869737" pos="-0.441 1.544 2.44" xdir="0.997564 0.000001 0.069756" ydir="-0.004867 0.997564 0.069589" zdir="-0.069586 -0.069759 0.995134" scale="0.79 0.633 1" />
<Object id="cube" js_id="A_5769-1-1517860601" pos="15.6 -2 -9" xdir="0.034898 0 -0.999391" ydir="0.999391 0 0.034898" zdir="0 -1 0" scale="104 105 4" collision_id="cube" visible="false" />
<Object id="plane" js_id="swag_5769-1-1517870928" pos="0.776837 1.913321 3.069799" xdir="-0.999391 0 -0.034908" zdir="0.034908 0 -0.999391" scale="1.3 1 1" lighting="false" cull_face="none" collision_id="plane" image_id="tankslogo" />
<Showcase col="#4cb96f" id="webvr-moz" link_external="true" logo_scale="2 2 1" logo_url="https://imgur.com/SOv6SY5.jpg" pos="-8 0 7" thumb_url="https://i.imgur.com/qKVfHmX.jpg" url="https://mozilla.github.io/unity-webvr-export/Build/" xdir="-0.8 0 -0.5" zdir="0.5 0 -0.8"/>
</Room>
</FireBoxRoom>
<script src="https://web.janusvr.com/janusweb.js"></script>
<script>
var numInstances = 1;
var instanceurl = document.location.href;
var urlinfo = elation.utils.parseURL(instanceurl);
var instanceid = urlinfo.args.instanceid;
if (numInstances > 1 && instanceid === undefined) {
urlinfo.args.instanceid = Math.floor(Math.random() * numInstances);
instanceurl = elation.utils.makeURL(urlinfo);
}
elation.janusweb.init({
url: instanceurl,
shownavigation: false,
});
</script>
</body>
</html>