Module flower
Flower library is a lightweight library for Moai SDK.
See:
Memo:
English documentation has been updated. Please contact github://Cloven with issues, questions, or problems regarding the documentation.
Info:
- Release: V3.0.0
- Author: Makoto
Functions
openWindow (title, width, height, scale) | Open the window. |
setDefaultWindowSize (targetDevice, landscape, scaleMode) | Set the size of the assumed device. |
isMobile () | Returns whether the mobile execution environment. |
isDesktop () | Returns whether the desktop execution environment. |
getScreenSize () | Returns the size of the screen. |
getViewSize () | Returns the size of the viewport. |
getViewport () | Returns the Viewport to be used in layers. |
getTexture (path, filter) | Returns the texture. |
getFont (path, charcodes, points, dpi) | Returns the font. |
openScene (sceneName, params) | Opens the scene. |
gotoScene (sceneName, params) | Goto the Scene. |
closeScene (params) | Close the Scene. |
callOnce (func, ...) | Executes a function in a MOAICoroutine. |
Fields
viewport | Default viewport. |
screenWidth | Width of Window. |
screenHeight | Height of Window. |
viewWidth | Width of default viewport. |
viewHeight | Height of default viewport. |
viewScale | Scale of default viewport. |
Classes
class | class. |
table | table. |
math | math. |
Config | Config class. |
KeyCode | KeyCode class. |
Logger | Logger class. |
Executors | Executors class. |
Resources | Resources class. |
Devices | Devices class. |
ClassFactory | ClassFactory class. |
Event | Event class. |
EventListener | EventListener class. |
EventDispatcher | EventDispatcher class. |
Runtime | Runtime class. |
InputMgr | InputMgr class. |
RenderMgr | RenderMgr class. |
SceneMgr | SceneMgr class. |
DeckMgr | DeckMgr class. |
Animation | Animation class. |
Window | Window class. |
DisplayObject | DisplayObject class. |
Group | Group class. |
Scene | Scene class. |
SceneAnimations | SceneAnimations class. |
Layer | Layer class. |
Viewport | Viewport class. |
Camera | Camera class. |
Image | Image class. |
SheetImage | SheetImage class. |
MapImage | MapImage class. |
MovieClip | MovieClip class. |
NineImage | NineImage class. |
Label | Label class. |
DrawableObject | DrawableObject class. |
DrawableRect | DrawableRect class. |
Rect | Rect class. |
Graphics | Graphics class. |
Particle | Particle class. |
Font | Font class. |
Texture | Texture class. |
TouchHandler | TouchHandler class. |
Interceptor | Interceptor class. |
PropertyUtils | PropertyUtils class. |
DebugUtils | DebugUtils class. |
BitUtils | BitUtils class. |
Functions
- openWindow (title, width, height, scale)
-
Open the window.
Initializes the library.
Parameters:
- title (Option)Title of the window
- width (Option)Width of the window
- height (Option)Height of the window
- scale (Option)Scale of the Viewport to the Screen
- setDefaultWindowSize (targetDevice, landscape, scaleMode)
-
Set the size of the assumed device.
Parameters:
- targetDevice
- landscape
- scaleMode
- isMobile ()
-
Returns whether the mobile execution environment.
Returns:
-
True in the case of mobile.
- isDesktop ()
-
Returns whether the desktop execution environment.
Returns:
-
True in the case of desktop.
- getScreenSize ()
-
Returns the size of the screen.
Returns:
-
width, height
- getViewSize ()
-
Returns the size of the viewport.
Returns:
-
width, height
- getViewport ()
-
Returns the Viewport to be used in layers.
If you change the Viewport, it affects all layers.
Returns:
-
width, height
- getTexture (path, filter)
-
Returns the texture.
Textures are cached.
Parameters:
- path The path of the texture
- filter Texture filter.
Returns:
-
Texture instance
- getFont (path, charcodes, points, dpi)
-
Returns the font.
Fonts are cached.
Parameters:
- path The path of the font.
- charcodes (option)Charcodes of the font
- points (option)Points of the font
- dpi (option)Dpi of the font
Returns:
-
Font instance
- openScene (sceneName, params)
-
Opens the scene. This is a convenience function.
Delegate to SceneMgr.
Parameters:
- sceneName module name of the Scene
- params (option)Parameters of the Scene
- gotoScene (sceneName, params)
-
Goto the Scene. This is a convenience function.
Delegate to SceneMgr.
Parameters:
- sceneName module name of the Scene
- params (option)Parameters of the Scene
- closeScene (params)
-
Close the Scene. This is a convenience function.
Delegate to SceneMgr.
Parameters:
- params (option)Parameters of the Scene
- callOnce (func, ...)
-
Executes a function in a MOAICoroutine.
This variant of the function family will run the func immediately
upon the next coroutine.yield().
Parameters:
- func function object
- ... (option)function arguments
Fields
- viewport
- Default viewport.
- screenWidth
- Width of Window.
- screenHeight
- Height of Window.
- viewWidth
- Width of default viewport.
- viewHeight
- Height of default viewport.
- viewScale
- Scale of default viewport.
Classes
- class
-
class.
see also:
- table
-
table.
see also:
- math
-
math.
see also:
- Config
-
Config class.
see also:
- KeyCode
-
KeyCode class.
see also:
- Logger
-
Logger class.
see also:
- Executors
-
Executors class.
see also:
- Resources
-
Resources class.
see also:
- Devices
-
Devices class.
see also:
- ClassFactory
-
ClassFactory class.
see also:
- Event
-
Event class.
see also:
- EventListener
-
EventListener class.
see also:
- EventDispatcher
-
EventDispatcher class.
see also:
- Runtime
-
Runtime class.
see also:
- InputMgr
-
InputMgr class.
see also:
- RenderMgr
-
RenderMgr class.
see also:
- SceneMgr
-
SceneMgr class.
see also:
- DeckMgr
-
DeckMgr class.
see also:
- Animation
-
Animation class.
see also:
- Window
-
Window class.
see also:
- DisplayObject
-
DisplayObject class.
see also:
- Group
-
Group class.
see also:
- Scene
-
Scene class.
see also:
- SceneAnimations
-
SceneAnimations class.
see also:
- Layer
-
Layer class.
see also:
- Viewport
-
Viewport class.
see also:
- Camera
-
Camera class.
see also:
- Image
-
Image class.
see also:
- SheetImage
-
SheetImage class.
see also:
- MapImage
-
MapImage class.
see also:
- MovieClip
-
MovieClip class.
see also:
- NineImage
-
NineImage class.
see also:
- Label
-
Label class.
see also:
- DrawableObject
-
DrawableObject class.
see also:
- DrawableRect
-
DrawableRect class.
see also:
- Rect
-
Rect class.
see also:
- Graphics
-
Graphics class.
see also:
- Particle
-
Particle class.
see also:
- Font
-
Font class.
see also:
- Texture
-
Texture class.
see also:
- TouchHandler
-
TouchHandler class.
see also:
- Interceptor
-
Interceptor class.
see also:
- PropertyUtils
-
PropertyUtils class.
see also:
- DebugUtils
-
DebugUtils class.
see also:
- BitUtils
-
BitUtils class.
see also: