Skip to content

Clean up logging and refactor HTML viewer settings#174

Merged
slimbuck merged 5 commits intoplaycanvas:mainfrom
slimbuck:html-dev
Mar 10, 2026
Merged

Clean up logging and refactor HTML viewer settings#174
slimbuck merged 5 commits intoplaycanvas:mainfrom
slimbuck:html-dev

Conversation

@slimbuck
Copy link
Copy Markdown
Member

Summary

  • Standardize console output across the codebase: move internal diagnostics from logger.log to logger.debug, remove redundant messages (GPU adapter name, octree profiling), and normalize message casing
  • Consolidate voxel writer progress from 7 steps to 4 (Building BVH, Voxelizing, Filtering, Writing)
  • Refactor HTML writer to pass viewer settings through directly instead of manually merging partial overrides, and update the default settings schema to match viewer v2 (cameras array, post-effects, annotations, start mode)

Changes

Logging

  • write-voxel.ts: Reduce progress steps from 7 to 4; move verbose stats to logger.debug or remove
  • voxel-filter.ts: logger.loglogger.debug for filter stats
  • sparse-octree.ts: Remove octree profiling debug output
  • node-device.ts: Remove "Using GPU" log
  • cli/index.ts: Rephrase loaded gaussians message
  • k-means.ts: Normalize log message casing
  • morton-order.ts: Remove commented-out debug line

HTML writer

  • write-html.ts: Replace ViewerSettings type and manual default-merging with a defaultSettings const and direct passthrough of caller-provided settings

@slimbuck slimbuck requested review from a team and Copilot March 10, 2026 18:06
@slimbuck slimbuck self-assigned this Mar 10, 2026
@slimbuck slimbuck added the enhancement New feature or request label Mar 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR cleans up logging output across the codebase and refactors the HTML viewer settings handling. Internal diagnostic messages are moved from logger.log to logger.debug, redundant log messages are removed, and message casing is normalized. The voxel writer progress reporting is simplified from 7 steps to 4. The HTML writer is refactored to replace a typed ViewerSettings interface and manual shallow-merge with a defaultSettings constant matching the viewer v2 schema.

Changes:

  • Standardize logging: move verbose stats to logger.debug, remove GPU adapter/octree profiling messages, normalize message casing
  • Consolidate voxel writer progress from 7 named phases to 4 (Building BVH → Voxelizing → Filtering → Writing)
  • Refactor HTML writer to use a defaultSettings const (viewer v2 schema) instead of a ViewerSettings type with manual merge

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/writers/write-voxel.ts Reduce progress steps from 7 to 4, move/remove verbose log messages
src/lib/writers/write-html.ts Replace ViewerSettings type and merge logic with defaultSettings const and direct passthrough
src/lib/voxel/voxel-filter.ts Change filter stats from logger.log to logger.debug
src/lib/voxel/sparse-octree.ts Remove octree profiling debug output
src/lib/spatial/k-means.ts Normalize log message casing (uppercase → lowercase)
src/lib/data-table/morton-order.ts Remove commented-out debug line
src/cli/node-device.ts Remove "Using GPU" log message
src/cli/index.ts Rephrase loaded gaussians message

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/writers/write-html.ts
@slimbuck slimbuck merged commit 0a11d96 into playcanvas:main Mar 10, 2026
7 checks passed
@slimbuck slimbuck deleted the html-dev branch March 10, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants