fixed moon list plus added hover text to moon, if you see a demon emoji, talk to me, gracias

main
gallant 3 months ago
parent 1f6bdee567
commit 636cf03536
  1. 7
      static/moon_phase_wasm.d.ts
  2. 90
      static/moon_phase_wasm.js
  3. BIN
      static/moon_phase_wasm_bg.wasm
  4. 3
      static/moon_phase_wasm_bg.wasm.d.ts
  5. 3
      templates/index.html

@ -5,19 +5,18 @@
*/
export function greet(name: string): void;
/**
* @returns {string}
* @returns {Array<any>}
*/
export function send_phase(): string;
export function send_phase(): Array<any>;
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly greet: (a: number, b: number) => void;
readonly send_phase: (a: number) => void;
readonly send_phase: () => number;
readonly __wbindgen_malloc: (a: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_free: (a: number, b: number) => void;
}

@ -1,14 +1,40 @@
let wasm;
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
let cachedUint8Memory0 = new Uint8Array();
function getUint8Memory0() {
if (cachedUint8Memory0.byteLength === 0) {
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8Memory0;
}
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
const heap = new Array(32).fill(undefined);
heap.push(undefined, null, true, false);
function getObject(idx) { return heap[idx]; }
let heap_next = heap.length;
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
function getObject(idx) { return heap[idx]; }
function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
@ -21,23 +47,6 @@ function takeObject(idx) {
return ret;
}
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
cachedTextDecoder.decode();
let cachedUint8Memory0 = new Uint8Array();
function getUint8Memory0() {
if (cachedUint8Memory0.byteLength === 0) {
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
}
return cachedUint8Memory0;
}
function getStringFromWasm0(ptr, len) {
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
}
let WASM_VECTOR_LEN = 0;
const cachedTextEncoder = new TextEncoder('utf-8');
@ -101,6 +110,14 @@ export function greet(name) {
wasm.greet(ptr0, len0);
}
/**
* @returns {Array<any>}
*/
export function send_phase() {
const ret = wasm.send_phase();
return takeObject(ret);
}
let cachedInt32Memory0 = new Int32Array();
function getInt32Memory0() {
@ -109,30 +126,6 @@ function getInt32Memory0() {
}
return cachedInt32Memory0;
}
/**
* @returns {string}
*/
export function send_phase() {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.send_phase(retptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
return getStringFromWasm0(r0, r1);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
wasm.__wbindgen_free(r0, r1);
}
}
function addHeapObject(obj) {
if (heap_next === heap.length) heap.push(heap.length + 1);
const idx = heap_next;
heap_next = heap[idx];
heap[idx] = obj;
return idx;
}
async function load(module, imports) {
if (typeof Response === 'function' && module instanceof Response) {
@ -171,6 +164,10 @@ function getImports() {
imports.wbg.__wbg_alert_b29ee0fb3216154d = function(arg0, arg1) {
alert(getStringFromWasm0(arg0, arg1));
};
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
const ret = getStringFromWasm0(arg0, arg1);
return addHeapObject(ret);
};
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
const ret = new Error();
return addHeapObject(ret);
@ -192,6 +189,13 @@ function getImports() {
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_newwithlength_7c42f7e738a9d5d3 = function(arg0) {
const ret = new Array(arg0 >>> 0);
return addHeapObject(ret);
};
imports.wbg.__wbg_set_a68214f35c417fa9 = function(arg0, arg1, arg2) {
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
};
imports.wbg.__wbg_now_58886682b7e790d7 = function() {
const ret = Date.now();
return ret;

Binary file not shown.

@ -2,8 +2,7 @@
/* eslint-disable */
export const memory: WebAssembly.Memory;
export function greet(a: number, b: number): void;
export function send_phase(a: number): void;
export function send_phase(): number;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_free(a: number, b: number): void;

@ -38,7 +38,8 @@ Hey I'm Gallant, I work with mostly Rust.
//greet("A");
const phase = send_phase();
const bro = document.getElementById("donald");
bro.innerHTML = phase;
bro.innerHTML = phase[0];
bro.setAttribute("title",phase[1]);
})
</script>

Loading…
Cancel
Save