This file contains 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
import { Html } from "@elysiajs/html"; | |
export function ImgResolve({ imagePath }) { | |
const fullPath = `/public/${imagePath}`; | |
return ( | |
<div | |
id="image-container" | |
style={{ | |
position: "relative", |
This file contains 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
import { Html } from "@elysiajs/html"; | |
import { createCanvas, ImageData, loadImage } from "canvas"; | |
async function downsampleImageData(imageData: ImageData, scale: number) { | |
const width = Math.floor(imageData.width * scale); | |
const height = Math.floor(imageData.height * scale); | |
const canvas = createCanvas(width, height); | |
const context = canvas.getContext("2d"); | |
// Create a temporary canvas to draw the original image data |
This file contains 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
import { Html } from "@elysiajs/html"; | |
interface ElectricTextProps { | |
children: string; | |
duration?: number; | |
} | |
export const ElectricText = ({ | |
children, | |
duration = 0.55, | |
}: ElectricTextProps) => { |
This file contains 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
[package] | |
name = "how_fast_is_rust" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
minifb = "0.27" | |
rand = "0.8" | |
wasm-bindgen = "0.2.95" |
This file contains 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" style="user-select: none"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Sabby</title> | |
<link rel="icon" href="./favicon.ico" type="image/x-icon" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/UAParser.js/1.0.37/ua-parser.min.js"></script> | |
<script type="importmap"> | |
{ |
This file contains 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
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://rawgit.com/bevacqua/angular-dragula/master/dist/dragula.min.css"> | |
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc2/angular-material.min.css"> | |
</head> | |
<div ng-app="DragAndDrop" class="body-container" layout="column"> | |
<div layout="row" layout-align="space-around start" layout-margin ng-controller="mainCtrl" flex> | |
<div flex> | |
<md-toolbar class="md-display-1"> |