Skip to content

Comments

feat: add ColumnShapeExtension with per-instance bevel and radius support#5

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/add-column-shape-extension
Closed

feat: add ColumnShapeExtension with per-instance bevel and radius support#5
Copilot wants to merge 3 commits intomasterfrom
copilot/add-column-shape-extension

Conversation

Copy link

Copilot AI commented Feb 4, 2026

Background

Ports ExperimentalColumnLayer functionality from deck.gl-community#470 / deck.gl#9933 as an extension per Chris Gervant's recommendation.

Adds per-instance bevel shapes (dome, cone, flat) and radius scaling to ColumnLayer for hierarchical/tree visualizations.

Change List

  • modules/extensions/src/column-shape/column-shape-extension.ts — Extension class with getBevel and getRadius accessors
  • modules/extensions/src/column-shape/shader-module.ts — Shader injection for vertex position modification based on bevel params
  • modules/extensions/src/index.ts — Export new extension and types
  • test/modules/extensions/column-shape.spec.ts — Unit tests including edge cases (negative values, partial objects, zero radius)

Usage

import {ColumnLayer} from '@deck.gl/layers';
import {ColumnShapeExtension} from '@deck.gl/extensions';

new ColumnLayer({
  data: hierarchicalData,
  getPosition: d => d.position,
  getElevation: d => d.height,
  getRadius: d => d.radiusScale,  // Per-instance radius multiplier
  getBevel: d => {
    if (d.isLeaf) return 'dome';     // Rounded top
    if (d.isBranch) return 'cone';   // Pointed top
    return {segs: 5, height: 100, bulge: 0.2};  // Custom params
  },
  extensions: [new ColumnShapeExtension()]
});

Bevel types: 'flat' (default), 'dome', 'cone', or {segs, height, bulge} for full control.

Original prompt

Open up a PR with a new extension called ColumnShapeExtension that applies the changes intended in visgl/deck.gl-community#470 but as an extension rather than as a new layer - as recommended by Chris Gervant - reference this PR as well as the original PR. Were going full circle


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI added 2 commits February 4, 2026 21:21
…port

This extension adds per-instance bevel shapes (dome, cone, flat) and radius
scaling to ColumnLayer for hierarchical/tree visualizations.

Based on:
- visgl/deck.gl-community#470 (ExperimentalColumnLayer)
- visgl#9933 (Original getBevel & getRadius)

Following the recommendation from Chris Gervant to implement this as an
extension rather than a new layer.
Copilot AI changed the title [WIP] Add ColumnShapeExtension for proposed changes feat: add ColumnShapeExtension with per-instance bevel and radius support Feb 4, 2026
Copilot AI requested a review from charlieforward9 February 4, 2026 21:27
@charlieforward9
Copy link
Member

Superseded: visgl#10003

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.

2 participants