Muhammad Adnan

  • Content Count

  • Joined

  • Last visited

About Muhammad Adnan

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks man, will try something out and post back here with whatever I could Muster up for future use. Can you, or anyone, point me to the nearest tutorial on how to use Matrices? I don't have the slightest clue how to use them, the documentation doesn't explain much expect for what the functions do, but everything that I wanna achieve is somehow done better and nicer with Matrices.
  2. Hey guys, So I was fiddling around with Pixi's drag example on their website. I was wondering how can one drop the object in a container. For example I want to move and object and when it reaches near the container it attaches on top of it. I'm really scared of posting this since people might think I want someone to code it for me but I just want to understand the concept and the things I can use, so to say a guide. Would appreciate the help
  3. Thank you guys, I am amidst of applying multiple executions in order to understand position, pivot, offset and how they affect children and themselves. I am also trying to get a flavor or "LocalBounds' so I understand the relativity of positioning etc. I'll post soon with what I achieve.
  4. Hey everyone, I want to center an element (in this case a graphics element) in the center of the screen. As you can see from my code, I am changing the position of the graphics and bringing it to the center of the screen. I don't want that. I want to actually move the pivot/position of the stage in such a manner that the graphics then looks like it is to the center of the screen. Also, would it be possible to save the original position of the stage?
  5. Hey Ivan, I kinda messed around with it more and here's what I have done. This is nearly close to what I want
  6. Hello Ivan, OMG THANK YOU THANK YOU THANK YOU You really nailed it man. In regards to the Transform subject, can you refer me to an example or any tutorial that clears it out? The documentation regarding is very bland and doesn't help me capture the true essence of the subject matter. Also, can you by any chance tell me the logic if I want to initially move the rectangle to the middle of the screen and then zoom it in. Because now it essentially goes to the corner and then increases in size. I will also try it out myself. Once again, thank YOU!
  7. Ivan, Here's the JS Fiddle link to the code : As you can see I haven't put animationFrame in the grow function. This is because I want to see on every click(frame) where does the element go. And as you can also further see my attempt at zooming makes the element go out of the view at one point.
  8. Hey everyone! I am trying to achieve a zoom on an element using PIXI I have currently a graphics rectangle (see first image) It is the child of my stage which is the main container being rendered. My main container is as big as the browser screen. On clicking the graphics element I want the stage to zoom in in a way that I get this output (see second image) As you can see on the desired output I want the rectangle to take up the whole container. I am confused with what pivots do I choose and what new positioning do I set to achieve this and till what point do I scale this?