Skip to content

Commit

Permalink
feat: Update MUD world
Browse files Browse the repository at this point in the history
  • Loading branch information
codynhat committed Mar 19, 2024
1 parent e1c77b9 commit 4443d2a
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 274 deletions.
4 changes: 2 additions & 2 deletions .env.testnet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VITE_NETWORK_ID = 11155420
VITE_WORLD_ADDRESS = 0x943e0b3F1926008f2e1bEFCBc55FA2A75CeC2452
VITE_WORLD_BLOCK_NUMBER = 6992231
VITE_WORLD_ADDRESS = 0xed08ac7cbf41f2171e1d260418d24646b6e35519
VITE_WORLD_BLOCK_NUMBER = 9445983
VITE_GRAPH_URI = https://api.studio.thegraph.com/query/51953/geo-web-op-sepolia/version/latest
VITE_ANNUALRATE = 0.1
VITE_IPFS_GATEWAY = https://gateway.ipfs.io
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"@apollo/client": "^3.7.16",
"@augmented-worlds/system-babylonjs": "^0.1.16",
"@ensdomains/content-hash": "2.5.7",
"@geo-web/mud-world-base-contracts": "0.1.0",
"@geo-web/mud-world-base-setup": "0.1.2",
"@geo-web/mud-world-base-contracts": "0.2.0",
"@geo-web/mud-world-base-setup": "0.3.1",
"@geo-web/sdk": "^4.4.0",
"@geo-web/types": "^0.2.0",
"@google/model-viewer": "^3.2.1",
Expand Down Expand Up @@ -43,7 +43,11 @@
"prettier": "prettier -w src/**"
},
"browserslist": {
"production": [">0.2%", "not dead", "not op_mini all"],
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
">0.2%",
"not dead",
Expand Down
22 changes: 11 additions & 11 deletions src/lib/world.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ function useWorld() {
const modelComponents = useStore((state: any) =>
Object.values(state.getRecords(tables.ModelCom))
);
const imageComponents = useStore((state: any) =>
Object.values(state.getRecords(tables.ImageCom))
);
// const imageComponents = useStore((state: any) =>
// Object.values(state.getRecords(tables.ImageCom))
// );

useEffect(() => {
const mediaObjects = [];
Expand All @@ -53,16 +53,16 @@ function useWorld() {
mediaObjects.push(mediaObject);
}

for (const imageComponent of imageComponents) {
const mediaObject = buildMediaObject(
MediaObjectType.Image,
imageComponent
);
mediaObjects.push(mediaObject);
}
// for (const imageComponent of imageComponents) {
// const mediaObject = buildMediaObject(
// MediaObjectType.Image,
// imageComponent
// );
// mediaObjects.push(mediaObject);
// }

setMediaObjects(mediaObjects);
}, [modelComponents.length, imageComponents.length]);
}, [modelComponents.length]);

const getValue = (table: string, key: { key: string }) =>
useStore.getState().getValue(tables[table], key);
Expand Down
Loading

0 comments on commit 4443d2a

Please sign in to comment.