Rexus Posted December 9, 2021 Share Posted December 9, 2021 Hi, I started playing around with PIXI.js and I want to create a simple Rectangle with controllers on the corners. After a mouse click on the rectangle it changes the color to orange and 4 of the controllers show up. The controllers allow to change size of the Rectangle. My first thought was to create my own abstract class Rectangle. Class Product extends my Rectangle class. I will add Product to entities list and draw all of them by PIXI.Graphics object. Example: https://codesandbox.io/s/async-brook-ul1hh?file=/src/index.ts Is it a good solution to solve that problem? Should I use sprites if I want to draw +/- 2000 rectangles? If yes what about losing quality after resizing? Where should I add the controllers? If any of you know how to solve this, please share with me your thoughts. Thank you very much in advance. jojomasala 1 Quote Link to comment Share on other sites More sharing options...
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.