├── gulp
├── build
│ ├── html
│ │ └── 20160126.html
│ └── css
│ │ └── canvas.css
├── src
│ ├── html
│ │ └── 20160126.html
│ ├── css
│ │ └── canvas.css
│ └── js
│ │ └── app.js
└── gulpfile.js
├── .gitattributes
├── .gitignore
└── README.md
/gulp/build/html/20160126.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/gulp/src/html/20160126.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
20 |
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear in the root of a volume
35 | .DocumentRevisions-V100
36 | .fseventsd
37 | .Spotlight-V100
38 | .TemporaryItems
39 | .Trashes
40 | .VolumeIcon.icns
41 |
42 | # Directories potentially created on remote AFP share
43 | .AppleDB
44 | .AppleDesktop
45 | Network Trash Folder
46 | Temporary Items
47 | .apdisk
48 |
--------------------------------------------------------------------------------
/gulp/build/css/canvas.css:
--------------------------------------------------------------------------------
1 | .bgImg,.myCanvasTag{width:100%;height:100%}.rw,.rwDYM{position:absolute;z-index:10;display:inline;left:0;bottom:150px}a,body,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,img,input,legend,li,ol,p,ul{margin:0;padding:0}.myCanvasTag{border:1px solid #00f}.bgImg{display:inline}.rw{width:12%}.rwDYM{width:30%}@keyframes Atop{0%,100%{bottom:150px}50%{bottom:250px}}@keyframes AtopMore{0%,100%{bottom:150px}50%{bottom:350px}}.rwAtop{animation:Atop .1s}.rwAtopMore{animation:AtopMore .1s}.bgRoom{width:100%;position:relative;overflow:hidden;line-height:0}.FK1,.FK2,.FK3{position:absolute;z-index:10;bottom:325px;width:12%}.FK1{left:5%}.FK2{left:17%}.FK3{left:29%}.FK4,.FK5{position:absolute;z-index:10;bottom:425px}.FK4{left:41%;width:12%}.FK5{left:53%;width:12%}.FK6,.FK7{bottom:325px;width:12%;position:absolute;z-index:10}.FK6{left:65%}.FK7{left:77%}.jump{position:absolute;z-index:10;bottom:16%;width:36%;left:32%}.HB{position:absolute;z-index:10;top:10px;right:10px}.HBImg{width:10px;position:relative;top:2px}.centerImg,.time{position:absolute}.time{z-index:10;top:10px;right:80px}.centerImg{z-index:11;width:24%;top:35%;left:38%}
--------------------------------------------------------------------------------
/gulp/gulpfile.js:
--------------------------------------------------------------------------------
1 | //npm install gulp -g (global环境)
2 | //npm install gulp --save-dev (项目环境)
3 | //在项目中install需要的gulp插件,一般只压缩的话需要
4 | //npm install gulp-minify-css gulp-concat gulp-uglify gulp-rename del --save-dev
5 | //以下require需要的module
6 | var gulp = require('gulp'),
7 | minifycss = require('gulp-minify-css'),
8 | minifyhtml = require('gulp-minify-html'),
9 | concat = require('gulp-concat'),
10 | uglify = require('gulp-uglify'),
11 | rename = require('gulp-rename'),
12 | del = require('del');
13 | //压缩JS
14 | gulp.task('minify', function() {
15 | gulp.src('./src/js/*.js')
16 | .pipe(concat('main.js')) //合并所有js到main.js
17 | .pipe(rename({
18 | suffix: '.min'
19 | })) //rename压缩后的文件名 让main.js变成main.min.js
20 | .pipe(uglify()) //执行压缩
21 | .pipe(gulp.dest('./build/js'))
22 | });
23 | //压缩CSS
24 | gulp.task('minifycss', function() {
25 | return gulp.src('./src/css/*.css') //压缩的文件
26 | .pipe(minifycss())
27 | .pipe(gulp.dest('./build/css')); //输出文件夹
28 | });
29 | //压缩HTML
30 | gulp.task('minifyhtml', function() {
31 | gulp.src('./src/html/*.html') // 要压缩的html文件
32 | .pipe(minifyhtml()) //压缩
33 | .pipe(gulp.dest('./build/html'));
34 | });
35 | //执行压缩前,先删除文件夹里的内容
36 | //执行删除的时候不要把目录定在build的子目录中,windows删除目录的同时会报错
37 | gulp.task('clean', function(cb) {
38 | del(['build/css', 'build/js'], cb)
39 | });
40 | //在任务数组中放上面要执行的任务
41 | gulp.task('default', ['clean', 'minify', 'minifycss', 'minifyhtml']);
--------------------------------------------------------------------------------
/gulp/src/css/canvas.css:
--------------------------------------------------------------------------------
1 | body,
2 | div,
3 | ol,
4 | ul,
5 | li,
6 | dl,
7 | dt,
8 | dd,
9 | h1,
10 | h2,
11 | h3,
12 | h4,
13 | h5,
14 | h6,
15 | p,
16 | form,
17 | fieldset,
18 | legend,
19 | input,
20 | a,
21 | img {
22 | margin: 0;
23 | padding: 0;
24 | }
25 | .myCanvasTag {
26 | width: 100%;
27 | height: 100%;
28 | border: 1px blue solid;
29 | }
30 | .bgImg {
31 | width: 100%;
32 | height: 100%;
33 | display: inline;
34 | }
35 | .rw {
36 | position: absolute;
37 | z-index: 10;
38 | display: inline;
39 | left: 0%;
40 | bottom: 150px;
41 | width: 12%;
42 | /*transition-duration: 2s;*/
43 | }
44 | .rwDYM {
45 | position: absolute;
46 | z-index: 10;
47 | display: inline;
48 | left: 0%;
49 | bottom: 150px;
50 | width: 30%;
51 | /*transition-duration: 2s;*/
52 | }
53 | @keyframes Atop {
54 | 0% {
55 | bottom: 150px;
56 | }
57 | 50% {
58 | bottom: 250px;
59 | }
60 | 100% {
61 | bottom: 150px;
62 | }
63 | }
64 |
65 | @keyframes AtopMore {
66 | 0% {
67 | bottom: 150px;
68 | }
69 | 50% {
70 | bottom: 350px;
71 | }
72 | 100% {
73 | bottom: 150px;
74 | }
75 | }
76 | /*.rw:hover{
77 | animation:Atop 0.15s;
78 | }*/
79 |
80 | .rwAtop {
81 | animation: Atop 0.10s;
82 | }
83 |
84 | .rwAtopMore {
85 | animation: AtopMore 0.10s;
86 | }
87 |
88 | .bgRoom {
89 | width: 100%;
90 | position: relative;
91 | /*display: inline;*/
92 | /*margin-bottom: -5px;*/
93 |
94 | overflow: hidden;
95 | line-height: 0px;
96 | }
97 | .FK1 {
98 | position: absolute;
99 | z-index: 10;
100 | bottom: 325px;
101 | left: 5%;
102 | width: 12%;
103 | }
104 | .FK2 {
105 | position: absolute;
106 | z-index: 10;
107 | bottom: 325px;
108 | left: 17%;
109 | width: 12%;
110 | }
111 | .FK3 {
112 | position: absolute;
113 | z-index: 10;
114 | bottom: 325px;
115 | left: 29%;
116 | width: 12%;
117 | }
118 | .FK4 {
119 | position: absolute;
120 | z-index: 10;
121 | bottom: 425px;
122 | left: 41%;
123 | width: 12%;
124 | }
125 | .FK5 {
126 | position: absolute;
127 | z-index: 10;
128 | bottom: 425px;
129 | left: 53%;
130 | width: 12%;
131 | }
132 | .FK6 {
133 | position: absolute;
134 | z-index: 10;
135 | bottom: 325px;
136 | left: 65%;
137 | width: 12%;
138 | }
139 | .FK7 {
140 | position: absolute;
141 | z-index: 10;
142 | bottom: 325px;
143 | left: 77%;
144 | width: 12%
145 | }
146 | .jump {
147 | position: absolute;
148 | z-index: 10;
149 | bottom: 16%;
150 | width: 36%;
151 | left: 32%;
152 | }
153 |
154 | .HB{
155 | position: absolute;
156 | z-index: 10;
157 | top: 10px;
158 | right: 10px;
159 | }
160 |
161 | .HBImg{
162 | width: 10px;
163 | position: relative;
164 | top:2px;
165 | }
166 |
167 | .time{
168 | position: absolute;
169 | z-index: 10;
170 | top: 10px;
171 | right: 80px;
172 | }
173 |
174 | .centerImg{
175 | position: absolute;
176 | z-index: 11;
177 | width:24%;
178 | top:35%;
179 | left: 38%;
180 | }
181 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Gulp
2 |
3 | ## 配置
4 |
5 | 类似于`grunt`,都是基于`Node.js`的前端构建工具。不过gulp压缩效率更高
6 |
7 | 工具和原料
8 |
9 | - [nodejs](http://nodejs.cn/)
10 | - [npm](https://www.npmjs.com/)
11 |
12 | 方法和步骤
13 |
14 | 首先要确保系统上装有`node`,然后在全局环境和项目文件中安装`gulp`
15 | ```bash
16 | npm install gulp -g # global环境
17 | npm install gulp --save-dev # 项目环境
18 | ```
19 | 在项目中安装需要的`gulp`插件,一般只压缩的话需要
20 | ```bash
21 | npm install gulp-minify-css gulp-concat gulp-uglify gulp-rename del --save-dev
22 | ```
23 | 更多插件可以在这个链接中找到 http://gratimax.net/search-gulp-plugins
24 |
25 | 在项目的根目录新建`gulpfile.js`,引入需要的模块
26 |
27 | ```js
28 | var gulp = require('gulp'),
29 | minifycss = require('gulp-minify-css'),
30 | concat = require('gulp-concat'),
31 | uglify = require('gulp-uglify'),
32 | rename = require('gulp-rename'),
33 | del = require('del');
34 | ```
35 | 压缩`css`文件
36 | ```js
37 | gulp.task('minifycss', function() {
38 | return gulp.src('src/*.css') //压缩的文件
39 | .pipe(gulp.dest('minified/css')) //输出文件夹
40 | .pipe(minifycss()); //执行压缩
41 | });
42 | ```
43 | 压缩`js`文件
44 | ```js
45 | gulp.task('minifyjs', function() {
46 | // gulp.src([])可以用数组的形式加载不同格式,不同位置的文件
47 | return gulp.src('src/*.js')
48 | .pipe(concat('main.js')) //合并所有js到main.js
49 | .pipe(gulp.dest('minified/js')) //输出main.js到文件夹
50 | .pipe(rename({suffix: '.min'})) //rename压缩后的文件名
51 | .pipe(uglify()) //压缩
52 | .pipe(gulp.dest('minified/js')); //输出
53 | });
54 | ```
55 | 执行压缩前,先删除文件夹里的内容
56 | ```js
57 | gulp.task('clean', function(cb) {
58 | del(['minified/css', 'minified/js'], cb)
59 | });
60 | ```
61 | 默认命令,在`cmd`中输入`gulp`后,执行的就是这个命令
62 | ```js
63 | gulp.task('default', ['clean'], function() {
64 | gulp.start('minifycss', 'minifyjs');
65 | });
66 | ```
67 |
68 | 然后只要`cmd`中执行`gulp`即可
69 |
70 | ## 插件开发
71 |
72 | 借助`through2`模块处理流,封装一个函数去处理
73 | ```js
74 | var { dest, src } = require('gulp');
75 | var through = require('through2');
76 | src('./input.txt').pipe(((prefix) => {
77 | console.log(prefix)
78 | if (!prefix) {
79 | prefix = "";
80 | }
81 | var prefix = Buffer.from(prefix);
82 | var stream = through.obj(function (file, encoding, callback) {
83 | // 如果file类型不是buffer 退出不做处理
84 | if (!file.isBuffer()) {
85 | return callback();
86 | }
87 | // 将字符串加到文件数据开头
88 | file.contents = Buffer.concat([prefix, file.contents]);
89 | // 确保文件会传给下一个插件
90 | this.push(file);
91 | // 告诉stream引擎,已经处理完成
92 | callback();
93 | });
94 | return stream;
95 | })('')).pipe(dest('./output'));
96 | ```
97 | 开发时候注意要理解流的概念,`through`处理后的`file`对象是一个`vinyl`类型,`vinyl`可以理解为是`buffer`加了路径的类型,如下面这个例子
98 | ```js
99 | var Vinyl = require('vinyl');
100 | var file = new Vinyl({
101 | cwd: '/',
102 | base: '/test/',
103 | path: '/test/file.js',
104 | contents: Buffer.from('Yao')
105 | }); // >
106 | var prefix = Buffer.from('Eno'); //
107 | // bufferData经过through处理为gulp能识别的流形式,再用pipe处理
108 | var bufferData = Buffer.concat([prefix, file.contents]); //
109 | ```
110 | 我们可以使用`file.contents`转化为`Buffer`类型,结合`Buffer.from(string)`和`Buffer.concat()`制作一个新的`Buffer`数据,然后通过`through`处理为`gulp`能识别的流,注意`through`和`stream`的流形式是不兼容的,虽然他们都有`pipe`方法
111 |
--------------------------------------------------------------------------------
/gulp/src/js/app.js:
--------------------------------------------------------------------------------
1 | /*window.onload = function() {
2 | var mycanvas = document.getElementById("myCanvasTag");
3 | var mycontext = mycanvas.getContext('2d');
4 | var img=document.getElementById("bgImg");
5 | mycontext.drawImage(img,10,10);
6 | img = new Image();
7 | img.src = 'img/玛丽场景.png';
8 | img.style.width = '100%';
9 | img.style.height = '100%';
10 | img.onload = function() {
11 | mycontext.drawImage(img,0, 0,300,600);
12 | mycontext.createPattern(img,"no-repeat");
13 | }
14 | }*/
15 | moveX = 0;
16 | //移动速度
17 | moveSpeed = 0.1;
18 | //红包数量
19 | score = 0;
20 | //全游戏剩余时间
21 | time = 60;
22 | //进入大姨妈的剩余时间
23 | DYMtime = 15;
24 | //判断是否大姨妈
25 | isDYM = 1;
26 |
27 | //向前动画,分别为大姨妈和跑步状态
28 | setInterval("ActionRight()", 10);
29 | setInterval("ActionRightDYM()", 10);
30 | //大姨妈每秒减1s
31 | setInterval("DYMDecreaseTime()", 1000);
32 |
33 | window.onload = function() {}
34 |
35 | function ActionJump(obj) {
36 | // alert(123);
37 | var rw = document.getElementById('rw');
38 | console.log(123);
39 | rw.style.left = '20px';
40 | // obj.style.left = '10px';
41 | };
42 |
43 |
44 | function ActionRight() {
45 | var rw = document.getElementById('rw');
46 | var rwDYM = document.getElementById('rwDYM');
47 | var bgRoom = document.getElementById('bgRoom');
48 | // directX = 1;
49 | // console.log("向前");
50 | // var moveX = 0;
51 | moveX += moveSpeed;
52 | rw.style.left = moveX + '%';
53 | /*px情况用offsetleft和offsetWidth*/
54 | /*rw.style.left = moveX + 'px';*/
55 | //重跑
56 | /*if (moveX + rw.offsetLeft >= 2 * bgRoom.offsetWidth) {
57 | moveX -= moveX;
58 | }*/
59 | if (rw.offsetLeft >= bgRoom.offsetWidth) {
60 | moveX -= moveX;
61 | }
62 | /*if(bgRoom.style.left >= '100%'){
63 | moveX -= moveX;
64 | }*/
65 | /*if (ballY + div2.offsetHeight >= div1.offsetHeight || ballY <= 0) {
66 | directY = -directY;
67 | }*/
68 | };
69 |
70 | function ActionRightDYM() {
71 | var rwDYM = document.getElementById('rwDYM');
72 | var bgRoom = document.getElementById('bgRoom');
73 | // directX = 1;
74 | // console.log("向前");
75 | // var moveX = 0;
76 | moveX += moveSpeed;
77 | rwDYM.style.left = moveX + '%';
78 | /*px情况用offsetleft和offsetWidth*/
79 | /*rw.style.left = moveX + 'px';*/
80 | //重跑
81 | /*if (moveX + rw.offsetLeft >= 2 * bgRoom.offsetWidth) {
82 | moveX -= moveX;
83 | }*/
84 | if (rwDYM.offsetLeft >= bgRoom.offsetWidth) {
85 | moveX -= moveX;
86 | }
87 | /*if(bgRoom.style.left >= '100%'){
88 | moveX -= moveX;
89 | }*/
90 | /*if (ballY + div2.offsetHeight >= div1.offsetHeight || ballY <= 0) {
91 | directY = -directY;
92 | }*/
93 | };
94 |
95 |
96 | function ActionTop() {
97 | /*var rw = document.getElementById('rw');
98 | rw.style.transitionProperty = "height";
99 | rw.transitionDuration = "2s";*/
100 | var rw = document.getElementById('rw');
101 | var scoreRoute = rw.style.left;
102 |
103 | function rwAtop() {
104 | $('#rw').addClass('rwAtop');
105 | setTimeout("$('#rw').removeClass('rwAtop')", 100);
106 | }
107 |
108 | function rwAtopMore() {
109 | $('#rw').addClass('rwAtopMore');
110 | setTimeout("$('#rw').removeClass('rwAtopMore')", 100);
111 | }
112 | //var scoreRoute = rw.offsetLeft;
113 |
114 | // if(scoreRoute<)
115 | // $('#rw').removeClass('rwAtop');
116 | if (scoreRoute <= '14%' && scoreRoute >= '0') {
117 | rwAtop();
118 | score -= 1;
119 | // alert("1");
120 | };
121 | if (scoreRoute <= '26%' && scoreRoute > '14%') {
122 | rwAtop();
123 | score += 1;
124 | // alert("2");
125 | };
126 | if (scoreRoute <= '38%' && scoreRoute > '26%') {
127 | rwAtop();
128 | score += 1;
129 | // alert("3");
130 | };
131 | if (scoreRoute <= '50%' && scoreRoute > '38%') {
132 | rwAtopMore();
133 | score += 1;
134 | // alert("4");
135 | };
136 | if (scoreRoute <= '57%' && scoreRoute > '50%') {
137 | rwAtopMore();
138 | // alert("5");
139 | };
140 | if (scoreRoute <= '74%' && scoreRoute > '57%') {
141 | rwAtop();
142 | // alert("6");
143 | };
144 | if (scoreRoute <= '87%' && scoreRoute > '74%') {
145 | rwAtop();
146 | // alert("7");
147 | };
148 | if (scoreRoute <= '100%' && scoreRoute > '87%') {
149 | rwAtop();
150 | // alert("7");
151 | };
152 | }
153 |
154 | //setInterval(console.log(time), 1000);
155 |
156 | //倒计时
157 | function timeLess() {
158 | time = time - 1;
159 | if (time <= 0) {
160 | // window.location.href = "1.html";
161 | };
162 | };
163 |
164 | function speedBack() {
165 | moveSpeed = 0.20;
166 | }
167 |
168 | function changeStyle() {
169 | var rwDYM = document.getElementById('rwDYM');
170 | var rw = document.getElementById('rw');
171 | rwDYM.style.display = 'block';
172 | rw.style.display = 'none';
173 | setTimeout("DYMBack()", 4000);
174 | return 0;
175 | };
176 |
177 | function changeStyleBack() {
178 | var rwDYM = document.getElementById('rwDYM');
179 | var rw = document.getElementById('rw');
180 | rwDYM.style.display = 'none';
181 | rw.style.display = 'block';
182 | return 1;
183 | };
184 |
185 | //var isDYM = changeStyle();
186 |
187 | function DYMDecreaseTime() {
188 | if (DYMtime > 15) {
189 | DYMtime = 15;
190 | }
191 | if (DYMtime <= 15 && DYMtime >= 0) {
192 | DYMtime -= 1;
193 | console.log('剩余多少时间变成大姨妈 ' + DYMtime);
194 | }
195 | if (DYMtime < 0) {
196 | isDYM = changeStyle();
197 | console.log('变成大姨妈了 ' + isDYM);
198 | };
199 | };
200 |
201 |
202 | function DYMBack() {
203 | isDYM = 1;
204 | DYMtime = 15;
205 | changeStyleBack();
206 | }
207 | //大姨妈
208 |
209 | function dym() {
210 | setTimeout("changeStyle()", 1500);
211 | var rwDYM = document.getElementById('rwDYM');
212 | var rw = document.getElementById('rw');
213 | rwDYM.style.display = 'none';
214 | rw.style.display = 'block';
215 | DYMtime += 15;
216 | return true;
217 | }
218 |
219 | //dym();
220 |
221 | var myApp = angular.module('myAppp', [])
222 | myApp.controller('personController', function($scope) {
223 | $scope.person = {
224 | firstName: "John",
225 | lastName: "Doe",
226 | fullName: function() {
227 | var x = $scope.person;
228 | return x.firstName + " " + x.lastName;
229 | }
230 | };
231 | $scope.name = "yjl";
232 | $scope.scoreFS = 0;
233 | //任务状态切换
234 | $scope.rw = "img/玛丽游戏中奔跑.gif";
235 | $scope.rwDYM = "img/玛丽-来了大姨妈2.gif";
236 |
237 |
238 | setInterval("timeLess()", 1000);
239 | setInterval("console.log(time)", 1000);
240 | // $scope.time = time;
241 | $scope.time = time;
242 |
243 |
244 | $scope.score = function() {
245 | if (isDYM) {
246 | var rw = document.getElementById('rw');
247 | var scoreRoute = rw.style.left;
248 |
249 | function rwAtop() {
250 | $('#rw').addClass('rwAtop');
251 | setTimeout("$('#rw').removeClass('rwAtop')", 100);
252 | }
253 |
254 | function rwAtopMore() {
255 | $('#rw').addClass('rwAtopMore');
256 | setTimeout("$('#rw').removeClass('rwAtopMore')", 100);
257 | }
258 |
259 |
260 | if (scoreRoute <= '14%' && scoreRoute >= '-12%') {
261 | rwAtop();
262 | $scope.scoreFS -= 1;
263 | };
264 | if (scoreRoute <= '26%' && scoreRoute > '14%') {
265 | rwAtop();
266 | $scope.scoreFS += 1;
267 | };
268 | if (scoreRoute <= '38%' && scoreRoute > '26%') {
269 | rwAtop();
270 | $scope.scoreFS += 1;
271 | };
272 | if (scoreRoute <= '50%' && scoreRoute > '38%') {
273 | rwAtopMore();
274 | $scope.scoreFS += 1;
275 | };
276 | if (scoreRoute <= '57%' && scoreRoute > '50%') {
277 | rwAtopMore();
278 | $scope.scoreFS += 1;
279 | moveSpeed = 0.2;
280 | DYMtime += 15;
281 | setTimeout("speedBack()", 15000);
282 | };
283 | if (scoreRoute <= '74%' && scoreRoute > '57%') {
284 | rwAtop();
285 | $scope.scoreFS += 1;
286 | };
287 | if (scoreRoute <= '87%' && scoreRoute > '74%') {
288 | rwAtop();
289 | $scope.scoreFS -= 1;
290 | };
291 | if (scoreRoute <= '100%' && scoreRoute > '87%') {
292 | rwAtop();
293 | };
294 | } else {
295 |
296 | }
297 | }
298 | });
--------------------------------------------------------------------------------