phaserjs/custom-build

Uncaught error when generate phaser-custom.min.js and I have graphic interactive rectangle

Closed this issue · 1 comments

Hi there, I have a graphic interactive rectangle
this.add.graphics() .lineStyle(2, 0x000000, 1).strokeRoundedRect(w/2,h/1.09,w/7, h/2,10) .setInteractive(({hitAreaCallback:Phaser.Geom.Rectangle.Contains, hitArea: new Phaser.Geom.Rectangle(w/2,h/1.09,w/7, h/2), })).on('pointerdown',function(){ log.console('hello'); },this)
and seem there is a problem with get the Phaser.Geom.Retangle class,
the error is:
Uncaught TypeError: Cannot read properties of undefined (reading 'Rectangle') at Scene.iu (index.js:149945:41) at Scene.create (index.js:149676:22) at SceneManager.create (index.js:102889:26) at SceneManager.loadComplete (index.js:102801:14) at LoaderPlugin.emit (index.js:1908:35) at LoaderPlugin.loadComplete (index.js:203671:14) at LoaderPlugin.fileProcessComplete (index.js:203637:18) at AudioFile.onProcessComplete (index.js:5505:21) at config.context (index.js:125580:23)

please, how can i solve this?

Your parameters are the wrong way around. The shape comes first.