| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

2D HTML5 渲染引擎:CutJS

CutJS 是一个轻量级的、快速的、可交互的 2D HTML5 渲染引擎,用于跨平台的游戏开发。可用来开发 Web 游戏、iOS 和 Android 等游戏。CutJS 是一个开源的 Canvas 库。

2D HTML5 渲染引擎:CutJS

示例代码:

// Create new app  Cut(function(root, container) {      // Subscribe to Cut.Mouse    Cut.Mouse(root, container);      // Set view box    root.viewbox(500, 300);      // Create an image node    Cut.image("base:box").appendTo(root)      // on mouse click on this node      .on(Cut.Mouse.CLICK, function(ev, point) {        // Tween scale values of this node        this.tween().clear().pin({          scaleX : Math.random() + 0.5,          scaleY : Math.random() + 0.5        });        return true;      });    });    // Register an image texture  Cut.addTexture({    name : "base",    imagePath : "base.png",    cutouts : [      { name : "box", x : 0, y : 0, width : 30, height : 30 }    ]  });

项目主页:http://www.open-open.com/lib/view/home/1399559044228

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1399559044228.html
CutJS 游戏开发