Here is my code. I use room 3d model exported to away3dlite by Prefab.
I add all walls from this models to walls ObjectContainer3D and then
try to use canvases to pushback walls.
I get RangeError: Error #2006: at
away3dlite.core.render::BasicRenderer/collectFaces()
(here is the line in collectFaces that causes this error)
_child_canvas.parent.setChildIndex(_child_canvas,
children.indexOf(child));

I've got no idea why this error occurds with my models but does not
occur with primitives like cube or sphere.

private function extractWalls(container:ObjectContainer3D):void
                {
                        walls.addChild(container.getChildByName("left"));
                        walls.addChild(container.getChildByName("front"));
                        walls.addChild(container.getChildByName("right"));
                        walls.addChild(container.getChildByName("top"));
                        walls.addChild(container.getChildByName("down"));
                }

                private var walls:ObjectContainer3D;

                private function initModel():void
                {
                        this.room = new HomeFull();

                        this.walls = new ObjectContainer3D();
                        this.extractWalls( HomeFull(this.room).containers[1]);
                        this.scene.addChild(this.walls);
                        this.walls.canvas = Sprite(this.view.addChild(new 
Sprite()));

                        this.scene.addChild(this.room);
                        this.room.canvas = Sprite(this.view.addChild(new 
Sprite()));
                        view.render();
                }

Reply via email to