diff --git a/.gitignore b/.gitignore
index a17fb19..be04ab2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,3 @@
demo
bower_components
node_modules
-index.html
-main.css
-terra.demo.min.js
diff --git a/bower.json b/bower.json
index 6da2266..cb67eb7 100644
--- a/bower.json
+++ b/bower.json
@@ -27,9 +27,6 @@
"lodash_custom",
"node_modules",
"tests",
- "index.html",
- "main.css",
- "terra.demo.min.js",
"gulpfile.js"
],
"dependencies": {
diff --git a/gulpfile.js b/gulpfile.js
index 0ad8a94..404cd4b 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,14 +12,14 @@ var paths = {
ext: ['./bower_components/**/*.js', './lodash_custom/**/*.js']
},
demo: {
- entry: ['./demo/scripts/main.js'],
- scripts: ['./demo/scripts/**/*.js'],
+ entry: './demo/scripts/main.js',
+ scripts: './demo/scripts/**/*.js',
stylesheets: ['./demo/stylesheets/**/*.css', './demo/stylesheets/**/*.sass'],
- extras: ['./*.{png,ico,txt,xml}']
+ extras: './*.{png,ico,txt,xml}'
},
dist: {
scripts: './dist',
- demo: './'
+ demo: './demo'
},
tests: './tests'
};
@@ -72,4 +72,18 @@ gulp.task('watch', function() {
gulp.watch(paths.demo.stylesheets, ['sass']);
});
-gulp.task( 'default', [ 'lint', 'scripts', 'demo', 'sass', 'watch' ] );
+gulp.task('deploy', function () {
+ gulp.src(paths.dist.demo + '/*.*')
+ .pipe($.ghPages('https://github.com/rileyjshaw/terra.git', 'origin'));
+});
+
+gulp.task('webserver', function() {
+ gulp.src(paths.dist.demo)
+ .pipe($.webserver({
+ host: '0.0.0.0',
+ livereload: true,
+ open: true
+ }));
+});
+
+gulp.task( 'default', [ 'lint', 'scripts', 'demo', 'sass', 'webserver', 'watch' ] );
diff --git a/index.html b/index.html
deleted file mode 100644
index 73516ab..0000000
--- a/index.html
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
terra is a super customizable framework for creating and analyzing biological simulations. It's open-source and licenced under MIT.
-
terra is still in Alpha version, which means...
-
Usage
-
To get started, we'll create a simple creature using the creatureFactory. Each creature requires a type and a color.
-
creatureFactory.register({
- type: 'firstCreature',
- color: [220, 85, 79]
-});
-
This creature is valid, but it's just inheriting the default behaviours. To make a more interesting creature, let's override some of the default options and methods.
-
creatureFactory.register({
- type: 'secondCreature',
- color: [41, 128, 185],
- metabolism: 1,
- sustainability: 3,
- reproduceLv: 0.60,
- etc...
-});
-
We've just created a creature that will ____.
-
To run a simulation, we'll need to create an environment. Let's make a 25x25 grid and populate 40% of the space with our first creature and 20% with our second.
-
var ex1 = new Terrarium(25, 25, 'ex1');
-ex1.populate([['firstCreature', 40], ['secondCreature', 20]]);
-
-
-
Examples
-
Conway's Game of Life ?
-
terra can also run cellular automata.
-
-
-
-
-
Options
-
The following options can be passed in an object to creatureFactory.register( ) as the first argument.
-
-
Required
-
-
-
Optional
-
- - (array) color:
- - (int) initialEnergy:
- - (int) maxEnergy:
- - (int) metabolism:
- - (int) size:
- - (int) speed:
- - (int) vision:
- - (int) sustainability: 2
- - (float) reproduceLv: 0.70
- - (float) moveLv: 0.20
- - (char) character:
-
-
-
Methods
-
- - queue
- - reproduce
- - move
- - wait
- - isDead
- - boundEnergy
-
-
-
Events
-
-
-
-
-