- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://playcanvas.com/
- 软件文档: http://developer.playcanvas.com/
软件介绍
一般来讲,游戏开发与web应用完全是两码事。但先试试,游戏世界的很多工具都可以被用于在网站中增加华丽界面。PlayCanvas就是一个基于WebGL的游戏引擎,结合了物理、光影、音效等工具用于创建一个复杂的界面。
示例代码:
// Create a PlayCanvas application
var canvas = document.getElementById("application-canvas");
var app = new pc.fw.Application(canvas, {});
app.start();
// Fill the available space at full resolution
app.setCanvasFillMode(pc.fw.FillMode.FILL_WINDOW);
app.setCanvasResolution(pc.fw.ResolutionMode.AUTO);
// Create box entity
var cube = new pc.fw.Entity();
app.context.systems.model.addComponent(cube, {
type: "box"
});
// Create camera entity
var camera = new pc.fw.Entity();
app.context.systems.camera.addComponent(camera, {
clearColor: new pc.Color(0.1, 0.1, 0.1)
});
// Create directional light entity
var light = new pc.fw.Entity();
app.context.systems.light.addComponent(light);
// Add to hierarchy
app.context.root.addChild(cube);
app.context.root.addChild(camera);
app.context.root.addChild(light);
// Set up initial positions and orientations
camera.setPosition(0, 0, 3);
light.setEulerAngles(45, 0, 0);
// Register an update event
app.on("update", function (deltaTime) {
cube.rotate(10 * deltaTime, 20 * deltaTime, 30 * deltaTime);
});
算法导论(原书第2版)
[美] Thomas H.Cormen、Charles E.Leiserson、Ronald L.Rivest、Clifford Stein / 潘金贵 等 / 机械工业出版社 / 2006-9 / 85.00元
这本书深入浅出,全面地介绍了计算机算法。对每一个算法的分析既易于理解又十分有趣,并保持了数学严谨性。本书的设计目标全面,适用于多种用途。涵盖的内容有:算法在计算中的作用,概率分析和随机算法的介绍。书中专门讨论了线性规划,介绍了动态规划的两个应用,随机化和线性规划技术的近似算法等,还有有关递归求解、快速排序中用到的划分方法与期望线性时间顺序统计算法,以及对贪心算法元素的讨论。此书还介绍了对强连通子图......一起来看看 《算法导论(原书第2版)》 这本书的介绍吧!
