コード例 #1
0
  @Override
  public void execute(double timestamp) {
    try {
      mainLoop();
    } catch (Throwable t) {
      Log.error("GwtApplication: exception: " + t.getMessage(), t);
      throw new ParallaxRuntimeException(t);
    }

    animationHandle = AnimationScheduler.get().requestAnimationFrame(this, canvas);
  }
コード例 #2
0
  @Override
  public void setAnimation(Animation animation) {
    this.listener = animation;
    // tell listener about app creation
    try {
      renderer.setDefaultGLState();

      if (listener instanceof InputHandler) input.setInputHandler((InputHandler) listener);
      listener.onStart(this);
      listener.onResize(this);

      for (AnimationReadyListener ready : animationReadyListener) ready.onAnimationReady(listener);

    } catch (Throwable t) {
      Log.error("GwtRendering: exception: " + t.getMessage(), t);
      t.printStackTrace();
      throw new ParallaxRuntimeException(t);
    }

    run();
  }