0
\$\begingroup\$

I would like to use dragonBones with pixi.js. I got a problem.

When the following line executes in dragonBones, I am getting an error:

slot.init(slotData, displays, new PIXI.Sprite(), new PIXI.mesh.Mesh(null, null, null, null, PIXI.mesh.Mesh.DRAW_MODES.TRIANGLES));

The error says: Uncaught TypeError: Cannot read property 'Mesh' of undefined.. And yeah, while debugging, I noticed that PIXI.mesh is really undefined.

What can I undertake against the error?

I am using this file for a dragonbones.

May it be that the problem is in the fact that I am using pixi.js - v4.5.6?

\$\endgroup\$
14
  • \$\begingroup\$ Are you sure you downloaded everything? \$\endgroup\$
    – Bálint
    Feb 6 '18 at 14:19
  • \$\begingroup\$ @Bálint, I have pixi.js - v4.5.6 and dragonbones.js. What else should I have? \$\endgroup\$ Feb 6 '18 at 14:21
  • \$\begingroup\$ I tried it out with codepen and it works, so I have no idea \$\endgroup\$
    – Bálint
    Feb 6 '18 at 14:32
  • \$\begingroup\$ What is codepen? \$\endgroup\$ Feb 6 '18 at 14:34
  • \$\begingroup\$ @Bálint, give me a reference to it, please. What version of the pixi.js were you using? \$\endgroup\$ Feb 6 '18 at 14:35
0
\$\begingroup\$

The thing is that pixi.js consists of modules. In big projects it is common to turn off unused modules so that the library itself become lighter.

I just turned on necessary to get rid of errors modules and that is it.

I thought that enabling only mesh module would be enough, but actually it was not. After looking through the code I noticed that mesh is using a particle module in some places, so I enabled the particle module as well and it still was not enough.

I ended up enabling all of the modules.

\$\endgroup\$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .