Skip to content

pookage/aframe-trapezium-primitive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A-Frame Trapezium Primitive

Provides a trapezium geometry primitive for A-Frame

Trapezium Primitive

Properties

  • topWidth : Width of top of trapezium (defaults to 1)
  • bottomWidth : width of bottom of trapezium (defaults to 2)
  • height : height of trapezium (defaults to 1)
  • flat : renders the trapezium flat on the floor by default instead of upright (defaults to false)

Usage

  1. Reference trapezium-primitive.js in the <head> of your HTML document :

     <script src="js/trapezium-primitive.js"></script>
    

Using the geometry primitive

  1. Use trapezium as the value of your primitive in your geometry declaration :

     <a-entity 
         geometry="primitive: trapezium">
     </a-entity>
    
  2. Add any additional properties as needed :

     <a-entity 
         geometry="primitive: trapezium; height: 2; topWidth: 7; bottomWidth: 4">
     </a-entity>    				
    

Using the html primitive

  1. Use the <a-trapezium> primitive :

     <a-trapezium>
     </a-trapezium>
    
  2. Add any additional properties as needed :

     <a-trapezium
         height="2"
         topWidth="7"
         bottomWidth="4">
     </a-trapezium>
    

About

Provides a primitive trapezium geometry for A-Frame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published