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
7ad67d40
Commit
7ad67d40
authored
Mar 24, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复store实例化的问题
parent
0c12aa3e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
13 deletions
+14
-13
engine.js
debug/engine.js
+5
-5
engine.js.map
debug/engine.js.map
+1
-1
Sprite.ts
src/2d/display/Sprite.ts
+1
-0
Interfaces.ts
src/zeroing/game-warpper/mvvm/Interfaces.ts
+1
-1
Zri.ts
src/zeroing/game-warpper/mvvm/Zri.ts
+1
-1
index.ts
src/zeroing/game-warpper/mvvm/index.ts
+5
-5
No files found.
debug/engine.js
View file @
7ad67d40
...
...
@@ -5638,6 +5638,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
this
.
_localBoundsSelf
.
y
=
-
height
*
this
.
anchorTexture
.
y
;
this
.
_localBoundsSelf
.
width
=
width
;
this
.
_localBoundsSelf
.
height
=
height
;
this
.
dispatchEvent
(
Event
.
COMPLETE
);
this
.
dispatchEvent
(
Event
.
RESIZE
);
};
Sprite
.
prototype
.
_onAnchorUpdate
=
function
()
{
...
...
@@ -5859,7 +5860,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
};
return
Sprite
;
}(
Container
));
//# sourceMappingURL=Sprite.js.map
var
BatchDrawCall
=
(
function
()
{
function
BatchDrawCall
()
{
...
...
@@ -8147,7 +8147,6 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
var
rootDiv
=
s
.
rootDiv
;
var
doc
=
document
.
documentElement
;
var
box
=
rootDiv
.
getBoundingClientRect
();
console
.
log
(
box
.
y
);
var
left
=
box
.
left
+
window
.
pageXOffset
-
doc
.
clientLeft
;
var
top
=
box
.
top
+
window
.
pageYOffset
-
doc
.
clientTop
;
cp
.
x
=
(
points
[
o
].
pageX
-
left
)
*
devicePixelRatio
;
...
...
@@ -8454,6 +8453,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
Stage
.
allUpdateObjList
=
[];
return
Stage
;
}(
Container
));
//# sourceMappingURL=Stage.js.map
var
GraphicsData
=
(
function
(
_super
)
{
tslib_1
.
__extends
(
GraphicsData
,
_super
);
...
...
@@ -20198,10 +20198,10 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
function
createStore
(
exp
,
computed
)
{
var
store
=
safeEval
(
exp
)
||
{};
for
(
var
_i
=
0
,
computed_1
=
computed
;
_i
<
computed_1
.
length
;
_i
++
)
{
var
item
=
computed_1
[
_i
];
var
getterCode
=
"return function(){
\n
\
t
\
t
\
t"
+
item
.
script
+
"
\n
\
t
\
t}"
;
var
_a
=
computed_1
[
_i
],
name
=
_a
.
name
,
script
=
_a
.
script
;
if
(
name
&&
!
store
.
hasOwnProperty
(
name
))
{
Object
.
defineProperty
(
store
,
item
.
name
,
{
var
getterCode
=
"return function(){
\n
\
t
\
t
\
t"
+
script
+
"
\n
\
t
\
t}"
;
Object
.
defineProperty
(
store
,
name
,
{
get
:
safeEval
(
getterCode
),
});
}
...
...
debug/engine.js.map
View file @
7ad67d40
This diff is collapsed.
Click to expand it.
src/2d/display/Sprite.ts
View file @
7ad67d40
...
...
@@ -158,6 +158,7 @@ export default class Sprite extends Container {
this
.
_localBoundsSelf
.
width
=
width
;
this
.
_localBoundsSelf
.
height
=
height
;
this
.
dispatchEvent
(
Event
.
COMPLETE
);
this
.
dispatchEvent
(
Event
.
RESIZE
);
}
...
...
src/zeroing/game-warpper/mvvm/Interfaces.ts
View file @
7ad67d40
...
...
@@ -35,7 +35,7 @@ export interface IZri
createWatcher
(
target
:
any
,
exp
:
string
,
scope
:
any
,
callback
:
WatcherCallback
):
IWatcher
;
/**
* 解析表达式成为命令数据
* @param key 属性名,合法的属性名应以
a-或a
_开头,以:或$分隔主命令和子命令
* @param key 属性名,合法的属性名应以
z-或z
_开头,以:或$分隔主命令和子命令
* @param value 属性值,如果属性名合法则会被用来作为表达式的字符串
* @return {CommandData|null} 命令数据,如果不是命令则返回null
*/
...
...
src/zeroing/game-warpper/mvvm/Zri.ts
View file @
7ad67d40
...
...
@@ -49,7 +49,7 @@ export class Zri implements IZri
/**
* 解析表达式成为命令数据
* @param key 属性名,合法的属性名应以
a-或a
_开头,以:或$分隔主命令和子命令
* @param key 属性名,合法的属性名应以
z-或z
_开头,以:或$分隔主命令和子命令
* @param value 属性值,如果属性名合法则会被用来作为表达式的字符串
* @param cmdRegExp 可选,如果不传则使用默认的命令正则表达式解析命令
* @return {CommandData|null} 命令数据,如果不是命令则返回null
...
...
src/zeroing/game-warpper/mvvm/index.ts
View file @
7ad67d40
...
...
@@ -27,12 +27,12 @@ export function bind(store: any, view: Container, options?: ZriOptions): IZri {
*/
export
function
createStore
(
exp
,
computed
)
{
let
store
=
safeEval
(
exp
)
||
{};
for
(
let
item
of
computed
)
{
let
getterCode
=
`return function(){
${
item
.
script
}
}`
;
for
(
let
{
name
,
script
}
of
computed
)
{
if
(
name
&&
!
store
.
hasOwnProperty
(
name
))
{
Object
.
defineProperty
(
store
,
item
.
name
,
{
let
getterCode
=
`return function(){
${
script
}
}`
;
Object
.
defineProperty
(
store
,
name
,
{
get
:
safeEval
(
getterCode
),
})
}
...
...
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