Unify DataTable clone and permuteRows into single clone(options?) method#194
Unify DataTable clone and permuteRows into single clone(options?) method#194slimbuck merged 3 commits intoplaycanvas:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR consolidates DataTable.clone() and DataTable.permuteRows() into a single clone(options?) API that supports row selection and column filtering, then updates call sites accordingly. It also adjusts voxel writing by rotating Gaussian data into PlayCanvas coordinate space before GPU voxelization and bumps the voxel metadata version.
Changes:
- Replace
permuteRows()usages withclone({ rows })and remove the standalonepermuteRows()API in favor ofclone(options?). - Extend
DataTable.clone()to optionally select rows and/or columns. - In
writeVoxel, clone a reduced column set, apply a 180° Z rotation, and update voxel metadata version to1.1.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/decimate.test.mjs | Updates tests to use clone({ rows }) instead of permuteRows() |
| src/lib/writers/write-voxel.ts | Rotates a cloned subset of columns into PlayCanvas space; bumps voxel version to 1.1 |
| src/lib/writers/write-lod.ts | Replaces permuteRows() with clone({ rows }) |
| src/lib/process.ts | Updates filtering to return clone({ rows }) |
| src/lib/data-table/decimate.ts | Updates row-subsetting calls to clone({ rows }) |
| src/lib/data-table/data-table.ts | Implements clone(options?) supporting row/column selection; updates docs referencing clone({ rows }) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
DataTable.clone()andDataTable.permuteRows()into a singleclone(options?)method that accepts optional{ rows, columns }for row selection and column filtering in one callAPI Changes
DataTable.clone(options?)now accepts an optional options object:Breaking:
DataTable.permuteRows()is removed. Replace withclone({ rows }).