Skip to content

Commit 2a8aa64

Browse files
committed
update engnie ,db
1 parent d4711f2 commit 2a8aa64

File tree

162 files changed

+1386
-966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+1386
-966
lines changed

DB/dbLibs/5foramt/README.md

Lines changed: 66 additions & 169 deletions
Large diffs are not rendered by default.

DB/dbLibs/animationSpeed/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
对时钟的调节一般是要影响一组动画。如果要直接调节某个动画的播放速度,DragonBones提供了更加直接的接口。直接调节animation中的timeScale属性即可。
66

7-
```
7+
~~~javascript
88
let armatureDisplay = factory.buildArmatureDisplay("Dragon");
99
armatureDisplay.animation.timeScale = 0.5;
10-
```
10+
~~~
1111

1212
* 第二种:调节动画状态速度
1313

1414
对动画速度的调节会影响到所有的动画状态,如果你只想调节角色动画中某一个动画状态的速度,则需要对播放动画之后产生的 AnimationState 实例进行操作。
1515

16-
```
16+
~~~javascript
1717
let armatureDisplay = factory.buildArmatureDisplay("Dragon");
1818
armatureDisplay.play("walk").timeScale = 0.5;
19-
```
19+
~~~
2020

2121
可以访问示例中心查看参考示例的效果和下载源码:
2222
* [DragonBones 在线演示](http://dragonbones.com/demo/index.html)

DB/dbLibs/copy/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ DragonBones 的动画复用功能够把同名骨骼的动画数据从一个骨
33

44
正常播放两个骨骼动画代码如下:
55

6-
```
6+
~~~javascript
77
let egretFactory = dragonBones.EgretFactory.factory;
88

99
egretFactory.parseDragonBonesData(RES.getRes("DragonBonesDataA"));
@@ -29,11 +29,11 @@ armatureDisplayB.scaleY = 0.5;
2929
egretFactory.copyAnimationsToArmature(armatureDisplayB, "armatureA");
3030

3131
armatureDisplayB.animation.play("animationName");
32-
```
32+
~~~
3333

3434
使用 `Factory` 中的 `copyAnimationsToArmature` 方法可实现该效果。
3535
`copyAnimationsToArmature` 方法第一个参数为接收动画数据的骨架,第二个参数为被拷贝动画数据的骨架名称。
3636

3737
可以访问示例中心查看参考示例的效果和下载源码:
3838
* [DragonBones 在线演示](http://www.dragonbones.com/demo/egret/animation_copy_test/index.html)
39-
* [DragonBones 事例源码](https://github.com/DragonBones/DragonBonesJS/blob/master/Egret/Demos/src/demo/AnimationCopyTest.ts)
39+
* [DragonBones 事例源码](https://github.com/DragonBones/DragonBonesJS/blob/master/Egret/Demos/src/demo/AnimationCopyTest.ts)
82.7 KB
Binary file not shown.

DB/dbLibs/createAnimation/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
首先从DragonBones Pro中导出一份骨骼动画数据。你可以点击下面的连接下载。
22

3-
[Robot.zip](http://sedn.egret.com/ueditor/20150701/55937e0a59ba9.zip)
3+
[Robot.zip](55937e0a59ba9.zip)
44

55
我们通过Res Depot工具将资源中的`texture.png``texture.json``RobotGame_1.json` 添加到项目组中。
66

77
使用RES模块加载资源完成后,可以创建基于DragonBones的骨骼动画。
88

99
实例化DragonBones所需要的数据。
1010

11-
```
11+
~~~ javascript
1212
var dragonbonesData = RES.getRes( "RobotGame_1_json" );
1313
var textureData = RES.getRes( "texture_json" );
1414
var texture = RES.getRes( "texture_png" );
15-
```
15+
~~~
1616

1717
DragonBones动画由工厂类进行管理,可以使用EgretFactory对象来处理所有的动画数据以及贴图。
1818
步骤如下:
1919

2020
1. 解析外部数据,并添加至EgretFactory中
2121
2. 设置动画中绑定的贴图
2222

23-
```
23+
~~~ javascript
2424
let egretFactory: dragonBones.EgretFactory = dragonBones.EgretFactory.factory;
2525
egretFactory.parseDragonBonesData(dragonbonesData);
2626
egretFactory.parseTextureAtlasData(textureData, texture);
27-
```
27+
~~~
2828

2929
数据准备好后,需要从数据中提取出需要的骨架系统。在DragonBones中,骨架有多个骨骼组成。每个骨架中绑定了当前骨架的动画数据。
3030

3131
`let armatureDisplay: dragonBones.EgretArmatureDisplay = egretFactory.buildArmatureDisplay("robot");`
3232

3333
通过`buildArmatureDisplay`方法,我们提取名称为`robot`的骨架。要想在舞台中看到该骨架,我们需要将其显性的添加到的舞台当中,可以使用下面语句。
3434

35-
```
35+
~~~ javascript
3636
this.addChild(armatureDisplay);
3737
armatureDisplay.x = 200;
3838
armatureDisplay.y = 300;
3939
armatureDisplay.scaleX = 0.5;
4040
armatureDisplay.scaleY = 0.5;
4141

4242
armatureDisplay.animation.play("Walk");
43-
```
43+
~~~
4444

4545
`armatureDisplay`是名称为`robot`的骨架对象的显示对象。将其添加到显示列表中,就可以在舞台中看到当前提取的机器人。效果如图:
4646

DB/dbLibs/createProject/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ DragonBones作为Egret引擎的扩展库已经集成在安装包中。如果你
1212

1313
添加后配置内容如下:
1414

15-
```
15+
~~~ javascript
1616
"modules": [
1717
{
1818
"name": "egret"
@@ -30,7 +30,7 @@ DragonBones作为Egret引擎的扩展库已经集成在安装包中。如果你
3030
"name": "dragonbones"
3131
}
3232
]
33-
```
33+
~~~
3434

3535
3、重新编译项目
3636

0 commit comments

Comments
 (0)