forked from supermedium/superframe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
106 changed files
with
887,265 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
gh-pages | ||
node_modules/ | ||
npm-debug.log | ||
examples/build.js | ||
examples/node_modules/ | ||
.sw[ponm] |
Submodule animation
added at
5be4ac
Submodule audio-visualizer
added at
1193a8
Submodule broadcast
added at
4fc209
Submodule entity-generator
added at
84ed3d
Submodule event-set
added at
385485
Submodule firebase
added at
a27792
Submodule layout
added at
b019a2
Submodule look-at
added at
18d3da
Submodule randomizer
added at
b44aec
Submodule redux
added at
e25fc6
Submodule template
added at
74b5b9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Kevin Ngo | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
## aframe-text-component | ||
|
||
A text geometry component for [A-Frame](https://aframe.io) VR. The text geometry | ||
component (shape) can be paired with the [material component](https://aframe.io/docs/components/material.html) (appearance). | ||
|
||
![screenshot](https://cloud.githubusercontent.com/assets/674727/11915616/59342aca-a663-11e5-9b6b-8a0b243fe5da.png) | ||
|
||
## Properties | ||
|
||
| Property | Description | Default Value | | ||
| -------- | ----------- | ------------- | | ||
| bevelEnabled | | false | | ||
| bevelSize | | 8 | | ||
| bevelThickness | | 12 | | ||
| curveSegments | | 12 | | ||
| font | | helvetiker | | ||
| height | | 0.05 | | ||
| size | | 0.5 | | ||
| style | | normal | | ||
| text | | None | | ||
|
||
### Usage | ||
|
||
#### Browser Installation | ||
|
||
Install and use by directly including the [browser files](dist): | ||
|
||
```html | ||
<head> | ||
<title>My A-Frame Scene</title> | ||
<script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script> | ||
<script src="https://rawgit.com/ngokevin/aframe-text-component/master/dist/aframe-text-component.min.js"></script> | ||
</head> | ||
|
||
<body> | ||
<a-scene> | ||
<a-entity text="text: What's up"></a-entity> | ||
</a-scene> | ||
</body> | ||
``` | ||
|
||
#### NPM Installation | ||
|
||
Install via NPM: | ||
|
||
```bash | ||
npm install aframe-text-component | ||
``` | ||
|
||
Then register and use. | ||
|
||
```js | ||
require('aframe'); | ||
require('aframe-text-component'); | ||
``` | ||
|
||
## Using Different Fonts | ||
|
||
The text component uses `typeface.js`, fonts defined in JS files for three.js. | ||
typeface fonts can be generated from regular fonts using this [typeface | ||
font generator](http://gero3.github.io/facetype.js/). You can also find some | ||
sample generated fonts, currently in the `examples/fonts` directory in the [three.js | ||
repository](https://github.com/mrdoob/three.js). | ||
|
||
By default, the text component only comes with one typeface font, Helvetiker | ||
(Regular). Each font is fairly large, from at least 60KB to hundreds of KBs. | ||
|
||
To include a font for use with the text component, append or require the | ||
typeface font *after* this component. This component uses `FontUtils` which | ||
should be initialized before adding fonts. | ||
|
||
For example in HTML: | ||
|
||
```html | ||
<html> | ||
<head> | ||
<title>My A-Frame Scene</title> | ||
<script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script> | ||
<script src="https://rawgit.com/ngokevin/aframe-text-component/master/dist/aframe-text-component.min.js"></script> | ||
<script src="myfont.typeface.js"></script> | ||
</head> | ||
<body> | ||
<a-scene> | ||
<a-assets> | ||
<a-mixin id="font" text="font: myfont"></a-mixin> | ||
</a-assets> | ||
<a-entity mixin="font" text="text: Hello"></a-entity> | ||
<a-entity mixin="font" text="text: World"></a-entity> | ||
</a-scene> | ||
</body> | ||
</html> | ||
``` | ||
|
||
Or in JS: | ||
|
||
```js | ||
require('aframe'); | ||
require('aframe-text-component'); | ||
require('./fonts/myfont.typeface'); | ||
``` |
Oops, something went wrong.