-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Double_oxygeN edited this page Jan 4, 2018
·
2 revisions
First, create the project folder.
mkdir new_project
cd new_project
Create the lib
folder in it and Clone Koturno from github.
git clone https://github.com/Double-oxygeN/koturno.git lib/Koturno
Then, create a new HTML file index.html
.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Koturno Sample Project</title>
<script src="src/main.js" charset="utf-8" type="module"></script>
</head>
<body>
<div id="koturno-ui"></div>
</body>
</html>
Finally, create the script src/main.js
.
'use strict';
import { Scene, SceneManager, Game } from '../lib/Koturno/koturno-all.js';
window.addEventListener('DOMContentLoaded', () => {
const scenes = new SceneManager([
new Scene('title')
]);
new Game({
scenes,
firstSceneName: 'title'
}).center().run();
});
That's all! Open index.html
on your browser.