Skip to content

feat(layers): native procedural TreeLayer - #794

Open
charlieforward9 wants to merge 10 commits into
codex/splat-scene-foundationfrom
codex/native-tree-lab
Open

charlieforward9 wants to merge 10 commits into
codex/splat-scene-foundationfrom
codex/native-tree-lab

Conversation

@charlieforward9

@charlieforward9 charlieforward9 commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Render native procedural tree wood and prepared splat crowns through deck.gl layers. Species geometry, canopy materials, wind, seasons and optical/shadow selection preserve owner picking and sparse-root coverage without a separate Three renderer.

Batch wood/canopy submissions and share canopy grants across species. Explicit type accessors retain species dimensions, null hierarchy overrides preserve fallback behavior, and banyan aerial roots remain on valid branch sockets. Keep full geometry checks under coverage; shadow pixel contracts isolate shadow behavior from unrelated refinement cost.

Visible wood receives shadows; separate light-space refinement children own shadow casting in ordinary LightingEffect. Wood coverage runs before host depth-only shortcuts, and constant coverage changes invalidate derived attributes, preserving fractional wood shadows without manual triggers.

Base: #814. #806 adds unified supplied-row and inventory-streaming input.

Final integration validation: immutable install, lint, package build, strict public/example types, production example bundles and website build pass. All 1,128 Node tests and 22 renderer browser contracts pass. All 28 Tree Lab, Citrus, forest and world application cases pass across the full-suite and focused final-fixture reruns. Renderer tests require software WebGPU and exercise both sorted backends.

Stack graph:

flowchart TD
  M[master] --> A["#807 prepared Composite SplatLayer"]
  A --> B["#814 shared static/RAD scenes"]
  B --> C["#794 native TreeLayer"]
  C --> D["#806 unified inventories"]
  D --> E["#808 tree examples"]
  E --> F["#809 migration / three removal"]
  B --> G["#815 independent Coit"]
  L["luma 9.4-release"] --> H["luma #3398 host/RAD support"]
  H -. compatible release .-> B
Loading

Full stack record.

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Coverage

Stmts: 39.99% ▲+6.54% | Branch: 31.18% ▲+6.98% | Funcs: 33.53% ▲+5.49% | Lines: 39.49% ▲+6.11%

Test Files 135 passed (135)

@greptile-apps

greptile-apps Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds a new procedural tree rendering layer to the layers module.

The PR appears safe to merge based on this review; no new actionable issue or outstanding previous finding remains.

Summary

The PR replaces the Three.js-backed TreeLayer with a native deck.gl renderer and keeps a compatibility import in @deck.gl-community/three.

  • Adds procedural wood, Gaussian foliage, species traits, crops, wind, picking, refinement, and shadow composition.
  • Adds public types, documentation, playground schemas, and renderer tests.
  • The latest changes move WebGL wood coverage into an early shader hook and invalidate derived coverage attributes when constant props change.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Tree data and accessors] --> B[TreeLayer]
  B --> C[Prepared species and owner groups]
  C --> D[TreeWoodLayer]
  C --> E[SplatLayer foliage]
  C --> F[TreeMeshLayer crops]
  D --> G[Camera and light-space wood children]
  E --> H[Shared canopy and shadow budgets]
Loading

Reviews (29) · Last reviewed commit: "Invalidate derived wood attributes when ..." · Reviewed by Greptile

Comment thread examples/layers/tree-lab/benchmark.ts Outdated
Comment thread examples/layers/tree-lab/app.ts Outdated
Comment thread modules/three/package.json Outdated
Comment thread examples/layers/tree-lab/forest.ts Outdated
Comment thread examples/layers/tree-lab/forest-data.ts Outdated
Comment thread examples/layers/tree-lab/forest.ts Outdated
Comment thread examples/layers/tree-lab/benchmark.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread examples/layers/tree-lab/forest.ts Outdated
Comment thread examples/layers/tree-lab/shadow-filter.browser.spec.ts Outdated
Comment thread examples/layers/tree-lab/tree-shadow-pass.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread examples/layers/tree-lab/tree-lighting.ts Outdated
Comment thread examples/layers/tree-lab/tree-lighting.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P2 Shadow image has wrong format website/static/videos/tree-lab-shadows.png:1 ▶

    The new shadow comparison is JPEG data saved as tree-lab-shadows.png, and the review document links to it as a PNG. Browsers may display it, but tools that rely on the extension or require a PNG signature cannot process it as a PNG. Save it as PNG, or rename it as a JPEG and update the link.

Comment thread examples/layers/tree-lab/REVIEW.md Outdated
Comment thread modules/layers/src/tree-layer/tree-layer.ts
Comment thread modules/layers/src/index.ts Outdated
@charlieforward9 charlieforward9 changed the title Move TreeLayer to native vis.gl rendering with an animated comparison lab Add native TreeLayer with per-tree traits Oct 7, 2026
@charlieforward9
charlieforward9 changed the base branch from master to codex/tree-splat-canopy October 7, 2026 01:32

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread modules/layers/src/tree-layer/tree-botany.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread modules/layers/src/tree-layer/tree-layer.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread modules/layers/src/tree-layer/tree-layer.ts
@charlieforward9
charlieforward9 changed the base branch from codex/tree-splat-canopy to codex/splat-scene-foundation October 7, 2026 20:06
@charlieforward9
charlieforward9 force-pushed the codex/splat-scene-foundation branch from 47003c9 to 3f1d6d9 Compare October 7, 2026 20:47
@charlieforward9
charlieforward9 force-pushed the codex/native-tree-lab branch 3 times, most recently from b1eaf7c to a34fd82 Compare October 7, 2026 21:55
@charlieforward9
charlieforward9 force-pushed the codex/splat-scene-foundation branch from ef42ba9 to 1a58885 Compare October 7, 2026 21:55
@charlieforward9 charlieforward9 changed the title Add native TreeLayer with per-tree traits feat(layers): native procedural TreeLayer Oct 7, 2026
@charlieforward9
charlieforward9 force-pushed the codex/splat-scene-foundation branch 2 times, most recently from 30f08d9 to 3550aa4 Compare October 8, 2026 02:06
@charlieforward9
charlieforward9 force-pushed the codex/native-tree-lab branch 3 times, most recently from 5c8e157 to d3ba115 Compare October 8, 2026 02:59

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d3ba115. Configure here.

Comment thread modules/layers/src/tree-layer/tree-wood-layer.ts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant