Skip to main content

<pc-module>

The <pc-module> tag is used to load a WebAssembly module.

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

Attributes

AttributeDescription
nameThe name of the module. This is used to reference the module in scripts.
glueThe path to the glue code for the module.
wasmThe path to the WASM file for the module.
fallbackThe path to the fallback (asm.js) code for the module (for when WebAssembly is not supported).

Example

<pc-app>
<!-- Load the ammo.js module -->
<pc-module name="ammo" glue="ammo.js" wasm="ammo.wasm.wasm" fallback="ammo.wasm.js"></pc-module>
</pc-app>

JavaScript Interface

You can programmatically create and manipulate <pc-module> elements using the ModuleElement API.