lizhao21st / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

viewer.onloadingcomplete issue #170

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

When I use viewer.onloadingcomplete for do something after loading completed. 
What is the right place to use this function. 

Other functions like changeCarBodyColor() inside "objects[i].hasTexture()" will 
display true or false correctly.

But am using "objects[i].hasTexture()" inside of the onloadingcomplete function 
it won't work(all are false).

Here is my code:

viewer.onloadingcomplete = function() {
        var scene = viewer.getScene();
        if (scene) {
            var parts = scene.getChildren();
            for (var i = 0; i < parts.length; i++) {
                console.log(parts[i].hasTexture());
            }
        }
    };

Original issue reported on code.google.com by vignesh....@gmail.com on 6 Aug 2015 at 8:43