driiper Posted March 3, 2014 Share Posted March 3, 2014 Hello, i just started looking at PIXI, but i'm having trouble finding out if its possible to create Shapes which nests other shapes Description image below:http://imgur.com/XDwZ5ZA Is this possible with Pixi, or do i have to have 5 seperate shapes which i manually calculate position on? thanks!Driiper Quote Link to comment Share on other sites More sharing options...
xerver Posted March 3, 2014 Share Posted March 3, 2014 Even if nested you will be calculating positions relative to their parent. The answer is "yes", pixi.js is a scene graph so most objects can have rendered children. When you use the word "Shapes" it is a bit ambiguous what you want to do. Do you want to have each shape be a sprite and lay them out? Do you want to draw each shape with a Graphics object and nest those? Do you want to draw all shapes with a single Graphics object? Do you want to draw all the shapes to canvas and use that as a texture for a single sprite? There are tons of ways to accomplish the drawing you linked. Quote Link to comment Share on other sites More sharing options...
driiper Posted March 5, 2014 Author Share Posted March 5, 2014 Hello and thanks for the reply! I figured it out. What i was looking for was simply to add multiple Graphic objects into a Container. Thanks alot for the help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.