基于 Web 的 2D 图形引擎 Matter.js

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-06 20:42:28

软件介绍

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);

A pyramid of blocks

本文地址:https://codercto.com/soft/d/14031.html

深度学习

深度学习

[美]特伦斯·谢诺夫斯基(Terrence Sejnowski) / 姜悦兵 / 中信出版集团 / 2019-2 / 88

全球科技巨头纷纷拥抱深度学习,自动驾驶、AI医疗、语音识别、图像识别、智能翻译以及震惊世界的AlphaGo,背后都是深度学习在发挥神奇的作用。深度学习是人工智能从概念到繁荣得以实现的主流技术。经过深度学习训练的计算机,不再被动按照指令运转,而是像自然进化的生命那样,开始自主地从经验中学习。 本书作者特伦斯·谢诺夫斯基是全球人工智能十大科学家之一、深度学习先驱及奠基者,亲历了深度学习在20世纪......一起来看看 《深度学习》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具