예제 #1
0
 /**
  * Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer. By
  * default it will use all of them. The second parameter is used to control whether this is a
  * user-set hard minimum or something set by the browser internals. User set values are always
  * treated as the minimum unless the browser internals set a value that is a slower framerate than
  * the user set. If the browser then sets a faster framerate than the user set value, the user
  * value is used instead.
  *
  * @param millis The minimum time in milleseconds.
  * @param userSet true if this is an end-user set minimum
  */
 public void setMinimumFrameInterval(int millis, boolean userSet) {
   mainCanvas.setMinimumFrameInterval(millis, userSet);
 }
예제 #2
0
 /**
  * Invoked when the component has been made visible.
  *
  * @param evt The event
  */
 public void componentShown(ComponentEvent evt) {
   if (frameCycleTime < 0) mainCanvas.setMinimumFrameInterval(0, false);
   else mainCanvas.setMinimumFrameInterval(frameCycleTime, false);
 }
예제 #3
0
 /**
  * Invoked when a window is changed from a normal state to minimzed.
  *
  * @param evt The window event that caused the method to be called.
  */
 public void windowIconified(WindowEvent evt) {
   mainCanvas.setMinimumFrameInterval(1000 / PAUSED_FPS, false);
 }
예제 #4
0
 /**
  * Invoked when the component has been made invisible.
  *
  * @param evt The event
  */
 public void componentHidden(ComponentEvent evt) {
   mainCanvas.setMinimumFrameInterval(1000 / PAUSED_FPS, false);
 }
예제 #5
0
  /**
   * Invoked when a window is changed from a minimized to a normal state.
   *
   * @param evt The window event that caused the method to be called.
   */
  public void windowDeiconified(WindowEvent evt) {
    if (frameMillis < 0) mainCanvas.setMinimumFrameInterval(0, false);
    else mainCanvas.setMinimumFrameInterval(frameMillis, false);

    j3dCanvas.requestFocusInWindow();
  }