Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoniohof/aframe-text-texture-component
A text component for A-Frame that wraps THREE.TextTexture
https://github.com/antoniohof/aframe-text-texture-component
aframe material performance rendering sprite text texture threejs virtual-reality
Last synced: 4 months ago
JSON representation
A text component for A-Frame that wraps THREE.TextTexture
- Host: GitHub
- URL: https://github.com/antoniohof/aframe-text-texture-component
- Owner: antoniohof
- License: mit
- Created: 2018-10-29T20:20:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-16T09:04:44.000Z (10 months ago)
- Last Synced: 2024-09-27T16:40:58.292Z (4 months ago)
- Topics: aframe, material, performance, rendering, sprite, text, texture, threejs, virtual-reality
- Language: JavaScript
- Homepage:
- Size: 2.59 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## aframe-text-texture-component
A light text component for [A-Frame](https://aframe.io) that wraps
[THREE.TextTexture](https://github.com/SeregPie/THREE.TextTexture).
Attention: Only compatible with THREE.TextTexture version 18.8.6```https://unpkg.com/[email protected]/THREE.TextTexture.js```
* supports unicode
* supports outline
* supports padding, line height and text align
* supports transparency### Example
[Try it](https://antoniohof.github.io/aframe-text-texture-component/example/)### Usage
```html
My A-Frame Scene
```
### Parameters
```javascript
autoRedraw: {
default: true,
type: "boolean"
},
text: {
default: "",
type: "string"
},
textAlign: {
default: "center",
oneOf: ["center", "left", "right"],
type: "string"
},
textLineHeight: { default: 1 },
fontFamily: {
default: 'Open Sans',
type: "string"
},
fontSize: {
default: 60,
min: 1,
max: 128,
type: "int"
},
fontWeight: {
default: "normal",
oneOf: ["normal", "bold"],
type: "string"
},
fontVariant: {
default: "normal",
oneOf: ["normal", "small-caps"],
type: "string"
},
fontStyle: {
default: "normal",
oneOf: ["normal", "italic"],
type: "string"
},
padding: {
default: 0.25,
min: 0,
max: 1,
type: "number"
},
fillStyle: {
default: "#fff",
type: "color"
},
lineWidth: {
default: 0,
min: 0,
max: 0.5,
type: "number"
},
strokeStyle: {
default: "#fff",
type: "color"
},
opacity: {
default: "1",
min: 0,
max: 1,
type: "number"
},
scale: {
default: 1,
type: "number"
}
```