Primitives with texture

I want to draw circle with seamless texture that fills that circle with given tiling. I don’t want use already drawn png circle sprite with texture because i want to scale it in runtime. If I’ll use that sprite and scale it my texture will scale too

You could try using a ClippingNode with a circle Sprite as stencil and then add a Sprite with your texture as a child to the ClippingNode, with its texture params set to repeating.

Then you can scale the circle Sprite to change the size to what you want and just set the texture rect of your textured Sprite to whatever the bounding box of the circle is.

1 Like