Skip to content

Instantly share code, notes, and snippets.

View lqs469's full-sized avatar
🎃

Allen lqs469

🎃
View GitHub Profile
@lqs469
lqs469 / editor.html
Created October 27, 2020 03:37 — forked from zserge/editor.html
<!DOCTYPE html>
<html>
<head>
<style>
.editor { font-family: 'Roboto Mono', monospace; font-size: 12px; outline: none; overflow-y: auto; padding-left: 48px; counter-reset: line; }
.editor div { display: block; position: relative; white-space: pre-wrap; }
.editor div::before { content: counter(line); counter-increment: line; position: absolute; right: calc(100% + 16px); opacity: 0.5; }
</style>
</head>
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once