Skip to content

Commit

Permalink
Merge pull request #6 from monfera/master
Browse files Browse the repository at this point in the history
Adding directional light position configurability
  • Loading branch information
mikolalysenko committed May 24, 2016
2 parents a85ee9e + 740b861 commit 7bbbb5e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ Updates the contents of the simplicial complex in place.

## Properties

#### `mesh.lightPosition`
The 3D position of the directional light source

#### `mesh.ambientLight`
Ambient light color

Expand All @@ -87,6 +90,12 @@ Mesh surface roughness
#### `mesh.fresnel`
Fresnel parameter

#### `mesh.vertexNormalsEpsilon`
Epsilon for vertex normals calculation

#### `mesh.faceNormalsEpsilon`
Epsilon for face normals calculation

#### `mesh.opacity`
Opacity

Expand Down
3 changes: 3 additions & 0 deletions mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ proto.update = function(params) {
if('lineWidth' in params) {
this.lineWidth = params.lineWidth
}
if('lightPosition' in params) {
this.lightPosition = params.lightPosition
}
if('opacity' in params) {
this.opacity = params.opacity
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gl-mesh3d",
"version": "1.1.0",
"version": "1.2.0",
"description": "3D mesh drawing",
"main": "mesh.js",
"directories": {
Expand Down

0 comments on commit 7bbbb5e

Please sign in to comment.