Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

How to make a text and graphic clickable in pixi5?

$
0
0
  const font = new PIXI.Text('TJXY');
        font.anchor.set(0.5);
        font.position.set(renderer.screen.width / 2, renderer.screen.height / 2);
        font.interactive = true;
        font.buttonMode = true;
        font.on('pointerdown', function () {
            font.scale.y *= 1.25;
        });
        stage.addChild(font);

that didn't work.
but the v5 doc suggested that it's possible,
no error show in console.


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>