javascript - Three.js: no luck updating cube textures on runtime with r59 -
i created cube using canvas renderer r59 of three.js. cube has different textures on different sides. renders okay. can tween cube's position , rotation, it's fine. here's want do: a) cube has image texture on it's front side. b) move cube out of camera's view. c) change image texture on cube. d) move cube original coordinates becomes visible again. so far, steps a, b , d working. when try implement step c, stops working. here relevant code parts... <body> <script src="build/three.min.js"></script> <script src="js/libs/tween.min.js"></script> <script> var container; var camera, scene, renderer, group, particle; var cubemesh; var matcollection = []; var materials = []; init(); animate(); function init() { container = document.createelement( 'div' ); document.body.appendchild( container );