Commit 90e7f514 authored by wildfirecode13's avatar wildfirecode13

Update README.md

parent 08e554f2
# hello_canvas 1、在spark web短里添加一个Canvas节点。
2、导出
3、spark init --target xx.json
4、会自动生成project/src/canvas/game。然后再
cd src/canvas/game
npm i
npm run dev
5、只需要关注project/src/canvas/game/src/scenes/StartScene.ts,这是canvas game的入口。
6、在StartScene.start开始写代码
#添加图片
1、spark web端上传图片
2、导出,处理冲突
3、复制project/src/resconfig/resList.js到project/src/canvas/game/resCanvasList.js
4、添加图片
var bg: FYGE.Sprite = new FYGE.Sprite();
bg.x = 0;
bg.y = 0;
bg.texture = RES.getRes(
resCanvasList["4ee17a9c-5deb-43be-b205-16fb7593d172"].url
);
this.addChild(bg);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment