Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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"
}
```