Skip to content

Conversation

@rafaelsc
Copy link
Contributor

@rafaelsc rafaelsc commented Feb 3, 2023

Why

BufferGeometry and BufferAttribute type need some cleanup to remove code that doesn't exist anymore on ThreeJS. And even marked was deprecated would cause runtime errors. And some documentation spelling and naming needed improvements.

What

  • Remove the old code
  • Improve documentation spelling and naming
  • Update some return Types with the correct type according to the Documentation and Source code.

Checklist

  • Checked the target branch (current goes master, next goes dev)
  • Added myself to contributors table
  • Ready to be merged

@joshuaellis joshuaellis requested a review from 0b5vr February 3, 2023 13:14

/**
* This is a superefficent class for geometries because it saves all data in buffers.
* This is a super efficient class for geometries because it saves all data in buffers.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's probably documentation in the era when they used to live together with Geometry.
If you are super generous and change the doc to the latest one I will appreciate it.

https://threejs.org/docs/#api/en/core/BufferGeometry

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hello @0b5vr, I had already started working on improving TSDocs but I'm coding a way to do mostly automatic allowing update everything quicker. And this will take some time to complete.

So for now I just update the TSDocs for BufferGeometry in a very quick and dirty way. And in the near future, I will update with better TSDocs.

And a fix for all the returning types will be done in another PR.

@rafaelsc rafaelsc changed the title Cleanup deprecated code and documentation for BufferGeometry and BufferAttribute Cleanup deprecated code and Update documentation for BufferGeometry and BufferAttribute Feb 19, 2023
@rafaelsc
Copy link
Contributor Author

All Documentation is now Updated with the level of quality that I was aiming.

@rafaelsc
Copy link
Contributor Author

Some return Types were updated with the correct type according to the Documentation and Source code, with more changes that I'm planning for other PR.

@0b5vr
Copy link
Contributor

0b5vr commented Feb 23, 2023

Sorry for the late response, I will check it tomorrow!

Copy link
Contributor

@0b5vr 0b5vr left a comment

Choose a reason for hiding this comment

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

Looks... fantastic

Thank you!

@0b5vr
Copy link
Contributor

0b5vr commented Feb 24, 2023

@rafaelsc Seems you have to delete the line examples/jsm/utils/BufferGeometryUtils.d.ts from types/three/OTHER_FILES.txt.

You can check locally by doing yarn test-all!

@rafaelsc
Copy link
Contributor Author

Good find. That error started after my last commit when I added the reference for BufferGeometryUtils for the updated TSDoc.

@0b5vr 0b5vr merged commit 2ab523f into three-types:master Feb 28, 2023
@rafaelsc rafaelsc deleted the cleanupDeprecated branch February 28, 2023 06:59
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