cleaned PlaneMaterialCellMatrix

This commit is contained in:
Dank074 2021-06-17 18:34:47 -05:00
parent 5754ff294a
commit d3978b31a0
7 changed files with 129 additions and 129 deletions

View File

@ -514,11 +514,11 @@ export class RoomPlane implements IRoomPlane
Randomizer.setSeed(this._randomSeed);
for(const column of cm._Str_23721(this.screenWidth(geometry)))
for(const column of cm.getColumns(this.screenWidth(geometry)))
{
const assetNames: string[] = [];
for(const cell of column._Str_22299())
for(const cell of column.getCells())
{
const name = cell.getAssetName(normal);
@ -527,7 +527,7 @@ export class RoomPlane implements IRoomPlane
if(assetNames.length > 0)
{
if(!column._Str_24523()) assetNames.push('');
if(!column.isRepeated()) assetNames.push('');
data.addAssetColumn(assetNames);
}

View File

@ -88,7 +88,7 @@ export class LandscapeRasterizer extends PlaneRasterizer
if(layer)
{
let material: PlaneMaterial = null;
let align: number = PlaneVisualizationLayer._Str_6914;
let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT;
let color: number = LandscapePlane.DEFAULT_COLOR;
let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET;
@ -102,7 +102,7 @@ export class LandscapeRasterizer extends PlaneRasterizer
{
if(layer.align === 'bottom')
{
align = PlaneVisualizationLayer._Str_3606;
align = PlaneVisualizationLayer.ALIGN_BOTTOM;
}
else if(layer.align === 'top') align = PlaneVisualizationLayer.ALIGN_TOP;

View File

@ -89,7 +89,7 @@ export class PlaneMaterialCell
}
}
public _Str_9599(k: IVector3D): number
public getHeight(k: IVector3D): number
{
if(this._texture)
{

View File

@ -1,16 +1,16 @@
import { Graphics } from 'pixi.js';
import { Graphics } from 'pixi.js';
import { IVector3D } from '../../../../../../../room/utils/IVector3D';
import { Vector3d } from '../../../../../../../room/utils/Vector3d';
import { PlaneMaterialCell } from './PlaneMaterialCell';
export class PlaneMaterialCellColumn
{
public static _Str_9685: number = 0;
public static _Str_7916: number = 1;
public static _Str_6087: number = 2;
public static _Str_6114: number = 3;
public static _Str_6187: number = 4;
public static _Str_6063: number = 5;
public static REPEAT_MODE_NONE: number = 0;
public static REPEAT_MODE_ALL: number = 1;
public static REPEAT_MODE_BORDERS: number = 2;
public static REPEAT_MODE_CENTER: number = 3;
public static REPEAT_MODE_FIRST: number = 4;
public static REPEAT_MODE_LAST: number = 5;
private _cells: PlaneMaterialCell[];
private _repeatMode: number;
@ -59,9 +59,9 @@ export class PlaneMaterialCellColumn
return this._isStatic;
}
public _Str_24523(): boolean
public isRepeated(): boolean
{
return !(this._repeatMode === PlaneMaterialCellColumn._Str_9685);
return !(this._repeatMode === PlaneMaterialCellColumn.REPEAT_MODE_NONE);
}
public get width(): number
@ -128,9 +128,9 @@ export class PlaneMaterialCellColumn
{
let ht = 0;
if(this._repeatMode == PlaneMaterialCellColumn._Str_9685)
if(this._repeatMode == PlaneMaterialCellColumn.REPEAT_MODE_NONE)
{
ht = this._Str_19857(this._cells, normal);
ht = this.getCellsHeight(this._cells, normal);
height = ht;
}
@ -188,34 +188,34 @@ export class PlaneMaterialCellColumn
switch(this._repeatMode)
{
case PlaneMaterialCellColumn._Str_9685:
this._Str_25839(normal);
case PlaneMaterialCellColumn.REPEAT_MODE_NONE:
this.renderRepeatNone(normal);
break;
case PlaneMaterialCellColumn._Str_6087:
case PlaneMaterialCellColumn.REPEAT_MODE_BORDERS:
console.log('tru2');
// this._Str_18476(normal);
// this.renderRepeatBorders(normal);
break;
case PlaneMaterialCellColumn._Str_6114:
case PlaneMaterialCellColumn.REPEAT_MODE_CENTER:
console.log('tru3');
// this._Str_17295(normal);
// this.renderRepeatCenter(normal);
break;
case PlaneMaterialCellColumn._Str_6187:
case PlaneMaterialCellColumn.REPEAT_MODE_FIRST:
console.log('tru4');
// this._Str_18019(normal);
// this.renderRepeatFirst(normal);
break;
case PlaneMaterialCellColumn._Str_6063:
case PlaneMaterialCellColumn.REPEAT_MODE_LAST:
console.log('tru5');
// this._Str_16099(normal);
// this.renderRepeatLast(normal);
break;
default:
this._Str_18711(normal, offsetX, offsetY);
this.renderRepeatAll(normal, offsetX, offsetY);
break;
}
return this._cachedBitmapData;
}
private _Str_19857(k: PlaneMaterialCell[], _arg_2: IVector3D): number
private getCellsHeight(k: PlaneMaterialCell[], _arg_2: IVector3D): number
{
if(!k || !k.length) return 0;
@ -226,7 +226,7 @@ export class PlaneMaterialCellColumn
{
const cell = k[cellIterator];
if(cell) height += cell._Str_9599(_arg_2);
if(cell) height += cell.getHeight(_arg_2);
cellIterator++;
}
@ -234,7 +234,7 @@ export class PlaneMaterialCellColumn
return height;
}
private _Str_4757(k: PlaneMaterialCell[], _arg_2: number, _arg_3: boolean, _arg_4: IVector3D, _arg_5: number = 0, _arg_6: number = 0): number
private renderCells(k: PlaneMaterialCell[], _arg_2: number, _arg_3: boolean, _arg_4: IVector3D, _arg_5: number = 0, _arg_6: number = 0): number
{
if(((!k || !k.length) || !this._cachedBitmapData)) return _arg_2;
@ -277,14 +277,14 @@ export class PlaneMaterialCellColumn
return _arg_2;
}
private _Str_25839(k: IVector3D): void
private renderRepeatNone(k: IVector3D): void
{
if(!this._cells.length || !this._cachedBitmapData) return;
this._Str_4757(this._cells, 0, true, k);
this.renderCells(this._cells, 0, true, k);
}
private _Str_18711(k: IVector3D, _arg_2: number, _arg_3: number): void
private renderRepeatAll(k: IVector3D, _arg_2: number, _arg_3: number): void
{
if(!this._cells.length || !this._cachedBitmapData) return;
@ -292,13 +292,13 @@ export class PlaneMaterialCellColumn
while(index < this._cachedBitmapData.height)
{
index = this._Str_4757(this._cells, index, true, k, _arg_2, _arg_3);
index = this.renderCells(this._cells, index, true, k, _arg_2, _arg_3);
if(!index) return;
}
}
// private _Str_18476(k:IVector3D): void
// private renderRepeatBorders(k:IVector3D): void
// {
// if (((this._cells.length == 0) || (this._cachedBitmapData == null)))
// {
@ -316,7 +316,7 @@ export class PlaneMaterialCellColumn
// _local_2 = (this._cells[_local_7] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_6 = _local_2._Str_9599(k);
// _local_6 = _local_2.getHeight(k);
// if (_local_6 > 0)
// {
// _local_5 = (_local_5 + _local_6);
@ -330,7 +330,7 @@ export class PlaneMaterialCellColumn
// _local_2 = (this._cells[0] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_6 = _local_2._Str_9599(k);
// _local_6 = _local_2.getHeight(k);
// if (_local_6 > 0)
// {
// _local_5 = (_local_5 + _local_6);
@ -339,14 +339,14 @@ export class PlaneMaterialCellColumn
// }
// }
// var _local_8:* = ((this._cachedBitmapData.height - _local_5) >> 1);
// var _local_9: number = this._Str_4757(_local_4, _local_8, true, k);
// var _local_9: number = this.renderCells(_local_4, _local_8, true, k);
// _local_2 = (this._cells[0] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_4 = [_local_2];
// while (_local_8 >= 0)
// {
// _local_8 = this._Str_4757(_local_4, _local_8, false, k);
// _local_8 = this.renderCells(_local_4, _local_8, false, k);
// }
// }
// _local_2 = (this._cells[(this._cells.length - 1)] as PlaneMaterialCell);
@ -355,12 +355,12 @@ export class PlaneMaterialCellColumn
// _local_4 = [_local_2];
// while (_local_9 < this._cachedBitmapData.height)
// {
// _local_9 = this._Str_4757(_local_4, _local_9, true, k);
// _local_9 = this.renderCells(_local_4, _local_9, true, k);
// }
// }
// }
// private _Str_17295(k:IVector3D): void
// private renderRepeatCenter(k:IVector3D): void
// {
// var _local_13: number;
// var _local_14: number;
@ -384,7 +384,7 @@ export class PlaneMaterialCellColumn
// _local_2 = (this._cells[_local_9] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_8 = _local_2._Str_9599(k);
// _local_8 = _local_2.getHeight(k);
// if (_local_8 > 0)
// {
// _local_6 = (_local_6 + _local_8);
@ -399,7 +399,7 @@ export class PlaneMaterialCellColumn
// _local_2 = (this._cells[_local_9] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_8 = _local_2._Str_9599(k);
// _local_8 = _local_2.getHeight(k);
// if (_local_8 > 0)
// {
// _local_7 = (_local_7 + _local_8);
@ -422,7 +422,7 @@ export class PlaneMaterialCellColumn
// _local_2 = (this._cells[(this._cells.length >> 1)] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_8 = _local_2._Str_9599(k);
// _local_8 = _local_2.getHeight(k);
// if (_local_8 > 0)
// {
// _local_13 = (this._cachedBitmapData.height - (_local_6 + _local_7));
@ -432,17 +432,17 @@ export class PlaneMaterialCellColumn
// _local_16 = [_local_2];
// while (_local_11 < _local_15)
// {
// _local_11 = this._Str_4757(_local_16, _local_11, true, k);
// _local_11 = this.renderCells(_local_16, _local_11, true, k);
// }
// }
// }
// }
// _local_11 = 0;
// this._Str_4757(_local_4, _local_11, true, k);
// this._Str_4757(_local_5, _local_12, false, k);
// this.renderCells(_local_4, _local_11, true, k);
// this.renderCells(_local_5, _local_12, false, k);
// }
// private _Str_18019(k:IVector3D): void
// private renderRepeatFirst(k:IVector3D): void
// {
// var _local_4:Array;
// if (((this._cells.length == 0) || (this._cachedBitmapData == null)))
@ -451,19 +451,19 @@ export class PlaneMaterialCellColumn
// }
// var _local_2:PlaneMaterialCell;
// var _local_3: number = this._cachedBitmapData.height;
// _local_3 = this._Str_4757(this._cells, _local_3, false, k);
// _local_3 = this.renderCells(this._cells, _local_3, false, k);
// _local_2 = (this._cells[0] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_4 = [_local_2];
// while (_local_3 >= 0)
// {
// _local_3 = this._Str_4757(_local_4, _local_3, false, k);
// _local_3 = this.renderCells(_local_4, _local_3, false, k);
// }
// }
// }
// private _Str_16099(k: IVector3D): void
// private renderRepeatLast(k: IVector3D): void
// {
// if(!this._cells.length || !this._cachedBitmapData) return;
@ -471,19 +471,19 @@ export class PlaneMaterialCellColumn
// var _local_4:Array;
// var _local_2:PlaneMaterialCell;
// var _local_3: number;
// _local_3 = this._Str_4757(this._cells, _local_3, true, k);
// _local_3 = this.renderCells(this._cells, _local_3, true, k);
// _local_2 = (this._cells[(this._cells.length - 1)] as PlaneMaterialCell);
// if (_local_2 != null)
// {
// _local_4 = [_local_2];
// while (_local_3 < this._cachedBitmapData.height)
// {
// _local_3 = this._Str_4757(_local_4, _local_3, true, k);
// _local_3 = this.renderCells(_local_4, _local_3, true, k);
// }
// }
// }
public _Str_22299(): PlaneMaterialCell[]
public getCells(): PlaneMaterialCell[]
{
return this._cells;
}

View File

@ -9,18 +9,18 @@ import { PlaneMaterialCellColumn } from './PlaneMaterialCellColumn';
export class PlaneMaterialCellMatrix
{
public static _Str_7916: number = 1;
public static _Str_6087: number = 2;
public static _Str_6114: number = 3;
public static _Str_6187: number = 4;
public static _Str_6063: number = 5;
public static _Str_9127: number = 6;
public static _Str_18632: number = PlaneMaterialCellMatrix._Str_7916;//1
public static REPEAT_MODE_ALL: number = 1;
public static REPEAT_MODE_BORDERS: number = 2;
public static REPEAT_MODE_CENTER: number = 3;
public static REPEAT_MODE_FIRST: number = 4;
public static REPEAT_MODE_LAST: number = 5;
public static REPEAT_MODE_RANDOM: number = 6;
public static REPEAT_MODE_DEFAULT: number = PlaneMaterialCellMatrix.REPEAT_MODE_ALL;//1
public static MIN_NORMAL_COORDINATE_VALUE: number = -1;
public static MAX_NORMAL_COORDINATE_VALUE: number = 1;
public static ALIGN_TOP: number = 1;
public static _Str_3606: number = 2;
public static _Str_6914: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1
public static ALIGN_BOTTOM: number = 2;
public static ALIGN_DEFAULT: number = PlaneMaterialCellMatrix.ALIGN_TOP;//1
private _columns: PlaneMaterialCellColumn[];
private _repeatMode: number = 1;
@ -54,13 +54,13 @@ export class PlaneMaterialCellMatrix
this._normalMaxX = _arg_5;
this._normalMinY = _arg_6;
this._normalMaxY = _arg_7;
if(this._repeatMode == PlaneMaterialCellMatrix._Str_9127)
if(this._repeatMode == PlaneMaterialCellMatrix.REPEAT_MODE_RANDOM)
{
this._isStatic = false;
}
}
private static _Str_12526(k: number): number
private static nextRandomColumnIndex(k: number): number
{
return ((Randomizer.getValues(1, 0, (k * 17631))[0]) % k);
}
@ -87,7 +87,7 @@ export class PlaneMaterialCellMatrix
public isBottomAligned(): boolean
{
return this._align === PlaneMaterialCellMatrix._Str_3606;
return this._align === PlaneMaterialCellMatrix.ALIGN_BOTTOM;
}
public get isStatic(): boolean
@ -138,7 +138,7 @@ export class PlaneMaterialCellMatrix
this._isCached = false;
}
public _Str_22372(k: number, _arg_2: number, _arg_3: PlaneMaterialCell[], _arg_4: number=1): boolean
public createColumn(k: number, _arg_2: number, _arg_3: PlaneMaterialCell[], _arg_4: number=1): boolean
{
if((k < 0) || (k >= this._columns.length)) return false;
@ -172,7 +172,7 @@ export class PlaneMaterialCellMatrix
{
if(canvas)
{
this._Str_17578(canvas, this._cachedBitmapHeight, offsetY, topAlign);
this.copyCachedBitmapOnCanvas(canvas, this._cachedBitmapHeight, offsetY, topAlign);
return canvas;
}
@ -231,7 +231,7 @@ export class PlaneMaterialCellMatrix
if(canvas)
{
this._Str_17578(canvas, height, offsetY, topAlign);
this.copyCachedBitmapOnCanvas(canvas, height, offsetY, topAlign);
return canvas;
}
@ -280,23 +280,23 @@ export class PlaneMaterialCellMatrix
switch(this._repeatMode)
{
case PlaneMaterialCellMatrix._Str_6087:
// maxColumnHeight = this._Str_18476(this._cachedBitmapData, columns);
case PlaneMaterialCellMatrix.REPEAT_MODE_BORDERS:
// maxColumnHeight = this.renderRepeatBorders(this._cachedBitmapData, columns);
break;
case PlaneMaterialCellMatrix._Str_6114:
// maxColumnHeight = this._Str_17295(this._cachedBitmapData, columns);
case PlaneMaterialCellMatrix.REPEAT_MODE_CENTER:
// maxColumnHeight = this.renderRepeatCenter(this._cachedBitmapData, columns);
break;
case PlaneMaterialCellMatrix._Str_6187:
// maxColumnHeight = this._Str_18019(this._cachedBitmapData, columns);
case PlaneMaterialCellMatrix.REPEAT_MODE_FIRST:
// maxColumnHeight = this.renderRepeatFirst(this._cachedBitmapData, columns);
break;
case PlaneMaterialCellMatrix._Str_6063:
// maxColumnHeight = this._Str_16099(this._cachedBitmapData, columns);
case PlaneMaterialCellMatrix.REPEAT_MODE_LAST:
// maxColumnHeight = this.renderRepeatLast(this._cachedBitmapData, columns);
break;
case PlaneMaterialCellMatrix._Str_9127:
// maxColumnHeight = this._Str_25678(this._cachedBitmapData, columns);
case PlaneMaterialCellMatrix.REPEAT_MODE_RANDOM:
// maxColumnHeight = this.renderRepeatRandom(this._cachedBitmapData, columns);
break;
default:
maxColumnHeight = this._Str_18711(this._cachedBitmapData, columns);
maxColumnHeight = this.renderRepeatAll(this._cachedBitmapData, columns);
break;
}
@ -304,7 +304,7 @@ export class PlaneMaterialCellMatrix
if(canvas)
{
this._Str_17578(canvas, maxColumnHeight, offsetY, topAlign);
this.copyCachedBitmapOnCanvas(canvas, maxColumnHeight, offsetY, topAlign);
return canvas;
}
@ -312,7 +312,7 @@ export class PlaneMaterialCellMatrix
return this._cachedBitmapData;
}
private _Str_17578(k: Graphics, _arg_2: number, _arg_3: number, _arg_4: boolean): void
private copyCachedBitmapOnCanvas(k: Graphics, _arg_2: number, _arg_3: number, _arg_4: boolean): void
{
if(!k || !this._cachedBitmapData || (k === this._cachedBitmapData)) return;
@ -340,7 +340,7 @@ export class PlaneMaterialCellMatrix
}
}
private _Str_25859(k: Graphics[]): number
private getColumnsWidth(k: Graphics[]): number
{
if(!k || !k.length) return 0;
@ -356,7 +356,7 @@ export class PlaneMaterialCellMatrix
return width;
}
private _Str_4606(k: Graphics, _arg_2: Graphics[], _arg_3: number, _arg_4: boolean): Point
private renderColumns(k: Graphics, _arg_2: Graphics[], _arg_3: number, _arg_4: boolean): Point
{
if(!k || !_arg_2 || !_arg_2.length) return new Point(_arg_3, 0);
@ -381,7 +381,7 @@ export class PlaneMaterialCellMatrix
_arg_3 = (_arg_3 - _local_6.width);
}
let _local_8 = 0;
if(this._align == PlaneMaterialCellMatrix._Str_3606)
if(this._align == PlaneMaterialCellMatrix.ALIGN_BOTTOM)
{
_local_8 = (k.height - _local_6.height);
}
@ -417,18 +417,18 @@ export class PlaneMaterialCellMatrix
return new Point(_arg_3, height);
}
private _Str_18711(k: Graphics, _arg_2: Graphics[]): number
private renderRepeatAll(k: Graphics, _arg_2: Graphics[]): number
{
if(!k || !_arg_2 || !_arg_2.length) return 0;
const totalWidth: number = this._Str_25859(_arg_2);
const totalWidth: number = this.getColumnsWidth(_arg_2);
let x = 0;
let y = 0;
while(x < k.width)
{
const point = this._Str_4606(k, _arg_2, x, true);
const point = this.renderColumns(k, _arg_2, x, true);
x = point.x;
@ -440,7 +440,7 @@ export class PlaneMaterialCellMatrix
return y;
}
// private _Str_18476(k:BitmapData, _arg_2:Array): number
// private renderRepeatBorders(k:BitmapData, _arg_2:Array): number
// {
// if ((((_arg_2 == null) || (_arg_2.length == 0)) || (k == null)))
// {
@ -473,7 +473,7 @@ export class PlaneMaterialCellMatrix
// }
// var _local_8:* = ((k.width - _local_6) >> 1);
// var _local_9:Point;
// _local_9 = this._Str_4606(k, _local_5, _local_8, true);
// _local_9 = this.renderColumns(k, _local_5, _local_8, true);
// var _local_10: number = _local_9.x;
// if (_local_9.y > _local_3)
// {
@ -485,7 +485,7 @@ export class PlaneMaterialCellMatrix
// _local_5 = [_local_4];
// while (_local_8 >= 0)
// {
// _local_9 = this._Str_4606(k, _local_5, _local_8, false);
// _local_9 = this.renderColumns(k, _local_5, _local_8, false);
// _local_8 = _local_9.x;
// if (_local_9.y > _local_3)
// {
@ -499,7 +499,7 @@ export class PlaneMaterialCellMatrix
// _local_5 = [_local_4];
// while (_local_10 < k.height)
// {
// _local_9 = this._Str_4606(k, _local_5, _local_10, true);
// _local_9 = this.renderColumns(k, _local_5, _local_10, true);
// _local_10 = _local_9.x;
// if (_local_9.y > _local_3)
// {
@ -510,7 +510,7 @@ export class PlaneMaterialCellMatrix
// return _local_3;
// }
// private _Str_17295(k:BitmapData, _arg_2:Array): number
// private renderRepeatCenter(k:BitmapData, _arg_2:Array): number
// {
// var _local_14: number;
// var _local_15: number;
@ -573,7 +573,7 @@ export class PlaneMaterialCellMatrix
// _local_18 = [_local_4];
// while (_local_12 < _local_17)
// {
// _local_10 = this._Str_4606(k, _local_18, _local_12, true);
// _local_10 = this.renderColumns(k, _local_18, _local_12, true);
// _local_12 = _local_10.x;
// if (_local_10.y > _local_3)
// {
@ -583,12 +583,12 @@ export class PlaneMaterialCellMatrix
// }
// }
// _local_12 = 0;
// _local_10 = this._Str_4606(k, _local_5, _local_12, true);
// _local_10 = this.renderColumns(k, _local_5, _local_12, true);
// if (_local_10.y > _local_3)
// {
// _local_3 = _local_10.y;
// }
// _local_10 = this._Str_4606(k, _local_6, _local_13, false);
// _local_10 = this.renderColumns(k, _local_6, _local_13, false);
// if (_local_10.y > _local_3)
// {
// _local_3 = _local_10.y;
@ -596,7 +596,7 @@ export class PlaneMaterialCellMatrix
// return _local_3;
// }
// private _Str_18019(k:BitmapData, _arg_2:Array): number
// private renderRepeatFirst(k:BitmapData, _arg_2:Array): number
// {
// var _local_7:Array;
// if ((((_arg_2 == null) || (_arg_2.length == 0)) || (k == null)))
@ -606,7 +606,7 @@ export class PlaneMaterialCellMatrix
// var _local_3: number;
// var _local_4:BitmapData;
// var _local_5: number = k.width;
// var _local_6:Point = this._Str_4606(k, _arg_2, _local_5, false);
// var _local_6:Point = this.renderColumns(k, _arg_2, _local_5, false);
// _local_5 = _local_6.x;
// if (_local_6.y > _local_3)
// {
@ -618,7 +618,7 @@ export class PlaneMaterialCellMatrix
// _local_7 = [_local_4];
// while (_local_5 >= 0)
// {
// _local_6 = this._Str_4606(k, _local_7, _local_5, false);
// _local_6 = this.renderColumns(k, _local_7, _local_5, false);
// _local_5 = _local_6.x;
// if (_local_6.y > _local_3)
// {
@ -629,7 +629,7 @@ export class PlaneMaterialCellMatrix
// return _local_3;
// }
// private _Str_16099(k:BitmapData, _arg_2:Array): number
// private renderRepeatLast(k:BitmapData, _arg_2:Array): number
// {
// var _local_7:Array;
// if ((((_arg_2 == null) || (_arg_2.length == 0)) || (k == null)))
@ -639,7 +639,7 @@ export class PlaneMaterialCellMatrix
// var _local_3: number;
// var _local_4:BitmapData;
// var _local_5: number;
// var _local_6:Point = this._Str_4606(k, _arg_2, _local_5, true);
// var _local_6:Point = this.renderColumns(k, _arg_2, _local_5, true);
// _local_5 = _local_6.x;
// if (_local_6.y > _local_3)
// {
@ -651,7 +651,7 @@ export class PlaneMaterialCellMatrix
// _local_7 = [_local_4];
// while (_local_5 < k.width)
// {
// _local_6 = this._Str_4606(k, _local_7, _local_5, true);
// _local_6 = this.renderColumns(k, _local_7, _local_5, true);
// _local_5 = _local_6.x;
// if (_local_6.y > _local_3)
// {
@ -662,7 +662,7 @@ export class PlaneMaterialCellMatrix
// return _local_3;
// }
// private _Str_25678(k:BitmapData, _arg_2:Array): number
// private renderRepeatRandom(k:BitmapData, _arg_2:Array): number
// {
// var _local_6:Array;
// var _local_7:Point;
@ -675,11 +675,11 @@ export class PlaneMaterialCellMatrix
// var _local_5: number;
// while (_local_5 < k.width)
// {
// _local_4 = (_arg_2[_Str_12526(_arg_2.length)] as BitmapData);
// _local_4 = (_arg_2[nextRandomColumnIndex(_arg_2.length)] as BitmapData);
// if (_local_4 != null)
// {
// _local_6 = [_local_4];
// _local_7 = this._Str_4606(k, _local_6, _local_5, true);
// _local_7 = this.renderColumns(k, _local_6, _local_5, true);
// _local_5 = _local_7.x;
// if (_local_7.y > _local_3)
// {
@ -694,9 +694,9 @@ export class PlaneMaterialCellMatrix
// return _local_3;
// }
public _Str_23721(k: number): PlaneMaterialCellColumn[]
public getColumns(k: number): PlaneMaterialCellColumn[]
{
if(this._repeatMode === PlaneMaterialCellMatrix._Str_9127)
if(this._repeatMode === PlaneMaterialCellMatrix.REPEAT_MODE_RANDOM)
{
const columns: PlaneMaterialCellColumn[] = [];
@ -704,7 +704,7 @@ export class PlaneMaterialCellMatrix
while(columnIndex < k)
{
const column = this._columns[PlaneMaterialCellMatrix._Str_12526(this._columns.length)];
const column = this._columns[PlaneMaterialCellMatrix.nextRandomColumnIndex(this._columns.length)];
if(column)
{

View File

@ -298,22 +298,22 @@ export class PlaneRasterizer implements IPlaneRasterizer
switch(repeatMode)
{
case 'borders':
repeatMode = PlaneMaterialCellMatrix._Str_6087;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_BORDERS;
break;
case 'center':
repeatMode = PlaneMaterialCellMatrix._Str_6114;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_CENTER;
break;
case 'first':
repeatMode = PlaneMaterialCellMatrix._Str_6187;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_FIRST;
break;
case 'last':
repeatMode = PlaneMaterialCellMatrix._Str_6063;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_LAST;
break;
case 'random':
repeatMode = PlaneMaterialCellMatrix._Str_9127;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_RANDOM;
break;
default:
repeatMode = PlaneMaterialCellMatrix._Str_18632;
repeatMode = PlaneMaterialCellMatrix.REPEAT_MODE_DEFAULT;
break;
}
@ -323,10 +323,10 @@ export class PlaneRasterizer implements IPlaneRasterizer
align = PlaneMaterialCellMatrix.ALIGN_TOP;
break;
case 'bottom':
align = PlaneMaterialCellMatrix._Str_3606;
align = PlaneMaterialCellMatrix.ALIGN_BOTTOM;
break;
default:
align = PlaneMaterialCellMatrix._Str_6914;
align = PlaneMaterialCellMatrix.ALIGN_DEFAULT;
break;
}
@ -356,7 +356,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
{
if(!k || !_arg_2) return;
let repeatMode = PlaneMaterialCellColumn._Str_7916;
let repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_ALL;
const width = k.width;
@ -365,26 +365,26 @@ export class PlaneRasterizer implements IPlaneRasterizer
switch(k.repeatMode)
{
case 'borders':
repeatMode = PlaneMaterialCellColumn._Str_6087;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_BORDERS;
break;
case 'center':
repeatMode = PlaneMaterialCellColumn._Str_6114;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_CENTER;
break;
case 'first':
repeatMode = PlaneMaterialCellColumn._Str_6187;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_FIRST;
break;
case 'last':
repeatMode = PlaneMaterialCellColumn._Str_6063;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_LAST;
break;
case 'none':
repeatMode = PlaneMaterialCellColumn._Str_9685;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_NONE;
break;
default:
repeatMode = PlaneMaterialCellColumn._Str_7916;
repeatMode = PlaneMaterialCellColumn.REPEAT_MODE_ALL;
break;
}
_arg_2._Str_22372(_arg_3, width, cells, repeatMode);
_arg_2.createColumn(_arg_3, width, cells, repeatMode);
}
private parsePlaneMaterialCells(k: any): PlaneMaterialCell[]
@ -561,7 +561,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
if(layer)
{
let material: PlaneMaterial = null;
let align: number = PlaneVisualizationLayer._Str_6914;
let align: number = PlaneVisualizationLayer.ALIGN_DEFAULT;
let color: number = FloorPlane.DEFAULT_COLOR;
let offset: number = PlaneVisualizationLayer.DEFAULT_OFFSET;
@ -573,7 +573,7 @@ export class PlaneRasterizer implements IPlaneRasterizer
if(layer.align)
{
if(layer.align === 'bottom') align = PlaneVisualizationLayer._Str_3606;
if(layer.align === 'bottom') align = PlaneVisualizationLayer.ALIGN_BOTTOM;
else if(layer.align == 'top') align = PlaneVisualizationLayer.ALIGN_TOP;
}

View File

@ -8,8 +8,8 @@ export class PlaneVisualizationLayer
{
public static DEFAULT_OFFSET: number = 0;
public static ALIGN_TOP: number = 1;
public static _Str_3606: number = 2;
public static _Str_6914: number = PlaneVisualizationLayer.ALIGN_TOP;
public static ALIGN_BOTTOM: number = 2;
public static ALIGN_DEFAULT: number = PlaneVisualizationLayer.ALIGN_TOP;
private _material: PlaneMaterial;
private _color: number;