How to use the Curve function from three

Find comprehensive JavaScript three.Curve code examples handpicked from public code repositorys.

6
7
8
9
10
11
12
13
14
15

this.linesAdded = [];

THREE.Object3D.call(this);

var KnotCurve = THREE.Curve.create(

        function() {

        },
fork icon0
star icon7
watch icon1

1
2
3
4
5
6
7
8
9
var mag = require('vectors/mag')(3)
var hexStringFromSphericalCoords = require('./../services/hex-string-from-spherical-coords')

// TODO: give to world
var generateFiber = function (sphericalCoords) {
  var fiber = new THREE.Curve()

  fiber.getPoint = function (t) {
    var eta = sphericalCoords.eta, phi = sphericalCoords.phi, theta = 2 * Math.PI * t
fork icon0
star icon3
watch icon4

+ 3 other calls in file

86
87
88
89
90
91
92
93
94
    bottomPoints.push(new THREE.Vector2(x,z));
    console.log(x,y,z);
    //bottomPoints.push([x,y]);
  };
}
//const bottomCurve = new THREE.Curve(bottomPoints);
//const bottomShape = new THREE.Shape(bottomCurve);
//var a = THREE.ShapeUtils.area(bottomPoints);
//const unique = [...new Set(bottomPoints.map(item => item))]
fork icon0
star icon0
watch icon0

146
147
148
149
150
151
152
153
154
155
rightEye.position.z += 1;
head.add(rightEye);
camera.position.z = 10;

function EllipticCurve() {
  THREE.Curve.call( this );
}

EllipticCurve.prototype = Object.create( THREE.Curve.prototype );
EllipticCurve.prototype.constructor = EllipticCurve;
fork icon0
star icon0
watch icon1

+ 7 other calls in file

Other functions in three

Sorted by popularity

function icon

three.Vector3 is the most popular function in three (22341 examples)