Create a new KWZ file parser instance
an ArrayBuffer containing file data
parser settings
Custom object tag
Animation frame aspect ratio, reflects KwzParser.aspect
Get the amount of clipping in the master audio track, useful for determining if a Flipnote's audio is corrupted. Closer to 1.0 = more clipping. Only available after getAudioMasterPcm has been called
Which audio tracks are available in this format, reflects KwzParser.audioTracks
In-app animation playback speed when the BGM track was recorded
Animation framerate when the BGM track was recorded, measured as frames per second
Animation duration, in seconds
File format type, reflects KwzParser.format
Animation frame count
In-app animation playback speed
Animation framerate, measured as frames per second
Global animation frame color palette, reflects KwzParser.globalPalette
Animation frame height, reflects KwzParser.height
X offset for the top-left corner of the animation frame
Y offset for the top-left corner of the animation frame
Animation frame width, reflects KwzParser.width
(KWZ only) Indicates whether or not this file is a handwritten comment from Flipnote Gallery World
(KWZ only) Indicates whether or not this Flipnote is a PPM to KWZ conversion from Flipnote Studio 3D's DSi Library service
(KWZ only) Indicates whether or not this file is a Flipnote Studio 3D folder icon
Spinoffs are remixes of another user's Flipnote
File metadata, see KwzMeta for structure
Number of colors per layer (aside from transparent), reflects KwzParser.numLayerColors
Number of animation frame layers, reflects KwzParser.numLayers
Flipnote palette
key used for Flipnote verification, in PEM format
Audio track base sample rate, reflects KwzParser.rawSampleRate
Audio output sample rate, reflects KwzParser.sampleRate
Which sound effect tracks are available in this format, reflects KwzParser.soundEffectTracks
File audio track info, see FlipnoteAudioTrackInfo
Index of the animation frame used as the Flipnote's thumbnail image
Animation frame aspect ratio
Which audio tracks are available in this format
File format type
Global animation frame color palette
Animation frame height
Number of colors per layer (aside from transparent)
Number of animation frame layers
Public key used for Flipnote verification, in PEM format
Audio track base sample rate
Audio output sample rate
Which sound effect tracks are available in this format
Animation frame width
Get the decoded audio data for a given track, using the track's native samplerate
Signed 16-bit PCM audio
Get the sound effect flags for every frame in the Flipnote
Get the full mixed audio for the Flipnote, using the specified samplerate
Signed 16-bit PCM audio
Get the decoded audio data for a given track, using the specified samplerate
Signed 16-bit PCM audio
Get the raw compressed audio data for a given track
Byte array
Get the sound effect usage for a given frame
Get the sound effect usage flags for every frame
Get the usage flags for a given track across every frame
an array of booleans for every frame, indicating whether the track is used on that frame
Does an audio track exist in the Flipnote?
boolean
Is a given track used on a given frame
Decode a frame, returning the raw pixel buffers for each layer
Get the camera flags for a given frame
Array of booleans, indicating whether each layer uses a photo or not
Get the 3D depths for each layer in a given frame.
Get the layer draw order for a given frame
Get the RGBA colors for a given frame
Returns an array where:
Get the color palette indices for a given frame. RGBA colors for these values can be indexed from KwzParser.globalPalette
Returns an array where:
Get the color palette for a given frame, as an uint32 array
Get the image for a given frame, as palette indices
Get the image for a given frame as an uint32 array of RGBA pixels
Determines if a given frame is a video key frame or not. This returns an array of booleans for each layer, since keyframe encoding is done on a per-layer basis.
Get the pixels for a given frame layer, as palette indices NOTE: layerIndex are not guaranteed to be sorted by 3D depth in KWZs, use getFrameLayerOrder to get the correct sort order first NOTE: if the visibility flag for this layer is turned off, the result will be empty
Get the pixels for a given frame layer, as RGBA pixels NOTE: layerIndex are not guaranteed to be sorted by 3D depth in KWZs, use getFrameLayerOrder to get the correct sort order first NOTE: if the visibility flag for this layer is turned off, the result will be empty
Get the FSID for a given frame's original author.
Decodes the thumbnail image embedded in the Flipnote. Will return a FlipnoteThumbImage containing JPEG data.
Note: For most purposes, you should probably just decode the thumbnail fraa to get a higher resolution image.
Allows for frame index iteration when using the parser instance as a for..of iterator
for (const frameIndex of note) {
// do something with frameIndex...
}
Get file default title - e.g. "Flipnote by Y", "Comment by X", etc.
A format object can be passed for localization, where $USERNAME
gets replaced by author name:
{
COMMENT: 'Comment by $USERNAME',
FLIPNOTE: 'Flipnote by $USERNAME',
ICON: 'Folder icon'
}
Returns the Flipnote title when casting a parser instance to a string
const str = 'Title: ' + note;
// str === 'Title: Flipnote by username'
Get the body of the Flipnote - the data that is digested for the signature
Get the Flipnote's signature data
Verify whether this Flipnote's signature is valid
Animation frame global layer visibility
Default formats used for {@link getTitle()}
Default KWZ parser settings
Parser class for Flipnote Studio 3D's KWZ animation format
KWZ format docs: https://github.com/Flipnote-Collective/flipnote-studio-3d-docs/wiki/KWZ-Format