From e2234b8021d61a9f820c19a9c652f914988520ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cchrisshank=E2=80=9D?= Date: Fri, 20 Dec 2024 13:22:14 -0800 Subject: [PATCH] push gravity demo --- labs/folk-rope.ts | 3 +- ...event-propagators-with-device-gravity.html | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 website/canvas/event-propagators-with-device-gravity.html diff --git a/labs/folk-rope.ts b/labs/folk-rope.ts index 4b8c40b..5e4fab7 100644 --- a/labs/folk-rope.ts +++ b/labs/folk-rope.ts @@ -48,7 +48,8 @@ export class FolkRope extends FolkBaseConnection implements AnimationFrameContro `, ]; - #rAF = new AnimationFrameController(this); + // TODO: stop simulation when energy approaches 0 + #rAF = new AnimationFrameController(this, 10000); #svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); #path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); diff --git a/website/canvas/event-propagators-with-device-gravity.html b/website/canvas/event-propagators-with-device-gravity.html new file mode 100644 index 0000000..fd04998 --- /dev/null +++ b/website/canvas/event-propagators-with-device-gravity.html @@ -0,0 +1,73 @@ + + + + + + Event Propagator w/ device gravity + + + + + Hello World + + + + + + +