import base64Str from './pathCodes'

/*create mask*/
class maskCreater {

	constructor(pname, type, param, debug) {
		let mask = new createjs.Shape();

		if (type == 'code')
			mask.graphics.p(base64Str[pname]);

		if (type == 'func')
			// ;(new Function('',base64Str[pname]))();
			// eval(base64Str[pname])
			base64Str[pname](mask)


		if (param)
			mask.setTransform(...param)
		// console.log(mask)

		return mask;
	}
}

module.exports = maskCreater;