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
f277d24c
Commit
f277d24c
authored
May 28, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Plain Diff
--
parents
eb82bee2
241d4727
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
engine.js
debug/engine.js
+14
-1
engine.js.map
debug/engine.js.map
+1
-1
EditorStage.ts
src/zeroing/game-warpper/EditorStage.ts
+2
-2
Image.ts
src/zeroing/game-warpper/nodes/Image.ts
+8
-0
No files found.
debug/engine.js
View file @
f277d24c
...
@@ -19734,6 +19734,20 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
...
@@ -19734,6 +19734,20 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
Image
.
prototype
.
onDataMutated
=
function
(
e
)
{
Image
.
prototype
.
onDataMutated
=
function
(
e
)
{
this
.
_setSourceDirect
(
dataCenter
.
formatString
(
this
.
_originText
,
this
.
_escapes
));
this
.
_setSourceDirect
(
dataCenter
.
formatString
(
this
.
_originText
,
this
.
_escapes
));
};
};
Object
.
defineProperty
(
Image
.
prototype
,
"textureWidth"
,
{
get
:
function
()
{
return
this
.
_texture
?
this
.
_texture
.
width
:
0
;
},
enumerable
:
true
,
configurable
:
true
});
Object
.
defineProperty
(
Image
.
prototype
,
"textureHeight"
,
{
get
:
function
()
{
return
this
.
_texture
?
this
.
_texture
.
height
:
0
;
},
enumerable
:
true
,
configurable
:
true
});
return
Image
;
return
Image
;
}(
Sprite
));
}(
Sprite
));
...
@@ -21751,7 +21765,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
...
@@ -21751,7 +21765,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
globalPos
.
x
*=
devicePixelRatio
;
globalPos
.
x
*=
devicePixelRatio
;
globalPos
.
y
*=
devicePixelRatio
;
globalPos
.
y
*=
devicePixelRatio
;
var
node
=
this
.
hitTestPoint
(
globalPos
,
true
);
var
node
=
this
.
hitTestPoint
(
globalPos
,
true
);
console
.
log
(
globalPos
.
x
,
globalPos
.
y
,
node
?
node
.
name
:
''
);
return
node
;
return
node
;
};
};
return
EditorStage
;
return
EditorStage
;
...
...
debug/engine.js.map
View file @
f277d24c
This diff is collapsed.
Click to expand it.
src/zeroing/game-warpper/EditorStage.ts
View file @
f277d24c
...
@@ -11,7 +11,7 @@ import {Point} from "../../2d/math/Point";
...
@@ -11,7 +11,7 @@ import {Point} from "../../2d/math/Point";
import
{
alignMgr
}
from
"../decorators/AlignManager"
;
import
{
alignMgr
}
from
"../decorators/AlignManager"
;
const
propPrefixFilter
=
[
'_'
,
'__'
,
'$'
];
const
propPrefixFilter
=
[
'_'
,
'__'
,
'$'
];
const
includeProps
=
[
'_width'
,
'_height'
,
'worldMatrix'
,
'texture'
];
const
includeProps
=
[
'_width'
,
'_height'
,
'worldMatrix'
];
const
excludeProps
=
[
'eventTypes'
,
'eventTypes1'
,
'tempDisplayObjectParent'
,
'renderable'
,
'destroyed'
,
'children'
,
'start'
,
'pluginName'
,
'isUI'
,
'crossOrigin'
];
const
excludeProps
=
[
'eventTypes'
,
'eventTypes1'
,
'tempDisplayObjectParent'
,
'renderable'
,
'destroyed'
,
'children'
,
'start'
,
'pluginName'
,
'isUI'
,
'crossOrigin'
];
const
propTypeFilter
=
[
'function'
,
'object'
];
const
propTypeFilter
=
[
'function'
,
'object'
];
const
offsetPrefix
=
'offset_'
;
const
offsetPrefix
=
'offset_'
;
...
@@ -147,7 +147,7 @@ export class EditorStage extends Node {
...
@@ -147,7 +147,7 @@ export class EditorStage extends Node {
let
node
=
this
.
hitTestPoint
(
globalPos
,
true
);
let
node
=
this
.
hitTestPoint
(
globalPos
,
true
);
console
.
log
(
globalPos
.
x
,
globalPos
.
y
,
node
?
node
.
name
:
''
);
//
console.log(globalPos.x, globalPos.y, node ? node.name : '');
return
node
;
return
node
;
}
}
...
...
src/zeroing/game-warpper/nodes/Image.ts
View file @
f277d24c
...
@@ -120,4 +120,12 @@ export class Image extends Sprite implements IUIComponent {
...
@@ -120,4 +120,12 @@ export class Image extends Sprite implements IUIComponent {
private
onDataMutated
(
e
=
null
)
{
private
onDataMutated
(
e
=
null
)
{
this
.
_setSourceDirect
(
dataCenter
.
formatString
(
this
.
_originText
,
this
.
_escapes
));
this
.
_setSourceDirect
(
dataCenter
.
formatString
(
this
.
_originText
,
this
.
_escapes
));
}
}
get
textureWidth
(){
return
this
.
_texture
?
this
.
_texture
.
width
:
0
;
}
get
textureHeight
(){
return
this
.
_texture
?
this
.
_texture
.
height
:
0
;
}
}
}
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