Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xy_camera
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
xy_camera
Commits
36bd3751
Commit
36bd3751
authored
Aug 12, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 照相
parent
5e595241
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
489 additions
and
87 deletions
+489
-87
cyy_ske.json
assets/xy_camera/dragonBones/cyy_ske.json
+1
-0
cyy_ske.json.meta
assets/xy_camera/dragonBones/cyy_ske.json.meta
+5
-0
cyy_tex.json
assets/xy_camera/dragonBones/cyy_tex.json
+1
-0
cyy_tex.json.meta
assets/xy_camera/dragonBones/cyy_tex.json.meta
+5
-0
cyy_tex.png
assets/xy_camera/dragonBones/cyy_tex.png
+0
-0
cyy_tex.png.meta
assets/xy_camera/dragonBones/cyy_tex.png.meta
+14
-14
xy_camera.fire
assets/xy_camera/scene/xy_camera.fire
+453
-68
xy_camera.ts
assets/xy_camera/scene/xy_camera.ts
+10
-0
bg.jpg
assets/xy_camera/textures/bg.jpg
+0
-0
index.html
index.html
+0
-5
No files found.
assets/xy_camera/dragonBones/cyy_ske.json
0 → 100644
View file @
36bd3751
This diff is collapsed.
Click to expand it.
assets/xy_camera/dragonBones/cyy_ske.json.meta
0 → 100644
View file @
36bd3751
{
"ver": "1.0.1",
"uuid": "629483b1-3ced-4ec3-a5f2-92bba0c24437",
"subMetas": {}
}
\ No newline at end of file
assets/xy_camera/dragonBones/cyy_tex.json
0 → 100644
View file @
36bd3751
{
"name"
:
"川阅阅"
,
"height"
:
1024
,
"SubTexture"
:[{
"name"
:
"斗篷"
,
"x"
:
391
,
"height"
:
193
,
"y"
:
781
,
"width"
:
322
},{
"name"
:
"手臂2"
,
"x"
:
782
,
"height"
:
50
,
"y"
:
203
,
"width"
:
116
},{
"name"
:
"右脚落下"
,
"x"
:
316
,
"height"
:
130
,
"y"
:
790
,
"width"
:
73
},{
"name"
:
"左脚落下"
,
"x"
:
950
,
"height"
:
132
,
"y"
:
1
,
"width"
:
71
},{
"name"
:
"身体"
,
"x"
:
715
,
"height"
:
196
,
"y"
:
781
,
"width"
:
233
},{
"name"
:
"右脚弯曲"
,
"x"
:
861
,
"height"
:
102
,
"y"
:
1
,
"width"
:
77
},{
"name"
:
"右脚抬起"
,
"x"
:
782
,
"height"
:
96
,
"y"
:
105
,
"width"
:
80
},{
"name"
:
"左脚弯曲"
,
"x"
:
782
,
"height"
:
102
,
"y"
:
1
,
"width"
:
77
},{
"name"
:
"左脚抬起"
,
"x"
:
287
,
"height"
:
96
,
"y"
:
922
,
"width"
:
80
},{
"name"
:
"头"
,
"x"
:
1
,
"height"
:
508
,
"y"
:
1
,
"width"
:
460
},{
"name"
:
"眼睛闭"
,
"x"
:
1
,
"height"
:
19
,
"y"
:
1004
,
"width"
:
182
},{
"name"
:
"眼睁"
,
"x"
:
143
,
"height"
:
61
,
"y"
:
790
,
"width"
:
171
},{
"name"
:
"扇子收"
,
"x"
:
864
,
"height"
:
92
,
"y"
:
105
,
"width"
:
32
},{
"name"
:
"扇子开"
,
"x"
:
1
,
"height"
:
89
,
"y"
:
913
,
"width"
:
170
},{
"name"
:
"扇子合"
,
"x"
:
173
,
"height"
:
89
,
"y"
:
853
,
"width"
:
112
},{
"name"
:
"手臂1"
,
"x"
:
173
,
"height"
:
48
,
"y"
:
944
,
"width"
:
105
},{
"name"
:
"火焰1"
,
"x"
:
391
,
"height"
:
268
,
"y"
:
511
,
"width"
:
389
},{
"name"
:
"火焰2"
,
"x"
:
1
,
"height"
:
277
,
"y"
:
511
,
"width"
:
388
},{
"name"
:
"亮珠光芒"
,
"x"
:
1
,
"height"
:
121
,
"y"
:
790
,
"width"
:
140
}],
"imagePath"
:
"cyy_tex.png"
,
"width"
:
1024
}
\ No newline at end of file
assets/xy_camera/dragonBones/cyy_tex.json.meta
0 → 100644
View file @
36bd3751
{
"ver": "1.0.1",
"uuid": "2e1fc555-f6b2-468c-9ff9-048c3faa73d8",
"subMetas": {}
}
\ No newline at end of file
assets/xy_camera/dragonBones/cyy_tex.png
0 → 100644
View file @
36bd3751
58.8 KB
assets/xy_camera/
textures/bg.jp
g.meta
→
assets/xy_camera/
dragonBones/cyy_tex.pn
g.meta
View file @
36bd3751
{
{
"ver": "2.3.5",
"ver": "2.3.5",
"uuid": "
e1b4d971-9876-4832-803a-5a321964a78b
",
"uuid": "
a7483cb1-d314-40e2-a92c-d50a2f3f583d
",
"type": "sprite",
"type": "sprite",
"wrapMode": "clamp",
"wrapMode": "clamp",
"filterMode": "bilinear",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 1
280
,
"width": 1
024
,
"height":
720
,
"height":
1024
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
bg
": {
"
cyy_tex
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "
8288e3d4-4c75-4b27-8f01-f7014417f4dd
",
"uuid": "
0b0dd5cd-3378-47e7-a8cd-1e139a185a90
",
"rawTextureUuid": "
e1b4d971-9876-4832-803a-5a321964a78b
",
"rawTextureUuid": "
a7483cb1-d314-40e2-a92c-d50a2f3f583d
",
"trimType": "auto",
"trimType": "auto",
"trimThreshold": 1,
"trimThreshold": 1,
"rotated": false,
"rotated": false,
"offsetX":
0
,
"offsetX":
-1
,
"offsetY": 0,
"offsetY": 0
.5
,
"trimX":
0
,
"trimX":
1
,
"trimY":
0
,
"trimY":
1
,
"width": 1
28
0,
"width": 1
02
0,
"height":
720
,
"height":
1021
,
"rawWidth": 1
280
,
"rawWidth": 1
024
,
"rawHeight":
720
,
"rawHeight":
1024
,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft": 0,
...
...
assets/xy_camera/scene/xy_camera.fire
View file @
36bd3751
This diff is collapsed.
Click to expand it.
assets/xy_camera/scene/xy_camera.ts
View file @
36bd3751
...
@@ -19,6 +19,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -19,6 +19,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
showLoading
()
{
cc
.
find
(
`Canvas/loading`
).
active
=
true
;
}
hideLoading
()
{
cc
.
find
(
`Canvas/loading`
).
active
=
false
;
}
onLoadEnd
()
{
onLoadEnd
()
{
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
// TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
this
.
initData
();
this
.
initData
();
...
@@ -38,12 +45,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -38,12 +45,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
window
[
"
cameraHandler
"
].
takePictureCallback
=
(
err
,
url
)
=>
{
window
[
"
cameraHandler
"
].
takePictureCallback
=
(
err
,
url
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
console
.
log
(
err
);
this
.
hideLoading
();
return
;
return
;
}
}
const
pic
=
cc
.
find
(
`Canvas/border/pic_bg/picture`
);
const
pic
=
cc
.
find
(
`Canvas/border/pic_bg/picture`
);
getSpriteFrimeByUrl
(
url
,
(
frame
)
=>
{
getSpriteFrimeByUrl
(
url
,
(
frame
)
=>
{
pic
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
frame
;
pic
.
getComponent
(
cc
.
Sprite
).
spriteFrame
=
frame
;
pic
.
active
=
true
;
pic
.
active
=
true
;
this
.
hideLoading
();
});
});
}
}
}
}
...
@@ -56,6 +65,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -56,6 +65,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initListener
()
{
initListener
()
{
const
btn
=
cc
.
find
(
`Canvas/border/upload`
);
const
btn
=
cc
.
find
(
`Canvas/border/upload`
);
buttonOnClick
(
btn
,
()
=>
{
buttonOnClick
(
btn
,
()
=>
{
this
.
showLoading
();
window
[
"
cameraHandler
"
].
openCamera
();
window
[
"
cameraHandler
"
].
openCamera
();
});
});
}
}
...
...
assets/xy_camera/textures/bg.jpg
deleted
100644 → 0
View file @
5e595241
25.8 KB
index.html
View file @
36bd3751
...
@@ -31,11 +31,6 @@
...
@@ -31,11 +31,6 @@
</div>
</div>
<!-- </div> -->
<!-- </div> -->
<!-- camera -->
<div
id=
"VideoContainer"
style=
"position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; display: none;"
>
<video
id=
"video"
autoplay
style=
"width: 100%;height: 100%;"
></video>
</div>
<!-- <p class="footer">Made with <a href="https://www.cocos.com/products#CocosCreator" title="cocos creator">Cocos Creator</a></p> -->
<!-- <p class="footer">Made with <a href="https://www.cocos.com/products#CocosCreator" title="cocos creator">Cocos Creator</a></p> -->
<script
src=
"src/settings.js"
charset=
"utf-8"
></script>
<script
src=
"src/settings.js"
charset=
"utf-8"
></script>
...
...
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