Skip to content

PLYExporter: Respect source types by default and double precision optional support #31711

@Danilkat

Description

@Danilkat

This description is deprecated, read the comments for accurate context

Description

Vertices are being multiplied by matrixWorld and then passed to the DataView as float32.
In JavaScript, numbers are float64 by default, so applying matrixWorld to the vertex might produce more precision than a float32 type can handle.

Solution

  • Replace output.setFloat32 with output.setFloat64
  • Replace float with float64 (double) in header
  • Fix the ArrayBuffer allocation size to accommodate the new changes

Alternatives

Doing the same for normals might also be useful

Additional context

Related: #31710

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions