Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DF-L204
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
DF-L204
Commits
1b194dd4
Commit
1b194dd4
authored
Jun 03, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复缩放问题,及变换屏幕大小导致无法点击问题
parent
54b8028f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
240 additions
and
351 deletions
+240
-351
play.component.ts
src/app/play/play.component.ts
+230
-224
yarn.lock
yarn.lock
+10
-127
No files found.
src/app/play/play.component.ts
View file @
1b194dd4
import
{
Component
,
ElementRef
,
ViewChild
,
OnInit
,
Input
,
OnDestroy
,
HostListener
}
from
'
@angular/core
'
;
import
{
Component
,
ElementRef
,
ViewChild
,
OnInit
,
Input
,
OnDestroy
,
HostListener
}
from
'
@angular/core
'
;
import
{
import
{
Label
,
Label
,
...
@@ -10,10 +10,10 @@ import {
...
@@ -10,10 +10,10 @@ import {
angleToRadian
,
angleToRadian
,
getPosByAngle
getPosByAngle
}
from
'
./Unit
'
;
}
from
'
./Unit
'
;
import
{
res
,
resAudio
}
from
'
./resources
'
;
import
{
res
,
resAudio
}
from
'
./resources
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
Subject
}
from
'
rxjs
'
;
import
{
debounceTime
}
from
'
rxjs/operators
'
;
import
{
debounceTime
}
from
'
rxjs/operators
'
;
import
TWEEN
from
'
@tweenjs/tween.js
'
;
import
TWEEN
from
'
@tweenjs/tween.js
'
;
...
@@ -27,8 +27,8 @@ import TWEEN from '@tweenjs/tween.js';
...
@@ -27,8 +27,8 @@ import TWEEN from '@tweenjs/tween.js';
})
})
export
class
PlayComponent
implements
OnInit
,
OnDestroy
{
export
class
PlayComponent
implements
OnInit
,
OnDestroy
{
@
ViewChild
(
'
canvas
'
,
{
static
:
true
})
canvas
:
ElementRef
;
@
ViewChild
(
'
canvas
'
,
{
static
:
true
})
canvas
:
ElementRef
;
@
ViewChild
(
'
wrap
'
,
{
static
:
true
})
wrap
:
ElementRef
;
@
ViewChild
(
'
wrap
'
,
{
static
:
true
})
wrap
:
ElementRef
;
// 数据
// 数据
data
;
data
;
...
@@ -131,13 +131,13 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -131,13 +131,13 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
data
=
{};
this
.
data
=
{};
// 获取数据
// 获取数据
const
getData
=
(
<
any
>
window
).
courseware
.
getData
;
const
getData
=
(
<
any
>
window
).
courseware
.
getData
;
getData
((
data
)
=>
{
getData
((
data
)
=>
{
if
(
data
&&
typeof
data
==
'
object
'
)
{
if
(
data
&&
typeof
data
==
'
object
'
)
{
this
.
data
=
data
;
this
.
data
=
data
;
}
}
console
.
log
(
'
data:
'
,
data
);
console
.
log
(
'
data:
'
,
data
);
// 初始化 各事件监听
// 初始化 各事件监听
this
.
initListener
();
this
.
initListener
();
...
@@ -178,8 +178,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -178,8 +178,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initCtx
();
this
.
initCtx
();
this
.
initData
();
this
.
initData
();
this
.
initView
();
this
.
initView
();
this
.
playAudio
(
'
begin
'
,
false
,
()
=>
{
this
.
playAudio
(
'
begin
'
,
false
,
()
=>
{
//this.canTouch = true;
//this.canTouch = true;
});
});
/*
/*
...
@@ -350,7 +350,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -350,7 +350,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
}
}
pauseAudio
(
key
,
callback
=
null
){
pauseAudio
(
key
,
callback
=
null
)
{
const
audio
=
this
.
audioObj
[
key
];
const
audio
=
this
.
audioObj
[
key
];
if
(
audio
)
{
if
(
audio
)
{
...
@@ -438,7 +438,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -438,7 +438,7 @@ export class PlayComponent implements OnInit, OnDestroy {
getWorlRect
(
target
)
{
getWorlRect
(
target
)
{
let
rect
=
target
.
getBoundingBox
();
let
rect
=
target
.
getBoundingBox
();
if
(
target
.
parent
)
{
if
(
target
.
parent
)
{
const
pRect
=
this
.
getWorlRect
(
target
.
parent
);
const
pRect
=
this
.
getWorlRect
(
target
.
parent
);
...
@@ -506,23 +506,23 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -506,23 +506,23 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
*/
initDefaultData
()
{
initDefaultData
()
{
if
(
!
this
.
data
.
exercises
)
{
if
(
!
this
.
data
.
exercises
)
{
this
.
data
.
exercises
=
[];
this
.
data
.
exercises
=
[];
let
exercises
=
{
contents
:[]
};
let
exercises
=
{
contents
:
[]
};
for
(
let
i
=
0
;
i
<
5
;
++
i
)
{
for
(
let
i
=
0
;
i
<
5
;
++
i
)
{
let
contentItem
;
let
contentItem
;
if
(
i
%
2
==
0
)
{
if
(
i
%
2
==
0
)
{
contentItem
=
this
.
getDefaultContentItem
(
''
,
'
assets/play/lion.png
'
);
contentItem
=
this
.
getDefaultContentItem
(
''
,
'
assets/play/lion.png
'
);
}
}
else
if
(
i
%
3
==
0
)
{
else
if
(
i
%
3
==
0
)
{
contentItem
=
this
.
getDefaultContentItem
(
''
,
'
assets/play/monkey.png
'
);
contentItem
=
this
.
getDefaultContentItem
(
''
,
'
assets/play/monkey.png
'
);
}
}
else
{
else
{
contentItem
=
this
.
getDefaultContentItem
(
'
Lion
'
,
null
);
contentItem
=
this
.
getDefaultContentItem
(
'
Lion
'
,
null
);
}
}
console
.
log
(
contentItem
);
console
.
log
(
contentItem
);
...
@@ -538,11 +538,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -538,11 +538,11 @@ export class PlayComponent implements OnInit, OnDestroy {
* @param text
* @param text
* @param pic_url
* @param pic_url
*/
*/
getDefaultContentItem
(
text
,
pic_url
){
getDefaultContentItem
(
text
,
pic_url
)
{
let
content
=
{
let
content
=
{
val
:
text
,
val
:
text
,
pic_url
:
pic_url
,
pic_url
:
pic_url
,
audio_url
:
this
.
rawAudios
.
get
(
'
click
'
)
audio_url
:
this
.
rawAudios
.
get
(
'
click
'
)
}
}
return
content
;
return
content
;
...
@@ -553,11 +553,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -553,11 +553,11 @@ export class PlayComponent implements OnInit, OnDestroy {
*/
*/
initImg
()
{
initImg
()
{
for
(
let
i
=
0
;
i
<
this
.
data
.
exercises
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
data
.
exercises
.
length
;
++
i
)
{
let
exercises
=
this
.
data
.
exercises
[
i
];
let
exercises
=
this
.
data
.
exercises
[
i
];
for
(
let
j
=
0
;
j
<
exercises
.
contents
.
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
exercises
.
contents
.
length
;
++
j
)
{
let
content
=
exercises
.
contents
[
j
];
let
content
=
exercises
.
contents
[
j
];
this
.
addUrlToImages
(
content
.
pic_url
);
this
.
addUrlToImages
(
content
.
pic_url
);
...
@@ -579,18 +579,18 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -579,18 +579,18 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
addUrlToAudioObj
(
'
pop-up
'
,
this
.
rawAudios
.
get
(
'
pop-up
'
));
this
.
addUrlToAudioObj
(
'
pop-up
'
,
this
.
rawAudios
.
get
(
'
pop-up
'
));
for
(
let
i
=
0
;
i
<
this
.
data
.
exercises
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
data
.
exercises
.
length
;
++
i
)
{
let
exercises
=
this
.
data
.
exercises
[
i
];
let
exercises
=
this
.
data
.
exercises
[
i
];
for
(
let
j
=
0
;
j
<
exercises
.
contents
.
length
;
++
j
)
{
for
(
let
j
=
0
;
j
<
exercises
.
contents
.
length
;
++
j
)
{
let
content
=
exercises
.
contents
[
j
];
let
content
=
exercises
.
contents
[
j
];
this
.
addUrlToAudioObj
(
content
.
audio_url
);
this
.
addUrlToAudioObj
(
content
.
audio_url
);
}
}
}
}
}
}
...
@@ -606,9 +606,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -606,9 +606,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
s
=
Math
.
min
(
sx
,
sy
);
const
s
=
Math
.
min
(
sx
,
sy
);
this
.
mapScale
=
s
;
this
.
mapScale
=
s
;
this
.
cardOuterR
=
this
.
cardOuterR
*
this
.
mapScale
;
console
.
log
(
'
mapsacle:
'
,
this
.
mapScale
);
this
.
cardInerR
=
this
.
cardInerR
*
this
.
mapScale
;
this
.
renderArr
=
[];
this
.
renderArr
=
[];
...
@@ -618,6 +616,24 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -618,6 +616,24 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
curContents
=
[];
this
.
curContents
=
[];
this
.
multiple
=
2
;
this
.
temp_multiple
=
0
;
//卡片半径
this
.
cardOuterR
=
90
;
//卡片内半径
this
.
cardInerR
=
70
;
this
.
maxWidth
=
450
;
this
.
initRotaryTableScale
=
0.1
;
this
.
cardOuterR
=
this
.
cardOuterR
*
this
.
mapScale
;
this
.
cardInerR
=
this
.
cardInerR
*
this
.
mapScale
;
this
.
initRotaryTableScale
=
this
.
initRotaryTableScale
*
this
.
mapScale
;
this
.
initRotaryTableScale
=
this
.
initRotaryTableScale
*
this
.
mapScale
;
this
.
maxWidth
=
this
.
maxWidth
*
this
.
mapScale
;
this
.
maxWidth
=
this
.
maxWidth
*
this
.
mapScale
;
...
@@ -630,6 +646,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -630,6 +646,8 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
temp_multiple
=
this
.
multiple
*
(
1
+
Math
.
random
());
this
.
temp_multiple
=
this
.
multiple
*
(
1
+
Math
.
random
());
this
.
playingStatus
=
false
;
this
.
playingStatus
=
false
;
this
.
first
=
true
;
}
}
...
@@ -661,16 +679,16 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -661,16 +679,16 @@ export class PlayComponent implements OnInit, OnDestroy {
let
btn_go_val
=
new
Label
();
let
btn_go_val
=
new
Label
();
btn_go_val
.
text
=
"
Go
"
;
btn_go_val
.
text
=
"
Go
"
;
btn_go_val
.
textAlign
=
'
middle
'
;
btn_go_val
.
textAlign
=
'
middle
'
;
btn_go_val
.
fontSize
=
50
;
btn_go_val
.
fontSize
=
50
;
btn_go_val
.
fontName
=
"
BRLNSDB
"
;
btn_go_val
.
fontName
=
"
BRLNSDB
"
;
btn_go_val
.
fontColor
=
"
#FFFFFF
"
;
btn_go_val
.
fontColor
=
"
#FFFFFF
"
;
btn_go_val
.
refreshSize
();
btn_go_val
.
refreshSize
();
btn_go_val
.
x
=
-
btn_go_val
.
width
/
2
;
btn_go_val
.
x
=
-
btn_go_val
.
width
/
2
;
this
.
btn_go
.
addChild
(
btn_go_val
);
this
.
btn_go
.
addChild
(
btn_go_val
);
this
.
btn_go_val
=
btn_go_val
;
this
.
btn_go_val
=
btn_go_val
;
}
}
...
@@ -689,17 +707,17 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -689,17 +707,17 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initRotaryTable
();
this
.
initRotaryTable
();
}
}
/**
/**
* 初始化转盘
* 初始化转盘
*/
*/
initRotaryTable
(){
initRotaryTable
()
{
const
light_pic
=
new
MySprite
();
const
light_pic
=
new
MySprite
();
light_pic
.
init
(
this
.
images
.
get
(
'
light
'
));
light_pic
.
init
(
this
.
images
.
get
(
'
light
'
));
light_pic
.
alpha
=
0
;
light_pic
.
alpha
=
0
;
light_pic
.
x
=
this
.
canvasWidth
/
2
;
light_pic
.
x
=
this
.
canvasWidth
/
2
;
light_pic
.
y
=
this
.
canvasHeight
/
2
;
light_pic
.
y
=
this
.
canvasHeight
/
2
;
light_pic
.
setScaleXY
(
this
.
mapScale
);
light_pic
.
setScaleXY
(
this
.
mapScale
);
this
.
light_pic
=
light_pic
;
this
.
light_pic
=
light_pic
;
this
.
renderArr
.
push
(
light_pic
);
this
.
renderArr
.
push
(
light_pic
);
...
@@ -708,8 +726,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -708,8 +726,8 @@ export class PlayComponent implements OnInit, OnDestroy {
rotaryTable
.
setRadius
(
150
*
this
.
mapScale
);
rotaryTable
.
setRadius
(
150
*
this
.
mapScale
);
rotaryTable
.
x
=
this
.
canvasWidth
/
2
;
rotaryTable
.
x
=
this
.
canvasWidth
/
2
;
rotaryTable
.
y
=
this
.
canvasHeight
/
2
;
rotaryTable
.
y
=
this
.
canvasHeight
/
2
;
rotaryTable
.
alpha
=
0
;
rotaryTable
.
alpha
=
0
;
this
.
rotaryTable
=
rotaryTable
;
this
.
rotaryTable
=
rotaryTable
;
...
@@ -718,8 +736,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -718,8 +736,8 @@ export class PlayComponent implements OnInit, OnDestroy {
rotaryTable2
.
setRadius
(
150
*
this
.
mapScale
);
rotaryTable2
.
setRadius
(
150
*
this
.
mapScale
);
rotaryTable2
.
x
=
this
.
canvasWidth
/
2
;
rotaryTable2
.
x
=
this
.
canvasWidth
/
2
;
rotaryTable2
.
y
=
this
.
canvasHeight
/
2
;
rotaryTable2
.
y
=
this
.
canvasHeight
/
2
;
rotaryTable2
.
alpha
=
0
;
rotaryTable2
.
alpha
=
0
;
this
.
rotaryTable2
=
rotaryTable2
;
this
.
rotaryTable2
=
rotaryTable2
;
...
@@ -728,7 +746,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -728,7 +746,7 @@ export class PlayComponent implements OnInit, OnDestroy {
rotate_shadow_pic
.
init
(
this
.
images
.
get
(
'
rotate_shadow
'
));
rotate_shadow_pic
.
init
(
this
.
images
.
get
(
'
rotate_shadow
'
));
rotate_shadow_pic
.
alpha
=
0
;
rotate_shadow_pic
.
alpha
=
0
;
rotate_shadow_pic
.
x
=
0
;
rotate_shadow_pic
.
x
=
0
;
rotate_shadow_pic
.
y
=
rotaryTable2
.
height
/
2
+
this
.
cardOuterR
;
rotate_shadow_pic
.
y
=
rotaryTable2
.
height
/
2
+
this
.
cardOuterR
;
this
.
rotate_shadow_pic
=
rotate_shadow_pic
;
this
.
rotate_shadow_pic
=
rotate_shadow_pic
;
rotaryTable2
.
addChild
(
rotate_shadow_pic
);
rotaryTable2
.
addChild
(
rotate_shadow_pic
);
...
@@ -736,12 +754,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -736,12 +754,12 @@ export class PlayComponent implements OnInit, OnDestroy {
choic_shadow_pic
.
init
(
this
.
images
.
get
(
'
choice_shadow
'
));
choic_shadow_pic
.
init
(
this
.
images
.
get
(
'
choice_shadow
'
));
choic_shadow_pic
.
alpha
=
0
;
choic_shadow_pic
.
alpha
=
0
;
choic_shadow_pic
.
x
=
0
;
choic_shadow_pic
.
x
=
0
;
choic_shadow_pic
.
y
=
rotaryTable2
.
height
/
2
+
this
.
cardOuterR
;
choic_shadow_pic
.
y
=
rotaryTable2
.
height
/
2
+
this
.
cardOuterR
;
choic_shadow_pic
.
setScaleXY
(
0
);
choic_shadow_pic
.
setScaleXY
(
0
);
this
.
choic_shadow_pic
=
choic_shadow_pic
;
this
.
choic_shadow_pic
=
choic_shadow_pic
;
rotaryTable2
.
addChild
(
choic_shadow_pic
);
rotaryTable2
.
addChild
(
choic_shadow_pic
);
this
.
initExercises
();
this
.
initExercises
();
...
@@ -752,50 +770,50 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -752,50 +770,50 @@ export class PlayComponent implements OnInit, OnDestroy {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
let
content
=
this
.
curContents
[
i
];
let
content
=
this
.
curContents
[
i
];
//由小变大
//由小变大
tweenChange
(
content
.
card
,
{
scaleX
:
content
.
initScale
,
scaleY
:
content
.
initScale
},
0.5
,
()
=>
{
tweenChange
(
content
.
card
,
{
scaleX
:
content
.
initScale
,
scaleY
:
content
.
initScale
},
0.5
,
()
=>
{
this
.
canTouch
=
true
;
this
.
canTouch
=
true
;
});
});
}
}
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
let
shadow
=
this
.
shadows
[
i
];
let
shadow
=
this
.
shadows
[
i
];
let
scale
=
shadow
.
scale
;
let
scale
=
shadow
.
scale
;
tweenChange
(
shadow
.
pic
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
,
()
=>
{
tweenChange
(
shadow
.
pic
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
,
()
=>
{
this
.
canTouch
=
true
;
this
.
canTouch
=
true
;
});
});
}
}
},
500
);
},
500
);
}
}
initExercises
(){
initExercises
()
{
if
(
!
this
.
data
.
exercises
)
{
if
(
!
this
.
data
.
exercises
)
{
return
;
return
;
}
}
//结束整个练习则不再初始化
//结束整个练习则不再初始化
if
(
this
.
nextExercisesIndex
==
this
.
data
.
exercises
.
length
)
{
if
(
this
.
nextExercisesIndex
==
this
.
data
.
exercises
.
length
)
{
return
;
return
;
}
}
this
.
curExercises
=
this
.
data
.
exercises
[
this
.
nextExercisesIndex
];
this
.
curExercises
=
this
.
data
.
exercises
[
this
.
nextExercisesIndex
];
//循环处初始化卡片内容
//循环处初始化卡片内容
for
(
let
i
=
0
;
i
<
this
.
curExercises
.
contents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curExercises
.
contents
.
length
;
++
i
)
{
let
content
=
this
.
curExercises
.
contents
[
i
];
let
content
=
this
.
curExercises
.
contents
[
i
];
let
tContent
=
{
card
:
null
,
audio_url
:
null
,
card_show
:
null
,
card_choice
:
null
};
let
tContent
=
{
card
:
null
,
audio_url
:
null
,
card_show
:
null
,
card_choice
:
null
};
let
contentCard
=
this
.
getContentCard
(
content
,
tContent
);
let
contentCard
=
this
.
getContentCard
(
content
,
tContent
);
...
@@ -810,7 +828,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -810,7 +828,7 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
//计算角度
//计算角度
if
(
!
this
.
curContents
)
{
if
(
!
this
.
curContents
)
{
return
;
return
;
}
}
...
@@ -818,55 +836,43 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -818,55 +836,43 @@ export class PlayComponent implements OnInit, OnDestroy {
let
card_r
=
this
.
cardOuterR
;
let
card_r
=
this
.
cardOuterR
;
//圆盘半径
//圆盘半径
let
rotaryTable_r
=
this
.
rotaryTable
.
getBoundingBox
().
width
/
2
;
let
rotaryTable_r
=
this
.
rotaryTable
.
getBoundingBox
().
width
/
2
;
//间隔角度
//间隔角度
let
interval_angle
=
Math
.
floor
(
360
/
this
.
curContents
.
length
);
let
interval_angle
=
Math
.
floor
(
360
/
this
.
curContents
.
length
);
//console.log('interval_angle', interval_angle);
let
max_radian
=
angleToRadian
(
interval_angle
/
4
);
let
max_radian
=
angleToRadian
(
interval_angle
/
4
);
//计算卡片最大半径
//计算卡片最大半径
let
max_radius
=
2
*
Math
.
sin
(
max_radian
)
*
rotaryTable_r
-
10
;
let
max_radius
=
2
*
Math
.
sin
(
max_radian
)
*
rotaryTable_r
-
10
*
this
.
mapScale
;
//console.log('sin', Math.sin(max_radian));
//console.log('max radius', max_radius)
;
let
scale
=
1
;
//
获取角度对应的弧长
//
如果弦长小于卡片直径,则缩小卡片半径
let
arc_length
=
this
.
rotaryTable
.
getBoundingBox
().
width
*
Math
.
PI
/
this
.
curContents
.
length
;
if
(
max_radius
<
card_r
)
{
//console.log('arc length', arc_length);
let
scale
=
this
.
mapScale
;
//如果弧长小于卡片直径,则缩小卡片半径
if
(
max_radius
<
card_r
){
scale
=
max_radius
/
card_r
;
scale
=
max_radius
/
card_r
;
console
.
log
(
'
new scale:
'
,
scale
);
console
.
log
(
'
new scale:
'
,
scale
);
}
}
let
start_angle
=
0
;
let
start_angle
=
0
;
//计算坐标
//计算坐标
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
let
content
=
this
.
curContents
[
i
];
let
content
=
this
.
curContents
[
i
];
let
pos
=
getPosByAngle
(
start_angle
,
rotaryTable_r
);
let
pos
=
getPosByAngle
(
start_angle
,
rotaryTable_r
);
content
.
card
.
x
=
pos
.
x
;
content
.
card
.
x
=
pos
.
x
;
content
.
card
.
y
=
pos
.
y
;
content
.
card
.
y
=
pos
.
y
;
content
.
card
.
setScaleXY
(
scale
);
this
.
setShadow
(
content
.
card
);
this
.
setShadow
(
content
.
card
);
//记录初始x坐标
//记录初始x坐标
content
.
initX
=
pos
.
x
;
content
.
initX
=
pos
.
x
;
...
@@ -889,9 +895,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -889,9 +895,9 @@ export class PlayComponent implements OnInit, OnDestroy {
* 获取卡片
* 获取卡片
* @param content 练习题内容
* @param content 练习题内容
*/
*/
getContentCard
(
content
,
contentObj
){
getContentCard
(
content
,
contentObj
)
{
const
card_bg
=
new
ShapeCircle
();
const
card_bg
=
new
ShapeCircle
();
card_bg
.
setRadius
(
this
.
cardOuterR
);
card_bg
.
setRadius
(
this
.
cardOuterR
);
...
@@ -905,7 +911,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -905,7 +911,7 @@ export class PlayComponent implements OnInit, OnDestroy {
//卡片
//卡片
contentCard
.
init
(
this
.
images
.
get
(
'
card-3x
'
));
contentCard
.
init
(
this
.
images
.
get
(
'
card-3x
'
));
card_bg
.
addChild
(
contentCard
);
card_bg
.
addChild
(
contentCard
);
let
w
=
contentCard
.
width
;
let
w
=
contentCard
.
width
;
...
@@ -919,12 +925,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -919,12 +925,12 @@ export class PlayComponent implements OnInit, OnDestroy {
const
choiceCard
=
new
MySprite
();
const
choiceCard
=
new
MySprite
();
{
{
//卡片
//卡片
choiceCard
.
init
(
this
.
images
.
get
(
'
choice_card
'
));
choiceCard
.
init
(
this
.
images
.
get
(
'
choice_card
'
));
choiceCard
.
alpha
=
0
;
choiceCard
.
alpha
=
0
;
card_bg
.
addChild
(
choiceCard
);
card_bg
.
addChild
(
choiceCard
);
choiceCard
.
setScaleXY
(
card_scacle
);
choiceCard
.
setScaleXY
(
card_scacle
);
...
@@ -932,10 +938,10 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -932,10 +938,10 @@ export class PlayComponent implements OnInit, OnDestroy {
contentObj
.
card_choice
=
choiceCard
;
contentObj
.
card_choice
=
choiceCard
;
}
}
//图片存在,则渲染图片
//图片存在,则渲染图片
if
(
content
.
pic_url
)
{
if
(
content
.
pic_url
)
{
const
content_pic
=
new
MySprite
();
const
content_pic
=
new
MySprite
();
content_pic
.
init
(
this
.
images
.
get
(
content
.
pic_url
));
content_pic
.
init
(
this
.
images
.
get
(
content
.
pic_url
));
...
@@ -943,36 +949,36 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -943,36 +949,36 @@ export class PlayComponent implements OnInit, OnDestroy {
let
h
=
content_pic
.
height
;
let
h
=
content_pic
.
height
;
let
d
=
Math
.
sqrt
(
w
*
w
+
h
*
h
);
let
d
=
Math
.
sqrt
(
w
*
w
+
h
*
h
);
content_pic
.
setScaleXY
((
contentCard
.
width
-
75
)
/
d
);
content_pic
.
setScaleXY
((
contentCard
.
width
-
75
)
/
d
);
content_pic
.
x
=
0
;
content_pic
.
x
=
0
;
content_pic
.
y
=
0
;
content_pic
.
y
=
0
;
contentCard
.
addChild
(
content_pic
);
contentCard
.
addChild
(
content_pic
);
choiceCard
.
addChild
(
content_pic
);
choiceCard
.
addChild
(
content_pic
);
}
}
else
{
else
{
let
content_val
=
new
Label
();
let
content_val
=
new
Label
();
content_val
.
text
=
content
.
val
;
content_val
.
text
=
content
.
val
;
content_val
.
textAlign
=
'
middle
'
;
content_val
.
textAlign
=
'
middle
'
;
content_val
.
fontSize
=
50
;
content_val
.
fontSize
=
50
;
content_val
.
fontName
=
"
BRLNSDB
"
;
content_val
.
fontName
=
"
BRLNSDB
"
;
content_val
.
fontColor
=
"
#e05e14
"
;
content_val
.
fontColor
=
"
#e05e14
"
;
content_val
.
refreshSize
();
content_val
.
refreshSize
();
this
.
setFontSize
(
contentCard
.
width
-
60
,
content_val
);
this
.
setFontSize
(
contentCard
.
width
-
60
,
content_val
);
content_val
.
refreshSize
();
content_val
.
refreshSize
();
content_val
.
x
=
-
content_val
.
getBoundingBox
().
width
/
2
;
content_val
.
x
=
-
content_val
.
getBoundingBox
().
width
/
2
;
contentCard
.
addChild
(
content_val
);
contentCard
.
addChild
(
content_val
);
choiceCard
.
addChild
(
content_val
);
choiceCard
.
addChild
(
content_val
);
}
}
contentCard
.
childDepandAlpha
=
true
;
contentCard
.
childDepandAlpha
=
true
;
...
@@ -981,9 +987,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -981,9 +987,9 @@ export class PlayComponent implements OnInit, OnDestroy {
return
card_bg
;
return
card_bg
;
}
}
setFontSize
(
parWidth
,
label
:
Label
){
setFontSize
(
parWidth
,
label
:
Label
)
{
if
(
!
label
)
{
if
(
!
label
)
{
return
;
return
;
}
}
...
@@ -991,20 +997,20 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -991,20 +997,20 @@ export class PlayComponent implements OnInit, OnDestroy {
let
h
=
label
.
height
;
let
h
=
label
.
height
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
//如果宽度超过,则缩小字体
//如果宽度超过,则缩小字体
if
(
r
>
parWidth
/
2
)
{
if
(
r
>
parWidth
/
2
)
{
this
.
shrinkFont
(
parWidth
,
label
);
this
.
shrinkFont
(
parWidth
,
label
);
}
}
else
{
else
{
this
.
magnifyingFontSize
(
parWidth
,
label
);
this
.
magnifyingFontSize
(
parWidth
,
label
);
}
}
}
}
shrinkFont
(
parWidth
,
label
:
Label
){
shrinkFont
(
parWidth
,
label
:
Label
)
{
if
(
!
label
)
{
if
(
!
label
)
{
return
;
return
;
}
}
...
@@ -1012,11 +1018,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1012,11 +1018,11 @@ export class PlayComponent implements OnInit, OnDestroy {
let
h
=
label
.
height
;
let
h
=
label
.
height
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
//如果宽度超过,则缩小字体
//如果宽度超过,则缩小字体
if
(
r
>
parWidth
/
2
)
{
if
(
r
>
parWidth
/
2
)
{
let
fontSize
=
label
.
fontSize
;
let
fontSize
=
label
.
fontSize
;
fontSize
=
fontSize
-
2
;
fontSize
=
fontSize
-
2
;
...
@@ -1031,9 +1037,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1031,9 +1037,9 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
}
}
magnifyingFontSize
(
parWidth
,
label
:
Label
){
magnifyingFontSize
(
parWidth
,
label
:
Label
)
{
if
(
!
label
)
{
if
(
!
label
)
{
return
;
return
;
}
}
...
@@ -1041,11 +1047,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1041,11 +1047,11 @@ export class PlayComponent implements OnInit, OnDestroy {
let
h
=
label
.
height
;
let
h
=
label
.
height
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
let
r
=
Math
.
sqrt
(
w
*
w
+
h
*
h
)
/
2
;
//如果宽度超过,则缩小字体
//如果宽度超过,则缩小字体
if
(
r
<
parWidth
/
2
)
{
if
(
r
<
parWidth
/
2
)
{
let
fontSize
=
label
.
fontSize
;
let
fontSize
=
label
.
fontSize
;
fontSize
=
fontSize
+
2
;
fontSize
=
fontSize
+
2
;
...
@@ -1065,8 +1071,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1065,8 +1071,8 @@ export class PlayComponent implements OnInit, OnDestroy {
* 设置阴影
* 设置阴影
* @param itemPic
* @param itemPic
*/
*/
setShadow
(
itemPic
){
setShadow
(
itemPic
)
{
if
(
!
itemPic
)
{
if
(
!
itemPic
)
{
return
;
return
;
}
}
...
@@ -1076,22 +1082,22 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1076,22 +1082,22 @@ export class PlayComponent implements OnInit, OnDestroy {
//console.log('card ', itemPic);
//console.log('card ', itemPic);
//设置阴影
//设置阴影
if
(
y
>
-
30
)
{
if
(
y
>
-
30
)
{
const
shadow_pic
=
new
MySprite
();
const
shadow_pic
=
new
MySprite
();
shadow_pic
.
init
(
this
.
images
.
get
(
'
shadow
'
));
shadow_pic
.
init
(
this
.
images
.
get
(
'
shadow
'
));
shadow_pic
.
x
=
itemPic
.
x
;
shadow_pic
.
x
=
itemPic
.
x
;
shadow_pic
.
y
=
itemPic
.
y
+
itemPic
.
getBoundingBox
().
height
/
2
;
shadow_pic
.
y
=
itemPic
.
y
+
itemPic
.
getBoundingBox
().
height
/
2
;
this
.
rotaryTable2
.
addChild
(
shadow_pic
);
this
.
rotaryTable2
.
addChild
(
shadow_pic
);
let
scale
=
itemPic
.
getBoundingBox
().
width
/
shadow_pic
.
width
;
let
scale
=
itemPic
.
getBoundingBox
().
width
/
shadow_pic
.
width
;
shadow_pic
.
setScaleXY
(
this
.
initRotaryTableScale
);
shadow_pic
.
setScaleXY
(
this
.
initRotaryTableScale
);
this
.
shadows
.
push
({
pic
:
shadow_pic
,
scale
:
scale
});
this
.
shadows
.
push
({
pic
:
shadow_pic
,
scale
:
scale
});
}
}
}
}
...
@@ -1100,25 +1106,25 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1100,25 +1106,25 @@ export class PlayComponent implements OnInit, OnDestroy {
* 设置阴影
* 设置阴影
* @param itemPic
* @param itemPic
*/
*/
setShadow2
(
x
,
y
,
w
,
h
){
setShadow2
(
x
,
y
,
w
,
h
)
{
//设置阴影
//设置阴影
if
(
y
>
-
30
)
{
if
(
y
>
-
30
)
{
const
shadow_pic
=
new
MySprite
();
const
shadow_pic
=
new
MySprite
();
shadow_pic
.
init
(
this
.
images
.
get
(
'
shadow
'
));
shadow_pic
.
init
(
this
.
images
.
get
(
'
shadow
'
));
shadow_pic
.
x
=
x
shadow_pic
.
x
=
x
shadow_pic
.
y
=
y
+
h
/
2
;
shadow_pic
.
y
=
y
+
h
/
2
;
this
.
rotaryTable2
.
addChild
(
shadow_pic
);
this
.
rotaryTable2
.
addChild
(
shadow_pic
);
let
scale
=
w
/
shadow_pic
.
width
;
let
scale
=
w
/
shadow_pic
.
width
;
shadow_pic
.
setScaleXY
(
scale
);
shadow_pic
.
setScaleXY
(
scale
);
this
.
shadows
.
push
({
pic
:
shadow_pic
,
scale
:
scale
});
this
.
shadows
.
push
({
pic
:
shadow_pic
,
scale
:
scale
});
}
}
}
}
...
@@ -1128,14 +1134,14 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1128,14 +1134,14 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
return
;
}
}
if
(
!
this
.
playingStatus
&&
this
.
checkClickTarget
(
this
.
btn_go
)
)
{
if
(
!
this
.
playingStatus
&&
this
.
checkClickTarget
(
this
.
btn_go
)
)
{
this
.
initGame
();
this
.
initGame
();
return
;
return
;
}
}
if
(
this
.
curContent
&&
this
.
curContent
.
card
)
{
if
(
this
.
curContent
&&
this
.
curContent
.
card
)
{
if
(
this
.
checkClickTarget
(
this
.
curContent
.
card
))
{
if
(
this
.
checkClickTarget
(
this
.
curContent
.
card
))
{
this
.
playAudio
(
this
.
curContent
.
audio_url
);
this
.
playAudio
(
this
.
curContent
.
audio_url
);
}
}
...
@@ -1170,12 +1176,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1170,12 +1176,12 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
resetGame
(){
resetGame
()
{
this
.
rotate_shadow_pic
.
alpha
=
0
;
this
.
rotate_shadow_pic
.
alpha
=
0
;
this
.
choic_shadow_pic
.
alpha
=
0
;
this
.
choic_shadow_pic
.
alpha
=
0
;
this
.
curContent
.
card_choice
.
alpha
=
0
;
this
.
curContent
.
card_choice
.
alpha
=
0
;
this
.
choic_shadow_pic
.
setScaleXY
(
0
);
this
.
choic_shadow_pic
.
setScaleXY
(
0
);
...
@@ -1184,7 +1190,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1184,7 +1190,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
temp_multiple
=
this
.
multiple
*
(
1
+
Math
.
random
());
this
.
temp_multiple
=
this
.
multiple
*
(
1
+
Math
.
random
());
//当前内容存在,则旋转回去
//当前内容存在,则旋转回去
if
(
this
.
curContent
)
{
if
(
this
.
curContent
)
{
//旋转
//旋转
...
@@ -1192,120 +1198,120 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1192,120 +1198,120 @@ export class PlayComponent implements OnInit, OnDestroy {
let
residue_rotation
=
card_rotation
%
360
;
let
residue_rotation
=
card_rotation
%
360
;
rotateItem
(
this
.
curContent
.
card
,
360
-
residue_rotation
,
0.5
,
()
=>
{
rotateItem
(
this
.
curContent
.
card
,
360
-
residue_rotation
,
0.5
,
()
=>
{
this
.
curContent
.
card
.
rotation
=
0
;
this
.
curContent
.
card
.
rotation
=
0
;
});
});
//由大变小
//由大变小
tweenChange
(
this
.
curContent
.
card
,
{
scaleX
:
this
.
initRotaryTableScale
,
scaleY
:
this
.
initRotaryTableScale
},
0.5
);
tweenChange
(
this
.
curContent
.
card
,
{
scaleX
:
this
.
initRotaryTableScale
,
scaleY
:
this
.
initRotaryTableScale
},
0.5
);
//回到原始位置
//回到原始位置
tweenChange
(
this
.
curContent
.
card
,
{
x
:
this
.
curContent
.
initX
,
y
:
this
.
curContent
.
initY
},
0.5
,
()
=>
{
tweenChange
(
this
.
curContent
.
card
,
{
x
:
this
.
curContent
.
initX
,
y
:
this
.
curContent
.
initY
},
0.5
,
()
=>
{
reset
();
reset
();
});
});
}
}
const
reset
=
()
=>
{
const
reset
=
()
=>
{
this
.
pauseAudio
(
this
.
curContent
.
audio_url
);
this
.
pauseAudio
(
this
.
curContent
.
audio_url
);
//重置旋转角度
//重置旋转角度
this
.
rotaryTable
.
rotation
=
0
;
this
.
rotaryTable
.
rotation
=
0
;
//重置音频
//重置音频
const
audio
=
this
.
audioObj
[
this
.
curContent
.
audio_url
];
const
audio
=
this
.
audioObj
[
this
.
curContent
.
audio_url
];
if
(
audio
)
{
if
(
audio
)
{
audio
.
currentTime
=
0
;
audio
.
currentTime
=
0
;
}
}
//显示阴影
//显示阴影
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
this
.
shadows
[
i
].
alpha
=
1
;
this
.
shadows
[
i
].
alpha
=
1
;
}
}
this
.
light_pic
.
alpha
=
0
;
this
.
light_pic
.
alpha
=
0
;
//卡片恢复原状
//卡片恢复原状
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
let
t_content
=
this
.
curContents
[
i
];
let
t_content
=
this
.
curContents
[
i
];
//旋转角度重置
//旋转角度重置
t_content
.
card
.
rotation
=
0
;
t_content
.
card
.
rotation
=
0
;
t_content
.
card
.
alpha
=
1
;
t_content
.
card
.
alpha
=
1
;
t_content
.
card
.
x
=
t_content
.
initX
;
t_content
.
card
.
x
=
t_content
.
initX
;
t_content
.
card
.
y
=
t_content
.
initY
;
t_content
.
card
.
y
=
t_content
.
initY
;
//设置初始大小
//设置初始大小
t_content
.
card
.
setScaleXY
(
this
.
initRotaryTableScale
);
t_content
.
card
.
setScaleXY
(
this
.
initRotaryTableScale
);
}
}
//阴影恢复原状
//阴影恢复原状
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
this
.
rotaryTable2
.
removeChild
(
this
.
shadows
[
i
].
pic
);
this
.
rotaryTable2
.
removeChild
(
this
.
shadows
[
i
].
pic
);
}
}
this
.
shadows
=
[];
//临时数组为空,则重新设置数据
this
.
shadows
=
[];
if
(
!
this
.
tempContents
||
this
.
tempContents
.
length
==
0
){
console
.
log
(
'
reset temp contntes
'
);
//临时数组为空,则重新设置数据
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
){
if
(
!
this
.
tempContents
||
this
.
tempContents
.
length
==
0
)
{
console
.
log
(
'
reset temp contntes
'
);
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
this
.
tempContents
.
push
(
this
.
curContents
[
i
]);
this
.
tempContents
.
push
(
this
.
curContents
[
i
]);
}
}
}
}
}
}
}
}
initGame
(){
initGame
()
{
this
.
playingStatus
=
true
;
this
.
playingStatus
=
true
;
if
(
this
.
first
){
if
(
this
.
first
)
{
this
.
first
=
false
;
this
.
first
=
false
;
this
.
playGame
();
this
.
playGame
();
}
}
else
{
else
{
this
.
resetGame
();
this
.
resetGame
();
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
let
content
=
this
.
curContents
[
i
];
let
content
=
this
.
curContents
[
i
];
//由小变大
//由小变大
tweenChange
(
content
.
card
,
{
scaleX
:
content
.
initScale
,
scaleY
:
content
.
initScale
},
0.5
,
()
=>
{
tweenChange
(
content
.
card
,
{
scaleX
:
content
.
initScale
,
scaleY
:
content
.
initScale
},
0.5
,
()
=>
{
if
(
i
==
this
.
curContents
.
length
-
1
)
{
if
(
i
==
this
.
curContents
.
length
-
1
)
{
this
.
canTouch
=
true
;
this
.
canTouch
=
true
;
this
.
playGame
();
this
.
playGame
();
}
}
});
});
}
}
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
let
shadow
=
this
.
shadows
[
i
];
let
shadow
=
this
.
shadows
[
i
];
let
scale
=
shadow
.
scale
;
let
scale
=
shadow
.
scale
;
tweenChange
(
shadow
.
pic
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
);
tweenChange
(
shadow
.
pic
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
);
}
}
}
}
}
}
playGame
(){
playGame
()
{
this
.
playAudio
(
'
playing
'
,
false
,
()
=>
{
this
.
playAudio
(
'
playing
'
,
false
,
()
=>
{
});
});
this
.
setBtnGoText
(
"
· · ·
"
);
this
.
setBtnGoText
(
"
· · ·
"
);
...
@@ -1317,20 +1323,20 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1317,20 +1323,20 @@ export class PlayComponent implements OnInit, OnDestroy {
let
angle
=
duration
*
20
*
this
.
temp_multiple
;
let
angle
=
duration
*
20
*
this
.
temp_multiple
;
//隐藏小卡片阴影
//隐藏小卡片阴影
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
this
.
shadows
[
i
].
pic
.
alpha
=
0
;
this
.
shadows
[
i
].
pic
.
alpha
=
0
;
}
}
//显示旋转阴影
//显示旋转阴影
this
.
rotate_shadow_pic
.
alpha
=
1
;
this
.
rotate_shadow_pic
.
alpha
=
1
;
this
.
rotate
(
this
.
rotaryTable
,
angle
,
duration
,
()
=>
{
this
.
rotate
(
this
.
rotaryTable
,
angle
,
duration
,
()
=>
{
this
.
rotate_shadow_pic
.
alpha
=
0
;
this
.
rotate_shadow_pic
.
alpha
=
0
;
//设置阴影
//设置阴影
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
let
content
=
this
.
curContents
[
i
];
let
content
=
this
.
curContents
[
i
];
...
@@ -1341,9 +1347,9 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1341,9 +1347,9 @@ export class PlayComponent implements OnInit, OnDestroy {
//转动角度
//转动角度
let
rotation
=
this
.
rotaryTable
.
rotation
;
let
rotation
=
this
.
rotaryTable
.
rotation
;
let
newStartAngle
=
content
.
startAngle
-
rotation
;
let
newStartAngle
=
content
.
startAngle
-
rotation
;
console
.
log
(
'
rotation
'
,
rotation
,
'
content startAngle
'
,
content
.
startAngle
,
'
new content startAngle
'
,
newStartAngle
);
console
.
log
(
'
rotation
'
,
rotation
,
'
content startAngle
'
,
content
.
startAngle
,
'
new content startAngle
'
,
newStartAngle
);
let
pos
=
getPosByAngle
(
newStartAngle
,
content
.
tableR
);
let
pos
=
getPosByAngle
(
newStartAngle
,
content
.
tableR
);
...
@@ -1352,10 +1358,10 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1352,10 +1358,10 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
setShadow2
(
pos
.
x
,
pos
.
y
,
content
.
card
.
getBoundingBox
().
width
,
content
.
card
.
getBoundingBox
().
height
);
this
.
setShadow2
(
pos
.
x
,
pos
.
y
,
content
.
card
.
getBoundingBox
().
width
,
content
.
card
.
getBoundingBox
().
height
);
}
}
//显示阴影
//显示阴影
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
let
shadow
=
this
.
shadows
[
i
];
let
shadow
=
this
.
shadows
[
i
];
shadow
.
pic
.
setScaleXY
(
shadow
.
scale
);
shadow
.
pic
.
setScaleXY
(
shadow
.
scale
);
...
@@ -1368,29 +1374,29 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1368,29 +1374,29 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
curContent
.
card_choice
.
alpha
=
1
;
this
.
curContent
.
card_choice
.
alpha
=
1
;
//this.curContent.card_show.alpha = 0;
//this.curContent.card_show.alpha = 0;
//抽取卡片
//抽取卡片
this
.
drawCard
();
this
.
drawCard
();
})
})
}
}
rotate
(
item
,
angle
,
duration
,
callback
=
null
,
easying
=
null
){
rotate
(
item
,
angle
,
duration
,
callback
=
null
,
easying
=
null
)
{
//console.log('duration', duration);
//console.log('duration', duration);
if
(
duration
<=
0
)
{
if
(
duration
<=
0
)
{
if
(
callback
)
{
if
(
callback
)
{
callback
();
callback
();
}
}
return
;
return
;
}
}
let
time
=
0.1
;
let
time
=
0.1
;
if
(
duration
<
time
)
{
if
(
duration
<
time
)
{
time
=
duration
;
time
=
duration
;
}
}
...
@@ -1400,11 +1406,11 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1400,11 +1406,11 @@ export class PlayComponent implements OnInit, OnDestroy {
t_angle
=
t_angle
+
duration
*
20
*
this
.
temp_multiple
;
t_angle
=
t_angle
+
duration
*
20
*
this
.
temp_multiple
;
rotateItem
(
item
,
t_angle
,
time
,
()
=>
{
rotateItem
(
item
,
t_angle
,
time
,
()
=>
{
this
.
rotate
(
item
,
t_angle
,
duration
-
time
,
callback
);
this
.
rotate
(
item
,
t_angle
,
duration
-
time
,
callback
);
});
});
}
}
...
@@ -1412,17 +1418,17 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1412,17 +1418,17 @@ export class PlayComponent implements OnInit, OnDestroy {
/**
/**
* 抽取卡片
* 抽取卡片
*/
*/
drawCard
(){
drawCard
()
{
this
.
playAudio
(
'
pop-up
'
);
this
.
playAudio
(
'
pop-up
'
);
//新坐标
//新坐标
let
x
=
this
.
canvasWidth
/
2
;
let
x
=
this
.
canvasWidth
/
2
;
//新坐标
//新坐标
let
y
=
this
.
canvasHeight
/
2
;
let
y
=
this
.
canvasHeight
/
2
;
//调整位置
//调整位置
this
.
rotaryTable
.
removeChild
(
this
.
curContent
.
card
);
this
.
rotaryTable
.
removeChild
(
this
.
curContent
.
card
);
...
@@ -1431,23 +1437,23 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1431,23 +1437,23 @@ export class PlayComponent implements OnInit, OnDestroy {
let
scaleX
=
this
.
curContent
.
card
.
scaleX
;
let
scaleX
=
this
.
curContent
.
card
.
scaleX
;
let
scale
=
this
.
maxWidth
/
this
.
curContent
.
card
.
width
;
let
scale
=
this
.
maxWidth
/
this
.
curContent
.
card
.
width
;
console
.
log
(
'
rotaryTable rotation
'
,
this
.
rotaryTable
.
rotation
);
console
.
log
(
'
rotaryTable rotation
'
,
this
.
rotaryTable
.
rotation
);
//由小变大
//由小变大
tweenChange
(
this
.
curContent
.
card
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
,
()
=>
{
tweenChange
(
this
.
curContent
.
card
,
{
scaleX
:
scale
,
scaleY
:
scale
},
0.5
,
()
=>
{
//console.log('children',this.curContent.card.children);
//console.log('children',this.curContent.card.children);
//隐藏阴影
//隐藏阴影
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
shadows
.
length
;
++
i
)
{
this
.
shadows
[
i
].
pic
.
alpha
=
0
;
this
.
shadows
[
i
].
pic
.
alpha
=
0
;
}
}
//隐藏其它的卡片
//隐藏其它的卡片
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
curContents
.
length
;
++
i
)
{
if
(
this
.
curContents
[
i
]
!=
this
.
curContent
)
{
if
(
this
.
curContents
[
i
]
!=
this
.
curContent
)
{
this
.
curContents
[
i
].
card
.
alpha
=
0
;
this
.
curContents
[
i
].
card
.
alpha
=
0
;
this
.
curContents
[
i
].
card
.
setScaleXY
(
0
);
this
.
curContents
[
i
].
card
.
setScaleXY
(
0
);
}
}
...
@@ -1457,14 +1463,14 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1457,14 +1463,14 @@ export class PlayComponent implements OnInit, OnDestroy {
console
.
log
(
'
cur card rotation
'
,
this
.
curContent
.
card
.
rotation
);
console
.
log
(
'
cur card rotation
'
,
this
.
curContent
.
card
.
rotation
);
});
});
this
.
choic_shadow_pic
.
alpha
=
1
;
this
.
choic_shadow_pic
.
alpha
=
1
;
tweenChange
(
this
.
choic_shadow_pic
,
{
scaleX
:
this
.
mapScale
,
scaleY
:
this
.
mapScale
},
0.5
);
tweenChange
(
this
.
choic_shadow_pic
,
{
scaleX
:
this
.
mapScale
,
scaleY
:
this
.
mapScale
},
0.5
);
//移动新位置
//移动新位置
tweenChange
(
this
.
curContent
.
card
,
{
x
:
0
,
y
:
0
},
0.5
,
()
=>
{
tweenChange
(
this
.
curContent
.
card
,
{
x
:
0
,
y
:
0
},
0.5
,
()
=>
{
this
.
light_pic
.
alpha
=
1
;
this
.
light_pic
.
alpha
=
1
;
this
.
rotateLight
();
this
.
rotateLight
();
...
@@ -1473,16 +1479,16 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1473,16 +1479,16 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
setBtnGoText
(
"
GO
"
);
this
.
setBtnGoText
(
"
GO
"
);
});
});
//旋转
//旋转
let
table_rotation
=
this
.
rotaryTable
.
rotation
;
let
table_rotation
=
this
.
rotaryTable
.
rotation
;
let
residue_rotation
=
table_rotation
%
360
;
let
residue_rotation
=
table_rotation
%
360
;
rotateItem
(
this
.
curContent
.
card
,
360
-
residue_rotation
,
0.5
,
()
=>
{
rotateItem
(
this
.
curContent
.
card
,
360
-
residue_rotation
,
0.5
,
()
=>
{
this
.
playAudio
(
'
stop
'
,
false
,
()
=>
{
this
.
playAudio
(
'
stop
'
,
false
,
()
=>
{
});
});
});
});
}
}
...
@@ -1490,33 +1496,33 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1490,33 +1496,33 @@ export class PlayComponent implements OnInit, OnDestroy {
/**
/**
* 灯光旋转
* 灯光旋转
*/
*/
rotateLight
(){
rotateLight
()
{
rotateItem
(
this
.
light_pic
,
360
,
10
,
()
=>
{
rotateItem
(
this
.
light_pic
,
360
,
10
,
()
=>
{
this
.
light_pic
.
rotation
=
0.036
;
this
.
light_pic
.
rotation
=
0.036
;
if
(
!
this
.
playingStatus
)
{
if
(
!
this
.
playingStatus
)
{
this
.
rotateLight
();
this
.
rotateLight
();
}
}
});
});
}
}
getRandomItemFromArr
(
arr
){
getRandomItemFromArr
(
arr
)
{
if
(
!
arr
)
{
if
(
!
arr
)
{
return
;
return
;
}
}
let
length
=
arr
.
length
;
let
length
=
arr
.
length
;
let
index
=
Math
.
ceil
(
Math
.
random
()
*
100000000
)
%
length
;
let
index
=
Math
.
ceil
(
Math
.
random
()
*
100000000
)
%
length
;
return
arr
[
index
];
return
arr
[
index
];
}
}
setBtnGoText
(
text
){
setBtnGoText
(
text
)
{
this
.
btn_go_val
.
text
=
text
;
this
.
btn_go_val
.
text
=
text
;
this
.
btn_go_val
.
refreshSize
();
this
.
btn_go_val
.
refreshSize
();
this
.
btn_go_val
.
x
=
-
this
.
btn_go_val
.
width
/
2
;
this
.
btn_go_val
.
x
=
-
this
.
btn_go_val
.
width
/
2
;
}
}
}
}
yarn.lock
View file @
1b194dd4
...
@@ -1237,11 +1237,6 @@ JSONStream@^1.3.4:
...
@@ -1237,11 +1237,6 @@ JSONStream@^1.3.4:
jsonparse "^1.2.0"
jsonparse "^1.2.0"
through ">=2.2.7 <3"
through ">=2.2.7 <3"
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7:
version "1.3.7"
version "1.3.7"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
...
@@ -1456,19 +1451,11 @@ append-transform@^1.0.0:
...
@@ -1456,19 +1451,11 @@ append-transform@^1.0.0:
dependencies:
dependencies:
default-require-extensions "^2.0.0"
default-require-extensions "^2.0.0"
aproba@^1.
0.3, aproba@^1.
1.1:
aproba@^1.1.1:
version "1.2.0"
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
are-we-there-yet@~1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
dependencies:
delegates "^1.0.0"
readable-stream "^2.0.6"
arg@^4.1.0:
arg@^4.1.0:
version "4.1.3"
version "4.1.3"
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
...
@@ -2455,11 +2442,6 @@ console-browserify@^1.1.0:
...
@@ -2455,11 +2442,6 @@ console-browserify@^1.1.0:
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336"
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336"
integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==
integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
constants-browserify@^1.0.0:
constants-browserify@^1.0.0:
version "1.0.0"
version "1.0.0"
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
...
@@ -2888,11 +2870,6 @@ deep-equal@^1.0.1:
...
@@ -2888,11 +2870,6 @@ deep-equal@^1.0.1:
object-keys "^1.1.1"
object-keys "^1.1.1"
regexp.prototype.flags "^1.2.0"
regexp.prototype.flags "^1.2.0"
deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
deep-is@~0.1.3:
deep-is@~0.1.3:
version "0.1.3"
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
...
@@ -2996,11 +2973,6 @@ delayed-stream@~1.0.0:
...
@@ -2996,11 +2973,6 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
depd@~1.1.2:
depd@~1.1.2:
version "1.1.2"
version "1.1.2"
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
...
@@ -3024,11 +2996,6 @@ destroy@^1.0.4, destroy@~1.0.4:
...
@@ -3024,11 +2996,6 @@ destroy@^1.0.4, destroy@~1.0.4:
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
detect-libc@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
detect-node@^2.0.4:
detect-node@^2.0.4:
version "2.0.4"
version "2.0.4"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
...
@@ -3868,20 +3835,6 @@ function-bind@^1.1.1:
...
@@ -3868,20 +3835,6 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
dependencies:
aproba "^1.0.3"
console-control-strings "^1.0.0"
has-unicode "^2.0.0"
object-assign "^4.1.0"
signal-exit "^3.0.0"
string-width "^1.0.1"
strip-ansi "^3.0.1"
wide-align "^1.1.0"
genfun@^5.0.0:
genfun@^5.0.0:
version "5.0.0"
version "5.0.0"
resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
...
@@ -4074,11 +4027,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1:
...
@@ -4074,11 +4027,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1:
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
has-value@^0.3.1:
has-value@^0.3.1:
version "0.3.1"
version "0.3.1"
resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
...
@@ -4305,7 +4253,7 @@ humanize-ms@^1.2.0, humanize-ms@^1.2.1:
...
@@ -4305,7 +4253,7 @@ humanize-ms@^1.2.0, humanize-ms@^1.2.1:
dependencies:
dependencies:
ms "^2.0.0"
ms "^2.0.0"
iconv-lite@0.4.24, iconv-lite@^0.4.15, iconv-lite@^0.4.24, iconv-lite@
^0.4.4, iconv-lite@
~0.4.13:
iconv-lite@0.4.24, iconv-lite@^0.4.15, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
version "0.4.24"
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
...
@@ -4429,7 +4377,7 @@ inherits@2.0.3:
...
@@ -4429,7 +4377,7 @@ inherits@2.0.3:
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
ini@1.3.5, ini@^1.3.4
, ini@~1.3.0
:
ini@1.3.5, ini@^1.3.4:
version "1.3.5"
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
...
@@ -5738,15 +5686,6 @@ nanomatch@^1.2.9:
...
@@ -5738,15 +5686,6 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
snapdragon "^0.8.1"
to-regex "^3.0.1"
to-regex "^3.0.1"
needle@^2.2.1:
version "2.3.3"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117"
integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw==
dependencies:
debug "^3.2.6"
iconv-lite "^0.4.4"
sax "^1.2.4"
negotiator@0.6.2:
negotiator@0.6.2:
version "0.6.2"
version "0.6.2"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
...
@@ -5820,22 +5759,6 @@ node-libs-browser@^2.2.1:
...
@@ -5820,22 +5759,6 @@ node-libs-browser@^2.2.1:
util "^0.11.0"
util "^0.11.0"
vm-browserify "^1.0.1"
vm-browserify "^1.0.1"
node-pre-gyp@*:
version "0.14.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.1"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.2.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4.4.2"
node-releases@^1.1.52:
node-releases@^1.1.52:
version "1.1.52"
version "1.1.52"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.52.tgz#bcffee3e0a758e92e44ecfaecd0a47554b0bcba9"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.52.tgz#bcffee3e0a758e92e44ecfaecd0a47554b0bcba9"
...
@@ -5843,14 +5766,6 @@ node-releases@^1.1.52:
...
@@ -5843,14 +5766,6 @@ node-releases@^1.1.52:
dependencies:
dependencies:
semver "^6.3.0"
semver "^6.3.0"
nopt@^4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
dependencies:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.0.0, normalize-package-data@^2.4.0:
normalize-package-data@^2.0.0, normalize-package-data@^2.4.0:
version "2.5.0"
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
...
@@ -5925,7 +5840,7 @@ npm-package-arg@^7.0.0:
...
@@ -5925,7 +5840,7 @@ npm-package-arg@^7.0.0:
semver "^5.6.0"
semver "^5.6.0"
validate-npm-package-name "^3.0.0"
validate-npm-package-name "^3.0.0"
npm-packlist@^1.1.12
, npm-packlist@^1.1.6
:
npm-packlist@^1.1.12:
version "1.4.8"
version "1.4.8"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
...
@@ -5963,16 +5878,6 @@ npm-run-path@^2.0.0:
...
@@ -5963,16 +5878,6 @@ npm-run-path@^2.0.0:
dependencies:
dependencies:
path-key "^2.0.0"
path-key "^2.0.0"
npmlog@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
dependencies:
are-we-there-yet "~1.1.2"
console-control-strings "~1.1.0"
gauge "~2.7.3"
set-blocking "~2.0.0"
nth-check@^1.0.2:
nth-check@^1.0.2:
version "1.0.2"
version "1.0.2"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
...
@@ -6188,7 +6093,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
...
@@ -6188,7 +6093,7 @@ os-tmpdir@^1.0.0, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
osenv@^0.1.
4, osenv@^0.1.
5:
osenv@^0.1.5:
version "0.1.5"
version "0.1.5"
resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
...
@@ -7132,16 +7037,6 @@ raw-loader@3.1.0:
...
@@ -7132,16 +7037,6 @@ raw-loader@3.1.0:
loader-utils "^1.1.0"
loader-utils "^1.1.0"
schema-utils "^2.0.1"
schema-utils "^2.0.1"
rc@^1.2.7:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
dependencies:
deep-extend "^0.6.0"
ini "~1.3.0"
minimist "^1.2.0"
strip-json-comments "~2.0.1"
read-cache@^1.0.0:
read-cache@^1.0.0:
version "1.0.0"
version "1.0.0"
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
...
@@ -7170,7 +7065,7 @@ read-package-tree@5.3.1:
...
@@ -7170,7 +7065,7 @@ read-package-tree@5.3.1:
readdir-scoped-modules "^1.0.0"
readdir-scoped-modules "^1.0.0"
util-promisify "^2.1.0"
util-promisify "^2.1.0"
"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.
0.6, readable-stream@^2.
1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6:
"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6:
version "2.3.7"
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
...
@@ -7532,7 +7427,7 @@ saucelabs@^1.5.0:
...
@@ -7532,7 +7427,7 @@ saucelabs@^1.5.0:
dependencies:
dependencies:
https-proxy-agent "^2.2.1"
https-proxy-agent "^2.2.1"
sax@>=0.6.0, sax@
^1.2.4, sax@
~1.2.4:
sax@>=0.6.0, sax@~1.2.4:
version "1.2.4"
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
...
@@ -7659,7 +7554,7 @@ serve-static@1.14.1:
...
@@ -7659,7 +7554,7 @@ serve-static@1.14.1:
parseurl "~1.3.3"
parseurl "~1.3.3"
send "0.17.1"
send "0.17.1"
set-blocking@^2.0.0
, set-blocking@~2.0.0
:
set-blocking@^2.0.0:
version "2.0.0"
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
...
@@ -8130,7 +8025,7 @@ string-width@^1.0.1:
...
@@ -8130,7 +8025,7 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0"
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
strip-ansi "^3.0.0"
"string-width@^1.0.2 || 2",
string-width@^2.0.0, string-width@^2.1.1:
string-width@^2.0.0, string-width@^2.1.1:
version "2.1.1"
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
...
@@ -8229,11 +8124,6 @@ strip-eof@^1.0.0:
...
@@ -8229,11 +8124,6 @@ strip-eof@^1.0.0:
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
style-loader@1.0.0:
style-loader@1.0.0:
version "1.0.0"
version "1.0.0"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82"
...
@@ -8342,7 +8232,7 @@ tar-stream@^1.5.2:
...
@@ -8342,7 +8232,7 @@ tar-stream@^1.5.2:
to-buffer "^1.1.1"
to-buffer "^1.1.1"
xtend "^4.0.0"
xtend "^4.0.0"
tar@^4.4.10
, tar@^4.4.2
:
tar@^4.4.10:
version "4.4.13"
version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
...
@@ -9104,13 +8994,6 @@ which@^1.2.1, which@^1.2.9, which@^1.3.1:
...
@@ -9104,13 +8994,6 @@ which@^1.2.1, which@^1.2.9, which@^1.3.1:
dependencies:
dependencies:
isexe "^2.0.0"
isexe "^2.0.0"
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
dependencies:
string-width "^1.0.2 || 2"
win-release@^1.0.0:
win-release@^1.0.0:
version "1.1.1"
version "1.1.1"
resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209"
resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment