Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
babycare_xiaoxiao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
王剑峰
babycare_xiaoxiao
Commits
4f05672b
Commit
4f05672b
authored
Jul 27, 2020
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
f35c4a9c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
2 deletions
+42
-2
babycare.luckyDraw.json
mock/miniTb/babycare.luckyDraw.json
+1
-1
圆圈.png
resource/FreePowerPanel/圆圈.png
+0
-0
aaa.js
scripts/aaa.js
+33
-0
Tools.ts
src/Tools.ts
+2
-1
LotteryScene.ts
src/scene/LotteryScene.ts
+6
-0
No files found.
mock/miniTb/babycare.luckyDraw.json
View file @
4f05672b
...
...
@@ -13,7 +13,7 @@
"ename"
:
""
,
"userNick"
:
"wmmmmm"
,
"name"
:
"90关奖品4"
,
"_id"
:
"
AAHuCvE-ALiIWXYsJuTb5S4W1594715684002
"
"_id"
:
"
123
"
},
"success"
:
true
,
"message"
:
"成功"
...
...
resource/FreePowerPanel/圆圈.png
View replaced file @
f35c4a9c
View file @
4f05672b
165 KB
|
W:
|
H:
145 KB
|
W:
|
H:
2-up
Swipe
Onion skin
scripts/aaa.js
0 → 100644
View file @
4f05672b
let
MaxRectsPacker
=
require
(
"maxrects-packer"
).
MaxRectsPacker
;
const
options
=
{
smart
:
true
,
pot
:
true
,
square
:
false
,
allowRotation
:
true
,
tag
:
false
,
border
:
5
};
// Set packing options
let
packer
=
new
MaxRectsPacker
(
4096
,
4096
,
2
,
options
);
// width, height, padding, options
let
input
=
[
// any object with width & height is OK since v2.1.0
{
width
:
600
,
height
:
20
,
name
:
"tree"
},
{
width
:
600
,
height
:
20
,
name
:
"flower"
},
// {width: 2000, height: 2000, name: "oversized background"},
// {width: 1000, height: 1000, name: "background"},
// {width: 1000, height: 1000, name: "overlay"}
];
packer
.
addArray
(
input
);
// Start packing with input array
// packer.next(); // Start a new packer bin
packer
.
addArray
(
input
.
slice
());
// Adding to the new bin
packer
.
bins
.
forEach
(
bin
=>
{
// console.log(bin.rects);
});
// Reuse packer
// let bins = packer.save();
// packer.load(bins);
console
.
log
(
packer
.
bins
)
// packer.addArray(input);
\ No newline at end of file
src/Tools.ts
View file @
4f05672b
...
...
@@ -116,7 +116,8 @@ export class Tools {
// resolve(res);//数据按照gameData的更新,不返回
resolve
(
true
)
}
else
{
reject
()
// reject()
resolve
(
false
)
}
})
})
...
...
src/scene/LotteryScene.ts
View file @
4f05672b
...
...
@@ -110,6 +110,12 @@ class PrizeItem extends FYGE.Container implements FYGE.IScrollListItem {
this
.
prizeImage
=
this
.
addChild
(
new
FYGE
.
Sprite
());
this
.
prizeImage
.
width
=
this
.
prizeImage
.
height
=
101
;
this
.
prizeImage
.
position
.
set
(
4
,
4
);
//考虑需不需要加,如果到时性能不行再去掉
var
mask
=
this
.
addChild
(
new
FYGE
.
Shape
())
mask
.
beginFill
(
0
);
mask
.
drawRoundedRect
(
4
,
4
,
101
,
101
,
10
);
mask
.
endFill
();
this
.
prizeImage
.
mask
=
mask
//名字
this
.
nameTxt
=
this
.
addChild
(
Tools
.
getText
(
""
,
...
...
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