-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frame rate too low #2
Comments
If the phone doesn't support the WebGL context, it will render using the Canvas2D context. This can be much slower, especially if the animation includes meshes. Can you provide an example and a spec for the phone you are using? |
case 'region':
var bone = spine_pose.bones[slot.bone_key];
ctxApplySpace(ctx, bone.world_space);
ctxApplySpace(ctx, attachment.local_space);
ctxApplyAtlasSitePosition(ctx, site);
ctx.scale(attachment.width/2, attachment.height/2);
ctxDrawImageMesh(ctx, render.region_vertex_triangle, render.region_vertex_position, render.region_vertex_texcoord, image, site, page);
break; When I did not use mesh function, the picture is packed with texturepacker before. Every big picture when rendering are drawn once (ctx.drawImage (image, 0, 0);). This position can not optimize? |
Yes, this could be simplified to a call to ctx.drawImage, provided an atlas is not being used or an atlas site without rotation is being used. I left it this way, since it supports the most cases. Thanks for the feedback. |
I directly replace ctxDrawImageMesh into drawImage can it? Thank you, I went to try. |
In the region draw case, you would nee to replace this:
with this:
|
We can not only convert a small map it? Rather than make a bigger change it? That is the ctxDrawImageMesh optimize it. I think this will greatly improve efficiency. thanks~~ |
Hi man, I have some questions to ask you, you use the animation on your phone will feel a low frame rate it? You have done and the official spine js runtime contrast it? About optimization you have any suggestions?
The text was updated successfully, but these errors were encountered: