question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@mrdoob @alteredq

I just wrote some classes for curve, still thinking/in-the-midst of implementing them in Path.

https://github.com/zz85/three.js/blob/b287fd1d8629af9cd93ff102d0446657cfd9184b/src/extras/geometries/Curve.js

Basically, any line can subclass curve, for right now I have Straight(Line)Curve, QuadraticBezierCurve, CubicBezierCurve, SplineCurve

Sub classes usually implements

getPoint: function ( t /* between 0 .. 1 */) 

but inherits the common methods

getLength: function () {
getLengths: function (divisions) {
getPoint: function ( t /* between 0 .. 1 */) {
getPointAt: function ( u /* between 0 .. 1 */) {
getPoints: function (divisions) {
getSpacedPoints: function (divisions) {
getUtoTmapping: function (u, distance) {

soon, path.getPointAt(t) would call its curves getPointAt internally…

any thoughts or comments for this?

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

2reactions
alteredqcommented, Aug 10, 2011

Nice one, now we can make procedurally generated amusement park entrances 😉

0reactions
zz85commented, Oct 4, 2011

opps. curve.points is currently not initialized. you might have to do

var points = [];
points.push( new THREE.Vector( 0, 0, 100 ) );
points.push( new THREE.Vector( 0, 100, 100 ) );
points.push( new THREE.Vector( 100, 0, 100 ) );
points.push( new THREE.Vector( 100, 100, 100 ) );
var curve = new THREE.SplineCurve3( points );
curve.getPointAt( 0.5 );

or

var curve = new THREE.SplineCurve3([]);
curve.points.push( new THREE.Vector( 0, 0, 100 ) );
curve.points.push( new THREE.Vector( 0, 100, 100 ) );
curve.points.push( new THREE.Vector( 100, 0, 100 ) );
curve.points.push( new THREE.Vector( 100, 100, 100 ) );
curve.getPointAt( 0.5 );

for now

Read more comments on GitHub >

github_iconTop Results From Across the Web

Curves: Women's Health & Fitness Clubs
Curves has helped women around the world get healthier and stronger with our unique fitness solution, in a non-intimidating small group studio setting....
Read more >
Curves International - Wikipedia
Curves International, also known as Curves for Women, Curves Fitness, or just Curves, is an international fitness franchise co-founded by Gary and Diane ......
Read more >
Curves - YouTube
Curves is one of the largest chains of gyms for women in the world and is famous for its 30-minute circuit that works...
Read more >
Curve Definition & Meaning - Merriam-Webster
a distribution indicating the relative performance of individuals measured against each other that is used especially in assigning good, medium, ...
Read more >
Manage Your Organization as a Portfolio of Learning Curves
As people develop competence in a new domain of expertise, they move along an S Curve: Growth is slow and effortful at the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found