separate map from graphics
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import init, {
|
||||
setup,
|
||||
Graphics,
|
||||
Bot,
|
||||
Graphics,
|
||||
CompleteMap,
|
||||
PlaybackHead,
|
||||
} from "./pkg/strafesnet_roblox_bot_player_wasm_module.js";
|
||||
|
||||
@@ -13,10 +14,13 @@ const m = await fetch("bhop_marble_5692093612.snfm");
|
||||
const canvas = document.querySelector("canvas");
|
||||
|
||||
const context = await setup(canvas);
|
||||
const graphics = new Graphics(context, new Uint8Array(await m.arrayBuffer()));
|
||||
const graphics = new Graphics(context);
|
||||
const bot = new Bot(new Uint8Array(await b.arrayBuffer()));
|
||||
const map = new CompleteMap(new Uint8Array(await m.arrayBuffer()));
|
||||
const playback = new PlaybackHead(0);
|
||||
|
||||
graphics.change_map(map);
|
||||
|
||||
const startTime = performance.now();
|
||||
|
||||
function animate(now) {
|
||||
|
||||
Reference in New Issue
Block a user