選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

TSDAnimation.js 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * TSDAnimation.js
  3. * Keynote HTML Player
  4. *
  5. * Created by Tungwei Cheng
  6. * Copyright (c) 2016-2019 Apple Inc. All rights reserved.
  7. */
  8. // Stuff from TSDAnimation.h
  9. // Common acceleration values.
  10. var KNAnimationActionAcceleration = {
  11. kSFXActionAccelerationNone: 0,
  12. kSFXActionAccelerationEaseIn: 1,
  13. kSFXActionAccelerationEaseOut: 2,
  14. kSFXActionAccelerationEaseBoth: 3,
  15. kSFXActionAccelerationCustom: 4
  16. };
  17. //Standard action build effect names.
  18. var KNActionOpacityName = "apple:action-opacity";
  19. var KNActionMotionPathName = "apple:action-motion-path";
  20. var KNActionRotationName = "apple:action-rotation";
  21. var KNActionScaleName = "apple:action-scale";
  22. // Emphasis action build effect names.
  23. var KNActionPopName = "apple:action-pop";
  24. var KNActionPulseName = "apple:action-pulse";
  25. var KNActionBlinkName = "apple:action-blink";
  26. var KNActionFlipName = "apple:action-flip";
  27. var KNActionBounceName = "apple:action-bounce";
  28. var KNActionJiggleName = "apple:action-jiggle";
  29. //Global directions
  30. var KNDirection = {
  31. kKNDirectionNone: 0,
  32. kKNDirectionLeftToRight: 11,
  33. kKNDirectionRightToLeft: 12,
  34. kKNDirectionTopToBottom: 13,
  35. kKNDirectionBottomToTop: 14,
  36. kKNDirectionUpperLeftToBottomRight: 21,
  37. kKNDirectionUpperRightToBottomLeft: 22,
  38. kKNDirectionLowerLeftToUpperRight: 23,
  39. kKNDirectionLowerRightToUpperLeft: 24,
  40. kKNDirectionClockwise: 31,
  41. kKNDirectionCounterclockwise: 32,
  42. kKNDirectionIn: 41,
  43. kKNDirectionOut: 42,
  44. kKNDirectionUp: 43,
  45. kKNDirectionDown: 44,
  46. kKNDirectionStartToEnd: 51,
  47. kKNDirectionEndToStart: 52,
  48. kKNDirectionMiddleToEnds: 53,
  49. kKNDirectionEndsToMiddle: 54,
  50. kKNDirectionRandom: 91,
  51. kKNDirectionAlternating: 92,
  52. kKNDirectionSimultaneous: 93,
  53. kKNDirectionBCForward: 111,
  54. kKNDirectionBCBackward: 112,
  55. kKNDirectionBCRandom: 113,
  56. kKNDirectionBCCenter: 114,
  57. kKNDirectionBCEdges: 115,
  58. kKNDirectionGravity: 121,
  59. kKNDirectionNoGravity: 122
  60. };
  61. // end of TSDAnimation.h
  62. // Stuff from TSDAnimation.m
  63. var kKNAnimationStringTypeNone = "None";
  64. var kKNAnimationStringTypeBuildIn = "In";
  65. var kKNAnimationStringTypeBuildOut = "Out";
  66. var kKNAnimationStringTypeTransition = "Transition";
  67. var kKNAnimationStringTypeActionBuild = "Action";
  68. function KNEffectIsActionEffect(effect) {
  69. if ([KNActionOpacityName, KNActionMotionPathName, KNActionRotationName, KNActionScaleName].indexOf(effect) > -1) {
  70. return true;
  71. } else {
  72. return false;
  73. }
  74. }
  75. function KNEffectIsEmphasisEffect(effect) {
  76. if ([KNActionPopName, KNActionPulseName, KNActionBlinkName, KNActionFlipName, KNActionBounceName, KNActionJiggleName].indexOf(effect) > -1) {
  77. return true;
  78. } else {
  79. return false;
  80. }
  81. }
  82. // end of TSDAnimation.m
  83. //stuff from TSDTexturedRectangle.h
  84. var TSDTextureType = {
  85. // Uninitialized
  86. Unknown: 0,
  87. // Slide Background
  88. Background: 1,
  89. // An object's shadow
  90. Shadow: 2,
  91. // An object's contact shadow, if it has one
  92. ContactShadow: 3,
  93. // A shadow for all the texture chunks
  94. GroupedShadow: 4,
  95. // The actual object
  96. Object: 5,
  97. // Any text on top of the object
  98. Text: 6,
  99. // A stroke or frame's parameterized texture
  100. StrokeParameterized: 7,
  101. // A stroke or frame
  102. Stroke: 8,
  103. // A stroke's line end for the head
  104. StrokeLineEndForHead: 9,
  105. // A stroke's line end for the tail
  106. StrokeLineEndForTail: 10,
  107. // An object's reflection
  108. Reflection: 11,
  109. // Mask for frame (stroke)
  110. FrameMask: 12,
  111. // Mask for reflection
  112. ReflectionMask: 13
  113. };
  114. // end of TSDTexturedRectangle.h