How do you declare the values of “assets”?
https://playcanvas.github.io/#/graphics/transform-feedback
https://playcanvas.github.io/#/graphics/particles-spark
Particles-spark’s example in TS show it is from pc.asset. How should I declare this variable to make the code work via html + js?
The canvas I declare as :
const canvas = document.getElementById(‘application-canvas’);
which provides a small black window to load the sample animations. However, the assets can’t seem to load.
I also checked the TS version of the sample and found it is declared as such:
function example(canvas: HTMLCanvasElement, assets: { spark: pc.Asset }):
How do I delcare this in JS so I can load it via HTML?