mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
Merge branch 'fix/variable-cleanup' of https://git.krews.org/nitro/nitro-renderer into fix/variable-cleanup
This commit is contained in:
commit
5754ff294a
@ -1,5 +1,5 @@
|
||||
export * from './GraphicAsset';
|
||||
export * from './GraphicAssetCollection';
|
||||
//export * from './GraphicAssetCollection';
|
||||
export * from './GraphicAssetPalette';
|
||||
export * from './IGraphicAsset';
|
||||
export * from './IGraphicAssetCollection';
|
||||
|
@ -549,11 +549,11 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
|
||||
{
|
||||
if((index < 0) || (index >= this._spriteCount)) return null;
|
||||
|
||||
const sprite = this._display.getChildAt(index);
|
||||
const sprite = (this._display.getChildAt(index) as ExtendedSprite);
|
||||
|
||||
if(!sprite) return null;
|
||||
|
||||
return sprite as ExtendedSprite;
|
||||
return sprite;
|
||||
}
|
||||
|
||||
protected getExtendedSpriteIdentifier(sprite: ExtendedSprite): string
|
||||
@ -678,7 +678,7 @@ export class RoomSpriteCanvas implements IRoomRenderingCanvas
|
||||
extendedSprite.offsetX = sprite.offsetX;
|
||||
extendedSprite.offsetY = sprite.offsetY;
|
||||
extendedSprite.name = sprite.name;
|
||||
extendedSprite.varyingDepth = sprite.varyingDepth;
|
||||
extendedSprite.varyingDepth = sprite.varyingDepth;
|
||||
extendedSprite.clickHandling = sprite.clickHandling;
|
||||
extendedSprite.blendMode = sprite.blendMode;
|
||||
extendedSprite.filters = sprite.filters;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BaseTexture, BLEND_MODES, Point, Renderer, RenderTexture, Sprite, Texture } from 'pixi.js';
|
||||
import { BaseTexture, BLEND_MODES, Point, RenderTexture, Sprite, Texture } from 'pixi.js';
|
||||
import { Nitro } from '../../../nitro/Nitro';
|
||||
|
||||
export class ExtendedSprite extends Sprite
|
||||
@ -38,20 +38,11 @@ export class ExtendedSprite extends Sprite
|
||||
return true;
|
||||
}
|
||||
|
||||
public render(renderer: Renderer): void
|
||||
public calculateVertices(): void
|
||||
{
|
||||
try
|
||||
{
|
||||
//@ts-ignore
|
||||
if(!this._texture || !this._texture._uvs || !this._texture._uvs.uvsFloat32) return;
|
||||
}
|
||||
if(!this.texture.orig) return;
|
||||
|
||||
catch (err)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
super.render(renderer);
|
||||
super.calculateVertices();
|
||||
}
|
||||
|
||||
public setTexture(texture: Texture): void
|
||||
|
Loading…
Reference in New Issue
Block a user