Skip to content

Commit 498088f

Browse files
committed
0.9.6-2 添加新动效,增加事件支持
1 parent d136277 commit 498088f

File tree

8 files changed

+571
-291
lines changed

8 files changed

+571
-291
lines changed

README.md

+31-9
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ nodePPT - 让你爱上做分享!
99
* 基于GFM的markdown语法编写
1010
* 支持[html混排](#mixed-code),再复杂的demo也可以做!
1111
* [导出网页](#export-html)或者[pdf](#export-pdf)更容易分享
12-
* 支持[18种转场动画](#transition),可以设置单页动画
12+
* 支持[20种转场动画](#transition),可以设置单页动画
1313
* 支持单页背景图片
1414
* 多种模式:overview模式,[双屏模式](#postmessage)[socket远程控制](#socket),摇一摇换页,使用ipad/iphone控制翻页更酷哦~
1515
* 可以使用画板,**双屏同步画板**内容!可以使用note做备注
1616
* 支持语法高亮,自由选择[highlight样式](https://highlightjs.org/)
1717
* 可以单页ppt内部动画,单步动画
1818
* [支持进入/退出回调](#callback),做在线demo很方便
19+
* 支持事件update函数,查看[demo](http://qdemo.sinaapp.com/#12)
1920

2021
## 0.9.0新功能
2122
* 添加画板多端同步
2223
* 添加按钮控制进度
24+
* 新增两种转场动效,增加事件绑定方法:`Slide.on`
2325
* 修复一些bug
2426

2527
## demo
@@ -89,11 +91,29 @@ http://127.0.0.1:8080/md/demo.md?controller=socket
8991
http://127.0.0.1:8080/md/demo.md?_multiscreen=1
9092
```
9193

94+
### 事件绑定
95+
使用函数`Slide.on`,目前支持update函数,即转场后的回调。示例代码:
96+
97+
```javascript
98+
Slide.on('update', function(i, cls) {
99+
//接受两个参数:index和方向pageup/pagedown
100+
Puff.add('#FFC524' /*colors[i % 6]*/ , ctx, 20, 700, width / 2, height / 2, width / 1.8, 400);
101+
clearInterval(timer);
102+
//第十三个有动效
103+
if (i === 13 || i === 14) {
104+
timer = setInterval(function() {
105+
Puff.draw(1);
106+
}, 1E3 / FPS);
107+
}
108+
109+
})
110+
```
111+
demo中[第13张](http://qdemo.sinaapp.com/#13)使用回调做了魔幻翻页效果
92112

93113
### 导出ppt
94114
这么高端大气上档次的ppt,怎么能不导出分享给大家呢??
95115

96-
导出ppt有两种,一种是**pdf版**,一种是**html版**
116+
导出ppt有三种,一种最简单直接**ctrl+P**,一种是**pdf版**,一种是**html版**
97117

98118
<a name="export-pdf"></a>
99119
#### pdf版
@@ -151,6 +171,8 @@ files: 引入js和css的地址,如果有的话~自动放在页面底部
151171
* kontext
152172
* vkontext
153173
* circle
174+
* cover-circle
175+
* cover-diamond
154176
* earthquake
155177
* cards
156178
* glue
@@ -329,15 +351,15 @@ nodePPT - just enjoy presentation
329351
## why nodePPT?
330352

331353
**Maybe the best PPT webapp ever**
332-
354+
333355
* markdown based on GFM;
334356

335357
* mix-code with html and markdown
336358

337359
* export your work with html and pdf format;
338-
360+
339361
* 18 different transition animations, and you can choose single page animation well;
340-
362+
341363
* Setting one page background image different than others;
342364

343365
* overview mode, multiscreen mode, remote control with socket, shark to page-flipping with ipad/iphone;
@@ -365,7 +387,7 @@ nodePPT - just enjoy presentation
365387
* sync multiscreen in real time: http://qdemo.sinaapp.com/?_multiscreen=1 (make sure alert is allowed in your browser)
366388

367389
* front-end experience of mobile baidu: http://qdemo.sinaapp.com/box-fe-road.htm
368-
390+
369391

370392
## customize your theme
371393

@@ -395,7 +417,7 @@ nodeppt start -p 8090 -d path/for/ppts
395417
# bind host, default value: (0.0.0.0)
396418
nodeppt start -p 8080 -d path/for/ppts -h 127.0.0.1
397419
# socket (type 'Q' to show/hide QR Code, use your phone scan it, and you can control the slider)
398-
# if your want to use socket, notice the follow:
420+
# if your want to use socket, notice the follow:
399421
* 1, make sure that your phone and your pc/mac is allowed to access to each other
400422
* 2, the firewall
401423
* 3, ip
@@ -475,7 +497,7 @@ transition: zoomin/cards/slide/...
475497
files: path/to/js/or/css/files
476498
```
477499

478-
**directory relationship**:
500+
**directory relationship**:
479501

480502
<a name="transition"></a>
481503
support the followed animations:
@@ -497,7 +519,7 @@ support the followed animations:
497519
* vertical3d
498520
* zoomin
499521
* zoomout
500-
* pulse
522+
* pulse
501523

502524
if you want set single page animation, go to **[single page animation setting](#transition-page)**
503525

assets/css/nodeppt2.0.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)