MCPcopy Create free account
hub / github.com/YGYOOO/WorldX / parseInteractiveObjectsLayer

Method parseInteractiveObjectsLayer

client/src/systems/MapManager.ts:108–122  ·  view source on GitHub ↗
(layer: any)

Source from the content-addressed store, hash-verified

106 }
107
108 private parseInteractiveObjectsLayer(layer: any): void {
109 for (const obj of layer.objects) {
110 const props: any[] = obj.properties || [];
111 const objectId = props.find((p: any) => p.name === "objectId")?.value;
112 if (!objectId) continue;
113 this.interactiveObjects.set(objectId, {
114 objectId,
115 name: obj.name || objectId,
116 x: obj.x,
117 y: obj.y,
118 width: obj.width || 0,
119 height: obj.height || 0,
120 });
121 }
122 }
123
124 pixelToGrid(px: number, py: number): { gx: number; gy: number } {
125 return {

Callers 1

loadFromTiledJSONMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected