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ALYQILBLNCRD5BFRAC
O65A3D4ZQZ4EVMU65B5HRUHYTMZXAIKETO4ZGLY2HWJC57ANMJQAC
26RDNOXGRCW2E2AOUTKMARJZEGCTVB5K27YXFQFGIAFJ3PP4LWDAC
HUH4SI4HXIP72KQSJP2I4ELHX5KUQZM7FFGKZZGJ33DF7E3JHMYQC
Z3E7XJOW6NSBDYRDKSGTOAEJSPATAUX4JUFCL4DIL3372GL4K52QC
THNMNMVRZQVPZTEXHIK6WGYN3QDEFPKFOVOCB5HTWCYC5BOBYQ5AC
AAKN4XJLZ2GARZMUFYX3CJZKYHTRRZDYNTFRLMY7VPAY7K6W4N3QC
5SWO57MM5QKEXDPNI7DOBBW6A6PLTP4PEHHJQ7QOGWLINJ6GIOUQC
VG7NEAKILCJJNIATKAPEOTUHKBZJJMPMS6HYT6QFPSF6ZB2ADWUQC
YJ3YEICSBUHMDVJB6W3ZOOVWLTAXRDCIKOGNN6HRP6N3HWQTDGVAC
RQOE2STHW6BJO2M6LPKAGZMVAUL7N2KYXNYYLLF5XDY6BO3YW5KAC
MK5LPGJ3HSEHGWOZFPY6QMFVMHWRXQZ6PUQEXFWNOBAK4SUQT56AC
const uiState = useMemo(() => ({ focusedNode }), [focusedNode]);
const game = useMemo(() => {
return new GameStateFactory({}).create();
}, []);
// const uiState = useMemo(() => ({ focusedNode }), [focusedNode]);
// const game = useMemo(() => {
// return new GameStateFactory({}).create();
// }, []);
const [game, setGame] = useState<GameState>(new GameStateFactory({}).create());
(chunk, node) => {
setBatchContents((n) => n - 1);
setFocusedNode({ chunk, node });
(selection: PointNodeRef) => {
console.log("GOT TO on node change callback ", selection);
setGame(game => {
game.playerUI.selectedPointNode = selection;
return game;
})
const [history, setHistory] = useState<{ chunk: any; node: any }[]>([]);
useEffect(() => {
if (!focusedNode || focusedNode?.chunk === null) return;
setHistory((history) => [...history, focusedNode]);
}, [focusedNode]);
// const [history, setHistory] = useState<{ chunk: any; node: any }[]>([]);
// useEffect(() => {
// if (!focusedNode || focusedNode?.chunk === null) return;
// setHistory((history) => [...history, focusedNode]);
// }, [focusedNode]);
console.log("in nodedetail, ", selectedPointNode);
/**
* Initialize the pixi app
*/
// const game = new BaseGame({
// scale: 1,
// canvasWidth: 800,
// canvasHeight: 800,
// tileHeight: 16,
// tileWidth: 16,
// debugFlags: {},
// state: {
// tick: 0,
// },
// backgroundColor: 0xffffff, // TODO(bowei): fix this
// });
// let application = new Application({ originalWindowWidth: window.innerHeight * .75, originalWindowHeight: window.innerHeight * .75 });
import { PointNodeRef } from "../data/GameState";
constructor(z: number, chunkCoord: Vector2, pointNodeCoord: Vector2, pointNodeId: number) {
this.z = z;
this.chunkCoord = chunkCoord;
this.pointNodeCoord = pointNodeCoord;
this.pointNodeId = pointNodeId;
constructor(args: { z: number, chunkCoord: Vector2, pointNodeCoord: Vector2, pointNodeId: number }) {
this.z = args.z;
this.chunkCoord = args.chunkCoord;
this.pointNodeCoord = args.pointNodeCoord;
this.pointNodeId = args.pointNodeId;