BabylonJS / Babylon.js

Babylon.js is a powerful, beautiful, simple, and open game and rendering engine packed into a friendly JavaScript framework.
http://www.babylonjs.com
Apache License 2.0
22.75k stars 3.39k forks source link

Add default value to documented constructor parameters #15218

Closed RaananW closed 2 weeks ago

RaananW commented 2 weeks ago

When compiling babylon using closure compiler it complains that default parameters don't have the default value, in accordance to JSDoc specifications. as we are using tsdoc and not jsdoc, this introduces a bit of an issue if we document the constructor with default values (tsdoc doesn't have a definition for default value of a paremeter).

The solution is to add the default value to the actual documentation of the paremeter, if provided. This is needed if a constructor has a public member that is documented and has a default value. These are the ones I found, I guess there might be more and I will try adding a step to check for missing values in the future.

bjsplat commented 2 weeks ago

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat commented 2 weeks ago

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). To prevent this PR from going to the changelog marked it with the "skip changelog" label.

bjsplat commented 2 weeks ago

Snapshot stored with reference name: refs/pull/15218/merge

Test environment: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15218/merge/index.html

To test a playground add it to the URL, for example:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15218/merge/index.html#WGZLGJ#4600

Links to test babylon tools with this snapshot:

https://playground.babylonjs.com/?snapshot=refs/pull/15218/merge https://sandbox.babylonjs.com/?snapshot=refs/pull/15218/merge https://gui.babylonjs.com/?snapshot=refs/pull/15218/merge https://nme.babylonjs.com/?snapshot=refs/pull/15218/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/15218/merge#BCU1XR#0

bjsplat commented 2 weeks ago

WebGL2 visualization test reporter:

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15218/merge/testResults/webgl2playwright/index.html

bjsplat commented 2 weeks ago

Visualization tests for WebGPU (Experimental)

https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15218/merge/testResults/webgpuplaywright/index.html