You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 07:26:18 +00:00
Move to Renderer V2
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
import { IFigureDataPart, IFigurePart } from '@nitrots/api';
|
||||
|
||||
export class FigurePart implements IFigurePart
|
||||
{
|
||||
private _id: number;
|
||||
private _type: string;
|
||||
private _breed: number;
|
||||
private _index: number;
|
||||
private _colorLayerIndex: number;
|
||||
private _paletteMapId: number;
|
||||
|
||||
constructor(data: IFigureDataPart)
|
||||
{
|
||||
if(!data) throw new Error('invalid_data');
|
||||
|
||||
this._id = data.id;
|
||||
this._type = data.type;
|
||||
this._index = data.index;
|
||||
this._colorLayerIndex = data.colorindex;
|
||||
this._paletteMapId = -1;
|
||||
this._breed = -1;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get type(): string
|
||||
{
|
||||
return this._type;
|
||||
}
|
||||
|
||||
public get breed(): number
|
||||
{
|
||||
return this._breed;
|
||||
}
|
||||
|
||||
public get index(): number
|
||||
{
|
||||
return this._index;
|
||||
}
|
||||
|
||||
public get colorLayerIndex(): number
|
||||
{
|
||||
return this._colorLayerIndex;
|
||||
}
|
||||
|
||||
public get paletteMap(): number
|
||||
{
|
||||
return this._paletteMapId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user