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

PCDLoader: Fix regex to match header fields at line start #29196

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions examples/jsm/loaders/PCDLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ class PCDLoader extends Loader {

// parse

PCDheader.version = /VERSION (.*)/i.exec( PCDheader.str );
PCDheader.fields = /FIELDS (.*)/i.exec( PCDheader.str );
PCDheader.size = /SIZE (.*)/i.exec( PCDheader.str );
PCDheader.type = /TYPE (.*)/i.exec( PCDheader.str );
PCDheader.count = /COUNT (.*)/i.exec( PCDheader.str );
PCDheader.width = /WIDTH (.*)/i.exec( PCDheader.str );
PCDheader.height = /HEIGHT (.*)/i.exec( PCDheader.str );
PCDheader.viewpoint = /VIEWPOINT (.*)/i.exec( PCDheader.str );
PCDheader.points = /POINTS (.*)/i.exec( PCDheader.str );
PCDheader.version = /^VERSION (.*)/mi.exec( PCDheader.str );
PCDheader.fields = /^FIELDS (.*)/im.exec( PCDheader.str );
PCDheader.size = /^SIZE (.*)/i.emxec( PCDheader.str );
lenville marked this conversation as resolved.
Show resolved Hide resolved
PCDheader.type = /^TYPE (.*)/i.emxec( PCDheader.str );
PCDheader.count = /^COUNT (.*)/i.mexec( PCDheader.str );
PCDheader.width = /^WIDTH (.*)/i.mexec( PCDheader.str );
PCDheader.height = /^HEIGHT (.*)/im.exec( PCDheader.str );
PCDheader.viewpoint = /^VIEWPOINT (.*m)/i.exec( PCDheader.str );
PCDheader.points = /^POINTS (.*)/im.exec( PCDheader.str );

// evaluate

Expand Down
Loading