Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tech
pi_sys
Commits
ee8241e2
Commit
ee8241e2
authored
2 years ago
by
余强
Browse files
Options
Download
Email Patches
Plain Diff
fix: loadFile接口定义返回Uint8Array
parent
408b3a1b
ydzm_multi_version
apk_patch
app_build
gui_progress
mult_gui_new
multi_version
new_engine
new_engine1
new_engine_blob
npm7.0
npm_test
old_engine
priority_queue
7.0.0
v7.0.32
v7.0.31
v7.0.30
v7.0.29
v7.0.28
v7.0.27
v7.0.26
v7.0.25
v7.0.24
v7.0.23
v7.0.22
v7.0.21
v7.0.20
v7.0.19
v7.0.18
v7.0.17
v7.0.16
v7.0.15
v7.0.14
v7.0.13
v7.0.12
v7.0.11
v7.0.10
v7.0.9
v7.0.8
v7.0.7
v7.0.6
v7.0.5
v7.0.4
v7.0.3
v7.0.2
v7.0.1
v7.0.0
v6.1.35
v6.1.34
v6.1.33
v6.1.32
v6.1.31
v6.1.30
v6.1.29
v6.1.28
v6.1.27
v6.1.26
v6.1.25
v6.1.24
v6.1.23
v6.1.22
v6.1.21
v6.1.20
v6.1.19
v6.1.18
v6.1.17
v6.1.16
v6.1.15
v6.1.14
v6.1.13
v6.1.12
v6.1.11
v6.1.10
v6.1.9
v6.1.8
v6.1.7
v6.1.6
v6.1.5
v6.1.4
v6.1.3
v6.1.2
v6.1.0
v6.0.2
v6.0.1
v6.0.0
v5.1.0
v5.0.4
v5.0.3
v5.0.2
v5.0.1
v5.0.0
v4.0.0
v3.0.82
v3.0.81
v3.0.80
v3.0.79
v3.0.78
v3.0.77
v3.0.76
v3.0.75
v3.0.74
v3.0.73
v3.0.72
v3.0.71
v3.0.70
v3.0.69
v3.0.68
v3.0.67
v3.0.66
v3.0.65
v3.0.64
v3.0.63
v3.0.62
v3.0.61
v3.0.60
v3.0.59
v3.0.58
v3.0.57
v3.0.56
v3.0.55
v3.0.54
v3.0.53
v3.0.52
v3.0.51
v3.0.50
v3.0.49
v3.0.48
v3.0.47
v3.0.46
v3.0.45
v3.0.44
v3.0.43
v3.0.42
v3.0.41
v3.0.40
v3.0.39
v3.0.38
v3.0.37
v3.0.36
v3.0.35
v3.0.34
v3.0.33
v3.0.32
v3.0.31
v3.0.30
v3.0.29
v3.0.28
v3.0.27
v3.0.26
v3.0.25
v3.0.24
v3.0.23
v3.0.22
v3.0.21
v3.0.20
v3.0.19
v3.0.18
v3.0.17
v3.0.16
v3.0.15
v3.0.14
v3.0.13
v3.0.12
v3.0.11
v3.0.10
v3.0.9
v3.0.8
v3.0.7
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/minigame/load/object_load.ts
+1
-1
src/minigame/load/object_load.ts
src/pi_sys/load/interface.ts
+1
-1
src/pi_sys/load/interface.ts
src/pi_sys/load/object_load.ts
+1
-1
src/pi_sys/load/object_load.ts
src/web/load_impl/object_load.ts
+7
-2
src/web/load_impl/object_load.ts
with
10 additions
and
5 deletions
+10
-5
src/minigame/load/object_load.ts
+
1
-
1
View file @
ee8241e2
...
...
@@ -157,7 +157,7 @@ export const loadAudioBuffer: TloadAudioBuffer = (filePath: string, args: any[])
}
// TODO - 集中小段时间内可进行主目录下载的Res资源文件,进行批下载
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
ArrayBuffer
|
Uint8Array
>
=>
{
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
Uint8Array
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
info
=
Depend
.
getFile
(
filePath
);
...
...
This diff is collapsed.
Click to expand it.
src/pi_sys/load/interface.ts
+
1
-
1
View file @
ee8241e2
...
...
@@ -17,7 +17,7 @@ export type TloadAudio = (filePath: string, args: any[]) => Promise<IPiAudio>;
export
type
TloadAudioBuffer
=
(
filePath
:
string
,
args
:
any
[])
=>
Promise
<
PiAudioBuffer
>
;
export
type
TloadFile
=
(
filePath
:
string
,
args
:
any
[])
=>
Promise
<
ArrayBuffer
|
Uint8Array
>
;
export
type
TloadFile
=
(
filePath
:
string
,
args
:
any
[])
=>
Promise
<
Uint8Array
>
;
//#endregion
...
...
This diff is collapsed.
Click to expand it.
src/pi_sys/load/object_load.ts
+
1
-
1
View file @
ee8241e2
...
...
@@ -31,6 +31,6 @@ export const loadAudioBuffer: TloadAudioBuffer = (filePath: string, args: any[])
return
Promise
.
resolve
(
null
);
}
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
ArrayBuffer
|
Uint8Array
>
=>
{
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
Uint8Array
>
=>
{
return
Promise
.
resolve
(
null
);
}
This diff is collapsed.
Click to expand it.
src/web/load_impl/object_load.ts
+
7
-
2
View file @
ee8241e2
...
...
@@ -201,13 +201,18 @@ export const loadAudioBuffer: TloadAudioBuffer = (filePath: string, args: any[])
})
}
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
ArrayBuffer
|
Uint8Array
>
=>
{
export
const
loadFile
:
TloadFile
=
(
filePath
:
string
,
args
:
any
[]):
Promise
<
Uint8Array
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
info
=
Depend
.
getFile
(
filePath
);
if
(
info
)
{
loadRes
(
info
)
.
then
(
resolve
)
.
then
(
r
=>
{
if
(
!
ArrayBuffer
.
isView
(
r
))
{
r
=
new
Uint8Array
(
r
);
}
resolve
(
r
as
Uint8Array
);
})
.
catch
(
reject
);
}
else
{
reject
(
`loadFile - Not Found File Depend Info
${
filePath
}
`
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help