repo: janusweb action: commit revision: path_from: revision_from: faa459ea30bf7f76d705ff96f9d19bc9ea1d4cca: path_to: revision_to:
commit faa459ea30bf7f76d705ff96f9d19bc9ea1d4cca Author: James BaicoianuDate: Wed Sep 18 08:04:35 2019 -0700 object.onbeforerender event listener support diff --git a/scripts/object.js b/scripts/object.js
--- 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-----