Player
API

API

Prototype

Namedescriptiontypedefaultrequired
fileUrl.iplayer file addressstringtrue
showHeaderWhether to show the headerbooleanfalsefalse
showAnimationPanelWhether to show the animation debugging panelbooleanfalsefalse
onClickClick event callback(params: ClickParams) => voidfalse
onReadyReady callback() => voidfalse
interface ClickParams {
  item: Element3D | null;
  event: MouseEvent;
  data: OptionsType | null;
}

Instance

Namedescriptiontype
getElementByKeyGet an element by unique identifier(key: string) => Element3D
getElementsByNameGet multiple elements by name(name: string) => Element3D[]
getAllElementsGet all elements of the current scene (excluding subscenes)() => Element3D[]
showTipsShow element floating tips(show: boolean) => void