livingbio / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
0 stars 0 forks source link

用 es2018 改寫 extension? #15

Open lucemia opened 4 years ago

lucemia commented 4 years ago

Problem

  1. 整個 Extension & Player Code 非常舊,其中 Extension 的原因是 AE 以前只支援 ECMAScript 3,但現在已經支援 ECMAScript 2018 了

https://helpx.adobe.com/tw/after-effects/using/legacy-and-extend-script-engine.html

The expression language in After Effects is based on JavaScript, which is an implementation of ECMAScript. The JavaScript expression engine in After Effects 16.0 is based on ECMAScript 2018. The Legacy ExtendScript expression engine is based on ECMAScript 3 (1999). (Adobe ExtendScript is also the language used for scripting in After Effects and other Adobe applications.)

  1. 目前 Extension 設計邏輯 AE -> Extension -> data.json (Player 所使用的格式) -> Player ,Extension 同時要處理 Dump AE config and Transform to data.json. 考慮改成 AE -> Extension -> AE config dump -> Compile -> data.json -> Player a. 除了 AE 修改,不需要修改 Extension,避免現在加特效時都要重新 Build Extension b. 有一個需求是將我們 A.I. 引擎設計的東西 import 回 AE 繼續編輯,這個架構比較合適 c. Compile 開發時不需要碰 AE 的結構 d. JSONSchema 只需要在 Compile & Player 中共用 e. 一個 Component 只要做一件事 (對時間很瑣碎的爸爸工程師比較友善)
lucemia commented 4 years ago

http://docs.aenhancers.com/

lucemia commented 4 years ago

Although both the After Effects expressions language and the After Effects ExtendScript scripting language are based on JavaScript, the expressions features and scripting features of After Effects are separate and distinct. Expressions cannot access information from scripts (such as variables and functions). Whereas a script tells an application to do something, an expression says that a property is something. However, because the After Effects expression language and ExtendScript are both based on JavaScript, familiarity with either one is very helpful in understanding the other.

http://docs.aenhancers.com/introduction/overview/

lucemia commented 4 years ago

http://docs.aenhancers.com/introduction/objectmodel/

lucemia commented 4 years ago

https://medium.com/@jonjam/getting-started-with-typescript-type-definitions-1cda7094b8d2

等筆電修好後再來試

lucemia commented 4 years ago

https://esprima.org/ esprima escodegen bez

lucemia commented 4 years ago

https://motioner.tw/ae-keyframe-shape/

lucemia commented 4 years ago

executeCommand

lucemia commented 4 years ago

https://community.adobe.com/t5/after-effects/can-t-debug-after-effect-cc-2019-script/td-p/10613043?page=1

lucemia commented 4 years ago

https://github.com/ianstormtaylor/superstruct provide by Vicky