From 4a7a939dc59fbc5b03f3e7b7e82da788f4d47028 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Sat, 21 May 2016 14:56:25 +0200 Subject: [PATCH 1/2] Readme addition --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 43f3bcd..adb739d 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,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 From 740b8616637f1e99d2b0f55c393c516999d77d60 Mon Sep 17 00:00:00 2001 From: Robert Monfera Date: Tue, 24 May 2016 13:12:47 +0200 Subject: [PATCH 2/2] Adding directional light position configurability --- README.md | 3 +++ mesh.js | 3 +++ package.json | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index adb739d..966dabd 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/mesh.js b/mesh.js index 1173e4c..b127049 100644 --- a/mesh.js +++ b/mesh.js @@ -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 } diff --git a/package.json b/package.json index e098cc5..864e968 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gl-mesh3d", - "version": "1.1.0", + "version": "1.2.0", "description": "3D mesh drawing", "main": "mesh.js", "directories": {