Open whxcode opened 2 years ago
Hi Wang, thanks for the PR 😁.
From what I can tell, you are trying to convert the Event-based model that the .fig file uses to the snapshot-based model that Figma Rest API and Figma Plugin API use.
The best way to do this is to do a redux-like reducer structure.
(state, action) => state
, then run each event and compute the snapshot.
I wanted to leave the original read of the .fig file very raw without any modification. This conversion process is super valuable and I'll certainly look at your PR for inspiration 😁.
Hi Wang, thanks for the PR grin.
From what I can tell, you are trying to convert the Event-based model that the .fig file uses to the snapshot-based model that Figma Rest API and Figma Plugin API use.
The best way to do this is to do a redux-like reducer structure.
(state, action) => state
, then run each event and compute the snapshot.I wanted to leave the original read of the .fig file very raw without any modification. This conversion process is super valuable and I'll certainly look at your PR for inspiration grin.
Thanks for your advice.
The cover of the file can be obtained.
This way you can get information about the file.
As for my previous question, I didn't study it carefully. https://github.com/yagudaev/figma-to-json/issues/9. Image information may be stored in "unzipped" objects.
Best regards, Wang.
Brilliant work, @whxcode. Thanks so much for the info 🤩.
The latest updates on your projects. Learn more about Vercel for Git ↗︎