Function InstallHtmlInCanvasPolyfill
-
Parameters
- options: IInstallHtmlInCanvasPolyfillOptions = {}
optional installation configuration
Returns Promise<boolean>
a promise that resolves to true when the polyfill was installed, false otherwise
Deprecated
three-html-renderimplements an outdated version of the HTML-in-Canvas proposal, and polyfills installed through this function makeHtmlTextureuse legacy APIs. Import an up-to-date polyfill directly instead, before creating the engine, for exampleimport "@underglass/html-in-canvas-polyfill/auto";.HtmlTextureand the interaction managers detect such a polyfill like a native implementation. - options: IInstallHtmlInCanvasPolyfillOptions = {}
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
forceis set or the?polyfillHICURL flag is present.