Interface AnimationFrameCallback

  • All Superinterfaces:
    org.teavm.jso.JSObject
    All Known Implementing Classes:
    TeaRenderer
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface AnimationFrameCallback
    extends org.teavm.jso.JSObject
    Callback function that is invoked from JavaScript during every frame update performed by the browser.

    The animation loop is implemented using the requestAnimationFrame browser API. The same animation loop is used for both updates and rendering, so rather than having two separate animation loops the difference is indicated by different arguments being provided to the callback.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onFrame​(float deltaTime, boolean render)  
      • Methods inherited from interface org.teavm.jso.JSObject

        cast
    • Method Detail

      • onFrame

        void onFrame​(float deltaTime,
                     boolean render)