Matter.js基于 Web 的 2D 图形引擎
Matter.js 是一个基于 Web 的 2D 图形引擎。
特性:
-
物理属性(质量、面积、密度等)
-
任何凸多边形的刚体
-
稳定的叠加和 resting
-
碰撞 (broad-phase, mid-phase and narrow-phase)
-
Restitution (elastic and inelastic collisions)
-
Conservation of momentum
-
Friction and resistance
-
Constraints
-
Gravity
-
Composite bodies
-
Sleeping and static bodies
-
Events
-
Rounded corners (chamfering)
-
Views (translate, zoom)
-
Collision queries (raycasting, region tests)
-
Time scaling (slow-mo, speed-up)
-
Canvas renderer (supports vectors and textures)
-
WebGL renderer (requires pixi.js)
-
MatterTools for creating, testing and debugging worlds
-
World state serialisation (requires resurrect.js)
-
Cross-browser (Chrome, Firefox, Safari, IE8+)
-
Mobile-compatible (touch, responsive)
-
An original JavaScript physics implementation (not a port)
示例代码:
// Matter.js module aliases var Engine = Matter.Engine, World = Matter.World, Bodies = Matter.Bodies; // create a Matter.js engine var engine = Engine.create(document.body); // create two boxes and a ground var boxA = Bodies.rectangle(400, 200, 80, 80); var boxB = Bodies.rectangle(450, 50, 80, 80); var ground = Bodies.rectangle(400, 610, 810, 60, { isStatic: true }); // add all of the bodies to the world World.add(engine.world, [boxA, boxB, ground]); // run the engine Engine.run(engine);
评论
Blend2D高性能 2D 矢量图形引擎
Blend2D是一个用C++编写的高性能2D矢量图形引擎,在Zlib许可证下发布。该引擎利用内置的JIT编译器在运行时生成优化的管道,并能够使用多线程来提高性能,超越单线程渲染。此外,该引擎还有一个新
Blend2D高性能 2D 矢量图形引擎
0
DuckEngine适用于 Web 的 2D 游戏引擎
DuckEngine 是一个适用于 Web 的 2D 游戏引擎。特性:AABB (Axis-Alig
DuckEngine适用于 Web 的 2D 游戏引擎
0
DuckEngine适用于 Web 的 2D 游戏引擎
DuckEngine是一个适用于Web的2D游戏引擎。特性:AABB(Axis-AlignedBoundingBox)基于Hitbox的物理引擎多场景快速高效Sprites&Spriteshe
DuckEngine适用于 Web 的 2D 游戏引擎
0
DivSugar基于CSS3的3D图形引擎
DivSugar是一个基于CSS3的3D图形引擎。它提供了一个3D场景图形,一个动画系统,和几何类。场景图的节点是一个扩展的div元素,所以它使得整合三维动画到现有网站上的网页变得很容易,适合制作休闲
DivSugar基于CSS3的3D图形引擎
0
jPCT基于OpenGL的3D图形引擎
jPCT是一款基于OpenGL技术开发的3D图形引擎(PC环境为标准OpenGL,Android为OpenGLES),以Java语言为基础的,拥有功能强大的Java3D解决方案。该引擎与LGame(此
jPCT基于OpenGL的3D图形引擎
0
Draw2.js基于 H5 Canvas 的简单图形引擎
Draw2.js一个基于h5canvas实现的简单图形引擎。Draw2.js有什么用?Draw2.js以现实事物来抽象。可以极大的方便你编写h5canvas代码。极大的方便了开发动画。demo创建一个
Draw2.js基于 H5 Canvas 的简单图形引擎
0