Package-level declarations

Types

Link copied to clipboard
class AndroidClipboard(val context: Context) : Clipboard
Link copied to clipboard
class AndroidConfiguration(val activity: Activity, val title: String, val backgroundColor: Color = Color.CLEAR, val showStatusBar: Boolean = true, val useImmersiveMode: Boolean = true, val useWakeLock: Boolean = true) : ContextConfiguration
Link copied to clipboard
class AndroidContext(val configuration: AndroidConfiguration) : Context
Link copied to clipboard
class AndroidGL(engineStats: EngineStats) : GL
Link copied to clipboard
Link copied to clipboard
class AppStats

Application runtime statistics.

Link copied to clipboard
open class AssetProvider(val context: Context)

Provides helper functions to load and prepare assets without having to use null or lateinit.

Link copied to clipboard
class BitmapFontAssetParameter(val magFilter: TexMagFilter = TexMagFilter.NEAREST, val mipmaps: Boolean = true, val preloadedTextures: List<TextureSlice> = listOf()) : GameAssetParameters
Link copied to clipboard
abstract class Context

The context of the application. This contains instances and references to the OpenGL context and utilities to assist in creating an OpenGL applicaiton.

Link copied to clipboard
abstract class ContextConfiguration
Link copied to clipboard
abstract class ContextListener(val context: Context)

A ContextListener is the base of an Context when it is created, rendering, or destroyed.

Link copied to clipboard
interface Disposable
Link copied to clipboard

OpenGL related engine stats.

Link copied to clipboard
annotation class Experimental

Signals that the annotated annotation class is a marker of an experimental LittleKt API. This means that the API marked is likely unstable and subject to changes without notice.

Link copied to clipboard
open class Game<SceneType : Scene>(val context: Context, firstScene: SceneType? = null) : ContextListener

A ContextListener that handles commonly loading assets and preparing assets. Handles scene switching and caching.

Link copied to clipboard
class GameAsset<T>(val vfsFile: VfsFile)
Link copied to clipboard
Link copied to clipboard
interface Graphics

Contains graphic related properties and methods.

Link copied to clipboard
Link copied to clipboard
class JsConfiguration(val title: String = "LittleKt - JS", val canvasId: String = "canvas", val rootPath: String = "./", val backgroundColor: Color = Color.CLEAR) : ContextConfiguration
Link copied to clipboard
class JvmClipboard(window: Long) : Clipboard
Link copied to clipboard
class JvmConfiguration(val title: String, val width: Int, val height: Int, val vSync: Boolean, val icons: List<String>, val backgroundColor: Color, val resizeable: Boolean, val maximized: Boolean, val windowPosX: Int?, val windowPosY: Int?) : ContextConfiguration
Link copied to clipboard
class LDtkGameAssetParameter(val atlas: TextureAtlas? = null, val tilesetBorderThickness: Int = 2) : GameAssetParameters
Link copied to clipboard
abstract class LittleKtActivity : Activity
Link copied to clipboard
class LittleKtApp(val context: Context)

The base app from starting and stopping a Context.

Link copied to clipboard
actual class LittleKtProps
expect class LittleKtProps

Properties related to creating a LittleKtApp

actual class LittleKtProps
actual class LittleKtProps
Link copied to clipboard
class LwjglContext(val configuration: JvmConfiguration) : Context
Link copied to clipboard
class LwjglGL(engineStats: EngineStats, graphics: Graphics) : GL
Link copied to clipboard
class LwjglGraphics(val context: LwjglContext, engineStats: EngineStats) : Graphics
Link copied to clipboard
class PreparableGameAsset<T>(val action: suspend () -> T)
Link copied to clipboard
typealias RemoveContextCallback = () -> Unit
Link copied to clipboard
abstract class Scene(val context: Context) : Disposable

A base scene. Does nothing on its own and will need to be managed by either a ContextListener or Game.

Link copied to clipboard
class TextureGameAssetParameter(val minFilter: TexMinFilter = TexMinFilter.NEAREST, val magFilter: TexMagFilter = TexMagFilter.NEAREST, val useMipmaps: Boolean = true) : GameAssetParameters
Link copied to clipboard
external class Touch
Link copied to clipboard
external class TouchEvent : UIEvent
Link copied to clipboard
external class TouchList
Link copied to clipboard
class TtfFileAssetParameter(val chars: String = CharacterSets.LATIN_ALL) : GameAssetParameters
Link copied to clipboard
class WebGL(val gl: WebGL2RenderingContext, val platform: Context.Platform, engineStats: EngineStats) : GL
Link copied to clipboard
Link copied to clipboard
class WebGLContext(val configuration: JsConfiguration) : Context
Link copied to clipboard
class WebGLGraphics(val canvas: HTMLCanvasElement, engineStats: EngineStats) : Graphics
Link copied to clipboard
abstract external class WebGLVertexArrayObject : WebGLObject

Functions

Link copied to clipboard
actual fun createLittleKtApp(action: LittleKtProps.() -> Unit): LittleKtApp
expect fun createLittleKtApp(action: LittleKtProps.() -> Unit = {}): LittleKtApp

Creates a new LittleKtApp containing LittleKtProps as the ContextConfiguration for building a Context.

actual fun createLittleKtApp(action: LittleKtProps.() -> Unit): LittleKtApp
actual fun createLittleKtApp(action: LittleKtProps.() -> Unit): LittleKtApp
Link copied to clipboard
fun <T : ContextListener> T.createShader(vertexShader: VertexShader = DefaultVertexShader(), fragmentShader: FragmentShader = DefaultFragmentShader()): ShaderProgram<VertexShader, FragmentShader>

Creates a new ShaderProgram for the specified shaders.