GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - theunreal/angular-vrviewer: Embed VR media in your Angular application

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
src
src
 
 
tools/gulp
tools/gulp
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.travis.yml
.travis.yml
 
 
.yo-rc.json
.yo-rc.json
 
 
README.MD
README.MD
 
 
gulpfile.js
gulpfile.js
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tslint.json
tslint.json
 
 

Repository files navigation

Demo Image

angular-vrviewer

Embed VR media in your Angular application. Used as a wrapper for Google VR view for the Web. Currently supports only media type of 360 degree images.

Live Demo

Visit https://theunreal.github.io/angular-vrview-example/

Installation

To install angular-vrviewer, simply run:

$ npm install angular-vrviewer --save

Include in your index.html:

<script src="//storage.googleapis.com/vrview/2.0/build/vrview.min.js"></script>

Usage

Include the VRViewModule in your app:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Add this line
import { VRViewModule } from 'angular-vrviewer';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    VRViewModule //<-- import this module
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Now you can use the <vrview> selector to show 360 media in your angular application.

Example:

<vrview
[scenes]="scenes"
width="100%"
[height]="400">
</vrview>

Scenes and Hotspots

Scene Interface:

export interface Scene {
	[key: string]: {
	image: string;
	hotspots: Hotspot
	}
}

Hotspot interface:

export interface Hotspot {
	[key: string]: {
		pitch: number;
		yaw: number;
		radius: number,
		distance: number
	}
}

Scenes with Hotspot example:

scenes: Scene = {
    world: {
      image: 'assets/1.jpg',
      hotspots: {
        green_area: {
          pitch: 10,
          yaw: -15,
          radius: 0.05,
          distance: 1
        },
      }
    },
    green_area: {
      image: 'assets/2.jpg',
      hotspots: {
        world: {
          pitch: 20,
          yaw: 0,
          radius: 0.05,
          distance: 1
        },
      }
    }
};

License

MIT © Eliran Elnasi and contributors

About

Embed VR media in your Angular application

theunreal.github.io/angular-vrview-example/

Topics

angularvrview

Resources

Readme
Activity

Stars

7 stars

Watchers

1 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.