Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
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
劳工
zeroing-engine
Commits
fca8e3db
Commit
fca8e3db
authored
May 08, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
a5caae85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
Stage.ts
src/2d/display/Stage.ts
+4
-1
launcher.ts
src/zeroing/launcher.ts
+4
-1
No files found.
src/2d/display/Stage.ts
View file @
fca8e3db
...
...
@@ -349,6 +349,7 @@ export class Stage extends Container {
* @param {number} renderType 渲染类型2canvas
* @param {boolean} transparent 透明否,默认透明true,此时bgColor无效
* @param {number} bgColor 背景颜色十六进制
* @param autoResize 是否自动重置尺寸
* @public
* @since 1.0.0
*/
...
...
@@ -360,7 +361,8 @@ export class Stage extends Container {
scaleMode
:
string
=
StageScaleMode
.
FIXED_WIDTH
,
renderType
:
RENDERER_TYPE
=
RENDERER_TYPE
.
WEBGL
,
transparent
:
boolean
=
true
,
bgColor
:
number
=
0x000000
bgColor
:
number
=
0x000000
,
autoResize
:
boolean
=
false
,
)
{
super
();
let
s
:
Stage
=
this
;
...
...
@@ -376,6 +378,7 @@ export class Stage extends Container {
s
.
rootDiv
=
div
;
s
.
setFrameRate
(
frameRate
);
s
.
_scaleMode
=
scaleMode
;
s
.
autoResize
=
autoResize
;
//s.anchorX = desW >> 1;
//s.anchorY = desH >> 1;
...
...
src/zeroing/launcher.ts
View file @
fca8e3db
...
...
@@ -52,7 +52,7 @@ export async function launchWithConfig(config, loadingDelegate?, onStart?) {
setTimeout
(
resolve
,
300
);
});
return
await
new
Promise
(
resolve
=>
{
const
{
containerId
,
designWidth
,
designHeight
,
frameRate
,
scaleMode
,
rendererType
,}
=
config
.
options
;
const
{
containerId
,
designWidth
,
designHeight
,
frameRate
,
scaleMode
,
rendererType
,
bgColor
,
autoResize
,
}
=
config
.
options
;
let
stage
=
window
[
'stage'
]
=
new
Stage
(
containerId
||
"game-container"
,
designWidth
||
750
,
...
...
@@ -60,6 +60,9 @@ export async function launchWithConfig(config, loadingDelegate?, onStart?) {
frameRate
||
60
,
scaleMode
||
StageScaleMode
.
FIXED_WIDTH
,
rendererType
||
RENDERER_TYPE
.
WEBGL
,
true
,
bgColor
,
autoResize
,
);
initAutoLayout
(
stage
);
Stage
.
flushAll
();
...
...
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