Skip to content

Commit

Permalink
发布0.1.2。
Browse files Browse the repository at this point in the history
  • Loading branch information
tengge1 committed Jan 11, 2019
1 parent 2ac4d62 commit 617cf82
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 15 deletions.
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shadow Editor

* 名称:Shadow Editor
* 版本:v0.1.2(开发中)
* 版本:v0.1.2
* 简介:基于`three.js`的场景编辑器。

<table>
Expand All @@ -23,21 +23,12 @@
</tr>
</table>

## v0.1.1更新

* 发布日期:2018年12月30日
* 更新日志:

1. 修复mmd动画和音频不同步问题。支持多个mmd模型与模型动画、相机动画同步。
2. 新增点阵化特效、颜色偏移特效、残影特效、背景虚化、快速近似抗锯齿(FXAA)、毛刺特效、半色调特效、全屏抗锯齿(SSAA)、像素特效、可扩展环境光遮挡(SAO)、多重采样抗锯齿(SMAA)、屏幕空间环境光遮蔽(SSAO)、时间抗锯齿(TAA)。
3. 新增粒子、预设体、角色面板。(暂未实现具体功能)

## v0.1.2即将更新
## v0.1.2更新

1. 场景新增版本控制。场景表仅保存最新场景,历史数据保存在`场景名称_history`表中。
2. 保存材质自动生成材质球缩略图。
3. 保存载入服务端模型修改后的材质。
4. 正方体、圆形、圆柱体、二十面体、酒杯、平面、球体、茶壶、轮胎、纽结都支持刚体组件,提供正方体和球体物理形状设置
4. 正方体、圆形、圆柱体、二十面体、酒杯、平面、球体、茶壶、轮胎、纽结、加载模型都支持刚体组件。支持可视化设置碰撞体形状(正方体、球体)、质量和惯性
5. 新增正方体和球体物理形状帮助器。

## 主要功能
Expand All @@ -60,14 +51,14 @@
16. 提供历史记录和日志功能,支持撤销、重做。
17. 支持导出`gltf``obj``ply``stl`模型。
18. 支持地形:柏林地形、着色器地形。现仅提供示例,待开发完善。
19. 支持`bullet`物理引擎。现仅提供示例,待开发完善
19. 支持`bullet`物理引擎。正方体、圆形、圆柱体、二十面体、酒杯、平面、球体、茶壶、轮胎、纽结和加载的模型都支持刚体组件。支持可视化设置碰撞体形状(正方体、球体)、质量和惯性。
20. 具有平移、旋转、缩放、在物体表面绘制点、线、贴花的工具,实时统计场景种物体、顶点、三角形数量。

## 项目截图

大型舞会现场。
混乱的世界。(物理引擎刚体组件演示)

![image](images/scene20181223.png)
![image](images/scene20190111.png)

[点击此处](images/README.md)查看更多截图。

Expand Down
27 changes: 27 additions & 0 deletions ShadowEditor.Web/src/player/component/PlayerPhysics.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ function PlayerPhysics(app) {
this.events = [
new ThrowBallEvent(this.app, this.world, this.rigidBodies)
];

// api函数
Object.assign(app, {
addPhysicsObject: this.addPhysicsObject.bind(this)
});
}

PlayerPhysics.prototype = Object.create(PlayerComponent.prototype);
Expand Down Expand Up @@ -196,4 +201,26 @@ PlayerPhysics.prototype.createRigidBody = function (obj) {
return new Ammo.btRigidBody(info);
};

// --------------------------------- API函数 ------------------------------------------------

/**
* 添加一个物理物体
* @param {*} obj
*/
PlayerPhysics.prototype.addPhysicsObject = function (obj) {
this.scene.add(obj);
if (obj.userData && obj.userData.physics && obj.userData.physics.enabled) {
var body = this.createRigidBody(obj);
if (body) {
obj.userData.physics.body = body;
this.world.addRigidBody(body);

if (obj.userData.physics.mass > 0) {
this.rigidBodies.push(obj);
body.setActivationState(4);
}
}
}
};

export default PlayerPhysics;
11 changes: 11 additions & 0 deletions UpdateLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 更新日志

**v0.1.2**

* 发布日期:2019年1月11日
* 更新日志:

1. 场景新增版本控制。场景表仅保存最新场景,历史数据保存在`场景名称_history`表中。
2. 保存材质自动生成材质球缩略图。
3. 保存载入服务端模型修改后的材质。
4. 正方体、圆形、圆柱体、二十面体、酒杯、平面、球体、茶壶、轮胎、纽结、加载模型都支持刚体组件。支持可视化设置碰撞体形状(正方体、球体)、质量和惯性。
5. 新增正方体和球体物理形状帮助器。

**v0.1.1**

* 发布日期:2018年12月30日
Expand Down
2 changes: 2 additions & 0 deletions images/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 更多截图

![image](scene20190111.png)

![image](scene20181223.png)

![image](scene20181215.png)
Expand Down
Binary file added images/scene20190111.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 617cf82

Please sign in to comment.