Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
A
 activateMultitouch
 Adding an event listener and looping through animations
 Adding physics properties with addPhysics
 addPhysics
 addScale, SpriteFactory
 addSpriteSetInfo, SpriteFactory
 addSpriteSheetModule, SpriteFactory
 animating, SpriteGroup
 atrace
 averageFps, Profiler
B
 blendMode, SpriteGroup
C
 copy, table
 createProfiler
 Creating a SpriteButton
 Creating a SpriteFactory and SpriteGroups
 currentFps, Profiler
 currentFrame, SpriteGroup
 currentMem, Profiler
 currentTextureMem, Profiler
 curSprite, SpriteGroup
D
 deactivateMultitouch
 Debugging
 destroyProfiler
 dispose, SpriteFactory
E
 Events
 Examples
F
 fillColor, SpriteGroup
 formatMS
 frameRate, SpriteGroup
 functionInfo
 Functions
G
 getRectShape
 getShape
 getSpriteNames, SpriteGroup
 Global declaration of variables before usage
 Graphics Optimization
I
 indexOf, table
L
 loq_declare
 loq_display
 loq_listeners
 loq_profiler
 loq_sprite
 loq_ui_button
 loq_undeclared
 loq_util
M
 Math
 Methods, Profiler
 Modules
N
 newButton
 newFactory
 newMultiSet, SpriteFactory
 newSpriteGroup, SpriteFactory
 numFrames, SpriteGroup
P
 pause, SpriteGroup
 play, SpriteGroup
 prepare, SpriteGroup
 Profiler
 propagateReference, SpriteGroup
 Properties, SpriteGroup
R
 removeItem, table
 resize, Profiler
 rotateVec2
 runningTime, Profiler
S
 sequence, SpriteGroup
 setEnabled, SpriteButton
 setMinPrepare, SpriteFactory
 setup, SpriteButton
 Shape Functions
 shapeNames, SpriteFactory
 sprite, SpriteGroup
 SpriteButton
 SpriteButton Constructor Table, SpriteButton
 SpriteFactory
 SpriteGroup
 Spriteloq API
 spriteNames, SpriteFactory
 String
 string:split
T
 Table
 timeScale, SpriteGroup
 Triggering logic on a certain frame of an animation
local function activateMultitouch()
Enables multi-touch.
Adding an event listener and looping through animations
Adding physics properties with addPhysics
function SpriteFactory:addPhysics(_displayObj,
_physics,
_bodyType,
_properties,
_shapeName,
_xOffset,
_yOffset,
_scale)
Adds physical properties to a display object instance with a specified shape name.
function SpriteGroup:addPhysics(_physics,
_bodyType,
_properties,
_shapeName,
_scale)
Adds physical properties to the SpriteGroup instance.
local function addScale(...)
Informs the SpriteFactory that the spritesheets have additional scales available for the loaded spritesheets.
function SpriteFactory:addSpriteSetInfo(_setInfos)
Manually add sprite set info to the SpriteFactory.
function SpriteFactory:addSpriteSheetModule(...)
Adds new spritesheet modules exported from Spriteloq to this SpriteFactory.
function SpriteGroup:animating()
The status of the current animation.
function atrace(_msg,
_depth)
Prints a debugging message with a time stamp and stack trace.
function Profiler:averageFps()
Returns: Average frames per second.
function SpriteGroup:blendMode(_blendMode)
Get or set the blendMode of the SpriteGroup instance.
function table.copy(...)
Returns a shallow copy of array, i.e.
local function createProfiler(_onTop,
_collect)
Creates and returns a display instance of the profiler.
Creating a SpriteButton
Creating a SpriteFactory and SpriteGroups
function Profiler:currentFps()
Current frames per second.
function SpriteGroup:currentFrame(_frame)
Get or set the frame of the current animation sequence.
function Profiler:currentMem()
Application memory in kilobytes
function Profiler:currentTextureMem()
Texture memory used in kilobytes.
The current sprite instance of the SpriteGroup.
local function deactivateMultitouch()
Disables multi-touch.
local function destroyProfiler()
Destroys the Profiler removing it from the stage.
function SpriteFactory:dispose()
Removes the sprite sheets from texture memory.
function SpriteGroup:fillColor(...)
gets or sets the fill color of the SpriteGroup instance.
function formatMS(_ms)
Format milliseconds into a string HH:MM:SS:MS
function SpriteGroup:frameRate()
Gets the frameRate of the current sprite sequence in frames per second
function functionInfo(_func)
Returns the file and line numbers for a function’s definition
function SpriteFactory:getRectShape(_sequence,
_frame,
_xOffset,
_yOffset,
_scale)
Returns a table of points that represents a rectangle shape for the sprite sequence for use as the shape property in the body data for physics.addBody.
function SpriteGroup:getRectShape(_scale)
Returns a table of points that represents a rectangle shape for the current sprite’s current frame for use as the shape property in the body data for physics.addBody.
function SpriteFactory:getShapes(_shapeName,
_xOffset,
_yOffset,
_scale)
Returns an array of polygon vertices that can be used as the shape data for physics bodies.
function SpriteGroup:getShapes(_shapeName,
_scale)
Returns an array of polygon vertices that can be used as the shape data for physics bodies.
function SpriteGroup:getSpriteNames()
A table of the names of the playable sprite animations.
Global declaration of variables before usage.
function table.indexOf(_t,
_item)
Searches a table for an item and returns its index or nil if not found
function loq_declare (_name,
_initval)
Used to declare global values.
function loq_display(_d)
Adds functions to the display object to optimize transformations: translating, rotating, scaling.
function loq_listeners(_obj)
Uses adds event dispatching to the object.
Corona frame rate, application memory and texture memory profiler.
Defines the SpriteFactory and SpriteGroup creation module.
Contains a button class that uses a SpriteGroup for its states.
function loq_undeclared(_name)
Checks if a string name of a variable has been declared as a global.
Utility functions used by other modules.
local function newButton(paramObj)
A function that takes a constructor table to create a new SpriteButton.
local function newFactory(...)
Creates a new factory for creating SpriteGroup instances.
function SpriteFactory:newMultiSet(_modules,
_spriteInfo)
Used to stitch multiple sprite module’s sprite sheet’s into one set.
function SpriteFactory:newSpriteGroup(_spriteName)
Creates a SpriteGroup instance.
function SpriteGroup:numFrames()
Gets the number of frames in the current sprite sequence
function SpriteGroup:pause()
Pauses the current sprite animation.
function SpriteGroup:play(_spriteName,
_keep)
Plays prepares and plays a sprite animation.
function SpriteGroup:prepare(_spriteName)
Switches the sprite sequence, but does not play it.
Creates a display group instance that displays graphs for frame rate and memory usage.
function SpriteGroup:propagateReference(_target)
Copies the reference point of the SpriteGroup to target display object and resets the reference point of the the internal sprites sprite to 0, 0
function table.removeItem(_t,
_item)
Searches a table for an item and removes it if present.
function Profiler:resize()
Resize the Profiler to adjust it to the display’s orientation.
function rotateVec2(_degrees,
_x,
_y)
Rotates vector components x, y through an angle.
function Profiler:runningTime()
Running time of the application in seconds.
function SpriteGroup:sequence()
The name of the current animation.
Used to enable or disable the touch events on the button and change its visual state.
local function setMinPrepare(_state)
If set to true then any new SpriteGroups created will use a minimal set of instructions to prepare the SpriteGroup.
Sets the display of the button to the state passed in or the current state if none passed in.
The names of the sprite shapes available for the SpriteGroup instance for use with addPhysics.
SpriteGroup instances will dispatch events propagated from curSprite.
A button class that uses a SpriteGroup to represent its visual state.
The newButton() function takes a table that can contain the following properties.
A factory to create SpriteGroup instances.
A group of sprites in a display group instance.
Spriteloq API v1.3.0
The names of the sprite animations available for playback in a SpriteGroup instance.
function string:split(sSeparator,
nMax,
bRegexp)
Splits the string using with a separator
function SpriteGroup:timeScale(_timeScale)
Get or set the timeScale of the SpriteGroup instance.
From the ninja sample app we show a snippet of code from a SpriteGroup ‘sprite’ event listener.
Close