Optional
Ordinary you won't use the option
Overrides internal canvas element used for WebGL rendering
canvas
HTMLCanvasElement Copy
HTMLCanvasElement
Banuba Client token
Where to find .wasm and .data files relative to the page running the script
.wasm
.data
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: "static/webar/",}) Copy
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: "static/webar/",})
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: (fileName) => "static/webar/" + fileName,}) Copy
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: (fileName) => "static/webar/" + fileName,})
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: { "BanubaSDK.data": "static/webar/BanubaSDK.data", "BanubaSDK.wasm": "static/webar/BanubaSDK.wasm", "BanubaSDK.simd.wasm": "static/webar/BanubaSDK.simd.wasm", // .simd.wasm is optional },}) Copy
const player = await Player.create({ clientToken: "xxx-xxx-xxx", locateFile: { "BanubaSDK.data": "static/webar/BanubaSDK.data", "BanubaSDK.wasm": "static/webar/BanubaSDK.wasm", "BanubaSDK.simd.wasm": "static/webar/BanubaSDK.simd.wasm", // .simd.wasm is optional },})
A custom logger instance, pass {} to suppress all outputs
{}
{ warn: console.warn, error: console.error } Copy
{ warn: console.warn, error: console.error }
Ordinary you won't use the option
Overrides internal
canvaselement used for WebGL rendering