How do I use a HTML asset

thanks for the replies!
as I am fairly new to playcanvas, im not sure how I would go about implementing a HTML asset into my project? I allready looked in the manual, but im not sure - do I need to activate it through another script?

thanks!

Have you tried looking at these project samples? https://developer.playcanvas.com/en/tutorials/?tags=html

yes thanks, ill have a look.
however, I had a look at the html script and was wondering how exactly to load my own image. in this case a leaf.

this is how it looks in the script
app.assets.loadFromUrl(’…/assets/textures/snowflake.png’, ‘texture’, function (err, asset) {

would i just reference an asset I loaded into my project or would I have to insert a URL or how is it to be understood?

thanks!

If the images s part of the project and you want to use it in the HTML, you will have to replace the URL at runtime by referencing the asset (script attributes, app.assets.find*) and use getFileUrl https://developer.playcanvas.com/en/api/pc.Asset.html#getFileUrl

If the image is remote / hosted on the server, you just set the image src as normal.

thanks, but Im still quite lost. the phrase that I posted says /assets/textures/snowflake.png - would I then just load a leaf image into my project and insert “leaf.png” into the code?

im confused as to what theese dots … means

Can you create/share an example project of what you are trying to do? That will us see how you are trying to put it together.

mm its a bit too complicated to share at this point haha.
basically I just want leaves falling from the sky in a 3d environment, that you can walk in between.

Use a particle mesh effect that moves with the camera?

eg: https://playcanvas.com/editor/scene/971570