Familiar territory. Sprite_Animation keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.
Quick Reference
Setup & Creation 2
| initialize() | Sets up a new instance. |
| initMembers() | Initializes the members. |
Checks (True / False) 3
| canStart() | Whether it can start. |
| shouldWaitForPrevious() | Whether it should wait for previous. |
| isPlaying() | Whether it is playing. |
Actions 6
| destroy() | Destroy. |
| setRotation() | Sets the rotation. |
| setProjectionMatrix() | Sets the projection matrix. |
| setCameraMatrix() | Sets the camera matrix. |
| setViewport() | Sets the viewport. |
| resetViewport() | Resets the viewport. |
Events, Commands & Input 4
| processSoundTimings() | Handles the sound timings. |
| processFlashTimings() | Handles the flash timings. |
| onBeforeRender() | Called when before render happens. |
| onAfterRender() | Called when after render happens. |
Updating & Drawing 6
| update() | Update. |
| updateEffectGeometry() | Updates the effect geometry each frame. |
| updateMain() | Updates the main each frame. |
| updateFlash() | Updates the flash each frame. |
| renderActive() | Render active. |
| _render() | Render. |
Other 9
| reactor3DScale() | How much bigger an animation has to be drawn than its 2D self. |
| effekseerScreenPosition() | Target position in overlay-canvas pixels (shared by setViewport). |
| checkEnd() | Check end. |
| _doEffekseerDraw() | Do effekseer draw. |
| effekseerViewportSide() | Square per-effect viewport side. |
| effekseerProjection() | The projection an effect is drawn through, for a viewport side pixels square centered on the target and a scr… |
| effekseerViewportRect() | Effekseer viewport rect. |
| targetPosition() | Target position. |
| targetSpritePosition() | Target sprite position. |
Setup & Creation
initialize
method sourceSprite_Animation.prototype.initialize()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
initMembers
method sourceSprite_Animation.prototype.initMembers()
Initializes the members. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
canStart
method sourceSprite_Animation.prototype.canStart()
Whether it can start. (Same as the RPG Maker MZ method of this name.)
shouldWaitForPrevious
method sourceSprite_Animation.prototype.shouldWaitForPrevious()
Whether it should wait for previous. (Same as the RPG Maker MZ method of this name.)
isPlaying
method sourceSprite_Animation.prototype.isPlaying()
Whether it is playing. (Same as the RPG Maker MZ method of this name.)
Actions
destroy
method sourceSprite_Animation.prototype.destroy(options)
Destroy. (Same as the RPG Maker MZ method of this name.)
setRotation
method sourceSprite_Animation.prototype.setRotation(x, y, z)
Sets the rotation. (Same as the RPG Maker MZ method of this name.)
setProjectionMatrix
method sourceSprite_Animation.prototype.setProjectionMatrix(renderer)
Sets the projection matrix. (Same as the RPG Maker MZ method of this name.)
setCameraMatrix
method sourceSprite_Animation.prototype.setCameraMatrix(/*renderer*/)
Sets the camera matrix. (Same as the RPG Maker MZ method of this name.)
setViewport
method sourceSprite_Animation.prototype.setViewport(renderer)
Sets the viewport. (Same as the RPG Maker MZ method of this name.)
resetViewport
method sourceSprite_Animation.prototype.resetViewport(renderer)
Resets the viewport. (Same as the RPG Maker MZ method of this name.)
Events, Commands & Input
processSoundTimings
method sourceSprite_Animation.prototype.processSoundTimings()
Handles the sound timings. (Same as the RPG Maker MZ method of this name.)
processFlashTimings
method sourceSprite_Animation.prototype.processFlashTimings()
Handles the flash timings. (Same as the RPG Maker MZ method of this name.)
onBeforeRender
method sourceSprite_Animation.prototype.onBeforeRender(renderer)
Called when before render happens. (Same as the RPG Maker MZ method of this name.)
onAfterRender
method sourceSprite_Animation.prototype.onAfterRender(renderer)
Called when after render happens. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
update
method sourceSprite_Animation.prototype.update()
Update. (Same as the RPG Maker MZ method of this name.)
updateEffectGeometry
method sourceSprite_Animation.prototype.updateEffectGeometry()
Updates the effect geometry each frame. (Same as the RPG Maker MZ method of this name.)
updateMain
method sourceSprite_Animation.prototype.updateMain()
Updates the main each frame. (Same as the RPG Maker MZ method of this name.)
updateFlash
method sourceSprite_Animation.prototype.updateFlash()
Updates the flash each frame. (Same as the RPG Maker MZ method of this name.)
renderActive
static sourceSprite_Animation.renderActive(renderer)
Render active. (Same as the RPG Maker MZ method of this name.)
_render
method internal sourceSprite_Animation.prototype._render(renderer)
Render. (Same as the RPG Maker MZ method of this name.)
Other
reactor3DScale
method sourceSprite_Animation.prototype.reactor3DScale()
How much bigger an animation has to be drawn than its 2D self.
Details
How much bigger an animation has to be drawn than its 2D self.
An animation is not a child of the sprite it plays on — it lives in the spriteset's effects container — so it did not inherit the scaling that puts a character in proportion with a 3D map. A looping effect on a shopfront was drawn at flat size over a world drawn larger, and the mismatch grew with distance because the map is in perspective and the effect was not.
The average over the targets, so an animation on a group of them sits at one consistent size rather than picking whichever target happens to be first. Returns 1 anywhere the question does not apply, including every battle.
effekseerScreenPosition
method sourceSprite_Animation.prototype.effekseerScreenPosition(renderer)
Target position in overlay-canvas pixels (shared by setViewport).
checkEnd
method sourceSprite_Animation.prototype.checkEnd()
Check end. (Same as the RPG Maker MZ method of this name.)
_doEffekseerDraw
method internal sourceSprite_Animation.prototype._doEffekseerDraw(renderer, composited)
Do effekseer draw. (Same as the RPG Maker MZ method of this name.)
effekseerViewportSide
static sourceSprite_Animation.effekseerViewportSide(height)
Square per-effect viewport side.
Details
Square per-effect viewport side. Distortion is zero at the viewport center regardless of size; the side only bounds how far an effect can extend from its target before clipping at the viewport edge (±ch here).
effekseerProjection
static sourceSprite_Animation.effekseerProjection(height, side, mirror)
The projection an effect is drawn through, for a viewport side pixels square centered on the target and a screen height pixels tall: RPG Maker's size and perspective (ReactorBattleData.effekseerProjection, which the editor's previews draw through too).
Details
The projection an effect is drawn through, for a viewport side pixels
square centered on the target and a screen height pixels tall: RPG
Maker's size and perspective (ReactorBattleData.effekseerProjection, which
the editor's previews draw through too). mirror flips it across the
target.
effekseerViewportRect
method sourceSprite_Animation.prototype.effekseerViewportRect(renderer)
Effekseer viewport rect. (Same as the RPG Maker MZ method of this name.)
targetPosition
method sourceSprite_Animation.prototype.targetPosition(renderer)
Target position. (Same as the RPG Maker MZ method of this name.)
targetSpritePosition
method sourceSprite_Animation.prototype.targetSpritePosition(sprite)
Target sprite position. (Same as the RPG Maker MZ method of this name.)