repo: janusweb
action: commit
revision: 
path_from: 
revision_from: faa459ea30bf7f76d705ff96f9d19bc9ea1d4cca:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit faa459ea30bf7f76d705ff96f9d19bc9ea1d4cca
Author: James Baicoianu 
Date:   Wed Sep 18 08:04:35 2019 -0700

    object.onbeforerender event listener support

diff --git a/scripts/object.js b/scripts/object.js
index 691a52c4714c321a18d511eae1919233eb73c406..
index ..614146e455d3e6932b200420477650d0cb01c2b3 100644
--- a/scripts/object.js
+++ b/scripts/object.js
@@ -36,6 +36,7 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
         onloadstart: { type: 'callback' },
         onloadprogress: { type: 'callback' },
         onload: { type: 'callback' },
+        onbeforerender: { type: 'callback', set: this.setupOnBeforeRenderListener },
       });
       //elation.events.add(this, 'thing_init3d', elation.bind(this, this.assignTextures));

@@ -911,6 +912,12 @@ elation.require(['janusweb.janusbase', 'janusweb.websurface'], function() {
       }
       return 0;
     }
+    this.setupOnBeforeRenderListener = function(type, args, arg2, arg3) {
+      if (this.onbeforerender) {
+        console.log('set it up!!!!', this.onbeforerender, type, args, arg2, arg3, this);
+        this.objects['3d'].onBeforeRender = this.onbeforerender;
+      }
+    }
     this.getProxyObject = function(classdef) {
       if (!this._proxyobject) {
         this._proxyobject = elation.engine.things.janusobject.extendclass.getProxyObject.call(this, classdef);

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