UNPKG

ngx-spine

Version:

[![Build Status](https://travis-ci.org/PoiScript/ngx-spine.svg?branch=master)](https://travis-ci.org/PoiScript/ngx-spine)

100 lines (99 loc) 4.8 kB
/****************************************************************************** * Spine Runtimes License Agreement * Last updated May 1, 2019. Replaces all prior versions. * * Copyright (c) 2013-2019, Esoteric Software LLC * * Integration of the Spine Runtimes into software or otherwise creating * derivative works of the Spine Runtimes is permitted under the terms and * conditions of Section 2 of the Spine Editor License Agreement: * http://esotericsoftware.com/spine-editor-license * * Otherwise, it is permitted to integrate the Spine Runtimes into software * or otherwise create derivative works of the Spine Runtimes (collectively, * "Products"), provided that each user of the Products must obtain their own * Spine Editor license and redistribution of the Products in any form must * include this license and copyright notice. * * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS * INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ import { Animation, CurveTimeline } from "./Animation"; import { TransformMode } from "./BoneData"; import { PositionMode, SpacingMode, RotateMode } from "./PathConstraintData"; import { SkeletonData } from "./SkeletonData"; import { Attachment } from "./attachments/Attachment"; import { Skin } from "./Skin"; import { BlendMode } from "./BlendMode"; import { AttachmentLoader } from "./attachments/AttachmentLoader"; import { MeshAttachment } from "./attachments/MeshAttachment"; export declare class SkeletonBinary { static AttachmentTypeValues: number[]; static TransformModeValues: TransformMode[]; static PositionModeValues: PositionMode[]; static SpacingModeValues: SpacingMode[]; static RotateModeValues: RotateMode[]; static BlendModeValues: BlendMode[]; static BONE_ROTATE: number; static BONE_TRANSLATE: number; static BONE_SCALE: number; static BONE_SHEAR: number; static SLOT_ATTACHMENT: number; static SLOT_COLOR: number; static SLOT_TWO_COLOR: number; static PATH_POSITION: number; static PATH_SPACING: number; static PATH_MIX: number; static CURVE_LINEAR: number; static CURVE_STEPPED: number; static CURVE_BEZIER: number; attachmentLoader: AttachmentLoader; scale: number; protected linkedMeshes: LinkedMesh[]; constructor(attachmentLoader: AttachmentLoader); readSkeletonData(binary: Uint8Array): SkeletonData; protected readSkin(input: BinaryInput, skeletonData: SkeletonData, defaultSkin: boolean, nonessential: boolean): Skin; protected readAttachment(input: BinaryInput, skeletonData: SkeletonData, skin: Skin, slotIndex: number, attachmentName: string, nonessential: boolean): Attachment; protected readVertices(input: BinaryInput, vertexCount: number): Vertices; protected readFloatArray(input: BinaryInput, n: number, scale: number): number[]; protected readShortArray(input: BinaryInput): number[]; protected readAnimation(input: BinaryInput, name: string, skeletonData: SkeletonData): Animation; protected readCurve(input: BinaryInput, frameIndex: number, timeline: CurveTimeline): void; setCurve(timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; } declare class BinaryInput { strings: string[]; private index; private buffer; constructor(data: Uint8Array, strings?: string[], index?: number, buffer?: DataView); readByte(): number; readShort(): number; readInt32(): number; readInt(optimizePositive: boolean): number; readStringRef(): string; readString(): string; readFloat(): number; readBoolean(): boolean; } declare class LinkedMesh { parent: string; skin: string; slotIndex: number; mesh: MeshAttachment; inheritDeform: boolean; constructor(mesh: MeshAttachment, skin: string, slotIndex: number, parent: string, inheritDeform: boolean); } declare class Vertices { bones: Array<number>; vertices: Array<number> | Float32Array; constructor(bones?: Array<number>, vertices?: Array<number> | Float32Array); } export {};