Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Replace geometry in graphics object

$
0
0

Hello, I'd like to ask if there is any way to replace geometry in already created graphics?
The documentation says that geometry attribute in graphics object is read-only.

I know I can clear and redraw but then i make new geometry instance instead of using shared one (I want to have many graphics items of same geometry).

I can remove graphics object and make new object applying shared geometry to new object but then I have to mess with zIndexes and other stuff as rendering queue changes
(not to mention resetting all current graphics settings like scale, tint and so on).

In Sprites i can easily replace texture by modifying texture attribute.

Is there some easy method of resolving this issue in Pixi v5?


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>