Back to Trending
RepositoryJavaScript
MozillaReality

MozillaReality/immersive-custom-elements

INACTIVE - Immersive Custom Elements

133stars
7forks
0issues
0views

Immersive Custom Elements

immersive-custom-elements is a set of web components to embed immersive (VR & AR) content into your web page by using custom element tags. It currently includes components for

  • 360 images
  • 360 video

Demo / Blog post

Usage

Sample code

Add the link to immersive-custom-elements.js with `

<img-360 src="360-landscape.jpg" width="640" height="360"></img-360>

## Custom element tags

- [\<img-360\>](#img-360)
- [\<video-360\>](#video-360)

### \<img-360\>

Displays an interactive 360 degree photo.

```javascript
<img-360 src="imagefile.jpg" width="640" height="360"></img-360>
attributetyperequireddescription
srcstringsyesPath to image file
widthnumberyeselement width
heightnumberyeselement height

GitHub Logo

<video-360>

Plays an interactive 360 degree video. Click video to start playing.

<video-360 src="video.mp4" width="640" height="360" loop></video>
attributetyperequireddescription
srcstringsyesPath to video file
widthnumberyeselement width
heightnumberyeselement height
loop-novideo loops if defined
muted-nothe audio output of the video is muted if defined
autoplay-novideo automatically starts playing if defined

GitHub Logo

Immersive (VR) mode

You can enter immersive mode by clicking "ENTER VR" button if you have a VR headset.

GitHub Logo

Development

How to build

$ git clone https://github.com/MozillaReality/immersive-custom-elements.git
$ cd immersive-custom-elements
$ npm install
$ npm run build

How to locally run

$ npm run start
# local server boots up. Access http://localhost:8080/examples/index.html on your browser.

License

Mozilla Public License Version 2.0

Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
mozilla/neo

INACTIVE - http://mzl.la/ghe-archive - DEPRECATED: See https://neutrino.js.org for alternative

494
Mar 29, 2019
RepositoryJavaScript
mozilla/aframe-xr

INACTIVE - http://mzl.la/ghe-archive - System / Components to build WebXR experiences with A-frame

182
Mar 30, 2019
RepositoryJavaScript
mozilla/browserid-crypto

INACTIVE - JavaScript implementation of JSON Web Signatures, JSON Web Tokens, and JSON Web Certificates

180
Apr 10, 2023
RepositoryJavaScript
MozillaReality/sechelt

INACTIVE - A virtual reality fly through of a 3D landscape, built with Three.js and Cinema 4D.

151
Feb 13, 2018
RepositoryJavaScript
mozilla/prospector

INACTIVE - A series of experiments from Mozilla Labs focused on analyzing, experimenting and prototyping improvements on how you search and discover content with Firefox.

140
Dec 21, 2023
RepositoryJavaScript
mozilla/three.xr.js

INACTIVE - http://mzl.la/ghe-archive - Library to build WebXR experiences with three.js

115
Mar 30, 2019
RepositoryJavaScript
mozilla/WebGameStub

INACTIVE - http://mzl.la/ghe-archive - Simple Web Canvas Game Template

114
Mar 28, 2019
RepositoryJava
MozillaReality/FirefoxReality

INACTIVE - A fast and secure browser for standalone virtual-reality and augmented-reality headsets.

772
Dec 28, 2023
Repository
mozilla/webxr-api

INACTIVE - http://mzl.la/ghe-archive - A proposal for WebXR, based on the WebVR extension

194
Mar 30, 2019