Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pmndrs/uikit
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Jun 6, 2024
2 parents 6b8fdec + 429e6d4 commit cea65d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/vanilla.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion examples/vanilla/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cea65d1

Please sign in to comment.