This seems like it could run a lot faster.
http://patrickmatte.com/stuff/brightness/
Here’s the code, very simple straight forward stuff.
Does someone know why this runs so slow?Software: Away3D 4.x |
||
patmat, Newbie
Posted: 25 October 2011 09:42 PM Total Posts: 8 This seems like it could run a lot faster. http://patrickmatte.com/stuff/brightness/ Here’s the code, very simple straight forward stuff. |
||
Jerome Maurey-Delaunay, Moderator
Posted: 25 October 2011 10:37 PM Total Posts: 17 [ # 1 ] Hi Patrick, Stage3D is no optimized to handle a lot of individual meshes & materials, like a bunch of planes. The best would be to try and merge the individual planes into one mesh before pushing it to render. Look at the Merge class and the applyToContainer method. Also, you should be able to use one material and offset the UVs on each plane. I know that was possible in 3.x, but I haven’t tested it in 4.x. Maybe someone from the dev team can comment on that! Cheers, J. |
||
|
||
Zerone, Newbie
Posted: 26 October 2011 01:21 AM Total Posts: 22 [ # 3 ] Because the material issue. |
||
patmat, Newbie
Posted: 27 October 2011 10:29 PM Total Posts: 8 [ # 4 ] Ok so I’ve put all the planes in a single mesh and it runs super fast. But when I try to move the vertices from the subGeometry, it becomes slow again. Is there a faster way to move the vertices? Take a look at this. I also noticed it runs fast in Chrome but very poorly in Firefox and Safari. Anyone knows the reason for that? Here’s roughly what I’m doing.
var vertices:Vector.<Number> = subGeometry.vertexData; |
||
|