aframe-crease-component

0.1.0 • Public • Published

aframe-crease-component

A crease component for A-Frame. Providing the component switches the type of shading to flat giving a geometry a creased appearance. Removing the component or setting it to false switches back to smooth shading.

This differs from material='shading: flat' and only works with shading: standard (and other THREE materials).

Properties

This is a single true/false property component. Its default value is true.

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-crease-component/master/dist/aframe-crease-component.min.js"></script> 
</head>
 
<body>
  <a-scene>
    <a-entity crease geometry='primitive: sphere' material></a-entity>
  </a-scene>
</body>

NPM Installation

Install via NPM:

npm install aframe-example-component

Then register and use.

require('aframe');
require('aframe-example-component');

Package Sidebar

Install

npm i aframe-crease-component

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • andreasplesch