Skip to content

Conversation

@sankhesh
Copy link
Collaborator

@sankhesh sankhesh commented Nov 3, 2025

This change fixes an issue where setting different attributes after initializing the dataset causes the active attributes to be retained from previous dataset state.

Context

When dynamically changing TubeFilter properties at runtime, tubes with colormaps lose their colors and render as solid.

Steps to Reproduce

  1. Open the official TubeFilter example: https://kitware.github.io/vtk-js/examples/TubeFilter.html
  2. Observe the initial tubes with proper colormap (red and yellow tubes) ✅
  3. Modify any tube property using the controls (Number of Sides, Radius, etc.) ❌
  4. Bug: Tubes lose their colors and become solid white/gray
image

Results

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

This change fixes an issue where setting different attributes after
initializing the dataset causes the active attributes to be retained
from previous dataset state.
@sankhesh sankhesh requested a review from finetjul November 3, 2025 02:54
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

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

LGTM.
Did you check that your dataset does not get bigger and bigger because new arrays get added without being removed when properties are changed ?

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