メインコンテンツまでスキップ

<pc-asset>

The <pc-asset> tag is used to define an asset.

注記
  • It must be a direct child of <pc-app>.

Attributes

属性 (Attribute)説明
idThe ID of the asset. This is used to reference the asset in scripts.
srcThe path to the asset.
preloadValueless attribute. If present, the asset is loaded immediately.
typeThe type of asset. If not specified, the type is inferred from the file extension. Can be: audio, binary, css, container, gsplat, html, json, script, shader, text, texture.

<pc-app>
<pc-asset id="checkerboard" src="assets/textures/checkerboard.png" preload></pc-asset>
</pc-app>

JavaScript Interface

You can programmatically create and manipulate <pc-asset> elements using the AssetElement API.