Code Monkey home page Code Monkey logo

eador-sprite-generator's Introduction

eador-sprite-generator

Project that aims to generate .jsx ExtendScript to process .psd unit files to generate sprite assets for Eador Genesis

Setup

  • install npm dependencies
npm install
  • edit .env file to adapt to your environment
    • PICTS_TEMPLATE_URL - absolute path to .psd file with UNIT_PICTS template
    • ICON_TEMPLATE_URL - absolute path to .psd file with UNIT_ICON template
    • ITEM_TEMPLATE_URL - absolute path to .psd file with UNIT_ITEM template
    • MAIN_FOLDER_URL - absolute path to folder that contains input .psd files with units to generate assets for
    • UNITS_FOLDER_URL - absolute path to output folder for UNITS assets
    • UNIT_SHADOW_FOLDER_URL - absolute path to output folder for UNIT_SHADOW assets
    • UNIT_SHADOWF_FOLDER_URL - absolute path to output folder for UNIT_SHADOWF assets
    • UNIT_ICONS_FOLDER_URL - absolute path to output folder for UNIT_ICONS assets
    • UNIT_PICTS_FOLDER_URL - absolute path to output folder for UNIT_PICTS assets
    • ITEMS_FOLDER_URL - absolute path to output folder for ITEMS assets
    • OUT_HEIGHT - default size in pixels of output sprite size if height is not provided in the name of .psd file (example 010_100.psd -> will generate 010.bmp file with height of 100 pixels)
    • THRESHOLD_VALUE - value of threshold filter to apply
    • DEFRINGE_VALUE - value of defringe filter to apply
  • run script to generate Env.ts from .env and to generate .jsx ExtendScript file
npm run build
  • run generated .jsx script in photoshop

Development

  • run watch script to to listen to changes in *.ts and .env files
npm run watch

Contributions

It is an open-source project so contributions are welcomed.

License

Copyright © 2021 Andrei Rybin

Distributed under the Eclipse Public License 2.0

eador-sprite-generator's People

Contributors

rybandrei2014 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.