Skip to main content

<webview>

Loads a web page into a 3D object via an iframe.

Props

PropTypeDescriptionDefault
nameStringName of the webview.
positionArrayPosition of the webview.[0,0,0]
rotationArrayRotation of the webview.[0,0,0]
widthNumberWidth of the webview.1
heightNumberHeight of the webview.1
srcStringURL of the web page to load.
factorNumberFactor to scale the webview by.100
onPointerDownFunctionCallback function when the webview is clicked.

Ref

FieldDescription
activate()Activates the webview.
deactivate()Deactivates the webview.
isActiveWhether the webview is active.
getPosition(vec3)Gets the position of the webview.
setPosition(vec3)Sets the position of the webview.
setPositionX(x)Sets the x position of the webview.
setPositionY(y)Sets the y position of the webview.
setPositionZ(z)Sets the z position of the webview.
getRotation(eul)Gets the rotation of the webview.
setRotationX(x)Sets the x rotation of the webview.
setRotationY(y)Sets the y rotation of the webview.
setRotationZ(z)Sets the z rotation of the webview.
getWorldPosition(vec3)Gets the world position of the webview.
getWorldRotation(eul)Gets the world rotation of the webview.
getWorldDirection(vec3)Gets the world direction of the webview.

Notes

  • Currently unavailable in VR mode.
  • Many websites block iframe. If you fail to load a page, this is likely the cause.