panyong пре 1 година
родитељ
комит
2f774a6442

+ 3 - 1
htmldev/shiningH5/.eslintrc.js

@@ -24,6 +24,8 @@ module.exports = {
     indent: 0,
     'no-useless-escape': 0,
     'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
-    'space-before-function-paren': 0
+    'space-before-function-paren': 0,
+    'prefer-const': 0,
+    'camelcase': 0
   }
 }

+ 2 - 0
htmldev/shiningH5/public/index.html

@@ -10,6 +10,7 @@
   <meta http-equiv="Pragma" content="no-cache" />
   <meta http-equiv="Expires" content="0" />
   <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.css">
   <title></title>
 </head>
 <body>
@@ -17,6 +18,7 @@
   <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
     Please enable it to continue.</strong>
 </noscript>
+<script src="https://cdn.jsdelivr.net/npm/pannellum@2.5.6/build/pannellum.js"></script>
 <div id="app"></div>
 <!-- built files will be auto injected -->
 </body>

+ 0 - 0
htmldev/shiningH5/src/assets/image/VR/2022100816/room.jpeg → htmldev/shiningH5/src/assets/image/VR/2022100816/room.jpg


+ 19 - 3
htmldev/shiningH5/src/views/VR/2022100816/index.vue

@@ -1,11 +1,27 @@
 <template>
-  <div>111</div>
+  <div id="panorama"></div>
 </template>
 
 <script>
-export default {}
+export default {
+  mounted() {
+    // https://pannellum.org/documentation/overview/
+    window.pannellum.viewer('panorama', {
+      type: 'equirectangular',
+      autoLoad: true,
+      panorama: require('../../../assets/image/VR/2022100816/room.jpg'),
+      pitch: 0
+    })
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-
+#panorama {
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+}
 </style>