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
- Host: GitHub
- URL: https://github.com/evanbacon/expo-three-text
- Owner: EvanBacon
- Created: 2017-10-16T01:40:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T05:43:26.000Z (about 8 years ago)
- Last Synced: 2025-03-19T07:32:31.414Z (over 1 year ago)
- Topics: ar, arkit, javascript, react-native, threejs
- Language: JavaScript
- Size: 7.94 MB
- Stars: 19
- Watchers: 4
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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/)