Commit e1542aba authored by Li Mingzhe's avatar Li Mingzhe

feat:首次提交

parent 8a51c964
...@@ -128,5 +128,8 @@ ...@@ -128,5 +128,8 @@
} }
} }
}, },
"defaultProject": "ng-template-generator" "defaultProject": "ng-template-generator",
"cli": {
"analytics": "9c6aa33d-85d1-4496-a524-64e708e94e5e"
}
} }
\ No newline at end of file
{
"name": "ng-template-generator",
"version": "0.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
}
},
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"aproba": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E="
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"async-foreach": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
"integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"block-stream": {
"version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
"integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
"requires": {
"inherits": "~2.0.0"
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"camelcase": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
},
"camelcase-keys": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
"requires": {
"camelcase": "^2.0.0",
"map-obj": "^1.0.0"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cross-spawn": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz",
"integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=",
"requires": {
"lru-cache": "^4.0.1",
"which": "^1.2.9"
}
},
"currently-unhandled": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
"integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
"requires": {
"array-find-index": "^1.0.1"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
}
},
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"requires": {
"is-arrayish": "^0.2.1"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"mime-types": "^2.1.12"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fstream": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
}
},
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"gaze": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz",
"integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
"requires": {
"globule": "^1.0.0"
}
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"globule": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz",
"integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==",
"requires": {
"glob": "~7.1.1",
"lodash": "~4.17.10",
"minimatch": "~3.0.2"
}
},
"graceful-fs": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"requires": {
"ajv": "^6.12.3",
"har-schema": "^2.0.0"
}
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
},
"hosted-git-info": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
},
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
"in-publish": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz",
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ=="
},
"indent-string": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
"integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
"requires": {
"repeating": "^2.0.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-finite": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
"integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w=="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz",
"integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0",
"strip-bom": "^2.0.0"
}
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
},
"dependencies": {
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
}
}
},
"lodash": {
"version": "4.17.20",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
},
"loud-rejection": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
"integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
"requires": {
"currently-unhandled": "^0.4.1",
"signal-exit": "^3.0.0"
}
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"map-obj": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0="
},
"meow": {
"version": "3.7.0",
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
"requires": {
"camelcase-keys": "^2.0.0",
"decamelize": "^1.1.2",
"loud-rejection": "^1.0.0",
"map-obj": "^1.0.1",
"minimist": "^1.1.3",
"normalize-package-data": "^2.3.4",
"object-assign": "^4.0.1",
"read-pkg-up": "^1.0.1",
"redent": "^1.0.0",
"trim-newlines": "^1.0.0"
}
},
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
"integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
"requires": {
"mime-db": "1.44.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"mkdirp": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"requires": {
"minimist": "^1.2.5"
}
},
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ=="
},
"node-gyp": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
"requires": {
"fstream": "^1.0.0",
"glob": "^7.0.3",
"graceful-fs": "^4.1.2",
"mkdirp": "^0.5.0",
"nopt": "2 || 3",
"npmlog": "0 || 1 || 2 || 3 || 4",
"osenv": "0",
"request": "^2.87.0",
"rimraf": "2",
"semver": "~5.3.0",
"tar": "^2.0.0",
"which": "1"
},
"dependencies": {
"semver": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8="
}
}
},
"node-sass": {
"version": "4.14.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz",
"integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==",
"requires": {
"async-foreach": "^0.1.3",
"chalk": "^1.1.1",
"cross-spawn": "^3.0.0",
"gaze": "^1.0.0",
"get-stdin": "^4.0.1",
"glob": "^7.0.3",
"in-publish": "^2.0.0",
"lodash": "^4.17.15",
"meow": "^3.7.0",
"mkdirp": "^0.5.1",
"nan": "^2.13.2",
"node-gyp": "^3.8.0",
"npmlog": "^4.0.0",
"request": "^2.88.0",
"sass-graph": "2.2.5",
"stdout-stream": "^1.4.0",
"true-case-path": "^1.0.2"
}
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
"requires": {
"abbrev": "1"
}
},
"normalize-package-data": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"requires": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
},
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
}
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"requires": {
"error-ex": "^1.2.0"
}
},
"path-exists": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"requires": {
"pinkie-promise": "^2.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
},
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "^2.0.0"
}
},
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^1.0.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
"integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
"requires": {
"indent-string": "^2.1.0",
"strip-indent": "^1.0.1"
}
},
"repeating": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"requires": {
"is-finite": "^1.0.0"
}
},
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
"caseless": "~0.12.0",
"combined-stream": "~1.0.6",
"extend": "~3.0.2",
"forever-agent": "~0.6.1",
"form-data": "~2.3.2",
"har-validator": "~5.1.3",
"http-signature": "~1.2.0",
"is-typedarray": "~1.0.0",
"isstream": "~0.1.2",
"json-stringify-safe": "~5.0.1",
"mime-types": "~2.1.19",
"oauth-sign": "~0.9.0",
"performance-now": "^2.1.0",
"qs": "~6.5.2",
"safe-buffer": "^5.1.2",
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
"requires": {
"path-parse": "^1.0.6"
}
},
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sass-graph": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
"integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==",
"requires": {
"glob": "^7.0.0",
"lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3",
"yargs": "^13.3.2"
}
},
"scss-tokenizer": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/scss-tokenizer/-/scss-tokenizer-0.2.3.tgz",
"integrity": "sha1-jrBtualyMzOCTT9VMGQRSYR85dE=",
"requires": {
"js-base64": "^2.1.8",
"source-map": "^0.4.2"
}
},
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"signal-exit": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
},
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": {
"amdefine": ">=0.0.4"
}
},
"spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
"integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
"requires": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-exceptions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
"integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
},
"spdx-expression-parse": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"requires": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
"spdx-license-ids": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz",
"integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw=="
},
"sshpk": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"bcrypt-pbkdf": "^1.0.0",
"dashdash": "^1.12.0",
"ecc-jsbn": "~0.1.1",
"getpass": "^0.1.1",
"jsbn": "~0.1.0",
"safer-buffer": "^2.0.2",
"tweetnacl": "~0.14.0"
}
},
"stdout-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz",
"integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==",
"requires": {
"readable-stream": "^2.0.1"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"requires": {
"is-utf8": "^0.2.0"
}
},
"strip-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"requires": {
"get-stdin": "^4.0.1"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"tar": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
"requires": {
"block-stream": "*",
"fstream": "^1.0.12",
"inherits": "2"
}
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
"trim-newlines": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
"integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM="
},
"true-case-path": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz",
"integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==",
"requires": {
"glob": "^7.1.2"
}
},
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"uri-js": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
"integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
"requires": {
"punycode": "^2.1.0"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"requires": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
}
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"requires": {
"string-width": "^1.0.2 || 2"
}
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargs": {
"version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"requires": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^13.1.2"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
}
}
},
"yargs-parser": {
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"dependencies": {
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
}
}
}
}
}
export class Course{
sheepfoldArr : Array<Sheepfold> = [];
sheepArr : Array<Sheep> = [];
}
export class Sheepfold{
id : string;
word : string;
audioUrl : string;
picUrl : string;
/**P-图片,T-文字 */
contentType = 'T';
}
export class Sheep{
sheepfoldId : string;
word : string;
picUrl : string;
/**P-图片,T-文字 */
contentType = 'T';
audioUrl : string;
}
\ No newline at end of file
<div class="model-content"> <div class="model-content">
<nz-card nzTitle="课程练习内容编辑" style="margin:5vw;" nzType="inner">
<nz-divider nzText="羊圈" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true>羊圈</nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="add-btn" (click)="addSheepfold()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.sheepfoldArr;let i = index" style="margin: 2vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='9'>
<nz-card nzTitle="羊圈-{{i + 1}}" [nzExtra]="extraTemplate" style="height: 400px; margin: 1vw;">
<nz-form-item>
<nz-form-label [nzSpan]="6">内容形式</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-radio-group [(ngModel)]="data.contentType" (ngModelChange)="setContentType($event, data)">
<label nz-radio nzValue="T">文字</label>
<label nz-radio nzValue="P">图片</label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<div *ngIf="data.contentType == 'T'">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.word">单词</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input type="text" id="{{i}}.word" placeholder="请录入内容" [(ngModel)]="data.word" (blur)="save()">
</nz-form-control>
</nz-form-item>
</div>
<div *ngIf="data.contentType == 'P'">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.picUrl">图片</nz-form-label>
<nz-form-control [nzSpan]="12">
<app-upload-image-with-preview style="width: 100%" [picUrl]="data.picUrl"
(imageUploaded)="onImageUploadSuccess($event, data, 'picUrl')"></app-upload-image-with-preview>
</nz-form-control>
</nz-form-item>
</div>
<div style="position: absolute; left: 200px; top: 100px; width: 800px;"> <nz-form-item>
<nz-form-label [nzSpan]="6" nzNoColon=true>发音</nz-form-label>
<input type="text" nz-input [(ngModel)]="item.text" (blur)="save()"> <nz-form-control [nzSpan]="18">
<app-audio-recorder [audioUrl]="data.audioUrl"
<app-upload-image-with-preview (audioUploaded)="onAudioUploadSuccess($event, data, 'audioUrl')">
[picUrl]="item.pic_url" </app-audio-recorder>
(imageUploaded)="onImageUploadSuccess($event, 'pic_url')" </nz-form-control>
></app-upload-image-with-preview> </nz-form-item>
</nz-card>
<app-audio-recorder <ng-template #extraTemplate>
[audioUrl]="item.audio_url" <button style="margin: 10px;" nz-button nzType="danger" (click)="delSheepfold(i)">
(audioUploaded)="onAudioUploadSuccess($event, 'audio_url')" <span>删除</span>
></app-audio-recorder> </button>
<app-custom-hot-zone></app-custom-hot-zone> </ng-template>
<app-upload-video></app-upload-video>
<app-lesson-title-config></app-lesson-title-config>
</div> </div>
</div>
</div>
<nz-divider nzText="羊" nzOrientation="left"></nz-divider>
<div nz-row>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="add-btn" nzNoColon=true></nz-form-label>
<nz-form-control [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='6'>
<button nz-button nzType="dashed" class="add-btn" id="sheep-add-btn" (click)="addSheep()">
<i nz-icon nzType="plus-circle" nzTheme="outline"></i>添加
</button>
</nz-form-control>
</nz-form-item>
</div>
<div nz-row>
<div *ngFor="let data of item.sheepArr;let i = index" style="margin: 1vw;">
<div nz-col [nzXs]='24' [nzSm]='12' [nzMd]='12' [nzLg]='8'>
<nz-card nzTitle="羊-{{i + 1}}" [nzExtra]="extraTemplate1" style="height: 450px; margin: 1vw;">
<nz-form-item>
<nz-form-label [nzSpan]="6">羊圈</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-radio-group [(ngModel)]="data.sheepfoldId" (ngModelChange)="setSheepfoldId($event, data)">
<label nz-radio [nzValue]="option.id" *ngFor="let option of item.sheepfoldArr; let j = index">羊圈-{{j + 1}}({{option.word}})</label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">内容形式</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-radio-group [(ngModel)]="data.contentType" (ngModelChange)="setContentType($event, data)">
<label nz-radio nzValue="T">文字</label>
<label nz-radio nzValue="P">图片</label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<div *ngIf="data.contentType == 'T'">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.word">文本</nz-form-label>
<nz-form-control [nzSpan]="12">
<input nz-input type="text" id="{{i}}.word" placeholder="请录入内容" [(ngModel)]="data.word"
(blur)="save()">
</nz-form-control>
</nz-form-item>
</div>
<div *ngIf="data.contentType == 'P'">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzFor="{{i}}.picUrl">图片</nz-form-label>
<nz-form-control [nzSpan]="12">
<app-upload-image-with-preview style="width: 100%" [picUrl]="data.picUrl"
(imageUploaded)="onImageUploadSuccess($event, data, 'picUrl')"></app-upload-image-with-preview>
</nz-form-control>
</nz-form-item>
</div>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzNoColon=true>发音</nz-form-label>
<nz-form-control [nzSpan]="18">
<app-audio-recorder [audioUrl]="data.audioUrl"
(audioUploaded)="onAudioUploadSuccess($event, data, 'audioUrl')">
</app-audio-recorder>
</nz-form-control>
</nz-form-item>
</nz-card>
<ng-template #extraTemplate1>
<button style="margin: 10px;" nz-button nzType="danger" (click)="delSheep(i)">
<span>删除</span>
</button>
</ng-template>
</div>
</div>
</div>
</nz-card>
</div> </div>
\ No newline at end of file
\ No newline at end of file
import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef} from '@angular/core'; import { Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, ApplicationRef, ChangeDetectorRef } from '@angular/core';
import { Sheepfold, Sheep, Course } from './Course';
...@@ -10,34 +11,34 @@ import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, Ap ...@@ -10,34 +11,34 @@ import {Component, EventEmitter, Input, OnDestroy, OnChanges, OnInit, Output, Ap
export class FormComponent implements OnInit, OnChanges, OnDestroy { export class FormComponent implements OnInit, OnChanges, OnDestroy {
// 储存数据用 // 储存数据用
saveKey = "test_0011"; saveKey = "DF-L209";
// 储存对象 // 储存对象
item; item;
constructor(private appRef: ApplicationRef,private changeDetectorRef: ChangeDetectorRef) { constructor(private appRef: ApplicationRef, private changeDetectorRef: ChangeDetectorRef) {
} }
ngOnInit() { ngOnInit() {
this.item = {}; this.item = new Course();
// 获取存储的数据 // 获取存储的数据
(<any> window).courseware.getData((data) => { (<any>window).courseware.getData((data) => {
if (data) { if (data) {
this.item = data; this.item = data;
} }
console.log(data);
this.init(); this.init();
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
this.changeDetectorRef.detectChanges(); this.changeDetectorRef.detectChanges();
this.refresh(); this.refresh();
}, this.saveKey); }, this.saveKey);
console.log(this.item);
} }
...@@ -50,7 +51,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -50,7 +51,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
init() { init() {
if(!this.item){
this.item = new Course();
}
} }
...@@ -58,21 +61,21 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -58,21 +61,21 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存图片数据 * 储存图片数据
* @param e * @param e
*/ */
onImageUploadSuccess(e, key) { onImageUploadSuccess(e, item, key) {
this.item[key] = e.url; item[key] = e.url;
this.save(); this.save();
} }
/** /**
* 储存音频数据 * 储存音频数据
* @param e * @param e
*/ */
onAudioUploadSuccess(e, key) { onAudioUploadSuccess(e, item, key) {
this.item[key] = e.url; item[key] = e.url;
this.save(); this.save();
} }
...@@ -80,7 +83,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -80,7 +83,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
* 储存数据 * 储存数据
*/ */
save() { save() {
(<any> window).courseware.setData(this.item, null, this.saveKey); (<any>window).courseware.setData(this.item, null, this.saveKey);
this.refresh(); this.refresh();
} }
...@@ -93,5 +96,65 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { ...@@ -93,5 +96,65 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}, 1); }, 1);
} }
randomChar() {
var x = "0123456789qwertyuioplkjhgfdsazxcvbnm";
var tmp = "";
var timestamp = new Date().getTime();
for (var i = 0; i < 6; i++) {
tmp += x.charAt(Math.ceil(Math.random() * 100000000) % x.length);
}
return timestamp + tmp;
}
addSheepfold(){
let sheepfold = new Sheepfold();
sheepfold.id = this.randomChar();
this.item.sheepfoldArr.push(sheepfold);
this.save();
}
delSheepfold(index){
if (index !== -1) {
this.item.sheepfoldArr.splice(index, 1);
this.save();
}
}
addSheep(){
let sheep = new Sheep();
this.item.sheepArr.push(sheep);
this.save();
}
delSheep(index){
if (index !== -1) {
this.item.sheepArr.splice(index, 1);
this.save();
}
}
setSheepfoldId(event, item){
item.sheepfoldId = event;
this.save();
}
setContentType(e, item){
item['contentType'] = e;
if("T" == e){
item['picUrl'] = "";
}
else if("P" == e){
item['word'] = "";
}
this.save();
}
} }
/**
*
* @param audio 音频
* @param now true-重新开始播放,flase-继续播放
* @param callback
*/
export function playAudio(audio, now = false, callback = null) {
if (audio) {
if (now) {
audio.pause();
audio.currentTime = 0;
}
if (callback) {
audio.onended = () => {
callback();
};
}
audio.play();
}
}
/**
* 暂停播放音频
* @param audio 音频
* @param reset 暂停是否重置:true-是,false-否
* @param callback
*/
export function pauseAudio(audio, reset = false, callback = null) {
if (audio) {
if (reset) {
audio.currentTime = 0;
}
audio.pause();
if (callback) {
callback();
}
}
}
\ No newline at end of file
import { Item } from "./Item";
import { MySprite } from './Unit';
export class Backagroud extends Item{
pic : MySprite;
set x(x){
super._x = x;
if(this.pic){
this.pic.x = super._x;
}
}
set y(y){
super._y = y;
if(this.pic){
this.pic.y = super._x;
}
}
init(bgPicName){
let s = Math.max(this.scaleX, this.scaleY);
const pic = new MySprite();
pic.init(this.images.get(bgPicName));
pic.setScaleXY(s);
pic.x = super.x;
pic.y = super.y;
this.pic = pic;
}
}
\ No newline at end of file
import { Item } from './Item';
import { MySprite, tweenChange } from './Unit';
import { playAudio } from './AudioUtil';
export class Button extends Item{
btnPic : MySprite;
private _outX = 0;
set outX(v){
this._outX =v ;
}
get outX(){
return this._outX;
}
private _outY = 0;
set outY(v){
this._outY =v ;
}
get outY(){
return this._outY;
}
init(picName){
const btnPic = this.getPic(picName);
this.width = btnPic.width;
this.height = btnPic.height;
btnPic.x = this.x;
btnPic.y = this.y;
this.btnPic = btnPic;
}
click(callback = null){
playAudio(this.audioObj['restart'], true);
//放大
tweenChange(this.btnPic, {scaleX: this.scaleX * 1.3, scaleY : this.scaleY * 1.3}, 0.1, ()=>{
//恢复
tweenChange(this.btnPic, {scaleX: this.scaleX, scaleY : this.scaleY}, 0.1, ()=>{
//移出
tweenChange(this.btnPic, {x : this.outX, y:this.outY}, 0.3, ()=>{
if(callback){
callback();
}
})
});
})
}
show(callback = null){
this.btnPic.x = this.x;
this.btnPic.y = this.y;
this.btnPic.visible = true;
if(callback){
callback();
}
}
}
\ No newline at end of file
import { MySprite, ShapeRect } from './Unit';
interface AirWindow extends Window {
air: any;
curCtx: any;
}
declare let window: AirWindow;
export class Item {
/**图片集合 */
images;
audioObj;
_scaleX = 1;
_scaleY = 1;
ctx;
_width = 0;
_height = 0;
_x = 0;
_y = 0;
bg: ShapeRect;
constructor(images, audioObj, scaleX = 1, scaleY = 1, ctx = null) {
this.images = images;
this.audioObj = audioObj;
this._scaleX = scaleX;
this._scaleY = scaleY;
if (!ctx) {
this.ctx = window.curCtx;
} else {
this.ctx = ctx;
}
}
set width(width) {
this._width = width * this.scaleX;
if(this.bg){
this.bg.width = this._width;
}
}
get width() {
return this._width;
}
set height(height) {
this._height = height * this.scaleY;
if(this.bg){
this.bg.height = this._height;
}
}
get height() {
return this._height;
}
set scaleX(v) {
this._scaleX = v;
}
get scaleX() {
return this._scaleX;
}
set scaleY(v) {
this._scaleY = v;
}
get scaleY() {
return this._scaleY;
}
set x(x) {
this._x = x;
if (this.bg) {
this.bg.x = this._x;
}
}
get x() {
return this._x;
}
set y(y) {
this._y = y;
if (this.bg) {
this.bg.y = this._y;
}
}
get y() {
return this._y;
}
getPic(picName, anchorX: number = 0.5, anchorY: number = 0.5) {
const pic = new MySprite();
pic.init(this.images.get(picName), anchorX, anchorY);
pic.scaleX = this.scaleX;
pic.scaleY = this.scaleY;
pic.x = 0;
pic.y = 0;
return pic;
}
checkClickTarget(target, mx: number, my: number) {
const rect = target.getBoundingBox();
if (this.checkPointInRect(mx, my, rect)) {
return true;
}
return false;
}
checkPointInRect(x, y, rect) {
if (x >= rect.x && x <= rect.x + rect.width) {
if (y >= rect.y && y <= rect.y + rect.height) {
return true;
}
}
return false;
}
}
export function setScale(pW: number, pH: number, child) {
let width = child.width;
let height = child.height;
let sx = pW / width;
let sy = pH / height;
let scale = Math.min(sx, sy);
if (scale < 1) {
child.setScaleXY(scale);
}
}
\ No newline at end of file
import {
MySprite,
moveItem,
removeItemFromArr,
rotateItem
} from './Unit';
export class Petal {
renderArr = [];
images;
ctx;
playing = true;
tempRenderArr = [];
constructor(renderArr, images, ctx) {
this.renderArr = renderArr;
this.images = images;
this.ctx = ctx;
this.tempRenderArr = [];
}
stop(callback = null) {
this.playing = false;
const checkFinish = () => {
if (this.tempRenderArr.length == 0) {
if (callback) {
callback();
}
}
else {
setTimeout(() => {
checkFinish();
}, 100);
}
}
checkFinish();
}
/**
* 显示结束花瓣
* @param rect {x,y,width, height} 花瓣显示位置及大小
* @param mapScale
* @param timeout 花瓣显示间隔
* @param kinds 花瓣种类,即花瓣图片样式数组个数
*/
showPetal(rect, mapScale: number, timeout: number, kinds = 9) {
if (!this.playing) {
return;
}
const petal = this.getPetal(rect, mapScale, kinds);
this.renderArr.push(petal);
this.tempRenderArr.push(petal);
let toY = rect.y + rect.height;
moveItem(petal, petal.x, toY + petal.height * petal.scaleY, petal['time'], () => {
removeItemFromArr(this.renderArr, petal);
removeItemFromArr(this.tempRenderArr, petal);
});
rotateItem(petal, petal['tr'], petal['time']);
setTimeout(() => {
this.showPetal(rect, mapScale, timeout);
}, timeout);
}
/**
* 得到花瓣
* @param rect
* @param mapScale
* @param kinds
*/
private getPetal(rect, mapScale, kinds) {
const petal = new MySprite(this.ctx);
const id = Math.ceil(Math.random() * kinds);
petal.init(this.images.get('petal_' + id));
const randomS = (Math.random() * 0.4 + 0.6) * mapScale;
petal.setScaleXY(randomS);
const randomR = Math.random() * 360;
petal.rotation = randomR;
const randomX = rect.x + Math.random() * rect.width;
petal.x = randomX;
petal.y = rect.y - petal.height / 2 * petal.scaleY;
const randomT = 0.5 + Math.random() * 2;
petal['time'] = randomT;
let randomTR = 360 * Math.random(); // - 180;
if (Math.random() < 0.5) { randomTR *= -1; }
petal['tr'] = randomTR;
return petal;
}
}
\ No newline at end of file
import { Item, setScale } from './Item';
import { Sheepfold, Course, Sheep } from '../form/Course';
import { ShapeRect, Label, MySprite, randomSortByArr } from './Unit';
import { playAudio, pauseAudio } from './AudioUtil';
export class Stage extends Item {
_data;
set data(v) {
if (v) {
this._data = v;
}
else {
this._data = new Course();
}
}
get data() {
return this._data;
}
sheepfoldArr: Array<SheepfoldItem> = [];
sheepArr: Array<SheepItem> = [];
sheepBg: ShapeRect;
sheepCoordinates = [];
init(data) {
this.data = data;
this.width = 1280;
this.height = 550;
const bg = new ShapeRect();
bg.setSize(this.width, this.height);
bg.alpha = 0;
this.bg = bg;
//初始化羊圈
this.initSheepfold();
this.initSheep();
}
private initSheepfold() {
let maxW = 1144 * this.scaleX;
let maxH = 260 * this.scaleY;
let width = 0;
let height = 0;
const sheepfoldBg = new ShapeRect();
let disW = 54 * this.scaleX;
for (let i = 0; i < this.data.sheepfoldArr.length; ++i) {
const sheepfold = new SheepfoldItem(this.images, this.audioObj, this.scaleX, this.scaleY);
sheepfold.init(this.data.sheepfoldArr[i]);
this.sheepfoldArr.push(sheepfold);
sheepfold.x = (disW + sheepfold.width) * i;
sheepfold.y = 0;
height = sheepfold.height;
width = sheepfold.width;
sheepfoldBg.addChild(sheepfold.bg);
}
let totalW = this.data.sheepfoldArr.length * width + (this.data.sheepfoldArr.length - 1) * disW;
sheepfoldBg.setSize(totalW, height);
sheepfoldBg.alpha = 0;
this.bg.addChild(sheepfoldBg);
const sx = maxW / totalW;
if (sx < 1) {
sheepfoldBg.setScaleXY(sx);
}
sheepfoldBg.x = (this.width - sheepfoldBg.getBoundingBox().width) / 2;
sheepfoldBg.y = 60 * this.scaleY + (maxH - sheepfoldBg.getBoundingBox().height) / 2;
}
private initSheep() {
let maxW = 1152 * this.scaleX;
let maxH = 185 * this.scaleY;
let width = 0;
let height = 0;
const sheepBg = new ShapeRect();
this.sheepBg = sheepBg;
sheepBg.alpha = 0;
this.bg.addChild(sheepBg);
let disW = 60;
for (let i = 0; i < this.data.sheepArr.length; ++i) {
const sheep = new SheepItem(this.images, this.audioObj, this.scaleX, this.scaleY);
sheep.init(this.data.sheepArr[i]);
this.sheepArr.push(sheep);
width = sheep.width;
height = sheep.height;
}
//取出间隔
for (let i = disW; i > 5; --i) {
let totalW = this.sheepArr.length * width + (this.sheepArr.length - 1) * i * this.scaleX;
disW = i;
if (totalW < maxW) {
break;
}
}
disW *= this.scaleX;
for (let i = 0; i < this.sheepArr.length; ++i) {
let x = (disW + this.sheepArr[i].width) * i;
let y = 0;
if (i % 2 === 0) {
y = (maxH - height) / 2 + 5 * this.scaleY;
}
else {
y = (maxH - height) / 2 - 5 * this.scaleY;
}
this.sheepCoordinates.push({ x: x, y: y });
}
let totalW = this.sheepArr.length * width + (this.sheepArr.length - 1) * disW * this.scaleX;
sheepBg.setSize(totalW, maxH);
const sx = maxW / totalW;
if (sx < 1) {
sheepBg.setScaleXY(sx);
}
sheepBg.x = (this.width - sheepBg.getBoundingBox().width) / 2;
sheepBg.y = 334 * this.scaleY + (maxH - sheepBg.getBoundingBox().height) / 2;
}
randomSheep() {
this.sheepBg.removeChildren();
//清空羊圈
for (let i = 0; i < this.sheepfoldArr.length; ++i) {
this.sheepfoldArr[i].claer();
}
this.sheepArr = randomSortByArr(this.sheepArr);
for (let i = 0; i < this.sheepArr.length; ++i) {
this.sheepArr[i].answered = false;
this.sheepArr[i].x = this.sheepCoordinates[i].x;
this.sheepArr[i].y = this.sheepCoordinates[i].y;
this.sheepArr[i].initX = this.sheepArr[i].x;
this.sheepArr[i].initY = this.sheepArr[i].y;
this.sheepBg.addChild(this.sheepArr[i].bg);
}
}
}
export class SheepfoldItem extends Item {
_data;
set data(v) {
if (v) {
this._data = v;
}
else {
this._data = new Sheepfold();
}
}
get data() {
return this._data;
}
bubbleBg: ShapeRect;
/**羊圈范围 */
rangeBg: ShapeRect;
startX = 0;
startY = 0;
init(data) {
this.data = data;
const bg = new ShapeRect();
bg.alpha = 0;
this.bg = bg;
this.initPic();
this.initBubble();
}
private initPic() {
const pic = this.getPic('sheepfold');
this.width = pic.width;
this.height = pic.height;
pic.x = this.width / 2;
pic.y = this.height / 2;
this.bg.addChild(pic);
const rangeBg = new ShapeRect();
rangeBg.setSize(300 * this.scaleX, 280 * this.scaleY);
rangeBg.alpha = 0;
rangeBg.x = (this.width - rangeBg.width) / 2;
rangeBg.y = this.height - rangeBg.height;
this.bg.addChild(rangeBg);
this.rangeBg = rangeBg;
}
private initBubble() {
const bg = new ShapeRect();
bg.alpha = 0;
this.bubbleBg = bg;
this.bg.addChild(bg);
const bubble = this.getPic('bubble', 0, 0);
bg.addChild(bubble);
bg.setSize(bubble.getBoundingBox().width, bubble.getBoundingBox().height);
if(this.data.contentType === 'P'){
const pic = this.getPic(this.data.picUrl);
pic.x = bg.width / 2;
pic.y = bg.height / 2;
//将scale恢复成1
pic.setScaleXY(1);
setScale(bg.width - 45 * this.scaleX, bg.height - 10 * this.scaleY, pic);
bg.addChild(pic);
}
else{
let text = new Label();
text.text = this.data.word;
text.textAlign = 'middle';
text.fontSize = 90;
text.fontName = "BRLNSDB";
text.fontColor = "#000000";
text.alpha = 1;
text.scaleX = this.scaleX;
text.scaleY = this.scaleY;
text.setMaxSize(bg.width - 30 * this.scaleX);
text.x = (bg.width - text.getBoundingBox().width) / 2;
text.y = bg.height / 2;
bg.addChild(text);
}
bg.x = (this.width - bg.width) / 2;
bg.y = - (20 + bg.height);
}
click(callback = null) {
playAudio(this.audioObj[this.data.id], true);
if (callback) {
callback();
}
}
stopAudio() {
pauseAudio(this.audioObj[this.data.id], true);
}
into(sheep: SheepItem) {
this.rangeBg.addChild(sheep.bg);
if (this.startX + sheep.bg.width > this.rangeBg.width) {
this.startY += 40 * this.scaleY + 10 * Math.random();
this.startX = 10 * Math.random() + 15 * this.scaleX;
}
sheep.x = this.startX;
sheep.y = this.startY + 10 * Math.random();
this.startX += 70 * this.scaleX;
}
claer() {
this.rangeBg.removeChildren();
this.startX = 0;
this.startY = 0;
}
}
export class SheepItem extends Item {
private _data;
answered = false;
initX = 0;
initY = 0;
light: MySprite;
set data(v) {
if (v) {
this._data = v;
}
else {
this._data = new Sheep();
}
}
get data() {
return this._data;
}
init(data) {
this.data = data;
const bg = new ShapeRect();
bg.alpha = 0;
this.bg = bg;
const pic = this.getPic('sheep');
this.width = pic.width;
this.height = pic.height;
pic.x = this.width / 2;
pic.y = this.height / 2;
this.bg.addChild(pic);
const bubble = new Bubble(this.images, this.audioObj, this.scaleX, this.scaleY);
bubble.init('s_bubble', this.data.contentType, this.data.contentType === 'T' ? this.data.word : this.data.picUrl);
bubble.x = (this.width - bubble.width) / 2 - 5 * this.scaleX;
bubble.y = (this.height - bubble.height) / 2 + 5 * this.scaleY;
this.bg.addChild(bubble.bg);
const light = this.getPic('light');
light.alpha = 0;
light.x = pic.x;
light.y = pic.y;
this.bg.addChild(light);
this.light = light;
}
checkRight(sheepfoldItem: SheepfoldItem) {
if (sheepfoldItem.data.id === this._data.sheepfoldId) {
this.answered = true;
return true;
}
else {
return false;
}
}
into(sheepfoldItem: SheepfoldItem, callback = null) {
playAudio(this.audioObj['right'], true);
sheepfoldItem.into(this);
if (callback) {
callback();
}
}
showLight() {
this.light.alpha = 1;
}
hideLight() {
this.light.alpha = 0;
}
playAudio(){
playAudio(this.audioObj[this.data.audioUrl], true);
}
stopAudio(){
pauseAudio(this.audioObj[this.data.audioUrl], true);
}
}
export class Bubble extends Item {
text: Label;
pic: MySprite;
init(picName, valType, val) {
const bg = new ShapeRect();
bg.alpha = 0;
this.bg = bg;
const pic = this.getPic(picName);
this.width = pic.width;
this.height = pic.height;
pic.x = this.width / 2;
pic.y = this.height / 2;
bg.addChild(pic);
if (valType === 'P') {
this.initPic(val);
}
else {
this.initText(val);
}
}
private initPic(picUrl) {
const pic = this.getPic(picUrl);
pic.x = this.width / 2;
pic.y = this.height / 2;
this.pic = pic;
//将scale恢复成1
pic.setScaleXY(1);
setScale(this.width - 40 * this.scaleX, this.height - 10 * this.scaleY, pic);
this.bg.addChild(pic);
}
private initText(val) {
let text = new Label();
text.text = val;
text.textAlign = 'middle';
text.fontSize = 28;
text.fontName = "BRLNSDB";
text.fontColor = "#000000";
text.alpha = 1;
text.scaleX = this.scaleX;
text.scaleY = this.scaleY;
text.setMaxSize(this.width - 30 * this.scaleX);
text.x = (this.width - text.getBoundingBox().width) / 2;
text.y = this.height / 2;
this.text = text;
this.bg.addChild(text);
this._scaleX = text.scaleX;
this._scaleY = text.scaleY;
}
}
\ No newline at end of file
import { Item } from './Item';
import { ShapeRect, Label, MySprite, tweenChange, getPosByAngle, scaleItem, hideItem, moveItem } from './Unit';
import TWEEN from '@tweenjs/tween.js';
export class Timer extends Item {
timeLabel: Label;
stopwatch: MySprite;
seconds = 0;
stopFlag = false;
started = false;
initX = 0;
initY = 0;
timeY = 0;
stopwatchY = 0;
_standby = false;
starArr: Array<MySprite> = [];
init() {
const bg = new ShapeRect();
bg.alpha = 0;
this.bg = bg;
const bgPic = this.getPic('timer');
this.width = bgPic.width;
this.height = bgPic.height;
bgPic.x = this.width / 2;
bgPic.y = this.height / 2;
bg.addChild(bgPic);
const stopwatch = this.getPic('stopwatch', 0, 1);
stopwatch.x = 42 * this.scaleX;
stopwatch.y = this.height - 3 * this.scaleY;
this.stopwatchY = stopwatch.y;
bg.addChild(stopwatch);
this.stopwatch = stopwatch;
let timeLabel = new Label();
this.timeLabel = timeLabel;
timeLabel.text = "00:00";
timeLabel.textAlign = 'middle';
timeLabel.fontSize = 50;
timeLabel.fontName = "BRLNSDB";
timeLabel.fontColor = "#63bb00";
timeLabel.scaleX = this.scaleX;
timeLabel.scaleY = this.scaleY;
timeLabel.refreshSize();
bg.addChild(timeLabel);
timeLabel.x = 99 * this.scaleX;
timeLabel.y = stopwatch.y - timeLabel.getBoundingBox().height / 2 - 7 * this.scaleY;
this.timeY = timeLabel.y;
this.initStar();
}
private initStar() {
const star1 = this.getPic('star1', 0.5, 1);
star1.alpha = 0;
star1.x = 0;
star1.y = this.height - 35 * this.scaleY;
this.bg.addChild(star1);
this.starArr.push(star1);
const star2 = this.getPic('star2', 0.5, 1);
star2.alpha = 0;
star2.x = this.width;
star2.y = this.height;
this.bg.addChild(star2);
this.starArr.push(star2);
const star3 = this.getPic('star3', 0.5, 1);
star3.alpha = 0;
star3.x = 4 * this.scaleX;
star3.y = this.height - 62 * this.scaleY;
this.bg.addChild(star3);
this.starArr.push(star3);
const star4 = this.getPic('star4', 0.5, 1);
star4.alpha = 0;
star4.x = this.width;
star4.y = this.height - 30 * this.scaleY;
this.bg.addChild(star4);
this.starArr.push(star4);
const star5 = this.getPic('star5', 1, 1);
star5.alpha = 0;
star5.x = this.width - 8 * this.scaleX;
star5.y = this.height - 83 * this.scaleY;
this.bg.addChild(star5);
this.starArr.push(star5);
}
start(callback = null) {
if (this.started) {
return;
}
this._standby = false;
this.started = true;
const showTime = () => {
if (this.stopFlag) {
return;
}
setTimeout(() => {
this.seconds += 1;
this.timeLabel.text = this.getTimeStr(this.seconds);
showTime();
}, 1000);
}
showTime();
if (callback) {
callback();
}
}
stop(callback = null) {
this.stopFlag = true;
this.started = false;
}
showStar() {
this.showPopParticle({ x: this.width / 2, y: this.height / 2 + 60 * this.scaleY }, this.bg, 5, 60 * this.scaleX, 100 * this.scaleX);
}
hideStar() {
}
reset(callback = null) {
this.timeLabel.text = "00:00";
tweenChange(this.timeLabel, { y: this.timeY }, 0.3);
tweenChange(this.stopwatch, { y: this.stopwatchY }, 0.3);
tweenChange(this.bg, { y: this.initY }, 0.3, () => {
this._y = this.initY;
this.stopFlag = false;
this.started = false;
this.seconds = 0;
this.hideStar();
if (callback) {
callback();
}
})
}
standby() {
const show = () => {
tweenChange(this.stopwatch, { scaleX: this.scaleX * 1.1, scaleY: this.scaleY * 1.1 }, 0.5, () => {
tweenChange(this.stopwatch, { scaleX: this.scaleX, scaleY: this.scaleY }, 0.5, () => {
if (this._standby) {
show();
}
});
});
}
this._standby = true;
show();
}
private getTimeStr(time: number) {
if (!time) {
return "00:00";
}
let sec = Math.ceil(time % 60);
let minute = Math.floor(time / 60);
let timeStr = (minute < 10 ? "0" + minute : minute) + ":" + (sec < 10 ? "0" + sec : sec);
return timeStr;
}
showPopParticle(pos, parent, num = 20, minLen = 40, maxLen = 80, showTime = 0.4, kinds = 5) {
for (let i = 0; i < num; i++) {
const particle = new MySprite();
const id = Math.ceil(Math.random() * kinds);
particle.init(this.images.get('star' + id));
particle.x = pos.x;
particle.y = pos.y;
parent.addChild(particle);
const randomR = 360 * Math.random();
particle.rotation = randomR;
const randomS = (0.3 + Math.random() * 1.2) * this.scaleX;
particle.setScaleXY(randomS * 0.3);
const randomX = Math.random() * 20 - 10;
particle.x += randomX;
const randomY = Math.random() * 20 - 10;
particle.y += randomY;
const randomL = minLen + Math.random() * (maxLen - minLen);
const randomA = 360 * Math.random();
const randomT = getPosByAngle(randomA, randomL);
moveItem(particle, particle.x + randomT.x, particle.y + randomT.y, showTime, () => {
}, TWEEN.Easing.Exponential.Out);
// scaleItem(particle, 0, 0.6, () => {
//
// });
scaleItem(particle, randomS, 0.6, () => {
}, TWEEN.Easing.Exponential.Out);
setTimeout(() => {
hideItem(particle, 0.4, () => {
}, TWEEN.Easing.Cubic.In);
}, showTime * 0.5 * 1000);
}
}
}
\ No newline at end of file
import {Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener} from '@angular/core'; import { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, HostListener } from '@angular/core';
import { import {
Label, Label,
MySprite, tweenChange, MySprite, tweenChange, ShapeRect, removeItemFromArr
} from './Unit'; } from './Unit';
import {res, resAudio} from './resources'; import { res, resAudio } from './resources';
import {Subject} from 'rxjs'; import { Subject } from 'rxjs';
import {debounceTime} from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import TWEEN from '@tweenjs/tween.js'; import TWEEN from '@tweenjs/tween.js';
import { Backagroud } from './Background';
import { Course, Sheep, Sheepfold } from '../form/Course';
import { Stage, SheepfoldItem, SheepItem } from './Stage';
import { Timer } from './Timer';
import { Petal } from './PetalUtil'
import { Button } from './Button';
...@@ -22,8 +27,8 @@ import TWEEN from '@tweenjs/tween.js'; ...@@ -22,8 +27,8 @@ import TWEEN from '@tweenjs/tween.js';
}) })
export class PlayComponent implements OnInit, OnDestroy { export class PlayComponent implements OnInit, OnDestroy {
@ViewChild('canvas', {static: true }) canvas: ElementRef; @ViewChild('canvas', { static: true }) canvas: ElementRef;
@ViewChild('wrap', {static: true }) wrap: ElementRef; @ViewChild('wrap', { static: true }) wrap: ElementRef;
// 数据 // 数据
data; data;
...@@ -53,21 +58,30 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -53,21 +58,30 @@ export class PlayComponent implements OnInit, OnDestroy {
renderArr; renderArr;
mapScale = 1; mapScale = 1;
endRenderArr = [];
canvasLeft; canvasLeft;
canvasTop; canvasTop;
saveKey = 'test_0011'; saveKey = 'DF-L209';
btnLeft; stage: Stage;
btnRight;
pic1;
pic2;
canTouch = true; canTouch = true;
curPic; lastSheepfold: SheepfoldItem;
oldPos;
curSheepItem: SheepItem;
timer: Timer;
canPlay = false;
btnRestart: Button;
btnShowX = 0;
@HostListener('window:resize', ['$event']) @HostListener('window:resize', ['$event'])
onResize(event) { onResize(event) {
...@@ -77,10 +91,10 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -77,10 +91,10 @@ export class PlayComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.data = {}; this.data = new Course();
// 获取数据 // 获取数据
const getData = (<any> window).courseware.getData; const getData = (<any>window).courseware.getData;
getData((data) => { getData((data) => {
if (data && typeof data == 'object') { if (data && typeof data == 'object') {
...@@ -432,9 +446,24 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -432,9 +446,24 @@ export class PlayComponent implements OnInit, OnDestroy {
*/ */
initDefaultData() { initDefaultData() {
if (!this.data.pic_url) { let sheepfoldId = 'test_';
this.data.pic_url = 'assets/play/default/pic.jpg';
this.data.pic_url_2 = 'assets/play/default/pic.jpg'; if (this.data.sheepfoldArr.length === 0 && this.data.sheepArr.length === 0) {
for (let i = 0; i < 2; ++i) {
let sheepfold = new Sheepfold();
sheepfold.word = 'he';
sheepfold.id = sheepfoldId + i;
this.data.sheepfoldArr.push(sheepfold);
for (let j = 0; j < 3; ++j) {
let sheep = new Sheep();
sheep.word = 'Hello';
sheep.sheepfoldId = sheepfold.id;
this.data.sheepArr.push(sheep);
}
}
} }
} }
...@@ -444,9 +473,16 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -444,9 +473,16 @@ export class PlayComponent implements OnInit, OnDestroy {
*/ */
initImg() { initImg() {
this.addUrlToImages(this.data.pic_url); for (let i = 0; i < this.data.sheepArr.length; ++i) {
this.addUrlToImages(this.data.pic_url_2); if (this.data.sheepArr[i].picUrl) {
this.addUrlToImages(this.data.sheepArr[i].picUrl);
}
}
for (let i = 0; i < this.data.sheepfoldArr.length; ++i) {
if (this.data.sheepfoldArr[i].picUrl) {
this.addUrlToImages(this.data.sheepfoldArr[i].picUrl);
}
}
} }
/** /**
...@@ -454,13 +490,26 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -454,13 +490,26 @@ export class PlayComponent implements OnInit, OnDestroy {
*/ */
initAudio() { initAudio() {
// 音频资源
this.addUrlToAudioObj(this.data.audio_url);
this.addUrlToAudioObj(this.data.audio_url_2);
// 音效 // 音效
this.addUrlToAudioObj('click', this.rawAudios.get('click'), 0.3); this.addUrlToAudioObj('click', this.rawAudios.get('click'), 0.3);
this.addUrlToAudioObj('right', this.rawAudios.get('right'));
this.addUrlToAudioObj('wrong', this.rawAudios.get('wrong'));
this.addUrlToAudioObj('win', this.rawAudios.get('win'));
this.addUrlToAudioObj('restart', this.rawAudios.get('restart'));
for (let i = 0; i < this.data.sheepfoldArr.length; ++i) {
if (this.data.sheepfoldArr[i].audioUrl) {
this.addUrlToAudioObj(this.data.sheepfoldArr[i].id, this.data.sheepfoldArr[i].audioUrl);
}
}
for (let i = 0; i < this.data.sheepArr.length; ++i) {
if (this.data.sheepArr[i].audioUrl) {
this.addUrlToAudioObj(this.data.sheepArr[i].audioUrl);
}
}
} }
...@@ -481,178 +530,235 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -481,178 +530,235 @@ export class PlayComponent implements OnInit, OnDestroy {
this.renderArr = []; this.renderArr = [];
this.endRenderArr = [];
this.canPlay = false;
} }
getPic(imageName, anchorX: number = 0.5, anchorY: number = 0.5) {
const pic = new MySprite();
pic.init(this.images.get(imageName), anchorX, anchorY);
pic.setScaleXY(this.mapScale);
return pic;
}
/** /**
* 初始化试图 * 初始化试图
*/ */
initView() { initView() {
this.initBg();
this.initPic(); this.initStage();
this.initBottomPart(); this.initButton();
this.initGame();
} }
initBottomPart() { initBg() {
const btnLeft = new MySprite();
btnLeft.init(this.images.get('btn_left'));
btnLeft.x = this.canvasWidth - 150 * this.mapScale;
btnLeft.y = this.canvasHeight - 100 * this.mapScale;
btnLeft.setScaleXY(this.mapScale); const sx = this.canvasWidth / this.canvasBaseW;
const sy = this.canvasHeight / this.canvasBaseH;
this.renderArr.push(btnLeft);
this.btnLeft = btnLeft; const bg = new Backagroud(this.images, this.audioObj, sx, sy);
bg.x = this.canvasWidth / 2;
bg.y = this.canvasHeight / 2;
bg.init('bg');
this.renderArr.push(bg.pic);
const btnRight = new MySprite(); const leftLeaf = this.getPic('left_leaf', 0, 0);
btnRight.init(this.images.get('btn_right')); leftLeaf.x = 0;
btnRight.x = this.canvasWidth - 50 * this.mapScale; leftLeaf.y = 0;
btnRight.y = this.canvasHeight - 100 * this.mapScale; this.renderArr.push(leftLeaf);
btnRight.setScaleXY(this.mapScale);
this.renderArr.push(btnRight); const rightLeaf = this.getPic('right_leaf', 1, 0);
rightLeaf.x = this.canvasWidth;
rightLeaf.y = 0;
this.renderArr.push(rightLeaf);
this.btnRight = btnRight; const land = this.getPic('land', 0.5, 0);
land.x = this.canvasWidth / 2;
land.y = this.canvasHeight - 550 * this.mapScale;
this.renderArr.push(land);
} }
initPic() { initStage() {
const stage = new Stage(this.images, this.audioObj, this.mapScale, this.mapScale);
stage.init(this.data);
stage.x = (this.canvasWidth - stage.width) / 2;
stage.y = this.canvasHeight - 550 * this.mapScale;
this.renderArr.push(stage.bg);
this.stage = stage;
const maxW = this.canvasWidth * 0.7; const timer = new Timer(this.images, this.audioObj, this.mapScale, this.mapScale);
timer.init();
this.timer = timer;
timer.x = (this.canvasWidth - timer.width) / 2;
timer.y = -(timer.height - 60 * this.mapScale);
timer.initX = timer.x;
timer.initY = timer.y;
}
const pic1 = new MySprite(); initButton() {
pic1.init(this.images.get(this.data.pic_url));
pic1.x = this.canvasWidth / 2;
pic1.y = this.canvasHeight / 2;
pic1.setScaleXY(maxW / pic1.width);
this.renderArr.push(pic1); this.btnShowX = this.canvasWidth - 20 * this.mapScale - 331 * this.mapScale / 2;
this.pic1 = pic1;
const btnRestart = new Button(this.images, this.audioObj, this.mapScale, this.mapScale);
this.btnRestart = btnRestart;
btnRestart.x = this.canvasWidth + 331 * this.mapScale;
btnRestart.y = this.canvasHeight - 50 * this.mapScale - 112 * this.mapScale / 2;
btnRestart.outX = btnRestart.x;
btnRestart.outY = btnRestart.y;
btnRestart.init('restart');
}
const label1 = new Label();
label1.text = this.data.text;
label1.textAlign = 'center';
label1.fontSize = 50;
label1.fontName = 'BRLNSDB';
label1.fontColor = '#ffffff';
pic1.addChild(label1); mapDown(event) {
this.oldPos = { x: this.mx, y: this.my };
if (!this.canTouch) {
return;
}
if (this.canPlay) {
if (this.lastSheepfold) {
this.lastSheepfold.stopAudio();
}
const pic2 = new MySprite(); let sheepArr = this.stage.sheepArr;
pic2.init(this.images.get(this.data.pic_url_2));
pic2.x = this.canvasWidth / 2 + this.canvasWidth;
pic2.y = this.canvasHeight / 2;
pic2.setScaleXY(maxW / pic2.width);
this.renderArr.push(pic2); for (let i = 0; i < sheepArr.length; ++i) {
this.pic2 = pic2; let sheep = sheepArr[i];
sheep.hideLight();
sheep.stopAudio();
}
for (let i = 0; i < sheepArr.length; ++i) {
let sheep = sheepArr[i];
if (this.checkClickTarget(sheep.bg) && !sheep.answered) {
this.curPic = pic1; this.timer.start();
this.curSheepItem = sheep;
sheep.showLight();
sheep.playAudio();
return;
}
} }
let sheepfoldArr = this.stage.sheepfoldArr;
btnLeftClicked() { for (let i = 0; i < sheepfoldArr.length; ++i) {
let sheepfold = sheepfoldArr[i];
this.lastPage(); if (this.checkClickTarget(sheepfold.bubbleBg)) {
this.lastSheepfold = sheepfold;
sheepfold.click();
return;
}
} }
btnRightClicked() {
this.nextPage();
} }
lastPage() { if (this.checkClickTarget(this.btnRestart.btnPic)) {
if (this.curPic == this.pic1) { this.btnRestart.click(() => {
return;
}
this.canTouch = false; this.initGame();
const moveLen = this.canvasWidth;
tweenChange(this.pic1, {x: this.pic1.x + moveLen}, 1);
tweenChange(this.pic2, {x: this.pic2.x + moveLen}, 1, () => {
this.canTouch = true;
this.curPic = this.pic1;
}); });
return;
}
} }
nextPage() { mapMove(event) {
if (this.curPic == this.pic2) { if (!this.curSheepItem) {
return; return;
} }
this.canTouch = false; let rect = this.stage.bg.getBoundingBox();
const moveLen = this.canvasWidth; if (this.checkPointInRect(this.mx, this.my, rect)) {
tweenChange(this.pic1, {x: this.pic1.x - moveLen}, 1); const addX = this.mx - this.oldPos.x;
tweenChange(this.pic2, {x: this.pic2.x - moveLen}, 1, () => { const addY = this.my - this.oldPos.y;
this.canTouch = true; this.curSheepItem.x += addX;
this.curPic = this.pic2; this.curSheepItem.y += addY;
});
} }
pic1Clicked() { this.oldPos = { x: this.mx, y: this.my };
this.playAudio(this.data.audio_url);
} }
pic2Clicked() { mapUp(event) {
this.playAudio(this.data.audio_url_2);
}
if (this.curSheepItem) {
let sheepItem = this.curSheepItem;
let right = false;
mapDown(event) { for (let i = 0; i < this.stage.sheepfoldArr.length; ++i) {
if (!this.canTouch) { let sheepfoldItem = this.stage.sheepfoldArr[i];
return;
}
if ( this.checkClickTarget(this.btnLeft) ) {
this.btnLeftClicked();
return;
}
if ( this.checkClickTarget(this.btnRight) ) { if (this.checkPointInRect(this.mx, this.my, sheepfoldItem.bg.getBoundingBox())) {
this.btnRightClicked();
return;
}
if ( this.checkClickTarget(this.pic1) ) { this.canTouch = false;
this.pic1Clicked();
return;
}
if ( this.checkClickTarget(this.pic2) ) { right = sheepItem.checkRight(sheepfoldItem);
this.pic2Clicked();
return;
}
} if (right) {
mapMove(event) { sheepItem.stopAudio();
sheepItem.hideLight();
this.stage.sheepBg.removeChild(sheepItem.bg);
sheepItem.into(sheepfoldItem, () => {
let petal = new Petal(this.endRenderArr, this.images, this.ctx);
let rect = sheepItem.bg.getBoundingBox();
//显示花瓣
petal.showPetal({ x: rect.x - 40 * this.mapScale, y: rect.y - 40 * this.mapScale, width: rect.height + 60 * this.mapScale, height: rect.height + 60 * this.mapScale }, this.mapScale, 200, 8);
setTimeout(() => {
petal.stop(() => {
});
}, 2000);
this.canTouch = true;
});
this.checkWin();
} }
else {
this.playAudio('wrong', true);
mapUp(event) { }
break;
}
}
if (!right) {
tweenChange(sheepItem.bg, { x: sheepItem.initX, y: sheepItem.initY }, 0.3, () => {
this.canTouch = true;
sheepItem.x = sheepItem.initX;
sheepItem.y = sheepItem.initY;
});
}
}
this.curSheepItem = null;
} }
...@@ -671,9 +777,106 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -671,9 +777,106 @@ export class PlayComponent implements OnInit, OnDestroy {
this.updateArr(this.renderArr); this.updateArr(this.renderArr);
this.updateArr(this.endRenderArr);
}
initGame() {
removeItemFromArr(this.endRenderArr, this.timer.bg);
this.renderArr.push(this.timer.bg);
this.endRenderArr = [];
this.timer.reset(() => {
this.timer.standby();
});
this.stage.randomSheep();
this.canPlay = true;
}
checkWin() {
let win = true;
for (let i = 0; i < this.stage.sheepArr.length; ++i) {
let sheep = this.stage.sheepArr[i];
if (sheep.data.sheepfoldId && !sheep.answered) {
win = false;
break;
}
}
if (win) {
this.canPlay = false;
this.timer.stop();
setTimeout(() => {
this.showEnd();
}, 2000);
} }
}
showEnd() {
const showRestartBtn = () => {
this.btnRestart.x = this.btnRestart.outX;
this.endRenderArr.push(this.btnRestart.btnPic);
this.btnRestart.show(() => {
tweenChange(this.btnRestart.btnPic, { x: this.btnShowX }, 0.3, () => {
this.canTouch = true;
});
});
};
const mask = new ShapeRect();
mask.setSize(this.canvasWidth, this.canvasHeight);
mask.alpha = 0.5;
mask.fillColor = "#000000";
mask.x = 0;
mask.y = 0;
this.endRenderArr.push(mask);
let petal = new Petal(this.endRenderArr, this.images, this.ctx);
//显示花瓣
petal.showPetal({ x: 0, y: 0, width: this.canvasWidth, height: this.canvasHeight }, this.mapScale, 100, 8);
this.playAudio('win');
setTimeout(() => {
petal.stop(() => {
});
}, 2000);
setTimeout(() => {
showRestartBtn();
removeItemFromArr(this.renderArr, this.timer.bg);
this.endRenderArr.push(this.timer.bg);
(<any> window).courseware.sendEvent('gameEnd');
console.log('send gameEnd event')
tweenChange(this.timer.bg, { y: 0 }, 0.3, () => {
this.timer.y = this.timer.bg.y;
this.timer.showStar();
});
tweenChange(this.timer.stopwatch, { y: this.timer.stopwatchY - 17 * this.mapScale }, 0.3);
tweenChange(this.timer.timeLabel, { y: this.timer.timeY - 17 * this.mapScale }, 0.3);
}, 1000);
}
} }
const res = [ const res = [
['bg', "assets/play/bg.png"],
// ['bg', "assets/play/bg.jpg"], ['left_leaf', "assets/play/left_leaf.png"],
['btn_left', "assets/play/btn_left.png"], ['right_leaf', "assets/play/right_leaf.png"],
['btn_right', "assets/play/btn_right.png"], ['land', "assets/play/land.png"],
// ['text_bg', "assets/play/text_bg.png"], ['restart', "assets/play/restart.png"],
['bubble', "assets/play/bubble.png"],
['s_bubble', "assets/play/s_bubble.png"],
['sheep', "assets/play/sheep.png"],
['sheepfold', "assets/play/sheepfold.png"],
['stopwatch', "assets/play/stopwatch.png"],
['timer', "assets/play/timer.png"],
['light', "assets/play/light.png"],
['star1', "assets/play/star1.png"],
['star2', "assets/play/star2.png"],
['star3', "assets/play/star3.png"],
['star4', "assets/play/star4.png"],
['star5', "assets/play/star5.png"],
['petal_1', "assets/play/petal_1.png"],
['petal_2', "assets/play/petal_2.png"],
['petal_3', "assets/play/petal_3.png"],
['petal_4', "assets/play/petal_4.png"],
['petal_5', "assets/play/petal_5.png"],
['petal_6', "assets/play/petal_6.png"],
['petal_7', "assets/play/petal_7.png"],
['petal_8', "assets/play/petal_8.png"],
]; ];
...@@ -12,7 +34,10 @@ const res = [ ...@@ -12,7 +34,10 @@ const res = [
const resAudio = [ const resAudio = [
['click', "assets/play/music/click.mp3"], ['click', "assets/play/music/click.mp3"],
['right', "assets/play/music/right.mp3"],
['wrong', "assets/play/music/wrong.mp3"],
['win', "assets/play/music/win.mp3"],
['restart', "assets/play/music/restart.mp3"],
]; ];
export {res, resAudio}; export {res, resAudio};
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment