Skip to content

A-Frame LOD implementation, updated for A-Frame 0.9.1

License

Notifications You must be signed in to change notification settings

ChillyCider/aframe-lod

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A-LOD Component

For use with A-Frame

Live Demo

Usage: Include the script after a-frame

<script type="text/javascript" src="aframe-lod.js"></script>

Create an <a-lod> which can be positioned, rotated, etc like normal A-Frame Entities.

Add child elements with an lod-level component. The number is the viewing distance from the camera (in meters for VR).

  <a-lod position="0 1.25 -5">
    <a-sphere lod-level="0" radius="1.25" segments-width="64" segments-height="42" material="color: red; wireframe: true"></a-sphere>
    <a-sphere lod-level="3" radius="1.25" segments-width="36" segments-height="18" material="color: red; wireframe: true"></a-sphere>
    <a-sphere lod-level="5" radius="1.25" segments-width="24" segments-height="9" material="color: red; wireframe: true"></a-sphere>
    <a-sphere lod-level="8" radius="1.25" segments-width="12" segments-height="6" material="color: red; wireframe: true"></a-sphere>
  </a-lod>

About

A-Frame LOD implementation, updated for A-Frame 0.9.1

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 52.1%
  • JavaScript 47.9%