michael / unveil

A data-driven visualization toolkit
Other
236 stars 14 forks source link

Add API for manipulating the SceneGraph #5

Open michael opened 14 years ago

michael commented 14 years ago

E.g.

// Remove a specific node
scene.remove('frank');

// Remove all actors with an x-value greater than 10
scene.remove(function(a) {return a.properties.x > 10); });

// Replace a certain actor with another one
scene.replace('frank', new uv.Label({text: 'John'});
michael commented 14 years ago

With the latest commit I've added Actor#remove to remove child nodes either by id, or using a matcher function.