Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
db-game-template
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
崔立强
db-game-template
Commits
a9285ccd
Commit
a9285ccd
authored
Oct 22, 2018
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
db507c6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
24 deletions
+16
-24
index.html
egret/index.html
+3
-23
Main.ts
egret/src/Main.ts
+13
-1
No files found.
egret/index.html
View file @
a9285ccd
...
...
@@ -39,7 +39,7 @@
<script
src=
"libs/security.js"
></script>
<script
src=
"libs/physics.min.js"
></script>
<!-- <script src="default.thm.js"></script> -->
<script
src=
"output.js"
></script>
<script
src=
"libs/downloadApp.js"
></script>
<script>
// localStorage.clear();
...
...
@@ -92,28 +92,8 @@ var __bgUrl__ = 'resource/assets/startScene/bg.jpg';
return
b
;
}
</script>
<script>
// window['resPath'] = 'https://yun.duiba.com.cn/db_games/activity/fishaqy/1535713239/'
/**
* {
* "renderMode":, //Engine rendering mode, "canvas" or "webgl"
* "audioType": 0 //Use the audio type, 0: default, 2: web audio, 3: audio
* "antialias": //Whether the anti-aliasing is enabled in WebGL mode, true: on, false: off, defaults to false
* "calculateCanvasScaleFactor": //a function return canvas scale factor
* }
**/
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
</script>
<script
src=
"output.js"
></script>
</body>
</html>
\ No newline at end of file
egret/src/Main.ts
View file @
a9285ccd
...
...
@@ -29,4 +29,16 @@ class Main extends MainBase {
}
}
window
[
'Main'
]
=
Main
;
\ No newline at end of file
window
[
'Main'
]
=
Main
;
egret
.
runEgret
({
renderMode
:
"webgl"
,
audioType
:
0
,
calculateCanvasScaleFactor
:
function
(
context
:
any
)
{
var
backingStore
=
context
.
backingStorePixelRatio
||
context
.
webkitBackingStorePixelRatio
||
context
.
mozBackingStorePixelRatio
||
context
.
msBackingStorePixelRatio
||
context
.
oBackingStorePixelRatio
||
context
.
backingStorePixelRatio
||
1
;
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
;
}
});
\ 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