R. Grey Posted April 30, 2018 Share Posted April 30, 2018 (I've seen many threads about PIXI in MV before, but not about this subject, so I make a new one. If someone already made one, I would be grateful if you link it below) A group of people I'm collaborating with is using RPG Maker MV. I don't have much experience with this engine before, but IMHO, the engine performance is ... erm, not very good, and it also lacks many pointer/touch related events that I need. I managed to convert the bitmap system to pure PIXI sprites. But, sprite.interactive = true; sprite.on('pointerdown', foo) is still not working. I thought that maybe MV overrided PIXI somehow, so I take out all input classes of MV, TouchInput.init(); Input.init(); TouchInput.update(); Input.update(); still failed. Also tried manually updating plugins.interaction in the game loop. Same result. So what is it that I am missing? Did MV override PIXI interaction with something else that I hadn't taken out, or do I need to update other certain PIXI classes in order to solve this problem? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 30, 2018 Share Posted April 30, 2018 To use pixi interaction in MV, there is a special hack. something-something put "pointer-events:none" on foreground div, I dont remember which I've sent you a PM with contacts of people who know that issue. R. Grey 1 Quote Link to comment Share on other sites More sharing options...
jonforum Posted April 30, 2018 Share Posted April 30, 2018 don't use pixi interactive in the rmmv engine. Also rmmv dev add note that made memory leak. Stage.prototype.initialize = function() { PIXI.display.Stage.call(this); // The interactive flag causes a memory leak. this.interactive = false; }; just use event listener. document.addEventListener('mousemove', mousemove_Editor); document.addEventListener('mousedown', mousedown_Editor); document.addEventListener('mouseup',mouseup_Editor); document.addEventListener('wheel', wheel_Editor); document.addEventListener('keydown', keydown_Editor); You can easily bind what you need to a method. Or made Global array that old what you need. they are very good performance. You can also debug or check in you console for understand . R. Grey 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 30, 2018 Share Posted April 30, 2018 interactive memory leak was a thing back then when it was based on v3. Im not sure whether it leaks in v4. Quote Link to comment Share on other sites More sharing options...
jonforum Posted May 1, 2018 Share Posted May 1, 2018 9 hours ago, ivan.popelyshev said: interactive memory leak was a thing back then when it was based on v3. Im not sure whether it leaks in v4. I guess it true, I did not really get interested in the pixi interaction module. Knowing that the event listener dom are rather simple and powerful. There is a particular interest in using the pixi interaction module (performance, simpliciter) ? Quote Link to comment Share on other sites More sharing options...
jonforum Posted May 15, 2018 Share Posted May 15, 2018 On 4/30/2018 at 11:36 AM, ivan.popelyshev said: To use pixi interaction in MV, there is a special hack. something-something put "pointer-events:none" on foreground div, I dont remember which I've sent you a PM with contacts of people who know that issue. var Gamefall = Gamefall || {}; Gamefall.Test = Gamefall.Test || {}; (function($) { $.GraphicsChanges = { modeBox: Graphics._createModeBox, video: Graphics._updateVideo, upperCanvas: Graphics._createUpperCanvas } Graphics._createModeBox = function() { $.GraphicsChanges['modeBox'].call(this) this._modeBox.style.pointerEvents = 'none' }; Graphics._updateVideo = function() { $.GraphicsChanges['video'].call(this) this._video.style.pointerEvents = 'none' }; Graphics._createUpperCanvas = function() { $.GraphicsChanges['upperCanvas'].call(this) this._upperCanvas.style.pointerEvents = 'none' }; }(Gamefall.Test) https://forums.rpgmakerweb.com/index.php?threads/bind-mouse-event-to-pixi-object.95301/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.