Skip to content

Commit

Permalink
docs: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
giulioz committed Jun 6, 2023
1 parent 67c6b2a commit 0c54c2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
storybook-static/
*.typeface.json
*.md
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,26 @@ function Text2D() {
text="Example text"
// An unique key for this instance
instanceKey="unique_key"

// Optional styling props
bold={false}
color={new Color('#ff0000')}
opacity={0.5}
outlineWidth={0.13}
outlineOpacity={0.4}
outlineColor={new Color('#0000ff')}

// Optional layouting props
alignX="left" // 'left' | 'center' | 'right'
alignY="top" // 'top' | 'middle' | 'bottom'
letterSpacing={32}
width={500}
lineHeight={10}
yShift={0}

// Gets called before updating, useful for applying imperative updates
onBeforeUpdate={updateFunction}

// You can also get a ref to apply imperative mutations
ref={textRef}
/>
Expand Down Expand Up @@ -107,13 +111,15 @@ function Text3DScene() {
<InstancedText
text="Example text"
font={styles[0]}

// Depth of the text geometry
thickness={1}
// Size of the text geometry
fontSize={1}

// Optional props
textAlign={TextAlignment.left}
color={new Color('#ff0000')}
color={new Color("#ff0000")}
opacity={0.8}

// Also accepts any Object3D props
Expand Down

0 comments on commit 0c54c2d

Please sign in to comment.