Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
342878a
feat(layers): render TreeLayer with native vis.gl geometry and GPU wind
charlieforward9 Oct 5, 2026
53e6611
refactor!: remove legacy three module and migrate Seasonal Farm to la…
charlieforward9 Oct 5, 2026
8bad738
Fix packed tree shadows and connect winter trunks to branches
charlieforward9 Oct 5, 2026
ee3df41
Merge verified TreeLayer rendering fixes into removal stack
charlieforward9 Oct 5, 2026
21fa6c2
Validate Tree Lab URLs and align the compatibility workspace peer
charlieforward9 Oct 5, 2026
b0693ba
Merge Tree Lab review fixes into the removal stack
charlieforward9 Oct 5, 2026
cede7af
Preserve TreeLayer documentation and Seasonal Farm URLs
charlieforward9 Oct 5, 2026
6853501
Merge master and preserve TreeLayer release notes
charlieforward9 Oct 5, 2026
b103b30
Update the removal stack with the resolved master merge
charlieforward9 Oct 5, 2026
7134bcf
Add an exact-count 10K and 20K native tree forest
charlieforward9 Oct 5, 2026
263d9a7
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 5, 2026
d83ca72
Refine forest cameras, live stats and scale measurements
charlieforward9 Oct 6, 2026
cdcab41
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
35cfacf
Keep forest test diagnostics within the public API
charlieforward9 Oct 6, 2026
eac1da2
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
0937d88
Make the forest stats toggle hide its caption
charlieforward9 Oct 6, 2026
77ce66b
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
2ce3a6b
Refit benchmark overview and reject resized samples
charlieforward9 Oct 6, 2026
c69e1db
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
ca1e203
Keep tree shadows stable through high-pitch horizons
charlieforward9 Oct 6, 2026
203ad92
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
ecc51da
Filter tree shadows after depth comparisons
charlieforward9 Oct 6, 2026
706ec2f
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
116a0f2
Improve Tree Lab shadow softness and filtering cost
charlieforward9 Oct 6, 2026
decf490
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
0c8a544
Refresh tree film and retain matched shadow benchmarks
charlieforward9 Oct 6, 2026
b412730
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
288c1f9
Skip material shading in native tree shadow depth pass
charlieforward9 Oct 6, 2026
bd5522d
Merge branch 'codex/native-tree-lab' into codex/remove-three-module
charlieforward9 Oct 6, 2026
e9040be
Remove TreeLayer detail presets and always use high geometry
charlieforward9 Oct 6, 2026
8f65c80
Merge highest-detail TreeLayer update into three cleanup
charlieforward9 Oct 6, 2026
94aa268
Remove obsolete TreeLayer schema and guide references
charlieforward9 Oct 6, 2026
1d30abb
Merge TreeLayer review fixes into three cleanup
charlieforward9 Oct 6, 2026
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ An awesome list of community-driven modules, integrations, and tools built with
| **[arrow-layers](./modules/arrow-layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/arrow-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/arrow-layers) | Apache Arrow visualization layers — render large columnar datasets directly on the GPU. |
| **[editable-layers](./modules/editable-layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/editable-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/editable-layers) | Interactive drawing and editing layers for geospatial features. |
| **[geo-layers](./modules/geo-layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/geo-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/geo-layers) | Suite of geospatial layers covering tile formats, terrain, and more. |
| **[layers](./modules/layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/layers.svg)](https://www.npmjs.com/package/@deck.gl-community/layers) | Additional community-contributed layers not yet in the official deck.gl release. |
| **[layers](./modules/layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/layers.svg)](https://www.npmjs.com/package/@deck.gl-community/layers) | Additional community-contributed layers, including the native procedural `TreeLayer`. |
| **[infovis-layers](./modules/infovis-layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/infovis-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/infovis-layers) | Information visualization layers for non-geospatial, chart-style rendering. |
| **[graph-layers](./modules/graph-layers)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/graph-layers.svg)](https://www.npmjs.com/package/@deck.gl-community/graph-layers) | Graph and network visualization layers for deck.gl. |
| **[three](./modules/three)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/three.svg)](https://www.npmjs.com/package/@deck.gl-community/three) | Three.js-backed layers for deck.gl, including a fully parametric 3D `TreeLayer`. |
| **[widgets](./modules/widgets)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/widgets.svg)](https://www.npmjs.com/package/@deck.gl-community/widgets) | UI widgets (pan, zoom range, etc.) that integrate with deck.gl view state management. |
| **[react](./modules/react)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/react.svg)](https://www.npmjs.com/package/@deck.gl-community/react) | React components and hooks for building deck.gl applications. |
| **[react-fiber](./modules/react-fiber)** | [![npm](https://img.shields.io/npm/v/@deck.gl-community/react-fiber.svg)](https://www.npmjs.com/package/@deck.gl-community/react-fiber) | React Fiber renderer for composing deck.gl layers and views as React elements. |
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/layers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Release date: 2023

## Exports

- [`TreeLayer`](./api-reference/tree-layer.md) (WebGL2 and WebGPU)

- [`FlameTrailLayer`](./api-reference/flame-trail-layer.md) (WebGL2 and WebGPU)
- `DependencyArrowLayer`
- `PathMarkerLayer`
Expand All @@ -45,6 +47,8 @@ Release date: 2023

## Examples

- [Tree Lab](/examples/layers/tree-lab)

- [FlameTrailLayer](/examples/layers/flame-trail)
- [Path outline, marker, and dependency arrow](/examples/layers/path-outline-and-markers)
- [SkyboxLayer MapView](/examples/layers/skybox-map-view)
Expand Down
62 changes: 62 additions & 0 deletions docs/modules/layers/api-reference/tree-layer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# TreeLayer

An instanced, procedural tree layer built entirely with deck.gl, luma.gl and math.gl. Five species share cached CPU meshes; winter deciduous trees expose branching crowns. Trunks and crowns always use the highest-quality geometry. No Three.js runtime dependency is required.

```ts
import {TreeLayer} from '@deck.gl-community/layers';

new TreeLayer({
data: trees,
getPosition: tree => tree.position,
getTreeType: tree => tree.species,
getHeight: tree => tree.height,
getSeason: () => 'summer',
windStrength: 0.025,
pickable: true
});
```

Try [Tree Lab](/examples/layers/tree-lab) for synchronized original/native specimens of every species, seasonal controls, supplied crop points, shadows and wind.

## Properties

Inherits the deck.gl `CompositeLayer` properties. Accessors are functions of the source data object.

| Property | Default | Meaning |
| --- | --- | --- |
| `getPosition` | `d => d.position` | Longitude/latitude position of the tree base; the host coordinate system also supports local coordinates. |
| `getElevation` | `() => 0` | Base elevation in metres. |
| `getTreeType` | `() => 'pine'` | `pine`, `oak`, `palm`, `birch` or `cherry`. |
| `getHeight` | `() => 10` | Total nominal height in metres. |
| `getTrunkHeightFraction` | `() => 0.35` | Trunk fraction, clamped to 0–1. Palm shafts extend into the crown. |
| `getTrunkRadius` | `() => 0.5` | Trunk base radius in metres. |
| `getCanopyRadius` | `() => 3` | Horizontal canopy scale, retaining the legacy approximate half-scale broadleaf radius. Palms and pines have their own silhouette envelopes. |
| `getTrunkColor` | `() => null` | Explicit bark color or the species default. |
| `getCanopyColor` | `() => null` | Explicit foliage color or the species/season default. Winter branches use bark color. Vertex tones multiply this color. |
| `getSeason` | `() => 'summer'` | `spring`, `summer`, `autumn` or `winter`. Winter removes deciduous foliage; pine and palm remain evergreen. |
| `getBranchLevels` | `() => 3` | Pine tier count, rounded and clamped to 1–5. |
| `getCrop` | `() => null` | Explicit crop configuration; the layer never invents seasonal yield. |
| `sizeScale` | `1` | Multiplier for tree and crop dimensions. |
| `windStrength` | `0` | Bend amplitude as a fraction of tree height. Zero stops continuous redraw; a value around `0.025` is a gentle breeze. |
| `windTime` | `null` | Wind time in seconds. `null` uses deck.gl's timeline; a number freezes the pose for controlled comparisons. |
| `shadowEnabled` | `true` | Cast shadows when enabled by the host `LightingEffect`. |

## Crops

`CropConfig` has `color`, `count`, `radius` and optional `droppedCount`. Radius is the actual sphere radius in metres. Counts are explicitly supplied, rounded down and clamped at zero. Broadleaf crops follow the shared outer crown envelope; palm crops cluster beneath the crown. Dropped spheres rest on the ground. Positions are deterministic, remain stable when counts grow, and picking returns the owning source tree. Attached crops share the tree's GPU bend; dropped crops remain still.

## Animation and shadows

Wind is implemented in GLSL and WGSL. Trunks, crowns, attached crops, picking and WebGL shadow passes use the same deformation. Time changes do not rebuild geometry, regroup data or regenerate instance attributes.

For WebGL shadows, supply a deck.gl `LightingEffect` with a `DirectionalLight` whose `_shadow` option is enabled, and a receiving ground surface. Shadows are an extra rendering pass. WebGPU shadow effects are not supported by deck.gl; Tree Lab disables that control on WebGPU.

## Migration

Remove `detail` from TreeLayer props and `TreeDetail` from type imports. Trunks and crowns now always use the former high-detail meshes. Legacy demo `detail` query parameters are ignored.

The legacy `@deck.gl-community/three` package has been removed from this repository. Replace its imports with `@deck.gl-community/layers`, including `TreeLayerProps`, `TreeType`, `Season` and `CropConfig`. Previously published package versions are unchanged. Three.js is used only by Tree Lab's frozen development fixture.

Native crowns and winter silhouettes deliberately differ from the original geometry. `CropConfig.radius` now matches its documented radius: older geometry rendered half that radius. Halve an existing crop radius to retain its old apparent size. Inspect your explicit seasonal foliage overrides, canopy sublayer overrides and custom winter branches when migrating; the native crown sublayer IDs include foliage/winter and tier information. Legacy species overrides such as `canopy-cherry` remain supported and apply after native defaults. Exact grouped sublayer IDs take precedence over species aliases. Override accessors receive the source tree and its original accessor context; parameters and update triggers merge by key.

[Source](https://github.com/visgl/deck.gl-community/tree/master/modules/layers/src/tree-layer)
3 changes: 2 additions & 1 deletion docs/modules/layers/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"modules/layers/api-reference/skybox-layer",
"modules/layers/api-reference/dependency-arrow-layer",
"modules/layers/api-reference/path-marker-layer",
"modules/layers/api-reference/path-outline-layer"
"modules/layers/api-reference/path-outline-layer",
"modules/layers/api-reference/tree-layer"
]
}
15 changes: 0 additions & 15 deletions docs/modules/three/README.md

This file was deleted.

154 changes: 0 additions & 154 deletions docs/modules/three/api-reference/tree-layer.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/modules/three/sidebar.json

This file was deleted.

11 changes: 11 additions & 0 deletions docs/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ Please refer the documentation of each module for detailed upgrade guides.

## Unreleased

- Remove `detail` from `TreeLayer` props and `TreeDetail` from type imports. Trunks and crowns
always use the former high-detail meshes; legacy demo `detail` query parameters are ignored.

- The `@deck.gl-community/three` compatibility package has been removed from the repository.
Replace its imports with `@deck.gl-community/layers`, including `TreeLayer`, `TreeLayerProps`,
`TreeType`, `Season` and `CropConfig`. Previously published versions are unchanged.
Existing TreeLayer documentation and Seasonal Farm URLs redirect to their new locations.
`CropConfig.radius` now renders the actual radius in metres; halve an existing radius to keep
its old apparent size. Review changed crowns, winter branches and canopy sublayer overrides
against the [TreeLayer migration notes](./modules/layers/api-reference/tree-layer.md#migration).

### `@deck.gl-community/editable-layers`

Edit modes now consistently accept `SimpleFeatureCollection`, which supports Point,
Expand Down
2 changes: 1 addition & 1 deletion docs/webgpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ deck.gl-community is adding WebGPU support incrementally while continuing to sup
| `@deck.gl-community/editable-layers` | GeoJSON paths, polygons, and edit handles | ✅ | ✅ | Browser-verified `EditableGeoJsonLayer` rendering in `ModifyMode`, including the WebGPU picking-width shader path. |
| `@deck.gl-community/editable-layers` | Editing and selection interactions | ✅ | 🚧 | Pointer, drag, snapping, and selection behavior still require browser interaction coverage on WebGPU. |
| `@deck.gl-community/basemap-layers` | `BasemapLayer` | ✅ | 🚧 | Support depends on the selected style's polygon, path, and label sublayers. |
| `@deck.gl-community/three` | `TreeLayer` | ✅ | ✅ | Browser-verified procedural Three.js geometry rendered through upstream `SimpleMeshLayer`. |
| `@deck.gl-community/layers` | `TreeLayer` | ✅ | ✅ | Native vis.gl meshes and GLSL/WGSL wind through `SimpleMeshLayer`. deck.gl shadow effects remain WebGL2-only. |
| `@deck.gl-community/leaflet` | Leaflet map overlay | ✅ | ❌ | A host-owned WebGL context cannot be switched to WebGPU. |
| `@deck.gl-community/bing-maps` | Bing Maps overlay | ✅ | ❌ | A host-owned WebGL context cannot be switched to WebGPU. |
| `@deck.gl-community/widgets` | `DeviceManagerController` and `DeviceTabsWidget` | ✅ | ✅ | Selects and attaches an independently managed real rendering device. |
Expand Down
Loading
Loading