harrychen0506 / malyan Goto Github PK
View Code? Open in Web Editor NEWJavaScript Canvas 2D engine library
Home Page: https://harrychen0506.github.io/malyan/
License: MIT License
JavaScript Canvas 2D engine library
Home Page: https://harrychen0506.github.io/malyan/
License: MIT License
你好,我也有意想写个 2d 引擎,以 css 的和 vdom 的方式来布局,
但有几道砍总是过不去,想找大佬请教一下,探讨下思路亦可。
尺寸联动问题。比如子级尺寸变大,父级是类似 inline-block 的包裹型元素,父级也将尺寸变大,继而祖父或兄弟的尺寸也会变化,这类问题大佬你会怎么去解决?
文本换行和省略问题。免不了会不断用 measureText 去计算,不知有没有其他思路。
元素超出与裁剪问题。譬如 background-image 和 overflow 效果,在 canvas 中做裁剪稍有麻烦,clip 性能在小程序上非常差,用 globalCompositeOperation 又有作用域问题。
组件问题。譬如 scroll-view 组件,与普通元素稍有不同,除了 clientHeight 还会有 scrollHeight 之类的内部参数和事件呢,如何能比较好的兼容拓展?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.