Events

@:dox(show)observedDirty(instance:Settings, fromSerializedField:Bool):Void

Event when any observable value as changed on this instance.

@:dox(show)targetWidthChange(current:Int, previous:Int):Void

Event when targetWidth field changes.

@:dox(show)targetHeightChange(current:Int, previous:Int):Void

Event when targetHeight field changes.

@:dox(show)windowWidthChange(current:Int, previous:Int):Void

Event when windowWidth field changes.

@:dox(show)windowHeightChange(current:Int, previous:Int):Void

Event when windowHeight field changes.

@:dox(show)targetDensityChange(current:Int, previous:Int):Void

Event when targetDensity field changes.

@:dox(show)backgroundChange(current:Color, previous:Color):Void

Event when background field changes.

@:dox(show)scalingChange(current:ScreenScaling, previous:ScreenScaling):Void

Event when scaling field changes.

@:dox(show)titleChange(current:String, previous:String):Void

Event when title field changes.

@:dox(show)fullscreenChange(current:Bool, previous:Bool):Void

Event when fullscreen field changes.

@:dox(show)targetFpsChange(current:Int, previous:Int):Void

Event when targetFps field changes.

@:dox(show)maxDeltaChange(current:Float, previous:Float):Void

Event when maxDelta field changes.

@:dox(show)overrideDeltaChange(current:Float, previous:Float):Void

Event when overrideDelta field changes.

@:dox(show)preventDefaultMouseWheelChange(current:Bool, previous:Bool):Void

Event when preventDefaultMouseWheel field changes.

@:dox(show)preventDefaultTouchesChange(current:Bool, previous:Bool):Void

Event when preventDefaultTouches field changes.

Variables

@:value(false)observedDirty:Bool = false

Default is false, automatically set to true when any of this instance's observable variables has changed.

@:value(0)@observetargetWidth:Int = 0

Target width. Affects window size at startup (unless windowWidth is specified) and affects screen scaling at any time. Ignored if set to 0 (default)

@:value(0)@observetargetHeight:Int = 0

Target height. Affects window size at startup (unless windowHeight is specified) and affects screen scaling at any time. Ignored if set to 0 (default)

@:value(0)@observeread onlywindowWidth:Int = 0

Target window width at startup Uses targetWidth as fallback if set to 0 (default)

@:value(0)@observeread onlywindowHeight:Int = 0

Target window height at startup Uses targetHeight as fallback if set to 0 (default)

@:value(0)@observetargetDensity:Int = 0

Target density. Affects the quality of textures being loaded. Changing it at runtime will update texture quality if needed. Ignored if set to 0 (default)

@:value(Color.BLACK)@observebackground:Color = Color.BLACK

Background color.

@:value(FIT)@observescaling:ScreenScaling = FIT

Screen scaling (FIT, FILL, RESIZE or FIT_RESIZE).

@:value("App")@observetitle:String = "App"

App window title.

@:value(false)@observefullscreen:Bool = false

Fullscreen enabled or not.

@:value(-1)@observetargetFps:Int = -1

Target FPS. Using default FPS if value < 1 or try to match the given value if >= 1.

@:value(0.1)@observemaxDelta:Float = 0.1

Maximum app update delta time. During app update (at each frame), app.delta will be capped to maxDelta if its value is above maxDelta. If needed, use app.realDelta to get real elapsed time since last frame.

@:value(-1)@observeoverrideDelta:Float = -1

Override app update delta time. This can be used to ignore completely the actual elapsed time between frames and replace it with an explicit delta time of your choice. This will affect timers, tween, systems update etc... Use with caution.

@:value(true)@observepreventDefaultMouseWheel:Bool = true

If set to true (default). Default mouse wheel events will be prevented. This is relevant when running the ceramic app from an iframe inside a page that can scroll.

@:value(true)@observepreventDefaultTouches:Bool = true

If set to true (default). Default touch events will be prevented. This is relevant when running the ceramic app from an iframe inside a page that can scroll, on a touchscreen device.

@:value(NONE)read onlyorientation:ScreenOrientation = NONE

Setup screen orientation. Default is NONE, meaning nothing is enforced and project defaults will be used.

@:value(null)read onlycollections:() ‑> AutoCollections = null

App collections.

@:value(null)read onlyappInfo:Dynamic = null

App info (useful when dynamically loaded, not needed otherwise).

@:value(0)read onlyantialiasing:Int = 0

Antialiasing value (0 means disabled).

@:value(false)read onlyresizable:Bool = false

Whether the window can be resized or not.

@:value("assets")read onlyassetsPath:String = "assets"

Assets path.

@:value({ })read onlybackend:Dynamic = { }

Settings passed to backend.

@:value("font:RobotoMedium")read onlydefaultFont:AssetId<String> = "font:RobotoMedium"

Default font

@:value("shader:textured")read onlydefaultShader:AssetId<String> = "shader:textured"

Default shader

Methods