Skip to content

Commit

Permalink
Add speed-hightlight to repo, use for web examples
Browse files Browse the repository at this point in the history
  • Loading branch information
victorb committed Aug 10, 2024
1 parent 8c2316c commit f4b8af9
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 22 deletions.
1 change: 1 addition & 0 deletions web-src/3rd-party/languages/rs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web-src/3rd-party/speed-highlight.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions web-src/3rd-party/speed-highlight.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web-src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import initMiner from './wasm/examples/miner.js'
import initCells from './wasm/examples/cells.js'
import initLemonade from './wasm/examples/resman.js'
import initNeumann from './wasm/examples/von_neumann.js'
import {highlightAll} from 'https://cdn.jsdelivr.net/gh/speed-highlight/core/dist/index.js'
import { highlightAll } from './3rd-party/speed-highlight.js'

const example = window.location.hash.substr(1) || "cells"

Expand Down
46 changes: 25 additions & 21 deletions web-src/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
<html>
<head>
<title>Dogoap Bevy Examples</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/speed-highlight/core/dist/themes/github-dark.css">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="menu">
<a href="#cells">Cells / Quickstart</a>
<a href="#miner">Miner / Longer plans</a>
<a href="#resman">Lemonade / Co-operation</a>
<a href="#von_neumann">Von Neumann / Player interaction</a>

<head>
<title>Dogoap Bevy Examples</title>
<link rel="stylesheet" href="./3rd-party/speed-highlight.css">
<link rel="stylesheet" href="./style.css">
</head>

<body>
<div id="menu">
<a href="#cells">Cells / Quickstart</a>
<a href="#miner">Miner / Longer plans</a>
<a href="#resman">Lemonade / Co-operation</a>
<a href="#von_neumann">Von Neumann / Player interaction</a>
</div>

<div id="wrapper">
<div id="container">
<span id="loading">Loading example...</span>
<canvas id="example-canvas"></canvas>
</div>
<div id="wrapper">
<div id="container">
<span id="loading">Loading example...</span>
<canvas id="example-canvas"></canvas>
</div>
<div id="code" class='shj-lang-rs'></div>
</div>
<script type="module" src="./app.js"></script>
</body>
</html>
<div id="code" class='shj-lang-rs'></div>
</div>
<script type="module" src="./app.js"></script>
</body>

</html>

0 comments on commit f4b8af9

Please sign in to comment.