0.1.0 • Published 8 years ago

aframe-polygon-primitive v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

aframe-polygon-primitive

An a-polygon primitive for A-Frame. This primitive produces a polygon the x-z plane. The primitive depends on the faceset component. The points of the polygon are located on the unit circle. The first point is at 1, 0, 0.

Attributes

AttributeDescriptionDefault Value
sidesnumber of sides3

Usage

Browser Installation

Install and use by directly including the browser files:

<head>
  <title>My A-Frame Scene</title>
  <script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script>
  <script src="https://rawgit.com/andreasplesch/aframe-faceset-component/master/dist/aframe-faceset-component.min.js"></script>
  <script src="https://rawgit.com/andreasplesch/aframe-polygon-primitive/master/dist/aframe-polygon-primitive.min.js"></script>
</head>

<body>
  <a-scene>
	  <!-- pentagon -->
    <a-polygon sides='5'></a-entity>
  </a-scene>
</body>

NPM Installation

Install via NPM:

npm install aframe-polygon-primitive

Then register and use.

require('aframe');
require('aframe-faceset-component');
require('aframe-primitive-component');