Clone wiki

pleabargains / Palettization Guide

Palettization Guide (these reserved colors are OFF LIMITS for anything but these uses)



Feature Reserved color
hairA #663300
eyeA #666600
skinA #FFCC99
skinB #F49E50
outfitA #E5CCFF
outfitB #70618D

Updated Short Video Tutorial

Publishing Scripts

cd src/modules/assets/publishing-scripts/

./ [Filename]


./ AllScenarios_Jail_Figure1.js

  • is the main publishing script that runs all the below scripts automatically
  • the component scripts are described below: Paletization

  • Converts the reserved palette colors to javascript variable names so they can be set dynamically based on subject's avatar customizations.
  • Tested on Linux and Mac OS X (tested with GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)) Adds Feature Toggling to published js animation

  • Generating avatar feature toggling REQUIRES at least Bash 4 (at least on Mac OS X) because the lower/uppercasing features
  • Automatically adds feature (eyes & hair) toggling to javascript animation file published manually out of Adobe Animate. So an Adobe Animate file such as Scenario2_Intro_Figure0.fla, gets published manually as such as Scenario2_Intro_Figure0.js. This script will automatically insert conditional feature toggling (3 hair and eyes currently):

  • Conforms the name of lib to expectations of the other javascript code
  • Fixes issue of for Adobe breaking software by changing their JS export in version Adobe Animate 17.5, including de-gobalizing 'lib'.
  • NOTE: It's not enough to run the files and go home. For some reason that's not yet clear, the first js animations needs to have lib tacked on at the end, and be empty in the beginning. This is a why the generic AllScenarios_LibFixer.js is included in all the scenarios, which fixes this issue.

Essentially, replaces this:


var lib={}; 



var lib = window.lib || AdobeAn.getComposition(Object.keys(AdobeAn.compositions)[0]).getLibrary();

For all js animations except the above mentioned AllScenarios_LibFixer.js, this lib is replaced at the start of the file.

Scripts not working? Don't have sed? Install it

for Mac OS X, you need a package manager like homebrew so you can do:


brew install gnu-sed

It will be installed as gsed. Then add this to .bashrc file



If you don't have a .bashrc file, create one (it can have just that one line there). After I believe you must add these lines to your .bash_profile


# Get the aliases and functions                                                 
if [ -f ~/.bashrc ]; then
    . ~/.bashrc

Mark the (and all scripts) executable if it isn't. Run ls -laht and see if it has executable permission. If not, do this for each of the sh files:


chmod +x