spline: add catmull-rom demo

This commit is contained in:
2026-08-15 13:39:47 +02:00
parent 8714bd5580
commit f2222079c1
7 changed files with 135 additions and 29 deletions
+2 -2
View File
@@ -91,8 +91,8 @@ function init() {
if (!canvas) throw new Error("unable to get canvas HTML element");
const ctx = canvas.getContext("2d") as CanvasRenderingContext2D | null;
if (!ctx) throw new Error("unable to get canvas 2D context");
ctx.canvas.width = ctx.canvas.clientWidth;
ctx.canvas.height = ctx.canvas.clientHeight;
ctx.canvas.width = ctx.canvas.clientWidth;
ctx.canvas.height = ctx.canvas.clientHeight;
canvas.onmousemove = (evt) => {
const {clientX, clientY} = evt;