Comments (4)
不是很理解你的意思,如果你说的是原来定义的那几种方块是一个多边形,现在因为你要做得“破碎”的需求,变成了多个多边形,无法生成旋转一定角度之后的图案。我的建议是把原来的九宫格改成 25 格的,然后每个小方块的图案依然采用单个多边形。
from identicon.
不是的,我现在使用的是 16 宫格,每个块中确实有数量不等的多边形(原来也有部分块是这样的)。
如果查看我代码中上一个 commit,那时候已经在设计上实现我的要求了,理论上也可以直接使用,但我个人希望的是,polygon.go 中的判定函数在判定时包括一像素的边框,这样在绘制的时候是顶格的,而不会是现在这样,每次绘制会在周围留下一像素的空隙。
from identicon.
Line 55 in ded8200
改成 >= 0
应该会有所改善。
还有就是将坐标值类型从 float64
改成 int
,不存在小数换算的差值也会好很多。
from identicon.
改成
>= 0
应该会有所改善。
还有就是将坐标值类型从
float64
改成int
,不存在小数换算的差值也会好很多。
有道理,我目前确实只需要用到宽度的 1/8,确实比三等分对小数依赖较少
from identicon.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identicon.