Jump to content

Can redraw some sprites groups when I want?


osinski
 Share

Recommended Posts

What do you mean by redraw? All sprites on the screen will be redrawn every frame regardless, as the screen is completely cleared before each render update. If you want a sprite to not be rendered, setting its .visible property to false will make it skip being rendered (and thus disappear) until you set it back to true.

 

There is however a plug-in which will 'hold' the current frame without clearing it under certain circumstances, which is useful for mobile and laptops: https://github.com/photonstorm/phaser-plugins/tree/master/SaveCPU

Link to comment
Share on other sites

What do you mean by redraw? All sprites on the screen will be redrawn every frame regardless, as the screen is completely cleared before each render update. If you want a sprite to not be rendered, setting its .visible property to false will make it skip being rendered (and thus disappear) until you set it back to true.

 

There is however a plug-in which will 'hold' the current frame without clearing it under certain circumstances, which is useful for mobile and laptops: https://github.com/photonstorm/phaser-plugins/tree/master/SaveCPU

Its nice plugin, thx! But It stops render at all. I want to stop render after my gamescreen created and rendered only a some area of game screen. For example when user dont click on gamescreen - I want to render only this area in the red square http://joxi.ru/dp27OkW3iX8Y27

After users clicked on gem - only gems area, and timer area, but not buttons, background, etc. Is it possible?

Link to comment
Share on other sites

Its nice plugin, thx! But It stops render at all. I want to stop render after my gamescreen created and rendered only a some area of game screen. For example when user dont click on gamescreen - I want to render only this area in the red square http://joxi.ru/dp27OkW3iX8Y27

After users clicked on gem - only gems area, and timer area, but not buttons, background, etc. Is it possible?

 

It is, I just told you how, and linked an example.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...