Move to Renderer V2

This commit is contained in:
duckietm
2024-04-03 09:27:56 +02:00
parent 110c3ad393
commit b3134ce50b
4080 changed files with 115593 additions and 66375 deletions
+9
View File
@@ -0,0 +1,9 @@
export interface IAsset
{
source?: string;
x?: number;
y?: number;
flipH?: boolean;
flipV?: boolean;
usesPalette?: boolean;
}
+6
View File
@@ -0,0 +1,6 @@
export interface IAssetAlias
{
link?: string;
flipH?: boolean;
flipV?: boolean;
}
+23
View File
@@ -0,0 +1,23 @@
import { IAssetAnimation } from './animation';
import { IAsset } from './IAsset';
import { IAssetAlias } from './IAssetAlias';
import { IAssetPalette } from './IAssetPalette';
import { IAssetLogicData } from './logic';
import { IAssetRoomVisualizationData } from './room-visualization';
import { ISpritesheetData } from './spritesheet';
import { IAssetVisualizationData } from './visualization';
export interface IAssetData {
type?: string;
name?: string;
visualizationType?: string;
logicType?: string;
spritesheet?: ISpritesheetData;
logic?: IAssetLogicData;
assets?: { [index: string]: IAsset };
aliases?: { [index: string]: IAssetAlias };
animations?: { [index: string]: IAssetAnimation };
palettes?: { [index: string]: IAssetPalette };
visualizations?: IAssetVisualizationData[];
roomVisualization?: IAssetRoomVisualizationData;
}
+18
View File
@@ -0,0 +1,18 @@
import { Spritesheet, Texture } from 'pixi.js';
import { IAssetData } from './IAssetData';
import { IGraphicAsset } from './IGraphicAsset';
import { IGraphicAssetCollection } from './IGraphicAssetCollection';
export interface IAssetManager
{
getTexture(name: string): Texture;
setTexture(name: string, texture: Texture): void;
addAssetToCollection(collectionName: string, assetName: string, texture: Texture, override?: boolean): boolean;
getAsset(name: string): IGraphicAsset;
getCollection(name: string): IGraphicAssetCollection;
createCollection(data: IAssetData, spritesheet: Spritesheet): IGraphicAssetCollection;
downloadAssets(urls: string[]): Promise<boolean>;
downloadAsset(url: string): Promise<boolean>;
readonly collections: Map<string, IGraphicAssetCollection>;
}
+12
View File
@@ -0,0 +1,12 @@
export interface IAssetPalette
{
id?: number;
source?: string;
master?: boolean;
tags?: string[];
breed?: number;
colorTag?: number;
color1?: string;
color2?: string;
rgb?: [ number, number, number ][];
}
+19
View File
@@ -0,0 +1,19 @@
import { Rectangle, Texture } from 'pixi.js';
export interface IGraphicAsset
{
recycle(): void;
readonly name: string;
readonly source: string;
readonly texture: Texture;
readonly usesPalette: boolean;
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
readonly offsetX: number;
readonly offsetY: number;
readonly flipH: boolean;
readonly flipV: boolean;
readonly rectangle: Rectangle;
}
@@ -0,0 +1,24 @@
import { Texture, TextureSource } from 'pixi.js';
import { IAssetData } from './IAssetData';
import { IGraphicAsset } from './IGraphicAsset';
import { IGraphicAssetPalette } from './IGraphicAssetPalette';
export interface IGraphicAssetCollection
{
dispose(): void;
addReference(): void;
removeReference(): void;
define(data: IAssetData): void;
getAsset(name: string): IGraphicAsset;
getAssetWithPalette(name: string, paletteName: string): IGraphicAsset;
getTexture(name: string): Texture;
getPaletteNames(): string[];
getPaletteColors(paletteName: string): number[];
getPalette(name: string): IGraphicAssetPalette;
addAsset(name: string, texture: Texture, override: boolean, x?: number, y?: number, flipH?: boolean, flipV?: boolean): boolean;
disposeAsset(name: string): void;
referenceCount: number;
name: string;
textureSource: TextureSource;
data: IAssetData;
}
@@ -0,0 +1,8 @@
import { Texture } from 'pixi.js';
export interface IGraphicAssetPalette
{
applyPalette(texture: Texture): Texture;
primaryColor: number;
secondaryColor: number;
}
@@ -0,0 +1,23 @@
import { IAssetAnimationAdd } from './IAssetAnimationAdd';
import { IAssetAnimationAvatar } from './IAssetAnimationAvatar';
import { IAssetAnimationDirection } from './IAssetAnimationDirection';
import { IAssetAnimationFrame } from './IAssetAnimationFrame';
import { IAssetAnimationOverride } from './IAssetAnimationOverride';
import { IAssetAnimationRemove } from './IAssetAnimationRemove';
import { IAssetAnimationShadow } from './IAssetAnimationShadow';
import { IAssetAnimationSprite } from './IAssetAnimationSprite';
export interface IAssetAnimation
{
name?: string;
desc?: string;
resetOnToggle?: boolean;
directions?: IAssetAnimationDirection[];
shadows?: IAssetAnimationShadow[];
adds?: IAssetAnimationAdd[];
removes?: IAssetAnimationRemove[];
sprites?: IAssetAnimationSprite[];
frames?: IAssetAnimationFrame[];
avatars?: IAssetAnimationAvatar[];
overrides?: IAssetAnimationOverride[];
}
@@ -0,0 +1,8 @@
export interface IAssetAnimationAdd
{
id?: string;
align?: string;
blend?: string;
ink?: number;
base?: string;
}
@@ -0,0 +1,6 @@
export interface IAssetAnimationAvatar
{
ink?: number;
foreground?: string;
background?: string;
}
@@ -0,0 +1,4 @@
export interface IAssetAnimationDirection
{
offset?: number;
}
@@ -0,0 +1,8 @@
import { IAssetAnimationFramePart } from './IAssetAnimationFramePart';
export interface IAssetAnimationFrame
{
repeats?: number;
fxs?: IAssetAnimationFramePart[];
bodyparts?: IAssetAnimationFramePart[];
}
@@ -0,0 +1,14 @@
import { IAssetAnimationFramePartItem } from './IAssetAnimationFramePartItem';
export interface IAssetAnimationFramePart
{
id?: string;
frame?: number;
base?: string;
action?: string;
dx?: number;
dy?: number;
dz?: number;
dd?: number;
items?: IAssetAnimationFramePartItem[];
}
@@ -0,0 +1,5 @@
export interface IAssetAnimationFramePartItem
{
id?: string;
base?: string;
}
@@ -0,0 +1,8 @@
import { IAssetAnimationFrame } from './IAssetAnimationFrame';
export interface IAssetAnimationOverride
{
name?: string;
override?: string;
frames?: IAssetAnimationFrame[];
}
@@ -0,0 +1,4 @@
export interface IAssetAnimationRemove
{
id?: string;
}
@@ -0,0 +1,4 @@
export interface IAssetAnimationShadow
{
id?: string;
}
@@ -0,0 +1,11 @@
import { IAssetAnimationSpriteDirection } from './IAssetAnimationSpriteDirection';
export interface IAssetAnimationSprite
{
id?: string;
member?: string;
directions?: number;
staticY?: number;
ink?: number;
directionList?: IAssetAnimationSpriteDirection[];
}
@@ -0,0 +1,7 @@
export interface IAssetAnimationSpriteDirection
{
id?: number;
dx?: number;
dy?: number;
dz?: number;
}
+12
View File
@@ -0,0 +1,12 @@
export * from './IAssetAnimation';
export * from './IAssetAnimationAdd';
export * from './IAssetAnimationAvatar';
export * from './IAssetAnimationDirection';
export * from './IAssetAnimationFrame';
export * from './IAssetAnimationFramePart';
export * from './IAssetAnimationFramePartItem';
export * from './IAssetAnimationOverride';
export * from './IAssetAnimationRemove';
export * from './IAssetAnimationShadow';
export * from './IAssetAnimationSprite';
export * from './IAssetAnimationSpriteDirection';
+19
View File
@@ -0,0 +1,19 @@
export * from './IAsset';
export * from './IAssetAlias';
export * from './IAssetData';
export * from './IAssetManager';
export * from './IAssetPalette';
export * from './IGraphicAsset';
export * from './IGraphicAssetCollection';
export * from './IGraphicAssetPalette';
export * from './animation';
export * from './logic';
export * from './logic/model';
export * from './logic/particlesystem';
export * from './room-visualization';
export * from './spritesheet';
export * from './visualization';
export * from './visualization/animation';
export * from './visualization/color';
export * from './visualization/gestures';
export * from './visualization/postures';
@@ -0,0 +1,4 @@
export interface ICustomVars
{
variables?: string[];
}
@@ -0,0 +1,17 @@
import { ICustomVars } from './IAssetLogicCustomVars';
import { IAssetLogicPlanetSystem } from './IAssetLogicPlanetSystem';
import { ISoundSample } from './ISoundSample';
import { IAssetLogicModel } from './model/IAssetLogicModel';
import { IParticleSystem } from './particlesystem';
export interface IAssetLogicData
{
model?: IAssetLogicModel;
maskType?: string;
credits?: string;
soundSample?: ISoundSample;
action?: { link?: string, startState?: number };
planetSystems?: IAssetLogicPlanetSystem[];
particleSystems?: IParticleSystem[];
customVars?: ICustomVars;
}
@@ -0,0 +1,11 @@
export interface IAssetLogicPlanetSystem
{
id?: number;
name?: string;
parent?: string;
radius?: number;
arcSpeed?: number;
arcOffset?: number;
blend?: number;
height?: number;
}
@@ -0,0 +1,5 @@
export interface ISoundSample
{
id?: number;
noPitch?: boolean;
}
+6
View File
@@ -0,0 +1,6 @@
export * from './IAssetLogicCustomVars';
export * from './IAssetLogicData';
export * from './IAssetLogicPlanetSystem';
export * from './ISoundSample';
export * from './model';
export * from './particlesystem';
@@ -0,0 +1,6 @@
export interface IAssetDimension
{
x: number;
y: number;
z?: number;
}
@@ -0,0 +1,7 @@
import { IAssetDimension } from './IAssetDimension';
export interface IAssetLogicModel
{
dimensions?: IAssetDimension;
directions?: number[];
}
@@ -0,0 +1,2 @@
export * from './IAssetDimension';
export * from './IAssetLogicModel';
@@ -0,0 +1,11 @@
import { IParticleSystemEmitter } from './IParticleSystemEmitter';
export interface IParticleSystem
{
size?: number;
canvasId?: number;
offsetY?: number;
blend?: number;
bgColor?: string;
emitters?: IParticleSystemEmitter[];
}
@@ -0,0 +1,15 @@
import { IParticleSystemParticle } from './IParticleSystemParticle';
import { IParticleSystemSimulation } from './IParticleSystemSimulation';
export interface IParticleSystemEmitter
{
id?: number;
name?: string;
spriteId?: number;
maxNumParticles?: number;
particlesPerFrame?: number;
burstPulse?: number;
fuseTime?: number;
simulation?: IParticleSystemSimulation;
particles?: IParticleSystemParticle[];
}
@@ -0,0 +1,7 @@
export interface IParticleSystemParticle
{
isEmitter?: boolean;
lifeTime?: number;
fade?: boolean;
frames?: string[];
}
@@ -0,0 +1,9 @@
export interface IParticleSystemSimulation
{
force?: number;
direction?: number;
gravity?: number;
airFriction?: number;
shape?: string;
energy?: number;
}
@@ -0,0 +1,4 @@
export * from './IParticleSystem';
export * from './IParticleSystemEmitter';
export * from './IParticleSystemParticle';
export * from './IParticleSystemSimulation';
@@ -0,0 +1,8 @@
import { IAssetPlaneVisualization } from './IAssetPlaneVisualization';
export interface IAssetPlane
{
id?: string;
visualizations?: IAssetPlaneVisualization[];
animatedVisualization?: IAssetPlaneVisualization[];
}
@@ -0,0 +1,7 @@
import { IAssetPlaneMaskVisualization } from './IAssetPlaneMaskVisualization';
export interface IAssetPlaneMask
{
id?: string;
visualizations?: IAssetPlaneMaskVisualization[];
}
@@ -0,0 +1,6 @@
import { IAssetPlaneMask } from './IAssetPlaneMask';
export interface IAssetPlaneMaskData
{
masks?: IAssetPlaneMask[];
}
@@ -0,0 +1,7 @@
import { IAssetPlaneTextureBitmap } from './IAssetPlaneTextureBitmap';
export interface IAssetPlaneMaskVisualization
{
size?: number;
bitmaps?: IAssetPlaneTextureBitmap[];
}
@@ -0,0 +1,7 @@
import { IAssetPlaneMaterialCellMatrix } from './IAssetPlaneMaterialCellMatrix';
export interface IAssetPlaneMaterial
{
id?: string;
matrices?: IAssetPlaneMaterialCellMatrix[];
}
@@ -0,0 +1,7 @@
import { IAssetPlaneMaterialCellExtraItemData } from './IAssetPlaneMaterialCellExtraItemData';
export interface IAssetPlaneMaterialCell
{
textureId?: string;
extraData?: IAssetPlaneMaterialCellExtraItemData;
}
@@ -0,0 +1,8 @@
import { IAssetPlaneMaterialCell } from './IAssetPlaneMaterialCell';
export interface IAssetPlaneMaterialCellColumn
{
repeatMode?: string;
width?: number;
cells?: IAssetPlaneMaterialCell[];
}
@@ -0,0 +1,6 @@
export interface IAssetPlaneMaterialCellExtraItemData
{
limitMax?: number;
extraItemTypes?: string[];
offsets?: [number, number][];
}
@@ -0,0 +1,12 @@
import { IAssetPlaneMaterialCellColumn } from './IAssetPlaneMaterialCellColumn';
export interface IAssetPlaneMaterialCellMatrix
{
repeatMode?: string;
align?: string;
normalMinX?: number;
normalMaxX?: number;
normalMinY?: number;
normalMaxY?: number;
columns?: IAssetPlaneMaterialCellColumn[];
}
@@ -0,0 +1,7 @@
import { IAssetPlaneTextureBitmap } from './IAssetPlaneTextureBitmap';
export interface IAssetPlaneTexture
{
id?: string;
bitmaps?: IAssetPlaneTextureBitmap[];
}
@@ -0,0 +1,8 @@
export interface IAssetPlaneTextureBitmap
{
assetName?: string;
normalMinX?: number;
normalMaxX?: number;
normalMinY?: number;
normalMaxY?: number;
}
@@ -0,0 +1,10 @@
import { IAssetPlaneVisualizationAnimatedLayer } from './IAssetPlaneVisualizationAnimatedLayer';
import { IAssetPlaneVisualizationLayer } from './IAssetPlaneVisualizationLayer';
export interface IAssetPlaneVisualization
{
size?: number;
horizontalAngle?: number;
verticalAngle?: number;
allLayers?: (IAssetPlaneVisualizationLayer | IAssetPlaneVisualizationAnimatedLayer)[];
}
@@ -0,0 +1,6 @@
import { IAssetPlaneVisualizationAnimatedLayerItem } from './IAssetPlaneVisualizationAnimatedLayerItem';
export interface IAssetPlaneVisualizationAnimatedLayer
{
items?: IAssetPlaneVisualizationAnimatedLayerItem[];
}
@@ -0,0 +1,11 @@
export interface IAssetPlaneVisualizationAnimatedLayerItem
{
id?: number;
assetId?: string;
x?: string;
y?: string;
randomX?: string;
randomY?: string;
speedX?: number;
speedY?: number;
}
@@ -0,0 +1,10 @@
import { IAssetPlane } from './IAssetPlane';
import { IAssetPlaneMaterial } from './IAssetPlaneMaterial';
import { IAssetPlaneTexture } from './IAssetPlaneTexture';
export interface IAssetPlaneVisualizationData
{
planes?: IAssetPlane[];
materials?: IAssetPlaneMaterial[];
textures?: IAssetPlaneTexture[];
}
@@ -0,0 +1,7 @@
export interface IAssetPlaneVisualizationLayer
{
materialId?: string;
color?: number;
offset?: number;
align?: string;
}
@@ -0,0 +1,10 @@
import { IAssetPlaneMaskData } from './IAssetPlaneMaskData';
import { IAssetPlaneVisualizationData } from './IAssetPlaneVisualizationData';
export interface IAssetRoomVisualizationData
{
floorData?: IAssetPlaneVisualizationData;
wallData?: IAssetPlaneVisualizationData;
landscapeData?: IAssetPlaneVisualizationData;
maskData?: IAssetPlaneMaskData;
}
@@ -0,0 +1,17 @@
export * from './IAssetPlane';
export * from './IAssetPlaneMask';
export * from './IAssetPlaneMaskData';
export * from './IAssetPlaneMaskVisualization';
export * from './IAssetPlaneMaterial';
export * from './IAssetPlaneMaterialCell';
export * from './IAssetPlaneMaterialCellColumn';
export * from './IAssetPlaneMaterialCellExtraItemData';
export * from './IAssetPlaneMaterialCellMatrix';
export * from './IAssetPlaneTexture';
export * from './IAssetPlaneTextureBitmap';
export * from './IAssetPlaneVisualization';
export * from './IAssetPlaneVisualizationAnimatedLayer';
export * from './IAssetPlaneVisualizationAnimatedLayerItem';
export * from './IAssetPlaneVisualizationData';
export * from './IAssetPlaneVisualizationLayer';
export * from './IAssetRoomVisualizationData';
@@ -0,0 +1,9 @@
import { SpritesheetData } from 'pixi.js';
import { ISpritesheetFrame } from './ISpritesheetFrame';
import { ISpritesheetMeta } from './ISpritesheetMeta';
export interface ISpritesheetData extends SpritesheetData
{
meta: ISpritesheetMeta;
frames: { [index: string]: ISpritesheetFrame };
}
@@ -0,0 +1,25 @@
export interface ISpritesheetFrame
{
frame: {
x: number;
y: number;
w: number;
h: number;
};
rotated: boolean;
trimmed: boolean;
spriteSourceSize: {
x: number;
y: number;
w: number;
h: number;
};
sourceSize: {
w: number;
h: number;
};
pivot: {
x: number;
y: number;
};
}
@@ -0,0 +1,12 @@
export interface ISpritesheetMeta
{
app: string;
version: string;
image: string;
format: string;
size: {
w: number;
h: number;
};
scale: string;
}
@@ -0,0 +1,3 @@
export * from './ISpritesheetData';
export * from './ISpritesheetFrame';
export * from './ISpritesheetMeta';
@@ -0,0 +1,20 @@
import { IAssetVisualAnimation } from './animation';
import { IAssetColor } from './color';
import { IAssetGesture } from './gestures';
import { IAssetVisualizationDirection } from './IAssetVisualizationDirection';
import { IAssetVisualizationLayer } from './IAssetVisualizationLayer';
import { IAssetPosture } from './postures/IAssetPosture';
export interface IAssetVisualizationData
{
size?: number;
layerCount?: number;
angle?: number;
layers?: { [index: string]: IAssetVisualizationLayer };
colors?: { [index: string]: IAssetColor };
directions?: { [index: string]: IAssetVisualizationDirection };
animations?: { [index: string]: IAssetVisualAnimation };
defaultPosture?: string;
postures?: { defaultPosture?: string, postures?: IAssetPosture[] };
gestures?: IAssetGesture[];
}
@@ -0,0 +1,6 @@
import { IAssetVisualizationLayer } from './IAssetVisualizationLayer';
export interface IAssetVisualizationDirection
{
layers?: { [index: string]: IAssetVisualizationLayer };
}
@@ -0,0 +1,10 @@
export interface IAssetVisualizationLayer
{
x?: number;
y?: number;
z?: number;
alpha?: number;
ink?: string;
tag?: string;
ignoreMouse?: boolean;
}
@@ -0,0 +1,10 @@
import { IAssetVisualAnimationLayer } from './IAssetVisualAnimationLayer';
export interface IAssetVisualAnimation
{
transitionTo?: number;
transitionFrom?: number;
immediateChangeFrom?: string;
randomStart?: boolean;
layers?: { [index: string]: IAssetVisualAnimationLayer };
}
@@ -0,0 +1,9 @@
import { IAssetVisualAnimationSequence } from './IAssetVisualAnimationSequence';
export interface IAssetVisualAnimationLayer
{
loopCount?: number;
frameRepeat?: number;
random?: number;
frameSequences?: { [index: string]: IAssetVisualAnimationSequence };
}
@@ -0,0 +1,8 @@
import { IAssetVisualAnimationSequenceFrame } from './IAssetVisualAnimationSequenceFrame';
export interface IAssetVisualAnimationSequence
{
loopCount?: number;
random?: number;
frames?: { [index: string]: IAssetVisualAnimationSequenceFrame };
}
@@ -0,0 +1,11 @@
import { IAssetVisualAnimationSequenceFrameOffset } from './IAssetVisualAnimationSequenceFrameOffset';
export interface IAssetVisualAnimationSequenceFrame
{
id?: number;
x?: number;
y?: number;
randomX?: number;
randomY?: number;
offsets?: { [index: string]: IAssetVisualAnimationSequenceFrameOffset };
}
@@ -0,0 +1,6 @@
export interface IAssetVisualAnimationSequenceFrameOffset
{
direction?: number;
x?: number;
y?: number;
}
@@ -0,0 +1,5 @@
export * from './IAssetVisualAnimation';
export * from './IAssetVisualAnimationLayer';
export * from './IAssetVisualAnimationSequence';
export * from './IAssetVisualAnimationSequenceFrame';
export * from './IAssetVisualAnimationSequenceFrameOffset';
@@ -0,0 +1,6 @@
import { IAssetColorLayer } from './IAssetColorLayer';
export interface IAssetColor
{
layers?: { [index: string]: IAssetColorLayer };
}
@@ -0,0 +1,4 @@
export interface IAssetColorLayer
{
color?: number;
}
@@ -0,0 +1,2 @@
export * from './IAssetColor';
export * from './IAssetColorLayer';
@@ -0,0 +1,5 @@
export interface IAssetGesture
{
id?: string;
animationId?: number;
}
@@ -0,0 +1 @@
export * from './IAssetGesture';
@@ -0,0 +1,7 @@
export * from './IAssetVisualizationData';
export * from './IAssetVisualizationDirection';
export * from './IAssetVisualizationLayer';
export * from './animation';
export * from './color';
export * from './gestures';
export * from './postures';
@@ -0,0 +1,5 @@
export interface IAssetPosture
{
id?: string;
animationId?: number;
}
@@ -0,0 +1 @@
export * from './IAssetPosture';
+5
View File
@@ -0,0 +1,5 @@
export interface IDisposable
{
dispose(): void;
disposed: boolean;
}
@@ -0,0 +1,10 @@
import { INitroEvent } from './INitroEvent';
export interface IEventDispatcher
{
dispose(): void;
addEventListener<T extends INitroEvent>(type: string, callback: (event: T) => void): void;
removeEventListener(type: string, callback: Function): void;
removeAllListeners(): void;
dispatchEvent<T extends INitroEvent>(event: T): boolean;
}
@@ -0,0 +1,5 @@
export interface ILinkEventTracker
{
linkReceived(link: string): void;
eventUrlPrefix: string;
}
+4
View File
@@ -0,0 +1,4 @@
export interface INitroEvent
{
type: string;
}
+10
View File
@@ -0,0 +1,10 @@
import { IDisposable } from './IDisposable';
import { IEventDispatcher } from './IEventDispatcher';
export interface INitroManager extends IDisposable
{
init(): void;
events: IEventDispatcher;
isLoaded: boolean;
isLoading: boolean;
}
@@ -0,0 +1,6 @@
import { Ticker } from 'pixi.js';
export interface IUpdateReceiver
{
update(ticker: Ticker): void;
}
+6
View File
@@ -0,0 +1,6 @@
export * from './IDisposable';
export * from './IEventDispatcher';
export * from './ILinkEventTracker';
export * from './INitroEvent';
export * from './INitroManager';
export * from './IUpdateReceiver';
+9
View File
@@ -0,0 +1,9 @@
import { IBinaryWriter } from '../utils';
import { IConnection } from './IConnection';
import { IMessageDataWrapper } from './IMessageDataWrapper';
export interface ICodec
{
encode(header: number, messages: any[]): IBinaryWriter;
decode(connection: IConnection): IMessageDataWrapper[];
}
@@ -0,0 +1,10 @@
import { IConnection } from './IConnection';
import { IMessageEvent } from './IMessageEvent';
export interface ICommunicationManager
{
init(): Promise<void>;
registerMessageEvent(event: IMessageEvent): IMessageEvent;
removeMessageEvent(event: IMessageEvent): void;
connection: IConnection;
}
@@ -0,0 +1,17 @@
import { IMessageComposer } from './IMessageComposer';
import { IMessageConfiguration } from './IMessageConfiguration';
import { IMessageEvent } from './IMessageEvent';
export interface IConnection
{
init(socketUrl: string): void;
ready(): void;
authenticated(): void;
send(...composers: IMessageComposer<unknown[]>[]): void;
processReceivedData(): void;
registerMessages(configuration: IMessageConfiguration): void;
addMessageEvent(event: IMessageEvent): void;
removeMessageEvent(event: IMessageEvent): void;
isAuthenticated: boolean;
dataBuffer: ArrayBuffer;
}
@@ -0,0 +1,4 @@
export interface IConnectionStateListener
{
connectionInit(socketUrl: string): void;
}
@@ -0,0 +1,5 @@
export interface IMessageComposer<T extends unknown[]>
{
dispose(): void;
getMessageArray(): T;
}
@@ -0,0 +1,5 @@
export interface IMessageConfiguration
{
events: Map<number, Function>;
composers: Map<number, Function>;
}
@@ -0,0 +1,15 @@
import { IBinaryReader } from '../utils';
export interface IMessageDataWrapper
{
readByte(): number;
readBytes(length: number): IBinaryReader;
readBoolean(): boolean;
readShort(): number;
readInt(): number;
readFloat(): number;
readDouble(): number;
readString(): string;
header: number;
bytesAvailable: boolean;
}
@@ -0,0 +1,11 @@
import { IConnection } from './IConnection';
import { IMessageParser } from './IMessageParser';
export interface IMessageEvent
{
dispose(): void;
callBack: Function;
parserClass: Function;
parser: IMessageParser;
connection: IConnection;
}
@@ -0,0 +1,7 @@
import { IMessageDataWrapper } from './IMessageDataWrapper';
export interface IMessageParser
{
flush(): boolean;
parse(wrapper: IMessageDataWrapper): boolean;
}
@@ -0,0 +1,5 @@
export class ClientDeviceCategoryEnum
{
public static UNKNOWN: number = 0;
public static BROWSER: number = 1;
}
@@ -0,0 +1,7 @@
export class ClientPlatformEnum
{
public static UNKNOWN: number = 0;
public static FLASH: number = 1;
public static HTML5: number = 2;
}
@@ -0,0 +1,7 @@
export class WebSocketEventEnum
{
public static CONNECTION_OPENED = 'open';
public static CONNECTION_CLOSED = 'close';
public static CONNECTION_ERROR = 'error';
public static CONNECTION_MESSAGE = 'message';
}
@@ -0,0 +1,3 @@
export * from './ClientDeviceCategoryEnum';
export * from './ClientPlatformEnum';
export * from './WebSocketEventEnum';
+10
View File
@@ -0,0 +1,10 @@
export * from './ICodec';
export * from './ICommunicationManager';
export * from './IConnection';
export * from './IConnectionStateListener';
export * from './IMessageComposer';
export * from './IMessageConfiguration';
export * from './IMessageDataWrapper';
export * from './IMessageEvent';
export * from './IMessageParser';
export * from './enums';
+43
View File
@@ -0,0 +1,43 @@
export * from './asset';
export * from './asset/animation';
export * from './asset/logic';
export * from './asset/logic/model';
export * from './asset/logic/particlesystem';
export * from './asset/room-visualization';
export * from './asset/spritesheet';
export * from './asset/visualization';
export * from './asset/visualization/animation';
export * from './asset/visualization/color';
export * from './asset/visualization/gestures';
export * from './asset/visualization/postures';
export * from './common';
export * from './communication';
export * from './communication/enums';
export * from './nitro';
export * from './nitro/avatar';
export * from './nitro/avatar/actions';
export * from './nitro/avatar/animation';
export * from './nitro/avatar/enum';
export * from './nitro/avatar/figuredata';
export * from './nitro/avatar/structure';
export * from './nitro/camera';
export * from './nitro/enums';
export * from './nitro/localization';
export * from './nitro/room';
export * from './nitro/room/enums';
export * from './nitro/room/object';
export * from './nitro/room/object/data';
export * from './nitro/room/object/data/type';
export * from './nitro/room/utils';
export * from './nitro/session';
export * from './nitro/session/enum';
export * from './nitro/sound';
export * from './room';
export * from './room/object';
export * from './room/object/enum';
export * from './room/object/logic';
export * from './room/object/visualization';
export * from './room/renderer';
export * from './ui';
export * from './ui/enums';
export * from './utils';
@@ -0,0 +1,6 @@
export interface IAvatarAssetDownloadLibrary
{
downloadAsset(): Promise<void>;
readonly libraryName: string;
readonly isLoaded: boolean;
}
@@ -0,0 +1,4 @@
export interface IAvatarEffectListener
{
resetEffect(effect: number): void;
}
@@ -0,0 +1,10 @@
export interface IAvatarFigureContainer
{
getPartTypeIds(): IterableIterator<string>;
hasPartType(_arg_1: string): boolean;
getPartSetId(_arg_1: string): number;
getPartColorIds(_arg_1: string): number[];
updatePart(_arg_1: string, _arg_2: number, _arg_3: number[]): void;
removePart(_arg_1: string): void;
getFigureString(): string;
}
@@ -0,0 +1,29 @@
import { Container, Texture } from 'pixi.js';
import { IAvatarFigureContainer } from './IAvatarFigureContainer';
import { IAnimationLayerData, ISpriteDataContainer } from './animation';
import { IPartColor } from './structure';
export interface IAvatarImage
{
dispose(): void;
setDirection(_arg_1: string, _arg_2: number): void;
setDirectionAngle(_arg_1: string, _arg_2: number): void;
updateAnimationByFrames(_arg_1?: number): void;
getScale(): string;
getSprites(): ISpriteDataContainer[];
getLayerData(_arg_1: ISpriteDataContainer): IAnimationLayerData;
processAsTexture(setType: string, hightlight: boolean, texture?: Texture): Texture;
processAsImageUrl(setType: string): string;
processAsContainer(setType: string): Container;
getDirection(): number;
getFigure(): IAvatarFigureContainer;
getPartColor(_arg_1: string): IPartColor;
isAnimating(): boolean;
getCanvasOffsets(): number[];
initActionAppends(): void;
endActionAppends(): void;
appendAction(_arg_1: string, ..._args: any[]): boolean;
isPlaceholder(): boolean;
animationHasResetOnToggle: boolean;
resetAnimationFrameCounter(): void;
}

Some files were not shown because too many files have changed in this diff Show More