init: 微信小游戏项目初始化
基础工程骨架:game.js 入口、Canvas 渲染、DevTools 项目配置。 包含 CLAUDE.md / AGENTS.md 及 KB 知识库接入。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
12
js/main.js
Normal file
12
js/main.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const { windowWidth, windowHeight } = wx.getSystemInfoSync()
|
||||
|
||||
const canvas = wx.createCanvas()
|
||||
const ctx = canvas.getContext('2d')
|
||||
|
||||
ctx.fillStyle = '#ffffff'
|
||||
ctx.fillRect(0, 0, windowWidth, windowHeight)
|
||||
|
||||
ctx.fillStyle = '#333333'
|
||||
ctx.font = '24px sans-serif'
|
||||
ctx.textAlign = 'center'
|
||||
ctx.fillText('微信小游戏', windowWidth / 2, windowHeight / 2)
|
||||
Reference in New Issue
Block a user