npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-view360

v2.2.7

Published

An API to use 360 view in VR with Angular framework

Downloads

178

Readme

NgxView360

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.

If VR is not supported, a magic window is enabled.

This library was generated with Angular CLI.

Warnings

You must use https to display XR content. If you use http you will only have cardboard display. More informations

Versions

NgxView360 | Angular ------------ | ------------- 2.0.0 | 8 2.1.0 + | 9-12 2.2.1 | 13 2.2.6 | 14-15 2.2.7 | 16 +

Changelog

see file

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 --save

Then append these lines on polyfills.ts:

import WebXRPolyfill from 'webxr-polyfill';
let polyfill = new WebXRPolyfill();

Now, you can add the library:

npm i ngx-view360 --save

Using

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"></ngx-view360>

API

The NgxView360Component has some attributes to display the view.

Attributes | description ------------ | ------------- imageSrc | source of the image to display, need to be a equirectangular image (jpg or png accepted) displayMode(optional) | Mode to display image ('mono', 'stereoTopBottom','stereoLeftRight'). 'mono' is the default mode. customButtonStyle(optional) | object to customize vr button customCanvasStyle(optional) | object to customize canvas dimensions showVRButton(optional) | boolean to show VR button (default value: true)

The property 'customButtonStyle' has this structure:

interface ButtonOptionStyle {
    color?: string;
    height?: number;
    corners?: any;
    backColor?: string;
}

Attributes | description ------------ | ------------- color(optional) | color of texts and logos and borders height(optional) | height of the button (px). corners(optional) | 'square' or 'round' or any number representing border-radius (px) backColor(optional) | background color of vr button

The property 'customCanvasStyle' has this structure:

interface CanvasOptionStyle {
    height?: string;
    width?: string;
}

Attributes | description ------------ | ------------- height(optional) | height of the canvas. width(optional) | width of the canvas

LICENSE

MIT