Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwagner/normalmap.js
normalmap.js is a library for creating simple interactive lighting effects using normal maps.
https://github.com/jwagner/normalmap.js
effects gfx javascript jquery jquery-plugin normalmap webgl
Last synced: about 2 months ago
JSON representation
normalmap.js is a library for creating simple interactive lighting effects using normal maps.
- Host: GitHub
- URL: https://github.com/jwagner/normalmap.js
- Owner: jwagner
- License: mit
- Created: 2016-03-12T16:05:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-04-17T02:35:02.000Z (over 1 year ago)
- Last Synced: 2024-07-05T15:00:01.112Z (2 months ago)
- Topics: effects, gfx, javascript, jquery, jquery-plugin, normalmap, webgl
- Language: JavaScript
- Size: 16 MB
- Stars: 179
- Watchers: 10
- Forks: 10
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
:warning: **THIS IS EXPERIMENTAL SOFTWARE** :warning:
# ![normalmap.js](doc/gfx/logo-rendered.png)
[API](doc/API.md) |
[Example](#example) |
[Installation](#installation) |
[Changelog](doc/CHANGELOG.md) |
[License](#license) (MIT) |
[Questions?](#questions)normalmap.js is a library for creating simple interactive lighting effects.
- Built on top of WebGL
- Simple to use
- Small (~7kb gzipped)
- Fast enough to run on modern smartphones
- There is a tiny jQuery plugin for simple usage
- Covered by [automated end-to-end tests](https://29a.ch/sandbox/2016/normalmap.js/tests/)# Demos
[![Golden Dragon](doc/gfx/dragon.gif)](https://29a.ch/sandbox/2016/normalmap.js/)Did you find a cool use for normalmap.js? [Let me know!](https://29a.ch/about)
# Example
```javascript
var lights = normalmap({
canvas: canvas,
normalMap: normalMap,
baseColor: [0.5, 0.4, 0.5]
});lights.clear();
var position = normalMap.vec3(0.5, 0.5, 1.0); // dead center
var color = normalMap.vec3(1.0, 1.0, 1.0); // bright white
lights.addPointLight(position, color);
```# Installation
With NPM:
```
$ npm install normalmap
``````javascript
var normalmap = require('normalmap');
```With Bower:
```$ bower install normalmap```Or just download the latest zip file form the [releases page](https://github.com/jwagner/normalmap.js/releases).
Note that normalmap.js won't work with file:// urls. You will need to serve
images from a webserver. See Richard Daveys [phaser introduction](http://phaser.io/tutorials/getting-started) for an explanations for this.# Browser Support
Normalmap.js should work in all browsers that [supports WebGL](http://caniuse.com/#feat=webgl).
# API Documentation
[doc/API.md](doc/API.md)
# Changelog
[doc/CHANGELOG.md](doc/CHANGELOG.md)# Creating normal maps
[NormalMap-Online](http://cpetry.github.io/NormalMap-Online/)# Questions?
Create a github issue or tweet to [@29a_ch](https://twitter.com/29a_ch) and please be a bit patient. :)# License
Copyright © 2016 Jonas Wagner.The **source code** of this project licensed under the [MIT License](LICENSE) (enclosed).
The images and textures used for demonstration purposes are **not** licensed under the MIT License and belong to their respective owners.