Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scilla-core
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
劳工
scilla-core
Commits
5424a3f3
Commit
5424a3f3
authored
Mar 18, 2019
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复锚点没对子集生效的问题
parent
2b2457de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Entity.ts
src/core/Entity.ts
+1
-1
manager.ts
src/core/manager.ts
+5
-5
No files found.
src/core/Entity.ts
View file @
5424a3f3
...
@@ -33,7 +33,7 @@ export function traverse(target: Entity, hitChild: (child: Entity, ...params) =>
...
@@ -33,7 +33,7 @@ export function traverse(target: Entity, hitChild: (child: Entity, ...params) =>
}
}
}
}
!
interrupt
&&
fullCallback
&&
fullCallback
(
target
);
fullCallback
&&
fullCallback
(
target
);
}
}
/**
/**
...
...
src/core/manager.ts
View file @
5424a3f3
...
@@ -85,7 +85,7 @@ export function getRoot(): Entity {
...
@@ -85,7 +85,7 @@ export function getRoot(): Entity {
/**
/**
* 获取当前帧率
* 获取当前帧率
*/
*/
export
function
getFPS
(){
export
function
getFPS
()
{
return
lastFPS
;
return
lastFPS
;
}
}
...
@@ -128,7 +128,7 @@ function flush(tsNow): void {
...
@@ -128,7 +128,7 @@ function flush(tsNow): void {
requestAnimationFrame
(
flush
);
requestAnimationFrame
(
flush
);
}
}
function
onFrameTick
(
tsNow
){
function
onFrameTick
(
tsNow
)
{
clear
();
clear
();
const
tsNow2
=
Date
.
now
();
const
tsNow2
=
Date
.
now
();
lastFPS
=
Math
.
floor
(
1000
/
(
tsNow
-
tsLast
));
lastFPS
=
Math
.
floor
(
1000
/
(
tsNow
-
tsLast
));
...
@@ -136,12 +136,12 @@ function onFrameTick(tsNow){
...
@@ -136,12 +136,12 @@ function onFrameTick(tsNow){
tsLast2
=
tsNow2
;
tsLast2
=
tsNow2
;
const
ts
=
tsNow
-
tsStart
;
const
ts
=
tsNow
-
tsStart
;
traverse
(
root
,
function
(
child
)
{
traverse
(
root
,
function
(
child
)
{
if
(
!
child
.
isFree
&&
child
.
enabled
)
{
if
(
!
child
.
isFree
&&
child
.
enabled
)
{
child
.
onUpdate
(
ts
);
child
.
onUpdate
(
ts
);
}
else
{
}
else
{
return
true
;
return
true
;
}
}
},
-
1
,
true
,
function
(
current
)
{
},
-
1
,
true
,
function
(
current
)
{
current
.
afterUpdate
();
current
.
afterUpdate
();
});
});
//const tsPass = Date.now() - tsNow;
//const tsPass = Date.now() - tsNow;
...
...
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