Code: Select all
Exception in thread "main" java.lang.IllegalStateException: timer not attached!
at de.jreality.tools.Timer.start(Timer.java:122)
Code: Select all
Exception in thread "main" java.lang.IllegalStateException: timer not attached!
at de.jreality.tools.Timer.start(Timer.java:122)
Code: Select all
...
import de.jreality.tools.Timer;
...
final Appearance rootApp= new Appearance();
...
ToolSystem toolSystem = ToolSystem.toolSystemForViewer(viewer);
toolSystem.initializeSceneTools();
Timer timer = new Timer(10, new ActionListener() {
int count = 0;
public void actionPerformed(ActionEvent arg0) {
count++;
if (count > 255) count = 0;
rootApp.setAttribute(CommonAttributes.DIFFUSE_COLOR, new Color(count, 0, (255-count)));
}
});
...