-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Description
Description
Right now, PLYLoader can only output the geometry, and all the buffers are getting casted to Float32BufferAttribute, which results in (1) loss of precision for double
and float64
properties and (2) overuse of precision for properties smaller than float32.
But the data from PLY might be used for something other than just rendering.
Solution
Expose the parseBinary
and parseASCII
functions without postProcess
call, which would return the buffer
object created from createBuffer
. Map properties to typed arrays instead of regular ones (the part of that is done by setPropertyBinaryReaders
for binary but not for ASCII).
Alternatives
Or make another ply loader, which will return those buffers instead of geometry (PLYRawLoader, perhaps?)
Additional context
Related to #23006.
This will allow the users to use make their own postprocesses (for example, normalizing the position buffer to the unit cube and extracting the transformation matrix to atleast preserve the local distances).