Saturday, October 8, 2022
HomeGame DevelopmentQuestions in regards to the masks element - Cocos Creator

Questions in regards to the masks element – Cocos Creator


Hiya!
I would like to chop out numerous shapes from a texture for puzzle video games. At the moment utilizing Cocos Creator 3.6.0.
Inform me, please, what kind of masks has the least affect on the efficiency of the sport engine?
Wish to use GRAPHICS_STENCIL. Tried the instance from Cocos Creator 3.6 Person Handbook->Masks Part Reference, obtained
error: “Error: [Scene] ‘Masks.graphics’ is deprecated, please use ‘Masks.subComp’ as an alternative.”
Visible Studio Code – Property ‘graphics’ doesn’t exist on kind ‘Masks’:

However the masks works!
Will GRAPHICS_STENCIL be supported in future variations of the engine or will there be another?
What may be executed with ‘Masks.subComp’?


I’ve used “Masks._graphics” in 2.x model, examine if it nonetheless works in 3.x ?

Sure, I wrote that it really works, but it surely provides a warning: “Error: [Scene] ‘Masks.graphics’ is deprecated, please use ‘Masks.subComp’ as an alternative.” within the browser and within the Cocos Creator console, in addition to in
Visible Studio Code – “Property ‘graphics’ doesn’t exist on kind ‘Masks’”

Within the engine, the masks makes use of the _graphics, you need to use it usually.

Thanks I used to be simply confused by the deprecated API warning.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments