Search the Community
Showing results for tags 'attribute'.
-
I'm trying to create a mesh that consists of a few dozen triangles that are going to change every frame (hopefully performs okay....) How do I actually do that though? Create mesh: const shader = Shader.from(vertexSrc, fragSrc) const geometry = new Geometry() .addAttribute('aVertexPosition', [initialVerts]) .addAttribute('aVertexColor', [initialColors]) const mesh = new Mesh(geometry, shader, null, DRAW_MODES.TRIANGLES) Attempt at changing aVertexPosition and aVertexColor each frame: mesh.geometry.addAttribute('aVertexPosition', newVertices) mesh.geometry.addAttribute('aVertexColor', newColors) Error: Cannot read property 'updateID' of undefined; originating from GeometrySystem.updateBuffers.
-
I am passing from KineticJs to PixiJs. In KineticJs every object has setAttr(), getAttr()so that it is possible to keep user data on objects, which helps later to search over objects on a stage depends on their attributes. I did not see in PixiJs such mechanism yet. How do I do? Yes, sure, it is just possible to extend my javascript variable as I wish, but does PixiJs have a native mechanism for this?
-
hello there, since this is my first post: kudos to deltakosh et al for this great work. my question is, how can i add custom attributes (buffers) to my shaders? it seems like normals, positions and uv's just magically surface when needed - yes, they're quite cleverly integrated and hidden from the developer. now i know i can cheat the system and use for example normals to send additional data to my vertex shader... but then i can't use the normal data for their original purpose anymore =p i don't want to read and understand the source code... because that is not what you're supposed to do when using a framework. if i wanted to do that, i would write my own low level framework. and -- for the life of me i can't find the info from the documentation. can anyone at least point me to the right direction?