repo: janusweb
action: commit
revision: 
path_from: 
revision_from: f6d9aeb9fc24de42bf475f0390f730bed02f8e66:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit f6d9aeb9fc24de42bf475f0390f730bed02f8e66
Author: James Baicoianu 
Date:   Thu Aug 17 02:14:33 2017 -0700

    PBR material support for Text objects

diff --git a/scripts/text.js b/scripts/text.js
index cc25543be72fd387e60a90d9bf490745bf3d3c1a..
index ..afbee3fadb94d90113ac518654f8b6b8eedd21a5 100644
--- a/scripts/text.js
+++ b/scripts/text.js
@@ -63,9 +63,11 @@ elation.require(['engine.things.label'], function() {
         color: this.properties.color || new THREE.Color(0xffffff), 
         emissive: this.properties.emissive, 
         shading: THREE.SmoothShading, 
-        depthTest: this.properties.depthTest
+        depthTest: this.properties.depthTest,
+        roughness: .5,
+        reflectivity: .5
       };
-      var material = new THREE.MeshPhongMaterial(matargs);
+      var material = (this.room.pbr ? new THREE.MeshPhysicalMaterial(matargs) : new THREE.MeshPhongMaterial(matargs));

       if (this.properties.opacity < 1.0) {
         material.opacity = this.properties.opacity;

-----END OF PAGE-----