From f4848a6dbc622783015cbc6f202859db548f4c77 Mon Sep 17 00:00:00 2001 From: Noeri Huisman <8823461+mrxz@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:19:21 +0200 Subject: [PATCH] fix: use lowercase eventnames in vanilla example and docs --- docs/getting-started/vanilla.md | 4 ++-- examples/vanilla/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/getting-started/vanilla.md b/docs/getting-started/vanilla.md index 3faf0857..19a26efa 100644 --- a/docs/getting-started/vanilla.md +++ b/docs/getting-started/vanilla.md @@ -11,10 +11,10 @@ The vanilla version of uikit allows to build user interfaces with plain Three.js The vanilla version of uikit (`@pmndrs/uikit`) is decoupled from react. Therefore features such providing defaults via context is not available. Furthermore, no event system is available out of the box. For interactivity, such as hover effects, developers have to attach their own event system by emitting pointer events to the UI elements: ```js -uiElement.dispatchEvent({ type: 'pointerOver', target: uiElement, nativeEvent: { pointerId: 1 } }) +uiElement.dispatchEvent({ type: 'pointerover', target: uiElement, nativeEvent: { pointerId: 1 } }) ``` -Aside from interacitivty and contexts, every feature is available. +Aside from interactivity and contexts, every feature is available. ## Building a user interface with `@pmndrs/uikit` diff --git a/examples/vanilla/index.ts b/examples/vanilla/index.ts index 071a5222..98dc20cf 100644 --- a/examples/vanilla/index.ts +++ b/examples/vanilla/index.ts @@ -45,7 +45,7 @@ const x = new Container({ justifyContent: 'center', onSizeChange: console.log, }) -setTimeout(() => x.dispatchEvent({ type: 'pointerOver', target: x, nativeEvent: { pointerId: 1 } } as any), 0) +setTimeout(() => x.dispatchEvent({ type: 'pointerover', target: x, nativeEvent: { pointerId: 1 } } as any), 0) const img = new Image({ src: 'https://picsum.photos/300/300', borderRadius: 1000,