Skip to content

3d rendered bezier curve args get overwritten #3344

@unjust

Description

@unjust

Reorder argument setting to bezier in 3d mode, so original arg values aren't overwritten.

In the code below:
https://github.com/processing/p5.js/blob/master/src/webgl/3d_primitives.js#L1088
x2 should = z1, but assigning y2 = x2 afterwards is basically assigning y2 = z1.

Demoing the bug:

screen shot 2018-11-26 at 10 12 09 am

Having a bezier with all z coords set to 0 should result in the same curve as a bezier with no z;

Nature of issue?

  • [x ] Found a bug
  • Existing feature enhancement
  • New feature request

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Which platform were you using when you encountered this?

  • Mobile/Tablet (touch devices)
  • Desktop/Laptop
  • Others (specify if possible)

Details about the bug:

  • p5.js version:
  • Web browser and version:
  • Operating System:
  • Steps to reproduce this:

Feature enhancement details:

New feature details:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions