repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 20d7d7ff45abe1762cac147dfcfc4ff7c60b20cc:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 20d7d7ff45abe1762cac147dfcfc4ff7c60b20cc
Author: James Baicoianu 
Date:   Tue Mar 10 23:56:28 2020 -0700

    Added attribute comments, define emissive_id, roughness_id, metalness_id, emissive, emissiveIntensity, roughness, and metalness attribs

diff --git a/scripts/object.js b/scripts/object.js
index 356c359ccf0956f694cc927b803a4045b75e0021..
index ..dd1c8491bf2cda32638a49fd39d2dc982e97757a 100644
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -9,35 +9,43 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
       elation.engine.things.janusobject.extendclass.postinit.call(this);
       this.defineProperties({
         janusid: { type: 'string', refreshGeometry: true },
-        image_id: { type: 'string', set: this.updateMaterial },
-        lmap_id: { type: 'string', set: this.updateMaterial },
-        video_id: { type: 'string', set: this.updateVideo },
-        shader_id: { type: 'string', set: this.updateMaterial },
+        image_id: { type: 'string', set: this.updateMaterial, comment: 'Diffuse texture ID' },
+        anim_id: { type: 'string', set: this.updateAnimation, comment: 'Current animation ID' },
+        lmap_id: { type: 'string', set: this.updateMaterial, comment: 'Lightmap texture ID' },
+        video_id: { type: 'string', set: this.updateVideo, comment: 'Video texture ID' },
+        shader_id: { type: 'string', set: this.updateMaterial, comment: 'Shader ID' },
         shader_chunk_replace: { type: 'object' },
         url: { type: 'string' },
         loop: { type: 'boolean' },
-        websurface_id: { type: 'string', set: this.updateWebsurface },
+        websurface_id: { type: 'string', set: this.updateWebsurface, comment: 'WebSurface ID' },
         shadow: { type: 'boolean', default: true, set: this.updateMaterial },
-        shadow_receive: { type: 'boolean', default: true, set: this.updateMaterial },
-        shadow_cast: { type: 'boolean', default: true, set: this.updateMaterial },
-        wireframe: { type: 'boolean', default: false, set: this.updateMaterial },
-        fog: { type: 'boolean', default: true, set: this.updateMaterial },
-        lights: { type: 'boolean', default: false },
-        lighting: { type: 'boolean', default: true, set: this.updateMaterial },
-        cull_face: { type: 'string', default: 'back', set: this.updateMaterial },
-        blend_src: { type: 'string', default: 'src_alpha', set: this.updateMaterial },
-        blend_dest: { type: 'string', default: 'one_minus_src_alpha', set: this.updateMaterial },
-        depth_write: { type: 'boolean', default: null },
-        depth_test: { type: 'boolean', default: null },
-        envmap_id: { type: 'string', set: this.updateMaterial },
-        normalmap_id: { type: 'string', set: this.updateMaterial },
-        bumpmap_id: { type: 'string', set: this.updateMaterial },
-        bumpmap_scale: { type: 'float', default: 1.0, set: this.updateMaterial },
-        displacementmap_id: { type: 'string', set: this.updateMaterial },
-        displacementmap_scale: { type: 'float', default: 1, set: this.updateMaterial },
+        shadow_receive: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Receive shadows from self and other objects' },
+        shadow_cast: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Cast shadows onto self and other objects' },
+        wireframe: { type: 'boolean', default: false, set: this.updateMaterial, comment: 'Wireframe rendering' },
+        fog: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Object is affected by fog' },
+        lights: { type: 'boolean', default: false, comment: 'Load lights from model' },
+        lighting: { type: 'boolean', default: true, set: this.updateMaterial, comment: 'Object reacts to scene lighting' },
+        cull_face: { type: 'string', default: 'back', set: this.updateMaterial, comment: 'Hide face sides (back, front, or none)' },
+        blend_src: { type: 'string', default: 'src_alpha', set: this.updateMaterial, comment: 'Blend mode (source)' },
+        blend_dest: { type: 'string', default: 'one_minus_src_alpha', set: this.updateMaterial, comment: 'Blend mode (destination)' },
+        depth_write: { type: 'boolean', default: null, set: this.updateMaterial },
+        depth_test: { type: 'boolean', default: null, set: this.updateMaterial },
+        envmap_id: { type: 'string', set: this.updateMaterial, comment: 'Environment map texture ID (overrides skybox reflections)' },
+        normalmap_id: { type: 'string', set: this.updateMaterial, comment: 'Normal map texture ID' },
+        bumpmap_id: { type: 'string', set: this.updateMaterial, comment: 'Bumpmap texture ID' },
+        bumpmap_scale: { type: 'float', default: 1.0, set: this.updateMaterial, comment: 'Bumpmap scale' },
+        displacementmap_id: { type: 'string', set: this.updateMaterial, comment: 'Displacement map texture ID' },
+        displacementmap_scale: { type: 'float', default: 1, set: this.updateMaterial, comment: 'Displacement map height scale' },
         texture_offset: { type: 'vector2', default: [0, 0], set: this.updateTextureOffsets },
         texture_repeat: { type: 'vector2', default: [1, 1], set: this.updateTextureOffsets },
         texture_rotation: { type: 'float', default: 0, set: this.updateMaterial },
+        emissive_id: { type: 'string', set: this.updateMaterial, comment: 'Emissive map texture ID' },
+        roughness_id: { type: 'string', set: this.updateMaterial, comment: 'Roughness map texture ID' },
+        metalness_id: { type: 'string', set: this.updateMaterial, comment: 'Metalness map texture ID' },
+        emissive: { type: 'color', default: [0,0,0], set: this.updateMaterial, comment: 'Material emissive color' },
+        emissiveIntensity: { type: 'float', default: 1, set: this.updateMaterial, comment: 'Intensity of material emissive color' },
+        roughness: { type: 'float', default: .5, min: 0, max: 1, set: this.updateMaterial, comment: 'Material roughness value' },
+        metalness: { type: 'float', default: 0, set: this.updateMaterial, comment: 'Material metalness value' },
         onloadstart: { type: 'callback' },
         onloadprogress: { type: 'callback' },
         onload: { type: 'callback' },

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