Two problems with current approach (function-based imports):
- No defaults
- Can't reference them directly/declaratively.
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.
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?
TBD - more thought needed.