planck.js icon indicating copy to clipboard operation
planck.js copied to clipboard

Elaborate on style property documentation

Open rgov opened this issue 1 year ago • 4 comments

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 avatar Sep 29 '24 02:09 rgov

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

rgov avatar Sep 29 '24 02:09 rgov

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

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

thelabcat avatar Sep 29 '24 04:09 thelabcat

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).

shakiba avatar Sep 30 '24 16:09 shakiba

Apparently currently styling is broken in testbed, I will fix it in next testbed release.

shakiba avatar Oct 10 '24 20:10 shakiba

I fixed style for local testbed, and added them to docs.

I will update live examples soon, and will change render to style.

shakiba avatar Dec 27 '24 22:12 shakiba