Skip to content

Conversation

@mrxz
Copy link
Collaborator

@mrxz mrxz commented Jul 15, 2025

The source code documents many of the constructor options of the SparkRenderer and SparkViewpoint. However these are written using multiple single-line comments, effectively making them for internal use only. By using JSDoc the typescript compiler picks them up and retains them when emitting the type definitions. This allows users importing Spark in their projects to see this documentations in their IDE for both JS and TS projects.

This PR updates the documentation comments for the SparkRendererOptions and SparkViewpointOptions. Ultimately more parameters, methods, classes and functions can be documented this way. If needed it can also be used to reference external resource like the online documentation of Three.js or Spark itself.

Here's an example screenshot showing it in effect in VS code:
image

@dmarcos
Copy link
Contributor

dmarcos commented Jul 15, 2025

looks great to me

Copy link
Contributor

@asundqui asundqui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, I have not used JSDoc myself in the past, I will do so going forward, thanks for starting the process!

@dmarcos dmarcos merged commit c25dc35 into sparkjsdev:main Jul 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants