An open API service indexing awesome lists of open source software.

https://github.com/evanbacon/expo-three-text


https://github.com/evanbacon/expo-three-text

ar arkit javascript react-native threejs

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# Expo Three Text

Example of using text in Expo

* expo: https://exp.host/@bacon/3D-text
* snack: https://snack.expo.io/@bacon/three-simple-text

### Example:

Convert your fonts to three.js text json with this tool: https://gero3.github.io/facetype.js/

```js
const textMesh = new TextMesh();
textMesh.material = new THREE.MeshPhongMaterial({ color: 0x056ecf });
textMesh.update({
text: 'Hey There :)',
font: require('./three_fonts/neue_haas_unica_pro_medium.json'), // This accepts json, THREE.Font, or a uri to remote THREE.Font json
});
```

### Links

* [Three.js TextBufferGeometry Docs](https://threejs.org/docs/#api/geometries/TextBufferGeometry)
* [Three.js TextGeometry source](https://github.com/mrdoob/three.js/blob/master/src/geometries/TextGeometry.js)
* [Web Demo](https://threejs.org/examples/webgl_loader_ttf.html)
* [Expo Demo](https://exp.host/@bacon/3D-text)
* [Expo Snack](https://snack.expo.io/@bacon/three-simple-text)
* [Font Converter](https://gero3.github.io/facetype.js/)