cleaned PlaneTexture

This commit is contained in:
Dank074 2021-06-01 02:39:02 -05:00
parent 2197d5c88a
commit c30d5f2194
13 changed files with 56 additions and 56 deletions

View File

@ -50,7 +50,7 @@ export class AssetAliasCollection
} }
} }
public _Str_1044(k: string): boolean public hasAlias(k: string): boolean
{ {
const alias = this._aliases.get(k); const alias = this._aliases.get(k);
@ -59,12 +59,12 @@ export class AssetAliasCollection
return false; return false;
} }
public _Str_2125(k: string): string public getAssetName(k: string): string
{ {
let _local_2 = k; let _local_2 = k;
let _local_3 = 5; let _local_3 = 5;
while(this._Str_1044(_local_2) && (_local_3 >= 0)) while(this.hasAlias(_local_2) && (_local_3 >= 0))
{ {
const _local_4 = this._aliases.get(_local_2); const _local_4 = this._aliases.get(_local_2);
@ -79,7 +79,7 @@ export class AssetAliasCollection
{ {
if(!this._assets) return null; if(!this._assets) return null;
name = this._Str_2125(name); name = this.getAssetName(name);
const asset = this._assets.getAsset(name); const asset = this._assets.getAsset(name);
@ -87,4 +87,4 @@ export class AssetAliasCollection
return asset; return asset;
} }
} }

View File

@ -407,7 +407,7 @@ export class AvatarImageCache
{ {
const spriteData = new RoomObjectSpriteData(); const spriteData = new RoomObjectSpriteData();
spriteData.name = this._assets._Str_2125(assetName); spriteData.name = this._assets.getAssetName(assetName);
spriteData.x = (-(offset.x) - 33); spriteData.x = (-(offset.x) - 33);
spriteData.y = -(offset.y); spriteData.y = -(offset.y);
spriteData.z = (this._serverRenderData.length * -0.0001); spriteData.z = (this._serverRenderData.length * -0.0001);

View File

@ -457,7 +457,7 @@ export class RoomPlane implements IRoomPlane
if(planeMask) if(planeMask)
{ {
const assetName = planeMask._Str_2125(k.scale); const assetName = planeMask.getAssetName(k.scale);
if(assetName) if(assetName)
{ {
@ -520,7 +520,7 @@ export class RoomPlane implements IRoomPlane
for(const cell of column._Str_22299()) for(const cell of column._Str_22299())
{ {
const name = cell._Str_2125(normal); const name = cell.getAssetName(normal);
if(name) assetNames.push(name); if(name) assetNames.push(name);
} }

View File

@ -102,7 +102,7 @@ export class PlaneMask
return visualization.getAsset(_arg_2); return visualization.getAsset(_arg_2);
} }
public _Str_2125(k: number): string public getAssetName(k: number): string
{ {
if(!this._assetNames) return null; if(!this._assetNames) return null;
@ -115,4 +115,4 @@ export class PlaneMask
this._assetNames.set(k, _arg_2); this._assetNames.set(k, _arg_2);
} }
} }

View File

@ -2,8 +2,8 @@
export class PlaneMaskBitmap export class PlaneMaskBitmap
{ {
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
private _asset: IGraphicAsset; private _asset: IGraphicAsset;
private _normalMinX: number; private _normalMinX: number;
@ -49,4 +49,4 @@ export class PlaneMaskBitmap
{ {
this._asset = null; this._asset = null;
} }
} }

View File

@ -123,10 +123,10 @@ export class PlaneMaskManager
if(!asset) continue; if(!asset) continue;
let normalMinX = PlaneMaskVisualization._Str_3268; let normalMinX = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE;
let normalMaxX = PlaneMaskVisualization._Str_3271; let normalMaxX = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE;
let normalMinY = PlaneMaskVisualization._Str_3268; let normalMinY = PlaneMaskVisualization.MIN_NORMAL_COORDINATE_VALUE;
let normalMaxY = PlaneMaskVisualization._Str_3271; let normalMaxY = PlaneMaskVisualization.MAX_NORMAL_COORDINATE_VALUE;
if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX; if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX;
if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX; if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX;
@ -135,7 +135,7 @@ export class PlaneMaskManager
if(!asset.flipH) graphicName = assetName; if(!asset.flipH) graphicName = assetName;
_arg_2._Str_16790(asset, normalMinX, normalMaxX, normalMinY, normalMaxY); _arg_2.addBitmap(asset, normalMinX, normalMaxX, normalMinY, normalMaxY);
} }
return graphicName; return graphicName;

View File

@ -1,11 +1,11 @@
import { IGraphicAsset } from '../../../../../../room/object/visualization/utils/IGraphicAsset'; import { IGraphicAsset } from '../../../../../../room/object/visualization/utils/IGraphicAsset';
import { IVector3D } from '../../../../../../room/utils/IVector3D'; import { IVector3D } from '../../../../../../room/utils/IVector3D';
import { PlaneMaskBitmap } from './PlaneMaskBitmap'; import { PlaneMaskBitmap } from './PlaneMaskBitmap';
export class PlaneMaskVisualization export class PlaneMaskVisualization
{ {
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
private _bitmaps: PlaneMaskBitmap[]; private _bitmaps: PlaneMaskBitmap[];
@ -26,7 +26,7 @@ export class PlaneMaskVisualization
this._bitmaps = null; this._bitmaps = null;
} }
public _Str_16790(k: IGraphicAsset, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1): void public addBitmap(k: IGraphicAsset, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1): void
{ {
this._bitmaps.push(new PlaneMaskBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5)); this._bitmaps.push(new PlaneMaskBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5));
} }
@ -47,4 +47,4 @@ export class PlaneMaskVisualization
return null; return null;
} }
} }

View File

@ -4,8 +4,8 @@ import { PlaneMaterialCellMatrix } from './PlaneMaterialCellMatrix';
export class PlaneMaterial export class PlaneMaterial
{ {
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
private _planeMaterialItems: PlaneMaterialCellMatrix[]; private _planeMaterialItems: PlaneMaterialCellMatrix[];
private _isCached: boolean; private _isCached: boolean;
@ -90,4 +90,4 @@ export class PlaneMaterial
return cellMatrix.render(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_8); return cellMatrix.render(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6, _arg_7, _arg_8);
} }
} }

View File

@ -93,7 +93,7 @@ export class PlaneMaterialCell
{ {
if(this._texture) if(this._texture)
{ {
const texture = this._texture._Str_4913(k); const texture = this._texture.getBitmap(k);
if(texture) return texture.height; if(texture) return texture.height;
} }
@ -105,7 +105,7 @@ export class PlaneMaterialCell
{ {
if(!this._texture) return null; if(!this._texture) return null;
const texture = this._texture._Str_4913(normal); const texture = this._texture.getBitmap(normal);
if(!texture) return null; if(!texture) return null;
@ -235,8 +235,8 @@ export class PlaneMaterialCell
return null; return null;
} }
public _Str_2125(k:IVector3D): string public getAssetName(k:IVector3D): string
{ {
return (this._texture == null) ? null : this._texture._Str_2125(k); return (this._texture == null) ? null : this._texture.getAssetName(k);
} }
} }

View File

@ -16,8 +16,8 @@ export class PlaneMaterialCellMatrix
public static _Str_6063: number = 5; public static _Str_6063: number = 5;
public static _Str_9127: number = 6; public static _Str_9127: number = 6;
public static _Str_18632: number = PlaneMaterialCellMatrix._Str_7916;//1 public static _Str_18632: number = PlaneMaterialCellMatrix._Str_7916;//1
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
public static ALIGN_TOP: number = 1; public static ALIGN_TOP: number = 1;
public static _Str_3606: number = 2; public static _Str_3606: number = 2;
public static _Str_6914: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1 public static _Str_6914: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1
@ -720,4 +720,4 @@ export class PlaneMaterialCellMatrix
return this._columns; return this._columns;
} }
} }

View File

@ -234,10 +234,10 @@ export class PlaneRasterizer implements IPlaneRasterizer
const assetName = bitmap.assetName; const assetName = bitmap.assetName;
let normalMinX = PlaneTexture._Str_3268; let normalMinX = PlaneTexture.MIN_NORMAL_COORDINATE_VALUE;
let normalMaxX = PlaneTexture._Str_3271; let normalMaxX = PlaneTexture.MAX_NORMAL_COORDINATE_VALUE;
let normalMinY = PlaneTexture._Str_3268; let normalMinY = PlaneTexture.MIN_NORMAL_COORDINATE_VALUE;
let normalMaxY = PlaneTexture._Str_3271; let normalMaxY = PlaneTexture.MAX_NORMAL_COORDINATE_VALUE;
if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX; if(bitmap.normalMinX !== undefined) normalMinX = bitmap.normalMinX;
if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX; if(bitmap.normalMaxX !== undefined) normalMaxX = bitmap.normalMaxX;
@ -259,7 +259,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
newTexture = Rasterizer.getFlipHBitmapData(texture); newTexture = Rasterizer.getFlipHBitmapData(texture);
} }
plane._Str_16790(newTexture, normalMinX, normalMaxX, normalMinY, normalMaxY, assetName); plane.addBitmap(newTexture, normalMinX, normalMaxX, normalMinY, normalMaxY, assetName);
} }
} }
} }
@ -290,10 +290,10 @@ export class PlaneRasterizer implements IPlaneRasterizer
let repeatMode = matrix.repeatMode; let repeatMode = matrix.repeatMode;
let align = matrix.align; let align = matrix.align;
const normalMinX = PlaneMaterialCellMatrix._Str_3268; const normalMinX = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE;
const normalMaxX = PlaneMaterialCellMatrix._Str_3271; const normalMaxX = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE;
const normalMinY = PlaneMaterialCellMatrix._Str_3268; const normalMinY = PlaneMaterialCellMatrix.MIN_NORMAL_COORDINATE_VALUE;
const normalMaxY = PlaneMaterialCellMatrix._Str_3271; const normalMaxY = PlaneMaterialCellMatrix.MAX_NORMAL_COORDINATE_VALUE;
switch(repeatMode) switch(repeatMode)
{ {

View File

@ -4,8 +4,8 @@ import { PlaneTextureBitmap } from './PlaneTextureBitmap';
export class PlaneTexture export class PlaneTexture
{ {
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
private _bitmaps: PlaneTextureBitmap[]; private _bitmaps: PlaneTextureBitmap[];
@ -29,21 +29,21 @@ export class PlaneTexture
} }
} }
public _Str_16790(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void public addBitmap(k: Texture, _arg_2: number = -1, _arg_3: number = 1, _arg_4: number = -1, _arg_5: number = 1, _arg_6: string = null): void
{ {
this._bitmaps.push(new PlaneTextureBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6)); this._bitmaps.push(new PlaneTextureBitmap(k, _arg_2, _arg_3, _arg_4, _arg_5, _arg_6));
} }
public _Str_4913(k: IVector3D): Texture public getBitmap(k: IVector3D): Texture
{ {
const _local_2 = this._Str_21702(k); const _local_2 = this.getPlaneTextureBitmap(k);
if(!_local_2) return null; if(!_local_2) return null;
return _local_2.bitmap; return _local_2.bitmap;
} }
public _Str_21702(k: IVector3D): PlaneTextureBitmap public getPlaneTextureBitmap(k: IVector3D): PlaneTextureBitmap
{ {
if(!k) return null; if(!k) return null;
@ -57,10 +57,10 @@ export class PlaneTexture
return null; return null;
} }
public _Str_2125(k: IVector3D): string public getAssetName(k: IVector3D): string
{ {
const _local_2 = this._Str_21702(k); const _local_2 = this.getPlaneTextureBitmap(k);
return (!_local_2) ? null : _local_2.assetName; return (!_local_2) ? null : _local_2.assetName;
} }
} }

View File

@ -1,9 +1,9 @@
import { Texture } from 'pixi.js'; import { Texture } from 'pixi.js';
export class PlaneTextureBitmap export class PlaneTextureBitmap
{ {
public static _Str_3268: number = -1; public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static _Str_3271: number = 1; public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
private _bitmap: Texture; private _bitmap: Texture;
private _normalMinX: number; private _normalMinX: number;
@ -56,4 +56,4 @@ export class PlaneTextureBitmap
{ {
this._bitmap = null; this._bitmap = null;
} }
} }