Familiar territory. MediaSurfaceManager 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
| constructor() | Sets up a new instance. |
| createOwner() | Creates the owner. |
Checks (True / False) 3
| isCurrent() | Whether it is current. |
| hasActiveMapSpriteset() | Whether it has the active map spriteset. |
| isWaiting() | Whether it is waiting. |
Actions 6
| leaveVideo() | False while other surfaces still show the video (the leaver must not stop it). |
| releaseThreeTexture() | Releases the three texture. |
| releaseWaiters() | Releases the waiters. |
| show() | Show. |
| stop() | Stop. |
| removeForMapSetup() | Removes the for map setup. |
Updating & Drawing 1
| updateSpriteset() | Runs twice a frame: before the spriteset updates, so this frame's surfaces exist and are placed when the 3D p… |
Other 17
| videoShareKey() | What must match for two surfaces to show one video: muted, the same file, loop and speed. |
| joinVideo() | A playing video this surface can show instead of opening its own, or null. |
| shareVideo() | Offer a freshly opened video to later surfaces that play it the same way. |
| sharedThreeTexture() | One three texture per shared video: a new frame is uploaded once, not once per screen. |
| store() | Store. |
| descriptor() | Descriptor. |
| waitKey() | Wait key. |
| armWait() | Arm wait. |
| retryPendingPlayback() | Retry pending playback. |
| seedMapSurfaces() | Seed map surfaces. |
| transform() | Transform. |
| ended() | Ended. |
| failed() | Failed. |
| storedDescriptor() | A stored descriptor has already passed the command parser. |
| allStandStill() | Whether every surface stands on the 3D map itself: not on the screen, a 2D map that scrolls, an event or a mo… |
| budgetVideos() | Budget videos. |
| teardownRuntime() | Teardown runtime. |
Setup & Creation
constructor
constructor sourcenew MediaSurfaceManager()
Sets up a new instance. (Same as the RPG Maker MZ method of this name.)
createOwner
method sourceMediaSurfaceManager.prototype.createOwner(descriptor)
Creates the owner. (Same as the RPG Maker MZ method of this name.)
Checks (True / False)
isCurrent
method sourceMediaSurfaceManager.prototype.isCurrent(id, generation)
Whether it is current. (Same as the RPG Maker MZ method of this name.)
hasActiveMapSpriteset
method sourceMediaSurfaceManager.prototype.hasActiveMapSpriteset()
Whether it has the active map spriteset. (Same as the RPG Maker MZ method of this name.)
isWaiting
method sourceMediaSurfaceManager.prototype.isWaiting(interpreter)
Whether it is waiting. (Same as the RPG Maker MZ method of this name.)
Actions
leaveVideo
method sourceMediaSurfaceManager.prototype.leaveVideo(entry, owner)
False while other surfaces still show the video (the leaver must not stop it).
releaseThreeTexture
method sourceMediaSurfaceManager.prototype.releaseThreeTexture(entry, owner)
Releases the three texture. (Same as the RPG Maker MZ method of this name.)
releaseWaiters
method sourceMediaSurfaceManager.prototype.releaseWaiters(id, generation)
Releases the waiters. (Same as the RPG Maker MZ method of this name.)
show
method sourceMediaSurfaceManager.prototype.show(raw, interpreter)
Show. (Same as the RPG Maker MZ method of this name.)
stop
method sourceMediaSurfaceManager.prototype.stop(raw)
Stop. (Same as the RPG Maker MZ method of this name.)
removeForMapSetup
method sourceMediaSurfaceManager.prototype.removeForMapSetup(map)
Removes the for map setup. (Same as the RPG Maker MZ method of this name.)
Updating & Drawing
updateSpriteset
method sourceMediaSurfaceManager.prototype.updateSpriteset(spriteset, settled)
Runs twice a frame: before the spriteset updates, so this frame's surfaces exist and are placed when the 3D pass draws them, and after (settled), for the ones the frame started or changed and for the flat ones PIXI draws later.
Details
Runs twice a frame: before the spriteset updates, so this frame's
surfaces exist and are placed when the 3D pass draws them, and
after (settled), for the ones the frame started or changed and
for the flat ones PIXI draws later. A 3D plane the pass has
already drawn is not placed a second time: nothing draws or reads
it again before the next frame's first pass places it afresh from
the same state. secondPlacement.enabled = false places it anyway.
Other
joinVideo
method sourceMediaSurfaceManager.prototype.joinVideo(owner)
A playing video this surface can show instead of opening its own, or null.
store
method sourceMediaSurfaceManager.prototype.store(map, create)
Store. (Same as the RPG Maker MZ method of this name.)
descriptor
method sourceMediaSurfaceManager.prototype.descriptor(id)
Descriptor. (Same as the RPG Maker MZ method of this name.)
waitKey
method sourceMediaSurfaceManager.prototype.waitKey(id, generation)
Wait key. (Same as the RPG Maker MZ method of this name.)
armWait
method sourceMediaSurfaceManager.prototype.armWait(interpreter, descriptor)
Arm wait. (Same as the RPG Maker MZ method of this name.)
retryPendingPlayback
method sourceMediaSurfaceManager.prototype.retryPendingPlayback()
Retry pending playback. (Same as the RPG Maker MZ method of this name.)
seedMapSurfaces
method sourceMediaSurfaceManager.prototype.seedMapSurfaces(mapData)
Seed map surfaces. (Same as the RPG Maker MZ method of this name.)
transform
method sourceMediaSurfaceManager.prototype.transform(raw, interpreter)
Transform. (Same as the RPG Maker MZ method of this name.)
ended
method sourceMediaSurfaceManager.prototype.ended(id, generation)
Ended. (Same as the RPG Maker MZ method of this name.)
failed
method sourceMediaSurfaceManager.prototype.failed(id, generation, error)
Failed. (Same as the RPG Maker MZ method of this name.)
storedDescriptor
method sourceMediaSurfaceManager.prototype.storedDescriptor(raw)
A stored descriptor has already passed the command parser.
Details
A stored descriptor has already passed the command parser. Keep its exact field snapshot so ordinary playback avoids rebuilding all of the alias lists, corners and anchor arrays. In-place edits still pass through the full parser, including malformed restored data.
The spriteset asks twice a tick (before and after its own update); a record that matched earlier in the same frame is not walked again.
allStandStill
method sourceMediaSurfaceManager.prototype.allStandStill()
Whether every surface stands on the 3D map itself: not on the screen, a 2D map that scrolls, an event or a model's anchor.
budgetVideos
method sourceMediaSurfaceManager.prototype.budgetVideos()
Budget videos. (Same as the RPG Maker MZ method of this name.)
teardownRuntime
method sourceMediaSurfaceManager.prototype.teardownRuntime(reason)
Teardown runtime. (Same as the RPG Maker MZ method of this name.)