cleaned AlphaTolerance

This commit is contained in:
Dank074 2021-06-06 22:41:02 -05:00
parent 413ba368a8
commit 69b550c982
5 changed files with 10 additions and 10 deletions

View File

@ -393,7 +393,7 @@ export class AvatarVisualization extends RoomObjectSpriteVisualization implement
if(sprite)
{
sprite.alphaTolerance = AlphaTolerance._Str_9268;
sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING;
sprite.visible = true;
const layerData = this._avatarImage.getLayerData(spriteData);

View File

@ -301,7 +301,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization
sprite.offsetX = (assetData.offsetX + this.getLayerXOffset(scale, this._direction, layerId));
sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId));
sprite.blendMode = this.getLayerInk(scale, this._direction, layerId);
sprite.alphaTolerance = (this.getLayerIgnoreMouse(scale, this._direction, layerId) ? AlphaTolerance._Str_9268 : AlphaTolerance._Str_9735);
sprite.alphaTolerance = (this.getLayerIgnoreMouse(scale, this._direction, layerId) ? AlphaTolerance.MATCH_NOTHING : AlphaTolerance.MATCH_OPAQUE_PIXELS);
relativeDepth = this.getLayerZOffset(scale, this._direction, layerId);
relativeDepth = (relativeDepth - (layerId * 0.001));
@ -311,7 +311,7 @@ export class FurnitureVisualization extends RoomObjectSpriteVisualization
sprite.offsetX = assetData.offsetX;
sprite.offsetY = (assetData.offsetY + this.getLayerYOffset(scale, this._direction, layerId));
sprite.alpha = (48 * this._alphaMultiplier);
sprite.alphaTolerance = AlphaTolerance._Str_9268;
sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING;
relativeDepth = 1;
}

View File

@ -647,11 +647,11 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
{
if((plane.type === RoomPlane.TYPE_WALL) && ((plane.leftSide.length < 1) || (plane.rightSide.length < 1)))
{
sprite.alphaTolerance = AlphaTolerance._Str_9268;
sprite.alphaTolerance = AlphaTolerance.MATCH_NOTHING;
}
else
{
sprite.alphaTolerance = AlphaTolerance._Str_9735;
sprite.alphaTolerance = AlphaTolerance.MATCH_OPAQUE_PIXELS;
}
if(plane.type === RoomPlane.TYPE_WALL)

View File

@ -1,6 +1,6 @@
export class AlphaTolerance
{
public static _Str_16646: number = -1;
public static _Str_9735: number = 128;
public static _Str_9268: number = 256;
}
public static MATCH_ALL_PIXELS: number = -1;
public static MATCH_OPAQUE_PIXELS: number = 128;
public static MATCH_NOTHING: number = 256;
}

View File

@ -65,7 +65,7 @@ export class RoomObjectSprite implements IRoomObjectSprite
this._visible = true;
this._tag = '';
this._posture = null;
this._alphaTolerance = AlphaTolerance._Str_9735;
this._alphaTolerance = AlphaTolerance.MATCH_OPAQUE_PIXELS;
this._filters = [];
this._updateCounter = 0;