These are chat archives for pixijs/pixi.js

30th
Dec 2015
Bar Ziony
@bartzy
Dec 30 2015 15:42
My problem is that I overwrite stuff that are internal...
and I really shouldn't do that
I overwrite _width and _height
Olav Lindekleiv
@oal
Dec 30 2015 16:19
I noticed an error in the docs: https://pixijs.github.io/docs/PIXI.mesh.Mesh.html "{Float32Arrif you want to specify the vertices". Do I open a pull request on the docs repo or is it generated from source?
Olav Lindekleiv
@oal
Dec 30 2015 16:24
I opened a pull request on the dev branch
Ivan Popelyshev
@ivanpopelyshev
Dec 30 2015 17:11
its generated from source, thank you,
@Bartzy what exactly are you overriding internally? I thought you use separate class for that
Olav Lindekleiv
@oal
Dec 30 2015 20:50
Are there any examples for using Mesh? I can only seem to get it to display one triangle. If I try to supply indices, all I get is "[GroupMarkerNotSet(crbug.com/242999)!:D0667F5B20100000]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 1"
Ivan Popelyshev
@ivanpopelyshev
Dec 30 2015 20:50
oh
code?
Mesh(texture, vertices, uvs, indices, drawMode)
you pass texture, Float32Array of vertices, Float32Array of uvs, Uint16Array of indices
it works for pixi-spine
Olav Lindekleiv
@oal
Dec 30 2015 20:55
Do you have a link to the relevant bits so I can see how meshes are initialized there?
I'm trying to use it pretty much the same way I've used BufferGeometry in Three.js
When did you work with three.js did you clone its repo?
I dont know how to work with any html5 engine without looking in sources :)))
Olav Lindekleiv
@oal
Dec 30 2015 21:06
Ah, the Pixi mesh uses only x, y coordinates. I just expected it to be x, y, z. Maybe that helps. Let me see
Olav Lindekleiv
@oal
Dec 30 2015 21:17
What is the difference between TRIANGLE_MESH and TRIANGLES?
Olav Lindekleiv
@oal
Dec 30 2015 21:26
Aha, turns out if I want so supply my own vertices, I also have to supply UVs along with indices
Bar Ziony
@bartzy
Dec 30 2015 21:30
@ivanpopelyshev I'm using _width and _height in my extending class
Ivan Popelyshev
@ivanpopelyshev
Dec 30 2015 23:01
@Bartzy there's no _width and _height in original classes so its ok to add them
@oal yessss :) TRIANGLE_MESH is to draw polygons, 1-2-3 , 1-4-5, 1-6-7, and so on
@oal js libraries always have problems with params, there's no way to specify ALL possible combinations of params