Giter VIP home page Giter VIP logo

vue-vr's Introduction

License npm version HitCount size

Vue VR

A Wrapper of Panolens for building VR applications with Vue based on threejs

Demos

Image Pano

Cube Pano

Video Pano

360 Video Demo

VR Tour

VR Tour

Getting started

using npm

npm install vuejs-vr --save

Or using script tag for global use

<script src="https://unpkg.com/vuejs-vr@latest/dist/vue-vr.min.js"></script>

Or Download vue-vr.min.js and include it in your html

Installing & Running Locally

Clone the repository using git:

git clone https://github.com/mudin/vue-vr.git 

Installing all dependencies:

npm install 

Build by webpack:

npm run-script build 

Run locally:

npm start 

This will start development server on localhost:8080

Usage

####For simple panorama: Panorama by equirectangular image

<template>
    <Pano source="pano.jpg"></Pano>
</template>
<script>
    import { Pano } from 'vuejs-vr'

    export default {
        components: { Pano }
    }
</script>

Or

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
    <div id="app">
        <Pano source="pano.jpg"></Pano>
    </div>
    <script src="vue.js"></script>
    <script src="vuejs-vr.js"></script>
    <script>
        new Vue({
            el: '#app'
        })
    </script>
</body>

####For cube faces: Panorama with a six-face cubemap

<template>
    <Pano type='cube' source="pano_%s.jpg"></Pano>
</template>
<script>
    import { Pano } from 'vuejs-vr'

    export default {
        components: { Pano }
    }
</script>

Note: %s replaced by 'l'|'f'|'r'|'b'|'u'|'d' Or

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
    <div id="app">
        <Pano type='cube' source="pano_%s.jpg"></Pano>
    </div>
    <script src="vue.js"></script>
    <script src="vuejs-vr.js"></script>
    <script>
        new Vue({
            el: '#app'
        })
    </script>
</body>

####360 video: Panorama with 360 video

<template>
    <Pano type='video' source="video.mp4"></Pano>
</template>
<script>
    import { Pano } from 'vuejs-vr'

    export default {
        components: { Pano }
    }
</script>

Or

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
    <div id="app">
        <Pano type='video' source="video.mp4"></Pano>
    </div>
    <script src="vue.js"></script>
    <script src="vuejs-vr.js"></script>
    <script>
        new Vue({
            el: '#app'
        })
    </script>
</body>

TODO List

  • Hotspots
  • Multi touch on touchsceen devices
  • 3D objects
  • HlS, Live Streaming video Support

Contributing

If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.

LICENSE

MIT

vue-vr's People

Contributors

martinsax avatar mudin avatar reddevildragg avatar thewhitefox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-vr's Issues

Dynamic Source

Is there a way to load the source dynamically? i.e via api or computed attributes, such as :source='comp_image', this doesn't seem to work currently, as the images are stored on S3 AWS, not on local machines and retrieved dynamically as well via API calls.

Doesnt work on usage according to documentation

Hi , I have done an npm install and used the component as explained. But the images dont render in pano or cube pano or any other. Its just blank. I have no errors also. Do i need to install any dependencies??

I also cloned the repository and tried. There is a memory crash because of the rendering of the connection scenes. Can you please help me making this work.

(Question) Hotspots and multiple scenes ETA

Hi there!

First things first, thank you for creating this library. It took me less than a minute to get it up and running.

I can see in the roadmap that you're planning on adding hotspot support and multiple scenes. Do you have any idea of when you're planning to implement those?

I'm evaluating other panorama engines such as https://github.com/pchen66/panolens.js but since my project is built with vue.js, your library makes more sense :)

Additional setting/options for the panos

The ability to add additional settings into the pano componet to go though into the creation.

Looking at the panolens.js script it appears there are a lot more settings, however only container and fov are being passed though.

In my use case i want to be able to turn off the full screen and settings buttons, but does not appear to be a build in way to do so (by the panolense.js script has this as an option)

Can i use multiple <Pano> with OwlCarousel?

I trying to implement a carousel with multiple vr images. Is that possible?
I try this:

<script> import carousel from 'vue-owl-carousel' import { Pano } from 'vuejs-vr' export default { props: ['foto'], components: { carousel, Pano }, mounted(){ } } </script>

Hotspots with 360 videos

Hello,

Is there any timeline regarding adding hotspots on 360 videos?

Thank you very much in advance for your response.

local image load error

Problem

I use a simple local img '../assets/pano.png', it load nothing but black screen, and in devtools it send a XHR request, not a image request
But if I use img from online resource, it work

This is my vue file.

<template>
  <div class="vr-container">
    <Pano
      :source="url"
      class="pano"
    ></Pano>
    <!-- <img src="../assets/pano.png" alt="pano" /> -->
  </div>
</template>
<script>
import { Pano } from "vuejs-vr";
export default {
  components: { Pano },
  data() {
    return {
      url: "../assets/pano.png",
    //   url: "https://t4.ftcdn.net/jpg/02/09/58/11/360_F_209581186_UIHxT8WvyXZbTbHnNeEu4SFRQ3TdqBHA.jpg",
    };
  },
};
</script>

<style scoped>
body {
  height: 1080px;
}
.vr-container {
    height: 100vh;
    width: 100vw;
}
.pano {
    height: 80%;
    width: 80%;
}
</style>

Please give me some suggestions, thanks!
image

Multi touch on mobile

Hi @mudin great lib btw.
But i have question,
It's working when on web, with mouse i can swipe it and zoom in/out with scroll mouse.
And then on mobile I can swipe normally, but not for pinch zoom in/out.
How to enable that? So i can use multi touch on this vr.
Thanks 🙏🏻

getting error when using it in carousel

Hello

i have implement this in custom made carousel and it's work fine but after some time i got error of can not read property position of null

you can check here
URL

please check below screen shot for batter idea
error

reset Pano

Hi,
thanks for your work.
How to reset the pano sizes after opening it in the bootstrap modal?

WebGL: INVALID_VALUE: texImage2D: no video

Hi mudin,

Thank you for this library, I'm loving it. Just one issue I'm getting and I can figure out what it is. When I use a 360 video with a .mp4 filename, I get this error:

WebGL: INVALID_VALUE: texImage2D: no video

[.WebGL-00000272E2E6A130]RENDER WARNING: texture bound to texture unit 0 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?

Thank you.

Environment
Vue version 2.6.12
Browser & Version: Google Chrome Version 87.0.4280.66
OS & Version: Windows 10 1909

Too complicated.

You don't need Vue for this.
Tried my best and passed 20 minutes to try run this despite that I don't like technologies like Vue, that needs installations, and command runs, and dependencies, and time, and pain. If a a simple process as compiling a project without even editing it takes more than 20 minutes, it means Vue is too much.

hls video

can the component play hls video or live video?

document is not defined

I am trying to implement this nuxtjs, but it is not working.

Here are the steps I have taken so far.

  • install the package.
 <client-only>
        <Pano type="video" :source="src"></Pano>
 </client-only>
  • import the library as described on the docs.

Any ideas or suggestions on how to solve this will be appreciated.

Using sequence images

is it possible to create a 360 with sequences of images, for example, image_1 through image_40?

Console errors

After installing using NPM I'm getting the following console error when attempting to compile. Any ideas what could be causing this?

Screen Shot 2019-07-23 at 5 03 06 PM

The formatted .min file places the error on this line.
Screen Shot 2019-07-23 at 5 13 04 PM

Thanks!

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.