SplineCurve - Verge3D User Manual - Soft8Soft
Description: Learn how to use SplineCurve in your interactive 3D apps made with Verge3D

Curve →

# SplineCurve

Create a smooth 2D spline curve from a series of points. Internally this uses Interpolations.CatmullRom to create the curve.

## Code Example

`// create a sine-like wave const curve = new v3d.SplineCurve([ new v3d.Vector2(-4, 0), new v3d.Vector2(-2, 2), new v3d.Vector2(0, 0), new v3d.Vector2(2, -2), new v3d.Vector2(4, 0) ]); const points = curve.getPoints(50); const geometry = new v3d.BufferGeometry().setFromPoints(points); const material = new v3d.LineBasicMaterial({ color: 0xff0000 }); // create the final object to add to the scene const splineObject = new v3d.Line(geometry, material); app.scene.add(splineObject);`

## Constructor

### SplineCurve(points : Array)

points – An array of Vector2 points that define the curve.

## Properties

See the base Curve class for common properties.

### # .points : Array

The array of Vector2 points that define the curve.

## Methods

See the base Curve class for common methods.

## Source

For more info on how to obtain the source code of this module see this page.