Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8c223edc
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8c223edc
编写于
3月 08, 2022
作者:
D
dongwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test cases
Signed-off-by:
N
dongwei
<
dongwei@kaihongdigi.com
>
上级
817e0644
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
453 addition
and
22 deletion
+453
-22
ace/ace_standard/src/main/js/default/pages/animateMotion/index.css
...tandard/src/main/js/default/pages/animateMotion/index.css
+0
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/index.hml
...tandard/src/main/js/default/pages/animateMotion/index.hml
+0
-19
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.css
...rd/src/main/js/default/pages/animateMotion/prop/index.css
+54
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.hml
...rd/src/main/js/default/pages/animateMotion/prop/index.hml
+184
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.js
...ard/src/main/js/default/pages/animateMotion/prop/index.js
+136
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/router/index.css
.../src/main/js/default/pages/animateMotion/router/index.css
+22
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/router/index.hml
.../src/main/js/default/pages/animateMotion/router/index.hml
+57
-0
ace/ace_standard/src/main/js/default/pages/animateMotion/router/index.js
...d/src/main/js/default/pages/animateMotion/router/index.js
+0
-3
未找到文件。
ace/ace_standard/src/main/js/default/pages/animateMotion/index.css
已删除
100644 → 0
浏览文件 @
817e0644
ace/ace_standard/src/main/js/default/pages/animateMotion/index.hml
已删除
100644 → 0
浏览文件 @
817e0644
<!-- xxx.hml -->
<div class="container">
<svg fill="white" width="400" height="400">
<path fill="none" stroke="blue" stroke-width="3" d="m40,60 c0,-100 160,100 160,0 c0,-100 -160,100 -160,0 z"></path>
<path fill="none" stroke="blue" stroke-width="3" d="m40,130 c0,-100 160,100 160,0 c0,-100 -160,100 -160,0 z"></path>
<path fill="none" stroke="blue" stroke-width="3" d="m40,200 c0,-100 160,100 160,0 c0,-100 -160,100 -160,0 z"></path>
<path fill="red" d="M-5,-5 L10,0 L-5,5 L0,0 Z">
<animateMotion dur="2000" repeatCount="indefinite" rotate="auto" keyPoints="0;0.2;0.4;0.6;0.8;1" path="m40,60 c0,-100 160,160,100 160,0 c0,-100,-160,100 -160,0 z">
</animateMotion>
</path>
<path fill="red" d="M-5,-5 L10,0 L-5,5 L0,0 Z">
<animateMotion dur="2000" repeatCount="indefinite" rotate="auto-reverse"path="m40,130 c0,-100 160,100 160,0 c0,-100,-160,100 -160,0 z">
</animateMotion>
</path>
<path fill="red" d="M-5,-5 L10,0 L-5,5 L0,0 Z">
<animateMotion dur="2000" repeatCount="indefinite" rotate="45"path="m40,200 c0,-100 160,100 160,0 c0,-100 -160,100 -160,0 z"></animateMotion>
</path>
</svg>
</div>
\ No newline at end of file
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.css
0 → 100644
浏览文件 @
8c223edc
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
.container
{
flex-direction
:
row
;
width
:
100%
;
height
:
100%
;
}
.title
{
width
:
100%
;
font-size
:
18px
;
margin
:
2px
;
padding
:
2px
;
font-weight
:
bold
;
text-align
:
center
;
}
.sub-title
{
width
:
100%
;
font-size
:
14px
;
text-align
:
center
;
margin
:
2px
;
padding
:
2px
;
}
.svg-style
{
width
:
100px
;
flex-weight
:
1
;
background-color
:
#eee
;
}
.prop-container
{
flex-direction
:
column
;
flex-weight
:
1
;
}
.specific-container
{
flex-direction
:
column
;
flex-weight
:
1
;
align-items
:
center
;
}
\ No newline at end of file
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.hml
0 → 100644
浏览文件 @
8c223edc
<!--/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/-->
<div class="container">
<div class="specific-container">
<text class="title">
animateMotion特有属性
</text>
<text class="sub-title">
标识属性 -- id
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="idProp">
</animateMotion>
</path>
</svg>
<text class="sub-title">
动效的属性名的属性 -- attributeName
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="attributeNameProp" attributeName="x"></animateMotion>
<animateMotion id="attributeNamePropNone" attributeName=""></animateMotion>
</path>
</svg>
<text class="sub-title">
延迟时间属性 -- begin
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="beginProp" begin="1000"></animateMotion>
<animateMotion id="beginPropNone" begin=""></animateMotion>
</path>
</svg>
<text class="sub-title">
持续时间属性 -- dur
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="durProp" dur="1000"></animateMotion>
<animateMotion id="durPropNone" dur=""></animateMotion>
</path>
</svg>
<text class="sub-title">
结束时间属性 -- end
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="endProp" end="1000"></animateMotion>
<animateMotion id="endPropNone" end=""></animateMotion>
</path>
</svg>
<text class="sub-title">
动画播放次数属性 -- repeatCount
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="repeatCountProp" repeatCount="20"></animateMotion>
<animateMotion id="repeatCountPropNone" repeatCount=""></animateMotion>
</path>
</svg>
<text class="sub-title">
动画结束状态属性 -- fill
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="fillPropFreeze" fill="freeze"></animateMotion>
<animateMotion id="fillPropRemove" fill="remove"></animateMotion>
</path>
</svg>
<text class="sub-title">
动画插值模式属性 -- calcMode
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="calcModePropDiscrete" calcMode="discrete"></animateMotion>
<animateMotion id="calcModePropLinear" calcMode="linear"></animateMotion>
<animateMotion id="calcModePropPaced" calcMode="paced"></animateMotion>
<animateMotion id="calcModePropSpline" calcMode="spline"></animateMotion>
</path>
</svg>
<text class="sub-title">
关键帧时间属性 -- keyTimes
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="keyTimesProp" keyTimes="0.3;0.6;0,9"></animateMotion>
<animateMotion id="keyTimesPropNone" keyTimes=""></animateMotion>
</path>
</svg>
<text class="sub-title">
贝塞尔控制点属性 -- keySplines
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="keySplinesProp" keySplines="0.5 0 0.5 1"></animateMotion>
<animateMotion id="keySplinesPropNone" keySplines=""></animateMotion>
</path>
</svg>
<text class="sub-title">
动画偏移值属性 -- by
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="byProp" by="1"></animateMotion>
<animateMotion id="byPropNone" by=""></animateMotion>
</path>
</svg>
<text class="sub-title">
开始值属性 -- from
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="fromProp" from="10"></animateMotion>
<animateMotion id="fromPropNone" from=""></animateMotion>
</path>
</svg>
<text class="sub-title">
结束值属性 -- to
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="toProp" to="10"></animateMotion>
<animateMotion id="toPropNone" to=""></animateMotion>
</path>
</svg>
<text class="sub-title">
关键帧点距离属性 -- keyPoints
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="keyPointsProp" keyPoints="0;0.2;0.4;0.6;0.8;1"></animateMotion>
<animateMotion id="keyPointsPropNone" keyPoints=""></animateMotion>
</path>
</svg>
<text class="sub-title">
运动路径属性 -- path
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="pathProp" path="m40,130 c0,-100 160,100 160,0 c0,-100,-160,100 -160,0 z"></animateMotion>
<animateMotion id="pathPropNone" path=""></animateMotion>
</path>
</svg>
<text class="sub-title">
动画对象旋转方向属性 -- rotate
</text>
<svg class="svg-style">
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion id="rotatePropRotate" rotate="rotate"></animateMotion>
<animateMotion id="rotatePropAutoReverse" rotate="auto-reverse"></animateMotion>
<animateMotion id="rotatePropNumber" rotate="45"></animateMotion>
</path>
</svg>
</div>
</div>
ace/ace_standard/src/main/js/default/pages/animateMotion/prop/index.js
0 → 100644
浏览文件 @
8c223edc
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
prompt
from
'
@system.prompt
'
;
export
default
{
data
:{
listOne
:[{}],
listThree
:[{},{},{}],
idProp
:
null
,
attributeNameProp
:
null
,
attributeNamePropNone
:
null
,
beginProp
:
null
,
beginPropNone
:
null
,
durProp
:
null
,
durPropNone
:
null
,
endProp
:
null
,
endPropNone
:
null
,
repeatCountProp
:
null
,
repeatCountPropNone
:
null
,
fillPropFreeze
:
null
,
fillPropRemove
:
null
,
calcModePropDiscrete
:
null
,
calcModePropLinear
:
null
,
calcModePropPaced
:
null
,
calcModePropSpline
:
null
,
keyTimesProp
:
null
,
keyTimesPropNone
:
null
,
keySplinesProp
:
null
,
keySplinesPropNone
:
null
,
byProp
:
null
,
byPropNone
:
null
,
fromProp
:
null
,
fromPropNone
:
null
,
toProp
:
null
,
toPropNone
:
null
,
keyPointsProp
:
null
,
keyPointsPropNone
:
null
,
pathProp
:
null
,
pathPropNone
:
null
,
rotatePropRotate
:
null
,
rotatePropAutoReverse
:
null
,
rotatePropNumber
:
null
,
},
onShow
(){
this
.
getCommonPropValues
();
globalThis
.
value
=
{
idProp
:
this
.
idProp
,
attributeNameProp
:
this
.
attributeNameProp
,
attributeNamePropNone
:
this
.
attributeNamePropNone
,
beginProp
:
this
.
beginProp
,
beginPropNone
:
this
.
beginPropNone
,
durProp
:
this
.
durProp
,
durPropNone
:
this
.
durPropNone
,
endProp
:
this
.
endProp
,
endPropNone
:
this
.
endPropNone
,
repeatCountProp
:
this
.
repeatCountProp
,
repeatCountPropNone
:
this
.
repeatCountPropNone
,
fillPropFreeze
:
this
.
fillPropFreeze
,
fillPropRemove
:
this
.
fillPropRemove
,
calcModePropDiscrete
:
this
.
calcModePropDiscrete
,
calcModePropLinear
:
this
.
calcModePropLinear
,
calcModePropPaced
:
this
.
calcModePropPaced
,
calcModePropSpline
:
this
.
calcModePropSpline
,
keyTimesProp
:
this
.
keyTimesProp
,
keyTimesPropNone
:
this
.
keyTimesPropNone
,
keySplinesProp
:
this
.
keySplinesProp
,
keySplinesPropNone
:
this
.
keySplinesPropNone
,
byProp
:
this
.
byProp
,
byPropNone
:
this
.
byPropNone
,
fromProp
:
this
.
fromProp
,
fromPropNone
:
this
.
fromPropNone
,
toProp
:
this
.
toProp
,
toPropNone
:
this
.
toPropNone
,
keyPointsProp
:
this
.
keyPointsProp
,
keyPointsPropNone
:
this
.
keyPointsPropNone
,
pathProp
:
this
.
pathProp
,
pathPropNone
:
this
.
pathPropNone
,
rotatePropRotate
:
this
.
rotatePropRotate
,
rotatePropAutoReverse
:
this
.
rotatePropAutoReverse
,
rotatePropNumber
:
this
.
rotatePropNumber
,
}
},
getCommonPropValues
(){
this
.
idProp
=
this
.
$element
(
"
idProp
"
).
getInspector
()
this
.
attributeNameProp
=
this
.
$element
(
"
attributeNameProp
"
).
getInspector
()
this
.
attributeNamePropNone
=
this
.
$element
(
"
attributeNamePropNone
"
).
getInspector
()
this
.
beginProp
=
this
.
$element
(
"
beginProp
"
).
getInspector
()
this
.
beginPropNone
=
this
.
$element
(
"
beginPropNone
"
).
getInspector
()
this
.
durProp
=
this
.
$element
(
"
durProp
"
).
getInspector
()
this
.
durPropNone
=
this
.
$element
(
"
durPropNone
"
).
getInspector
()
this
.
endProp
=
this
.
$element
(
"
endProp
"
).
getInspector
()
this
.
endPropNone
=
this
.
$element
(
"
endPropNone
"
).
getInspector
()
this
.
repeatCountProp
=
this
.
$element
(
"
repeatCountProp
"
).
getInspector
()
this
.
repeatCountPropNone
=
this
.
$element
(
"
repeatCountPropNone
"
).
getInspector
()
this
.
fillPropFreeze
=
this
.
$element
(
"
fillPropFreeze
"
).
getInspector
()
this
.
fillPropRemove
=
this
.
$element
(
"
fillPropRemove
"
).
getInspector
()
this
.
calcModePropDiscrete
=
this
.
$element
(
"
calcModePropDiscrete
"
).
getInspector
()
this
.
calcModePropLinear
=
this
.
$element
(
"
calcModePropLinear
"
).
getInspector
()
this
.
calcModePropPaced
=
this
.
$element
(
"
calcModePropPaced
"
).
getInspector
()
this
.
calcModePropSpline
=
this
.
$element
(
"
calcModePropSpline
"
).
getInspector
()
this
.
keyTimesProp
=
this
.
$element
(
"
keyTimesProp
"
).
getInspector
()
this
.
keyTimesPropNone
=
this
.
$element
(
"
keyTimesPropNone
"
).
getInspector
()
this
.
keySplinesProp
=
this
.
$element
(
"
keySplinesProp
"
).
getInspector
()
this
.
keySplinesPropNone
=
this
.
$element
(
"
keySplinesPropNone
"
).
getInspector
()
this
.
byProp
=
this
.
$element
(
"
byProp
"
).
getInspector
()
this
.
byPropNone
=
this
.
$element
(
"
byPropNone
"
).
getInspector
()
this
.
fromProp
=
this
.
$element
(
"
fromProp
"
).
getInspector
()
this
.
fromPropNone
=
this
.
$element
(
"
fromPropNone
"
).
getInspector
()
this
.
toProp
=
this
.
$element
(
"
toProp
"
).
getInspector
()
this
.
toPropNone
=
this
.
$element
(
"
toPropNone
"
).
getInspector
()
this
.
keyPointsProp
=
this
.
$element
(
"
keyPointsProp
"
).
getInspector
()
this
.
keyPointsPropNone
=
this
.
$element
(
"
keyPointsPropNone
"
).
getInspector
()
this
.
pathProp
=
this
.
$element
(
"
pathProp
"
).
getInspector
()
this
.
pathPropNone
=
this
.
$element
(
"
pathPropNone
"
).
getInspector
()
this
.
rotatePropRotate
=
this
.
$element
(
"
rotatePropRotate
"
).
getInspector
()
this
.
rotatePropAutoReverse
=
this
.
$element
(
"
rotatePropAutoReverse
"
).
getInspector
()
this
.
rotatePropNumber
=
this
.
$element
(
"
rotatePropNumber
"
).
getInspector
()
return
},
}
ace/ace_standard/src/main/js/default/pages/animateMotion/router/index.css
0 → 100644
浏览文件 @
8c223edc
.container
{
width
:
100%
;
flex-direction
:
column
;
align-items
:
center
;
}
.container-title
{
font-size
:
26px
;
font-weight
:
600
;
padding
:
16px
;
}
.title
{
font-size
:
18px
;
color
:
grey
;
padding
:
5px
;
text-align
:
center
;
}
.svg-style
{
border
:
1px
solid
#000000
;
}
.outerBox
{
flex-direction
:
column
;
}
\ No newline at end of file
ace/ace_standard/src/main/js/default/pages/animateMotion/router/index.hml
0 → 100644
浏览文件 @
8c223edc
<div class="container">
<text class="container-title">
animateMotion动画效果
</text>
<div>
<div class="outerBox">
<text class="title">
动画效果1
</text>
<svg width="150" height="120" class="svg-style">
<path fill="none" stroke="blue" stroke-width="3" d="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z"></path>
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion dur="2000" repeatCount="indefinite" rotate="auto" keyPoints="0;0.2;0.4;0.6;0.8;1" path="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z">
</animateMotion>
</path>>
</svg>
</div>
<div class="outerBox">
<text class="title">
动画效果2
</text>
<svg width="150" height="120" class="svg-style">
<path fill="none" stroke="blue" stroke-width="3" d="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z"></path>
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion dur="2000" repeatCount="1" rotate="auto" keyPoints="0;0.2;0.4;0.6;0.8;1" path="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z">
</animateMotion>
</path>
</svg>
</div>
</div>
<div>
<div class="outerBox">
<text class="title">
动画效果3
</text>
<svg width="150" height="120" class="svg-style">
<path fill="none" stroke="blue" stroke-width="3" d="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z"></path>
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion dur="2000" repeatCount="indefinite" rotate="auto-reverse" path="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z">
</animateMotion>
</path>
</svg>
</div>
<div class="outerBox">
<text class="title">
动画效果4
</text>
<svg width="150" height="120" class="svg-style">
<path fill="none" stroke="blue" stroke-width="3" d="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120,0 z"></path>
<path fill="red" d="M-5,-10 L15,0 L-5,10 L0,0 Z">
<animateMotion dur="2000" repeatCount="1" fill="freeze" rotate="5" path="m20,60 c0,-100 120,100 120,0 c0,-100 -120,100 -120, 0 z">
</animateMotion>
</path>
</svg>
</div>
</div>
</div>
ace/ace_standard/src/main/js/default/pages/animateMotion/index.js
→
ace/ace_standard/src/main/js/default/pages/animateMotion/
router/
index.js
浏览文件 @
8c223edc
...
...
@@ -14,7 +14,4 @@
*/
export
default
{
data
:
{
title
:
'
World
'
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录