Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
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
new_taobao
Commits
f9542e93
Commit
f9542e93
authored
Sep 17, 2020
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
232ff81b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
44 deletions
+21
-44
RES.ts
project/src/canvas/game/module/RES.ts
+1
-1
Main.ts
project/src/canvas/game/src/Main.ts
+1
-0
app.json
taobao_mini/client/app.json
+1
-1
output.js
taobao_mini/client/pages/pagecanvas/output.js
+18
-3
pagemycanvaspage.acss
..._mini/client/pages/pagemycanvaspage/pagemycanvaspage.acss
+0
-17
pagemycanvaspage.axml
..._mini/client/pages/pagemycanvaspage/pagemycanvaspage.axml
+0
-5
pagemycanvaspage.js
...ao_mini/client/pages/pagemycanvaspage/pagemycanvaspage.js
+0
-14
pagemycanvaspage.json
..._mini/client/pages/pagemycanvaspage/pagemycanvaspage.json
+0
-3
No files found.
project/src/canvas/game/module/RES.ts
View file @
f9542e93
...
...
@@ -311,7 +311,7 @@ export namespace RES {
let
mark
=
true
;
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
let
resName
=
arr
[
i
][
'url'
];
getResAsync
(
resName
,
(
res
,
str
)
=>
{
getResAsync
(
"https:"
+
resName
,
(
res
,
str
)
=>
{
//标记失败,如果有一项资源加载失败,标记下
if
(
!
res
)
mark
=
false
if
(
++
count
==
countAll
)
callback
(
mark
);
...
...
project/src/canvas/game/src/Main.ts
View file @
f9542e93
...
...
@@ -75,6 +75,7 @@ export class Main {
// RES.loadSkinConfig(SkinJson);
//加载通用资源
// await RES.loadGroup("common");
await
RES
.
loadSparkAssets
(
resCanvasList
);
console
.
log
(
"通用资源加载完成"
)
//打开开始场景
...
...
taobao_mini/client/app.json
View file @
f9542e93
{
"pages"
:
[
"pages/pagecanvas/pagecanvas"
,
"pages/pagemycanvaspage/pagemycanvaspage"
],
"pages"
:
[
"pages/pagecanvas/pagecanvas"
],
"window"
:
{
"enableSkia"
:
"true"
,
"allowsBounceVertical"
:
"NO"
...
...
taobao_mini/client/pages/pagecanvas/output.js
View file @
f9542e93
...
...
@@ -128,10 +128,13 @@ var RES;
}
var
p
=
new
Promise
(
function
(
resolve
,
reject
)
{
loadResList
(
function
(
s
)
{
console
.
log
(
"恶趣味群翁群"
)
if
(
s
)
{
console
.
lo
(
'res'
)
resolve
();
}
else
{
console
.
lo
(
'rej'
)
reject
();
}
},
list
);
...
...
@@ -173,8 +176,10 @@ var RES;
RES
.
loadGroup
=
loadGroup
;
function
getResAsync
(
str
,
comFun
,
thisObj
)
{
var
type
=
str
.
substring
(
str
.
lastIndexOf
(
"."
)
+
1
,
str
.
length
);
console
.
log
(
"奥术大师多"
+
str
)
if
(
type
==
"png"
||
type
==
"jpg"
)
{
if
(
FYGE
.
TextureCache
[
str
])
{
console
.
log
(
"奥术大师多"
+
str
)
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
new
Promise
(
function
(
r
)
{
r
(
FYGE
.
TextureCache
[
str
]);
...
...
@@ -183,13 +188,16 @@ var RES;
else
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
FYGE
.
GlobalLoader
.
loadImage
(
function
(
s
,
image
)
{
// console.log("asdasdasdqqqq"+str,s)
if
(
s
)
{
FYGE
.
Texture
.
addToCache
(
FYGE
.
Texture
.
from
(
image
),
str
);
comFun
&&
comFun
.
call
(
thisObj
,
FYGE
.
TextureCache
[
str
],
str
);
console
.
log
(
"asdasdasdqqqq"
+
str
,
s
)
resolve
(
FYGE
.
TextureCache
[
str
]);
}
else
{
comFun
&&
comFun
.
call
(
thisObj
,
null
,
str
);
console
.
log
(
"zxczxczxc"
+
str
,
s
)
reject
();
}
},
str
);
...
...
@@ -260,11 +268,17 @@ var RES;
var
mark
=
true
;
for
(
var
i
=
0
;
i
<
countAll
;
i
++
)
{
var
resName
=
arr
[
i
][
'url'
];
getResAsync
(
resName
,
function
(
res
,
str
)
{
console
.
log
(
resName
)
getResAsync
(
"https:"
+
resName
,
function
(
res
,
str
)
{
console
.
log
(
"asdasdasdas"
,
res
)
if
(
!
res
)
mark
=
false
;
if
(
++
count
==
countAll
)
callback
(
mark
);
if
(
++
count
==
countAll
){
console
.
log
(
"玩儿若:asasdd"
)
callback
(
mark
);
}
console
.
log
(
"玩儿若:"
+
count
,
countAll
)
},
this
);
}
}
...
...
@@ -1261,6 +1275,7 @@ var Main = (function () {
case
0
:
layers_1
.
layers
.
init
(
this
.
stage
);
console
.
log
(
"初始化层级完成"
);
console
.
log
(
"resCanvasList_1.default:"
,
resCanvasList_1
.
default
)
return
[
4
,
RES_1
.
RES
.
loadSparkAssets
(
resCanvasList_1
.
default
)];
case
1
:
_a
.
sent
();
...
...
taobao_mini/client/pages/pagemycanvaspage/pagemycanvaspage.acss
deleted
100644 → 0
View file @
232ff81b
.mycanvaspage {
top: 0rpx;
left: 0rpx;
width: 750rpx;
height: 1624rpx;
display: block;
position: absolute;
}
.mycanvaspage .canvas {
width: 300rpx;
height: 300rpx;
opacity: 1;
display: block;
left: 0rpx;
top: 0rpx;
position: absolute;
}
taobao_mini/client/pages/pagemycanvaspage/pagemycanvaspage.axml
deleted
100644 → 0
View file @
232ff81b
<view class="mycanvaspage">
<view>
<canvas id="canvas" type="2d" class="canvas" disable-scroll="true" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady"></canvas>
</view>
</view>
\ No newline at end of file
taobao_mini/client/pages/pagemycanvaspage/pagemycanvaspage.js
deleted
100644 → 0
View file @
232ff81b
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
Page
({
data
:
{},
onLoad
(
props
)
{
this
.
setData
(
this
.
data
||
{
resList
:
resList
});
}
});
\ No newline at end of file
taobao_mini/client/pages/pagemycanvaspage/pagemycanvaspage.json
deleted
100644 → 0
View file @
232ff81b
{
"usingComponents"
:
{}
}
\ No newline at end of file
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