|
|
Line 46: |
Line 46: |
| | | |
| | | |
− | Setting non-standard Applet heap size in html:
| + | == Code Snippets == |
− | Just add <param name="java_arguments" value="-Xmx256m"> where 256m can be the size in MB of your heap. Ex.:
| + | |
− | | + | |
− | <APPLET archive="MyApplet.jar" code="MyApplet" width="640" height="320">
| + | |
− | <param name="java_arguments" value="-Xmx256m">
| + | |
− | </APPLET>
| + | |
− | | + | |
− | Initializing the lwjgl joystick:
| + | |
− | Controllers controllers = new Controllers();
| + | |
− | try {
| + | |
− | controllers.create();
| + | |
− | if (controllers.getControllerCount() > 0) {
| + | |
− | joystick = controllers.getController(0);
| + | |
− | System.out.println("Joystick has "+joystick.getButtonCount() +" buttons. Its name is "+joystick.getName());
| + | |
− | }
| + | |
− | else joystick = null;
| + | |
− | }
| + | |
− | catch (org.lwjgl.LWJGLException e) {System.err.println("Couldn't initialize Controllers: "+e.getMessage());}
| + | |
− | | + | |
− | Using the lwjgl joystick:
| + | |
− | Inside the main applet loop:
| + | |
− | if (joystick != null) {
| + | |
− | joystick.poll();
| + | |
− | rotateZ += joystick.getXAxisValue()/2f;
| + | |
− | if (joystick.isButtonPressed(0))
| + | |
− | ;//DO SOMETHING
| + | |
− | }
| + | |
Revision as of 08:54, 24 April 2009
The jPCT wiki
jPCT is a free, small, fast and easy to learn 3D engine for Java. It offers support for software and hardware rendering. This Wiki should help people with tutorials, instructions and samples. If you think that you have something to contribute, just create an account and go for it...
jPCT ressources
The jPCT homepage
The jPCT community
Installation
Requirements
How to install
How to start
First steps
Hello World
Loading models
Advanced example
Applets
Advanced topics
The different renderers
Collision detection
Multithreading
Compiled objects
Shaders
Physics
Code Snippets