Optional
canvas?: HTMLCanvasElementHTMLCanvasElement
Banuba Client token
Optional
locateWhere to find .wasm
and .data
files relative to the page running the script
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,
})
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
},
})
Optional
logger?: LoggerA custom logger instance, pass {}
to suppress all outputs
{ warn: console.warn, error: console.error }
Ordinary you won't use the option
Overrides internal
canvas
element used for WebGL rendering