Skip to content

Commit

Permalink
work on consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Sep 14, 2016
1 parent 9b431f2 commit 88bbd32
Show file tree
Hide file tree
Showing 106 changed files with 887,265 additions and 117 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
logs
*.log
npm-debug.log*
.DS_Store

# Runtime data
pids
Expand Down Expand Up @@ -32,4 +33,4 @@ node_modules
# Optional REPL history
.node_repl_history

*.sw[pon]
*.sw[ponml]
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# k-frame
# kframe

![k-frame](https://cloud.githubusercontent.com/assets/674727/15790659/69860590-2987-11e6-9511-65c28e583c6f.png)
![kframe](https://cloud.githubusercontent.com/assets/674727/15790659/69860590-2987-11e6-9511-65c28e583c6f.png)

Kevin's collection of A-Frame add-ons, components, and helpers.
Kevin's collection of A-Frame components and scenes.

Features:
[VIEW DEMOS](https://ngokevin.github.io/kframe/)

- [aframe-audio-visualizer-components](https://github.com/ngokevin/aframe-audio-visualizer-components)
- [aframe-entity-generator-component](https://github.com/ngokevin/aframe-entity-generator-component)
- [aframe-event-set-component](https://github.com/ngokevin/aframe-event-set-component)
- [aframe-firebase-component](https://github.com/ngokevin/aframe-firebase-component)
- [aframe-layout-component](https://github.com/ngokevin/aframe-layout-component)
- [aframe-look-at-component](https://github.com/ngokevin/aframe-look-at-component)
- [aframe-randomizer-components](https://github.com/ngokevin/aframe-randomizer-components)
- [aframe-template-component](https://github.com/ngokevin/aframe-template-component)
- [aframe-text-component](https://github.com/ngokevin/aframe-text-component)
## Components

## Usage
- [animation](components/animation)
- [audio-visualizer](components/audio-visualizer)
- [broadcast](components/broadcast)
- [entity-generator](components/entity-generator)
- [event-set](components/event-set)
- [firebase](components/firebase)
- [layout](components/layout)
- [look-at](components/look-at)
- [randomizer](components/randomizer)
- [redux](components/redux)
- [template](components/template)
- [text](components/text)

Just include and go.
## Installation

K-Frame bundles most of the components together for easy usage. The `firebase`
component is excluded from this bundle.

### Browser

Expand All @@ -27,8 +33,8 @@ 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/k-frame/master/dist/k-frame.min.js"></script>
<script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script>
<script src="https://rawgit.com/ngokevin/kframe/master/dist/kframe.min.js"></script>
</head>

<body>
Expand All @@ -40,6 +46,14 @@ Install and use by directly including the [browser files](dist):

### npm

Or install from npm. Requiring K-Frame will automatically register the
components and systems.

```js
require('k-frame');
require('kframe');
```

### Installing Individual Components

For documentation on installing individual components, see the [documentation
pages](#components) for each component.
6 changes: 6 additions & 0 deletions components/.gitignore
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]
1 change: 1 addition & 0 deletions components/animation
Submodule animation added at 5be4ac
1 change: 1 addition & 0 deletions components/audio-visualizer
Submodule audio-visualizer added at 1193a8
1 change: 1 addition & 0 deletions components/broadcast
Submodule broadcast added at 4fc209
1 change: 1 addition & 0 deletions components/entity-generator
Submodule entity-generator added at 84ed3d
1 change: 1 addition & 0 deletions components/event-set
Submodule event-set added at 385485
1 change: 1 addition & 0 deletions components/firebase
Submodule firebase added at a27792
1 change: 1 addition & 0 deletions components/layout
Submodule layout added at b019a2
1 change: 1 addition & 0 deletions components/look-at
Submodule look-at added at 18d3da
1 change: 1 addition & 0 deletions components/randomizer
Submodule randomizer added at b44aec
1 change: 1 addition & 0 deletions components/redux
Submodule redux added at e25fc6
1 change: 1 addition & 0 deletions components/template
Submodule template added at 74b5b9
22 changes: 22 additions & 0 deletions components/text/LICENSE
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.

100 changes: 100 additions & 0 deletions components/text/README.md
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');
```
Loading

0 comments on commit 88bbd32

Please sign in to comment.