pixijs / pixi-react

Write PIXI apps using React declarative style
https://pixijs.io/pixi-react/
MIT License
2.33k stars 177 forks source link

add geometry prop to Graphics #334

Closed vijayth2-cerebras closed 2 years ago

vijayth2-cerebras commented 2 years ago

Description: When the same shapes are repeatedly used, the memory consumed by the browser becomes high. To optimise memory consumption, a geometry object can be passed to the Graphics object constructor.

Related issue (if exists): https://github.com/inlet/react-pixi/issues/327

vijayth2-cerebras commented 2 years ago

Code sandbox - https://codesandbox.io/s/react-pixi-example-jyij07?file=/src/App.js Grid component - proposed implementation Grid2 component - current implementation

vijayth2-cerebras commented 2 years ago

@inlet Sure, should I create a new file for graphics tests?

inlet commented 2 years ago

Yes please do, you can create a test file test/graphics.spec.js.

Thanks

vijayth2-cerebras commented 1 year ago

Sure, should I create a new file for graphics tests?

From: Patrick Brouwer @.> Reply to: inlet/react-pixi @.> Date: Wednesday, 30 March 2022 at 1:05 PM To: inlet/react-pixi @.> Cc: Vijay Thirugnanam @.>, Author @.***> Subject: Re: [inlet/react-pixi] add geometry prop to Graphics (PR #334)

@inlet commented on this pull request.

Great, thanks for contributing to this project!

Can you please create tests to validate the correct behaviour?

— Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Finlet%2Freact-pixi%2Fpull%2F334%23pullrequestreview-925651641&data=04%7C01%7Cvijay.thirugnanam%40cerebras.net%7Cae0073922282443d48b408da121fd547%7C16c409e7e5a24663a88467e3ba571505%7C0%7C0%7C637842225190556752%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=OHHzuHonCmmd%2BEq%2BXb0QNzcjKtLMYkWWv5EmIE5uu4Y%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXEKXIHJOTJ7O3LNX6762WTVCP73FANCNFSM5R56PW6A&data=04%7C01%7Cvijay.thirugnanam%40cerebras.net%7Cae0073922282443d48b408da121fd547%7C16c409e7e5a24663a88467e3ba571505%7C0%7C0%7C637842225190556752%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=cJSwYvHChgTDmCQjjZKiIOzPaZZc5b1PGBiEcRPohGU%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>