Module

Graphics.Phaser.CoreTypes

Package
purescript-phaser
Repository
lfarroco/purescript-phaser

#PhaserNamespace Source

#Time Source

type Time = Number

#Delta Source

type Delta = Number

#Vector Source

type Vector = { x :: Number, y :: Number }

#Dimensions Source

type Dimensions = { height :: Number, width :: Number }

#InputConfig Source

type InputConfig = { activePointers :: Int, gamepad :: Boolean, keyboard :: Boolean, mouse :: Boolean, smoothFactor :: Number, touch :: Boolean, windowEvents :: Boolean }

#BannerConfig Source

type BannerConfig = { background :: Array String, hidePhaser :: Boolean, text :: String }

#ScaleConfig Source

type ScaleConfig = { autoCenter :: Int, autoRound :: Boolean, expandParent :: Boolean, height :: Int, max :: Int, min :: Int, mode :: Int, parent :: HTMLElement, resizeInterval :: Int, width :: Int, zoom :: Number }

#DOMContainerConfig Source

type DOMContainerConfig = { behindCanvas :: Boolean, createContainer :: Boolean, pointerEvents :: String }

#FPSConfig Source

type FPSConfig = { deltaHistory :: Int, forceSetTimeOut :: Boolean, min :: Int, panicMax :: Int, smoothStep :: Boolean, target :: Int }

#RenderConfig Source

type RenderConfig = { antialias :: Boolean, antialiasGL :: Boolean, batchSize :: Int, clearBeforeRender :: Boolean, desynchronized :: Boolean, failIfMajorPerformanceCaveat :: Boolean, maxLights :: Int, maxTextures :: Int, mipmapFilter :: String, pixelArt :: Boolean, powerPreference :: String, premultipliedAlpha :: Boolean, preserveDrawingBuffer :: Boolean, roundPixels :: Boolean, transparent :: Boolean }

#CallbacksConfig Source

type CallbacksConfig = { postBoot :: BootCallback, preBoot :: BootCallback }

#LoaderConfig Source

type LoaderConfig = { async :: Boolean, baseURL :: String, crossOrigin :: String, maxParallelDownloads :: Int, password :: String, path :: String, responseType :: String, timeout :: Int, user :: String }

#ImagesConfig Source

type ImagesConfig = { default :: String, missing :: String, white :: String }

These are paths to base64 textures

#PhysicsConfig Source

type PhysicsConfig = { arcade :: ArcadeWorldConfig, default :: String }

Arcade / Matter Configs aren't fully implemented yet

#PluginObject Source

type PluginObject = { default :: Array String, defaultMerge :: Array String, global :: Array PluginObjectItem, scene :: Array PluginObjectItem }

#AudioConfig Source

type AudioConfig = { context :: AudioContext, disableWebAudio :: Boolean, noAudio :: Boolean }

#ArcadeWorldConfig Source

type ArcadeWorldConfig = { debug :: Boolean, gravity :: { x :: Number, y :: Number } }

#SettingsConfig Source

type SettingsConfig = { active :: Boolean, cameras :: Array JSONCamera, key :: String, pack :: PackFileSection, visible :: Boolean }

#HasNodeEventEmitter Source

class HasNodeEventEmitter :: forall k. k -> Constraintclass HasNodeEventEmitter a 

This is somewhat confusing. Some phaser objects inherit direct from Event Emitter Because of that you can do img.on or img.emit These objects are classified under EventEmitter. But other objects have a property .events that is an instance of event emitter (scene.events.on, game.events.emit, etc.) This typeclass identifies objects that have the .events property.

Instances

#ArcadeGroup Source

#EventListener Source