Skip to content

Commit

Permalink
fix: uikit vanilla README
Browse files Browse the repository at this point in the history
  • Loading branch information
bbohlender committed Aug 9, 2024
1 parent 923f6fe commit 971c77e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/uikit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,28 @@ const canvas = document.getElementById('root') as HTMLCanvasElement

const renderer = new WebGLRenderer({ antialias: true, canvas })

const root = new Root(camera, renderer, undefined, {
const root = new Root(camera, renderer, {
flexDirection: "row",
padding: 10,
gap: 10
gap: 10,
width: 1000,
height: 500
})
scene.add(root)
const c1 = new Container(root, {
const c1 = new Container({
flexGrow: 1,
backgroundOpacity: 0.5,
hover: { backgroundOpacity: 1 }
backgroundColor: "red"
})
const c2 = new Container(root, {
root.add(c1)
const c2 = new Container({
flexGrow: 1,
backgroundOpacity: 0.5,
hover: { backgroundOpacity: 1 },
backgroundColor: "blue"
})
root.add(c2)

renderer.setAnimationLoop(animation)
renderer.localClippingEnabled = true
Expand Down

0 comments on commit 971c77e

Please sign in to comment.