开始做推币机
This commit is contained in:
26
src/page/index/PushCoinGame/game/maskCreater.js
Normal file
26
src/page/index/PushCoinGame/game/maskCreater.js
Normal file
@@ -0,0 +1,26 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user