Clay
clay.Clay (Class)
Clay app
Static Members
app: ClayGet Clay instance from anywhere with Clay.app
Instance Members
config: ConfigClay config
events: EventsClay events handler
io: IOClay io (implementation varies depending on the target)
assets: AssetsClay assets
audio: AudioClay audio
input: InputClay input
runtime: RuntimeClay runtime (implementation varies depending on the target)
shuttingDown: Booltrue if shut down has begun
hasShutdown: Booltrue if shut down has completed
timestamp: FloatThe last known timestamp in seconds, or -1 if not defined yet
appId: StringApp identifier
screenWidth: IntMain window screen width
screenHeight: IntMain window screen height
screenDensity: FloatMain window screen density (device pixel ratio)
backgroundQueue: BackgroundQueueShared background queue
immediateShutdown: Boolfreeze: BoolWhether or not we are frozen, ignoring events i.e backgrounded/paused
ready: BoolWhether or not the ready state has been reached
shutdown(): VoidPrivate Members
nextTick: FloatUsed for update loop and update rate
windowInBackground: Boolinit(): VoidemitQuit(): 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(): VoiddefaultConfig(): 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(): VoidCreate a new Clay app
| Name | Type | Description |
|---|---|---|
configure |
Function | |
events |
Events | Events handler to get feedback from Clay |