You can set the image.onload event image.onload as follows:
var big_image = new Image(); big_image.onload = function () { texture.image("models/testLargeMap_map0.jpg"); } big_image.src = "models/testLargeMap_map0.jpg";
(Note that I first set the onload handler and then set the src attribute. If I do it the other way around, it does not work in IE).
Preload the image before calling texture.image . I donβt know anything about this library, so I canβt be sure that it will use the preloaded image.
source share