Add simulator
This commit is contained in:
74
sim/public/sim.css
Normal file
74
sim/public/sim.css
Normal file
@ -0,0 +1,74 @@
|
||||
svg.sim {
|
||||
margin-bottom:1em;
|
||||
}
|
||||
.sim-button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.sim-button-outer:hover {
|
||||
stroke:grey;
|
||||
stroke-width: 3px;
|
||||
}
|
||||
|
||||
.sim-pin-touch:hover {
|
||||
stroke:#D4AF37;
|
||||
stroke-width:2px;
|
||||
}
|
||||
|
||||
.sim-pin-touch.touched:hover {
|
||||
stroke:darkorange;
|
||||
}
|
||||
|
||||
.sim-led-back:hover {
|
||||
stroke:#a0a0a0;
|
||||
stroke-width:3px;
|
||||
}
|
||||
.sim-led:hover {
|
||||
stroke:#ff7f7f;
|
||||
stroke-width:3px;
|
||||
}
|
||||
|
||||
.sim-systemled {
|
||||
fill:#333;
|
||||
stroke:#555;
|
||||
stroke-width: 1px;
|
||||
}
|
||||
|
||||
.sim-antenna {
|
||||
stroke:#555;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
|
||||
.sim-text {
|
||||
font-family:monospace;
|
||||
font-size:25px;
|
||||
fill:#fff;
|
||||
}
|
||||
|
||||
.sim-text-pin {
|
||||
font-family:monospace;
|
||||
font-size:20px;
|
||||
fill:#fff;
|
||||
}
|
||||
|
||||
/* animations */
|
||||
.sim-flash {
|
||||
animation-name: sim-flash-animation;
|
||||
animation-duration: 0.1s;
|
||||
}
|
||||
|
||||
@keyframes sim-flash-animation {
|
||||
from { fill: yellow; }
|
||||
to { fill: default; }
|
||||
}
|
||||
|
||||
.sim-flash-stroke {
|
||||
animation-name: sim-flash-stroke-animation;
|
||||
animation-duration: 0.4s;
|
||||
animation-timing-function: ease-in;
|
||||
}
|
||||
|
||||
@keyframes sim-flash-stroke-animation {
|
||||
from { stroke: yellow; }
|
||||
to { stroke: default; }
|
||||
}
|
20
sim/public/simulator.html
Normal file
20
sim/public/simulator.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en" data-framework="typescript">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>microbit simulator</title>
|
||||
<link rel="stylesheet" type="text/css" href="./sim.css">
|
||||
<style>
|
||||
body {
|
||||
background: transparent;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript" src="./bluebird.min.js"></script>
|
||||
<script type="text/javascript" src="./kindsim.js"></script>
|
||||
<script type="text/javascript" src="./sim.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
Reference in New Issue
Block a user