Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
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
wildfirecode13
xiaoxiaole
Commits
e2a30ada
Commit
e2a30ada
authored
Aug 28, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0dd184ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
getShowOffPic.ts
egret/src/getShowOffPic.ts
+4
-3
No files found.
egret/src/getShowOffPic.ts
View file @
e2a30ada
...
...
@@ -22,6 +22,7 @@ export const getPrintScreenData = (scene, startX, startY, width, height) => {
const
imageData
=
renderTexture
.
toDataURL
(
"image/jpg"
);
return
imageData
;
}
const
img
:
any
=
document
.
getElementById
(
'pic'
);
export
default
async
(
stage
,
parent
?:
egret
.
DisplayObjectContainer
,
)
=>
{
// return new Promise(async (r) => {
const
pic
:
egret
.
Texture
=
await
RES
.
getResAsync
(
'showoff_jpg'
);
...
...
@@ -29,18 +30,18 @@ export default async (stage, parent?: egret.DisplayObjectContainer, ) => {
showoff
.
loadSkin
();
showoff
.
start
();
if
(
parent
)
parent
.
addChild
(
showoff
);
showoff
.
cacheAsBitmap
=
tru
e
;
// stage.once(egret.Event.ENTER_FRAME, () => {
showoff
.
visible
=
fals
e
;
const
base64
=
getPrintScreenData
(
showoff
[
'pic'
],
0
,
0
,
pic
.
textureWidth
,
stage
.
stageHeight
);
NetManager
.
ins
.
imgUrl
((
success
)
=>
{
const
data
=
DataManager
.
ins
.
getData
(
'imgURL'
);
// r(data.data);
img
.
src
=
data
.
data
;
if
(
!
iswx
())
{
callShareApi
(
data
.
data
,
1
);
}
},
base64
);
// }, this);
}
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