Update JS
parent
3162ac8569
commit
521153953b
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const { spawn } = require("child_process");
|
||||
const fs = require("fs");
|
||||
|
||||
let folderName = '.';
|
||||
|
||||
if (process.argv.length >= 3) {
|
||||
folderName = process.argv[2];
|
||||
if (!fs.existsSync(folderName)) {
|
||||
fs.mkdirSync(folderName);
|
||||
}
|
||||
}
|
||||
|
||||
const clone = spawn("git", ["clone", "https://github.com/rustwasm/create-wasm-app.git", folderName]);
|
||||
|
||||
clone.on("close", code => {
|
||||
if (code !== 0) {
|
||||
console.error("cloning the template failed!")
|
||||
process.exit(code);
|
||||
} else {
|
||||
console.log("🦀 Rust + 🕸 Wasm = ❤");
|
||||
}
|
||||
});
|
|
@ -6,12 +6,12 @@ import { Universe, Cell } from "wasm-game-of-life";
|
|||
let req_id;
|
||||
let stop = false;
|
||||
|
||||
const CELL_SIZE = 60; // px
|
||||
const CELL_SIZE = 40; // px
|
||||
const GRID_COLOR = "#CCCCCC";
|
||||
const DEAD_COLOR = "#FFFFFF";
|
||||
const ALIVE_COLOR = "#3399FF";
|
||||
|
||||
const universe = Universe.new(5,5);
|
||||
const universe = Universe.new(10,10);
|
||||
|
||||
const width = universe.width();
|
||||
const height = universe.height();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,16 +3,13 @@
|
|||
"version": "0.1.0",
|
||||
"description": "Game of Life in Wasm",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"create-wasm-app": ".bin/create-wasm-app.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.config.js",
|
||||
"start": "webpack-dev-server"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/rustwasm/create-wasm-app.git"
|
||||
"url": "git+https://dev.beneth.fr/rustwasm/wasm_game_of_life"
|
||||
},
|
||||
"keywords": [
|
||||
"webassembly",
|
||||
|
@ -20,12 +17,12 @@
|
|||
"rust",
|
||||
"webpack"
|
||||
],
|
||||
"author": "Ashley Williams <ashley666ashley@gmail.com>",
|
||||
"author": "Benoît Mauduit <bmauduit@beneth.fr>",
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"bugs": {
|
||||
"url": "https://github.com/rustwasm/create-wasm-app/issues"
|
||||
"url": "https://dev.beneth.fr/rustwasm/wasm_game_of_life/issues"
|
||||
},
|
||||
"homepage": "https://dev.beneth.fr/wasm_game_of_life",
|
||||
"homepage": "https://dev.beneth.fr/rustwasm/wasm_game_of_life",
|
||||
"devDependencies": {
|
||||
"webpack": "^4.29.3",
|
||||
"webpack-cli": "^3.1.0",
|
||||
|
|
Loading…
Reference in New Issue