Home > @modelo.io/api > MetaBall

MetaBall class

Render a texture with meta-balls for a bunch of points over the XY plane.

Signature:

export default class MetaBall extends Visualize 

Constructors

ConstructorDescription
(constructor)(renderScene)Construct a metaball object.

Methods

MethodDescription
setParameter(name, value)Set the rendering parameters of bar chart visualization.

Example

const metaball = new Modelo.Scene3D.Visualize.MetaBall(viewer.getRenderScene());
metaball.setParameter("points", data);
metaball.setParameter("width", 512);
metaball.setParameter("height", 512);
metaball.setParameter("contour", true);

var groundPlane = new Modelo.Scene3D.Pawn("ground1", viewer.getResourceManager(), viewer.getMaterialManager());
groundPlane.createTexturedQuad([metaball.getTexture()]);
groundPlane.setScaling(40, 40, 1.0);
groundPlane.setTranslation(0, 0, 1.01);
viewer.getScene().addPawn(groundPlane);