piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.89k stars 236 forks source link

Elaborate on style property documentation #290

Open rgov opened 6 days ago

rgov commented 6 days ago

The style property, e.g., Body.style is documented as "Styling for dev-tools" without elaboration. It is used in the testbed examples like Soccer to change the stroke and fill colors of the bodies.

I can't follow the repo history very well but there used to be a render property used similarly. The examples currently live show outdated examples that use render and a deprecated Testbed constructor.

rgov commented 6 days ago

The above comment by @SagarChandra07 is likely malware, do not download it.

thelabcat commented 5 days ago

The above comment by @SagarChandra07 is likely malware, do not download it.

Confirmed. 17 positives on VirusTotal. They are spamming it everywhere. Please report!

shakiba commented 4 days ago

That's correct, 'render' is replaced by 'style'.

'render' was experimental and was not documented, it should still work but it is not included in the typescript API.

Please note that, as mentioned in the docs, style is for dev-tools and debugging purpose (render was also for debugging purpose).