Skip to content

weird behaviour of pmouseX/Y combined with mouseX/Y  #1035

@v-k-

Description

@v-k-

This simple code produces the result in the image below.

function setup() {
  createCanvas(windowWidth, windowHeight);
}

function mouseMoved() {
    if(pmouseX !=0){
    line(pmouseX, pmouseY, mouseX, mouseY);
    }
}

function windowResized() {
    resizeCanvas(windowWidth, windowHeight);
}

There are a lot of lines ending in points where mouse never was. The ones looking like a "hair" or a dragon's scale :) It should be pretty obvious running the code. The same code in java does not produces this artifacts.

I found that here. And isolated in the code above. In this page it happens rarely and in a different pattern. several lines are draw form the same start point. The pink line in the second picture below.

screen shot 2015-10-25 at 12 15 31 am

___21

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