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

PLYLoader: Fix for linesplitting on universal newlines #24264

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

gwegash
Copy link
Contributor

@gwegash gwegash commented Jun 22, 2022

Description

  • PLYLoader would split lines successfully if they were \r\n or \n but not \r.
  • Some .ply files can be encoded with \r
  • The spec is quite ambiguous here. So supporting universal newlines looks like the best thing to do.

This PR fixes the problem by allowing line splitting on \r characters too, so the PLYLoader should now support universal newlines.

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 23, 2022

Normally, carriage returns should only be used in the header however not every exporter follows this convention since the spec is not specific enough. That's indeed unfortunate.

It's probably best to accept any line ending style in the loader.

@Mugen87 Mugen87 added this to the r142 milestone Jun 23, 2022
@mrdoob mrdoob merged commit 23046e4 into mrdoob:dev Jun 28, 2022
@mrdoob
Copy link
Owner

mrdoob commented Jun 28, 2022

Thanks!

abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
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.

4 participants