@sirhc77/canvas-math-kit
Version:
A lightweight, interactive canvas-based vector visualizer for math, linear algebra, and ML education. Built with React + TypeScript.
9 lines (8 loc) • 319 B
TypeScript
import React from 'react';
/**
* Resizes the canvas to fill its container and scales the drawing context
* to match the device's pixel ratio. Re-runs on window resize.
*/
export declare function useCanvasSize(canvasRef: React.RefObject<HTMLCanvasElement | null>, { autoScale }?: {
autoScale?: boolean;
}): void;