Prismatic
Prismatic is a declarative JS library for creating 3D content for the Helio browser. Using simple HTML tags with inline attributes and CSS styling, you can easily render 3D content that pops off of the page and you can grab and place into your environment.
Prismatic code is licensed under the Apache License, Version 2.0.
Prerequisites
Helio Web API development requires the following:
- A Magic Leap device to view content
- Access to a web server
Note: If you don't have access to a public web server, install a web server such as Node.js, Python, or Apache on your computer. If you serve Prismatic content on a local web server, your Magic Leap device must connect to the same network.
Alternatively, you may want to check out services such as glitch or CodePen.
Supported 3D Models
There are two supported formats for loading models in Helio:
- .glb (glTF)
- .fbx (either with embedded textures or through a material file)
It also supports the following shaders:
- Unlit Textured
- Diffuse Normal Specular
- Pbr
Check out the materials attribute for more information on loading, and applying materials and external textures to your 3D models in Helio.
Installing Prismatic
If you use npm, run npm i @magicleap/prismatic
. Otherwise, to add the minified version hosted in npm to your HTML file:
<script src="https://unpkg.com/@magicleap/prismatic"></script>
For more information visit Prismatic in npm.
The source code for Prismatic is also hosted in a repository on GitHub.
Guides and Tutorials
More information and guides are available on Magic Leap's portal.
Samples and Code Snippets
For live samples and code snippets highlighting the Web Platform's core features, checkout the Developer Samples website here.