flipnote.js
Advanced tools
Comparing version 5.5.0 to 5.5.1
@@ -6,3 +6,3 @@ import { LitElement, PropertyValues } from 'lit-element'; | ||
player: Player; | ||
readonly renderer: import("../webgl").WebglRenderer; | ||
readonly renderer: import("../renderers").WebglCanvas; | ||
readonly audio: import("../webaudio").WebAudioPlayer; | ||
@@ -155,3 +155,3 @@ readonly canvasEl: HTMLCanvasElement; | ||
private _volumeLevel; | ||
private playerCanvas; | ||
private playerCanvasWrapper; | ||
private _isPlayerAvailable; | ||
@@ -158,0 +158,0 @@ private _playerSrc; |
@@ -19,3 +19,3 @@ import { Player } from '../player'; | ||
player: Player; | ||
readonly renderer: import("../webgl").WebglRenderer; | ||
readonly renderer: import("../renderers").WebglCanvas; | ||
readonly audio: import("../webaudio").WebAudioPlayer; | ||
@@ -22,0 +22,0 @@ readonly canvasEl: HTMLCanvasElement; |
@@ -0,3 +1,3 @@ | ||
import { Flipnote } from '../parsers'; | ||
import { EncoderBase } from './EncoderBase'; | ||
import { Flipnote } from '../FlipnoteTypes'; | ||
/** | ||
@@ -4,0 +4,0 @@ * GIF RGBA palette color definition |
@@ -0,4 +1,3 @@ | ||
import { Flipnote, FlipnoteAudioTrack } from '../parsers'; | ||
import { EncoderBase } from './EncoderBase'; | ||
import { Flipnote } from '../FlipnoteTypes'; | ||
import { FlipnoteAudioTrack } from '../parsers/index'; | ||
export declare type WavSampleBuffer = Int16Array | Float32Array; | ||
@@ -5,0 +4,0 @@ /** |
@@ -1,3 +0,2 @@ | ||
export * from './FlipnoteTypes'; | ||
export { FlipnoteFormat, FlipnoteVersion, FlipnoteRegion, FlipnoteMeta, FlipnoteAudioTrack, FlipnoteAudioTrackInfo, FlipnotePaletteDefinition, FlipnotePaletteColor, FlipnoteLayerVisibility, KwzParser, PpmParser, KwzParserSettings, PpmParserSettings, } from './parsers'; | ||
export { Flipnote, FlipnoteFormat, FlipnoteVersion, FlipnoteRegion, FlipnoteMeta, FlipnoteAudioTrack, FlipnoteAudioTrackInfo, FlipnotePaletteDefinition, FlipnotePaletteColor, FlipnoteLayerVisibility, FlipnoteParserSettings, KwzParserSettings, PpmParserSettings, KwzParser, PpmParser } from './parsers'; | ||
export * as utils from './utils/fsid'; | ||
@@ -8,5 +7,6 @@ export { parseSource } from './parseSource'; | ||
export { GifImage, WavAudio, } from './encoders'; | ||
export { WebglCanvas } from './renderers'; | ||
/** | ||
* flipnote.js library version (exported as `flipnote.version`). You can find the latest version on the project's [NPM](https://www.npmjs.com/package/flipnote.js) page. | ||
*/ | ||
export declare const version = "5.5.0"; | ||
export declare const version = "5.5.1"; |
@@ -12,3 +12,3 @@ /** @internal */ | ||
export interface LoaderDefinition<T> { | ||
/** Does this loader match the source type? */ | ||
/** Is this loader able to process the input source type? */ | ||
matches: (source: any) => boolean; | ||
@@ -15,0 +15,0 @@ /** Try loading the source. Passes an ArrayBuffer to resolve() if successful, calls reject() with an optional error if not */ |
@@ -173,6 +173,14 @@ import { DataStream, FlipnoteRegion } from '../utils'; | ||
/** | ||
* Get the pixels for a given frame layer | ||
* 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 {@link getFrameLayerOrder} to get the correct sort order first | ||
* NOTE: if the visibility flag for this layer is turned off, the result will be empty | ||
* @category Image | ||
*/ | ||
getLayerPixels(frameIndex: number, layerIndex: number, imageBuffer?: Uint8Array): Uint8Array; | ||
/** | ||
* 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 {@link getFrameLayerOrder} to get the correct sort order first | ||
* NOTE: if the visibility flag for this layer is turned off, the result will be empty | ||
* @category Image | ||
*/ | ||
getLayerPixelsRgba(frameIndex: number, layerIndex: number, imageBuffer?: Uint32Array, paletteBuffer?: Uint32Array): Uint32Array; | ||
@@ -243,2 +251,17 @@ /** | ||
hasAudioTrack(trackId: FlipnoteAudioTrack): boolean; | ||
/** | ||
* Get the body of the Flipnote - the data that is digested for the signature | ||
* @category Verification | ||
*/ | ||
abstract getBody(): Uint8Array; | ||
/** | ||
* Get the Flipnote's signature data | ||
* @category Verification | ||
*/ | ||
abstract getSignature(): Uint8Array; | ||
/** | ||
* Verify whether this Flipnote's signature is valid | ||
* @category Verification | ||
*/ | ||
abstract verify(): Promise<boolean>; | ||
} |
export * from './FlipnoteParserTypes'; | ||
export * from './FlipnoteTypes'; | ||
export * from './PpmParser'; | ||
export * from './KwzParser'; |
@@ -126,2 +126,3 @@ import { FlipnoteFormat, FlipnoteAudioTrack, FlipnoteMeta, FlipnoteParser } from './FlipnoteParserTypes'; | ||
private sectionMap; | ||
private bodyEndOffset; | ||
private layerBuffers; | ||
@@ -224,2 +225,17 @@ private prevDecodedFrame; | ||
getAudioMasterPcm(dstFreq?: number): Int16Array; | ||
/** | ||
* Get the body of the Flipnote - the data that is digested for the signature | ||
* @category Verification | ||
*/ | ||
getBody(): Uint8Array; | ||
/** | ||
* Get the Flipnote's signature data | ||
* @category Verification | ||
*/ | ||
getSignature(): Uint8Array; | ||
/** | ||
* Verify whether this Flipnote's signature is valid | ||
* @category Verification | ||
*/ | ||
verify(): Promise<boolean>; | ||
} |
@@ -94,2 +94,3 @@ /** | ||
private soundDataLength; | ||
private soundDataOffset; | ||
private frameOffsets; | ||
@@ -102,4 +103,2 @@ /** | ||
constructor(arrayBuffer: ArrayBuffer, settings?: Partial<PpmParserSettings>); | ||
static validateFSID(fsid: string): boolean; | ||
static validateFilename(filename: string): boolean; | ||
private decodeHeader; | ||
@@ -172,2 +171,17 @@ private readFilename; | ||
getAudioMasterPcm(dstFreq?: number): Int16Array; | ||
/** | ||
* Get the body of the Flipnote - the data that is digested for the signature | ||
* @category Verification | ||
*/ | ||
getBody(): Uint8Array; | ||
/** | ||
* Get the Flipnote's signature data | ||
* @category Verification | ||
*/ | ||
getSignature(): Uint8Array; | ||
/** | ||
* Verify whether this Flipnote's signature is valid | ||
* @category Verification | ||
*/ | ||
verify(): Promise<boolean>; | ||
} |
/// <reference types="node" /> | ||
import { Flipnote, FlipnoteParserSettings } from './FlipnoteTypes'; | ||
import { Flipnote, FlipnoteParserSettings } from './parsers'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Source to load a Flipnote from. Depending on the operating envionment, this can be: |
@@ -1,6 +0,5 @@ | ||
import { Flipnote } from '../FlipnoteTypes'; | ||
import { FlipnoteFormat, FlipnoteMeta } from '../parsers'; | ||
import { Flipnote, FlipnoteFormat, FlipnoteMeta } from '../parsers'; | ||
import { FlipnoteSource } from '../parseSource'; | ||
import { PlayerEvent, PlayerEventMap } from './PlayerEvent'; | ||
import { WebglRenderer } from '../webgl'; | ||
import { WebglCanvas } from '../renderers'; | ||
import { WebAudioPlayer } from '../webaudio'; | ||
@@ -46,3 +45,3 @@ declare type PlayerLayerVisibility = Record<number, boolean>; | ||
/** Frame renderer */ | ||
renderer: WebglRenderer; | ||
renderer: WebglCanvas; | ||
/** Audio player */ | ||
@@ -99,3 +98,3 @@ audio: WebAudioPlayer; | ||
* | ||
* @param el - Canvas element (or CSS selector matching a canvas element) to use as a rendering surface | ||
* @param parent - Element to mount the rendering canvas to | ||
* @param width - Canvas width (pixels) | ||
@@ -106,3 +105,3 @@ * @param height - Canvas height (pixels) | ||
*/ | ||
constructor(el: string | HTMLCanvasElement, width: number, height: number); | ||
constructor(parent: string | Element, width: number, height: number); | ||
/** The currently loaded Flipnote source, if there is one. Can be overridden to load another Flipnote */ | ||
@@ -109,0 +108,0 @@ get src(): FlipnoteSource; |
@@ -5,2 +5,3 @@ export * from './ByteArray'; | ||
export * from './nextPaint'; | ||
export * from './rsa'; | ||
export * from './env'; | ||
@@ -7,0 +8,0 @@ export * from './assert'; |
{ | ||
"name": "flipnote.js", | ||
"version": "5.5.0", | ||
"version": "5.5.1", | ||
"description": "A JavaScript library for parsing, converting, and in-browser playback of the proprietary animation formats used by Nintendo's Flipnote Studio and Flipnote Studio 3D apps.", | ||
@@ -5,0 +5,0 @@ "module": "dist/flipnote.es.js", |
@@ -17,3 +17,3 @@ <h1 align="center"><a href="//flipnote.js.org" target="blank"><img width="838px" src="https://raw.githubusercontent.com/jaames/flipnote.js/master/assets/ghbanner@2x.png"/></a></h1> | ||
* Full file parser implementations with metadata, frames, audio, etc | ||
* Full file parser implementations with metadata, frames, audio, signature verification, etc | ||
* Realtime browser-based playback, with a player API based on the HTML5 Video and Audio APIs | ||
@@ -41,3 +41,3 @@ * Optional web component for easily embedding a Flipnote player UI on any web page | ||
This library hopes to aid in the long-term preservation and enjoyment of these animations, by enabling them to be played in any modern web browser. In addition, it provides a consistent API and various utilities for dealing with both animation formats so that other developers can easily create their own tools and applications around them. | ||
This library hopes to aid in the long-term preservation and enjoyment of these animations, by enabling them to be played in any modern web browser. In addition, it provides a consistent API and various utilities for dealing with both animation formats so that other developers can easily create their own tools and applications around them! | ||
@@ -44,0 +44,0 @@ ## Projects using flipnote.js |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58
25003
1206638