You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-19 23:16:20 +00:00
🆙 Update for the wf_slc_users_neighborhood
This commit is contained in:
+5
@@ -51,6 +51,10 @@ export class FurnitureGuildIsometricBadgeVisualization extends IsometricImageFur
|
||||
|
||||
protected generateTransformedThumbnail(texture: Texture, asset: IGraphicAsset): Texture
|
||||
{
|
||||
// Render into a texture exactly matching the asset slot (e.g. 40×58 for guild_forum layer i).
|
||||
// dScale is derived so the sheared content fills the slot top-to-bottom without overflow:
|
||||
// shear contribution = 0.5 * renderWidth, vertical fill = dScale * texture.height
|
||||
// => dScale = (renderHeight - 0.5 * renderWidth) / texture.height
|
||||
const renderWidth = asset.width || 64;
|
||||
const renderHeight = asset.height || renderWidth;
|
||||
const difference = (renderWidth / texture.width);
|
||||
@@ -85,6 +89,7 @@ export class FurnitureGuildIsometricBadgeVisualization extends IsometricImageFur
|
||||
matrix.ty = 0;
|
||||
}
|
||||
|
||||
// Pass the matrix directly as a render transform — preserves full skew/shear in Pixi.js v8.
|
||||
return TextureUtils.createAndWriteRenderTexture(renderWidth, renderHeight, new Sprite(texture), matrix);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,9 @@ export class IsometricImageFurniVisualization extends FurnitureAnimatedVisualiza
|
||||
const asset = this.getAsset(assetName, layerId);
|
||||
const thumbnailAssetName = `${this.getThumbnailAssetName(scale)}-${this._uniqueId}`;
|
||||
const transformedTexture = this.generateTransformedThumbnail(k, asset || { width: 64, height: 64 });
|
||||
|
||||
// Use the original asset's registered offsets so the thumbnail is drawn at the
|
||||
// furniture-defined sprite position. Fall back to centering when no asset exists.
|
||||
const offsetX = asset ? asset.offsetX : -Math.floor(transformedTexture.width / 2);
|
||||
const offsetY = asset ? asset.offsetY : -Math.floor(transformedTexture.height / 2);
|
||||
|
||||
|
||||
@@ -225,8 +225,7 @@ export class RoomPlane implements IRoomPlane
|
||||
switch(this._type)
|
||||
{
|
||||
case RoomPlane.TYPE_FLOOR: {
|
||||
const heightOffset = (this._location.z + Math.min(0, this._leftSide.z, this._rightSide.z)) * geometry.scale;
|
||||
relativeDepth = (relativeDepth - heightOffset);
|
||||
relativeDepth = (relativeDepth - ((this._location.z + Math.min(0, this._leftSide.z, this._rightSide.z)) * 8));
|
||||
break;
|
||||
}
|
||||
case RoomPlane.TYPE_LANDSCAPE:
|
||||
|
||||
@@ -701,9 +701,11 @@ export class RoomVisualization extends RoomObjectSpriteVisualization implements
|
||||
{
|
||||
if(plane.visible)
|
||||
{
|
||||
depth = ((plane.relativeDepth + this.floorRelativeDepth) + (id / 1000));
|
||||
|
||||
if(plane.type !== RoomPlane.TYPE_FLOOR)
|
||||
if(plane.type === RoomPlane.TYPE_FLOOR)
|
||||
{
|
||||
depth = ((plane.relativeDepth + this.floorRelativeDepth) + (id / 1000));
|
||||
}
|
||||
else
|
||||
{
|
||||
depth = ((plane.relativeDepth + this.wallRelativeDepth) + (id / 1000));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user