Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dfzx_04
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
dfzx_04
Commits
65e64cb2
Commit
65e64cb2
authored
Oct 30, 2019
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
20da4385
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
6 deletions
+48
-6
form.component.ts
src/app/form/form.component.ts
+4
-1
play.component.scss
src/app/play/play.component.scss
+3
-2
play.component.ts
src/app/play/play.component.ts
+38
-3
resources.js
src/app/play/resources.js
+3
-0
No files found.
src/app/form/form.component.ts
View file @
65e64cb2
...
...
@@ -71,6 +71,9 @@ export class FormComponent implements OnInit, OnChanges {
// }
this
.
item
=
{};
this
.
item
.
contentObj
=
{};
const
getData
=
(
<
any
>
window
).
courseware
.
getData
;
getData
((
data
)
=>
{
...
...
@@ -84,7 +87,7 @@ export class FormComponent implements OnInit, OnChanges {
console
.
log
(
'
data:
'
,
data
);
// this.init();
//
this.refresh();
this
.
refresh
();
},
this
.
KEY
);
...
...
src/app/play/play.component.scss
View file @
65e64cb2
...
...
@@ -13,16 +13,17 @@
@font-face
{
font-family
:
'BRLNSDB_1'
;
src
:
url("/assets/font/BRLNSDB_1.TTF")
format
(
"opentype"
);
src
:
url("
../..
/assets/font/BRLNSDB_1.TTF")
format
(
"opentype"
);
}
@font-face
{
font-family
:
'CooperBlackStd'
;
src
:
url("/assets/font/CooperBlackStd.otf")
format
(
"opentype"
);
src
:
url("
../..
/assets/font/CooperBlackStd.otf")
format
(
"opentype"
);
}
src/app/play/play.component.ts
View file @
65e64cb2
...
...
@@ -78,6 +78,8 @@ export class PlayComponent implements OnInit, OnDestroy {
// ------
KEY
=
'
dfzx_04
'
;
unitLabel
;
titleLabel
;
bottomArr
=
[];
...
...
@@ -306,7 +308,7 @@ export class PlayComponent implements OnInit, OnDestroy {
initDefaultData
()
{
if
(
!
this
.
data
.
contentObj
.
unit
)
{
this
.
data
.
contentObj
.
unit
=
'
u
nit 1
'
;
this
.
data
.
contentObj
.
unit
=
'
U
nit 1
'
;
}
if
(
!
this
.
data
.
contentObj
.
title
)
{
this
.
data
.
contentObj
.
title
=
'
Hello
'
;
...
...
@@ -351,9 +353,33 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
initTitle
();
this
.
initLogo
();
this
.
showAnima
();
// this.initItem();
}
showAnima
()
{
this
.
unitLabel
.
alpha
=
0
;
this
.
unitLabel
.
bg
.
alpha
=
0
;
this
.
titleLabel
.
y
=
-
this
.
titleLabel
.
fontSize
;
const
showUnit
=
()
=>
{
tweenChange
(
this
.
unitLabel
,
{
alpha
:
1
},
0.7
,
null
,
TWEEN
.
Easing
.
Cubic
.
Out
,
(
item
,
progress
)
=>
{
this
.
unitLabel
.
bg
.
alpha
=
this
.
unitLabel
.
alpha
;
});
};
const
showTitle
=
()
=>
{
moveItem
(
this
.
titleLabel
,
this
.
titleLabel
.
x
,
this
.
titleLabel
.
baseY
,
1
,
()
=>
{
showUnit
();
},
TWEEN
.
Easing
.
Bounce
.
Out
);
};
showTitle
();
}
initBg
()
{
this
.
bottomArr
=
[];
...
...
@@ -400,9 +426,13 @@ export class PlayComponent implements OnInit, OnDestroy {
label
.
textAlign
=
'
center
'
;
label
.
x
=
this
.
canvasWidth
/
2
;
label
.
y
=
y
*
this
.
mapScale
;
label
[
'
bg
'
]
=
labelBg
;
this
.
renderArr
.
push
(
labelBg
);
this
.
renderArr
.
push
(
label
);
this
.
unitLabel
=
label
;
}
...
...
@@ -434,20 +464,25 @@ export class PlayComponent implements OnInit, OnDestroy {
titleText
.
disH
=
(
10
)
*
this
.
mapScale
;
titleText
.
fontColor
=
'
#ffffff
'
;
titleText
.
fontName
=
'
CooperBlackStd
'
;
// titleText.fontName = 'Verdana';
titleText
.
textAlign
=
'
center
'
;
titleText
.
text
=
this
.
data
.
contentObj
.
title
;
titleText
.
y
=
this
.
canvasHeight
/
2
-
titleText
.
fontSize
/
2
-
this
.
canvasHeight
/
15
;
// * this.mapScale - titleText.fontSize * this.mapScale; // - titleText.textH - titleText.fontSize;
// titleText.setScaleXY(this.mapScale);
titleText
.
width
=
this
.
canvasWidth
/
1.6
;
// titleText.fontWeight = 900;
titleText
.
setOutline
(
20
,
'
#ff7600
'
);
titleText
.
x
=
this
.
canvasWidth
/
2
;
// - titleText.width * titleText.scaleX / 2;
titleText
[
'
baseY
'
]
=
titleText
.
y
;
// this.titleText = titleText;
this
.
renderArr
.
push
(
titleText
);
this
.
titleLabel
=
titleText
;
}
...
...
@@ -459,8 +494,8 @@ export class PlayComponent implements OnInit, OnDestroy {
}
const
logoW
=
320
;
const
logoH
=
220
;
const
logoW
=
320
*
this
.
mapScale
;
const
logoH
=
220
*
this
.
mapScale
;
const
offSet
=
20
*
this
.
mapScale
;
...
...
src/app/play/resources.js
View file @
65e64cb2
...
...
@@ -3,6 +3,9 @@ const res = [
[
'
bg
'
,
"
assets/play/bg.jpg
"
],
[
'
logo
'
,
"
assets/default/logo.png
"
],
// ['font_1', "assets/font/BRLNSDB_1.TTF"],
// ['font_2', "assets/font/CooperBlackStd.otf"],
...
...
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