Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
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
community
godot
Commits
07f65184
Commit
07f65184
authored
Jan 15, 2017
by
Rémi Verschelde
Committed by
GitHub
Jan 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7519 from eska014/web-presentation
Improve Web export presentation
parents
fe8459ac
1f7d4c4d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
33 deletions
+25
-33
SCsub
platform/javascript/SCsub
+1
-0
detect.py
platform/javascript/detect.py
+0
-1
export.cpp
platform/javascript/export/export.cpp
+1
-1
godot_shell.html
platform/javascript/godot_shell.html
+0
-0
javascript_main.cpp
platform/javascript/javascript_main.cpp
+20
-22
os_javascript.cpp
platform/javascript/os_javascript.cpp
+3
-9
No files found.
platform/javascript/SCsub
View file @
07f65184
...
@@ -22,6 +22,7 @@ env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_fu
...
@@ -22,6 +22,7 @@ env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_fu
env
.
Append
(
LINKFLAGS
=
[
"--shell-file"
,
'"platform/javascript/godot_shell.html"'
])
env
.
Append
(
LINKFLAGS
=
[
"--shell-file"
,
'"platform/javascript/godot_shell.html"'
])
build
=
env
.
Program
(
'#bin/godot'
,
javascript_objects
,
PROGSUFFIX
=
env
[
"PROGSUFFIX"
]
+
".html"
)
build
=
env
.
Program
(
'#bin/godot'
,
javascript_objects
,
PROGSUFFIX
=
env
[
"PROGSUFFIX"
]
+
".html"
)
Depends
(
build
,
"godot_shell.html"
)
def
make_html_shell
(
target
,
source
,
env
):
def
make_html_shell
(
target
,
source
,
env
):
html_path
=
target
[
0
]
.
rstr
()
html_path
=
target
[
0
]
.
rstr
()
...
...
platform/javascript/detect.py
View file @
07f65184
...
@@ -81,7 +81,6 @@ def configure(env):
...
@@ -81,7 +81,6 @@ def configure(env):
env
.
Append
(
CPPFLAGS
=
[
'-DJAVASCRIPT_ENABLED'
,
'-DUNIX_ENABLED'
,
'-DPTHREAD_NO_RENAME'
,
'-DNO_FCNTL'
,
'-DMPC_FIXED_POINT'
,
'-DTYPED_METHOD_BIND'
,
'-DNO_THREADS'
])
env
.
Append
(
CPPFLAGS
=
[
'-DJAVASCRIPT_ENABLED'
,
'-DUNIX_ENABLED'
,
'-DPTHREAD_NO_RENAME'
,
'-DNO_FCNTL'
,
'-DMPC_FIXED_POINT'
,
'-DTYPED_METHOD_BIND'
,
'-DNO_THREADS'
])
env
.
Append
(
CPPFLAGS
=
[
'-DGLES2_ENABLED'
])
env
.
Append
(
CPPFLAGS
=
[
'-DGLES2_ENABLED'
])
env
.
Append
(
CPPFLAGS
=
[
'-DGLES_NO_CLIENT_ARRAYS'
])
env
.
Append
(
CPPFLAGS
=
[
'-DGLES_NO_CLIENT_ARRAYS'
])
env
.
Append
(
CPPFLAGS
=
[
'-s'
,
'FULL_ES2=1'
])
# env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED','-DMPC_FIXED_POINT'])
# env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED','-DMPC_FIXED_POINT'])
if
env
[
'wasm'
]
==
'yes'
:
if
env
[
'wasm'
]
==
'yes'
:
...
...
platform/javascript/export/export.cpp
View file @
07f65184
...
@@ -377,7 +377,7 @@ EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
...
@@ -377,7 +377,7 @@ EditorExportPlatformJavaScript::EditorExportPlatformJavaScript() {
logo
->
create_from_image
(
img
);
logo
->
create_from_image
(
img
);
max_memory
=
3
;
max_memory
=
3
;
html_title
=
""
;
html_title
=
""
;
html_font_family
=
"arial,sans-serif"
;
html_font_family
=
"
'Droid Sans',
arial,sans-serif"
;
html_controls_enabled
=
true
;
html_controls_enabled
=
true
;
pack_mode
=
PACK_SINGLE_FILE
;
pack_mode
=
PACK_SINGLE_FILE
;
}
}
...
...
platform/javascript/godot_shell.html
View file @
07f65184
This diff is collapsed.
Click to expand it.
platform/javascript/javascript_main.cpp
View file @
07f65184
...
@@ -140,10 +140,9 @@ static void _godot_draw(void) {
...
@@ -140,10 +140,9 @@ static void _godot_draw(void) {
extern
"C"
{
extern
"C"
{
void
main_after_fs_sync
(
int
value
)
{
void
main_after_fs_sync
()
{
start_step
=
1
;
start_step
=
1
;
printf
(
"FS SYNCHED!
\n
"
);
}
}
}
}
...
@@ -178,26 +177,25 @@ int main(int argc, char *argv[]) {
...
@@ -178,26 +177,25 @@ int main(int argc, char *argv[]) {
glutDisplayFunc
(
_godot_draw
);
glutDisplayFunc
(
_godot_draw
);
//glutSpecialFunc(gears_special);
//glutSpecialFunc(gears_special);
//mount persistent file system
EM_ASM
(
//mount persistent filesystem
FS
.
mkdir
(
'
/
userfs
'
);
EM_ASM
(
FS
.
mount
(
IDBFS
,
{},
'
/
userfs
'
);
FS
.
mkdir
(
'
/
userfs
'
);
FS
.
mount
(
IDBFS
,
{},
'
/
userfs
'
);
// sync from persistent state into memory and then
// run the 'main_after_fs_sync' function
FS
.
syncfs
(
true
,
function
(
err
)
{
// sync from persisted state into memory and then
if
(
err
)
{
// run the 'test' function
Module
.
setStatus
(
'
Failed
to
load
persistent
data
\
nPlease
allow
(
third
-
party
)
cookies
'
);
FS
.
syncfs
(
true
,
function
(
err
)
{
Module
.
printErr
(
'
Failed
to
populate
IDB
file
system
:
'
+
err
.
message
);
assert
(
!
err
);
Module
.
exit
();
console
.
log
(
"done syncinc!"
);
}
else
{
_after_sync_cb
=
Module
.
cwrap
(
'
main_after_fs_sync
'
,
'
void
'
,[
'
number
'
]);
Module
.
print
(
'
Successfully
populated
IDB
file
system
'
);
_after_sync_cb
(
0
);
ccall
(
'
main_after_fs_sync
'
,
'
void
'
,
[]);
}
});
});
);
);
glutMainLoop
();
glutMainLoop
();
...
...
platform/javascript/os_javascript.cpp
View file @
07f65184
...
@@ -502,18 +502,12 @@ bool OS_JavaScript::main_loop_iterate() {
...
@@ -502,18 +502,12 @@ bool OS_JavaScript::main_loop_iterate() {
time_to_save_sync
-=
elapsed
;
time_to_save_sync
-=
elapsed
;
print_line
(
"elapsed "
+
itos
(
elapsed
)
+
" tts "
+
itos
(
time_to_save_sync
));
if
(
time_to_save_sync
<
0
)
{
if
(
time_to_save_sync
<
0
)
{
//time to sync, for real
//time to sync, for real
// run 'success'
print_line
(
"DOING SYNCH!"
);
EM_ASM
(
EM_ASM
(
FS
.
syncfs
(
function
(
err
)
{
FS
.
syncfs
(
function
(
err
)
{
assert
(
!
err
);
if
(
err
)
{
Module
.
printErr
(
'
Failed
to
save
IDB
file
system
:
'
+
err
.
message
);
}
console
.
log
(
"Synched!"
);
});
//ccall('success', 'v');
});
);
);
}
}
...
...
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