-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcurvedPlane.html
81 lines (72 loc) · 2.22 KB
/
curvedPlane.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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width">
<title>OL VR</title>
<!-- Openlayers -->
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol-debug.js"></script>
<!-- A-Frame -->
<script src="https://aframe.io/releases/0.8.2/aframe.min.js"></script>
<!-- A-Frame openlayers component-->
<script src="build.js"></script>
<script>
//// Create one openlayers map
var source1 = new ol.source.OSM();
var layer1 = new ol.layer.Tile({
source: source1
});
var source2 = new ol.source.Vector({
url: 'https://openlayers.org/en/v4.6.5/examples/data/geojson/countries.geojson',
format: new ol.format.GeoJSON()
});
var layer2 = new ol.layer.Vector({
source: source2
});
var map = new ol.Map({
layers: [
layer1,
layer2
],
target: 'map',
controls: ol.control.defaults({
attributionOptions: {
collapsible: false
}
}),
view: new ol.View({
center: [0, 0],
zoom: 0.7
})
});
</script>
</head>
<body>
<a-scene>
<a-assets>
<div id="map"></div>
</a-assets>
<a-entity
geometry="primitive: sphere; radius: 5; phiStart: 35; phiLength: 110;thetaStart:60; thetaLength: 60"
position="0 1.6 0"
rotation="0 -180 0"
material="side: back; shader: flat; repeat: -1 1;"
shadow="recieve: false; cast: true"
scale=""
visible=""
ol=" map: map;
height:2;
width:4;
aframeEvent: click;
OlEvent: click;
pixToVRRatio:150;"
></a-entity>
<a-camera id="camera" position="0 1.6 0" look-controls wasd-controls-enabled="true" >
<a-text id="infoText" color="grey" value="" position="0 -0.2 -1" scale="0.4 0.4 0.4"></a-text>
<a-cursor fuse interval="1000"></a-cursor>
</a-camera>
</a-scene>
</body>
</html>