You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
speed-measure-plugin*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
.git
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
*.zip
|
||||
*.as
|
||||
*.bin
|
||||
@@ -0,0 +1 @@
|
||||
export * from './src';
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@nitrots/api",
|
||||
"description": "Nitro api module",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "vite build",
|
||||
"compile": "tsc --project ./tsconfig.json --noEmit false",
|
||||
"eslint": "eslint ./src --fix"
|
||||
},
|
||||
"main": "./index",
|
||||
"dependencies": {
|
||||
"pixi.js": "^8.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "~5.4.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface IAsset
|
||||
{
|
||||
source?: string;
|
||||
x?: number;
|
||||
y?: number;
|
||||
flipH?: boolean;
|
||||
flipV?: boolean;
|
||||
usesPalette?: boolean;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface IAssetAlias
|
||||
{
|
||||
link?: string;
|
||||
flipH?: boolean;
|
||||
flipV?: boolean;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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>;
|
||||
}
|
||||
@@ -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 ][];
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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';
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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[];
|
||||
}
|
||||
+11
@@ -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 };
|
||||
}
|
||||
+6
@@ -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';
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export interface INitroEvent
|
||||
{
|
||||
type: string;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './IDisposable';
|
||||
export * from './IEventDispatcher';
|
||||
export * from './ILinkEventTracker';
|
||||
export * from './INitroEvent';
|
||||
export * from './INitroManager';
|
||||
export * from './IUpdateReceiver';
|
||||
@@ -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';
|
||||
@@ -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';
|
||||
@@ -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;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user