Skip to content

Typo on mouseWheel sample code #7613

@swastikCommits

Description

@swastikCommits

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

Latest

Web browser and version

Brave 1.76.73

Operating system

Windows 11 Version 24H2 (Build 26100.3323)

Steps to reproduce this

In the first example of the mouseWheel function, the code is intended to draw a circle in the center of the canvas and increase the circle's size when the user scrolls the mouse wheel. However, the code contains a typo, as it mistakenly changes the circle's X coordinate instead.

Steps:

  1. Go to p5.js.org
  2. Then go to reference and search for mouseWheel()
  3. The first example

Snippet:

//Draw the circle
circle(circleSize, 50, 50);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions