Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pu09
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
pu09
Commits
c1cfdace
Commit
c1cfdace
authored
Jun 12, 2020
by
Seaborn Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: 初始化背景
parent
db8fffe1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
play.component.ts
src/app/play/play.component.ts
+16
-2
resources.js
src/app/play/resources.js
+1
-1
bg.jpg
src/assets/play/bg.jpg
+0
-0
No files found.
src/app/play/play.component.ts
View file @
c1cfdace
...
@@ -491,12 +491,26 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -491,12 +491,26 @@ export class PlayComponent implements OnInit, OnDestroy {
* 初始化试图
* 初始化试图
*/
*/
initView
()
{
initView
()
{
this
.
initBg
();
// initSmallBg();
// initAudioPlayer();
this
.
initPic
();
//
this.initPic();
this
.
initBottomPart
();
// this.initBottomPart();
}
private
initBg
()
{
const
pic
=
new
MySprite
();
pic
.
init
(
this
.
images
.
get
(
'
bg
'
));
pic
.
x
=
this
.
canvasWidth
/
2
;
const
scaleX
=
this
.
canvasWidth
/
pic
.
width
;
const
scaleY
=
this
.
canvasHeight
/
pic
.
height
;
const
scale
=
Math
.
max
(
scaleX
,
scaleY
);
pic
.
setScaleXY
(
scale
);
pic
.
y
=
this
.
canvasHeight
-
pic
.
height
/
2
*
scale
;
this
.
renderArr
.
push
(
pic
);
}
}
initBottomPart
()
{
initBottomPart
()
{
...
...
src/app/play/resources.js
View file @
c1cfdace
const
res
=
[
const
res
=
[
//
['bg', "assets/play/bg.jpg"],
[
'
bg
'
,
"
assets/play/bg.jpg
"
],
[
'
btn_left
'
,
"
assets/play/btn_left.png
"
],
[
'
btn_left
'
,
"
assets/play/btn_left.png
"
],
[
'
btn_right
'
,
"
assets/play/btn_right.png
"
],
[
'
btn_right
'
,
"
assets/play/btn_right.png
"
],
// ['text_bg', "assets/play/text_bg.png"],
// ['text_bg', "assets/play/text_bg.png"],
...
...
src/assets/play/bg.jpg
100755 → 100644
View replaced file @
db8fffe1
View file @
c1cfdace
25.8 KB
|
W:
|
H:
408 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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