You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 15:06:20 +00:00
🆙 Fixed the Door not visable when window is on wall
This commit is contained in:
+5
-5
@@ -12,13 +12,13 @@
|
|||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/billsonnn/nitro-renderer.git"
|
"url": "https://github.com/duckietm/Nitro_Render_V3.git"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/billsonnn/nitro-renderer/issues"
|
"url": "https://github.com/duckietm/Nitro_Render_V3/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/billsonnn/nitro-renderer",
|
"homepage": "https://github.com/duckietm/Nitro_Render_V3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"compile": "tsc --project ./tsconfig.json --noEmit false",
|
"compile": "tsc --project ./tsconfig.json --noEmit false",
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
"tslib": "^2.6.3",
|
"tslib": "^2.6.3",
|
||||||
"typescript": "~5.8.2",
|
"typescript": "~5.8.2",
|
||||||
"typescript-eslint": "^8.26.1",
|
"typescript-eslint": "^8.26.1",
|
||||||
"vite": "^5.4.9",
|
"vite": "^8.0.10",
|
||||||
"vitest": "^4.0.18"
|
"vitest": "^4.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { RoomObjectUpdateMessage } from './RoomObjectUpdateMessage';
|
|||||||
export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
|
export class ObjectRoomMaskUpdateMessage extends RoomObjectUpdateMessage
|
||||||
{
|
{
|
||||||
public static ADD_MASK: string = 'RORMUM_ADD_MASK';
|
public static ADD_MASK: string = 'RORMUM_ADD_MASK';
|
||||||
public static REMOVE_MASK: string = 'RORMUM_ADD_MASK';
|
public static REMOVE_MASK: string = 'RORMUM_REMOVE_MASK';
|
||||||
public static DOOR: string = 'door';
|
public static DOOR: string = 'door';
|
||||||
public static WINDOW: string = 'window';
|
public static WINDOW: string = 'window';
|
||||||
public static HOLE: string = 'hole';
|
public static HOLE: string = 'hole';
|
||||||
|
|||||||
@@ -812,6 +812,24 @@ export class RoomPlane implements IRoomPlane
|
|||||||
layerContainer.destroy({ children: true });
|
layerContainer.destroy({ children: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private applyPlaneSpriteMasksTo(container: Container): void
|
||||||
|
{
|
||||||
|
if(!this._planeSprite || !this._planeSprite.children) return;
|
||||||
|
|
||||||
|
for(const child of this._planeSprite.children)
|
||||||
|
{
|
||||||
|
if(child instanceof Sprite)
|
||||||
|
{
|
||||||
|
const maskClone = new Sprite(child.texture);
|
||||||
|
maskClone.position.copyFrom(child.position);
|
||||||
|
maskClone.scale.copyFrom(child.scale);
|
||||||
|
container.addChild(maskClone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this._maskFilter && (container.children.length > 1)) container.filters = [this._maskFilter];
|
||||||
|
}
|
||||||
|
|
||||||
private renderBackgroundColor(): void
|
private renderBackgroundColor(): void
|
||||||
{
|
{
|
||||||
if(!this._planeTexture || this._landscapeBackgroundColor === null) return;
|
if(!this._planeTexture || this._landscapeBackgroundColor === null) return;
|
||||||
@@ -828,6 +846,8 @@ export class RoomPlane implements IRoomPlane
|
|||||||
const colorContainer = new Container();
|
const colorContainer = new Container();
|
||||||
colorContainer.addChild(colorGraphics);
|
colorContainer.addChild(colorGraphics);
|
||||||
|
|
||||||
|
this.applyPlaneSpriteMasksTo(colorContainer);
|
||||||
|
|
||||||
const transform = this.getMatrixForDimensions(canvasWidth, canvasHeight);
|
const transform = this.getMatrixForDimensions(canvasWidth, canvasHeight);
|
||||||
|
|
||||||
GetRenderer().render({
|
GetRenderer().render({
|
||||||
@@ -869,6 +889,8 @@ export class RoomPlane implements IRoomPlane
|
|||||||
const colorContainer = new Container();
|
const colorContainer = new Container();
|
||||||
colorContainer.addChild(colorGraphics);
|
colorContainer.addChild(colorGraphics);
|
||||||
|
|
||||||
|
this.applyPlaneSpriteMasksTo(colorContainer);
|
||||||
|
|
||||||
const transform = this.getMatrixForDimensions(canvasWidth, canvasHeight);
|
const transform = this.getMatrixForDimensions(canvasWidth, canvasHeight);
|
||||||
|
|
||||||
GetRenderer().render({
|
GetRenderer().render({
|
||||||
|
|||||||
Reference in New Issue
Block a user