Skip to content

Commit af110a4

Browse files
committed
增加演示视频
1 parent 0062907 commit af110a4

17 files changed

+106
-4
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,34 @@
2828

2929
如果觉得项目有用,可以帮我点个星星,这对我非常有帮助。
3030

31+
# 上手指南
32+
33+
## 启动及运行
34+
35+
首先通过命令行进入本项目根目录,通过 `npm` 安装依赖:
36+
37+
```bash
38+
$> npm install
39+
$> cd app
40+
$> npm install
41+
```
42+
43+
开发模式运行:
44+
45+
```bash
46+
$> npm start
47+
```
48+
49+
构建可执行文件(构建结果根据当前操作系统而定):
50+
```bash
51+
$> npm run electron:build
52+
```
53+
54+
编译完成即可在 `./release` 中看到。
55+
56+
## 关于演示视频
57+
58+
演示视频在 `demo-video` 中,可以参考 `branchie-video.xml` 中的格式,具体请见介绍视频及源代码。
3159

3260
# 版权
3361

@@ -46,13 +74,14 @@
4674

4775
## 鸣谢
4876

49-
没有如下开源项目的支持本项目不可能轻易实现,非常感谢:
77+
没有如下开源项目和素材的支持本项目不可能轻易实现,非常感谢:
5078

5179
* 初始项目模板:[AngularElectron](https://img.shields.io/badge/maintained-yes-brightgreen)
5280
* [stateless]()
5381
* [toml-js]()
5482
* [xml2js]()
5583
* [`expression-eval`]()
84+
* [三连动画](https://www.bilibili.com/video/av96347968/)
5685

5786

5887
[maintained-badge]: https://img.shields.io/badge/maintained-yes-brightgreen

demo-video/branchie-video.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<branchie-video>
3+
4+
<activities>
5+
6+
7+
<activity id="开始" video="start.mp4" start="true" />
8+
9+
<activity id="选择" video="选择.mp4" />
10+
11+
<activity id="三连" video="三连.mp4" score="1" />
12+
13+
<activity id="后腿" video="后腿.mp4" />
14+
15+
<activity id="喂食" video="喂食.mp4" score="2" />
16+
17+
<activity id="摸下巴" video="下巴.mp4" />
18+
19+
<activity id="握手" video="握手.mp4" />
20+
21+
<activity id="握手不开心" video="握手不开心.mp4" />
22+
23+
<activity id="好结局" video="好结局.mp4" end="true" />
24+
25+
<activity id="坏结局" video="坏结局.mp4" end="true" />
26+
27+
28+
</activities>
29+
30+
<transitions>
31+
32+
<transition caption="先给个三连吧!" priority="0" from="开始" to="三连" />
33+
<transition caption="下次一定" priority="0" from="开始" to="选择" />
34+
<transition caption="自动跳转选择" priority="0" from="三连" to="选择" wait-signal="false" />
35+
36+
<transition caption="被迫营业结束" priority="0" from="好结局" to="开始" />
37+
<transition caption="被迫营业结束" priority="0" from="坏结局" to="开始" />
38+
39+
<transition caption="先给我吃点儿!" priority="0" from="选择" to="喂食" if="fsm.totalScore < 2" />
40+
<transition caption="吃完开始营业" priority="0" from="喂食" to="选择" />
41+
42+
43+
<transition caption="摸摸下巴" priority="0" from="选择" to="摸下巴" />
44+
<transition caption="营业结束" priority="0" from="摸下巴" to="好结局" if="fsm.totalScore > 0" wait-signal="false" />
45+
<transition caption="营业结束" priority="0" from="摸下巴" to="坏结局" if="fsm.totalScore <= 0" wait-signal="false" />
46+
47+
<transition caption="摸摸后腿" priority="10" from="选择" to="后腿" />
48+
<transition caption="营业结束" priority="0" from="后腿" to="好结局" if="fsm.totalScore > 0" wait-signal="false" />
49+
<transition caption="营业结束" priority="0" from="后腿" to="坏结局" if="fsm.totalScore <= 0" wait-signal="false" />
50+
51+
<transition caption="握爪" priority="10" from="选择" to="握手" if="fsm.totalScore > 0" />
52+
<transition caption="自动结束" priority="0" from="握手" to="好结局" if="fsm.totalScore > 0" wait-signal="false" />
53+
<transition caption="自动结束" priority="0" from="握手" to="坏结局" if="fsm.totalScore <= 0" wait-signal="false" />
54+
55+
<transition caption="握爪" priority="10" from="选择" to="握手不开心" if="fsm.totalScore <= 0" />
56+
<transition caption="自动结束" priority="0" from="握手不开心" to="坏结局" wait-signal="false" />
57+
58+
</transitions>
59+
60+
61+
</branchie-video>

demo-video/start.mp4

3.93 MB
Binary file not shown.

demo-video/三连.mp4

174 KB
Binary file not shown.

demo-video/下巴.mp4

2.56 MB
Binary file not shown.

demo-video/后腿.mp4

2.82 MB
Binary file not shown.

demo-video/喂食.mp4

3.15 MB
Binary file not shown.

demo-video/坏结局.mp4

1.45 MB
Binary file not shown.

demo-video/好结局.mp4

6.71 MB
Binary file not shown.

demo-video/握手.mp4

1.66 MB
Binary file not shown.

demo-video/握手不开心.mp4

3.01 MB
Binary file not shown.

demo-video/选择.mp4

1.75 MB
Binary file not shown.

electron-builder.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
"filter": [
2525
"**/*"
2626
]
27+
},
28+
{
29+
"from": "demo-video",
30+
"to": "../demo-video",
31+
"filter": [
32+
"**/*"
33+
]
2734
}
2835
],
2936
"win": {

etc/branchie.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22
[video]
3-
videoDirectory = "D:/tmp/branchie-video"
3+
videoDirectory = "./demo-video"

src/app/core/models/branchie.settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export interface BranchieSettings {
66
} | undefined;
77

88
video: {
9-
videoDirectory: string;
9+
videoDirectory: string | undefined;
1010
};
1111
}

src/app/core/services/appsettings.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class AppSettingsService {
2222
getSettings(): BranchieSettings {
2323

2424
if(!AppSettingsService.appSettings) {
25+
console.log('>>>>>>>>>>>>>>>>>>> Command line args:', this.electron.process.argv);
2526
const settingsFilePath = this.electron.path.join(this.electron.appDir, 'etc', 'branchie.ini');
2627
if(!this.electron.fs.existsSync(settingsFilePath)) {
2728
throw new Error('Can not found settings file: ' + settingsFilePath);

src/app/home/home.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414
<div class="player-controls-container" >
1515
<ul>
16-
<li><button (click)="onReplayClicked($event)" type="button"><img src="/assets/images/home.svg" /> </button></li>
16+
<li>
17+
<button (click)="onReplayClicked($event)" type="button">
18+
<img src="assets/images/home.svg" alt="重新开始" />
19+
</button>
20+
</li>
1721
</ul>
1822
</div>
1923

0 commit comments

Comments
 (0)