mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-02-17 02:22:36 +01:00
cleaned Plane
This commit is contained in:
parent
c30d5f2194
commit
83c823222f
@ -495,7 +495,7 @@ export class RoomPlane implements IRoomPlane
|
||||
if(this._isVisible)
|
||||
{
|
||||
const maskData = this.resolveMasks(geometry);
|
||||
const layers = this._rasterizer._Str_8988(this._id);
|
||||
const layers = this._rasterizer.getLayers(this._id);
|
||||
|
||||
let i = 0;
|
||||
|
||||
|
@ -175,7 +175,7 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
|
||||
if(this._data)
|
||||
{
|
||||
this._data._Str_3355();
|
||||
this._data.clearCache();
|
||||
|
||||
this._data = null;
|
||||
}
|
||||
|
@ -96,13 +96,13 @@ export class RoomVisualizationData extends Disposable implements IObjectVisualiz
|
||||
this._initialized = true;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(this._wallRasterizer) this._wallRasterizer._Str_3355();
|
||||
if(this._wallRasterizer) this._wallRasterizer.clearCache();
|
||||
|
||||
if(this._floorRasterizer) this._floorRasterizer._Str_3355();
|
||||
if(this._floorRasterizer) this._floorRasterizer.clearCache();
|
||||
|
||||
if(this._landscapeRasterizer) this._landscapeRasterizer._Str_3355();
|
||||
if(this._landscapeRasterizer) this._landscapeRasterizer.clearCache();
|
||||
}
|
||||
|
||||
public get wallRasterizer(): WallRasterizer
|
||||
@ -124,4 +124,4 @@ export class RoomVisualizationData extends Disposable implements IObjectVisualiz
|
||||
{
|
||||
return this._maskManager;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ export class PlaneMask
|
||||
return visualization;
|
||||
}
|
||||
|
||||
private _Str_8560(k: number): number
|
||||
private getSizeIndex(k: number): number
|
||||
{
|
||||
let sizeIndex = 0;
|
||||
const index = 1;
|
||||
@ -77,7 +77,7 @@ export class PlaneMask
|
||||
{
|
||||
if(k === this._lastSize) return this._lastMaskVisualization;
|
||||
|
||||
const sizeIndex = this._Str_8560(k);
|
||||
const sizeIndex = this.getSizeIndex(k);
|
||||
|
||||
if(sizeIndex < this._sizes.length)
|
||||
{
|
||||
|
@ -8,6 +8,6 @@ export interface IPlaneRasterizer
|
||||
initializeDimensions(_arg_1: number, _arg_2: number): boolean;
|
||||
render(_arg_1: Graphics, _arg_2: string, _arg_3: number, _arg_4: number, _arg_5: number, _arg_6: IVector3D, _arg_7: boolean, _arg_8?: number, _arg_9?: number, _arg_10?: number, _arg_11?: number, _arg_12?: number): PlaneBitmapData;
|
||||
getTextureIdentifier(_arg_1: number, _arg_2: IVector3D): string;
|
||||
_Str_8988(_arg_1: string): PlaneVisualizationLayer[];
|
||||
getLayers(_arg_1: string): PlaneVisualizationLayer[];
|
||||
_Str_24005(): void;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export class LandscapePlane extends Plane
|
||||
|
||||
public isStatic(k: number): boolean
|
||||
{
|
||||
const _local_2 = this._Str_6009(k);
|
||||
const _local_2 = this.getPlaneVisualization(k);
|
||||
|
||||
if(_local_2) return !(_local_2._Str_20530);
|
||||
|
||||
@ -36,7 +36,7 @@ export class LandscapePlane extends Plane
|
||||
|
||||
public render(k: Graphics, _arg_2: number, _arg_3: number, _arg_4: number, _arg_5: IVector3D, _arg_6: boolean, _arg_7: number, _arg_8: number, _arg_9: number, _arg_10: number, _arg_11: number): Graphics
|
||||
{
|
||||
const visualization = this._Str_6009(_arg_4);
|
||||
const visualization = this.getPlaneVisualization(_arg_4);
|
||||
|
||||
if(!visualization || !visualization.geometry) return null;
|
||||
|
||||
@ -59,4 +59,4 @@ export class LandscapePlane extends Plane
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ export class LandscapeRasterizer extends PlaneRasterizer
|
||||
const totalAnimatedLayers = ((animatedLayers && animatedLayers.length) || 0);
|
||||
const totalLayers = (totalBasicLayers + totalAnimatedLayers);
|
||||
|
||||
const planeVisualization = plane._Str_20305(size, (totalLayers || 0), this._Str_17204(size, horizontalAngle, verticalAngle));
|
||||
const planeVisualization = plane.createPlaneVisualization(size, (totalLayers || 0), this._Str_17204(size, horizontalAngle, verticalAngle));
|
||||
|
||||
if(planeVisualization)
|
||||
{
|
||||
@ -157,7 +157,7 @@ export class LandscapeRasterizer extends PlaneRasterizer
|
||||
layerId++;
|
||||
}
|
||||
|
||||
planeVisualization._Str_23489(layerId, animationItems, this._Str_2697);
|
||||
planeVisualization._Str_23489(layerId, animationItems, this.assetCollection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ export class PlaneVisualizationAnimationLayer implements IDisposable
|
||||
}
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(this._bitmapData)
|
||||
{
|
||||
@ -148,4 +148,4 @@ export class PlaneVisualizationAnimationLayer implements IDisposable
|
||||
|
||||
return k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ export class FloorPlane extends Plane
|
||||
|
||||
public render(k: Graphics, _arg_2: number, _arg_3: number, size: number, _arg_5: IVector3D, _arg_6: boolean, _arg_7: number, _arg_8: number): Graphics
|
||||
{
|
||||
const visualization = this._Str_6009(size);
|
||||
const visualization = this.getPlaneVisualization(size);
|
||||
|
||||
if(!visualization || !visualization.geometry) return null;
|
||||
|
||||
@ -35,4 +35,4 @@ export class FloorPlane extends Plane
|
||||
|
||||
return visualization.render(k, _arg_2, _arg_3, _arg_5, _arg_6, _local_13, _local_14);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,17 +37,17 @@ export class Plane
|
||||
this._lastSize = -1;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
for(const visualization of this._planeVisualizations.values())
|
||||
{
|
||||
if(!visualization) continue;
|
||||
|
||||
visualization._Str_3355();
|
||||
visualization.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
public _Str_20305(k: number, _arg_2: number, _arg_3: IRoomGeometry): PlaneVisualization
|
||||
public createPlaneVisualization(k: number, _arg_2: number, _arg_3: IRoomGeometry): PlaneVisualization
|
||||
{
|
||||
const existing = this._planeVisualizations.get(k.toString());
|
||||
|
||||
@ -63,7 +63,7 @@ export class Plane
|
||||
return plane;
|
||||
}
|
||||
|
||||
private _Str_8560(k: number): number
|
||||
private getSizeIndex(k: number): number
|
||||
{
|
||||
let size = 0;
|
||||
let index = 1;
|
||||
@ -85,11 +85,11 @@ export class Plane
|
||||
return size;
|
||||
}
|
||||
|
||||
protected _Str_6009(k: number): PlaneVisualization
|
||||
protected getPlaneVisualization(k: number): PlaneVisualization
|
||||
{
|
||||
if(k === this._lastSize) return this._lastPlaneVisualization;
|
||||
|
||||
const sizeIndex = this._Str_8560(k);
|
||||
const sizeIndex = this.getSizeIndex(k);
|
||||
|
||||
if(sizeIndex < this._sizes.length)
|
||||
{
|
||||
@ -105,8 +105,8 @@ export class Plane
|
||||
return this._lastPlaneVisualization;
|
||||
}
|
||||
|
||||
public _Str_8988(): PlaneVisualizationLayer[]
|
||||
public getLayers(): PlaneVisualizationLayer[]
|
||||
{
|
||||
return this._Str_6009(this._lastSize)._Str_8988();
|
||||
return this.getPlaneVisualization(this._lastSize).getLayers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export class PlaneMaterial
|
||||
this._isCached = false;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(!this._isCached) return;
|
||||
|
||||
@ -43,7 +43,7 @@ export class PlaneMaterial
|
||||
{
|
||||
if(!item) continue;
|
||||
|
||||
item._Str_3355();
|
||||
item.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ export class PlaneMaterialCell
|
||||
this._extraItemCount = 0;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(this._cachedBitmapData)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ export class PlaneMaterialCellColumn
|
||||
if(this._cachedBitmapNormal) this._cachedBitmapNormal = null;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(!this._isCached) return;
|
||||
|
||||
@ -117,7 +117,7 @@ export class PlaneMaterialCellColumn
|
||||
{
|
||||
if(!cell) continue;
|
||||
|
||||
cell._Str_3355();
|
||||
cell.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
@ -487,4 +487,4 @@ export class PlaneMaterialCellColumn
|
||||
{
|
||||
return this._cells;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ export class PlaneMaterialCellMatrix
|
||||
if(this._cachedBitmapNormal) this._cachedBitmapNormal = null;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(!this._isCached) return;
|
||||
|
||||
@ -131,7 +131,7 @@ export class PlaneMaterialCellMatrix
|
||||
{
|
||||
if(!column) continue;
|
||||
|
||||
column._Str_3355();
|
||||
column.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
||||
return this._data;
|
||||
}
|
||||
|
||||
protected get _Str_2697(): IGraphicAssetCollection
|
||||
protected get assetCollection(): IGraphicAssetCollection
|
||||
{
|
||||
return this._assetCollection;
|
||||
}
|
||||
@ -97,20 +97,20 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
||||
this._assetCollection = null;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
for(const plane of this._planes.values())
|
||||
{
|
||||
if(!plane) continue;
|
||||
|
||||
plane._Str_3355();
|
||||
plane.clearCache();
|
||||
}
|
||||
|
||||
for(const material of this._materials.values())
|
||||
{
|
||||
if(!material) continue;
|
||||
|
||||
material._Str_3355();
|
||||
material.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
||||
|
||||
private _Str_25281(): void
|
||||
{
|
||||
if(this._data.textures && this._data.textures.length) this._Str_24250(this._data.textures, this._Str_2697);
|
||||
if(this._data.textures && this._data.textures.length) this._Str_24250(this._data.textures, this.assetCollection);
|
||||
|
||||
if(this._data.materials && this._data.materials.length) this._Str_22388(this._data.materials);
|
||||
}
|
||||
@ -548,7 +548,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
||||
|
||||
const layers = visualization.layers;
|
||||
|
||||
const planeVisualization = k._Str_20305(size, ((layers && layers.length) || 0), this._Str_17204(size, horizontalAngle, verticalAngle));
|
||||
const planeVisualization = k.createPlaneVisualization(size, ((layers && layers.length) || 0), this._Str_17204(size, horizontalAngle, verticalAngle));
|
||||
|
||||
if(planeVisualization && (layers && layers.length))
|
||||
{
|
||||
@ -598,12 +598,12 @@ export class PlaneRasterizer implements IPlaneRasterizer
|
||||
return k.toString();
|
||||
}
|
||||
|
||||
public _Str_8988(k: string): PlaneVisualizationLayer[]
|
||||
public getLayers(k: string): PlaneVisualizationLayer[]
|
||||
{
|
||||
let planes = this._Str_3491(k);
|
||||
|
||||
if(!planes) planes = this._Str_3491(PlaneRasterizer.DEFAULT);
|
||||
|
||||
return planes._Str_8988();
|
||||
return planes.getLayers();
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ export class PlaneVisualization
|
||||
if(this._cachedBitmapNormal) this._cachedBitmapNormal = null;
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(!this._isCached) return;
|
||||
|
||||
@ -99,7 +99,7 @@ export class PlaneVisualization
|
||||
|
||||
const planeLayer = layer as PlaneVisualizationLayer;
|
||||
|
||||
planeLayer._Str_3355();
|
||||
planeLayer.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ export class PlaneVisualization
|
||||
return true;
|
||||
}
|
||||
|
||||
public _Str_8988(): PlaneVisualizationLayer[]
|
||||
public getLayers(): PlaneVisualizationLayer[]
|
||||
{
|
||||
return this._layers as PlaneVisualizationLayer[];
|
||||
}
|
||||
@ -237,4 +237,4 @@ export class PlaneVisualization
|
||||
|
||||
return this._cachedBitmapData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ export class PlaneVisualizationLayer
|
||||
this._isDisposed = true;
|
||||
this._material = null;
|
||||
|
||||
this._Str_3355();
|
||||
this.clearCache();
|
||||
}
|
||||
|
||||
public _Str_3355(): void
|
||||
public clearCache(): void
|
||||
{
|
||||
if(this._bitmapData)
|
||||
{
|
||||
|
@ -11,7 +11,7 @@ export class WallPlane extends Plane
|
||||
|
||||
public render(k: Graphics, _arg_2: number, _arg_3: number, size: number, _arg_5: IVector3D, _arg_6: boolean): Graphics
|
||||
{
|
||||
const visualization = this._Str_6009(size);
|
||||
const visualization = this.getPlaneVisualization(size);
|
||||
|
||||
if(!visualization || !visualization.geometry) return null;
|
||||
|
||||
@ -27,4 +27,4 @@ export class WallPlane extends Plane
|
||||
|
||||
return visualization.render(k, _arg_2, _arg_3, _arg_5, _arg_6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user