Skip to content

@tripo3d/fingerprint / getWebGLContext

Function: getWebGLContext()

ts
function getWebGLContext(cache): CanvasContext | undefined;

Defined in: sources/webgl.ts:126

This function usually takes the most time to execute in all the sources, therefore we cache its result.

Warning for package users: This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.

Parameters

ParameterType
cache{ webgl?: { context: CanvasContext | undefined; }; }
cache.webgl?{ context: CanvasContext | undefined; }
cache.webgl.contextCanvasContext | undefined

Returns

CanvasContext | undefined

基于 MIT 协议发布(内部使用)