private function initQuadBatch():void
for (var index:int=0; index < 50; index++)
var image:Image=new Image(texture);
var quadBatch:QuadBatch=new QuadBatch();
for (var y:int=0; y < 50; y++)
for (var x:int=0; x < 150; x++)
image.x=x * image.width;
image.y=y * image.height;
my test code is like this. and the reuslt is
the totoal IndexBuffer is 50x50x150=375,000
that will cause the FPS drop to 30 (full is 60).
i don't think it's the best practice to use quadbatch like this way.
but in UI compoent ,i want to implement 9-sacle or 3-sacle, how to deal the middle part of the component?
one way is just scael it, that will cover most of the situation. but some time the UI asset can't be scale(have repeat pattern in it.)
what's the best way to deal that?
i mean the asset it's quite small ,just 10*5 px, but the panel size is quite big, 960x640 px
--> that's is only one background panel.