i new three.js
. in project can move through series of planes cross section images of object. problem material doesn't load right away , moving , down causes of planes display black. need change behavior. there way either
- change property plane transparent - image should still opaque when loaded
- or don't display/render plane @ until texture loaded?
i'm not @ sure on right track, , hoping more experienced can suggest specific fix.
thanks!
not sure if cleared made handy little function take care of modifying opacity setting, basic of are:
function loadtexture( path ){ var mat = new three.meshbasicmaterial({ map: new three.imageutils.loadtexture( path, null, function() { mat.opacity = 1; } ), opacity: 0 }); return mat; }
Comments
Post a Comment