Skip to content

Commit d80a86f

Browse files
authored
Merge pull request #3343 from unjust/bezier_z_correction
3d rendered bezier curve args get overwritten, fixes #3344
2 parents e71b2cf + 6cdc70c commit d80a86f

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');
@@ -1076,15 +1075,14 @@ p5.RendererGL.prototype.bezier = function(
10761075
z4
10771076
) {
10781077
if (arguments.length === 8) {
1079-
x4 = x3;
10801078
y4 = y3;
1079+
x4 = x3;
1080+
y3 = z2;
10811081
x3 = y2;
1082-
y3 = x2;
1083-
x2 = z1;
10841082
y2 = x2;
1083+
x2 = z1;
10851084
z1 = z2 = z3 = z4 = 0;
10861085
}
1087-
10881086
var bezierDetail = this._pInst._bezierDetail || 20; //value of Bezier detail
10891087
this.beginShape();
10901088
for (var i = 0; i <= bezierDetail; i++) {

0 commit comments

Comments
 (0)