Skip to content

Commit

Permalink
add travis badge, sweep readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ngokevin committed Dec 19, 2015
1 parent a269b7f commit 82ad95f
Showing 1 changed file with 26 additions and 57 deletions.
83 changes: 26 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,34 @@
# A-Frame Core

A DOM-based [Entity-Component System](https://en.wikipedia.org/wiki/Entity_component_system) to declaratively create 3D and VR worlds in the browser.
![travis](https://travis-ci.org/aframevr/aframe-core.svg)

> This library is specific to the core A-Frame library. For more information about the A-Frame project as a whole, head over to [the A-Frame site](https://aframe.io) or [the `aframe` repo](https://github.com/aframevr/aframe/).
> There are currently plans for this repository to be the canonical [`aframe`](https://github.com/aframevr/aframe).
## Entity-Component System
A-Frame is a library for creating virtual reality web experiences.

[Entity-Component System](https://en.wikipedia.org/wiki/Entity_component_system) is an architectural pattern commonly used in game engines such as Unity, PlayCanvas, an Unreal Engine 4+.
- **Virtual Reality**: Drop in the library and have a WebVR scene within a few lines of markup.
- **Based on the DOM**: Manipulate with JavaScript, use with your favorite [libraries and frameworks](https://github.com/aframevr/awesome-aframe).
- **[Entity-Component System](https://aframe.io/docs/core/)**: Use the entity-component system for better composability and flexibility.

There's only one basic element called an **entity** that defines a scale, a position, and a rotation in the scene. **Components** encapsulate logic and data that can be attached to entities to extend their functionality, appearance, and behavior. In A-Frame, **entities** are represented by `<a-entity>` DOM __elements__ and **components** as their __attributes__. This is what a simple scene with a cube and a camera looks like:
Find out more:

```html
<a-scene>
<a-entity camera="fov: 45"></a-entity>
<a-entity position="0 0 -10" rotation="45 30 0"
geometry="primitive: box; height: 4; width: 4; depth: 4"
material="color: green"></a-entity>
</a-scene>
```
- [Guide](https://aframe.io/docs/guide/)
- [Docs](https://aframe.io/docs/core/)
- [Examples](https://aframe.io/examples/)

## Usage
### Usage

__NOTE:__ For folks creating scenes and third-party components and elements, we recommend getting started by instead using the [__`aframe`__ library](https://github.com/aframevr/aframe/), a set of core resuable elements.

Proceed below if you would like to use the minimal set of primitive components and elements available here in __`aframe-core`__.

### CodePen

If you want to get started immediately, just fire up __[this CodePen example scene](http://codepen.io/team/mozvr/pen/BjygdO?editors=100)__!

### Downloads

To get started, simply include these files in your project:

* [`aframe.min.js`](https://aframevr.github.io/aframe/dist/aframe.min.js)

Or if you'd prefer the unminified version for local development (with source maps):

* [`aframe-core.js`](dist/aframe-core.js)

__Also, be sure to check out these awesome examples:__

* [__`aframe-core`__ examples](https://aframevr.github.io/aframe-core/examples/) ([source](https://github.com/aframevr/aframe-core/tree/master/examples/))
* [__`aframe`__ examples](https://aframevr.github.io/aframe/examples/) ([source](https://github.com/aframevr/aframe/tree/master/examples/))

### npm

First install from npm:
Install from npm:

npm install aframe-core

And in your Browserify/Webpack modules, simply require the module:
Then require:

require('aframe-core')
require('aframe-core');

## Local installation and development
## Local Installation and Development

Alternatively, you can clone this repository to work locally on this project.
To work locally:

git clone https://github.com/aframevr/aframe-core.git
cd aframe-core
Expand All @@ -68,30 +40,29 @@ To start the local development server:

And fire up __[http://localhost:9001](http://localhost:9001)__!

### Running Tests

### Running tests

After you have [cloned the repo and installed the dependencies](#local-installation-and-development), simply run the tests like so:
After [cloning and installing](#local-installation-and-development), to run tests:

npm test

## Browser console logging
## Browser Console Logging

If you'd like to see helpful logs, warnings, and errors, you can enable logging from the console of your favourite developer tools:
To see helpful logs, warnings, and errors, enable logging from the console of your favorite developer tools:

localStorage.logs = 1

And to disable:
To disable:

localStorage.logs = 0

## Maintainers

Ensure you have [cloned the repo and installed the dependencies](#local-installation-and-development).

### Developing alongside the other aframe packages (e.g., [`aframe`](https://github.com/aframevr/aframe/))
### Developing Alongside Projects

If you want to make changes to the [__`aframe`__](https://github.com/aframevr/aframe/) library and test with `aframe-core`, you'll need to run these commands to link things up correctly.
While making changes to `aframe-core` and testing with another project, link the projects together.

#### Linking

Expand All @@ -103,11 +74,9 @@ When you are in the directory of your __`aframe`__ repo checkout:

npm link aframe-core

Now when you make changes to `aframe-core`, those changes will get reflected when a bundle gets built (the page is refreshed or a `aframe` file is changed), so you can test the `aframe-core` dependency against `aframe` without having to manually push things to `npm` for testing (which is a big no no!).

#### Unlinking

You'll need to `npm unlink` when you are done testing things and want to actually use the npm-published versions, not your versions that are locally linked.
`npm unlink` when you are done testing things and want to use the npm-published versions, not your versions that are locally linked.

From your __`aframe-core`__ directory:

Expand All @@ -117,7 +86,7 @@ From your __`aframe`__ directory:

npm unlink aframe-core

### Releasing and publishing a new version to [npm](https://www.npmjs.com/)
### Publishing to [npm](https://www.npmjs.com/)

To increment the preminor version of the package (e.g., `0.1.19` to `0.1.20`) and create a git tag (e.g., `v0.1.20`):

Expand All @@ -129,7 +98,7 @@ Once the package is 100% ready to go, to push the new version to npm (e.g., `0.1

npm run release:push

## Updating `dist` files
## Updating `dist` Files

npm run dist
git commit -am 'Bump dist'
Expand Down

0 comments on commit 82ad95f

Please sign in to comment.