From 416ce9d4954e0a7f4ee7b9afe43bf691fdb276f4 Mon Sep 17 00:00:00 2001 From: hwc487 Date: Fri, 6 Apr 2012 05:18:48 -0700 Subject: texture notifications --- js/lib/drawing/world.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'js/lib/drawing') diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js index 402563e9..da8a26ad 100755 --- a/js/lib/drawing/world.js +++ b/js/lib/drawing/world.js @@ -239,6 +239,7 @@ var World = function GLWorld( canvas, use3D, preserveDrawingBuffer ) { this.myScene.render(); if (this._firstRender) { + this._notifier.sendNotification( this._notifier.FIRST_RENDER ); if (this._canvas.task) { this._firstRender = false; @@ -828,7 +829,6 @@ World.prototype.exportObjectsJSON = function( obj, parentObj ) } - World.prototype.findTransformNodeByMaterial = function( materialNode, trNode ) { //if (trNode == null) trNode = this._ctrNode; if (trNode == null) trNode = this._rootNode; @@ -926,6 +926,29 @@ World.prototype.importObjectJSON = function( jObj, parentGeomObj ) return obj; }; +World.prototype.refreshTextures = function( obj ) +{ + if (obj == null) obj = this._geomRoot; + if (!obj) return; + if (obj._materialArray) + { + var nMats = obj._materialArray.length; + for (var i=0; i