Skip to content

[p5.js 2.0+ Bug Report]: Loading indication #8922

@ksen0

Description

@ksen0

Most appropriate sub-area of p5.js?

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

p5.js version

2.0+

Web browser and version

any

Operating system

any

Steps to reproduce this

Steps:

  1. Run the below code
  2. Observe that while loading, the canvas is blank with no feedback to user at all (this is a regression compared to p5.js version 1)

Snippet:

// for p5.js versions 2.0 or later only
async function setup() {	
  createCanvas(400, 400);

  // Delay to simulate loading large files (for demo only, not actual usage)
  await fakeLoad(7000);
 
  // Your usual setup things below
  background("#EB5580");
  fill(255);
  circle(width / 2, height / 2, 100);
}

function draw() {
  circle(mouseX, mouseY, 20);
}

async function fakeLoad(delay) {
  await new Promise(resolve => setTimeout(resolve, delay));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions