Package org.khronos.webgl

Platform and version requirements: JS

Kotlin JavaScript wrappers for the WebGL API.

Types

ArrayBuffer

open external class ArrayBuffer : BufferDataSource

Exposes the JavaScript ArrayBuffer to Kotlin

ArrayBufferView

external interface ArrayBufferView : BufferDataSource

Exposes the JavaScript ArrayBufferView to Kotlin

BufferDataSource

external interface BufferDataSource

DataView

open external class DataView : ArrayBufferView

Exposes the JavaScript DataView to Kotlin

Float32Array

open external class Float32Array : ArrayBufferView

Exposes the JavaScript Float32Array to Kotlin

Float64Array

open external class Float64Array : ArrayBufferView

Exposes the JavaScript Float64Array to Kotlin

Int16Array

open external class Int16Array : ArrayBufferView

Exposes the JavaScript Int16Array to Kotlin

Int32Array

open external class Int32Array : ArrayBufferView

Exposes the JavaScript Int32Array to Kotlin

Int8Array

open external class Int8Array : ArrayBufferView

Exposes the JavaScript Int8Array to Kotlin

TexImageSource

external interface TexImageSource

Uint16Array

open external class Uint16Array : ArrayBufferView

Exposes the JavaScript Uint16Array to Kotlin

Uint32Array

open external class Uint32Array : ArrayBufferView

Exposes the JavaScript Uint32Array to Kotlin

Uint8Array

open external class Uint8Array : ArrayBufferView

Exposes the JavaScript Uint8Array to Kotlin

Uint8ClampedArray

open external class Uint8ClampedArray : ArrayBufferView

Exposes the JavaScript Uint8ClampedArray to Kotlin

WebGLActiveInfo

abstract external class WebGLActiveInfo

Exposes the JavaScript WebGLActiveInfo to Kotlin

WebGLBuffer

abstract external class WebGLBuffer : WebGLObject

Exposes the JavaScript WebGLBuffer to Kotlin

WebGLContextAttributes

external interface WebGLContextAttributes

WebGLContextEvent

open external class WebGLContextEvent : Event

Exposes the JavaScript WebGLContextEvent to Kotlin

WebGLContextEventInit

external interface WebGLContextEventInit : EventInit

WebGLFramebuffer

abstract external class WebGLFramebuffer : WebGLObject

Exposes the JavaScript WebGLFramebuffer to Kotlin

WebGLObject

abstract external class WebGLObject

WebGLProgram

abstract external class WebGLProgram : WebGLObject

Exposes the JavaScript WebGLProgram to Kotlin

WebGLRenderbuffer

abstract external class WebGLRenderbuffer : WebGLObject

Exposes the JavaScript WebGLRenderbuffer to Kotlin

WebGLRenderingContext

abstract external class WebGLRenderingContext : 
    WebGLRenderingContextBase,
    RenderingContext

Exposes the JavaScript WebGLRenderingContext to Kotlin

WebGLRenderingContextBase

external interface WebGLRenderingContextBase

WebGLShader

abstract external class WebGLShader : WebGLObject

Exposes the JavaScript WebGLShader to Kotlin

WebGLShaderPrecisionFormat

abstract external class WebGLShaderPrecisionFormat

Exposes the JavaScript WebGLShaderPrecisionFormat to Kotlin

WebGLTexture

abstract external class WebGLTexture : WebGLObject

Exposes the JavaScript WebGLTexture to Kotlin

WebGLUniformLocation

abstract external class WebGLUniformLocation

Exposes the JavaScript WebGLUniformLocation to Kotlin

Functions

WebGLContextAttributes

fun WebGLContextAttributes(
    alpha: Boolean? = true,
    depth: Boolean? = true,
    stencil: Boolean? = false,
    antialias: Boolean? = true,
    premultipliedAlpha: Boolean? = true,
    preserveDrawingBuffer: Boolean? = false,
    preferLowPowerToHighPerformance: Boolean? = false,
    failIfMajorPerformanceCaveat: Boolean? = false
): WebGLContextAttributes

WebGLContextEventInit

fun WebGLContextEventInit(
    statusMessage: String? = "",
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): WebGLContextEventInit

get

operator fun Int8Array.get(index: Int): Byte
operator fun Uint8Array.get(index: Int): Byte
operator fun Uint8ClampedArray.get(index: Int): Byte
operator fun Int16Array.get(index: Int): Short
operator fun Uint16Array.get(index: Int): Short
operator fun Int32Array.get(index: Int): Int
operator fun Uint32Array.get(index: Int): Int
operator fun Float32Array.get(index: Int): Float
operator fun Float64Array.get(index: Int): Double

set

operator fun Int8Array.set(index: Int, value: Byte)
operator fun Uint8Array.set(index: Int, value: Byte)
operator fun Uint8ClampedArray.set(index: Int, value: Byte)
operator fun Int16Array.set(index: Int, value: Short)
operator fun Uint16Array.set(index: Int, value: Short)
operator fun Int32Array.set(index: Int, value: Int)
operator fun Uint32Array.set(index: Int, value: Int)
operator fun Float32Array.set(index: Int, value: Float)
operator fun Float64Array.set(index: Int, value: Double)