MarkTraceur has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365660 )

Change subject: Fiddle with the lighting to make shapes clearer
......................................................................

Fiddle with the lighting to make shapes clearer

Change-Id: I4a5794ca037e3d86405c3cdcd0a3d02232818ad7
---
M modules/mmv.3d.js
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/3D 
refs/changes/60/365660/1

diff --git a/modules/mmv.3d.js b/modules/mmv.3d.js
index 6a891f6..2fd7809 100644
--- a/modules/mmv.3d.js
+++ b/modules/mmv.3d.js
@@ -31,7 +31,10 @@
        TD.createScene = function () {
                var threed = this,
                        dimensions = this.dimensionsFunc(),
-                       ambient = new THREE.AmbientLight( 0x999999 );
+                       ambient = new THREE.AmbientLight( 0x666666 ),
+                       dlight = new THREE.DirectionalLight( 0x999999 );
+
+               dlight.position.set( 0, 0, 1 );
 
                this.scene = new THREE.Scene();
                this.camera = new THREE.PerspectiveCamera( 60, 
dimensions.ratio, 1, 5000 );
@@ -41,6 +44,7 @@
                this.camera.add( new THREE.PointLight( 0xffffff, 0.4 ) );
 
                this.scene.add( ambient );
+               this.scene.add( dlight );
                this.scene.add( this.camera );
 
                this.renderer = new THREE.WebGLRenderer();
@@ -81,7 +85,6 @@
 
        TD.geometryToObject = function ( geometry ) {
                var material = new THREE.MeshPhongMaterial( { color: 0xaaaaff, 
shading: THREE.FlatShading } );
-
                return new THREE.Mesh( geometry, material );
        };
 

-- 
To view, visit https://gerrit.wikimedia.org/r/365660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a5794ca037e3d86405c3cdcd0a3d02232818ad7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/3D
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to