Skip to content

Unclear console message if image in loadImage is not found #868

Closed
@eharkins100

Description

@eharkins100

Nature of issue?

  • Found a bug (more likely a user error by me)

  • Web browser and version: <Google Chrome | 72.0.3626.119 (Official Build) (64-bit)>

  • Operating System: <MacOSX Sierra 10.12>

  • Steps to reproduce this bug:

In openprocessing.org code editor, this code works the way I want it, but in the p5 editor, I get his console message:

Event {isTrusted: true, constructor: Object}

`var imgAA;
var imgBB;
var x = 100;
var y = 100;
var Xspeed = 4;
var Yspeed = 3.5;

function preload(){
imgAA = loadImage('aa.png');
imgBB = loadImage('bb.png');
}

function setup() {
createCanvas(600, 600);
background(100);
}

function draw() {
background(127);
image(imgAA, x, y, 100, 100);
image(imgBB, y, x, 100, 100);
x = x + Xspeed;
y = y + Yspeed;
if (x > width){
Xspeed = -4;
}
if (x < 0){
Xspeed = 4;
}
if (y > height){
Yspeed = -3.5;
}
if (y < 0){
Yspeed = 3.5;
}
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedWould love additional input or contributions!Priority:HighShould be addressed soon but not critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions