Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
renderingEngine
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
王剑峰
renderingEngine
Commits
3f014a42
Commit
3f014a42
authored
Nov 12, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暴露globalContext
parent
38573477
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
index.js
dist/index.js
+3
-3
index.js.map
dist/index.js.map
+1
-1
Process.ts
src/zeroing/behavior-runtime/Process.ts
+2
-2
VM.ts
src/zeroing/behavior-runtime/VM.ts
+1
-1
No files found.
dist/index.js
View file @
3f014a42
...
@@ -2075,9 +2075,9 @@
...
@@ -2075,9 +2075,9 @@
metaConfig
=
this
.
_meta
;
metaConfig
=
this
.
_meta
;
if
(
!
metaConfig
)
return
[
3
,
3
];
if
(
!
metaConfig
)
return
[
3
,
3
];
if
(
!
metaConfig
.
script
)
return
[
3
,
2
];
if
(
!
metaConfig
.
script
)
return
[
3
,
2
];
func
=
new
Function
(
'args'
,
'props'
,
warpAsyncScript
(
metaConfig
.
script
));
func
=
new
Function
(
'args'
,
'props'
,
'global'
,
warpAsyncScript
(
metaConfig
.
script
));
this
.
updateProps
();
this
.
updateProps
();
return
[
4
,
func
(
payload
,
this
.
_config
.
props
)];
return
[
4
,
func
(
payload
,
this
.
_config
.
props
,
this
.
_vm
.
getGlobalContext
()
)];
case
1
:
case
1
:
result
=
_a
.
sent
();
result
=
_a
.
sent
();
_a
.
label
=
2
;
_a
.
label
=
2
;
...
@@ -2204,7 +2204,7 @@
...
@@ -2204,7 +2204,7 @@
}
}
}
}
};
};
VM
.
prototype
.
getGlobal
=
function
()
{
VM
.
prototype
.
getGlobal
Context
=
function
()
{
return
this
.
_globalContext
;
return
this
.
_globalContext
;
};
};
return
VM
;
return
VM
;
...
...
dist/index.js.map
View file @
3f014a42
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/zeroing/behavior-runtime/Process.ts
View file @
3f014a42
...
@@ -91,9 +91,9 @@ export class Process {
...
@@ -91,9 +91,9 @@ export class Process {
let
metaConfig
=
this
.
_meta
;
let
metaConfig
=
this
.
_meta
;
if
(
metaConfig
)
{
if
(
metaConfig
)
{
if
(
metaConfig
.
script
)
{
if
(
metaConfig
.
script
)
{
let
func
=
new
Function
(
'args'
,
'props'
,
warpAsyncScript
(
metaConfig
.
script
));
let
func
=
new
Function
(
'args'
,
'props'
,
'global'
,
warpAsyncScript
(
metaConfig
.
script
));
this
.
updateProps
();
this
.
updateProps
();
result
=
await
func
(
payload
,
this
.
_config
.
props
);
result
=
await
func
(
payload
,
this
.
_config
.
props
,
this
.
_vm
.
getGlobalContext
()
);
}
}
}
else
{
}
else
{
console
.
warn
(
`process meta [
${
meta
}
] not found`
)
console
.
warn
(
`process meta [
${
meta
}
] not found`
)
...
...
src/zeroing/behavior-runtime/VM.ts
View file @
3f014a42
...
@@ -37,7 +37,7 @@ export class VM {
...
@@ -37,7 +37,7 @@ export class VM {
}
}
}
}
getGlobal
(){
getGlobal
Context
(){
return
this
.
_globalContext
;
return
this
.
_globalContext
;
}
}
}
}
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