Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

合成举牌小人图片的组件 #10

Open
fouber opened this issue Oct 28, 2015 · 5 comments
Open

合成举牌小人图片的组件 #10

fouber opened this issue Oct 28, 2015 · 5 comments
Labels

Comments

@fouber
Copy link
Contributor

fouber commented Oct 28, 2015

如果你第一次参与本项目,请阅读 这里 快速开始。

设计示意图:

image

功能描述:

  • 合成效果参考 这里
  • 用canvas进行图像生成,但最终调用 toDataURL 方法把它绘制到 img 标签中展示,这样才能让用户长按图片进行保存或分享
  • vue组件接收 外部参数 scale 表示缩放等级,content 举牌内容,�color 背景色
  • 利用vue的 watch 方式监听上述信息,一旦有修改,则立即重绘
  • 推荐使用fis的 __inline 函数内嵌图像资源,减少异步请求的性能开销
  • 每次合成图像,都随机选取小人
  • 由于一期功能不支持选择牌子的颜色,所以举牌颜色固定为一种
  • 实现刷新按钮,点击效果同合成逻辑
  • 展示的内容可缩放(canvas合成时缩放,img不要缩放,所见即所得),以方便用户能完全看到举牌内容

组件代码:src/module/widget/display

编码规范:

https://github.com/idle-dog/upup/blob/master/docs/DEV.md#组件化开发

代码提交规范:

https://github.com/idle-dog/upup/blob/master/docs/PR.md

@fouber fouber added the 任务 label Oct 28, 2015
@sapjax
Copy link
Contributor

sapjax commented Oct 29, 2015

没人领? 我领了吧,正好熟悉一下Vue

@fouber
Copy link
Contributor Author

fouber commented Oct 29, 2015

@sapjax 赞一个

@sapjax
Copy link
Contributor

sapjax commented Oct 29, 2015

@fouber
adfae3bf-cbd1-47f6-beec-fd0287536834
a8ac3bd9-30cb-462b-9afa-070d014f49fa
有些小人的胳膊和手对不齐。

@fouber
Copy link
Contributor Author

fouber commented Oct 29, 2015

@sapjax 第一个小人左侧好像没有留出空白,每个小人的左侧空白边距应该是一样的才对得上

fouber added a commit that referenced this issue Oct 31, 2015
@sapjax
Copy link
Contributor

sapjax commented Nov 1, 2015

遗留问题todo

  • 有时候图像显示不出来的bug
  • 缩放后图像会模糊
  • 缩放不应该重新绘制小人
  • 文字transform参数没改成可配置
  • 某些小人的手和胳膊没对齐

fouber added a commit that referenced this issue Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants