Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLTFExporter: Remove truncateDrawRange option. #24625

Merged
merged 3 commits into from
Sep 13, 2022
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 12, 2022

Related issue: -

Description

This PR removes the truncateDrawRange option from GLTFExporter.

The feature was originally implemented for A-Painter so only geometry data are exported which were defined via BufferGeometry.drawRange. However, indexed geometries were never supported.

It seems to me that something application specific has been moved into GLTFExporter which I don't think is appropriate. BufferGeometry.drawRange should be evaluate by the renderer, not exporters. Since GLTFExporter is the only exporter that honors drawRange, I suggest to remove truncateDrawRange and state that exporters always process the entire geometry.

Closes #15104.

Copy link
Collaborator

@takahirox takahirox left a comment

Choose a reason for hiding this comment

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

BufferGeometry.drawRange should be evaluate by the renderer, not exporters

I think this is a right direction. And users who need this feature can write their plugins with the exporter plugin API, maybe.

@Mugen87 Mugen87 added this to the r145 milestone Sep 13, 2022
@Mugen87 Mugen87 merged commit c00709a into mrdoob:dev Sep 13, 2022
@Mugen87 Mugen87 changed the title GLTFExporter: Remove truncateDrawRange option. GLTFExporter: Remove truncateDrawRange option. Sep 13, 2022
@mrdoob
Copy link
Owner

mrdoob commented Sep 13, 2022

Thanks!

@mrdoob
Copy link
Owner

mrdoob commented Sep 13, 2022

/fyi @fernandojsg

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* GLTFExporter: Remove truncateDrawRange option.

* Update screenshot.

* GLTFExporter: Clean up.
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.

GLTFExporter does not honor draw range with indexed geometry.
4 participants