pmndrs / uikit

🎨 user interfaces for react-three-fiber
https://pmndrs.github.io/uikit/docs/
Other
2.6k stars 135 forks source link

Issues with the vanilla docs #99

Closed graemeniedermayer closed 1 month ago

graemeniedermayer commented 2 months ago

https://docs.pmnd.rs/uikit/getting-started/vanilla

There's a number of small fixes needed for the documentation.

  1. in the index.html file, root needs to be a canvas not a div.
const root = new Root(camera, renderer, undefined, {
    flexDirection: "row",
    padding: 10,
    gap: 10
})

should be something more like

const root = new Root(camera, renderer,  {
  flexDirection: 'row',
  gap: 30,
  width: 500,
  borderRadius: 10,
  padding: 10,
  alignItems: 'center',
  backgroundColor: 'red',
  overflow: 'scroll',
})

(Some of these options might be unnecessary but the first one created a ui that wasn't visible.)

The example here works much better than the documentation. https://github.com/pmndrs/uikit/tree/main/examples/vanilla

bbohlender commented 2 months ago

Thanks, would you like to fix them in a PR? :)

bbohlender commented 1 month ago

fixed in latest release