You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Editors like VS Code parse the comments from source code and display them during editing.
Through this I realized that the constructors of classes like "World" and "Body" are falsely shown as deprecated because the comments above their constructors seem to be weirdly positioned or not correctly formatted. One example: dist/cannon-es.js
line 3154
/**
* Base class for all body types.
* @example
* const body = new Body({
* mass: 1,
* })
* const shape = new Sphere(1)
* body.addShape(shape)
* world.addBody(body)
*/
class Body extends EventTarget {
line 3224
/**
* Callback function that is used BEFORE stepping the system. Use it to apply forces, for example. Inside the function, "this" will refer to this Body object. Deprecated - use World events instead.
* @deprecated Use World events instead
*/
/**
* Callback function that is used AFTER stepping the system. Inside the function, "this" will refer to this Body object. Deprecated - use World events instead.
* @deprecated Use World events instead
*/
line 3379
/**
* When true the body behaves like a trigger. It does not collide
* with other bodies but collision events are still triggered.
* @default false
*/
constructor(options = {}) {
The comments from line 3224 seem to be misinterpreted and falsely mark the constructor signatures as deprecated.
Steps to reproduce:
Use Visual Studio Code
Import dist/cannon-es.js into another script
Use constructor of Body or World
Constructor signature is falsely marked as deprecated
If these comments are removed, the constructor is no longer seen as deprecated. As such, I suggest reformatting such comments to make it clear that they are not referring to the constructor signature but to the respective fields.
The text was updated successfully, but these errors were encountered:
Editors like VS Code parse the comments from source code and display them during editing.
Through this I realized that the constructors of classes like "World" and "Body" are falsely shown as deprecated because the comments above their constructors seem to be weirdly positioned or not correctly formatted. One example:
dist/cannon-es.js
line 3154
line 3224
line 3379
The comments from line 3224 seem to be misinterpreted and falsely mark the constructor signatures as deprecated.
Steps to reproduce:
dist/cannon-es.js
into another scriptIf these comments are removed, the constructor is no longer seen as deprecated. As such, I suggest reformatting such comments to make it clear that they are not referring to the constructor signature but to the respective fields.
The text was updated successfully, but these errors were encountered: