package a3test.etc;

import jp.sourceforge.acerola3d.a3.*;
import javax.media.j3d.Node;
import java.net.URL;

/*
 * 実際のところsetShape()だけでは大変すぎるので、
 * replaceShape()を作った。それのテスト。
 */
public class OverwriteShape2 {
    public static void main(String args[]) throws Exception {
        A3Window w = new A3Window(300,300);
        w.setNavigationMode(A3CanvasInterface.NaviMode.EXAMINE);
        Action3D a3 = new Action3D("x-res:///mannequin.a3");
        a3.setLoc(0.0,-0.5,0.0);

        Node n = Util.loadVRML_B(new URL("x-rzip:x-res:///du_head.a3!/kappa_head.wrl"));
        a3.replaceShape("Head.wrl",n);
        n = Util.loadVRML_B(new URL("x-rzip:x-res:///du_body.a3!/kappa_body.wrl"));
        a3.replaceShape("Body.wrl",n);

        w.add(a3);
        Thread.sleep(1000);
        a3.change("walk");
        Thread.sleep(1000);
        a3.change("default");
    }
}
