Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fyge_for_tb
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
王剑峰
fyge_for_tb
Commits
d7ffde95
Commit
d7ffde95
authored
Jul 21, 2022
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还是把_stageList放回去吧,调试插件要用到
parent
d0677f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
Stage.ts
src/2d/display/Stage.ts
+22
-1
No files found.
src/2d/display/Stage.ts
View file @
d7ffde95
...
...
@@ -26,8 +26,28 @@ export class Stage extends Container {
*/
public
renderObj
:
SystemRenderer
=
null
;
/**
* 直接获取stage的引用,避免总是从Event.ADD_TO_STAGE 事件中去获取stage引用
* @property getStage
* @param {string} stageName
* @return {any}
* @since 2.0.0
*/
public
static
getStage
(
stageName
:
string
=
"cusEngine"
):
Stage
{
return
Stage
.
_stageList
[
stageName
];
}
/**
* @property _stageList
* @static
* @type {Object}
* @private
*/
private
static
_stageList
:
any
=
{};
/**
*
相对于stage的可见区域,考虑不对外开放,但是有些地方又有用,比如某点是否在舞台可见区域内viewRect.isPointIn(gp)
*
舞台在设备里截取后的可见区域,有些时候知道可见区域是非常重要的,因为这样你就可以根据舞台的可见区域做自适应了。
* @property viewRect
* @public
* @since 1.0.0
...
...
@@ -198,6 +218,7 @@ export class Stage extends Container {
this
.
canvas
=
canvas
;
let
s
:
Stage
=
this
;
this
.
_instanceType
=
"Stage"
;
Stage
.
_stageList
[
"canvas"
]
=
s
;
s
.
stage
=
this
;
s
.
name
=
"stageInstance_"
+
s
.
instanceId
;
s
.
desWidth
=
desWidth
;
...
...
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