Package Exports
- ngx-view360
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-view360) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
NgxView360
This library was generated with Angular CLI version 8.2.14.
NgxView360 let you use 360 photo viewer in VR using Angular technology. This library adapt one of the samples from WebXR Sample. A great thanks to The Immersive Web Community Group.
Setup
Installing
First, you will need to add the webxr polyfill. Some browsers don't have develop in production the WEBXR API. You will need also to install gl-matrix package to calculate webgl matrix.
npm i webxr-polyfill --save
npm i gl-matrix --saveThen append these lines on polyfills.ts:
import WebXRPolyfill from 'webxr-polyfill/build/webxr-polyfill.module.js';
let polyfill = new WebXRPolyfill();Now, you can add the library:
npm i ngx-view360 --saveUsing
Import NgxView360Module on AppModule.
import { NgxView360Module } from 'ngx-view360';
@NgModule({...
imports: [...,
NgxView360Module
...],
})Then, you can use the component in template:
<ngx-view360 imageSrc="path/to/image"
rightController="path/to/3Dmodel"
leftController="path/to/3DModel"></ngx-view360>Library
The NgxView360Component has some attributes to display the view
| Attributes | description |
|---|---|
| imageSrc | source of the image to display |
| displayMode(optional) | Mode to display image ('mono', 'stereoTopBottom','stereoLeftRight'). 'mono' is the default mode. |
| rightController | gltf file containing right controller 3D model |
| leftController | gltf file containing left controller 3D model |
LICENSE
MIT