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,47 @@
|
||||
import { AvatarScaleType } from '@nitrots/api';
|
||||
import { Point } from 'pixi.js';
|
||||
|
||||
export class AvatarCanvas
|
||||
{
|
||||
private _id: string;
|
||||
private _width: number;
|
||||
private _height: number;
|
||||
private _offset: Point;
|
||||
private _regPoint: Point;
|
||||
|
||||
constructor(k: any, _arg_2: string)
|
||||
{
|
||||
this._id = k.id;
|
||||
this._width = k.width;
|
||||
this._height = k.height;
|
||||
this._offset = new Point(k.dx, k.dy);
|
||||
|
||||
if(_arg_2 == AvatarScaleType.LARGE) this._regPoint = new Point(((this._width - 64) / 2), 0);
|
||||
else this._regPoint = new Point(((this._width - 32) / 2), 0);
|
||||
}
|
||||
|
||||
public get width(): number
|
||||
{
|
||||
return this._width;
|
||||
}
|
||||
|
||||
public get height(): number
|
||||
{
|
||||
return this._height;
|
||||
}
|
||||
|
||||
public get offset(): Point
|
||||
{
|
||||
return this._offset;
|
||||
}
|
||||
|
||||
public get id(): string
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get regPoint(): Point
|
||||
{
|
||||
return this._regPoint;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user