You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Fix Effects (enable)
This commit is contained in:
@@ -885,7 +885,7 @@ export class RoomPlane implements IRoomPlane
|
||||
const visibleAvatarIds = new Set<number>();
|
||||
|
||||
const addReflectionSprite = (texture: Texture, location: IVector3D, alpha: number): boolean => {
|
||||
if(!texture || !location || alpha < 0) return false;
|
||||
if(!texture?.source || !location || alpha < 0) return false;
|
||||
|
||||
const relative = Vector3d.dif(location, this._location);
|
||||
const planeDistance = Math.abs(Vector3d.scalarProjection(relative, this._normal));
|
||||
@@ -922,7 +922,7 @@ export class RoomPlane implements IRoomPlane
|
||||
|
||||
for(const avatar of avatars)
|
||||
{
|
||||
if(!avatar?.texture || !avatar.location) continue;
|
||||
if(!avatar?.texture?.source || !avatar.location) continue;
|
||||
|
||||
let firstSeenAt = this._windowReflectionFirstSeenAt.get(avatar.id);
|
||||
|
||||
@@ -955,6 +955,14 @@ export class RoomPlane implements IRoomPlane
|
||||
{
|
||||
if(visibleAvatarIds.has(id) || this._windowReflectionFadeOut.has(id)) continue;
|
||||
|
||||
if(!lastVisible.texture?.source)
|
||||
{
|
||||
this._windowReflectionLastVisible.delete(id);
|
||||
this._windowReflectionFirstSeenAt.delete(id);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
this._windowReflectionFadeOut.set(id, {
|
||||
texture: lastVisible.texture,
|
||||
location: lastVisible.location,
|
||||
|
||||
@@ -409,7 +409,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
|
||||
const texture = sprite.texture;
|
||||
const baseTexture = texture && texture.source;
|
||||
|
||||
if(!texture || !baseTexture) continue;
|
||||
if(!texture || !baseTexture || baseTexture.destroyed) continue;
|
||||
|
||||
const spriteX = ((x + sprite.offsetX) + this._screenOffsetX);
|
||||
const spriteY = ((y + sprite.offsetY) + this._screenOffsetY);
|
||||
|
||||
@@ -29,7 +29,7 @@ export class ExtendedSprite extends Sprite
|
||||
|
||||
public setTexture(texture: Texture): void
|
||||
{
|
||||
if(!texture) texture = Texture.EMPTY;
|
||||
if(!texture || texture.source?.destroyed) texture = Texture.EMPTY;
|
||||
|
||||
if(texture === this.texture) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user