INNER CODE UNIT · JavaScript

width

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

			const width = Math.round(rect.right * devicePixelRatio) - Math.round(rect.left * devicePixelRatio);
			const height = Math.round(rect.bottom * devicePixelRatio) - Math.round(rect.top * devicePixelRatio);

			return { width: Math.max(1, width), height: Math.max(1, height) };
		}

		const applyCanvasSize = (width, height) =>
		{
			width = Math.max(1, Math.round(width));
			height = Math.max(1, Math.round(height));

			const fullscreenEnabled = document.fullscreenElement != null;

			if (width === currentWidth && height === currentHeight && fullscreenEnabled === currentFullscreen)
				return;

			currentWidth = width;
			currentHeight = height;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…