123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- using static HTEXLib.Animations.MotionPathAnimation;
- namespace HTEXLib.Models
- {
- public abstract class TimeNode
- {
- public string type { get; set; }
- }
- /// <summary>
- /// TODO
- /// TimeListTimeConditionalListType:
- /// EndConditionList
- /// NextConditionList
- /// PreviousConditionList
- /// StartConditionList
- /// NextConditionList nextCondLst PreviousConditionList prevCondLst
- /// </summary>
- public class Sequence : TimeNode {
- /// <summary>
- /// 默认禁用 同时进行
- /// </summary>
- public bool concurrent { get; set; } = false;
- /// <summary>
- /// None 0 none , SkipTimed 1 skipTimed
- /// </summary>
- public string previousAction { get; set; }
- /// <summary>
- /// None 0 none , Seek 1 seek 按顺序进行
- /// </summary>
- public string nextAction { get; set; }
- }
- /// <summary>
- /// CommonTimeNode qualified name is p:excl 出现这个节点 则表述 排他节点,暂停其他时间线的元素动画
- /// </summary>
- public class Exclusive : TimeNode {
- public bool suspend { get; set; } = false;
- }
- /// <summary>
- /// TODO TimeAnimateValueList CommonBehavior p:cBhvr ///更多信息
- /// </summary>
- public class Anim : TimeNode {
- public string by { get; set; }
- public string from { get; set; }
- public string to { get; set; }
- /// <summary>
- /// CalculationMode
- /// Discrete 0 discrete,Linear 1 lin, Formula 2 fmla
- /// </summary>
- public string calcmode { get; set; }
- /// <summary>
- /// String 0 str,Number 1 num, Color 2 clr
- /// </summary>
- public string valueType { get; set; }
- /// <summary>
- /// 2010,2013,2016 p14:bounceEnd
- /// </summary>
- public int bounceEnd { get; set; }
- public Behavior behavior { get; set; }
- public List<TimeAnimate> timeAnimate { get; set; }
-
- }
- public class TimeAnimate {
- public string time { get; set; }
- /// <summary>
- /// 19.5.79
- /// JavaScript Expression Evaluator zip 下载
- /// https://github.com/silentmatt/expr-eval
- ///
- /// https://github.com/mparlak/Flee
- ///
- /// </summary>
- public string fomula { get; set; }
- public Val variantValue { get; set; }
- }
- public class Val {
- public bool boolVal { get; set; }
- public int intVal { get; set; }
- public float fltVal { get; set; }
- public string strVal { get; set; }
- /// <summary>
- /// ColorType
- /// </summary>
- public string clrVal { get; set; }
- }
- public class Behavior {
- public string additive { get; set; }
- public string transformType { get; set; }
- public string accumulate { get; set; }
- public string from { get; set; }
- public string to { get; set; }
- public string by { get; set; }
- public string runtimeContext { get; set; }
- public string @override { get; set; }
- /// <summary>
- ///style.opacity, style.rotation, style.visibility, style.color, style.fontSize, style.fontWeight,
- ///style.fontStyle, style.fontFamily, style.textEffectEmboss, style.textShadow, style.textTransform,
- ///style.textDecorationUnderline, style.textEffectOutline, style.textDecorationLineThrough, style.sRotation,
- ///imageData.cropTop, imageData.cropBottom, imageData.cropLeft, imageData.cropRight, imageData.cropRight,
- ///imageData.gain, imageData.blacklevel, imageData.gamma, imageData.grayscale, imageData.chromakey,
- ///fill.on, fill.type, fill.color, fill.opacity, fill.color2, fill.method, fill.opacity2, fill.angle,
- ///fill.focus, fill.focusposition.x, fill.focusposition.y, fill.focussize.x, fill.focussize.y,
- ///stroke.on, stroke.color, stroke.weight, stroke.opacity, stroke.linestyle, stroke.dashstyle,
- ///stroke.filltype, stroke.src, stroke.color2, stroke.imagesize.x, stroke.imagesize.y,
- ///stroke.startArrow, stroke.endArrow, stroke.startArrowWidth, stroke.startArrowLength, stroke.endArrowWidth, stroke.endArrowLength,
- ///shadow.on, shadow.type, shadow.color, shadow.color2, shadow.opacity, shadow.offset.x, shadow.offset.y,
- ///shadow.offset2.x, shadow.offset2.y, shadow.origin.x, shadow.origin.y, shadow.matrix.xtox, shadow.matrix.ytox,
- ///shadow.matrix.xtox, shadow.matrix.ytoy, shadow.matrix.perspectiveX, shadow.matrix.perspectiveY,
- ///skew.on, skew.offset.x, skew.offset.y, skew.origin.x, skew.origin.y, skew.matrix.xtox, skew.matrix.ytox,
- ///skew.matrix.xtox, skew.matrix.ytoy, skew.matrix.perspectiveX, skew.matrix.perspectiveY,
- ///extrusion.on, extrusion.type, extrusion.render, extrusion.viewpointorigin.x, extrusion.viewpointorigin.y,
- ///extrusion.viewpoint.x, extrusion.viewpoint.y, extrusion.viewpoint.z, extrusion.plane, extrusion.skewangle,
- ///extrusion.skewamt, extrusion.backdepth, extrusion.foredepth, extrusion.orientation.x, extrusion.orientation.y,
- ///extrusion.orientation.z, extrusion.orientationangle, extrusion.color, extrusion.rotationangle.x, extrusion.rotationangle.y,
- ///extrusion.lockrotationcenter, extrusion.autorotationcenter, extrusion.rotationcenter.x,
- ///extrusion.rotationcenter.y, extrusion.rotationcenter.z, and extrusion.colormode.
- /// </summary>
- public List<string> attrNames { get; set; }
- public TargetElement targetElement { get; set; }
- public Ctn ctn { get; set; }
- }
- public class Ctn {
- public long id { get; set; }
- public string dur { get; set; }
- public string fill { get; set; }
- public int delay { get; set; }
- public int accel { get; set; }
- public int decel { get; set; }
- public string tmFilter { get; set; }
- public bool autoRev { get; set; }
- }
- /// <summary>
- /// TODO CommonBehavior p:cBhvr ///更多信息
- /// </summary>
- public class AnimClr : TimeNode
- {
-
-
- /// <summary>
- /// AnimateColorSpaceValues Rgb 0 rgb, Hsl 1 hsl
- /// </summary>
- public string colorSpace { get; set; }
- /// <summary>
- /// AnimateColorDirectionValues Clockwise cw 0 , CounterClockwise ccw 1
- /// </summary>
- public string direction { get; set; }
- /// <summary>
- /// RgbColor == HslColor===>> #FF00FF
- /// </summary>
- public string byColor { get; set; }
- /// <summary>
- /// Color3Type ===>> #FF00FF
- /// RgbColorModelPercentage
- /// RgbColorModelHex
- /// HslColor
- /// SystemColor
- /// SchemeColor
- /// PresetColor
- /// </summary>
- public string fromColor { get; set; }
- /// <summary>
- /// Color3Type ===>> #FF00FF
- /// RgbColorModelPercentage
- /// RgbColorModelHex
- /// HslColor
- /// SystemColor
- /// SchemeColor
- /// PresetColor
- /// </summary>
- public string toColor { get; set; }
- public Behavior behavior { get; set; }
- }
- public class AnimEffect : TimeNode
- {
- //In 0 in,Out 1 out,None 2 none
- public string transition { get; set; }
- public Behavior behavior { get; set; }
- public string filter { get; set; }
- public string prLst { get; set; }
- }
- /// <summary>
- ///
- /// </summary>
- public class AnimMotion : TimeNode {
- public string origin { get; set; }
- public string path { get; set; }
- public string pathEditMode { get; set; }
- public int relativeAngle { get; set; }
- public string pointTypes { get; set; }
- public int bounceEnd { get; set; }
- public PathPoint byPosition{ get; set; }
- public PathPoint fromPosition { get; set; }
- public PathPoint toPosition { get; set; }
- public PathPoint rotationCenter { get; set; }
- public Behavior behavior { get; set; }
- }
- /// <summary>
- /// §20.1.10.3
- /// </summary>
- public class AnimRot :TimeNode{
- public int by { get; set; }
- public int from { get; set; }
- public int to { get; set; }
- /// <summary>
- /// 弹跳
- /// </summary>
- public int bounceEnd { get; set; }
- public Behavior behavior { get; set; }
- }
- public class AnimScale : TimeNode {
- /// <summary>
- /// 弹跳
- /// </summary>
- public int bounceEnd { get; set; }
- public PathPoint byPosition { get; set; }
- public PathPoint fromPosition { get; set; }
- public PathPoint toPosition { get; set; }
- public Behavior behavior { get; set; }
- public bool zoomContents { get; set; }
- }
- public class Set : TimeNode {
- public Behavior behavior { get; set; }
- public Val toVariantValue { get; set; }
- }
- public class Audio : TimeNode
- {
- public bool isNarration { get; set; }
- public MediaNode commonMediaNode { get; set; }
- }
- public class Video : TimeNode
- {
- public bool fullScreen { get; set; }
- public MediaNode commonMediaNode { get; set; }
- }
- public class MediaNode {
- public int volume { get; set; }
- public bool mute { get; set; }
- public UInt32 slideCount { get; set; }
- public bool showWhenStopped { get; set; }
- public TargetElement targetElement { get; set; }
- }
- }
|