Skip to content

Create a React hook for more easily working with the typeface API and react-three-fiber #3

Description

@johno

The hook would automatically request typeface data from the API, return fonts from the font loader, and a text component:

const Demo = () => {
  const { fonts, Text } = useTypeface('recursive')

  return (
    <Canvas>
      <ambientLight />
      <pointLight position={[10, 10, 10]} />
      <Text style="normal" weight={400} color="tomato">Hello, world!</Text>
    </Canvas>
  )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions