GithubHelp home page GithubHelp logo

demongao / photo-sphere-viewer-vue Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 5.0 26.58 MB

使用Photo Sphere Viewer创建VR 360全景示例代码

Home Page: http://demongao.github.io/photo-sphere-viewer-vue/

JavaScript 32.39% HTML 19.14% Vue 48.47%

photo-sphere-viewer-vue's Introduction

vue3.0版本 photo-sphere-viewer使用

核心代码

import { Viewer } from 'photo-sphere-viewer'
import 'photo-sphere-viewer/dist/photo-sphere-viewer.css'

psViewer.value = new Viewer({
    container: document.querySelector('#viewer'),
    panorama: imageRef.value.src
})

}

注意:

panorama 需要使用的图片地址.

  1. 静态图片 使用 require('...文件路径')
  2. 外链图片 通过外链地址, 转canvas 读取 base64, 放入到img.src中, 然后在onload时, 调用new Viewer(), panorama 指向元素的src

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint   

Customize configuration

See Configuration Reference.

photo-sphere-viewer-vue's People

Contributors

demongao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.