Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Nauja committed Oct 20, 2023
1 parent 64e9d53 commit bf04f64
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
66 changes: 31 additions & 35 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
<html>
<head>
<title>MoroboxAIPlayerWeb Sample</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
</head>

<body class="vertical">
<div class="horizontal">
<div id="player"></div>
<div id="editor"></div>
</div>
<div class="info horizontal">
<button id="attach-player"></button>
<button id="attach-editor"></button>
</div>
<div class="info">
<div>
moroboxai-game-sdk v<span
id="moroboxai-game-sdk-version"
></span>
<div class="container">
<div class="row justify-content-center align-items-center">
<div class="col-3"><div id="player"></div></div>
<div class="col-auto"><div id="editor"></div></div>
</div>
<div>
moroboxai-editor-web v<span
id="moroboxai-editor-web-version"
></span>
<div class="row justify-content-center">
<div class="col-auto">
<button id="attach-player"></button>
<button id="attach-editor"></button>
</div>
</div>
<div class="row justify-content-center">
<div class="col-auto info">
moroboxai-game-sdk v<span
id="moroboxai-game-sdk-version"
></span
><br />
moroboxai-editor-web v<span
id="moroboxai-editor-web-version"
></span>
</div>
</div>
</div>
</body>
Expand Down Expand Up @@ -87,12 +96,9 @@
url: "https://raw.githubusercontent.com/moroboxai/create-moroboxai-game/master/examples/canvas2d-rgb/agent.*",
width: "500px",
height: "400px",
onLoad: (language, value) =>
player.getController(0).loadAgent({
language: language,
code: value
}),
onUnload: () => player.getController(0).unloadAgent()
onRun: (options) =>
player.getController(0).loadAgent(options),
onStop: () => player.getController(0).unloadAgent()
});

attachEditorButton.textContent = "Detach Editor";
Expand Down Expand Up @@ -124,27 +130,17 @@
justify-content: center;
}

.horizontal {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}

#player {
background-color: black;
background-size: cover;
margin-left: 10em;
margin-right: 2em;
}

.info {
margin-top: 2em;
text-align: center;
}

.info button ~ button {
margin-left: 1em;
.row + .row {
margin-top: 1em;
}
</style>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moroboxai-player-web",
"version": "0.1.0-alpha.43",
"version": "0.1.0-alpha.44",
"description": "MoroboxAI SDK for embedding games in browser",
"author": "moroboxai",
"main": "./lib/cjs/index.cjs",
Expand Down

0 comments on commit bf04f64

Please sign in to comment.