API

Function InstallHtmlInCanvasPolyfill

  • Lazily installs the WICG HTML-in-Canvas polyfill (three-html-render) so that HtmlTexture and the interaction managers work in browsers that do not yet ship the native API.

    The polyfill is an optional dependency: it is imported on demand and never bundled into Babylon. When the browser already supports the API natively, this is a no-op unless force is set or the ?polyfillHIC URL flag is present.

    Parameters

    Returns Promise<boolean>

    a promise that resolves to true when the polyfill was installed, false otherwise