Skip to content

Commit 6cdc70c

Browse files
committed
reorder args to bezier so orig arg values arent overwritten
1 parent 3c8d95d commit 6cdc70c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/webgl/3d_primitives.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
'use strict';
10-
1110
var p5 = require('../core/main');
1211
require('./p5.Geometry');
1312
var constants = require('../core/constants');
@@ -1081,15 +1080,14 @@ p5.RendererGL.prototype.bezier = function(
10811080
z4
10821081
) {
10831082
if (arguments.length === 8) {
1084-
x4 = x3;
10851083
y4 = y3;
1084+
x4 = x3;
1085+
y3 = z2;
10861086
x3 = y2;
1087-
y3 = x2;
1088-
x2 = z1;
10891087
y2 = x2;
1088+
x2 = z1;
10901089
z1 = z2 = z3 = z4 = 0;
10911090
}
1092-
10931091
var bezierDetail = this._pInst._bezierDetail || 20; //value of Bezier detail
10941092
this.beginShape();
10951093
for (var i = 0; i <= bezierDetail; i++) {

0 commit comments

Comments
 (0)