This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nb = [ | |
| 'ArrowDown', | |
| 'ArrowUp' | |
| ] | |
| class Xs { | |
| static windowKeyUpHandler(e) { | |
| nb.includes(e.key) && e.preventDefault() | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // config/assets.js | |
| import * as path from "node:path" | |
| import * as url from 'node:url'; | |
| import * as assets from "hanami-assets"; | |
| import chokidar from 'chokidar'; | |
| // ESM polyfill for __dirname | |
| const __dirname = url.fileURLToPath(new URL('.', import.meta.url)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <script data-fa-kit-code="38c11e3f20" type="module" src="https://early.webawesome.com/[email protected]/dist/webawesome.loader.js"></script> | |
| <link rel="stylesheet" href="https://early.webawesome.com/[email protected]/dist/styles/webawesome.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title></title> | |
| </head> | |
| <body> | |
| <script data-fa-kit-code="38c11e3f20" type="module" src="https://early.webawesome.com/[email protected]/dist/webawesome.loader.js"></script> | |
| <link rel="stylesheet" href="https://early.webawesome.com/[email protected]/dist/styles/webawesome.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def tick args | |
| args.state.clients ||= {} | |
| # by default the embedded webserver is disabled in a production build | |
| # to enable the http server in a production build you need to: | |
| # - update metadata/cvars.txt | |
| # - manually start the server up with enable_in_prod set to true: | |
| args.state.port = 3000 | |
| GTK.start_server! port: args.state.port, enable_in_prod: true | |
| # args.outputs.background_color = [0, 0, 0] | |
| args.outputs.labels << { x: 640, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Dungeon | |
| # Multipliers for transforming coordinates into other octants | |
| MULT = [ | |
| [1, 0, 0, -1, -1, 0, 0, 1], | |
| [0, 1, -1, 0, 0, -1, 1, 0], | |
| [0, 1, 1, 0, 0, -1, -1, 0], | |
| [1, 0, 0, 1, -1, 0, 0, -1], | |
| ] | |
| # Determines which co-ordinates on a 2D grid are visible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def boot(args) | |
| args.state = {} | |
| end | |
| SpriteStruct = Struct.new(:x, :y, :w, :h, :path) | |
| class SpriteClass | |
| attr_accessor :x, :y, :w, :h, :path | |
| def initialize(x:, y:, w:, h:, path:) | |
| @x = x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en" class=""><head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Web Awesome Page Demo 1</title> | |
| <link rel="preconnect" href="https://early.webawesome.com"> | |
| <link rel="stylesheet" href="https://early.webawesome.com/[email protected]/dist/styles/themes/default.css"> | |
| <link rel="stylesheet" href="https://early.webawesome.com/[email protected]/dist/styles/webawesome.css"> | |
| <script type="module" src="https://early.webawesome.com/[email protected]/dist/webawesome.loader.js"></script> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Signals</title> | |
| </head> | |
| <body> | |
| <button id="decrement"> | |
| - |
NewerOlder