Doc > Nodes > SOP > Add

Doc > Nodes > SOP > Add

Adds points or creates lines.


The add node can be used to add a single or multiple points. If given points as input, it can also connect those points with a line.


Name Type Description
createPoint boolean toggle to create points
pointsCount integer define the number of points to create
position vector3 the position of the created points
connectInputPoints boolean toggle on to connect the points from the input geometry
connectToLastPoint boolean check if the last point is connected

Edit code in JsFiddle , Codepen , view in a new tab or Open in the Editor

	// create a scene
const scene = new PolyScene();
const root = scene.root();

// create an add node
const geo = root.createNode('geo');
const add = geo.createNode('add');

// let's add a material so we can actually see the point
const materials = root.createNode('materialsNetwork');
const points = materials.createNode('points');
points.p.color.set([0, 0, 1]);
// assign the material
const material = geo.createNode('material');
material.setInput(0, add);

// create a camera
const perspectiveCamera1 = root.createNode('perspectiveCamera');
perspectiveCamera1.p.t.set([5, 5, 5]);
// add orbitControls
const events1 = perspectiveCamera1.createNode('eventsNetwork');
const orbitsControls = events1.createNode('cameraOrbitControls');

// mount the viewer
const element = document.getElementById('app');
Is this doc helpful/not helpful? Is there any information you would like that is not available? Don't hesitate to get in touch with any question or feedback, either by email, on Discord or the forum.