Skip to content

Commit 9e93e66

Browse files
committed
work on interaction, emoji
1 parent 2159ac4 commit 9e93e66

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/core-dojo/src/DojoInteraction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class DojoInteraction implements Interaction {
3030
private action!: (params: InteractParams) => void
3131

3232
constructor(engine: DojoEngine, app: App, pixel: Pixel | undefined, color: number) {
33-
this.functionName = pixel?.action ?? "interact"
33+
this.functionName = pixel?.action && pixel.action.length > 0 ? pixel.action : "interact"
3434
this.contractName = `${app.name}_actions`
3535
this.position = { x: pixel?.x ?? 0, y: pixel?.y ?? 0 }
3636
this.manifest = engine.dojoSetup.manifest
@@ -93,7 +93,7 @@ export class DojoInteraction implements Interaction {
9393

9494
private initializeAction(): void {
9595
this.action = async (params) => {
96-
console.log(params)
96+
console.info(params, this.contractName, this.functionName, this.position, this.color)
9797
try {
9898
const dojoCall = generateDojoCall(
9999
this.engine.dojoSetup.manifest,

packages/core-dojo/src/DojoSqlPixelStore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class DojoSqlPixelStore implements PixelStore {
8585
if (id === "0x0") return
8686
try {
8787
const p = data["pixelaw-Pixel"]
88+
8889
if (Object.keys(data).length === 0) {
8990
// Pixel got deleted
9091
this.deletePixel(this.idLookupTable[id])

packages/core-dojo/src/DojoSqlPixelStore.webworker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function handleMessage(event) {
3030

3131
for (const j of json) {
3232
const d = JSON.parse(j.d)
33-
console.log(d)
33+
3434
const color = d[0]
3535
const x = d[3] >> 16
3636
const y = d[3] & 0xffff

packages/core-dojo/src/utils/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export function convertFullHexString(str) {
2929
const result = str.replace("0x", "").replace(/^0+/, "")
3030
if (!result.length) return ""
3131
const r = parseText(result)
32-
console.log("r", r, str.length)
3332
return r
3433
}
3534

packages/core/src/renderers/Canvas2DRenderer/drawPixels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function drawPixels(
6464
} else if (zoomlevel === "mid") {
6565
if (!pixel.text) return
6666
const fontWeight = "300"
67-
context.font = `${fontWeight} ${cellSize * 0.8}px "Noto Emoji", serif`
67+
context.font = `${fontWeight} ${cellSize * 0.8}px "Arial", serif`
6868
context.textAlign = "center"
6969
context.textBaseline = "middle"
7070
context.fillStyle = "#000000"

0 commit comments

Comments
 (0)