File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ < title > 360VR全景图展示器</ title >
7
+ < script src ="https://www.marzipano.net/demos/common/es5-shim.js "> </ script >
8
+ < script src ="https://www.marzipano.net/demos/common/eventShim.js "> </ script >
9
+ < script src ="https://www.marzipano.net/demos/common/requestAnimationFrame.js "> </ script >
10
+ < script src ="https://www.marzipano.net/build/marzipano.js "> </ script >
11
+ < style >
12
+ body {
13
+ margin : 0 ;
14
+ padding : 0 ;
15
+ overflow : hidden;
16
+ }
17
+ # pano {
18
+ width : 100% ;
19
+ height : 100vh ;
20
+ }
21
+ </ style >
22
+ </ head >
23
+ < body >
24
+ < div id ="pano "> </ div >
25
+
26
+ < script >
27
+ // 初始化查看器
28
+ var viewer = new Marzipano . Viewer ( document . getElementById ( "pano" ) ) ;
29
+
30
+ // 创建场景
31
+ var source = Marzipano . ImageUrlSource . fromString ( "panorama.jpg" ) ;
32
+
33
+ var geometry = new Marzipano . EquirectGeometry ( [ { width : 4000 } ] ) ;
34
+
35
+ var view = new Marzipano . RectilinearView ( {
36
+ yaw : Math . PI ,
37
+ pitch : 0 ,
38
+ roll : 0 ,
39
+ fov : Math . PI / 2 ,
40
+ } ) ;
41
+
42
+ var scene = viewer . createScene ( {
43
+ source : source ,
44
+ geometry : geometry ,
45
+ view : view ,
46
+ pinFirstLevel : true ,
47
+ } ) ;
48
+
49
+ // 切换到场景
50
+ scene . switchTo ( ) ;
51
+ </ script >
52
+ </ body >
53
+ </ html >
Original file line number Diff line number Diff line change
1
+ python -m http.server 8000
You can’t perform that action at this time.
0 commit comments