INNER CODE UNIT · JavaScript

captureWithSpectorAsync

NeoAxis/NeoAxisEngine · Project/Sources/NeoAxis.Player.Web/wwwroot/main.js:99

const captureWithSpectorAsync = async () =>
{
	if (!allowSpector)
		return;

	const instance = await initializeSpectorAsync();
	if (instance !== null && canvas !== null)
		instance.captureCanvas(canvas);
}

globalThis.neoAxisSpector =
{
	enable: async () => allowSpector ? await initializeSpectorAsync() : null,
	capture: async () => { if (allowSpector) await captureWithSpectorAsync(); }
};

if (allowSpector)
{

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…