Class TeaRenderer
java.lang.Object
nl.colorize.multimedialib.renderer.teavm.TeaRenderer
- All Implemented Interfaces:
Renderer
Renderer based on TeaVM that is transpiled to
JavaScript and runs in the browser. Rendering graphics can switch between
different frameworks, the requested renderer can be indicated during the
build or at runtime using a URL parameter.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
start
(Scene initialScene, ErrorHandler errorHandler) Initializes this renderer and starts playing the requested scene.void
Ends the animation loop, stops this renderer, and quits the application.toString()
static TeaRenderer
withCanvas
(DisplayMode displayMode) static TeaRenderer
withPixi
(DisplayMode displayMode) static TeaRenderer
withThree
(DisplayMode displayMode) static TeaRenderer
withWebGL
(GraphicsMode graphicsMode, DisplayMode displayMode)
-
Method Details
-
start
Description copied from interface:Renderer
Initializes this renderer and starts playing the requested scene. Errors that occur during the application will be forwarded to the specified error handler.As explained in the class documentation, this is the only method in
Renderer
that can be safely called from outside the renderer's application loop. -
getGraphicsMode
- Specified by:
getGraphicsMode
in interfaceRenderer
-
getDisplayMode
- Specified by:
getDisplayMode
in interfaceRenderer
-
terminate
public void terminate()Description copied from interface:Renderer
Ends the animation loop, stops this renderer, and quits the application.Renderer
instances cannot be reused, restarting a previously terminated renderer is not possible. -
toString
-
withCanvas
-
withWebGL
-
withPixi
-
withThree
-