flatpickles / sketchbook

Sketchbook is a forkable development environment for HTML canvas artwork.
https://skbk.cc/
MIT License
7 stars 5 forks source link

Improved asset import parameters #234

Open flatpickles opened 11 months ago

flatpickles commented 11 months ago

Two problems with current approach (function-based imports):

A better design will solve both these problems. Maybe a helper class that can be instantiated in the parameter declaration?

assetImport = new ImageImport("/assets/default.png");

update() {
    ctx?.drawImage(assetImport.image, 0, 0);
}

TBD - more thought needed.