Skip to content

Conversation

@slimbuck
Copy link
Member

@slimbuck slimbuck commented Jul 2, 2025

This PR organises a few engine files without changing functionality:

  • move gsplat sorter worker into its own file
  • clean up app-base graphics device calls

@slimbuck slimbuck requested review from a team and Copilot July 2, 2025 10:50
@slimbuck slimbuck self-assigned this Jul 2, 2025
Copy link
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 extracts the inline SortWorker into its own file and tidies up how the graphics device is updated in the app loop without changing existing functionality.

  • Extract SortWorker into gsplat-sort-worker.js and update instantiation in GSplatSorter
  • Add GraphicsDevice.update() as a wrapper for updateClientRect()
  • Refactor AppBase to use the new update() and inline frameStart/frameEnd calls within render()

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/scene/gsplat/gsplat-sorter.js Import SortWorker, pull out message handler, simplify worker setup
src/scene/gsplat/gsplat-sort-worker.js New file containing the extracted SortWorker function
src/platform/graphics/graphics-device.js Add update() method that calls updateClientRect()
src/framework/app-base.js Replace direct updateClientRect() with graphicsDevice.update(), move frameStart/frameEnd into render()
Comments suppressed due to low confidence (3)

src/platform/graphics/graphics-device.js:902

  • [nitpick] Add a JSDoc comment to update() explaining that it wraps updateClientRect() to improve maintainability.
    update() {

src/platform/graphics/graphics-device.js:902

  • Consider adding unit tests for GraphicsDevice.update() to ensure updateClientRect() is correctly invoked.
    update() {

src/scene/gsplat/gsplat-sort-worker.js:1

  • [nitpick] Add a module-level comment or JSDoc to gsplat-sort-worker.js describing the purpose of SortWorker for better clarity.
// sort blind set of data

@slimbuck slimbuck merged commit f605d31 into playcanvas:main Jul 2, 2025
7 checks passed
@slimbuck slimbuck deleted the org branch July 2, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants