Clay
clay.Clay (Class)
Clay app
Static Members
app: Clay
Get Clay instance from anywhere with Clay.app
Instance Members
config: Config
Clay config
events: Events
Clay events handler
io: IO
Clay io (implementation varies depending on the target)
assets: Assets
Clay assets
audio: Audio
Clay audio
input: Input
Clay input
runtime: Runtime
Clay runtime (implementation varies depending on the target)
shuttingDown: Bool
true
if shut down has begun
hasShutdown: Bool
true
if shut down has completed
timestamp: Float
The last known timestamp in seconds, or -1
if not defined yet
appId: String
App identifier
screenWidth: Int
Main window screen width
screenHeight: Int
Main window screen height
screenDensity: Float
Main window screen density (device pixel ratio)
backgroundQueue: BackgroundQueue
Shared background queue
immediateShutdown: Bool
freeze: Bool
Whether or not we are frozen, ignoring events i.e backgrounded/paused
ready: Bool
Whether or not the ready state has been reached
shutdown(): Void
Private Members
nextTick: Float
Used for update loop and update rate
windowInBackground: Bool
init(): Void
emitQuit(): Void
Name | Type |
---|---|
newTimestamp |
Float |
Returns |
---|
Bool |
Name | Type |
---|---|
newTimestamp |
Float |
emitRender(): Void
Name | Type |
---|---|
type |
WindowEventType |
timestamp |
Float |
windowId |
Int |
x |
Int |
y |
Int |
emitAppEvent(type: AppEventType): Void
Name | Type |
---|---|
type |
AppEventType |
extractAppId(): Void
defaultConfig(): Config
Returns |
---|
Config |
defaultWindowConfig(): WindowConfig
Returns |
---|
WindowConfig |
defaultRenderConfig(): RenderConfig
Returns |
---|
RenderConfig |
defaultRuntimeConfig(): RuntimeConfig
Returns |
---|
RuntimeConfig |
copyWindowConfig(config: WindowConfig): WindowConfig
Name | Type |
---|---|
config |
WindowConfig |
Returns |
---|
WindowConfig |
copyRenderConfig(config: RenderConfig): RenderConfig
Name | Type |
---|---|
config |
RenderConfig |
Returns |
---|
RenderConfig |
updateScreen(): Void
Create a new Clay app
Name | Type | Description |
---|---|---|
configure |
Function | |
events |
Events | Events handler to get feedback from Clay |