animtour3d.java

来自「java3D game engine design of the source 」· Java 代码 · 共 44 行

JAVA
44
字号
// AnimTour3D.java// Andrew Davison, April 2005, ad@fivedots.coe.psu.ac.th/* The usual checkboard world and a user-controlled 3D sprite    (the tourist) who has an animated walking movement.   The tourist cam move about on the XZ plane but can not    move off the board.   No scenery and obstacles, but it's easy to borrow code from   /Tour3D*/import javax.swing.*;import java.awt.*;public class AnimTour3D extends JFrame{  public AnimTour3D()   {    super("Animated 3D Tour");    Container c = getContentPane();    c.setLayout( new BorderLayout() );    WrapAnimTour3D w3d = new WrapAnimTour3D();    c.add(w3d, BorderLayout.CENTER);    setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );    pack();    setResizable(false);    // fixed size display    setVisible(true);  } // end of AnimTour3D()// -----------------------------------------  public static void main(String[] args)  { new AnimTour3D(); }} // end of AnimTour3D class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?