Locally it runs fine (although it just occurred to me that the jaguar.3DS file is in the same folder as the jar). I've tried variations of the Loader.load3DS line and none of them work either.
import java.awt.*;
import java.applet.*;
import com.threed.jpct.*;
public class RacerMusic extends Applet {
private FrameBuffer buffer;
private World theWorld;
private Object3D car;
private Camera camera;
private AudioClip music;
private float cameraToObjectDistance, cameraDisplacement;
public void init() {
try {
music = Applet.newAudioClip(this.getClass().getResource("TheSign.wav"));
}
catch (Exception e) {}
buffer = new FrameBuffer(800, 600, FrameBuffer.SAMPLINGMODE_NORMAL);
buffer.enableRenderer(IRenderer.RENDERER_SOFTWARE);
Config.maxPolysVisible = 250000;
Config.collideOffset = 500;
Config.oldStyle3DSLoader = true;
theWorld = new World();
theWorld.setAmbientLight(100, 100, 100);
camera = theWorld.getCamera();
car = Object3D.mergeAll(Loader.load3DS(this.getClass().getResource("./jaguar.3DS"), "jaguar.3DS", 1f));
theWorld.addObject(car);
theWorld.buildAllObjects();
System.out.println("Got this far (past loading the model).");
follow();
System.out.println("Got this far. 2");
}
private void follow() {
Matrix matrix = car.getWorldTransformation().invert3x3();
camera.setBack(matrix);
camera.setPosition(car.getTransformedCenter());
camera.rotateCameraX((float)Math.toRadians(100+cameraDisplacement));
camera.moveCamera(Camera.CAMERA_MOVEOUT, cameraToObjectDistance);
}
public void paint(Graphics g) {
if (buffer == null || theWorld == null)
return;
buffer.clear(Color.black);
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.display(g);
}
public void start() {
music.loop();
}
public void stop() {}
public void destroy() {}
}
EDIT: The HTML file (I want it to run via AppletLoader):
<html>
<applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="."
width="800" height="600">
<param name="java_arguments" value="-Xmx320m">
<param name="al_title" value="Racer Music v. 0.1">
<param name="al_main" value="RacerMusic">
<!-- logo to paint while loading, will be centered -->
<param name="al_logo" value="Car.gif">
<!-- progressbar to paint while loading. Will be painted on top of logo, width clipped to percentage done -->
<param name="al_progressbar" value="appletprogress.gif">
<!-- signed windows natives jar in a jar -->
<param name="al_windows" value="windows_natives.jar.lzma">
<!-- List of Jars to add to classpath -->
<param name="al_jars" value="RacerMusic.jar, Data.jar, jpct.jar, lwjgl_applet.jar.pack.lzma,
lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma, res.jar.lzma">
<!-- signed linux natives jar in a jar -->
<param name="al_linux" value="linux_natives.jar.lzma">
<!-- signed mac osx natives jar in a jar -->
<param name="al_mac" value="macosx_natives.jar.lzma">
<!-- signed solaris natives jar in a jar -->
<param name="al_solaris" value="solaris_natives.jar.lzma">
<!-- Tags under here are optional -->
<!-- Version of Applet, important otherwise applet won't be cached, version change will update applet, must be
int or float -->
<!-- <param name="al_version" value="0.1"> -->
<!-- background color to paint with, defaults to white -->
<!-- <param name="al_bgcolor" value="000000"> -->
<!-- foreground color to paint with, defaults to black -->
<!-- <param name="al_fgcolor" value="ffffff"> -->
<!-- error color to paint with, defaults to red -->
<!-- <param name="al_errorcolor" value="ff0000"> -->
<!-- whether to run in debug mode -->
<!-- <param name="al_debug" value="false"> -->
<!-- whether to prepend host to cache path - defaults to true -->
<param name="al_prepend_host" value="false">
</applet>
<p>
if <code>al_debug</code> is true the applet will load and extract resources with a delay, to be able to see the
loader process.
</p>
</body>
</html>