-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelloWorld1.html
47 lines (41 loc) · 1.57 KB
/
HelloWorld1.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version. -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Hello World!</title>
<script src="../Build/Cesium/Cesium.js"></script>
<style>
@import url(../Build/Cesium/Widgets/widgets.css);
html, body, #cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
</style>
</head>
<body>
<div id="cesiumContainer"></div>
<script>
var viewer = new Cesium.Viewer('cesiumContainer', {vrButton : true});
viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(140.9360018, 38.2420, 20.0),
orientation : {
heading : Cesium.Math.toRadians(0.0),
pitch : Cesium.Math.toRadians(-35.0),
roll : 0.0
}
});
var center = Cesium.Cartesian3.fromDegrees(140.9360018, 38.2422495,-5.5);
var heading = 0.0;
var pitch = 0.0;
var roll = -Math.PI * 0.5;
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
var transform = Cesium.Transforms.headingPitchRollToFixedFrame(center, hpr);
var model = viewer.scene.primitives.add(Cesium.Model.fromGltf({
url:"./oppaiyama.gltf",modelMatrix : transform, scale : 1.0}));
</script>
</body>
</html>