Skip to main content

Streamline texture import with magic numbers

March 5, 2020

Streamline texture import with magic numbers

Ct.js has a bit of heuristic that helps to import groups of assets at once.

Firstly, it names an asset by the basename of the imported file. For example, if you have a file Player_Walk.png, then the asset will be named as Player_Walk. If you correctly name your files, you won't have to rename them to ct.js.

Secondly, you can add magic suffixes to the file's name to automatically divide them into frames. There are two variants: