In a recent update the way click events has been changed I have a project on RC.10 and one updated to latest version.
In RC.10 this works and the click events are working alongside the controls (nippleJS) but in the newer project the mouse controls seem to only be getting the event and the canvas never recieves them
import { RpgSprite, RpgSpriteHooks } from '@rpgjs/client';
import * as PIXI from 'pixi.js';
const sprite: RpgSpriteHooks = {
onInit(sprite: RpgSprite) {
const data: any = sprite.logic;
sprite.eventMode = 'static';
sprite.on('pointerdown', () => {
console.log('pd');
});
sprite.on('mouseover', () => {
console.log('pd1');
})
const texture = PIXI.Texture.from('./main/icons_2.png');
let spriteTexture1 = new PIXI.Texture(texture, new PIXI.Rectangle(0, 0, 32, 32));
const image = new PIXI.Sprite(spriteTexture1);
sprite.addChild(image);
}
}
export default sprite;