1.0.1 • Published 7 years ago

aframe-glow v1.0.1

Weekly downloads
32
License
MIT
Repository
-
Last release
7 years ago

A-Frame Glow Component

Glow component for A-Frame to add on your entities.

Demo

Alt text

Live demo

Getting Started

<a-entity glow></entity>

To turn it off:

<a-entity glow="enabled:false"></entity>

Properties:

C (default: 1, min: 0, max: 1)

<a-entity glow="c:0.3;"></entity>

P (default: 1.4, min: 0, max: 6)

<a-entity glow="p:1.1;"></entity>

Color (default: #FFFF00)

<a-entity glow="color: #FF00FF;"></entity>

Scale (default: 2)

Adjust the scale of the glow.

<a-entity glow="scale: 1.3; color: #FF00FF;"></entity>

Side (default: front, values: front/back)

Change the type of glow.

<a-entity glow="side: back; scale: 1.3; color: #FF00FF; c: 0.3; p: 3;"></entity>

Want to make some changes to it?

Installation

First make sure you have Node installed.

On Mac OS X, it's recommended to use Homebrew to install Node + npm:

brew install node

To install the Node dependencies:

npm install

Local Development

To serve the site from a simple Node development server:

npm start

Then launch the site from your favourite browser:

http://localhost:3000/

If you wish to serve the site from a different port:

PORT=8000 npm start

Change log

  • 1.0.1 - Fix glow position when placed inside another entity.

Acknowledgement

Based on the work of @stemkoski for ThreeJS: http://stemkoski.github.io/Three.js/Shader-Glow.html

License

Distributed under an MIT License.