Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
svge-egret
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
王剑峰
svge-egret
Commits
875e18df
Commit
875e18df
authored
Sep 23, 2019
by
wjf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
l
parent
4f61b4c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
5 deletions
+32
-5
SVGA.d.ts
SVGA.d.ts
+27
-4
MovieClip.js
src/Egret/MovieClip.js
+2
-1
parser.js
src/parser.js
+3
-0
No files found.
SVGA.d.ts
View file @
875e18df
...
@@ -18,10 +18,27 @@ export class Parser {
...
@@ -18,10 +18,27 @@ export class Parser {
}
}
export
class
EgretMovieClip
extends
egret
.
DisplayObjectContainer
{
export
class
EgretMovieClip
extends
egret
.
DisplayObjectContainer
{
/**
* 锁步,只关心每帧间隔时间,不管浏览器帧率
* 默认false
*/
lockStep
:
boolean
;
lockStep
:
boolean
;
/**
* 当前帧数
* 1最小
*/
readonly
currentFrame
:
number
;
readonly
currentFrame
:
number
;
/**
* 是否播放
*/
readonly
isPlaying
:
boolean
;
readonly
isPlaying
:
boolean
;
/**
* 正序还是反序
*/
readonly
isFront
:
boolean
;
readonly
isFront
:
boolean
;
/**
* 所有帧数
*/
totalFrames
:
number
;
totalFrames
:
number
;
/**
/**
* 停止
* 停止
...
@@ -31,7 +48,13 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
...
@@ -31,7 +48,13 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
* 播放
* 播放
*/
*/
play
():
void
;
play
():
void
;
/**
* 进入下一帧
*/
nextFrame
():
void
;
nextFrame
():
void
;
/**
* 进入上一帧
*/
prevFrame
():
void
;
prevFrame
():
void
;
/**
/**
* 停在指定帧
* 停在指定帧
...
@@ -39,7 +62,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
...
@@ -39,7 +62,7 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
*/
*/
gotoAndStop
(
frameIndex
:
number
):
void
;
gotoAndStop
(
frameIndex
:
number
):
void
;
/**
/**
*
*
从某帧开始播放
* @param frameIndex 1开始
* @param frameIndex 1开始
* @param isFront 默认true正向播放
* @param isFront 默认true正向播放
*/
*/
...
@@ -47,9 +70,9 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
...
@@ -47,9 +70,9 @@ export class EgretMovieClip extends egret.DisplayObjectContainer {
readonly
isInTimeFrame
:
boolean
;
readonly
isInTimeFrame
:
boolean
;
/**
/**
* 帧数范围播放
* 帧数范围播放
* @param beginFrame 默认第一帧
* @param beginFrame
开始播放的帧序号,
默认第一帧
* @param endFrame 默认最后一帧
* @param endFrame
结束播放的帧序号,
默认最后一帧
* @param loops 默认0,表示无限循环,无限循环callback无效,因为永远不会完成,用正常的complete监听最后一帧或第一帧
* @param loops
循环次数,
默认0,表示无限循环,无限循环callback无效,因为永远不会完成,用正常的complete监听最后一帧或第一帧
* @param callback 所有播放完的回调
* @param callback 所有播放完的回调
*/
*/
startAniRange
(
beginFrame
:
number
,
endFrame
:
number
,
loops
:
number
,
callback
?:
Function
):
void
startAniRange
(
beginFrame
:
number
,
endFrame
:
number
,
loops
:
number
,
callback
?:
Function
):
void
...
...
src/Egret/MovieClip.js
View file @
875e18df
...
@@ -309,6 +309,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
...
@@ -309,6 +309,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
* @param beginFrame 开始帧
* @param beginFrame 开始帧
* @param endFrame 结束帧
* @param endFrame 结束帧
* @param loops 0一直循环
* @param loops 0一直循环
* @param callback 0一直循环
*/
*/
startAniRange
(
startAniRange
(
beginFrame
,
beginFrame
,
...
@@ -351,7 +352,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
...
@@ -351,7 +352,7 @@ export class MovieClip extends egret.DisplayObjectContainer {
this
.
startFrame
=
this
.
_curFrame
;
this
.
startFrame
=
this
.
_curFrame
;
this
.
_isPlaying
=
true
;
this
.
_isPlaying
=
true
;
let
func
;
let
func
;
let
loopCount
=
loops
?
(
loops
+
0.5
>>
0
)
:
Infinity
;
let
loopCount
=
loops
>
0
?
(
loops
+
0.5
>>
0
)
:
Infinity
;
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
func
=
function
(
e
)
{
this
.
addEventListener
(
egret
.
Event
.
ENTER_FRAME
,
func
=
function
(
e
)
{
if
(
e
.
target
.
_isFront
)
{
if
(
e
.
target
.
_isFront
)
{
if
(
e
.
target
.
currentFrame
>=
endFrame
/*&& e.target.isInTimeFrame*/
)
{
if
(
e
.
target
.
currentFrame
>=
endFrame
/*&& e.target.isInTimeFrame*/
)
{
...
...
src/parser.js
View file @
875e18df
...
@@ -17,6 +17,9 @@ export class Parser {
...
@@ -17,6 +17,9 @@ export class Parser {
movie
[
"version"
]
=
data
.
ver
;
movie
[
"version"
]
=
data
.
ver
;
let
images
=
data
.
images
;
let
images
=
data
.
images
;
// let videoItem = new VideoEntity(movie, images);
// success(videoItem);
//白鹭的在base64图片都加载完用标签传
let
countAll
=
Object
.
getOwnPropertyNames
(
images
).
length
;
let
countAll
=
Object
.
getOwnPropertyNames
(
images
).
length
;
let
count
=
0
;
let
count
=
0
;
let
htmlImages
=
{};
let
htmlImages
=
{};
...
...
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