Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BezierPatch init issue #28

Closed
jasperSpeicher opened this issue Feb 22, 2014 · 1 comment
Closed

BezierPatch init issue #28

jasperSpeicher opened this issue Feb 22, 2014 · 1 comment

Comments

@jasperSpeicher
Copy link

It looks like maybe the second level of arrays in the 2d array also needs to be initialized before they are accessed. otherwise they are undefined.

var BezierPatch = function(points){
this.points = (points === undefined)?[] : points;
for (var i = 0; i < 4; i++) {
for (var j = 0; j < 4; j++) {
this.points[i][j] = new Vec3D();
}
}
};

hapticdata added a commit that referenced this issue Mar 3, 2014
@hapticdata
Copy link
Owner

thank you for bringing this to my attention. I have fixed the issue with the constructor as well as another problem with BezierPatch#computePointAt.

I will close this issue once merged into master and released.

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants