mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-26 17:30:52 +01:00
cleaned AlphaTolerance
This commit is contained in:
parent
413ba368a8
commit
69b550c982
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user