mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Fix AvatarImage.getCroppedImage()
This commit is contained in:
parent
62a23cd0e2
commit
c6acaff9f4
@ -523,12 +523,6 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
|
|
||||||
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
|
||||||
const container = new NitroContainer();
|
const container = new NitroContainer();
|
||||||
const sprite = new NitroSprite(Texture.EMPTY);
|
|
||||||
|
|
||||||
sprite.width = avatarCanvas.width;
|
|
||||||
sprite.height = avatarCanvas.height;
|
|
||||||
|
|
||||||
container.addChild(sprite);
|
|
||||||
|
|
||||||
let partCount = (setTypes.length - 1);
|
let partCount = (setTypes.length - 1);
|
||||||
|
|
||||||
@ -576,7 +570,9 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
|
|||||||
partCount--;
|
partCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
const image = TextureUtils.generateImage(container);
|
const texture = TextureUtils.generateTexture(container, new Rectangle(0, 0, avatarCanvas.width, avatarCanvas.height));
|
||||||
|
|
||||||
|
const image = TextureUtils.generateImage(texture);
|
||||||
|
|
||||||
if(!image) return null;
|
if(!image) return null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user