commit 5ed4d65cf8600837d2406a00d3e22241046f7473 Author: YZ\249929363 <249929363@qq.com> Date: Wed Oct 30 15:28:42 2024 +0800 神农简化版 diff --git a/assets/Scene.meta b/assets/Scene.meta new file mode 100644 index 0000000..240fb44 --- /dev/null +++ b/assets/Scene.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "29f52784-2fca-467b-92e7-8fd9ef8c57b7", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/GameScene.fire b/assets/Scene/GameScene.fire new file mode 100644 index 0000000..75623f9 --- /dev/null +++ b/assets/Scene/GameScene.fire @@ -0,0 +1,3795 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "4eaf518b-35ec-4262-928d-4d497c3f2830" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 76 + }, + { + "__id__": 77 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "GameNode", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 15 + }, + { + "__id__": 20 + }, + { + "__id__": 38 + }, + { + "__id__": 56 + }, + { + "__id__": 67 + }, + { + "__id__": 69 + }, + { + "__id__": 70 + } + ], + "_active": true, + "_components": [ + { + "__id__": 74 + }, + { + "__id__": 75 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0VHqWWqlJ4qVyuwnLGCWw" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9MIzCRC1OGKHNP/Q+VlVk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6b86bfb2-d4d1-4474-a615-6a8a515b9201" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b4dc89EnxNO4TNZJR/F4fF" + }, + { + "__type__": "cc.Node", + "_name": "TimeNode", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -268.945, + 420.683, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5fanACpyFCUo0UbqRf7tLn" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 188, + "height": 225 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -2.093, + 1.68, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "03gZrrl7VDI6/PrPKk7EWo" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "bfZfIenABPoqJqhRtjyx3A" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 195, + "g": 95, + "b": 62, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 76, + "height": 76 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.516, + 0, + 0, + 0, + 0.7071067811865475, + 0.7071067811865476, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 90 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27ck6PdKZCnLzZ2NTxsyMA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "09f3b49a-507f-485e-b8bf-809f98dd4923" + }, + "_type": 3, + "_sizeMode": 0, + "_fillType": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52X2WJAQ5O7oIPu9ciNv7P" + }, + { + "__type__": "cc.Node", + "_name": "needle", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.864, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6ajo4WkQRJophTzEga2ZW2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cf947ea-88e6-4326-a79d-4534335f4e32" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0aipdJWs9KYbRSDLejTy2H" + }, + { + "__type__": "cc.Node", + "_name": "Plant", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 16 + }, + { + "__id__": 18 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1dH+troCBMIbpbgd3McLPt" + }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 95, + "g": 67, + "b": 44, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 389.515, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fdE2U4ly9JZb4QSCSaBUS0" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4aZQeiDw1BlIse68X0zzaY" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 348, + "height": 412 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 144.85, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f8TXcETopPpIHlcYDZErzy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "794756c4-eeac-4a24-a412-4035d0719970" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fc226/y45G6pzMn84yHiGc" + }, + { + "__type__": "cc.Node", + "_name": "Btn_New", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 21 + }, + { + "__id__": 28 + }, + { + "__id__": 33 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -200, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcgQGtJrNFSYN55RWmFdRC" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 24 + } + ], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "70fbQFBo9BZaP/ZkWZXBjM" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f9+drew0lFNp1nmz0WimRD" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "ebETvxnFZMO62/yyqB2xTJ" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "732HK3/ERHFbYOs1NpdbPS" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b0746a9d-0822-49dd-8cf8-45afc1ee4652" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "71JLZ3LMBAmZJ1VgRlCRJ7" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 27 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 21 + }, + "_id": "e48GvZ+EhDlb1BwBX20oNb" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Choice", + "customEventData": "Btn_New" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 29 + }, + { + "__id__": 31 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "91qNPc3sxBZ6JcGgZJDBQM" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "55AI7r4yxDfqHfD7c06VJE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "b7pbP1gBdB5rR5gyBcBoB3" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "4b+sG2Mk9JcZgvZr6mvtc4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "999yCGnxhBFbtorC7KBz6V" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d5QthFBvVAEYiF3lbXEO8F" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c37haxnrFHlo4bXF3MGsdY" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "edQQYm5oRCzqkmoZr28CWu" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6dTJGf3+lPzo7OGNdugSQa" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8189af2f-6b70-497a-93a5-994048cb2e09" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "48Klhz86dGEpy4YeuPAPyt" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Old", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 39 + }, + { + "__id__": 46 + }, + { + "__id__": 51 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -330, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e8S/Fw5hVDcZEIoedcUoA5" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 40 + }, + { + "__id__": 42 + } + ], + "_active": true, + "_components": [ + { + "__id__": 44 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b8f7FhnSVD4YdOyVdiaS8w" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 41 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6804Fr/P5Jcrp/ZgHvQGFp" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "eeimXM2OpAH6QUrXsQ8DFk" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 43 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "edVV1XgsRFTaFQqAWq6vRQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b9472a40-1f02-4a4b-8fbc-818b4255e9ce" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "87b1mBSSVFXqo0qBp4uw3R" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 45 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 39 + }, + "_id": "844f8hVoxDyKYF9vmdJPjH" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Choice", + "customEventData": "Btn_Old" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 47 + }, + { + "__id__": 49 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8cNFzZjThDZaGgrbxOSrWB" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 46 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b8gS60k55FTIv7sCLhX2IE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "1alz4B0WZJoagzx/gYKn80" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 46 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 50 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "cfTeGEeD5Is6Qleot08V69" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "08e5fce4-27f5-445b-a895-f47a7ffb5176" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "38OsTMOjFBHbljuJSFOHKS" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 52 + }, + { + "__id__": 54 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7d1vUTNeFLTb9hNFhXVp/C" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 51 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 53 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e3VW/ZbbBILpI64lhngSBG" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "6bexNs3ZVIgq9T1svNNqnT" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 51 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 55 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "44NE7DhmFDfbB4NvA9LhXJ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 54 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "33d3b1ce-0232-41d5-b379-8316ed3e442d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "f0DKOT7mRILY3xDSNmqml8" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Firewood", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 57 + }, + { + "__id__": 59 + }, + { + "__id__": 61 + } + ], + "_active": false, + "_components": [ + { + "__id__": 64 + }, + { + "__id__": 65 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 141, + "height": 157 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -275, + -567, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5a+WTpsZ5GtZFgHGCiqy6C" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 58 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 141, + "height": 157 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "028Rdc0D9Enp/k3+brsUpH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 57 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1b4aa157-8271-4bd0-a922-e19f452d86fc" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0eVMzhXWdE8ooYzPkctTaS" + }, + { + "__type__": "cc.Node", + "_name": "fireBg", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 60 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 152, + "height": 56 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -11.041, + -4.32, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "59+YnTBw9LKZd7b+qWv/ih" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 59 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "15c8df95-b7df-427c-b48c-57c1392d9e84" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "ebZ2ICqIlLzZWtBWoBQBYm" + }, + { + "__type__": "cc.Node", + "_name": "fire", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 62 + }, + { + "__id__": 63 + } + ], + "_prefab": null, + "_opacity": 150, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 104, + "height": 72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -14.401, + -38.902, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "aaY+R8TqxOiobnpngy2G4U" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "7fh5rdCndCdb3FxFdPCzI4" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_defaultClip": { + "__uuid__": "cd606b05-2183-4a5a-ad7c-9f3464006aaa" + }, + "_clips": [ + { + "__uuid__": "cd606b05-2183-4a5a-ad7c-9f3464006aaa" + } + ], + "playOnLoad": true, + "_id": "519JRe6K9IH7F/LNZ2Qya4" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 56 + }, + "_enabled": false, + "alignMode": 1, + "_target": null, + "_alignFlags": 12, + "_left": 100, + "_right": 0, + "_top": 0, + "_bottom": 100, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "bdqejmjNFHEb2V3LfNGtFO" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 56 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 0.85, + "clickEvents": [ + { + "__id__": 66 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 56 + }, + "_id": "5fddMOrhpMMYiDg/Xj52mK" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Ignition", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "Begin", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 68 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 318, + "height": 203 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 123.06, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "39dIXWbmhNSpLn6niyVyGq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 67 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "04421a0b-266e-4d13-81df-1873ef3c4a83" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "549d/TcvlJ0I9W4GjKco4i" + }, + { + "__type__": "cc.Node", + "_name": "Win", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "beOm6xY9JGcpUIgHepr4za" + }, + { + "__type__": "cc.Node", + "_name": "GameOver", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 71 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5dxBdyCr9Dd7WMwsS/0Owj" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 70 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + }, + { + "__id__": 73 + } + ], + "_prefab": null, + "_opacity": 50, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 2000 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c4602Hd0NIO6CGG6oPjm+C" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "ff0h3MP/lOCZ6oqE4ZSOxy" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_id": "22S5GnmVhCz7EY4orhQpJT" + }, + { + "__type__": "b0432BA295DjIOcuitdGKO1", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "Btn_New": { + "__id__": 20 + }, + "Btn_Old": { + "__id__": 38 + }, + "Plant": { + "__id__": 15 + }, + "timeNode": { + "__id__": 8 + }, + "FoodPlist": { + "__uuid__": "7ee88c39-72c3-4896-8faf-b26c1daecabc" + }, + "_id": "7dXON6+8BHRrnLvjmlXv+P" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "dfOLca1KVCyLxvg197AIBc" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + } +] \ No newline at end of file diff --git a/assets/Scene/GameScene.fire.meta b/assets/Scene/GameScene.fire.meta new file mode 100644 index 0000000..ac79655 --- /dev/null +++ b/assets/Scene/GameScene.fire.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.3.2", + "uuid": "4eaf518b-35ec-4262-928d-4d497c3f2830", + "importer": "scene", + "asyncLoadAssets": false, + "autoReleaseAssets": true, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/GuideScene.fire b/assets/Scene/GuideScene.fire new file mode 100644 index 0000000..1b019ec --- /dev/null +++ b/assets/Scene/GuideScene.fire @@ -0,0 +1,5738 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": false, + "_id": "1d6bc13a-95e8-41e2-8703-441263ec00bb" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 117 + }, + { + "__id__": 118 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "GameNode", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 15 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 25 + }, + { + "__id__": 31 + }, + { + "__id__": 37 + }, + { + "__id__": 57 + }, + { + "__id__": 65 + }, + { + "__id__": 83 + }, + { + "__id__": 101 + }, + { + "__id__": 107 + }, + { + "__id__": 113 + } + ], + "_active": true, + "_components": [ + { + "__id__": 115 + }, + { + "__id__": 116 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0VHqWWqlJ4qVyuwnLGCWw" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9MIzCRC1OGKHNP/Q+VlVk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6b86bfb2-d4d1-4474-a615-6a8a515b9201" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b4dc89EnxNO4TNZJR/F4fF" + }, + { + "__type__": "cc.Node", + "_name": "TimeNode", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -268.945, + 420.683, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5fanACpyFCUo0UbqRf7tLn" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 188, + "height": 225 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -2.093, + 1.68, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "03gZrrl7VDI6/PrPKk7EWo" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "bfZfIenABPoqJqhRtjyx3A" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 195, + "g": 95, + "b": 62, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 76, + "height": 76 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.516, + 0, + 0, + 0, + 0.7071067811865475, + 0.7071067811865476, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 90 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27ck6PdKZCnLzZ2NTxsyMA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "09f3b49a-507f-485e-b8bf-809f98dd4923" + }, + "_type": 3, + "_sizeMode": 0, + "_fillType": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52X2WJAQ5O7oIPu9ciNv7P" + }, + { + "__type__": "cc.Node", + "_name": "needle", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.864, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6ajo4WkQRJophTzEga2ZW2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cf947ea-88e6-4326-a79d-4534335f4e32" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0aipdJWs9KYbRSDLejTy2H" + }, + { + "__type__": "cc.Node", + "_name": "Plant", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 16 + }, + { + "__id__": 18 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1dH+troCBMIbpbgd3McLPt" + }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 95, + "g": 67, + "b": 44, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 389.515, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fdE2U4ly9JZb4QSCSaBUS0" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4aZQeiDw1BlIse68X0zzaY" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 348, + "height": 412 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 116.792, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f8TXcETopPpIHlcYDZErzy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "794756c4-eeac-4a24-a412-4035d0719970" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fc226/y45G6pzMn84yHiGc" + }, + { + "__type__": "cc.Node", + "_name": "Begin", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 318, + "height": 203 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 123.06, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "39dIXWbmhNSpLn6niyVyGq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "04421a0b-266e-4d13-81df-1873ef3c4a83" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "549d/TcvlJ0I9W4GjKco4i" + }, + { + "__type__": "cc.Node", + "_name": "Win", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "beOm6xY9JGcpUIgHepr4za" + }, + { + "__type__": "cc.Node", + "_name": "tip1", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 184, + "g": 138, + "b": 70, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 94.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -251.366, + 261.785, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b9FE7GbWJOFqQ/EKfuXyho" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 75, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 0, + "_N$fontFamily": "Arial", + "_N$overflow": 3, + "_N$cacheMode": 0, + "_id": "4a+ClThxtI7qkobhAOrbBv" + }, + { + "__type__": "cc.Node", + "_name": "nextBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 26 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -374.44, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8fvfWDa09MYYcHQ4OIBxKu" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 25 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 120, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9LFfI5S5KU604qMnYfr+J" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "下一步", + "_N$string": "下一步", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "78VgINsx9JbKJVAN68BSN3" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "437x09UB5Eyb8cJzw3kMeC" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 30 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 25 + }, + "_id": "67I/nc4CVEd7oHfDF1OEn+" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "nextClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "jumpBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 32 + } + ], + "_active": true, + "_components": [ + { + "__id__": 34 + }, + { + "__id__": 35 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -518.427, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0mmOMONJJvoRDWLYc61sd" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 31 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 33 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "53GV2FeL1HXo1xjElv3Qmz" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 32 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "跳过引导", + "_N$string": "跳过引导", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "01Lux6UvxP04TZ7dcVpAYN" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "69ey7lYaFFy6HHErqOC27M" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 36 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 31 + }, + "_id": "23JgRv7WFPAbhJjB1SaTCj" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "jumpClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "voiceTip", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 38 + }, + { + "__id__": 41 + }, + { + "__id__": 45 + }, + { + "__id__": 47 + }, + { + "__id__": 51 + }, + { + "__id__": 53 + } + ], + "_active": true, + "_components": [ + { + "__id__": 55 + }, + { + "__id__": 56 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8b7qI3tpdIOpM8Dkqyts5Q" + }, + { + "__type__": "cc.Node", + "_name": "musicBg", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + } + ], + "_prefab": null, + "_opacity": 150, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1800 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcYw5UpJlCtLPnaXvdTbzp" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "5ewGyM0qNG4bO0dxdyqzPQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": -233, + "_bottom": -233, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_id": "3fODOqqddI0KQQ12MYzxae" + }, + { + "__type__": "cc.Node", + "_name": "startBtn", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 42 + }, + { + "__id__": 43 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -445.022, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "efbAeKCt1GtLG4Ix3+6G4n" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 41 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9227615d-1b3f-416c-884d-e33612d57b2e" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fbyF2TxxFNVp6ljfUfDB+k" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 41 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 44 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 41 + }, + "_id": "42ZeJMKJxDNZH/Dg6K/kp8" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "passVoice", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 46 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 724, + "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 6.686, + 101.777, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5bypQQWp5LBaURhsI7HBU2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 45 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "7b0b1d20-5a1d-4723-8af8-50a47e841643" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "feHXvO3QtDZ5Yo1bhHAJac" + }, + { + "__type__": "cc.Node", + "_name": "playBtn", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + }, + { + "__id__": 49 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 218, + "height": 218 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 1.657, + 116.232, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c15jgN/0BNAqgJ3elx8QSu" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ffa5a081-5040-487c-a153-4742d21bac1a" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "1fXEqMjItHwIdT4337uam/" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 50 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 47 + }, + "_id": "f8HsO3l1FB+r7iTZSTWmWA" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "playVoice", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 52 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 189, + "g": 172, + "b": 92, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 396, + "height": 41.58 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 20, + 410.484, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "38JuVtWWBBHaJMjMiI4kRJ" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 51 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "游戏过程中需全程开启声音", + "_N$string": "游戏过程中需全程开启声音", + "_fontSize": 33, + "_lineHeight": 33, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "59Fu53kRJB/pkJgLnjsnfA" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 233, + "b": 129, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 360, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 10, + -92.857, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "087Gyj85NE8IakQMWc0RDf" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "点击播放按钮测试播放音频", + "_N$string": "点击播放按钮测试播放音频", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "f6T8HAA81Ns4nDDtxzmUiC" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 5.684341886080802e-14, + "_bottom": -5.684341886080802e-14, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_id": "249AvhbWxKIK+G8v5cHzaL" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "_id": "3dkpDNhRxFMZUo6L98jxEK" + }, + { + "__type__": "cc.Node", + "_name": "tip", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 58 + }, + { + "__id__": 61 + }, + { + "__id__": 63 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -233.105, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fb2IxHCVJB1pNjBteXpqeG" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 59 + }, + { + "__id__": 60 + } + ], + "_prefab": null, + "_opacity": 50, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 2000 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 223.222, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dbginwR49EUoZf6LQcirq/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 58 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b3kGfYmgBL5pJvV85aFUKG" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 58 + }, + "_enabled": true, + "_id": "41fe1wyaBEFoLzrPvULcBU" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 62 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 508, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 138.891, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b5sykxjeNHF4ukKyyw5Och" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5797ba40-0232-4eca-8729-719373e39e8c" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "cbB7/6FEJFwLU7JC/8rd7R" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 64 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 180, + "g": 71, + "b": 71, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 450, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 138.891, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "caIyRuvb1KmagYAs21NJVo" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 63 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "{植物}刚才出现过呢", + "_N$string": "{植物}刚才出现过呢", + "_fontSize": 30, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 3, + "_N$cacheMode": 0, + "_id": "b5I5BZe1lOA4Novvz0beKb" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Old", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 66 + }, + { + "__id__": 73 + }, + { + "__id__": 78 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -310, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e5yAZJu+ROpL81xp1CIKMj" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 67 + }, + { + "__id__": 69 + } + ], + "_active": true, + "_components": [ + { + "__id__": 71 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8couZL4/FBFKM+JgUeuasH" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 66 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 68 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "94kzGNb3BBj6EshNc+L1vi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 67 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "43NvWMOD1KyYSIYbYiWAPi" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 66 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 70 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9M14CCURHVqPhltpVl1Fi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 69 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b9472a40-1f02-4a4b-8fbc-818b4255e9ce" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "71XT7ev1VL9qJRTtg9P10P" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 66 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 72 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 66 + }, + "_id": "4c0brUO0lBiZYjuWVNxpoF" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "click_Btn", + "customEventData": "Btn_Old" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 74 + }, + { + "__id__": 76 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "eaMjyWG49J6ZlTWxk+SGka" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 73 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 75 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5vi7d/YpBRI65DQni+C8f" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 74 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "28GGb5L7hEP6GV2IxLwbHo" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 73 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 77 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d9MCussC9LXIJYYGWPBNoc" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 76 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "08e5fce4-27f5-445b-a895-f47a7ffb5176" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "30UmrNvJ9Eh65gVGz9+SE1" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 79 + }, + { + "__id__": 81 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "60FBLrGapL3ZNvOocVmLmq" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 78 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 80 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "96kUWxT05At79s3Rg9EahP" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 79 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "d333qGdflIg43Rr8PEOYTZ" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 78 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 82 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7c4KZBA3xFBp2Ji+Tr7t5s" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 81 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "33d3b1ce-0232-41d5-b379-8316ed3e442d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "efjv2extZMZYTgjamgffPv" + }, + { + "__type__": "cc.Node", + "_name": "Btn_New", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 84 + }, + { + "__id__": 91 + }, + { + "__id__": 96 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -200, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "09m8QMoFRFDqRDSNnesXNu" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 85 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [ + { + "__id__": 89 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f2jYVTr2JG+Y8YU6GVLu6Q" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 84 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 86 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5WhQ3t1ZOH78xlykOuIuR" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 85 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "f2QTFaQI5J5ZzSpTWNNTIr" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 84 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 88 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "36S4vNREpDnKkrKlXKOKwT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b0746a9d-0822-49dd-8cf8-45afc1ee4652" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "a55TWH6ZtMHpVKKtfRHJgR" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 84 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 90 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 84 + }, + "_id": "d0TOFXztRFUYS9mP3ld7pO" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "click_Btn", + "customEventData": "Btn_New" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 92 + }, + { + "__id__": 94 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f3FczQgmBEKYMOG0HFiikL" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 93 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d6m0ZZJf5K256mJHtpuuHB" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 92 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "23KfYkauJJwJeDnkY/OjQv" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 95 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "25W3l5LzpBZ6VhkeKjYB2E" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 94 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "424rMsLm9K+I2YmtPklAAS" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 97 + }, + { + "__id__": 99 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ddGBD4OnREPJIXFn4CseMp" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 96 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 98 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b505j/2bVP27pznYSCDxsJ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 97 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "62fK3fDt5GCZjGkk1CgnTg" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 96 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 100 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcHowC5xlHbI9+byWj0lFz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 99 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8189af2f-6b70-497a-93a5-994048cb2e09" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "60YkAvj+5KWo0ky7re3vTB" + }, + { + "__type__": "cc.Node", + "_name": "startBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 102 + } + ], + "_active": false, + "_components": [ + { + "__id__": 104 + }, + { + "__id__": 105 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -374.44, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "29v/tk/KNLMJ2fU/34y2az" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 103 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "faIolPDnlP44uD+AcIbs5V" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "开始游戏", + "_N$string": "开始游戏", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "0e3CmiIRhNU7UKZx+YGap2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "9aT/6qWXVHLZkQruNZA7wh" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 106 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 101 + }, + "_id": "40om0h/8lA2LNIy2CJjZ4C" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "jumpClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "againBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 108 + } + ], + "_active": false, + "_components": [ + { + "__id__": 110 + }, + { + "__id__": 111 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -518.427, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6bsIvUFUJLAYN2SirToqDt" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "caAOCDzDRJ3pbxOujZrQ8O" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 108 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "再试一次", + "_N$string": "再试一次", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "5cwuuryGNE/bpcRZx6puzM" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "5cJwVyoJBHBJq8aqnjnuYP" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 112 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 107 + }, + "_id": "c0mgIY1zFN2JuToIeq78K4" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "againClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "hand", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 114 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 103, + "height": 151.04 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -207.468, + -610.438, + 0, + 0, + 0, + 0.3826834323650898, + 0.9238795325112867, + 0.8, + 0.8, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 45 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0da9xzbKBAXoqEWaTxv1cN" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 113 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3" + } + ], + "paused": false, + "defaultSkin": "default", + "defaultAnimation": "animation", + "_preCacheMode": 0, + "_cacheMode": 0, + "loop": true, + "premultipliedAlpha": true, + "timeScale": 1, + "_accTime": 0, + "_playCount": 0, + "_frameCache": null, + "_curFrame": null, + "_skeletonCache": null, + "_animationName": "animation", + "_animationQueue": [], + "_headAniInfo": null, + "_playTimes": 0, + "_isAniComplete": true, + "_N$skeletonData": { + "__uuid__": "3941fdae-279a-48d8-a746-5c5519731a80" + }, + "_N$_defaultCacheMode": 0, + "_N$debugSlots": false, + "_N$debugBones": false, + "_N$debugMesh": false, + "_N$useTint": false, + "_N$enableBatch": false, + "_id": "d4oF1vu7FDr5KWi2ePt60w" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "dfOLca1KVCyLxvg197AIBc" + }, + { + "__type__": "effe2nlNnBES4H9tFM4r38Z", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "Tip": { + "__id__": 57 + }, + "FoodPlist": { + "__uuid__": "7ee88c39-72c3-4896-8faf-b26c1daecabc" + }, + "Btn_New": { + "__id__": 83 + }, + "Btn_Old": { + "__id__": 65 + }, + "Plant": { + "__id__": 15 + }, + "_id": "3c3qy1RFxNvrRNaKcTmg3H" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + } +] \ No newline at end of file diff --git a/assets/Scene/GuideScene.fire.meta b/assets/Scene/GuideScene.fire.meta new file mode 100644 index 0000000..31aa9cd --- /dev/null +++ b/assets/Scene/GuideScene.fire.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.3.2", + "uuid": "1d6bc13a-95e8-41e2-8703-441263ec00bb", + "importer": "scene", + "asyncLoadAssets": false, + "autoReleaseAssets": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/LoadScene.fire b/assets/Scene/LoadScene.fire new file mode 100644 index 0000000..3735aab --- /dev/null +++ b/assets/Scene/LoadScene.fire @@ -0,0 +1,1373 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d" + }, + { + "__type__": "cc.Node", + "_name": "GameData", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1voegXqFG7pcNFtBwd4RM" + }, + { + "__type__": "58403/n16JCa5sZhNMjZzGo", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "audioGameBgm0": null, + "baishao_audio": { + "__uuid__": "47388b59-bca9-4607-bdc1-1fc7ba079a12" + }, + "cha_audio": { + "__uuid__": "b1a7d924-b756-4abd-9de4-f913e76d7ba6" + }, + "chixiaodou_audio": { + "__uuid__": "16df01b7-75d9-47f2-96bf-23d29632af47" + }, + "danggui_audio": { + "__uuid__": "5f08c436-44f0-4802-bc19-0443972a105b" + }, + "danshen_audio": { + "__uuid__": "5325e681-09c2-4cdd-87f1-7b4d76247f14" + }, + "dazao_audio": { + "__uuid__": "e97e82df-44e2-4294-89fb-dadbf44bf622" + }, + "gancao_audio": { + "__uuid__": "c1fcf0fb-c572-4800-9848-1e78718fdabf" + }, + "ganjiang_audio": { + "__uuid__": "b3d0fc52-3960-42d1-869f-39121e912bdb" + }, + "gouqi_audio": { + "__uuid__": "589a92bd-21cc-43d4-8594-2e9c92930f13" + }, + "jingjie_audio": { + "__uuid__": "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293" + }, + "jinju_audio": { + "__uuid__": "ffdbc929-ffdb-46b7-a93e-29447856ca36" + }, + "lizhi_audio": { + "__uuid__": "ac2f83fb-1f9e-4d58-b043-bdcd25634e14" + }, + "lizi_audio": { + "__uuid__": "7a5029a4-6d49-4a15-a1bb-9faa9506e801" + }, + "longyan_audio": { + "__uuid__": "03f3670c-b2e3-44dc-a718-35d83b45a100" + }, + "moli_audio": { + "__uuid__": "ebf27f93-6c3b-44cd-b228-944b77435936" + }, + "muchai_audio": { + "__uuid__": "434c4832-eab0-46c1-a1ef-baa5316386b4" + }, + "mudan_audio": { + "__uuid__": "c2b82d71-e775-43c4-9ba6-650d7ac46c31" + }, + "mulan_audio": { + "__uuid__": "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4" + }, + "pugongying_audio": { + "__uuid__": "b313152c-a590-406a-90f6-e78ca8cf99fa" + }, + "putao_audio": { + "__uuid__": "b31b447b-2c35-46ea-bb6c-84952055fae8" + }, + "renshen_audio": { + "__uuid__": "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea" + }, + "taozi_audio": { + "__uuid__": "4fb5e673-7017-4a1a-bf48-92250446042d" + }, + "zhuye_audio": { + "__uuid__": "9c9e6c09-6653-44b7-8a72-9eddc54c2425" + }, + "err": { + "__uuid__": "1a1f7dc6-de93-494d-b7be-fe9203b41dc0" + }, + "yes": { + "__uuid__": "92f37348-24a6-465c-b74a-0afda604dc3d" + }, + "_id": "c9svoY3rpPjLRVujzjU/12" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 14 + }, + { + "__id__": 20 + }, + { + "__id__": 23 + } + ], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 27 + }, + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "5c9b8FZiaNLMrMDs9T3rByf", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_id": "82rBHh8bJIGKuGw03a3Yrd" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7cv8DMoeFED6gtfpegKnY4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f6cdf53a-8de8-42da-bea3-581b1a681360" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "8azQQNX+VG8axnhJX+MOSM" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 654, + "height": 93 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -297.404, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fbUHhjpABG74DdpeYzdl/2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "57e85453-6997-4242-babb-705697538e98" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52EGND0ndDGotGRX4hdp75" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 13 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 10 + }, + "_id": "5fQ0XX+HFAlq0Hihrzp10i" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 4 + }, + "component": "", + "_componentId": "454adgphRpA6oq5lB6Cg1fK", + "handler": "startGame", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "Rank", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [ + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 234, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 126, + "height": 140 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 279.513, + -564.202, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e7rE7SX3NEO4r7RpytIx+t" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + }, + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 126, + "height": 140 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bb+DPySjNLhZcxUUphVuRh" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ed354adc-1faf-4daa-b3de-776c0499090a" + }, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "e3tnncQgtFn49iTBzwCpMN" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 40, + "_id": "3b6aA5QpdJN5tCMv9rwDLJ" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 19 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 230, + "g": 230, + "b": 230, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 120, + "g": 120, + "b": 120, + "a": 200 + }, + "_N$normalSprite": null, + "_N$pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "_N$hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "_N$disabledSprite": { + "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + }, + "_N$target": { + "__id__": 15 + }, + "_id": "79F7b/WB5F2JOMTqOD3Wq1" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 4 + }, + "component": "", + "_componentId": "454adgphRpA6oq5lB6Cg1fK", + "handler": "openRank", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + }, + { + "__id__": 22 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66.72, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 337.463, + -646.72, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27YGKHGM1I5Y41cMXxZ0rs" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0.0.0", + "_N$string": "0.0.0", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "1covBYbbRHJqGD17ZsJC+d" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 4.176999999999964, + "_top": 0, + "_bottom": 1.3799999999999955, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "6cDomcvMdDrae8KzaaoZg5" + }, + { + "__type__": "cc.Node", + "_name": "version", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + }, + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98.33, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 251.592, + -645.818, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bdRIfCxsZBpLpMK3p5LzXO" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "版本号:", + "_N$string": "版本号:", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "25U7z7AG5OR5kWiQhll6Z2" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 74.243, + "_top": 0, + "_bottom": 2.282000000000039, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "b9dR0vgWtBPbilfwsIX0Gk" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + }, + { + "__type__": "454adgphRpA6oq5lB6Cg1fK", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "localTest": false, + "clientTestVersion": "1.1.3", + "testVersion": { + "__id__": 21 + }, + "_id": "50zCP3Mq9MKIKjMbohPY8j" + }, + { + "__type__": "58403/n16JCa5sZhNMjZzGo", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "audioGameBgm0": { + "__uuid__": "bef46737-c323-42ea-9ea7-7dc780b882b7" + }, + "baishao_audio": { + "__uuid__": "47388b59-bca9-4607-bdc1-1fc7ba079a12" + }, + "cha_audio": { + "__uuid__": "b1a7d924-b756-4abd-9de4-f913e76d7ba6" + }, + "chixiaodou_audio": { + "__uuid__": "16df01b7-75d9-47f2-96bf-23d29632af47" + }, + "danggui_audio": { + "__uuid__": "5f08c436-44f0-4802-bc19-0443972a105b" + }, + "danshen_audio": { + "__uuid__": "5325e681-09c2-4cdd-87f1-7b4d76247f14" + }, + "dazao_audio": { + "__uuid__": "e97e82df-44e2-4294-89fb-dadbf44bf622" + }, + "gancao_audio": { + "__uuid__": "c1fcf0fb-c572-4800-9848-1e78718fdabf" + }, + "ganjiang_audio": { + "__uuid__": "b3d0fc52-3960-42d1-869f-39121e912bdb" + }, + "gouqi_audio": { + "__uuid__": "589a92bd-21cc-43d4-8594-2e9c92930f13" + }, + "jingjie_audio": { + "__uuid__": "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293" + }, + "jinju_audio": { + "__uuid__": "ffdbc929-ffdb-46b7-a93e-29447856ca36" + }, + "lizhi_audio": { + "__uuid__": "ac2f83fb-1f9e-4d58-b043-bdcd25634e14" + }, + "lizi_audio": { + "__uuid__": "7a5029a4-6d49-4a15-a1bb-9faa9506e801" + }, + "longyan_audio": { + "__uuid__": "03f3670c-b2e3-44dc-a718-35d83b45a100" + }, + "moli_audio": { + "__uuid__": "ebf27f93-6c3b-44cd-b228-944b77435936" + }, + "muchai_audio": { + "__uuid__": "434c4832-eab0-46c1-a1ef-baa5316386b4" + }, + "mudan_audio": { + "__uuid__": "c2b82d71-e775-43c4-9ba6-650d7ac46c31" + }, + "mulan_audio": { + "__uuid__": "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4" + }, + "pugongying_audio": { + "__uuid__": "b313152c-a590-406a-90f6-e78ca8cf99fa" + }, + "putao_audio": { + "__uuid__": "b31b447b-2c35-46ea-bb6c-84952055fae8" + }, + "renshen_audio": { + "__uuid__": "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea" + }, + "taozi_audio": { + "__uuid__": "4fb5e673-7017-4a1a-bf48-92250446042d" + }, + "zhuye_audio": { + "__uuid__": "9c9e6c09-6653-44b7-8a72-9eddc54c2425" + }, + "err": { + "__uuid__": "1a1f7dc6-de93-494d-b7be-fe9203b41dc0" + }, + "yes": { + "__uuid__": "92f37348-24a6-465c-b74a-0afda604dc3d" + }, + "_id": "c78uwvSdFH7oUk6WRJFjFe" + } +] \ No newline at end of file diff --git a/assets/Scene/LoadScene.fire.meta b/assets/Scene/LoadScene.fire.meta new file mode 100644 index 0000000..5a4227c --- /dev/null +++ b/assets/Scene/LoadScene.fire.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.3.2", + "uuid": "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d", + "importer": "scene", + "asyncLoadAssets": false, + "autoReleaseAssets": true, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/OverScene.fire b/assets/Scene/OverScene.fire new file mode 100644 index 0000000..b03dc51 --- /dev/null +++ b/assets/Scene/OverScene.fire @@ -0,0 +1,1897 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 9 + }, + { + "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 38 + }, + { + "__id__": 39 + }, + { + "__id__": 40 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0fDnScgvlKZoz0WvU7bcCw" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "634acecc-5987-409f-8c81-28569289abb3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "33V0ak83RMQ64u+CvJcisv" + }, + { + "__type__": "cc.Node", + "_name": "zhun", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 67, + "g": 137, + "b": 148, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 90, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0.804, + 245.289, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "13DbiFcVBOWq/4sLwL0woj" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "准确率", + "_N$string": "准确率", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "cbhdb2DAtJ/asl7ki1AUH4" + }, + { + "__type__": "cc.Node", + "_name": "count", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 93, + "g": 65, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 41.71, + "height": 94.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 174.798, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0XjY3oxhLw6l5Sjbdlto4" + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 93, + "g": 65, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28.45, + "height": 40.32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0.804, + -64.004, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "3c+50VKQlDW4SfENziGn33" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "%", + "_N$string": "%", + "_fontSize": 32, + "_lineHeight": 32, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "3eQNZGDClCCr4Oy0XoNlsj" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0", + "_N$string": "0", + "_fontSize": 75, + "_lineHeight": 75, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "33J9Fy+9VDZbdP4dSOqHJ1" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 580, + "height": 37 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -52.678, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9d47pQ76JAgKwOd0QHAXRT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "0a9b51e5-23bb-4902-bd02-0b3f91e60173" + }, + "_type": 3, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "f6PPUmWpVCE4hJq5zzwlCh" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 243, + "g": 234, + "b": 227, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 149.39, + "height": 60.48 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -127.789, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "2a6U4DTrxPLLPFxo1noum1" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0分0秒", + "_N$string": "0分0秒", + "_fontSize": 48, + "_lineHeight": 48, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "65enMFCvpLbbGtwz6knn/4" + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 6, + "height": 155 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -227.685, + -154.877, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1fRXAidZhNdZsNQi9ryLwI" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "5btEhu/UNPTI4B+ArhkF8u" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 552, + "height": 204 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -8.015, + 418.157, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "342AOGbEBHs4KlBsmpCZkd" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ecd8b796-cf3d-45e6-ab5d-99906ff68426" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "32KwzGeTFDy5k6D/cZS3B4" + }, + { + "__type__": "cc.Node", + "_name": "btn", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 28 + }, + { + "__id__": 34 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "19+GdlQVtJM55xDuYFBJSn" + }, + { + "__type__": "cc.Node", + "_name": "again", + "_objFlags": 512, + "_parent": { + "__id__": 21 + }, + "_children": [ + { + "__id__": 23 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 26 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -315.467, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "3dSvloeRtIOJAHgqIMN6i/" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 22 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 156, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6.32, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9OkbcwA5K4bVH8DP/3oEm" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "75ceffef-e469-4845-80bd-e0052840d248" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "55YRpYnX9PUaRxuLrtzBgO" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "b6l71VEzlJ45ZYDhcJO5t7" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 27 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 22 + }, + "_id": "64rZ47m2pOQr2egGCWonjb" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "again", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [ + { + "__id__": 29 + } + ], + "_active": true, + "_components": [ + { + "__id__": 31 + }, + { + "__id__": 32 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -456.109, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "520mTZlWxGjYT8kO8KuWFE" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 156, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 5.755, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "69J/fV85xGCKLRToUVveAy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4d3e4edd-f44e-4e1a-8648-d173f746eea8" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "65lFEX5qFIZqf6wf3pqi83" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "4cnNC7FshJS4y//Is9ZxvK" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 33 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 28 + }, + "_id": "20GyHAhBdLb6eXmQZIxAMo" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "openRank", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "finishi", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 36 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -385.904, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "75MWyDslJKCpuJ0hRH1qJ2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5890602f-470f-42ea-b785-8d5565214ada" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "2efNKcisBOVZb+CaEaroWi" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 37 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 34 + }, + "_id": "f46dBGYuRNpZ+4GgWnzxDg" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "jumpFinishi", + "customEventData": "" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + }, + { + "__type__": "805c6nf399HWZeuWnNB9CTH", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "count": { + "__id__": 12 + }, + "time": { + "__id__": 16 + }, + "finishiTime": { + "__id__": 14 + }, + "_id": "f9bq3mWw5JoYQRI0zhq8ue" + } +] \ No newline at end of file diff --git a/assets/Scene/OverScene.fire.meta b/assets/Scene/OverScene.fire.meta new file mode 100644 index 0000000..7403015 --- /dev/null +++ b/assets/Scene/OverScene.fire.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.3.2", + "uuid": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5", + "importer": "scene", + "asyncLoadAssets": false, + "autoReleaseAssets": true, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/RankScene.fire b/assets/Scene/RankScene.fire new file mode 100644 index 0000000..b9de0e3 --- /dev/null +++ b/assets/Scene/RankScene.fire @@ -0,0 +1,5429 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 6 + }, + { + "__id__": 9 + }, + { + "__id__": 65 + }, + { + "__id__": 79 + }, + { + "__id__": 102 + }, + { + "__id__": 106 + }, + { + "__id__": 141 + } + ], + "_active": true, + "_components": [ + { + "__id__": 147 + }, + { + "__id__": 148 + }, + { + "__id__": 149 + } + ], + "_prefab": { + "__id__": 150 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 252, + "b": 252, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a286bbGknJLZpRpxROV6M94" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 252.87547223450972, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8cVHFRc19FO4you3NT7Y+N" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "40YcGtOLdDr6BSLg4kOPDC" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "97fLKw9fpLKIc0dJLpbPlR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "background", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e2e0crkOLxGrpMxpbC4iQg1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e46860aa-922b-408c-8a92-ccfb24106c76" + }, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "888hvGBMlC74RLITj4GjZH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "8dEBgqFXxELpmAzyYl1ZRR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "ScrollView", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 10 + }, + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 62 + }, + { + "__id__": 15 + }, + { + "__id__": 63 + } + ], + "_prefab": { + "__id__": 64 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 174, + "g": 121, + "b": 121, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 188.183, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8ak5WlHVBELqSzRzcpZa3P" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [ + { + "__id__": 11 + } + ], + "_active": false, + "_components": [ + { + "__id__": 14 + }, + { + "__id__": 59 + }, + { + "__id__": 60 + } + ], + "_prefab": { + "__id__": 61 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 820 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 340, + -410, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "16gqVcPfxELJJJvzrWZur+" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "88oQE4wgFOborC60bIDsV9" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "3c5hqDysBEP4STnJxq6+Kh" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d7LA6B6L9KYrPYs9FOPGKR", + "sync": false + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_scrollView": { + "__id__": 15 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 12 + }, + "_N$direction": 1, + "_id": "96ZRZ1fLtOo4EwcQEvfvZQ" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 16 + }, + "content": { + "__id__": 16 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": null, + "_id": "9e/+xucD5F4ZxPMvguWtL2" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 17 + }, + "_children": [ + { + "__id__": 20 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 58 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7dABu6LfBPVrHU5tOjT7Yt" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [ + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 700 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a2Zfykcl1GPqJhA7ixiKd3" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "26KueHItNK14Rh/HjkmD9I" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "01e0xqlUVFcY0MMajauQHo", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": { + "__id__": 16 + }, + "_children": [ + { + "__id__": 21 + }, + { + "__id__": 24 + }, + { + "__id__": 33 + }, + { + "__id__": 44 + }, + { + "__id__": 47 + }, + { + "__id__": 50 + }, + { + "__id__": 53 + } + ], + "_active": true, + "_components": [ + { + "__id__": 56 + } + ], + "_prefab": { + "__id__": 57 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -50, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "55FH2q1HJAyK0hrjxGH/+q" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -45.954, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6eyN1+nK5HT7svNqUsa2/+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e30f966f-d546-44a0-9ee4-ba5745d69daa" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "3df9QOnDFJV7TAVFba88/C" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 25 + }, + { + "__id__": 28 + } + ], + "_active": true, + "_components": [ + { + "__id__": 31 + } + ], + "_prefab": { + "__id__": 32 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -192.998, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9a3MBWS0tATp1bXC+684by" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 24 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 27 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "afQOj7Nf1G+obAarDvFiss" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "3dQTyGvVtFoYuz2oICw3zW" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 24 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "04+nh113dEUadg6AGURjqn" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "d4jJKsPmREIIvqtNo9qT9a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "08y5EI06ZOg5mNtTnvGYlB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 34 + }, + { + "__id__": 37 + }, + { + "__id__": 40 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 43 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bdbEH+735OxrggnQuRlqF2" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": { + "__id__": 36 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "34MaLWCWxBHoY//3pYJXcH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4f8a74d6-8e87-4734-9df3-90027b702649" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "81Vy6ELJROcJi8tTw2Qjb5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 38 + } + ], + "_prefab": { + "__id__": 39 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "84qKc8CKlOI522xR39xkzA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "9b7R4QlpVKqqTMybq9FiqI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 41 + } + ], + "_prefab": { + "__id__": 42 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9166Yb071H1Zr8Ui2B+hsT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "515ff941-a6d1-421a-9243-249091fc5b1d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "43yfKjDd5NG61vmnAMcyS5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 46 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "de4HHWkIhExrJq1+nHHMA6" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 44 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "bf3FH41FFOi7NWKgMyLmiz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + } + ], + "_prefab": { + "__id__": 49 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60.04, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 102.441, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "05c46heZhJV4sYMqYyxlB5" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "90%", + "_N$string": "90%", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "ebZXHD9xdJPKtw0xxjWGui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + } + ], + "_prefab": { + "__id__": 52 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -122.702, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ccHej6ZKxK6o8+pWYH7dhC" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "8a0mkATQNJ+535H7jzhXTI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "timeLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + } + ], + "_prefab": { + "__id__": 55 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 67.24, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 264.306, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "80DbdqyyhFlqqHDlYCMl/t" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "1'36''", + "_N$string": "1'36''", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "b5ULXxgz5Ab4DjVlYsNxoV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "4cDapuaZhMqIPz9BEZOKGu", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_id": "c1c+DMgdRG3q56NuEbVYb0" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "55FH2q1HJAyK0hrjxGH/+q", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "b21uNyrqhLbqirpS1MD+7t", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "15Ij2+io5Kf75wBTFmM1FH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "18yu9m8C1KVImpGMQfBH6e" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "7by3ovAnJLYoQqKmlhCACY", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": false, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "366jlZ4HBD27bc2JZMq5cN" + }, + { + "__type__": "d5421HgLShFKIjj5f18m1mi", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "itemRender": { + "__id__": 20 + }, + "type": 2, + "startAxis": 2, + "spaceX": 10, + "spaceY": 10, + "padding_top": 10, + "padding_buttom": 10, + "padding_left": 10, + "_padding": 0, + "padding_right": 10, + "_id": "5eHjeDnZlKvI3Vhx1nh5nF" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "bdWGhni0BLgaAOrQnsfTP4", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 66 + }, + { + "__id__": 69 + }, + { + "__id__": 72 + }, + { + "__id__": 75 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 78 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 44.282, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "10unPSfi1NUb30N1EjhieB" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 67 + } + ], + "_prefab": { + "__id__": 68 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "16l1mnOX5M1beKvcPbem8A" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 66 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "排名", + "_N$string": "排名", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "8fbqxr8WlF+4EtfRkmqVmB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "7bzdCzsURJc4G7MwOL0Blj", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 70 + } + ], + "_prefab": { + "__id__": 71 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -69.933, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a3bCpEpCRBD7MKBsIRT6v6" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 69 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用户昵称", + "_N$string": "用户昵称", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "0f+OS1A5VBkY5x0F5RYDoj" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "517a9VdPBNUK5P35X44CpK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 73 + } + ], + "_prefab": { + "__id__": 74 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 81, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 141.46, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "efg8TK/nNEdrmy1CcmmR0z" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 72 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "准确率", + "_N$string": "准确率", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "66yy55ZIJLOajbzHnk0Pyq" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "12KoCg1NRLpJU9aRF1iPkq", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 76 + } + ], + "_prefab": { + "__id__": 77 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 263.249, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d4gJ4FKuFECJLudNLM8B1M" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 75 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用时", + "_N$string": "用时", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "bfVml1kDpNYrLYA2EW/4c4" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "6eqbmcu+BOcp3jPH/yrrDl", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "9963O/IP5CCLrawiVnAqdg", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "player", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 80 + }, + { + "__id__": 91 + } + ], + "_active": true, + "_components": [ + { + "__id__": 100 + } + ], + "_prefab": { + "__id__": 101 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 129 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -289.722, + 353.93, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "791LpnRkFNkqdfpCoJ3Pqk" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 79 + }, + "_children": [ + { + "__id__": 81 + }, + { + "__id__": 84 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 90 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -11.662, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7aHA1K+7hE8YNbYjVirEih" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 82 + } + ], + "_prefab": { + "__id__": 83 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 136, + "g": 80, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 72, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -42.835, + 133.875, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "96xrp90GJO8rwMqGxxlacV" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 81 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "超过了", + "_N$string": "超过了", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "daHyJzw/xLho0dlbkuPHvm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "b0QUZ3hixHY4BCC7p7EwaX", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 85 + } + ], + "_prefab": { + "__id__": 86 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 136, + "g": 80, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 48, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 74.991, + 133.875, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "66pdXEqLtLUaXZg+PhM/Z/" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 84 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "的人", + "_N$string": "的人", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "5bSRJmjgtCUrA2vxudA4QN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d3ySguqntO5bgnP95er4PW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "number", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 88 + } + ], + "_prefab": { + "__id__": 89 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 46, + "g": 17, + "b": 81, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 58.04, + "height": 36.54 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21.936, + 134.451, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "08JiIvh25MQLbBHF2EDuB8" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "30%", + "_N$string": "30%", + "_fontSize": 29, + "_lineHeight": 29, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4ejvYL3kxDzq6r/YHZLUuV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d6vzzOaCBH2JMQzL1q75Qk", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "01Wu1da3hD9qLoiu2u15Dh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "mask", + "_objFlags": 0, + "_parent": { + "__id__": 79 + }, + "_children": [ + { + "__id__": 92 + }, + { + "__id__": 95 + } + ], + "_active": true, + "_components": [ + { + "__id__": 98 + } + ], + "_prefab": { + "__id__": 99 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -0.079, + 11.604, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0fcDfHHpRHXKM9MyyslQY8" + }, + { + "__type__": "cc.Node", + "_name": "phone", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 93 + } + ], + "_prefab": { + "__id__": 94 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "37ak2GKuNHfqHwY+7IEFc+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 92 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "e5IQcGfCFLqoqf/wuxBYOY" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "a9FdZ8QGNM77omYBmm7jeP", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 96 + } + ], + "_prefab": { + "__id__": 97 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "4ekK/6ZIFECYG79nYYRw1X" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 95 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "01l/YIk+JMKblUfKTyfTVO" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "082qUxbaNDrIu5wftUXuxE", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 91 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "237hnicvNDF57wjWEhMu97" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "15yWGxXfFKHYDj+6AKZ+hO", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 79 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "700fa527-a104-4d31-846a-99ebc1c5803a" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "c3I2fvdkFB9I3xv3zy8H3C" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "777yycF4RPu7K18m/uyO1m", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 103 + }, + { + "__id__": 104 + } + ], + "_prefab": { + "__id__": 105 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 120 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -609, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b525Z//RNMt7kDFipTkumj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5d5398c4-b3d5-4045-910e-1bfa6fed47ea" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "3cEUZF+3RNUYwTQQpf9d/W" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": -2, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "d9kYhTG5dO1oZvrIgzsMbS" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "adJ7tHdodDiYvg71t3toeY", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "Self", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 107 + }, + { + "__id__": 116 + }, + { + "__id__": 119 + }, + { + "__id__": 130 + }, + { + "__id__": 133 + }, + { + "__id__": 136 + } + ], + "_active": true, + "_components": [ + { + "__id__": 139 + } + ], + "_prefab": { + "__id__": 140 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "cf4fwLe4hJXLYT5vY7WfC9" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [ + { + "__id__": 108 + }, + { + "__id__": 111 + } + ], + "_active": true, + "_components": [ + { + "__id__": 114 + } + ], + "_prefab": { + "__id__": 115 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fe7qLOC0RM9qPt+IfQpa5W" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": { + "__id__": 110 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "24ACHKIZFGcoFu+5kISL5f" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 108 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "0eYZNHU9lK5Z0d0kmu6v2F" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "f513pLQ/9KMbKpOTC4nuyz", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 112 + } + ], + "_prefab": { + "__id__": 113 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "54GC+JJxVI+a5Fp8J91GjX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "79BxLIwZdOjIPk+JbpAeFu" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "c8vhbkrhtGw72GydJ4enTg", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "6fiuDWjOBCBLIM3SAArXZT" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "47dNJgs3hCIZESImEUA8wi", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 117 + } + ], + "_prefab": { + "__id__": 118 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 13.9, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + 59.946, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c5SNuw5RxJOYLInx0KcLRh" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 116 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "f4PjLXFaJKY7WwqSqZK1UD" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "25WXxoGV5I/KgHBE8D1rsK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [ + { + "__id__": 120 + }, + { + "__id__": 123 + }, + { + "__id__": 126 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 129 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8fIUbpCjhI5r01JqiMBRub" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 121 + } + ], + "_prefab": { + "__id__": 122 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ef7AEay5ZBFJGkhxtuK3Ko" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 120 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4f8a74d6-8e87-4734-9df3-90027b702649" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "9fZk18R5pFzpXsHYRZLIyB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "09Kg3hfzBBu6HptPpAFSW9", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 124 + } + ], + "_prefab": { + "__id__": 125 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0cB1/6h6lOm4PGv/txe9Wi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 123 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "bcmZsyS4BDw7p0EU0wLam9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "0dKJ2TWjFCOJ/iqhRFSLjk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 127 + } + ], + "_prefab": { + "__id__": 128 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "afrNKzhE5OH5xP4nKm+QPz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 126 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "515ff941-a6d1-421a-9243-249091fc5b1d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "7d/VdpTjhGQZaLUUl7Uh/+" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "1aJ6eRDI5HH7V7ePpX8123", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "1dS3urBJ1F55mw2t/Q3F7w", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 131 + } + ], + "_prefab": { + "__id__": 132 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "50Dn8FD+VLk49n1cFrrRa/" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 130 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "我", + "_N$string": "我", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "f1wOeDKU5ID6PNtDXFhMnG" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "42BvS5Yl5GfY/GLeE5YQOh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 134 + } + ], + "_prefab": { + "__id__": 135 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60.04, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 102.441, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "eclmBhWWBMV4z6eyHgXvJW" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 133 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "90%", + "_N$string": "90%", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "aaRsfb7QZLD4t0zpwodJ7D" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "aa1BwJO7dBxp3HPZ8h/OQe", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "timeLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 137 + } + ], + "_prefab": { + "__id__": 138 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 67.24, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 264.306, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0f6y13HkZB9qf4E07aunTB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "1'36''", + "_N$string": "1'36''", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "96NL3bUtJDBJXFjy5swMXM" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "5ey5Z8LiRJAY1Sdq2fqfvb", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 106 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "d3X22XFMBBOqWuJHIN1DzL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "02TaTwJ1tM844wDACOg8Uk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "backBtn", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 142 + }, + { + "__id__": 143 + }, + { + "__id__": 144 + } + ], + "_prefab": { + "__id__": 146 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -320.09, + 618, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "581Fkp6jhEH7Z3JUXkk7L4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "43c83a99-6be0-468f-a894-1b624f3d33ac" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "73ZWxCtxxKOZAy/xTAw+AX" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 40.910000000000025, + "_right": 0, + "_top": 29, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "464mXeXUJPK5u6GxXJMzRG" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 145 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "f4kBI/sjNNqYrNDgEFFZFu" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "e74a999IDFOabyymZgXQIiy", + "handler": "backClick", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "34+hXrhBBJUqEHHRNeqJSa", + "sync": false + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "17HeE62vtFurfhKbLJeXdc" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "45wIx1qRNIfKRBbYhYEP1r" + }, + { + "__type__": "e74a999IDFOabyymZgXQIiy", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "Player": { + "__id__": 79 + }, + "selfNode": { + "__id__": 106 + }, + "phone": { + "__id__": 109 + }, + "_id": "81Iy69gIdCtp0UzAUPZ1+M" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/assets/Scene/RankScene.fire.meta b/assets/Scene/RankScene.fire.meta new file mode 100644 index 0000000..e8c4f8e --- /dev/null +++ b/assets/Scene/RankScene.fire.meta @@ -0,0 +1,8 @@ +{ + "ver": "1.3.2", + "uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49", + "importer": "scene", + "asyncLoadAssets": false, + "autoReleaseAssets": true, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script.meta b/assets/Script.meta new file mode 100644 index 0000000..4474a1c --- /dev/null +++ b/assets/Script.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "4734c20c-0db8-4eb2-92ea-e692f4d70934", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts new file mode 100644 index 0000000..480d081 --- /dev/null +++ b/assets/Script/Block.ts @@ -0,0 +1,45 @@ + +const {ccclass, property} = cc._decorator; +@ccclass +export default class NewClass extends cc.Component { + + @property(cc.Label) + label: cc.Label = null; + + @property + text: string = 'hello'; + tween: cc.Tween; + speed: number; //移动速度,时间参数,位移个固定 + move: boolean; //是否在移动状态。 + num: number; + difficulty: number; + + // LIFE-CYCLE CALLBACKS: + + onLoad () { + + } + + start () { + } + + init(){ + + } + + + + hide(){ + cc.tween(this.node) + .to(0.2,{opacity:0}) + .call(() =>{ + this.node.active = false; + this.node.removeFromParent(); + this.node = null; + }) + .start(); + } + + update (dt) { + } +} diff --git a/assets/Script/Block.ts.meta b/assets/Script/Block.ts.meta new file mode 100644 index 0000000..b1329e9 --- /dev/null +++ b/assets/Script/Block.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "dd5bcc36-4db1-428e-a239-43ea14063b97", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/DynamicAtlasManager.js b/assets/Script/DynamicAtlasManager.js new file mode 100644 index 0000000..a2a6000 --- /dev/null +++ b/assets/Script/DynamicAtlasManager.js @@ -0,0 +1,10 @@ +cc.Class({ + extends: cc.Component, + + properties: { + }, + + onLoad () { + cc.dynamicAtlasManager.enabled = false; + }, +}); diff --git a/assets/Script/DynamicAtlasManager.js.meta b/assets/Script/DynamicAtlasManager.js.meta new file mode 100644 index 0000000..fd5b134 --- /dev/null +++ b/assets/Script/DynamicAtlasManager.js.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f", + "importer": "javascript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/GameManager.ts b/assets/Script/GameManager.ts new file mode 100644 index 0000000..9133c52 --- /dev/null +++ b/assets/Script/GameManager.ts @@ -0,0 +1,378 @@ +import AudioManager from "./module/Music/AudioManager"; + +// 主游戏控制类 +const {ccclass, property} = cc._decorator; +@ccclass +export default class GameManager extends cc.Component { + + @property(cc.Node) + Btn_New: cc.Node = null; + @property(cc.Node) + Btn_Old: cc.Node = null; + + + @property(cc.Node) + Plant: cc.Node = null; + + @property(cc.Node) + timeNode: cc.Node = null; + + @property(cc.SpriteAtlas) + FoodPlist: cc.SpriteAtlas = null; + + voiceSpriteFrame: cc.SpriteFrame; //是否可点击 + timeTween: cc.Tween; + touchable: boolean; //是否可点击 + countTime: number; //每次游戏倒计时 + startTime: number; //游戏开始计时 + overTime: number; //游戏结束计时 + now_Food: string; //当前关卡名字信息 + result: number; //当前关卡名字信息 + choice: number; //当前关卡选择第几个按钮 + foodPicArray: any; //存放当前每一大局游戏所有植物图片 + foodAudioArray: any; //存放当前每一大局游戏所有植物声音 + customData:any; //存放当前配置 + needleTween: cc.Tween; + onLoad () { + this.fit(); + this.init(); + this.startGame(); + } + + start () { + + } + + //处理地图 + setMap(){ + + } + + //初始化数据 + init(){ + this.touchable = false; + this.result = -1; + this.foodAudioArray = []; + this.foodPicArray = []; + this.timeTween = null; + this.needleTween = null; + this.choice = 0; + cc.fx.GameConfig.GM_INFO.stepTimeList = 0; + cc.fx.GameConfig.GM_INFO.successList = []; + cc.fx.GameConfig.GM_INFO.level = 0; + this.voiceSpriteFrame = this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame; + this.btnReset(); + } + //开始游戏 + startGame(){ + cc.tween(this.node.getChildByName("Begin")) + .to(0.1,{opacity:0}) + .to(0.5,{opacity:255}) + .delay(1) + .to(0.5,{opacity:0}) + .call(() =>{ + this.createCustom(); + }) + .start(); + } + + //根据是否全面屏,做独立适配方面 + fit(){ + var jg = cc.fx.GameTool.setFit(); + if(!jg){ + this.Btn_Old.y = -450; + this.Btn_New.y = -300; + } + } + //创建关卡 + createCustom(){ + this.choice = 0; + this.Plant.opacity = 0; + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.timeNode.getChildByName("needle").angle = 0; + if(cc.fx.GameConfig.GM_INFO.level >= cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom.length){ + + setTimeout(() => { + cc.director.loadScene("OverScene"); + }, 1000); + return; + } + this.customData = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom[cc.fx.GameConfig.GM_INFO.level]; + + let name = this.customData.item; + + //埋点数据设置 + cc.fx.GameConfig.CLICK_SET("round",cc.fx.GameConfig.GM_INFO.level+1); + cc.fx.GameConfig.CLICK_SET("levelConfig",(cc.fx.GameConfig.GM_INFO.custom+1)); + cc.fx.GameConfig.CLICK_SET("item",name); + cc.fx.GameConfig.CLICK_SET("roundType",this.customData.type); + + if(this.customData.type == 1){ + this.Plant.getChildByName("name").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name); + name = "prop_"+name; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.FoodPlist["_spriteFrames"][name]; + this.now_Food = name; + cc.tween(this.Plant) + .to(0.2,{opacity:255}) + .call(()=>{ + this.startTimer(); + }) + .start(); + } + else{ + this.Plant.getChildByName("name").getComponent(cc.Label).string = "" + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame; + let audioName = name + "_audio"; + name = "audio"+ name; + this.now_Food = name; + cc.fx.AudioManager._instance.playEffect(audioName); + cc.tween(this.Plant) + .to(0.2,{opacity:255}) + .call(()=>{ + this.startTimer(); + }) + .start(); + } + //关卡+1 + cc.fx.GameConfig.GM_INFO.level += 1; + + } + //开始转圈倒计时 + startTimer(){ + this.startTime = cc.fx.GameTool.getTime(); + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + + // if(this.containsNanana(this.now_Food) == true){ + // console.log("可以点火"); + + // } + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.needleTween = + cc.tween(this.timeNode.getChildByName("needle")) + .to(8,{angle:-360}) + .start(); + this.timeTween = + cc.tween(this.timeNode.getChildByName("time").getComponent(cc.Sprite)) + .to(8,{fillRange:1}) + .call(()=>{ + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + this.click_Choice(null,null); + this.timeTween = null; + }) + .start(); + } + + containsNanana(str) { + return /muchai/i.test(str); + } + + //新植物按钮 + click_Choice(customData,data){ + //关掉计时器 处理逻辑之前,先行关掉按钮开关 + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + this.timeTween.stop(); + this.timeTween = null; + this.needleTween.stop(); + this.needleTween = null; + //判断是否正确,并把出现的物品存入数组 + this.result = this.judgingResult(); + if(data == "Btn_New"){ + if(this.result == -1){ + this.result = 1; + } + else{ + this.result = -1; + } + } + var tempNode = null; + if(data != null) tempNode = this[data] + //设置按钮状态 + this.setBtnState(tempNode,data); + //获取反应时间 + this.setTimeData(); + //根据答题,设置上传数据 + this.setData(data); + //进行下一关 + this.nextLevel(); + } + + //点火按钮 + click_Ignition(){ + + } + + //判断是否有过的结果 type只为new hear see 三选一 + judgingResult(){ + let result = -1; + let name = this.now_Food.substring(5,this.now_Food.length); + //再检查图盘 + if(this.foodPicArray.length > 0){ + for(let i=0; i 8000) time = 8000; + cc.fx.GameConfig.CLICK_SET("stepTime",time); + cc.fx.GameConfig.GM_INFO.stepTimeList += time; + } + + //设置按钮状态 + setBtnState(node,data){ + if(data == "Btn_New") this.choice = 1; + else if(data == "Btn_Old") this.choice = 2; + // else if(data == "Btn_See") this.choice = 3; + + if(data == null){ + this.choice = 0; + } + + if(this.choice != cc.fx.GameConfig.CLICK_DATA.rightChoice){ + if(node){ + cc.fx.AudioManager._instance.playEffect("err",null); + node.getChildByName("err").active = true; + node.getChildByName("correct").active = false; + } + + } + else{ + if(node){ + cc.fx.AudioManager._instance.playEffect("yes",null); + node.getChildByName("err").active = false; + node.getChildByName("correct").active = true; + } + + } + if(node) node.getChildByName("nomal").active = false; + + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + } + + //下一轮 首先重置按钮状态 + nextLevel(){ + cc.tween(this.Plant) + .delay(1) + .call(()=>{ + this.btnReset(); + }) + .to(0.5,{opacity:0}) + .call(()=>{ + this.createCustom(); + }) + .start(); + } + + btnReset(){ + this.Btn_New.getChildByName("nomal").active = true; + this.Btn_New.getChildByName("err").active = false; + this.Btn_New.getChildByName("correct").active = false; + this.Btn_Old.getChildByName("nomal").active = true; + this.Btn_Old.getChildByName("err").active = false; + this.Btn_Old.getChildByName("correct").active = false; + + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + } + + //返回首页 + backScene(){ + cc.director.loadScene("LoadScene"); + } + //下一关,或者重新开始,或者返回上一关,根据level决定 + reStart(type){ + + } + //获取时间戳 + getTime(){ + const timestamp = new Date().getTime(); + return timestamp; + } + //获胜 + passLevel(){ + + } + //失败 + loseLevel(type){ + + } + + //如果是倒计时 调用此方法 + startCountDownTime () { + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.timeNode.getChildByName("needle").angle = 0; + } + //上传每次操作数据 + setData(data){ + console.log("进入上传埋点"); + if(data == "Btn_New") this.choice = 1; + else if(data == "Btn_Old") this.choice = 2; + // else if(data == "Btn_See") this.choice = 3; + else if(data == null){ + this.choice = 0; + cc.fx.GameConfig.CLICK_SET("stepTime",5000); + } + var jg = false; + if(this.choice == cc.fx.GameConfig.CLICK_DATA.rightChoice){ + jg = true; + cc.fx.GameConfig.GM_INFO.successList.push(jg); + } + cc.fx.GameConfig.CLICK_SET("choice",this.choice); + cc.fx.GameConfig.CLICK_SET("success",jg); + console.log("进入GameTool.setGameData",cc.fx.GameConfig.CLICK_DATA); + cc.fx.GameTool.setGameData(); + } + //上传排行榜数据 + gameOver(time){ + cc.fx.GameTool.setRank(time); + this.node.getChildByName("GameOver").active = true; + this.node.getChildByName("GameOver").opacity = 0; + cc.tween(this.node.getChildByName("GameOver")) + .to(0.4,{opacity:255}) + .delay(2) + .to(0.4,{opacity:50}) + .call(() =>{ + cc.director.loadScene("OverScene"); + }) + .start() + } + + onEnable () { + // cc.fx.Notifications.on("clickSun", this.clickSun, this); + } + onDisable () { + // cc.fx.Notifications.off("clickSun", this.clickSun); + } + update (dt) { + } +} diff --git a/assets/Script/GameManager.ts.meta b/assets/Script/GameManager.ts.meta new file mode 100644 index 0000000..1a800a4 --- /dev/null +++ b/assets/Script/GameManager.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "b0432040-dbde-438c-839c-ba2b5d18a3b5", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/GameOver.ts b/assets/Script/GameOver.ts new file mode 100644 index 0000000..545a2b8 --- /dev/null +++ b/assets/Script/GameOver.ts @@ -0,0 +1,151 @@ + +const {ccclass, property} = cc._decorator; + +@ccclass +export default class NewClass extends cc.Component { + @property(cc.Label) + count: cc.Label = null; + @property(cc.Label) + time: cc.Label = null; + @property(cc.Sprite) + finishiTime: cc.Sprite = null; + listData: any; + selfData: any; + accuracy:number; + + // onLoad () {} + start () { + this.count.string = 0 + ""; + this.init(); + + // success_${today}_${code}_${matchedReferrer.gameId} + // const today = new Date().toLocaleDateString(); + // const data = "success_${today}_${code}_${matchedReferrer.gameId}" + + } + //初始化数据 + init(){ + //展示准确率 + this.showAccuracy(); + //展示完成时间 + this.showFinishiTime(); + //上传排行榜 + this.setRank(); + //删除本关卡 + setTimeout(() => { + cc.fx.GameTool.getCustom(true); + }, 100); + + var urlNow = window.location.href; + if(this.containsTrain(urlNow)){ + this.node.getChildByName("btn").getChildByName("again").active = false; + this.node.getChildByName("btn").getChildByName("rank").active = false; + this.node.getChildByName("btn").getChildByName("finishi").active = true; + this.setLocalStorage(); + + } + else{ + this.node.getChildByName("btn").getChildByName("again").active = true; + this.node.getChildByName("btn").getChildByName("rank").active = true; + this.node.getChildByName("btn").getChildByName("finishi").active = false; + } + } + + setLocalStorage(){ + const today = new Date().toLocaleDateString(); + var name = `success_${today}_${cc.fx.GameConfig.GM_INFO.scode}_${cc.fx.GameConfig.GM_INFO.gameId}` + localStorage.setItem(name, JSON.stringify({success:true})); + } + + setRank(){ + let data = { + "totleTimes": cc.fx.GameConfig.GM_INFO.stepTimeList, + "accuracy": this.accuracy, + } + cc.fx.GameTool.setRank(data); + } + + showFinishiTime(){ + cc.tween(this.finishiTime) + .delay(1.5) + .to(0.5,{fillRange:1}) + .start(); + cc.tween(this.time.node) + .delay(1.7) + .to(0.3,{opacity:255}) + .call(()=>{ + this.conversionTime(); + }) + .start(); + } + + conversionTime(){ + var minute = 0; + var second = 0; + let obj = {a:100}; + let time = parseInt(cc.fx.GameConfig.GM_INFO.stepTimeList/1000 + ""); + cc.tween(obj) + // .delay(0.1) + .to(1,{a:time},{ + progress: (start,end,current,ratio)=>{ + current = end*ratio; + second = current.toFixed(0); + if(second >= 60){ + minute = parseInt(second/60+""); + second -= 60*minute; + } + this.time.string = minute + "分" + second + "秒"; + } + }) + .call(()=>{ + this.node.getChildByName("btn").active = true; + cc.tween(this.node.getChildByName("btn")) + .to(0.3,{opacity:255}) + .start(); + }) + .start() + } + + showAccuracy(){ + this.accuracy = parseInt(cc.fx.GameConfig.GM_INFO.successList.length/ + cc.fx.GameConfig.GM_INFO.level*100+""); + + console.log("答对的个数:",cc.fx.GameConfig.GM_INFO.successList.length); + console.log("总数:",cc.fx.GameConfig.GM_INFO.level); + console.log("准确率:",this.accuracy); + let obj = {a:100}; + cc.tween(obj) + .delay(0.5) + .to(1,{a:this.accuracy},{ + progress: (start,end,current,ratio)=>{ + current = end*ratio; + current = current.toFixed(0); + this.count.string = current + ""; + } + }) + .start() + } + + jumpFinishi(){ + let url = "https://train.sparkus.cn/poster/game/" + cc.fx.GameConfig.GM_INFO.scode + "?suc=1"; + window.location.href = url; + } + + //判断来源 + containsTrain(str) { + return /from=train/i.test(str); + } + + //打开排行榜 + openRank(){ + cc.director.loadScene("RankScene"); + } + //重新开始玩 + again(){ + cc.director.loadScene("GameScene"); + } + + update(dt: number): void { + // this.count.string = this.accuracy + ""; + } +} diff --git a/assets/Script/GameOver.ts.meta b/assets/Script/GameOver.ts.meta new file mode 100644 index 0000000..b407263 --- /dev/null +++ b/assets/Script/GameOver.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "805c69df-dfdf-4759-97ae-5a7341f424c7", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/GameScene.js b/assets/Script/GameScene.js new file mode 100644 index 0000000..1cf57d4 --- /dev/null +++ b/assets/Script/GameScene.js @@ -0,0 +1,48 @@ + +// cc.Class({ +// extends: cc.Component, +// properties: { +// localTest: { +// default: false, +// tooltip: '本地测试时勾选,避免tz_url和Configure报错,提交前勾掉' +// }, +// clientTest: { +// default: false, +// tooltip: '客户端测试时勾选,展示版本标记方便测试区分,上线前勾掉' +// }, +// clientTestVersion: { +// default: '', +// tooltip: '版本标记' +// }, +// testVersion: cc.Label, +// score: cc.Label, +// double_hit: cc.Node, +// add: cc.Node, +// add2: cc.Node, +// double_title: cc.Node, +// count_time: cc.Node, +// beginNode: cc.Node, +// ball_nomal: [cc.SpriteFrame], +// bg_nomal: [cc.SpriteFrame], +// ball_light: [cc.SpriteFrame], +// kuang_Frame: [cc.SpriteFrame], +// daojishi: cc.Label, +// pause_anniu: cc.Sprite, +// mask: cc.Node, + +// flashUI: { +// default: null, +// type: cc.SpriteAtlas +// }, +// }, + +// onLoad() { + + +// }, + +// update(dt) { + +// }, + +// }); \ No newline at end of file diff --git a/assets/Script/GameScene.js.meta b/assets/Script/GameScene.js.meta new file mode 100644 index 0000000..aaf124f --- /dev/null +++ b/assets/Script/GameScene.js.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "e8b23e56-8d10-44ad-a8f0-2e637cc45533", + "importer": "javascript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/GuideManager.ts b/assets/Script/GuideManager.ts new file mode 100644 index 0000000..2eddbaa --- /dev/null +++ b/assets/Script/GuideManager.ts @@ -0,0 +1,298 @@ +import AudioManager from "./module/Music/AudioManager"; + +// 主游戏控制类 +const {ccclass, property} = cc._decorator; +@ccclass +export default class GuideManager extends cc.Component { + + @property(cc.Node) + Tip: cc.Node = null; + + @property(cc.SpriteAtlas) + FoodPlist: cc.SpriteAtlas = null; + + @property(cc.Node) + Btn_New: cc.Node = null; + @property(cc.Node) + Btn_Old: cc.Node = null; + + + @property(cc.Node) + Plant: cc.Node = null; + voiceSpriteFrame: cc.SpriteFrame; //是否可点击 + + needleTween: cc.Tween; + func: () => void; + + custom:number; + + now_Food: string; //当前关卡名字信息 + customData: { item: string; type: number; right: number; }[]; + choice: number; + + onLoad () { + this.custom = 1; + } + + start () { + this.fit(); + } + + fit(){ + var jg = cc.fx.GameTool.setFit(); + if(!jg){ + + } + + } + + //初始化数据 + init(){ + this.voiceSpriteFrame = this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame;`` + this.node.getChildByName("nextBtn").active = false; + let name = cc.fx.GameConfig.GM_INFO.gameId + "_guide"; + if(cc.fx.StorageMessage.getStorage(name) != null) + cc.fx.GameConfig.GM_INFO.guide = cc.fx.StorageMessage.getStorage(name); + if(cc.fx.GameConfig.GM_INFO.guide == false){ + this.node.getChildByName("jumpBtn").active = true; + cc.tween(this.node.getChildByName("jumpBtn")) + .to(0.35,{opacity:255}) + .start(); + } + + let tip = cc.fx.tipType.tipOne; + + let label = this.node.getChildByName("tip1").getComponent(cc.Label); + cc.fx.GameTool.typingAni(label,tip,this.startGame.bind(this),this); + + this.initData(); + } + + initData(){ + this.customData = [ + { + "item": "putao", + "type": 1, + "right":1, + }, + { + "item": "taozi", + "type": 2, + "right":1, + }, + { + "item": "putao", + "type": 2, + "right":2, + }, + { + "item": "taozi", + "type": 1, + "right":2, + } + ] + } + + passVoice(){ + // cc.fx.AudioManager._instance.playMusicGame(); + let voice = this.node.getChildByName("voiceTip"); + voice.getChildByName("startBtn").getComponent(cc.Button).interactable = false; + voice.getChildByName("playBtn").getComponent(cc.Button).interactable = false; + cc.tween(voice) + .to(0.5,{opacity:0}) + .call(()=>{ + voice.active = false; + }) + .start(); + setTimeout(() => { + this.init(); + }, 1000); + } + + playVoice(){ + cc.fx.AudioManager._instance.playEffect("taozi_audio",null); + } + + jumpClick(){ + cc.director.loadScene("GameScene"); + } + + nextClick(){ + //第一步 + this.node.getChildByName("nextBtn").active = false; + let label = this.node.getChildByName("tip1").getComponent(cc.Label); + + if(this.custom == 0){ + cc.tween(this.node.getChildByName("tip1")) + .to(0.2,{opacity:0}) + .call(() =>{ + label.string = ""; + }) + .to(0.1,{opacity:255}) + .call(() =>{ + let tip = cc.fx.tipType.tipTwo; + cc.fx.GameTool.typingAni(label,tip,this.startGame.bind(this),this); + }) + .start(); + } + else if(this.custom == 1){ + this.node.getChildByName("nextBtn").active = false; + this.node.getChildByName("jumpBtn").active = false; + cc.tween(this.node.getChildByName("tip1")) + .to(0.2,{opacity:0}) + .call(() =>{ + label.string = ""; + this.nextLevel(); + }) + .start(); + } + this.custom += 1; + } + + nextLevel(){ + this.choice = 0; + this.Btn_Old.active = true; + this.Btn_New.active = true; + + + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + + let name = this.customData[this.custom-2].item; + if(this.customData[this.custom-2].type == 1){ + this.Plant.getChildByName("name").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name); + name = "prop_"+name; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.FoodPlist["_spriteFrames"][name]; + this.now_Food = name; + cc.tween(this.Plant) + .to(0.2,{opacity:255}) + .call(()=>{ + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + }) + .start(); + } + else{ + this.Plant.getChildByName("name").getComponent(cc.Label).string = "" + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame; + let audioName = name + "_audio"; + name = "audio"+ name; + this.now_Food = name; + cc.fx.AudioManager._instance.playEffect(audioName,null); + cc.tween(this.Plant) + .to(0.2,{opacity:255}) + .call(()=>{ + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + + }) + .start(); + } + //关卡+1 + + } + + //新植物按钮 + click_Btn(customData,data){ + //关掉计时器 处理逻辑之前,先行关掉按钮开关 + if(data == "Btn_New"){ + this.choice = 1; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + } + else if(data == "Btn_Old"){ + this.choice = 2; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + } + + let target = this[data]; + var label = this.Tip.getChildByName("content").getComponent(cc.Label); + //正确 + if(this.choice == this.customData[this.custom-2].right){ + cc.fx.AudioManager._instance.playEffect("yes",null); + this.Tip.stopAllActions(); + this.Tip.active = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + target.getChildByName("err").active = false; + target.getChildByName("correct").active = true; + setTimeout(() => { + this.Btn_New.getChildByName("nomal").active = true; + this.Btn_New.getChildByName("err").active = false; + this.Btn_New.getChildByName("correct").active = false; + this.Btn_Old.getChildByName("nomal").active = true; + this.Btn_Old.getChildByName("err").active = false; + this.Btn_Old.getChildByName("correct").active = false; + + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + + this.custom += 1; + if(this.custom >= 6){ + this.node.getChildByName("againBtn").active = true; + this.node.getChildByName("startBtn").active = true; + this.Btn_Old.active = false; + this.Btn_New.active = false; + cc.fx.GameConfig.GM_INFO.guide = false; + let name = cc.fx.GameConfig.GM_INFO.gameId + "_guide"; + cc.fx.StorageMessage.setStorage(name,cc.fx.GameConfig.GM_INFO.guide); + } + else this.nextLevel(); + }, 1000); + } + else{ + cc.fx.AudioManager._instance.playEffect("yes",null); + var tipTemp = '葡萄刚才出现过呢' + this.Tip.active = true; + target.getChildByName("err").active = true; + target.getChildByName("correct").active = false; + + switch((this.custom-2)){ + case 0: + tipTemp = "这是这局游戏第一次出现葡萄"; + break; + case 1: + tipTemp = "这是这局游戏第一次出现桃子"; + break; + case 2: + tipTemp = '这不是这局游戏第一次出现葡萄'; + break; + case 3: + tipTemp = "这不是这局游戏第一次出现桃子"; + break; + } + label.string = tipTemp; + this.Tip.opacity = 255; + this.Tip.stopAllActions(); + var self = this; + var action = cc.callFunc(function(){ + self.Tip.active = false; + }) + this.Tip.runAction(cc.sequence(cc.delayTime(2),cc.fadeIn(0.5),action)) + } + } + + //开始游戏 + startGame(){ + this.node.getChildByName("nextBtn").active = true; + cc.tween(this.node.getChildByName("nextBtn")) + .to(0.35,{opacity:255}) + .start(); + } + + againClick(){ + cc.director.loadScene("GuideScene"); + } + + + + onEnable () { + // cc.fx.Notifications.on("clickSun", this.clickSun, this); + } + onDisable () { + // cc.fx.Notifications.off("clickSun", this.clickSun); + } + update (dt) { + } +} diff --git a/assets/Script/GuideManager.ts.meta b/assets/Script/GuideManager.ts.meta new file mode 100644 index 0000000..14f3144 --- /dev/null +++ b/assets/Script/GuideManager.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "effe29e5-3670-444b-81fd-b45338af7f19", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/Load.ts b/assets/Script/Load.ts new file mode 100644 index 0000000..4886164 --- /dev/null +++ b/assets/Script/Load.ts @@ -0,0 +1,72 @@ +import { WeChat } from "./module/Share/share"; + +const {ccclass, property, requireComponent} = cc._decorator; + +@ccclass +export default class NewClass extends cc.Component { + + @property(false) + localTest: boolean = false; + + @property("") + clientTestVersion: string = "1.0.0"; + + @property(cc.Label) + testVersion: cc.Label = null; + + start () { + + cc.debug.setDisplayStats(false); + window.initMgr(); + // @ts-ignore + if(window.wx !== null && window.wx !== undefined) WeChat.setShare(location.href); + cc.fx.GameConfig.init(this.localTest); + this.testVersion.string = this.clientTestVersion; + + var urlNow = window.location.href; + if(this.containsTrain(urlNow)){ + console.log("无排行版本"); + this.node.getChildByName("Rank").active = false; + } + else{ + console.log("有排行版本"); + } + + } + + //判断来源 + containsTrain(str) { + return /from=train/i.test(str); + } + + setRank(){ + let data = { + "totleTimes": 8759, + "accuracy": 80, + } + cc.fx.GameTool.setRank(data); + } + + //开始游戏,跳转至引导页面 + startGame(){ + + setTimeout(() => { + cc.director.loadScene("GuideScene"); + }, 100); + // cc.director.loadScene("GuideScene"); + } + //备用,用来测试跳转 指定关卡 + clickBtn(event,data){ + // cc.fx.GameConfig.GM_INFO.custom = parseInt(data); + cc.director.loadScene("GameScene"); + } + //打开排行榜 + openRank(){ + setTimeout(() => { + cc.director.loadScene("RankScene"); + }, 100); + } + + protected update(dt: number): void { + } +} diff --git a/assets/Script/Load.ts.meta b/assets/Script/Load.ts.meta new file mode 100644 index 0000000..7822b7e --- /dev/null +++ b/assets/Script/Load.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "454ad829-851a-40ea-8ab9-941e828357ca", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/RankManager.ts b/assets/Script/RankManager.ts new file mode 100644 index 0000000..f8998db --- /dev/null +++ b/assets/Script/RankManager.ts @@ -0,0 +1,154 @@ + +import List from "./module/RankList/List"; +const { ccclass, property } = cc._decorator; +//排行榜 +@ccclass +export default class RankManager extends cc.Component { + @property(cc.Node) //用户上方头像 + Player: cc.Node = null; + @property(cc.Node) //用户最下方个人信息 + selfNode: cc.Node = null; + @property(cc.Sprite) //用户头像换图 + phone: cc.Sprite = null; + private rankList: List; //排行榜 + tween: cc.Tween; //最上方用户头像动画 + listData: any; //总列表信息 + selfData: any; //自己信息 + rankNumber: number; //用户自己排名 有可能不在排行榜内99+ + rankTotal: number; //获取排行榜用户数量 现在为100 + + onLoad() { + this.init(); + } + //初始化数据 + init(){ + this.rankList = cc.find("ScrollView", this.node).getComponent(List); + this.Player.getChildByName("rank").active = false; + this.listData = []; + this.selfData = null; + this.rankNumber = 100; + this.rankTotal= 100; + this.selfNode.opacity = 0; + this.fit(); + } + + start() { + this.Player.active = false; + this.getRank(); + } + + fit(){ + var jg = cc.fx.GameTool.setFit(); + if(!jg){ + this.node.getChildByName("ScrollView").getChildByName("view").height = 800; + } + } + + //调用获取排行榜接口 + getRank(){ + let dataFile = { + length:100 + } + cc.fx.GameTool.getRank(dataFile,data =>this.getRankData(data)); + } + //实际设置排行数据 + getRankData(data){ + if(data){ + //console.log(data); + cc.fx.GameTool.getRankData(data,this,6); + this.setPic(this.selfData.pic); + } + } + //返回按钮 + backClick(){ + cc.director.loadScene("LoadScene"); + } + //最上方用户动画 + playerAction(){ + //-254 377 210 453 + this.Player.getChildByName("rank").active = false; + let time = 1; + this.tween = cc.tween(this.Player) + .to(2,{position:cc.v3(232,446,0)}) + .call(() =>{ + this.Player.getChildByName("rank").active = true; + this.Player.getChildByName("rank").getChildByName("number") + .getComponent(cc.Label).string = parseInt(time*100 + "") + "%"; + }) + .start(); + if(this.listData.length > 0){ + time = (this.listData.length - this.rankNumber)/this.listData.length; + } + + if(this.listData.length > 0){ + if(this.listData.length >= 99){ + if(this.rankNumber >= 99){ + time = (Math.random()*49+1)/100 + } + else time = (this.listData.length - this.rankNumber)/this.listData.length; + } + else{ + if(this.rankNumber > 99){ + time = 0 + } + else time = (this.listData.length - this.rankNumber)/this.listData.length; + } + } + else{ + time = 0; + } + + setTimeout(() => { + if(this.tween)this.tween.stop(); + this.Player.getChildByName("rank").active = true; + this.Player.getChildByName("rank").getChildByName("number") + .getComponent(cc.Label).string = parseInt(time*100 + "") + "%"; + }, time*2000); + + } + //设置头像 处理的逻辑比较多,不用公共类的了 + public setPic(pic){ + this.phone.node.parent.getChildByName("icon").active = false; + this.phone.node.active = false; + this.Player.active = true; + this.Player.opacity = 0; + this.Player.getChildByName("mask").getChildByName("icon").active = false; + this.Player.getChildByName("mask").getChildByName("phone").active = false; + fetch(pic) + .then(response => { + return response.headers.get('Content-Length'); + }) + .then(errNo => { + if(errNo == "5093"){ + this.phone.node.parent.getChildByName("icon").active = true; + this.Player.getChildByName("mask").getChildByName("icon").active = true; + } + }) + .catch(error => { + // console.error('Error fetching X-Info:', error); + }); + var self = this; + cc.assetManager.loadRemote(pic, {ext:'.png'},(err, texture:cc.Texture2D) => { + self.Player.opacity = 255; + if(texture){ + self.phone.node.active = true; + self.phone.spriteFrame = new cc.SpriteFrame(texture); + self.Player.getChildByName("mask").getChildByName("icon").active = false; + self.Player.getChildByName("mask").getChildByName("phone").active = true; + self.Player.getChildByName("mask").getChildByName("phone").getComponent(cc.Sprite) + .spriteFrame = new cc.SpriteFrame(texture); + setTimeout(() => { + self.playerAction(); + }, 500); + } + else{ + self.Player.getChildByName("mask").getChildByName("icon").active = true; + setTimeout(() => { + self.playerAction(); + }, 500); + } + + }) + } + +} diff --git a/assets/Script/RankManager.ts.meta b/assets/Script/RankManager.ts.meta new file mode 100644 index 0000000..fd3f5dc --- /dev/null +++ b/assets/Script/RankManager.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "e74a9f7d-2031-4e69-bcb2-9998174088b2", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module.meta b/assets/Script/module.meta new file mode 100644 index 0000000..d2f5dcc --- /dev/null +++ b/assets/Script/module.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "eaa8b84d-69d0-4170-9f7d-8179ea948cde", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Config.meta b/assets/Script/module/Config.meta new file mode 100644 index 0000000..c57cc9c --- /dev/null +++ b/assets/Script/module/Config.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "8848cd9b-8115-456d-a656-2abcda1dadbe", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts new file mode 100644 index 0000000..df668c3 --- /dev/null +++ b/assets/Script/module/Config/GameConfig.ts @@ -0,0 +1,2687 @@ +import { WeChat } from "../Share/share"; +import { GameTool } from "../Tool/GameTool"; + + +const { ccclass, property } = cc._decorator; +@ccclass('GameConfig') +export class GameConfig { + //所有控制信息都通过GameAppStart内控制 + private static _instance : GameConfig = null; + //用于盛放埋点数据上传,每次上传后清空 + static CLICK_DATA: { + type: number; //上传数据类型 + success: boolean; //此局游戏正确与否 + round: number; //回合数 + choice: number; //玩家选择,0:时间截止前未做选择,1,2,3:三个按钮从上到下依次对应 + rightChoice: number; //本轮的按正确答案,含义与choice相同 + item: string; //此关展示的物品 + roundType: number; //展示方式。1:图像 2:音频 + stepTime: number; //玩家每一关用时毫秒数 音频关卡从播放结束开始计时 + levelConfig: number; //使用的是哪一套关卡配置 + ignite: boolean; //玩家此轮有没有点火 + igniteCount: number; //玩家总计成功点火数 + }; + static GAME_DATA: any[]; + //关卡数据 + static LEVEL_INFO: { + custom: { + id: number; //植物ID + item: string; //植物名稱 + type: number; //種類1为头像2是音频 + flammable: number; //是否有柴火 + }[]; + }[]; + static GM_INFO: { + // isEnd: false, + mean_Time: number; //平均放箭速度 + total: number; //总共对的个数 + currSeed: number; //用于随机数种子 + gameId: string; //游戏ID + userId: number; //用户ID + scode: string, //用户code,从网页后缀获取 + guide: boolean; //是否有引导 + url: string; //访问域名 + success: boolean; //用户游戏成功与否 + matchId: any; //用于埋点上传的ID + custom: number; //用于测试跳关卡 + level: number; //具体游戏内进行到第几步 + stepTimeList: number; //整局游戏用时,由于涉及场景切换,数据需要保留 + successList: any[]; //整局胜负 + gameTime: number; //单次游戏倒计时时间 + igniteCount: number; //玩家总计成功点火数 + + }; + //游戏内信息 + + + + static get Instance() + { + if (this._instance == null) + { + this._instance = new GameConfig(); + } + return this._instance; + } + //getSeedRandom + static init(Authentication){ + this.CLICK_init(); + this.LEVEL_INFO_init(); + this.GM_INFO_init(); + var self = this; + cc.resources.load('Json/CLICK_DATA', (err: any, res: cc.JsonAsset) => { + if (err) { + return; + } + let jsonData: object = res.json!; + self.CLICK_DATA = jsonData["data"]; + }) + cc.resources.load('Json/LEVEL_INFO', (err: any, res: cc.JsonAsset) => { + if (err) { + return; + } + let jsonData: object = res.json!; + self.LEVEL_INFO = jsonData["data"]; + self.Change_Level(); + }) + cc.resources.load('Json/GM_INFO', (err: any, res: cc.JsonAsset) => { + if (err) { + if(!Authentication) self.Authentication(); + return; + } + + let jsonData: object = res.json!; + self.GM_INFO = jsonData["data"]; + self.setCode(self.getKey("scode")); + cc.fx.GameTool.getCustom(false); + if(!Authentication) self.Authentication(); + }) + + //GAME_DATA 废弃了,暂时不删除以防后面修改回 一整局传一次 + self.GAME_DATA = [ + ] + } + + //数据备用 + static GM_INFO_init() { + this.GM_INFO = { + // isEnd: false, + mean_Time: 0, //平均放箭速度 + total: 0, //总共对的个数 + currSeed: 200000, //用于随机数种子 + gameId: "100014", //游戏ID + userId: 200139, //用户ID + scode: "", //用户code,从网页后缀获取 + guide: true, //是否有引导 + url: "https://api.sparkus.cn",//访问域名 + success: false, //用户游戏成功与否 + matchId: null, //用于埋点上传的ID + custom: 0, //用于测试跳关卡 + level: 0, //具体游戏内进行到第几步 + stepTimeList:0, //整局游戏用时,由于涉及场景切换,数据需要保留 + successList:[], //整局胜负 + gameTime:8, + igniteCount: 0, //玩家总计成功点火数 + }; + this.setCode(this.getKey("scode")); + } + static GM_INFO_SET(key,value) { + + this.GM_INFO[key] = value; + } + static CLICK_init() { + this.CLICK_DATA = + { + type: 1, //上传数据类型 + success: false, //此局游戏正确与否 + round: 0, //回合数 + choice: 0, //玩家选择,0:时间截止前未做选择,1,2,3:三个按钮从上到下依次对应 + rightChoice: 0, //本轮的按正确答案,含义与choice相同 + item: "", //此关展示的物品 + roundType: 0, //展示方式。1:图像 2:音频 + stepTime: 0, //玩家每一关用时毫秒数 音频关卡从播放结束开始计时 + levelConfig: 0, //使用的是哪一套关卡配置 + ignite: false, //玩家此轮有没有点火 + igniteCount: 0, //玩家总计成功点火数 + } + } + + static CLICK_SET(key,value) { + this.CLICK_DATA[key] = value; + } + + static LEVEL_INFO_init() { + this.LEVEL_INFO = [ + { + "custom": [ + { + "id": 1000, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1001, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 1002, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1003, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1004, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1006, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1007, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1009, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1010, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1011, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1012, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1013, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 1014, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1015, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 1016, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1017, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 1018, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 1019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1020, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 1021, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1022, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1023, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 1026, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1027, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1028, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 1030, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1031, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1032, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 1033, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 1034, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1035, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 1036, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1037, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1038, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1039, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1040, + "item": "renshen", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 2000, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2001, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2002, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 2003, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2004, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 2005, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2006, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2007, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 2008, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2009, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 2010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2011, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2012, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2013, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 2015, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2016, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2017, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 2019, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2020, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2021, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 2022, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 2023, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 2025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2026, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2027, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2028, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2029, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2030, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2031, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 2032, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2033, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2034, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2035, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2036, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2037, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 2038, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2039, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2040, + "item": "zhuye", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 3000, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 3001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 3002, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 3003, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 3004, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3006, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3007, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 3009, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3010, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 3012, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3014, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3015, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 3016, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3017, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3018, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3019, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3021, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3022, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3023, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 3024, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 3025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 3026, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 3027, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3028, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 3029, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3030, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 3032, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3033, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3034, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3035, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3036, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 3037, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3040, + "item": "mudan", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 4000, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4001, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 4003, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 4005, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4006, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 4007, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4008, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 4009, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4010, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 4012, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 4013, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 4014, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4016, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 4017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 4018, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4019, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4020, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4021, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4022, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4024, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 4025, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 4026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4027, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 4028, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4029, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4030, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 4031, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 4032, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4033, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4034, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 4035, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 4036, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4037, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 4039, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 5000, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5001, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 5002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 5003, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5004, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 5005, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5006, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 5007, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 5008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5009, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 5010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5011, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5012, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 5013, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 5015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 5016, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5017, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5019, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5020, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5021, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5022, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 5023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5024, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 5025, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 5026, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5027, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 5029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5032, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 5033, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5034, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5035, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 5036, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5037, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 5038, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 5040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 6000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6001, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6002, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6003, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 6005, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6006, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 6007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6009, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6011, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 6012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 6013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 6014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 6019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 6021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6024, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6025, + "item": "jinjie", + "type": 2, + "flammable": 0 + }, + { + "id": 6026, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 6027, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6028, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6029, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 6030, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 6031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 6032, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6033, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6034, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6035, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 6036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 6037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 6038, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 6039, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 7000, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7003, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 7004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 7006, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7008, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7009, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7012, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 7014, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 7015, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 7016, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 7017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7018, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7019, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 7020, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 7022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 7023, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 7025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7027, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7028, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7029, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 7031, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 7032, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 7033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7034, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7035, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7037, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 7038, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 7039, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 8000, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 8001, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8003, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 8005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8006, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8007, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 8008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8009, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8010, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8011, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 8012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 8014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 8016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8020, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8021, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8022, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8023, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 8025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8026, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 8027, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8028, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 8030, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8031, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8032, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 8034, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8035, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8036, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 8037, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 8038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 8039, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8040, + "item": "gancao", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 9000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9001, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 9002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 9003, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9004, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9005, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 9006, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 9007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9008, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 9009, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9010, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9011, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9012, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9013, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9014, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9015, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9016, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 9017, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 9018, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 9019, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 9020, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 9021, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9022, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 9025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9026, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9027, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 9029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9030, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9031, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 9032, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9033, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9035, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 9036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9037, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 9038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9039, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 9040, + "item": "danggui", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 10000, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 10001, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10002, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10003, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10004, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10005, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10006, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 10007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10008, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 10009, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10010, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 10012, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10013, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 10014, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 10015, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 10016, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10018, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10020, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10021, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10022, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10023, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10025, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10026, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 10027, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10028, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10029, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 10031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10032, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10033, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10035, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 10036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 10038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10039, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10040, + "item": "gouqi", + "type": 2, + "flammable": 0 + } + ] + } + ] + + } + //根據简易版本修改关卡信息 + static Change_Level() { + for(let i=0; i { + const time = Math.floor((new Date().getTime()) / 1000) + const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data) + this.post(url,data,callback,0); + } + + static async uploadUserLogData(data,callback): Promise { + const url = '/log/collect/data'; + this.post(url,data,callback,3); + } + //暂时用不到 + static async getUserRecord(data,callback): Promise { + const time = Math.floor((new Date().getTime()) / 1000) + const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data) + this.post(url,data,callback,0); + } + + static async get(url, callback,count) { + let repeat = count?count:0; + const response = await this.fetchData(url, null, 'GET',repeat); + callback && callback(response); + } + + static async post(url, data, callback,count) { + let repeat = count?count:0; + const response = await this.fetchData(url, data, 'POST',repeat); + callback && callback(response); + } + + static async fetchData(url, data, method,repeat) { + const fullUrl = `${BASE_URL}${url}`; + const headers = { 'Content-Type': 'application/json' }; + const options = { + method, + headers, + body: data ? JSON.stringify(data) : null, + }; + + try { + var response = await this.fetchWithTimeout(fullUrl,options); + if (!response.ok) { + throw new Error(`HTTP_______________error! status: ${response.status}`); + } + return await response.json(); + } catch (error) { + console.error('Fetch_______________error:', error); + if(repeat > 0){ + repeat -= 1; + const timeOut = (3-repeat)*5000; + setTimeout(async () => { + response = await this.fetchData(url, data, method,repeat); + }, timeOut); + } + else{ + return null; + } + } + } + + static async fetchWithTimeout(resource, options = {}) { + const controller = new AbortController(); + const id = setTimeout(() => controller.abort(), 5000); + const response = await fetch(resource, { + ...options, + signal: controller.signal + }); + clearTimeout(id); + + return response; + } + + /** + * + * @param url {string} 接口地址 + * @param params {object} 需要加密的参数对象 + */ + static apiSign(url: string, params = {}) { + + let convertUrl = url.trim() + if (convertUrl.indexOf('?') === -1) { + convertUrl += '?' + } + + // 传入参数转换拼接字符串 + let postStr = getQueryString(params) + + const signedStr = genSignStr(convertUrl, postStr) + const encryptStr = `sign=${signedStr}` + + let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey) + encryptSignStr = encodeURIComponent(encryptSignStr) + + return `${urlencode(convertUrl)}&_p=${encryptSignStr}` + } +} + +function responseHandler(response: { data: any }) { + return response.data +} +// 响应拦截器 +// Rq.interceptors.response.use(responseHandler) +const config = { + gameId: "100014", + secretKey: "9ymg8ppY", + EK:"hui231%1" +}; + +interface CrypotoType { + encryptByDES: any + decryptByDES: any + hmacSha256: any +} + +class Crypoto implements CrypotoType { + // 加密的向明值,自己根据项目实际情况定,需要跟后端开发保持一致 + private keyHex = this.getHetKey() + private getHetKey() { + return CryptoJS.enc.Utf8.parse(config.EK); + } + + /** DES加密 */ + encryptByDES(message: string, secret?: string) { + if(!message) { + return message + } + const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex + const encrypted = CryptoJS.DES.encrypt(message, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }); + return encrypted.toString() + } + + /** DES解密 */ + decryptByDES(message: string, secret?: string) { + const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex + + const decrypted = CryptoJS.DES.decrypt({ + ciphertext: CryptoJS.enc.Base64.parse(message) + }, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }) + + return decrypted.toString(CryptoJS.enc.Utf8) + } + + /** hmacSHA256加密 */ + hmacSha256(message: string, secret?: string) { + const keyHex = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex + + const hash = CryptoJS.HmacSHA256(message, keyHex); + return hash.toString() + } + + /** hmacSHA256验证 */ + verifyHmacSha256(message: string, signature: string) { + const hash = CryptoJS.HmacSHA256(message, this.keyHex); + return hash.toString() === signature + } + + /** CBC加密 */ + encryptCBC(word: string) { + if (!word) { + return word; + } + const srcs = CryptoJS.enc.Utf8.parse(word); + const encrypted = CryptoJS.AES.encrypt(srcs, this.keyHex, { + iv: this.keyHex, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.ZeroPadding + }); + return encrypted.toString(); + } + + /** CBC解密 */ + decryptCBC(word: string) { + if (!word) { + return word; + } + const encryptedHexStr = CryptoJS.enc.Hex.parse(word); + const srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr); + const decrypt = CryptoJS.AES.decrypt(srcs, this.keyHex, { + iv: this.keyHex, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.ZeroPadding + }); + const decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); + return decryptedStr.toString(); + } +} +const fxCry = new Crypoto(); + +function isEmpty(data) { + return data === "" || data === null || data === undefined || data.length === 0 || JSON.stringify(data) == "{}" +} + +function getQueryString(obj) { + // 首先对对象的键进行排序并过滤空值 + const sortedKeys = Object.keys(obj).sort(); + const sortedObj = {}; + for (let i = 0; i < sortedKeys.length; i++) { + if (isEmpty(obj[sortedKeys[i]])) { + continue; + } + sortedObj[sortedKeys[i]] = obj[sortedKeys[i]]; + } + + // 然后将排序后的对象转换为查询字符串 + const params = []; + for (const key in sortedObj) { + params.push(`${encodeURIComponent(key)}=${encodeURIComponent(sortedObj[key])}`); + } + return params.join('&'); +} + + +/** + * 组装签名字符串 + * @param string url: 请求地址 + * @param string postStr: post参数的a=1&b=2 + * @returns + */ + +function genSignStr(url: string, postStr: string): string { + let lessUrl = url.replace('?', '') + lessUrl = lessUrl + "&" + postStr + return encodeURIComponent(fxCry.hmacSha256(lessUrl)) +} +// 对参数进行统一urlencode +function urlencode(url: string): string { + const [baseUrl, queryString] = url.split("?", 2); + const params = new URLSearchParams(queryString); + return `${baseUrl}?${params.toString()}`; +} + + + diff --git a/assets/Script/module/Crypto/HttpUtil.ts.meta b/assets/Script/module/Crypto/HttpUtil.ts.meta new file mode 100644 index 0000000..878e61f --- /dev/null +++ b/assets/Script/module/Crypto/HttpUtil.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "771a3d9a-4013-4654-a777-fbaea0c93280", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Crypto/crypto-js.min.js b/assets/Script/module/Crypto/crypto-js.min.js new file mode 100644 index 0000000..cfbb59e --- /dev/null +++ b/assets/Script/module/Crypto/crypto-js.min.js @@ -0,0 +1,3 @@ +!function(t,r){"object"==typeof exports?module.exports=exports=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,r){var e=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),i={},n=i.lib={},o=n.Base=function(){return{extend:function(t){var r=e(this);return t&&r.mixIn(t),r.hasOwnProperty("init")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],e!=r?this.sigBytes=e:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var r=this.words,e=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;r[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var o=0;o>>2]=e[o>>>2];return this.sigBytes+=n,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(r){for(var e,i=[],n=function(r){var r=r,e=987654321,i=4294967295;return function(){e=36969*(65535&e)+(e>>16)&i,r=18e3*(65535&r)+(r>>16)&i;var n=(e<<16)+r&i;return n/=4294967296,n+=.5,n*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(e,r/2)}},h=a.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(e,r)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e=this._data,i=e.words,n=e.sigBytes,o=this.blockSize,a=4*o,c=n/a;c=r?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var h=c*o,l=t.min(4*h,n);if(h){for(var f=0;f>>6-s%4*2;i[o>>>2]|=(a|c)<<24-o%4*8,o++}return n.create(i,o)}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255,a=r[o+1>>>2]>>>24-(o+1)%4*8&255,c=r[o+2>>>2]>>>24-(o+2)%4*8&255,h=s<<16|a<<8|c,l=0;l<4&&o+.75*l>>6*(3-l)&63));var f=i.charAt(64);if(f)for(;n.length%4;)n.push(f);return n.join("")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>32-o)+r}function i(t,r,e,i,n,o,s){var a=t+(r&i|e&~i)+n+s;return(a<>>32-o)+r}function n(t,r,e,i,n,o,s){var a=t+(r^e^i)+n+s;return(a<>>32-o)+r}function o(t,r,e,i,n,o,s){var a=t+(e^(r|~i))+n+s;return(a<>>32-o)+r}var s=t,a=s.lib,c=a.WordArray,h=a.Hasher,l=s.algo,f=[];!function(){for(var t=0;t<64;t++)f[t]=4294967296*r.abs(r.sin(t+1))|0}();var u=l.MD5=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var s=0;s<16;s++){var a=r+s,c=t[a];t[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h=this._hash.words,l=t[r+0],u=t[r+1],d=t[r+2],v=t[r+3],p=t[r+4],_=t[r+5],y=t[r+6],g=t[r+7],B=t[r+8],w=t[r+9],k=t[r+10],S=t[r+11],m=t[r+12],x=t[r+13],b=t[r+14],H=t[r+15],z=h[0],A=h[1],C=h[2],D=h[3];z=e(z,A,C,D,l,7,f[0]),D=e(D,z,A,C,u,12,f[1]),C=e(C,D,z,A,d,17,f[2]),A=e(A,C,D,z,v,22,f[3]),z=e(z,A,C,D,p,7,f[4]),D=e(D,z,A,C,_,12,f[5]),C=e(C,D,z,A,y,17,f[6]),A=e(A,C,D,z,g,22,f[7]),z=e(z,A,C,D,B,7,f[8]),D=e(D,z,A,C,w,12,f[9]),C=e(C,D,z,A,k,17,f[10]),A=e(A,C,D,z,S,22,f[11]),z=e(z,A,C,D,m,7,f[12]),D=e(D,z,A,C,x,12,f[13]),C=e(C,D,z,A,b,17,f[14]),A=e(A,C,D,z,H,22,f[15]),z=i(z,A,C,D,u,5,f[16]),D=i(D,z,A,C,y,9,f[17]),C=i(C,D,z,A,S,14,f[18]),A=i(A,C,D,z,l,20,f[19]),z=i(z,A,C,D,_,5,f[20]),D=i(D,z,A,C,k,9,f[21]),C=i(C,D,z,A,H,14,f[22]),A=i(A,C,D,z,p,20,f[23]),z=i(z,A,C,D,w,5,f[24]),D=i(D,z,A,C,b,9,f[25]),C=i(C,D,z,A,v,14,f[26]),A=i(A,C,D,z,B,20,f[27]),z=i(z,A,C,D,x,5,f[28]),D=i(D,z,A,C,d,9,f[29]),C=i(C,D,z,A,g,14,f[30]),A=i(A,C,D,z,m,20,f[31]),z=n(z,A,C,D,_,4,f[32]),D=n(D,z,A,C,B,11,f[33]),C=n(C,D,z,A,S,16,f[34]),A=n(A,C,D,z,b,23,f[35]),z=n(z,A,C,D,u,4,f[36]),D=n(D,z,A,C,p,11,f[37]),C=n(C,D,z,A,g,16,f[38]),A=n(A,C,D,z,k,23,f[39]),z=n(z,A,C,D,x,4,f[40]),D=n(D,z,A,C,l,11,f[41]),C=n(C,D,z,A,v,16,f[42]),A=n(A,C,D,z,y,23,f[43]),z=n(z,A,C,D,w,4,f[44]),D=n(D,z,A,C,m,11,f[45]),C=n(C,D,z,A,H,16,f[46]),A=n(A,C,D,z,d,23,f[47]),z=o(z,A,C,D,l,6,f[48]),D=o(D,z,A,C,g,10,f[49]),C=o(C,D,z,A,b,15,f[50]),A=o(A,C,D,z,_,21,f[51]),z=o(z,A,C,D,m,6,f[52]),D=o(D,z,A,C,v,10,f[53]),C=o(C,D,z,A,k,15,f[54]),A=o(A,C,D,z,u,21,f[55]),z=o(z,A,C,D,B,6,f[56]),D=o(D,z,A,C,H,10,f[57]),C=o(C,D,z,A,y,15,f[58]),A=o(A,C,D,z,x,21,f[59]),z=o(z,A,C,D,p,6,f[60]),D=o(D,z,A,C,S,10,f[61]),C=o(C,D,z,A,d,15,f[62]),A=o(A,C,D,z,w,21,f[63]),h[0]=h[0]+z|0,h[1]=h[1]+A|0,h[2]=h[2]+C|0,h[3]=h[3]+D|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32;var o=r.floor(i/4294967296),s=i;e[(n+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[(n+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=h.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=h._createHelper(u),s.HmacMD5=h._createHmacHelper(u)}(Math),function(){var r=t,e=r.lib,i=e.WordArray,n=e.Hasher,o=r.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],a=e[3],c=e[4],h=0;h<80;h++){if(h<16)s[h]=0|t[r+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?(n&o|~n&a)+1518500249:h<40?(n^o^a)+1859775393:h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+a|0,e[4]=e[4]+c|0},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=Math.floor(e/4294967296),r[(i+64>>>9<<4)+15]=e,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA1=n._createHelper(a),r.HmacSHA1=n._createHmacHelper(a)}(),function(r){var e=t,i=e.lib,n=i.WordArray,o=i.Hasher,s=e.algo,a=[],c=[];!function(){function t(t){for(var e=r.sqrt(t),i=2;i<=e;i++)if(!(t%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=e(r.pow(i,.5))),c[n]=e(r.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],l=e[5],f=e[6],u=e[7],d=0;d<64;d++){if(d<16)h[d]=0|t[r+d];else{var v=h[d-15],p=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=h[d-2],y=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[d]=p+h[d-7]+y+h[d-16]}var g=a&l^~a&f,B=i&n^i&o^n&o,w=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),k=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),S=u+k+g+c[d]+h[d],m=w+B;u=f,f=l,l=a,a=s+S|0,s=o,o=n,n=i,i=S+m|0}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+u|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=r.floor(i/4294967296),e[(n+64>>>9<<4)+15]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){function r(t){return t<<8&4278255360|t>>>8&16711935}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Utf16=o.Utf16BE={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var r=t.length,e=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(e,2*r)}};o.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join("")},parse:function(t){for(var e=t.length,i=[],o=0;o>>1]|=r(t.charCodeAt(o)<<16-o%2*16);return n.create(i,2*e)}}}(),function(){if("function"==typeof ArrayBuffer){var r=t,e=r.lib,i=e.WordArray,n=i.init,o=i.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,e=[],i=0;i>>2]|=t[i]<<24-i%4*8;n.call(this,e,r)}else n.apply(this,arguments)};o.prototype=i}}(),function(r){function e(t,r,e){return t^r^e}function i(t,r,e){return t&r|~t&e}function n(t,r,e){return(t|~r)^e}function o(t,r,e){return t&e|r&~e}function s(t,r,e){return t^(r|~e)}function a(t,r){return t<>>32-r}var c=t,h=c.lib,l=h.WordArray,f=h.Hasher,u=c.algo,d=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=u.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var c=0;c<16;c++){var h=r+c,l=t[h];t[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var f,u,B,w,k,S,m,x,b,H,z=this._hash.words,A=y.words,C=g.words,D=d.words,R=v.words,E=p.words,M=_.words;S=f=z[0],m=u=z[1],x=B=z[2],b=w=z[3],H=k=z[4];for(var F,c=0;c<80;c+=1)F=f+t[r+D[c]]|0,F+=c<16?e(u,B,w)+A[0]:c<32?i(u,B,w)+A[1]:c<48?n(u,B,w)+A[2]:c<64?o(u,B,w)+A[3]:s(u,B,w)+A[4],F|=0,F=a(F,E[c]),F=F+k|0,f=k,k=w,w=a(B,10),B=u,u=F,F=S+t[r+R[c]]|0,F+=c<16?s(m,x,b)+C[0]:c<32?o(m,x,b)+C[1]:c<48?n(m,x,b)+C[2]:c<64?i(m,x,b)+C[3]:e(m,x,b)+C[4],F|=0,F=a(F,M[c]),F=F+H|0,S=H,H=b,b=a(x,10),x=m,m=F;F=z[1]+B+b|0,z[1]=z[2]+w+H|0,z[2]=z[3]+k+S|0,z[3]=z[4]+f+m|0,z[4]=z[0]+u+x|0,z[0]=F},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t.sigBytes=4*(r.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=f._createHelper(B),c.HmacRIPEMD160=f._createHmacHelper(B)}(Math),function(){var r=t,e=r.lib,i=e.Base,n=r.enc,o=n.Utf8,s=r.algo;s.HMAC=i.extend({init:function(t,r){t=this._hasher=new t.init,"string"==typeof r&&(r=o.parse(r));var e=t.blockSize,i=4*e;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var n=this._oKey=r.clone(),s=this._iKey=r.clone(),a=n.words,c=s.words,h=0;h>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=e[n];a.high^=s,a.low^=o}for(var c=0;c<24;c++){for(var d=0;d<5;d++){for(var v=0,p=0,_=0;_<5;_++){var a=e[d+5*_];v^=a.high,p^=a.low}var y=u[d];y.high=v,y.low=p}for(var d=0;d<5;d++)for(var g=u[(d+4)%5],B=u[(d+1)%5],w=B.high,k=B.low,v=g.high^(w<<1|k>>>31),p=g.low^(k<<1|w>>>31),_=0;_<5;_++){var a=e[d+5*_];a.high^=v,a.low^=p}for(var S=1;S<25;S++){var a=e[S],m=a.high,x=a.low,b=h[S];if(b<32)var v=m<>>32-b,p=x<>>32-b;else var v=x<>>64-b,p=m<>>64-b;var H=u[l[S]];H.high=v,H.low=p}var z=u[0],A=e[0];z.high=A.high,z.low=A.low;for(var d=0;d<5;d++)for(var _=0;_<5;_++){var S=d+5*_,a=e[S],C=u[S],D=u[(d+1)%5+5*_],R=u[(d+2)%5+5*_];a.high=C.high^~D.high&R.high,a.low=C.low^~D.low&R.low}var a=e[0],E=f[c];a.high^=E.high,a.low^=E.low}},_doFinalize:function(){var t=this._data,e=t.words,i=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,h=[],l=0;l>>24)|4278255360&(u<<24|u>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h.push(d),h.push(u)}return new n.init(h,a)},clone:function(){for(var t=o.clone.call(this),r=t._state=this._state.slice(0),e=0;e<25;e++)r[e]=r[e].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),function(){function r(){return s.create.apply(s,arguments)}var e=t,i=e.lib,n=i.Hasher,o=e.x64,s=o.Word,a=o.WordArray,c=e.algo,h=[r(1116352408,3609767458),r(1899447441,602891725),r(3049323471,3964484399),r(3921009573,2173295548),r(961987163,4081628472),r(1508970993,3053834265),r(2453635748,2937671579),r(2870763221,3664609560),r(3624381080,2734883394),r(310598401,1164996542),r(607225278,1323610764),r(1426881987,3590304994),r(1925078388,4068182383),r(2162078206,991336113),r(2614888103,633803317),r(3248222580,3479774868),r(3835390401,2666613458),r(4022224774,944711139),r(264347078,2341262773),r(604807628,2007800933),r(770255983,1495990901),r(1249150122,1856431235),r(1555081692,3175218132),r(1996064986,2198950837),r(2554220882,3999719339),r(2821834349,766784016),r(2952996808,2566594879),r(3210313671,3203337956),r(3336571891,1034457026),r(3584528711,2466948901),r(113926993,3758326383),r(338241895,168717936),r(666307205,1188179964),r(773529912,1546045734),r(1294757372,1522805485),r(1396182291,2643833823),r(1695183700,2343527390),r(1986661051,1014477480),r(2177026350,1206759142),r(2456956037,344077627),r(2730485921,1290863460),r(2820302411,3158454273),r(3259730800,3505952657),r(3345764771,106217008),r(3516065817,3606008344),r(3600352804,1432725776),r(4094571909,1467031594),r(275423344,851169720),r(430227734,3100823752),r(506948616,1363258195),r(659060556,3750685593),r(883997877,3785050280),r(958139571,3318307427),r(1322822218,3812723403),r(1537002063,2003034995),r(1747873779,3602036899),r(1955562222,1575990012),r(2024104815,1125592928),r(2227730452,2716904306),r(2361852424,442776044),r(2428436474,593698344),r(2756734187,3733110249),r(3204031479,2999351573),r(3329325298,3815920427),r(3391569614,3928383900),r(3515267271,566280711),r(3940187606,3454069534),r(4118630271,4000239992),r(116418474,1914138554),r(174292421,2731055270),r(289380356,3203993006),r(460393269,320620315),r(685471733,587496836),r(852142971,1086792851),r(1017036298,365543100),r(1126000580,2618297676),r(1288033470,3409855158),r(1501505948,4234509866),r(1607167915,987167468),r(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=r()}();var f=c.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],c=e[5],f=e[6],u=e[7],d=i.high,v=i.low,p=n.high,_=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=a.high,S=a.low,m=c.high,x=c.low,b=f.high,H=f.low,z=u.high,A=u.low,C=d,D=v,R=p,E=_,M=y,F=g,P=B,W=w,O=k,U=S,I=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var Z=l[T];if(T<16)var q=Z.high=0|t[r+2*T],G=Z.low=0|t[r+2*T+1];else{var J=l[T-15],$=J.high,Q=J.low,V=($>>>1|Q<<31)^($>>>8|Q<<24)^$>>>7,Y=(Q>>>1|$<<31)^(Q>>>8|$<<24)^(Q>>>7|$<<25),tt=l[T-2],rt=tt.high,et=tt.low,it=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),ot=l[T-7],st=ot.high,at=ot.low,ct=l[T-16],ht=ct.high,lt=ct.low,G=Y+at,q=V+st+(G>>>0>>0?1:0),G=G+nt,q=q+it+(G>>>0>>0?1:0),G=G+lt,q=q+ht+(G>>>0>>0?1:0);Z.high=q,Z.low=G}var ft=O&I^~O&X,ut=U&K^~U&L,dt=C&R^C&M^R&M,vt=D&E^D&F^E&F,pt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),_t=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),yt=(O>>>14|U<<18)^(O>>>18|U<<14)^(O<<23|U>>>9),gt=(U>>>14|O<<18)^(U>>>18|O<<14)^(U<<23|O>>>9),Bt=h[T],wt=Bt.high,kt=Bt.low,St=N+gt,mt=j+yt+(St>>>0>>0?1:0),St=St+ut,mt=mt+ft+(St>>>0>>0?1:0),St=St+kt,mt=mt+wt+(St>>>0>>0?1:0),St=St+G,mt=mt+q+(St>>>0>>0?1:0),xt=_t+vt,bt=pt+dt+(xt>>>0<_t>>>0?1:0);j=X,N=L,X=I,L=K,I=O,K=U,U=W+St|0,O=P+mt+(U>>>0>>0?1:0)|0,P=M,W=F,M=R,F=E,R=C,E=D,D=St+xt|0,C=mt+bt+(D>>>0>>0?1:0)|0}v=i.low=v+D,i.high=d+C+(v>>>0>>0?1:0),_=n.low=_+E,n.high=p+R+(_>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=a.low=S+U,a.high=k+O+(S>>>0>>0?1:0),x=c.low=x+K,c.high=m+I+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=u.low=A+N,u.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+128>>>10<<5)+30]=Math.floor(e/4294967296),r[(i+128>>>10<<5)+31]=e,t.sigBytes=4*r.length,this._process();var n=this._hash.toX32();return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(f),e.HmacSHA512=n._createHmacHelper(f)}(),function(){var r=t,e=r.x64,i=e.Word,n=e.WordArray,o=r.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}});r.SHA384=s._createHelper(a),r.HmacSHA384=s._createHmacHelper(a)}(),t.lib.Cipher||function(r){var e=t,i=e.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=e.enc,c=(a.Utf8,a.Base64),h=e.algo,l=h.EvpKDF,f=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(t,r){return this.create(this._ENC_XFORM_MODE,t,r)},createDecryptor:function(t,r){return this.create(this._DEC_XFORM_MODE,t,r)},init:function(t,r,e){this.cfg=this.cfg.extend(e),this._xformMode=t,this._key=r,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var r=this._doFinalize();return r},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?m:w}return function(r){return{encrypt:function(e,i,n){return t(i).encrypt(r,e,i,n)},decrypt:function(e,i,n){return t(i).decrypt(r,e,i,n)}}}}()}),u=(i.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=i.BlockCipherMode=n.extend({createEncryptor:function(t,r){return this.Encryptor.create(t,r)},createDecryptor:function(t,r){return this.Decryptor.create(t,r)},init:function(t,r){this._cipher=t,this._iv=r}}),v=u.CBC=function(){function t(t,e,i){var n=this._iv;if(n){var o=n;this._iv=r}else var o=this._prevBlock;for(var s=0;s>>2];t.sigBytes-=r}},y=(i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:v,padding:_}),reset:function(){f.reset.call(this);var t=this.cfg,r=t.iv,e=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=e.createEncryptor;else{var i=e.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,r&&r.words):(this._mode=i.call(e,this,r&&r.words),this._mode.__creator=i)},_doProcessBlock:function(t,r){this._mode.processBlock(t,r)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var r=this._process(!0)}else{var r=this._process(!0);t.unpad(r)}return r},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=e.format={},B=g.OpenSSL={stringify:function(t){var r=t.ciphertext,e=t.salt;if(e)var i=o.create([1398893684,1701076831]).concat(e).concat(r);else var i=r;return i.toString(c)},parse:function(t){var r=c.parse(t),e=r.words;if(1398893684==e[0]&&1701076831==e[1]){var i=o.create(e.slice(2,4));e.splice(0,4),r.sigBytes-=16}return y.create({ciphertext:r,salt:i})}},w=i.SerializableCipher=n.extend({cfg:n.extend({format:B}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=t.createEncryptor(e,i),o=n.finalize(r),s=n.cfg;return y.create({ciphertext:o,key:e,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=t.createDecryptor(e,i).finalize(r.ciphertext);return n},_parse:function(t,r){return"string"==typeof t?r.parse(t,this):t}}),k=e.kdf={},S=k.OpenSSL={execute:function(t,r,e,i){i||(i=o.random(8));var n=l.create({keySize:r+e}).compute(t,i),s=o.create(n.words.slice(r),4*e);return n.sigBytes=4*r,y.create({key:n,iv:s,salt:i})}},m=i.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=i.kdf.execute(e,t.keySize,t.ivSize);i.iv=n.iv;var o=w.encrypt.call(this,t,r,n.key,i);return o.mixIn(n),o},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=i.kdf.execute(e,t.keySize,t.ivSize,r.salt);i.iv=n.iv;var o=w.decrypt.call(this,t,r,n.key,i);return o}})}(),t.mode.CFB=function(){function r(t,r,e,i){var n=this._iv;if(n){var o=n.slice(0);this._iv=void 0}else var o=this._prevBlock;i.encryptBlock(o,0);for(var s=0;s>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso10126={pad:function(r,e){var i=4*e,n=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso97971={pad:function(r,e){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,e)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),e.encryptBlock(o,0);for(var s=0;s>>8^255&n^99,o[e]=n,s[n]=e;var p=t[e],_=t[p],y=t[_],g=257*t[n]^16843008*n;a[e]=g<<24|g>>>8,c[e]=g<<16|g>>>16,h[e]=g<<8|g>>>24,l[e]=g;var g=16843009*y^65537*_^257*p^16843008*e;f[n]=g<<24|g>>>8,u[n]=g<<16|g>>>16,d[n]=g<<8|g>>>24,v[n]=g,e?(e=p^t[t[t[y^p]]],i^=t[t[i]]):e=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,r=t.words,e=t.sigBytes/4,i=this._nRounds=e+6,n=4*(i+1),s=this._keySchedule=[],a=0;a6&&a%e==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=c<<8|c>>>24,c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=p[a/e|0]<<24),s[a]=s[a-e]^c}for(var h=this._invKeySchedule=[],l=0;l>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^v[o[255&c]]}}},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._keySchedule,a,c,h,l,o)},decryptBlock:function(t,r){var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e,this._doCryptBlock(t,r,this._invKeySchedule,f,u,d,v,s);var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e},_doCryptBlock:function(t,r,e,i,n,o,s,a){for(var c=this._nRounds,h=t[r]^e[0],l=t[r+1]^e[1],f=t[r+2]^e[2],u=t[r+3]^e[3],d=4,v=1;v>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^e[d++],_=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^e[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^e[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^e[d++];h=p,l=_,f=y,u=g}var p=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^e[d++],_=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^e[d++],y=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^e[d++],g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^e[d++];t[r]=p,t[r+1]=_,t[r+2]=y,t[r+3]=g},keySize:8});r.AES=i._createHelper(_)}(),function(){function r(t,r){var e=(this._lBlock>>>t^this._rBlock)&r;this._rBlock^=e,this._lBlock^=e<>>t^this._lBlock)&r;this._lBlock^=e,this._rBlock^=e<>>5]>>>31-n%32&1}for(var o=this._subKeys=[],s=0;s<16;s++){for(var a=o[s]=[],f=l[s],i=0;i<24;i++)a[i/6|0]|=e[(h[i]-1+f)%28]<<31-i%6,a[4+(i/6|0)]|=e[28+(h[i+24]-1+f)%28]<<31-i%6;a[0]=a[0]<<1|a[0]>>>31;for(var i=1;i<7;i++)a[i]=a[i]>>>4*(i-1)+3;a[7]=a[7]<<5|a[7]>>>27}for(var u=this._invSubKeys=[],i=0;i<16;i++)u[i]=o[15-i]},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._subKeys)},decryptBlock:function(t,r){this._doCryptBlock(t,r,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],r.call(this,4,252645135),r.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),r.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=n[o],a=this._lBlock,c=this._rBlock,h=0,l=0;l<8;l++)h|=f[l][((c^s[l])&u[l])>>>0];this._lBlock=c,this._rBlock=a^h}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,r.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});i.DES=s._createHelper(d);var v=a.TripleDES=s.extend({_doReset:function(){var t=this._key,r=t.words;this._des1=d.createEncryptor(o.create(r.slice(0,2))),this._des2=d.createEncryptor(o.create(r.slice(2,4))),this._des3=d.createEncryptor(o.create(r.slice(4,6)))},encryptBlock:function(t,r){this._des1.encryptBlock(t,r),this._des2.decryptBlock(t,r),this._des3.encryptBlock(t,r)},decryptBlock:function(t,r){this._des3.decryptBlock(t,r),this._des2.encryptBlock(t,r),this._des1.decryptBlock(t,r)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=s._createHelper(v)}(),function(){function r(){for(var t=this._S,r=this._i,e=this._j,i=0,n=0;n<4;n++){r=(r+1)%256,e=(e+t[r])%256;var o=t[r];t[r]=t[e],t[e]=o,i|=t[(t[r]+t[e])%256]<<24-8*n}return this._i=r,this._j=e,i}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:function(){for(var t=this._key,r=t.words,e=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;for(var n=0,o=0;n<256;n++){var s=n%e,a=r[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var c=i[n];i[n]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=r.call(this)},keySize:8,ivSize:0});e.RC4=n._createHelper(s);var a=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)r.call(this)}});e.RC4Drop=n._createHelper(a)}(),t.mode.CTRGladman=function(){function r(t){if(255===(t>>24&255)){var r=t>>16&255,e=t>>8&255,i=255&t;255===r?(r=0,255===e?(e=0,255===i?i=0:++i):++e):++r,t=0,t+=r<<16,t+=e<<8,t+=i}else t+=1<<24;return t}function e(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var i=t.lib.BlockCipherMode.extend(),n=i.Encryptor=i.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),e(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)r.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;o[0]^=h,o[1]^=f,o[2]^=l,o[3]^=u,o[4]^=h,o[5]^=f,o[6]^=l,o[7]^=u;for(var i=0;i<4;i++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.Rabbit=n._createHelper(h)}(),t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);e.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.RabbitLegacy=n.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var o=0;o<4;o++)r.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(var o=0;o<4;o++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.RabbitLegacy=n._createHelper(h)}(),t.pad.ZeroPadding={pad:function(t,r){var e=4*r;t.clamp(),t.sigBytes+=e-(t.sigBytes%e||e)},unpad:function(t){for(var r=t.words,e=t.sigBytes-1;!(r[e>>>2]>>>24-e%4*8&255);)e--;t.sigBytes=e+1}},t}); +//# sourceMappingURL=crypto-js.min.js.map \ No newline at end of file diff --git a/assets/Script/module/Crypto/crypto-js.min.js.meta b/assets/Script/module/Crypto/crypto-js.min.js.meta new file mode 100644 index 0000000..029408f --- /dev/null +++ b/assets/Script/module/Crypto/crypto-js.min.js.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "e64e1a97-c93f-4257-ab34-80341d8ff79d", + "importer": "javascript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/GameStart.meta b/assets/Script/module/GameStart.meta new file mode 100644 index 0000000..f45a5e7 --- /dev/null +++ b/assets/Script/module/GameStart.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "b4e113c6-a987-4133-bfa0-3355d8ab4bd1", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/GameStart/GameAppStart.ts b/assets/Script/module/GameStart/GameAppStart.ts new file mode 100644 index 0000000..807911a --- /dev/null +++ b/assets/Script/module/GameStart/GameAppStart.ts @@ -0,0 +1,119 @@ +import { GameConfig } from "../Config/GameConfig"; +import HttpUtil from "../Crypto/HttpUtil"; +import AudioManager from "../Music/AudioManager"; +import { Notifications } from "../Notification/Notification"; +import { StorageMessage } from "../Storage/Storage"; +import { GameTool } from "../Tool/GameTool"; + + +window.initMgr = function() { + if(cc.fx) + { + return; + } + cc.fx = {}; + console.log("1初始化"); + + //基础状态信息 + cc.fx.StateInfo = { + debugMode: true, + networkConnected: true, //网络状态 + networkType: 'none', //网络类型 + isOnForeground: true //当前是否是在前台 + }; + + //应用系统信息 + //配置文件 + + cc.fx.GameConfig = GameConfig; + cc.fx.HttpUtil = HttpUtil; + cc.fx.GameTool = GameTool; + cc.fx.AudioManager = AudioManager; + cc.fx.Notifications = Notifications; + cc.fx.StorageMessage = StorageMessage; + + cc.fx.ShareInfo = { + queryId : -1 //分享id + }; + + /* + * 客户端埋点分享类型 + */ + cc.fx.BurialShareType = { + Default : "default", //默认分享类型,分享到群 + Invite : "invite", // 邀请好友 + + DailyInviteRoomJoin:'invite_join_room', //邀请好友加入 + DailyInviteFriend : 'invite_friend', // 日常邀请好友 + DailyInviteGroup : 'invate_group', // 日常分享群 + DailyInviteGroupAlive: 'invate_alive', //日常分享群复活 + DailyInviteGroupReward: 'invate_rewared',//分享奖励翻倍 + DailyInviteGroupBox: 'invate_box', //宝箱分享奖励 + DailyInviteGroupBall: 'invate_ball', //分享领取球球 + + MatchResult : 'matchResult', // 比赛结算分享 + MatchFix5: 'MatchFix5', // 5元红包赛 + MatchFix20: 'MatchFix20', // 20元红包赛 + MatchFix100: 'MatchFix100', // 100元红包赛 + MatchFix500: 'MatchFix500', // 500元红包赛 + NewerRedEnvelope: 'newerRedEnvelope', // 新手红包 + CoinRoomResult: 'coinRoomResult', // 金币桌结算 + HighRate : "highRate",//高倍分享 + CoinRoomWinStreak: 'coinRoomWinStreak', // 连胜 + CoinRoomBankruptcy1: 'coinRoomBankruptcy1', // 金币桌破产 + CoinRoomBankruptcy2: 'coinRoomBankruptcy2', // 金币桌破产 + CoinRoomBankruptcy3: 'coinRoomBankruptcy3', // 金币桌破产 + }; + + /* + * 分享到哪儿给奖励 group frined all + */ + cc.fx.ShareWhereReward = { + Group :"group", //微信群 + Friend : "friend",//好友 + All : "all", //不区分 + }; + + //用于存储消息的ID + cc.fx.storageType = cc.Enum({ + storageTypeCustom: 1000101, //用于存储关卡等级 + }); + + //用于存储提示语 按照步骤提示 + cc.fx.tipType = cc.Enum({ + tipOne: '神农氏回到家中,开始整理今天收集来的物品。当拿出或说出一种植物时,请告诉他这是新植物还是已经出现过的植物。', + tipTwo: '', //用于存储关卡等级 + tipErrNew: '这是这局游戏第一次出现{植物}', + tipErrOld: '{植物}刚才出现过呢', + tipErrHear: '上次遇到{植物}时,似乎不是听到的吧', + tipErrSee: '上次遇到{植物}时,似乎不是看到的吧', + tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢', + + }); + //暂时不用 + // cc.fx.clickStatEventType = { + // clickStatEventTypeVideoAD : 20173201,//视频播放完成 + // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成 + // clickStatEventTypeBannerAD : 20173203,//banner播放为完成 + // clickStatEventTypeUserFrom : 99990001,//用户来源 + // clickStatEventTypeShare : 99990002,//用户分享 + // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon + // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预 + // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息 + // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示 + // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮 + // clickStatEventTypeWxLoginStart : 10001,//微信登录开始 + // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功 + // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败 + // clickStatEventTypeAuthorizationStart : 10003,//授权开始 + // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功 + // clickStatEventTypeAuthorizationFailed : 10005,//授权失败 + // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始 + // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功 + // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败 + // clickStatEventTypeTCP_Start : 10009,//TCP连接开始 + // clickStatEventTypeTCP_Success : 10010,//TCP连接成功 + // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败 + // }; + +}; \ No newline at end of file diff --git a/assets/Script/module/GameStart/GameAppStart.ts.meta b/assets/Script/module/GameStart/GameAppStart.ts.meta new file mode 100644 index 0000000..e226d6e --- /dev/null +++ b/assets/Script/module/GameStart/GameAppStart.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "61d4c718-db3b-4b31-8221-f16bea3cf030", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Music.meta b/assets/Script/module/Music.meta new file mode 100644 index 0000000..85d3a58 --- /dev/null +++ b/assets/Script/module/Music.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "0487cacb-b94a-4ab6-a301-b6402ab0ac5d", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Music/AudioManager.ts b/assets/Script/module/Music/AudioManager.ts new file mode 100644 index 0000000..2a88df0 --- /dev/null +++ b/assets/Script/module/Music/AudioManager.ts @@ -0,0 +1,301 @@ + + +const {ccclass, property} = cc._decorator; +@ccclass +export default class AudioManager extends cc.Component { + static _instance: any; + //背景音乐 + @property(cc.AudioClip) + audioGameBgm0: cc.AudioClip = null; + + @property(cc.AudioClip) + baishao_audio: cc.AudioClip = null; + @property(cc.AudioClip) + cha_audio: cc.AudioClip = null; + @property(cc.AudioClip) + chixiaodou_audio: cc.AudioClip = null; + @property(cc.AudioClip) + danggui_audio: cc.AudioClip = null; + @property(cc.AudioClip) + danshen_audio: cc.AudioClip = null; + @property(cc.AudioClip) + dazao_audio: cc.AudioClip = null; + @property(cc.AudioClip) + gancao_audio: cc.AudioClip = null; + @property(cc.AudioClip) + ganjiang_audio: cc.AudioClip = null; + @property(cc.AudioClip) + gouqi_audio: cc.AudioClip = null; + @property(cc.AudioClip) + jingjie_audio: cc.AudioClip = null; + @property(cc.AudioClip) + jinju_audio: cc.AudioClip = null; + @property(cc.AudioClip) + lizhi_audio: cc.AudioClip = null; + @property(cc.AudioClip) + lizi_audio: cc.AudioClip = null; + @property(cc.AudioClip) + longyan_audio: cc.AudioClip = null; + @property(cc.AudioClip) + moli_audio: cc.AudioClip = null; + @property(cc.AudioClip) + muchai_audio: cc.AudioClip = null; + @property(cc.AudioClip) + mudan_audio: cc.AudioClip = null; + @property(cc.AudioClip) + mulan_audio: cc.AudioClip = null; + @property(cc.AudioClip) + pugongying_audio: cc.AudioClip = null; + @property(cc.AudioClip) + putao_audio: cc.AudioClip = null; + @property(cc.AudioClip) + renshen_audio: cc.AudioClip = null; + @property(cc.AudioClip) + taozi_audio: cc.AudioClip = null; + @property(cc.AudioClip) + zhuye_audio: cc.AudioClip = null; + @property(cc.AudioClip) + err: cc.AudioClip = null; + @property(cc.AudioClip) + yes: cc.AudioClip = null; + + + mAudioMap: {}; + bgMusicVolume: number; + effectMusicVolume: number; + mMusicSwitch: number; + mEffectSwitch: number; + brickSound: any; + reward: boolean; + finish: boolean; + rewardCount: number; + mMusicKey: any; + + onLoad() { + if (AudioManager._instance == null) { + AudioManager._instance = this; + cc.game.addPersistRootNode(this.node); + } + else { + return; + } + + window.addEventListener('backbutton', this.onBackButton, false); + + // 监听浏览器的后退按钮点击事件 + window.addEventListener('popstate', this.onBackButton, false); + + window.addEventListener('onDisable', this.onExit, false); + + // 防止浏览器后退行为 + // history.pushState(null, null, location.href); + // window.addEventListener('popstate', function(event) { + // history.pushState(null, null, location.href); + // }); + + this.reward = false; + this.finish = false; + this.rewardCount = 0; + this.ctor(); + + this.preload(); + } + + + + ctor () { + this.mAudioMap = {}; + /** + * 默认音量大小 + * @type {number} + */ + this.bgMusicVolume = 0.1; + this.effectMusicVolume = 1; + + this.mMusicSwitch = 1; + this.mEffectSwitch = 1; + } + + onBackButton(){ + let data = [{status:"user_exit",location:"button"}]; + cc.fx.HttpUtil.uploadUserLogData(data,null); + } + + onExit(){ + let data = [{status:"user_exit",location:"exit"}]; + cc.fx.HttpUtil.uploadUserLogData(data,null); + } + + play (audioSource, loop, callback, isBgMusic) { + // if (isBgMusic && !this.mMusicSwitch) return; + // if (!isBgMusic && !this.mEffectSwitch) return; + var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume; + + // if (cc.sys.isBrowser) { + // if(audioSource == this.brickSound){ + // volume = 0.1; + // } + volume = 1; + cc.audioEngine.setEffectsVolume(1); + cc.audioEngine.setMusicVolume(1); + + var context = cc.audioEngine.playEffect(audioSource, loop); + if (callback){ + cc.audioEngine.setFinishCallback(context, function(){ + callback.call(this); + }.bind(this)); + } + // cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src); + + this.mAudioMap[audioSource] = context; + return audioSource; + // } else { + // return audioSource; + // } + } + + save () { + // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch); + // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch); + } + + // static get Instance() + // { + // if (this._instance == null) + // { + // this._instance = new AudioManager(); + // } + // return this._instance; + // } + + preload () { + if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { return; } + + var musics = [ + this.audioGameBgm0, + ]; + musics.forEach(function(path) { + }) + } + + getAudioMusicSwitch() + { + return this.mMusicSwitch; + + } + getAudioEffectSwitch() + { + return this.mEffectSwitch; + } + trunAudioSound(on) + { + this.switchMusic(on); + this.switchEffect(on) + } + switchMusic (on) { + if (this.mMusicSwitch != (on?1:0)) + { + this.mMusicSwitch = 1-this.mMusicSwitch; + // this.save(); + } + if(on) + { + this.playMusicGame(); + } + else + { + this.stopMusic(); + } + } + switchEffect (on) { + if (this.mEffectSwitch != (on?1:0)){ + this.mEffectSwitch = 1-this.mEffectSwitch; + // this.save(); + + } + } + onHide () { + cc.audioEngine.pauseAll(); + } + + onShow () { + cc.audioEngine.resumeAll(); + } + + //播放音效 + playEffect(name,callback){ + if(this[name]) + return this.play(this[name], false,callback,this.mEffectSwitch); + } + playMusic (key, callback, loop) { + loop = typeof loop == 'undefined' || loop ? true : false; + this.stopMusic(); + this.mMusicKey = this.play(key, loop, callback, true); + } + /** + * 游戏背景音乐 + */ + playMusicGame () { + // this.playMusic(this.audioGameBgm0,{},true); + } + /** + * 停止背景音乐播放 + */ + stopMusic () { + // cc.wwx.OutPut.log('stopMusic audio effect wx: ' + this.mMusicKey); + + var context = this.mAudioMap[this.mMusicKey]; + + if (typeof(context) != 'undefined') { + if (cc.sys.isBrowser) { + cc.audioEngine.stop(context); + } else { + context.stop(); + } + cc.audioEngine.stop(context); + + } + } + + /* + * 游戏开始音效 + * + */ + playGameStart() + { + + } + /* + * 失败的游戏结束 + */ + playGameOver() + { + + } + /* + * 成功的游戏结束 + */ + playGameResultFailed() + { + + } + /* + * 成功的游戏结束 + */ + playGameResultSuccess() + { + + } + /** + * 报警的音效 + */ + + /** + * 按钮 + */ + playAudioButton () { + // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch); + } +}; + +// export { AudioManager }; diff --git a/assets/Script/module/Music/AudioManager.ts.meta b/assets/Script/module/Music/AudioManager.ts.meta new file mode 100644 index 0000000..0965413 --- /dev/null +++ b/assets/Script/module/Music/AudioManager.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "58403fe7-d7a2-426b-9b19-84d3236731a8", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Notification.meta b/assets/Script/module/Notification.meta new file mode 100644 index 0000000..909e75b --- /dev/null +++ b/assets/Script/module/Notification.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "ff6560d9-676d-42ad-8ec7-e44acb84ad9e", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Notification/Notification.ts b/assets/Script/module/Notification/Notification.ts new file mode 100644 index 0000000..bbe2893 --- /dev/null +++ b/assets/Script/module/Notification/Notification.ts @@ -0,0 +1,45 @@ +//全局通知 +var Notifications = { + _eventMap: [], + on: function (masgId, callback, target) { + if (this._eventMap[masgId] === undefined) { + this._eventMap[masgId] = []; + } + this._eventMap[masgId].push({ callback: callback, target: target }); + }, + + emit: function (masgId, parameter) { + let array = this._eventMap[masgId]; + if (array === undefined) return; + + for (let i = 0; i < array.length; i++) { + let element = array[i]; + if (element) element.callback.call(element.target, parameter); + } + }, + + off: function (masgId, callback) { + let array = this._eventMap[masgId]; + if (array === undefined) return; + for (let i = 0; i < array.length; i++) { + let element = array[i]; + if (element && element.callback === callback) { + array[i] = undefined; + break; + } + } + }, + + offMasgId: function (masgId) { + this._eventMap[masgId] = undefined; + }, + + removeAllMsg: function () { + for (let k in this._eventMap) { + if (this._eventMap[k]) { + this.offMasgId(k); + } + } + } +}; +export { Notifications }; \ No newline at end of file diff --git a/assets/Script/module/Notification/Notification.ts.meta b/assets/Script/module/Notification/Notification.ts.meta new file mode 100644 index 0000000..04a1a62 --- /dev/null +++ b/assets/Script/module/Notification/Notification.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "55403563-1a5a-4f2f-9eb8-82c762641837", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/RankList.meta b/assets/Script/module/RankList.meta new file mode 100644 index 0000000..827c351 --- /dev/null +++ b/assets/Script/module/RankList.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "d3520299-33dc-43d2-b522-d424efb5575d", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/RankList/ItemRender.ts b/assets/Script/module/RankList/ItemRender.ts new file mode 100644 index 0000000..b8857eb --- /dev/null +++ b/assets/Script/module/RankList/ItemRender.ts @@ -0,0 +1,76 @@ + +import List, { ListType } from "./List"; + +const { ccclass, property } = cc._decorator; + +@ccclass +export default class ItemRender extends cc.Component { + /**数据 */ + public data:any = null; + /**索引 0表示第一项*/ + public itemIndex:number = 0; + + /**数据改变时调用 */ + public dataChanged(){ + let name = cc.fx.GameTool.subName(this.data.name,6); + this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + ""; + this.node.getChildByName("nameLab").getComponent(cc.Label).string = name + ""; + this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "%"; + let timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time); + this.node.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + ""; + this.node.getChildByName("rank").getChildByName("one").active = false; + this.node.getChildByName("rank").getChildByName("two").active = false; + this.node.getChildByName("rank").getChildByName("three").active = false; + if(this.data.rank == 1){ + this.node.getChildByName("rank").getChildByName("one").active = true; + this.node.getChildByName("rankLab").active = false; + } + else if(this.data.rank == 2){ + this.node.getChildByName("rank").getChildByName("two").active = true; + this.node.getChildByName("rankLab").active = false; + } + else if(this.data.rank == 3){ + this.node.getChildByName("rank").getChildByName("three").active = true; + this.node.getChildByName("rankLab").active = false; + }else{ + this.node.getChildByName("rankLab").active = true; + } + this.setPic(); + } + + public setPic(){ + this.node.getChildByName("pic").getChildByName("icon").active = false; + this.node.getChildByName("pic").getChildByName("pic").active= false; + var self = this; + let url = this.data.pic; + fetch(url) + .then(response => { + return response.headers.get('Content-Length'); + }) + + .then(errNo => { + // console.log(this.data.rank,'X-Info:', errNo); // 输出X-ErrNo的值 + if(errNo == "5093"){ + // console.log(this.data.rank,"没头像"); + this.node.getChildByName("pic").getChildByName("icon").active = true; + } + }) + .catch(error => { + // console.error('Error fetching X-Info:', error); + }); + cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => { + if(texture){ + this.node.getChildByName("pic").getChildByName("pic").active= true; + var sprite = this.node.getChildByName("pic").getChildByName("pic").getComponent(cc.Sprite); + sprite.spriteFrame = new cc.SpriteFrame(texture); + // console.log(this.data.rank,"设置头像成功",err); + } + else{ + // console.log("设置头像失败",url); + // console.log(err,texture) + } + }) + } + + +} diff --git a/assets/Script/module/RankList/ItemRender.ts.meta b/assets/Script/module/RankList/ItemRender.ts.meta new file mode 100644 index 0000000..57a45d3 --- /dev/null +++ b/assets/Script/module/RankList/ItemRender.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "ca0f9934-a015-436e-9402-f8e30d4c5de6", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/RankList/List.ts b/assets/Script/module/RankList/List.ts new file mode 100644 index 0000000..706d342 --- /dev/null +++ b/assets/Script/module/RankList/List.ts @@ -0,0 +1,592 @@ +// Learn TypeScript: +// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html +// Learn Attribute: +// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html +// Learn life-cycle callbacks: +// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html + +import ItemRender from "./ItemRender" + +const { ccclass, property } = cc._decorator; + +/**列表排列方式 */ +export enum ListType { + /**水平排列 */ + Horizontal = 1, + /**垂直排列 */ + Vertical = 2, + /**网格排列 */ + Grid = 3 +} + +/**网格布局中的方向 */ +export enum StartAxisType { + /**水平排列 */ + Horizontal = 1, + /**垂直排列 */ + Vertical = 2, +} + +/** + * 列表 + * 根据cocos_example的listView改动而来 + * @author chenkai 2020.7.8 + * @example + * 1.创建cocos的ScrollView组件,添加List,设置List属性即可 + * + */ +@ccclass +export default class List extends cc.Component { + + //==================== 属性面板 ========================= + /**列表选项 */ + @property({ type: cc.Node, tooltip: "列表项" }) + public itemRender: cc.Node = null; + + /**排列方式 */ + @property({ type: cc.Enum(ListType), tooltip: "排列方式" }) + public type: ListType = ListType.Vertical; + + /**网格布局中的方向 */ + @property({ type: cc.Enum(StartAxisType), tooltip: "网格布局中的方向", visible() { return this.type == ListType.Grid } }) + public startAxis: StartAxisType = StartAxisType.Horizontal; + + /**列表项之间X间隔 */ + @property({ type: cc.Integer, tooltip: "列表项X间隔", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } }) + public spaceX: number = 0; + + /**列表项之间Y间隔 */ + @property({ type: cc.Integer, tooltip: "列表项Y间隔", visible() { return this.type == ListType.Vertical || this.type == ListType.Grid } }) + public spaceY: number = 0; + + /**上间距 */ + @property({ type: cc.Integer, tooltip: "上间距", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } }) + public padding_top: number = 0; + + /**下间距 */ + @property({ type: cc.Integer, tooltip: "下间距", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } }) + public padding_buttom: number = 0; + + /**左间距 */ + @property({ type: cc.Integer, tooltip: "左间距", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } }) + public padding_left: number = 0; + + + + @property(cc.Integer) + public _padding: number = 0; + + /**右间距 */ + @property({ type: cc.Integer, tooltip: "右间距", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } }) + public padding_right: number = 0; + + //====================== 滚动容器 =============================== + /**列表滚动容器 */ + public scrollView: cc.ScrollView = null; + /**scrollView的内容容器 */ + private content: cc.Node = null; + + //======================== 列表项 =========================== + /**列表项数据 */ + private itemDataList: Array = []; + /**应创建的实例数量 */ + private spawnCount: number = 0; + /**存放列表项实例的数组 */ + private itemList: Array = []; + /**item的高度 */ + private itemHeight: number = 0; + /**item的宽度 */ + private itemWidth: number = 0; + /**存放不再使用中的列表项 */ + private itemPool: Array = []; + + //======================= 计算参数 ========================== + /**距离scrollView中心点的距离,超过这个距离的item会被重置,一般设置为 scrollVIew.height/2 + item.heigt/2 + space,因为这个距离item正好超出scrollView显示范围 */ + private halfScrollView: number = 0; + /**上一次content的X值,用于和现在content的X值比较,得出是向左还是向右滚动 */ + private lastContentPosX: number = 0; + /**上一次content的Y值,用于和现在content的Y值比较,得出是向上还是向下滚动 */ + private lastContentPosY: number = 0; + /**网格行数 */ + private gridRow: number = 0; + /**网格列数 */ + private gridCol: number = 0; + /**刷新时间,单位s */ + private updateTimer: number = 0; + /**刷新间隔,单位s */ + private updateInterval: number = 0.1; + /**是否滚动容器 */ + private bScrolling: boolean = false; + /**刷新的函数 */ + private updateFun: Function = function () { }; + + onLoad() { + this.itemHeight = this.itemRender.height; + this.itemWidth = this.itemRender.width; + this.scrollView = this.node.getComponent(cc.ScrollView); + this.content = this.scrollView.content; + this.content.anchorX = 0; + this.content.anchorY = 1; + this.content.removeAllChildren(); + this.scrollView.node.on("scrolling", this.onScrolling, this); + } + + /** + * 列表数据 (列表数据复制使用,如果列表数据改变,则需要重新设置一遍数据) + * @param itemDataList item数据列表 + */ + public setData(itemDataList: Array) { + this.itemDataList = itemDataList.slice(); + this.updateContent(); + + } + + /**计算列表的各项参数 */ + private countListParam() { + let dataLen = this.itemDataList.length; + if (this.type == ListType.Vertical) { + this.scrollView.horizontal = false; + this.scrollView.vertical = true; + this.content.width = this.content.parent.width; + this.content.height = dataLen * this.itemHeight + (dataLen - 1) * this.spaceY + this.padding_top + this.padding_buttom; + this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) + 2; //计算创建的item实例数量,比当前scrollView容器能放下的item数量再加上2个 + this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; //计算bufferZone,item的显示范围 + this.updateFun = this.updateV; + } else if (this.type == ListType.Horizontal) { + this.scrollView.horizontal = true; + this.scrollView.vertical = false; + this.content.width = dataLen * this.itemWidth + (dataLen - 1) * this.spaceX + this.padding_left + this.padding_right; + this.content.height = this.content.parent.height; + this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) + 2; + this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX; + this.updateFun = this.udpateH; + } else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + this.scrollView.horizontal = false; + this.scrollView.vertical = true; + this.content.width = this.content.parent.width; + //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效 + if (this.padding_left + this.padding_right + this.itemWidth + this.spaceX > this.content.width) { + this.padding_left = 0; + this.padding_right = 0; + console.error("padding_left或padding_right过大"); + } + + this.gridCol = Math.floor((this.content.width - this.padding_left - this.padding_right) / (this.itemWidth + this.spaceX)); + this.gridRow = Math.ceil(dataLen / this.gridCol); + this.content.height = this.gridRow * this.itemHeight + (this.gridRow - 1) * this.spaceY + this.padding_top + this.padding_buttom; + this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) * this.gridCol + this.gridCol * 2; + this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; + this.updateFun = this.updateGrid_V; + } else if (this.startAxis == StartAxisType.Horizontal) { + this.scrollView.horizontal = true; + this.scrollView.vertical = false; + //计算高间隔 + this.content.height = this.content.parent.height; + //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效 + if (this.padding_top + this.padding_buttom + this.itemHeight + this.spaceY > this.content.height) { + this.padding_top = 0; + this.padding_buttom = 0; + console.error("padding_top或padding_buttom过大"); + } + + this.gridRow = Math.floor((this.content.height - this.padding_top - this.padding_buttom) / (this.itemHeight + this.spaceY)); + this.gridCol = Math.ceil(dataLen / this.gridRow); + this.content.width = this.gridCol * this.itemWidth + (this.gridCol - 1) * this.spaceX + this.padding_left + this.padding_right; + this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) * this.gridRow + this.gridRow * 2; + this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX; + this.updateFun = this.updateGrid_H; + } + } + } + + /** + * 创建列表 + * @param startIndex 起始显示的数据索引 0表示第一项 + * @param offset scrollView偏移量 + */ + private createList(startIndex: number, offset: cc.Vec2) { + //当需要显示的数据长度 > 虚拟列表长度, 删除最末尾几个数据时,列表需要重置位置到scrollView最底端 + if (this.itemDataList.length > this.spawnCount && (startIndex + this.spawnCount - 1) >= this.itemDataList.length) { + startIndex = this.itemDataList.length - this.spawnCount; + offset = this.scrollView.getMaxScrollOffset(); + + //当需要显示的数据长度 <= 虚拟列表长度, 隐藏多余的虚拟列表项 + } else if (this.itemDataList.length <= this.spawnCount) { + startIndex = 0; + } + + for (let i = 0; i < this.spawnCount; i++) { + let item: cc.Node; + //需要显示的数据索引在数据范围内,则item实例显示出来 + if (i + startIndex < this.itemDataList.length) { + if (this.itemList[i] == null) { + item = this.getItem(); + this.itemList.push(item); + item.parent = this.content; + } else { + item = this.itemList[i]; + } + //需要显示的数据索引超过了数据范围,则item实例隐藏起来 + } else { + //item实例数量 > 需要显示的数据量 + if (this.itemList.length > (this.itemDataList.length - startIndex)) { + item = this.itemList.pop(); + item.removeFromParent(); + this.itemPool.push(item); + } + continue; + } + + let itemRender: ItemRender = item.getComponent(ItemRender); + itemRender.itemIndex = i + startIndex; + itemRender.data = this.itemDataList[i + startIndex]; + itemRender.dataChanged(); + + if (this.type == ListType.Vertical) { + //因为content的锚点X是0,所以item的x值是content.with/2表示居中,锚点Y是1,所以item的y值从content顶部向下是0到负无穷。所以item.y= -item.height/2时,是在content的顶部。 + item.setPosition(this.content.width / 2, -item.height * (0.5 + i + startIndex) - this.spaceY * (i + startIndex) - this.padding_top); + } else if (this.type == ListType.Horizontal) { + item.setPosition(item.width * (0.5 + i + startIndex) + this.spaceX * (i + startIndex) + this.padding_left, -this.content.height / 2); + } else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + var row = Math.floor((i + startIndex) / this.gridCol); + var col = (i + startIndex) % this.gridCol; + item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top); + item.opacity = 255; + } else if (this.startAxis == StartAxisType.Horizontal) { + var row = (i + startIndex) % this.gridRow; + var col = Math.floor((i + startIndex) / this.gridRow); + item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top); + item.opacity = 255; + } + } + } + + this.scrollView.scrollToOffset(offset); + } + + /**获取一个列表项 */ + private getItem() { + if (this.itemPool.length == 0) { + return cc.instantiate(this.itemRender); + } else { + return this.itemPool.pop(); + } + } + + update(dt) { + if (this.bScrolling == false) { + return; + } + this.updateTimer += dt; + if (this.updateTimer < this.updateInterval) { + return; + } + this.updateTimer = 0; + this.bScrolling = false; + this.updateFun(); + } + + onScrolling() { + this.bScrolling = true; + } + + /**垂直排列 */ + private updateV() { + let items = this.itemList; + let item; + let bufferZone = this.halfScrollView; + let isUp = this.scrollView.content.y > this.lastContentPosY; + let offset = (this.itemHeight + this.spaceY) * items.length; + for (let i = 0; i < items.length; i++) { + item = items[i]; + let viewPos = this.getPositionInView(item); + if (isUp) { + //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界 + if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex + items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y - offset; + } + } else { + //item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界 + if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex - items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y + offset; + } + } + } + this.lastContentPosY = this.scrollView.content.y; + } + + /**水平排列 */ + private udpateH() { + let items = this.itemList; + let item; + let bufferZone = this.halfScrollView; + let isRight = this.scrollView.content.x > this.lastContentPosX; + let offset = (this.itemWidth + this.spaceX) * items.length; + for (let i = 0; i < items.length; i++) { + item = items[i]; + let viewPos = this.getPositionInView(item); + if (isRight) { + //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界 + if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex - items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.x = item.x - offset; + } + } else { + //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界 + if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex + items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.x = item.x + offset; + } + } + } + this.lastContentPosX = this.scrollView.content.x; + } + + /**网格垂直排列 */ + private updateGrid_V() { + let items = this.itemList; + let item: cc.Node; + let bufferZone = this.halfScrollView; + let isUp = this.scrollView.content.y > this.lastContentPosY; + let offset = (this.itemHeight + this.spaceY) * (this.spawnCount / this.gridCol); + for (let i = 0; i < items.length; i++) { + item = items[i]; + let viewPos = this.getPositionInView(item); + if (isUp) { + //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界 + if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridCol) * this.gridCol; + if (this.itemDataList[itemIndex] != null) { + item.y = item.y - offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } else { + item.y = item.y - offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } else {//item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界 + if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridCol) * this.gridCol; + if (this.itemDataList[itemIndex] != null) { + item.y = item.y + offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } else { + item.y = item.y + offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + } + this.lastContentPosY = this.scrollView.content.y; + } + + /**网格水平排列 */ + private updateGrid_H() { + let items = this.itemList; + let item; + let bufferZone = this.halfScrollView; + let isRight = this.scrollView.content.x > this.lastContentPosX; + let offset = (this.itemWidth + this.spaceX) * (this.spawnCount / this.gridRow); + for (let i = 0; i < items.length; i++) { + item = items[i]; + let viewPos = this.getPositionInView(item); + if (isRight) { + //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界 + if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridRow) * this.gridRow; + if (this.itemDataList[itemIndex] != null) { + item.x = item.x - offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } else { + item.x = item.x - offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } else { + //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界 + if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) { + let itemRender: ItemRender = item.getComponent(ItemRender); + let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridRow) * this.gridRow; + if (this.itemDataList[itemIndex] != null) { + item.x = item.x + offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } else { + item.x = item.x + offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + } + this.lastContentPosX = this.scrollView.content.x; + } + + /**获取item在scrollView的局部坐标 */ + private getPositionInView(item) { + let worldPos = item.parent.convertToWorldSpaceAR(item.position); + let viewPos = this.scrollView.node.convertToNodeSpaceAR(worldPos); + return viewPos; + } + + /**获取列表数据 */ + public getListData() { + return this.itemDataList; + } + + /** + * 增加一项数据到列表的末尾 + * @param data 数据 + */ + public addItem(data: any) { + this.itemDataList.push(data); + this.updateContent(); + } + + /** + * 增加一项数据到列表指定位置 + * @param index 位置,0表示第1项 + * @param data 数据 + */ + public addItemAt(index: number, data: any) { + if (this.itemDataList[index] != null || this.itemDataList.length == index) { + this.itemDataList.splice(index, 1, data); + this.updateContent(); + } + } + + /** + * 删除一项数据 + * @param index 删除项的位置 ,0表示第1项 + */ + public deleteItem(index: number) { + if (this.itemDataList[index] != null) { + this.itemDataList.splice(index, 1); + this.updateContent(); + } + } + + /** + * 改变一项数据 + * @param index 位置,0表示第1项 + * @param data 替换的数据 + */ + public changeItem(index: number, data: any) { + if (this.itemDataList[index] != null) { + this.itemDataList[index] = data; + this.updateContent(); + } + } + + /**获取第一个Item的位置 */ + private updateContent() { + //显示列表实例为0个 + if (this.itemList.length == 0) { + this.countListParam(); + this.createList(0, new cc.Vec2(0, 0)); + //显示列表的实例不为0个,则需要重新排列item实例数组 + } else { + if (this.type == ListType.Vertical) { + this.itemList.sort((a: any, b: any) => { + return b.y - a.y; + }); + } else if (this.type == ListType.Horizontal) { + this.itemList.sort((a: any, b: any) => { + return a.x - b.x; + }); + } else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + this.itemList.sort((a: any, b: any) => { + return a.x - b.x; + }); + this.itemList.sort((a: any, b: any) => { + return b.y - a.y; + }); + } else if (this.startAxis == StartAxisType.Horizontal) { + this.itemList.sort((a: any, b: any) => { + return b.y - a.y; + }); + this.itemList.sort((a: any, b: any) => { + return a.x - b.x; + }); + } + } + + this.countListParam(); + + //获取第一个item实例需要显示的数据索引 + var startIndex = this.itemList[0].getComponent(ItemRender).itemIndex; + + if (this.type == ListType.Grid && this.startAxis == StartAxisType.Vertical) { + startIndex += (startIndex + this.spawnCount) % this.gridCol; + } else if (this.type == ListType.Grid && this.startAxis == StartAxisType.Horizontal) { + startIndex += (startIndex + this.spawnCount) % this.gridRow; + } + + //getScrollOffset()和scrollToOffset()的x值是相反的 + var offset: cc.Vec2 = this.scrollView.getScrollOffset(); + offset.x = - offset.x; + + this.createList(startIndex, offset); + } + } + + /**销毁 */ + public onDestroy() { + //清理列表项 + let len = this.itemList.length; + for (let i = 0; i < len; i++) { + if (cc.isValid(this.itemList[i], true)) { + this.itemList[i].destroy(); + } + } + this.itemList.length = 0; + //清理对象池 + len = this.itemPool.length; + for (let i = 0; i < len; i++) { + if (cc.isValid(this.itemPool[i], true)) { + this.itemPool[i].destroy(); + } + } + this.itemPool.length = 0; + //清理列表数据 + this.itemDataList.length = 0; + } +} diff --git a/assets/Script/module/RankList/List.ts.meta b/assets/Script/module/RankList/List.ts.meta new file mode 100644 index 0000000..18cde3b --- /dev/null +++ b/assets/Script/module/RankList/List.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "d54211e0-2d28-4528-88e3-e5fd7c9b59a2", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Share.meta b/assets/Script/module/Share.meta new file mode 100644 index 0000000..e87268a --- /dev/null +++ b/assets/Script/module/Share.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "bdc76845-baea-4381-911e-af437cccf839", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Share.zip b/assets/Script/module/Share.zip new file mode 100644 index 0000000..705f190 Binary files /dev/null and b/assets/Script/module/Share.zip differ diff --git a/assets/Script/module/Share.zip.meta b/assets/Script/module/Share.zip.meta new file mode 100644 index 0000000..b160e03 --- /dev/null +++ b/assets/Script/module/Share.zip.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.3", + "uuid": "b42c4fc1-4cd1-4b12-b206-930cea3d49ca", + "importer": "asset", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Share/share.ts b/assets/Script/module/Share/share.ts new file mode 100644 index 0000000..5cfdba2 --- /dev/null +++ b/assets/Script/module/Share/share.ts @@ -0,0 +1,103 @@ + + +var shareConfig = { + gameId: "100014", + shareLine: "zDLsruVI", + EK:"hui231%1" + }; + +// 定义微信配置数据的接口 +interface IWeChatConfig { + appId: string; + timestamp: number; + nonceStr: string; + signature: string; + jsApiList: []; +} + +// 微信操作类 +export class WeChat { + static setShare(url) { + var urlTemp = this.removeQueryParams(url); + shareConfig.shareLine = urlTemp; + WeChat.getSignature(url); + } + + static getResult(res){ + if(res){ + var data = res.data; + // @ts-ignore + wx.config({ + debug: false, + appId: data.appId, + timestamp: data.timestamp, + nonceStr: data.nonceStr, + signature: data.signature, + jsApiList: ['onMenuShareTimeline','updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage'] + }); + // @ts-ignore + wx.checkJsApi({ + jsApiList: ['updateAppMessageShareData'], // 需要检测的JS接口列表,所有JS接口列表见附录2, + success: function(res) { + setTimeout(() => { + WeChat.changeShare(); + }, 100); + setTimeout(() => { + WeChat.changeShare(); + }, 200); + } + }); + } + } + + static changeShare(){ + // @ts-ignore + wx.ready(() => { + // @ts-ignore + wx.updateAppMessageShareData({ + title: '记忆力认知测评', // 分享标题 + desc: '你的认知灵活性和选择注意有问题吗', // 分享描述 + link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标 + success: function () { + // 设置成功 + console.log("分享好友成功回调"); + } + }); + setTimeout(() => { + // @ts-ignore + wx.updateTimelineShareData({ + title: '记忆力认知测评', // 分享标题 + link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致 + imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标 + success: function () { + // 设置成功 + console.log("分享朋友圈成功回调"); + } + }) + }, 200); + + }); + } + + static getSignature(url: string): Promise { + return new Promise((resolve) => { + WeChat.getShareInfo((encodeURIComponent(url)),WeChat.getResult); + }); + } + static async getShareInfo(shareUrl: string, callback:Function): Promise { + const time = Math.floor((new Date().getTime()) / 1000) + const url = cc.fx.HttpUtil.apiSign(`/api/share/cfg?gameId=${shareConfig.gameId}&time=${time}&url=${shareUrl}`,{}) + return cc.fx.HttpUtil.get(url,callback,0) + } + + + static containsNanana(str) { + return /test/i.test(str); + } + + static removeQueryParams(url) { + return url.replace(/\?.*$/, ''); + } + +} diff --git a/assets/Script/module/Share/share.ts.meta b/assets/Script/module/Share/share.ts.meta new file mode 100644 index 0000000..5137d2b --- /dev/null +++ b/assets/Script/module/Share/share.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "7290c680-dfdc-4c59-9736-a614cc2a8bcf", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Storage.meta b/assets/Script/module/Storage.meta new file mode 100644 index 0000000..8f85b4b --- /dev/null +++ b/assets/Script/module/Storage.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "2af8f2ef-b8a0-43ad-a144-ef4a887f2fa9", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Storage/Storage.ts b/assets/Script/module/Storage/Storage.ts new file mode 100644 index 0000000..ea5d843 --- /dev/null +++ b/assets/Script/module/Storage/Storage.ts @@ -0,0 +1,27 @@ +//缓存浏览器数据 +var StorageMessage = { + getStorage : function(key){ + var result = null; + if(cc.sys.localStorage.getItem(key)){ + var result = cc.sys.localStorage.getItem(key); + } + + if(result){ + result = JSON.parse(result); + } + return result; + }, + setStorage : function(key,value){ + //主动拉起分享接口 + var temp = JSON.stringify(value); + cc.sys.localStorage.setItem(key, temp) + }, + removeStorage : function(key){ + //主动删除消息接口 + if(cc.sys.localStorage.getItem(key)){ + cc.sys.localStorage.removeItem(key) + } + }, +}; + +export { StorageMessage }; \ No newline at end of file diff --git a/assets/Script/module/Storage/Storage.ts.meta b/assets/Script/module/Storage/Storage.ts.meta new file mode 100644 index 0000000..fcef259 --- /dev/null +++ b/assets/Script/module/Storage/Storage.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "10029dfc-5454-4977-bd11-8809e8f48cac", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Tool.meta b/assets/Script/module/Tool.meta new file mode 100644 index 0000000..10f9f32 --- /dev/null +++ b/assets/Script/module/Tool.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "2a81f82d-8d16-44af-b947-44eea4dde54f", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts new file mode 100644 index 0000000..d9c8a33 --- /dev/null +++ b/assets/Script/module/Tool/GameTool.ts @@ -0,0 +1,425 @@ + +//最大工具类 各种公共方法,以及处理上传,获取后端接口数据 +var GameTool = { + _startTime: 0, + _endTime: 0, + _totalTime: 0, + //获取userId + Authentication(){ + let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId; + var data = JSON.parse(localStorage.getItem(name)); + if(data == "undifend" || data==null || data == ""){ + let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+ + encodeURIComponent(location.href); + console.log("链接没ID准备跳转",url); + window.location.href = url; + + } + else{ + if(!this.isNumber(data.userId)){ + let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+ + encodeURIComponent(location.href); + console.log("链接不合法",url); + window.location.href = url; + } + else{ + cc.fx.StorageMessage.setStorage(name,data); + cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId); + } + } + }, + + isNumber(value) { + var result = false; + result = typeof value === 'number'; + if(result) if(value < 200000) result = false; + return result; + }, + + containsTrain(str) { + return /from=train/i.test(str); + }, + + + //埋点上传 + setGameData(){ + //GAME_DATA 初始化 每次清零 + cc.fx.GameConfig.GAME_DATA = []; + cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA); + cc.fx.GameConfig.CLICK_init(); + let data = cc.fx.GameConfig.GAME_DATA; + let matchId = this.getMatchId(); + let postData = { + "gameId":cc.fx.GameConfig.GM_INFO.gameId, + "userId":cc.fx.GameConfig.GM_INFO.userId, + "scode":cc.fx.GameConfig.GM_INFO.scode, + "matchId":matchId, + "data": data + }; + + console.log("上传数据:",postData); + cc.fx.HttpUtil.uploadUserLogData(postData,function(){}) + }, + //上传排行榜 type为1 + setRank(data){ + //GAME_DATA 初始化 每次清零 + let postData = { + "gameId":cc.fx.GameConfig.GM_INFO.gameId, + "userId":cc.fx.GameConfig.GM_INFO.userId, + "type":1, + "totleTimes": data.totleTimes, + "accuracy": data.accuracy, + "success": cc.fx.GameConfig.GM_INFO.success + }; + cc.fx.HttpUtil.rankData(1,function(){},postData); + }, + //获取排行榜 type为2 + getRank(data,callback){ + let rankLength = data.length; + let postData = { + "gameId":cc.fx.GameConfig.GM_INFO.gameId, + "userId":cc.fx.GameConfig.GM_INFO.userId, + "page":1, + "pageSize":rankLength + }; + //回调进getRankData + cc.fx.HttpUtil.rankData(2,data =>{callback(data)},postData); + }, + //获取matchId 用于上传每次点击数据里面记录id方便查询 + getMatchId (){ + let matchId = cc.sys.localStorage.getItem("matchId"); + let tempId = matchId; + if(matchId == "undifend" || matchId==null){ + matchId = this.setMatchId(); + } + else{ + if(this.containsNanana(matchId) == true){ + matchId = this.setMatchId(); + } + else{ + let char = parseInt(tempId.substring(10,tempId.length)); + if(cc.fx.GameConfig.GM_INFO.level == 1){ + char += 1; + matchId = tempId.slice(0, 10) + char + ""; + if(this.containsNanana(matchId)) matchId = this.setMatchId(); + cc.fx.GameConfig.GM_INFO.matchId = matchId; + cc.sys.localStorage.setItem("matchId",matchId); + } + } + } + + if(this.containsNanana(matchId) == true){ + matchId = this.setMatchId(); + } + return matchId; + }, + //检测matchId 如果有缓存以前的nanana数据清除 + containsNanana(str) { + return /na/i.test(str); + }, + //重新设置MatchId + setMatchId (){ + // 定义包含可用字符的字符集 + const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + // 创建一个数组以保存随机字符 + const uuidArray = []; + // 循环10次 生成10位的UUID + for (let i = 0; i < 10; i++) { + // 生成随机索引,范围是字符集的长度 + const randomIndex = Math.floor(Math.random() * characters.length); + // 从字符集中获取随机字符 + const randomChar = characters.charAt(randomIndex); + // 将字符添加到数组中 + uuidArray.push(randomChar); + } + let data = uuidArray.join('') + 1 + ""; + cc.sys.localStorage.setItem("matchNumber",1); + cc.sys.localStorage.setItem("matchId",data); + cc.fx.GameConfig.GM_INFO.matchId = data; + return data; + }, + //截取名字 + subName(name,length){ + if(name.length > length){ + name = name.substring(0,length) + "..." + } + return name; + }, + //设置头像 + setPic(node,pic){ + node.active = false; + let url = pic; + setTimeout(() => { + fetch(url) + .then(response => { + return response.headers.get('Content-Length'); + }) + .then(errNo => { + if(errNo == "5093"){ + node.active = true; + } + }) + .catch(error => { + // console.error('Error fetching X-Info:', error); + }); + }, 100); + cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => { + if(texture){ + node.active = true; + node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); + } + else{ + // console.log(err,texture) + } + }) + }, + //第一个参数把目标带进来处理,第二个参数为名字长度,不同场景不同需求 + //名字4短,小排行,名字6长,大排行 + getRankData(data,target,nameLength){ + target.listData = data.data.list; + target.selfData = data.data.info; + let rankData = []; + let self = false; + cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"),target.selfData.pic); + for(let i=0;i<=target.listData.length-1;i++){ + rankData.push({rank:(i+1), name:target.listData[i].nickName, total:target.listData[i].accuracy,time:target.listData[i].totleTimes, pic:target.listData[i].pic}); + if(cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId){ + self = true; + target.rankNumber = i; + target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string =(i+1) + ""; + } + if(i == (target.listData.length-1) && self == false){ + target.rankNumber = i; + target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "99+"; + } + } + let name = cc.fx.GameTool.subName(target.selfData.nickName,nameLength); + target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = name; + target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.accuracy + "%"; + let timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes); + target.selfNode.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + ""; + switch(target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string){ + case "1": + target.selfNode.getChildByName("rank").getChildByName("one").active = true; + break; + case "2": + target.selfNode.getChildByName("rank").getChildByName("two").active = true; + break; + case "3": + target.selfNode.getChildByName("rank").getChildByName("three").active = true; + break; + } + // 大排行 + if(nameLength == 6){ + target.rankList.setData(rankData); + target.selfNode.opacity = 255; + if(target.selfData.totalSunCount == 0) target.selfNode.opacity = 0; + } + }, + + getSeedRandom: function (min, max) {//包含min 不包含max + console.log("随机数:",cc.fx.GameConfig.GM_INFO.currSeed); + max = max || 1; + min = min || 0; + cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280; + let rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0; + let tmp = min + rnd * (max - min); + return parseInt(tmp); + }, + //获取关卡配置的那个关卡数 + getCustom(type){ + let custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom); + if(custom == "undifend" || custom==null || custom == ""){ + this.setCustom(); + } + else{ + cc.fx.GameConfig.GM_INFO_SET("custom",custom[0]); + if(custom[0] != 0 || type == true){ + custom.shift(); + if(custom.length == 0){ + this.setCustom(); + } + else cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,custom); + } + } + }, + //本地没有存储到配置,或者配置用完,重新创建配置 + setCustom(){ + let arrayLength = cc.fx.GameConfig.LEVEL_INFO.length; + let arrayList = []; + for(let i=1; i Math.random() - 0.5); + arrayList.unshift(0) + cc.fx.GameConfig.GM_INFO_SET("custom",arrayList[0]); + cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,arrayList); + }, + + getFoodName(food){ + var name = "葡萄"; + switch(food){ + case "baishao": + name = "白芍"; + break; + case "jingjie": + name = "荆芥"; + break; + case "renshen": + name = "人参"; + break; + case "danshen": + name = "丹参"; + break; + case "danggui": + name = "当归"; + break; + case "gouqi": + name = "枸杞"; + break; + case "mudan": + name = "牡丹"; + break; + case "mulan": + name = "木兰"; + break; + case "pugongying": + name = "蒲公英"; + break; + case "moli": + name = "茉莉"; + break; + case "jinju": + name = "金桔"; + break; + case "dazao": + name = "大枣"; + break; + case "lizi": + name = "李子"; + break; + case "lizhi": + name = "荔枝"; + break; + case "taozi": + name = "桃子"; + break; + case "putao": + name = "葡萄"; + break; + case "muchai": + name = "木柴"; + break; + case "ganjiang": + name = "干姜"; + break; + case "zhuye": + name = "竹叶"; + break; + case "longyan": + name = "龙眼"; + break; + case "chixiaodou": + name = "赤小豆"; + break; + case "gancao": + name = "甘草"; + break; + case "cha": + name = "茶"; + break; + } + return name; + }, + + getSetScreenResolutionFlag: function () { + let size = cc.winSize; + let width = size.width; + let height = size.height; + if ((height / width) > (16.2 / 9)) return false; + return true; + }, + //判断全面屏适配 + setFit: function (canvas) { + let flag = cc.fx.GameTool.getSetScreenResolutionFlag(); + if (flag) { + // console.log("不是全面屏"); + } else { + // console.log("是全面屏"); + } + return flag; + }, + //获取游戏信息 + getGameInfo: function(node){ + var jg = false; + return jg; + }, + //设置游戏信息 + setGameInfo: function(pd){ + + }, + + //打字机效果 + typingAni(label,text,cb,target){ + var self = target; + var html = ''; + var arr = text.split(''); + var len = arr.length; + var step = 0; + self.func = ()=>{ + html += arr[step]; + label.string = html; + if (++step == len) { + self.unschedule(self.func); + cb && cb(); + } + } + self.schedule(self.func,0.1, cc.macro.REPEAT_FOREVER, 0) + }, + + //输入秒,返回需要展示时间格式 + getTimeMargin:(second) => { + let total = 0; + total = second; + let hour = 0; + hour = parseInt((total / 3600) + "");//计算整数小时数 + let afterHour = total - hour * 60 * 60;//取得算出小时数后剩余的秒数 + let min = parseInt((afterHour / 60)+"");//计算整数分 + let m = "" + min; + if(min < 10) m = "0"+min; + let afterMin = total - hour * 60 * 60 - min * 60;//取得算出分后剩余的秒数 + let miao = afterMin + ""; + if(afterMin < 10) miao = "0" + afterMin; + return m + ':' + miao + }, + + //输入秒,返回需要展示时间格式 + getTimeShenNong:(second) => { + second = parseInt(second/1000+""); + let total = 0; + total = second; + let min = 0; + if(total > 60){ + min = parseInt((total / 60)+"");//计算整数分 + } + let m = min + "'"; + + let afterMin = total - min * 60;//取得算出分后剩余的秒数 + let miao = afterMin + "''"; + return m + miao + }, + + //获取时间戳 + getTime(){ + const timestamp = new Date().getTime(); + return timestamp; + }, + pushLister:function () { + + }, + removeAllLister:function () { + + }, + +}; +export { GameTool }; \ No newline at end of file diff --git a/assets/Script/module/Tool/GameTool.ts.meta b/assets/Script/module/Tool/GameTool.ts.meta new file mode 100644 index 0000000..1ffcdae --- /dev/null +++ b/assets/Script/module/Tool/GameTool.ts.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "43bfc27a-ff6e-45b3-87c7-504d0f781397", + "importer": "typescript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Shader.meta b/assets/Shader.meta new file mode 100644 index 0000000..7181fff --- /dev/null +++ b/assets/Shader.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "afa9e39a-94ca-477f-8a2a-25082d9092c3", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Texture.meta b/assets/Texture.meta new file mode 100644 index 0000000..b5b2335 --- /dev/null +++ b/assets/Texture.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "7b81d4e8-ec84-4716-968d-500ac1d78a54", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Texture/HelloWorld.png b/assets/Texture/HelloWorld.png new file mode 100644 index 0000000..21d4326 Binary files /dev/null and b/assets/Texture/HelloWorld.png differ diff --git a/assets/Texture/HelloWorld.png.meta b/assets/Texture/HelloWorld.png.meta new file mode 100644 index 0000000..95162df --- /dev/null +++ b/assets/Texture/HelloWorld.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 195, + "height": 270, + "platformSettings": {}, + "subMetas": { + "HelloWorld": { + "ver": "1.0.6", + "uuid": "31bc895a-c003-4566-a9f3-2e54ae1c17dc", + "importer": "sprite-frame", + "rawTextureUuid": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 195, + "height": 270, + "rawWidth": 195, + "rawHeight": 270, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Texture/singleColor.png b/assets/Texture/singleColor.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/assets/Texture/singleColor.png differ diff --git a/assets/Texture/singleColor.png.meta b/assets/Texture/singleColor.png.meta new file mode 100644 index 0000000..d69211d --- /dev/null +++ b/assets/Texture/singleColor.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "singleColor": { + "ver": "1.0.6", + "uuid": "410fb916-8721-4663-bab8-34397391ace7", + "importer": "sprite-frame", + "rawTextureUuid": "a8027877-d8d6-4645-97a0-52d4a0123dba", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 2, + "height": 2, + "rawWidth": 2, + "rawHeight": 2, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/animation.meta b/assets/animation.meta new file mode 100644 index 0000000..c3f6f2b --- /dev/null +++ b/assets/animation.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "7c1d6faa-66b9-4423-aa04-8c38a15768cf", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/animation/fire.anim b/assets/animation/fire.anim new file mode 100644 index 0000000..e6fbc1a --- /dev/null +++ b/assets/animation/fire.anim @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "fire", + "_objFlags": 0, + "_native": "", + "_duration": 1.5166666666666666, + "sample": 60, + "speed": 0.8, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "eef1f6ad-ae7d-4f74-ab87-cd4c81dea072" + } + }, + { + "frame": 0.3333333333333333, + "value": { + "__uuid__": "6999b621-4a9f-4a89-970f-4f6637f6ebe1" + } + }, + { + "frame": 0.5, + "value": { + "__uuid__": "24bb96d6-d160-419c-89a8-8f1a1e203491" + } + }, + { + "frame": 0.6666666666666666, + "value": { + "__uuid__": "5fead804-1827-4c8d-9b89-c09849aeed4e" + } + }, + { + "frame": 0.8333333333333334, + "value": { + "__uuid__": "e363a676-9b52-4402-b43a-37062f24c250" + } + }, + { + "frame": 1, + "value": { + "__uuid__": "e363a676-9b52-4402-b43a-37062f24c250" + } + }, + { + "frame": 1.1666666666666667, + "value": { + "__uuid__": "a67083f3-132b-4dc7-963c-af204012cd97" + } + }, + { + "frame": 1.3333333333333333, + "value": { + "__uuid__": "5256d2df-6e2d-4cac-9ac7-bd33add06053" + } + }, + { + "frame": 1.5, + "value": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/assets/animation/fire.anim.meta b/assets/animation/fire.anim.meta new file mode 100644 index 0000000..799943b --- /dev/null +++ b/assets/animation/fire.anim.meta @@ -0,0 +1,6 @@ +{ + "ver": "2.1.2", + "uuid": "cd606b05-2183-4a5a-ad7c-9f3464006aaa", + "importer": "animation-clip", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/migration.meta b/assets/migration.meta new file mode 100644 index 0000000..6f25837 --- /dev/null +++ b/assets/migration.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "2e3d6223-9889-4122-8121-c6d837f5367e", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js b/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js new file mode 100644 index 0000000..0750b46 --- /dev/null +++ b/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js @@ -0,0 +1,17 @@ +/* + * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ~ 2.2.1 version. + * You do not need to manually add this script in any other project. + * If you don't use cc.Toggle in your project, you can delete this script directly. + * If your project is hosted in VCS such as git, submit this script together. + * + * 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程, + * 你无需在任何其它项目中手动添加此脚本。 + * 如果你的项目中没用到 Toggle,可直接删除该脚本。 + * 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。 + */ + +if (cc.Toggle) { + // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code + // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件 + cc.Toggle._triggerEventInScript_isChecked = true; +} diff --git a/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta b/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta new file mode 100644 index 0000000..1906e0d --- /dev/null +++ b/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.1.0", + "uuid": "7a231473-d1df-4b05-8620-6376c36252c1", + "importer": "javascript", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/music.meta b/assets/music.meta new file mode 100644 index 0000000..bf283d0 --- /dev/null +++ b/assets/music.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "6ebfe2d9-539a-4853-8b16-fca5c89cf2ce", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/prefab.meta b/assets/prefab.meta new file mode 100644 index 0000000..a92762d --- /dev/null +++ b/assets/prefab.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "bf3935ca-518a-42f4-84e4-ad96badfd1b4", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/prefab/Canvas.prefab b/assets/prefab/Canvas.prefab new file mode 100644 index 0000000..95a382a --- /dev/null +++ b/assets/prefab/Canvas.prefab @@ -0,0 +1,5181 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 64 + }, + { + "__id__": 75 + }, + { + "__id__": 98 + }, + { + "__id__": 101 + }, + { + "__id__": 136 + } + ], + "_active": true, + "_components": [ + { + "__id__": 142 + }, + { + "__id__": 143 + }, + { + "__id__": 144 + } + ], + "_prefab": { + "__id__": 145 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 252, + "b": 252, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 252.87547223450972, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "97fLKw9fpLKIc0dJLpbPlR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "background", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8dEBgqFXxELpmAzyYl1ZRR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "ScrollView", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 61 + }, + { + "__id__": 14 + }, + { + "__id__": 62 + } + ], + "_prefab": { + "__id__": 63 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 174, + "g": 121, + "b": 121, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 1400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 150, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 512, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 10 + } + ], + "_active": false, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 58 + }, + { + "__id__": 59 + } + ], + "_prefab": { + "__id__": 60 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 820 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 340, + -410, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 12 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d7LA6B6L9KYrPYs9FOPGKR", + "sync": false + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_scrollView": { + "__id__": 14 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 11 + }, + "_N$direction": 1, + "_id": "" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 15 + }, + "content": { + "__id__": 15 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": null, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 16 + }, + "_children": [ + { + "__id__": 19 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 57 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 18 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 700 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "01e0xqlUVFcY0MMajauQHo", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [ + { + "__id__": 20 + }, + { + "__id__": 23 + }, + { + "__id__": 32 + }, + { + "__id__": 43 + }, + { + "__id__": 46 + }, + { + "__id__": 49 + }, + { + "__id__": 52 + } + ], + "_active": true, + "_components": [ + { + "__id__": 55 + } + ], + "_prefab": { + "__id__": 56 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -100, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 22 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 24 + }, + { + "__id__": 27 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 31 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 26 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 28 + } + ], + "_prefab": { + "__id__": 29 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 27 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 33 + }, + { + "__id__": 36 + }, + { + "__id__": 39 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 42 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 34 + } + ], + "_prefab": { + "__id__": 35 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 33 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 38 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 40 + } + ], + "_prefab": { + "__id__": 41 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 44 + } + ], + "_prefab": { + "__id__": 45 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 43 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 47 + } + ], + "_prefab": { + "__id__": 48 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 46 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 50 + } + ], + "_prefab": { + "__id__": 51 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "测试", + "_N$string": "测试", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 53 + } + ], + "_prefab": { + "__id__": 54 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "78MlwwIH1CYrPsut4N5MBU", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "e4hxD496RFvpdq8xavWmsV", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b21uNyrqhLbqirpS1MD+7t", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7by3ovAnJLYoQqKmlhCACY", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": false, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "d5421HgLShFKIjj5f18m1mi", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "itemRender": null, + "type": 2, + "startAxis": 2, + "spaceX": 10, + "spaceY": 10, + "padding_top": 10, + "padding_buttom": 10, + "padding_left": 10, + "_padding": 0, + "padding_right": 10, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bdWGhni0BLgaAOrQnsfTP4", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 65 + }, + { + "__id__": 68 + }, + { + "__id__": 71 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 74 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 66 + } + ], + "_prefab": { + "__id__": 67 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -258.909, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 65 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "排名", + "_N$string": "排名", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7bzdCzsURJc4G7MwOL0Blj", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 69 + } + ], + "_prefab": { + "__id__": 70 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -48.622, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 68 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用户昵称", + "_N$string": "用户昵称", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "517a9VdPBNUK5P35X44CpK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + } + ], + "_prefab": { + "__id__": 73 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 223.658, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "驱逐太阳", + "_N$string": "驱逐太阳", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "12KoCg1NRLpJU9aRF1iPkq", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9963O/IP5CCLrawiVnAqdg", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "player", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 76 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [ + { + "__id__": 96 + } + ], + "_prefab": { + "__id__": 97 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 106 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -254, + 377, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 75 + }, + "_children": [ + { + "__id__": 77 + }, + { + "__id__": 80 + }, + { + "__id__": 83 + } + ], + "_active": false, + "_components": [], + "_prefab": { + "__id__": 86 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 78 + } + ], + "_prefab": { + "__id__": 79 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 72, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -42.835, + 60.883, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 77 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "超过了", + "_N$string": "超过了", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b0QUZ3hixHY4BCC7p7EwaX", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 81 + } + ], + "_prefab": { + "__id__": 82 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 48, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 74.991, + 60.883, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 80 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "的人", + "_N$string": "的人", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d3ySguqntO5bgnP95er4PW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "number", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 84 + } + ], + "_prefab": { + "__id__": 85 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 51, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 58.04, + "height": 36.54 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21.936, + 61.459, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 83 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "30%", + "_N$string": "30%", + "_fontSize": 29, + "_lineHeight": 29, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6vzzOaCBH2JMQzL1q75Qk", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "01Wu1da3hD9qLoiu2u15Dh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "mask", + "_objFlags": 0, + "_parent": { + "__id__": 75 + }, + "_children": [ + { + "__id__": 88 + }, + { + "__id__": 91 + } + ], + "_active": true, + "_components": [ + { + "__id__": 94 + } + ], + "_prefab": { + "__id__": 95 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -0.079, + 4.153, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "phone", + "_objFlags": 0, + "_parent": { + "__id__": 87 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 89 + } + ], + "_prefab": { + "__id__": 90 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 88 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a9FdZ8QGNM77omYBmm7jeP", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 87 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 92 + } + ], + "_prefab": { + "__id__": 93 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 91 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "082qUxbaNDrIu5wftUXuxE", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "15yWGxXfFKHYDj+6AKZ+hO", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 75 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "777yycF4RPu7K18m/uyO1m", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 99 + } + ], + "_prefab": { + "__id__": 100 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 118 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -609, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 98 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "adJ7tHdodDiYvg71t3toeY", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "Self", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 102 + }, + { + "__id__": 111 + }, + { + "__id__": 114 + }, + { + "__id__": 125 + }, + { + "__id__": 128 + }, + { + "__id__": 131 + } + ], + "_active": true, + "_components": [ + { + "__id__": 134 + } + ], + "_prefab": { + "__id__": 135 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [ + { + "__id__": 103 + }, + { + "__id__": 106 + } + ], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": { + "__id__": 110 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 102 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 104 + } + ], + "_prefab": { + "__id__": 105 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 103 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f513pLQ/9KMbKpOTC4nuyz", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 102 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 107 + } + ], + "_prefab": { + "__id__": 108 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 106 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c8vhbkrhtGw72GydJ4enTg", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "47dNJgs3hCIZESImEUA8wi", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 112 + } + ], + "_prefab": { + "__id__": 113 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 13.9, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + 59.946, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "25WXxoGV5I/KgHBE8D1rsK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [ + { + "__id__": 115 + }, + { + "__id__": 118 + }, + { + "__id__": 121 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 124 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 116 + } + ], + "_prefab": { + "__id__": 117 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 115 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "09Kg3hfzBBu6HptPpAFSW9", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 119 + } + ], + "_prefab": { + "__id__": 120 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 118 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0dKJ2TWjFCOJ/iqhRFSLjk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 122 + } + ], + "_prefab": { + "__id__": 123 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 121 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1aJ6eRDI5HH7V7ePpX8123", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1dS3urBJ1F55mw2t/Q3F7w", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 126 + } + ], + "_prefab": { + "__id__": 127 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 125 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31xa76G7lPaao3sNmpqjSI", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 129 + } + ], + "_prefab": { + "__id__": 130 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 128 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "我", + "_N$string": "我", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "42BvS5Yl5GfY/GLeE5YQOh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 132 + } + ], + "_prefab": { + "__id__": 133 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 131 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7bFLMTAaRJZbZdCmLU7NlT", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "02TaTwJ1tM844wDACOg8Uk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "backBtn", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 137 + }, + { + "__id__": 138 + }, + { + "__id__": 139 + } + ], + "_prefab": { + "__id__": 141 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -320.09, + 618, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 42.410000000000025, + "_right": 0, + "_top": 29, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 140 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "e74a999IDFOabyymZgXQIiy", + "handler": "backClick", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "34+hXrhBBJUqEHHRNeqJSa", + "sync": false + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "e74a999IDFOabyymZgXQIiy", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "Player": { + "__id__": 75 + }, + "selfNode": { + "__id__": 101 + }, + "phone": { + "__id__": 104 + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/assets/prefab/Canvas.prefab.meta b/assets/prefab/Canvas.prefab.meta new file mode 100644 index 0000000..3aac29b --- /dev/null +++ b/assets/prefab/Canvas.prefab.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.3.2", + "uuid": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b", + "importer": "prefab", + "optimizationPolicy": "AUTO", + "asyncLoadAssets": false, + "readonly": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/prefab/RankListItem.prefab b/assets/prefab/RankListItem.prefab new file mode 100644 index 0000000..eb15137 --- /dev/null +++ b/assets/prefab/RankListItem.prefab @@ -0,0 +1,1364 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 14 + }, + { + "__id__": 25 + }, + { + "__id__": 28 + }, + { + "__id__": 31 + }, + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 38 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -100, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 11 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 15 + }, + { + "__id__": 18 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 24 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 17 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 20 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 27 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + } + ], + "_prefab": { + "__id__": 33 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "测试", + "_N$string": "测试", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": { + "__id__": 36 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "78MlwwIH1CYrPsut4N5MBU", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/assets/prefab/RankListItem.prefab.meta b/assets/prefab/RankListItem.prefab.meta new file mode 100644 index 0000000..f433f20 --- /dev/null +++ b/assets/prefab/RankListItem.prefab.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.3.2", + "uuid": "a264c8df-80f6-474f-9fe5-28b7ae529d95", + "importer": "prefab", + "optimizationPolicy": "AUTO", + "asyncLoadAssets": false, + "readonly": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/res.meta b/assets/res.meta new file mode 100644 index 0000000..993a616 --- /dev/null +++ b/assets/res.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "2880dc26-5b38-48bd-baba-daaec97499cb", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/res/btn.png b/assets/res/btn.png new file mode 100644 index 0000000..15e5b27 Binary files /dev/null and b/assets/res/btn.png differ diff --git a/assets/res/btn.png.meta b/assets/res/btn.png.meta new file mode 100644 index 0000000..416c253 --- /dev/null +++ b/assets/res/btn.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "ebfe6e6f-f068-4227-bfd8-16f834e7203f", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 501, + "height": 85, + "platformSettings": {}, + "subMetas": { + "btn": { + "ver": "1.0.6", + "uuid": "5890602f-470f-42ea-b785-8d5565214ada", + "importer": "sprite-frame", + "rawTextureUuid": "ebfe6e6f-f068-4227-bfd8-16f834e7203f", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 501, + "height": 85, + "rawWidth": 501, + "rawHeight": 85, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/res/err2.png b/assets/res/err2.png new file mode 100644 index 0000000..031a8fd Binary files /dev/null and b/assets/res/err2.png differ diff --git a/assets/res/err2.png.meta b/assets/res/err2.png.meta new file mode 100644 index 0000000..4c42c91 --- /dev/null +++ b/assets/res/err2.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "59302142-671f-4983-92db-e5fa8b5aee42", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 501, + "height": 70, + "platformSettings": {}, + "subMetas": { + "err2": { + "ver": "1.0.6", + "uuid": "08e5fce4-27f5-445b-a895-f47a7ffb5176", + "importer": "sprite-frame", + "rawTextureUuid": "59302142-671f-4983-92db-e5fa8b5aee42", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -0.5, + "offsetY": 0, + "trimX": 194, + "trimY": 18, + "width": 112, + "height": 34, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/res/icon.png b/assets/res/icon.png new file mode 100644 index 0000000..e511c8d Binary files /dev/null and b/assets/res/icon.png differ diff --git a/assets/res/icon.png.meta b/assets/res/icon.png.meta new file mode 100644 index 0000000..52646b4 --- /dev/null +++ b/assets/res/icon.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "8084ec83-76e6-4ef4-a0e9-162a417b5c08", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 64, + "height": 64, + "platformSettings": {}, + "subMetas": { + "icon": { + "ver": "1.0.6", + "uuid": "6c6849e9-8426-4bd8-8298-194917d20da7", + "importer": "sprite-frame", + "rawTextureUuid": "8084ec83-76e6-4ef4-a0e9-162a417b5c08", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 64, + "height": 64, + "rawWidth": 64, + "rawHeight": 64, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/res/nomal2.png b/assets/res/nomal2.png new file mode 100644 index 0000000..12a44bc Binary files /dev/null and b/assets/res/nomal2.png differ diff --git a/assets/res/nomal2.png.meta b/assets/res/nomal2.png.meta new file mode 100644 index 0000000..af4701c --- /dev/null +++ b/assets/res/nomal2.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "adfc2f90-f674-4b11-93a1-3485c1804903", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 501, + "height": 70, + "platformSettings": {}, + "subMetas": { + "nomal2": { + "ver": "1.0.6", + "uuid": "b9472a40-1f02-4a4b-8fbc-818b4255e9ce", + "importer": "sprite-frame", + "rawTextureUuid": "adfc2f90-f674-4b11-93a1-3485c1804903", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -0.5, + "offsetY": 0, + "trimX": 194, + "trimY": 18, + "width": 112, + "height": 34, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/res/yes2.png b/assets/res/yes2.png new file mode 100644 index 0000000..b714bd2 Binary files /dev/null and b/assets/res/yes2.png differ diff --git a/assets/res/yes2.png.meta b/assets/res/yes2.png.meta new file mode 100644 index 0000000..4133c3d --- /dev/null +++ b/assets/res/yes2.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 501, + "height": 70, + "platformSettings": {}, + "subMetas": { + "yes2": { + "ver": "1.0.6", + "uuid": "33d3b1ce-0232-41d5-b379-8316ed3e442d", + "importer": "sprite-frame", + "rawTextureUuid": "ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -0.5, + "offsetY": 0, + "trimX": 194, + "trimY": 18, + "width": 112, + "height": 34, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources.meta b/assets/resources.meta new file mode 100644 index 0000000..1e7dc88 --- /dev/null +++ b/assets/resources.meta @@ -0,0 +1,25 @@ +{ + "ver": "1.1.3", + "uuid": "52e78fe3-9095-42ad-8e4d-f9bb12dc69ce", + "importer": "folder", + "isBundle": true, + "bundleName": "resources", + "priority": 8, + "compressionType": { + "web-mobile": "default", + "wechatgame": "default" + }, + "optimizeHotUpdate": { + "web-mobile": false, + "wechatgame": false + }, + "inlineSpriteFrames": { + "web-mobile": false, + "wechatgame": false + }, + "isRemoteBundle": { + "web-mobile": false, + "wechatgame": true + }, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Bg.meta b/assets/resources/Bg.meta new file mode 100644 index 0000000..c62f565 --- /dev/null +++ b/assets/resources/Bg.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "194f1f26-5bbf-43e6-b623-3af4e4c71586", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Bg/bg1.jpg b/assets/resources/Bg/bg1.jpg new file mode 100644 index 0000000..116d70f Binary files /dev/null and b/assets/resources/Bg/bg1.jpg differ diff --git a/assets/resources/Bg/bg1.jpg.meta b/assets/resources/Bg/bg1.jpg.meta new file mode 100644 index 0000000..6ca8fb4 --- /dev/null +++ b/assets/resources/Bg/bg1.jpg.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "93b7d36e-73e3-4755-b932-ec0eb7407078", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 750, + "height": 1660, + "platformSettings": {}, + "subMetas": { + "bg1": { + "ver": "1.0.6", + "uuid": "f6cdf53a-8de8-42da-bea3-581b1a681360", + "importer": "sprite-frame", + "rawTextureUuid": "93b7d36e-73e3-4755-b932-ec0eb7407078", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 750, + "height": 1660, + "rawWidth": 750, + "rawHeight": 1660, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Bg/bg2.jpg b/assets/resources/Bg/bg2.jpg new file mode 100644 index 0000000..5ec6352 Binary files /dev/null and b/assets/resources/Bg/bg2.jpg differ diff --git a/assets/resources/Bg/bg2.jpg.meta b/assets/resources/Bg/bg2.jpg.meta new file mode 100644 index 0000000..d62f642 --- /dev/null +++ b/assets/resources/Bg/bg2.jpg.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "208eb4d4-f625-47c7-a16f-853d57d0c48f", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 750, + "height": 1660, + "platformSettings": {}, + "subMetas": { + "bg2": { + "ver": "1.0.6", + "uuid": "6b86bfb2-d4d1-4474-a615-6a8a515b9201", + "importer": "sprite-frame", + "rawTextureUuid": "208eb4d4-f625-47c7-a16f-853d57d0c48f", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 750, + "height": 1660, + "rawWidth": 750, + "rawHeight": 1660, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Bg/overBg.jpg b/assets/resources/Bg/overBg.jpg new file mode 100644 index 0000000..deb4539 Binary files /dev/null and b/assets/resources/Bg/overBg.jpg differ diff --git a/assets/resources/Bg/overBg.jpg.meta b/assets/resources/Bg/overBg.jpg.meta new file mode 100644 index 0000000..e5dc8db --- /dev/null +++ b/assets/resources/Bg/overBg.jpg.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "194abbe2-2c5a-4d46-8aac-957b3bb44457", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 750, + "height": 1660, + "platformSettings": {}, + "subMetas": { + "overBg": { + "ver": "1.0.6", + "uuid": "634acecc-5987-409f-8c81-28569289abb3", + "importer": "sprite-frame", + "rawTextureUuid": "194abbe2-2c5a-4d46-8aac-957b3bb44457", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 750, + "height": 1660, + "rawWidth": 750, + "rawHeight": 1660, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Bg/rank_Bg.jpg b/assets/resources/Bg/rank_Bg.jpg new file mode 100644 index 0000000..32057bf Binary files /dev/null and b/assets/resources/Bg/rank_Bg.jpg differ diff --git a/assets/resources/Bg/rank_Bg.jpg.meta b/assets/resources/Bg/rank_Bg.jpg.meta new file mode 100644 index 0000000..fb386b0 --- /dev/null +++ b/assets/resources/Bg/rank_Bg.jpg.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "b6890719-3b74-401d-9195-b39ec488d5e0", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 750, + "height": 1660, + "platformSettings": {}, + "subMetas": { + "rank_Bg": { + "ver": "1.0.6", + "uuid": "e46860aa-922b-408c-8a92-ccfb24106c76", + "importer": "sprite-frame", + "rawTextureUuid": "b6890719-3b74-401d-9195-b39ec488d5e0", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 750, + "height": 1660, + "rawWidth": 750, + "rawHeight": 1660, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Font.meta b/assets/resources/Font.meta new file mode 100644 index 0000000..645221d --- /dev/null +++ b/assets/resources/Font.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "c1153c9d-e6dd-490d-8d4c-2b26baa039a8", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Font/Font.ttf b/assets/resources/Font/Font.ttf new file mode 100644 index 0000000..bdc9890 Binary files /dev/null and b/assets/resources/Font/Font.ttf differ diff --git a/assets/resources/Font/Font.ttf.meta b/assets/resources/Font/Font.ttf.meta new file mode 100644 index 0000000..84e2259 --- /dev/null +++ b/assets/resources/Font/Font.ttf.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.1.2", + "uuid": "26d2db85-2ef2-4732-8add-adfa6d3c7308", + "importer": "ttf-font", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Json.meta b/assets/resources/Json.meta new file mode 100644 index 0000000..1beebf3 --- /dev/null +++ b/assets/resources/Json.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "066e91c2-fc55-407c-b061-9e4de4a9f224", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Json/CLICK_DATA.json b/assets/resources/Json/CLICK_DATA.json new file mode 100644 index 0000000..5c67192 --- /dev/null +++ b/assets/resources/Json/CLICK_DATA.json @@ -0,0 +1,16 @@ +{ + "data" : + { + "type": 1, + "success": false, + "round": 0, + "choice": 0, + "rightChoice": 0, + "item": "", + "roundType": 0, + "stepTime": 0, + "levelConfig": 0, + "ignite": false, + "igniteCount": 0 + } +} \ No newline at end of file diff --git a/assets/resources/Json/CLICK_DATA.json.meta b/assets/resources/Json/CLICK_DATA.json.meta new file mode 100644 index 0000000..e2e81fb --- /dev/null +++ b/assets/resources/Json/CLICK_DATA.json.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.2", + "uuid": "e1d57e63-4f2f-467d-9c55-0a889d5533a8", + "importer": "json", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Json/GM_INFO.json b/assets/resources/Json/GM_INFO.json new file mode 100644 index 0000000..fcdf5e3 --- /dev/null +++ b/assets/resources/Json/GM_INFO.json @@ -0,0 +1,19 @@ +{ + "data":{ + "mean_Time": 0, + "total": 0, + "currSeed": 200000, + "gameId": "100014", + "userId": 200139, + "guide": true, + "url": "https://api.sparkus.cn", + "success": false, + "matchId": null, + "custom": 0, + "level": 0, + "stepTimeList":0, + "successList":[], + "gameTime":8, + "igniteCount":0 + } +} \ No newline at end of file diff --git a/assets/resources/Json/GM_INFO.json.meta b/assets/resources/Json/GM_INFO.json.meta new file mode 100644 index 0000000..4dc294f --- /dev/null +++ b/assets/resources/Json/GM_INFO.json.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.2", + "uuid": "2d69a479-18ec-4787-b35f-e9a9b3247435", + "importer": "json", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Json/LEVEL_INFO.json b/assets/resources/Json/LEVEL_INFO.json new file mode 100644 index 0000000..9380ebe --- /dev/null +++ b/assets/resources/Json/LEVEL_INFO.json @@ -0,0 +1,2504 @@ +{ + "data": [ + { + "custom": [ + { + "id": 1000, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1001, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 1002, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1003, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1004, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1006, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1007, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1009, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1010, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1011, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1012, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1013, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 1014, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1015, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 1016, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1017, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 1018, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 1019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1020, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 1021, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1022, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1023, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 1026, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1027, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1028, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 1030, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1031, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1032, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 1033, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 1034, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1035, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 1036, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1037, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1038, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1039, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1040, + "item": "renshen", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 2000, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2001, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2002, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 2003, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2004, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 2005, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2006, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2007, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 2008, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2009, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 2010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2011, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2012, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2013, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 2015, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2016, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2017, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 2019, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2020, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2021, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 2022, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 2023, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 2025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2026, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2027, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2028, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2029, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2030, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2031, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 2032, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2033, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2034, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2035, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2036, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2037, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 2038, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2039, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2040, + "item": "zhuye", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 3000, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 3001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 3002, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 3003, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 3004, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3006, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3007, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 3009, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3010, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 3012, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3014, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3015, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 3016, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3017, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3018, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3019, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3021, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3022, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3023, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 3024, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 3025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 3026, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 3027, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3028, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 3029, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3030, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 3032, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3033, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3034, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3035, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3036, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 3037, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3040, + "item": "mudan", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 4000, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4001, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 4003, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 4005, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4006, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 4007, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4008, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 4009, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4010, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 4012, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 4013, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 4014, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4016, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 4017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 4018, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4019, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4020, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4021, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4022, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4024, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 4025, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 4026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4027, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 4028, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4029, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4030, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 4031, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 4032, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4033, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4034, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 4035, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 4036, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4037, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 4039, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 5000, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5001, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 5002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 5003, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5004, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 5005, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5006, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 5007, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 5008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5009, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 5010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5011, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5012, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 5013, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 5015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 5016, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5017, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5019, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5020, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5021, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5022, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 5023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5024, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 5025, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 5026, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5027, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 5029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5032, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 5033, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5034, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5035, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 5036, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5037, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 5038, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 5040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 6000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6001, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6002, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6003, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 6005, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6006, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 6007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6009, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6011, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 6012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 6013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 6014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 6019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 6021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6024, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6025, + "item": "jinjie", + "type": 2, + "flammable": 0 + }, + { + "id": 6026, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 6027, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6028, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6029, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 6030, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 6031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 6032, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6033, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6034, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6035, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 6036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 6037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 6038, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 6039, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 7000, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7003, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 7004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 7006, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7008, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7009, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7012, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 7014, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 7015, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 7016, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 7017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7018, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7019, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 7020, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 7022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 7023, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 7025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7027, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7028, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7029, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 7031, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 7032, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 7033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7034, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7035, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7037, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 7038, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 7039, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 8000, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 8001, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8003, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 8005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8006, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8007, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 8008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8009, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8010, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8011, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 8012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 8014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 8016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8020, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8021, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8022, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8023, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 8025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8026, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 8027, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8028, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 8030, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8031, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8032, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 8034, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8035, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8036, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 8037, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 8038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 8039, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8040, + "item": "gancao", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 9000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9001, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 9002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 9003, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9004, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9005, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 9006, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 9007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9008, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 9009, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9010, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9011, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9012, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9013, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9014, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9015, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9016, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 9017, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 9018, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 9019, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 9020, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 9021, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9022, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 9025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9026, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9027, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 9029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9030, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9031, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 9032, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9033, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9035, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 9036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9037, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 9038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9039, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 9040, + "item": "danggui", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 10000, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 10001, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10002, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10003, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10004, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10005, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10006, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 10007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10008, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 10009, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10010, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 10012, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10013, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 10014, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 10015, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 10016, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10018, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10020, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10021, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10022, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10023, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10025, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10026, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 10027, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10028, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10029, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 10031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10032, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10033, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10035, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 10036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 10038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10039, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10040, + "item": "gouqi", + "type": 2, + "flammable": 0 + } + ] + } + ] +} \ No newline at end of file diff --git a/assets/resources/Json/LEVEL_INFO.json.meta b/assets/resources/Json/LEVEL_INFO.json.meta new file mode 100644 index 0000000..5b9c72e --- /dev/null +++ b/assets/resources/Json/LEVEL_INFO.json.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.2", + "uuid": "2cddbdcb-5dba-4b13-960c-9ebe6d17a7db", + "importer": "json", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music.meta b/assets/resources/Music.meta new file mode 100644 index 0000000..fa280a4 --- /dev/null +++ b/assets/resources/Music.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "a9e918f7-4968-417f-995b-c2db9d0ea6d9", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/baishao_audio.mp3 b/assets/resources/Music/baishao_audio.mp3 new file mode 100644 index 0000000..9947e8b Binary files /dev/null and b/assets/resources/Music/baishao_audio.mp3 differ diff --git a/assets/resources/Music/baishao_audio.mp3.meta b/assets/resources/Music/baishao_audio.mp3.meta new file mode 100644 index 0000000..87bf441 --- /dev/null +++ b/assets/resources/Music/baishao_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "47388b59-bca9-4607-bdc1-1fc7ba079a12", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/bgMusic.mp3 b/assets/resources/Music/bgMusic.mp3 new file mode 100644 index 0000000..0c7c98a Binary files /dev/null and b/assets/resources/Music/bgMusic.mp3 differ diff --git a/assets/resources/Music/bgMusic.mp3.meta b/assets/resources/Music/bgMusic.mp3.meta new file mode 100644 index 0000000..9bfb4bf --- /dev/null +++ b/assets/resources/Music/bgMusic.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "bef46737-c323-42ea-9ea7-7dc780b882b7", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 176.352653, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/cha_audio.mp3 b/assets/resources/Music/cha_audio.mp3 new file mode 100644 index 0000000..fb0c79c Binary files /dev/null and b/assets/resources/Music/cha_audio.mp3 differ diff --git a/assets/resources/Music/cha_audio.mp3.meta b/assets/resources/Music/cha_audio.mp3.meta new file mode 100644 index 0000000..89bc19d --- /dev/null +++ b/assets/resources/Music/cha_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "b1a7d924-b756-4abd-9de4-f913e76d7ba6", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/chixiaodou_audio.mp3 b/assets/resources/Music/chixiaodou_audio.mp3 new file mode 100644 index 0000000..1f86f72 Binary files /dev/null and b/assets/resources/Music/chixiaodou_audio.mp3 differ diff --git a/assets/resources/Music/chixiaodou_audio.mp3.meta b/assets/resources/Music/chixiaodou_audio.mp3.meta new file mode 100644 index 0000000..c936368 --- /dev/null +++ b/assets/resources/Music/chixiaodou_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "16df01b7-75d9-47f2-96bf-23d29632af47", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.608, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/danggui_audio.mp3 b/assets/resources/Music/danggui_audio.mp3 new file mode 100644 index 0000000..5acb6f4 Binary files /dev/null and b/assets/resources/Music/danggui_audio.mp3 differ diff --git a/assets/resources/Music/danggui_audio.mp3.meta b/assets/resources/Music/danggui_audio.mp3.meta new file mode 100644 index 0000000..416e2c7 --- /dev/null +++ b/assets/resources/Music/danggui_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "5f08c436-44f0-4802-bc19-0443972a105b", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.48898, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/danshen_audio.mp3 b/assets/resources/Music/danshen_audio.mp3 new file mode 100644 index 0000000..04405ec Binary files /dev/null and b/assets/resources/Music/danshen_audio.mp3 differ diff --git a/assets/resources/Music/danshen_audio.mp3.meta b/assets/resources/Music/danshen_audio.mp3.meta new file mode 100644 index 0000000..edfc211 --- /dev/null +++ b/assets/resources/Music/danshen_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "5325e681-09c2-4cdd-87f1-7b4d76247f14", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.632, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/dazao_audio.mp3 b/assets/resources/Music/dazao_audio.mp3 new file mode 100644 index 0000000..e6b4585 Binary files /dev/null and b/assets/resources/Music/dazao_audio.mp3 differ diff --git a/assets/resources/Music/dazao_audio.mp3.meta b/assets/resources/Music/dazao_audio.mp3.meta new file mode 100644 index 0000000..719dbb0 --- /dev/null +++ b/assets/resources/Music/dazao_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "e97e82df-44e2-4294-89fb-dadbf44bf622", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.48898, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/err.mp3 b/assets/resources/Music/err.mp3 new file mode 100644 index 0000000..fdc7d13 Binary files /dev/null and b/assets/resources/Music/err.mp3 differ diff --git a/assets/resources/Music/err.mp3.meta b/assets/resources/Music/err.mp3.meta new file mode 100644 index 0000000..c73010a --- /dev/null +++ b/assets/resources/Music/err.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "1a1f7dc6-de93-494d-b7be-fe9203b41dc0", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 0.626939, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/gancao_audio.mp3 b/assets/resources/Music/gancao_audio.mp3 new file mode 100644 index 0000000..df3a032 Binary files /dev/null and b/assets/resources/Music/gancao_audio.mp3 differ diff --git a/assets/resources/Music/gancao_audio.mp3.meta b/assets/resources/Music/gancao_audio.mp3.meta new file mode 100644 index 0000000..36e1660 --- /dev/null +++ b/assets/resources/Music/gancao_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "c1fcf0fb-c572-4800-9848-1e78718fdabf", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/ganjiang_audio.mp3 b/assets/resources/Music/ganjiang_audio.mp3 new file mode 100644 index 0000000..4117a9b Binary files /dev/null and b/assets/resources/Music/ganjiang_audio.mp3 differ diff --git a/assets/resources/Music/ganjiang_audio.mp3.meta b/assets/resources/Music/ganjiang_audio.mp3.meta new file mode 100644 index 0000000..4f3c6bd --- /dev/null +++ b/assets/resources/Music/ganjiang_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "b3d0fc52-3960-42d1-869f-39121e912bdb", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.48898, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/gouqi_audio.mp3 b/assets/resources/Music/gouqi_audio.mp3 new file mode 100644 index 0000000..74144b2 Binary files /dev/null and b/assets/resources/Music/gouqi_audio.mp3 differ diff --git a/assets/resources/Music/gouqi_audio.mp3.meta b/assets/resources/Music/gouqi_audio.mp3.meta new file mode 100644 index 0000000..e451183 --- /dev/null +++ b/assets/resources/Music/gouqi_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "589a92bd-21cc-43d4-8594-2e9c92930f13", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/jingjie_audio.mp3 b/assets/resources/Music/jingjie_audio.mp3 new file mode 100644 index 0000000..eceb573 Binary files /dev/null and b/assets/resources/Music/jingjie_audio.mp3 differ diff --git a/assets/resources/Music/jingjie_audio.mp3.meta b/assets/resources/Music/jingjie_audio.mp3.meta new file mode 100644 index 0000000..12bc82f --- /dev/null +++ b/assets/resources/Music/jingjie_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 0.792, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/jinju_audio.mp3 b/assets/resources/Music/jinju_audio.mp3 new file mode 100644 index 0000000..426ca1d Binary files /dev/null and b/assets/resources/Music/jinju_audio.mp3 differ diff --git a/assets/resources/Music/jinju_audio.mp3.meta b/assets/resources/Music/jinju_audio.mp3.meta new file mode 100644 index 0000000..cfcb5cf --- /dev/null +++ b/assets/resources/Music/jinju_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "ffdbc929-ffdb-46b7-a93e-29447856ca36", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.567347, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/lizhi_audio.mp3 b/assets/resources/Music/lizhi_audio.mp3 new file mode 100644 index 0000000..915b09a Binary files /dev/null and b/assets/resources/Music/lizhi_audio.mp3 differ diff --git a/assets/resources/Music/lizhi_audio.mp3.meta b/assets/resources/Music/lizhi_audio.mp3.meta new file mode 100644 index 0000000..baca304 --- /dev/null +++ b/assets/resources/Music/lizhi_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "ac2f83fb-1f9e-4d58-b043-bdcd25634e14", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/lizi_audio.mp3 b/assets/resources/Music/lizi_audio.mp3 new file mode 100644 index 0000000..43bc63f Binary files /dev/null and b/assets/resources/Music/lizi_audio.mp3 differ diff --git a/assets/resources/Music/lizi_audio.mp3.meta b/assets/resources/Music/lizi_audio.mp3.meta new file mode 100644 index 0000000..a8983f6 --- /dev/null +++ b/assets/resources/Music/lizi_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "7a5029a4-6d49-4a15-a1bb-9faa9506e801", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.462857, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/longyan_audio.mp3 b/assets/resources/Music/longyan_audio.mp3 new file mode 100644 index 0000000..d74f664 Binary files /dev/null and b/assets/resources/Music/longyan_audio.mp3 differ diff --git a/assets/resources/Music/longyan_audio.mp3.meta b/assets/resources/Music/longyan_audio.mp3.meta new file mode 100644 index 0000000..9bc6932 --- /dev/null +++ b/assets/resources/Music/longyan_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "03f3670c-b2e3-44dc-a718-35d83b45a100", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/moli_audio.mp3 b/assets/resources/Music/moli_audio.mp3 new file mode 100644 index 0000000..5010b1f Binary files /dev/null and b/assets/resources/Music/moli_audio.mp3 differ diff --git a/assets/resources/Music/moli_audio.mp3.meta b/assets/resources/Music/moli_audio.mp3.meta new file mode 100644 index 0000000..9941abf --- /dev/null +++ b/assets/resources/Music/moli_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "ebf27f93-6c3b-44cd-b228-944b77435936", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.515102, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/muchai_audio.mp3 b/assets/resources/Music/muchai_audio.mp3 new file mode 100644 index 0000000..c5ab97a Binary files /dev/null and b/assets/resources/Music/muchai_audio.mp3 differ diff --git a/assets/resources/Music/muchai_audio.mp3.meta b/assets/resources/Music/muchai_audio.mp3.meta new file mode 100644 index 0000000..05c4d47 --- /dev/null +++ b/assets/resources/Music/muchai_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "434c4832-eab0-46c1-a1ef-baa5316386b4", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.541224, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/mudan_audio.mp3 b/assets/resources/Music/mudan_audio.mp3 new file mode 100644 index 0000000..912e0eb Binary files /dev/null and b/assets/resources/Music/mudan_audio.mp3 differ diff --git a/assets/resources/Music/mudan_audio.mp3.meta b/assets/resources/Music/mudan_audio.mp3.meta new file mode 100644 index 0000000..8f1c443 --- /dev/null +++ b/assets/resources/Music/mudan_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "c2b82d71-e775-43c4-9ba6-650d7ac46c31", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.48898, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/mulan_audio.mp3 b/assets/resources/Music/mulan_audio.mp3 new file mode 100644 index 0000000..79bd584 Binary files /dev/null and b/assets/resources/Music/mulan_audio.mp3 differ diff --git a/assets/resources/Music/mulan_audio.mp3.meta b/assets/resources/Music/mulan_audio.mp3.meta new file mode 100644 index 0000000..f9a34a3 --- /dev/null +++ b/assets/resources/Music/mulan_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.48898, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/pugongying_audio.mp3 b/assets/resources/Music/pugongying_audio.mp3 new file mode 100644 index 0000000..247f811 Binary files /dev/null and b/assets/resources/Music/pugongying_audio.mp3 differ diff --git a/assets/resources/Music/pugongying_audio.mp3.meta b/assets/resources/Music/pugongying_audio.mp3.meta new file mode 100644 index 0000000..222ac8d --- /dev/null +++ b/assets/resources/Music/pugongying_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "b313152c-a590-406a-90f6-e78ca8cf99fa", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.645714, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/putao_audio.mp3 b/assets/resources/Music/putao_audio.mp3 new file mode 100644 index 0000000..c7e52c0 Binary files /dev/null and b/assets/resources/Music/putao_audio.mp3 differ diff --git a/assets/resources/Music/putao_audio.mp3.meta b/assets/resources/Music/putao_audio.mp3.meta new file mode 100644 index 0000000..86b14df --- /dev/null +++ b/assets/resources/Music/putao_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "b31b447b-2c35-46ea-bb6c-84952055fae8", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.515102, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/renshen_audio.mp3 b/assets/resources/Music/renshen_audio.mp3 new file mode 100644 index 0000000..de9a2c3 Binary files /dev/null and b/assets/resources/Music/renshen_audio.mp3 differ diff --git a/assets/resources/Music/renshen_audio.mp3.meta b/assets/resources/Music/renshen_audio.mp3.meta new file mode 100644 index 0000000..44c12c3 --- /dev/null +++ b/assets/resources/Music/renshen_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.515102, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/taozi_audio.mp3 b/assets/resources/Music/taozi_audio.mp3 new file mode 100644 index 0000000..4f165e0 Binary files /dev/null and b/assets/resources/Music/taozi_audio.mp3 differ diff --git a/assets/resources/Music/taozi_audio.mp3.meta b/assets/resources/Music/taozi_audio.mp3.meta new file mode 100644 index 0000000..2b016d0 --- /dev/null +++ b/assets/resources/Music/taozi_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "4fb5e673-7017-4a1a-bf48-92250446042d", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.567347, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/yes.mp3 b/assets/resources/Music/yes.mp3 new file mode 100644 index 0000000..4ded430 Binary files /dev/null and b/assets/resources/Music/yes.mp3 differ diff --git a/assets/resources/Music/yes.mp3.meta b/assets/resources/Music/yes.mp3.meta new file mode 100644 index 0000000..e41c8f5 --- /dev/null +++ b/assets/resources/Music/yes.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "92f37348-24a6-465c-b74a-0afda604dc3d", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 0.624, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Music/zhuye_audio.mp3 b/assets/resources/Music/zhuye_audio.mp3 new file mode 100644 index 0000000..fcd94bc Binary files /dev/null and b/assets/resources/Music/zhuye_audio.mp3 differ diff --git a/assets/resources/Music/zhuye_audio.mp3.meta b/assets/resources/Music/zhuye_audio.mp3.meta new file mode 100644 index 0000000..e0eda33 --- /dev/null +++ b/assets/resources/Music/zhuye_audio.mp3.meta @@ -0,0 +1,8 @@ +{ + "ver": "2.0.3", + "uuid": "9c9e6c09-6653-44b7-8a72-9eddc54c2425", + "importer": "audio-clip", + "downloadMode": 0, + "duration": 1.515102, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Rank.meta b/assets/resources/Rank.meta new file mode 100644 index 0000000..c57e640 --- /dev/null +++ b/assets/resources/Rank.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "571ada69-963a-415d-8f4a-bd6e19c68094", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Rank/rankUI.plist b/assets/resources/Rank/rankUI.plist new file mode 100644 index 0000000..59f5998 --- /dev/null +++ b/assets/resources/Rank/rankUI.plist @@ -0,0 +1,131 @@ + + + + + frames + + rank_icon1.png + + aliases + + spriteOffset + {0,0} + spriteSize + {66,66} + spriteSourceSize + {66,66} + textureRect + {{853,1},{66,66}} + textureRotated + + + rank_icon2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {66,66} + spriteSourceSize + {66,66} + textureRect + {{921,1},{66,66}} + textureRotated + + + rank_icon3.png + + aliases + + spriteOffset + {0,0} + spriteSize + {66,66} + spriteSourceSize + {66,66} + textureRect + {{853,69},{66,66}} + textureRotated + + + rank_other.png + + aliases + + spriteOffset + {0,0} + spriteSize + {750,30} + spriteSourceSize + {750,30} + textureRect + {{1,123},{750,30}} + textureRotated + + + rank_phoneBg.png + + aliases + + spriteOffset + {0,0} + spriteSize + {98,129} + spriteSourceSize + {98,129} + textureRect + {{753,1},{98,129}} + textureRotated + + + rank_self.png + + aliases + + spriteOffset + {0,0} + spriteSize + {750,120} + spriteSourceSize + {750,120} + textureRect + {{1,1},{750,120}} + textureRotated + + + rank_share.png + + aliases + + spriteOffset + {0,0} + spriteSize + {36,36} + spriteSourceSize + {36,36} + textureRect + {{921,69},{36,36}} + textureRotated + + + + metadata + + format + 3 + pixelFormat + RGBA8888 + premultiplyAlpha + + realTextureFileName + rankUI.png + size + {988,154} + smartupdate + $TexturePacker:SmartUpdate:5341b601eefa087d2cb306ba3bf8ebc1:1ca3b704db99ddd15d8f7c856a8c4d9f:e78f5013a428c1be0767af4d62c87be1$ + textureFileName + rankUI.png + + + diff --git a/assets/resources/Rank/rankUI.plist.meta b/assets/resources/Rank/rankUI.plist.meta new file mode 100644 index 0000000..27ee0e1 --- /dev/null +++ b/assets/resources/Rank/rankUI.plist.meta @@ -0,0 +1,174 @@ +{ + "ver": "1.2.6", + "uuid": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "importer": "asset", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "size": { + "width": 988, + "height": 154 + }, + "type": "Texture Packer", + "subMetas": { + "rank_icon1.png": { + "ver": "1.0.6", + "uuid": "4f8a74d6-8e87-4734-9df3-90027b702649", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 853, + "trimY": 1, + "width": 66, + "height": 66, + "rawWidth": 66, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_icon2.png": { + "ver": "1.0.6", + "uuid": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 921, + "trimY": 1, + "width": 66, + "height": 66, + "rawWidth": 66, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_icon3.png": { + "ver": "1.0.6", + "uuid": "515ff941-a6d1-421a-9243-249091fc5b1d", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 853, + "trimY": 69, + "width": 66, + "height": 66, + "rawWidth": 66, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_other.png": { + "ver": "1.0.6", + "uuid": "e30f966f-d546-44a0-9ee4-ba5745d69daa", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 123, + "width": 750, + "height": 30, + "rawWidth": 750, + "rawHeight": 30, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_phoneBg.png": { + "ver": "1.0.6", + "uuid": "700fa527-a104-4d31-846a-99ebc1c5803a", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 753, + "trimY": 1, + "width": 98, + "height": 129, + "rawWidth": 98, + "rawHeight": 129, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_self.png": { + "ver": "1.0.6", + "uuid": "5d5398c4-b3d5-4045-910e-1bfa6fed47ea", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 1, + "width": 750, + "height": 120, + "rawWidth": 750, + "rawHeight": 120, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_share.png": { + "ver": "1.0.6", + "uuid": "df04b74d-9f23-4e49-a2a0-388f63ce0f2f", + "importer": "sprite-frame", + "rawTextureUuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 921, + "trimY": 69, + "width": 36, + "height": 36, + "rawWidth": 36, + "rawHeight": 36, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Rank/rankUI.png b/assets/resources/Rank/rankUI.png new file mode 100644 index 0000000..a1e8f0a Binary files /dev/null and b/assets/resources/Rank/rankUI.png differ diff --git a/assets/resources/Rank/rankUI.png.meta b/assets/resources/Rank/rankUI.png.meta new file mode 100644 index 0000000..e0e038e --- /dev/null +++ b/assets/resources/Rank/rankUI.png.meta @@ -0,0 +1,15 @@ +{ + "ver": "2.3.7", + "uuid": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "importer": "texture", + "type": "raw", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 988, + "height": 154, + "platformSettings": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Spine.meta b/assets/resources/Spine.meta new file mode 100644 index 0000000..e37af98 --- /dev/null +++ b/assets/resources/Spine.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "856e2656-6026-44ae-a133-60ab71e7a805", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Spine/hand.atlas b/assets/resources/Spine/hand.atlas new file mode 100644 index 0000000..c30494c --- /dev/null +++ b/assets/resources/Spine/hand.atlas @@ -0,0 +1,20 @@ + +hand.png +size: 256,128 +format: RGBA8888 +filter: Linear,Linear +repeat: none +0 + rotate: false + xy: 107, 59 + size: 67, 67 + orig: 67, 67 + offset: 0, 0 + index: -1 +1 + rotate: false + xy: 2, 2 + size: 103, 124 + orig: 103, 124 + offset: 0, 0 + index: -1 diff --git a/assets/resources/Spine/hand.atlas.meta b/assets/resources/Spine/hand.atlas.meta new file mode 100644 index 0000000..e81879d --- /dev/null +++ b/assets/resources/Spine/hand.atlas.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.3", + "uuid": "c69b98b6-ff41-4bbe-84d3-93808dbc9ddf", + "importer": "asset", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Spine/hand.json b/assets/resources/Spine/hand.json new file mode 100644 index 0000000..a1a6f91 --- /dev/null +++ b/assets/resources/Spine/hand.json @@ -0,0 +1,127 @@ +{ +"skeleton": { + "hash": "/Glc657HgCwGQfMxhqvoEP7O3Ko", + "spine": "3.6.52", + "width": 103, + "height": 151.04, + "images": "/Users/liangjiacheng/Desktop/basketball_hand" +}, +"bones": [ + { "name": "root" }, + { "name": "0", "parent": "root", "y": 104.49 }, + { "name": "1", "parent": "root", "length": 85.43, "rotation": 90.24, "x": 6.71, "y": 0.03 } +], +"slots": [ + { "name": "1", "bone": "1", "attachment": "1" }, + { "name": "0", "bone": "0", "attachment": "0" } +], +"skins": { + "default": { + "0": { + "0": { "rotation": 90.24, "width": 67, "height": 67 } + }, + "1": { + "1": { "x": 49.07, "y": 1.21, "rotation": -90.24, "width": 103, "height": 124 } + } + } +}, +"animations": { + "animation": { + "slots": { + "0": { + "color": [ + { "time": 0, "color": "ffffff00", "curve": "stepped" }, + { "time": 0.3333, "color": "ffffff00" }, + { "time": 0.5, "color": "ffffffff" }, + { "time": 0.6333, "color": "ffffff00" } + ], + "attachment": [ + { "time": 0, "name": "0" }, + { "time": 0.3333, "name": "0" }, + { "time": 0.6333, "name": "0" }, + { "time": 0.7, "name": "0" } + ] + }, + "1": { + "attachment": [ + { "time": 0, "name": "1" }, + { "time": 0.4, "name": "1" }, + { "time": 0.7, "name": "1" } + ] + } + }, + "bones": { + "1": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.4, "angle": 0, "curve": "stepped" }, + { "time": 0.7, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1 }, + { "time": 0.1667, "x": 1.569, "y": 1.569 }, + { "time": 0.3333, "x": 0.955, "y": 0.955 }, + { "time": 0.4, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1 } + ], + "shear": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.4, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ] + }, + "0": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.3333, "angle": 0, "curve": "stepped" }, + { "time": 0.7, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3333, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.3333, "x": 1, "y": 1 }, + { "time": 0.6333, "x": 1.973, "y": 1.973, "curve": "stepped" }, + { "time": 0.7, "x": 1.973, "y": 1.973 } + ], + "shear": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.3333, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ] + }, + "root": { + "rotate": [ + { "time": 0, "angle": 0, "curve": "stepped" }, + { "time": 0.7, "angle": 0 } + ], + "translate": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ], + "scale": [ + { "time": 0, "x": 1, "y": 1, "curve": "stepped" }, + { "time": 0.7, "x": 1, "y": 1 } + ], + "shear": [ + { "time": 0, "x": 0, "y": 0, "curve": "stepped" }, + { "time": 0.7, "x": 0, "y": 0 } + ] + } + }, + "drawOrder": [ + { "time": 0 }, + { "time": 0.4 }, + { "time": 0.7 } + ] + } +} +} \ No newline at end of file diff --git a/assets/resources/Spine/hand.json.meta b/assets/resources/Spine/hand.json.meta new file mode 100644 index 0000000..8efdfc2 --- /dev/null +++ b/assets/resources/Spine/hand.json.meta @@ -0,0 +1,10 @@ +{ + "ver": "1.2.5", + "uuid": "3941fdae-279a-48d8-a746-5c5519731a80", + "importer": "spine", + "textures": [ + "4b49cd83-b149-43f7-925f-f80540e80749" + ], + "scale": 1, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Spine/hand.png b/assets/resources/Spine/hand.png new file mode 100644 index 0000000..c9f199e Binary files /dev/null and b/assets/resources/Spine/hand.png differ diff --git a/assets/resources/Spine/hand.png.meta b/assets/resources/Spine/hand.png.meta new file mode 100644 index 0000000..24368d6 --- /dev/null +++ b/assets/resources/Spine/hand.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "4b49cd83-b149-43f7-925f-f80540e80749", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 256, + "height": 128, + "platformSettings": {}, + "subMetas": { + "hand": { + "ver": "1.0.6", + "uuid": "7ed2037c-3eb8-4f03-a2e1-5ab3e81ca34e", + "importer": "sprite-frame", + "rawTextureUuid": "4b49cd83-b149-43f7-925f-f80540e80749", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -40, + "offsetY": 0, + "trimX": 2, + "trimY": 2, + "width": 172, + "height": 124, + "rawWidth": 256, + "rawHeight": 128, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Ui.meta b/assets/resources/Ui.meta new file mode 100644 index 0000000..329b75e --- /dev/null +++ b/assets/resources/Ui.meta @@ -0,0 +1,13 @@ +{ + "ver": "1.1.3", + "uuid": "7860ffbb-49ff-4d2b-b389-fea8edff5d11", + "importer": "folder", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Ui/Food.plist b/assets/resources/Ui/Food.plist new file mode 100644 index 0000000..2cae4fb --- /dev/null +++ b/assets/resources/Ui/Food.plist @@ -0,0 +1,371 @@ + + + + + frames + + prop_baishao.png + + aliases + + spriteOffset + {-5,9} + spriteSize + {428,378} + spriteSourceSize + {442,442} + textureRect + {{425,813},{428,378}} + textureRotated + + + prop_cha.png + + aliases + + spriteOffset + {-6,0} + spriteSize + {428,338} + spriteSourceSize + {442,442} + textureRect + {{1223,863},{428,338}} + textureRotated + + + prop_chixiaodou.png + + aliases + + spriteOffset + {-2,3} + spriteSize + {420,370} + spriteSourceSize + {442,442} + textureRect + {{417,1193},{420,370}} + textureRotated + + + prop_danggui.png + + aliases + + spriteOffset + {-4,16} + spriteSize + {414,390} + spriteSourceSize + {442,442} + textureRect + {{1,825},{414,390}} + textureRotated + + + prop_danshen.png + + aliases + + spriteOffset + {-7,15} + spriteSize + {422,386} + spriteSourceSize + {442,442} + textureRect + {{1,437},{422,386}} + textureRotated + + + prop_dazao.png + + aliases + + spriteOffset + {-1,6} + spriteSize + {426,342} + spriteSourceSize + {442,442} + textureRect + {{1315,1},{426,342}} + textureRotated + + + prop_gancao.png + + aliases + + spriteOffset + {-4,1} + spriteSize + {434,434} + spriteSourceSize + {442,442} + textureRect + {{1,1},{434,434}} + textureRotated + + + prop_ganjiang.png + + aliases + + spriteOffset + {-11,4} + spriteSize + {382,300} + spriteSourceSize + {442,442} + textureRect + {{385,1565},{382,300}} + textureRotated + + + prop_gouqi.png + + aliases + + spriteOffset + {0,-12} + spriteSize + {442,390} + spriteSourceSize + {442,442} + textureRect + {{875,403},{442,390}} + textureRotated + + + prop_jingjie.png + + aliases + + spriteOffset + {-4,1} + spriteSize + {434,434} + spriteSourceSize + {442,442} + textureRect + {{1,1},{434,434}} + textureRotated + + + prop_jinju.png + + aliases + + spriteOffset + {-4,21} + spriteSize + {432,380} + spriteSourceSize + {442,442} + textureRect + {{437,431},{432,380}} + textureRotated + + + prop_lizhi.png + + aliases + + spriteOffset + {-13,-5} + spriteSize + {322,350} + spriteSourceSize + {442,442} + textureRect + {{769,1565},{322,350}} + textureRotated + + + prop_lizi.png + + aliases + + spriteOffset + {-4,1} + spriteSize + {434,434} + spriteSourceSize + {442,442} + textureRect + {{1,1},{434,434}} + textureRotated + + + prop_longyan.png + + aliases + + spriteOffset + {-13,13} + spriteSize + {416,338} + spriteSourceSize + {442,442} + textureRect + {{1249,1545},{416,338}} + textureRotated + + + prop_moli.png + + aliases + + spriteOffset + {-7,3} + spriteSize + {428,436} + spriteSourceSize + {442,442} + textureRect + {{437,1},{428,436}} + textureRotated + + + prop_muchai.png + + aliases + + spriteOffset + {-6,4} + spriteSize + {408,268} + spriteSourceSize + {442,442} + textureRect + {{839,1291},{408,268}} + textureRotated + + + prop_mudan.png + + aliases + + spriteOffset + {-4,1} + spriteSize + {434,434} + spriteSourceSize + {442,442} + textureRect + {{1,1},{434,434}} + textureRotated + + + prop_mulan.png + + aliases + + spriteOffset + {-4,1} + spriteSize + {434,434} + spriteSourceSize + {442,442} + textureRect + {{1,1},{434,434}} + textureRotated + + + prop_pugongying.png + + aliases + + spriteOffset + {-2,6} + spriteSize + {438,400} + spriteSourceSize + {442,442} + textureRect + {{875,1},{438,400}} + textureRotated + + + prop_putao.png + + aliases + + spriteOffset + {12,-5} + spriteSize + {418,340} + spriteSourceSize + {442,442} + textureRect + {{1249,1203},{418,340}} + textureRotated + + + prop_renshen.png + + aliases + + spriteOffset + {0,14} + spriteSize + {442,366} + spriteSourceSize + {442,442} + textureRect + {{855,847},{442,366}} + textureRotated + + + prop_taozi.png + + aliases + + spriteOffset + {-16,-15} + spriteSize + {382,382} + spriteSourceSize + {442,442} + textureRect + {{1,1217},{382,382}} + textureRotated + + + prop_zhuye.png + + aliases + + spriteOffset + {-4,4} + spriteSize + {432,388} + spriteSourceSize + {442,442} + textureRect + {{1267,429},{432,388}} + textureRotated + + + + metadata + + format + 3 + pixelFormat + RGBA8888 + premultiplyAlpha + + realTextureFileName + Food.png + size + {1668,1888} + smartupdate + $TexturePacker:SmartUpdate:19c72317a840cdcde7cad014799b6eb6:6cd875bb7d66a2681825358019f17b10:163e62934c25e06ca257725760fde093$ + textureFileName + Food.png + + + diff --git a/assets/resources/Ui/Food.plist.meta b/assets/resources/Ui/Food.plist.meta new file mode 100644 index 0000000..4ec09e0 --- /dev/null +++ b/assets/resources/Ui/Food.plist.meta @@ -0,0 +1,542 @@ +{ + "ver": "1.2.6", + "uuid": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "importer": "asset", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "size": { + "width": 1668, + "height": 1888 + }, + "type": "Texture Packer", + "subMetas": { + "prop_baishao.png": { + "ver": "1.0.6", + "uuid": "190debeb-3bf5-4344-924e-d0258863a8f4", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -5, + "offsetY": 9, + "trimX": 425, + "trimY": 813, + "width": 428, + "height": 378, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_cha.png": { + "ver": "1.0.6", + "uuid": "43cc7ea5-4a81-400c-99b2-f71529750198", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -6, + "offsetY": 0, + "trimX": 1223, + "trimY": 863, + "width": 428, + "height": 338, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_chixiaodou.png": { + "ver": "1.0.6", + "uuid": "13257b60-7625-49be-b312-8089bb4a8c73", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -2, + "offsetY": 3, + "trimX": 417, + "trimY": 1193, + "width": 420, + "height": 370, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_danggui.png": { + "ver": "1.0.6", + "uuid": "14dccec6-9a4f-4e26-9afd-fea06f3a2a62", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 16, + "trimX": 1, + "trimY": 825, + "width": 414, + "height": 390, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_danshen.png": { + "ver": "1.0.6", + "uuid": "be8f26d8-90f0-4b73-884c-96fe8c8a47ef", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -7, + "offsetY": 15, + "trimX": 1, + "trimY": 437, + "width": 422, + "height": 386, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_dazao.png": { + "ver": "1.0.6", + "uuid": "17ff98a7-726f-4fc9-a55a-c9f8f97aef1b", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 6, + "trimX": 1315, + "trimY": 1, + "width": 426, + "height": 342, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_gancao.png": { + "ver": "1.0.6", + "uuid": "20ec22dc-cd80-453a-9207-b7f462ac8a34", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 1, + "trimX": 1, + "trimY": 1, + "width": 434, + "height": 434, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_ganjiang.png": { + "ver": "1.0.6", + "uuid": "b4a90350-0463-403c-b8cc-0248f3122578", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -11, + "offsetY": 4, + "trimX": 385, + "trimY": 1565, + "width": 382, + "height": 300, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_gouqi.png": { + "ver": "1.0.6", + "uuid": "42c04718-9864-407c-98cc-b7c2f4fbb863", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": -12, + "trimX": 875, + "trimY": 403, + "width": 442, + "height": 390, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_jingjie.png": { + "ver": "1.0.6", + "uuid": "92e33d3e-0c8a-4cd5-acc6-d0b74cde43d5", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 1, + "trimX": 1, + "trimY": 1, + "width": 434, + "height": 434, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_jinju.png": { + "ver": "1.0.6", + "uuid": "5ab44f42-4596-44da-8a5f-69ab9d0dd69b", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 21, + "trimX": 437, + "trimY": 431, + "width": 432, + "height": 380, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_lizhi.png": { + "ver": "1.0.6", + "uuid": "07ea10be-6262-4ace-be21-526e4501b6e5", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -13, + "offsetY": -5, + "trimX": 769, + "trimY": 1565, + "width": 322, + "height": 350, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_lizi.png": { + "ver": "1.0.6", + "uuid": "a152c3fc-1a82-4ac3-bfbc-6a9af534d570", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 1, + "trimX": 1, + "trimY": 1, + "width": 434, + "height": 434, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_longyan.png": { + "ver": "1.0.6", + "uuid": "12a36c58-641a-4690-8931-dc81a20f2012", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -13, + "offsetY": 13, + "trimX": 1249, + "trimY": 1545, + "width": 416, + "height": 338, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_moli.png": { + "ver": "1.0.6", + "uuid": "cf15cbaa-3813-433e-93de-23e5ac8de6ba", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -7, + "offsetY": 3, + "trimX": 437, + "trimY": 1, + "width": 428, + "height": 436, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_muchai.png": { + "ver": "1.0.6", + "uuid": "4f70a9c4-5fe2-4aa3-9d88-0b46bcf64f05", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -6, + "offsetY": 4, + "trimX": 839, + "trimY": 1291, + "width": 408, + "height": 268, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_mudan.png": { + "ver": "1.0.6", + "uuid": "a1c18cea-6961-4a68-84d0-8a59528bb0dd", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 1, + "trimX": 1, + "trimY": 1, + "width": 434, + "height": 434, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_mulan.png": { + "ver": "1.0.6", + "uuid": "fbb1e48a-b0be-4b1e-877c-89a20b0e0d2f", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -4, + "offsetY": 1, + "trimX": 1, + "trimY": 1, + "width": 434, + "height": 434, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_pugongying.png": { + "ver": "1.0.6", + "uuid": "d1bf6c39-ac09-4ccc-8723-0dc71b8b04a9", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -2, + "offsetY": 6, + "trimX": 875, + "trimY": 1, + "width": 438, + "height": 400, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_putao.png": { + "ver": "1.0.6", + "uuid": "ba2df8a8-50d3-49d9-a19d-c5d4233a8bf2", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 12, + "offsetY": -5, + "trimX": 1249, + "trimY": 1203, + "width": 418, + "height": 340, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_renshen.png": { + "ver": "1.0.6", + "uuid": "5fe73fd9-beb1-4bcb-942e-6e61e5d1c107", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 14, + "trimX": 855, + "trimY": 847, + "width": 442, + "height": 366, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_taozi.png": { + "ver": "1.0.6", + "uuid": "ca25e50f-5fc1-42b4-996d-d022ebfd6010", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -16, + "offsetY": -15, + "trimX": 1, + "trimY": 1217, + "width": 382, + "height": 382, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "prop_zhuye.png": { + "ver": "1.0.6", + "uuid": "a332f672-0dc8-4637-8bef-31bec33425bc", + "importer": "sprite-frame", + "rawTextureUuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -4, + "offsetY": 4, + "trimX": 1267, + "trimY": 429, + "width": 432, + "height": 388, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Ui/Food.png b/assets/resources/Ui/Food.png new file mode 100644 index 0000000..5708dea Binary files /dev/null and b/assets/resources/Ui/Food.png differ diff --git a/assets/resources/Ui/Food.png.meta b/assets/resources/Ui/Food.png.meta new file mode 100644 index 0000000..63575b7 --- /dev/null +++ b/assets/resources/Ui/Food.png.meta @@ -0,0 +1,15 @@ +{ + "ver": "2.3.7", + "uuid": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "importer": "texture", + "type": "raw", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 1668, + "height": 1888, + "platformSettings": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Ui/labelBg.png b/assets/resources/Ui/labelBg.png new file mode 100644 index 0000000..ceb993c Binary files /dev/null and b/assets/resources/Ui/labelBg.png differ diff --git a/assets/resources/Ui/labelBg.png.meta b/assets/resources/Ui/labelBg.png.meta new file mode 100644 index 0000000..83ba682 --- /dev/null +++ b/assets/resources/Ui/labelBg.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "4fb7b659-6b73-4357-bfec-854837d7ff67", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 713, + "height": 324, + "platformSettings": {}, + "subMetas": { + "labelBg": { + "ver": "1.0.6", + "uuid": "f9992ab9-caa0-462c-8baf-6908677fd296", + "importer": "sprite-frame", + "rawTextureUuid": "4fb7b659-6b73-4357-bfec-854837d7ff67", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 713, + "height": 324, + "rawWidth": 713, + "rawHeight": 324, + "borderTop": 20, + "borderBottom": 20, + "borderLeft": 60, + "borderRight": 60, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Ui/publicUI.plist b/assets/resources/Ui/publicUI.plist new file mode 100644 index 0000000..1200ae4 --- /dev/null +++ b/assets/resources/Ui/publicUI.plist @@ -0,0 +1,641 @@ + + + + + frames + + Clock.png + + aliases + + spriteOffset + {0,7} + spriteSize + {188,225} + spriteSourceSize + {188,239} + textureRect + {{727,620},{188,225}} + textureRotated + + + Firewood.png + + aliases + + spriteOffset + {0,0} + spriteSize + {141,157} + spriteSourceSize + {141,157} + textureRect + {{1550,464},{141,157}} + textureRotated + + + againBtn.png + + aliases + + spriteOffset + {0,1} + spriteSize + {156,38} + spriteSourceSize + {458,70} + textureRect + {{1550,607},{156,38}} + textureRotated + + + again_Label.png + + aliases + + spriteOffset + {0,1} + spriteSize + {156,38} + spriteSourceSize + {458,70} + textureRect + {{1550,607},{156,38}} + textureRotated + + + back.png + + aliases + + spriteOffset + {-1,0} + spriteSize + {28,40} + spriteSourceSize + {40,40} + textureRect + {{1047,415},{28,40}} + textureRotated + + + ball0.png + + aliases + + spriteOffset + {0,0} + spriteSize + {66,66} + spriteSourceSize + {66,66} + textureRect + {{1630,785},{66,66}} + textureRotated + + + beginLabel.png + + aliases + + spriteOffset + {0,0} + spriteSize + {318,203} + spriteSourceSize + {318,203} + textureRect + {{727,415},{318,203}} + textureRotated + + + btn_begin.png + + aliases + + spriteOffset + {0,0} + spriteSize + {654,93} + spriteSourceSize + {654,93} + textureRect + {{1,723},{654,93}} + textureRotated + + + btn_err.png + + aliases + + spriteOffset + {0,0} + spriteSize + {501,85} + spriteSourceSize + {501,85} + textureRect + {{1077,290},{501,85}} + textureRotated + + + btn_nomal.png + + aliases + + spriteOffset + {0,0} + spriteSize + {501,85} + spriteSourceSize + {501,85} + textureRect + {{1077,377},{501,85}} + textureRotated + + + btn_tip.png + + aliases + + spriteOffset + {0,0} + spriteSize + {501,85} + spriteSourceSize + {501,85} + textureRect + {{1047,464},{501,85}} + textureRotated + + + btn_yes.png + + aliases + + spriteOffset + {0,0} + spriteSize + {501,85} + spriteSourceSize + {501,85} + textureRect + {{1047,551},{501,85}} + textureRotated + + + err1.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {117,38} + spriteSourceSize + {501,70} + textureRect + {{727,810},{117,38}} + textureRotated + + + err2.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1174,638},{235,38}} + textureRotated + + + err3.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1214,638},{235,38}} + textureRotated + + + finishi.png + + aliases + + spriteOffset + {0,0} + spriteSize + {552,204} + spriteSourceSize + {552,204} + textureRect + {{1077,1},{552,204}} + textureRotated + + + finishi_Bg.png + + aliases + + spriteOffset + {0,0} + spriteSize + {580,37} + spriteSourceSize + {580,37} + textureRect + {{1,818},{580,37}} + textureRotated + + + fire1.png + + aliases + + spriteOffset + {0,-9} + spriteSize + {104,72} + spriteSourceSize + {152,90} + textureRect + {{1414,766},{104,72}} + textureRotated + + + fire2.png + + aliases + + spriteOffset + {-1,-14} + spriteSize + {104,62} + spriteSourceSize + {152,90} + textureRect + {{846,810},{104,62}} + textureRotated + + + fire3.png + + aliases + + spriteOffset + {0,-14} + spriteSize + {104,62} + spriteSourceSize + {152,90} + textureRect + {{1620,281},{104,62}} + textureRotated + + + fire4.png + + aliases + + spriteOffset + {-1,-11} + spriteSize + {106,68} + spriteSourceSize + {152,90} + textureRect + {{657,723},{106,68}} + textureRotated + + + fire5.png + + aliases + + spriteOffset + {-1,-10} + spriteSize + {106,70} + spriteSourceSize + {152,90} + textureRect + {{1631,105},{106,70}} + textureRotated + + + fire6.png + + aliases + + spriteOffset + {-1,-12} + spriteSize + {106,66} + spriteSourceSize + {152,90} + textureRect + {{1587,213},{106,66}} + textureRotated + + + fire7.png + + aliases + + spriteOffset + {-1,-13} + spriteSize + {108,64} + spriteSourceSize + {152,90} + textureRect + {{1520,785},{108,64}} + textureRotated + + + fire8.png + + aliases + + spriteOffset + {0,-7} + spriteSize + {102,76} + spriteSourceSize + {152,90} + textureRect + {{1631,1},{102,76}} + textureRotated + + + fire_Bg.png + + aliases + + spriteOffset + {0,-17} + spriteSize + {152,56} + spriteSourceSize + {152,90} + textureRect + {{1542,647},{152,56}} + textureRotated + + + guang.png + + aliases + + spriteOffset + {0,0} + spriteSize + {724,720} + spriteSourceSize + {724,720} + textureRect + {{1,1},{724,720}} + textureRotated + + + needle.png + + aliases + + spriteOffset + {0,0} + spriteSize + {12,40} + spriteSourceSize + {12,40} + textureRect + {{1695,213},{12,40}} + textureRotated + + + nomal1.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {117,38} + spriteSourceSize + {501,70} + textureRect + {{1542,745},{117,38}} + textureRotated + + + nomal2.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1254,638},{235,38}} + textureRotated + + + nomal3.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1294,638},{235,38}} + textureRotated + + + play_test.png + + aliases + + spriteOffset + {0,0} + spriteSize + {218,218} + spriteSourceSize + {218,218} + textureRect + {{954,638},{218,218}} + textureRotated + + + rankBtn.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {156,38} + spriteSourceSize + {458,70} + textureRect + {{1542,705},{156,38}} + textureRotated + + + rankBtn2.png + + aliases + + spriteOffset + {0,0} + spriteSize + {126,126} + spriteSourceSize + {126,126} + textureRect + {{1414,638},{126,126}} + textureRotated + + + rank_Label.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {156,38} + spriteSourceSize + {458,70} + textureRect + {{1542,705},{156,38}} + textureRotated + + + tipKuang.png + + aliases + + spriteOffset + {0,0} + spriteSize + {508,81} + spriteSourceSize + {508,81} + textureRect + {{1077,207},{508,81}} + textureRotated + + + tip_Line.png + + aliases + + spriteOffset + {0,0} + spriteSize + {67,16} + spriteSourceSize + {67,16} + textureRect + {{1,857},{67,16}} + textureRotated + + + voice.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {348,412} + spriteSourceSize + {442,442} + textureRect + {{727,1},{348,412}} + textureRotated + + + yes1.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {117,38} + spriteSourceSize + {501,70} + textureRect + {{1580,290},{117,38}} + textureRotated + + + yes2.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1334,638},{235,38}} + textureRotated + + + yes3.png + + aliases + + spriteOffset + {-1,1} + spriteSize + {235,38} + spriteSourceSize + {501,70} + textureRect + {{1374,638},{235,38}} + textureRotated + + + + metadata + + format + 3 + pixelFormat + RGBA8888 + premultiplyAlpha + + realTextureFileName + publicUI.png + size + {1708,874} + smartupdate + $TexturePacker:SmartUpdate:402fb07b06b289da1dc614ab677d2b68:7579b45183131d2eaf53a0368aab34a4:1c7d81f68058ada321959f2296017bb5$ + textureFileName + publicUI.png + + + diff --git a/assets/resources/Ui/publicUI.plist.meta b/assets/resources/Ui/publicUI.plist.meta new file mode 100644 index 0000000..a022730 --- /dev/null +++ b/assets/resources/Ui/publicUI.plist.meta @@ -0,0 +1,956 @@ +{ + "ver": "1.2.6", + "uuid": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "importer": "asset", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "size": { + "width": 1708, + "height": 874 + }, + "type": "Texture Packer", + "subMetas": { + "Clock.png": { + "ver": "1.0.6", + "uuid": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 7, + "trimX": 727, + "trimY": 620, + "width": 188, + "height": 225, + "rawWidth": 188, + "rawHeight": 239, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "Firewood.png": { + "ver": "1.0.6", + "uuid": "1b4aa157-8271-4bd0-a922-e19f452d86fc", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": 0, + "trimX": 1550, + "trimY": 464, + "width": 141, + "height": 157, + "rawWidth": 141, + "rawHeight": 157, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "againBtn.png": { + "ver": "1.0.6", + "uuid": "9b794c5b-0c52-4264-a891-fe6a85f8cebd", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 1, + "trimX": 1550, + "trimY": 607, + "width": 156, + "height": 38, + "rawWidth": 458, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "again_Label.png": { + "ver": "1.0.6", + "uuid": "75ceffef-e469-4845-80bd-e0052840d248", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 1, + "trimX": 1550, + "trimY": 607, + "width": 156, + "height": 38, + "rawWidth": 458, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "back.png": { + "ver": "1.0.6", + "uuid": "43c83a99-6be0-468f-a894-1b624f3d33ac", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 0, + "trimX": 1047, + "trimY": 415, + "width": 28, + "height": 40, + "rawWidth": 40, + "rawHeight": 40, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "ball0.png": { + "ver": "1.0.6", + "uuid": "09f3b49a-507f-485e-b8bf-809f98dd4923", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1630, + "trimY": 785, + "width": 66, + "height": 66, + "rawWidth": 66, + "rawHeight": 66, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "beginLabel.png": { + "ver": "1.0.6", + "uuid": "04421a0b-266e-4d13-81df-1873ef3c4a83", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 727, + "trimY": 415, + "width": 318, + "height": 203, + "rawWidth": 318, + "rawHeight": 203, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "btn_begin.png": { + "ver": "1.0.6", + "uuid": "57e85453-6997-4242-babb-705697538e98", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 723, + "width": 654, + "height": 93, + "rawWidth": 654, + "rawHeight": 93, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "btn_err.png": { + "ver": "1.0.6", + "uuid": "a390474d-52da-4752-9fb1-ca5cd89c3f65", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1077, + "trimY": 290, + "width": 501, + "height": 85, + "rawWidth": 501, + "rawHeight": 85, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "btn_nomal.png": { + "ver": "1.0.6", + "uuid": "e9602a96-91d1-4a65-98a8-f81745ace7f0", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1077, + "trimY": 377, + "width": 501, + "height": 85, + "rawWidth": 501, + "rawHeight": 85, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "btn_tip.png": { + "ver": "1.0.6", + "uuid": "9227615d-1b3f-416c-884d-e33612d57b2e", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1047, + "trimY": 464, + "width": 501, + "height": 85, + "rawWidth": 501, + "rawHeight": 85, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "btn_yes.png": { + "ver": "1.0.6", + "uuid": "69127bde-cd60-4ff4-861e-6ea16ccb72d3", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1047, + "trimY": 551, + "width": 501, + "height": 85, + "rawWidth": 501, + "rawHeight": 85, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "err1.png": { + "ver": "1.0.6", + "uuid": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 1, + "trimX": 727, + "trimY": 810, + "width": 117, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "err2.png": { + "ver": "1.0.6", + "uuid": "384ed9a2-ff39-41fd-a3dd-0df283e2e159", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1174, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "err3.png": { + "ver": "1.0.6", + "uuid": "6e0248f6-ea55-4252-beaa-62736bc53ad7", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1214, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "finishi.png": { + "ver": "1.0.6", + "uuid": "ecd8b796-cf3d-45e6-ab5d-99906ff68426", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1077, + "trimY": 1, + "width": 552, + "height": 204, + "rawWidth": 552, + "rawHeight": 204, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "finishi_Bg.png": { + "ver": "1.0.6", + "uuid": "0a9b51e5-23bb-4902-bd02-0b3f91e60173", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 818, + "width": 580, + "height": 37, + "rawWidth": 580, + "rawHeight": 37, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire1.png": { + "ver": "1.0.6", + "uuid": "419712bd-00e6-4352-97bc-105ab199d852", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": -9, + "trimX": 1414, + "trimY": 766, + "width": 104, + "height": 72, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire2.png": { + "ver": "1.0.6", + "uuid": "eef1f6ad-ae7d-4f74-ab87-cd4c81dea072", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": -14, + "trimX": 846, + "trimY": 810, + "width": 104, + "height": 62, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire3.png": { + "ver": "1.0.6", + "uuid": "6999b621-4a9f-4a89-970f-4f6637f6ebe1", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": -14, + "trimX": 1620, + "trimY": 281, + "width": 104, + "height": 62, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire4.png": { + "ver": "1.0.6", + "uuid": "24bb96d6-d160-419c-89a8-8f1a1e203491", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": -11, + "trimX": 657, + "trimY": 723, + "width": 106, + "height": 68, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire5.png": { + "ver": "1.0.6", + "uuid": "5fead804-1827-4c8d-9b89-c09849aeed4e", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": -10, + "trimX": 1631, + "trimY": 105, + "width": 106, + "height": 70, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire6.png": { + "ver": "1.0.6", + "uuid": "e363a676-9b52-4402-b43a-37062f24c250", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": -12, + "trimX": 1587, + "trimY": 213, + "width": 106, + "height": 66, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire7.png": { + "ver": "1.0.6", + "uuid": "a67083f3-132b-4dc7-963c-af204012cd97", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": -13, + "trimX": 1520, + "trimY": 785, + "width": 108, + "height": 64, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire8.png": { + "ver": "1.0.6", + "uuid": "5256d2df-6e2d-4cac-9ac7-bd33add06053", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": 0, + "offsetY": -7, + "trimX": 1631, + "trimY": 1, + "width": 102, + "height": 76, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "fire_Bg.png": { + "ver": "1.0.6", + "uuid": "15c8df95-b7df-427c-b48c-57c1392d9e84", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": -17, + "trimX": 1542, + "trimY": 647, + "width": 152, + "height": 56, + "rawWidth": 152, + "rawHeight": 90, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "guang.png": { + "ver": "1.0.6", + "uuid": "7b0b1d20-5a1d-4723-8af8-50a47e841643", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 1, + "width": 724, + "height": 720, + "rawWidth": 724, + "rawHeight": 720, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "needle.png": { + "ver": "1.0.6", + "uuid": "8cf947ea-88e6-4326-a79d-4534335f4e32", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1695, + "trimY": 213, + "width": 12, + "height": 40, + "rawWidth": 12, + "rawHeight": 40, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "nomal1.png": { + "ver": "1.0.6", + "uuid": "b0746a9d-0822-49dd-8cf8-45afc1ee4652", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 1, + "trimX": 1542, + "trimY": 745, + "width": 117, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "nomal2.png": { + "ver": "1.0.6", + "uuid": "84a58691-6cbc-439b-8d29-46ae91fd4da3", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1254, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "nomal3.png": { + "ver": "1.0.6", + "uuid": "ba9907a5-b5ce-44c1-b93b-73fd9fed5ddb", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1294, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "play_test.png": { + "ver": "1.0.6", + "uuid": "ffa5a081-5040-487c-a153-4742d21bac1a", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 954, + "trimY": 638, + "width": 218, + "height": 218, + "rawWidth": 218, + "rawHeight": 218, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rankBtn.png": { + "ver": "1.0.6", + "uuid": "793be74f-dab6-4d93-a264-bb3fe5aae57c", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 1, + "trimX": 1542, + "trimY": 705, + "width": 156, + "height": 38, + "rawWidth": 458, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rankBtn2.png": { + "ver": "1.0.6", + "uuid": "5bb2b601-5166-425e-899d-d3a9b9663c04", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1414, + "trimY": 638, + "width": 126, + "height": 126, + "rawWidth": 126, + "rawHeight": 126, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "rank_Label.png": { + "ver": "1.0.6", + "uuid": "4d3e4edd-f44e-4e1a-8648-d173f746eea8", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 1, + "trimX": 1542, + "trimY": 705, + "width": 156, + "height": 38, + "rawWidth": 458, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "tipKuang.png": { + "ver": "1.0.6", + "uuid": "5797ba40-0232-4eca-8729-719373e39e8c", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1077, + "trimY": 207, + "width": 508, + "height": 81, + "rawWidth": 508, + "rawHeight": 81, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 62, + "borderRight": 64, + "spriteType": "normal", + "subMetas": {} + }, + "tip_Line.png": { + "ver": "1.0.6", + "uuid": "898c2010-408b-4389-8788-f8a7c4d9c4a1", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 1, + "trimY": 857, + "width": 67, + "height": 16, + "rawWidth": 67, + "rawHeight": 16, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "voice.png": { + "ver": "1.0.6", + "uuid": "794756c4-eeac-4a24-a412-4035d0719970", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": -1, + "offsetY": 1, + "trimX": 727, + "trimY": 1, + "width": 348, + "height": 412, + "rawWidth": 442, + "rawHeight": 442, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "yes1.png": { + "ver": "1.0.6", + "uuid": "8189af2f-6b70-497a-93a5-994048cb2e09", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1580, + "trimY": 290, + "width": 117, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "yes2.png": { + "ver": "1.0.6", + "uuid": "ec907644-5798-4db7-bbaa-3aeacc2150f4", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1334, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + }, + "yes3.png": { + "ver": "1.0.6", + "uuid": "ed566dcb-65eb-4702-8583-1bec1208b40d", + "importer": "sprite-frame", + "rawTextureUuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": true, + "offsetX": -1, + "offsetY": 1, + "trimX": 1374, + "trimY": 638, + "width": 235, + "height": 38, + "rawWidth": 501, + "rawHeight": 70, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "spriteType": "normal", + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/resources/Ui/publicUI.png b/assets/resources/Ui/publicUI.png new file mode 100644 index 0000000..f194663 Binary files /dev/null and b/assets/resources/Ui/publicUI.png differ diff --git a/assets/resources/Ui/publicUI.png.meta b/assets/resources/Ui/publicUI.png.meta new file mode 100644 index 0000000..7878e19 --- /dev/null +++ b/assets/resources/Ui/publicUI.png.meta @@ -0,0 +1,15 @@ +{ + "ver": "2.3.7", + "uuid": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "importer": "texture", + "type": "raw", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 1011, + "height": 1484, + "platformSettings": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/resources/Ui/rankBtn.png b/assets/resources/Ui/rankBtn.png new file mode 100644 index 0000000..0537a85 Binary files /dev/null and b/assets/resources/Ui/rankBtn.png differ diff --git a/assets/resources/Ui/rankBtn.png.meta b/assets/resources/Ui/rankBtn.png.meta new file mode 100644 index 0000000..086acc0 --- /dev/null +++ b/assets/resources/Ui/rankBtn.png.meta @@ -0,0 +1,38 @@ +{ + "ver": "2.3.7", + "uuid": "9a849051-bf1c-4d07-aaef-0994c636ed81", + "importer": "texture", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 126, + "height": 140, + "platformSettings": {}, + "subMetas": { + "rankBtn": { + "ver": "1.0.6", + "uuid": "ed354adc-1faf-4daa-b3de-776c0499090a", + "importer": "sprite-frame", + "rawTextureUuid": "9a849051-bf1c-4d07-aaef-0994c636ed81", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 126, + "height": 140, + "rawWidth": 126, + "rawHeight": 140, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/build-templates/splash.jpg b/build-templates/splash.jpg new file mode 100644 index 0000000..116d70f Binary files /dev/null and b/build-templates/splash.jpg differ diff --git a/build-templates/web-mobile/index.html b/build-templates/web-mobile/index.html new file mode 100644 index 0000000..2a671d0 --- /dev/null +++ b/build-templates/web-mobile/index.html @@ -0,0 +1,324 @@ + + + + + + + 思赞 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ Head Icon +
记忆力
+
+
+ Tag Icon +
+
+
+
+ Highlight Icon +
+
+
+ + + + + + + + + + + diff --git a/build-templates/web-mobile/main.js b/build-templates/web-mobile/main.js new file mode 100644 index 0000000..74fb887 --- /dev/null +++ b/build-templates/web-mobile/main.js @@ -0,0 +1,149 @@ +var remote_url="http://static.sparkus.cn/shoot-sun/assets/"; + +window.boot = function () { + var settings = window._CCSettings; + window._CCSettings = undefined; + var onProgress = null; + + // var RESOURCES = remote_url + cc.AssetManager.BuiltinBundleName.RESOURCES; + var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES; + var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL; + var MAIN = cc.AssetManager.BuiltinBundleName.MAIN; + function setLoadingDisplay () { + // Loading splash scene + var progressBar = document.getElementById('progress-bar'); + var progressIcon = document.getElementById('progress-icon'); + var progressContainer = document.querySelector('.progress-container'); + onProgress = function (finish, total) { + }; + cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () { + progressBar.style.display = 'none'; + progressIcon.style.display = 'none'; + progressContainer.style.display = 'none'; + }); + } + + var onStart = function () { + cc.view.enableRetina(true); + cc.view.resizeWithBrowserSize(true); + if (cc.sys.isBrowser) { + setLoadingDisplay(); + } + + if (cc.sys.isMobile) { + if (settings.orientation === 'landscape') { + cc.view.setOrientation(cc.macro.ORIENTATION_LANDSCAPE); + } + else if (settings.orientation === 'portrait') { + cc.view.setOrientation(cc.macro.ORIENTATION_PORTRAIT); + } + cc.view.enableAutoFullScreen([ + cc.sys.BROWSER_TYPE_BAIDU, + cc.sys.BROWSER_TYPE_BAIDU_APP, + cc.sys.BROWSER_TYPE_WECHAT, + cc.sys.BROWSER_TYPE_MOBILE_QQ, + cc.sys.BROWSER_TYPE_MIUI, + cc.sys.BROWSER_TYPE_HUAWEI, + cc.sys.BROWSER_TYPE_UC, + ].indexOf(cc.sys.browserType) < 0); + } + + // Limit downloading max concurrent task to 2, + // more tasks simultaneously may cause performance draw back on some android system / browsers. + // You can adjust the number based on your own test result, you have to set it before any loading process to take effect. + if (cc.sys.isBrowser && cc.sys.os === cc.sys.OS_ANDROID) { + cc.assetManager.downloader.maxConcurrency = 2; + cc.assetManager.downloader.maxRequestsPerFrame = 2; + } + + var launchScene = settings.launchScene; + var bundle = cc.assetManager.bundles.find(function (b) { + return b.getSceneInfo(launchScene); + }); + + bundle.loadScene(launchScene, null, onProgress, + function (err, scene) { + if (!err) { + cc.director.runSceneImmediate(scene); + if (cc.sys.isBrowser) { + // show canvas + var canvas = document.getElementById('GameCanvas'); + canvas.style.visibility = ''; + var div = document.getElementById('GameDiv'); + if (div) { + div.style.backgroundImage = ''; + } + console.log('Success to load scene: ' + launchScene); + } + } + } + ); + }; + + var option = { + id: 'GameCanvas', + debugMode: settings.debug ? cc.debug.DebugMode.INFO : cc.debug.DebugMode.ERROR, + showFPS: settings.debug, + frameRate: 60, + groupList: settings.groupList, + collisionMatrix: settings.collisionMatrix, + }; + + cc.assetManager.init({ + bundleVers: settings.bundleVers, + remoteBundles: settings.remoteBundles, + server: settings.server + }); + + var bundleRoot = [INTERNAL]; + settings.hasResourcesBundle && bundleRoot.push(RESOURCES); + + var count = 0; + function cb (err) { + if (err) return console.error(err.message, err.stack); + count++; + if (count === bundleRoot.length + 1) { + cc.assetManager.loadBundle(MAIN, function (err) { + if (!err){ + let time = 4 - window.progress_Index/3*0.2; + if(time <= 0) cc.game.run(option, onStart); + else{ + window.addSpeed_Index = 3; + setTimeout(() => { + cc.game.run(option, onStart); + }, time*1000/1.5); + } + } + }); + } + } + + cc.assetManager.loadScript(settings.jsList.map(function (x) { return 'src/' + x;}), cb); + + for (var i = 0; i < bundleRoot.length; i++) { + cc.assetManager.loadBundle(bundleRoot[i], cb); + } +}; + +if (window.jsb) { + var isRuntime = (typeof loadRuntime === 'function'); + if (isRuntime) { + require('src/settings.js'); + require('src/cocos2d-runtime.js'); + if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) { + require('src/physics.js'); + } + require('jsb-adapter/engine/index.js'); + } + else { + require('src/settings.js'); + require('src/cocos2d-jsb.js'); + if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) { + require('src/physics.js'); + } + require('jsb-adapter/jsb-engine.js'); + } + + cc.macro.CLEANUP_IMAGE_CACHE = true; + window.boot(); +} \ No newline at end of file diff --git a/build-templates/web-mobile/splash.jpg b/build-templates/web-mobile/splash.jpg new file mode 100644 index 0000000..116d70f Binary files /dev/null and b/build-templates/web-mobile/splash.jpg differ diff --git a/build-templates/web-mobile/style-mobile.css b/build-templates/web-mobile/style-mobile.css new file mode 100644 index 0000000..1211ac3 --- /dev/null +++ b/build-templates/web-mobile/style-mobile.css @@ -0,0 +1,124 @@ +html { + -ms-touch-action: none; +} + +body, canvas, div { + display: block; + outline: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + -khtml-user-select: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +/* Remove spin of input type number */ +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + /* display: none; <- Crashes Chrome on hover */ + -webkit-appearance: none; + margin: 0; /* <-- Apparently some margin are still there even though it's hidden */ +} + +body { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + padding: 0; + border: 0; + margin: 0; + + cursor: default; + color: #888; + background-color: #333; + + text-align: center; + font-family: Helvetica, Verdana, Arial, sans-serif; + + display: flex; + flex-direction: column; + + /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */ + /* overflow cannot be applied in Cocos2dGameContainer, + otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */ + overflow: hidden; +} + +#Cocos2dGameContainer { + position: absolute; + margin: 0; + left: 0px; + top: 0px; + + display: -webkit-box; + -webkit-box-orient: horizontal; + -webkit-box-align: center; + -webkit-box-pack: center; +} + +canvas { + background-color: rgba(0, 0, 0, 0); +} + +a:link, a:visited { + color: #666; +} + +a:active, a:hover { + color: #666; +} + +p.header { + font-size: small; +} + +p.footer { + font-size: x-small; +} + +/* #splash { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #171717 url(./splash.jpg) no-repeat center; + background-size: 100%; +} */ + +/* .progress-bar { + position: absolute; + left: 27.5%; + top: 80%; + height: 3px; + padding: 2px; + width: 0%; + border-radius: 7px; + box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444; +} + +.progress-bar span { + display: block; + height: 0%; + border-radius: 3px; + transition: width .4s ease-in-out; + background-color: #3dc5de; +} */ + +.stripes span { + background-size: 30px 30px; + background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%, + transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, + transparent 75%, transparent); + + animation: animate-stripes 1s linear infinite; +} + +@keyframes animate-stripes { + 0% {background-position: 0 0;} 100% {background-position: 60px 0;} +} diff --git a/creator.d.ts b/creator.d.ts new file mode 100644 index 0000000..af2ba49 --- /dev/null +++ b/creator.d.ts @@ -0,0 +1,32078 @@ + +/** !#en +The main namespace of Cocos2d-JS, all engine core classes, functions, properties and constants are defined in this namespace. +!#zh +Cocos 引擎的主要命名空间,引擎代码中所有的类,函数,属性和常量都在这个命名空间中定义。 */ +interface Window { + initMgr: any; //控制全局信息 + android: any; //全局变量名 + } +declare namespace cc { + export var fx: any; + /** The current version of Cocos2d being used.
+ Please DO NOT remove this String, it is an important flag for bug tracking.
+ If you post a bug to forum, please attach this flag. */ + export var ENGINE_VERSION: string; + /** + !#en + Creates the speed action which changes the speed of an action, making it take longer (speed > 1) + or less (speed < 1) time.
+ Useful to simulate 'slow motion' or 'fast forward' effect. + !#zh 修改目标动作的速率。 + @param action action + @param speed speed + + @example + ```js + // change the target action speed; + var action = cc.scaleTo(0.2, 1, 0.6); + var newAction = cc.speed(action, 0.5); + ``` + */ + export function speed(action: ActionInterval, speed: number): Action; + /** + !#en Create a follow action which makes its target follows another node. + !#zh 追踪目标节点的位置。 + @param followedNode followedNode + @param rect rect + + @example + ```js + // example + // creates the action with a set boundary + var followAction = cc.follow(targetNode, cc.rect(0, 0, screenWidth * 2 - 100, screenHeight)); + node.runAction(followAction); + + // creates the action with no boundary set + var followAction = cc.follow(targetNode); + node.runAction(followAction); + ``` + */ + export function follow(followedNode: Node, rect: Rect): Action; + /** + Points setter + @param points points + */ + export function setPoints(points: any[]): void; + /** + !#en Creates an action with a Cardinal Spline array of points and tension. + !#zh 按基数样条曲线轨迹移动到目标位置。 + @param duration duration + @param points array of control points + @param tension tension + + @example + ```js + //create a cc.CardinalSplineTo + var action1 = cc.cardinalSplineTo(3, array, 0); + ``` + */ + export function cardinalSplineTo(duration: number, points: any[], tension: number): ActionInterval; + /** + update position of target + @param newPos newPos + */ + export function updatePosition(newPos: Vec2): void; + /** + !#en Creates an action with a Cardinal Spline array of points and tension. + !#zh 按基数样条曲线轨迹移动指定的距离。 + @param duration duration + @param points points + @param tension tension + */ + export function cardinalSplineBy(duration: number, points: any[], tension: number): ActionInterval; + /** + !#en Creates an action with a Cardinal Spline array of points and tension. + !#zh 按 Catmull Rom 样条曲线轨迹移动到目标位置。 + @param dt dt + @param points points + + @example + ```js + var action1 = cc.catmullRomTo(3, array); + ``` + */ + export function catmullRomTo(dt: number, points: any[]): ActionInterval; + /** + !#en Creates an action with a Cardinal Spline array of points and tension. + !#zh 按 Catmull Rom 样条曲线轨迹移动指定的距离。 + @param dt dt + @param points points + + @example + ```js + var action1 = cc.catmullRomBy(3, array); + ``` + */ + export function catmullRomBy(dt: number, points: any[]): ActionInterval; + /** + !#en + Creates the action easing object with the rate parameter.
+ From slow to fast. + !#zh 创建 easeIn 缓动对象,由慢到快。 + @param rate rate + + @example + ```js + action.easing(cc.easeIn(3.0)); + ``` + */ + export function easeIn(rate: number): any; + /** + !#en + Creates the action easing object with the rate parameter.
+ From fast to slow. + !#zh 创建 easeOut 缓动对象,由快到慢。 + @param rate rate + + @example + ```js + action.easing(cc.easeOut(3.0)); + ``` + */ + export function easeOut(rate: number): any; + /** + !#en + Creates the action easing object with the rate parameter.
+ Slow to fast then to slow. + !#zh 创建 easeInOut 缓动对象,慢到快,然后慢。 + @param rate rate + + @example + ```js + action.easing(cc.easeInOut(3.0)); + ``` + */ + export function easeInOut(rate: number): any; + /** + !#en + Creates the action easing object with the rate parameter.
+ Reference easeInExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeExponentialIn 缓动对象。
+ EaseExponentialIn 是按指数函数缓动进入的动作。
+ 参考 easeInExpo:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeExponentialIn()); + ``` + */ + export function easeExponentialIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeExponentialOut 缓动对象。
+ EaseExponentialOut 是按指数函数缓动退出的动作。
+ 参考 easeOutExpo:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeExponentialOut()); + ``` + */ + export function easeExponentialOut(): any; + /** + !#en + Creates an EaseExponentialInOut action easing object.
+ Reference easeInOutExpo:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeExponentialInOut 缓动对象。
+ EaseExponentialInOut 是按指数函数缓动进入并退出的动作。
+ 参考 easeInOutExpo:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeExponentialInOut()); + ``` + */ + export function easeExponentialInOut(): any; + /** + !#en + Creates an EaseSineIn action.
+ Reference easeInSine:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 EaseSineIn 缓动对象。
+ EaseSineIn 是按正弦函数缓动进入的动作。
+ 参考 easeInSine:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeSineIn()); + ``` + */ + export function easeSineIn(): any; + /** + !#en + Creates an EaseSineOut action easing object.
+ Reference easeOutSine:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 EaseSineOut 缓动对象。
+ EaseSineIn 是按正弦函数缓动退出的动作。
+ 参考 easeOutSine:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeSineOut()); + ``` + */ + export function easeSineOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutSine:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeSineInOut 缓动对象。
+ EaseSineIn 是按正弦函数缓动进入并退出的动作。
+ 参考 easeInOutSine:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + action.easing(cc.easeSineInOut()); + ``` + */ + export function easeSineInOut(): any; + /** + !#en + Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeInElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeElasticIn 缓动对象。
+ EaseElasticIn 是按弹性曲线缓动进入的动作。
+ 参数 easeInElastic:http://www.zhihu.com/question/21981571/answer/19925418 + @param period period + + @example + ```js + // example + action.easing(cc.easeElasticIn(3.0)); + ``` + */ + export function easeElasticIn(period: number): any; + /** + !#en + Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeOutElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeElasticOut 缓动对象。
+ EaseElasticOut 是按弹性曲线缓动退出的动作。
+ 参考 easeOutElastic:http://www.zhihu.com/question/21981571/answer/19925418 + @param period period + + @example + ```js + // example + action.easing(cc.easeElasticOut(3.0)); + ``` + */ + export function easeElasticOut(period: number): any; + /** + !#en + Creates the action easing object with the period in radians (default is 0.3).
+ Reference easeInOutElastic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeElasticInOut 缓动对象。
+ EaseElasticInOut 是按弹性曲线缓动进入并退出的动作。
+ 参考 easeInOutElastic:http://www.zhihu.com/question/21981571/answer/19925418 + @param period period + + @example + ```js + // example + action.easing(cc.easeElasticInOut(3.0)); + ``` + */ + export function easeElasticInOut(period: number): any; + /** + !#en + Creates the action easing object.
+ Eased bounce effect at the beginning. + !#zh + 创建 easeBounceIn 缓动对象。
+ EaseBounceIn 是按弹跳动作缓动进入的动作。 + + @example + ```js + // example + action.easing(cc.easeBounceIn()); + ``` + */ + export function easeBounceIn(): any; + /** + !#en + Creates the action easing object.
+ Eased bounce effect at the ending. + !#zh + 创建 easeBounceOut 缓动对象。
+ EaseBounceOut 是按弹跳动作缓动退出的动作。 + + @example + ```js + // example + action.easing(cc.easeBounceOut()); + ``` + */ + export function easeBounceOut(): any; + /** + !#en + Creates the action easing object.
+ Eased bounce effect at the begining and ending. + !#zh + 创建 easeBounceInOut 缓动对象。
+ EaseBounceInOut 是按弹跳动作缓动进入并退出的动作。 + + @example + ```js + // example + action.easing(cc.easeBounceInOut()); + ``` + */ + export function easeBounceInOut(): any; + /** + !#en + Creates the action easing object.
+ In the opposite direction to move slowly, and then accelerated to the right direction. + !#zh + 创建 easeBackIn 缓动对象。
+ easeBackIn 是在相反的方向缓慢移动,然后加速到正确的方向。
+ + @example + ```js + // example + action.easing(cc.easeBackIn()); + ``` + */ + export function easeBackIn(): any; + /** + !#en + Creates the action easing object.
+ Fast moving more than the finish, and then slowly back to the finish. + !#zh + 创建 easeBackOut 缓动对象。
+ easeBackOut 快速移动超出目标,然后慢慢回到目标点。 + + @example + ```js + // example + action.easing(cc.easeBackOut()); + ``` + */ + export function easeBackOut(): any; + /** + !#en + Creates the action easing object.
+ Begining of cc.EaseBackIn. Ending of cc.EaseBackOut. + !#zh + 创建 easeBackInOut 缓动对象。
+ + @example + ```js + // example + action.easing(cc.easeBackInOut()); + ``` + */ + export function easeBackInOut(): any; + /** + !#en + Creates the action easing object.
+ Into the 4 reference point.
+ To calculate the motion curve. + !#zh + 创建 easeBezierAction 缓动对象。
+ EaseBezierAction 是按贝塞尔曲线缓动的动作。 + @param p0 The first bezier parameter + @param p1 The second bezier parameter + @param p2 The third bezier parameter + @param p3 The fourth bezier parameter + + @example + ```js + // example + action.easing(cc.easeBezierAction(0.5, 0.5, 1.0, 1.0)); + ``` + */ + export function easeBezierAction(p0: number, p1: number, p2: number, p3: number): any; + /** + !#en + Creates the action easing object.
+ Reference easeInQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuadraticActionIn 缓动对象。
+ EaseQuadraticIn是按二次函数缓动进入的动作。
+ 参考 easeInQuad:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuadraticActionIn()); + ``` + */ + export function easeQuadraticActionIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuadraticActionOut 缓动对象。
+ EaseQuadraticOut 是按二次函数缓动退出的动作。
+ 参考 easeOutQuad:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuadraticActionOut()); + ``` + */ + export function easeQuadraticActionOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutQuad:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuadraticActionInOut 缓动对象。
+ EaseQuadraticInOut 是按二次函数缓动进入并退出的动作。
+ 参考 easeInOutQuad:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuadraticActionInOut()); + ``` + */ + export function easeQuadraticActionInOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeIntQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuarticActionIn 缓动对象。
+ EaseQuarticIn 是按四次函数缓动进入的动作。
+ 参考 easeIntQuart:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuarticActionIn()); + ``` + */ + export function easeQuarticActionIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuarticActionOut 缓动对象。
+ EaseQuarticOut 是按四次函数缓动退出的动作。
+ 参考 easeOutQuart:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.QuarticActionOut()); + ``` + */ + export function easeQuarticActionOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutQuart:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuarticActionInOut 缓动对象。
+ EaseQuarticInOut 是按四次函数缓动进入并退出的动作。
+ 参考 easeInOutQuart:http://www.zhihu.com/question/21981571/answer/19925418 + */ + export function easeQuarticActionInOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuinticActionIn 缓动对象。
+ EaseQuinticIn 是按五次函数缓动进的动作。
+ 参考 easeInQuint:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuinticActionIn()); + ``` + */ + export function easeQuinticActionIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuinticActionOut 缓动对象。
+ EaseQuinticOut 是按五次函数缓动退出的动作 + 参考 easeOutQuint:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuadraticActionOut()); + ``` + */ + export function easeQuinticActionOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutQuint:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeQuinticActionInOut 缓动对象。
+ EaseQuinticInOut是按五次函数缓动进入并退出的动作。
+ 参考 easeInOutQuint:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeQuinticActionInOut()); + ``` + */ + export function easeQuinticActionInOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCircleActionIn 缓动对象。
+ EaseCircleIn是按圆形曲线缓动进入的动作。
+ 参考 easeInCirc:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeCircleActionIn()); + ``` + */ + export function easeCircleActionIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCircleActionOut 缓动对象。
+ EaseCircleOut是按圆形曲线缓动退出的动作。
+ 参考 easeOutCirc:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + actioneasing(cc.easeCircleActionOut()); + ``` + */ + export function easeCircleActionOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutCirc:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCircleActionInOut 缓动对象。
+ EaseCircleInOut 是按圆形曲线缓动进入并退出的动作。
+ 参考 easeInOutCirc:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeCircleActionInOut()); + ``` + */ + export function easeCircleActionInOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCubicActionIn 缓动对象。
+ EaseCubicIn 是按三次函数缓动进入的动作。
+ 参考 easeInCubic:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeCubicActionIn()); + ``` + */ + export function easeCubicActionIn(): any; + /** + !#en + Creates the action easing object.
+ Reference easeOutCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCubicActionOut 缓动对象。
+ EaseCubicOut 是按三次函数缓动退出的动作。
+ 参考 easeOutCubic:http://www.zhihu.com/question/21981571/answer/19925418 + + @example + ```js + //example + action.easing(cc.easeCubicActionOut()); + ``` + */ + export function easeCubicActionOut(): any; + /** + !#en + Creates the action easing object.
+ Reference easeInOutCubic:
+ http://www.zhihu.com/question/21981571/answer/19925418 + !#zh + 创建 easeCubicActionInOut 缓动对象。
+ EaseCubicInOut是按三次函数缓动进入并退出的动作。
+ 参考 easeInOutCubic:http://www.zhihu.com/question/21981571/answer/19925418 + */ + export function easeCubicActionInOut(): any; + /** + !#en Show the Node. + !#zh 立即显示。 + + @example + ```js + // example + var showAction = cc.show(); + ``` + */ + export function show(): ActionInstant; + /** + !#en Hide the node. + !#zh 立即隐藏。 + + @example + ```js + // example + var hideAction = cc.hide(); + ``` + */ + export function hide(): ActionInstant; + /** + !#en Toggles the visibility of a node. + !#zh 显隐状态切换。 + + @example + ```js + // example + var toggleVisibilityAction = cc.toggleVisibility(); + ``` + */ + export function toggleVisibility(): ActionInstant; + /** + !#en Create a RemoveSelf object with a flag indicate whether the target should be cleaned up while removing. + !#zh 从父节点移除自身。 + @param isNeedCleanUp isNeedCleanUp + + @example + ```js + // example + var removeSelfAction = cc.removeSelf(); + ``` + */ + export function removeSelf(isNeedCleanUp ?: boolean): ActionInstant; + /** + !#en Destroy self + !#zh 创建一个销毁自身的动作。 + + @example + ```js + var destroySelfAction = cc.destroySelf(); + ``` + */ + export function destroySelf(): ActionInstant; + /** + !#en Create a FlipX action to flip or unflip the target. + !#zh X轴翻转。 + @param flip Indicate whether the target should be flipped or not + + @example + ```js + var flipXAction = cc.flipX(true); + ``` + */ + export function flipX(flip: boolean): ActionInstant; + /** + !#en Create a FlipY action to flip or unflip the target. + !#zh Y轴翻转。 + @param flip flip + + @example + ```js + var flipYAction = cc.flipY(true); + ``` + */ + export function flipY(flip: boolean): ActionInstant; + /** + !#en Creates a Place action with a position. + !#zh 放置在目标位置。 + @param pos pos + @param y y + + @example + ```js + // example + var placeAction = cc.place(cc.v2(200, 200)); + var placeAction = cc.place(200, 200); + ``` + */ + export function place(pos: Vec2|number, y?: number): ActionInstant; + /** + !#en Creates the action with the callback. + !#zh 执行回调函数。 + @param selector selector + @param selectorTarget selectorTarget + @param data data for function, it accepts all data types. + + @example + ```js + // example + // CallFunc without data + var finish = cc.callFunc(this.removeSprite, this); + + // CallFunc with data + var finish = cc.callFunc(this.removeFromParentAndCleanup, this._grossini, true); + ``` + */ + export function callFunc(selector: Function, selectorTarget?: any, data?: any): ActionInstant; + /** + !#en + Helper constructor to create an array of sequenceable actions + The created action will run actions sequentially, one after another. + !#zh 顺序执行动作,创建的动作将按顺序依次运行。 + @param actionOrActionArray actionOrActionArray + @param tempArray tempArray + + @example + ```js + // example + // create sequence with actions + var seq = cc.sequence(act1, act2); + + // create sequence with array + var seq = cc.sequence(actArray); + ``` + */ + export function sequence(actionOrActionArray: FiniteTimeAction|FiniteTimeAction[], ...tempArray: FiniteTimeAction[]): ActionInterval; + /** + !#en Creates a Repeat action. Times is an unsigned integer between 1 and pow(2,30) + !#zh 重复动作,可以按一定次数重复一个动,如果想永远重复一个动作请使用 repeatForever 动作来完成。 + @param action action + @param times times + + @example + ```js + // example + var rep = cc.repeat(cc.sequence(jump2, jump1), 5); + ``` + */ + export function repeat(action: FiniteTimeAction, times: number): ActionInterval; + /** + !#en Create a acton which repeat forever, as it runs forever, it can't be added into cc.sequence and cc.spawn. + !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 repeat 动作,由于这个动作不会停止,所以不能被添加到 cc.sequence 或 cc.spawn 中。 + @param action action + + @example + ```js + // example + var repeat = cc.repeatForever(cc.rotateBy(1.0, 360)); + ``` + */ + export function repeatForever(action: FiniteTimeAction): ActionInterval; + /** + !#en Create a spawn action which runs several actions in parallel. + !#zh 同步执行动作,同步执行一组动作。 + @param actionOrActionArray actionOrActionArray + @param tempArray tempArray + + @example + ```js + // example + var action = cc.spawn(cc.jumpBy(2, cc.v2(300, 0), 50, 4), cc.rotateBy(2, 720)); + todo: It should be the direct use new + ``` + */ + export function spawn(actionOrActionArray: FiniteTimeAction|FiniteTimeAction[], ...tempArray: FiniteTimeAction[]): FiniteTimeAction; + /** + !#en + Rotates a Node object to a certain angle by modifying its angle property.
+ The direction will be decided by the shortest angle. + !#zh 旋转到目标角度,通过逐帧修改它的 angle 属性,旋转方向将由最短的角度决定。 + @param duration duration in seconds + @param dstAngle dstAngle in degrees. + + @example + ```js + // example + var rotateTo = cc.rotateTo(2, 61.0); + ``` + */ + export function rotateTo(duration: number, dstAngle: number): ActionInterval; + /** + !#en + Rotates a Node object clockwise a number of degrees by modifying its angle property. + Relative to its properties to modify. + !#zh 旋转指定的角度。 + @param duration duration in seconds + @param deltaAngle deltaAngle in degrees + + @example + ```js + // example + var actionBy = cc.rotateBy(2, 360); + ``` + */ + export function rotateBy(duration: number, deltaAngle: number): ActionInterval; + /** + !#en + Moves a Node object x,y pixels by modifying its position property.
+ x and y are relative to the position of the object.
+ Several MoveBy actions can be concurrently called, and the resulting
+ movement will be the sum of individual movements. + !#zh 移动指定的距离。 + @param duration duration in seconds + @param deltaPos deltaPos + @param deltaY deltaY + + @example + ```js + // example + var actionTo = cc.moveBy(2, cc.v2(windowSize.width - 40, windowSize.height - 40)); + ``` + */ + export function moveBy(duration: number, deltaPos: Vec2|number, deltaY?: number): ActionInterval; + /** + !#en + Moves a Node object to the position x,y. x and y are absolute coordinates by modifying its position property.
+ Several MoveTo actions can be concurrently called, and the resulting
+ movement will be the sum of individual movements. + !#zh 移动到目标位置。 + @param duration duration in seconds + @param position position + @param y y + + @example + ```js + // example + var actionBy = cc.moveTo(2, cc.v2(80, 80)); + ``` + */ + export function moveTo(duration: number, position: Vec2|number, y?: number): ActionInterval; + /** + !#en + Create a action which skews a Node object to given angles by modifying its skewX and skewY properties. + Changes to the specified value. + !#zh 偏斜到目标角度。 + @param t time in seconds + @param sx sx + @param sy sy + + @example + ```js + // example + var actionTo = cc.skewTo(2, 37.2, -37.2); + ``` + */ + export function skewTo(t: number, sx: number, sy: number): ActionInterval; + /** + !#en + Skews a Node object by skewX and skewY degrees.
+ Relative to its property modification. + !#zh 偏斜指定的角度。 + @param t time in seconds + @param sx sx skew in degrees for X axis + @param sy sy skew in degrees for Y axis + + @example + ```js + // example + var actionBy = cc.skewBy(2, 0, -90); + ``` + */ + export function skewBy(t: number, sx: number, sy: number): ActionInterval; + /** + !#en + Moves a Node object simulating a parabolic jump movement by modifying it's position property. + Relative to its movement. + !#zh 用跳跃的方式移动指定的距离。 + @param duration duration + @param position position + @param y y + @param height height + @param jumps jumps + + @example + ```js + // example + var actionBy = cc.jumpBy(2, cc.v2(300, 0), 50, 4); + var actionBy = cc.jumpBy(2, 300, 0, 50, 4); + ``` + */ + export function jumpBy(duration: number, position: Vec2|number, y?: number, height?: number, jumps?: number): ActionInterval; + /** + !#en + Moves a Node object to a parabolic position simulating a jump movement by modifying its position property.
+ Jump to the specified location. + !#zh 用跳跃的方式移动到目标位置。 + @param duration duration + @param position position + @param y y + @param height height + @param jumps jumps + + @example + ```js + // example + var actionTo = cc.jumpTo(2, cc.v2(300, 300), 50, 4); + var actionTo = cc.jumpTo(2, 300, 300, 50, 4); + ``` + */ + export function jumpTo(duration: number, position: Vec2|number, y?: number, height?: number, jumps?: number): ActionInterval; + /** + !#en + An action that moves the target with a cubic Bezier curve by a certain distance. + Relative to its movement. + !#zh 按贝赛尔曲线轨迹移动指定的距离。 + @param t time in seconds + @param c Array of points + + @example + ```js + // example + var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)]; + var bezierForward = cc.bezierBy(3, bezier); + ``` + */ + export function bezierBy(t: number, c: Vec2[]): ActionInterval; + /** + !#en An action that moves the target with a cubic Bezier curve to a destination point. + !#zh 按贝赛尔曲线轨迹移动到目标位置。 + @param t t + @param c Array of points + + @example + ```js + // example + var bezier = [cc.v2(0, windowSize.height / 2), cc.v2(300, -windowSize.height / 2), cc.v2(300, 100)]; + var bezierTo = cc.bezierTo(2, bezier); + ``` + */ + export function bezierTo(t: number, c: Vec2[]): ActionInterval; + /** + !#en Scales a Node object to a zoom factor by modifying it's scale property. + !#zh 将节点大小缩放到指定的倍数。 + @param duration duration + @param sx scale parameter in X + @param sy scale parameter in Y, if Null equal to sx + + @example + ```js + // example + // It scales to 0.5 in both X and Y. + var actionTo = cc.scaleTo(2, 0.5); + + // It scales to 0.5 in x and 2 in Y + var actionTo = cc.scaleTo(2, 0.5, 2); + ``` + */ + export function scaleTo(duration: number, sx: number, sy?: number): ActionInterval; + /** + !#en + Scales a Node object a zoom factor by modifying it's scale property. + Relative to its changes. + !#zh 按指定的倍数缩放节点大小。 + @param duration duration in seconds + @param sx sx scale parameter in X + @param sy sy scale parameter in Y, if Null equal to sx + + @example + ```js + // example without sy, it scales by 2 both in X and Y + var actionBy = cc.scaleBy(2, 2); + + //example with sy, it scales by 0.25 in X and 4.5 in Y + var actionBy2 = cc.scaleBy(2, 0.25, 4.5); + ``` + */ + export function scaleBy(duration: number, sx: number, sy?: number|void): ActionInterval; + /** + !#en Blinks a Node object by modifying it's visible property. + !#zh 闪烁(基于透明度)。 + @param duration duration in seconds + @param blinks blinks in times + + @example + ```js + // example + var action = cc.blink(2, 10); + ``` + */ + export function blink(duration: number, blinks: number): ActionInterval; + /** + !#en + Fades an object that implements the cc.RGBAProtocol protocol. + It modifies the opacity from the current value to a custom one. + !#zh 修改透明度到指定值。 + @param duration duration + @param opacity 0-255, 0 is transparent + + @example + ```js + // example + var action = cc.fadeTo(1.0, 0); + ``` + */ + export function fadeTo(duration: number, opacity: number): ActionInterval; + /** + !#en Fades In an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 0 to 255. + !#zh 渐显效果。 + @param duration duration in seconds + + @example + ```js + //example + var action = cc.fadeIn(1.0); + ``` + */ + export function fadeIn(duration: number): ActionInterval; + /** + !#en Fades Out an object that implements the cc.RGBAProtocol protocol. It modifies the opacity from 255 to 0. + !#zh 渐隐效果。 + @param d duration in seconds + + @example + ```js + // example + var action = cc.fadeOut(1.0); + ``` + */ + export function fadeOut(d: number): ActionInterval; + /** + !#en Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one. + !#zh 修改颜色到指定值。 + @param duration duration + @param red 0-255 + @param green 0-255 + @param blue 0-255 + + @example + ```js + // example + var action = cc.tintTo(2, 255, 0, 255); + ``` + */ + export function tintTo(duration: number, red: number, green: number, blue: number): ActionInterval; + /** + !#en + Tints a Node that implements the cc.NodeRGB protocol from current tint to a custom one. + Relative to their own color change. + !#zh 按照指定的增量修改颜色。 + @param duration duration in seconds + @param deltaRed deltaRed + @param deltaGreen deltaGreen + @param deltaBlue deltaBlue + + @example + ```js + // example + var action = cc.tintBy(2, -127, -255, -127); + ``` + */ + export function tintBy(duration: number, deltaRed: number, deltaGreen: number, deltaBlue: number): ActionInterval; + /** + !#en Delays the action a certain amount of seconds. + !#zh 延迟指定的时间量。 + @param d duration in seconds + + @example + ```js + // example + var delay = cc.delayTime(1); + ``` + */ + export function delayTime(d: number): ActionInterval; + /** + !#en Executes an action in reverse order, from time=duration to time=0. + !#zh 反转目标动作的时间轴。 + @param action action + + @example + ```js + // example + var reverse = cc.reverseTime(this); + ``` + */ + export function reverseTime(action: FiniteTimeAction): ActionInterval; + /** + !#en Create an action with the specified action and forced target. + !#zh 用已有动作和一个新的目标节点创建动作。 + @param target target + @param action action + */ + export function targetedAction(target: Node, action: FiniteTimeAction): ActionInterval; + /** + + @param target the target to animate + */ + export function tween (target?: T) : Tween; + /** !#en This is a Easing instance. + !#zh 这是一个 Easing 类实例。 */ + export var easing: Easing; + /** + !#en + Outputs an error message to the Cocos Creator Console (editor) or Web Console (runtime).
+ - In Cocos Creator, error is red.
+ - In Chrome, error have a red icon along with red message text.
+ !#zh + 输出错误消息到 Cocos Creator 编辑器的 Console 或运行时页面端的 Console 中。
+ - 在 Cocos Creator 中,错误信息显示是红色的。
+ - 在 Chrome 中,错误信息有红色的图标以及红色的消息文本。
+ @param msg A JavaScript string containing zero or more substitution strings. + @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output. + */ + export function error(msg: any, ...subst: any[]): void; + /** + !#en + Outputs a warning message to the Cocos Creator Console (editor) or Web Console (runtime). + - In Cocos Creator, warning is yellow. + - In Chrome, warning have a yellow warning icon with the message text. + !#zh + 输出警告消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。
+ - 在 Cocos Creator 中,警告信息显示是黄色的。
+ - 在 Chrome 中,警告信息有着黄色的图标以及黄色的消息文本。
+ @param msg A JavaScript string containing zero or more substitution strings. + @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output. + */ + export function warn(msg: any, ...subst: any[]): void; + /** + !#en Outputs a message to the Cocos Creator Console (editor) or Web Console (runtime). + !#zh 输出一条消息到 Cocos Creator 编辑器的 Console 或运行时 Web 端的 Console 中。 + @param msg A JavaScript string containing zero or more substitution strings. + @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output. + */ + export function log(msg: string|any, ...subst: any[]): void; + /** !#en Director + !#zh 导演类。 */ + export var director: Director; + /** !#en This is a Game instance. + !#zh 这是一个 Game 类的实例,包含游戏主体信息并负责驱动游戏的游戏对象。。 */ + export var game: Game; + /** + !#en + Rotates a Node object to a certain angle by modifying its quternion property.
+ The direction will be decided by the shortest angle. + !#zh 旋转到目标角度,通过逐帧修改它的 quternion 属性,旋转方向将由最短的角度决定。 + @param duration duration in seconds + @param dstAngleX dstAngleX in degrees. + @param dstAngleY dstAngleY in degrees. + @param dstAngleZ dstAngleZ in degrees. + + @example + ```js + // example + var rotate3DTo = cc.rotate3DTo(2, cc.v3(0, 180, 0)); + ``` + */ + export function rotate3DTo(duration: number, dstAngleX: number|Vec3|Quat, dstAngleY?: number, dstAngleZ?: number): ActionInterval; + /** + !#en + Rotates a Node object counter clockwise a number of degrees by modifying its quaternion property. + Relative to its properties to modify. + !#zh 旋转指定的 3D 角度。 + @param duration duration in seconds + @param deltaAngleX deltaAngleX in degrees + @param deltaAngleY deltaAngleY in degrees + @param deltaAngleZ deltaAngleZ in degrees + + @example + ```js + // example + var actionBy = cc.rotate3DBy(2, cc.v3(0, 360, 0)); + ``` + */ + export function rotate3DBy(duration: number, deltaAngleX: number|Vec3, deltaAngleY?: number, deltaAngleZ?: number): ActionInterval; + export var assetManager: AssetManager; + /** !#en + cc.resources is a bundle and controls all asset under assets/resources + + !#zh + cc.resources 是一个 bundle,用于管理所有在 assets/resources 下的资源 */ + export var resources: AssetManager.Bundle; + /** !#en The System event singleton for global usage + !#zh 系统事件单例,方便全局使用 */ + export var systemEvent: SystemEvent; + /** + !#en Defines a CCClass using the given specification, please see [Class](/docs/editors_and_tools/creator-chapters/scripting/class.html) for details. + !#zh 定义一个 CCClass,传入参数必须是一个包含类型参数的字面量对象,具体用法请查阅[类型定义](/docs/creator/scripting/class.html)。 + @param options options + + @example + ```js + // define base class + var Node = cc.Class(); + + // define sub class + var Sprite = cc.Class({ + name: 'Sprite', + extends: Node, + + ctor: function () { + this.url = ""; + this.id = 0; + }, + + statics: { + // define static members + count: 0, + getBounds: function (spriteList) { + // compute bounds... + } + }, + + properties { + width: { + default: 128, + type: cc.Integer, + tooltip: 'The width of sprite' + }, + height: 128, + size: { + get: function () { + return cc.v2(this.width, this.height); + } + } + }, + + load: function () { + // load this.url... + }; + }); + + // instantiate + + var obj = new Sprite(); + obj.url = 'sprite.png'; + obj.load(); + ``` + */ + export function Class(options?: {name?: string; extends?: Function; ctor?: Function; __ctor__?: Function; properties?: any; statics?: any; mixins?: Function[]; editor?: {executeInEditMode?: boolean; requireComponent?: Function; menu?: string; executionOrder?: number; disallowMultiple?: boolean; playOnFocus?: boolean; inspector?: string; icon?: string; help?: string; }; update?: Function; lateUpdate?: Function; onLoad?: Function; start?: Function; onEnable?: Function; onDisable?: Function; onDestroy?: Function; onFocusInEditor?: Function; onLostFocusInEditor?: Function; resetInEditor?: Function; onRestore?: Function; _getLocalBounds?: Function; }): Function; + /** + !#en + Define an enum type.
+ If a enum item has a value of -1, it will be given an Integer number according to it's order in the list.
+ Otherwise it will use the value specified by user who writes the enum definition. + + !#zh + 定义一个枚举类型。
+ 用户可以把枚举值设为任意的整数,如果设为 -1,系统将会分配为上一个枚举值 + 1。 + @param obj a JavaScript literal object containing enum names and values, or a TypeScript enum type + + @example + ```js + // JavaScript: + + var WrapMode = cc.Enum({ + Repeat: -1, + Clamp: -1 + }); + + // Texture.WrapMode.Repeat == 0 + // Texture.WrapMode.Clamp == 1 + // Texture.WrapMode[0] == "Repeat" + // Texture.WrapMode[1] == "Clamp" + + var FlagType = cc.Enum({ + Flag1: 1, + Flag2: 2, + Flag3: 4, + Flag4: 8, + }); + + var AtlasSizeList = cc.Enum({ + 128: 128, + 256: 256, + 512: 512, + 1024: 1024, + }); + + // TypeScript: + + // If used in TypeScript, just define a TypeScript enum: + enum Direction { + Up, + Down, + Left, + Right + } + + // If you need to inspect the enum in Properties panel, you can call cc.Enum: + const {ccclass, property} = cc._decorator; + + @ccclass + class NewScript extends cc.Component { + @property({ + type: cc.Enum(Direction) // call cc.Enum + }) + direction: Direction = Direction.Up; + } + + ``` + */ + export function Enum(obj: T): T; + /** + + @param touches touches + */ + export function handleTouchesBegin(touches: any[]): void; + /** + + @param touches touches + */ + export function handleTouchesMove(touches: any[]): void; + /** + + @param touches touches + */ + export function handleTouchesEnd(touches: any[]): void; + /** + + @param touches touches + */ + export function handleTouchesCancel(touches: any[]): void; + /** + + @param touches touches + */ + export function getSetOfTouchesEndOrCancel(touches: any[]): any[]; + /** + + @param touch touch + */ + export function getPreTouch(touch: Touch): Touch; + /** + + @param touch touch + */ + export function setPreTouch(touch: Touch): void; + /** + + @param tx tx + @param ty ty + @param pos pos + */ + export function getTouchByXY(tx: number, ty: number, pos: Vec2): Touch; + /** + + @param location location + @param pos pos + @param eventType eventType + */ + export function getMouseEvent(location: Vec2, pos: Vec2, eventType: number): Event.EventMouse; + /** + + @param event event + @param pos pos + */ + export function getPointByEvent(event: Touch, pos: Vec2): Vec2; + /** + + @param event event + @param pos pos + */ + export function getTouchesByEvent(event: Touch, pos: Vec2): any[]; + /** + + @param element element + */ + export function registerSystemEvent(element: HTMLElement): void; + /** + + @param dt dt + */ + export function update(dt: number): void; + /** + !#en + Checks whether the object is non-nil and not yet destroyed.
+ When an object's `destroy` is called, it is actually destroyed after the end of this frame. + So `isValid` will return false from the next frame, while `isValid` in the current frame will still be true. + If you want to determine whether the current frame has called `destroy`, use `cc.isValid(obj, true)`, + but this is often caused by a particular logical requirements, which is not normally required. + + !#zh + 检查该对象是否不为 null 并且尚未销毁。
+ 当一个对象的 `destroy` 调用以后,会在这一帧结束后才真正销毁。因此从下一帧开始 `isValid` 就会返回 false,而当前帧内 `isValid` 仍然会是 true。如果希望判断当前帧是否调用过 `destroy`,请使用 `cc.isValid(obj, true)`,不过这往往是特殊的业务需求引起的,通常情况下不需要这样。 + @param value value + @param strictMode If true, Object called destroy() in this frame will also treated as invalid. + + @example + ```js + var node = new cc.Node(); + cc.log(cc.isValid(node)); // true + node.destroy(); + cc.log(cc.isValid(node)); // true, still valid in this frame + // after a frame... + cc.log(cc.isValid(node)); // false, destroyed in the end of last frame + ``` + */ + export function isValid(value: any, strictMode?: boolean): boolean; + /** !#en cc.view is the shared view object. + !#zh cc.view 是全局的视图对象。 */ + export var view: View; + /** !#en cc.winSize is the alias object for the size of the current game window. + !#zh cc.winSize 为当前的游戏窗口的大小。 */ + export var winSize: Size; + /** Specify that the input value must be integer in Inspector. + Also used to indicates that the elements in array should be type integer. */ + export var Integer: string; + /** Indicates that the elements in array should be type double. */ + export var Float: string; + /** Indicates that the elements in array should be type boolean. */ + export var Boolean: string; + /** Indicates that the elements in array should be type string. */ + export var String: string; + /** + !#en Deserialize json to cc.Asset + !#zh 将 JSON 反序列化为对象实例。 + @param data the serialized cc.Asset json string or json object. + @param details additional loading result + @param options options + */ + export function deserialize(data: string|any, details?: Details, options?: any): any; + /** + !#en Clones the object `original` and returns the clone, or instantiate a node from the Prefab. + !#zh 克隆指定的任意类型的对象,或者从 Prefab 实例化出新节点。 + + (Instantiate 时,function 和 dom 等非可序列化对象会直接保留原有引用,Asset 会直接进行浅拷贝,可序列化类型会进行深拷贝。) + @param original An existing object that you want to make a copy of. + + @example + ```js + // instantiate node from prefab + var scene = cc.director.getScene(); + var node = cc.instantiate(prefabAsset); + node.parent = scene; + // clone node + var scene = cc.director.getScene(); + var node = cc.instantiate(targetNode); + node.parent = scene; + ``` + */ + export function instantiate(original: Prefab): Node; + export function instantiate(original: T): T; + /** + !#en + The convenience method to create a new {{#crossLink "Color/Color:method"}}cc.Color{{/crossLink}} + Alpha channel is optional. Default value is 255. + + !#zh + 通过该方法来创建一个新的 {{#crossLink "Color/Color:method"}}cc.Color{{/crossLink}} 对象。 + Alpha 通道是可选的。默认值是 255。 + @param r r + @param g g + @param b b + @param a a + + @example + ```js + ----------------------- + // 1. All channels seperately as parameters + var color1 = new cc.Color(255, 255, 255, 255); + // 2. Convert a hex string to a color + var color2 = new cc.Color("#000000"); + // 3. An color object as parameter + var color3 = new cc.Color({r: 255, g: 255, b: 255, a: 255}); + + ``` + */ + export function color(r?: number, g?: number, b?: number, a?: number): Color; + /** + !#en The convenience method to create a new {{#crossLink "Mat4"}}cc.Mat4{{/crossLink}}. + !#zh 通过该简便的函数进行创建 {{#crossLink "Mat4"}}cc.Mat4{{/crossLink}} 对象。 + @param m00 Component in column 0, row 0 position (index 0) + @param m01 Component in column 0, row 1 position (index 1) + @param m02 Component in column 0, row 2 position (index 2) + @param m03 Component in column 0, row 3 position (index 3) + @param m10 Component in column 1, row 0 position (index 4) + @param m11 Component in column 1, row 1 position (index 5) + @param m12 Component in column 1, row 2 position (index 6) + @param m13 Component in column 1, row 3 position (index 7) + @param m20 Component in column 2, row 0 position (index 8) + @param m21 Component in column 2, row 1 position (index 9) + @param m22 Component in column 2, row 2 position (index 10) + @param m23 Component in column 2, row 3 position (index 11) + @param m30 Component in column 3, row 0 position (index 12) + @param m31 Component in column 3, row 1 position (index 13) + @param m32 Component in column 3, row 2 position (index 14) + @param m33 Component in column 3, row 3 position (index 15) + */ + export function mat4(m00?: number, m01?: number, m02?: number, m03?: number, m10?: number, m11?: number, m12?: number, m13?: number, m20?: number, m21?: number, m22?: number, m23?: number, m30?: number, m31?: number, m32?: number, m33?: number): Mat4; + /** + !#en The convenience method to create a new {{#crossLink "Quat"}}cc.Quat{{/crossLink}}. + !#zh 通过该简便的函数进行创建 {{#crossLink "Quat"}}cc.Quat{{/crossLink}} 对象。 + @param x x + @param y y + @param z z + @param w w + */ + export function quat(x?: number|any, y?: number, z?: number, w?: number): Quat; + /** + !#en + Helper function that creates a cc.Size.
+ Please use cc.p or cc.v2 instead, it will soon replace cc.Size. + !#zh + 创建一个 cc.Size 对象的帮助函数。
+ 注意:可以使用 cc.p 或者是 cc.v2 代替,它们将很快取代 cc.Size。 + @param w width or a size object + @param h height + + @example + ```js + var size1 = cc.size(); + var size2 = cc.size(100,100); + var size3 = cc.size(size2); + var size4 = cc.size({width: 100, height: 100}); + + ``` + */ + export function size(w: number|Size, h?: number): Size; + export var EPSILON: number; + /** + Clamps a value between a minimum float and maximum float value. + @param val val + @param min min + @param max max + */ + export function clamp(val: number, min: number, max: number): number; + /** + Clamps a value between 0 and 1. + @param val val + */ + export function clamp01(val: number): number; + /** + + @param from from + @param to to + @param ratio the interpolation coefficient + */ + export function lerp(from: number, to: number, ratio: number): number; + export function random(): void; + /** + Returns a floating-point random number between min (inclusive) and max (exclusive). + @param min min + @param max max + */ + export function randomRange(min: number, max: number): number; + /** + Returns a random integer between min (inclusive) and max (exclusive). + @param min min + @param max max + */ + export function randomRangeInt(min: number, max: number): number; + /** + Linear congruential generator using Hull-Dobell Theorem. + @param seed the random seed + */ + export function pseudoRandom(seed: number): number; + /** + Returns a floating-point pseudo-random number between min (inclusive) and max (exclusive). + @param seed seed + @param min min + @param max max + */ + export function pseudoRandomRange(seed: number, min: number, max: number): number; + /** + Returns a pseudo-random integer between min (inclusive) and max (exclusive). + @param seed seed + @param min min + @param max max + */ + export function pseudoRandomRangeInt(seed: number, min: number, max: number): number; + /** + Returns the next power of two for the value + @param val val + */ + export function nextPow2(val: number): number; + /** + Returns float remainder for t / length + @param t time start at 0 + @param length time of one cycle + */ + export function repeat(t: number, length: number): number; + /** + Returns time wrapped in ping-pong mode + @param t time start at 0 + @param length time of one cycle + */ + export function repeat(t: number, length: number): number; + /** + Returns ratio of a value within a given range + @param from start value + @param to end value + @param value given value + */ + export function repeat(from: number, to: number, value: number): number; + /** + Returns -1, 0, +1 depending on sign of x. + @param v v + */ + export function sign(v: number): void; + /** + !#en The convenience method to create a new {{#crossLink "Vec2"}}cc.Vec2{{/crossLink}}. + !#zh 通过该简便的函数进行创建 {{#crossLink "Vec2"}}cc.Vec2{{/crossLink}} 对象。 + @param x x + @param y y + + @example + ```js + var v1 = cc.v2(); + var v2 = cc.v2(0, 0); + var v3 = cc.v2(v2); + var v4 = cc.v2({x: 100, y: 100}); + ``` + */ + export function v2(x?: number|any, y?: number): Vec2; + /** + !#en + The convenience method to create a new Rect. + see {{#crossLink "Rect/Rect:method"}}cc.Rect{{/crossLink}} + !#zh + 该方法用来快速创建一个新的矩形。{{#crossLink "Rect/Rect:method"}}cc.Rect{{/crossLink}} + @param x x + @param y y + @param w w + @param h h + + @example + ```js + var a = new cc.Rect(0 , 0, 10, 0); + ``` + */ + export function rect(x?: number, y?: number, w?: number, h?: number): Rect; + /** + !#en The convenience method to create a new {{#crossLink "Vec3"}}cc.Vec3{{/crossLink}}. + !#zh 通过该简便的函数进行创建 {{#crossLink "Vec3"}}cc.Vec3{{/crossLink}} 对象。 + @param x x + @param y y + @param z z + + @example + ```js + var v1 = cc.v3(); + var v2 = cc.v3(0, 0, 0); + var v3 = cc.v3(v2); + var v4 = cc.v3({x: 100, y: 100, z: 0}); + ``` + */ + export function v3(x?: number|any, y?: number, z?: number): Vec3; + /** + Finds a node by hierarchy path, the path is case-sensitive. + It will traverse the hierarchy by splitting the path using '/' character. + This function will still returns the node even if it is inactive. + It is recommended to not use this function every frame instead cache the result at startup. + @param path path + @param referenceNode referenceNode + */ + export function find(path: string, referenceNode?: Node): Node; + export var dynamicAtlasManager: DynamicAtlasManager; + /** !#en The matrix storage */ + export var matrix: any[]; + /** + !#en Get an element + @param i i + @param j j + */ + export function get(i: number, j: number): number; + /** + !#en Set an element + @param i i + @param j j + @param value value + */ + export function set(i: number, j: number, value: boolean): void; + /** + !#en Sets all elements to zero + */ + export function reset(): void; + /** !#en Base class cc.Action for action classes. + !#zh Action 类是所有动作类型的基类。 */ + export class Action { + /** + !#en + to copy object with deep copy. + returns a clone of action. + !#zh 返回一个克隆的动作。 + */ + clone(): Action; + /** + !#en + return true if the action has finished. + !#zh 如果动作已完成就返回 true。 + */ + isDone(): boolean; + /** + !#en get the target. + !#zh 获取当前目标节点。 + */ + getTarget(): Node; + /** + !#en The action will modify the target properties. + !#zh 设置目标节点。 + @param target target + */ + setTarget(target: Node): void; + /** + !#en get the original target. + !#zh 获取原始目标节点。 + */ + getOriginalTarget(): Node; + /** + !#en get tag number. + !#zh 获取用于识别动作的标签。 + */ + getTag(): number; + /** + !#en set tag number. + !#zh 设置标签,用于识别动作。 + @param tag tag + */ + setTag(tag: number): void; + /** !#en Default Action tag. + !#zh 默认动作标签。 */ + static TAG_INVALID: number; + } + /** !#en + Base class actions that do have a finite time duration.
+ Possible actions:
+ - An action with a duration of 0 seconds.
+ - An action with a duration of 35.5 seconds. + + Infinite time actions are valid + !#zh 有限时间动作,这种动作拥有时长 duration 属性。 */ + export class FiniteTimeAction extends Action { + /** + !#en get duration of the action. (seconds). + !#zh 获取动作以秒为单位的持续时间。 + */ + getDuration(): number; + /** + !#en set duration of the action. (seconds). + !#zh 设置动作以秒为单位的持续时间。 + @param duration duration + */ + setDuration(duration: number): void; + /** + !#en + Returns a reversed action.
+ For example:
+ - The action will be x coordinates of 0 move to 100.
+ - The reversed action will be x of 100 move to 0. + - Will be rewritten + !#zh 返回一个新的动作,执行与原动作完全相反的动作。 + */ + reverse(): void; + /** + !#en + to copy object with deep copy. + returns a clone of action. + !#zh 返回一个克隆的动作。 + */ + clone(): FiniteTimeAction; + } + /** !#en Instant actions are immediate actions. They don't have a duration like the ActionInterval actions. + !#zh 即时动作,这种动作立即就会执行,继承自 FiniteTimeAction。 */ + export class ActionInstant extends FiniteTimeAction { + } + /** !#en +

An interval action is an action that takes place within a certain period of time.
+ It has an start time, and a finish time. The finish time is the parameter
+ duration plus the start time.

+ +

These CCActionInterval actions have some interesting properties, like:
+ - They can run normally (default)
+ - They can run reversed with the reverse method
+ - They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.

+ +

For example, you can simulate a Ping Pong effect running the action normally and
+ then running it again in Reverse mode.

+ !#zh 时间间隔动作,这种动作在已定时间内完成,继承 FiniteTimeAction。 */ + export class ActionInterval extends FiniteTimeAction { + /** + !#en Implementation of ease motion. + !#zh 缓动运动。 + @param easeObj easeObj + + @example + ```js + action.easing(cc.easeIn(3.0)); + ``` + */ + easing(easeObj: any): ActionInterval; + /** + !#en + Repeats an action a number of times. + To repeat an action forever use the CCRepeatForever action. + !#zh 重复动作可以按一定次数重复一个动作,使用 RepeatForever 动作来永远重复一个动作。 + @param times times + */ + repeat(times: number): ActionInterval; + /** + !#en + Repeats an action for ever.
+ To repeat the an action for a limited number of times use the Repeat action.
+ !#zh 永远地重复一个动作,有限次数内重复一个动作请使用 Repeat 动作。 + */ + repeatForever(): ActionInterval; + } + /** !#en + cc.ActionManager is a class that can manage actions.
+ Normally you won't need to use this class directly. 99% of the cases you will use the CCNode interface, + which uses this class's singleton object. + But there are some cases where you might need to use this class.
+ Examples:
+ - When you want to run an action where the target is different from a CCNode.
+ - When you want to pause / resume the actions
+ !#zh + cc.ActionManager 是可以管理动作的单例类。
+ 通常你并不需要直接使用这个类,99%的情况您将使用 CCNode 的接口。
+ 但也有一些情况下,您可能需要使用这个类。
+ 例如: + - 当你想要运行一个动作,但目标不是 CCNode 类型时。
+ - 当你想要暂停/恢复动作时。
*/ + export class ActionManager { + /** + !#en + Adds an action with a target.
+ If the target is already present, then the action will be added to the existing target. + If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target. + When the target is paused, the queued actions won't be 'ticked'. + !#zh + 增加一个动作,同时还需要提供动作的目标对象,目标对象是否暂停作为参数。
+ 如果目标已存在,动作将会被直接添加到现有的节点中。
+ 如果目标不存在,将为这一目标创建一个新的实例,并将动作添加进去。
+ 当目标状态的 paused 为 true,动作将不会被执行 + @param action action + @param target target + @param paused paused + */ + addAction(action: Action, target: Node, paused: boolean): void; + /** + !#en Removes all actions from all the targets. + !#zh 移除所有对象的所有动作。 + */ + removeAllActions(): void; + /** + !#en + Removes all actions from a certain target.
+ All the actions that belongs to the target will be removed. + !#zh + 移除指定对象上的所有动作。
+ 属于该目标的所有的动作将被删除。 + @param target target + @param forceDelete forceDelete + */ + removeAllActionsFromTarget(target: Node, forceDelete: boolean): void; + /** + !#en Removes an action given an action reference. + !#zh 移除指定的动作。 + @param action action + */ + removeAction(action: Action): void; + /** + !#en Removes an action given its tag and the target. + !#zh 删除指定对象下特定标签的一个动作,将删除首个匹配到的动作。 + @param tag tag + @param target target + */ + removeActionByTag(tag: number, target?: Node): void; + /** + !#en Gets an action given its tag an a target. + !#zh 通过目标对象和标签获取一个动作。 + @param tag tag + @param target target + */ + getActionByTag(tag: number, target: Node): Action; + /** + !#en + Returns the numbers of actions that are running in a certain target.
+ Composable actions are counted as 1 action.
+ Example:
+ - If you are running 1 Sequence of 7 actions, it will return 1.
+ - If you are running 7 Sequences of 2 actions, it will return 7. + !#zh + 返回指定对象下所有正在运行的动作数量。
+ 组合动作被算作一个动作。
+ 例如:
+ - 如果您正在运行 7 个动作组成的序列动作(Sequence),这个函数将返回 1。
+ - 如果你正在运行 2 个序列动作(Sequence)和 5 个普通动作,这个函数将返回 7。
+ @param target target + */ + getNumberOfRunningActionsInTarget(target: Node): number; + /** + !#en Pauses the target: all running actions and newly added actions will be paused. + !#zh 暂停指定对象:所有正在运行的动作和新添加的动作都将会暂停。 + @param target target + */ + pauseTarget(target: Node): void; + /** + !#en Resumes the target. All queued actions will be resumed. + !#zh 让指定目标恢复运行。在执行序列中所有被暂停的动作将重新恢复运行。 + @param target target + */ + resumeTarget(target: Node): void; + /** + !#en Pauses all running actions, returning a list of targets whose actions were paused. + !#zh 暂停所有正在运行的动作,返回一个包含了那些动作被暂停了的目标对象的列表。 + */ + pauseAllRunningActions(): any[]; + /** + !#en Resume a set of targets (convenience function to reverse a pauseAllRunningActions or pauseTargets call). + !#zh 让一组指定对象恢复运行(用来逆转 pauseAllRunningActions 效果的便捷函数)。 + @param targetsToResume targetsToResume + */ + resumeTargets(targetsToResume: any[]): void; + /** + !#en Pause a set of targets. + !#zh 暂停一组指定对象。 + @param targetsToPause targetsToPause + */ + pauseTargets(targetsToPause: any[]): void; + /** + !#en + purges the shared action manager. It releases the retained instance.
+ because it uses this, so it can not be static. + !#zh + 清除共用的动作管理器。它释放了持有的实例。
+ 因为它使用 this,因此它不能是静态的。 + */ + purgeSharedManager(): void; + /** + !#en The ActionManager update。 + !#zh ActionManager 主循环。 + @param dt delta time in seconds + */ + update(dt: number): void; + } + /** !#en + Tween provide a simple and flexible way to create action. Tween's api is more flexible than `cc.Action`: + - Support creating an action sequence in chained api. + - Support animate any objects' any properties, not limited to node's properties. By contrast, `cc.Action` needs to create a new action class to support new node property. + - Support working with `cc.Action`. + - Support easing and progress function. + !#zh + Tween 提供了一个简单灵活的方法来创建 action。相对于 Cocos 传统的 `cc.Action`,`cc.Tween` 在创建动画上要灵活非常多: + - 支持以链式结构的方式创建一个动画序列。 + - 支持对任意对象的任意属性进行缓动,不再局限于节点上的属性,而 `cc.Action` 添加一个属性的支持时还需要添加一个新的 action 类型。 + - 支持与 `cc.Action` 混用。 + - 支持设置 {{#crossLink "Easing"}}{{/crossLink}} 或者 progress 函数。 */ + export class Tween { + /** + + @param target target + */ + constructor(target?: any); + /** + !#en Stop all tweens + !#zh 停止所有缓动 + */ + static stopAll(): void; + /** + !#en Stop all tweens by tag + !#zh 停止所有指定标签的缓动 + @param tag tag + */ + static stopAllByTag(tag: number): void; + /** + !#en Stop all tweens by target + !#zh 停止所有指定对象的缓动 + @param target target + */ + static stopAllByTarget(target: any): void; + /** + !#en + Insert an action or tween to this sequence + !#zh + 插入一个 action 或者 tween 到队列中 + @param other other + */ + then(other: Action|Tween): Tween; + /** + !#en + Set tween target + !#zh + 设置 tween 的 target + @param target target + */ + target(target: any): Tween; + /** + !#en + Start this tween + !#zh + 运行当前 tween + */ + start(): Tween; + /** + !#en + Stop this tween + !#zh + 停止当前 tween + */ + stop(): Tween; + /** + !#en Sets tween tag + !#zh 设置缓动的标签 + @param tag tag + */ + tag(tag: number): Tween; + /** + !#en + Clone a tween + !#zh + 克隆当前 tween + @param target target + */ + clone(target?: any): Tween; + /** + !#en + Integrate all previous actions to an action. + !#zh + 将之前所有的 action 整合为一个 action。 + */ + union(): Tween; + /** + !#en Sets target's position property according to the bezier curve. + !#zh 按照贝塞尔路径设置目标的 position 属性。 + @param duration duration + @param c1 c1 + @param c2 c2 + @param to to + */ + bezierTo(duration: number, c1: Vec2, c2: Vec2, to: Vec2): Tween; + /** + !#en Sets target's position property according to the bezier curve. + !#zh 按照贝塞尔路径设置目标的 position 属性。 + @param duration duration + @param c1 c1 + @param c2 c2 + @param to to + */ + bezierBy(duration: number, c1: Vec2, c2: Vec2, to: Vec2): Tween; + /** + !#en Flips target's scaleX + !#zh 翻转目标的 scaleX 属性 + */ + flipX(): Tween; + /** + !#en Flips target's scaleY + !#zh 翻转目标的 scaleY 属性 + */ + flipY(): Tween; + /** + !#en Blinks target by set target's opacity property + !#zh 通过设置目标的 opacity 属性达到闪烁效果 + @param duration duration + @param times times + @param opts opts + */ + blink(duration: number, times: number, opts?: {progress?: Function; easing?: Function|string; }): Tween; + /** + !#en + Add an action which calculate with absolute value + !#zh + 添加一个对属性进行绝对值计算的 action + @param duration duration + @param props {scale: 2, position: cc.v3(100, 100, 100)} + @param opts opts + */ + to>(duration: number, props: ConstructorType, opts?: OPTS): Tween; + /** + !#en + Add an action which calculate with relative value + !#zh + 添加一个对属性进行相对值计算的 action + @param duration duration + @param props {scale: 2, position: cc.v3(100, 100, 100)} + @param opts opts + */ + by>(duration: number, props: ConstructorType, opts?: OPTS): Tween; + /** + !#en + Directly set target properties + !#zh + 直接设置 target 的属性 + @param props props + */ + set (props: ConstructorType) : Tween; + /** + !#en + Add an delay action + !#zh + 添加一个延时 action + @param duration duration + */ + delay(duration: number): Tween; + /** + !#en + Add an callback action + !#zh + 添加一个回调 action + @param callback callback + @param selectTarget selectTarget + */ + call(callback: Function, selectTarget?: object): Tween; + /** + !#en + Add an hide action + !#zh + 添加一个隐藏 action + */ + hide(): Tween; + /** + !#en + Add an show action + !#zh + 添加一个显示 action + */ + show(): Tween; + /** + !#en + Add an removeSelf action + !#zh + 添加一个移除自己 action + */ + removeSelf(): Tween; + /** + !#en + Add an sequence action + !#zh + 添加一个队列 action + @param action action + @param actions actions + */ + sequence(action: Action|Tween, ...actions: (Action|Tween)[]): Tween; + /** + !#en + Add an parallel action + !#zh + 添加一个并行 action + @param action action + @param actions actions + */ + parallel(action: Action|Tween, ...actions: (Action|Tween)[]): Tween; + /** + !#en + Add an repeat action. This action will integrate before actions to a sequence action as their parameters. + !#zh + 添加一个重复 action,这个 action 会将前一个动作作为他的参数。 + @param repeatTimes repeatTimes + @param action action + */ + repeat(repeatTimes: number, action?: Action|Tween): Tween; + /** + !#en + Add an repeat forever action. This action will integrate before actions to a sequence action as their parameters. + !#zh + 添加一个永久重复 action,这个 action 会将前一个动作作为他的参数。 + @param action action + */ + repeatForever(action?: Action|Tween): Tween; + /** + !#en + Add an reverse time action. This action will integrate before actions to a sequence action as their parameters. + !#zh + 添加一个倒置时间 action,这个 action 会将前一个动作作为他的参数。 + @param action action + */ + reverseTime(action?: Action|Tween): Tween; + } + /** !#en `cc.audioEngine` is the singleton object, it provide simple audio APIs. + !#zh + cc.audioengine是单例对象。
+ 主要用来播放音频,播放的时候会返回一个 audioID,之后都可以通过这个 audioID 来操作这个音频对象。
+ 不使用的时候,请使用 `cc.audioEngine.uncache(filePath);` 进行资源释放
+ 注意:
+ 在 Android 系统浏览器上,不同浏览器,不同版本的效果不尽相同。
+ 比如说:大多数浏览器都需要用户物理交互才可以开始播放音效,有一些不支持 WebAudio,有一些不支持多音轨播放。总之如果对音乐依赖比较强,请做尽可能多的测试。 */ + export class audioEngine { + /** + !#en Play audio. + !#zh 播放音频 + @param clip The audio clip to play. + @param loop Whether the music loop or not. + @param volume Volume size. + + @example + ```js + cc.resources.load(path, cc.AudioClip, null, function (err, clip) { + var audioID = cc.audioEngine.play(clip, false, 0.5); + }); + ``` + */ + static play(clip: AudioClip, loop: boolean, volume: number): number; + /** + !#en Set audio loop. + !#zh 设置音频是否循环。 + @param audioID audio id. + @param loop Whether cycle. + + @example + ```js + cc.audioEngine.setLoop(id, true); + ``` + */ + static setLoop(audioID: number, loop: boolean): void; + /** + !#en Get audio cycle state. + !#zh 获取音频的循环状态。 + @param audioID audio id. + + @example + ```js + cc.audioEngine.isLoop(id); + ``` + */ + static isLoop(audioID: number): boolean; + /** + !#en Set the volume of audio. + !#zh 设置音量(0.0 ~ 1.0)。 + @param audioID audio id. + @param volume Volume must be in 0.0~1.0 . + + @example + ```js + cc.audioEngine.setVolume(id, 0.5); + ``` + */ + static setVolume(audioID: number, volume: number): void; + /** + !#en The volume of the music max value is 1.0,the min value is 0.0 . + !#zh 获取音量(0.0 ~ 1.0)。 + @param audioID audio id. + + @example + ```js + var volume = cc.audioEngine.getVolume(id); + ``` + */ + static getVolume(audioID: number): number; + /** + !#en Set current time + !#zh 设置当前的音频时间。 + @param audioID audio id. + @param sec current time. + + @example + ```js + cc.audioEngine.setCurrentTime(id, 2); + ``` + */ + static setCurrentTime(audioID: number, sec: number): boolean; + /** + !#en Get current time + !#zh 获取当前的音频播放时间。 + @param audioID audio id. + + @example + ```js + var time = cc.audioEngine.getCurrentTime(id); + ``` + */ + static getCurrentTime(audioID: number): number; + /** + !#en Get audio duration + !#zh 获取音频总时长。 + @param audioID audio id. + + @example + ```js + var time = cc.audioEngine.getDuration(id); + ``` + */ + static getDuration(audioID: number): number; + /** + !#en Get audio state + !#zh 获取音频状态。 + @param audioID audio id. + + @example + ```js + var state = cc.audioEngine.getState(id); + ``` + */ + static getState(audioID: number): audioEngine.AudioState; + /** + !#en Set Audio finish callback + !#zh 设置一个音频结束后的回调 + @param audioID audio id. + @param callback loaded callback. + + @example + ```js + cc.audioEngine.setFinishCallback(id, function () {}); + ``` + */ + static setFinishCallback(audioID: number, callback: Function): void; + /** + !#en Pause playing audio. + !#zh 暂停正在播放音频。 + @param audioID The return value of function play. + + @example + ```js + cc.audioEngine.pause(audioID); + ``` + */ + static pause(audioID: number): void; + /** + !#en Pause all playing audio + !#zh 暂停现在正在播放的所有音频。 + + @example + ```js + cc.audioEngine.pauseAll(); + ``` + */ + static pauseAll(): void; + /** + !#en Resume playing audio. + !#zh 恢复播放指定的音频。 + @param audioID The return value of function play. + + @example + ```js + cc.audioEngine.resume(audioID); + ``` + */ + static resume(audioID: number): void; + /** + !#en Resume all playing audio. + !#zh 恢复播放所有之前暂停的所有音频。 + + @example + ```js + cc.audioEngine.resumeAll(); + ``` + */ + static resumeAll(): void; + /** + !#en Stop playing audio. + !#zh 停止播放指定音频。 + @param audioID The return value of function play. + + @example + ```js + cc.audioEngine.stop(audioID); + ``` + */ + static stop(audioID: number): void; + /** + !#en Stop all playing audio. + !#zh 停止正在播放的所有音频。 + + @example + ```js + cc.audioEngine.stopAll(); + ``` + */ + static stopAll(): void; + /** + !#en Set up an audio can generate a few examples. + !#zh 设置一个音频可以设置几个实例 + @param num a number of instances to be created from within an audio + + @example + ```js + cc.audioEngine.setMaxAudioInstance(20); + ``` + */ + static setMaxAudioInstance(num: number): void; + /** + !#en Getting audio can produce several examples. + !#zh 获取一个音频可以设置几个实例 + + @example + ```js + cc.audioEngine.getMaxAudioInstance(); + ``` + */ + static getMaxAudioInstance(): number; + /** + !#en Unload the preloaded audio from internal buffer. + !#zh 卸载预加载的音频。 + @param clip clip + + @example + ```js + cc.audioEngine.uncache(filePath); + ``` + */ + static uncache(clip: AudioClip): void; + /** + !#en Unload all audio from internal buffer. + !#zh 卸载所有音频。 + + @example + ```js + cc.audioEngine.uncacheAll(); + ``` + */ + static uncacheAll(): void; + /** + !#en Play background music + !#zh 播放背景音乐 + @param clip The audio clip to play. + @param loop Whether the music loop or not. + + @example + ```js + cc.resources.load(path, cc.AudioClip, null, function (err, clip) { + var audioID = cc.audioEngine.playMusic(clip, false); + }); + ``` + */ + static playMusic(clip: AudioClip, loop: boolean): number; + /** + !#en Stop background music. + !#zh 停止播放背景音乐。 + + @example + ```js + cc.audioEngine.stopMusic(); + ``` + */ + static stopMusic(): void; + /** + !#en Pause the background music. + !#zh 暂停播放背景音乐。 + + @example + ```js + cc.audioEngine.pauseMusic(); + ``` + */ + static pauseMusic(): void; + /** + !#en Resume playing background music. + !#zh 恢复播放背景音乐。 + + @example + ```js + cc.audioEngine.resumeMusic(); + ``` + */ + static resumeMusic(): void; + /** + !#en Get the volume(0.0 ~ 1.0). + !#zh 获取音量(0.0 ~ 1.0)。 + + @example + ```js + var volume = cc.audioEngine.getMusicVolume(); + ``` + */ + static getMusicVolume(): number; + /** + !#en Set the background music volume. + !#zh 设置背景音乐音量(0.0 ~ 1.0)。 + @param volume Volume must be in 0.0~1.0. + + @example + ```js + cc.audioEngine.setMusicVolume(0.5); + ``` + */ + static setMusicVolume(volume: number): void; + /** + !#en Background music playing state + !#zh 背景音乐是否正在播放 + + @example + ```js + cc.audioEngine.isMusicPlaying(); + ``` + */ + static isMusicPlaying(): boolean; + /** + !#en Play effect audio. + !#zh 播放音效 + @param clip The audio clip to play. + @param loop Whether the music loop or not. + + @example + ```js + cc.resources.load(path, cc.AudioClip, null, function (err, clip) { + var audioID = cc.audioEngine.playEffect(clip, false); + }); + ``` + */ + static playEffect(clip: AudioClip, loop: boolean): number; + /** + !#en Set the volume of effect audio. + !#zh 设置音效音量(0.0 ~ 1.0)。 + @param volume Volume must be in 0.0~1.0. + + @example + ```js + cc.audioEngine.setEffectsVolume(0.5); + ``` + */ + static setEffectsVolume(volume: number): void; + /** + !#en The volume of the effect audio max value is 1.0,the min value is 0.0 . + !#zh 获取音效音量(0.0 ~ 1.0)。 + + @example + ```js + var volume = cc.audioEngine.getEffectsVolume(); + ``` + */ + static getEffectsVolume(): number; + /** + !#en Pause effect audio. + !#zh 暂停播放音效。 + @param audioID audio id. + + @example + ```js + cc.audioEngine.pauseEffect(audioID); + ``` + */ + static pauseEffect(audioID: number): void; + /** + !#en Stop playing all the sound effects. + !#zh 暂停播放所有音效。 + + @example + ```js + cc.audioEngine.pauseAllEffects(); + ``` + */ + static pauseAllEffects(): void; + /** + !#en Resume effect audio. + !#zh 恢复播放音效音频。 + @param audioID The return value of function play. + + @example + ```js + cc.audioEngine.resumeEffect(audioID); + ``` + */ + static resumeEffect(audioID: number): void; + /** + !#en Resume all effect audio. + !#zh 恢复播放所有之前暂停的音效。 + + @example + ```js + cc.audioEngine.resumeAllEffects(); + ``` + */ + static resumeAllEffects(): void; + /** + !#en Stop playing the effect audio. + !#zh 停止播放音效。 + @param audioID audio id. + + @example + ```js + cc.audioEngine.stopEffect(id); + ``` + */ + static stopEffect(audioID: number): void; + /** + !#en Stop playing all the effects. + !#zh 停止播放所有音效。 + + @example + ```js + cc.audioEngine.stopAllEffects(); + ``` + */ + static stopAllEffects(): void; + } + /** !#en Class for animation data handling. + !#zh 动画剪辑,用于存储动画数据。 */ + export class AnimationClip extends Asset { + /** !#en Duration of this animation. + !#zh 动画的持续时间。 */ + duration: number; + /** !#en FrameRate of this animation. + !#zh 动画的帧速率。 */ + sample: number; + /** !#en Speed of this animation. + !#zh 动画的播放速度。 */ + speed: number; + /** !#en WrapMode of this animation. + !#zh 动画的循环模式。 */ + wrapMode: WrapMode; + /** !#en Curve data. + !#zh 曲线数据。 */ + curveData: any; + /** !#en Event data. + !#zh 事件数据。 */ + events: {frame: number, func: string, params: string[]}[]; + /** + !#en Crate clip with a set of sprite frames + !#zh 使用一组序列帧图片来创建动画剪辑 + @param spriteFrames spriteFrames + @param sample sample + + @example + ```js + var clip = cc.AnimationClip.createWithSpriteFrames(spriteFrames, 10); + ``` + */ + static createWithSpriteFrames(spriteFrames: SpriteFrame[], sample: number): AnimationClip; + } + /** !#en + The AnimationState gives full control over animation playback process. + In most cases the Animation Component is sufficient and easier to use. Use the AnimationState if you need full control. + !#zh + AnimationState 完全控制动画播放过程。
+ 大多数情况下 动画组件 是足够和易于使用的。如果您需要更多的动画控制接口,请使用 AnimationState。 */ + export class AnimationState extends Playable { + /** + + @param clip clip + @param name name + */ + constructor(clip: AnimationClip, name?: string); + /** !#en The curves list. + !#zh 曲线列表。 */ + curves: any[]; + /** !#en The start delay which represents the number of seconds from an animation's start time to the start of + the active interval. + !#zh 延迟多少秒播放。 */ + delay: number; + /** !#en The animation's iteration count property. + + A real number greater than or equal to zero (including positive infinity) representing the number of times + to repeat the animation node. + + Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model + calculations. + + !#zh 迭代次数,指动画播放多少次后结束, normalize time。 如 2.5(2次半) */ + repeatCount: number; + /** !#en The iteration duration of this animation in seconds. (length) + !#zh 单次动画的持续时间,秒。 */ + duration: number; + /** !#en The animation's playback speed. 1 is normal playback speed. + !#zh 播放速率。 */ + speed: number; + /** !#en + Wrapping mode of the playing animation. + Notice : dynamic change wrapMode will reset time and repeatCount property + !#zh + 动画循环方式。 + 需要注意的是,动态修改 wrapMode 时,会重置 time 以及 repeatCount */ + wrapMode: WrapMode; + /** !#en The current time of this animation in seconds. + !#zh 动画当前的时间,秒。 */ + time: number; + /** !#en The clip that is being played by this animation state. + !#zh 此动画状态正在播放的剪辑。 */ + clip: AnimationClip; + /** !#en The name of the playing animation. + !#zh 动画的名字 */ + name: string; + } + /** !#en + This class provide easing methods for {{#crossLink "tween"}}{{/crossLink}} class.
+ Demonstratio: https://easings.net/ + !#zh + 缓动函数类,为 {{#crossLink "Tween"}}{{/crossLink}} 提供缓动效果函数。
+ 函数效果演示: https://easings.net/ */ + export class Easing { + /** + !#en Easing in with quadratic formula. From slow to fast. + !#zh 平方曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + quadIn(t: number): number; + /** + !#en Easing out with quadratic formula. From fast to slow. + !#zh 平方曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + quadOut(t: number): number; + /** + !#en Easing in and out with quadratic formula. From slow to fast, then back to slow. + !#zh 平方曲线缓入缓出函数。运动由慢到快再到慢。 + @param t The current time as a percentage of the total time. + */ + quadInOut(t: number): number; + /** + !#en Easing in with cubic formula. From slow to fast. + !#zh 立方曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + cubicIn(t: number): number; + /** + !#en Easing out with cubic formula. From slow to fast. + !#zh 立方曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + cubicOut(t: number): number; + /** + !#en Easing in and out with cubic formula. From slow to fast, then back to slow. + !#zh 立方曲线缓入缓出函数。运动由慢到快再到慢。 + @param t The current time as a percentage of the total time. + */ + cubicInOut(t: number): number; + /** + !#en Easing in with quartic formula. From slow to fast. + !#zh 四次方曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + quartIn(t: number): number; + /** + !#en Easing out with quartic formula. From fast to slow. + !#zh 四次方曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + quartOut(t: number): number; + /** + !#en Easing in and out with quartic formula. From slow to fast, then back to slow. + !#zh 四次方曲线缓入缓出函数。运动由慢到快再到慢。 + @param t The current time as a percentage of the total time. + */ + quartInOut(t: number): number; + /** + !#en Easing in with quintic formula. From slow to fast. + !#zh 五次方曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + quintIn(t: number): number; + /** + !#en Easing out with quintic formula. From fast to slow. + !#zh 五次方曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + quintOut(t: number): number; + /** + !#en Easing in and out with quintic formula. From slow to fast, then back to slow. + !#zh 五次方曲线缓入缓出函数。运动由慢到快再到慢。 + @param t The current time as a percentage of the total time. + */ + quintInOut(t: number): number; + /** + !#en Easing in and out with sine formula. From slow to fast. + !#zh 正弦曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + sineIn(t: number): number; + /** + !#en Easing in and out with sine formula. From fast to slow. + !#zh 正弦曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + sineOut(t: number): number; + /** + !#en Easing in and out with sine formula. From slow to fast, then back to slow. + !#zh 正弦曲线缓入缓出函数。运动由慢到快再到慢。 + @param t The current time as a percentage of the total time. + */ + sineInOut(t: number): number; + /** + !#en Easing in and out with exponential formula. From slow to fast. + !#zh 指数曲线缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + expoIn(t: number): number; + /** + !#en Easing in and out with exponential formula. From fast to slow. + !#zh 指数曲线缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + expoOut(t: number): number; + /** + !#en Easing in and out with exponential formula. From slow to fast. + !#zh 指数曲线缓入和缓出函数。运动由慢到很快再到慢。 + @param t The current time as a percentage of the total time, then back to slow. + */ + expoInOut(t: number): number; + /** + !#en Easing in and out with circular formula. From slow to fast. + !#zh 循环公式缓入函数。运动由慢到快。 + @param t The current time as a percentage of the total time. + */ + circIn(t: number): number; + /** + !#en Easing in and out with circular formula. From fast to slow. + !#zh 循环公式缓出函数。运动由快到慢。 + @param t The current time as a percentage of the total time. + */ + circOut(t: number): number; + /** + !#en Easing in and out with circular formula. From slow to fast. + !#zh 指数曲线缓入缓出函数。运动由慢到很快再到慢。 + @param t The current time as a percentage of the total time, then back to slow. + */ + circInOut(t: number): number; + /** + !#en Easing in action with a spring oscillating effect. + !#zh 弹簧回震效果的缓入函数。 + @param t The current time as a percentage of the total time. + */ + elasticIn(t: number): number; + /** + !#en Easing out action with a spring oscillating effect. + !#zh 弹簧回震效果的缓出函数。 + @param t The current time as a percentage of the total time. + */ + elasticOut(t: number): number; + /** + !#en Easing in and out action with a spring oscillating effect. + !#zh 弹簧回震效果的缓入缓出函数。 + @param t The current time as a percentage of the total time. + */ + elasticInOut(t: number): number; + /** + !#en Easing in action with "back up" behavior. + !#zh 回退效果的缓入函数。 + @param t The current time as a percentage of the total time. + */ + backIn(t: number): number; + /** + !#en Easing out action with "back up" behavior. + !#zh 回退效果的缓出函数。 + @param t The current time as a percentage of the total time. + */ + backOut(t: number): number; + /** + !#en Easing in and out action with "back up" behavior. + !#zh 回退效果的缓入缓出函数。 + @param t The current time as a percentage of the total time. + */ + backInOut(t: number): number; + /** + !#en Easing in action with bouncing effect. + !#zh 弹跳效果的缓入函数。 + @param t The current time as a percentage of the total time. + */ + bounceIn(t: number): number; + /** + !#en Easing out action with bouncing effect. + !#zh 弹跳效果的缓出函数。 + @param t The current time as a percentage of the total time. + */ + bounceOut(t: number): number; + /** + !#en Easing in and out action with bouncing effect. + !#zh 弹跳效果的缓入缓出函数。 + @param t The current time as a percentage of the total time. + */ + bounceInOut(t: number): number; + /** + !#en Target will run action with smooth effect. + !#zh 平滑效果函数。 + @param t The current time as a percentage of the total time. + */ + smooth(t: number): number; + /** + !#en Target will run action with fade effect. + !#zh 渐褪效果函数。 + @param t The current time as a percentage of the total time. + */ + fade(t: number): number; + } + /** !#en Specifies how time is treated when it is outside of the keyframe range of an Animation. + !#zh 动画使用的循环模式。 */ + export enum WrapMode { + Default = 0, + Normal = 0, + Reverse = 0, + Loop = 0, + LoopReverse = 0, + PingPong = 0, + PingPongReverse = 0, + } + /** undefined */ + export class Playable { + /** !#en Is playing or paused in play mode? + !#zh 当前是否正在播放。 */ + isPlaying: boolean; + /** !#en Is currently paused? This can be true even if in edit mode(isPlaying == false). + !#zh 当前是否正在暂停 */ + isPaused: boolean; + /** + !#en Play this animation. + !#zh 播放动画。 + */ + play(): void; + /** + !#en Stop this animation. + !#zh 停止动画播放。 + */ + stop(): void; + /** + !#en Pause this animation. + !#zh 暂停动画。 + */ + pause(): void; + /** + !#en Resume this animation. + !#zh 重新播放动画。 + */ + resume(): void; + /** + !#en Perform a single frame step. + !#zh 执行一帧动画。 + */ + step(): void; + } + /** !#en An object to boot the game. + !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。 */ + export class debug { + /** + !#en Gets error message with the error id and possible parameters. + !#zh 通过 error id 和必要的参数来获取错误信息。 + @param errorId errorId + @param param param + */ + static getError(errorId: number, param?: any): string; + /** + !#en Returns whether or not to display the FPS informations. + !#zh 是否显示 FPS 信息。 + */ + static isDisplayStats(): boolean; + /** + !#en Sets whether display the FPS on the bottom-left corner. + !#zh 设置是否在左下角显示 FPS。 + @param displayStats displayStats + */ + static setDisplayStats(displayStats: boolean): void; + } + /** !#en +

+ ATTENTION: USE cc.director INSTEAD OF cc.Director.
+ cc.director is a singleton object which manage your game's logic flow.
+ Since the cc.director is a singleton, you don't need to call any constructor or create functions,
+ the standard way to use it is by calling:
+ - cc.director.methodName();
+ + It creates and handle the main Window and manages how and when to execute the Scenes.
+
+ The cc.director is also responsible for:
+ - initializing the OpenGL context
+ - setting the OpenGL pixel format (default on is RGB565)
+ - setting the OpenGL buffer depth (default on is 0-bit)
+ - setting the color for clear screen (default one is BLACK)
+ - setting the projection (default one is 3D)
+ - setting the orientation (default one is Portrait)
+
+
+ The cc.director also sets the default OpenGL context:
+ - GL_TEXTURE_2D is enabled
+ - GL_VERTEX_ARRAY is enabled
+ - GL_COLOR_ARRAY is enabled
+ - GL_TEXTURE_COORD_ARRAY is enabled
+

+

+ cc.director also synchronizes timers with the refresh rate of the display.
+ Features and Limitations:
+ - Scheduled timers & drawing are synchronizes with the refresh rate of the display
+ - Only supports animation intervals of 1/60 1/30 & 1/15
+

+ + !#zh +

+ 注意:用 cc.director 代替 cc.Director。
+ cc.director 一个管理你的游戏的逻辑流程的单例对象。
+ 由于 cc.director 是一个单例,你不需要调用任何构造函数或创建函数,
+ 使用它的标准方法是通过调用:
+ - cc.director.methodName(); +
+ 它创建和处理主窗口并且管理什么时候执行场景。
+
+ cc.director 还负责:
+ - 初始化 OpenGL 环境。
+ - 设置OpenGL像素格式。(默认是 RGB565)
+ - 设置OpenGL缓冲区深度 (默认是 0-bit)
+ - 设置空白场景的颜色 (默认是 黑色)
+ - 设置投影 (默认是 3D)
+ - 设置方向 (默认是 Portrait)
+
+ cc.director 设置了 OpenGL 默认环境
+ - GL_TEXTURE_2D 启用。
+ - GL_VERTEX_ARRAY 启用。
+ - GL_COLOR_ARRAY 启用。
+ - GL_TEXTURE_COORD_ARRAY 启用。
+

+

+ cc.director 也同步定时器与显示器的刷新速率。 +
+ 特点和局限性:
+ - 将计时器 & 渲染与显示器的刷新频率同步。
+ - 只支持动画的间隔 1/60 1/30 & 1/15。
+

*/ + export class Director extends EventTarget { + /** + !#en + Converts a view coordinate to an WebGL coordinate
+ Useful to convert (multi) touches coordinates to the current layout (portrait or landscape)
+ Implementation can be found in CCDirectorWebGL. + !#zh 将触摸点的屏幕坐标转换为 WebGL View 下的坐标。 + @param uiPoint uiPoint + */ + convertToGL(uiPoint: Vec2): Vec2; + /** + !#en + Converts an OpenGL coordinate to a view coordinate
+ Useful to convert node points to window points for calls such as glScissor
+ Implementation can be found in CCDirectorWebGL. + !#zh 将触摸点的 WebGL View 坐标转换为屏幕坐标。 + @param glPoint glPoint + */ + convertToUI(glPoint: Vec2): Vec2; + /** + End the life of director in the next frame + */ + end(): void; + /** + !#en + Returns the size of the WebGL view in points.
+ It takes into account any possible rotation (device orientation) of the window. + !#zh 获取视图的大小,以点为单位。 + */ + getWinSize(): Size; + /** + !#en + Returns the size of the OpenGL view in pixels.
+ It takes into account any possible rotation (device orientation) of the window.
+ On Mac winSize and winSizeInPixels return the same value. + (The pixel here refers to the resource resolution. If you want to get the physics resolution of device, you need to use cc.view.getFrameSize()) + !#zh + 获取视图大小,以像素为单位(这里的像素指的是资源分辨率。 + 如果要获取屏幕物理分辨率,需要用 cc.view.getFrameSize()) + */ + getWinSizeInPixels(): Size; + /** + !#en Pause the director's ticker, only involve the game logic execution. + It won't pause the rendering process nor the event manager. + If you want to pause the entier game including rendering, audio and event, + please use {{#crossLink "Game.pause"}}cc.game.pause{{/crossLink}} + !#zh 暂停正在运行的场景,该暂停只会停止游戏逻辑执行,但是不会停止渲染和 UI 响应。 + 如果想要更彻底得暂停游戏,包含渲染,音频和事件,请使用 {{#crossLink "Game.pause"}}cc.game.pause{{/crossLink}}。 + */ + pause(): void; + /** + !#en + Run a scene. Replaces the running scene with a new one or enter the first scene.
+ The new scene will be launched immediately. + !#zh 立刻切换指定场景。 + @param scene The need run scene. + @param onBeforeLoadScene The function invoked at the scene before loading. + @param onLaunched The function invoked at the scene after launch. + */ + runSceneImmediate(scene: Scene|SceneAsset, onBeforeLoadScene?: Function, onLaunched?: Function): void; + /** + !#en + Run a scene. Replaces the running scene with a new one or enter the first scene. + The new scene will be launched at the end of the current frame. + !#zh 运行指定场景。 + @param scene The need run scene. + @param onBeforeLoadScene The function invoked at the scene before loading. + @param onLaunched The function invoked at the scene after launch. + */ + runScene(scene: Scene|SceneAsset, onBeforeLoadScene?: Function, onLaunched?: Function): void; + /** + !#en Loads the scene by its name. + !#zh 通过场景名称进行加载场景。 + @param sceneName The name of the scene to load. + @param onLaunched callback, will be called after scene launched. + */ + loadScene(sceneName: string, onLaunched?: Function): boolean; + /** + !#en + Preloads the scene to reduces loading time. You can call this method at any time you want. + After calling this method, you still need to launch the scene by `cc.director.loadScene`. + It will be totally fine to call `cc.director.loadScene` at any time even if the preloading is not + yet finished, the scene will be launched after loaded automatically. + !#zh 预加载场景,你可以在任何时候调用这个方法。 + 调用完后,你仍然需要通过 `cc.director.loadScene` 来启动场景,因为这个方法不会执行场景加载操作。 + 就算预加载还没完成,你也可以直接调用 `cc.director.loadScene`,加载完成后场景就会启动。 + @param sceneName The name of the scene to preload. + @param onProgress callback, will be called when the load progression change. + @param onLoaded callback, will be called after scene loaded. + */ + preloadScene(sceneName: string, onProgress?: (completedCount: number, totalCount: number, item: any) => void, onLoaded?: (error: Error) => void): void; + /** + !#en Resume game logic execution after pause, if the current scene is not paused, nothing will happen. + !#zh 恢复暂停场景的游戏逻辑,如果当前场景没有暂停将没任何事情发生。 + */ + resume(): void; + /** + !#en + Enables or disables WebGL depth test.
+ Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js + !#zh 启用/禁用深度测试(在 Canvas 渲染模式下不会生效)。 + @param on on + */ + setDepthTest(on: boolean): void; + /** + !#en + Set color for clear screen.
+ (Implementation can be found in CCDirectorCanvas.js/CCDirectorWebGL.js) + !#zh + 设置场景的默认擦除颜色。
+ 支持全透明,但不支持透明度为中间值。要支持全透明需手工开启 cc.macro.ENABLE_TRANSPARENT_CANVAS。 + @param clearColor clearColor + */ + setClearColor(clearColor: Color): void; + /** + !#en Returns current logic Scene. + !#zh 获取当前逻辑场景。 + + @example + ```js + // This will help you to get the Canvas node in scene + cc.director.getScene().getChildByName('Canvas'); + ``` + */ + getScene(): Scene; + /** + !#en Returns the FPS value. Please use {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} to control animation interval. + !#zh 获取单位帧执行时间。请使用 {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} 来控制游戏帧率。 + */ + getAnimationInterval(): number; + /** + Sets animation interval, this doesn't control the main loop. + To control the game's frame rate overall, please use {{#crossLink "Game.setFrameRate"}}cc.game.setFrameRate{{/crossLink}} + @param value The animation interval desired. + */ + setAnimationInterval(value: number): void; + /** + !#en Returns the delta time since last frame. + !#zh 获取上一帧的增量时间。 + */ + getDeltaTime(): number; + /** + !#en Returns the total passed time since game start, unit: ms + !#zh 获取从游戏开始到现在总共经过的时间,单位为 ms + */ + getTotalTime(): number; + /** + !#en Returns how many frames were called since the director started. + !#zh 获取 director 启动以来游戏运行的总帧数。 + */ + getTotalFrames(): number; + /** + !#en Returns whether or not the Director is paused. + !#zh 是否处于暂停状态。 + */ + isPaused(): boolean; + /** + !#en Returns the cc.Scheduler associated with this director. + !#zh 获取和 director 相关联的 cc.Scheduler。 + */ + getScheduler(): Scheduler; + /** + !#en Sets the cc.Scheduler associated with this director. + !#zh 设置和 director 相关联的 cc.Scheduler。 + @param scheduler scheduler + */ + setScheduler(scheduler: Scheduler): void; + /** + !#en Returns the cc.ActionManager associated with this director. + !#zh 获取和 director 相关联的 cc.ActionManager(动作管理器)。 + */ + getActionManager(): ActionManager; + /** + !#en Sets the cc.ActionManager associated with this director. + !#zh 设置和 director 相关联的 cc.ActionManager(动作管理器)。 + @param actionManager actionManager + */ + setActionManager(actionManager: ActionManager): void; + /** + !#en Returns the cc.CollisionManager associated with this director. + !#zh 获取和 director 相关联的 cc.CollisionManager (碰撞管理器)。 + */ + getCollisionManager(): CollisionManager; + /** + !#en Returns the cc.PhysicsManager associated with this director. + !#zh 返回与 director 相关联的 cc.PhysicsManager (物理管理器)。 + */ + getPhysicsManager(): PhysicsManager; + /** + !#en Returns the cc.Physics3DManager associated with this director. + !#zh 返回与 director 相关联的 cc.Physics3DManager (物理管理器)。 + */ + getPhysics3DManager(): Physics3DManager; + /** !#en The event projection changed of cc.Director. This event will not get triggered since v2.0 + !#zh cc.Director 投影变化的事件。从 v2.0 开始这个事件不会再被触发 */ + static EVENT_PROJECTION_CHANGED: string; + /** !#en The event which will be triggered before loading a new scene. + !#zh 加载新场景之前所触发的事件。 */ + static EVENT_BEFORE_SCENE_LOADING: string; + /** !#en The event which will be triggered before launching a new scene. + !#zh 运行新场景之前所触发的事件。 */ + static EVENT_BEFORE_SCENE_LAUNCH: string; + /** !#en The event which will be triggered after launching a new scene. + !#zh 运行新场景之后所触发的事件。 */ + static EVENT_AFTER_SCENE_LAUNCH: string; + /** !#en The event which will be triggered at the beginning of every frame. + !#zh 每个帧的开始时所触发的事件。 */ + static EVENT_BEFORE_UPDATE: string; + /** !#en The event which will be triggered after engine and components update logic. + !#zh 将在引擎和组件 “update” 逻辑之后所触发的事件。 */ + static EVENT_AFTER_UPDATE: string; + /** !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead + !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW */ + static EVENT_BEFORE_VISIT: string; + /** !#en The event is deprecated since v2.0, please use cc.Director.EVENT_BEFORE_DRAW instead + !#zh 这个事件从 v2.0 开始被废弃,请直接使用 cc.Director.EVENT_BEFORE_DRAW */ + static EVENT_AFTER_VISIT: string; + /** !#en The event which will be triggered before the rendering process. + !#zh 渲染过程之前所触发的事件。 */ + static EVENT_BEFORE_DRAW: string; + /** !#en The event which will be triggered after the rendering process. + !#zh 渲染过程之后所触发的事件。 */ + static EVENT_AFTER_DRAW: string; + /** Constant for 2D projection (orthogonal projection) */ + static PROJECTION_2D: number; + /** Constant for 3D projection with a fovy=60, znear=0.5f and zfar=1500. */ + static PROJECTION_3D: number; + /** Constant for custom projection, if cc.Director's projection set to it, it calls "updateProjection" on the projection delegate. */ + static PROJECTION_CUSTOM: number; + /** Constant for default projection of cc.Director, default projection is 2D projection */ + static PROJECTION_DEFAULT: number; + } + /** !#en An object to boot the game. + !#zh 包含游戏主体信息并负责驱动游戏的游戏对象。 */ + export class Game extends EventTarget { + /** !#en Event triggered when game hide to background. + Please note that this event is not 100% guaranteed to be fired on Web platform, + on native platforms, it corresponds to enter background event, os status bar or notification center may not trigger this event. + !#zh 游戏进入后台时触发的事件。 + 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。 + 在原生平台,它对应的是应用被切换到后台事件,下拉菜单和上拉状态栏等不一定会触发这个事件,这取决于系统行为。 */ + EVENT_HIDE: string; + /** !#en Event triggered when game back to foreground + Please note that this event is not 100% guaranteed to be fired on Web platform, + on native platforms, it corresponds to enter foreground event. + !#zh 游戏进入前台运行时触发的事件。 + 请注意,在 WEB 平台,这个事件不一定会 100% 触发,这完全取决于浏览器的回调行为。 + 在原生平台,它对应的是应用被切换到前台事件。 */ + EVENT_SHOW: string; + /** !#en Event triggered when game restart + !#zh 调用restart后,触发事件。 */ + EVENT_RESTART: string; + /** Event triggered after game inited, at this point all engine objects and game scripts are loaded */ + EVENT_GAME_INITED: string; + /** Event triggered after engine inited, at this point you will be able to use all engine classes. + It was defined as EVENT_RENDERER_INITED in cocos creator v1.x and renamed in v2.0 */ + EVENT_ENGINE_INITED: string; + /** Web Canvas 2d API as renderer backend */ + RENDER_TYPE_CANVAS: number; + /** WebGL API as renderer backend */ + RENDER_TYPE_WEBGL: number; + /** OpenGL API as renderer backend */ + RENDER_TYPE_OPENGL: number; + /** !#en The outer frame of the game canvas, parent of game container. + !#zh 游戏画布的外框,container 的父容器。 */ + frame: any; + /** !#en The container of game canvas. + !#zh 游戏画布的容器。 */ + container: HTMLDivElement; + /** !#en The canvas of the game. + !#zh 游戏的画布。 */ + canvas: HTMLCanvasElement; + /** !#en The renderer backend of the game. + !#zh 游戏的渲染器类型。 */ + renderType: number; + /** !#en + The current game configuration, including:
+ 1. debugMode
+ "debugMode" possible values :
+ 0 - No message will be printed.
+ 1 - cc.error, cc.assert, cc.warn, cc.log will print in console.
+ 2 - cc.error, cc.assert, cc.warn will print in console.
+ 3 - cc.error, cc.assert will print in console.
+ 4 - cc.error, cc.assert, cc.warn, cc.log will print on canvas, available only on web.
+ 5 - cc.error, cc.assert, cc.warn will print on canvas, available only on web.
+ 6 - cc.error, cc.assert will print on canvas, available only on web.
+ 2. showFPS
+ Left bottom corner fps information will show when "showFPS" equals true, otherwise it will be hide.
+ 3. exposeClassName
+ Expose class name to chrome debug tools, the class intantiate performance is a little bit slower when exposed.
+ 4. frameRate
+ "frameRate" set the wanted frame rate for your game, but the real fps depends on your game implementation and the running environment.
+ 5. id
+ "gameCanvas" sets the id of your canvas element on the web page, it's useful only on web.
+ 6. renderMode
+ "renderMode" sets the renderer type, only useful on web :
+ 0 - Automatically chosen by engine
+ 1 - Forced to use canvas renderer
+ 2 - Forced to use WebGL renderer, but this will be ignored on mobile browsers
+
+ Please DO NOT modify this object directly, it won't have any effect.
+ !#zh + 当前的游戏配置,包括:
+ 1. debugMode(debug 模式,但是在浏览器中这个选项会被忽略)
+ "debugMode" 各种设置选项的意义。
+ 0 - 没有消息被打印出来。
+ 1 - cc.error,cc.assert,cc.warn,cc.log 将打印在 console 中。
+ 2 - cc.error,cc.assert,cc.warn 将打印在 console 中。
+ 3 - cc.error,cc.assert 将打印在 console 中。
+ 4 - cc.error,cc.assert,cc.warn,cc.log 将打印在 canvas 中(仅适用于 web 端)。
+ 5 - cc.error,cc.assert,cc.warn 将打印在 canvas 中(仅适用于 web 端)。
+ 6 - cc.error,cc.assert 将打印在 canvas 中(仅适用于 web 端)。
+ 2. showFPS(显示 FPS)
+ 当 showFPS 为 true 的时候界面的左下角将显示 fps 的信息,否则被隐藏。
+ 3. exposeClassName
+ 暴露类名让 Chrome DevTools 可以识别,如果开启会稍稍降低类的创建过程的性能,但对对象构造没有影响。
+ 4. frameRate (帧率)
+ “frameRate” 设置想要的帧率你的游戏,但真正的FPS取决于你的游戏实现和运行环境。
+ 5. id
+ "gameCanvas" Web 页面上的 Canvas Element ID,仅适用于 web 端。
+ 6. renderMode(渲染模式)
+ “renderMode” 设置渲染器类型,仅适用于 web 端:
+ 0 - 通过引擎自动选择。
+ 1 - 强制使用 canvas 渲染。 + 2 - 强制使用 WebGL 渲染,但是在部分 Android 浏览器中这个选项会被忽略。
+
+ 注意:请不要直接修改这个对象,它不会有任何效果。 */ + config: any; + /** + !#en Callback when the scripts of engine have been load. + !#zh 当引擎完成启动后的回调函数。 + */ + onStart(): void; + /** + !#en Set frame rate of game. + !#zh 设置游戏帧率。 + @param frameRate frameRate + */ + setFrameRate(frameRate: number): void; + /** + !#en Get frame rate set for the game, it doesn't represent the real frame rate. + !#zh 获取设置的游戏帧率(不等同于实际帧率)。 + */ + getFrameRate(): number; + /** + !#en Run the game frame by frame. + !#zh 执行一帧游戏循环。 + */ + step(): void; + /** + !#en Pause the game main loop. This will pause: + game logic execution, rendering process, event manager, background music and all audio effects. + This is different with cc.director.pause which only pause the game logic execution. + !#zh 暂停游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。这点和只暂停游戏逻辑的 cc.director.pause 不同。 + */ + pause(): void; + /** + !#en Resume the game from pause. This will resume: + game logic execution, rendering process, event manager, background music and all audio effects. + !#zh 恢复游戏主循环。包含:游戏逻辑,渲染,事件处理,背景音乐和所有音效。 + */ + resume(): void; + /** + !#en Check whether the game is paused. + !#zh 判断游戏是否暂停。 + */ + isPaused(): boolean; + /** + !#en Restart game. + !#zh 重新开始游戏 + */ + restart(): void; + /** + !#en End game, it will close the game window + !#zh 退出游戏 + */ + end(): void; + /** + !#en + Register an callback of a specific event type on the game object. + This type of event should be triggered via `emit`. + !#zh + 注册 game 的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Register an callback of a specific event type on the game object, + the callback will remove itself after the first time it is triggered. + !#zh + 注册 game 的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en Prepare game. + !#zh 准备引擎,请不要直接调用这个函数。 + @param cb cb + */ + prepare(cb: Function): void; + /** + !#en Run game with configuration object and onStart function. + !#zh 运行游戏,并且指定引擎配置和 onStart 的回调。 + @param config Pass configuration object or onStart function + @param onStart function to be executed after game initialized + */ + run(config: any, onStart: Function): void; + /** + !#en + Add a persistent root node to the game, the persistent node won't be destroyed during scene transition.
+ The target node must be placed in the root level of hierarchy, otherwise this API won't have any effect. + !#zh + 声明常驻根节点,该节点不会被在场景切换中被销毁。
+ 目标节点必须位于为层级的根节点,否则无效。 + @param node The node to be made persistent + */ + addPersistRootNode(node: Node): void; + /** + !#en Remove a persistent root node. + !#zh 取消常驻根节点。 + @param node The node to be removed from persistent node list + */ + removePersistRootNode(node: Node): void; + /** + !#en Check whether the node is a persistent root node. + !#zh 检查节点是否是常驻根节点。 + @param node The node to be checked + */ + isPersistRootNode(node: Node): boolean; + } + /** !#en + Class of all entities in Cocos Creator scenes.
+ For events supported by Node, please refer to {{#crossLink "Node.EventType"}}{{/crossLink}} + !#zh + Cocos Creator 场景中的所有节点类。
+ 支持的节点事件,请参阅 {{#crossLink "Node.EventType"}}{{/crossLink}}。 */ + export class Node extends _BaseNode { + /** !#en + Group index of node.
+ Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.
+ !#zh + 节点的分组索引。
+ 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。
*/ + groupIndex: number; + /** !#en + Group of node.
+ Which Group this node belongs to will resolve that this node's collision components can collide with which other collision componentns.
+ !#zh + 节点的分组。
+ 节点的分组将关系到节点的碰撞组件可以与哪些碰撞组件相碰撞。
*/ + group: string; + /** !#en The position (x, y) of the node in its parent's coordinates. + !#zh 节点在父节点坐标系中的位置(x, y)。 */ + position: Vec3; + /** !#en x axis position of node. + !#zh 节点 X 轴坐标。 */ + x: number; + /** !#en y axis position of node. + !#zh 节点 Y 轴坐标。 */ + y: number; + /** !#en z axis position of node. + !#zh 节点 Z 轴坐标。 */ + z: number; + /** !#en Rotation of node. + !#zh 该节点旋转角度。 */ + rotation: number; + /** !#en + Angle of node, the positive value is anti-clockwise direction. + !#zh + 该节点的旋转角度,正值为逆时针方向。 */ + angle: number; + /** !#en The rotation as Euler angles in degrees, used in 3D node. + !#zh 该节点的欧拉角度,用于 3D 节点。 */ + eulerAngles: Vec3; + /** !#en Rotation on x axis. + !#zh 该节点 X 轴旋转角度。 */ + rotationX: number; + /** !#en Rotation on y axis. + !#zh 该节点 Y 轴旋转角度。 */ + rotationY: number; + /** !#en The local scale relative to the parent. + !#zh 节点相对父节点的缩放。 */ + scale: number; + /** !#en Scale on x axis. + !#zh 节点 X 轴缩放。 */ + scaleX: number; + /** !#en Scale on y axis. + !#zh 节点 Y 轴缩放。 */ + scaleY: number; + /** !#en Scale on z axis. + !#zh 节点 Z 轴缩放。 */ + scaleZ: number; + /** !#en Skew x + !#zh 该节点 X 轴倾斜角度。 */ + skewX: number; + /** !#en Skew y + !#zh 该节点 Y 轴倾斜角度。 */ + skewY: number; + /** !#en Opacity of node, default value is 255. + !#zh 节点透明度,默认值为 255。 */ + opacity: number; + /** !#en Color of node, default value is white: (255, 255, 255). + !#zh 节点颜色。默认为白色,数值为:(255,255,255)。 */ + color: Color; + /** !#en Anchor point's position on x axis. + !#zh 节点 X 轴锚点位置。 */ + anchorX: number; + /** !#en Anchor point's position on y axis. + !#zh 节点 Y 轴锚点位置。 */ + anchorY: number; + /** !#en Width of node. + !#zh 节点宽度。 */ + width: number; + /** !#en Height of node. + !#zh 节点高度。 */ + height: number; + /** !#en zIndex is the 'key' used to sort the node relative to its siblings.
+ The value of zIndex should be in the range between cc.macro.MIN_ZINDEX and cc.macro.MAX_ZINDEX.
+ The Node's parent will sort all its children based on the zIndex value and the arrival order.
+ Nodes with greater zIndex will be sorted after nodes with smaller zIndex.
+ If two nodes have the same zIndex, then the node that was added first to the children's array will be in front of the other node in the array.
+ Node's order in children list will affect its rendering order. Parent is always rendering before all children. + !#zh zIndex 是用来对节点进行排序的关键属性,它决定一个节点在兄弟节点之间的位置。
+ zIndex 的取值应该介于 cc.macro.MIN_ZINDEX 和 cc.macro.MAX_ZINDEX 之间 + 父节点主要根据节点的 zIndex 和添加次序来排序,拥有更高 zIndex 的节点将被排在后面,如果两个节点的 zIndex 一致,先添加的节点会稳定排在另一个节点之前。
+ 节点在 children 中的顺序决定了其渲染顺序。父节点永远在所有子节点之前被渲染 */ + zIndex: number; + /** !#en + Switch 2D/3D node. The 2D nodes will run faster. + !#zh + 切换 2D/3D 节点,2D 节点会有更高的运行效率 */ + is3DNode: boolean; + /** !#en Returns a normalized vector representing the up direction (Y axis) of the node in world space. + !#zh 获取节点正上方(y 轴)面对的方向,返回值为世界坐标系下的归一化向量 */ + up: Vec3; + /** !#en Returns a normalized vector representing the right direction (X axis) of the node in world space. + !#zh 获取节点正右方(x 轴)面对的方向,返回值为世界坐标系下的归一化向量 */ + right: Vec3; + /** !#en Returns a normalized vector representing the forward direction (Z axis) of the node in world space. + !#zh 获取节点正前方(z 轴)面对的方向,返回值为世界坐标系下的归一化向量 */ + forward: Vec3; + /** + + @param name name + */ + constructor(name?: string); + /** + !#en + Register a callback of a specific event type on Node.
+ Use this method to register touch or mouse event permit propagation based on scene graph,
+ These kinds of event are triggered with dispatchEvent, the dispatch process has three steps:
+ 1. Capturing phase: dispatch in capture targets (`_getCapturingTargets`), e.g. parents in node tree, from root to the real target
+ 2. At target phase: dispatch to the listeners of the real target
+ 3. Bubbling phase: dispatch in bubble targets (`_getBubblingTargets`), e.g. parents in node tree, from the real target to root
+ In any moment of the dispatching process, it can be stopped via `event.stopPropagation()` or `event.stopPropagationImmidiate()`.
+ It's the recommended way to register touch/mouse event for Node,
+ please do not use cc.eventManager directly for Node.
+ You can also register custom event and use `emit` to trigger custom event on Node.
+ For such events, there won't be capturing and bubbling phase, your event will be dispatched directly to its listeners registered on the same node.
+ You can also pass event callback parameters with `emit` by passing parameters after `type`. + !#zh + 在节点上注册指定类型的回调函数,也可以设置 target 用于绑定响应函数的 this 对象。
+ 鼠标或触摸事件会被系统调用 dispatchEvent 方法触发,触发的过程包含三个阶段:
+ 1. 捕获阶段:派发事件给捕获目标(通过 `_getCapturingTargets` 获取),比如,节点树中注册了捕获阶段的父节点,从根节点开始派发直到目标节点。
+ 2. 目标阶段:派发给目标节点的监听器。
+ 3. 冒泡阶段:派发事件给冒泡目标(通过 `_getBubblingTargets` 获取),比如,节点树中注册了冒泡阶段的父节点,从目标节点开始派发直到根节点。
+ 同时您可以将事件派发到父节点或者通过调用 stopPropagation 拦截它。
+ 推荐使用这种方式来监听节点上的触摸或鼠标事件,请不要在节点上直接使用 cc.eventManager。
+ 你也可以注册自定义事件到节点上,并通过 emit 方法触发此类事件,对于这类事件,不会发生捕获冒泡阶段,只会直接派发给注册在该节点上的监听器
+ 你可以通过在 emit 方法调用时在 type 之后传递额外的参数作为事件回调的参数列表 + @param type A string representing the event type to listen for.
See {{#crossLink "Node/EventTyupe/POSITION_CHANGED"}}Node Events{{/crossLink}} for all builtin events. + @param callback The callback that will be invoked when the event is dispatched. The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + @param useCapture When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase. + + @example + ```js + this.node.on(cc.Node.EventType.TOUCH_START, this.memberFunction, this); // if "this" is component and the "memberFunction" declared in CCClass. + node.on(cc.Node.EventType.TOUCH_START, callback, this); + node.on(cc.Node.EventType.TOUCH_MOVE, callback, this); + node.on(cc.Node.EventType.TOUCH_END, callback, this); + node.on(cc.Node.EventType.TOUCH_CANCEL, callback, this); + node.on(cc.Node.EventType.ANCHOR_CHANGED, callback); + node.on(cc.Node.EventType.COLOR_CHANGED, callback); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Register an callback of a specific event type on the Node, + the callback will remove itself after the first time it is triggered. + !#zh + 注册节点的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + node.once(cc.Node.EventType.ANCHOR_CHANGED, callback); + ``` + */ + once(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the callback previously registered with the same type, callback, target and or useCapture. + This method is merely an alias to removeEventListener. + !#zh 删除之前与同类型,回调,目标或 useCapture 注册的回调。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + @param useCapture When set to true, the listener will be triggered at capturing phase which is ahead of the final target emit, otherwise it will be triggered during bubbling phase. + + @example + ```js + this.node.off(cc.Node.EventType.TOUCH_START, this.memberFunction, this); + node.off(cc.Node.EventType.TOUCH_START, callback, this.node); + node.off(cc.Node.EventType.ANCHOR_CHANGED, callback, this); + ``` + */ + off(type: string, callback?: Function, target?: any, useCapture?: boolean): void; + /** + !#en Removes all callbacks previously registered with the same target. + !#zh 移除目标上的所有注册事件。 + @param target The target to be searched for all related callbacks + + @example + ```js + node.targetOff(target); + ``` + */ + targetOff(target: any): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Trigger an event directly with the event name and necessary arguments. + !#zh + 通过事件名发送自定义事件 + @param type event type + @param arg1 First argument in callback + @param arg2 Second argument in callback + @param arg3 Third argument in callback + @param arg4 Fourth argument in callback + @param arg5 Fifth argument in callback + + @example + ```js + eventTarget.emit('fire', event); + eventTarget.emit('fire', message, emitter); + ``` + */ + emit(type: string, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any): void; + /** + !#en + Dispatches an event into the event flow. + The event target is the EventTarget object upon which the dispatchEvent() method is called. + !#zh 分发事件到事件流中。 + @param event The Event object that is dispatched into the event flow + */ + dispatchEvent(event: Event): void; + /** + !#en Pause node related system events registered with the current Node. Node system events includes touch and mouse events. + If recursive is set to true, then this API will pause the node system events for the node and all nodes in its sub node tree. + Reference: http://docs.cocos2d-x.org/editors_and_tools/creator-chapters/scripting/internal-events/ + !#zh 暂停当前节点上注册的所有节点系统事件,节点系统事件包含触摸和鼠标事件。 + 如果传递 recursive 为 true,那么这个 API 将暂停本节点和它的子树上所有节点的节点系统事件。 + 参考:https://www.cocos.com/docs/creator/scripting/internal-events.html + @param recursive Whether to pause node system events on the sub node tree. + + @example + ```js + node.pauseSystemEvents(true); + ``` + */ + pauseSystemEvents(recursive: boolean): void; + /** + !#en Resume node related system events registered with the current Node. Node system events includes touch and mouse events. + If recursive is set to true, then this API will resume the node system events for the node and all nodes in its sub node tree. + Reference: http://docs.cocos2d-x.org/editors_and_tools/creator-chapters/scripting/internal-events/ + !#zh 恢复当前节点上注册的所有节点系统事件,节点系统事件包含触摸和鼠标事件。 + 如果传递 recursive 为 true,那么这个 API 将恢复本节点和它的子树上所有节点的节点系统事件。 + 参考:https://www.cocos.com/docs/creator/scripting/internal-events.html + @param recursive Whether to resume node system events on the sub node tree. + + @example + ```js + node.resumeSystemEvents(true); + ``` + */ + resumeSystemEvents(recursive: boolean): void; + /** + !#en + Executes an action, and returns the action that is executed.
+ The node becomes the action's target. Refer to cc.Action's getTarget()
+ Calling runAction while the node is not active won't have any effect.
+ Note:You shouldn't modify the action after runAction, that won't take any effect.
+ if you want to modify, when you define action plus. + !#zh + 执行并返回该执行的动作。该节点将会变成动作的目标。
+ 调用 runAction 时,节点自身处于不激活状态将不会有任何效果。
+ 注意:你不应该修改 runAction 后的动作,将无法发挥作用,如果想进行修改,请在定义 action 时加入。 + @param action action + + @example + ```js + var action = cc.scaleTo(0.2, 1, 0.6); + node.runAction(action); + node.runAction(action).repeatForever(); // fail + node.runAction(action.repeatForever()); // right + ``` + */ + runAction(action: Action): Action; + /** + !#en Pause all actions running on the current node. Equals to `cc.director.getActionManager().pauseTarget(node)`. + !#zh 暂停本节点上所有正在运行的动作。和 `cc.director.getActionManager().pauseTarget(node);` 等价。 + + @example + ```js + node.pauseAllActions(); + ``` + */ + pauseAllActions(): void; + /** + !#en Resume all paused actions on the current node. Equals to `cc.director.getActionManager().resumeTarget(node)`. + !#zh 恢复运行本节点上所有暂停的动作。和 `cc.director.getActionManager().resumeTarget(node);` 等价。 + + @example + ```js + node.resumeAllActions(); + ``` + */ + resumeAllActions(): void; + /** + !#en Stops and removes all actions from the running action list . + !#zh 停止并且移除所有正在运行的动作列表。 + + @example + ```js + node.stopAllActions(); + ``` + */ + stopAllActions(): void; + /** + !#en Stops and removes an action from the running action list. + !#zh 停止并移除指定的动作。 + @param action An action object to be removed. + + @example + ```js + var action = cc.scaleTo(0.2, 1, 0.6); + node.stopAction(action); + ``` + */ + stopAction(action: Action): void; + /** + !#en Removes an action from the running action list by its tag. + !#zh 停止并且移除指定标签的动作。 + @param tag A tag that indicates the action to be removed. + + @example + ```js + node.stopActionByTag(1); + ``` + */ + stopActionByTag(tag: number): void; + /** + !#en Returns an action from the running action list by its tag. + !#zh 通过标签获取指定动作。 + @param tag tag + + @example + ```js + var action = node.getActionByTag(1); + ``` + */ + getActionByTag(tag: number): Action; + /** + !#en + Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
+ Composable actions are counted as 1 action. Example:
+ If you are running 1 Sequence of 7 actions, it will return 1.
+ If you are running 7 Sequences of 2 actions, it will return 7.

+ !#zh + 获取运行着的动作加上正在调度运行的动作的总数。
+ 例如:
+ - 如果你正在运行 7 个动作中的 1 个 Sequence,它将返回 1。
+ - 如果你正在运行 2 个动作中的 7 个 Sequence,它将返回 7。
+ + @example + ```js + var count = node.getNumberOfRunningActions(); + cc.log("Running Action Count: " + count); + ``` + */ + getNumberOfRunningActions(): number; + /** + !#en + Returns a copy of the position (x, y, z) of the node in its parent's coordinates. + You can pass a cc.Vec2 or cc.Vec3 as the argument to receive the return values. + !#zh + 获取节点在父节点坐标系中的位置(x, y, z)。 + 你可以传一个 cc.Vec2 或者 cc.Vec3 作为参数来接收返回值。 + @param out The return value to receive position + + @example + ```js + cc.log("Node Position: " + node.getPosition()); + ``` + */ + getPosition(out?: Vec2|Vec3): Vec2; + /** + !#en + Sets the position (x, y, z) of the node in its parent's coordinates.
+ Usually we use cc.v2(x, y) to compose cc.Vec2 object, in this case, position.z will become 0.
+ and passing two numbers (x, y) is more efficient than passing cc.Vec2 object, in this case, position.z will remain unchanged. + For 3D node we can use cc.v3(x, y, z) to compose cc.Vec3 object,
+ and passing three numbers (x, y, z) is more efficient than passing cc.Vec3 object. + !#zh + 设置节点在父节点坐标系中的位置。
+ 可以通过下面的方式设置坐标点:
+ 1. 传入 2 个数值 x, y (此时不会改变 position.z 的值)。
+ 2. 传入 cc.v2(x, y) 类型为 cc.Vec2 的对象 (此时 position.z 的值将被设置为0)。 + 3. 对于 3D 节点可以传入 3 个数值 x, y, z。
+ 4. 对于 3D 节点可以传入 cc.v3(x, y, z) 类型为 cc.Vec3 的对象。 + @param x X coordinate for position or the position object + @param y Y coordinate for position + @param z Z coordinate for position + */ + setPosition(x: Vec2|Vec3|number, y?: number, z?: number): void; + /** + !#en + Returns the scale factor of the node. + Need pass a cc.Vec2 or cc.Vec3 as the argument to receive the return values. + !#zh 获取节点的缩放,需要传一个 cc.Vec2 或者 cc.Vec3 作为参数来接收返回值。 + @param out out + + @example + ```js + cc.log("Node Scale: " + node.getScale(cc.v3())); + ``` + */ + getScale(out: Vec2|Vec3): Vec2; + /** + !#en + Sets the scale of axis in local coordinates of the node. + You can operate 2 axis in 2D node, and 3 axis in 3D node. + When only (x, y) is passed, the value of scale.z will not be changed. + When a Vec2 is passed in, the value of scale.z will be set to 0. + !#zh + 设置节点在本地坐标系中坐标轴上的缩放比例。 + 2D 节点可以操作两个坐标轴,而 3D 节点可以操作三个坐标轴。 + 当只传入 (x, y) 时,scale.z 的值不会被改变。 + 当只传入 Vec2 对象时,scale.z 的值将被设置为0。 + @param x scaleX or scale object + @param y y + @param z z + + @example + ```js + node.setScale(cc.v2(2, 2)); // Notice: scaleZ will be 0 + node.setScale(cc.v3(2, 2, 2)); // for 3D node + node.setScale(2); + ``` + */ + setScale(x: number|Vec2|Vec3, y?: number, z?: number): void; + /** + !#en + Get rotation of node (in quaternion). + Need pass a cc.Quat as the argument to receive the return values. + !#zh + 获取该节点的 quaternion 旋转角度,需要传一个 cc.Quat 作为参数来接收返回值。 + @param out out + */ + getRotation(out: Quat): Quat; + /** + !#en Set rotation of node (in quaternion). + !#zh 设置该节点的 quaternion 旋转角度。 + @param quat Quaternion object represents the rotation or the x value of quaternion + @param y y value of quternion + @param z z value of quternion + @param w w value of quternion + */ + setRotation(quat: Quat|number, y?: number, z?: number, w?: number): void; + /** + !#en + Returns a copy the untransformed size of the node.
+ The contentSize remains the same no matter the node is scaled or rotated.
+ All nodes has a size. Layer and Scene has the same size of the screen by default.
+ !#zh 获取节点自身大小,不受该节点是否被缩放或者旋转的影响。 + + @example + ```js + cc.log("Content Size: " + node.getContentSize()); + ``` + */ + getContentSize(): Size; + /** + !#en + Sets the untransformed size of the node.
+ The contentSize remains the same no matter the node is scaled or rotated.
+ All nodes has a size. Layer and Scene has the same size of the screen. + !#zh 设置节点原始大小,不受该节点是否被缩放或者旋转的影响。 + @param size The untransformed size of the node or The untransformed size's width of the node. + @param height The untransformed size's height of the node. + + @example + ```js + node.setContentSize(cc.size(100, 100)); + node.setContentSize(100, 100); + ``` + */ + setContentSize(size: Size|number, height?: number): void; + /** + !#en + Returns a copy of the anchor point.
+ Anchor point is the point around which all transformations and positioning manipulations take place.
+ It's like a pin in the node where it is "attached" to its parent.
+ The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
+ But you can use values higher than (1,1) and lower than (0,0) too.
+ The default anchor point is (0.5,0.5), so it starts at the center of the node. + !#zh + 获取节点锚点,用百分比表示。
+ 锚点应用于所有变换和坐标点的操作,它就像在节点上连接其父节点的大头针。
+ 锚点是标准化的,就像百分比一样。(0,0) 表示左下角,(1,1) 表示右上角。
+ 但是你可以使用比(1,1)更高的值或者比(0,0)更低的值。
+ 默认的锚点是(0.5,0.5),因此它开始于节点的中心位置。
+ 注意:Creator 中的锚点仅用于定位所在的节点,子节点的定位不受影响。 + + @example + ```js + cc.log("Node AnchorPoint: " + node.getAnchorPoint()); + ``` + */ + getAnchorPoint(): Vec2; + /** + !#en + Sets the anchor point in percent.
+ anchor point is the point around which all transformations and positioning manipulations take place.
+ It's like a pin in the node where it is "attached" to its parent.
+ The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
+ But you can use values higher than (1,1) and lower than (0,0) too.
+ The default anchor point is (0.5,0.5), so it starts at the center of the node. + !#zh + 设置锚点的百分比。
+ 锚点应用于所有变换和坐标点的操作,它就像在节点上连接其父节点的大头针。
+ 锚点是标准化的,就像百分比一样。(0,0) 表示左下角,(1,1) 表示右上角。
+ 但是你可以使用比(1,1)更高的值或者比(0,0)更低的值。
+ 默认的锚点是(0.5,0.5),因此它开始于节点的中心位置。
+ 注意:Creator 中的锚点仅用于定位所在的节点,子节点的定位不受影响。 + @param point The anchor point of node or The x axis anchor of node. + @param y The y axis anchor of node. + + @example + ```js + node.setAnchorPoint(cc.v2(1, 1)); + node.setAnchorPoint(1, 1); + ``` + */ + setAnchorPoint(point: Vec2|number, y?: number): void; + /** + !#en Set rotation by lookAt target point, normally used by Camera Node + !#zh 通过观察目标来设置 rotation,一般用于 Camera Node 上 + @param pos pos + @param up default is (0,1,0) + */ + lookAt(pos: Vec3, up?: Vec3): void; + /** + !#en + Get the local transform matrix (4x4), based on parent node coordinates + !#zh 返回局部空间坐标系的矩阵,基于父节点坐标系。 + @param out The matrix object to be filled with data + + @example + ```js + let mat4 = cc.mat4(); + node.getLocalMatrix(mat4); + ``` + */ + getLocalMatrix(out: Mat4): Mat4; + /** + !#en + Get the world transform matrix (4x4) + !#zh 返回世界空间坐标系的矩阵。 + @param out The matrix object to be filled with data + + @example + ```js + let mat4 = cc.mat4(); + node.getWorldMatrix(mat4); + ``` + */ + getWorldMatrix(out: Mat4): Mat4; + /** + !#en + Converts a Point to node (local) space coordinates. + !#zh + 将一个点转换到节点 (局部) 空间坐标系。 + @param worldPoint worldPoint + @param out out + + @example + ```js + var newVec2 = node.convertToNodeSpaceAR(cc.v2(100, 100)); + var newVec3 = node.convertToNodeSpaceAR(cc.v3(100, 100, 100)); + ``` + */ + convertToNodeSpaceAR(worldPoint: T, out?: T): T; + /** + !#en + Converts a Point in node coordinates to world space coordinates. + !#zh + 将节点坐标系下的一个点转换到世界空间坐标系。 + @param nodePoint nodePoint + @param out out + + @example + ```js + var newVec2 = node.convertToWorldSpaceAR(cc.v2(100, 100)); + var newVec3 = node.convertToWorldSpaceAR(cc.v3(100, 100, 100)); + ``` + */ + convertToWorldSpaceAR(nodePoint: T, out?: T): T; + /** + !#en Converts a Point to node (local) space coordinates then add the anchor point position. + So the return position will be related to the left bottom corner of the node's bounding box. + This equals to the API behavior of cocos2d-x, you probably want to use convertToNodeSpaceAR instead + !#zh 将一个点转换到节点 (局部) 坐标系,并加上锚点的坐标。
+ 也就是说返回的坐标是相对于节点包围盒左下角的坐标。
+ 这个 API 的设计是为了和 cocos2d-x 中行为一致,更多情况下你可能需要使用 convertToNodeSpaceAR。 + @param worldPoint worldPoint + + @example + ```js + var newVec2 = node.convertToNodeSpace(cc.v2(100, 100)); + ``` + */ + convertToNodeSpace(worldPoint: Vec2): Vec2; + /** + !#en Converts a Point related to the left bottom corner of the node's bounding box to world space coordinates. + This equals to the API behavior of cocos2d-x, you probably want to use convertToWorldSpaceAR instead + !#zh 将一个相对于节点左下角的坐标位置转换到世界空间坐标系。 + 这个 API 的设计是为了和 cocos2d-x 中行为一致,更多情况下你可能需要使用 convertToWorldSpaceAR + @param nodePoint nodePoint + + @example + ```js + var newVec2 = node.convertToWorldSpace(cc.v2(100, 100)); + ``` + */ + convertToWorldSpace(nodePoint: Vec2): Vec2; + /** + !#en + Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
+ The matrix is in Pixels. + !#zh 返回这个将节点(局部)的空间坐标系转换成父节点的空间坐标系的矩阵。这个矩阵以像素为单位。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getNodeToParentTransform(affineTransform); + ``` + */ + getNodeToParentTransform(out?: AffineTransform): AffineTransform; + /** + !#en + Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
+ The matrix is in Pixels.
+ This method is AR (Anchor Relative). + !#zh + 返回这个将节点(局部)的空间坐标系转换成父节点的空间坐标系的矩阵。
+ 这个矩阵以像素为单位。
+ 该方法基于节点坐标。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getNodeToParentTransformAR(affineTransform); + ``` + */ + getNodeToParentTransformAR(out?: AffineTransform): AffineTransform; + /** + !#en Returns the world affine transform matrix. The matrix is in Pixels. + !#zh 返回节点到世界坐标系的仿射变换矩阵。矩阵单位是像素。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getNodeToWorldTransform(affineTransform); + ``` + */ + getNodeToWorldTransform(out?: AffineTransform): AffineTransform; + /** + !#en + Returns the world affine transform matrix. The matrix is in Pixels.
+ This method is AR (Anchor Relative). + !#zh + 返回节点到世界坐标仿射变换矩阵。矩阵单位是像素。
+ 该方法基于节点坐标。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getNodeToWorldTransformAR(affineTransform); + ``` + */ + getNodeToWorldTransformAR(out?: AffineTransform): AffineTransform; + /** + !#en + Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
+ The matrix is in Pixels. The returned transform is readonly and cannot be changed. + !#zh + 返回将父节点的坐标系转换成节点(局部)的空间坐标系的矩阵。
+ 该矩阵以像素为单位。返回的矩阵是只读的,不能更改。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getParentToNodeTransform(affineTransform); + ``` + */ + getParentToNodeTransform(out?: AffineTransform): AffineTransform; + /** + !#en Returns the inverse world affine transform matrix. The matrix is in Pixels. + !#en 返回世界坐标系到节点坐标系的逆矩阵。 + @param out The affine transform object to be filled with data + + @example + ```js + let affineTransform = cc.AffineTransform.create(); + node.getWorldToNodeTransform(affineTransform); + ``` + */ + getWorldToNodeTransform(out?: AffineTransform): AffineTransform; + /** + !#en convenience methods which take a cc.Touch instead of cc.Vec2. + !#zh 将触摸点转换成本地坐标系中位置。 + @param touch The touch object + + @example + ```js + var newVec2 = node.convertTouchToNodeSpace(touch); + ``` + */ + convertTouchToNodeSpace(touch: Touch): Vec2; + /** + !#en converts a cc.Touch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). + !#zh 转换一个 cc.Touch(世界坐标)到一个局部坐标,该方法基于节点坐标。 + @param touch The touch object + + @example + ```js + var newVec2 = node.convertTouchToNodeSpaceAR(touch); + ``` + */ + convertTouchToNodeSpaceAR(touch: Touch): Vec2; + /** + !#en + Returns a "local" axis aligned bounding box of the node.
+ The returned box is relative only to its parent. + !#zh 返回父节坐标系下的轴向对齐的包围盒。 + + @example + ```js + var boundingBox = node.getBoundingBox(); + ``` + */ + getBoundingBox(): Rect; + /** + !#en + Returns a "world" axis aligned bounding box of the node.
+ The bounding box contains self and active children's world bounding box. + !#zh + 返回节点在世界坐标系下的对齐轴向的包围盒(AABB)。
+ 该边框包含自身和已激活的子节点的世界边框。 + + @example + ```js + var newRect = node.getBoundingBoxToWorld(); + ``` + */ + getBoundingBoxToWorld(): Rect; + /** + !#en + Adds a child to the node with z order and name. + !#zh + 添加子节点,并且可以修改该节点的 局部 Z 顺序和名字。 + @param child A child node + @param zIndex Z order for drawing priority. Please refer to zIndex property + @param name A name to identify the node easily. Please refer to name property + + @example + ```js + node.addChild(newNode, 1, "node"); + ``` + */ + addChild(child: Node, zIndex?: number, name?: string): void; + /** + !#en Stops all running actions and schedulers. + !#zh 停止所有正在播放的动作和计时器。 + + @example + ```js + node.cleanup(); + ``` + */ + cleanup(): void; + /** + !#en Sorts the children array depends on children's zIndex and arrivalOrder, + normally you won't need to invoke this function. + !#zh 根据子节点的 zIndex 和 arrivalOrder 进行排序,正常情况下开发者不需要手动调用这个函数。 + */ + sortAllChildren(): void; + /** + !#en + Returns the displayed opacity of Node, + the difference between displayed opacity and opacity is that displayed opacity is calculated based on opacity and parent node's opacity when cascade opacity enabled. + !#zh + 获取节点显示透明度, + 显示透明度和透明度之间的不同之处在于当启用级连透明度时, + 显示透明度是基于自身透明度和父节点透明度计算的。 + */ + getDisplayedOpacity(): number; + /** + !#en + Returns the displayed color of Node, + the difference between displayed color and color is that displayed color is calculated based on color and parent node's color when cascade color enabled. + !#zh + 获取节点的显示颜色, + 显示颜色和颜色之间的不同之处在于当启用级连颜色时, + 显示颜色是基于自身颜色和父节点颜色计算的。 + */ + getDisplayedColor(): Color; + /** !#en Cascade opacity is removed from v2.0 + Indicate whether node's opacity value affect its child nodes, default value is true. + !#zh 透明度级联功能从 v2.0 开始已移除 + 节点的不透明度值是否影响其子节点,默认值为 true。 */ + cascadeOpacity: boolean; + /** + !#en Cascade opacity is removed from v2.0 + Returns whether node's opacity value affect its child nodes. + !#zh 透明度级联功能从 v2.0 开始已移除 + 返回节点的不透明度值是否影响其子节点。 + */ + isCascadeOpacityEnabled(): boolean; + /** + !#en Cascade opacity is removed from v2.0 + Enable or disable cascade opacity, if cascade enabled, child nodes' opacity will be the multiplication of parent opacity and its own opacity. + !#zh 透明度级联功能从 v2.0 开始已移除 + 启用或禁用级连不透明度,如果级连启用,子节点的不透明度将是父不透明度乘上它自己的不透明度。 + @param cascadeOpacityEnabled cascadeOpacityEnabled + */ + setCascadeOpacityEnabled(cascadeOpacityEnabled: boolean): void; + /** + !#en Opacity modify RGB have been removed since v2.0 + Set whether color should be changed with the opacity value, + useless in ccsg.Node, but this function is override in some class to have such behavior. + !#zh 透明度影响颜色配置已经被废弃 + 设置更改透明度时是否修改RGB值, + @param opacityValue opacityValue + */ + setOpacityModifyRGB(opacityValue: boolean): void; + /** + !#en Opacity modify RGB have been removed since v2.0 + Get whether color should be changed with the opacity value. + !#zh 透明度影响颜色配置已经被废弃 + 获取更改透明度时是否修改RGB值。 + */ + isOpacityModifyRGB(): boolean; + } + /** !#en + Class of private entities in Cocos Creator scenes.
+ The PrivateNode is hidden in editor, and completely transparent to users.
+ It's normally used as Node's private content created by components in parent node.
+ So in theory private nodes are not children, they are part of the parent node.
+ Private node have two important characteristics:
+ 1. It has the minimum z index and cannot be modified, because they can't be displayed over real children.
+ 2. The positioning of private nodes is also special, they will consider the left bottom corner of the parent node's bounding box as the origin of local coordinates.
+ In this way, they can be easily kept inside the bounding box.
+ Currently, it's used by RichText component and TileMap component. + !#zh + Cocos Creator 场景中的私有节点类。
+ 私有节点在编辑器中不可见,对用户透明。
+ 通常私有节点是被一些特殊的组件创建出来作为父节点的一部分而存在的,理论上来说,它们不是子节点,而是父节点的组成部分。
+ 私有节点有两个非常重要的特性:
+ 1. 它有着最小的渲染排序的 Z 轴深度,并且无法被更改,因为它们不能被显示在其他正常子节点之上。
+ 2. 它的定位也是特殊的,对于私有节点来说,父节点包围盒的左下角是它的局部坐标系原点,这个原点相当于父节点的位置减去它锚点的偏移。这样私有节点可以比较容易被控制在包围盒之中。
+ 目前在引擎中,RichText 和 TileMap 都有可能生成私有节点。 */ + export class PrivateNode extends Node { + /** + + @param name name + */ + constructor(name?: string); + } + /** !#en + cc.Scene is a subclass of cc.Node that is used only as an abstract concept.
+ cc.Scene and cc.Node are almost identical with the difference that users can not modify cc.Scene manually. + !#zh + cc.Scene 是 cc.Node 的子类,仅作为一个抽象的概念。
+ cc.Scene 和 cc.Node 有点不同,用户不应直接修改 cc.Scene。 */ + export class Scene extends Node { + /** !#en Indicates whether all (directly or indirectly) static referenced assets of this scene are releasable by default after scene unloading. + !#zh 指示该场景中直接或间接静态引用到的所有资源是否默认在场景切换后自动释放。 */ + autoReleaseAssets: boolean; + } + /** !#en + Scheduler is responsible of triggering the scheduled callbacks.
+ You should not use NSTimer. Instead use this class.
+
+ There are 2 different types of callbacks (selectors):
+ - update callback: the 'update' callback will be called every frame. You can customize the priority.
+ - custom callback: A custom callback will be called every frame, or with a custom interval of time
+
+ The 'custom selectors' should be avoided when possible. It is faster, + and consumes less memory to use the 'update callback'. * + !#zh + Scheduler 是负责触发回调函数的类。
+ 通常情况下,建议使用 cc.director.getScheduler() 来获取系统定时器。
+ 有两种不同类型的定时器:
+ - update 定时器:每一帧都会触发。您可以自定义优先级。
+ - 自定义定时器:自定义定时器可以每一帧或者自定义的时间间隔触发。
+ 如果希望每帧都触发,应该使用 update 定时器,使用 update 定时器更快,而且消耗更少的内存。 */ + export class Scheduler { + /** + !#en This method should be called for any target which needs to schedule tasks, and this method should be called before any scheduler API usage. + This method will add a `_id` property if it doesn't exist. + !#zh 任何需要用 Scheduler 管理任务的对象主体都应该调用这个方法,并且应该在调用任何 Scheduler API 之前调用这个方法。 + 这个方法会给对象添加一个 `_id` 属性,如果这个属性不存在的话。 + @param target target + */ + enableForTarget(target: any): void; + /** + !#en + Modifies the time of all scheduled callbacks.
+ You can use this property to create a 'slow motion' or 'fast forward' effect.
+ Default is 1.0. To create a 'slow motion' effect, use values below 1.0.
+ To create a 'fast forward' effect, use values higher than 1.0.
+ Note:It will affect EVERY scheduled selector / action. + !#zh + 设置时间间隔的缩放比例。
+ 您可以使用这个方法来创建一个 “slow motion(慢动作)” 或 “fast forward(快进)” 的效果。
+ 默认是 1.0。要创建一个 “slow motion(慢动作)” 效果,使用值低于 1.0。
+ 要使用 “fast forward(快进)” 效果,使用值大于 1.0。
+ 注意:它影响该 Scheduler 下管理的所有定时器。 + @param timeScale timeScale + */ + setTimeScale(timeScale: number): void; + /** + !#en Returns time scale of scheduler. + !#zh 获取时间间隔的缩放比例。 + */ + getTimeScale(): number; + /** + !#en 'update' the scheduler. (You should NEVER call this method, unless you know what you are doing.) + !#zh update 调度函数。(不应该直接调用这个方法,除非完全了解这么做的结果) + @param dt delta time + */ + update(dt: number): void; + /** + !#en +

+ The scheduled method will be called every 'interval' seconds.
+ If paused is YES, then it won't be called until it is resumed.
+ If 'interval' is 0, it will be called every frame, but if so, it recommended to use 'scheduleUpdateForTarget:' instead.
+ If the callback function is already scheduled, then only the interval parameter will be updated without re-scheduling it again.
+ repeat let the action be repeated repeat + 1 times, use cc.macro.REPEAT_FOREVER to let the action run continuously
+ delay is the amount of time the action will wait before it'll start
+

+ !#zh + 指定回调函数,调用对象等信息来添加一个新的定时器。
+ 如果 paused 值为 true,那么直到 resume 被调用才开始计时。
+ 当时间间隔达到指定值时,设置的回调函数将会被调用。
+ 如果 interval 值为 0,那么回调函数每一帧都会被调用,但如果是这样, + 建议使用 scheduleUpdateForTarget 代替。
+ 如果回调函数已经被定时器使用,那么只会更新之前定时器的时间间隔参数,不会设置新的定时器。
+ repeat 值可以让定时器触发 repeat + 1 次,使用 cc.macro.REPEAT_FOREVER + 可以让定时器一直循环触发。
+ delay 值指定延迟时间,定时器会在延迟指定的时间之后开始计时。 + @param callback callback + @param target target + @param interval interval + @param repeat repeat + @param delay delay + @param paused paused + + @example + ```js + //register a schedule to scheduler + cc.director.getScheduler().schedule(callback, this, interval, !this._isRunning); + + ``` + */ + schedule(callback: Function, target: any, interval: number, repeat: number, delay: number, paused?: boolean): void; + schedule(callback: Function, target: any, interval: number, paused?: boolean): void; + /** + !#en + Schedules the update callback for a given target, + During every frame after schedule started, the "update" function of target will be invoked. + !#zh + 使用指定的优先级为指定的对象设置 update 定时器。 + update 定时器每一帧都会被触发,触发时自动调用指定对象的 "update" 函数。 + 优先级的值越低,定时器被触发的越早。 + @param target target + @param priority priority + @param paused paused + */ + scheduleUpdate(target: any, priority: number, paused: boolean): void; + /** + !#en + Unschedules a callback for a callback and a given target. + If you want to unschedule the "update", use `unscheduleUpdate()` + !#zh + 取消指定对象定时器。 + 如果需要取消 update 定时器,请使用 unscheduleUpdate()。 + @param callback The callback to be unscheduled + @param target The target bound to the callback. + */ + unschedule(callback: Function, target: any): void; + /** + !#en Unschedules the update callback for a given target. + !#zh 取消指定对象的 update 定时器。 + @param target The target to be unscheduled. + */ + unscheduleUpdate(target: any): void; + /** + !#en + Unschedules all scheduled callbacks for a given target. + This also includes the "update" callback. + !#zh 取消指定对象的所有定时器,包括 update 定时器。 + @param target The target to be unscheduled. + */ + unscheduleAllForTarget(target: any): void; + /** + !#en + Unschedules all scheduled callbacks from all targets including the system callbacks.
+ You should NEVER call this method, unless you know what you are doing. + !#zh + 取消所有对象的所有定时器,包括系统定时器。
+ 不要调用此函数,除非你确定你在做什么。 + */ + unscheduleAll(): void; + /** + !#en + Unschedules all callbacks from all targets with a minimum priority.
+ You should only call this with `PRIORITY_NON_SYSTEM_MIN` or higher. + !#zh + 取消所有优先级的值大于指定优先级的定时器。
+ 你应该只取消优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。 + @param minPriority The minimum priority of selector to be unscheduled. Which means, all selectors which + priority is higher than minPriority will be unscheduled. + */ + unscheduleAllWithMinPriority(minPriority: number): void; + /** + !#en Checks whether a callback for a given target is scheduled. + !#zh 检查指定的回调函数和回调对象组合是否存在定时器。 + @param callback The callback to check. + @param target The target of the callback. + */ + isScheduled(callback: Function, target: any): boolean; + /** + !#en + Pause all selectors from all targets.
+ You should NEVER call this method, unless you know what you are doing. + !#zh + 暂停所有对象的所有定时器。
+ 不要调用这个方法,除非你知道你正在做什么。 + */ + pauseAllTargets(): void; + /** + !#en + Pause all selectors from all targets with a minimum priority.
+ You should only call this with kCCPriorityNonSystemMin or higher. + !#zh + 暂停所有优先级的值大于指定优先级的定时器。
+ 你应该只暂停优先级的值大于 PRIORITY_NON_SYSTEM_MIN 的定时器。 + @param minPriority minPriority + */ + pauseAllTargetsWithMinPriority(minPriority: number): void; + /** + !#en + Resume selectors on a set of targets.
+ This can be useful for undoing a call to pauseAllCallbacks. + !#zh + 恢复指定数组中所有对象的定时器。
+ 这个函数是 pauseAllCallbacks 的逆操作。 + @param targetsToResume targetsToResume + */ + resumeTargets(targetsToResume: any[]): void; + /** + !#en + Pauses the target.
+ All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed.
+ If the target is not present, nothing happens. + !#zh + 暂停指定对象的定时器。
+ 指定对象的所有定时器都会被暂停。
+ 如果指定的对象没有定时器,什么也不会发生。 + @param target target + */ + pauseTarget(target: any): void; + /** + !#en + Resumes the target.
+ The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again.
+ If the target is not present, nothing happens. + !#zh + 恢复指定对象的所有定时器。
+ 指定对象的所有定时器将继续工作。
+ 如果指定的对象没有定时器,什么也不会发生。 + @param target target + */ + resumeTarget(target: any): void; + /** + !#en Returns whether or not the target is paused. + !#zh 返回指定对象的定时器是否暂停了。 + @param target target + */ + isTargetPaused(target: any): boolean; + /** !#en Priority level reserved for system services. + !#zh 系统服务的优先级。 */ + static PRIORITY_SYSTEM: number; + /** !#en Minimum priority level for user scheduling. + !#zh 用户调度最低优先级。 */ + static PRIORITY_NON_SYSTEM: number; + } + /** Class for particle asset handling. */ + export class ParticleAsset extends Asset { + } + /** Particle System base class.
+ Attributes of a Particle System:
+ - emmision rate of the particles
+ - Gravity Mode (Mode A):
+ - gravity
+ - direction
+ - speed +- variance
+ - tangential acceleration +- variance
+ - radial acceleration +- variance
+ - Radius Mode (Mode B):
+ - startRadius +- variance
+ - endRadius +- variance
+ - rotate +- variance
+ - Properties common to all modes:
+ - life +- life variance
+ - start spin +- variance
+ - end spin +- variance
+ - start size +- variance
+ - end size +- variance
+ - start color +- variance
+ - end color +- variance
+ - life +- variance
+ - blending function
+ - texture
+
+ cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/).
+ 'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guarateed in cocos2d,
+ cocos2d uses a another approach, but the results are almost identical.
+ cocos2d supports all the variables used by Particle Designer plus a bit more:
+ - spinning particles (supported when using ParticleSystem)
+ - tangential acceleration (Gravity mode)
+ - radial acceleration (Gravity mode)
+ - radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only)
+ It is possible to customize any of the above mentioned properties in runtime. Example:
*/ + export class ParticleSystem extends RenderComponent implements BlendFunc { + /** !#en Play particle in edit mode. + !#zh 在编辑器模式下预览粒子,启用后选中粒子时,粒子将自动播放。 */ + preview: boolean; + /** !#en + If set custom to true, then use custom properties insteadof read particle file. + !#zh 是否自定义粒子属性。 */ + custom: boolean; + /** !#en The plist file. + !#zh plist 格式的粒子配置文件。 */ + file: ParticleAsset; + /** !#en SpriteFrame used for particles display + !#zh 用于粒子呈现的 SpriteFrame */ + spriteFrame: SpriteFrame; + /** !#en Texture of Particle System, readonly, please use spriteFrame to setup new texture。 + !#zh 粒子贴图,只读属性,请使用 spriteFrame 属性来替换贴图。 */ + texture: string; + /** !#en Current quantity of particles that are being simulated. + !#zh 当前播放的粒子数量。 */ + particleCount: number; + /** !#en Indicate whether the system simulation have stopped. + !#zh 指示粒子播放是否完毕。 */ + stopped: boolean; + /** !#en If set to true, the particle system will automatically start playing on onLoad. + !#zh 如果设置为 true 运行时会自动发射粒子。 */ + playOnLoad: boolean; + /** !#en Indicate whether the owner node will be auto-removed when it has no particles left. + !#zh 粒子播放完毕后自动销毁所在的节点。 */ + autoRemoveOnFinish: boolean; + /** !#en Indicate whether the particle system is activated. + !#zh 是否激活粒子。 */ + active: boolean; + /** !#en Maximum particles of the system. + !#zh 粒子最大数量。 */ + totalParticles: number; + /** !#en How many seconds the emitter wil run. -1 means 'forever'. + !#zh 发射器生存时间,单位秒,-1表示持续发射。 */ + duration: number; + /** !#en Emission rate of the particles. + !#zh 每秒发射的粒子数目。 */ + emissionRate: number; + /** !#en Life of each particle setter. + !#zh 粒子的运行时间。 */ + life: number; + /** !#en Variation of life. + !#zh 粒子的运行时间变化范围。 */ + lifeVar: number; + /** !#en Start color of each particle. + !#zh 粒子初始颜色。 */ + startColor: Color; + /** !#en Variation of the start color. + !#zh 粒子初始颜色变化范围。 */ + startColorVar: Color; + /** !#en Ending color of each particle. + !#zh 粒子结束颜色。 */ + endColor: Color; + /** !#en Variation of the end color. + !#zh 粒子结束颜色变化范围。 */ + endColorVar: Color; + /** !#en Angle of each particle setter. + !#zh 粒子角度。 */ + angle: number; + /** !#en Variation of angle of each particle setter. + !#zh 粒子角度变化范围。 */ + angleVar: number; + /** !#en Start size in pixels of each particle. + !#zh 粒子的初始大小。 */ + startSize: number; + /** !#en Variation of start size in pixels. + !#zh 粒子初始大小的变化范围。 */ + startSizeVar: number; + /** !#en End size in pixels of each particle. + !#zh 粒子结束时的大小。 */ + endSize: number; + /** !#en Variation of end size in pixels. + !#zh 粒子结束大小的变化范围。 */ + endSizeVar: number; + /** !#en Start angle of each particle. + !#zh 粒子开始自旋角度。 */ + startSpin: number; + /** !#en Variation of start angle. + !#zh 粒子开始自旋角度变化范围。 */ + startSpinVar: number; + /** !#en End angle of each particle. + !#zh 粒子结束自旋角度。 */ + endSpin: number; + /** !#en Variation of end angle. + !#zh 粒子结束自旋角度变化范围。 */ + endSpinVar: number; + /** !#en Source position of the emitter. + !#zh 发射器位置。 */ + sourcePos: Vec2; + /** !#en Variation of source position. + !#zh 发射器位置的变化范围。(横向和纵向) */ + posVar: Vec2; + /** !#en Particles movement type. + !#zh 粒子位置类型。 */ + positionType: ParticleSystem.PositionType; + /** !#en Particles emitter modes. + !#zh 发射器类型。 */ + emitterMode: ParticleSystem.EmitterMode; + /** !#en Gravity of the emitter. + !#zh 重力。 */ + gravity: Vec2; + /** !#en Speed of the emitter. + !#zh 速度。 */ + speed: number; + /** !#en Variation of the speed. + !#zh 速度变化范围。 */ + speedVar: number; + /** !#en Tangential acceleration of each particle. Only available in 'Gravity' mode. + !#zh 每个粒子的切向加速度,即垂直于重力方向的加速度,只有在重力模式下可用。 */ + tangentialAccel: number; + /** !#en Variation of the tangential acceleration. + !#zh 每个粒子的切向加速度变化范围。 */ + tangentialAccelVar: number; + /** !#en Acceleration of each particle. Only available in 'Gravity' mode. + !#zh 粒子径向加速度,即平行于重力方向的加速度,只有在重力模式下可用。 */ + radialAccel: number; + /** !#en Variation of the radial acceleration. + !#zh 粒子径向加速度变化范围。 */ + radialAccelVar: number; + /** !#en Indicate whether the rotation of each particle equals to its direction. Only available in 'Gravity' mode. + !#zh 每个粒子的旋转是否等于其方向,只有在重力模式下可用。 */ + rotationIsDir: boolean; + /** !#en Starting radius of the particles. Only available in 'Radius' mode. + !#zh 初始半径,表示粒子出生时相对发射器的距离,只有在半径模式下可用。 */ + startRadius: number; + /** !#en Variation of the starting radius. + !#zh 初始半径变化范围。 */ + startRadiusVar: number; + /** !#en Ending radius of the particles. Only available in 'Radius' mode. + !#zh 结束半径,只有在半径模式下可用。 */ + endRadius: number; + /** !#en Variation of the ending radius. + !#zh 结束半径变化范围。 */ + endRadiusVar: number; + /** !#en Number of degress to rotate a particle around the source pos per second. Only available in 'Radius' mode. + !#zh 粒子每秒围绕起始点的旋转角度,只有在半径模式下可用。 */ + rotatePerS: number; + /** !#en Variation of the degress to rotate a particle around the source pos per second. + !#zh 粒子每秒围绕起始点的旋转角度变化范围。 */ + rotatePerSVar: number; + /** !#en The Particle emitter lives forever. + !#zh 表示发射器永久存在 */ + static DURATION_INFINITY: number; + /** !#en The starting size of the particle is equal to the ending size. + !#zh 表示粒子的起始大小等于结束大小。 */ + static START_SIZE_EQUAL_TO_END_SIZE: number; + /** !#en The starting radius of the particle is equal to the ending radius. + !#zh 表示粒子的起始半径等于结束半径。 */ + static START_RADIUS_EQUAL_TO_END_RADIUS: number; + /** + !#en Stop emitting particles. Running particles will continue to run until they die. + !#zh 停止发射器发射粒子,发射出去的粒子将继续运行,直至粒子生命结束。 + + @example + ```js + // stop particle system. + myParticleSystem.stopSystem(); + ``` + */ + stopSystem(): void; + /** + !#en Kill all living particles. + !#zh 杀死所有存在的粒子,然后重新启动粒子发射器。 + + @example + ```js + // play particle system. + myParticleSystem.resetSystem(); + ``` + */ + resetSystem(): void; + /** + !#en Whether or not the system is full. + !#zh 发射器中粒子是否大于等于设置的总粒子数量。 + */ + isFull(): boolean; + /** + !#en Sets a new texture with a rect. The rect is in texture position and size. + Please use spriteFrame property instead, this function is deprecated since v1.9 + !#zh 设置一张新贴图和关联的矩形。 + 请直接设置 spriteFrame 属性,这个函数从 v1.9 版本开始已经被废弃 + @param texture texture + @param rect rect + */ + setTextureWithRect(texture: Texture2D, rect: Rect): void; + /** !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost. + !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销 */ + srcBlendFactor: macro.BlendFactor; + /** !#en specify the destination Blend Factor. + !#zh 指定目标的混合模式 */ + dstBlendFactor: macro.BlendFactor; + } + /** !#en cc.WebView is a component for display web pages in the game. Because different platforms have different authorization, API and control methods for WebView component. And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported. + !#zh WebView 组件,用于在游戏中显示网页。由于不同平台对于 WebView 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 */ + export class WebView extends Component { + /** !#en A given URL to be loaded by the WebView, it should have a http or https prefix. + !#zh 指定 WebView 加载的网址,它应该是一个 http 或者 https 开头的字符串 */ + url: string; + /** !#en The webview's event callback , it will be triggered when certain webview event occurs. + !#zh WebView 的回调事件,当网页加载过程中,加载完成后或者加载出错时都会回调此函数 */ + webviewLoadedEvents: Component.EventHandler[]; + /** + !#en + Set javascript interface scheme (see also setOnJSCallback).
+ Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.
+ Please refer to the official documentation for more details. + !#zh + 设置 JavaScript 接口方案(与 'setOnJSCallback' 配套使用)。
+ 注意:只支持 Android 和 iOS ,Web 端用法请前往官方文档查看。
+ 详情请参阅官方文档 + @param scheme scheme + */ + setJavascriptInterfaceScheme(scheme: string): void; + /** + !#en + This callback called when load URL that start with javascript + interface scheme (see also setJavascriptInterfaceScheme).
+ Note: Supports only on the Android and iOS. For HTML5, please refer to the official documentation.
+ Please refer to the official documentation for more details. + !#zh + 当加载 URL 以 JavaScript 接口方案开始时调用这个回调函数。
+ 注意:只支持 Android 和 iOS,Web 端用法请前往官方文档查看。 + 详情请参阅官方文档 + @param callback callback + */ + setOnJSCallback(callback: Function): void; + /** + !#en + Evaluates JavaScript in the context of the currently displayed page.
+ Please refer to the official document for more details
+ Note: Cross domain issues need to be resolved by yourself
+ !#zh + 执行 WebView 内部页面脚本(详情请参阅官方文档)
+ 注意:需要自行解决跨域问题 + @param str str + */ + evaluateJS(str: string): void; + /** + !#en if you don't need the WebView and it isn't in any running Scene, you should + call the destroy method on this component or the associated node explicitly. + Otherwise, the created DOM element won't be removed from web page. + !#zh + 如果你不再使用 WebView,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。 + 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。 + + @example + ```js + webview.node.parent = null; // or webview.node.removeFromParent(false); + // when you don't need webview anymore + webview.node.destroy(); + ``` + */ + destroy(): boolean; + } + /** cc.TMXLayerInfo contains the information about the layers like: + - Layer name + - Layer size + - Layer opacity at creation time (it can be modified at runtime) + - Whether the layer is visible (if it's not visible, then the CocosNode won't be created) + This information is obtained from the TMX file. */ + export class TMXLayerInfo { + /** Properties of the layer info. */ + properties: any; + } + /** cc.TMXImageLayerInfo contains the information about the image layers. + This information is obtained from the TMX file. */ + export class TMXImageLayerInfo { + } + /**

cc.TMXObjectGroupInfo contains the information about the object group like: + - group name + - group size + - group opacity at creation time (it can be modified at runtime) + - Whether the group is visible + + This information is obtained from the TMX file.

*/ + export class TMXObjectGroupInfo { + /** Properties of the ObjectGroup info. */ + properties: any[]; + } + /**

cc.TMXTilesetInfo contains the information about the tilesets like:
+ - Tileset name
+ - Tileset spacing
+ - Tileset margin
+ - size of the tiles
+ - Image used for the tiles
+ - Image size
+ + This information is obtained from the TMX file.

*/ + export class TMXTilesetInfo { + /** Tileset name */ + name: string; + /** First grid */ + firstGid: number; + /** Spacing */ + spacing: number; + /** Margin */ + margin: number; + /** Texture containing the tiles (should be sprite sheet / texture atlas) */ + sourceImage: any; + /** Size in pixels of the image */ + imageSize: Size; + } + /**

cc.TMXMapInfo contains the information about the map like:
+ - Map orientation (hexagonal, isometric or orthogonal)
+ - Tile size
+ - Map size

+ +

And it also contains:
+ - Layers (an array of TMXLayerInfo objects)
+ - Tilesets (an array of TMXTilesetInfo objects)
+ - ObjectGroups (an array of TMXObjectGroupInfo objects)

+ +

This information is obtained from the TMX file.

*/ + export class TMXMapInfo { + /** Properties of the map info. */ + properties: any[]; + /** Map orientation. */ + orientation: number; + /** Parent element. */ + parentElement: any; + /** Parent GID. */ + parentGID: number; + /** Layer attributes. */ + layerAttrs: any; + /** Is reading storing characters stream. */ + storingCharacters: boolean; + /** Current string stored from characters stream. */ + currentString: string; + /** Width of the map */ + mapWidth: number; + /** Height of the map */ + mapHeight: number; + /** Width of a tile */ + tileWidth: number; + /** Height of a tile */ + tileHeight: number; + static ATTRIB_NONE: number; + static ATTRIB_BASE64: number; + static ATTRIB_GZIP: number; + static ATTRIB_ZLIB: number; + } + /** !#en Render the TMX layer. + !#zh 渲染 TMX layer。 */ + export class TiledLayer extends Component { + /** + !#en enable or disable culling + !#zh 开启或关闭裁剪。 + @param value value + */ + enableCulling(value: any): void; + /** + !#en Adds user's node into layer. + !#zh 添加用户节点。 + @param node node + */ + addUserNode(node: Node): boolean; + /** + !#en Removes user's node. + !#zh 移除用户节点。 + @param node node + */ + removeUserNode(node: Node): boolean; + /** + !#en Destroy user's node. + !#zh 销毁用户节点。 + @param node node + */ + destroyUserNode(node: Node): void; + /** + !#en Gets the layer name. + !#zh 获取层的名称。 + + @example + ```js + let layerName = tiledLayer.getLayerName(); + cc.log(layerName); + ``` + */ + getLayerName(): string; + /** + !#en Set the layer name. + !#zh 设置层的名称 + @param layerName layerName + + @example + ```js + tiledLayer.setLayerName("New Layer"); + ``` + */ + SetLayerName(layerName: string): void; + /** + !#en Return the value for the specific property name. + !#zh 获取指定属性名的值。 + @param propertyName propertyName + + @example + ```js + let property = tiledLayer.getProperty("info"); + cc.log(property); + ``` + */ + getProperty(propertyName: string): any; + /** + !#en Returns the position in pixels of a given tile coordinate. + !#zh 获取指定 tile 的像素坐标。 + @param pos position or x + @param y y + + @example + ```js + let pos = tiledLayer.getPositionAt(cc.v2(0, 0)); + cc.log("Pos: " + pos); + let pos = tiledLayer.getPositionAt(0, 0); + cc.log("Pos: " + pos); + ``` + */ + getPositionAt(pos: Vec2|number, y?: number): Vec2; + /** + !#en + Sets the tiles gid (gid = tile global id) at a given tiles rect. + !#zh + 设置给定区域的 tile 的 gid (gid = tile 全局 id), + @param gids an array contains gid + @param beginCol begin col number + @param beginRow begin row number + @param totalCols count of column + + @example + ```js + tiledLayer.setTilesGIDAt([1, 1, 1, 1], 10, 10, 2) + ``` + */ + setTilesGIDAt(gids: any[], beginCol: number, beginRow: number, totalCols: number): void; + /** + !#en + Sets the tile gid (gid = tile global id) at a given tile coordinate.
+ The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor . Tileset Mgr +1.
+ If a tile is already placed at that position, then it will be removed. + !#zh + 设置给定坐标的 tile 的 gid (gid = tile 全局 id), + tile 的 GID 可以使用方法 “tileGIDAt” 来获得。
+ 如果一个 tile 已经放在那个位置,那么它将被删除。 + @param gid gid + @param posOrX position or x + @param flagsOrY flags or y + @param flags flags + + @example + ```js + tiledLayer.setTileGIDAt(1001, 10, 10, 1) + ``` + */ + setTileGIDAt(gid: number, posOrX: Vec2|number, flagsOrY: number, flags?: number): void; + /** + !#en + Returns the tiles data.An array fill with GIDs.
+ !#zh + 返回 tiles 数据. 由GID构成的一个数组.
+ */ + getTiles(): number[]; + /** + !#en + Returns the tile gid at a given tile coordinate.
+ if it returns 0, it means that the tile is empty.
+ !#zh + 通过给定的 tile 坐标、flags(可选)返回 tile 的 GID.
+ 如果它返回 0,则表示该 tile 为空。
+ @param pos or x + @param y y + + @example + ```js + let tileGid = tiledLayer.getTileGIDAt(0, 0); + ``` + */ + getTileGIDAt(pos: Vec2|number, y?: number): number; + /** + !#en Layer orientation, which is the same as the map orientation. + !#zh 获取 Layer 方向(同地图方向)。 + + @example + ```js + let orientation = tiledLayer.getLayerOrientation(); + cc.log("Layer Orientation: " + orientation); + ``` + */ + getLayerOrientation(): number; + /** + !#en properties from the layer. They can be added using Tiled. + !#zh 获取 layer 的属性,可以使用 Tiled 编辑器添加属性。 + + @example + ```js + let properties = tiledLayer.getProperties(); + cc.log("Properties: " + properties); + ``` + */ + getProperties(): any; + /** + !#en + Get the TiledTile with the tile coordinate.
+ If there is no tile in the specified coordinate and forceCreate parameter is true,
+ then will create a new TiledTile at the coordinate. + The renderer will render the tile with the rotation, scale, position and color property of the TiledTile. + !#zh + 通过指定的 tile 坐标获取对应的 TiledTile。
+ 如果指定的坐标没有 tile,并且设置了 forceCreate 那么将会在指定的坐标创建一个新的 TiledTile 。
+ 在渲染这个 tile 的时候,将会使用 TiledTile 的节点的旋转、缩放、位移、颜色属性。
+ @param x x + @param y y + @param forceCreate forceCreate + + @example + ```js + let tile = tiledLayer.getTiledTileAt(100, 100, true); + cc.log(tile); + ``` + */ + getTiledTileAt(x: number, y: number, forceCreate: boolean): TiledTile; + /** + !#en + Change tile to TiledTile at the specified coordinate. + !#zh + 将指定的 tile 坐标替换为指定的 TiledTile。 + @param x x + @param y y + @param tiledTile tiledTile + */ + setTiledTileAt(x: number, y: number, tiledTile: TiledTile): TiledTile; + /** + !#en Return texture. + !#zh 获取纹理。 + @param index The index of textures + */ + getTexture(index: any): Texture2D; + /** + !#en Return texture. + !#zh 获取纹理。 + */ + getTextures(): Texture2D; + /** + !#en Set the texture. + !#zh 设置纹理。 + @param texture texture + */ + setTexture(texture: Texture2D): void; + /** + !#en Set the texture. + !#zh 设置纹理。 + @param textures textures + */ + setTexture(textures: Texture2D): void; + /** + !#en Gets layer size. + !#zh 获得层大小。 + + @example + ```js + let size = tiledLayer.getLayerSize(); + cc.log("layer size: " + size); + ``` + */ + getLayerSize(): Size; + /** + !#en Size of the map's tile (could be different from the tile's size). + !#zh 获取 tile 的大小( tile 的大小可能会有所不同)。 + + @example + ```js + let mapTileSize = tiledLayer.getMapTileSize(); + cc.log("MapTile size: " + mapTileSize); + ``` + */ + getMapTileSize(): Size; + /** + !#en Gets Tile set first information for the layer. + !#zh 获取 layer 索引位置为0的 Tileset 信息。 + @param index The index of tilesets + */ + getTileSet(index: any): TMXTilesetInfo; + /** + !#en Gets tile set all information for the layer. + !#zh 获取 layer 所有的 Tileset 信息。 + */ + getTileSet(): TMXTilesetInfo; + /** + !#en Sets tile set information for the layer. + !#zh 设置 layer 的 tileset 信息。 + @param tileset tileset + */ + setTileSet(tileset: TMXTilesetInfo): void; + /** + !#en Sets Tile set information for the layer. + !#zh 设置 layer 的 Tileset 信息。 + @param tilesets tilesets + */ + setTileSets(tilesets: TMXTilesetInfo): void; + } + /** !#en Renders a TMX Tile Map in the scene. + !#zh 在场景中渲染一个 tmx 格式的 Tile Map。 */ + export class TiledMap extends Component { + /** !#en The TiledMap Asset. + !#zh TiledMap 资源。 */ + tmxAsset: TiledMapAsset; + /** + !#en Gets the map size. + !#zh 获取地图大小。 + + @example + ```js + let mapSize = tiledMap.getMapSize(); + cc.log("Map Size: " + mapSize); + ``` + */ + getMapSize(): Size; + /** + !#en Gets the tile size. + !#zh 获取地图背景中 tile 元素的大小。 + + @example + ```js + let tileSize = tiledMap.getTileSize(); + cc.log("Tile Size: " + tileSize); + ``` + */ + getTileSize(): Size; + /** + !#en map orientation. + !#zh 获取地图方向。 + + @example + ```js + let mapOrientation = tiledMap.getMapOrientation(); + cc.log("Map Orientation: " + mapOrientation); + ``` + */ + getMapOrientation(): number; + /** + !#en object groups. + !#zh 获取所有的对象层。 + + @example + ```js + let objGroups = titledMap.getObjectGroups(); + for (let i = 0; i < objGroups.length; ++i) { + cc.log("obj: " + objGroups[i]); + } + ``` + */ + getObjectGroups(): TiledObjectGroup[]; + /** + !#en Return the TMXObjectGroup for the specific group. + !#zh 获取指定的 TMXObjectGroup。 + @param groupName groupName + + @example + ```js + let group = titledMap.getObjectGroup("Players"); + cc.log("ObjectGroup: " + group); + ``` + */ + getObjectGroup(groupName: string): TiledObjectGroup; + /** + !#en enable or disable culling + !#zh 开启或关闭裁剪。 + @param value value + */ + enableCulling(value: any): void; + /** + !#en Gets the map properties. + !#zh 获取地图的属性。 + + @example + ```js + let properties = titledMap.getProperties(); + for (let i = 0; i < properties.length; ++i) { + cc.log("Properties: " + properties[i]); + } + ``` + */ + getProperties(): any[]; + /** + !#en Return All layers array. + !#zh 返回包含所有 layer 的数组。 + + @example + ```js + let layers = titledMap.getLayers(); + for (let i = 0; i < layers.length; ++i) { + cc.log("Layers: " + layers[i]); + } + ``` + */ + getLayers(): TiledLayer[]; + /** + !#en return the cc.TiledLayer for the specific layer. + !#zh 获取指定名称的 layer。 + @param layerName layerName + + @example + ```js + let layer = titledMap.getLayer("Player"); + cc.log(layer); + ``` + */ + getLayer(layerName: string): TiledLayer; + /** + !#en Return the value for the specific property name. + !#zh 通过属性名称,获取指定的属性。 + @param propertyName propertyName + + @example + ```js + let property = titledMap.getProperty("info"); + cc.log("Property: " + property); + ``` + */ + getProperty(propertyName: string): string; + /** + !#en Return properties dictionary for tile GID. + !#zh 通过 GID ,获取指定的属性。 + @param GID GID + + @example + ```js + let properties = titledMap.getPropertiesForGID(GID); + cc.log("Properties: " + properties); + ``` + */ + getPropertiesForGID(GID: number): any; + } + /** Class for tiled map asset handling. */ + export class TiledMapAsset extends Asset { + textures: Texture2D[]; + textureNames: string[]; + textureSizes: Size[]; + imageLayerTextures: Texture2D[]; + imageLayerTextureNames: string[]; + } + /** !#en Renders the TMX object group. + !#zh 渲染 tmx object group。 */ + export class TiledObjectGroup extends Component { + /** + !#en Offset position of child objects. + !#zh 获取子对象的偏移位置。 + + @example + ```js + let offset = tMXObjectGroup.getPositionOffset(); + ``` + */ + getPositionOffset(): Vec2; + /** + !#en List of properties stored in a dictionary. + !#zh 以映射的形式获取属性列表。 + + @example + ```js + let offset = tMXObjectGroup.getProperties(); + ``` + */ + getProperties(): any; + /** + !#en Gets the Group name. + !#zh 获取组名称。 + + @example + ```js + let groupName = tMXObjectGroup.getGroupName; + ``` + */ + getGroupName(): string; + /** + !#en + Return the object for the specific object name.
+ It will return the 1st object found on the array for the given name. + !#zh 获取指定的对象。 + @param objectName objectName + + @example + ```js + let object = tMXObjectGroup.getObject("Group"); + ``` + */ + getObject(objectName: string): any; + /** + !#en Gets the objects. + !#zh 获取对象数组。 + + @example + ```js + let objects = tMXObjectGroup.getObjects(); + ``` + */ + getObjects(): any[]; + } + /** !#en TiledTile can control the specified map tile. + It will apply the node rotation, scale, translate to the map tile. + You can change the TiledTile's gid to change the map tile's style. + !#zh TiledTile 可以单独对某一个地图块进行操作。 + 他会将节点的旋转,缩放,平移操作应用在这个地图块上,并可以通过更换当前地图块的 gid 来更换地图块的显示样式。 */ + export class TiledTile extends Component { + /** !#en Specify the TiledTile horizontal coordinate,use map tile as the unit. + !#zh 指定 TiledTile 的横向坐标,以地图块为单位 */ + x: number; + /** !#en Specify the TiledTile vertical coordinate,use map tile as the unit. + !#zh 指定 TiledTile 的纵向坐标,以地图块为单位 */ + y: number; + /** !#en Specify the TiledTile gid. + !#zh 指定 TiledTile 的 gid 值 */ + gid: number; + } + /** !#en cc.VideoPlayer is a component for playing videos, you can use it for showing videos in your game. Because different platforms have different authorization, API and control methods for VideoPlayer component. And have not yet formed a unified standard, only Web, iOS, and Android platforms are currently supported. + !#zh Video 组件,用于在游戏中播放视频。由于不同平台对于 VideoPlayer 组件的授权、API、控制方式都不同,还没有形成统一的标准,所以目前只支持 Web、iOS 和 Android 平台。 */ + export class VideoPlayer extends Component { + /** !#en The resource type of videoplayer, REMOTE for remote url and LOCAL for local file path. + !#zh 视频来源:REMOTE 表示远程视频 URL,LOCAL 表示本地视频地址。 */ + resourceType: VideoPlayer.ResourceType; + /** !#en The remote URL of video. + !#zh 远程视频的 URL */ + remoteURL: string; + /** !#en The local video full path. + !#zh 本地视频的 URL */ + clip: string; + /** !#en The current playback time of the now playing item in seconds, you could also change the start playback time. + !#zh 指定视频从什么时间点开始播放,单位是秒,也可以用来获取当前视频播放的时间进度。 */ + currentTime: number; + /** !#en The volume of the video. + !#zh 视频的音量(0.0 ~ 1.0) */ + volume: number; + /** !#en Mutes the VideoPlayer. Mute sets the volume=0, Un-Mute restore the original volume. + !#zh 是否静音视频。静音时设置音量为 0,取消静音是恢复原来的音量。 */ + mute: boolean; + /** !#en Whether keep the aspect ration of the original video. + !#zh 是否保持视频原来的宽高比 */ + keepAspectRatio: boolean; + /** !#en Whether play video in fullscreen mode. + !#zh 是否全屏播放视频 */ + isFullscreen: boolean; + /** !#en Always below the game view (only useful on Web. Note: The specific effects are not guaranteed to be consistent, depending on whether each browser supports or restricts). + !#zh 永远在游戏视图最底层(这个属性只有在 Web 平台上有效果。注意:具体效果无法保证一致,跟各个浏览器是否支持与限制有关) */ + stayOnBottom: boolean; + /** !#en the video player's callback, it will be triggered when certain event occurs, like: playing, paused, stopped and completed. + !#zh 视频播放回调函数,该回调函数会在特定情况被触发,比如播放中,暂时,停止和完成播放。 */ + videoPlayerEvent: Component.EventHandler[]; + /** + !#en If a video is paused, call this method could resume playing. If a video is stopped, call this method to play from scratch. + !#zh 如果视频被暂停播放了,调用这个接口可以继续播放。如果视频被停止播放了,调用这个接口可以从头开始播放。 + */ + play(): void; + /** + !#en If a video is paused, call this method to resume playing. + !#zh 如果一个视频播放被暂停播放了,调用这个接口可以继续播放。 + */ + resume(): void; + /** + !#en If a video is playing, call this method to pause playing. + !#zh 如果一个视频正在播放,调用这个接口可以暂停播放。 + */ + pause(): void; + /** + !#en If a video is playing, call this method to stop playing immediately. + !#zh 如果一个视频正在播放,调用这个接口可以立马停止播放。 + */ + stop(): void; + /** + !#en Gets the duration of the video + !#zh 获取视频文件的播放总时长 + */ + getDuration(): number; + /** + !#en Determine whether video is playing or not. + !#zh 判断当前视频是否处于播放状态 + */ + isPlaying(): boolean; + /** + !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should + call the destroy method on this component or the associated node explicitly. + Otherwise, the created DOM element won't be removed from web page. + !#zh + 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。 + 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。 + + @example + ```js + videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false); + // when you don't need videoplayer anymore + videoplayer.node.destroy(); + ``` + */ + destroy(): boolean; + } + /** !#en + cc.NodePool is the cache pool designed for node type.
+ It can helps you to improve your game performance for objects which need frequent release and recreate operations
+ + It's recommended to create cc.NodePool instances by node type, the type corresponds to node type in game design, not the class, + for example, a prefab is a specific node type.
+ When you create a node pool, you can pass a Component which contains `unuse`, `reuse` functions to control the content of node.
+ + Some common use case is :
+ 1. Bullets in game (die very soon, massive creation and recreation, no side effect on other objects)
+ 2. Blocks in candy crash (massive creation and recreation)
+ etc... + !#zh + cc.NodePool 是用于管理节点对象的对象缓存池。
+ 它可以帮助您提高游戏性能,适用于优化对象的反复创建和销毁
+ 以前 cocos2d-x 中的 cc.pool 和新的节点事件注册系统不兼容,因此请使用 cc.NodePool 来代替。 + + 新的 NodePool 需要实例化之后才能使用,每种不同的节点对象池需要一个不同的对象池实例,这里的种类对应于游戏中的节点设计,一个 prefab 相当于一个种类的节点。
+ 在创建缓冲池时,可以传入一个包含 unuse, reuse 函数的组件类型用于节点的回收和复用逻辑。
+ + 一些常见的用例是:
+ 1.在游戏中的子弹(死亡很快,频繁创建,对其他对象无副作用)
+ 2.糖果粉碎传奇中的木块(频繁创建)。 + 等等.... */ + export class NodePool { + /** + !#en + Constructor for creating a pool for a specific node template (usually a prefab). You can pass a component (type or name) argument for handling event for reusing and recycling node. + !#zh + 使用构造函数来创建一个节点专用的对象池,您可以传递一个组件类型或名称,用于处理节点回收和复用时的事件逻辑。 + @param poolHandlerComp !#en The constructor or the class name of the component to control the unuse/reuse logic. !#zh 处理节点回收和复用事件逻辑的组件类型或名称。 + + @example + ```js + properties: { + template: cc.Prefab + }, + onLoad () { + // MyTemplateHandler is a component with 'unuse' and 'reuse' to handle events when node is reused or recycled. + this.myPool = new cc.NodePool('MyTemplateHandler'); + } + ``` + */ + constructor(poolHandlerComp?: {prototype: Component}|string); + /** !#en The pool handler component, it could be the class name or the constructor. + !#zh 缓冲池处理组件,用于节点的回收和复用逻辑,这个属性可以是组件类名或组件的构造函数。 */ + poolHandlerComp: Function|string; + /** + !#en The current available size in the pool + !#zh 获取当前缓冲池的可用对象数量 + */ + size(): number; + /** + !#en Destroy all cached nodes in the pool + !#zh 销毁对象池中缓存的所有节点 + */ + clear(): void; + /** + !#en Put a new Node into the pool. + It will automatically remove the node from its parent without cleanup. + It will also invoke unuse method of the poolHandlerComp if exist. + !#zh 向缓冲池中存入一个不再需要的节点对象。 + 这个函数会自动将目标节点从父节点上移除,但是不会进行 cleanup 操作。 + 这个函数会调用 poolHandlerComp 的 unuse 函数,如果组件和函数都存在的话。 + @param obj obj + + @example + ```js + let myNode = cc.instantiate(this.template); + this.myPool.put(myNode); + ``` + */ + put(obj: Node): void; + /** + !#en Get a obj from pool, if no available object in pool, null will be returned. + This function will invoke the reuse function of poolHandlerComp if exist. + !#zh 获取对象池中的对象,如果对象池没有可用对象,则返回空。 + 这个函数会调用 poolHandlerComp 的 reuse 函数,如果组件和函数都存在的话。 + @param params !#en Params to pass to 'reuse' method in poolHandlerComp !#zh 向 poolHandlerComp 中的 'reuse' 函数传递的参数 + + @example + ```js + let newNode = this.myPool.get(); + ``` + */ + get(...params: any[]): Node; + } + /** !#en Box Collider. + !#zh 包围盒碰撞组件 */ + export class BoxCollider extends Collider implements Collider.Box { + /** !#en + Collider info in world coordinate. + !#zh + 碰撞体的世界坐标系下的信息。 */ + world: ColliderInfo; + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Box size + !#zh 包围盒大小 */ + size: Size; + } + /** !#en Collider component base class. + !#zh 碰撞组件基类 */ + export class Collider extends Component { + /** !#en Tag. If a node has several collider components, you can judge which type of collider is collided according to the tag. + !#zh 标签。当一个节点上有多个碰撞组件时,在发生碰撞后,可以使用此标签来判断是节点上的哪个碰撞组件被碰撞了。 */ + tag: number; + } + /** !#en Circle Collider. + !#zh 圆形碰撞组件 */ + export class CircleCollider extends Collider implements Collider.Circle { + /** !#en + Collider info in world coordinate. + !#zh + 碰撞体的世界坐标系下的信息。 */ + world: ColliderInfo; + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Circle radius + !#zh 圆形半径 */ + radius: number; + } + /** !#en + Collider Info. + !#zh + 碰撞体信息。 */ + export class ColliderInfo { + /** !#en + Collider aabb information of last frame + !#zh + 碰撞体上一帧的 aabb 信息 */ + preAabb: Rect; + /** !#en + Collider aabb information of current frame + !#zh + 碰撞体当前帧的 aabb 信息 */ + aabb: Rect; + /** !#en + Collider matrix + !#zh + 碰撞体的矩阵信息 */ + matrix: Mat4; + /** !#en + Collider radius (for CircleCollider) + !#zh + 碰撞体的半径(只对 CircleCollider 有效) */ + radius: number; + /** !#en + Collider position (for CircleCollider) + !#zh + 碰撞体的位置(只对 CircleCollider 有效) */ + position: Vec2; + /** !#en + Collider points (for BoxCollider and PolygonCollider) + !#zh + 碰撞体的顶点信息(只对 BoxCollider 和 PolygonCollider 有效) */ + points: Vec2[]; + } + /** !#en + A simple collision manager class. + It will calculate whether the collider collides other colliders, if collides then call the callbacks. + !#zh + 一个简单的碰撞组件管理类,用于处理节点之间的碰撞组件是否产生了碰撞,并调用相应回调函数。 */ + export class CollisionManager implements EventTarget { + /** !#en + !#zh + 是否开启碰撞管理,默认为不开启 */ + enabled: boolean; + /** !#en + !#zh + 是否绘制碰撞组件的包围盒,默认为不绘制 */ + enabledDrawBoundingBox: boolean; + /** !#en + !#zh + 是否绘制碰撞组件的形状,默认为不绘制 */ + enabledDebugDraw: boolean; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en Intersection helper class + !#zh 辅助类,用于测试形状与形状是否相交 */ + export class Intersection { + /** + !#en Test line and line + !#zh 测试线段与线段是否相交 + @param a1 The start point of the first line + @param a2 The end point of the first line + @param b1 The start point of the second line + @param b2 The end point of the second line + */ + static lineLine(a1: Vec2, a2: Vec2, b1: Vec2, b2: Vec2): boolean; + /** + !#en Test line and rect + !#zh 测试线段与矩形是否相交 + @param a1 The start point of the line + @param a2 The end point of the line + @param b The rect + */ + static lineRect(a1: Vec2, a2: Vec2, b: Rect): boolean; + /** + !#en Test line and polygon + !#zh 测试线段与多边形是否相交 + @param a1 The start point of the line + @param a2 The end point of the line + @param b The polygon, a set of points + */ + static linePolygon(a1: Vec2, a2: Vec2, b: Vec2[]): boolean; + /** + !#en Test rect and rect + !#zh 测试矩形与矩形是否相交 + @param a The first rect + @param b The second rect + */ + static rectRect(a: Rect, b: Rect): boolean; + /** + !#en Test rect and polygon + !#zh 测试矩形与多边形是否相交 + @param a The rect + @param b The polygon, a set of points + */ + static rectPolygon(a: Rect, b: Vec2[]): boolean; + /** + !#en Test polygon and polygon + !#zh 测试多边形与多边形是否相交 + @param a The first polygon, a set of points + @param b The second polygon, a set of points + */ + static polygonPolygon(a: Vec2[], b: Vec2[]): boolean; + /** + !#en Test circle and circle + !#zh 测试圆形与圆形是否相交 + @param a Object contains position and radius + @param b Object contains position and radius + */ + static circleCircle(a: {position: Vec2, radius: number}, b: {position: Vec2, radius: number}): boolean; + /** + !#en Test polygon and circle + !#zh 测试矩形与圆形是否相交 + @param polygon The Polygon, a set of points + @param circle Object contains position and radius + */ + static polygonCircle(polygon: Vec2[], circle: {position: Vec2, radius: number}): boolean; + /** + !#en Test whether the point is in the polygon + !#zh 测试一个点是否在一个多边形中 + @param point The point + @param polygon The polygon, a set of points + */ + static pointInPolygon(point: Vec2, polygon: Vec2[]): boolean; + /** + !#en Calculate the distance of point to line. + !#zh 计算点到直线的距离。如果这是一条线段并且垂足不在线段内,则会计算点到线段端点的距离。 + @param point The point + @param start The start point of line + @param end The end point of line + @param isSegment whether this line is a segment + */ + static pointLineDistance(point: Vec2, start: Vec2, end: Vec2, isSegment: boolean): number; + } + /** !#en Polygon Collider. + !#zh 多边形碰撞组件 */ + export class PolygonCollider extends Collider implements Collider.Polygon { + /** !#en + Collider info in world coordinate. + !#zh + 碰撞体的世界坐标系下的信息。 */ + world: ColliderInfo; + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Polygon points + !#zh 多边形顶点数组 */ + points: Vec2[]; + } + /** !#en The Light Component + + !#zh 光源组件 */ + export class Light extends Component { + } + /** !#en + This module controls asset's behaviors and information, include loading, releasing etc. it is a singleton + All member can be accessed with `cc.assetManager`. + + !#zh + 此模块管理资源的行为和信息,包括加载,释放等,这是一个单例,所有成员能够通过 `cc.assetManager` 调用 */ + export class AssetManager { + /** !#en + Normal loading pipeline + + !#zh + 正常加载管线 */ + pipeline: cc.AssetManager.Pipeline; + /** !#en + Fetching pipeline + + !#zh + 下载管线 */ + fetchPipeline: cc.AssetManager.Pipeline; + /** !#en + Url transformer + + !#zh + Url 转换器 */ + transformPipeline: cc.AssetManager.Pipeline; + /** !#en + The collection of bundle which is already loaded, you can remove cache with {{#crossLink "AssetManager/removeBundle:method"}}{{/crossLink}} + + !#zh + 已加载 bundle 的集合, 你能通过 {{#crossLink "AssetManager/removeBundle:method"}}{{/crossLink}} 来移除缓存 */ + bundles: AssetManager.Cache; + /** !#en + The collection of asset which is already loaded, you can remove cache with {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} + + !#zh + 已加载资源的集合, 你能通过 {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} 来移除缓存 */ + assets: AssetManager.Cache; + /** !#en + Manage relationship between asset and its dependencies + + !#zh + 管理资源依赖关系 */ + dependUtil: cc.AssetManager.DependUtil; + /** !#en + Whether or not cache the loaded asset + + !#zh + 是否缓存已加载的资源 */ + cacheAsset: boolean; + /** !#en + Whether or not load asset forcely, if it is true, asset will be loaded regardless of error + + !#zh + 是否强制加载资源, 如果为 true ,加载资源将会忽略报错 */ + force: boolean; + /** !#en + Some useful function + + !#zh + 一些有用的方法 */ + utils: cc.AssetManager.Helper; + /** !#en + Manage all downloading task + + !#zh + 管理所有下载任务 */ + downloader: cc.AssetManager.Downloader; + /** !#en + Manage all parsing task + + !#zh + 管理所有解析任务 */ + parser: cc.AssetManager.Parser; + /** !#en + Manage internal asset + + !#zh + 管理内置资源 */ + builtins: cc.AssetManager.Builtins; + /** !#en + Manage all packed asset + + !#zh + 管理所有合并后的资源 */ + packManager: cc.AssetManager.PackManager; + /** !#en + Cache manager is a module which controls all caches downloaded from server in non-web platform. + + !#zh + 缓存管理器是一个模块,在非 WEB 平台上,用于管理所有从服务器上下载下来的缓存 */ + cacheManager: cc.AssetManager.CacheManager|null; + /** !#en + The preset of options + + !#zh + 可选参数的预设集 */ + presets: Record>; + /** !#en + The builtin 'main' bundle + + !#zh + 内置 main 包 */ + main: cc.AssetManager.Bundle; + /** !#en + The builtin 'resources' bundle + + !#zh + 内置 resources 包 */ + resources: cc.AssetManager.Bundle; + /** !#en + The builtin 'internal' bundle + + !#zh + 内置 internal 包 */ + internal: cc.AssetManager.Bundle; + /** + !#en + Initialize assetManager with options + + !#zh + 初始化资源管理器 + @param options options + */ + init(options: Record): void; + /** + !#en + Get the bundle which has been loaded + + !#zh + 获取已加载的分包 + @param name The name of bundle + + @example + ```js + // ${project}/assets/test1 + cc.assetManager.getBundle('test1'); + + cc.assetManager.getBundle('resources'); + ``` + */ + getBundle (name: string): cc.AssetManager.Bundle; + /** + !#en + Remove this bundle. NOTE: The asset whthin this bundle will not be released automatically, you can call {{#crossLink "Bundle/releaseAll:method"}}{{/crossLink}} manually before remove it if you need + + !#zh + 移除此包, 注意:这个包内的资源不会自动释放, 如果需要的话你可以在摧毁之前手动调用 {{#crossLink "Bundle/releaseAll:method"}}{{/crossLink}} 进行释放 + @param bundle The bundle to be removed + */ + removeBundle(bundle: cc.AssetManager.Bundle): void; + /** + !#en + General interface used to load assets with a progression callback and a complete callback. You can achieve almost all effect you want with combination of `requests` and `options`. + It is highly recommended that you use more simple API, such as `load`, `loadDir` etc. Every custom parameter in `options` will be distribute to each of `requests`. + if request already has same one, the parameter in request will be given priority. Besides, if request has dependencies, `options` will distribute to dependencies too. + Every custom parameter in `requests` will be tranfered to handler of `downloader` and `parser` as `options`. + You can register you own handler downloader or parser to collect these custom parameters for some effect. + + Reserved Keyword: `uuid`, `url`, `path`, `dir`, `scene`, `type`, `priority`, `preset`, `audioLoadMode`, `ext`, `bundle`, `onFileProgress`, `maxConcurrency`, `maxRequestsPerFrame` + `maxRetryCount`, `version`, `responseType`, `withCredentials`, `mimeType`, `timeout`, `header`, `reload`, `cacheAsset`, `cacheEnabled`, + Please DO NOT use these words as custom options! + + !#zh + 通用加载资源接口,可传入进度回调以及完成回调,通过组合 `request` 和 `options` 参数,几乎可以实现和扩展所有想要的加载效果。非常建议你使用更简单的API,例如 `load`、`loadDir` 等。 + `options` 中的自定义参数将会分发到 `requests` 的每一项中,如果request中已存在同名的参数则以 `requests` 中为准,同时如果有其他 + 依赖资源,则 `options` 中的参数会继续向依赖项中分发。request中的自定义参数都会以 `options` 形式传入加载流程中的 `downloader`, `parser` 的方法中, 你可以 + 扩展 `downloader`, `parser` 收集参数完成想实现的效果。 + + 保留关键字: `uuid`, `url`, `path`, `dir`, `scene`, `type`, `priority`, `preset`, `audioLoadMode`, `ext`, `bundle`, `onFileProgress`, `maxConcurrency`, `maxRequestsPerFrame` + `maxRetryCount`, `version`, `responseType`, `withCredentials`, `mimeType`, `timeout`, `header`, `reload`, `cacheAsset`, `cacheEnabled`, + 请不要使用这些字段为自定义参数! + @param requests The request you want to load + @param options Optional parameters + @param onProgress Callback invoked when progression change + @param onComplete Callback invoked when finish loading + + @example + ```js + cc.assetManager.loadAny({url: 'http://example.com/a.png'}, (err, img) => cc.log(img)); + cc.assetManager.loadAny(['60sVXiTH1D/6Aft4MRt9VC'], (err, assets) => cc.log(assets)); + cc.assetManager.loadAny([{ uuid: '0cbZa5Y71CTZAccaIFluuZ'}, {url: 'http://example.com/a.png'}], (err, assets) => cc.log(assets)); + cc.assetManager.downloader.register('.asset', (url, options, onComplete) => { + url += '?userName=' + options.userName + "&password=" + options.password; + cc.assetManager.downloader.downloadFile(url, null, onComplete); + }); + cc.assetManager.parser.register('.asset', (file, options, onComplete) => { + var json = JSON.parse(file); + var skin = json[options.skin]; + var model = json[options.model]; + onComplete(null, {skin, model}); + }); + cc.assetManager.loadAny({ url: 'http://example.com/my.asset', skin: 'xxx', model: 'xxx', userName: 'xxx', password: 'xxx' }); + ``` + */ + loadAny(requests: string | string[] | Record | Record[], options: Record, onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, data: any) => void): void; + loadAny(requests: string | string[] | Record | Record[], onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, data: any) => void): void; + loadAny(requests: string | string[] | Record | Record[], options: Record, onComplete: (err: Error, data: any) => void): void; + loadAny(requests: string | string[] | Record | Record[], onComplete: (err: Error, data: any) => void): void; + loadAny(requests: string | string[] | Record | Record[], options: Record): void; + loadAny(requests: string | string[] | Record | Record[]): void; + /** + !#en + General interface used to preload assets with a progression callback and a complete callback.It is highly recommended that you use more simple API, such as `preloadRes`, `preloadResDir` etc. + Everything about preload is just likes `cc.assetManager.loadAny`, the difference is `cc.assetManager.preloadAny` will only download asset but not parse asset. You need to invoke `cc.assetManager.loadAny(preloadTask)` + to finish loading asset + + !#zh + 通用预加载资源接口,可传入进度回调以及完成回调,非常建议你使用更简单的 API ,例如 `preloadRes`, `preloadResDir` 等。`preloadAny` 和 `loadAny` 几乎一样,区别在于 `preloadAny` 只会下载资源,不会去解析资源,你需要调用 `cc.assetManager.loadAny(preloadTask)` + 来完成资源加载。 + @param requests The request you want to preload + @param options Optional parameters + @param onProgress Callback invoked when progression change + @param onComplete Callback invoked when finish preloading + + @example + ```js + cc.assetManager.preloadAny('0cbZa5Y71CTZAccaIFluuZ', (err) => cc.assetManager.loadAny('0cbZa5Y71CTZAccaIFluuZ')); + ``` + */ + preloadAny(requests: string | string[] | Record | Record[], options: Record, onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void; + preloadAny(requests: string | string[] | Record | Record[], onProgress: (finished: number, total: number, item: cc.AssetManager.RequestItem) => void, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void; + preloadAny(requests: string | string[] | Record | Record[], options: Record, onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void; + preloadAny(requests: string | string[] | Record | Record[], onComplete: (err: Error, items: cc.AssetManager.RequestItem[]) => void): void; + preloadAny(requests: string | string[] | Record | Record[], options: Record): void; + preloadAny(requests: string | string[] | Record | Record[]): void; + /** + !#en + Load native file of asset, if you check the option 'Async Load Assets', you may need to load native file with this before you use the asset + + !#zh + 加载资源的原生文件,如果你勾选了'延迟加载资源'选项,你可能需要在使用资源之前调用此方法来加载原生文件 + @param asset The asset + @param options Some optional parameters + @param onComplete Callback invoked when finish loading + + @example + ```js + cc.assetManager.postLoadNative(texture, (err) => console.log(err)); + ``` + */ + postLoadNative(asset: cc.Asset, options: Record, onComplete: (err: Error) => void): void; + postLoadNative(asset: cc.Asset, onComplete: (err: Error) => void): void; + postLoadNative(asset: cc.Asset, options: Record): void; + postLoadNative(asset: cc.Asset): void; + /** + !#en + Load remote asset with url, such as audio, image, text and so on. + + !#zh + 使用 url 加载远程资源,例如音频,图片,文本等等。 + @param url The url of asset + @param options Some optional parameters + @param onComplete Callback invoked when finish loading + + @example + ```js + cc.assetManager.loadRemote('http://www.cloud.com/test1.jpg', (err, texture) => console.log(err)); + cc.assetManager.loadRemote('http://www.cloud.com/test2.mp3', (err, audioClip) => console.log(err)); + cc.assetManager.loadRemote('http://www.cloud.com/test3', { ext: '.png' }, (err, texture) => console.log(err)); + ``` + */ + loadRemote(url: string, options: Record, onComplete: (err: Error, asset: T) => void): void; + loadRemote(url: string, onComplete: (err: Error, asset: T) => void): void; + loadRemote(url: string, options: Record): void; + loadRemote(url: string): void; + /** + !#en + Load script + + !#zh + 加载脚本 + @param url Url of the script + @param options Some optional paramters + @param onComplete Callback when script loaded or failed + + @example + ```js + loadScript('http://localhost:8080/index.js', null, (err) => console.log(err)); + ``` + */ + loadScript(url: string|string[], options: Record, onComplete: (err: Error) => void): void; + loadScript(url: string|string[], onComplete: (err: Error) => void): void; + loadScript(url: string|string[], options: Record): void; + loadScript(url: string|string[]): void; + /** + !#en + load bundle + + !#zh + 加载资源包 + @param nameOrUrl The name or root path of bundle + @param options Some optional paramter, same like downloader.downloadFile + @param onComplete Callback when bundle loaded or failed + + @example + ```js + loadBundle('http://localhost:8080/test', null, (err, bundle) => console.log(err)); + ``` + */ + loadBundle(nameOrUrl: string, options: Record, onComplete: (err: Error, bundle: cc.AssetManager.Bundle) => void): void; + loadBundle(nameOrUrl: string, onComplete: (err: Error, bundle: cc.AssetManager.Bundle) => void): void; + loadBundle(nameOrUrl: string, options: Record): void; + loadBundle(nameOrUrl: string): void; + /** + !#en + Release asset and it's dependencies. + This method will not only remove the cache of the asset in assetManager, but also clean up its content. + For example, if you release a texture, the texture asset and its gl texture data will be freed up. + Notice, this method may cause the texture to be unusable, if there are still other nodes use the same texture, they may turn to black and report gl errors. + + !#zh + 释放资源以及其依赖资源, 这个方法不仅会从 assetManager 中删除资源的缓存引用,还会清理它的资源内容。 + 比如说,当你释放一个 texture 资源,这个 texture 和它的 gl 贴图数据都会被释放。 + 注意,这个函数可能会导致资源贴图或资源所依赖的贴图不可用,如果场景中存在节点仍然依赖同样的贴图,它们可能会变黑并报 GL 错误。 + @param asset The asset to be released + + @example + ```js + // release a texture which is no longer need + cc.assetManager.releaseAsset(texture); + ``` + */ + releaseAsset(asset: cc.Asset): void; + /** + !#en + Release all assets. Refer to {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} for detailed informations. + + !#zh + 释放所有资源。详细信息请参考 {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} + */ + releaseAll(): void; + } + /** `cc.loader` is deprecated, please backup your project and upgrade to {{#crossLink "AssetManager"}}{{/crossLink}} */ + export class loader { + /** `cc.loader.onProgress` is deprecated, please transfer onProgress to API as a parameter */ + static onProgress: any; + /** + `cc.loader.load` is deprecated, please use {{#crossLink "AssetManager/loadAny:method"}}{{/crossLink}} instead + @param resources Url list in an array + @param progressCallback Callback invoked when progression change + @param completeCallback Callback invoked when all resources loaded + */ + static load(resources: string|string[]|{uuid?: string, url?: string, type?: string}, completeCallback?: Function): void; + static load(resources: string|string[]|{uuid?: string, url?: string, type?: string}, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: Function|null): void; + /** + `cc.loader.getXMLHttpRequest` is deprecated, please use `XMLHttpRequest` directly + */ + static getXMLHttpRequest(): XMLHttpRequest; + /** + `cc.loader.getItem` is deprecated, please use `cc.assetManager.asset.get` instead + @param id The id of the item + */ + static getItem(id: any): any; + /** + `cc.loader.loadRes` is deprecated, please use {{#crossLink "Bundle/load:method"}}{{/crossLink}} instead + @param url Url of the target resource. + The url is relative to the "resources" folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param progressCallback Callback invoked when progression change. + @param completeCallback Callback invoked when the resource loaded. + */ + static loadRes(url: string, type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any) => void)|null): void; + static loadRes(url: string, type: typeof cc.Asset, completeCallback: (error: Error, resource: any) => void): void; + static loadRes(url: string, type: typeof cc.Asset): void; + static loadRes(url: string, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any) => void)|null): void; + static loadRes(url: string, completeCallback: (error: Error, resource: any) => void): void; + static loadRes(url: string): void; + /** + `cc.loader.loadResArray` is deprecated, please use {{#crossLink "Bundle/load:method"}}{{/crossLink}} instead + @param urls Array of URLs of the target resource. + The url is relative to the "resources" folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param progressCallback Callback invoked when progression change. + @param completeCallback A callback which is called when all assets have been loaded, or an error occurs. + */ + static loadResArray(url: string[], type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[]) => void)|null): void; + static loadResArray(url: string[], type: typeof cc.Asset, completeCallback: (error: Error, resource: any[]) => void): void; + static loadResArray(url: string[], type: typeof cc.Asset): void; + static loadResArray(url: string[], progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[]) => void)|null): void; + static loadResArray(url: string[], completeCallback: (error: Error, resource: any[]) => void): void; + static loadResArray(url: string[]): void; + static loadResArray(url: string[], type: typeof cc.Asset[]): void; + /** + `cc.loader.loadResDir` is deprecated, please use {{#crossLink "Bundle/loadDir:method"}}{{/crossLink}} instead + @param url Url of the target folder. + The url is relative to the "resources" folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param progressCallback Callback invoked when progression change. + @param completeCallback A callback which is called when all assets have been loaded, or an error occurs. + */ + static loadResDir(url: string, type: typeof cc.Asset, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[], urls: string[]) => void)|null): void; + static loadResDir(url: string, type: typeof cc.Asset, completeCallback: (error: Error, resource: any[], urls: string[]) => void): void; + static loadResDir(url: string, type: typeof cc.Asset): void; + static loadResDir(url: string, progressCallback: (completedCount: number, totalCount: number, item: any) => void, completeCallback: ((error: Error, resource: any[], urls: string[]) => void)|null): void; + static loadResDir(url: string, completeCallback: (error: Error, resource: any[], urls: string[]) => void): void; + static loadResDir(url: string): void; + /** + `cc.loader.getRes` is deprecated, please use {{#crossLink "Bundle/get:method"}}{{/crossLink}} instead + @param url url + @param type Only asset of type will be returned if this argument is supplied. + */ + static getRes(url: string, type?: Function): any; + /** + `cc.loader.getDependsRecursively` is deprecated, please use use {{#crossLink "DependUtil/getDepsRecursively:method"}}{{/crossLink}} instead + @param owner The owner asset or the resource url or the asset's uuid + */ + static getDependsRecursively(owner: Asset|string): any[]; + /** `cc.loader.assetLoader` was removed, assetLoader and md5Pipe were merged into {{#crossLink "AssetManager/transformPipeline:property"}}{{/crossLink}} */ + static assetLoader: any; + /** `cc.loader.md5Pipe` is deprecated, assetLoader and md5Pipe were merged into {{#crossLink "AssetManager/transformPipeline:property"}}{{/crossLink}} */ + static md5Pipe: any; + /** `cc.loader.downloader` is deprecated, please use {{#crossLink "AssetManager/downloader:property"}}{{/crossLink}} instead */ + static downloader: any; + /** `cc.loader.loader` is deprecated, please use {{#crossLink "AssetManager/parser:property"}}{{/crossLink}} instead */ + static loader: any; + /** + `cc.loader.addDownloadHandlers` is deprecated, please use `cc.assetManager.downloader.register` instead + @param extMap Custom supported types with corresponded handler + */ + static addDownloadHandlers(extMap: any): void; + /** + `cc.loader.addLoadHandlers` is deprecated, please use `cc.assetManager.parser.register` instead + @param extMap Custom supported types with corresponded handler + */ + static addLoadHandlers(extMap: any): void; + /** + `cc.loader.release` is deprecated, please use {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} instead + @param asset asset + */ + static release(asset: Asset|string|any[]): void; + /** + `cc.loader.releaseAsset` is deprecated, please use {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} instead + @param asset asset + */ + static releaseAsset(asset: Asset): void; + /** + `cc.loader.releaseRes` is deprecated, please use {{#crossLink "AssetManager/releaseRes:method"}}{{/crossLink}} instead + @param url url + @param type Only asset of type will be released if this argument is supplied. + */ + static releaseRes(url: string, type?: Function): void; + /** + `cc.loader.releaseResDir` was removed, please use {{#crossLink "AssetManager/releaseRes:method"}}{{/crossLink}} instead + */ + static releaseResDir(): void; + /** + `cc.loader.releaseAll` is deprecated, please use {{#crossLink "AssetManager/releaseAll:method"}}{{/crossLink}} instead + */ + static releaseAll(): void; + /** + `cc.loader.removeItem` is deprecated, please use `cc.assetManager.assets.remove` instead + @param id The id of the item + */ + static removeItem(id: any): boolean; + /** + `cc.loader.setAutoRelease` is deprecated, if you want to prevent some asset from auto releasing, please use {{#crossLink "Asset/addRef:method"}}{{/crossLink}} instead + @param assetOrUrlOrUuid asset object or the raw asset's url or uuid + @param autoRelease indicates whether should release automatically + */ + static setAutoRelease(assetOrUrlOrUuid: Asset|string, autoRelease: boolean): void; + /** + `cc.loader.setAutoReleaseRecursively` is deprecated, if you want to prevent some asset from auto releasing, please use {{#crossLink "Asset/addRef:method"}}{{/crossLink}} instead + @param assetOrUrlOrUuid asset object or the raw asset's url or uuid + @param autoRelease indicates whether should release automatically + */ + static setAutoReleaseRecursively(assetOrUrlOrUuid: Asset|string, autoRelease: boolean): void; + /** + `cc.loader.isAutoRelease` is deprecated + @param assetOrUrl asset object or the raw asset's url + */ + static isAutoRelease(assetOrUrl: Asset|string): boolean; + } + /** `cc.url` is deprecated */ + export class url { + /** + `cc.url.raw` is deprecated, please use `cc.resources.load` directly, or use `Asset.nativeUrl` instead. + @param url url + */ + static raw(url: string): string; + } + /** `cc.LoadingItems` was removed, please use {{#crossLink "Task"}}{{/crossLink}} instead */ + export class LoadingItems { + } + /** !#en + Base class for handling assets used in Creator.
+ + You may want to override:
+ - createNode
+ - getset functions of _nativeAsset
+ - cc.Object._serialize
+ - cc.Object._deserialize
+ !#zh + Creator 中的资源基类。
+ + 您可能需要重写:
+ - createNode
+ - _nativeAsset 的 getset 方法
+ - cc.Object._serialize
+ - cc.Object._deserialize
*/ + export class Asset extends Object { + /** `cc.Asset.url` is deprecated, please use {{#crossLink "Asset/nativeUrl:property"}}{{/crossLink}} instead */ + url: string; + /** !#en + Whether the asset is loaded or not. + !#zh + 该资源是否已经成功加载。 */ + loaded: boolean; + /** !#en + Returns the url of this asset's native object, if none it will returns an empty string. + !#zh + 返回该资源对应的目标平台资源的 URL,如果没有将返回一个空字符串。 */ + nativeUrl: string; + /** !#en + The number of reference + + !#zh + 引用的数量 */ + refCount: number; + /** !#en Indicates whether its dependent raw assets can support deferred load if the owner scene (or prefab) is marked as `asyncLoadAssets`. + !#zh 当场景或 Prefab 被标记为 `asyncLoadAssets`,禁止延迟加载该资源所依赖的其它原始资源。 */ + static preventDeferredLoadDependents: boolean; + /** !#en Indicates whether its native object should be preloaded from native url. + !#zh 禁止预加载原生对象。 */ + static preventPreloadNativeObject: boolean; + /** + !#en + Returns the asset's url. + + The `Asset` object overrides the `toString()` method of the `Object` object. + For `Asset` objects, the `toString()` method returns a string representation of the object. + JavaScript calls the `toString()` method automatically when an asset is to be represented as a text value or when a texture is referred to in a string concatenation. + !#zh + 返回资源的 URL。 + + Asset 对象将会重写 Object 对象的 `toString()` 方法。 + 对于 Asset 对象,`toString()` 方法返回该对象的字符串表示形式。 + 当资源要表示为文本值时或在字符串连接时引用时,JavaScript 会自动调用 `toString()` 方法。 + */ + toString(): string; + /** + !#en + Create a new node using this asset in the scene.
+ If this type of asset dont have its corresponding node type, this method should be null. + !#zh + 使用该资源在场景中创建一个新节点。
+ 如果这类资源没有相应的节点类型,该方法应该是空的。 + @param callback callback + */ + createNode(callback: (error: string, node: any) => void): void; + /** + !#en + Add references of asset + + !#zh + 增加资源的引用 + */ + addRef(): cc.Asset; + /** + !#en + Reduce references of asset and it will be auto released when refCount equals 0. + + !#zh + 减少资源的引用并尝试进行自动释放。 + */ + decRef(): cc.Asset; + } + /** Predefined constants */ + export class macro { + /** `cc.macro.DOWNLOAD_MAX_CONCURRENT` is deprecated now, please use {{#crossLink "Downloader/maxConcurrency:property"}}{{/crossLink}} instead */ + static DOWNLOAD_MAX_CONCURRENT: number; + /** PI / 180 */ + static RAD: number; + /** One degree */ + static DEG: number; + static REPEAT_FOREVER: number; + static FLT_EPSILON: number; + /** Minimum z index value for node */ + static MIN_ZINDEX: number; + /** Maximum z index value for node */ + static MAX_ZINDEX: number; + static ONE: number; + static ZERO: number; + static SRC_ALPHA: number; + static SRC_ALPHA_SATURATE: number; + static SRC_COLOR: number; + static DST_ALPHA: number; + static DST_COLOR: number; + static ONE_MINUS_SRC_ALPHA: number; + static ONE_MINUS_SRC_COLOR: number; + static ONE_MINUS_DST_ALPHA: number; + static ONE_MINUS_DST_COLOR: number; + static ONE_MINUS_CONSTANT_ALPHA: number; + static ONE_MINUS_CONSTANT_COLOR: number; + /** Oriented vertically */ + static ORIENTATION_PORTRAIT: number; + /** Oriented horizontally */ + static ORIENTATION_LANDSCAPE: number; + /** Oriented automatically */ + static ORIENTATION_AUTO: number; + /**

+ If enabled, the texture coordinates will be calculated by using this formula:
+ - texCoord.left = (rect.x*2+1) / (texture.wide*2);
+ - texCoord.right = texCoord.left + (rect.width*2-2)/(texture.wide*2);
+
+ The same for bottom and top.
+
+ This formula prevents artifacts by using 99% of the texture.
+ The "correct" way to prevent artifacts is by expand the texture's border with the same color by 1 pixel
+
+ Affected component:
+ - cc.TMXLayer
+
+ Enabled by default. To disabled set it to 0.
+ To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h +

*/ + static FIX_ARTIFACTS_BY_STRECHING_TEXEL_TMX: number; + /** Position of the FPS (Default: 0,0 (bottom-left corner))
+ To modify it, in Web engine please refer to CCMacro.js, in JSB please refer to CCConfig.h */ + static DIRECTOR_STATS_POSITION: Vec2; + /**

+ If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked.
+ If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions.
+ If disabled, only the last run action will take effect. +

*/ + static ENABLE_STACKABLE_ACTIONS: number; + /** !#en + The timeout to determine whether a touch is no longer active and should be removed. + The reason to add this timeout is due to an issue in X5 browser core, + when X5 is presented in wechat on Android, if a touch is glissed from the bottom up, and leave the page area, + no touch cancel event is triggered, and the touch will be considered active forever. + After multiple times of this action, our maximum touches number will be reached and all new touches will be ignored. + So this new mechanism can remove the touch that should be inactive if it's not updated during the last 5000 milliseconds. + Though it might remove a real touch if it's just not moving for the last 5 seconds which is not easy with the sensibility of mobile touch screen. + You can modify this value to have a better behavior if you find it's not enough. + !#zh + 用于甄别一个触点对象是否已经失效并且可以被移除的延时时长 + 添加这个时长的原因是 X5 内核在微信浏览器中出现的一个 bug。 + 在这个环境下,如果用户将一个触点从底向上移出页面区域,将不会触发任何 touch cancel 或 touch end 事件,而这个触点会被永远当作停留在页面上的有效触点。 + 重复这样操作几次之后,屏幕上的触点数量将达到我们的事件系统所支持的最高触点数量,之后所有的触摸事件都将被忽略。 + 所以这个新的机制可以在触点在一定时间内没有任何更新的情况下视为失效触点并从事件系统中移除。 + 当然,这也可能移除一个真实的触点,如果用户的触点真的在一定时间段内完全没有移动(这在当前手机屏幕的灵敏度下会很难)。 + 你可以修改这个值来获得你需要的效果,默认值是 5000 毫秒。 */ + static TOUCH_TIMEOUT: number; + /** !#en + The maximum vertex count for a single batched draw call. + !#zh + 最大可以被单次批处理渲染的顶点数量。 */ + static BATCH_VERTEX_COUNT: number; + /** !#en + Whether or not enabled tiled map auto culling. If you set the TiledMap skew or rotation, then need to manually disable this, otherwise, the rendering will be wrong. + !#zh + 是否开启瓦片地图的自动裁减功能。瓦片地图如果设置了 skew, rotation 或者采用了摄像机的话,需要手动关闭,否则渲染会出错。 */ + static ENABLE_TILEDMAP_CULLING: boolean; + /** !#en + Boolean that indicates if the canvas contains an alpha channel, default sets to false for better performance. + Though if you want to make your canvas background transparent and show other dom elements at the background, + you can set it to true before `cc.game.run`. + Web only. + !#zh + 用于设置 Canvas 背景是否支持 alpha 通道,默认为 false,这样可以有更高的性能表现。 + 如果你希望 Canvas 背景是透明的,并显示背后的其他 DOM 元素,你可以在 `cc.game.run` 之前将这个值设为 true。 + 仅支持 Web */ + static ENABLE_TRANSPARENT_CANVAS: boolean; + /** !#en + Boolean that indicates if the WebGL context is created with `antialias` option turned on, default value is false. + Set it to true could make your game graphics slightly smoother, like texture hard edges when rotated. + Whether to use this really depend on your game design and targeted platform, + device with retina display usually have good detail on graphics with or without this option, + you probably don't want antialias if your game style is pixel art based. + Also, it could have great performance impact with some browser / device using software MSAA. + You can set it to true before `cc.game.run`. + Web only. + !#zh + 用于设置在创建 WebGL Context 时是否开启抗锯齿选项,默认值是 false。 + 将这个选项设置为 true 会让你的游戏画面稍稍平滑一些,比如旋转硬边贴图时的锯齿。是否开启这个选项很大程度上取决于你的游戏和面向的平台。 + 在大多数拥有 retina 级别屏幕的设备上用户往往无法区分这个选项带来的变化;如果你的游戏选择像素艺术风格,你也多半不会想开启这个选项。 + 同时,在少部分使用软件级别抗锯齿算法的设备或浏览器上,这个选项会对性能产生比较大的影响。 + 你可以在 `cc.game.run` 之前设置这个值,否则它不会生效。 + 仅支持 Web */ + static ENABLE_WEBGL_ANTIALIAS: boolean; + /** !#en + Whether or not enable auto culling. + This feature have been removed in v2.0 new renderer due to overall performance consumption. + We have no plan currently to re-enable auto culling. + If your game have more dynamic objects, we suggest to disable auto culling. + If your game have more static objects, we suggest to enable auto culling. + !#zh + 是否开启自动裁减功能,开启裁减功能将会把在屏幕外的物体从渲染队列中去除掉。 + 这个功能在 v2.0 的新渲染器中被移除了,因为它在大多数游戏中所带来的损耗要高于性能的提升,目前我们没有计划重新支持自动裁剪。 + 如果游戏中的动态物体比较多的话,建议将此选项关闭。 + 如果游戏中的静态物体比较多的话,建议将此选项打开。 */ + static ENABLE_CULLING: boolean; + /** !#en + Whether to clear the original image cache after uploaded a texture to GPU. If cleared, [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) will not be supported. + Normally you don't need to enable this option on the web platform, because Image object doesn't consume too much memory. + But on WeChat Game platform, the current version cache decoded data in Image object, which has high memory usage. + So we enabled this option by default on WeChat, so that we can release Image cache immediately after uploaded to GPU. + !#zh + 是否在将贴图上传至 GPU 之后删除原始图片缓存,删除之后图片将无法进行 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。 + 在 Web 平台,你通常不需要开启这个选项,因为在 Web 平台 Image 对象所占用的内存很小。 + 但是在微信小游戏平台的当前版本,Image 对象会缓存解码后的图片数据,它所占用的内存空间很大。 + 所以我们在微信平台默认开启了这个选项,这样我们就可以在上传 GL 贴图之后立即释放 Image 对象的内存,避免过高的内存占用。 */ + static CLEANUP_IMAGE_CACHE: boolean; + /** !#en + Whether or not show mesh wire frame. + !#zh + 是否显示网格的线框。 */ + static SHOW_MESH_WIREFRAME: boolean; + /** !#en + Whether or not show mesh normal. + !#zh + 是否显示网格的法线。 */ + static SHOW_MESH_NORMAL: boolean; + /** !#en + Whether to enable multi-touch. + !#zh + 是否开启多点触摸 */ + static ENABLE_MULTI_TOUCH: boolean; + /** References: + https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap + https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap + + !#en + Whether to use image bitmap first. If enabled, memory usage will increase. + + !#zh + 是否优先使用 image bitmap,启用之后,内存占用会变高 */ + static ALLOW_IMAGE_BITMAP: boolean; + /** !#en + Whether to use native TTF renderer which is faster but layout slightly different. + + !#zh + 是否使用原生的文本渲染机制, 布局和编辑器有差异. */ + static ENABLE_NATIVE_TTF_RENDERER: boolean; + /** !#en + The image format supported by the engine defaults, and the supported formats may differ in different build platforms and device types. + Currently all platform and device support ['.webp', '.jpg', '.jpeg', '.bmp', '.png'], The iOS mobile platform also supports the PVR format。 + !#zh + 引擎默认支持的图片格式,支持的格式可能在不同的构建平台和设备类型上有所差别。 + 目前所有平台和设备支持的格式有 ['.webp', '.jpg', '.jpeg', '.bmp', '.png']. 另外 Ios 手机平台还额外支持了 PVR 格式。 */ + static SUPPORT_TEXTURE_FORMATS: string[]; + } + /** !#en Class for BitmapFont handling. + !#zh 位图字体资源类。 */ + export class BitmapFont extends Font { + } + /** !#en Class for audio data handling. + !#zh 音频资源类。 */ + export class AudioClip extends Asset implements EventTarget { + /** !#en Get the audio clip duration + !#zh 获取音频剪辑的长度 */ + duration: number; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** undefined */ + export class BufferAsset extends Asset { + } + /** !#en Class for Font handling. + !#zh 字体资源类。 */ + export class Font extends Asset { + } + /** !#en Class for LabelAtlas handling. + !#zh 艺术数字字体资源类。 */ + export class LabelAtlas extends BitmapFont { + } + /** !#en + Class for JSON file. When the JSON file is loaded, this object is returned. + The parsed JSON object can be accessed through the `json` attribute in it.
+ If you want to get the original JSON text, you should modify the extname to `.txt` + so that it is loaded as a `TextAsset` instead of a `JsonAsset`. + + !#zh + JSON 资源类。JSON 文件加载后,将会返回该对象。可以通过其中的 `json` 属性访问解析后的 JSON 对象。
+ 如果你想要获得 JSON 的原始文本,那么应该修改源文件的后缀为 `.txt`,这样就会加载为一个 `TextAsset` 而不是 `JsonAsset`。 */ + export class JsonAsset extends Asset { + /** The loaded JSON object. */ + json: any; + } + /** !#en Class for prefab handling. + !#zh 预制资源类。 */ + export class Prefab extends Asset { + /** the main cc.Node in the prefab */ + data: Node; + /** !#zh + 设置实例化这个 prefab 时所用的优化策略。根据使用情况设置为合适的值,能优化该 prefab 实例化所用的时间。 + !#en + Indicates the optimization policy for instantiating this prefab. + Set to a suitable value based on usage, can optimize the time it takes to instantiate this prefab. */ + optimizationPolicy: Prefab.OptimizationPolicy; + /** !#en Indicates the raw assets of this prefab can be load after prefab loaded. + !#zh 指示该 Prefab 依赖的资源可否在 Prefab 加载后再延迟加载。 */ + asyncLoadAssets: boolean; + readonly: boolean; + /** + Dynamically translation prefab data into minimized code.
+ This method will be called automatically before the first time the prefab being instantiated, + but you can re-call to refresh the create function once you modified the original prefab data in script. + */ + compileCreateFunction(): void; + } + /** Render textures are textures that can be rendered to. */ + export class RenderTexture extends Texture2D { + /** + !#en + Init the render texture with size. + !#zh + 初始化 render texture + @param width width + @param height height + @param depthStencilFormat depthStencilFormat + */ + initWithSize(width?: number, height?: number, depthStencilFormat?: number): void; + /** + !#en + Get pixels from render texture, the pixels data stores in a RGBA Uint8Array. + It will return a new (width * height * 4) length Uint8Array by default。 + You can specify a data to store the pixels to reuse the data, + you and can specify other params to specify the texture region to read. + !#zh + 从 render texture 读取像素数据,数据类型为 RGBA 格式的 Uint8Array 数组。 + 默认每次调用此函数会生成一个大小为 (长 x 高 x 4) 的 Uint8Array。 + 你可以通过传入 data 来接收像素数据,也可以通过传参来指定需要读取的区域的像素。 + @param data data + @param x x + @param y y + @param w w + @param h h + */ + readPixels(data?: Uint8Array, x?: number, y?: number, w?: number, h?: number): Uint8Array; + } + /** !#en Class for scene handling. + !#zh 场景资源类。 */ + export class SceneAsset extends Asset { + scene: Scene; + /** !#en Indicates the raw assets of this scene can be load after scene launched. + !#zh 指示该场景依赖的资源可否在场景切换后再延迟加载。 */ + asyncLoadAssets: boolean; + } + /** !#en Class for script handling. + !#zh Script 资源类。 */ + export class _Script extends Asset { + } + /** !#en Class for JavaScript handling. + !#zh JavaScript 资源类。 */ + export class _JavaScript extends Asset { + } + /** !#en Class for TypeScript handling. + !#zh TypeScript 资源类。 */ + export class TypeScript extends Asset { + } + /** !#en Class for sprite atlas handling. + !#zh 精灵图集资源类。 */ + export class SpriteAtlas extends Asset { + /** + Returns the texture of the sprite atlas + */ + getTexture(): Texture2D; + /** + Returns the sprite frame correspond to the given key in sprite atlas. + @param key key + */ + getSpriteFrame(key: string): SpriteFrame; + /** + Returns the sprite frames in sprite atlas. + */ + getSpriteFrames(): SpriteFrame[]; + } + /** !#en + A cc.SpriteFrame has:
+ - texture: A cc.Texture2D that will be used by render components
+ - rectangle: A rectangle of the texture + + !#zh + 一个 SpriteFrame 包含:
+ - 纹理:会被渲染组件使用的 Texture2D 对象。
+ - 矩形:在纹理中的矩形区域。 */ + export class SpriteFrame extends Asset implements EventTarget { + /** !#en Top border of the sprite + !#zh sprite 的顶部边框 */ + insetTop: number; + /** !#en Bottom border of the sprite + !#zh sprite 的底部边框 */ + insetBottom: number; + /** !#en Left border of the sprite + !#zh sprite 的左边边框 */ + insetLeft: number; + /** !#en Right border of the sprite + !#zh sprite 的左边边框 */ + insetRight: number; + /** + !#en + Constructor of SpriteFrame class. + !#zh + SpriteFrame 类的构造函数。 + @param filename filename + @param rect rect + @param rotated Whether the frame is rotated in the texture + @param offset The offset of the frame in the texture + @param originalSize The size of the frame in the texture + */ + constructor(filename?: string|Texture2D, rect?: Rect, rotated?: boolean, offset?: Vec2, originalSize?: Size); + /** + !#en Returns whether the texture have been loaded + !#zh 返回是否已加载纹理 + */ + textureLoaded(): boolean; + /** + !#en Returns whether the sprite frame is rotated in the texture. + !#zh 获取 SpriteFrame 是否旋转 + */ + isRotated(): boolean; + /** + !#en Set whether the sprite frame is rotated in the texture. + !#zh 设置 SpriteFrame 是否旋转 + @param bRotated bRotated + */ + setRotated(bRotated: boolean): void; + /** + !#en Returns whether the sprite frame is flip x axis in the texture. + !#zh 获取 SpriteFrame 是否反转 x 轴 + */ + isFlipX(): boolean; + /** + !#en Returns whether the sprite frame is flip y axis in the texture. + !#zh 获取 SpriteFrame 是否反转 y 轴 + */ + isFlipY(): boolean; + /** + !#en Set whether the sprite frame is flip x axis in the texture. + !#zh 设置 SpriteFrame 是否翻转 x 轴 + @param flipX flipX + */ + setFlipX(flipX: boolean): void; + /** + !#en Set whether the sprite frame is flip y axis in the texture. + !#zh 设置 SpriteFrame 是否翻转 y 轴 + @param flipY flipY + */ + setFlipY(flipY: boolean): void; + /** + !#en Returns the rect of the sprite frame in the texture. + !#zh 获取 SpriteFrame 的纹理矩形区域 + */ + getRect(): Rect; + /** + !#en Sets the rect of the sprite frame in the texture. + !#zh 设置 SpriteFrame 的纹理矩形区域 + @param rect rect + */ + setRect(rect: Rect): void; + /** + !#en Returns the original size of the trimmed image. + !#zh 获取修剪前的原始大小 + */ + getOriginalSize(): Size; + /** + !#en Sets the original size of the trimmed image. + !#zh 设置修剪前的原始大小 + @param size size + */ + setOriginalSize(size: Size): void; + /** + !#en Returns the texture of the frame. + !#zh 获取使用的纹理实例 + */ + getTexture(): Texture2D; + /** + !#en Returns the offset of the frame in the texture. + !#zh 获取偏移量 + */ + getOffset(): Vec2; + /** + !#en Sets the offset of the frame in the texture. + !#zh 设置偏移量 + @param offsets offsets + */ + setOffset(offsets: Vec2): void; + /** + !#en Clone the sprite frame. + !#zh 克隆 SpriteFrame + */ + clone(): SpriteFrame; + /** + !#en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.
+ !#zh 通过 Texture,rect,rotated,offset 和 originalSize 设置 SpriteFrame。 + @param texture texture + @param rect rect + @param rotated rotated + @param offset offset + @param originalSize originalSize + */ + setTexture(texture: Texture2D, rect?: Rect, rotated?: boolean, offset?: Vec2, originalSize?: Size): boolean; + /** + !#en If a loading scene (or prefab) is marked as `asyncLoadAssets`, all the textures of the SpriteFrame which + associated by user's custom Components in the scene, will not preload automatically. + These textures will be load when Sprite component is going to render the SpriteFrames. + You can call this method if you want to load the texture early. + !#zh 当加载中的场景或 Prefab 被标记为 `asyncLoadAssets` 时,用户在场景中由自定义组件关联到的所有 SpriteFrame 的贴图都不会被提前加载。 + 只有当 Sprite 组件要渲染这些 SpriteFrame 时,才会检查贴图是否加载。如果你希望加载过程提前,你可以手工调用这个方法。 + + @example + ```js + if (spriteFrame.textureLoaded()) { + this._onSpriteFrameLoaded(); + } + else { + spriteFrame.once('load', this._onSpriteFrameLoaded, this); + spriteFrame.ensureLoadTexture(); + } + ``` + */ + ensureLoadTexture(): void; + /** + !#en + If you do not need to use the SpriteFrame temporarily, you can call this method so that its texture could be garbage collected. Then when you need to render the SpriteFrame, you should call `ensureLoadTexture` manually to reload texture. + !#zh + 当你暂时不再使用这个 SpriteFrame 时,可以调用这个方法来保证引用的贴图对象能被 GC。然后当你要渲染 SpriteFrame 时,你需要手动调用 `ensureLoadTexture` 来重新加载贴图。 + */ + clearTexture(): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en Class for TTFFont handling. + !#zh TTF 字体资源类。 */ + export class TTFFont extends Font { + } + /** !#en Class for text file. + !#zh 文本资源类。 */ + export class TextAsset extends Asset { + /** The text contents of the resource. */ + text: string; + } + /** This class allows to easily create OpenGL or Canvas 2D textures from images or raw data. */ + export class Texture2D extends Asset implements EventTarget { + /** !#en Sets whether generate mipmaps for the texture + !#zh 是否为纹理设置生成 mipmaps。 */ + genMipmaps: boolean; + /** !#en + Sets whether texture can be packed into texture atlas. + If need use texture uv in custom Effect, please sets packable to false. + !#zh + 设置纹理是否允许参与合图。 + 如果需要在自定义 Effect 中使用纹理 UV,需要禁止该选项。 */ + packable: boolean; + /** !#en + Whether the texture is loaded or not + !#zh + 贴图是否已经成功加载 */ + loaded: boolean; + /** !#en + Texture width in pixel + !#zh + 贴图像素宽度 */ + width: number; + /** !#en + Texture height in pixel + !#zh + 贴图像素高度 */ + height: number; + /** + !#en + Get renderer texture implementation object + extended from render.Texture2D + !#zh 返回渲染器内部贴图对象 + */ + getImpl(): void; + /** + Update texture options, not available in Canvas render mode. + image, format, premultiplyAlpha can not be updated in native. + @param options options + */ + update(options: {image: DOMImageElement; genMipmaps: boolean; format: Texture2D.PixelFormat; minFilter: Texture2D.Filter; magFilter: Texture2D.Filter; wrapS: WrapMode; wrapT: WrapMode; premultiplyAlpha: boolean; }): void; + /** + !#en + Init with HTML element. + !#zh 用 HTML Image 或 Canvas 对象初始化贴图。 + @param element element + + @example + ```js + var img = new Image(); + img.src = dataURL; + texture.initWithElement(img); + ``` + */ + initWithElement(element: HTMLImageElement|HTMLCanvasElement): void; + /** + !#en + Intializes with texture data in ArrayBufferView. + !#zh 使用一个存储在 ArrayBufferView 中的图像数据(raw data)初始化数据。 + @param data data + @param pixelFormat pixelFormat + @param pixelsWidth pixelsWidth + @param pixelsHeight pixelsHeight + */ + initWithData(data: ArrayBufferView, pixelFormat: number, pixelsWidth: number, pixelsHeight: number): boolean; + /** + !#en + HTMLElement Object getter, available only on web.
+ Note: texture is packed into texture atlas by default
+ you should set texture.packable as false before getting Html element object. + !#zh 获取当前贴图对应的 HTML Image 或 Canvas 对象,只在 Web 平台下有效。
+ 注意:
+ texture 默认参与动态合图,如果需要获取到正确的 Html 元素对象,需要先设置 texture.packable 为 false + */ + getHtmlElementObj(): HTMLImageElement; + /** + !#en + Destory this texture and immediately release its video memory. (Inherit from cc.Object.destroy)
+ After destroy, this object is not usable anymore. + You can use cc.isValid(obj) to check whether the object is destroyed before accessing it. + !#zh + 销毁该贴图,并立即释放它对应的显存。(继承自 cc.Object.destroy)
+ 销毁后,该对象不再可用。您可以在访问对象之前使用 cc.isValid(obj) 来检查对象是否已被销毁。 + */ + destroy(): boolean; + /** + !#en + Pixel format of the texture. + !#zh 获取纹理的像素格式。 + */ + getPixelFormat(): number; + /** + !#en + Whether or not the texture has their Alpha premultiplied. + !#zh 检查纹理在上传 GPU 时预乘选项是否开启。 + */ + hasPremultipliedAlpha(): boolean; + /** + !#en + Handler of texture loaded event. + Since v2.0, you don't need to invoke this function, it will be invoked automatically after texture loaded. + !#zh 贴图加载事件处理器。v2.0 之后你将不在需要手动执行这个函数,它会在贴图加载成功之后自动执行。 + @param premultiplied premultiplied + */ + handleLoadedTexture(premultiplied?: boolean): void; + /** + !#en + Description of cc.Texture2D. + !#zh cc.Texture2D 描述。 + */ + description(): string; + /** + !#en + Release texture, please use destroy instead. + !#zh 释放纹理,请使用 destroy 替代。 + */ + releaseTexture(): void; + /** + !#en Sets the wrap s and wrap t options.
+ If the texture size is NPOT (non power of 2), then in can only use gl.CLAMP_TO_EDGE in gl.TEXTURE_WRAP_{S,T}. + !#zh 设置纹理包装模式。 + 若纹理贴图尺寸是 NPOT(non power of 2),则只能使用 Texture2D.WrapMode.CLAMP_TO_EDGE。 + @param wrapS wrapS + @param wrapT wrapT + */ + setWrapMode(wrapS: Texture2D.WrapMode, wrapT: Texture2D.WrapMode): void; + /** + !#en Sets the minFilter and magFilter options + !#zh 设置纹理贴图缩小和放大过滤器算法选项。 + @param minFilter minFilter + @param magFilter magFilter + */ + setFilters(minFilter: Texture2D.Filter, magFilter: Texture2D.Filter): void; + /** + !#en + Sets the flipY options + !#zh 设置贴图的纵向翻转选项。 + @param flipY flipY + */ + setFlipY(flipY: boolean): void; + /** + !#en + Sets the premultiply alpha options + !#zh 设置贴图的预乘选项。 + @param premultiply premultiply + */ + setPremultiplyAlpha(premultiply: boolean): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en + EventTarget is an object to which an event is dispatched when something has occurred. + Entity are the most common event targets, but other objects can be event targets too. + + Event targets are an important part of the Fireball event model. + The event target serves as the focal point for how events flow through the scene graph. + When an event such as a mouse click or a keypress occurs, Fireball dispatches an event object + into the event flow from the root of the hierarchy. The event object then makes its way through + the scene graph until it reaches the event target, at which point it begins its return trip through + the scene graph. This round-trip journey to the event target is conceptually divided into three phases: + - The capture phase comprises the journey from the root to the last node before the event target's node + - The target phase comprises only the event target node + - The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the tree + See also: http://www.w3.org/TR/DOM-Level-3-Events/#event-flow + + Event targets can implement the following methods: + - _getCapturingTargets + - _getBubblingTargets + + !#zh + 事件目标是事件触发时,分派的事件对象,Node 是最常见的事件目标, + 但是其他对象也可以是事件目标。
*/ + export class EventTarget extends CallbacksInvoker { + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en Base class of all kinds of events. + !#zh 包含事件相关信息的对象。 */ + export class Event { + /** + + @param type The name of the event (case-sensitive), e.g. "click", "fire", or "submit" + @param bubbles A boolean indicating whether the event bubbles up through the tree or not + */ + constructor(type: string, bubbles: boolean); + /** !#en The name of the event (case-sensitive), e.g. "click", "fire", or "submit". + !#zh 事件类型。 */ + type: string; + /** !#en Indicate whether the event bubbles up through the tree or not. + !#zh 表示该事件是否进行冒泡。 */ + bubbles: boolean; + /** !#en A reference to the target to which the event was originally dispatched. + !#zh 最初事件触发的目标 */ + target: any; + /** !#en A reference to the currently registered target for the event. + !#zh 当前目标 */ + currentTarget: any; + /** !#en + Indicates which phase of the event flow is currently being evaluated. + Returns an integer value represented by 4 constants: + - Event.NONE = 0 + - Event.CAPTURING_PHASE = 1 + - Event.AT_TARGET = 2 + - Event.BUBBLING_PHASE = 3 + The phases are explained in the [section 3.1, Event dispatch and DOM event flow] + (http://www.w3.org/TR/DOM-Level-3-Events/#event-flow), of the DOM Level 3 Events specification. + !#zh 事件阶段 */ + eventPhase: number; + /** + !#en Reset the event for being stored in the object pool. + !#zh 重置对象池中存储的事件。 + */ + unuse(): string; + /** + !#en Reuse the event for being used again by the object pool. + !#zh 用于对象池再次使用的事件。 + */ + reuse(): string; + /** + !#en Stops propagation for current event. + !#zh 停止传递当前事件。 + */ + stopPropagation(): void; + /** + !#en Stops propagation for current event immediately, + the event won't even be dispatched to the listeners attached in the current target. + !#zh 立即停止当前事件的传递,事件甚至不会被分派到所连接的当前目标。 + */ + stopPropagationImmediate(): void; + /** + !#en Checks whether the event has been stopped. + !#zh 检查该事件是否已经停止传递. + */ + isStopped(): boolean; + /** + !#en +

+ Gets current target of the event
+ note: It only be available when the event listener is associated with node.
+ It returns 0 when the listener is associated with fixed priority. +

+ !#zh 获取当前目标节点 + */ + getCurrentTarget(): Node; + /** + !#en Gets the event type. + !#zh 获取事件类型 + */ + getType(): string; + /** !#en Code for event without type. + !#zh 没有类型的事件 */ + static NO_TYPE: string; + /** !#en The type code of Touch event. + !#zh 触摸事件类型 */ + static TOUCH: string; + /** !#en The type code of Mouse event. + !#zh 鼠标事件类型 */ + static MOUSE: string; + /** !#en The type code of Keyboard event. + !#zh 键盘事件类型 */ + static KEYBOARD: string; + /** !#en The type code of Acceleration event. + !#zh 加速器事件类型 */ + static ACCELERATION: string; + /** !#en Events not currently dispatched are in this phase + !#zh 尚未派发事件阶段 */ + static NONE: number; + /** !#en + The capturing phase comprises the journey from the root to the last node before the event target's node + see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow + !#zh 捕获阶段,包括事件目标节点之前从根节点到最后一个节点的过程。 */ + static CAPTURING_PHASE: number; + /** !#en + The target phase comprises only the event target node + see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow + !#zh 目标阶段仅包括事件目标节点。 */ + static AT_TARGET: number; + /** !#en + The bubbling phase comprises any subsequent nodes encountered on the return trip to the root of the hierarchy + see http://www.w3.org/TR/DOM-Level-3-Events/#event-flow + !#zh 冒泡阶段, 包括回程遇到到层次根节点的任何后续节点。 */ + static BUBBLING_PHASE: number; + } + /** !#en + The System event, it currently supports keyboard events and accelerometer events.
+ You can get the SystemEvent instance with cc.systemEvent.
+ !#zh + 系统事件,它目前支持按键事件和重力感应事件。
+ 你可以通过 cc.systemEvent 获取到 SystemEvent 的实例。
*/ + export class SystemEvent extends EventTarget { + /** + !#en whether enable accelerometer event + !#zh 是否启用加速度计事件 + @param isEnable isEnable + */ + setAccelerometerEnabled(isEnable: boolean): void; + /** + !#en set accelerometer interval value + !#zh 设置加速度计间隔值 + @param interval interval + */ + setAccelerometerInterval(interval: number): void; + } + /** !#en The animation component is used to play back animations. + + Animation provide several events to register: + - play : Emit when begin playing animation + - stop : Emit when stop playing animation + - pause : Emit when pause animation + - resume : Emit when resume animation + - lastframe : If animation repeat count is larger than 1, emit when animation play to the last frame + - finished : Emit when finish playing animation + + !#zh Animation 组件用于播放动画。 + + Animation 提供了一系列可注册的事件: + - play : 开始播放时 + - stop : 停止播放时 + - pause : 暂停播放时 + - resume : 恢复播放时 + - lastframe : 假如动画循环次数大于 1,当动画播放到最后一帧时 + - finished : 动画播放完成时 */ + export class Animation extends Component implements EventTarget { + /** !#en Animation will play the default clip when start game. + !#zh 在勾选自动播放或调用 play() 时默认播放的动画剪辑。 */ + defaultClip: AnimationClip; + /** !#en Current played clip. + !#zh 当前播放的动画剪辑。 */ + currentClip: AnimationClip; + /** !#en Whether the animation should auto play the default clip when start game. + !#zh 是否在运行游戏后自动播放默认动画剪辑。 */ + playOnLoad: boolean; + /** + !#en Get all the clips used in this animation. + !#zh 获取动画组件上的所有动画剪辑。 + */ + getClips(): AnimationClip[]; + /** + !#en Plays an animation and stop other animations. + !#zh 播放指定的动画,并且停止当前正在播放动画。如果没有指定动画,则播放默认动画。 + @param name The name of animation to play. If no name is supplied then the default animation will be played. + @param startTime play an animation from startTime + + @example + ```js + var animCtrl = this.node.getComponent(cc.Animation); + animCtrl.play("linear"); + ``` + */ + play(name?: string, startTime?: number): AnimationState; + /** + !#en + Plays an additive animation, it will not stop other animations. + If there are other animations playing, then will play several animations at the same time. + !#zh 播放指定的动画(将不会停止当前播放的动画)。如果没有指定动画,则播放默认动画。 + @param name The name of animation to play. If no name is supplied then the default animation will be played. + @param startTime play an animation from startTime + + @example + ```js + // linear_1 and linear_2 at the same time playing. + var animCtrl = this.node.getComponent(cc.Animation); + animCtrl.playAdditive("linear_1"); + animCtrl.playAdditive("linear_2"); + ``` + */ + playAdditive(name?: string, startTime?: number): AnimationState; + /** + !#en Stops an animation named name. If no name is supplied then stops all playing animations that were started with this Animation.
+ Stopping an animation also Rewinds it to the Start. + !#zh 停止指定的动画。如果没有指定名字,则停止当前正在播放的动画。 + @param name The animation to stop, if not supplied then stops all playing animations. + */ + stop(name?: string): void; + /** + !#en Pauses an animation named name. If no name is supplied then pauses all playing animations that were started with this Animation. + !#zh 暂停当前或者指定的动画。如果没有指定名字,则暂停当前正在播放的动画。 + @param name The animation to pauses, if not supplied then pauses all playing animations. + */ + pause(name?: string): void; + /** + !#en Resumes an animation named name. If no name is supplied then resumes all paused animations that were started with this Animation. + !#zh 重新播放指定的动画,如果没有指定名字,则重新播放当前正在播放的动画。 + @param name The animation to resumes, if not supplied then resumes all paused animations. + */ + resume(name?: string): void; + /** + !#en Make an animation named name go to the specified time. If no name is supplied then make all animations go to the specified time. + !#zh 设置指定动画的播放时间。如果没有指定名字,则设置当前播放动画的播放时间。 + @param time The time to go to + @param name Specified animation name, if not supplied then make all animations go to the time. + */ + setCurrentTime(time?: number, name?: string): void; + /** + !#en Returns the animation state named name. If no animation with the specified name, the function will return null. + !#zh 获取当前或者指定的动画状态,如果未找到指定动画剪辑则返回 null。 + @param name name + */ + getAnimationState(name: string): AnimationState; + /** + !#en Adds a clip to the animation with name newName. If a clip with that name already exists it will be replaced with the new clip. + !#zh 添加动画剪辑,并且可以重新设置该动画剪辑的名称。 + @param clip the clip to add + @param newName newName + */ + addClip(clip: AnimationClip, newName?: string): AnimationState; + /** + !#en + Remove clip from the animation list. This will remove the clip and any animation states based on it. + If there are animation states depand on the clip are playing or clip is defaultClip, it will not delete the clip. + But if force is true, then will always remove the clip and any animation states based on it. If clip is defaultClip, defaultClip will be reset to null + !#zh + 从动画列表中移除指定的动画剪辑,
+ 如果依赖于 clip 的 AnimationState 正在播放或者 clip 是 defaultClip 的话,默认是不会删除 clip 的。 + 但是如果 force 参数为 true,则会强制停止该动画,然后移除该动画剪辑和相关的动画。这时候如果 clip 是 defaultClip,defaultClip 将会被重置为 null。 + @param clip clip + @param force If force is true, then will always remove the clip and any animation states based on it. + */ + removeClip(clip: AnimationClip, force?: boolean): void; + /** + !#en + Samples animations at the current state.
+ This is useful when you explicitly want to set up some animation state, and sample it once. + !#zh 对指定或当前动画进行采样。你可以手动将动画设置到某一个状态,然后采样一次。 + @param name name + */ + sample(name: string): void; + /** + !#en + Register animation event callback. + The event arguments will provide the AnimationState which emit the event. + When play an animation, will auto register the event callback to the AnimationState, and unregister the event callback from the AnimationState when animation stopped. + !#zh + 注册动画事件回调。 + 回调的事件里将会附上发送事件的 AnimationState。 + 当播放一个动画时,会自动将事件注册到对应的 AnimationState 上,停止播放时会将事件从这个 AnimationState 上取消注册。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param state state + @param target The target (this object) to invoke the callback, can be null + @param useCapture When set to true, the capture argument prevents callback + from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. + When false, callback will NOT be invoked when event's eventPhase attribute value is CAPTURING_PHASE. + Either way, callback will be invoked when event's eventPhase attribute value is AT_TARGET. + + @example + ```js + onPlay: function (type, state) { + // callback + } + + // register event to all animation + animation.on('play', this.onPlay, this); + ``` + */ + on(type: string, callback: (event: Event.EventCustom) => void, target?: any, useCapture?: boolean): (event: Event.EventCustom) => void; + on(type: string, callback: (event: T) => void, target?: any, useCapture?: boolean): (event: T) => void; + on(type: string, callback: (type: string, state: cc.AnimationState) => void, target?: any, useCapture?: boolean): (type: string, state: cc.AnimationState) => void; + /** + !#en + Unregister animation event callback. + !#zh + 取消注册动画事件回调。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + @param useCapture Specifies whether the callback being removed was registered as a capturing callback or not. + If not specified, useCapture defaults to false. If a callback was registered twice, + one with capture and one without, each must be removed separately. Removal of a capturing callback + does not affect a non-capturing version of the same listener, and vice versa. + + @example + ```js + // unregister event to all animation + animation.off('play', this.onPlay, this); + ``` + */ + off(type: string, callback?: Function, target?: any, useCapture?: boolean): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en Audio Source. + !#zh 音频源组件,能对音频剪辑。 */ + export class AudioSource extends Component { + /** !#en + Is the audio source playing (Read Only).
+ Note: isPlaying is not supported for Native platforms. + !#zh + 该音频剪辑是否正播放(只读)。
+ 注意:Native 平台暂时不支持 isPlaying。 */ + isPlaying: boolean; + /** !#en The clip of the audio source to play. + !#zh 要播放的音频剪辑。 */ + clip: AudioClip; + /** !#en The volume of the audio source. + !#zh 音频源的音量(0.0 ~ 1.0)。 */ + volume: number; + /** !#en Is the audio source mute? + !#zh 是否静音音频源。Mute 是设置音量为 0,取消静音是恢复原来的音量。 */ + mute: boolean; + /** !#en Is the audio source looping? + !#zh 音频源是否循环播放? */ + loop: boolean; + /** !#en If set to true, the audio source will automatically start playing on onEnable. + !#zh 如果设置为 true,音频源将在 onEnable 时自动播放。 */ + playOnLoad: boolean; + /** !#en If set to true and AudioClip is a deferred load resource, the component will preload AudioClip in the onLoad phase. + !#zh 如果设置为 true 且 AudioClip 为延迟加载资源,组件将在 onLoad 阶段预加载 AudioClip。 */ + preload: boolean; + /** + !#en Plays the clip. + !#zh 播放音频剪辑。 + */ + play(): void; + /** + !#en Stops the clip. + !#zh 停止当前音频剪辑。 + */ + stop(): void; + /** + !#en Pause the clip. + !#zh 暂停当前音频剪辑。 + */ + pause(): void; + /** + !#en Resume the clip. + !#zh 恢复播放。 + */ + resume(): void; + /** + !#en Rewind playing music. + !#zh 从头开始播放。 + */ + rewind(): void; + /** + !#en Get current time + !#zh 获取当前的播放时间 + */ + getCurrentTime(): number; + /** + !#en Set current time + !#zh 设置当前的播放时间 + @param time time + */ + setCurrentTime(time: number): number; + /** + !#en Get audio duration + !#zh 获取当前音频的长度 + */ + getDuration(): number; + } + /** !#en + This component will block all input events (mouse and touch) within the bounding box of the node, preventing the input from penetrating into the underlying node, typically for the background of the top UI.
+ This component does not have any API interface and can be added directly to the scene to take effect. + !#zh + 该组件将拦截所属节点 bounding box 内的所有输入事件(鼠标和触摸),防止输入穿透到下层节点,一般用于上层 UI 的背景。
+ 该组件没有任何 API 接口,直接添加到场景即可生效。 */ + export class BlockInputEvents extends Component { + } + /** !#en + Button component. Can be pressed or clicked. Button has 4 Transition types: + + - Button.Transition.NONE // Button will do nothing + - Button.Transition.COLOR // Button will change target's color + - Button.Transition.SPRITE // Button will change target Sprite's sprite + - Button.Transition.SCALE // Button will change target node's scale + + The button can bind events (but you must be on the button's node to bind events).
+ The following events can be triggered on all platforms. + + - cc.Node.EventType.TOUCH_START // Press + - cc.Node.EventType.TOUCH_MOVE // After pressing and moving + - cc.Node.EventType.TOUCH_END // After pressing and releasing + - cc.Node.EventType.TOUCH_CANCEL // Press to cancel + + The following events are only triggered on the PC platform: + + - cc.Node.EventType.MOUSE_DOWN + - cc.Node.EventType.MOUSE_MOVE + - cc.Node.EventType.MOUSE_ENTER + - cc.Node.EventType.MOUSE_LEAVE + - cc.Node.EventType.MOUSE_UP + - cc.Node.EventType.MOUSE_WHEEL + + User can get the current clicked node with 'event.target' from event object which is passed as parameter in the callback function of click event. + + !#zh + 按钮组件。可以被按下,或者点击。 + + 按钮可以通过修改 Transition 来设置按钮状态过渡的方式: + + - Button.Transition.NONE // 不做任何过渡 + - Button.Transition.COLOR // 进行颜色之间过渡 + - Button.Transition.SPRITE // 进行精灵之间过渡 + - Button.Transition.SCALE // 进行缩放过渡 + + 按钮可以绑定事件(但是必须要在按钮的 Node 上才能绑定事件):
+ 以下事件可以在全平台上都触发: + + - cc.Node.EventType.TOUCH_START // 按下时事件 + - cc.Node.EventType.TOUCH_MOVE // 按住移动后事件 + - cc.Node.EventType.TOUCH_END // 按下后松开后事件 + - cc.Node.EventType.TOUCH_CANCEL // 按下取消事件 + + 以下事件只在 PC 平台上触发: + + - cc.Node.EventType.MOUSE_DOWN // 鼠标按下时事件 + - cc.Node.EventType.MOUSE_MOVE // 鼠标按住移动后事件 + - cc.Node.EventType.MOUSE_ENTER // 鼠标进入目标事件 + - cc.Node.EventType.MOUSE_LEAVE // 鼠标离开目标事件 + - cc.Node.EventType.MOUSE_UP // 鼠标松开事件 + - cc.Node.EventType.MOUSE_WHEEL // 鼠标滚轮事件 + + 用户可以通过获取 __点击事件__ 回调函数的参数 event 的 target 属性获取当前点击对象。 */ + export class Button extends Component implements GraySpriteState { + /** !#en + Whether the Button is disabled. + If true, the Button will trigger event and do transition. + !#zh + 按钮事件是否被响应,如果为 false,则按钮将被禁用。 */ + interactable: boolean; + /** !#en When this flag is true, Button target sprite will turn gray when interactable is false. + !#zh 如果这个标记为 true,当 button 的 interactable 属性为 false 的时候,会使用内置 shader 让 button 的 target 节点的 sprite 组件变灰 */ + enableAutoGrayEffect: boolean; + /** !#en Transition type + !#zh 按钮状态改变时过渡方式。 */ + transition: Button.Transition; + /** !#en Normal state color. + !#zh 普通状态下按钮所显示的颜色。 */ + normalColor: Color; + /** !#en Pressed state color + !#zh 按下状态时按钮所显示的颜色。 */ + pressedColor: Color; + /** !#en Hover state color + !#zh 悬停状态下按钮所显示的颜色。 */ + hoverColor: Color; + /** !#en Disabled state color + !#zh 禁用状态下按钮所显示的颜色。 */ + disabledColor: Color; + /** !#en Color and Scale transition duration + !#zh 颜色过渡和缩放过渡时所需时间 */ + duration: number; + /** !#en When user press the button, the button will zoom to a scale. + The final scale of the button equals (button original scale * zoomScale) + !#zh 当用户点击按钮后,按钮会缩放到一个值,这个值等于 Button 原始 scale * zoomScale */ + zoomScale: number; + /** !#en Normal state sprite + !#zh 普通状态下按钮所显示的 Sprite 。 */ + normalSprite: SpriteFrame; + /** !#en Pressed state sprite + !#zh 按下状态时按钮所显示的 Sprite 。 */ + pressedSprite: SpriteFrame; + /** !#en Hover state sprite + !#zh 悬停状态下按钮所显示的 Sprite 。 */ + hoverSprite: SpriteFrame; + /** !#en Disabled state sprite + !#zh 禁用状态下按钮所显示的 Sprite 。 */ + disabledSprite: SpriteFrame; + /** !#en + Transition target. + When Button state changed: + If Transition type is Button.Transition.NONE, Button will do nothing + If Transition type is Button.Transition.COLOR, Button will change target's color + If Transition type is Button.Transition.SPRITE, Button will change target Sprite's sprite + !#zh + 需要过渡的目标。 + 当前按钮状态改变规则: + -如果 Transition type 选择 Button.Transition.NONE,按钮不做任何过渡。 + -如果 Transition type 选择 Button.Transition.COLOR,按钮会对目标颜色进行颜色之间的过渡。 + -如果 Transition type 选择 Button.Transition.Sprite,按钮会对目标 Sprite 进行 Sprite 之间的过渡。 */ + target: Node; + /** !#en If Button is clicked, it will trigger event's handler + !#zh 按钮的点击事件列表。 */ + clickEvents: Component.EventHandler[]; + /** !#en The normal material. + !#zh 正常状态的材质。 */ + normalMaterial: Material; + /** !#en The gray material. + !#zh 置灰状态的材质。 */ + grayMaterial: Material; + } + /** !#zh 作为 UI 根节点,为所有子节点提供视窗四边的位置信息以供对齐,另外提供屏幕适配策略接口,方便从编辑器设置。
+ 注:由于本节点的尺寸会跟随屏幕拉伸,所以 anchorPoint 只支持 (0.5, 0.5),否则适配不同屏幕时坐标会有偏差。 */ + export class Canvas extends Component { + /** !#en Current active canvas, the scene should only have one active canvas at the same time. + !#zh 当前激活的画布组件,场景同一时间只能有一个激活的画布。 */ + static instance: Canvas; + /** !#en The desigin resolution for current scene. + !#zh 当前场景设计分辨率。 */ + designResolution: Size; + /** !#en TODO + !#zh: 是否优先将设计分辨率高度撑满视图高度。 */ + fitHeight: boolean; + /** !#en TODO + !#zh: 是否优先将设计分辨率宽度撑满视图宽度。 */ + fitWidth: boolean; + } + /** !#en + Base class for everything attached to Node(Entity).
+
+ NOTE: Not allowed to use construction parameters for Component's subclasses, + because Component is created by the engine. + !#zh + 所有附加到节点的基类。
+
+ 注意:不允许使用组件的子类构造参数,因为组件是由引擎创建的。 */ + export class Component extends Object { + /** !#en The node this component is attached to. A component is always attached to a node. + !#zh 该组件被附加到的节点。组件总会附加到一个节点。 */ + node: Node; + /** !#en The uuid for editor. + !#zh 组件的 uuid,用于编辑器。 */ + uuid: string; + /** !#en indicates whether this component is enabled or not. + !#zh 表示该组件自身是否启用。 */ + enabled: boolean; + /** !#en indicates whether this component is enabled and its node is also active in the hierarchy. + !#zh 表示该组件是否被启用并且所在的节点也处于激活状态。 */ + enabledInHierarchy: boolean; + /** !#en Returns a value which used to indicate the onLoad get called or not. + !#zh 返回一个值用来判断 onLoad 是否被调用过,不等于 0 时调用过,等于 0 时未调用。 */ + _isOnLoadCalled: number; + /** + !#en Update is called every frame, if the Component is enabled.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh 如果该组件启用,则每帧调用 update。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + @param dt the delta time in seconds it took to complete the last frame + */ + protected update(dt: number): void; + /** + !#en LateUpdate is called every frame, if the Component is enabled.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh 如果该组件启用,则每帧调用 LateUpdate。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + @param dt the delta time in seconds it took to complete the last frame + */ + protected lateUpdate(dt: number): void; + /** + !#en + When attaching to an active node or its node first activated. + onLoad is always called before any start functions, this allows you to order initialization of scripts.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh + 当附加到一个激活的节点上或者其节点第一次激活时候调用。onLoad 总是会在任何 start 方法调用前执行,这能用于安排脚本的初始化顺序。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + */ + protected onLoad(): void; + /** + !#en + Called before all scripts' update if the Component is enabled the first time. + Usually used to initialize some logic which need to be called after all components' `onload` methods called.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh + 如果该组件第一次启用,则在所有组件的 update 之前调用。通常用于需要在所有组件的 onLoad 初始化完毕后执行的逻辑。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + */ + protected start(): void; + /** + !#en Called when this component becomes enabled and its node is active.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh 当该组件被启用,并且它的节点也激活时。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + */ + protected onEnable(): void; + /** + !#en Called when this component becomes disabled or its node becomes inactive.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh 当该组件被禁用或节点变为无效时调用。
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + */ + protected onDisable(): void; + /** + !#en Called when this component will be destroyed.
+ This is a lifecycle method. It may not be implemented in the super class. You can only call its super class method inside it. It should not be called manually elsewhere. + !#zh 当该组件被销毁时调用
+ 该方法为生命周期方法,父类未必会有实现。并且你只能在该方法内部调用父类的实现,不可在其它地方直接调用该方法。 + */ + protected onDestroy(): void; + protected onFocusInEditor(): void; + protected onLostFocusInEditor(): void; + /** + !#en Called to initialize the component or node’s properties when adding the component the first time or when the Reset command is used. This function is only called in editor. + !#zh 用来初始化组件或节点的一些属性,当该组件被第一次添加到节点上或用户点击了它的 Reset 菜单时调用。这个回调只会在编辑器下调用。 + */ + protected resetInEditor(): void; + /** + !#en Adds a component class to the node. You can also add component to node by passing in the name of the script. + !#zh 向节点添加一个组件类,你还可以通过传入脚本的名称来添加组件。 + @param typeOrClassName the constructor or the class name of the component to add + + @example + ```js + var sprite = node.addComponent(cc.Sprite); + var test = node.addComponent("Test"); + ``` + */ + addComponent(type: {new(): T}): T; + addComponent(className: string): any; + /** + !#en + Returns the component of supplied type if the node has one attached, null if it doesn't.
+ You can also get component in the node by passing in the name of the script. + !#zh + 获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
+ 传入参数也可以是脚本的名称。 + @param typeOrClassName typeOrClassName + + @example + ```js + // get sprite component. + var sprite = node.getComponent(cc.Sprite); + // get custom test calss. + var test = node.getComponent("Test"); + ``` + */ + getComponent(type: {prototype: T}): T; + getComponent(className: string): any; + /** + !#en Returns all components of supplied Type in the node. + !#zh 返回节点上指定类型的所有组件。 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprites = node.getComponents(cc.Sprite); + var tests = node.getComponents("Test"); + ``` + */ + getComponents(type: {prototype: T}): T[]; + getComponents(className: string): any[]; + /** + !#en Returns the component of supplied type in any of its children using depth first search. + !#zh 递归查找所有子节点中第一个匹配指定类型的组件。 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprite = node.getComponentInChildren(cc.Sprite); + var Test = node.getComponentInChildren("Test"); + ``` + */ + getComponentInChildren(type: {prototype: T}): T; + getComponentInChildren(className: string): any; + /** + !#en Returns the components of supplied type in self or any of its children using depth first search. + !#zh 递归查找自身或所有子节点中指定类型的组件 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprites = node.getComponentsInChildren(cc.Sprite); + var tests = node.getComponentsInChildren("Test"); + ``` + */ + getComponentsInChildren(type: {prototype: T}): T[]; + getComponentsInChildren(className: string): any[]; + /** + !#en + If the component's bounding box is different from the node's, you can implement this method to supply + a custom axis aligned bounding box (AABB), so the editor's scene view can perform hit test properly. + !#zh + 如果组件的包围盒与节点不同,您可以实现该方法以提供自定义的轴向对齐的包围盒(AABB), + 以便编辑器的场景视图可以正确地执行点选测试。 + @param out_rect the Rect to receive the bounding box + */ + _getLocalBounds(out_rect: Rect): void; + /** + !#en + onRestore is called after the user clicks the Reset item in the Inspector's context menu or performs + an undo operation on this component.
+
+ If the component contains the "internal state", short for "temporary member variables which not included
+ in its CCClass properties", then you may need to implement this function.
+
+ The editor will call the getset accessors of your component to record/restore the component's state
+ for undo/redo operation. However, in extreme cases, it may not works well. Then you should implement
+ this function to manually synchronize your component's "internal states" with its public properties.
+ Once you implement this function, all the getset accessors of your component will not be called when
+ the user performs an undo/redo operation. Which means that only the properties with default value
+ will be recorded or restored by editor.
+
+ Similarly, the editor may failed to reset your component correctly in extreme cases. Then if you need
+ to support the reset menu, you should manually synchronize your component's "internal states" with its
+ properties in this function. Once you implement this function, all the getset accessors of your component
+ will not be called during reset operation. Which means that only the properties with default value
+ will be reset by editor. + + This function is only called in editor mode. + !#zh + onRestore 是用户在检查器菜单点击 Reset 时,对此组件执行撤消操作后调用的。
+
+ 如果组件包含了“内部状态”(不在 CCClass 属性中定义的临时成员变量),那么你可能需要实现该方法。
+
+ 编辑器执行撤销/重做操作时,将调用组件的 get set 来录制和还原组件的状态。然而,在极端的情况下,它可能无法良好运作。
+ 那么你就应该实现这个方法,手动根据组件的属性同步“内部状态”。一旦你实现这个方法,当用户撤销或重做时,组件的所有 get set 都不会再被调用。这意味着仅仅指定了默认值的属性将被编辑器记录和还原。
+
+ 同样的,编辑可能无法在极端情况下正确地重置您的组件。如果你需要支持组件重置菜单,则需要在该方法中手工同步组件属性到“内部状态”。一旦你实现这个方法,组件的所有 get set 都不会在重置操作时被调用。这意味着仅仅指定了默认值的属性将被编辑器重置。 +
+ 此方法仅在编辑器下会被调用。 + */ + onRestore(): void; + /** + !#en + Schedules a custom selector.
+ If the selector is already scheduled, then the interval parameter will be updated without scheduling it again. + !#zh + 调度一个自定义的回调函数。
+ 如果回调函数已调度,那么将不会重复调度它,只会更新时间间隔参数。 + @param callback The callback function + @param interval Tick interval in seconds. 0 means tick every frame. + @param repeat The selector will be executed (repeat + 1) times, you can use cc.macro.REPEAT_FOREVER for tick infinitely. + @param delay The amount of time that the first tick will wait before execution. Unit: s + + @example + ```js + var timeCallback = function (dt) { + cc.log("time: " + dt); + } + this.schedule(timeCallback, 1); + ``` + */ + schedule(callback: Function, interval?: number, repeat?: number, delay?: number): void; + /** + !#en Schedules a callback function that runs only once, with a delay of 0 or larger. + !#zh 调度一个只运行一次的回调函数,可以指定 0 让回调函数在下一帧立即执行或者在一定的延时之后执行。 + @param callback A function wrapped as a selector + @param delay The amount of time that the first tick will wait before execution. Unit: s + + @example + ```js + var timeCallback = function (dt) { + cc.log("time: " + dt); + } + this.scheduleOnce(timeCallback, 2); + ``` + */ + scheduleOnce(callback: Function, delay?: number): void; + /** + !#en Unschedules a custom callback function. + !#zh 取消调度一个自定义的回调函数。 + @param callback_fn A function wrapped as a selector + + @example + ```js + this.unschedule(_callback); + ``` + */ + unschedule(callback_fn: Function): void; + /** + !#en + unschedule all scheduled callback functions: custom callback functions, and the 'update' callback function.
+ Actions are not affected by this method. + !#zh 取消调度所有已调度的回调函数:定制的回调函数以及 `update` 回调函数。动作不受此方法影响。 + + @example + ```js + this.unscheduleAllCallbacks(); + ``` + */ + unscheduleAllCallbacks(): void; + } + /** !#en The Label Component. + !#zh 文字标签组件 */ + export class Label extends RenderComponent { + /** !#en Content string of label. + !#zh 标签显示的文本内容。 */ + string: string; + /** !#en Horizontal Alignment of label. + !#zh 文本内容的水平对齐方式。 */ + horizontalAlign: Label.HorizontalAlign; + /** !#en Vertical Alignment of label. + !#zh 文本内容的垂直对齐方式。 */ + verticalAlign: Label.VerticalAlign; + /** !#en The actual rendering font size in shrink mode + !#zh SHRINK 模式下面文本实际渲染的字体大小 */ + actualFontSize: number; + /** !#en Font size of label. + !#zh 文本字体大小。 */ + fontSize: number; + /** !#en Font family of label, only take effect when useSystemFont property is true. + !#zh 文本字体名称, 只在 useSystemFont 属性为 true 的时候生效。 */ + fontFamily: string; + /** !#en Line Height of label. + !#zh 文本行高。 */ + lineHeight: number; + /** !#en Overflow of label. + !#zh 文字显示超出范围时的处理方式。 */ + overflow: Label.Overflow; + /** !#en Whether auto wrap label when string width is large than label width. + !#zh 是否自动换行。 */ + enableWrapText: boolean; + /** !#en The font of label. + !#zh 文本字体。 */ + font: Font; + /** !#en Whether use system font name or not. + !#zh 是否使用系统字体。 */ + useSystemFont: boolean; + /** !#en The spacing of the x axis between characters, only take Effect when using bitmap fonts. + !#zh 文字之间 x 轴的间距,仅在使用位图字体时生效。 */ + spacingX: number; + /** !#en The cache mode of label. This mode only supports system fonts. + !#zh 文本缓存模式, 该模式只支持系统字体。 */ + cacheMode: Label.CacheMode; + /** !#en Whether enable bold. + !#zh 是否启用黑体。 */ + enableBold: boolean; + /** !#en Whether enable italic. + !#zh 是否启用斜体。 */ + enableItalic: boolean; + /** !#en Whether enable underline. + !#zh 是否启用下划线。 */ + enableUnderline: boolean; + /** !#en The height of underline. + !#zh 下划线高度。 */ + underlineHeight: number; + /** + !#zh 需要保证当前场景中没有使用CHAR缓存的Label才可以清除,否则已渲染的文字没有重新绘制会不显示 + !#en It can be cleared that need to ensure there is not use the CHAR cache in the current scene. Otherwise, the rendered text will not be displayed without repainting. + */ + static clearCharCache(): void; + } + /** !#en Outline effect used to change the display, only for system fonts or TTF fonts + !#zh 描边效果组件,用于字体描边,只能用于系统字体 */ + export class LabelOutline extends Component { + /** !#en outline color + !#zh 改变描边的颜色 */ + color: Color; + /** !#en Change the outline width + !#zh 改变描边的宽度 */ + width: number; + } + /** !#en Shadow effect for Label component, only for system fonts or TTF fonts + !#zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体 */ + export class LabelShadow extends Component { + /** !#en The shadow color + !#zh 阴影的颜色 */ + color: Color; + /** !#en Offset between font and shadow + !#zh 字体与阴影的偏移 */ + offset: Vec2; + /** !#en A non-negative float specifying the level of shadow blur + !#zh 阴影的模糊程度 */ + blur: number; + } + /** !#en + The Layout is a container component, use it to arrange child elements easily.
+ Note:
+ 1.Scaling and rotation of child nodes are not considered.
+ 2.After setting the Layout, the results need to be updated until the next frame, + unless you manually call {{#crossLink "Layout/updateLayout:method"}}{{/crossLink}}。 + !#zh + Layout 组件相当于一个容器,能自动对它的所有子节点进行统一排版。
+ 注意:
+ 1.不会考虑子节点的缩放和旋转。
+ 2.对 Layout 设置后结果需要到下一帧才会更新,除非你设置完以后手动调用 {{#crossLink "Layout/updateLayout:method"}}{{/crossLink}}。 */ + export class Layout extends Component { + /** !#en The layout type. + !#zh 布局类型 */ + type: Layout.Type; + /** !#en + The are three resize modes for Layout. + None, resize Container and resize children. + !#zh 缩放模式 */ + resizeMode: Layout.ResizeMode; + /** !#en The cell size for grid layout. + !#zh 每个格子的大小,只有布局类型为 GRID 的时候才有效。 */ + cellSize: Size; + /** !#en + The start axis for grid layout. If you choose horizontal, then children will layout horizontally at first, + and then break line on demand. Choose vertical if you want to layout vertically at first . + !#zh 起始轴方向类型,可进行水平和垂直布局排列,只有布局类型为 GRID 的时候才有效。 */ + startAxis: Layout.AxisDirection; + /** !#en The left padding of layout, it only effect the layout in one direction. + !#zh 容器内左边距,只会在一个布局方向上生效。 */ + paddingLeft: number; + /** !#en The right padding of layout, it only effect the layout in one direction. + !#zh 容器内右边距,只会在一个布局方向上生效。 */ + paddingRight: number; + /** !#en The top padding of layout, it only effect the layout in one direction. + !#zh 容器内上边距,只会在一个布局方向上生效。 */ + paddingTop: number; + /** !#en The bottom padding of layout, it only effect the layout in one direction. + !#zh 容器内下边距,只会在一个布局方向上生效。 */ + paddingBottom: number; + /** !#en The distance in x-axis between each element in layout. + !#zh 子节点之间的水平间距。 */ + spacingX: number; + /** !#en The distance in y-axis between each element in layout. + !#zh 子节点之间的垂直间距。 */ + spacingY: number; + /** !#en + Only take effect in Vertical layout mode. + This option changes the start element's positioning. + !#zh 垂直排列子节点的方向。 */ + verticalDirection: Layout.VerticalDirection; + /** !#en + Only take effect in Horizontal layout mode. + This option changes the start element's positioning. + !#zh 水平排列子节点的方向。 */ + horizontalDirection: Layout.HorizontalDirection; + /** !#en Adjust the layout if the children scaled. + !#zh 子节点缩放比例是否影响布局。 */ + affectedByScale: boolean; + /** + !#en Perform the layout update + !#zh 立即执行更新布局 + + @example + ```js + layout.type = cc.Layout.HORIZONTAL; + layout.node.addChild(childNode); + cc.log(childNode.x); // not yet changed + layout.updateLayout(); + cc.log(childNode.x); // changed + ``` + */ + updateLayout(): void; + } + /** !#en The Mask Component + !#zh 遮罩组件 */ + export class Mask extends RenderComponent { + /** !#en The mask type. + !#zh 遮罩类型 */ + type: Mask.Type; + /** !#en The mask image + !#zh 遮罩所需要的贴图 */ + spriteFrame: SpriteFrame; + /** !#en + The alpha threshold.(Not supported Canvas Mode)
+ The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold.
+ Should be a float between 0 and 1.
+ This default to 0.1. + When it's set to 1, the stencil will discard all pixels, nothing will be shown. + !#zh + Alpha 阈值(不支持 Canvas 模式)
+ 只有当模板的像素的 alpha 大于等于 alphaThreshold 时,才会绘制内容。
+ 该数值 0 ~ 1 之间的浮点数,默认值为 0.1 + 当被设置为 1 时,会丢弃所有蒙版像素,所以不会显示任何内容 */ + alphaThreshold: number; + /** !#en Reverse mask (Not supported Canvas Mode) + !#zh 反向遮罩(不支持 Canvas 模式) */ + inverted: boolean; + /** TODO: remove segments, not supported by graphics + !#en The segements for ellipse mask. + !#zh 椭圆遮罩的曲线细分数 */ + segements: number; + } + /** !#en + cc.MotionStreak manages a Ribbon based on it's motion in absolute space.
+ You construct it with a fadeTime, minimum segment size, texture path, texture
+ length and color. The fadeTime controls how long it takes each vertex in
+ the streak to fade out, the minimum segment size it how many pixels the
+ streak will move before adding a new ribbon segment, and the texture
+ length is the how many pixels the texture is stretched across. The texture
+ is vertically aligned along the streak segment. + !#zh 运动轨迹,用于游戏对象的运动轨迹上实现拖尾渐隐效果。 */ + export class MotionStreak extends Component implements BlendFunc { + /** !#en + !#zh 在编辑器模式下预览拖尾效果。 */ + preview: boolean; + /** !#en The fade time to fade. + !#zh 拖尾的渐隐时间,以秒为单位。 */ + fadeTime: number; + /** !#en The minimum segment size. + !#zh 拖尾之间最小距离。 */ + minSeg: number; + /** !#en The stroke's width. + !#zh 拖尾的宽度。 */ + stroke: number; + /** !#en The texture of the MotionStreak. + !#zh 拖尾的贴图。 */ + texture: Texture2D; + /** !#en The color of the MotionStreak. + !#zh 拖尾的颜色 */ + color: Color; + /** !#en The fast Mode. + !#zh 是否启用了快速模式。当启用快速模式,新的点会被更快地添加,但精度较低。 */ + fastMode: boolean; + /** + !#en Remove all living segments of the ribbon. + !#zh 删除当前所有的拖尾片段。 + + @example + ```js + // Remove all living segments of the ribbon. + myMotionStreak.reset(); + ``` + */ + reset(): void; + /** !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost. + !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销 */ + srcBlendFactor: macro.BlendFactor; + /** !#en specify the destination Blend Factor. + !#zh 指定目标的混合模式 */ + dstBlendFactor: macro.BlendFactor; + } + /** !#en The PageView control + !#zh 页面视图组件 */ + export class PageView extends ScrollView { + /** !#en Specify the size type of each page in PageView. + !#zh 页面视图中每个页面大小类型 */ + sizeMode: PageView.SizeMode; + /** !#en The page view direction + !#zh 页面视图滚动类型 */ + direction: PageView.Direction; + /** !#en + The scroll threshold value, when drag exceeds this value, + release the next page will automatically scroll, less than the restore + !#zh 滚动临界值,默认单位百分比,当拖拽超出该数值时,松开会自动滚动下一页,小于时则还原。 */ + scrollThreshold: number; + /** !#en + Auto page turning velocity threshold. When users swipe the PageView quickly, + it will calculate a velocity based on the scroll distance and time, + if the calculated velocity is larger than the threshold, then it will trigger page turning. + !#zh + 快速滑动翻页临界值。 + 当用户快速滑动时,会根据滑动开始和结束的距离与时间计算出一个速度值, + 该值与此临界值相比较,如果大于临界值,则进行自动翻页。 */ + autoPageTurningThreshold: number; + /** !#en Change the PageTurning event timing of PageView. + !#zh 设置 PageView PageTurning 事件的发送时机。 */ + pageTurningEventTiming: number; + /** !#en The Page View Indicator + !#zh 页面视图指示器组件 */ + indicator: PageViewIndicator; + /** !#en The time required to turn over a page. unit: second + !#zh 每个页面翻页时所需时间。单位:秒 */ + pageTurningSpeed: number; + /** !#en PageView events callback + !#zh 滚动视图的事件回调函数 */ + pageEvents: Component.EventHandler[]; + /** + !#en Returns current page index + !#zh 返回当前页面索引 + */ + getCurrentPageIndex(): number; + /** + !#en Set current page index + !#zh 设置当前页面索引 + @param index index + */ + setCurrentPageIndex(index: number): void; + /** + !#en Returns all pages of pageview + !#zh 返回视图中的所有页面 + */ + getPages(): Node[]; + /** + !#en At the end of the current page view to insert a new view + !#zh 在当前页面视图的尾部插入一个新视图 + @param page page + */ + addPage(page: Node): void; + /** + !#en Inserts a page in the specified location + !#zh 将页面插入指定位置中 + @param page page + @param index index + */ + insertPage(page: Node, index: number): void; + /** + !#en Removes a page from PageView. + !#zh 移除指定页面 + @param page page + */ + removePage(page: Node): void; + /** + !#en Removes a page at index of PageView. + !#zh 移除指定下标的页面 + @param index index + */ + removePageAtIndex(index: number): void; + /** + !#en Removes all pages from PageView + !#zh 移除所有页面 + */ + removeAllPages(): void; + /** + !#en Scroll PageView to index. + !#zh 滚动到指定页面 + @param idx index of page. + @param timeInSecond scrolling time + */ + scrollToPage(idx: number, timeInSecond: number): void; + } + /** !#en + Visual indicator of progress in some operation. + Displays a bar to the user representing how far the operation has progressed. + !#zh + 进度条组件,可用于显示加载资源时的进度。 */ + export class ProgressBar extends Component { + /** !#en The targeted Sprite which will be changed progressively. + !#zh 用来显示进度条比例的 Sprite 对象。 */ + barSprite: Sprite; + /** !#en The progress mode, there are two modes supported now: horizontal and vertical. + !#zh 进度条的模式 */ + mode: ProgressBar.Mode; + /** !#en The total width or height of the bar sprite. + !#zh 进度条实际的总长度 */ + totalLength: number; + /** !#en The current progress of the bar sprite. The valid value is between 0-1. + !#zh 当前进度值,该数值的区间是 0-1 之间。 */ + progress: number; + /** !#en Whether reverse the progress direction of the bar sprite. + !#zh 进度条是否进行反方向变化。 */ + reverse: boolean; + } + /** !#en The Page View Indicator Component + !#zh 页面视图每页标记组件 */ + export class PageViewIndicator extends Component { + /** !#en The spriteFrame for each element. + !#zh 每个页面标记显示的图片 */ + spriteFrame: SpriteFrame; + /** !#en The location direction of PageViewIndicator. + !#zh 页面标记摆放方向 */ + direction: PageViewIndicator.Direction; + /** !#en The cellSize for each element. + !#zh 每个页面标记的大小 */ + cellSize: Size; + /** !#en The distance between each element. + !#zh 每个页面标记之间的边距 */ + spacing: number; + /** + !#en Set Page View + !#zh 设置页面视图 + @param target target + */ + setPageView(target: PageView): void; + } + /** !#en + Base class for components which supports rendering features. + !#zh + 所有支持渲染的组件的基类 */ + export class RenderComponent extends Component { + /** !#en The materials used by this render component. + !#zh 渲染组件使用的材质。 */ + sharedMaterials: Material[]; + /** + !#en Get the material by index. + !#zh 根据指定索引获取材质 + @param index index + */ + getMaterial(index: number): MaterialVariant; + /** + !#en Gets all the materials. + !#zh 获取所有材质。 + */ + getMaterials(): MaterialVariant[]; + /** + !#en Set the material by index. + !#zh 根据指定索引设置材质 + @param index index + @param material material + */ + setMaterial(index: number, material: Material): Material; + } + /** !#en The RichText Component. + !#zh 富文本组件 */ + export class RichText extends Component { + /** !#en Content string of RichText. + !#zh 富文本显示的文本内容。 */ + string: string; + /** !#en Horizontal Alignment of each line in RichText. + !#zh 文本内容的水平对齐方式。 */ + horizontalAlign: macro.TextAlignment; + /** !#en Font size of RichText. + !#zh 富文本字体大小。 */ + fontSize: number; + /** !#en Custom System font of RichText + !#zh 富文本定制系统字体 */ + fontFamily: string; + /** !#en Custom TTF font of RichText + !#zh 富文本定制字体 */ + font: TTFFont; + /** !#en Whether use system font name or not. + !#zh 是否使用系统字体。 */ + useSystemFont: boolean; + /** !#en The cache mode of label. This mode only supports system fonts. + !#zh 文本缓存模式, 该模式只支持系统字体。 */ + cacheMode: Label.CacheMode; + /** !#en The maximize width of the RichText + !#zh 富文本的最大宽度 */ + maxWidth: number; + /** !#en Line Height of RichText. + !#zh 富文本行高。 */ + lineHeight: number; + /** !#en The image atlas for the img tag. For each src value in the img tag, there should be a valid spriteFrame in the image atlas. + !#zh 对于 img 标签里面的 src 属性名称,都需要在 imageAtlas 里面找到一个有效的 spriteFrame,否则 img tag 会判定为无效。 */ + imageAtlas: SpriteAtlas; + /** !#en + Once checked, the RichText will block all input events (mouse and touch) within + the bounding box of the node, preventing the input from penetrating into the underlying node. + !#zh + 选中此选项后,RichText 将阻止节点边界框中的所有输入事件(鼠标和触摸),从而防止输入事件穿透到底层节点。 */ + handleTouchEvent: boolean; + } + /** !#en + This component is used to adjust the layout of current node to respect the safe area of a notched mobile device such as the iPhone X. + It is typically used for the top node of the UI interaction area. For specific usage, refer to the official [example-cases/02_ui/16_safeArea/SafeArea.fire](https://github.com/cocos-creator/example-cases). + + The concept of safe area is to give you a fixed inner rectangle in which you can safely display content that will be drawn on screen. + You are strongly discouraged from providing controls outside of this area. But your screen background could embellish edges. + + This component internally uses the API `cc.sys.getSafeAreaRect();` to obtain the safe area of the current iOS or Android device, + and implements the adaptation by using the Widget component and set anchor. + + !#zh + 该组件会将所在节点的布局适配到 iPhone X 等异形屏手机的安全区域内,通常用于 UI 交互区域的顶层节点,具体用法可参考官方范例 [example-cases/02_ui/16_safeArea/SafeArea.fire](https://github.com/cocos-creator/example-cases)。 + + 该组件内部通过 API `cc.sys.getSafeAreaRect();` 获取到当前 iOS 或 Android 设备的安全区域,并通过 Widget 组件实现适配。 */ + export class SafeArea extends Component { + /** + !#en Adapt to safe area + !#zh 立即适配安全区域 + + @example + ```js + let safeArea = this.node.addComponent(cc.SafeArea); + safeArea.updateArea(); + ``` + */ + updateArea(): void; + } + /** !#en + The Scrollbar control allows the user to scroll an image or other view that is too large to see completely + !#zh 滚动条组件 */ + export class Scrollbar extends Component { + /** !#en The "handle" part of the scrollbar. + !#zh 作为当前滚动区域位置显示的滑块 Sprite。 */ + handle: Sprite; + /** !#en The direction of scrollbar. + !#zh ScrollBar 的滚动方向。 */ + direction: Scrollbar.Direction; + /** !#en Whether enable auto hide or not. + !#zh 是否在没有滚动动作时自动隐藏 ScrollBar。 */ + enableAutoHide: boolean; + /** !#en + The time to hide scrollbar when scroll finished. + Note: This value is only useful when enableAutoHide is true. + !#zh + 没有滚动动作后经过多久会自动隐藏。 + 注意:只要当 “enableAutoHide” 为 true 时,才有效。 */ + autoHideTime: number; + } + /** !#en + Layout container for a view hierarchy that can be scrolled by the user, + allowing it to be larger than the physical display. + + !#zh + 滚动视图组件 */ + export class ScrollView extends Component { + /** !#en This is a reference to the UI element to be scrolled. + !#zh 可滚动展示内容的节点。 */ + content: Node; + /** !#en Enable horizontal scroll. + !#zh 是否开启水平滚动。 */ + horizontal: boolean; + /** !#en Enable vertical scroll. + !#zh 是否开启垂直滚动。 */ + vertical: boolean; + /** !#en When inertia is set, the content will continue to move when touch ended. + !#zh 是否开启滚动惯性。 */ + inertia: boolean; + /** !#en + It determines how quickly the content stop moving. A value of 1 will stop the movement immediately. + A value of 0 will never stop the movement until it reaches to the boundary of scrollview. + !#zh + 开启惯性后,在用户停止触摸后滚动多快停止,0表示永不停止,1表示立刻停止。 */ + brake: number; + /** !#en When elastic is set, the content will be bounce back when move out of boundary. + !#zh 是否允许滚动内容超过边界,并在停止触摸后回弹。 */ + elastic: boolean; + /** !#en The elapse time of bouncing back. A value of 0 will bounce back immediately. + !#zh 回弹持续的时间,0 表示将立即反弹。 */ + bounceDuration: number; + /** !#en The horizontal scrollbar reference. + !#zh 水平滚动的 ScrollBar。 */ + horizontalScrollBar: Scrollbar; + /** !#en The vertical scrollbar reference. + !#zh 垂直滚动的 ScrollBar。 */ + verticalScrollBar: Scrollbar; + /** !#en Scrollview events callback + !#zh 滚动视图的事件回调函数 */ + scrollEvents: Component.EventHandler[]; + /** !#en If cancelInnerEvents is set to true, the scroll behavior will cancel touch events on inner content nodes + It's set to true by default. + !#zh 如果这个属性被设置为 true,那么滚动行为会取消子节点上注册的触摸事件,默认被设置为 true。 + 注意,子节点上的 touchstart 事件仍然会触发,触点移动距离非常短的情况下 touchmove 和 touchend 也不会受影响。 */ + cancelInnerEvents: boolean; + /** + !#en Scroll the content to the bottom boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图底部。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the bottom boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the bottom of the view. + scrollView.scrollToBottom(0.1); + ``` + */ + scrollToBottom(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the top boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图顶部。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the top boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the top of the view. + scrollView.scrollToTop(0.1); + ``` + */ + scrollToTop(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the left boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图左边。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the left boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the left of the view. + scrollView.scrollToLeft(0.1); + ``` + */ + scrollToLeft(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the right boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图右边。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the right boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the right of the view. + scrollView.scrollToRight(0.1); + ``` + */ + scrollToRight(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the top left boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图左上角。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the top left boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the upper left corner of the view. + scrollView.scrollToTopLeft(0.1); + ``` + */ + scrollToTopLeft(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the top right boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图右上角。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the top right boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the top right corner of the view. + scrollView.scrollToTopRight(0.1); + ``` + */ + scrollToTopRight(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the bottom left boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图左下角。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the bottom left boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the lower left corner of the view. + scrollView.scrollToBottomLeft(0.1); + ``` + */ + scrollToBottomLeft(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the bottom right boundary of ScrollView. + !#zh 视图内容将在规定时间内滚动到视图右下角。 + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the bottom right boundary immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to the lower right corner of the view. + scrollView.scrollToBottomRight(0.1); + ``` + */ + scrollToBottomRight(timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll with an offset related to the ScrollView's top left origin, if timeInSecond is omitted, then it will jump to the + specific offset immediately. + !#zh 视图内容在规定时间内将滚动到 ScrollView 相对左上角原点的偏移位置, 如果 timeInSecond参数不传,则立即滚动到指定偏移位置。 + @param offset A Vec2, the value of which each axis between 0 and maxScrollOffset + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the specific offset of ScrollView immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to middle position in 0.1 second in x-axis + let maxScrollOffset = this.getMaxScrollOffset(); + scrollView.scrollToOffset(cc.v2(maxScrollOffset.x / 2, 0), 0.1); + ``` + */ + scrollToOffset(offset: Vec2, timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Get the positive offset value corresponds to the content's top left boundary. + !#zh 获取滚动视图相对于左上角原点的当前滚动偏移 + */ + getScrollOffset(): Vec2; + /** + !#en Get the maximize available scroll offset + !#zh 获取滚动视图最大可以滚动的偏移量 + */ + getMaxScrollOffset(): Vec2; + /** + !#en Scroll the content to the horizontal percent position of ScrollView. + !#zh 视图内容在规定时间内将滚动到 ScrollView 水平方向的百分比位置上。 + @param percent A value between 0 and 1. + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the horizontal percent position of ScrollView immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Scroll to middle position. + scrollView.scrollToBottomRight(0.5, 0.1); + ``` + */ + scrollToPercentHorizontal(percent: number, timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the percent position of ScrollView in any direction. + !#zh 视图内容在规定时间内进行垂直方向和水平方向的滚动,并且滚动到指定百分比位置上。 + @param anchor A point which will be clamp between cc.v2(0,0) and cc.v2(1,1). + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the percent position of ScrollView immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + + @example + ```js + // Vertical scroll to the bottom of the view. + scrollView.scrollTo(cc.v2(0, 1), 0.1); + + // Horizontal scroll to view right. + scrollView.scrollTo(cc.v2(1, 0), 0.1); + ``` + */ + scrollTo(anchor: Vec2, timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Scroll the content to the vertical percent position of ScrollView. + !#zh 视图内容在规定时间内滚动到 ScrollView 垂直方向的百分比位置上。 + @param percent A value between 0 and 1. + @param timeInSecond Scroll time in second, if you don't pass timeInSecond, + the content will jump to the vertical percent position of ScrollView immediately. + @param attenuated Whether the scroll acceleration attenuated, default is true. + // Scroll to middle position. + scrollView.scrollToPercentVertical(0.5, 0.1); + */ + scrollToPercentVertical(percent: number, timeInSecond?: number, attenuated?: boolean): void; + /** + !#en Stop auto scroll immediately + !#zh 停止自动滚动, 调用此 API 可以让 Scrollview 立即停止滚动 + */ + stopAutoScroll(): void; + /** + !#en Modify the content position. + !#zh 设置当前视图内容的坐标点。 + @param position The position in content's parent space. + */ + setContentPosition(position: Vec2): void; + /** + !#en Query the content's position in its parent space. + !#zh 获取当前视图内容的坐标点。 + */ + getContentPosition(): Vec2; + /** + !#en Query whether the user is currently dragging the ScrollView to scroll it + !#zh 用户是否在拖拽当前滚动视图 + */ + isScrolling(): boolean; + /** + !#en Query whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown. + !#zh 当前滚动视图是否在惯性滚动 + */ + isAutoScrolling(): boolean; + } + /** !#en The Slider Control + !#zh 滑动器组件 */ + export class Slider extends Component { + /** !#en The "handle" part of the slider + !#zh 滑动器滑块按钮部件 */ + handle: Button; + /** !#en The slider direction + !#zh 滑动器方向 */ + direction: Slider.Direction; + /** !#en The current progress of the slider. The valid value is between 0-1 + !#zh 当前进度值,该数值的区间是 0-1 之间 */ + progress: number; + /** !#en The slider slide events' callback array + !#zh 滑动器组件滑动事件回调函数数组 */ + slideEvents: Component.EventHandler[]; + } + /** !#en Renders a sprite in the scene. + !#zh 该组件用于在场景中渲染精灵。 */ + export class Sprite extends RenderComponent implements BlendFunc { + /** !#en The sprite frame of the sprite. + !#zh 精灵的精灵帧 */ + spriteFrame: SpriteFrame; + /** !#en The sprite render type. + !#zh 精灵渲染类型 */ + type: Sprite.Type; + /** !#en + The fill type, This will only have any effect if the "type" is set to “cc.Sprite.Type.FILLED”. + !#zh + 精灵填充类型,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。 */ + fillType: Sprite.FillType; + /** !#en + The fill Center, This will only have any effect if the "type" is set to “cc.Sprite.Type.FILLED”. + !#zh + 填充中心点,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。 */ + fillCenter: Vec2; + /** !#en + The fill Start, This will only have any effect if the "type" is set to “cc.Sprite.Type.FILLED”. + !#zh + 填充起始点,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。 */ + fillStart: number; + /** !#en + The fill Range, This will only have any effect if the "type" is set to “cc.Sprite.Type.FILLED”. + !#zh + 填充范围,仅渲染类型设置为 cc.Sprite.Type.FILLED 时有效。 */ + fillRange: number; + /** !#en specify the frame is trimmed or not. + !#zh 是否使用裁剪模式 */ + trim: boolean; + /** !#en specify the size tracing mode. + !#zh 精灵尺寸调整模式 */ + sizeMode: Sprite.SizeMode; + /** + Change the state of sprite. + @param state NORMAL or GRAY State. + */ + setState(state: Sprite.State): void; + /** + Gets the current state. + */ + getState(): Sprite.State; + /** !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost. + !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销 */ + srcBlendFactor: macro.BlendFactor; + /** !#en specify the destination Blend Factor. + !#zh 指定目标的混合模式 */ + dstBlendFactor: macro.BlendFactor; + } + /** !#en The toggle component is a CheckBox, when it used together with a ToggleGroup, it + could be treated as a RadioButton. + !#zh Toggle 是一个 CheckBox,当它和 ToggleGroup 一起使用的时候,可以变成 RadioButton。 */ + export class Toggle extends Button implements GraySpriteState { + /** !#en When this value is true, the check mark component will be enabled, otherwise + the check mark component will be disabled. + !#zh 如果这个设置为 true,则 check mark 组件会处于 enabled 状态,否则处于 disabled 状态。 */ + isChecked: boolean; + /** !#en The toggle group which the toggle belongs to, when it is null, the toggle is a CheckBox. + Otherwise, the toggle is a RadioButton. + !#zh Toggle 所属的 ToggleGroup,这个属性是可选的。如果这个属性为 null,则 Toggle 是一个 CheckBox, + 否则,Toggle 是一个 RadioButton。 */ + toggleGroup: ToggleGroup; + /** !#en The image used for the checkmark. + !#zh Toggle 处于选中状态时显示的图片 */ + checkMark: Sprite; + /** !#en If Toggle is clicked, it will trigger event's handler + !#zh Toggle 按钮的点击事件列表。 */ + checkEvents: Component.EventHandler[]; + /** + !#en Make the toggle button checked. + !#zh 使 toggle 按钮处于选中状态 + */ + check(): void; + /** + !#en Make the toggle button unchecked. + !#zh 使 toggle 按钮处于未选中状态 + */ + uncheck(): void; + /** !#en The normal material. + !#zh 正常状态的材质。 */ + normalMaterial: Material; + /** !#en The gray material. + !#zh 置灰状态的材质。 */ + grayMaterial: Material; + } + /** !#en ToggleContainer is not a visiable UI component but a way to modify the behavior of a set of Toggles.
+ Toggles that belong to the same group could only have one of them to be switched on at a time.
+ Note: All the first layer child node containing the toggle component will auto be added to the container + !#zh ToggleContainer 不是一个可见的 UI 组件,它可以用来修改一组 Toggle 组件的行为。
+ 当一组 Toggle 属于同一个 ToggleContainer 的时候,任何时候只能有一个 Toggle 处于选中状态。
+ 注意:所有包含 Toggle 组件的一级子节点都会自动被添加到该容器中 */ + export class ToggleContainer extends Component { + /** !#en If this setting is true, a toggle could be switched off and on when pressed. + If it is false, it will make sure there is always only one toggle could be switched on + and the already switched on toggle can't be switched off. + !#zh 如果这个设置为 true, 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。 */ + allowSwitchOff: boolean; + /** !#en If Toggle is clicked, it will trigger event's handler + !#zh Toggle 按钮的点击事件列表。 */ + checkEvents: Component.EventHandler[]; + /** !#en Read only property, return the toggle items array reference managed by ToggleContainer. + !#zh 只读属性,返回 ToggleContainer 管理的 toggle 数组引用 */ + toggleItems: Toggle[]; + } + /** !#en ToggleGroup is not a visiable UI component but a way to modify the behavior of a set of Toggles. + Toggles that belong to the same group could only have one of them to be switched on at a time. + !#zh ToggleGroup 不是一个可见的 UI 组件,它可以用来修改一组 Toggle 组件的行为。当一组 Toggle 属于同一个 ToggleGroup 的时候, + 任何时候只能有一个 Toggle 处于选中状态。 */ + export class ToggleGroup extends Component { + /** !#en If this setting is true, a toggle could be switched off and on when pressed. + If it is false, it will make sure there is always only one toggle could be switched on + and the already switched on toggle can't be switched off. + !#zh 如果这个设置为 true, 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。 */ + allowSwitchOff: boolean; + /** !#en Read only property, return the toggle items array reference managed by toggleGroup. + !#zh 只读属性,返回 toggleGroup 管理的 toggle 数组引用 */ + toggleItems: any[]; + } + /** !#en + Handling touch events in a ViewGroup takes special care, + because it's common for a ViewGroup to have children that are targets for different touch events than the ViewGroup itself. + To make sure that each view correctly receives the touch events intended for it, + ViewGroup should register capture phase event and handle the event propagation properly. + Please refer to Scrollview for more information. + + !#zh + ViewGroup的事件处理比较特殊,因为 ViewGroup 里面的子节点关心的事件跟 ViewGroup 本身可能不一样。 + 为了让子节点能够正确地处理事件,ViewGroup 需要注册 capture 阶段的事件,并且合理地处理 ViewGroup 之间的事件传递。 + 请参考 ScrollView 的实现来获取更多信息。 */ + export class ViewGroup extends Component { + } + /** !#en + Stores and manipulate the anchoring based on its parent. + Widget are used for GUI but can also be used for other things. + Widget will adjust current node's position and size automatically, but the results after adjustment can not be obtained until the next frame unless you call {{#crossLink "Widget/updateAlignment:method"}}{{/crossLink}} manually. + !#zh + Widget 组件,用于设置和适配其相对于父节点的边距,Widget 通常被用于 UI 界面,也可以用于其他地方。 + Widget 会自动调整当前节点的坐标和宽高,不过目前调整后的结果要到下一帧才能在脚本里获取到,除非你先手动调用 {{#crossLink "Widget/updateAlignment:method"}}{{/crossLink}}。 */ + export class Widget extends Component { + /** !#en Specifies an alignment target that can only be one of the parent nodes of the current node. + The default value is null, and when null, indicates the current parent. + !#zh 指定一个对齐目标,只能是当前节点的其中一个父节点,默认为空,为空时表示当前父节点。 */ + target: Node; + /** !#en Whether to align the top. + !#zh 是否对齐上边。 */ + isAlignTop: boolean; + /** !#en + Vertically aligns the midpoint, This will open the other vertical alignment options cancel. + !#zh + 是否垂直方向对齐中点,开启此项会将垂直方向其他对齐选项取消。 */ + isAlignVerticalCenter: boolean; + /** !#en Whether to align the bottom. + !#zh 是否对齐下边。 */ + isAlignBottom: boolean; + /** !#en Whether to align the left. + !#zh 是否对齐左边 */ + isAlignLeft: boolean; + /** !#en + Horizontal aligns the midpoint. This will open the other horizontal alignment options canceled. + !#zh + 是否水平方向对齐中点,开启此选项会将水平方向其他对齐选项取消。 */ + isAlignHorizontalCenter: boolean; + /** !#en Whether to align the right. + !#zh 是否对齐右边。 */ + isAlignRight: boolean; + /** !#en + Whether the stretched horizontally, when enable the left and right alignment will be stretched horizontally, + the width setting is invalid (read only). + !#zh + 当前是否水平拉伸。当同时启用左右对齐时,节点将会被水平拉伸,此时节点的宽度只读。 */ + isStretchWidth: boolean; + /** !#en + Whether the stretched vertically, when enable the left and right alignment will be stretched vertically, + then height setting is invalid (read only) + !#zh + 当前是否垂直拉伸。当同时启用上下对齐时,节点将会被垂直拉伸,此时节点的高度只读。 */ + isStretchHeight: boolean; + /** !#en + The margins between the top of this node and the top of parent node, + the value can be negative, Only available in 'isAlignTop' open. + !#zh + 本节点顶边和父节点顶边的距离,可填写负值,只有在 isAlignTop 开启时才有作用。 */ + top: number; + /** !#en + The margins between the bottom of this node and the bottom of parent node, + the value can be negative, Only available in 'isAlignBottom' open. + !#zh + 本节点底边和父节点底边的距离,可填写负值,只有在 isAlignBottom 开启时才有作用。 */ + bottom: number; + /** !#en + The margins between the left of this node and the left of parent node, + the value can be negative, Only available in 'isAlignLeft' open. + !#zh + 本节点左边和父节点左边的距离,可填写负值,只有在 isAlignLeft 开启时才有作用。 */ + left: number; + /** !#en + The margins between the right of this node and the right of parent node, + the value can be negative, Only available in 'isAlignRight' open. + !#zh + 本节点右边和父节点右边的距离,可填写负值,只有在 isAlignRight 开启时才有作用。 */ + right: number; + /** !#en + Horizontal aligns the midpoint offset value, + the value can be negative, Only available in 'isAlignHorizontalCenter' open. + !#zh 水平居中的偏移值,可填写负值,只有在 isAlignHorizontalCenter 开启时才有作用。 */ + horizontalCenter: number; + /** !#en + Vertical aligns the midpoint offset value, + the value can be negative, Only available in 'isAlignVerticalCenter' open. + !#zh 垂直居中的偏移值,可填写负值,只有在 isAlignVerticalCenter 开启时才有作用。 */ + verticalCenter: number; + /** !#en If true, horizontalCenter is pixel margin, otherwise is percentage (0 - 1) margin. + !#zh 如果为 true,"horizontalCenter" 将会以像素作为偏移值,反之为百分比(0 到 1)。 */ + isAbsoluteHorizontalCenter: boolean; + /** !#en If true, verticalCenter is pixel margin, otherwise is percentage (0 - 1) margin. + !#zh 如果为 true,"verticalCenter" 将会以像素作为偏移值,反之为百分比(0 到 1)。 */ + isAbsoluteVerticalCenter: boolean; + /** !#en + If true, top is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's height. + !#zh + 如果为 true,"top" 将会以像素作为边距,否则将会以相对父物体高度的百分比(0 到 1)作为边距。 */ + isAbsoluteTop: boolean; + /** !#en + If true, bottom is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's height. + !#zh + 如果为 true,"bottom" 将会以像素作为边距,否则将会以相对父物体高度的百分比(0 到 1)作为边距。 */ + isAbsoluteBottom: boolean; + /** !#en + If true, left is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's width. + !#zh + 如果为 true,"left" 将会以像素作为边距,否则将会以相对父物体宽度的百分比(0 到 1)作为边距。 */ + isAbsoluteLeft: boolean; + /** !#en + If true, right is pixel margin, otherwise is percentage (0 - 1) margin relative to the parent's width. + !#zh + 如果为 true,"right" 将会以像素作为边距,否则将会以相对父物体宽度的百分比(0 到 1)作为边距。 */ + isAbsoluteRight: boolean; + /** !#en Specifies the alignment mode of the Widget, which determines when the widget should refresh. + !#zh 指定 Widget 的对齐模式,用于决定 Widget 应该何时刷新。 */ + alignMode: Widget.AlignMode; + /** + !#en + Immediately perform the widget alignment. You need to manually call this method only if + you need to get the latest results after the alignment before the end of current frame. + !#zh + 立刻执行 widget 对齐操作。这个接口一般不需要手工调用。 + 只有当你需要在当前帧结束前获得 widget 对齐后的最新结果时才需要手动调用这个方法。 + + @example + ```js + widget.top = 10; // change top margin + cc.log(widget.node.y); // not yet changed + widget.updateAlignment(); + cc.log(widget.node.y); // changed + ``` + */ + updateAlignment(): void; + /** !#en + When turned on, it will only be aligned once at the end of the onEnable frame, + then immediately disables the current component. + This will allow the script or animation to continue controlling the current node. + Note: It will still be aligned at the frame when onEnable is called. + !#zh + 开启后仅会在 onEnable 的当帧结束时对齐一次,然后立刻禁用当前组件。 + 这样便于脚本或动画继续控制当前节点。 + 注意:onEnable 时所在的那一帧仍然会进行对齐。 */ + isAlignOnce: boolean; + } + /** !#en SubContextView is a view component which controls open data context viewport in minigame platform.
+ The component's node size decide the viewport of the sub context content in main context, + the entire sub context texture will be scaled to the node's bounding box area.
+ This component provides multiple important features:
+ 1. Sub context could use its own resolution size and policy.
+ 2. Sub context could be minized to smallest size it needed.
+ 3. Resolution of sub context content could be increased.
+ 4. User touch input is transformed to the correct viewport.
+ 5. Texture update is handled by this component. User don't need to worry.
+ One important thing to be noted, whenever the node's bounding box change, + !#zh SubContextView 可以用来控制小游戏平台开放数据域在主域中的视窗的位置。
+ 这个组件的节点尺寸决定了开放数据域内容在主域中的尺寸,整个开放数据域会被缩放到节点的包围盒范围内。
+ 在这个组件的控制下,用户可以更自由得控制开放数据域:
+ 1. 子域中可以使用独立的设计分辨率和适配模式
+ 2. 子域区域尺寸可以缩小到只容纳内容即可
+ 3. 子域的分辨率也可以被放大,以便获得更清晰的显示效果
+ 4. 用户输入坐标会被自动转换到正确的子域视窗中
+ 5. 子域内容贴图的更新由组件负责,用户不需要处理
*/ + export class SubContextView extends Component { + /** + !#en Reset open data context size and viewport + !#zh 重置开放数据域的尺寸和视窗 + */ + reset(): void; + /** + !#en Update the sub context viewport manually, it should be called whenever the node's bounding box changes. + !#zh 更新开放数据域相对于主域的 viewport,这个函数应该在节点包围盒改变时手动调用。 + */ + updateSubContextViewport(): void; + } + /** !#en WXSubContextView is deprecated since v2.4.1, please use SubContextView instead. + !#zh 自 v2.4.1 起,WXSubContextView 已经废弃,请使用 SubContextView */ + export class WXSubContextView extends Component { + } + /** !#en SwanSubContextView is deprecated since v2.4.1, please use SubContextView instead. + !#zh 自 v2.4.1 起,SwanSubContextView 已经废弃,请使用 SubContextView */ + export class SwanSubContextView extends Component { + } + /** !#en The touch event class + !#zh 封装了触摸相关的信息。 */ + export class Touch { + /** + !#en Returns the current touch location in OpenGL coordinates.、 + !#zh 获取当前触点位置。 + */ + getLocation(): Vec2; + /** + !#en Returns X axis location value. + !#zh 获取当前触点 X 轴位置。 + */ + getLocationX(): number; + /** + !#en Returns Y axis location value. + !#zh 获取当前触点 Y 轴位置。 + */ + getLocationY(): number; + /** + !#en Returns the previous touch location in OpenGL coordinates. + !#zh 获取触点在上一次事件时的位置对象,对象包含 x 和 y 属性。 + */ + getPreviousLocation(): Vec2; + /** + !#en Returns the start touch location in OpenGL coordinates. + !#zh 获取触点落下时的位置对象,对象包含 x 和 y 属性。 + */ + getStartLocation(): Vec2; + /** + !#en Returns the delta distance from the previous touche to the current one in screen coordinates. + !#zh 获取触点距离上一次事件移动的距离对象,对象包含 x 和 y 属性。 + */ + getDelta(): Vec2; + /** + !#en Returns the current touch location in screen coordinates. + !#zh 获取当前事件在游戏窗口内的坐标位置对象,对象包含 x 和 y 属性。 + */ + getLocationInView(): Vec2; + /** + !#en Returns the previous touch location in screen coordinates. + !#zh 获取触点在上一次事件时在游戏窗口中的位置对象,对象包含 x 和 y 属性。 + */ + getPreviousLocationInView(): Vec2; + /** + !#en Returns the start touch location in screen coordinates. + !#zh 获取触点落下时在游戏窗口中的位置对象,对象包含 x 和 y 属性。 + */ + getStartLocationInView(): Vec2; + /** + !#en Returns the id of cc.Touch. + !#zh 触点的标识 ID,可以用来在多点触摸中跟踪触点。 + */ + getID(): number; + /** + !#en Sets information to touch. + !#zh 设置触摸相关的信息。用于监控触摸事件。 + @param id id + @param x x + @param y y + */ + setTouchInfo(id: number, x: number, y: number): void; + } + /** undefined */ + export class Graphics extends RenderComponent { + /** !#en + Current line width. + !#zh + 当前线条宽度 */ + lineWidth: number; + /** !#en + lineJoin determines how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together. + !#zh + lineJoin 用来设置2个长度不为0的相连部分(线段,圆弧,曲线)如何连接在一起的属性。 */ + lineJoin: Graphics.LineJoin; + /** !#en + lineCap determines how the end points of every line are drawn. + !#zh + lineCap 指定如何绘制每一条线段末端。 */ + lineCap: Graphics.LineCap; + /** !#en + stroke color + !#zh + 线段颜色 */ + strokeColor: Color; + /** !#en + fill color + !#zh + 填充颜色 */ + fillColor: Color; + /** !#en + Sets the miter limit ratio + !#zh + 设置斜接面限制比例 */ + miterLimit: number; + /** + !#en Move path start point to (x,y). + !#zh 移动路径起点到坐标(x, y) + @param x The x axis of the coordinate for the end point. + @param y The y axis of the coordinate for the end point. + */ + moveTo(x?: number, y?: number): void; + /** + !#en Adds a straight line to the path + !#zh 绘制直线路径 + @param x The x axis of the coordinate for the end point. + @param y The y axis of the coordinate for the end point. + */ + lineTo(x?: number, y?: number): void; + /** + !#en Adds a cubic Bézier curve to the path + !#zh 绘制三次贝赛尔曲线路径 + @param c1x The x axis of the coordinate for the first control point. + @param c1y The y axis of the coordinate for first control point. + @param c2x The x axis of the coordinate for the second control point. + @param c2y The y axis of the coordinate for the second control point. + @param x The x axis of the coordinate for the end point. + @param y The y axis of the coordinate for the end point. + */ + bezierCurveTo(c1x?: number, c1y?: number, c2x?: number, c2y?: number, x?: number, y?: number): void; + /** + !#en Adds a quadratic Bézier curve to the path + !#zh 绘制二次贝赛尔曲线路径 + @param cx The x axis of the coordinate for the control point. + @param cy The y axis of the coordinate for the control point. + @param x The x axis of the coordinate for the end point. + @param y The y axis of the coordinate for the end point. + */ + quadraticCurveTo(cx?: number, cy?: number, x?: number, y?: number): void; + /** + !#en Adds an arc to the path which is centered at (cx, cy) position with radius r starting at startAngle and ending at endAngle going in the given direction by counterclockwise (defaulting to false). + !#zh 绘制圆弧路径。圆弧路径的圆心在 (cx, cy) 位置,半径为 r ,根据 counterclockwise (默认为false)指定的方向从 startAngle 开始绘制,到 endAngle 结束。 + @param cx The x axis of the coordinate for the center point. + @param cy The y axis of the coordinate for the center point. + @param r The arc's radius. + @param startAngle The angle at which the arc starts, measured clockwise from the positive x axis and expressed in radians. + @param endAngle The angle at which the arc ends, measured clockwise from the positive x axis and expressed in radians. + @param counterclockwise An optional Boolean which, if true, causes the arc to be drawn counter-clockwise between the two angles. By default it is drawn clockwise. + */ + arc(cx?: number, cy?: number, r?: number, startAngle?: number, endAngle?: number, counterclockwise?: boolean): void; + /** + !#en Adds an ellipse to the path. + !#zh 绘制椭圆路径。 + @param cx The x axis of the coordinate for the center point. + @param cy The y axis of the coordinate for the center point. + @param rx The ellipse's x-axis radius. + @param ry The ellipse's y-axis radius. + */ + ellipse(cx?: number, cy?: number, rx?: number, ry?: number): void; + /** + !#en Adds an circle to the path. + !#zh 绘制圆形路径。 + @param cx The x axis of the coordinate for the center point. + @param cy The y axis of the coordinate for the center point. + @param r The circle's radius. + */ + circle(cx?: number, cy?: number, r?: number): void; + /** + !#en Adds an rectangle to the path. + !#zh 绘制矩形路径。 + @param x The x axis of the coordinate for the rectangle starting point. + @param y The y axis of the coordinate for the rectangle starting point. + @param w The rectangle's width. + @param h The rectangle's height. + */ + rect(x?: number, y?: number, w?: number, h?: number): void; + /** + !#en Adds an round corner rectangle to the path. + !#zh 绘制圆角矩形路径。 + @param x The x axis of the coordinate for the rectangle starting point. + @param y The y axis of the coordinate for the rectangle starting point. + @param w The rectangles width. + @param h The rectangle's height. + @param r The radius of the rectangle. + */ + roundRect(x?: number, y?: number, w?: number, h?: number, r?: number): void; + /** + !#en Draws a filled rectangle. + !#zh 绘制填充矩形。 + @param x The x axis of the coordinate for the rectangle starting point. + @param y The y axis of the coordinate for the rectangle starting point. + @param w The rectangle's width. + @param h The rectangle's height. + */ + fillRect(x?: number, y?: number, w?: number, h?: number): void; + /** + !#en Erasing any previously drawn content. + !#zh 擦除之前绘制的所有内容的方法。 + @param clean Whether to clean the graphics inner cache. + */ + clear(clean?: boolean): void; + /** + !#en Causes the point of the pen to move back to the start of the current path. It tries to add a straight line from the current point to the start. + !#zh 将笔点返回到当前路径起始点的。它尝试从当前点到起始点绘制一条直线。 + */ + close(): void; + /** + !#en Strokes the current or given path with the current stroke style. + !#zh 根据当前的画线样式,绘制当前或已经存在的路径。 + */ + stroke(): void; + /** + !#en Fills the current or given path with the current fill style. + !#zh 根据当前的画线样式,填充当前或已经存在的路径。 + */ + fill(): void; + } + /** !#en + Camera is usefull when making reel game or other games which need scroll screen. + Using camera will be more efficient than moving node to scroll screen. + Camera + !#zh + 摄像机在制作卷轴或是其他需要移动屏幕的游戏时比较有用,使用摄像机将会比移动节点来移动屏幕更加高效。 */ + export class Camera extends Component { + /** !#en + The camera zoom ratio, only support 2D camera. + !#zh + 摄像机缩放比率, 只支持 2D camera。 */ + zoomRatio: number; + /** !#en + Field of view. The width of the Camera’s view angle, measured in degrees along the local Y axis. + !#zh + 决定摄像机视角的宽度,当摄像机处于透视投影模式下这个属性才会生效。 */ + fov: number; + /** !#en + The viewport size of the Camera when set to orthographic projection. + !#zh + 摄像机在正交投影模式下的视窗大小。 */ + orthoSize: number; + /** !#en + The near clipping plane. + !#zh + 摄像机的近剪裁面。 */ + nearClip: number; + /** !#en + The far clipping plane. + !#zh + 摄像机的远剪裁面。 */ + farClip: number; + /** !#en + Is the camera orthographic (true) or perspective (false)? + !#zh + 设置摄像机的投影模式是正交还是透视模式。 */ + ortho: boolean; + /** !#en + Four values (0 ~ 1) that indicate where on the screen this camera view will be drawn. + !#zh + 决定摄像机绘制在屏幕上哪个位置,值为(0 ~ 1)。 */ + rect: Rect; + /** !#en + This is used to render parts of the scene selectively. + !#zh + 决定摄像机会渲染场景的哪一部分。 */ + cullingMask: number; + /** !#en + Determining what to clear when camera rendering. + !#zh + 决定摄像机渲染时会清除哪些状态。 */ + clearFlags: Camera.ClearFlags; + /** !#en + The color with which the screen will be cleared. + !#zh + 摄像机用于清除屏幕的背景色。 */ + backgroundColor: Color; + /** !#en + Camera's depth in the camera rendering order. Cameras with higher depth are rendered after cameras with lower depth. + !#zh + 摄像机深度。用于决定摄像机的渲染顺序,值越大渲染在越上层。 */ + depth: number; + /** !#en + Destination render texture. + Usually cameras render directly to screen, but for some effects it is useful to make a camera render into a texture. + !#zh + 摄像机渲染的目标 RenderTexture。 + 一般摄像机会直接渲染到屏幕上,但是有一些效果可以使用摄像机渲染到 RenderTexture 上再对 RenderTexture 进行处理来实现。 */ + targetTexture: RenderTexture; + /** !#en + Sets the camera's render stages. + !#zh + 设置摄像机渲染的阶段 */ + renderStages: number; + /** !#en Whether auto align camera viewport to screen + !#zh 是否自动将摄像机的视口对准屏幕 */ + alignWithScreen: boolean; + /** !#en + The primary camera in the scene. Returns the rear most rendered camera, which is the camera with the lowest depth. + !#zh + 当前场景中激活的主摄像机。将会返回渲染在屏幕最底层,也就是 depth 最小的摄像机。 */ + static main: Camera; + /** !#en + All enabled cameras. + !#zh + 当前激活的所有摄像机。 */ + static cameras: Camera[]; + /** + !#en + Get the first camera which the node belong to. + !#zh + 获取节点所在的第一个摄像机。 + @param node node + */ + static findCamera(node: Node): Camera; + /** + !#en + Get the screen to world matrix, only support 2D camera which alignWithScreen is true. + !#zh + 获取屏幕坐标系到世界坐标系的矩阵,只适用于 alignWithScreen 为 true 的 2D 摄像机。 + @param out the matrix to receive the result + */ + getScreenToWorldMatrix2D(out: Mat4): Mat4; + /** + !#en + Get the world to camera matrix, only support 2D camera which alignWithScreen is true. + !#zh + 获取世界坐标系到摄像机坐标系的矩阵,只适用于 alignWithScreen 为 true 的 2D 摄像机。 + @param out the matrix to receive the result + */ + getWorldToScreenMatrix2D(out: Mat4): Mat4; + /** + !#en + Convert point from screen to world. + !#zh + 将坐标从屏幕坐标系转换到世界坐标系。 + @param screenPosition screenPosition + @param out out + */ + getScreenToWorldPoint(screenPosition: Vec3|Vec2, out?: Vec3|Vec2): Vec3; + /** + !#en + Convert point from world to screen. + !#zh + 将坐标从世界坐标系转化到屏幕坐标系。 + @param worldPosition worldPosition + @param out out + */ + getWorldToScreenPoint(worldPosition: Vec3|Vec2, out?: Vec3|Vec2): Vec3; + /** + !#en + Get a ray from screen position + !#zh + 从屏幕坐标获取一条射线 + @param screenPos screenPos + */ + getRay(screenPos: Vec2): geomUtils.Ray; + /** + !#en + Check whether the node is in the camera. + !#zh + 检测节点是否被此摄像机影响 + @param node the node which need to check + */ + containsNode(node: Node): boolean; + /** + !#en + Render the camera manually. + !#zh + 手动渲染摄像机。 + @param rootNode rootNode + */ + render(rootNode?: Node): void; + /** + !#en + Returns the matrix that transform the node's (local) space coordinates into the camera's space coordinates. + !#zh + 返回一个将节点坐标系转换到摄像机坐标系下的矩阵 + @param node the node which should transform + */ + getNodeToCameraTransform(node: Node): AffineTransform; + /** + !#en + Conver a camera coordinates point to world coordinates. + !#zh + 将一个摄像机坐标系下的点转换到世界坐标系下。 + @param point the point which should transform + @param out the point to receive the result + */ + getCameraToWorldPoint(point: Vec2, out?: Vec2): Vec2; + /** + !#en + Conver a world coordinates point to camera coordinates. + !#zh + 将一个世界坐标系下的点转换到摄像机坐标系下。 + @param point point + @param out the point to receive the result + */ + getWorldToCameraPoint(point: Vec2, out?: Vec2): Vec2; + /** + !#en + Get the camera to world matrix + !#zh + 获取摄像机坐标系到世界坐标系的矩阵 + @param out the matrix to receive the result + */ + getCameraToWorldMatrix(out: Mat4): Mat4; + /** + !#en + Get the world to camera matrix + !#zh + 获取世界坐标系到摄像机坐标系的矩阵 + @param out the matrix to receive the result + */ + getWorldToCameraMatrix(out: Mat4): Mat4; + } + /** !#en Mesh Asset. + !#zh 网格资源。 */ + export class Mesh extends Asset implements EventTarget { + /** !#en Get ir set the sub meshes. + !#zh 设置或者获取子网格。 */ + subMeshes: InputAssembler[]; + /** + !#en + Init vertex buffer according to the vertex format. + !#zh + 根据顶点格式初始化顶点内存。 + @param vertexFormat vertex format + @param vertexCount how much vertex should be create in this buffer. + @param dynamic whether or not to use dynamic buffer. + @param index index + */ + init(vertexFormat: gfx.VertexFormat, vertexCount: number, dynamic?: boolean, index?: boolean): void; + /** + !#en + Set the vertex values. + !#zh + 设置顶点数据 + @param name the attribute name, e.g. gfx.ATTR_POSITION + @param values the vertex values + */ + setVertices(name: string, values: Vec2[]|Vec3[]|Color[]|number[]|Uint8Array|Float32Array): void; + /** + !#en + Set the sub mesh indices. + !#zh + 设置子网格索引。 + @param indices the sub mesh indices. + @param index sub mesh index. + @param dynamic whether or not to use dynamic buffer. + */ + setIndices(indices: number[]|Uint16Array|Uint8Array, index?: number, dynamic?: boolean): void; + /** + !#en + Set the sub mesh primitive type. + !#zh + 设置子网格绘制线条的方式。 + @param type type + @param index index + */ + setPrimitiveType(type: number, index: number): void; + /** + !#en + Clear the buffer data. + !#zh + 清除网格创建的内存数据。 + */ + clear(): void; + /** + !#en Set mesh bounding box + !#zh 设置网格的包围盒 + @param min min + @param max max + */ + setBoundingBox(min: Vec3, max: Vec3): void; + /** + !#en Read the specified attributes of the subgrid into the target buffer. + !#zh 读取子网格的指定属性到目标缓冲区中。 + @param primitiveIndex The subgrid index. + @param attributeName attribute name. + @param buffer The target buffer. + @param stride The byte interval between adjacent attributes in the target buffer. + @param offset The offset of the first attribute in the target buffer. + */ + copyAttribute(primitiveIndex: number, attributeName: string, buffer: ArrayBuffer, stride: number, offset: number): boolean; + /** + !#en Read the index data of the subgrid into the target array. + !#zh 读取子网格的索引数据到目标数组中。 + @param primitiveIndex The subgrid index. + @param outputArray The target array. + */ + copyIndices(primitiveIndex: number, outputArray: DataView): boolean; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + } + /** !#en + Mesh Renderer Component + !#zh + 网格渲染组件 */ + export class MeshRenderer extends RenderComponent { + /** !#en + The mesh which the renderer uses. + !#zh + 设置使用的网格 */ + mesh: Mesh; + /** !#en + Whether the mesh should receive shadows. + !#zh + 网格是否接受光源投射的阴影 */ + receiveShadows: boolean; + /** !#en + Shadow Casting Mode + !#zh + 网格投射阴影的模式 */ + shadowCastingMode: MeshRenderer.ShadowCastingMode; + /** !#en + Enable auto merge mesh, only support when mesh's VertexFormat, PrimitiveType, materials are all the same + !#zh + 开启自动合并 mesh 功能,只有在网格的 顶点格式,PrimitiveType, 使用的材质 都一致的情况下才会有效 */ + enableAutoBatch: boolean; + } + /** The class BufferRange denotes a range of the buffer. */ + export class BufferRange { + /** The offset of the range. */ + offset: number; + /** The length of the range. */ + length: number; + } + /** undefined */ + export class VertexFormat { + /** The data range of this bundle. + This range of data is essentially mapped to a GPU vertex buffer. */ + data: BufferRange; + /** The attribute formats. */ + formats: VertexFormat; + /** The vertex bundle that the primitive use. */ + vertexBundleIndices: number[]; + /** The data range of the primitive. + This range of data is essentially mapped to a GPU indices buffer. */ + data: BufferRange; + /** The type of this primitive's indices. */ + indexUnit: number; + /** The primitive's topology. */ + topology: number; + } + /** undefined */ + export class WorldManifold { + /** !#en + world contact point (point of intersection) + !#zh + 碰撞点集合 */ + points: Vec2[]; + /** !#en + world vector pointing from A to B + !#zh + 世界坐标系下由 A 指向 B 的向量 */ + normal: Vec2; + } + /** !#en + A manifold point is a contact point belonging to a contact manifold. + It holds details related to the geometry and dynamics of the contact points. + Note: the impulses are used for internal caching and may not + provide reliable contact forces, especially for high speed collisions. + !#zh + ManifoldPoint 是接触信息中的接触点信息。它拥有关于几何和接触点的详细信息。 + 注意:信息中的冲量用于系统内部缓存,提供的接触力可能不是很准确,特别是高速移动中的碰撞信息。 */ + export class ManifoldPoint { + /** !#en + The local point usage depends on the manifold type: + -e_circles: the local center of circleB + -e_faceA: the local center of circleB or the clip point of polygonB + -e_faceB: the clip point of polygonA + !#zh + 本地坐标点的用途取决于 manifold 的类型 + - e_circles: circleB 的本地中心点 + - e_faceA: circleB 的本地中心点 或者是 polygonB 的截取点 + - e_faceB: polygonB 的截取点 */ + localPoint: Vec2; + /** !#en + Normal impulse. + !#zh + 法线冲量。 */ + normalImpulse: number; + /** !#en + Tangent impulse. + !#zh + 切线冲量。 */ + tangentImpulse: number; + } + /** undefined */ + export class Manifold { + /** !#en + Manifold type : 0: e_circles, 1: e_faceA, 2: e_faceB + !#zh + Manifold 类型 : 0: e_circles, 1: e_faceA, 2: e_faceB */ + type: number; + /** !#en + The local point usage depends on the manifold type: + -e_circles: the local center of circleA + -e_faceA: the center of faceA + -e_faceB: the center of faceB + !#zh + 用途取决于 manifold 类型 + -e_circles: circleA 的本地中心点 + -e_faceA: faceA 的本地中心点 + -e_faceB: faceB 的本地中心点 */ + localPoint: Vec2; + /** !#en + -e_circles: not used + -e_faceA: the normal on polygonA + -e_faceB: the normal on polygonB + !#zh + -e_circles: 没被使用到 + -e_faceA: polygonA 的法向量 + -e_faceB: polygonB 的法向量 */ + localNormal: Vec2; + /** !#en + the points of contact. + !#zh + 接触点信息。 */ + points: ManifoldPoint[]; + } + /** !#en + Contact impulses for reporting. + !#zh + 用于返回给回调的接触冲量。 */ + export class PhysicsImpulse { + /** !#en + Normal impulses. + !#zh + 法线方向的冲量 */ + normalImpulses: any; + /** !#en + Tangent impulses + !#zh + 切线方向的冲量 */ + tangentImpulses: any; + } + /** !#en + PhysicsContact will be generated during begin and end collision as a parameter of the collision callback. + Note that contacts will be reused for speed up cpu time, so do not cache anything in the contact. + !#zh + 物理接触会在开始和结束碰撞之间生成,并作为参数传入到碰撞回调函数中。 + 注意:传入的物理接触会被系统进行重用,所以不要在使用中缓存里面的任何信息。 */ + export class PhysicsContact { + /** + !#en + Get the world manifold. + !#zh + 获取世界坐标系下的碰撞信息。 + */ + getWorldManifold(): WorldManifold; + /** + !#en + Get the manifold. + !#zh + 获取本地(局部)坐标系下的碰撞信息。 + */ + getManifold(): Manifold; + /** + !#en + Get the impulses. + Note: PhysicsImpulse can only used in onPostSolve callback. + !#zh + 获取冲量信息 + 注意:这个信息只有在 onPostSolve 回调中才能获取到 + */ + getImpulse(): PhysicsImpulse; + /** !#en + One of the collider that collided + !#zh + 发生碰撞的碰撞体之一 */ + colliderA: Collider; + /** !#en + One of the collider that collided + !#zh + 发生碰撞的碰撞体之一 */ + colliderB: Collider; + /** !#en + If set disabled to true, the contact will be ignored until contact end. + If you just want to disabled contact for current time step or sub-step, please use disabledOnce. + !#zh + 如果 disabled 被设置为 true,那么直到接触结束此接触都将被忽略。 + 如果只是希望在当前时间步或子步中忽略此接触,请使用 disabledOnce 。 */ + disabled: boolean; + /** !#en + Disabled contact for current time step or sub-step. + !#zh + 在当前时间步或子步中忽略此接触。 */ + disabledOnce: boolean; + /** + !#en + Is this contact touching? + !#zh + 返回碰撞体是否已经接触到。 + */ + isTouching(): boolean; + /** + !#en + Set the desired tangent speed for a conveyor belt behavior. + !#zh + 为传送带设置期望的切线速度 + @param tangentSpeed tangentSpeed + */ + setTangentSpeed(tangentSpeed: number): void; + /** + !#en + Get the desired tangent speed. + !#zh + 获取切线速度 + */ + getTangentSpeed(): number; + /** + !#en + Override the default friction mixture. You can call this in onPreSolve callback. + !#zh + 覆盖默认的摩擦力系数。你可以在 onPreSolve 回调中调用此函数。 + @param friction friction + */ + setFriction(friction: number): void; + /** + !#en + Get the friction. + !#zh + 获取当前摩擦力系数 + */ + getFriction(): number; + /** + !#en + Reset the friction mixture to the default value. + !#zh + 重置摩擦力系数到默认值 + */ + resetFriction(): void; + /** + !#en + Override the default restitution mixture. You can call this in onPreSolve callback. + !#zh + 覆盖默认的恢复系数。你可以在 onPreSolve 回调中调用此函数。 + @param restitution restitution + */ + setRestitution(restitution: number): void; + /** + !#en + Get the restitution. + !#zh + 获取当前恢复系数 + */ + getRestitution(): number; + /** + !#en + Reset the restitution mixture to the default value. + !#zh + 重置恢复系数到默认值 + */ + resetRestitution(): void; + } + /** !#en + Physics manager uses box2d as the inner physics system, and hide most box2d implement details(creating rigidbody, synchronize rigidbody info to node). + You can visit some common box2d function through physics manager(hit testing, raycast, debug info). + Physics manager distributes the collision information to each collision callback when collision is produced. + Note: You need first enable the collision listener in the rigidbody. + !#zh + 物理系统将 box2d 作为内部物理系统,并且隐藏了大部分 box2d 实现细节(比如创建刚体,同步刚体信息到节点中等)。 + 你可以通过物理系统访问一些 box2d 常用的功能,比如点击测试,射线测试,设置测试信息等。 + 物理系统还管理碰撞信息的分发,她会在产生碰撞时,将碰撞信息分发到各个碰撞回调中。 + 注意:你需要先在刚体中开启碰撞接听才会产生相应的碰撞回调。
+ 支持的物理系统指定绘制信息事件,请参阅 {{#crossLink "PhysicsManager.DrawBits"}}{{/crossLink}} */ + export class PhysicsManager implements EventTarget { + /** !#en + The ratio transform between physics unit and pixel unit, generally is 32. + !#zh + 物理单位与像素单位互相转换的比率,一般是 32。 */ + static PTM_RATIO: number; + /** !#en + The velocity iterations for the velocity constraint solver. + !#zh + 速度更新迭代数 */ + static VELOCITY_ITERATIONS: number; + /** !#en + The position Iterations for the position constraint solver. + !#zh + 位置迭代更新数 */ + static POSITION_ITERATIONS: number; + /** !#en + Specify the fixed time step. + Need enabledAccumulator to make it work. + !#zh + 指定固定的物理更新间隔时间,需要开启 enabledAccumulator 才有效。 */ + static FIXED_TIME_STEP: number; + /** !#en + Specify the max accumulator time. + Need enabledAccumulator to make it work. + !#zh + 每次可用于更新物理系统的最大时间,需要开启 enabledAccumulator 才有效。 */ + static MAX_ACCUMULATOR: number; + /** !#en + If enabled accumulator, then will call step function with the fixed time step FIXED_TIME_STEP. + And if the update dt is bigger than the time step, then will call step function several times. + If disabled accumulator, then will call step function with a time step calculated with the frame rate. + !#zh + 如果开启此选项,那么将会以固定的间隔时间 FIXED_TIME_STEP 来更新物理引擎,如果一个 update 的间隔时间大于 FIXED_TIME_STEP,则会对物理引擎进行多次更新。 + 如果关闭此选项,那么将会根据设定的 frame rate 计算出一个间隔时间来更新物理引擎。 */ + enabledAccumulator: boolean; + /** + !#en + Test which collider contains the given world point + !#zh + 获取包含给定世界坐标系点的碰撞体 + @param point the world point + */ + testPoint(point: Vec2): PhysicsCollider; + /** + !#en + Test which colliders intersect the given world rect + !#zh + 获取与给定世界坐标系矩形相交的碰撞体 + @param rect the world rect + */ + testAABB(rect: Rect): PhysicsCollider[]; + /** + !#en + Raycast the world for all colliders in the path of the ray. + The raycast ignores colliders that contain the starting point. + !#zh + 检测哪些碰撞体在给定射线的路径上,射线检测将忽略包含起始点的碰撞体。 + @param p1 start point of the raycast + @param p2 end point of the raycast + @param type optional, default is RayCastType.Closest + */ + rayCast(p1: Vec2, p2: Vec2, type: RayCastType): PhysicsRayCastResult[]; + /** !#en + Enabled the physics manager? + !#zh + 指定是否启用物理系统? */ + enabled: boolean; + /** !#en + Debug draw flags. + !#zh + 设置调试绘制标志 */ + debugDrawFlags: number; + /** !#en + The physics world gravity. + !#zh + 物理世界重力值 */ + gravity: Vec2; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** undefined */ + export class PhysicsRayCastResult { + /** !#en + The PhysicsCollider which intersects with the raycast + !#zh + 与射线相交的碰撞体 */ + collider: PhysicsCollider; + /** !#en + The intersection point + !#zh + 射线与碰撞体相交的点 */ + point: Vec2; + /** !#en + The normal vector at the point of intersection + !#zh + 射线与碰撞体相交的点的法向量 */ + normal: Vec2; + /** !#en + The fraction of the raycast path at the point of intersection + !#zh + 射线与碰撞体相交的点占射线长度的分数 */ + fraction: number; + } + /** !#en Enum for RigidBodyType. + !#zh 刚体类型 */ + export enum RigidBodyType { + Static = 0, + Kinematic = 0, + Dynamic = 0, + Animated = 0, + } + /** !#en Enum for RayCastType. + !#zh 射线检测类型 */ + export enum RayCastType { + Closest = 0, + Any = 0, + AllClosest = 0, + All = 0, + } + /** undefined */ + export class RigidBody extends Component { + /** !#en + Should enabled contact listener? + When a collision is trigger, the collision callback will only be called when enabled contact listener. + !#zh + 是否启用接触接听器。 + 当 collider 产生碰撞时,只有开启了接触接听器才会调用相应的回调函数 */ + enabledContactListener: boolean; + /** + !#en + Collision callback. + Called when two collider begin to touch. + !#zh + 碰撞回调。 + 如果你的脚本中实现了这个函数,那么它将会在两个碰撞体开始接触时被调用。 + @param contact contact information + @param selfCollider the collider belong to this rigidbody + @param otherCollider the collider belong to another rigidbody + */ + onBeginContact(contact: PhysicsContact, selfCollider: PhysicsCollider, otherCollider: PhysicsCollider): void; + /** + !#en + Collision callback. + Called when two collider cease to touch. + !#zh + 碰撞回调。 + 如果你的脚本中实现了这个函数,那么它将会在两个碰撞体停止接触时被调用。 + @param contact contact information + @param selfCollider the collider belong to this rigidbody + @param otherCollider the collider belong to another rigidbody + */ + onEndContact(contact: PhysicsContact, selfCollider: PhysicsCollider, otherCollider: PhysicsCollider): void; + /** + !#en + Collision callback. + This is called when a contact is updated. + This allows you to inspect a contact before it goes to the solver(e.g. disable contact). + Note: this is called only for awake bodies. + Note: this is called even when the number of contact points is zero. + Note: this is not called for sensors. + !#zh + 碰撞回调。 + 如果你的脚本中实现了这个函数,那么它将会在接触更新时被调用。 + 你可以在接触被处理前根据他包含的信息作出相应的处理,比如将这个接触禁用掉。 + 注意:回调只会为醒着的刚体调用。 + 注意:接触点为零的时候也有可能被调用。 + 注意:感知体(sensor)的回调不会被调用。 + @param contact contact information + @param selfCollider the collider belong to this rigidbody + @param otherCollider the collider belong to another rigidbody + */ + onPreSolve(contact: PhysicsContact, selfCollider: PhysicsCollider, otherCollider: PhysicsCollider): void; + /** + !#en + Collision callback. + This is called after a contact is updated. + You can get the impulses from the contact in this callback. + !#zh + 碰撞回调。 + 如果你的脚本中实现了这个函数,那么它将会在接触更新完后被调用。 + 你可以在这个回调中从接触信息中获取到冲量信息。 + @param contact contact information + @param selfCollider the collider belong to this rigidbody + @param otherCollider the collider belong to another rigidbody + */ + onPostSolve(contact: PhysicsContact, selfCollider: PhysicsCollider, otherCollider: PhysicsCollider): void; + /** !#en + Is this a fast moving body that should be prevented from tunneling through + other moving bodies? + Note : + - All bodies are prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies. + - You should use this flag sparingly since it increases processing time. + !#zh + 这个刚体是否是一个快速移动的刚体,并且需要禁止穿过其他快速移动的刚体? + 需要注意的是 : + - 所有刚体都被禁止从 运动刚体 和 静态刚体 中穿过。此选项只关注于 动态刚体。 + - 应该尽量少的使用此选项,因为它会增加程序处理时间。 */ + bullet: boolean; + /** !#en + Rigidbody type : Static, Kinematic, Dynamic or Animated. + !#zh + 刚体类型: Static, Kinematic, Dynamic or Animated. */ + type: RigidBodyType; + /** !#en + Set this flag to false if this body should never fall asleep. + Note that this increases CPU usage. + !#zh + 如果此刚体永远都不应该进入睡眠,那么设置这个属性为 false。 + 需要注意这将使 CPU 占用率提高。 */ + allowSleep: boolean; + /** !#en + Scale the gravity applied to this body. + !#zh + 缩放应用在此刚体上的重力值 */ + gravityScale: number; + /** !#en + Linear damping is use to reduce the linear velocity. + The damping parameter can be larger than 1, but the damping effect becomes sensitive to the + time step when the damping parameter is large. + !#zh + Linear damping 用于衰减刚体的线性速度。衰减系数可以大于 1,但是当衰减系数比较大的时候,衰减的效果会变得比较敏感。 */ + linearDamping: number; + /** !#en + Angular damping is use to reduce the angular velocity. The damping parameter + can be larger than 1 but the damping effect becomes sensitive to the + time step when the damping parameter is large. + !#zh + Angular damping 用于衰减刚体的角速度。衰减系数可以大于 1,但是当衰减系数比较大的时候,衰减的效果会变得比较敏感。 */ + angularDamping: number; + /** !#en + The linear velocity of the body's origin in world co-ordinates. + !#zh + 刚体在世界坐标下的线性速度 */ + linearVelocity: Vec2; + /** !#en + The angular velocity of the body. + !#zh + 刚体的角速度 */ + angularVelocity: number; + /** !#en + Should this body be prevented from rotating? + !#zh + 是否禁止此刚体进行旋转 */ + fixedRotation: boolean; + /** !#en + Set the sleep state of the body. A sleeping body has very low CPU cost.(When the rigid body is hit, if the rigid body is in sleep state, it will be immediately awakened.) + !#zh + 设置刚体的睡眠状态。 睡眠的刚体具有非常低的 CPU 成本。(当刚体被碰撞到时,如果刚体处于睡眠状态,它会立即被唤醒) */ + awake: boolean; + /** !#en + Whether to wake up this rigid body during initialization + !#zh + 是否在初始化时唤醒此刚体 */ + awakeOnLoad: boolean; + /** !#en + Set the active state of the body. An inactive body is not + simulated and cannot be collided with or woken up. + If body is active, all fixtures will be added to the + broad-phase. + If body is inactive, all fixtures will be removed from + the broad-phase and all contacts will be destroyed. + Fixtures on an inactive body are implicitly inactive and will + not participate in collisions, ray-casts, or queries. + Joints connected to an inactive body are implicitly inactive. + !#zh + 设置刚体的激活状态。一个非激活状态下的刚体是不会被模拟和碰撞的,不管它是否处于睡眠状态下。 + 如果刚体处于激活状态下,所有夹具会被添加到 粗测阶段(broad-phase)。 + 如果刚体处于非激活状态下,所有夹具会被从 粗测阶段(broad-phase)中移除。 + 在非激活状态下的夹具不会参与到碰撞,射线,或者查找中 + 链接到非激活状态下刚体的关节也是非激活的。 */ + active: boolean; + /** + !#en + Converts a given point in the world coordinate system to this rigid body's local coordinate system + !#zh + 将一个给定的世界坐标系下的点转换为刚体本地坐标系下的点 + @param worldPoint a point in world coordinates. + @param out optional, the receiving point + */ + getLocalPoint(worldPoint: Vec2, out: Vec2): Vec2; + /** + !#en + Converts a given point in this rigid body's local coordinate system to the world coordinate system + !#zh + 将一个给定的刚体本地坐标系下的点转换为世界坐标系下的点 + @param localPoint a point in local coordinates. + @param out optional, the receiving point + */ + getWorldPoint(localPoint: Vec2, out: Vec2): Vec2; + /** + !#en + Converts a given vector in this rigid body's local coordinate system to the world coordinate system + !#zh + 将一个给定的刚体本地坐标系下的向量转换为世界坐标系下的向量 + @param localVector a vector in world coordinates. + @param out optional, the receiving vector + */ + getWorldVector(localVector: Vec2, out: Vec2): Vec2; + /** + !#en + Converts a given vector in the world coordinate system to this rigid body's local coordinate system + !#zh + 将一个给定的世界坐标系下的向量转换为刚体本地坐标系下的向量 + @param worldVector a vector in world coordinates. + @param out optional, the receiving vector + */ + getLocalVector(worldVector: Vec2, out: Vec2): Vec2; + /** + !#en + Get the world body origin position. + !#zh + 获取刚体世界坐标系下的原点值 + @param out optional, the receiving point + */ + getWorldPosition(out: Vec2): Vec2; + /** + !#en + Get the world body rotation angle. + !#zh + 获取刚体世界坐标系下的旋转值。 + */ + getWorldRotation(): number; + /** + !#en + Get the local position of the center of mass. + !#zh + 获取刚体本地坐标系下的质心 + */ + getLocalCenter(): Vec2; + /** + !#en + Get the world position of the center of mass. + !#zh + 获取刚体世界坐标系下的质心 + */ + getWorldCenter(): Vec2; + /** + !#en + Get the world linear velocity of a world point attached to this body. + !#zh + 获取刚体上指定点的线性速度 + @param worldPoint a point in world coordinates. + @param out optional, the receiving point + */ + getLinearVelocityFromWorldPoint(worldPoint: Vec2, out: Vec2): Vec2; + /** + !#en + Get total mass of the body. + !#zh + 获取刚体的质量。 + */ + getMass(): number; + /** + !#en + Get the rotational inertia of the body about the local origin. + !#zh + 获取刚体本地坐标系下原点的旋转惯性 + */ + getInertia(): number; + /** + !#en + Get all the joints connect to the rigidbody. + !#zh + 获取链接到此刚体的所有关节 + */ + getJointList(): Joint[]; + /** + !#en + Apply a force at a world point. If the force is not + applied at the center of mass, it will generate a torque and + affect the angular velocity. + !#zh + 施加一个力到刚体上的一个点。如果力没有施加到刚体的质心上,还会产生一个扭矩并且影响到角速度。 + @param force the world force vector. + @param point the world position. + @param wake also wake up the body. + */ + applyForce(force: Vec2, point: Vec2, wake: boolean): void; + /** + !#en + Apply a force to the center of mass. + !#zh + 施加一个力到刚体上的质心上。 + @param force the world force vector. + @param wake also wake up the body. + */ + applyForceToCenter(force: Vec2, wake: boolean): void; + /** + !#en + Apply a torque. This affects the angular velocity. + !#zh + 施加一个扭矩力,将影响刚体的角速度 + @param torque about the z-axis (out of the screen), usually in N-m. + @param wake also wake up the body + */ + applyTorque(torque: number, wake: boolean): void; + /** + !#en + Apply a impulse at a world point, This immediately modifies the velocity. + If the impulse is not applied at the center of mass, it will generate a torque and + affect the angular velocity. + !#zh + 施加冲量到刚体上的一个点,将立即改变刚体的线性速度。 + 如果冲量施加到的点不是刚体的质心,那么将产生一个扭矩并影响刚体的角速度。 + @param impulse the world impulse vector, usually in N-seconds or kg-m/s. + @param point the world position + @param wake alse wake up the body + */ + applyLinearImpulse(impulse: Vec2, point: Vec2, wake: boolean): void; + /** + !#en + Apply an angular impulse. + !#zh + 施加一个角速度冲量。 + @param impulse the angular impulse in units of kg*m*m/s + @param wake also wake up the body + */ + applyAngularImpulse(impulse: number, wake: boolean): void; + /** + !#en + Synchronize node's world position to box2d rigidbody's position. + If enableAnimated is true and rigidbody's type is Animated type, + will set linear velocity instead of directly set rigidbody's position. + !#zh + 同步节点的世界坐标到 box2d 刚体的坐标上。 + 如果 enableAnimated 是 true,并且刚体的类型是 Animated ,那么将设置刚体的线性速度来代替直接设置刚体的位置。 + @param enableAnimated enableAnimated + */ + syncPosition(enableAnimated: boolean): void; + /** + !#en + Synchronize node's world angle to box2d rigidbody's angle. + If enableAnimated is true and rigidbody's type is Animated type, + will set angular velocity instead of directly set rigidbody's angle. + !#zh + 同步节点的世界旋转角度值到 box2d 刚体的旋转值上。 + 如果 enableAnimated 是 true,并且刚体的类型是 Animated ,那么将设置刚体的角速度来代替直接设置刚体的角度。 + @param enableAnimated enableAnimated + */ + syncRotation(enableAnimated: boolean): void; + } + /** !#en the device accelerometer reports values for each axis in units of g-force. + !#zh 设备重力传感器传递的各个轴的数据。 */ + export class constructor { + /** + whether enable accelerometer event + @param isEnable isEnable + */ + setAccelerometerEnabled(isEnable: boolean): void; + /** + set accelerometer interval value + @param interval interval + */ + setAccelerometerInterval(interval: number): void; + } + /** undefined */ + export enum VerticalTextAlignment { + TOP = 0, + CENTER = 0, + BOTTOM = 0, + } + /** The base class of most of all the objects in Fireball. */ + export class Object { + /** !#en The name of the object. + !#zh 该对象的名称。 */ + name: string; + /** !#en + Indicates whether the object is not yet destroyed. (It will not be available after being destroyed)
+ When an object's `destroy` is called, it is actually destroyed after the end of this frame. + So `isValid` will return false from the next frame, while `isValid` in the current frame will still be true. + If you want to determine whether the current frame has called `destroy`, use `cc.isValid(obj, true)`, + but this is often caused by a particular logical requirements, which is not normally required. + + !#zh + 表示该对象是否可用(被 destroy 后将不可用)。
+ 当一个对象的 `destroy` 调用以后,会在这一帧结束后才真正销毁。因此从下一帧开始 `isValid` 就会返回 false,而当前帧内 `isValid` 仍然会是 true。如果希望判断当前帧是否调用过 `destroy`,请使用 `cc.isValid(obj, true)`,不过这往往是特殊的业务需求引起的,通常情况下不需要这样。 */ + isValid: boolean; + /** + !#en + Destroy this Object, and release all its own references to other objects.
+ Actual object destruction will delayed until before rendering. + From the next frame, this object is not usable anymore. + You can use `cc.isValid(obj)` to check whether the object is destroyed before accessing it. + !#zh + 销毁该对象,并释放所有它对其它对象的引用。
+ 实际销毁操作会延迟到当前帧渲染前执行。从下一帧开始,该对象将不再可用。 + 您可以在访问对象之前使用 `cc.isValid(obj)` 来检查对象是否已被销毁。 + + @example + ```js + obj.destroy(); + ``` + */ + destroy(): boolean; + } + /** Bit mask that controls object states. */ + export enum Flags { + DontSave = 0, + EditorOnly = 0, + HideInHierarchy = 0, + } + /** The fullscreen API provides an easy way for web content to be presented using the user's entire screen. + It's invalid on safari, QQbrowser and android browser */ + export class screen { + /** + initialize + */ + init(): void; + /** + return true if it's full now. + */ + fullScreen(): boolean; + /** + change the screen to full mode. + @param element element + @param onFullScreenChange onFullScreenChange + @param onFullScreenError onFullScreenError + */ + requestFullScreen(element: Element, onFullScreenChange: Function, onFullScreenError: Function): void; + /** + exit the full mode. + */ + exitFullScreen(): boolean; + /** + Automatically request full screen with a touch/click event + @param element element + @param onFullScreenChange onFullScreenChange + */ + autoFullScreen(element: Element, onFullScreenChange: Function): void; + } + /** System variables */ + export class sys { + /** English language code */ + static LANGUAGE_ENGLISH: string; + /** Chinese language code */ + static LANGUAGE_CHINESE: string; + /** French language code */ + static LANGUAGE_FRENCH: string; + /** Italian language code */ + static LANGUAGE_ITALIAN: string; + /** German language code */ + static LANGUAGE_GERMAN: string; + /** Spanish language code */ + static LANGUAGE_SPANISH: string; + /** Spanish language code */ + static LANGUAGE_DUTCH: string; + /** Russian language code */ + static LANGUAGE_RUSSIAN: string; + /** Korean language code */ + static LANGUAGE_KOREAN: string; + /** Japanese language code */ + static LANGUAGE_JAPANESE: string; + /** Hungarian language code */ + static LANGUAGE_HUNGARIAN: string; + /** Portuguese language code */ + static LANGUAGE_PORTUGUESE: string; + /** Arabic language code */ + static LANGUAGE_ARABIC: string; + /** Norwegian language code */ + static LANGUAGE_NORWEGIAN: string; + /** Polish language code */ + static LANGUAGE_POLISH: string; + /** Turkish language code */ + static LANGUAGE_TURKISH: string; + /** Ukrainian language code */ + static LANGUAGE_UKRAINIAN: string; + /** Romanian language code */ + static LANGUAGE_ROMANIAN: string; + /** Bulgarian language code */ + static LANGUAGE_BULGARIAN: string; + /** Unknown language code */ + static LANGUAGE_UNKNOWN: string; + static OS_IOS: string; + static OS_ANDROID: string; + static OS_WINDOWS: string; + static OS_MARMALADE: string; + static OS_LINUX: string; + static OS_BADA: string; + static OS_BLACKBERRY: string; + static OS_OSX: string; + static OS_WP8: string; + static OS_WINRT: string; + static OS_UNKNOWN: string; + static UNKNOWN: number; + static WIN32: number; + static LINUX: number; + static MACOS: number; + static ANDROID: number; + static IPHONE: number; + static IPAD: number; + static BLACKBERRY: number; + static NACL: number; + static EMSCRIPTEN: number; + static TIZEN: number; + static WINRT: number; + static WP8: number; + static MOBILE_BROWSER: number; + static DESKTOP_BROWSER: number; + /** Indicates whether executes in editor's window process (Electron's renderer context) */ + static EDITOR_PAGE: number; + /** Indicates whether executes in editor's main process (Electron's browser context) */ + static EDITOR_CORE: number; + static WECHAT_GAME: number; + static QQ_PLAY: number; + static FB_PLAYABLE_ADS: number; + static BAIDU_GAME: number; + static VIVO_GAME: number; + static OPPO_GAME: number; + static HUAWEI_GAME: number; + static XIAOMI_GAME: number; + static JKW_GAME: number; + static ALIPAY_GAME: number; + static WECHAT_GAME_SUB: number; + static BAIDU_GAME_SUB: number; + static QTT_GAME: number; + static BYTEDANCE_GAME: number; + static BYTEDANCE_GAME_SUB: number; + static LINKSURE: number; + /** BROWSER_TYPE_WECHAT */ + static BROWSER_TYPE_WECHAT: string; + static BROWSER_TYPE_ANDROID: string; + static BROWSER_TYPE_IE: string; + static BROWSER_TYPE_EDGE: string; + static BROWSER_TYPE_QQ: string; + static BROWSER_TYPE_MOBILE_QQ: string; + static BROWSER_TYPE_UC: string; + /** uc third party integration. */ + static BROWSER_TYPE_UCBS: string; + static BROWSER_TYPE_360: string; + static BROWSER_TYPE_BAIDU_APP: string; + static BROWSER_TYPE_BAIDU: string; + static BROWSER_TYPE_MAXTHON: string; + static BROWSER_TYPE_OPERA: string; + static BROWSER_TYPE_OUPENG: string; + static BROWSER_TYPE_MIUI: string; + static BROWSER_TYPE_FIREFOX: string; + static BROWSER_TYPE_SAFARI: string; + static BROWSER_TYPE_CHROME: string; + static BROWSER_TYPE_LIEBAO: string; + static BROWSER_TYPE_QZONE: string; + static BROWSER_TYPE_SOUGOU: string; + static BROWSER_TYPE_HUAWEI: string; + static BROWSER_TYPE_UNKNOWN: string; + /** Is native ? This is set to be true in jsb auto. */ + static isNative: boolean; + /** Is web browser ? */ + static isBrowser: boolean; + /** + Is webgl extension support? + @param name name + */ + static glExtension(name: any): boolean; + /** + Get max joint matrix size for skinned mesh renderer. + */ + static getMaxJointMatrixSize(): void; + /** + !#en + Returns the safe area of the screen (in design resolution). If the screen is not notched, the visibleRect will be returned by default. + Currently supports Android, iOS and WeChat Mini Game platform. + !#zh + 返回手机屏幕安全区域(设计分辨率为单位),如果不是异形屏将默认返回 visibleRect。目前支持安卓、iOS 原生平台和微信小游戏平台。 + */ + static getSafeAreaRect(): Rect; + /** Indicate whether system is mobile system */ + static isMobile: boolean; + /** Indicate the running platform */ + static platform: number; + /** Get current language iso 639-1 code. + Examples of valid language codes include "zh-tw", "en", "en-us", "fr", "fr-fr", "es-es", etc. + The actual value totally depends on results provided by destination platform. */ + static languageCode: string; + /** Indicate the current language of the running system */ + static language: string; + /** Indicate the running os name */ + static os: string; + /** Indicate the running os version */ + static osVersion: string; + /** Indicate the running os main version */ + static osMainVersion: number; + /** Indicate the running browser type */ + static browserType: string|void; + /** Indicate the running browser version */ + static browserVersion: string|void; + /** Indicate the real pixel resolution of the whole game window */ + static windowPixelResolution: Size; + /** cc.sys.localStorage is a local storage component. */ + static localStorage: any; + /** The capabilities of the current platform */ + static capabilities: any; + /** + !#en + Get the network type of current device, return cc.sys.NetworkType.LAN if failure. + !#zh + 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 cc.sys.NetworkType.LAN + */ + static getNetworkType(): sys.NetworkType; + /** + !#en + Get the battery level of current device, return 1.0 if failure. + !#zh + 获取当前设备的电池电量,如果电量无法获取,默认将返回 1 + */ + static getBatteryLevel(): number; + /** + Forces the garbage collection, only available in JSB + */ + static garbageCollect(): void; + /** + Restart the JS VM, only available in JSB + */ + static restartVM(): void; + /** + Check whether an object is valid, + In web engine, it will return true if the object exist + In native engine, it will return true if the JS object and the correspond native object are both valid + @param obj obj + */ + static isObjectValid(obj: any): boolean; + /** + Dump system informations + */ + static dump(): void; + /** + Open a url in browser + @param url url + */ + static openURL(url: string): void; + /** + Get the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. + */ + static now(): number; + } + /** cc.view is the singleton object which represents the game window.
+ It's main task include:
+ - Apply the design resolution policy
+ - Provide interaction with the window, like resize event on web, retina display support, etc...
+ - Manage the game view port which can be different with the window
+ - Manage the content scale and translation
+
+ Since the cc.view is a singleton, you don't need to call any constructor or create functions,
+ the standard way to use it is by calling:
+ - cc.view.methodName();
*/ + export class View extends EventTarget { + /** + !#en + Sets view's target-densitydpi for android mobile browser. it can be set to:
+ 1. cc.macro.DENSITYDPI_DEVICE, value is "device-dpi"
+ 2. cc.macro.DENSITYDPI_HIGH, value is "high-dpi" (default value)
+ 3. cc.macro.DENSITYDPI_MEDIUM, value is "medium-dpi" (browser's default value)
+ 4. cc.macro.DENSITYDPI_LOW, value is "low-dpi"
+ 5. Custom value, e.g: "480"
+ !#zh 设置目标内容的每英寸像素点密度。 + @param densityDPI densityDPI + */ + setTargetDensityDPI(densityDPI: string): void; + /** + !#en + Returns the current target-densitydpi value of cc.view. + !#zh 获取目标内容的每英寸像素点密度。 + */ + getTargetDensityDPI(): string; + /** + !#en + Sets whether resize canvas automatically when browser's size changed.
+ Useful only on web. + !#zh 设置当发现浏览器的尺寸改变时,是否自动调整 canvas 尺寸大小。 + 仅在 Web 模式下有效。 + @param enabled Whether enable automatic resize with browser's resize event + */ + resizeWithBrowserSize(enabled: boolean): void; + /** + !#en + Sets the callback function for cc.view's resize action,
+ this callback will be invoked before applying resolution policy,
+ so you can do any additional modifications within the callback.
+ Useful only on web. + !#zh 设置 cc.view 调整视窗尺寸行为的回调函数, + 这个回调函数会在应用适配模式之前被调用, + 因此你可以在这个回调函数内添加任意附加改变, + 仅在 Web 平台下有效。 + @param callback The callback function + */ + setResizeCallback(callback: Function|void): void; + /** + !#en + Sets the orientation of the game, it can be landscape, portrait or auto. + When set it to landscape or portrait, and screen w/h ratio doesn't fit, + cc.view will automatically rotate the game canvas using CSS. + Note that this function doesn't have any effect in native, + in native, you need to set the application orientation in native project settings + !#zh 设置游戏屏幕朝向,它能够是横版,竖版或自动。 + 当设置为横版或竖版,并且屏幕的宽高比例不匹配时, + cc.view 会自动用 CSS 旋转游戏场景的 canvas, + 这个方法不会对 native 部分产生任何影响,对于 native 而言,你需要在应用设置中的设置排版。 + @param orientation Possible values: cc.macro.ORIENTATION_LANDSCAPE | cc.macro.ORIENTATION_PORTRAIT | cc.macro.ORIENTATION_AUTO + */ + setOrientation(orientation: number): void; + /** + !#en + Sets whether the engine modify the "viewport" meta in your web page.
+ It's enabled by default, we strongly suggest you not to disable it.
+ And even when it's enabled, you can still set your own "viewport" meta, it won't be overridden
+ Only useful on web + !#zh 设置引擎是否调整 viewport meta 来配合屏幕适配。 + 默认设置为启动,我们强烈建议你不要将它设置为关闭。 + 即使当它启动时,你仍然能够设置你的 viewport meta,它不会被覆盖。 + 仅在 Web 模式下有效 + @param enabled Enable automatic modification to "viewport" meta + */ + adjustViewportMeta(enabled: boolean): void; + /** + !#en + Retina support is enabled by default for Apple device but disabled for other devices,
+ it takes effect only when you called setDesignResolutionPolicy
+ Only useful on web + !#zh 对于 Apple 这种支持 Retina 显示的设备上默认进行优化而其他类型设备默认不进行优化, + 它仅会在你调用 setDesignResolutionPolicy 方法时有影响。 + 仅在 Web 模式下有效。 + @param enabled Enable or disable retina display + */ + enableRetina(enabled: boolean): void; + /** + !#en + Check whether retina display is enabled.
+ Only useful on web + !#zh 检查是否对 Retina 显示设备进行优化。 + 仅在 Web 模式下有效。 + */ + isRetinaEnabled(): boolean; + /** + !#en Whether to Enable on anti-alias + !#zh 控制抗锯齿是否开启 + @param enabled Enable or not anti-alias + */ + enableAntiAlias(enabled: boolean): void; + /** + !#en Returns whether the current enable on anti-alias + !#zh 返回当前是否抗锯齿 + */ + isAntiAliasEnabled(): boolean; + /** + !#en + If enabled, the application will try automatically to enter full screen mode on mobile devices
+ You can pass true as parameter to enable it and disable it by passing false.
+ Only useful on web + !#zh 启动时,移动端游戏会在移动端自动尝试进入全屏模式。 + 你能够传入 true 为参数去启动它,用 false 参数来关闭它。 + @param enabled Enable or disable auto full screen on mobile devices + */ + enableAutoFullScreen(enabled: boolean): void; + /** + !#en + Check whether auto full screen is enabled.
+ Only useful on web + !#zh 检查自动进入全屏模式是否启动。 + 仅在 Web 模式下有效。 + */ + isAutoFullScreenEnabled(): boolean; + /** + !#en + Returns the canvas size of the view.
+ On native platforms, it returns the screen size since the view is a fullscreen view.
+ On web, it returns the size of the canvas element. + !#zh 返回视图中 canvas 的尺寸。 + 在 native 平台下,它返回全屏视图下屏幕的尺寸。 + 在 Web 平台下,它返回 canvas 元素尺寸。 + */ + getCanvasSize(): Size; + /** + !#en + Returns the frame size of the view.
+ On native platforms, it returns the screen size since the view is a fullscreen view.
+ On web, it returns the size of the canvas's outer DOM element. + !#zh 返回视图中边框尺寸。 + 在 native 平台下,它返回全屏视图下屏幕的尺寸。 + 在 web 平台下,它返回 canvas 元素的外层 DOM 元素尺寸。 + */ + getFrameSize(): Size; + /** + !#en + On native, it sets the frame size of view.
+ On web, it sets the size of the canvas's outer DOM element. + !#zh 在 native 平台下,设置视图框架尺寸。 + 在 web 平台下,设置 canvas 外层 DOM 元素尺寸。 + @param width width + @param height height + */ + setFrameSize(width: number, height: number): void; + /** + !#en + Returns the visible area size of the view port. + !#zh 返回视图窗口可见区域尺寸。 + */ + getVisibleSize(): Size; + /** + !#en + Returns the visible area size of the view port. + !#zh 返回视图窗口可见区域像素尺寸。 + */ + getVisibleSizeInPixel(): Size; + /** + !#en + Returns the visible origin of the view port. + !#zh 返回视图窗口可见区域原点。 + */ + getVisibleOrigin(): Vec2; + /** + !#en + Returns the visible origin of the view port. + !#zh 返回视图窗口可见区域像素原点。 + */ + getVisibleOriginInPixel(): Vec2; + /** + !#en + Returns the current resolution policy + !#zh 返回当前分辨率方案 + */ + getResolutionPolicy(): ResolutionPolicy; + /** + !#en + Sets the current resolution policy + !#zh 设置当前分辨率模式 + @param resolutionPolicy resolutionPolicy + */ + setResolutionPolicy(resolutionPolicy: ResolutionPolicy|number): void; + /** + !#en + Sets the resolution policy with designed view size in points.
+ The resolution policy include:
+ [1] ResolutionExactFit Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched.
+ [2] ResolutionNoBorder Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut.
+ [3] ResolutionShowAll Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown.
+ [4] ResolutionFixedHeight Scale the content's height to screen's height and proportionally scale its width
+ [5] ResolutionFixedWidth Scale the content's width to screen's width and proportionally scale its height
+ [cc.ResolutionPolicy] [Web only feature] Custom resolution policy, constructed by cc.ResolutionPolicy
+ !#zh 通过设置设计分辨率和匹配模式来进行游戏画面的屏幕适配。 + @param width Design resolution width. + @param height Design resolution height. + @param resolutionPolicy The resolution policy desired + */ + setDesignResolutionSize(width: number, height: number, resolutionPolicy: ResolutionPolicy|number): void; + /** + !#en + Returns the designed size for the view. + Default resolution size is the same as 'getFrameSize'. + !#zh 返回视图的设计分辨率。 + 默认下分辨率尺寸同 `getFrameSize` 方法相同 + */ + getDesignResolutionSize(): Size; + /** + !#en + Sets the container to desired pixel resolution and fit the game content to it. + This function is very useful for adaptation in mobile browsers. + In some HD android devices, the resolution is very high, but its browser performance may not be very good. + In this case, enabling retina display is very costy and not suggested, and if retina is disabled, the image may be blurry. + But this API can be helpful to set a desired pixel resolution which is in between. + This API will do the following: + 1. Set viewport's width to the desired width in pixel + 2. Set body width to the exact pixel resolution + 3. The resolution policy will be reset with designed view size in points. + !#zh 设置容器(container)需要的像素分辨率并且适配相应分辨率的游戏内容。 + @param width Design resolution width. + @param height Design resolution height. + @param resolutionPolicy The resolution policy desired + */ + setRealPixelResolution(width: number, height: number, resolutionPolicy: ResolutionPolicy|number): void; + /** + !#en + Sets view port rectangle with points. + !#zh 用设计分辨率下的点尺寸来设置视窗。 + @param x x + @param y y + @param w width + @param h height + */ + setViewportInPoints(x: number, y: number, w: number, h: number): void; + /** + !#en + Sets Scissor rectangle with points. + !#zh 用设计分辨率下的点的尺寸来设置 scissor 剪裁区域。 + @param x x + @param y y + @param w w + @param h h + */ + setScissorInPoints(x: number, y: number, w: number, h: number): void; + /** + !#en + Returns whether GL_SCISSOR_TEST is enable + !#zh 检查 scissor 是否生效。 + */ + isScissorEnabled(): boolean; + /** + !#en + Returns the current scissor rectangle + !#zh 返回当前的 scissor 剪裁区域。 + */ + getScissorRect(): Rect; + /** + !#en + Returns the view port rectangle. + !#zh 返回视窗剪裁区域。 + */ + getViewportRect(): Rect; + /** + !#en + Returns scale factor of the horizontal direction (X axis). + !#zh 返回横轴的缩放比,这个缩放比是将画布像素分辨率放到设计分辨率的比例。 + */ + getScaleX(): number; + /** + !#en + Returns scale factor of the vertical direction (Y axis). + !#zh 返回纵轴的缩放比,这个缩放比是将画布像素分辨率缩放到设计分辨率的比例。 + */ + getScaleY(): number; + /** + !#en + Returns device pixel ratio for retina display. + !#zh 返回设备或浏览器像素比例。 + */ + getDevicePixelRatio(): number; + /** + !#en + Returns the real location in view for a translation based on a related position + !#zh 将屏幕坐标转换为游戏视图下的坐标。 + @param tx The X axis translation + @param ty The Y axis translation + @param relatedPos The related position object including "left", "top", "width", "height" informations + */ + convertToLocationInView(tx: number, ty: number, relatedPos: any): Vec2; + } + /**

cc.game.containerStrategy class is the root strategy class of container's scale strategy, + it controls the behavior of how to scale the cc.game.container and cc.game.canvas object

*/ + export class ContainerStrategy { + /** + !#en + Manipulation before appling the strategy + !#zh 在应用策略之前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en + Function to apply this strategy + !#zh 策略应用方法 + @param view view + @param designedResolution designedResolution + */ + apply(view: View, designedResolution: Size): void; + /** + !#en + Manipulation after applying the strategy + !#zh 策略调用之后的操作 + @param view The target view + */ + postApply(view: View): void; + } + /**

cc.ContentStrategy class is the root strategy class of content's scale strategy, + it controls the behavior of how to scale the scene and setup the viewport for the game

*/ + export class ContentStrategy { + /** + !#en + Manipulation before applying the strategy + !#zh 策略应用前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en Function to apply this strategy + The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, + The target view can then apply these value to itself, it's preferred not to modify directly its private variables + !#zh 调用策略方法 + @param view view + @param designedResolution designedResolution + */ + apply(view: View, designedResolution: Size): any; + /** + !#en + Manipulation after applying the strategy + !#zh 策略调用之后的操作 + @param view The target view + */ + postApply(view: View): void; + } + /** undefined */ + export class EqualToFrame extends ContainerStrategy { + } + /** undefined */ + export class ProportionalToFrame extends ContainerStrategy { + } + /** undefined */ + export class EqualToWindow extends EqualToFrame { + } + /** undefined */ + export class ProportionalToWindow extends ProportionalToFrame { + } + /** undefined */ + export class OriginalContainer extends ContainerStrategy { + } + /**

cc.ResolutionPolicy class is the root strategy class of scale strategy, + its main task is to maintain the compatibility with Cocos2d-x

*/ + export class ResolutionPolicy { + /** + + @param containerStg The container strategy + @param contentStg The content strategy + */ + constructor(containerStg: ContainerStrategy, contentStg: ContentStrategy); + /** + !#en Manipulation before applying the resolution policy + !#zh 策略应用前的操作 + @param view The target view + */ + preApply(view: View): void; + /** + !#en Function to apply this resolution policy + The return value is {scale: [scaleX, scaleY], viewport: {cc.Rect}}, + The target view can then apply these value to itself, it's preferred not to modify directly its private variables + !#zh 调用策略方法 + @param view The target view + @param designedResolution The user defined design resolution + */ + apply(view: View, designedResolution: Size): any; + /** + !#en Manipulation after appyling the strategy + !#zh 策略应用之后的操作 + @param view The target view + */ + postApply(view: View): void; + /** + !#en + Setup the container's scale strategy + !#zh 设置容器的适配策略 + @param containerStg containerStg + */ + setContainerStrategy(containerStg: ContainerStrategy): void; + /** + !#en + Setup the content's scale strategy + !#zh 设置内容的适配策略 + @param contentStg contentStg + */ + setContentStrategy(contentStg: ContentStrategy): void; + /** The entire application is visible in the specified area without trying to preserve the original aspect ratio.
+ Distortion can occur, and the application may appear stretched or compressed. */ + static EXACT_FIT: number; + /** The entire application fills the specified area, without distortion but possibly with some cropping,
+ while maintaining the original aspect ratio of the application. */ + static NO_BORDER: number; + /** The entire application is visible in the specified area without distortion while maintaining the original
+ aspect ratio of the application. Borders can appear on two sides of the application. */ + static SHOW_ALL: number; + /** The application takes the height of the design resolution size and modifies the width of the internal
+ canvas so that it fits the aspect ratio of the device
+ no distortion will occur however you must make sure your application works on different
+ aspect ratios */ + static FIXED_HEIGHT: number; + /** The application takes the width of the design resolution size and modifies the height of the internal
+ canvas so that it fits the aspect ratio of the device
+ no distortion will occur however you must make sure your application works on different
+ aspect ratios */ + static FIXED_WIDTH: number; + /** Unknow policy */ + static UNKNOWN: number; + } + /** cc.visibleRect is a singleton object which defines the actual visible rect of the current view, + it should represent the same rect as cc.view.getViewportRect() */ + export class visibleRect { + /** + initialize + @param visibleRect visibleRect + */ + static init(visibleRect: Rect): void; + /** Top left coordinate of the screen related to the game scene. */ + static topLeft: Vec2; + /** Top right coordinate of the screen related to the game scene. */ + static topRight: Vec2; + /** Top center coordinate of the screen related to the game scene. */ + static top: Vec2; + /** Bottom left coordinate of the screen related to the game scene. */ + static bottomLeft: Vec2; + /** Bottom right coordinate of the screen related to the game scene. */ + static bottomRight: Vec2; + /** Bottom center coordinate of the screen related to the game scene. */ + static bottom: Vec2; + /** Center coordinate of the screen related to the game scene. */ + static center: Vec2; + /** Left center coordinate of the screen related to the game scene. */ + static left: Vec2; + /** Right center coordinate of the screen related to the game scene. */ + static right: Vec2; + /** Width of the screen. */ + static width: number; + /** Height of the screen. */ + static height: number; + } + /** !#en The callbacks invoker to handle and invoke callbacks by key. + !#zh CallbacksInvoker 用来根据 Key 管理并调用回调方法。 */ + export class CallbacksInvoker { + /** + !#zh + 检查指定事件是否已注册回调。 + !#en + Check if the specified key has any registered callback. If a callback is also specified, + it will only return true if the callback is registered. + @param key key + @param callback callback + @param target target + */ + hasEventListener(key: string, callback?: Function, target?: any): boolean; + /** + !#zh + 移除在特定事件类型中注册的所有回调或在某个目标中注册的所有回调。 + + !#en + Removes all callbacks registered in a certain event type or all callbacks registered with a certain target + @param keyOrTarget The event key to be removed or the target to be removed + */ + removeAll(keyOrTarget: string|any): void; + /** + !#zh + 删除之前与同类型,回调,目标注册的回调。 + @param key key + @param callback callback + @param target target + */ + off(key: string, callback: Function, target?: any): void; + /** + !#en + Trigger an event directly with the event name and necessary arguments. + !#zh + 通过事件名发送自定义事件 + @param key event type + @param arg1 First argument + @param arg2 Second argument + @param arg3 Third argument + @param arg4 Fourth argument + @param arg5 Fifth argument + + @example + ```js + eventTarget.emit('fire', event); + eventTarget.emit('fire', message, emitter); + ``` + */ + emit(key: string, arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any): void; + } + /** !#en Contains information collected during deserialization + !#zh 包含反序列化时的一些信息 */ + export class Details { + /** the obj list whose field needs to load asset by uuid */ + uuidObjList: any[]; + /** the corresponding field name which referenced to the asset */ + uuidPropList: (String|Number)[]; + /** list of the depends assets' uuid */ + uuidList: string[]; + /** + + @param data data + */ + init(data: any): void; + reset(): void; + /** + + @param obj obj + @param propName propName + @param uuid uuid + */ + push(obj: any, propName: string, uuid: string): void; + /** list of the depends assets' uuid */ + uuidList: string[]; + /** the obj list whose field needs to load asset by uuid */ + uuidObjList: any[]; + /** the corresponding field name which referenced to the asset */ + uuidPropList: string[]; + reset(): void; + /** + + @param obj obj + @param propName propName + @param uuid uuid + */ + push(obj: any, propName: string, uuid: string): void; + } + /** !#en + Representation of RGBA colors. + + Each color component is a floating point value with a range from 0 to 255. + + You can also use the convenience method {{#crossLink "cc/color:method"}}cc.color{{/crossLink}} to create a new Color. + + !#zh + cc.Color 用于表示颜色。 + + 它包含 RGBA 四个以浮点数保存的颜色分量,每个的值都在 0 到 255 之间。 + + 您也可以通过使用 {{#crossLink "cc/color:method"}}cc.color{{/crossLink}} 的便捷方法来创建一个新的 Color。 */ + export class Color extends ValueType { + /** !#en Solid white, RGBA is [255, 255, 255, 255]. + !#zh 纯白色,RGBA 是 [255, 255, 255, 255]。 */ + static WHITE: Color; + /** !#en Solid black, RGBA is [0, 0, 0, 255]. + !#zh 纯黑色,RGBA 是 [0, 0, 0, 255]。 */ + static BLACK: Color; + /** !#en Transparent, RGBA is [0, 0, 0, 0]. + !#zh 透明,RGBA 是 [0, 0, 0, 0]。 */ + static TRANSPARENT: Color; + /** !#en Grey, RGBA is [127.5, 127.5, 127.5]. + !#zh 灰色,RGBA 是 [127.5, 127.5, 127.5]。 */ + static GRAY: Color; + /** !#en Solid red, RGBA is [255, 0, 0]. + !#zh 纯红色,RGBA 是 [255, 0, 0]。 */ + static RED: Color; + /** !#en Solid green, RGBA is [0, 255, 0]. + !#zh 纯绿色,RGBA 是 [0, 255, 0]。 */ + static GREEN: Color; + /** !#en Solid blue, RGBA is [0, 0, 255]. + !#zh 纯蓝色,RGBA 是 [0, 0, 255]。 */ + static BLUE: Color; + /** !#en Yellow, RGBA is [255, 235, 4]. + !#zh 黄色,RGBA 是 [255, 235, 4]。 */ + static YELLOW: Color; + /** !#en Orange, RGBA is [255, 127, 0]. + !#zh 橙色,RGBA 是 [255, 127, 0]。 */ + static ORANGE: Color; + /** !#en Cyan, RGBA is [0, 255, 255]. + !#zh 青色,RGBA 是 [0, 255, 255]。 */ + static CYAN: Color; + /** !#en Magenta, RGBA is [255, 0, 255]. + !#zh 洋红色(品红色),RGBA 是 [255, 0, 255]。 */ + static MAGENTA: Color; + /** + Copy content of a color into another. + */ + static copy (out: Color, a: Color): Color; + /** + Clone a new color. + */ + static clone (a: Color): Color; + /** + Set the components of a color to the given values. + */ + static set (out: Color, r?: number, g?: number, b?: number, a?: number): Color; + /** + Converts the hexadecimal formal color into rgb formal. + */ + static fromHex (out: Color, hex: number): Color; + /** + Converts the hexadecimal formal color into rgb formal. + */ + static fromHEX (out: Color, hex: string): Color; + /** + Add components of two colors, respectively. + */ + static add (out: Color, a: Color, b: Color): Color; + /** + Subtract components of color b from components of color a, respectively. + */ + static subtract (out: Color, a: Color, b: Color): Color; + /** + Multiply components of two colors, respectively. + */ + static multiply (out: Color, a: Color, b: Color): Color; + /** + Divide components of color a by components of color b, respectively. + */ + static divide (out: Color, a: Color, b: Color): Color; + /** + Scales a color by a number. + */ + static scale (out: Color, a: Color, b: number): Color; + /** + Performs a linear interpolation between two colors. + */ + static lerp (out: Color, a: Color, b: Color, t: number): Color; + /** + !#zh 颜色转数组 + !#en Turn an array of colors + @param ofs 数组起始偏移量 + */ + static toArray > (out: Out, a: IColorLike, ofs?: number): Out; + /** + !#zh 数组转颜色 + !#en An array of colors turn + @param ofs 数组起始偏移量 + */ + static fromArray (arr: IWritableArrayLike, out: Out, ofs?: number): Out; + /** + !#zh 颜色 RGB 预乘 Alpha 通道 + !#en RGB premultiply alpha channel + @param out 返回颜色 + @param color 预乘处理的目标颜色 + */ + static premultiplyAlpha (out: Out, a: IColorLike); + /** + + @param r red component of the color, default value is 0. + @param g green component of the color, defualt value is 0. + @param b blue component of the color, default value is 0. + @param a alpha component of the color, default value is 255. + */ + constructor(r?: number, g?: number, b?: number, a?: number); + /** + !#en Clone a new color from the current color. + !#zh 克隆当前颜色。 + + @example + ```js + var color = new cc.Color(); + var newColor = color.clone();// Color {r: 0, g: 0, b: 0, a: 255} + ``` + */ + clone(): Color; + /** + !#en TODO + !#zh 判断两个颜色是否相等。 + @param other other + + @example + ```js + var color1 = cc.Color.WHITE; + var color2 = new cc.Color(255, 255, 255); + cc.log(color1.equals(color2)); // true; + color2 = cc.Color.RED; + cc.log(color2.equals(color1)); // false; + ``` + */ + equals(other: Color): boolean; + /** + !#en TODO + !#zh 线性插值 + @param to to + @param ratio the interpolation coefficient. + @param out optional, the receiving vector. + + @example + ```js + // Converts a white color to a black one trough time. + update: function (dt) { + var color = this.node.color; + if (color.equals(cc.Color.BLACK)) { + return; + } + this.ratio += dt * 0.1; + this.node.color = cc.Color.WHITE.lerp(cc.Color.BLACK, ratio); + } + + ``` + */ + lerp(to: Color, ratio: number, out?: Color): Color; + /** + !#en TODO + !#zh 转换为方便阅读的字符串。 + + @example + ```js + var color = cc.Color.WHITE; + color.toString(); // "rgba(255, 255, 255, 255)" + ``` + */ + toString(): string; + /** !#en Get or set red channel value + !#zh 获取或者设置红色通道 */ + r: number; + /** !#en Get or set green channel value + !#zh 获取或者设置绿色通道 */ + g: number; + /** !#en Get or set blue channel value + !#zh 获取或者设置蓝色通道 */ + b: number; + /** !#en Get or set alpha channel value + !#zh 获取或者设置透明通道 */ + a: number; + /** + !#en Gets red channel value + !#zh 获取当前颜色的红色值。 + */ + getR(): number; + /** + !#en Sets red value and return the current color object + !#zh 设置当前的红色值,并返回当前对象。 + @param red the new Red component. + + @example + ```js + var color = new cc.Color(); + color.setR(255); // Color {r: 255, g: 0, b: 0, a: 255} + ``` + */ + setR(red: number): Color; + /** + !#en Gets green channel value + !#zh 获取当前颜色的绿色值。 + */ + getG(): number; + /** + !#en Sets green value and return the current color object + !#zh 设置当前的绿色值,并返回当前对象。 + @param green the new Green component. + + @example + ```js + var color = new cc.Color(); + color.setG(255); // Color {r: 0, g: 255, b: 0, a: 255} + ``` + */ + setG(green: number): Color; + /** + !#en Gets blue channel value + !#zh 获取当前颜色的蓝色值。 + */ + getB(): number; + /** + !#en Sets blue value and return the current color object + !#zh 设置当前的蓝色值,并返回当前对象。 + @param blue the new Blue component. + + @example + ```js + var color = new cc.Color(); + color.setB(255); // Color {r: 0, g: 0, b: 255, a: 255} + ``` + */ + setB(blue: number): Color; + /** + !#en Gets alpha channel value + !#zh 获取当前颜色的透明度值。 + */ + getA(): number; + /** + !#en Sets alpha value and return the current color object + !#zh 设置当前的透明度,并返回当前对象。 + @param alpha the new Alpha component. + + @example + ```js + var color = new cc.Color(); + color.setA(0); // Color {r: 0, g: 0, b: 0, a: 0} + ``` + */ + setA(alpha: number): Color; + /** + !#en Convert color to css format. + !#zh 转换为 CSS 格式。 + @param opt "rgba", "rgb", "#rgb" or "#rrggbb". + + @example + ```js + var color = cc.Color.BLACK; + color.toCSS(); // "rgba(0,0,0,1.00)"; + color.toCSS("rgba"); // "rgba(0,0,0,1.00)"; + color.toCSS("rgb"); // "rgba(0,0,0)"; + color.toCSS("#rgb"); // "#000"; + color.toCSS("#rrggbb"); // "#000000"; + ``` + */ + toCSS(opt?: string): string; + /** + !#en Read hex string and store color data into the current color object, the hex string must be formated as rgba or rgb. + !#zh 读取 16 进制颜色。 + @param hexString hexString + + @example + ```js + var color = cc.Color.BLACK; + color.fromHEX("#FFFF33"); // Color {r: 255, g: 255, b: 51, a: 255}; + ``` + */ + fromHEX(hexString: string): Color; + /** + !#en convert Color to HEX color string. + !#zh 转换为 16 进制。 + @param fmt "#rgb", "#rrggbb" or "#rrggbbaa". + + @example + ```js + var color = cc.Color.BLACK; + color.toHEX("#rgb"); // "000"; + color.toHEX("#rrggbb"); // "000000"; + ``` + */ + toHEX(fmt?: string): string; + /** + !#en Convert to 24bit rgb value. + !#zh 转换为 24bit 的 RGB 值。 + + @example + ```js + var color = cc.Color.YELLOW; + color.toRGBValue(); // 16771844; + ``` + */ + toRGBValue(): number; + /** + !#en Read HSV model color and convert to RGB color + !#zh 读取 HSV(色彩模型)格式。 + @param h h + @param s s + @param v v + + @example + ```js + var color = cc.Color.YELLOW; + color.fromHSV(0, 0, 1); // Color {r: 255, g: 255, b: 255, a: 255}; + ``` + */ + fromHSV(h: number, s: number, v: number): Color; + /** + !#en Transform to HSV model color + !#zh 转换为 HSV(色彩模型)格式。 + + @example + ```js + var color = cc.Color.YELLOW; + color.toHSV(); // Object {h: 0.1533864541832669, s: 0.9843137254901961, v: 1}; + ``` + */ + toHSV(): any; + /** + !#en Set the color + !#zh 设置颜色 + @param color color + */ + set (color: Color): Color; + /** + !#en Multiplies the current color by the specified color + !#zh 将当前颜色乘以与指定颜色 + @param other other + */ + multiply(other: Color): Color; + } + /** !#en Representation of 4*4 matrix. + !#zh 表示 4*4 矩阵 */ + export class Mat4 extends ValueType { + /** + !#en Multiply the current matrix with another one + !#zh 将当前矩阵与指定矩阵相乘 + @param other the second operand + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + mul(other: Mat4, out?: Mat4): Mat4; + /** + !#en Multiply each element of the matrix by a scalar. + !#zh 将矩阵的每一个元素都乘以指定的缩放值。 + @param number amount to scale the matrix's elements by + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + mulScalar(number: number, out?: Mat4): Mat4; + /** + !#en Subtracts the current matrix with another one + !#zh 将当前矩阵与指定的矩阵相减 + @param other the second operand + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + sub(other: Mat4, out?: Mat4): Mat4; + /** Identity of Mat4 */ + static IDENTITY: Mat4; + /** + !#zh 获得指定矩阵的拷贝 + !#en Copy of the specified matrix to obtain + */ + static clone (a: Out): Mat4; + /** + !#zh 复制目标矩阵 + !#en Copy the target matrix + */ + static copy (out: Out, a: Out): Out; + /** + !#zh 将目标赋值为单位矩阵 + !#en The target of an assignment is the identity matrix + */ + static identity (out: Out): Out; + /** + !#zh 转置矩阵 + !#en Transposed matrix + */ + static transpose (out: Out, a: Out): Out; + /** + !#zh 矩阵求逆 + !#en Matrix inversion + */ + static invert (out: Out, a: Out): Out; + /** + !#zh 矩阵行列式 + !#en Matrix determinant + */ + static determinant (a: Out): number; + /** + !#zh 矩阵乘法 + !#en Matrix Multiplication + */ + static multiply (out: Out, a: Out, b: Out): Out; + /** + !#zh 在给定矩阵变换基础上加入变换 + !#en Was added in a given transformation matrix transformation on the basis of + */ + static transform (out: Out, a: Out, v: VecLike): Out; + /** + !#zh 在给定矩阵变换基础上加入新位移变换 + !#en Add new displacement transducer in a matrix transformation on the basis of a given + */ + static translate (out: Out, a: Out, v: VecLike): Out; + /** + !#zh 在给定矩阵变换基础上加入新缩放变换 + !#en Add new scaling transformation in a given matrix transformation on the basis of + */ + static scale (out: Out, a: Out, v: VecLike): Out; + /** + !#zh 在给定矩阵变换基础上加入新旋转变换 + !#en Add a new rotational transform matrix transformation on the basis of a given + @param rad 旋转角度 + @param axis 旋转轴 + */ + static rotate (out: Out, a: Out, rad: number, axis: VecLike): Out; + /** + !#zh 在给定矩阵变换基础上加入绕 X 轴的旋转变换 + !#en Add rotational transformation around the X axis at a given matrix transformation on the basis of + @param rad 旋转角度 + */ + static rotateX (out: Out, a: Out, rad: number): Out; + /** + !#zh 在给定矩阵变换基础上加入绕 Y 轴的旋转变换 + !#en Add about the Y axis rotation transformation in a given matrix transformation on the basis of + @param rad 旋转角度 + */ + static rotateY (out: Out, a: Out, rad: number): Out; + /** + !#zh 在给定矩阵变换基础上加入绕 Z 轴的旋转变换 + !#en Added about the Z axis at a given rotational transformation matrix transformation on the basis of + @param rad 旋转角度 + */ + static rotateZ (out: Out, a: Out, rad: number): Out; + /** + !#zh 计算位移矩阵 + !#en Displacement matrix calculation + */ + static fromTranslation (out: Out, v: VecLike): Out; + /** + !#zh 计算缩放矩阵 + !#en Scaling matrix calculation + */ + static fromScaling (out: Out, v: VecLike): Out; + /** + !#zh 计算旋转矩阵 + !#en Calculates the rotation matrix + */ + static fromRotation (out: Out, rad: number, axis: VecLike): Out; + /** + !#zh 计算绕 X 轴的旋转矩阵 + !#en Calculating rotation matrix about the X axis + */ + static fromXRotation (out: Out, rad: number): Out; + /** + !#zh 计算绕 Y 轴的旋转矩阵 + !#en Calculating rotation matrix about the Y axis + */ + static fromYRotation (out: Out, rad: number): Out; + /** + !#zh 计算绕 Z 轴的旋转矩阵 + !#en Calculating rotation matrix about the Z axis + */ + static fromZRotation (out: Out, rad: number): Out; + /** + !#zh 根据旋转和位移信息计算矩阵 + !#en The rotation and displacement information calculating matrix + */ + static fromRT (out: Out, q: Quat, v: VecLike): Out; + /** + !#zh 提取矩阵的位移信息, 默认矩阵中的变换以 S->R->T 的顺序应用 + !#en Extracting displacement information of the matrix, the matrix transform to the default sequential application S-> R-> T is + */ + static getTranslation (out: VecLike, mat: Out): VecLike; + /** + !#zh 提取矩阵的缩放信息, 默认矩阵中的变换以 S->R->T 的顺序应用 + !#en Scaling information extraction matrix, the matrix transform to the default sequential application S-> R-> T is + */ + static getScaling (out: VecLike, mat: Out): VecLike; + /** + !#zh 提取矩阵的旋转信息, 默认输入矩阵不含有缩放信息,如考虑缩放应使用 `toRTS` 函数。 + !#en Rotation information extraction matrix, the matrix containing no default input scaling information, such as the use of `toRTS` should consider the scaling function. + */ + static getRotation (out: Quat, mat: Out): Quat; + /** + !#zh 提取旋转、位移、缩放信息, 默认矩阵中的变换以 S->R->T 的顺序应用 + !#en Extracting rotational displacement, zoom information, the default matrix transformation in order S-> R-> T applications + */ + static toRTS (mat: Out, q: Quat, v: VecLike, s: VecLike): void; + /** + !#zh 根据旋转、位移、缩放信息计算矩阵,以 S->R->T 的顺序应用 + !#en The rotary displacement, the scaling matrix calculation information, the order S-> R-> T applications + */ + static fromRTS (out: Out, q: Quat, v: VecLike, s: VecLike): Out; + /** + !#zh 根据指定的旋转、位移、缩放及变换中心信息计算矩阵,以 S->R->T 的顺序应用 + !#en According to the specified rotation, displacement, and scale conversion matrix calculation information center, order S-> R-> T applications + @param q 旋转值 + @param v 位移值 + @param s 缩放值 + @param o 指定变换中心 + */ + static fromRTSOrigin (out: Out, q: Quat, v: VecLike, s: VecLike, o: VecLike): Out; + /** + !#zh 根据指定的旋转信息计算矩阵 + !#en The rotation matrix calculation information specified + */ + static fromQuat (out: Out, q: Quat): Out; + /** + !#zh 根据指定的视锥体信息计算矩阵 + !#en The matrix calculation information specified frustum + @param left 左平面距离 + @param right 右平面距离 + @param bottom 下平面距离 + @param top 上平面距离 + @param near 近平面距离 + @param far 远平面距离 + */ + static frustum (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number): Out; + /** + !#zh 计算透视投影矩阵 + !#en Perspective projection matrix calculation + @param fovy 纵向视角高度 + @param aspect 长宽比 + @param near 近平面距离 + @param far 远平面距离 + */ + static perspective (out: Out, fovy: number, aspect: number, near: number, far: number): Out; + /** + !#zh 计算正交投影矩阵 + !#en Computing orthogonal projection matrix + @param left 左平面距离 + @param right 右平面距离 + @param bottom 下平面距离 + @param top 上平面距离 + @param near 近平面距离 + @param far 远平面距离 + */ + static ortho (out: Out, left: number, right: number, bottom: number, top: number, near: number, far: number): Out; + /** + !#zh 根据视点计算矩阵,注意 `eye - center` 不能为零向量或与 `up` 向量平行 + !#en `Up` parallel vector or vector center` not be zero - the matrix calculation according to the viewpoint, note` eye + @param eye 当前位置 + @param center 目标视点 + @param up 视口上方向 + */ + static lookAt (out: Out, eye: VecLike, center: VecLike, up: VecLike): Out; + /** + !#zh 计算逆转置矩阵 + !#en Reversal matrix calculation + */ + static inverseTranspose (out: Out, a: Out): Out; + /** + !#zh 逐元素矩阵加法 + !#en Element by element matrix addition + */ + static add (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素矩阵减法 + !#en Matrix element by element subtraction + */ + static subtract (out: Out, a: Out, b: Out): Out; + /** + !#zh 矩阵标量乘法 + !#en Matrix scalar multiplication + */ + static multiplyScalar (out: Out, a: Out, b: number): Out; + /** + !#zh 逐元素矩阵标量乘加: A + B * scale + !#en Elements of the matrix by the scalar multiplication and addition: A + B * scale + */ + static multiplyScalarAndAdd (out: Out, a: Out, b: Out, scale: number): Out; + /** + !#zh 矩阵等价判断 + !#en Analyzing the equivalent matrix + */ + static strictEquals (a: Out, b: Out): boolean; + /** + !#zh 排除浮点数误差的矩阵近似等价判断 + !#en Negative floating point error is approximately equivalent to determining a matrix + */ + static equals (a: Out, b: Out, epsilon?: number): boolean; + /** + !#zh 矩阵转数组 + !#en Matrix transpose array + @param ofs 数组内的起始偏移量 + */ + static toArray > (out: Out, mat: IMat4Like, ofs?: number): Out; + /** + !#zh 数组转矩阵 + !#en Transfer matrix array + @param ofs 数组起始偏移量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + /** !#en Matrix Data + !#zh 矩阵数据 */ + m: Float64Array|Float32Array; + /** + !#en + Constructor + see {{#crossLink "cc/mat4:method"}}cc.mat4{{/crossLink}} + !#zh + 构造函数,可查看 {{#crossLink "cc/mat4:method"}}cc.mat4{{/crossLink}} + */ + constructor ( m00?: number, m01?: number, m02?: number, m03?: number, m10?: number, m11?: number, m12?: number, m13?: number, m20?: number, m21?: number, m22?: number, m23?: number, m30?: number, m31?: number, m32?: number, m33?: number); + /** + !#en clone a Mat4 object + !#zh 克隆一个 Mat4 对象 + */ + clone(): Mat4; + /** + !#en Sets the matrix with another one's value + !#zh 用另一个矩阵设置这个矩阵的值。 + @param srcObj srcObj + */ + set(srcObj: Mat4): Mat4; + /** + !#en Check whether two matrix equal + !#zh 当前的矩阵是否与指定的矩阵相等。 + @param other other + */ + equals(other: Mat4): boolean; + /** + !#en Check whether two matrix equal with default degree of variance. + !#zh + 近似判断两个矩阵是否相等。
+ 判断 2 个矩阵是否在默认误差范围之内,如果在则返回 true,反之则返回 false。 + @param other other + */ + fuzzyEquals(other: Mat4): boolean; + /** + !#en Transform to string with matrix informations + !#zh 转换为方便阅读的字符串。 + */ + toString(): string; + /** + Set the matrix to the identity matrix + */ + identity(): Mat4; + /** + Transpose the values of a mat4 + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created. + */ + transpose(out?: Mat4): Mat4; + /** + Inverts a mat4 + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created. + */ + invert(out?: Mat4): Mat4; + /** + Calculates the adjugate of a mat4 + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created. + */ + adjoint(out?: Mat4): Mat4; + /** + Calculates the determinant of a mat4 + */ + determinant(): number; + /** + Adds two Mat4 + @param other the second operand + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created. + */ + add(other: Mat4, out?: Mat4): Mat4; + /** + Subtracts the current matrix with another one + @param other the second operand + */ + subtract(other: Mat4): Mat4; + /** + Subtracts the current matrix with another one + @param other the second operand + */ + multiply(other: Mat4): Mat4; + /** + Multiply each element of the matrix by a scalar. + @param number amount to scale the matrix's elements by + */ + multiplyScalar(number: number): Mat4; + /** + Translate a mat4 by the given vector + @param v vector to translate by + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + translate(v: Vec3, out?: Mat4): Mat4; + /** + Scales the mat4 by the dimensions in the given vec3 + @param v vector to scale by + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + scale(v: Vec3, out?: Mat4): Mat4; + /** + Rotates a mat4 by the given angle around the given axis + @param rad the angle to rotate the matrix by + @param axis the axis to rotate around + @param out the receiving matrix, you can pass the same matrix to save result to itself, if not provided, a new matrix will be created + */ + rotate(rad: number, axis: Vec3, out?: Mat4): Mat4; + /** + Returns the translation vector component of a transformation matrix. + @param out Vector to receive translation component, if not provided, a new vec3 will be created + */ + getTranslation(out: Vec3): Vec3; + /** + Returns the scale factor component of a transformation matrix + @param out Vector to receive scale component, if not provided, a new vec3 will be created + */ + getScale(out: Vec3): Vec3; + /** + Returns the rotation factor component of a transformation matrix + @param out Vector to receive rotation component, if not provided, a new quaternion object will be created + */ + getRotation(out: Quat): Quat; + /** + Restore the matrix values from a quaternion rotation, vector translation and vector scale + @param q Rotation quaternion + @param v Translation vector + @param s Scaling vector + */ + fromRTS(q: Quat, v: Vec3, s: Vec3): Mat4; + /** + Restore the matrix values from a quaternion rotation + @param q Rotation quaternion + */ + fromQuat(q: Quat): Mat4; + } + /** !#en Representation of 2D vectors and points. + !#zh 表示 2D 向量和坐标 */ + export class Quat extends ValueType { + /** + !#en + Constructor + see {{#crossLink "cc/quat:method"}}cc.quat{{/crossLink}} + !#zh + 构造函数,可查看 {{#crossLink "cc/quat:method"}}cc.quat{{/crossLink}} + @param x x + @param y y + @param z z + @param w w + */ + constructor(x?: number, y?: number, z?: number, w?: number); + /** + !#en Calculate the multiply result between this quaternion and another one + !#zh 计算四元数乘积的结果 + @param other other + @param out out + */ + mul(other: Quat, out?: Quat): Quat; + /** + !#zh 获得指定四元数的拷贝 + !#en Obtaining copy specified quaternion + */ + static clone (a: Out): Quat; + /** + !#zh 复制目标四元数 + !#en Copy quaternion target + */ + static copy (out: Out, a: QuatLike): Out; + /** + !#zh 设置四元数值 + !#en Provided Quaternion Value + */ + static set (out: Out, x: number, y: number, z: number, w: number): Out; + /** + !#zh 将目标赋值为单位四元数 + !#en The target of an assignment as a unit quaternion + */ + static identity (out: Out): Out; + /** + !#zh 设置四元数为两向量间的最短路径旋转,默认两向量都已归一化 + !#en Set quaternion rotation is the shortest path between two vectors, the default two vectors are normalized + */ + static rotationTo (out: Out, a: VecLike, b: VecLike): Out; + /** + !#zh 获取四元数的旋转轴和旋转弧度 + !#en Get the rotary shaft and the arc of rotation quaternion + @param outAxis 旋转轴输出 + @param q 源四元数 + */ + static getAxisAngle (outAxis: VecLike, q: Out): number; + /** + !#zh 四元数乘法 + !#en Quaternion multiplication + */ + static multiply (out: Out, a: QuatLike_1, b: QuatLike_2): Out; + /** + !#zh 四元数标量乘法 + !#en Quaternion scalar multiplication + */ + static multiplyScalar (out: Out, a: Out, b: number): Out; + /** + !#zh 四元数乘加:A + B * scale + !#en Quaternion multiplication and addition: A + B * scale + */ + static scaleAndAdd (out: Out, a: Out, b: Out, scale: number): Out; + /** + !#zh 绕 X 轴旋转指定四元数 + !#en About the X axis specified quaternion + @param rad 旋转弧度 + */ + static rotateX (out: Out, a: Out, rad: number): Out; + /** + !#zh 绕 Y 轴旋转指定四元数 + !#en Rotation about the Y axis designated quaternion + @param rad 旋转弧度 + */ + static rotateY (out: Out, a: Out, rad: number): Out; + /** + !#zh 绕 Z 轴旋转指定四元数 + !#en Around the Z axis specified quaternion + @param rad 旋转弧度 + */ + static rotateZ (out: Out, a: Out, rad: number): Out; + /** + !#zh 绕世界空间下指定轴旋转四元数 + !#en Space around the world at a given axis of rotation quaternion + @param axis 旋转轴,默认已归一化 + @param rad 旋转弧度 + */ + static rotateAround (out: Out, rot: Out, axis: VecLike, rad: number): Out; + /** + !#zh 绕本地空间下指定轴旋转四元数 + !#en Local space around the specified axis rotation quaternion + @param axis 旋转轴 + @param rad 旋转弧度 + */ + static rotateAroundLocal (out: Out, rot: Out, axis: VecLike, rad: number): Out; + /** + !#zh 根据 xyz 分量计算 w 分量,默认已归一化 + !#en The component w xyz components calculated, normalized by default + */ + static calculateW (out: Out, a: Out): Out; + /** + !#zh 四元数点积(数量积) + !#en Quaternion dot product (scalar product) + */ + static dot (a: Out, b: Out): number; + /** + !#zh 逐元素线性插值: A + t * (B - A) + !#en Element by element linear interpolation: A + t * (B - A) + */ + static lerp (out: Out, a: Out, b: Out, t: number): Out; + /** + !#zh 四元数球面插值 + !#en Spherical quaternion interpolation + */ + static slerp(out: Out, a: QuatLike_1, b: QuatLike_2, t: number): Out; + /** + !#zh 带两个控制点的四元数球面插值 + !#en Quaternion with two spherical interpolation control points + */ + static sqlerp (out: Out, a: Out, b: Out, c: Out, d: Out, t: number): Out; + /** + !#zh 四元数求逆 + !#en Quaternion inverse + */ + static invert (out: Out, a: QuatLike): Out; + /** + !#zh 求共轭四元数,对单位四元数与求逆等价,但更高效 + !#en Conjugating a quaternion, and the unit quaternion equivalent to inversion, but more efficient + */ + static conjugate (out: Out, a: Out): Out; + /** + !#zh 求四元数长度 + !#en Seek length quaternion + */ + static len (a: Out): number; + /** + !#zh 求四元数长度平方 + !#en Seeking quaternion square of the length + */ + static lengthSqr (a: Out): number; + /** + !#zh 归一化四元数 + !#en Normalized quaternions + */ + static normalize (out: Out, a: Out): Out; + /** + !#zh 根据本地坐标轴朝向计算四元数,默认三向量都已归一化且相互垂直 + !#en Calculated according to the local orientation quaternion coordinate axis, the default three vectors are normalized and mutually perpendicular + */ + static fromAxes (out: Out, xAxis: VecLike, yAxis: VecLike, zAxis: VecLike): Out; + /** + !#zh 根据视口的前方向和上方向计算四元数 + !#en The forward direction and the direction of the viewport computing quaternion + @param view 视口面向的前方向,必须归一化 + @param up 视口的上方向,必须归一化,默认为 (0, 1, 0) + */ + static fromViewUp (out: Out, view: Vec3, up?: Vec3): Out; + /** + !#zh 根据旋转轴和旋转弧度计算四元数 + !#en The quaternion calculated and the arc of rotation of the rotary shaft + */ + static fromAxisAngle (out: Out, axis: VecLike, rad: number): Out; + /** + !#zh 根据三维矩阵信息计算四元数,默认输入矩阵不含有缩放信息 + !#en Calculating the three-dimensional quaternion matrix information, default zoom information input matrix does not contain + */ + static fromMat3 (out: Out, mat: Mat3): Out; + /** + !#zh 根据欧拉角信息计算四元数,旋转顺序为 YZX + !#en The quaternion calculated Euler angle information, rotation order YZX + */ + static fromEuler (out: Out, x: number, y: number, z: number): Out; + /** + !#zh 返回定义此四元数的坐标系 X 轴向量 + !#en This returns the result of the quaternion coordinate system X-axis vector + */ + static toAxisX (out: VecLike, q: Out): VecLike; + /** + !#zh 返回定义此四元数的坐标系 Y 轴向量 + !#en This returns the result of the quaternion coordinate system Y axis vector + */ + static toAxisY (out: VecLike, q: Out): VecLike; + /** + !#zh 返回定义此四元数的坐标系 Z 轴向量 + !#en This returns the result of the quaternion coordinate system the Z-axis vector + */ + static toAxisZ (out: VecLike, q: Out): VecLike; + /** + !#zh 根据四元数计算欧拉角,返回角度 x, y 在 [-180, 180] 区间内, z 默认在 [-90, 90] 区间内,旋转顺序为 YZX + !#en The quaternion calculated Euler angles, return angle x, y in the [-180, 180] interval, z default the range [-90, 90] interval, the rotation order YZX + @param outerZ z 取值范围区间改为 [-180, -90] U [90, 180] + */ + static toEuler (out: Out, q: IQuatLike, outerZ?: boolean): Out; + /** + !#zh 四元数等价判断 + !#en Analyzing quaternion equivalent + */ + static strictEquals (a: Out, b: Out): boolean; + /** + !#zh 排除浮点数误差的四元数近似等价判断 + !#en Negative floating point error quaternion approximately equivalent Analyzing + */ + static equals (a: Out, b: Out, epsilon?: number): boolean; + /** + !#zh 四元数转数组 + !#en Quaternion rotation array + @param ofs 数组内的起始偏移量 + */ + static toArray > (out: Out, q: IQuatLike, ofs?: number): Out; + /** + !#zh 数组转四元数 + !#en Array to a quaternion + @param ofs 数组起始偏移量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + x: number; + y: number; + z: number; + w: number; + /** + !#en clone a Quat object and return the new object + !#zh 克隆一个四元数并返回 + */ + clone(): Quat; + /** + !#en Set values with another quaternion + !#zh 用另一个四元数的值设置到当前对象上。 + @param newValue !#en new value to set. !#zh 要设置的新值 + */ + set(newValue: Quat): Quat; + /** + !#en Check whether current quaternion equals another + !#zh 当前的四元数是否与指定的四元数相等。 + @param other other + */ + equals(other: Quat): boolean; + /** + !#en Convert quaternion to euler + !#zh 转换四元数到欧拉角 + @param out out + */ + toEuler(out: Vec3): Vec3; + /** + !#en Convert euler to quaternion + !#zh 转换欧拉角到四元数 + @param euler euler + */ + fromEuler(euler: Vec3): Quat; + /** + !#en Calculate the interpolation result between this quaternion and another one with given ratio + !#zh 计算四元数的插值结果 + @param to to + @param ratio ratio + @param out out + */ + lerp(to: Quat, ratio: number, out?: Quat): Quat; + /** + !#en Calculate the multiply result between this quaternion and another one + !#zh 计算四元数乘积的结果 + @param other other + */ + multiply(other: Quat): Quat; + /** + !#en Rotates a quaternion by the given angle (in radians) about a world space axis. + !#zh 围绕世界空间轴按给定弧度旋转四元数 + @param rot Quaternion to rotate + @param axis The axis around which to rotate in world space + @param rad Angle (in radians) to rotate + @param out Quaternion to store result + */ + rotateAround(rot: Quat, axis: Vec3, rad: number, out?: Quat): Quat; + } + /** Mathematical 3x3 matrix. + + NOTE: we use column-major matrix for all matrix calculation. + + This may lead to some confusion when referencing OpenGL documentation, + however, which represents out all matricies in column-major format. + This means that while in code a matrix may be typed out as: + + [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + x, y, z, 0] + + The same matrix in the [OpenGL documentation](https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTranslate.xml) + is written as: + + 1 0 0 x + 0 1 0 y + 0 0 1 z + 0 0 0 0 + + Please rest assured, however, that they are the same thing! + This is not unique to glMatrix, either, as OpenGL developers have long been confused by the + apparent lack of consistency between the memory layout and the documentation. */ + export class Mat3 extends ValueType { + /** Identity of Mat3 */ + static IDENTITY: Mat3; + /** + !#zh 矩阵转数组 + !#en Matrix transpose array + @param ofs 数组内的起始偏移量 + */ + static toArray > (out: Out, mat: IMat3Like, ofs?: number): Out; + /** + !#zh 数组转矩阵 + !#en Transfer matrix array + @param ofs 数组起始偏移量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + /** !#en Matrix Data + !#zh 矩阵数据 */ + m: Float64Array|Float32Array; + constructor (m00?: number | Float32Array, m01?: number, m02?: number, m03?: number, m04?: number, m05?: number, m06?: number, m07?: number, m08?: number); + } + /** !#en + cc.Size is the class for size object,
+ please do not use its constructor to create sizes,
+ use {{#crossLink "cc/size:method"}}{{/crossLink}} alias function instead.
+ It will be deprecated soon, please use cc.Vec2 instead. + + !#zh + cc.Size 是 size 对象的类。
+ 请不要使用它的构造函数创建的 size,
+ 使用 {{#crossLink "cc/size:method"}}{{/crossLink}} 别名函数。
+ 它不久将被取消,请使用cc.Vec2代替。 */ + export class Size { + /** + + @param width width + @param height height + */ + constructor(width: number|Size, height?: number); + /** !#en return a Size object with width = 0 and height = 0. + !#zh 返回一个宽度为 0 和高度为 0 的 Size 对象。 */ + static ZERO: Size; + width: number; + height: number; + /** + !#en TODO + !#zh 克隆 size 对象。 + + @example + ```js + var a = new cc.size(10, 10); + a.clone();// return Size {width: 0, height: 0}; + ``` + */ + clone(): Size; + /** + !#en TODO + !#zh 当前 Size 对象是否等于指定 Size 对象。 + @param other other + + @example + ```js + var a = new cc.size(10, 10); + a.equals(new cc.size(10, 10));// return true; + ``` + */ + equals(other: Size): boolean; + /** + !#en TODO + !#zh 线性插值。 + @param to to + @param ratio the interpolation coefficient. + @param out optional, the receiving vector. + + @example + ```js + var a = new cc.size(10, 10); + var b = new cc.rect(50, 50, 100, 100); + update (dt) { + // method 1; + var c = a.lerp(b, dt * 0.1); + // method 2; + a.lerp(b, dt * 0.1, c); + } + ``` + */ + lerp(to: Rect, ratio: number, out?: Size): Size; + /** + !#en TODO + !#zh 转换为方便阅读的字符串。 + + @example + ```js + var a = new cc.size(10, 10); + a.toString();// return "(10.00, 10.00)"; + ``` + */ + toString(): string; + } + /** !#en The base class of all value types. + !#zh 所有值类型的基类。 */ + export class ValueType { + /** + !#en This method returns an exact copy of current value. + !#zh 克隆当前值,该方法返回一个新对象,新对象的值和原对象相等。 + */ + clone(): ValueType; + /** + !#en Compares this object with the other one. + !#zh 当前对象是否等于指定对象。 + @param other other + */ + equals(other: ValueType): boolean; + /** + !#en + Linearly interpolates between this value to to value by ratio which is in the range [0, 1]. + When ratio = 0 returns this. When ratio = 1 return to. When ratio = 0.5 returns the average of this and to. + !#zh + 线性插值。
+ 当 ratio = 0 时返回自身,ratio = 1 时返回目标,ratio = 0.5 返回自身和目标的平均值。。 + @param to the to value + @param ratio the interpolation coefficient + */ + lerp(to: ValueType, ratio: number): ValueType; + /** + !#en + Copys all the properties from another given object to this value. + !#zh + 从其它对象把所有属性复制到当前对象。 + @param source the source to copy + */ + set(source: ValueType): void; + /** + !#en Convert to a readable string. + !#zh 转换为方便阅读的字符串。 + */ + toString(): string; + } + /** !#en Representation of 2D vectors and points. + !#zh 表示 2D 向量和坐标 */ + export class Vec2 extends ValueType { + /** + !#en Returns the length of this vector. + !#zh 返回该向量的长度。 + + @example + ```js + var v = cc.v2(10, 10); + v.mag(); // return 14.142135623730951; + ``` + */ + mag(): number; + /** + !#en Returns the squared length of this vector. + !#zh 返回该向量的长度平方。 + + @example + ```js + var v = cc.v2(10, 10); + v.magSqr(); // return 200; + ``` + */ + magSqr(): number; + /** + !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead. + !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.subSelf(cc.v2(5, 5));// return Vec2 {x: 5, y: 5}; + ``` + */ + subSelf(vector: Vec2): Vec2; + /** + !#en Subtracts one vector from this, and returns the new result. + !#zh 向量减法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + + @example + ```js + var v = cc.v2(10, 10); + v.sub(cc.v2(5, 5)); // return Vec2 {x: 5, y: 5}; + var v1 = new Vec2; + v.sub(cc.v2(5, 5), v1); // return Vec2 {x: 5, y: 5}; + ``` + */ + sub(vector: Vec2, out?: Vec2): Vec2; + /** + !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead. + !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。 + @param num num + + @example + ```js + var v = cc.v2(10, 10); + v.mulSelf(5);// return Vec2 {x: 50, y: 50}; + ``` + */ + mulSelf(num: number): Vec2; + /** + !#en Multiplies by a number, and returns the new result. + !#zh 缩放向量,并返回新结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + + @example + ```js + var v = cc.v2(10, 10); + v.mul(5); // return Vec2 {x: 50, y: 50}; + var v1 = new Vec2; + v.mul(5, v1); // return Vec2 {x: 50, y: 50}; + ``` + */ + mul(num: number, out?: Vec2): Vec2; + /** + !#en Divides by a number. If you want to save result to another vector, use div() instead. + !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。 + @param num num + + @example + ```js + var v = cc.v2(10, 10); + v.divSelf(5); // return Vec2 {x: 2, y: 2}; + ``` + */ + divSelf(num: number): Vec2; + /** + !#en Divides by a number, and returns the new result. + !#zh 向量除法,并返回新的结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + + @example + ```js + var v = cc.v2(10, 10); + v.div(5); // return Vec2 {x: 2, y: 2}; + var v1 = new Vec2; + v.div(5, v1); // return Vec2 {x: 2, y: 2}; + ``` + */ + div(num: number, out?: Vec2): Vec2; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.scaleSelf(cc.v2(5, 5));// return Vec2 {x: 50, y: 50}; + ``` + */ + scaleSelf(vector: Vec2): Vec2; + /** + !#en Multiplies two vectors, and returns the new result. + !#zh 分量相乘,并返回新的结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + + @example + ```js + var v = cc.v2(10, 10); + v.scale(cc.v2(5, 5)); // return Vec2 {x: 50, y: 50}; + var v1 = new Vec2; + v.scale(cc.v2(5, 5), v1); // return Vec2 {x: 50, y: 50}; + ``` + */ + scale(vector: Vec2, out?: Vec2): Vec2; + /** + !#en Negates the components. If you want to save result to another vector, use neg() instead. + !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。 + + @example + ```js + var v = cc.v2(10, 10); + v.negSelf(); // return Vec2 {x: -10, y: -10}; + ``` + */ + negSelf(): Vec2; + /** + !#en Negates the components, and returns the new result. + !#zh 返回取反后的新向量。 + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + + @example + ```js + var v = cc.v2(10, 10); + var v1 = new Vec2; + v.neg(v1); // return Vec2 {x: -10, y: -10}; + ``` + */ + neg(out?: Vec2): Vec2; + /** !#en return a Vec2 object with x = 1 and y = 1. + !#zh 新 Vec2 对象。 */ + static ONE: Vec2; + /** !#en return a Vec2 object with x = 0 and y = 0. + !#zh 返回 x = 0 和 y = 0 的 Vec2 对象。 */ + static ZERO: Vec2; + /** !#en return a readonly Vec2 object with x = 0 and y = 0. + !#zh 返回一个 x = 0 和 y = 0 的 Vec2 只读对象。 */ + static ZERO_R: Vec2; + /** !#en return a Vec2 object with x = 0 and y = 1. + !#zh 返回 x = 0 和 y = 1 的 Vec2 对象。 */ + static UP: Vec2; + /** !#en return a readonly Vec2 object with x = 0 and y = 1. + !#zh 返回 x = 0 和 y = 1 的 Vec2 只读对象。 */ + static UP_R: Vec2; + /** !#en return a readonly Vec2 object with x = 1 and y = 0. + !#zh 返回 x = 1 和 y = 0 的 Vec2 只读对象。 */ + static RIGHT: Vec2; + /** !#en return a Vec2 object with x = 1 and y = 0. + !#zh 返回 x = 1 和 y = 0 的 Vec2 对象。 */ + static RIGHT_R: Vec2; + /** + !#zh 获得指定向量的拷贝 + */ + static clone (a: Out): Vec2; + /** + !#zh 复制指定向量的值 + */ + static copy (out: Out, a: Out): Out; + /** + !#zh 设置向量值 + */ + static set (out: Out, x: number, y: number): Out; + /** + !#zh 逐元素向量加法 + */ + static add (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量减法 + */ + static subtract (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量乘法 + */ + static multiply (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量除法 + */ + static divide (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量向上取整 + */ + static ceil (out: Out, a: Out): Out; + /** + !#zh 逐元素向量向下取整 + */ + static floor (out: Out, a: Out): Out; + /** + !#zh 逐元素向量最小值 + */ + static min (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量最大值 + */ + static max (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量四舍五入取整 + */ + static round (out: Out, a: Out): Out; + /** + !#zh 向量标量乘法 + */ + static multiplyScalar (out: Out, a: Out, b: number): Out; + /** + !#zh 逐元素向量乘加: A + B * scale + */ + static scaleAndAdd (out: Out, a: Out, b: Out, scale: number): Out; + /** + !#zh 求两向量的欧氏距离 + */ + static distance (a: Out, b: Out): number; + /** + !#zh 求两向量的欧氏距离平方 + */ + static squaredDistance (a: Out, b: Out): number; + /** + !#zh 求向量长度 + */ + static len (a: Out): number; + /** + !#zh 求向量长度平方 + */ + static lengthSqr (a: Out): number; + /** + !#zh 逐元素向量取负 + */ + static negate (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 Infinity + */ + static inverse (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 0 + */ + static inverseSafe (out: Out, a: Out): Out; + /** + !#zh 归一化向量 + */ + static normalize (out: Out, a: Vec2Like): Out; + /** + !#zh 向量点积(数量积) + */ + static dot (a: Out, b: Out): number; + /** + !#zh 向量叉积(向量积),注意二维向量的叉积为与 Z 轴平行的三维向量 + */ + static cross (out: Vec2, a: Out, b: Out): Vec2; + /** + !#zh 逐元素向量线性插值: A + t * (B - A) + */ + static lerp (out: Out, a: Out, b: Out, t: number): Out; + /** + !#zh 生成一个在单位圆上均匀分布的随机向量 + */ + static random (out: Out, scale?: number): Out; + /** + !#zh 向量与三维矩阵乘法,默认向量第三位为 1。 + */ + static transformMat3 (out: Out, a: Out, mat: IMat3Like): Out; + /** + !#zh 向量与四维矩阵乘法,默认向量第三位为 0,第四位为 1。 + */ + static transformMat4 (out: Out, a: Out, mat: MatLike): Out; + /** + !#zh 向量等价判断 + */ + static strictEquals (a: Out, b: Out): boolean; + /** + !#zh 排除浮点数误差的向量近似等价判断 + */ + static equals (a: Out, b: Out, epsilon?: number): boolean; + /** + !#zh 排除浮点数误差的向量近似等价判断 + */ + static angle (a: Out, b: Out): number; + /** + !#zh 向量转数组 + */ + static toArray > (out: Out, v: IVec2Like, ofs?: number): Out; + /** + !#zh 数组转向量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + x: number; + y: number; + /** + !#en + Constructor + see {{#crossLink "cc/vec2:method"}}cc.v2{{/crossLink}} or {{#crossLink "cc/p:method"}}cc.p{{/crossLink}} + !#zh + 构造函数,可查看 {{#crossLink "cc/vec2:method"}}cc.v2{{/crossLink}} 或者 {{#crossLink "cc/p:method"}}cc.p{{/crossLink}} + @param x x + @param y y + */ + constructor(x?: number, y?: number); + /** + !#en clone a Vec2 object + !#zh 克隆一个 Vec2 对象 + */ + clone(): Vec2; + /** + !#en Sets vector with another's value + !#zh 设置向量值。 + @param newValue !#en new value to set. !#zh 要设置的新值 + */ + set(newValue: Vec2): Vec2; + /** + !#en Check whether two vector equal + !#zh 当前的向量是否与指定的向量相等。 + @param other other + */ + equals(other: Vec2): boolean; + /** + !#en Check whether two vector equal with some degree of variance. + !#zh + 近似判断两个点是否相等。
+ 判断 2 个向量是否在指定数值的范围之内,如果在则返回 true,反之则返回 false。 + @param other other + @param variance variance + */ + fuzzyEquals(other: Vec2, variance: number): boolean; + /** + !#en Transform to string with vector informations + !#zh 转换为方便阅读的字符串。 + */ + toString(): string; + /** + !#en Calculate linear interpolation result between this vector and another one with given ratio + !#zh 线性插值。 + @param to to + @param ratio the interpolation coefficient + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + */ + lerp(to: Vec2, ratio: number, out?: Vec2): Vec2; + /** + !#en Clamp the vector between from float and to float. + !#zh + 返回指定限制区域后的向量。
+ 向量大于 max_inclusive 则返回 max_inclusive。
+ 向量小于 min_inclusive 则返回 min_inclusive。
+ 否则返回自身。 + @param min_inclusive min_inclusive + @param max_inclusive max_inclusive + + @example + ```js + var min_inclusive = cc.v2(0, 0); + var max_inclusive = cc.v2(20, 20); + var v1 = cc.v2(20, 20).clampf(min_inclusive, max_inclusive); // Vec2 {x: 20, y: 20}; + var v2 = cc.v2(0, 0).clampf(min_inclusive, max_inclusive); // Vec2 {x: 0, y: 0}; + var v3 = cc.v2(10, 10).clampf(min_inclusive, max_inclusive); // Vec2 {x: 10, y: 10}; + ``` + */ + clampf(min_inclusive: Vec2, max_inclusive: Vec2): Vec2; + /** + !#en Adds this vector. + !#zh 向量加法。 + @param vector vector + @param out out + + @example + ```js + var v = cc.v2(10, 10); + v.add(cc.v2(5, 5));// return Vec2 {x: 15, y: 15}; + ``` + */ + add(vector: Vec2, out?: Vec2): Vec2; + /** + !#en Adds this vector. If you want to save result to another vector, use add() instead. + !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。 + @param vector vector + */ + addSelf(vector: Vec2): Vec2; + /** + !#en Subtracts one vector from this. + !#zh 向量减法。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.subSelf(cc.v2(5, 5));// return Vec2 {x: 5, y: 5}; + ``` + */ + subtract(vector: Vec2): Vec2; + /** + !#en Multiplies this by a number. + !#zh 缩放当前向量。 + @param num num + + @example + ```js + var v = cc.v2(10, 10); + v.multiply(5);// return Vec2 {x: 50, y: 50}; + ``` + */ + multiplyScalar(num: number): Vec2; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.multiply(cc.v2(5, 5));// return Vec2 {x: 50, y: 50}; + ``` + */ + multiply(vector: Vec2): Vec2; + /** + !#en Divides by a number. + !#zh 向量除法。 + @param num num + + @example + ```js + var v = cc.v2(10, 10); + v.divide(5); // return Vec2 {x: 2, y: 2}; + ``` + */ + divide(num: number): Vec2; + /** + !#en Negates the components. + !#zh 向量取反。 + + @example + ```js + var v = cc.v2(10, 10); + v.negate(); // return Vec2 {x: -10, y: -10}; + ``` + */ + negate(): Vec2; + /** + !#en Dot product + !#zh 当前向量与指定向量进行点乘。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.dot(cc.v2(5, 5)); // return 100; + ``` + */ + dot(vector?: Vec2): number; + /** + !#en Cross product + !#zh 当前向量与指定向量进行叉乘。 + @param vector vector + + @example + ```js + var v = cc.v2(10, 10); + v.cross(cc.v2(5, 5)); // return 0; + ``` + */ + cross(vector?: Vec2): number; + /** + !#en Returns the length of this vector. + !#zh 返回该向量的长度。 + + @example + ```js + var v = cc.v2(10, 10); + v.len(); // return 14.142135623730951; + ``` + */ + len(): number; + /** + !#en Returns the squared length of this vector. + !#zh 返回该向量的长度平方。 + + @example + ```js + var v = cc.v2(10, 10); + v.lengthSqr(); // return 200; + ``` + */ + lengthSqr(): number; + /** + !#en Make the length of this vector to 1. + !#zh 向量归一化,让这个向量的长度为 1。 + + @example + ```js + var v = cc.v2(10, 10); + v.normalizeSelf(); // return Vec2 {x: 0.7071067811865475, y: 0.7071067811865475}; + ``` + */ + normalizeSelf(): Vec2; + /** + !#en + Returns this vector with a magnitude of 1.
+
+ Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function. + !#zh + 返回归一化后的向量。
+
+ 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。 + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + */ + normalize(out?: Vec2): Vec2; + /** + !#en Get angle in radian between this and vector. + !#zh 夹角的弧度。 + @param vector vector + */ + angle(vector: Vec2): number; + /** + !#en Get angle in radian between this and vector with direction. + !#zh 带方向的夹角的弧度。 + @param vector vector + */ + signAngle(vector: Vec2): number; + /** + !#en rotate + !#zh 返回旋转给定弧度后的新向量。 + @param radians radians + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + */ + rotate(radians: number, out?: Vec2): Vec2; + /** + !#en rotate self + !#zh 按指定弧度旋转向量。 + @param radians radians + */ + rotateSelf(radians: number): Vec2; + /** + !#en Calculates the projection of the current vector over the given vector. + !#zh 返回当前向量在指定 vector 向量上的投影向量。 + @param vector vector + + @example + ```js + var v1 = cc.v2(20, 20); + var v2 = cc.v2(5, 5); + v1.project(v2); // Vec2 {x: 20, y: 20}; + ``` + */ + project(vector: Vec2): Vec2; + /** + Transforms the vec2 with a mat4. 3rd vector component is implicitly '0', 4th vector component is implicitly '1' + @param m matrix to transform with + @param out the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + */ + transformMat4(m: Mat4, out?: Vec2): Vec2; + /** + Returns the maximum value in x, y. + */ + maxAxis(): number; + } + /** !#en A 2D rectangle defined by x, y position and width, height. + !#zh 通过位置和宽高定义的 2D 矩形。 */ + export class Rect extends ValueType { + /** + !#en + Constructor of Rect class. + see {{#crossLink "cc/rect:method"}} cc.rect {{/crossLink}} for convenience method. + !#zh + Rect类的构造函数。可以通过 {{#crossLink "cc/rect:method"}} cc.rect {{/crossLink}} 简便方法进行创建。 + @param x x + @param y y + @param w w + @param h h + */ + constructor(x?: number, y?: number, w?: number, h?: number); + /** + !#en Creates a rectangle from two coordinate values. + !#zh 根据指定 2 个坐标创建出一个矩形区域。 + @param v1 v1 + @param v2 v2 + + @example + ```js + cc.Rect.fromMinMax(cc.v2(10, 10), cc.v2(20, 20)); // Rect {x: 10, y: 10, width: 10, height: 10}; + ``` + */ + static fromMinMax(v1: Vec2, v2: Vec2): Rect; + x: number; + y: number; + width: number; + height: number; + /** + !#en TODO + !#zh 克隆一个新的 Rect。 + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + a.clone();// Rect {x: 0, y: 0, width: 10, height: 10} + ``` + */ + clone(): Rect; + /** + !#en TODO + !#zh 是否等于指定的矩形。 + @param other other + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + var b = new cc.Rect(0, 0, 10, 10); + a.equals(b);// true; + ``` + */ + equals(other: Rect): boolean; + /** + !#en TODO + !#zh 线性插值 + @param to to + @param ratio the interpolation coefficient. + @param out optional, the receiving vector. + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + var b = new cc.Rect(50, 50, 100, 100); + update (dt) { + // method 1; + var c = a.lerp(b, dt * 0.1); + // method 2; + a.lerp(b, dt * 0.1, c); + } + ``` + */ + lerp(to: Rect, ratio: number, out?: Rect): Rect; + /** + !#en Check whether the current rectangle intersects with the given one + !#zh 当前矩形与指定矩形是否相交。 + @param rect rect + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + var b = new cc.Rect(0, 0, 20, 20); + a.intersects(b);// true + ``` + */ + intersects(rect: Rect): boolean; + /** + !#en Returns the overlapping portion of 2 rectangles. + !#zh 返回 2 个矩形重叠的部分。 + @param out Stores the result + @param rectB rectB + + @example + ```js + var a = new cc.Rect(0, 10, 20, 20); + var b = new cc.Rect(0, 10, 10, 10); + var intersection = new cc.Rect(); + a.intersection(intersection, b); // intersection {x: 0, y: 10, width: 10, height: 10}; + ``` + */ + intersection(out: Rect, rectB: Rect): Rect; + /** + !#en Check whether the current rect contains the given point + !#zh 当前矩形是否包含指定坐标点。 + Returns true if the point inside this rectangle. + @param point point + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + var b = new cc.Vec2(0, 5); + a.contains(b);// true + ``` + */ + contains(point: Vec2): boolean; + /** + !#en Returns true if the other rect totally inside this rectangle. + !#zh 当前矩形是否包含指定矩形。 + @param rect rect + + @example + ```js + var a = new cc.Rect(0, 0, 20, 20); + var b = new cc.Rect(0, 0, 10, 10); + a.containsRect(b);// true + ``` + */ + containsRect(rect: Rect): boolean; + /** + !#en Returns the smallest rectangle that contains the current rect and the given rect. + !#zh 返回一个包含当前矩形和指定矩形的最小矩形。 + @param out Stores the result + @param rectB rectB + + @example + ```js + var a = new cc.Rect(0, 10, 20, 20); + var b = new cc.Rect(0, 10, 10, 10); + var union = new cc.Rect(); + a.union(union, b); // union {x: 0, y: 10, width: 20, height: 20}; + ``` + */ + union(out: Rect, rectB: Rect): Rect; + /** + !#en Apply matrix4 to the rect. + !#zh 使用 mat4 对矩形进行矩阵转换。 + @param out The output rect + @param mat The matrix4 + */ + transformMat4(out: Rect, mat: Mat4): void; + /** + !#en Output rect informations to string + !#zh 转换为方便阅读的字符串 + + @example + ```js + var a = new cc.Rect(0, 0, 10, 10); + a.toString();// "(0.00, 0.00, 10.00, 10.00)"; + ``` + */ + toString(): string; + /** !#en The minimum x value, equals to rect.x + !#zh 矩形 x 轴上的最小值,等价于 rect.x。 */ + xMin: number; + /** !#en The minimum y value, equals to rect.y + !#zh 矩形 y 轴上的最小值。 */ + yMin: number; + /** !#en The maximum x value. + !#zh 矩形 x 轴上的最大值。 */ + xMax: number; + /** !#en The maximum y value. + !#zh 矩形 y 轴上的最大值。 */ + yMax: number; + /** !#en The position of the center of the rectangle. + !#zh 矩形的中心点。 */ + center: Vec2; + /** !#en The X and Y position of the rectangle. + !#zh 矩形的 x 和 y 坐标。 */ + origin: Vec2; + /** !#en Width and height of the rectangle. + !#zh 矩形的大小。 */ + size: Size; + } + /** !#en Representation of 3D vectors and points. + !#zh 表示 3D 向量和坐标 */ + export class Vec3 extends ValueType { + /** + !#en Returns the length of this vector. + !#zh 返回该向量的长度。 + + @example + ```js + var v = cc.v3(10, 10, 10); + v.mag(); // return 17.320508075688775; + ``` + */ + mag(): number; + /** + !#en Returns the squared length of this vector. + !#zh 返回该向量的长度平方。 + */ + magSqr(): number; + /** + !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead. + !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。 + @param vector vector + */ + subSelf(vector: Vec3): Vec3; + /** + !#en Subtracts one vector from this, and returns the new result. + !#zh 向量减法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + sub(vector: Vec3, out?: Vec3): Vec3; + /** + !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead. + !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。 + @param num num + */ + mulSelf(num: number): Vec3; + /** + !#en Multiplies by a number, and returns the new result. + !#zh 缩放向量,并返回新结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + mul(num: number, out?: Vec3): Vec3; + /** + !#en Divides by a number. If you want to save result to another vector, use div() instead. + !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。 + @param num num + */ + divSelf(num: number): Vec3; + /** + !#en Divides by a number, and returns the new result. + !#zh 向量除法,并返回新的结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + div(num: number, out?: Vec3): Vec3; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + */ + scaleSelf(vector: Vec3): Vec3; + /** + !#en Multiplies two vectors, and returns the new result. + !#zh 分量相乘,并返回新的结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + scale(vector: Vec3, out?: Vec3): Vec3; + /** + !#en Negates the components. If you want to save result to another vector, use neg() instead. + !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。 + */ + negSelf(): Vec3; + /** + !#en Negates the components, and returns the new result. + !#zh 返回取反后的新向量。 + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + neg(out?: Vec3): Vec3; + /** !#en return a Vec3 object with x = 1, y = 1, z = 1. + !#zh 新 Vec3 对象。 */ + static ONE: Vec3; + /** !#en return a Vec3 object with x = 0, y = 0, z = 0. + !#zh 返回 x = 0,y = 0,z = 0 的 Vec3 对象。 */ + static ZERO: Vec3; + /** !#en return a Vec3 object with x = 0, y = 1, z = 0. + !#zh 返回 x = 0, y = 1, z = 0 的 Vec3 对象。 */ + static UP: Vec3; + /** !#en return a Vec3 object with x = 1, y = 0, z = 0. + !#zh 返回 x = 1,y = 0,z = 0 的 Vec3 对象。 */ + static RIGHT: Vec3; + /** !#en return a Vec3 object with x = 0, y = 0, z = 1. + !#zh 返回 x = 0,y = 0,z = 1 的 Vec3 对象。 */ + static FORWARD: Vec3; + /** + !#zh 将目标赋值为零向量 + !#en The target of an assignment zero vector + */ + static zero (out: Out): Out; + /** + !#zh 获得指定向量的拷贝 + !#en Obtaining copy vectors designated + */ + static clone (a: Out): Vec3; + /** + !#zh 复制目标向量 + !#en Copy the target vector + */ + static copy (out: Out, a: Vec3Like): Out; + /** + !#zh 设置向量值 + !#en Set to value + */ + static set (out: Out, x: number, y: number, z: number): Out; + /** + !#zh 逐元素向量加法 + !#en Element-wise vector addition + */ + static add (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量减法 + !#en Element-wise vector subtraction + */ + static subtract (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量乘法 (分量积) + !#en Element-wise vector multiplication (product component) + */ + static multiply (out: Out, a: Vec3Like_1, b: Vec3Like_2): Out; + /** + !#zh 逐元素向量除法 + !#en Element-wise vector division + */ + static divide (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量向上取整 + !#en Rounding up by elements of the vector + */ + static ceil (out: Out, a: Out): Out; + /** + !#zh 逐元素向量向下取整 + !#en Element vector by rounding down + */ + static floor (out: Out, a: Out): Out; + /** + !#zh 逐元素向量最小值 + !#en The minimum by-element vector + */ + static min (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量最大值 + !#en The maximum value of the element-wise vector + */ + static max (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量四舍五入取整 + !#en Element-wise vector of rounding to whole + */ + static round (out: Out, a: Out): Out; + /** + !#zh 向量标量乘法 + !#en Vector scalar multiplication + */ + static multiplyScalar (out: Out, a: Vec3Like, b: number): Out; + /** + !#zh 逐元素向量乘加: A + B * scale + !#en Element-wise vector multiply add: A + B * scale + */ + static scaleAndAdd (out: Out, a: Out, b: Out, scale: number): Out; + /** + !#zh 求两向量的欧氏距离 + !#en Seeking two vectors Euclidean distance + */ + static distance (a: Out, b: Out): number; + /** + !#zh 求两向量的欧氏距离平方 + !#en Euclidean distance squared seeking two vectors + */ + static squaredDistance (a: Out, b: Out): number; + /** + !#zh 求向量长度 + !#en Seeking vector length + */ + static len (a: Out): number; + /** + !#zh 求向量长度平方 + !#en Seeking squared vector length + */ + static lengthSqr (a: Out): number; + /** + !#zh 逐元素向量取负 + !#en By taking the negative elements of the vector + */ + static negate (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 Infinity + !#en Element vector by taking the inverse, return near 0 Infinity + */ + static inverse (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 0 + !#en Element vector by taking the inverse, return near 0 0 + */ + static inverseSafe (out: Out, a: Out): Out; + /** + !#zh 归一化向量 + !#en Normalized vector + */ + static normalize (out: Out, a: Vec3Like): Out; + /** + !#zh 向量点积(数量积) + !#en Vector dot product (scalar product) + */ + static dot (a: Out, b: Out): number; + /** + !#zh 向量叉积(向量积) + !#en Vector cross product (vector product) + */ + static cross (out: Out, a: Vec3Like_1, b: Vec3Like_2): Out; + /** + !#zh 逐元素向量线性插值: A + t * (B - A) + !#en Vector element by element linear interpolation: A + t * (B - A) + */ + static lerp (out: Out, a: Out, b: Out, t: number): Out; + /** + !#zh 生成一个在单位球体上均匀分布的随机向量 + !#en Generates a uniformly distributed random vectors on the unit sphere + @param scale 生成的向量长度 + */ + static random (out: Out, scale?: number): Out; + /** + !#zh 向量与四维矩阵乘法,默认向量第四位为 1。 + !#en Four-dimensional vector and matrix multiplication, the default vectors fourth one. + */ + static transformMat4 (out: Out, a: Vec3Like, mat: MatLike): Out; + /** + !#zh 向量与四维矩阵乘法,默认向量第四位为 0。 + !#en Four-dimensional vector and matrix multiplication, vector fourth default is 0. + */ + static transformMat4Normal (out: Out, a: Out, mat: MatLike): Out; + /** + !#zh 向量与三维矩阵乘法 + !#en Dimensional vector matrix multiplication + */ + static transformMat3 (out: Out, a: Out, mat: MatLike): Out; + /** + !#zh 向量仿射变换 + !#en Affine transformation vector + */ + static transformAffine(out: Out, v: VecLike, mat: MatLike): Out; + /** + !#zh 向量四元数乘法 + !#en Vector quaternion multiplication + */ + static transformQuat (out: Out, a: VecLike, q: QuatLike): Out; + /** + !#zh 以缩放 -> 旋转 -> 平移顺序变换向量 + !#en To scale -> rotation -> transformation vector sequence translation + */ + static transformRTS(out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike): Out; + /** + !#zh 以平移 -> 旋转 -> 缩放顺序逆变换向量 + !#en Translational -> rotation -> Zoom inverse transformation vector sequence + */ + static transformInverseRTS(out: Out, a: VecLike, r: QuatLike, t: VecLike, s: VecLike): Out; + /** + !#zh 绕 X 轴旋转向量指定弧度 + !#en Rotation vector specified angle about the X axis + @param v 待旋转向量 + @param o 旋转中心 + @param a 旋转弧度 + */ + static rotateX (out: Out, v: Out, o: Out, a: number): Out; + /** + !#zh 绕 Y 轴旋转向量指定弧度 + !#en Rotation vector specified angle around the Y axis + @param v 待旋转向量 + @param o 旋转中心 + @param a 旋转弧度 + */ + static rotateY (out: Out, v: Out, o: Out, a: number): Out; + /** + !#zh 绕 Z 轴旋转向量指定弧度 + !#en Around the Z axis specified angle vector + @param v 待旋转向量 + @param o 旋转中心 + @param a 旋转弧度 + */ + static rotateZ (out: Out, v: Out, o: Out, a: number): Out; + /** + !#zh 向量等价判断 + !#en Equivalent vectors Analyzing + */ + static strictEquals (a: Out, b: Out): boolean; + /** + !#zh 排除浮点数误差的向量近似等价判断 + !#en Negative error vector floating point approximately equivalent Analyzing + */ + static equals (a: Out, b: Out, epsilon?: number): boolean; + /** + !#zh 求两向量夹角弧度 + !#en Radian angle between two vectors seek + */ + static angle (a: Out, b: Out): number; + /** + !#zh 计算向量在指定平面上的投影 + !#en Calculating a projection vector in the specified plane + @param a 待投影向量 + @param n 指定平面的法线 + */ + static projectOnPlane (out: Out, a: Out, n: Out): Out; + /** + !#zh 计算向量在指定向量上的投影 + !#en Projection vector calculated in the vector designated + @param a 待投影向量 + @param n 目标向量 + */ + static project (out: Out, a: Out, b: Out): Out; + /** + !#zh 向量转数组 + !#en Vector transfer array + @param ofs 数组起始偏移量 + */ + static toArray > (out: Out, v: IVec3Like, ofs?: number): Out; + /** + !#zh 数组转向量 + !#en Array steering amount + @param ofs 数组起始偏移量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + x: number; + y: number; + z: number; + /** + !#en + Constructor + see {{#crossLink "cc/vec3:method"}}cc.v3{{/crossLink}} + !#zh + 构造函数,可查看 {{#crossLink "cc/vec3:method"}}cc.v3{{/crossLink}} + @param x x + @param y y + @param z z + */ + constructor(x?: Vec3|number, y?: number, z?: number); + /** + !#en clone a Vec3 value + !#zh 克隆一个 Vec3 值 + */ + clone(): Vec3; + /** + !#en Set the current vector value with the given vector. + !#zh 用另一个向量设置当前的向量对象值。 + @param newValue !#en new value to set. !#zh 要设置的新值 + */ + set(newValue: Vec3): Vec3; + /** + !#en Check whether the vector equals another one + !#zh 当前的向量是否与指定的向量相等。 + @param other other + */ + equals(other: Vec3): boolean; + /** + !#en Check whether two vector equal with some degree of variance. + !#zh + 近似判断两个点是否相等。
+ 判断 2 个向量是否在指定数值的范围之内,如果在则返回 true,反之则返回 false。 + @param other other + @param variance variance + */ + fuzzyEquals(other: Vec3, variance: number): boolean; + /** + !#en Transform to string with vector informations + !#zh 转换为方便阅读的字符串。 + */ + toString(): string; + /** + !#en Calculate linear interpolation result between this vector and another one with given ratio + !#zh 线性插值。 + @param to to + @param ratio the interpolation coefficient + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + lerp(to: Vec3, ratio: number, out?: Vec3): Vec3; + /** + !#en Clamp the vector between from float and to float. + !#zh + 返回指定限制区域后的向量。
+ 向量大于 max_inclusive 则返回 max_inclusive。
+ 向量小于 min_inclusive 则返回 min_inclusive。
+ 否则返回自身。 + @param min_inclusive min_inclusive + @param max_inclusive max_inclusive + */ + clampf(min_inclusive: Vec3, max_inclusive: Vec3): Vec3; + /** + !#en Adds this vector. If you want to save result to another vector, use add() instead. + !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。 + @param vector vector + */ + addSelf(vector: Vec3): Vec3; + /** + !#en Adds two vectors, and returns the new result. + !#zh 向量加法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + add(vector: Vec3, out?: Vec3): Vec3; + /** + !#en Subtracts one vector from this. + !#zh 向量减法。 + @param vector vector + */ + subtract(vector: Vec3): Vec3; + /** + !#en Multiplies this by a number. + !#zh 缩放当前向量。 + @param num num + */ + multiplyScalar(num: number): Vec3; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + */ + multiply(vector: Vec3): Vec3; + /** + !#en Divides by a number. + !#zh 向量除法。 + @param num num + */ + divide(num: number): Vec3; + /** + !#en Negates the components. + !#zh 向量取反。 + */ + negate(): Vec3; + /** + !#en Dot product + !#zh 当前向量与指定向量进行点乘。 + @param vector vector + */ + dot(vector?: Vec3): number; + /** + !#en Cross product + !#zh 当前向量与指定向量进行叉乘。 + @param vector vector + @param out out + */ + cross(vector: Vec3, out?: Vec3): Vec3; + /** + !#en Returns the length of this vector. + !#zh 返回该向量的长度。 + + @example + ```js + var v = cc.v3(10, 10, 10); + v.len(); // return 17.320508075688775; + ``` + */ + len(): number; + /** + !#en Returns the squared length of this vector. + !#zh 返回该向量的长度平方。 + */ + lengthSqr(): number; + /** + !#en Make the length of this vector to 1. + !#zh 向量归一化,让这个向量的长度为 1。 + */ + normalizeSelf(): Vec3; + /** + !#en + Returns this vector with a magnitude of 1.
+
+ Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function. + !#zh + 返回归一化后的向量。
+
+ 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。 + @param out optional, the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + normalize(out?: Vec3): Vec3; + /** + Transforms the vec3 with a mat4. 4th vector component is implicitly '1' + @param m matrix to transform with + @param out the receiving vector, you can pass the same vec3 to save result to itself, if not provided, a new vec3 will be created + */ + transformMat4(m: Mat4, out?: Vec3): Vec3; + /** + Returns the maximum value in x, y, and z + */ + maxAxis(): number; + /** + !#en Get angle in radian between this and vector. + !#zh 夹角的弧度。 + @param vector vector + */ + angle(vector: Vec3): number; + /** + !#en Calculates the projection of the current vector over the given vector. + !#zh 返回当前向量在指定 vector 向量上的投影向量。 + @param vector vector + + @example + ```js + var v1 = cc.v3(20, 20, 20); + var v2 = cc.v3(5, 5, 5); + v1.project(v2); // Vec3 {x: 20, y: 20, z: 20}; + ``` + */ + project(vector: Vec3): Vec3; + /** + !#en Get angle in radian between this and vector with direction.
+ In order to compatible with the vec2 API. + !#zh 带方向的夹角的弧度。该方法仅用做兼容 2D 计算。 + @param vector vector + */ + signAngle(vector: Vec3|Vec2): number; + /** + !#en rotate. In order to compatible with the vec2 API. + !#zh 返回旋转给定弧度后的新向量。该方法仅用做兼容 2D 计算。 + @param radians radians + @param out optional, the receiving vector, you can pass the same vec2 to save result to itself, if not provided, a new vec2 will be created + */ + rotate(radians: number, out?: Vec3): Vec2; + /** + !#en rotate self. In order to compatible with the vec2 API. + !#zh 按指定弧度旋转向量。该方法仅用做兼容 2D 计算。 + @param radians radians + */ + rotateSelf(radians: number): Vec3; + } + /** !#en Representation of 3D vectors and points. + !#zh 表示 3D 向量和坐标 */ + export class Vec4 extends ValueType { + /** + !#en Subtracts one vector from this. If you want to save result to another vector, use sub() instead. + !#zh 向量减法。如果你想保存结果到另一个向量,可使用 sub() 代替。 + @param vector vector + */ + subSelf(vector: Vec4): Vec4; + /** + !#en Subtracts one vector from this, and returns the new result. + !#zh 向量减法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + sub(vector: Vec4, out?: Vec4): Vec4; + /** + !#en Multiplies this by a number. If you want to save result to another vector, use mul() instead. + !#zh 缩放当前向量。如果你想结果保存到另一个向量,可使用 mul() 代替。 + @param num num + */ + mulSelf(num: number): Vec4; + /** + !#en Multiplies by a number, and returns the new result. + !#zh 缩放向量,并返回新结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + mul(num: number, out?: Vec4): Vec4; + /** + !#en Divides by a number. If you want to save result to another vector, use div() instead. + !#zh 向量除法。如果你想结果保存到另一个向量,可使用 div() 代替。 + @param num num + */ + divSelf(num: number): Vec4; + /** + !#en Divides by a number, and returns the new result. + !#zh 向量除法,并返回新的结果。 + @param num num + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + div(num: number, out?: Vec4): Vec4; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + */ + scaleSelf(vector: Vec4): Vec4; + /** + !#en Multiplies two vectors, and returns the new result. + !#zh 分量相乘,并返回新的结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + scale(vector: Vec4, out?: Vec4): Vec4; + /** + !#en Negates the components. If you want to save result to another vector, use neg() instead. + !#zh 向量取反。如果你想结果保存到另一个向量,可使用 neg() 代替。 + */ + negSelf(): Vec4; + /** + !#en Negates the components, and returns the new result. + !#zh 返回取反后的新向量。 + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + neg(out?: Vec4): Vec4; + /** + !#zh 获得指定向量的拷贝 + !#en Obtaining copy vectors designated + */ + static clone (a: Out): Vec4; + /** + !#zh 复制目标向量 + !#en Copy the target vector + */ + static copy (out: Out, a: Out): Out; + /** + !#zh 设置向量值 + !#en Set to value + */ + static set (out: Out, x: number, y: number, z: number, w: number): Out; + /** + !#zh 逐元素向量加法 + !#en Element-wise vector addition + */ + static add (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量减法 + !#en Element-wise vector subtraction + */ + static subtract (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量乘法 + !#en Element-wise vector multiplication + */ + static multiply (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量除法 + !#en Element-wise vector division + */ + static divide (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量向上取整 + !#en Rounding up by elements of the vector + */ + static ceil (out: Out, a: Out): Out; + /** + !#zh 逐元素向量向下取整 + !#en Element vector by rounding down + */ + static floor (out: Out, a: Out): Out; + /** + !#zh 逐元素向量最小值 + !#en The minimum by-element vector + */ + static min (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量最大值 + !#en The maximum value of the element-wise vector + */ + static max (out: Out, a: Out, b: Out): Out; + /** + !#zh 逐元素向量四舍五入取整 + !#en Element-wise vector of rounding to whole + */ + static round (out: Out, a: Out): Out; + /** + !#zh 向量标量乘法 + !#en Vector scalar multiplication + */ + static multiplyScalar (out: Out, a: Out, b: number): Out; + /** + !#zh 逐元素向量乘加: A + B * scale + !#en Element-wise vector multiply add: A + B * scale + */ + static scaleAndAdd (out: Out, a: Out, b: Out, scale: number): Out; + /** + !#zh 求两向量的欧氏距离 + !#en Seeking two vectors Euclidean distance + */ + static distance (a: Out, b: Out): number; + /** + !#zh 求两向量的欧氏距离平方 + !#en Euclidean distance squared seeking two vectors + */ + static squaredDistance (a: Out, b: Out): number; + /** + !#zh 求向量长度 + !#en Seeking vector length + */ + static len (a: Out): number; + /** + !#zh 求向量长度平方 + !#en Seeking squared vector length + */ + static lengthSqr (a: Out): number; + /** + !#zh 逐元素向量取负 + !#en By taking the negative elements of the vector + */ + static negate (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 Infinity + !#en Element vector by taking the inverse, return near 0 Infinity + */ + static inverse (out: Out, a: Out): Out; + /** + !#zh 逐元素向量取倒数,接近 0 时返回 0 + !#en Element vector by taking the inverse, return near 0 0 + */ + static inverseSafe (out: Out, a: Out): Out; + /** + !#zh 归一化向量 + !#en Normalized vector + */ + static normalize (out: Out, a: Out): Out; + /** + !#zh 向量点积(数量积) + !#en Vector dot product (scalar product) + */ + static dot (a: Out, b: Out): number; + /** + !#zh 逐元素向量线性插值: A + t * (B - A) + !#en Vector element by element linear interpolation: A + t * (B - A) + */ + static lerp (out: Out, a: Out, b: Out, t: number): Out; + /** + !#zh 生成一个在单位球体上均匀分布的随机向量 + !#en Generates a uniformly distributed random vectors on the unit sphere + @param scale 生成的向量长度 + */ + static random (out: Out, scale?: number): Out; + /** + !#zh 向量矩阵乘法 + !#en Vector matrix multiplication + */ + static transformMat4 (out: Out, a: Out, mat: MatLike): Out; + /** + !#zh 向量仿射变换 + !#en Affine transformation vector + */ + static transformAffine(out: Out, v: VecLike, mat: MatLike): Out; + /** + !#zh 向量四元数乘法 + !#en Vector quaternion multiplication + */ + static transformQuat (out: Out, a: Out, q: QuatLike): Out; + /** + !#zh 向量等价判断 + !#en Equivalent vectors Analyzing + */ + static strictEquals (a: Out, b: Out): boolean; + /** + !#zh 排除浮点数误差的向量近似等价判断 + !#en Negative error vector floating point approximately equivalent Analyzing + */ + static equals (a: Out, b: Out, epsilon?: number): boolean; + /** + !#zh 向量转数组 + !#en Vector transfer array + @param ofs 数组起始偏移量 + */ + static toArray > (out: Out, v: IVec4Like, ofs?: number): Out; + /** + !#zh 数组转向量 + !#en Array steering amount + @param ofs 数组起始偏移量 + */ + static fromArray (out: Out, arr: IWritableArrayLike, ofs?: number): Out; + x: number; + y: number; + z: number; + w: number; + /** + !#en + Constructor + see {{#crossLink "cc/vec4:method"}}cc.v4{{/crossLink}} + !#zh + 构造函数,可查看 {{#crossLink "cc/vec4:method"}}cc.v4{{/crossLink}} + @param x x + @param y y + @param z z + @param w w + */ + constructor(x?: number, y?: number, z?: number, w?: number); + /** + !#en clone a Vec4 value + !#zh 克隆一个 Vec4 值 + */ + clone(): Vec4; + /** + !#en Set the current vector value with the given vector. + !#zh 用另一个向量设置当前的向量对象值。 + @param newValue !#en new value to set. !#zh 要设置的新值 + */ + set(newValue: Vec4): Vec4; + /** + !#en Check whether the vector equals another one + !#zh 当前的向量是否与指定的向量相等。 + @param other other + @param epsilon epsilon + */ + equals(other: Vec4, epsilon?: number): boolean; + /** + !#en Check whether the vector equals another one + !#zh 判断当前向量是否在误差范围内与指定分量的向量相等。 + @param x 相比较的向量的 x 分量。 + @param y 相比较的向量的 y 分量。 + @param z 相比较的向量的 z 分量。 + @param w 相比较的向量的 w 分量。 + @param epsilon 允许的误差,应为非负数。 + */ + equals4f(x: number, y: number, z: number, w: number, epsilon?: number): boolean; + /** + !#en Check whether strict equals other Vec4 + !#zh 判断当前向量是否与指定向量相等。两向量的各分量都分别相等时返回 `true`;否则返回 `false`。 + @param other 相比较的向量。 + */ + strictEquals(other: Vec4): boolean; + /** + !#en Check whether strict equals other Vec4 + !#zh 判断当前向量是否与指定分量的向量相等。两向量的各分量都分别相等时返回 `true`;否则返回 `false`。 + @param x 指定向量的 x 分量。 + @param y 指定向量的 y 分量。 + @param z 指定向量的 z 分量。 + @param w 指定向量的 w 分量。 + */ + strictEquals4f(x: number, y: number, z: number, w: number): boolean; + /** + !#en Calculate linear interpolation result between this vector and another one with given ratio + !#zh 根据指定的插值比率,从当前向量到目标向量之间做插值。 + @param to 目标向量。 + @param ratio 插值比率,范围为 [0,1]。 + */ + lerp(to: Vec4, ratio: number): Vec4; + /** + !#en Transform to string with vector informations + !#zh 返回当前向量的字符串表示。 + */ + toString(): string; + /** + !#en Clamp the vector between minInclusive and maxInclusive. + !#zh 设置当前向量的值,使其各个分量都处于指定的范围内。 + @param minInclusive 每个分量都代表了对应分量允许的最小值。 + @param maxInclusive 每个分量都代表了对应分量允许的最大值。 + */ + clampf(minInclusive: Vec4, maxInclusive: Vec4): Vec4; + /** + !#en Adds this vector. If you want to save result to another vector, use add() instead. + !#zh 向量加法。如果你想保存结果到另一个向量,使用 add() 代替。 + @param vector vector + */ + addSelf(vector: Vec4): Vec4; + /** + !#en Adds two vectors, and returns the new result. + !#zh 向量加法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + add(vector: Vec4, out?: Vec4): Vec4; + /** + !#en Subtracts one vector from this, and returns the new result. + !#zh 向量减法,并返回新结果。 + @param vector vector + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + subtract(vector: Vec4, out?: Vec4): Vec4; + /** + !#en Multiplies this by a number. + !#zh 缩放当前向量。 + @param num num + */ + multiplyScalar(num: number): Vec4; + /** + !#en Multiplies two vectors. + !#zh 分量相乘。 + @param vector vector + */ + multiply(vector: Vec4): Vec4; + /** + !#en Divides by a number. + !#zh 向量除法。 + @param num num + */ + divide(num: number): Vec4; + /** + !#en Negates the components. + !#zh 向量取反 + */ + negate(): Vec4; + /** + !#en Dot product + !#zh 当前向量与指定向量进行点乘。 + @param vector vector + */ + dot(vector?: Vec4): number; + /** + !#en Cross product + !#zh 当前向量与指定向量进行叉乘。 + @param vector vector + @param out out + */ + cross(vector: Vec4, out?: Vec4): Vec4; + /** + !#en Returns the length of this vector. + !#zh 返回该向量的长度。 + + @example + ```js + var v = cc.v4(10, 10); + v.len(); // return 14.142135623730951; + ``` + */ + len(): number; + /** + !#en Returns the squared length of this vector. + !#zh 返回该向量的长度平方。 + */ + lengthSqr(): number; + /** + !#en Make the length of this vector to 1. + !#zh 向量归一化,让这个向量的长度为 1。 + */ + normalizeSelf(): Vec4; + /** + !#en + Returns this vector with a magnitude of 1.
+
+ Note that the current vector is unchanged and a new normalized vector is returned. If you want to normalize the current vector, use normalizeSelf function. + !#zh + 返回归一化后的向量。
+
+ 注意,当前向量不变,并返回一个新的归一化向量。如果你想来归一化当前向量,可使用 normalizeSelf 函数。 + @param out optional, the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + normalize(out?: Vec4): Vec4; + /** + Transforms the vec4 with a mat4. 4th vector component is implicitly '1' + @param m matrix to transform with + @param out the receiving vector, you can pass the same vec4 to save result to itself, if not provided, a new vec4 will be created + */ + transformMat4(m: Mat4, out?: Vec4): Vec4; + /** + Returns the maximum value in x, y, z, w. + */ + maxAxis(): number; + } + /** !#en The module provides utilities for working with file and directory paths + !#zh 用于处理文件与目录的路径的模块 */ + export class path { + /** + !#en Join strings to be a path. + !#zh 拼接字符串为 Path + + @example + ```js + ------------------------------ + cc.path.join("a", "b.png"); //-->"a/b.png" + cc.path.join("a", "b", "c.png"); //-->"a/b/c.png" + cc.path.join("a", "b"); //-->"a/b" + cc.path.join("a", "b", "/"); //-->"a/b/" + cc.path.join("a", "b/", "/"); //-->"a/b/" + + ``` + */ + static join(): string; + /** + !#en Get the ext name of a path including '.', like '.png'. + !#zh 返回 Path 的扩展名,包括 '.',例如 '.png'。 + @param pathStr pathStr + + @example + ```js + --------------------------- + cc.path.extname("a/b.png"); //-->".png" + cc.path.extname("a/b.png?a=1&b=2"); //-->".png" + cc.path.extname("a/b"); //-->null + cc.path.extname("a/b?a=1&b=2"); //-->null + + ``` + */ + static extname(pathStr: string): any; + /** + !#en Get the main name of a file name + !#zh 获取文件名的主名称 + @param fileName fileName + */ + static mainFileName(fileName: string): string; + /** + !#en Get the file name of a file path. + !#zh 获取文件路径的文件名。 + @param pathStr pathStr + @param extname extname + + @example + ```js + --------------------------------- + cc.path.basename("a/b.png"); //-->"b.png" + cc.path.basename("a/b.png?a=1&b=2"); //-->"b.png" + cc.path.basename("a/b.png", ".png"); //-->"b" + cc.path.basename("a/b.png?a=1&b=2", ".png"); //-->"b" + cc.path.basename("a/b.png", ".txt"); //-->"b.png" + + ``` + */ + static basename(pathStr: string, extname?: string): any; + /** + !#en Get dirname of a file path. + !#zh 获取文件路径的目录名。 + @param pathStr pathStr + + @example + ```js + --------------------------------- + * unix + cc.path.driname("a/b/c.png"); //-->"a/b" + cc.path.driname("a/b/c.png?a=1&b=2"); //-->"a/b" + cc.path.dirname("a/b/"); //-->"a/b" + cc.path.dirname("c.png"); //-->"" + * windows + cc.path.driname("a\\b\\c.png"); //-->"a\b" + cc.path.driname("a\\b\\c.png?a=1&b=2"); //-->"a\b" + + ``` + */ + static dirname(pathStr: string): any; + /** + !#en Change extname of a file path. + !#zh 更改文件路径的扩展名。 + @param pathStr pathStr + @param extname extname + + @example + ```js + --------------------------------- + cc.path.changeExtname("a/b.png", ".plist"); //-->"a/b.plist" + cc.path.changeExtname("a/b.png?a=1&b=2", ".plist"); //-->"a/b.plist?a=1&b=2" + + ``` + */ + static changeExtname(pathStr: string, extname?: string): string; + } + /** !#en + AffineTransform class represent an affine transform matrix. It's composed basically by translation, rotation, scale transformations.
+ !#zh + AffineTransform 类代表一个仿射变换矩阵。它基本上是由平移旋转,缩放转变所组成。
*/ + export class AffineTransform { + /** + !#en Create a AffineTransform object with all contents in the matrix. + !#zh 用在矩阵中的所有内容创建一个 AffineTransform 对象。 + @param a a + @param b b + @param c c + @param d d + @param tx tx + @param ty ty + */ + static create(a: number, b: number, c: number, d: number, tx: number, ty: number): AffineTransform; + /** + !#en + Create a identity transformation matrix:
+ [ 1, 0, 0,
+ 0, 1, 0 ] + !#zh + 单位矩阵:
+ [ 1, 0, 0,
+ 0, 1, 0 ] + */ + static identity(): AffineTransform; + /** + !#en Clone a AffineTransform object from the specified transform. + !#zh 克隆指定的 AffineTransform 对象。 + @param t t + */ + static clone(t: AffineTransform): AffineTransform; + /** + !#en + Concatenate a transform matrix to another + The results are reflected in the out affine transform + out = t1 * t2 + This function is memory free, you should create the output affine transform by yourself and manage its memory. + !#zh + 拼接两个矩阵,将结果保存到 out 矩阵。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。 + out = t1 * t2 + @param out Out object to store the concat result + @param t1 The first transform object. + @param t2 The transform object to concatenate. + */ + static concat(out: AffineTransform, t1: AffineTransform, t2: AffineTransform): AffineTransform; + /** + !#en Get the invert transform of an AffineTransform object. + This function is memory free, you should create the output affine transform by yourself and manage its memory. + !#zh 求逆矩阵。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。 + @param out out + @param t t + */ + static invert(out: AffineTransform, t: AffineTransform): AffineTransform; + /** + !#en Get an AffineTransform object from a given matrix 4x4. + This function is memory free, you should create the output affine transform by yourself and manage its memory. + !#zh 从一个 4x4 Matrix 获取 AffineTransform 对象。这个函数不创建任何内存,你需要先创建 AffineTransform 对象用来存储结果,并作为第一个参数传入函数。 + @param out out + @param mat mat + */ + static invert(out: AffineTransform, mat: Mat4): AffineTransform; + /** + !#en Apply the affine transformation on a point. + This function is memory free, you should create the output Vec2 by yourself and manage its memory. + !#zh 对一个点应用矩阵变换。这个函数不创建任何内存,你需要先创建一个 Vec2 对象用来存储结果,并作为第一个参数传入函数。 + @param out The output point to store the result + @param point Point to apply transform or x. + @param transOrY transform matrix or y. + @param t transform matrix. + */ + static transformVec2(out: Vec2, point: Vec2|number, transOrY: AffineTransform|number, t?: AffineTransform): Vec2; + /** + !#en Apply the affine transformation on a size. + This function is memory free, you should create the output Size by yourself and manage its memory. + !#zh 应用仿射变换矩阵到 Size 上。这个函数不创建任何内存,你需要先创建一个 Size 对象用来存储结果,并作为第一个参数传入函数。 + @param out The output point to store the result + @param size size + @param t t + */ + static transformSize(out: Size, size: Size, t: AffineTransform): Size; + /** + !#en Apply the affine transformation on a rect. + This function is memory free, you should create the output Rect by yourself and manage its memory. + !#zh 应用仿射变换矩阵到 Rect 上。这个函数不创建任何内存,你需要先创建一个 Rect 对象用来存储结果,并作为第一个参数传入函数。 + @param out out + @param rect rect + @param anAffineTransform anAffineTransform + */ + static transformRect(out: Rect, rect: Rect, anAffineTransform: AffineTransform): Rect; + /** + !#en Apply the affine transformation on a rect, and truns to an Oriented Bounding Box. + This function is memory free, you should create the output vectors by yourself and manage their memory. + !#zh 应用仿射变换矩阵到 Rect 上, 并转换为有向包围盒。这个函数不创建任何内存,你需要先创建包围盒的四个 Vector 对象用来存储结果,并作为前四个参数传入函数。 + @param out_bl out_bl + @param out_tl out_tl + @param out_tr out_tr + @param out_br out_br + @param rect rect + @param anAffineTransform anAffineTransform + */ + static transformObb(out_bl: Vec2, out_tl: Vec2, out_tr: Vec2, out_br: Vec2, rect: Rect, anAffineTransform: AffineTransform): void; + } + /** A base node for CCNode, it will: + - maintain scene hierarchy and active logic + - notifications if some properties changed + - define some interfaces shares between CCNode + - define machanisms for Enity Component Systems + - define prefab and serialize functions */ + export class _BaseNode extends Object implements EventTarget { + /** !#en Name of node. + !#zh 该节点名称。 */ + name: string; + /** !#en The uuid for editor, will be stripped before building project. + !#zh 主要用于编辑器的 uuid,在编辑器下可用于持久化存储,在项目构建之后将变成自增的 id。 */ + uuid: string; + /** !#en All children nodes. + !#zh 节点的所有子节点。 */ + children: Node[]; + /** !#en All children nodes. + !#zh 节点的子节点数量。 */ + childrenCount: number; + /** !#en + The local active state of this node.
+ Note that a Node may be inactive because a parent is not active, even if this returns true.
+ Use {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}} if you want to check if the Node is actually treated as active in the scene. + !#zh + 当前节点的自身激活状态。
+ 值得注意的是,一个节点的父节点如果不被激活,那么即使它自身设为激活,它仍然无法激活。
+ 如果你想检查节点在场景中实际的激活状态可以使用 {{#crossLink "Node/activeInHierarchy:property"}}{{/crossLink}}。 */ + active: boolean; + /** !#en Indicates whether this node is active in the scene. + !#zh 表示此节点是否在场景中激活。 */ + activeInHierarchy: boolean; + /** + + @param name name + */ + constructor(name?: string); + /** !#en The parent of the node. + !#zh 该节点的父节点。 */ + parent: Node; + /** + !#en Get parent of the node. + !#zh 获取该节点的父节点。 + + @example + ```js + var parent = this.node.getParent(); + ``` + */ + getParent(): Node; + /** + !#en Set parent of the node. + !#zh 设置该节点的父节点。 + @param value value + + @example + ```js + node.setParent(newNode); + ``` + */ + setParent(value: Node): void; + /** + !#en + Properties configuration function
+ All properties in attrs will be set to the node,
+ when the setter of the node is available,
+ the property will be set via setter function.
+ !#zh 属性配置函数。在 attrs 的所有属性将被设置为节点属性。 + @param attrs Properties to be set to node + + @example + ```js + var attrs = { key: 0, num: 100 }; + node.attr(attrs); + ``` + */ + attr(attrs: any): void; + /** + !#en Returns a child from the container given its uuid. + !#zh 通过 uuid 获取节点的子节点。 + @param uuid The uuid to find the child node. + + @example + ```js + var child = node.getChildByUuid(uuid); + ``` + */ + getChildByUuid(uuid: string): Node; + /** + !#en Returns a child from the container given its name. + !#zh 通过名称获取节点的子节点。 + @param name A name to find the child node. + + @example + ```js + var child = node.getChildByName("Test Node"); + ``` + */ + getChildByName(name: string): Node; + /** + !#en + Inserts a child to the node at a specified index. + !#zh + 插入子节点到指定位置 + @param child the child node to be inserted + @param siblingIndex the sibling index to place the child in + + @example + ```js + node.insertChild(child, 2); + ``` + */ + insertChild(child: Node, siblingIndex: number): void; + /** + !#en Get the sibling index. + !#zh 获取同级索引。 + + @example + ```js + var index = node.getSiblingIndex(); + ``` + */ + getSiblingIndex(): number; + /** + !#en Set the sibling index of this node. + !#zh 设置节点同级索引。 + @param index index + + @example + ```js + node.setSiblingIndex(1); + ``` + */ + setSiblingIndex(index: number): void; + /** + !#en Walk though the sub children tree of the current node. + Each node, including the current node, in the sub tree will be visited two times, before all children and after all children. + This function call is not recursive, it's based on stack. + Please don't walk any other node inside the walk process. + !#zh 遍历该节点的子树里的所有节点并按规则执行回调函数。 + 对子树中的所有节点,包含当前节点,会执行两次回调,prefunc 会在访问它的子节点之前调用,postfunc 会在访问所有子节点之后调用。 + 这个函数的实现不是基于递归的,而是基于栈展开递归的方式。 + 请不要在 walk 过程中对任何其他的节点嵌套执行 walk。 + @param prefunc The callback to process node when reach the node for the first time + @param postfunc The callback to process node when re-visit the node after walked all children in its sub tree + + @example + ```js + node.walk(function (target) { + console.log('Walked through node ' + target.name + ' for the first time'); + }, function (target) { + console.log('Walked through node ' + target.name + ' after walked all children in its sub tree'); + }); + ``` + */ + walk(prefunc: (target: _BaseNode) => void, postfunc: (target: _BaseNode) => void): void; + /** + !#en + Remove itself from its parent node. If cleanup is `true`, then also remove all events and actions.
+ If the cleanup parameter is not passed, it will force a cleanup, so it is recommended that you always pass in the `false` parameter when calling this API.
+ If the node orphan, then nothing happens. + !#zh + 从父节点中删除该节点。如果不传入 cleanup 参数或者传入 `true`,那么这个节点上所有绑定的事件、action 都会被删除。
+ 因此建议调用这个 API 时总是传入 `false` 参数。
+ 如果这个节点是一个孤节点,那么什么都不会发生。 + @param cleanup true if all actions and callbacks on this node should be removed, false otherwise. + + @example + ```js + node.removeFromParent(); + node.removeFromParent(false); + ``` + */ + removeFromParent(cleanup?: boolean): void; + /** + !#en + Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.

+ If the cleanup parameter is not passed, it will force a cleanup.
+ "remove" logic MUST only be on this method
+ If a class wants to extend the 'removeChild' behavior it only needs
+ to override this method. + !#zh + 移除节点中指定的子节点,是否需要清理所有正在运行的行为取决于 cleanup 参数。
+ 如果 cleanup 参数不传入,默认为 true 表示清理。
+ @param child The child node which will be removed. + @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. + + @example + ```js + node.removeChild(newNode); + node.removeChild(newNode, false); + ``` + */ + removeChild(child: Node, cleanup?: boolean): void; + /** + !#en + Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter.
+ If the cleanup parameter is not passed, it will force a cleanup. + !#zh + 移除节点所有的子节点,是否需要清理所有正在运行的行为取决于 cleanup 参数。
+ 如果 cleanup 参数不传入,默认为 true 表示清理。 + @param cleanup true if all running actions on all children nodes should be cleanup, false otherwise. + + @example + ```js + node.removeAllChildren(); + node.removeAllChildren(false); + ``` + */ + removeAllChildren(cleanup?: boolean): void; + /** + !#en Is this node a child of the given node? + !#zh 是否是指定节点的子节点? + @param parent parent + + @example + ```js + node.isChildOf(newNode); + ``` + */ + isChildOf(parent: Node): boolean; + /** + !#en + Returns the component of supplied type if the node has one attached, null if it doesn't.
+ You can also get component in the node by passing in the name of the script. + !#zh + 获取节点上指定类型的组件,如果节点有附加指定类型的组件,则返回,如果没有则为空。
+ 传入参数也可以是脚本的名称。 + @param typeOrClassName typeOrClassName + + @example + ```js + // get sprite component + var sprite = node.getComponent(cc.Sprite); + // get custom test class + var test = node.getComponent("Test"); + ``` + */ + getComponent(type: {prototype: T}): T; + getComponent(className: string): any; + /** + !#en Returns all components of supplied type in the node. + !#zh 返回节点上指定类型的所有组件。 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprites = node.getComponents(cc.Sprite); + var tests = node.getComponents("Test"); + ``` + */ + getComponents(type: {prototype: T}): T[]; + getComponents(className: string): any[]; + /** + !#en Returns the component of supplied type in any of its children using depth first search. + !#zh 递归查找所有子节点中第一个匹配指定类型的组件。 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprite = node.getComponentInChildren(cc.Sprite); + var Test = node.getComponentInChildren("Test"); + ``` + */ + getComponentInChildren(type: {prototype: T}): T; + getComponentInChildren(className: string): any; + /** + !#en Returns all components of supplied type in self or any of its children. + !#zh 递归查找自身或所有子节点中指定类型的组件 + @param typeOrClassName typeOrClassName + + @example + ```js + var sprites = node.getComponentsInChildren(cc.Sprite); + var tests = node.getComponentsInChildren("Test"); + ``` + */ + getComponentsInChildren(type: {prototype: T}): T[]; + getComponentsInChildren(className: string): any[]; + /** + !#en Adds a component class to the node. You can also add component to node by passing in the name of the script. + !#zh 向节点添加一个指定类型的组件类,你还可以通过传入脚本的名称来添加组件。 + @param typeOrClassName The constructor or the class name of the component to add + + @example + ```js + var sprite = node.addComponent(cc.Sprite); + var test = node.addComponent("Test"); + ``` + */ + addComponent(type: {new(): T}): T; + addComponent(className: string): any; + /** + !#en + Removes a component identified by the given name or removes the component object given. + You can also use component.destroy() if you already have the reference. + !#zh + 删除节点上的指定组件,传入参数可以是一个组件构造函数或组件名,也可以是已经获得的组件引用。 + 如果你已经获得组件引用,你也可以直接调用 component.destroy() + @param component The need remove component. + + @example + ```js + node.removeComponent(cc.Sprite); + var Test = require("Test"); + node.removeComponent(Test); + ``` + */ + removeComponent(component: string|Function|Component): void; + /** + !#en + Destroy all children from the node, and release all their own references to other objects.
+ Actual destruct operation will delayed until before rendering. + !#zh + 销毁所有子节点,并释放所有它们对其它对象的引用。
+ 实际销毁操作会延迟到当前帧渲染前执行。 + + @example + ```js + node.destroyAllChildren(); + ``` + */ + destroyAllChildren(): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type A string representing the event type being removed. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null + + @example + ```js + eventTarget.once('fire', function () { + cc.log("this is the callback and will be invoked only once"); + }, node); + ``` + */ + once(type: string, callback: (arg1?: any, arg2?: any, arg3?: any, arg4?: any, arg5?: any) => void, target?: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en + Helper class for setting material blend function. + !#zh + 设置材质混合模式的辅助类。 */ + export class BlendFunc { + /** !#en specify the source Blend Factor, this will generate a custom material object, please pay attention to the memory cost. + !#zh 指定原图的混合模式,这会克隆一个新的材质对象,注意这带来的开销 */ + srcBlendFactor: macro.BlendFactor; + /** !#en specify the destination Blend Factor. + !#zh 指定目标的混合模式 */ + dstBlendFactor: macro.BlendFactor; + } + /** An internal helper class for switching render component's material between normal sprite material and gray sprite material. */ + export class GraySpriteState { + /** !#en The normal material. + !#zh 正常状态的材质。 */ + normalMaterial: Material; + /** !#en The gray material. + !#zh 置灰状态的材质。 */ + grayMaterial: Material; + } + /** misc utilities */ + export class misc { + /** + !#en Clamp a value between from and to. + !#zh + 限定浮点数的最大最小值。
+ 数值大于 max_inclusive 则返回 max_inclusive。
+ 数值小于 min_inclusive 则返回 min_inclusive。
+ 否则返回自身。 + @param value value + @param min_inclusive min_inclusive + @param max_inclusive max_inclusive + + @example + ```js + var v1 = cc.misc.clampf(20, 0, 20); // 20; + var v2 = cc.misc.clampf(-1, 0, 20); // 0; + var v3 = cc.misc.clampf(10, 0, 20); // 10; + ``` + */ + static clampf(value: number, min_inclusive: number, max_inclusive: number): number; + /** + !#en Clamp a value between 0 and 1. + !#zh 限定浮点数的取值范围为 0 ~ 1 之间。 + @param value value + + @example + ```js + var v1 = cc.misc.clamp01(20); // 1; + var v2 = cc.misc.clamp01(-1); // 0; + var v3 = cc.misc.clamp01(0.5); // 0.5; + ``` + */ + static clamp01(value: number): number; + /** + Linear interpolation between 2 numbers, the ratio sets how much it is biased to each end + @param a number A + @param b number B + @param r ratio between 0 and 1 + + @example + ```js + ---- + lerp + cc.misc.lerp(2,10,0.5)//returns 6 + cc.misc.lerp(2,10,0.2)//returns 3.6 + + ``` + */ + static lerp(a: number, b: number, r: number): number; + /** + converts degrees to radians + @param angle angle + */ + static degreesToRadians(angle: number): number; + /** + converts radians to degrees + @param angle angle + */ + static radiansToDegrees(angle: number): number; + } + /** !#en The renderer object which provide access to render system APIs, + detailed APIs will be available progressively. + !#zh 提供基础渲染接口的渲染器对象,渲染层的基础接口将逐步开放给用户 */ + export class renderer { + /** !#en The render engine is available only after cc.game.EVENT_ENGINE_INITED event.
+ Normally it will be inited as the webgl render engine, but in wechat open context domain, + it will be inited as the canvas render engine. Canvas render engine is no longer available for other use case since v2.0. + !#zh 基础渲染引擎对象只在 cc.game.EVENT_ENGINE_INITED 事件触发后才可获取。
+ 大多数情况下,它都会是 WebGL 渲染引擎实例,但是在微信开放数据域当中,它会是 Canvas 渲染引擎实例。请注意,从 2.0 开始,我们在其他平台和环境下都废弃了 Canvas 渲染器。 */ + static renderEngine: any; + /** !#en The total draw call count in last rendered frame. + !#zh 上一次渲染帧所提交的渲染批次总数。 */ + static drawCalls: number; + } + /** !#en The burst of 3d particle. + !#zh 3D 粒子发射时的爆发个数 */ + export class Burst { + /** !#en Time between the start of the particle system and the trigger of this Brust + !#zh 粒子系统开始运行到触发此次 Brust 的时间 */ + time: number; + /** !#en Minimum number of emitted particles + !#zh 发射粒子的最小数量 */ + minCount: number; + /** !#en Maximum number of emitted particles + !#zh 发射粒子的最大数量 */ + maxCount: number; + /** !#en The number of times Burst was triggered. + !#zh Burst 的触发次数 */ + repeatCount: number; + /** !#en Interval of each trigger + !#zh 每次触发的间隔时间 */ + repeatInterval: number; + /** !#en Number of particles emitted + !#zh 发射的粒子的数量 */ + count: CurveRange; + } + /** !#en The animation curve of 3d particle. + !#zh 3D 粒子动画曲线 */ + export class AnimationCurve { + /** !#en Array of key value. + !#zh 关键值列表。 */ + keyFrames: Keyframe[]; + /** !#en Pre-wrap mode. + !#zh 前置循环模式。 */ + preWrapMode: WrapMode; + /** !#en Post-wrap mode. + !#zh 后置循环模式。 */ + postWrapMode: WrapMode; + } + /** !#en The ParticleSystem3D Component. + !#zh 3D 粒子组件 */ + export class ParticleSystem3D extends RenderComponent { + /** !#en The run time of particle. + !#zh 粒子系统运行时间 */ + duration: number; + /** !#en The maximum number of particles that a particle system can generate. + !#zh 粒子系统能生成的最大粒子数量 */ + capacity: number; + /** !#en Whether the particle system loops. + !#zh 粒子系统是否循环播放 */ + loop: boolean; + /** !#en Whether the particles start playing automatically after loaded. + !#zh 粒子系统加载后是否自动开始播放 */ + playOnAwake: boolean; + /** !#en When selected, the particle system will start playing after one round has been played (only effective when loop is enabled). + !#zh 选中之后,粒子系统会以已播放完一轮之后的状态开始播放(仅当循环播放启用时有效) */ + prewarm: boolean; + /** !#en The coordinate system in which the particle system is located.
+ World coordinates (does not change when the position of other objects changes)
+ Local coordinates (moving as the position of the parent node changes)
+ Custom coordinates (moving with the position of a custom node) + !#zh 选择粒子系统所在的坐标系
+ 世界坐标(不随其他物体位置改变而变换)
+ 局部坐标(跟随父节点位置改变而移动)
+ 自定坐标(跟随自定义节点的位置改变而移动) */ + simulationSpace: ParticleSystem3DAssembler.Space; + /** !#en Controlling the update speed of the entire particle system. + !#zh 控制整个粒子系统的更新速度。 */ + simulationSpeed: number; + /** !#en Delay particle emission time after particle system starts running. + !#zh 粒子系统开始运行后,延迟粒子发射的时间。 */ + startDelay: CurveRange; + /** !#en Particle life cycle。 + !#zh 粒子生命周期。 */ + startLifetime: CurveRange; + /** !#en Particle initial color + !#zh 粒子初始颜色 */ + startColor: GradientRange; + /** !#en Particle scale space + !#zh 缩放空间 */ + scaleSpace: ParticleSystem3DAssembler.Space; + /** !#en Initial particle size + !#zh 粒子初始大小 */ + startSize: CurveRange; + /** !#en Initial particle speed + !#zh 粒子初始速度 */ + startSpeed: CurveRange; + /** !#en Particle initial rotation angle + !#zh 粒子初始旋转角度 */ + startRotation: CurveRange; + /** !#en Gravity coefficient of particles affected by gravity + !#zh 粒子受重力影响的重力系数 */ + gravityModifier: CurveRange; + /** !#en Particles emitted per second + !#zh 每秒发射的粒子数 */ + rateOverTime: CurveRange; + /** !#en Number of particles emitted per unit distance moved + !#zh 每移动单位距离发射的粒子数 */ + rateOverDistance: CurveRange; + /** !#en The number of Brusts that emit a specified number of particles at a specified time + !#zh 设定在指定时间发射指定数量的粒子的 Brust 的数量 */ + bursts: Burst[]; + /** !#en Particle emitter module + !#zh 粒子发射器模块 */ + shapeModule: ShapeModule; + /** !#en Color control module + !#zh 颜色控制模块 */ + colorOverLifetimeModule: ColorOverLifetimeModule; + /** !#en Particle size module + !#zh 粒子大小模块 */ + sizeOvertimeModule: SizeOvertimeModule; + /** !#en Particle speed module + !#zh 粒子速度模块 */ + velocityOvertimeModule: VelocityOvertimeModule; + /** !#en Particle acceleration module + !#zh 粒子加速度模块 */ + forceOvertimeModule: ForceOvertimeModule; + /** !#en Particle limit speed module (only CPU particles are supported) + !#zh 粒子限制速度模块(只支持 CPU 粒子) */ + limitVelocityOvertimeModule: LimitVelocityOvertimeModule; + /** !#en Particle rotation module + !#zh 粒子旋转模块 */ + rotationOvertimeModule: RotationOvertimeModule; + /** !#en Texture Animation Module + !#zh 贴图动画模块 */ + textureAnimationModule: TextureAnimationModule; + /** !#en Particle Trajectory Module + !#zh 粒子轨迹模块 */ + trailModule: TrailModule; + /** !#en Particle generation mode + !#zh 设定粒子生成模式 */ + renderMode: ParticleSystem3DAssembler.RenderMode; + /** !#en When the particle generation mode is StrecthedBillboard, in the direction of movement of the particles is stretched by velocity magnitude + !#zh 在粒子生成方式为 StrecthedBillboard 时,对粒子在运动方向上按速度大小进行拉伸 */ + velocityScale: number; + /** !#en When the particle generation method is StrecthedBillboard, the particles are stretched according to the particle size in the direction of motion + !#zh 在粒子生成方式为 StrecthedBillboard 时,对粒子在运动方向上按粒子大小进行拉伸 */ + lengthScale: number; + /** !#en Particle model + !#zh 粒子模型 */ + mesh: Mesh; + /** !#en Particle material + !#zh 粒子材质 */ + particleMaterial: Material; + /** !#en Particle trail material + !#zh 粒子轨迹材质 */ + trailMaterial: Material; + /** + !#en Playing particle effects + !#zh 播放粒子效果 + */ + play(): void; + /** + !#en Pause particle effect + !#zh 暂停播放粒子效果 + */ + pause(): void; + /** + !#en Stop particle effect + !#zh 停止播放粒子效果 + */ + stop(): void; + /** + !#en Remove all particle effect + !#zh 将所有粒子从粒子系统中清除 + */ + clear(): void; + } + /** !#en + Helper class for ES5 Map. + !#zh + ES5 Map 辅助类。 */ + export class MapUtils { + } + /** !#en . + !#zh 。 */ + export class SkeletonAnimation extends Animation { + } + /** !#en + Skinned Mesh Renderer + !#zh + 蒙皮渲染组件 */ + export class SkinnedMeshRenderer extends MeshRenderer { + /** !#en + Skeleton Asset + !#zh + 骨骼资源 */ + skeleton: sp.Skeleton; + /** !#en + Root Bone + !#zh + 骨骼根节点 */ + rootBone: Node; + } + /** !#en SkeletonAnimationClip Asset. + !#zh 骨骼动画剪辑。 */ + export class SkeletonAnimationClip extends AnimationClip { + } + /** !#en Effect Asset. + !#zh Effect 资源类型。 */ + export class EffectAsset extends Asset { + } + /** !#en Material Asset. + !#zh 材质资源类。 */ + export class Material extends Asset { + /** + !#en Get built-in materials + !#zh 获取内置材质 + @param name name + */ + static getBuiltinMaterial(name: string): Material; + /** + !#en Creates a Material with builtin Effect. + !#zh 使用内建 Effect 创建一个材质。 + @param effectName effectName + @param techniqueIndex techniqueIndex + */ + static createWithBuiltin(effectName: string, techniqueIndex?: number): Material; + /** + !#en Creates a Material. + !#zh 创建一个材质。 + @param effectAsset effectAsset + @param techniqueIndex techniqueIndex + */ + static create(effectAsset: EffectAsset, techniqueIndex?: number): Material; + /** + !#en Sets the Material property + !#zh 设置材质的属性 + @param name name + @param val val + @param passIdx passIdx + @param directly directly + */ + setProperty(name: string, val: any, passIdx?: number, directly?: boolean): void; + /** + !#en Gets the Material property. + !#zh 获取材质的属性。 + @param name name + @param passIdx passIdx + */ + getProperty(name: string, passIdx: number): any; + /** + !#en Sets the Material define. + !#zh 设置材质的宏定义。 + @param name name + @param val val + @param passIdx passIdx + @param force force + */ + define(name: string, val: boolean|number, passIdx?: number, force?: boolean): void; + /** + !#en Gets the Material define. + !#zh 获取材质的宏定义。 + @param name name + @param passIdx passIdx + */ + getDefine(name: string, passIdx?: number): boolean; + /** + !#en Sets the Material cull mode. + !#zh 设置材质的裁减模式。 + @param cullMode cullMode + @param passIdx passIdx + */ + setCullMode(cullMode: number, passIdx: number): void; + /** + !#en Sets the Material depth states. + !#zh 设置材质的深度渲染状态。 + @param depthTest depthTest + @param depthWrite depthWrite + @param depthFunc depthFunc + @param passIdx passIdx + */ + setDepth(depthTest: boolean, depthWrite: boolean, depthFunc: number, passIdx: number): void; + /** + !#en Sets the Material blend states. + !#zh 设置材质的混合渲染状态。 + @param enabled enabled + @param blendEq blendEq + @param blendSrc blendSrc + @param blendDst blendDst + @param blendAlphaEq blendAlphaEq + @param blendSrcAlpha blendSrcAlpha + @param blendDstAlpha blendDstAlpha + @param blendColor blendColor + @param passIdx passIdx + */ + setBlend(enabled: boolean, blendEq: number, blendSrc: number, blendDst: number, blendAlphaEq: number, blendSrcAlpha: number, blendDstAlpha: number, blendColor: number, passIdx: number): void; + /** + !#en Sets whether enable the stencil test. + !#zh 设置是否开启模板测试。 + @param stencilTest stencilTest + @param passIdx passIdx + */ + setStencilEnabled(stencilTest: number, passIdx: number): void; + /** + !#en Sets the Material stencil render states. + !#zh 设置材质的模板测试渲染参数。 + @param stencilTest stencilTest + @param stencilFunc stencilFunc + @param stencilRef stencilRef + @param stencilMask stencilMask + @param stencilFailOp stencilFailOp + @param stencilZFailOp stencilZFailOp + @param stencilZPassOp stencilZPassOp + @param stencilWriteMask stencilWriteMask + @param passIdx passIdx + */ + setStencil(stencilTest: number, stencilFunc: number, stencilRef: number, stencilMask: number, stencilFailOp: number, stencilZFailOp: number, stencilZPassOp: number, stencilWriteMask: number, passIdx: number): void; + } + /** !#en + Material Variant is an extension of the Material Asset. + Changes to Material Variant do not affect other Material Variant or Material Asset, + and changes to Material Asset are synchronized to the Material Variant. + However, when a Material Variant had already modifies a state, the Material Asset state is not synchronized to the Material Variant. + !#zh + 材质变体是材质资源的一个延伸。 + 材质变体的修改不会影响到其他的材质变体或者材质资源,而材质资源的修改会同步体现到材质变体上, + 但是当材质变体对一个状态修改后,材质资源再对这个状态修改是不会同步到材质变体上的。 */ + export class MaterialVariant extends Material { + /** + + @param materialName materialName + @param owner owner + */ + static createWithBuiltin (materialName: string, owner: cc.RenderComponent): MaterialVariant | null; + /** + + @param material material + @param owner owner + */ + static create (material: Material, owner: cc.RenderComponent): MaterialVariant | null; + } + /** !#en cc.EditBox is a component for inputing text, you can use it to gather small amounts of text from users. + !#zh EditBox 组件,用于获取用户的输入文本。 */ + export class EditBox extends Component { + /** !#en Input string of EditBox. + !#zh 输入框的初始输入内容,如果为空则会显示占位符的文本。 */ + string: string; + /** !#en The Label component attached to the node for EditBox's input text label + !#zh 输入框输入文本节点上挂载的 Label 组件对象 */ + textLabel: Label; + /** !#en The Label component attached to the node for EditBox's placeholder text label + !#zh 输入框占位符节点上挂载的 Label 组件对象 */ + placeholderLabel: Label; + /** !#en The Sprite component attached to the node for EditBox's background + !#zh 输入框背景节点上挂载的 Sprite 组件对象 */ + background: Sprite; + /** !#en The background image of EditBox. This property will be removed in the future, use editBox.background instead please. + !#zh 输入框的背景图片。 该属性会在将来的版本中移除,请用 editBox.background */ + backgroundImage: SpriteFrame; + /** !#en + The return key type of EditBox. + Note: it is meaningless for web platforms and desktop platforms. + !#zh + 指定移动设备上面回车按钮的样式。 + 注意:这个选项对 web 平台与 desktop 平台无效。 */ + returnType: EditBox.KeyboardReturnType; + /** !#en Set the input flags that are to be applied to the EditBox. + !#zh 指定输入标志位,可以指定输入方式为密码或者单词首字母大写。 */ + inputFlag: EditBox.InputFlag; + /** !#en + Set the input mode of the edit box. + If you pass ANY, it will create a multiline EditBox. + !#zh + 指定输入模式: ANY表示多行输入,其它都是单行输入,移动平台上还可以指定键盘样式。 */ + inputMode: EditBox.InputMode; + /** !#en Font size of the input text. This property will be removed in the future, use editBox.textLabel.fontSize instead please. + !#zh 输入框文本的字体大小。 该属性会在将来的版本中移除,请使用 editBox.textLabel.fontSize。 */ + fontSize: number; + /** !#en Change the lineHeight of displayed text. This property will be removed in the future, use editBox.textLabel.lineHeight instead. + !#zh 输入框文本的行高。该属性会在将来的版本中移除,请使用 editBox.textLabel.lineHeight */ + lineHeight: number; + /** !#en Font color of the input text. This property will be removed in the future, use editBox.textLabel.node.color instead. + !#zh 输入框文本的颜色。该属性会在将来的版本中移除,请使用 editBox.textLabel.node.color */ + fontColor: Color; + /** !#en The display text of placeholder. + !#zh 输入框占位符的文本内容。 */ + placeholder: string; + /** !#en The font size of placeholder. This property will be removed in the future, use editBox.placeholderLabel.fontSize instead. + !#zh 输入框占位符的字体大小。该属性会在将来的版本中移除,请使用 editBox.placeholderLabel.fontSize */ + placeholderFontSize: number; + /** !#en The font color of placeholder. This property will be removed in the future, use editBox.placeholderLabel.node.color instead. + !#zh 输入框占位符的字体颜色。该属性会在将来的版本中移除,请使用 editBox.placeholderLabel.node.color */ + placeholderFontColor: Color; + /** !#en The maximize input length of EditBox. + - If pass a value less than 0, it won't limit the input number of characters. + - If pass 0, it doesn't allow input any characters. + !#zh 输入框最大允许输入的字符个数。 + - 如果值为小于 0 的值,则不会限制输入字符个数。 + - 如果值为 0,则不允许用户进行任何输入。 */ + maxLength: number; + /** !#en The input is always visible and be on top of the game view (only useful on Web), this property will be removed on v2.1 + !zh 输入框总是可见,并且永远在游戏视图的上面(这个属性只有在 Web 上面修改有意义),该属性会在 v2.1 中移除 + Note: only available on Web at the moment. */ + stayOnTop: boolean; + /** !#en Set the tabIndex of the DOM input element (only useful on Web). + !#zh 修改 DOM 输入元素的 tabIndex(这个属性只有在 Web 上面修改有意义)。 */ + tabIndex: number; + /** !#en The event handler to be called when EditBox began to edit text. + !#zh 开始编辑文本输入框触发的事件回调。 */ + editingDidBegan: Component.EventHandler[]; + /** !#en The event handler to be called when EditBox text changes. + !#zh 编辑文本输入框时触发的事件回调。 */ + textChanged: Component.EventHandler[]; + /** !#en The event handler to be called when EditBox edit ends. + !#zh 结束编辑文本输入框时触发的事件回调。 */ + editingDidEnded: Component.EventHandler[]; + /** !#en The event handler to be called when return key is pressed. Windows is not supported. + !#zh 当用户按下回车按键时的事件回调,目前不支持 windows 平台 */ + editingReturn: Component.EventHandler[]; + /** + !#en Let the EditBox get focus, this method will be removed on v2.1 + !#zh 让当前 EditBox 获得焦点, 这个方法会在 v2.1 中移除 + */ + setFocus(): void; + /** + !#en Let the EditBox get focus + !#zh 让当前 EditBox 获得焦点 + */ + focus(): void; + /** + !#en Let the EditBox lose focus + !#zh 让当前 EditBox 失去焦点 + */ + blur(): void; + /** + !#en Determine whether EditBox is getting focus or not. + !#zh 判断 EditBox 是否获得了焦点 + */ + isFocused(): void; + /** + !#en if you don't need the EditBox and it isn't in any running Scene, you should + call the destroy method on this component or the associated node explicitly. + Otherwise, the created DOM element won't be removed from web page. + !#zh + 如果你不再使用 EditBox,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。 + 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。 + + @example + ```js + editbox.node.parent = null; // or editbox.node.removeFromParent(false); + // when you don't need editbox anymore + editbox.node.destroy(); + ``` + */ + destroy(): boolean; + } + /** undefined */ + export class PhysicsBoxCollider extends PhysicsCollider implements Collider.Box { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Box size + !#zh 包围盒大小 */ + size: Size; + } + /** undefined */ + export class PhysicsChainCollider extends PolygonCollider { + /** !#en Whether the chain is loop + !#zh 链条是否首尾相连 */ + loop: boolean; + /** !#en Chain points + !#zh 链条顶点数组 */ + points: Vec2[]; + } + /** undefined */ + export class PhysicsCircleCollider extends PhysicsCollider implements Collider.Circle { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Circle radius + !#zh 圆形半径 */ + radius: number; + } + /** undefined */ + export class PhysicsCollider extends Collider { + /** !#en + The density. + !#zh + 密度 */ + density: number; + /** !#en + A sensor collider collects contact information but never generates a collision response + !#zh + 一个传感器类型的碰撞体会产生碰撞回调,但是不会发生物理碰撞效果。 */ + sensor: boolean; + /** !#en + The friction coefficient, usually in the range [0,1]. + !#zh + 摩擦系数,取值一般在 [0, 1] 之间 */ + friction: number; + /** !#en + The restitution (elasticity) usually in the range [0,1]. + !#zh + 弹性系数,取值一般在 [0, 1]之间 */ + restitution: number; + /** !#en + Physics collider will find the rigidbody component on the node and set to this property. + !#zh + 碰撞体会在初始化时查找节点上是否存在刚体,如果查找成功则赋值到这个属性上。 */ + body: RigidBody; + /** + !#en + Apply current changes to collider, this will regenerate inner box2d fixtures. + !#zh + 应用当前 collider 中的修改,调用此函数会重新生成内部 box2d 的夹具。 + */ + apply(): void; + /** + !#en + Get the world aabb of the collider + !#zh + 获取碰撞体的世界坐标系下的包围盒 + */ + getAABB(): void; + } + /** undefined */ + export class PhysicsPolygonCollider extends PhysicsCollider implements Collider.Polygon { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Polygon points + !#zh 多边形顶点数组 */ + points: Vec2[]; + } + /** !#en + A distance joint constrains two points on two bodies + to remain at a fixed distance from each other. You can view + this as a massless, rigid rod. + !#zh + 距离关节通过一个固定的长度来约束关节链接的两个刚体。你可以将它想象成一个无质量,坚固的木棍。 */ + export class DistanceJoint extends Joint { + /** !#en + The distance separating the two ends of the joint. + !#zh + 关节两端的距离 */ + distance: number; + /** !#en + The spring frequency. + !#zh + 弹性系数。 */ + frequency: number; + /** !#en + The damping ratio. + !#zh + 阻尼,表示关节变形后,恢复到初始状态受到的阻力。 */ + dampingRatio: number; + } + /** !#en + Base class for joints to connect rigidbody. + !#zh + 关节类的基类 */ + export class Joint extends Component { + /** !#en + The anchor of the rigidbody. + !#zh + 刚体的锚点。 */ + anchor: Vec2; + /** !#en + The anchor of the connected rigidbody. + !#zh + 关节另一端刚体的锚点。 */ + connectedAnchor: Vec2; + /** !#en + The rigidbody to which the other end of the joint is attached. + !#zh + 关节另一端链接的刚体 */ + connectedBody: RigidBody; + /** !#en + Should the two rigid bodies connected with this joint collide with each other? + !#zh + 链接到关节上的两个刚体是否应该相互碰撞? */ + collideConnected: boolean; + /** + !#en + Apply current changes to joint, this will regenerate inner box2d joint. + !#zh + 应用当前关节中的修改,调用此函数会重新生成内部 box2d 的关节。 + */ + apply(): void; + /** + !#en + Get the anchor point on rigidbody in world coordinates. + !#zh + 获取刚体世界坐标系下的锚点。 + */ + getWorldAnchor(): Vec2; + /** + !#en + Get the anchor point on connected rigidbody in world coordinates. + !#zh + 获取链接刚体世界坐标系下的锚点。 + */ + getWorldConnectedAnchor(): Vec2; + /** + !#en + Gets the reaction force of the joint. + !#zh + 获取关节的反作用力。 + @param timeStep The time to calculate the reaction force for. + */ + getReactionForce(timeStep: number): Vec2; + /** + !#en + Gets the reaction torque of the joint. + !#zh + 获取关节的反扭矩。 + @param timeStep The time to calculate the reaction torque for. + */ + getReactionTorque(timeStep: number): number; + } + /** !#en + A motor joint is used to control the relative motion + between two bodies. A typical usage is to control the movement + of a dynamic body with respect to the ground. + !#zh + 马达关节被用来控制两个刚体间的相对运动。 + 一个典型的例子是用来控制一个动态刚体相对于地面的运动。 */ + export class MotorJoint extends Joint { + /** !#en + The anchor of the rigidbody. + !#zh + 刚体的锚点。 */ + anchor: Vec2; + /** !#en + The anchor of the connected rigidbody. + !#zh + 关节另一端刚体的锚点。 */ + connectedAnchor: Vec2; + /** !#en + The linear offset from connected rigidbody to rigidbody. + !#zh + 关节另一端的刚体相对于起始端刚体的位置偏移量 */ + linearOffset: Vec2; + /** !#en + The angular offset from connected rigidbody to rigidbody. + !#zh + 关节另一端的刚体相对于起始端刚体的角度偏移量 */ + angularOffset: number; + /** !#en + The maximum force can be applied to rigidbody. + !#zh + 可以应用于刚体的最大的力值 */ + maxForce: number; + /** !#en + The maximum torque can be applied to rigidbody. + !#zh + 可以应用于刚体的最大扭矩值 */ + maxTorque: number; + /** !#en + The position correction factor in the range [0,1]. + !#zh + 位置矫正系数,范围为 [0, 1] */ + correctionFactor: number; + } + /** !#en + A mouse joint is used to make a point on a body track a + specified world point. This a soft constraint with a maximum + force. This allows the constraint to stretch and without + applying huge forces. + Mouse Joint will auto register the touch event with the mouse region node, + and move the choosed rigidbody in touch move event. + Note : generally mouse joint only used in test bed. + !#zh + 鼠标关节用于使刚体上的一个点追踪一个指定的世界坐标系下的位置。 + 鼠标关节可以指定一个最大的力来施加一个柔和的约束。 + 鼠标关节会自动使用 mouse region 节点来注册鼠标事件,并且在触摸移动事件中移动选中的刚体。 + 注意:一般鼠标关节只在测试环境中使用。 */ + export class MouseJoint extends Joint { + /** !#en + The anchor of the rigidbody. + !#zh + 刚体的锚点。 */ + anchor: Vec2; + /** !#en + The anchor of the connected rigidbody. + !#zh + 关节另一端刚体的锚点。 */ + connectedAnchor: Vec2; + /** !#en + The node used to register touch evnet. + If this is null, it will be the joint's node. + !#zh + 用于注册触摸事件的节点。 + 如果没有设置这个值,那么将会使用关节的节点来注册事件。 */ + mouseRegion: Node; + /** !#en + The target point. + The mouse joint will move choosed rigidbody to target point. + !#zh + 目标点,鼠标关节将会移动选中的刚体到指定的目标点 */ + target: Vec2; + /** !#en + The spring frequency. + !#zh + 弹簧系数。 */ + frequency: number; + /** !#en + The damping ratio. + !#zh + 阻尼,表示关节变形后,恢复到初始状态受到的阻力。 */ + 0: number; + /** !#en + The maximum force + !#zh + 最大阻力值 */ + maxForce: number; + } + /** !#en + A prismatic joint. This joint provides one degree of freedom: translation + along an axis fixed in rigidbody. Relative rotation is prevented. You can + use a joint limit to restrict the range of motion and a joint motor to + drive the motion or to model joint friction. + !#zh + 移动关节指定了只能在一个方向上移动刚体。 + 你可以开启关节限制来设置刚体运行移动的间距,也可以开启马达来使用关节马达驱动刚体的运行。 */ + export class PrismaticJoint extends Joint { + /** !#en + The local joint axis relative to rigidbody. + !#zh + 指定刚体可以移动的方向。 */ + localAxisA: Vec2; + /** !#en + The reference angle. + !#zh + 相对角度 */ + referenceAngle: number; + /** !#en + Enable joint distance limit? + !#zh + 是否开启关节的距离限制? */ + enableLimit: boolean; + /** !#en + Enable joint motor? + !#zh + 是否开启关节马达? */ + enableMotor: boolean; + /** !#en + The lower joint limit. + !#zh + 刚体能够移动的最小值 */ + lowerLimit: number; + /** !#en + The upper joint limit. + !#zh + 刚体能够移动的最大值 */ + upperLimit: number; + /** !#en + The maxium force can be applied to rigidbody to rearch the target motor speed. + !#zh + 可以施加到刚体的最大力。 */ + maxMotorForce: number; + /** !#en + The expected motor speed. + !#zh + 期望的马达速度。 */ + motorSpeed: number; + } + /** !#en + A rope joint enforces a maximum distance between two points + on two bodies. It has no other effect. + Warning: if you attempt to change the maximum length during + the simulation you will get some non-physical behavior. + !#zh + 绳子关节只指定两个刚体间的最大距离,没有其他的效果。 + 注意:如果你试图动态修改关节的长度,这有可能会得到一些意外的效果。 */ + export class RopeJoint extends Joint { + /** !#en + The max length. + !#zh + 最大长度。 */ + maxLength: number; + } + /** !#en + A revolute joint constrains two bodies to share a common point while they + are free to rotate about the point. The relative rotation about the shared + point is the joint angle. You can limit the relative rotation with + a joint limit that specifies a lower and upper angle. You can use a motor + to drive the relative rotation about the shared point. A maximum motor torque + is provided so that infinite forces are not generated. + !#zh + 旋转关节可以约束两个刚体围绕一个点来进行旋转。 + 你可以通过开启关节限制来限制旋转的最大角度和最小角度。 + 你可以通过开启马达来施加一个扭矩力来驱动这两个刚体在这一点上的相对速度。 */ + export class RevoluteJoint extends Joint { + /** !#en + The reference angle. + An angle between bodies considered to be zero for the joint angle. + !#zh + 相对角度。 + 两个物体之间角度为零时可以看作相等于关节角度 */ + referenceAngle: number; + /** !#en + The lower angle. + !#zh + 角度的最低限制。 */ + lowerAngle: number; + /** !#en + The upper angle. + !#zh + 角度的最高限制。 */ + upperAngle: number; + /** !#en + The maxium torque can be applied to rigidbody to rearch the target motor speed. + !#zh + 可以施加到刚体的最大扭矩。 */ + maxMotorTorque: number; + /** !#en + The expected motor speed. + !#zh + 期望的马达速度。 */ + motorSpeed: number; + /** !#en + Enable joint limit? + !#zh + 是否开启关节的限制? */ + enableLimit: boolean; + /** !#en + Enable joint motor? + !#zh + 是否开启关节马达? */ + enableMotor: boolean; + /** + !#en + Get the joint angle. + !#zh + 获取关节角度。 + */ + getJointAngle(): number; + } + /** !#en + A weld joint essentially glues two bodies together. A weld joint may + distort somewhat because the island constraint solver is approximate. + !#zh + 熔接关节相当于将两个刚体粘在了一起。 + 熔接关节可能会使某些东西失真,因为约束求解器算出的都是近似值。 */ + export class WeldJoint extends Joint { + /** !#en + The reference angle. + !#zh + 相对角度。 */ + referenceAngle: number; + /** !#en + The frequency. + !#zh + 弹性系数。 */ + frequency: number; + /** !#en + The damping ratio. + !#zh + 阻尼,表示关节变形后,恢复到初始状态受到的阻力。 */ + 0: number; + } + /** !#en + A wheel joint. This joint provides two degrees of freedom: translation + along an axis fixed in bodyA and rotation in the plane. You can use a joint motor to drive + the rotation or to model rotational friction. + This joint is designed for vehicle suspensions. + !#zh + 轮子关节提供两个维度的自由度:旋转和沿着指定方向上位置的移动。 + 你可以通过开启关节马达来使用马达驱动刚体的旋转。 + 轮组关节是专门为机动车类型设计的。 */ + export class WheelJoint extends Joint { + /** !#en + The local joint axis relative to rigidbody. + !#zh + 指定刚体可以移动的方向。 */ + localAxisA: Vec2; + /** !#en + The maxium torque can be applied to rigidbody to rearch the target motor speed. + !#zh + 可以施加到刚体的最大扭矩。 */ + maxMotorTorque: number; + /** !#en + The expected motor speed. + !#zh + 期望的马达速度。 */ + motorSpeed: number; + /** !#en + Enable joint motor? + !#zh + 是否开启关节马达? */ + enableMotor: boolean; + /** !#en + The spring frequency. + !#zh + 弹性系数。 */ + frequency: number; + /** !#en + The damping ratio. + !#zh + 阻尼,表示关节变形后,恢复到初始状态受到的阻力。 */ + dampingRatio: number; + } + /** !#en The color over time module of 3d particle. + !#zh 3D 粒子颜色变化模块 */ + export class ColorOvertimeModule { + /** !#en The enable of ColorOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + } + /** !#en The curve range of target value. + !#zh 目标值的曲线范围 */ + export class CurveRange { + /** !#en Curve type. + !#zh 曲线类型。 */ + mode: debug.DebugMode; + /** !#en The curve to use when mode is Curve. + !#zh 当 mode 为 Curve 时,使用的曲线。 */ + curve: AnimationCurve; + /** !#en The lower limit of the curve to use when mode is TwoCurves + !#zh 当 mode 为 TwoCurves 时,使用的曲线下限。 */ + curveMin: AnimationCurve; + /** !#en The upper limit of the curve to use when mode is TwoCurves + !#zh 当 mode 为 TwoCurves 时,使用的曲线上限。 */ + curveMax: AnimationCurve; + /** !#en When mode is Constant, the value of the curve. + !#zh 当 mode 为 Constant 时,曲线的值。 */ + constant: number; + /** !#en The lower limit of the curve to use when mode is TwoConstants + !#zh 当 mode 为 TwoConstants 时,曲线的下限。 */ + constantMin: number; + /** !#en The upper limit of the curve to use when mode is TwoConstants + !#zh 当 mode 为 TwoConstants 时,曲线的上限。 */ + constantMax: number; + /** !#en Coefficients applied to curve interpolation. + !#zh 应用于曲线插值的系数。 */ + multiplier: number; + } + /** !#en The force over time module of 3d particle. + !#zh 3D 粒子的加速度模块 */ + export class ForceOvertimeModule { + /** !#en The enable of ColorOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Coordinate system used in acceleration calculation. + !#zh 加速度计算时采用的坐标系。 */ + space: ParticleSystem3DAssembler.Space; + /** !#en X-axis acceleration component. + !#zh X 轴方向上的加速度分量。 */ + x: CurveRange; + /** !#en Y-axis acceleration component. + !#zh Y 轴方向上的加速度分量。 */ + y: CurveRange; + /** !#en Z-axis acceleration component. + !#zh Z 轴方向上的加速度分量。 */ + z: CurveRange; + } + /** !#en The gradient range of color. + !#zh 颜色值的渐变范围 */ + export class GradientRange { + /** !#en Gradient type. + !#zh 渐变色类型。 */ + mode: debug.DebugMode; + /** !#en The color when mode is Color. + !#zh 当 mode 为 Color 时的颜色。 */ + color: Color; + /** !#en Lower color limit when mode is TwoColors. + !#zh 当 mode 为 TwoColors 时的颜色下限。 */ + colorMin: Color; + /** !#en Upper color limit when mode is TwoColors. + !#zh 当 mode 为 TwoColors 时的颜色上限。 */ + colorMax: Color; + /** !#en Color gradient when mode is Gradient + !#zh 当 mode 为 Gradient 时的颜色渐变。 */ + gradient: Gradient; + /** !#en Lower color gradient limit when mode is TwoGradients. + !#zh 当 mode 为 TwoGradients 时的颜色渐变下限。 */ + gradientMin: Gradient; + /** !#en Upper color gradient limit when mode is TwoGradients. + !#zh 当 mode 为 TwoGradients 时的颜色渐变上限。 */ + gradientMax: Gradient; + } + /** !#en The color key of gradient. + !#zh color 关键帧 */ + export class ColorKey { + /** !#en Color value. + !#zh 颜色值。 */ + color: Color; + /** !#en Time value. + !#zh 时间值。 */ + time: number; + } + /** !#en The alpha key of gradient. + !#zh alpha 关键帧 */ + export class AlphaKey { + /** !#en Alpha value. + !#zh 透明度。 */ + alpha: number; + /** !#en Time. + !#zh 时间帧。 */ + time: number; + } + /** !#en The gradient data of color. + !#zh 颜色渐变数据 */ + export class Gradient { + /** !#en Array of color key. + !#zh 颜色关键帧列表。 */ + colorKeys: ColorKey[]; + /** !#en Array of alpha key. + !#zh 透明度关键帧列表。 */ + alphaKeys: AlphaKey[]; + /** !#en Blend mode. + !#zh 混合模式。 */ + mode: debug.DebugMode; + } + /** !#en The limit velocity module of 3d particle. + !#zh 3D 粒子的限速模块 */ + export class LimitVelocityOvertimeModule { + /** !#en The enable of LimitVelocityOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en The coordinate system used when calculating the lower speed limit. + !#zh 计算速度下限时采用的坐标系。 */ + space: ParticleSystem3DAssembler.Space; + /** !#en Whether to limit the three axes separately. + !#zh 是否三个轴分开限制。 */ + separateAxes: boolean; + /** !#en Lower speed limit + !#zh 速度下限。 */ + limit: CurveRange; + /** !#en Lower speed limit in X direction. + !#zh X 轴方向上的速度下限。 */ + limitX: CurveRange; + /** !#en Lower speed limit in Y direction. + !#zh Y 轴方向上的速度下限。 */ + limitY: CurveRange; + /** !#en Lower speed limit in Z direction. + !#zh Z 轴方向上的速度下限。 */ + limitZ: CurveRange; + /** !#en Interpolation of current speed and lower speed limit. + !#zh 当前速度与速度下限的插值。 */ + dampen: number; + } + /** !#en The optimized curve. + !#zh 优化曲线 */ + export class OptimizedCurve { + } + /** !#en The rotation module of 3d particle. + !#zh 3D 粒子的旋转模块 */ + export class RotationOvertimeModule { + /** !#en The enable of RotationOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Whether to set the rotation of three axes separately (not currently supported) + !#zh 是否三个轴分开设定旋转(暂不支持)。 */ + separateAxes: boolean; + /** !#en Set rotation around X axis. + !#zh 绕 X 轴设定旋转。 */ + x: CurveRange; + /** !#en Set rotation around Y axis. + !#zh 绕 Y 轴设定旋转。 */ + y: CurveRange; + /** !#en Set rotation around Z axis. + !#zh 绕 Z 轴设定旋转。 */ + z: CurveRange; + } + /** !#en The size module of 3d particle. + !#zh 3D 粒子的大小模块 */ + export class SizeOvertimeModule { + /** !#en The enable of SizeOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Decide whether to control particle size independently on each axis. + !#zh 决定是否在每个轴上独立控制粒子大小。 */ + separateAxes: boolean; + /** !#en Define a curve to determine the size change of particles during their life cycle. + !#zh 定义一条曲线来决定粒子在其生命周期中的大小变化。 */ + size: CurveRange; + /** !#en Defines a curve to determine the size change of particles in the X-axis direction during their life cycle. + !#zh 定义一条曲线来决定粒子在其生命周期中 X 轴方向上的大小变化。 */ + x: CurveRange; + /** !#en Defines a curve to determine the size change of particles in the Y-axis direction during their life cycle. + !#zh 定义一条曲线来决定粒子在其生命周期中 Y 轴方向上的大小变化。 */ + y: CurveRange; + /** !#en Defines a curve to determine the size change of particles in the Z-axis direction during their life cycle. + !#zh 定义一条曲线来决定粒子在其生命周期中 Z 轴方向上的大小变化。 */ + z: CurveRange; + } + /** !#en The texture animation module of 3d particle. + !#zh 3D 粒子的贴图动画模块 */ + export class TextureAnimationModule { + /** !#en The enable of TextureAnimationModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Set the type of particle map animation (only supports Grid mode for the time being) + !#zh 设定粒子贴图动画的类型(暂只支持 Grid 模式。 */ + mode: debug.DebugMode; + /** !#en Animation frames in X direction. + !#zh X 方向动画帧数。 */ + numTilesX: number; + /** !#en Animation frames in Y direction. + !#zh Y 方向动画帧数。 */ + numTilesY: number; + /** !#en The way of the animation plays. + !#zh 动画播放方式。 */ + animation: Animation; + /** !#en Randomly select a line from the animated map to generate the animation.
+ This option only takes effect when the animation playback mode is SingleRow. + !#zh 随机从动画贴图中选择一行以生成动画。
+ 此选项仅在动画播放方式为 SingleRow 时生效。 */ + randomRow: boolean; + /** !#en Select specific lines from the animation map to generate the animation.
+ This option is only available when the animation playback mode is SingleRow and randomRow is disabled. + !#zh 从动画贴图中选择特定行以生成动画。
+ 此选项仅在动画播放方式为 SingleRow 时且禁用 randomRow 时可用。 */ + rowIndex: number; + /** !#en Frame and time curve of animation playback in one cycle. + !#zh 一个周期内动画播放的帧与时间变化曲线。 */ + frameOverTime: CurveRange; + /** !#en Play from which frames, the time is the life cycle of the entire particle system. + !#zh 从第几帧开始播放,时间为整个粒子系统的生命周期。 */ + startFrame: CurveRange; + /** !#en Number of playback loops in a life cycle. + !#zh 一个生命周期内播放循环的次数。 */ + cycleCount: number; + } + /** !#en The velocity module of 3d particle. + !#zh 3D 粒子的速度模块 */ + export class VelocityOvertimeModule { + /** !#en The enable of VelocityOvertimeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Coordinate system used in speed calculation. + !#zh 速度计算时采用的坐标系。 */ + space: ParticleSystem3DAssembler.Space; + /** !#en Velocity component in X axis direction + !#zh X 轴方向上的速度分量。 */ + x: CurveRange; + /** !#en Velocity component in Y axis direction + !#zh Y 轴方向上的速度分量。 */ + y: CurveRange; + /** !#en Velocity component in Z axis direction + !#zh Z 轴方向上的速度分量。 */ + z: CurveRange; + /** !#en Speed correction factor (only supports CPU particles). + !#zh 速度修正系数(只支持 CPU 粒子)。 */ + speedModifier: CurveRange; + } + /** !#en The shape module of 3d particle. + !#zh 3D 粒子的发射形状模块 */ + export class ShapeModule { + /** !#en The enable of shapeModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Particle emitter type. + !#zh 粒子发射器类型。 */ + shapeType: shapeModule.ShapeType; + /** !#en The emission site of the particle. + !#zh 粒子从发射器哪个部位发射。 */ + emitFrom: shapeModule.EmitLocation; + /** !#en Particle emitter radius. + !#zh 粒子发射器半径。 */ + radius: number; + /** !#en Particle emitter emission position (not valid for Box type emitters): + - 0 means emitted from the surface; + - 1 means launch from the center; + - 0 ~ 1 indicates emission from the center to the surface. + !#zh 粒子发射器发射位置(对 Box 类型的发射器无效): + - 0 表示从表面发射; + - 1 表示从中心发射; + - 0 ~ 1 之间表示在中心到表面之间发射。 */ + radiusThickness: number; + /** !#en The angle between the axis of the cone and the generatrix + Determines the opening and closing of the cone launcher + !#zh 圆锥的轴与母线的夹角。 + 决定圆锥发射器的开合程度。 */ + angle: number; + /** !#en Particle emitters emit in a fan-shaped range. + !#zh 粒子发射器在一个扇形范围内发射。 */ + arc: number; + /** !#en How particles are emitted in the sector range. + !#zh 粒子在扇形范围内的发射方式。 */ + arcMode: shapeModule.ArcMode; + /** !#en Controls the discrete intervals around the arcs where particles might be generated. + !#zh 控制可能产生粒子的弧周围的离散间隔。 */ + arcSpread: number; + /** !#en The speed at which particles are emitted around the circumference. + !#zh 粒子沿圆周发射的速度。 */ + arcSpeed: CurveRange; + /** !#en Axis length from top of cone to bottom of cone . + Determines the height of the cone emitter. + !#zh 圆锥顶部截面距离底部的轴长。 + 决定圆锥发射器的高度。 */ + length: number; + /** !#en Particle emitter emission location (for box-type particle emitters). + !#zh 粒子发射器发射位置(针对 Box 类型的粒子发射器。 */ + boxThickness: Vec3; + /** !#en Particle Emitter Position + !#zh 粒子发射器位置。 */ + position: Vec3; + /** !#en Particle emitter rotation angle. + !#zh 粒子发射器旋转角度。 */ + rotation: Vec3; + /** !#en Particle emitter scaling + !#zh 粒子发射器缩放比例。 */ + scale: Vec3; + /** !#en The direction of particle movement is determined based on the initial direction of the particles. + !#zh 根据粒子的初始方向决定粒子的移动方向。 */ + alignToDirection: boolean; + /** !#en Set particle generation direction randomly. + !#zh 粒子生成方向随机设定。 */ + randomDirectionAmount: number; + /** !#en Interpolation between the current emission direction and the direction from the current position to the center of the node. + !#zh 表示当前发射方向与当前位置到结点中心连线方向的插值。 */ + sphericalDirectionAmount: number; + } + /** !#en The trail module of 3d particle. + !#zh 3D 粒子拖尾模块 */ + export class TrailModule { + /** !#en The enable of trailModule. + !#zh 是否启用 */ + enable: boolean; + /** !#en Sets how particles generate trajectories. + !#zh 设定粒子生成轨迹的方式。 */ + mode: trailModule.TrailMode; + /** !#en Life cycle of trajectory. + !#zh 轨迹存在的生命周期。 */ + lifeTime: CurveRange; + /** !#en Minimum spacing between each track particle + !#zh 每个轨迹粒子之间的最小间距。 */ + minParticleDistance: number; + /** !#en The coordinate system of trajectories. + !#zh 轨迹设定时的坐标系。 */ + space: ParticleSystem3DAssembler.Space; + /** !#en Whether the particle itself exists. + !#zh 粒子本身是否存在。 */ + existWithParticles: boolean; + /** !#en Set the texture fill method + !#zh 设定纹理填充方式。 */ + textureMode: trailModule.TextureMode; + /** !#en Whether to use particle width + !#zh 是否使用粒子的宽度。 */ + widthFromParticle: boolean; + /** !#en Curves that control track length + !#zh 控制轨迹长度的曲线。 */ + widthRatio: CurveRange; + /** !#en Whether to use particle color + !#zh 是否使用粒子的颜色。 */ + colorFromParticle: boolean; + /** !#en The color of trajectories. + !#zh 轨迹的颜色。 */ + colorOverTrail: GradientRange; + /** !#en Trajectories color over time. + !#zh 轨迹随时间变化的颜色。 */ + colorOvertime: GradientRange; + } + /** !#en + Trigger event + !#zh + 触发事件。 */ + export class ITriggerEvent { + /** !#en + The type of event fired + !#zh + 触发的事件类型 */ + type: string; + /** !#en + Triggers its own collider in the event + !#zh + 触发事件中的自己的碰撞器 */ + selfCollider: Collider3D; + /** !#en + Triggers another collider in the event + !#zh + 触发事件中的另一个碰撞器 */ + otherCollider: Collider3D; + } + /** !#en + Collision information for collision events. + !#zh + 碰撞事件的碰撞信息。 */ + export class IContactEquation { + /** !#en + The collision point A in the collision information. + !#zh + 碰撞信息中的碰撞点 A。 */ + contactA: Vec3; + /** !#en + Collision point B in collision information. + !#zh + 碰撞信息中的碰撞点 B。 */ + contactB: Vec3; + /** !#en + Normals in collision information. + !#zh + 碰撞信息中的法线。 */ + normal: Vec3; + } + /** !#en + Collision events. + !#zh + 碰撞事件。 */ + export class ICollisionEvent { + /** !#en + Event type of collision. + !#zh + 碰撞的事件类型。 */ + type: string; + /** !#en + Collider of its own in collision. + !#zh + 碰撞中的自己的碰撞器。 */ + selfCollider: Collider3D; + /** !#en + Another collider in the collision. + !#zh + 碰撞中的另一个碰撞器。 */ + otherCollider: Collider3D; + /** !#en + Information about all the points of impact in the collision. + !#zh + 碰撞中的所有碰撞点的信息。 */ + contacts: IContactEquation[]; + } + /** !#en The rigid body type + !#zh 刚体类型 */ + export enum ERigidBodyType { + DYNAMIC = 0, + STATIC = 0, + KINEMATIC = 0, + } + /** !#en + Physical systems manager. + !#zh + 物理系统管理器。 */ + export class Physics3DManager { + /** !#en + Whether to enable the physics system, default is false. + !#zh + 是否启用物理系统,默认不启用。 */ + enabled: boolean; + /** !#en + Whether to allow the physics system to automatically hibernate, default is true. + !#zh + 物理系统是否允许自动休眠,默认为 true。 */ + allowSleep: boolean; + /** !#en + The maximum number of sub-steps a full step is permitted to be broken into, default is 2. + !#zh + 物理每帧模拟的最大子步数,默认为 2。 */ + maxSubStep: number; + /** !#en + Time spent in each simulation of physics, default is 1/60s. + !#zh + 物理每步模拟消耗的固定时间,默认为 1/60 秒。 */ + deltaTime: number; + /** !#en + Whether to use a fixed time step. + !#zh + 是否使用固定的时间步长。 */ + useFixedTime: boolean; + /** !#en + Gravity value of the physics simulation, default is (0, -10, 0). + !#zh + 物理世界的重力数值,默认为 (0, -10, 0)。 */ + gravity: Vec3; + /** !#en + Gets the global default physical material. Note that builtin is null. + !#zh + 获取全局的默认物理材质,注意:builtin 时为 null。 */ + defaultMaterial: PhysicsMaterial|void; + /** + !#en + A physical system simulation is performed once and will now be performed automatically once per frame. + !#zh + 执行一次物理系统的模拟,目前将在每帧自动执行一次。 + @param deltaTime The time difference from the last execution is currently elapsed per frame + */ + update(deltaTime: number): void; + /** + !#en Detect all collision boxes and return all detected results, or null if none is detected. Note that the return value is taken from the object pool, so do not save the result reference or modify the result. + !#zh 检测所有的碰撞盒,并返回所有被检测到的结果,若没有检测到,则返回空值。注意返回值是从对象池中取的,所以请不要保存结果引用或者修改结果。 + @param worldRay A ray in world space + @param groupIndexOrName Collision group index or group name + @param maxDistance Maximum detection distance + @param queryTrigger Detect trigger or not + */ + raycast(worldRay: geomUtils.Ray, groupIndexOrName: number|string, maxDistance: number, queryTrigger: boolean): PhysicsRayResult[]; + /** + !#en Detect all collision boxes and return the detection result with the shortest ray distance. If not, return null value. Note that the return value is taken from the object pool, so do not save the result reference or modify the result. + !#zh 检测所有的碰撞盒,并返回射线距离最短的检测结果,若没有,则返回空值。注意返回值是从对象池中取的,所以请不要保存结果引用或者修改结果。 + @param worldRay A ray in world space + @param groupIndexOrName Collision group index or group name + @param maxDistance Maximum detection distance + @param queryTrigger Detect trigger or not + */ + raycastClosest(worldRay: geomUtils.Ray, groupIndexOrName: number|string, maxDistance: number, queryTrigger: boolean): PhysicsRayResult; + } + /** !#en + Used to store physical ray detection results + !#zh + 用于保存物理射线检测结果 */ + export class PhysicsRayResult { + /** !#en + Hit the point + !#zh + 击中点 */ + hitPoint: Vec3; + /** !#en + Distance + !#zh + 距离 */ + distance: number; + /** !#en + Hit the collision box + !#zh + 击中的碰撞盒 */ + collider: Collider3D; + /** + !#en + Set up ray. This method is used internally by the engine. Do not call it from an external script + !#zh + 设置射线,此方法由引擎内部使用,请勿在外部脚本调用 + @param hitPoint hitPoint + @param distance distance + @param collider collider + */ + _assign(hitPoint: Vec3, distance: number, collider: Collider3D): void; + /** + !#en + Clone + !#zh + 克隆 + */ + clone(): void; + } + /** Rigid body interface */ + export class IRigidBody { + rigidBody: RigidBody3D; + mass: number; + linearDamping: number; + angularDamping: number; + isKinematic: boolean; + useGravity: boolean; + fixedRotation: boolean; + linearFactor: IVec3Like; + angularFactor: IVec3Like; + allowSleep: boolean; + isAwake: boolean; + isSleepy: boolean; + isSleeping: boolean; + wakeUp(): void; + sleep(): void; + /** + + @param out out + */ + getLinearVelocity(out: IVec3Like): void; + /** + + @param out out + */ + setLinearVelocity(out: IVec3Like): void; + /** + + @param out out + */ + getAngularVelocity(out: IVec3Like): void; + /** + + @param out out + */ + setAngularVelocity(out: IVec3Like): void; + /** + + @param force force + @param relativePoint relativePoint + */ + applyForce(force: IVec3Like, relativePoint: IVec3Like): void; + /** + + @param force force + @param relativePoint relativePoint + */ + applyLocalForce(force: IVec3Like, relativePoint: IVec3Like): void; + /** + + @param force force + @param relativePoint relativePoint + */ + applyImpulse(force: IVec3Like, relativePoint: IVec3Like): void; + /** + + @param force force + @param relativePoint relativePoint + */ + applyLocalImpulse(force: IVec3Like, relativePoint: IVec3Like): void; + /** + + @param torque torque + */ + applyTorque(torque: IVec3Like): void; + /** + + @param torque torque + */ + applyLocalTorque(torque: IVec3Like): void; + } + /** Class has x y z properties */ + export class IVec3Like { + x: number; + y: number; + z: number; + } + /** Class has x y z w properties */ + export class IQuatLike { + x: number; + y: number; + z: number; + w: number; + } + /** !#en Base shape interface. */ + export class IBaseShape { + collider: Collider3D; + attachedRigidBody: RigidBody3D|void; + material: any; + isTrigger: boolean; + center: IVec3Like; + } + /** !#en box shape interface */ + export class IBoxShape { + size: IVec3Like; + } + /** !#en Sphere shape interface */ + export class ISphereShape { + radius: number; + } + /** Ray cast options */ + export class IRaycastOptions { + groupIndex: number; + queryTrigger: boolean; + maxDistance: number; + } + /** Collision detect */ + export class ICollisionDetect { + /** + Ray cast, and return information of the closest hit. + @param worldRay worldRay + @param options options + @param out out + */ + raycastClosest(worldRay: geomUtils.Ray, options: IRaycastOptions, out: PhysicsRayResult): boolean; + /** + Ray cast against all bodies. The provided callback will be executed for each hit with a RaycastResult as single argument. + @param worldRay worldRay + @param options options + @param pool pool + @param resultes resultes + */ + raycast(worldRay: geomUtils.Ray, options: IRaycastOptions, pool: RecyclePool, resultes: PhysicsRayResult[]): boolean; + } + /** Physics world interface */ + export class IPhysicsWorld { + } + /** !#en Manage Dynamic Atlas Manager. Dynamic Atlas Manager is used for merging textures at runtime, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details. + !#zh 管理动态图集。动态图集用于在运行时对贴图进行合并,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。 */ + export class DynamicAtlasManager { + /** !#en Enable or disable the dynamic atlas, see [Dynamic Atlas](https://docs.cocos.com/creator/manual/en/advanced-topics/dynamic-atlas.html) for details. + !#zh 开启或者关闭动态图集,详见 [动态合图](https://docs.cocos.com/creator/manual/zh/advanced-topics/dynamic-atlas.html)。 */ + enabled: boolean; + /** !#en The maximum number of atlas that can be created. + !#zh 可以创建的最大图集数量。 */ + maxAtlasCount: number; + /** !#en Get the current created atlas count. + !#zh 获取当前已经创建的图集数量。 */ + atlasCount: number; + /** !#en Is enable textureBleeding. + !#zh 是否开启 textureBleeding */ + textureBleeding: boolean; + /** !#en The size of the atlas that was created + !#zh 创建的图集的宽高 */ + textureSize: number; + /** !#en The maximum size of the picture that can be added to the atlas. + !#zh 可以添加进图集的图片的最大尺寸。 */ + maxFrameSize: number; + /** !#en The minimum size of the picture that can be added to the atlas. + !#zh 可以添加进图集的图片的最小尺寸。 */ + minFrameSize: number; + /** + !#en Append a sprite frame into the dynamic atlas. + !#zh 添加碎图进入动态图集。 + @param spriteFrame spriteFrame + */ + insertSpriteFrame(spriteFrame: SpriteFrame): void; + /** + !#en Resets all dynamic atlas, and the existing ones will be destroyed. + !#zh 重置所有动态图集,已有的动态图集会被销毁。 + */ + reset(): void; + /** + !#en Displays all the dynamic atlas in the current scene, which you can use to view the current atlas state. + !#zh 在当前场景中显示所有动态图集,可以用来查看当前的合图状态。 + @param show show + */ + showDebug(show: boolean): Node; + } + /** !#en + Each frame applies a constant force to a rigid body, depending on the RigidBody3D + !#zh + 在每帧对一个刚体施加持续的力,依赖 RigidBody3D 组件 */ + export class ConstantForce extends Component { + /** !#en + Set the force used in the world coordinate system, use `this.force = otherVec3`. + !#zh + 设置世界坐标系中使用的力,设置时请用 `this.force = otherVec3` 的方式。 */ + force: Vec3; + /** !#en + Set the force used in the local coordinate system, using `this.localforce = otherVec3`. + !#zh + 获取和设置本地坐标系中使用的力,设置时请用 `this.localForce = otherVec3` 的方式。 */ + localForce: Vec3; + /** !#en + Torque applied to the world orientation + !#zh + 对世界朝向施加的扭矩 */ + torque: Vec3; + /** !#en + Torque applied to local orientation, using `this.localtorque = otherVec3`. + !#zh + 对本地朝向施加的扭矩,设置时请用 `this.localTorque = otherVec3` 的方式。 */ + localTorque: Vec3; + } + /** !#en + RigidBody is the basic object that make up the physical world, and it can make a node physically affected and react. + !#zh + 刚体是组成物理世界的基本对象,可以让一个节点受到物理影响并产生反应。该组件在使用 Builtin 物理引擎时无效。 */ + export class RigidBody3D extends Component { + /** !#en + Whether sleep is allowed. + !#zh + 是否允许休眠。 */ + allowSleep: boolean; + /** !#en + The mass of the rigidbody. + !#zh + 刚体的质量。 */ + mass: number; + /** !#en + Used to reduce the linear rate of rigidbody. The larger the value, the slower the rigidbody moves. + !#zh + 线性阻尼,用于减小刚体的线性速率,值越大物体移动越慢。 */ + linearDamping: number; + /** !#en + Used to reduce the rotation rate of rigidbody. The larger the value, the slower the rigidbody rotates. + !#zh + 角阻尼,用于减小刚体的旋转速率,值越大刚体旋转越慢。 */ + angularDamping: number; + /** !#en + If enabled, the developer controls the displacement and rotation of the rigidbody, not the physics engine. + !#zh + 是否由开发者来控制刚体的位移和旋转,而不是受物理引擎的影响。 */ + isKinematic: boolean; + /** !#en + If enabled, the rigidbody is affected by gravity. + !#zh + 如果开启,刚体会受到重力影响。 */ + useGravity: boolean; + /** !#en + If enabled, the rigidbody will be fixed without rotation during a collision. + !#zh + 如果开启,发生碰撞时会固定刚体不产生旋转。 */ + fixedRotation: boolean; + /** !#en + It can affect the linear velocity change of the rigidbody in each axis. The larger the value, the faster the rigidbody moves. + !#zh + 线性因子,可影响刚体在每个轴向的线性速度变化,值越大刚体移动越快。 */ + linearFactor: Vec3; + /** !#en + It can affect the rotation speed change of the rigidbody in each axis. The larger the value, the faster the rigidbody rotates. + !#zh + 旋转因子,可影响刚体在每个轴向的旋转速度变化,值越大刚体旋转越快。 */ + angularFactor: Vec3; + /** !#en + The rigidbody is awake. + !#zh + 刚体是否为唤醒的状态。 */ + isAwake: boolean; + /** !#en + The rigidbody can enter hibernation. + !#zh + 刚体是否为可进入休眠的状态。 */ + isSleepy: boolean; + /** !#en + The rigidbody is sleeping. + !#zh + 刚体是否为正在休眠的状态。 */ + isSleeping: boolean; + /** !#en + Get the rigidbody object inside the physics engine. + !#zh + 获得物理引擎内部刚体对象。 */ + rigidBody: IRigidBody; + /** + !#en + A force is applied to a rigid body at a point in world space. + !#zh + 在世界空间中的某点上对刚体施加一个作用力。 + @param force force + @param relativePoint The point of action, relative to the center of the rigid body. + */ + applyForce(force: Vec3, relativePoint: Vec3): void; + /** + !#en + Apply a force on the rigid body at a point in local space. + !#zh + 在本地空间中的某点上对刚体施加一个作用力。 + @param force force + @param localPoint Point of application + */ + applyLocalForce(force: Vec3, localPoint: Vec3): void; + /** + !#en + Apply an impulse to a rigid body at a point in world space. + !#zh + 在世界空间的某点上对刚体施加一个冲量。 + @param impulse impulse + @param relativePoint The point of action, relative to the center of the rigid body. + */ + applyImpulse(impulse: Vec3, relativePoint: Vec3): void; + /** + !#en + Apply an impulse to the rigid body at a point in local space. + !#zh + 在本地空间的某点上对刚体施加一个冲量。 + @param impulse impulse + @param localPoint Point of application + */ + applyLocalImpulse(impulse: Vec3, localPoint: Vec3): void; + /** + !#en + Apply a torque to the rigid body. + !#zh + 对刚体施加扭转力。 + @param torque torque + */ + applyTorque(torque: Vec3): void; + /** + !#en + Apply a local torque to the rigid body. + !#zh + 对刚体施加本地扭转力。 + @param torque torque + */ + applyLocalTorque(torque: Vec3): void; + /** + !#en + Awaken the rigid body. + !#zh + 唤醒刚体。 + */ + wakeUp(): void; + /** + !#en + Dormant rigid body. + !#zh + 休眠刚体。 + */ + sleep(): void; + /** + !#en + Get linear velocity. + !#zh + 获取线性速度。 + @param out out + */ + getLinearVelocity(out: Vec3): void; + /** + !#en + Set linear speed. + !#zh + 设置线性速度。 + @param value value + */ + setLinearVelocity(value: Vec3): void; + /** + !#en + Gets the rotation speed. + !#zh + 获取旋转速度。 + @param out out + */ + getAngularVelocity(out: Vec3): void; + /** + !#en + Set rotation speed. + !#zh + 设置旋转速度。 + @param value value + */ + setAngularVelocity(value: Vec3): void; + } + /** !#en + Physics material. + !#zh + 物理材质。 */ + export class PhysicsMaterial extends Asset { + /** !#en + Friction for this material. + !#zh + 物理材质的摩擦力。 */ + friction: number; + /** !#en + Restitution for this material. + !#zh + 物理材质的弹力。 */ + restitution: number; + } + /** !#en + Physics box collider + !#zh + 物理盒子碰撞器 */ + export class BoxCollider3D extends Collider3D { + /** !#en + Get or set the size of the box, in local space. + !#zh + 获取或设置盒的大小。 */ + size: Vec3; + boxShape: IBoxShape; + } + /** !#en + The base class of the collider. + !#zh + 碰撞器的基类。 */ + export class Collider3D extends Component implements EventTarget { + sharedMaterial: PhysicsMaterial; + /** !#en + get or set the collider is trigger, this will be always trigger if using builtin. + !#zh + 获取或设置碰撞器是否为触发器。 */ + isTrigger: boolean; + /** !#en + get or set the center of the collider, in local space. + !#zh + 获取或设置碰撞器的中心点。 */ + center: Vec3; + /** !#en + get the collider attached rigidbody, this may be null. + !#zh + 获取碰撞器所绑定的刚体组件,可能为 null。 */ + attachedRigidbody: RigidBody3D|void; + /** !#en + get collider shape. + !#zh + 获取碰撞器形状。 */ + shape: IBaseShape; + /** + !#en + Register an callback of a specific event type on the EventTarget. + This type of event should be triggered via `emit`. + !#zh + 注册事件目标的特定事件类型回调。这种类型的事件应该被 `emit` 触发。 + @param type The type of collider event can be `trigger-enter`, `trigger-stay`, `trigger-exit` or `collision-enter`, `collision-stay`, `collision-exit`. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null. + + @example + ```js + eventTarget.on('fire', function (event) { + // event is ITriggerEvent or ICollisionEvent + }, node); + ``` + */ + on(type: string, callback: T, target?: any, useCapture?: boolean): T; + /** + !#en + Removes the listeners previously registered with the same type, callback, target and or useCapture, + if only type is passed as parameter, all listeners registered with that type will be removed. + !#zh + 删除之前用同类型,回调,目标或 useCapture 注册的事件监听器,如果只传递 type,将会删除 type 类型的所有事件监听器。 + @param type The type of collider event can be `trigger-enter`, `trigger-stay`, `trigger-exit` or `collision-enter`, `collision-stay`, `collision-exit`. + @param callback The callback to remove. + @param target The target (this object) to invoke the callback, if it's not given, only callback without target will be removed. + + @example + ```js + // register fire eventListener + var callback = eventTarget.on('fire', function () { + cc.log("fire in the hole"); + }, target); + // remove fire event listener + eventTarget.off('fire', callback, target); + // remove all fire event listeners + eventTarget.off('fire'); + ``` + */ + off(type: string, callback?: Function, target?: any): void; + /** + !#en + Register an callback of a specific event type on the EventTarget, + the callback will remove itself after the first time it is triggered. + !#zh + 注册事件目标的特定事件类型回调,回调会在第一时间被触发后删除自身。 + @param type The type of collider event can be `trigger-enter`, `trigger-stay`, `trigger-exit` or `collision-enter`, `collision-stay`, `collision-exit`. + @param callback The callback that will be invoked when the event is dispatched. + The callback is ignored if it is a duplicate (the callbacks are unique). + @param target The target (this object) to invoke the callback, can be null. + + @example + ```js + eventTarget.once('fire', function (event) { + // event is ITriggerEvent or ICollisionEvent + }, node); + ``` + */ + once(type: string, callback: (event: ITriggerEvent|ICollisionEvent) => void, target?: any): void; + /** + !#en Checks whether the EventTarget object has any callback registered for a specific type of event. + !#zh 检查事件目标对象是否有为特定类型的事件注册的回调。 + @param type The type of event. + */ + hasEventListener(type: string): boolean; + /** + !#en Removes all callbacks previously registered with the same target (passed as parameter). + This is not for removing all listeners in the current event target, + and this is not for removing all listeners the target parameter have registered. + It's only for removing all listeners (callback and target couple) registered on the current event target by the target parameter. + !#zh 在当前 EventTarget 上删除指定目标(target 参数)注册的所有事件监听器。 + 这个函数无法删除当前 EventTarget 的所有事件监听器,也无法删除 target 参数所注册的所有事件监听器。 + 这个函数只能删除 target 参数在当前 EventTarget 上注册的所有事件监听器。 + @param target The target to be searched for all related listeners + */ + targetOff(target: any): void; + /** + !#en + Send an event with the event object. + !#zh + 通过事件对象派发事件 + @param event event + */ + dispatchEvent(event: Event): void; + /** + !#en + Destroy all callbackInfos. + !#zh + 销毁记录的事件 + */ + clear(): void; + } + /** !#en + Physics sphere collider + !#zh + 物理球碰撞器 */ + export class SphereCollider3D extends Collider3D { + /** !#en + Get or set the radius of the sphere. + !#zh + 获取或设置球的半径。 */ + radius: number; + sphereShape: ISphereShape; + } + /**************************************************** + * audioEngine + *****************************************************/ + + export namespace audioEngine { + /** !#en Audio state. + !#zh 声音播放状态 */ + export enum AudioState { + ERROR = 0, + INITIALZING = 0, + PLAYING = 0, + PAUSED = 0, + STOPPED = 0, + } + } + + /**************************************************** + * debug + *****************************************************/ + + export namespace debug { + /** !#en Enum for debug modes. + !#zh 调试模式 */ + export enum DebugMode { + NONE = 0, + INFO = 0, + WARN = 0, + ERROR = 0, + INFO_FOR_WEB_PAGE = 0, + WARN_FOR_WEB_PAGE = 0, + ERROR_FOR_WEB_PAGE = 0, + } + } + + /**************************************************** + * Node + *****************************************************/ + + export namespace Node { + /** !#en Node's local dirty properties flag + !#zh Node 的本地属性 dirty 状态位 */ + export enum _LocalDirtyFlag { + POSITION = 0, + SCALE = 0, + ROTATION = 0, + SKEW = 0, + TRS = 0, + RS = 0, + TRS = 0, + PHYSICS_POSITION = 0, + PHYSICS_SCALE = 0, + PHYSICS_ROTATION = 0, + PHYSICS_TRS = 0, + PHYSICS_RS = 0, + ALL_POSITION = 0, + ALL_SCALE = 0, + ALL_ROTATION = 0, + ALL_TRS = 0, + ALL = 0, + } + } + + /**************************************************** + * Node + *****************************************************/ + + export namespace Node { + /** !#en The event type supported by Node + !#zh Node 支持的事件类型 */ + export class EventType { + /** !#en The event type for touch start event, you can use its value directly: 'touchstart' + !#zh 当手指触摸到屏幕时。 */ + static TOUCH_START: string; + /** !#en The event type for touch move event, you can use its value directly: 'touchmove' + !#zh 当手指在屏幕上移动时。 */ + static TOUCH_MOVE: string; + /** !#en The event type for touch end event, you can use its value directly: 'touchend' + !#zh 当手指在目标节点区域内离开屏幕时。 */ + static TOUCH_END: string; + /** !#en The event type for touch end event, you can use its value directly: 'touchcancel' + !#zh 当手指在目标节点区域外离开屏幕时。 */ + static TOUCH_CANCEL: string; + /** !#en The event type for mouse down events, you can use its value directly: 'mousedown' + !#zh 当鼠标按下时触发一次。 */ + static MOUSE_DOWN: string; + /** !#en The event type for mouse move events, you can use its value directly: 'mousemove' + !#zh 当鼠标在目标节点在目标节点区域中移动时,不论是否按下。 */ + static MOUSE_MOVE: string; + /** !#en The event type for mouse enter target events, you can use its value directly: 'mouseenter' + !#zh 当鼠标移入目标节点区域时,不论是否按下。 */ + static MOUSE_ENTER: string; + /** !#en The event type for mouse leave target events, you can use its value directly: 'mouseleave' + !#zh 当鼠标移出目标节点区域时,不论是否按下。 */ + static MOUSE_LEAVE: string; + /** !#en The event type for mouse up events, you can use its value directly: 'mouseup' + !#zh 当鼠标从按下状态松开时触发一次。 */ + static MOUSE_UP: string; + /** !#en The event type for mouse wheel events, you can use its value directly: 'mousewheel' + !#zh 当鼠标滚轮滚动时。 */ + static MOUSE_WHEEL: string; + /** !#en The event type for position change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点位置改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static POSITION_CHANGED: string; + /** !#en The event type for rotation change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点旋转改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static ROTATION_CHANGED: string; + /** !#en The event type for scale change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点缩放改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static SCALE_CHANGED: string; + /** !#en The event type for size change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点尺寸改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static SIZE_CHANGED: string; + /** !#en The event type for anchor point change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点锚点改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static ANCHOR_CHANGED: string; + /** !#en The event type for color change events. + Performance note, this event will be triggered every time corresponding properties being changed, + if the event callback have heavy logic it may have great performance impact, try to avoid such scenario. + !#zh 当节点颜色改变时触发的事件。 + 性能警告:这个事件会在每次对应的属性被修改时触发,如果事件回调损耗较高,有可能对性能有很大的负面影响,请尽量避免这种情况。 */ + static COLOR_CHANGED: string; + /** !#en The event type for new child added events. + !#zh 当新的子节点被添加时触发的事件。 */ + static CHILD_ADDED: string; + /** !#en The event type for child removed events. + !#zh 当子节点被移除时触发的事件。 */ + static CHILD_REMOVED: string; + /** !#en The event type for children reorder events. + !#zh 当子节点顺序改变时触发的事件。 */ + static CHILD_REORDER: string; + /** !#en The event type for node group changed events. + !#zh 当节点归属群组发生变化时触发的事件。 */ + static GROUP_CHANGED: string; + /** !#en The event type for node's sibling order changed. + !#zh 当节点在兄弟节点中的顺序发生变化时触发的事件。 */ + static SIBLING_ORDER_CHANGED: string; + } + } + + /**************************************************** + * ParticleSystem + *****************************************************/ + + export namespace ParticleSystem { + /** !#en Enum for emitter modes + !#zh 发射模式 */ + export enum EmitterMode { + GRAVITY = 0, + RADIUS = 0, + } + } + + /**************************************************** + * ParticleSystem + *****************************************************/ + + export namespace ParticleSystem { + /** !#en Enum for particles movement type. + !#zh 粒子位置类型 */ + export enum PositionType { + FREE = 0, + RELATIVE = 0, + GROUPED = 0, + } + } + + /**************************************************** + * WebView + *****************************************************/ + + export namespace WebView { + /** !#en WebView event type + !#zh 网页视图事件类型 */ + export enum EventType { + LOADED = 0, + LOADING = 0, + ERROR = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** !#en The orientation of tiled map. + !#zh Tiled Map 地图方向。 */ + export enum Orientation { + ORTHO = 0, + HEX = 0, + ISO = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** The property type of tiled map. */ + export enum Property { + NONE = 0, + MAP = 0, + LAYER = 0, + OBJECTGROUP = 0, + OBJECT = 0, + TILE = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** The tile flags of tiled map. */ + export enum TileFlag { + HORIZONTAL = 0, + VERTICAL = 0, + DIAGONAL = 0, + FLIPPED_ALL = 0, + FLIPPED_MASK = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** !#en The stagger axis of Hex tiled map. + !#zh 六边形地图的 stagger axis 值 */ + export enum StaggerAxis { + STAGGERAXIS_X = 0, + STAGGERAXIS_Y = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** !#en The render order of tiled map. + !#zh 地图的渲染顺序 */ + export enum RenderOrder { + STAGGERINDEX_ODD = 0, + STAGGERINDEX_EVEN = 0, + RightDown = 0, + RightUp = 0, + LeftDown = 0, + LeftUp = 0, + } + } + + /**************************************************** + * TiledMap + *****************************************************/ + + export namespace TiledMap { + /** !#en TiledMap Object Type + !#zh 地图物体类型 */ + export enum TMXObjectType { + RECT = 0, + ELLIPSE = 0, + POLYGON = 0, + POLYLINE = 0, + IMAGE = 0, + TEXT = 0, + } + } + + /**************************************************** + * VideoPlayer + *****************************************************/ + + export namespace VideoPlayer { + /** !#en Video event type + !#zh 视频事件类型 */ + export enum EventType { + PLAYING = 0, + PAUSED = 0, + STOPPED = 0, + COMPLETED = 0, + META_LOADED = 0, + CLICKED = 0, + READY_TO_PLAY = 0, + } + } + + /**************************************************** + * VideoPlayer + *****************************************************/ + + export namespace VideoPlayer { + /** !#en Enum for video resouce type type. + !#zh 视频来源 */ + export enum ResourceType { + REMOTE = 0, + LOCAL = 0, + } + } + + /**************************************************** + * Collider + *****************************************************/ + + export namespace Collider { + /** !#en Defines a Box Collider . + !#zh 用来定义包围盒碰撞体 */ + export class Box { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Box size + !#zh 包围盒大小 */ + size: Size; + } + } + + /**************************************************** + * Collider + *****************************************************/ + + export namespace Collider { + /** !#en Defines a Circle Collider . + !#zh 用来定义圆形碰撞体 */ + export class Circle { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Circle radius + !#zh 圆形半径 */ + radius: number; + } + } + + /**************************************************** + * Collider + *****************************************************/ + + export namespace Collider { + /** !#en Defines a Polygon Collider . + !#zh 用来定义多边形碰撞体 */ + export class Polygon { + /** !#en Position offset + !#zh 位置偏移量 */ + offset: Vec2; + /** !#en Polygon points + !#zh 多边形顶点数组 */ + points: Vec2[]; + } + } + + /**************************************************** + * Light + *****************************************************/ + + export namespace Light { + /** !#en The light source type + + !#zh 光源类型 */ + export enum Type { + DIRECTIONAL = 0, + POINT = 0, + SPOT = 0, + AMBIENT = 0, + } + } + + /**************************************************** + * Light + *****************************************************/ + + export namespace Light { + /** !#en The shadow type + + !#zh 阴影类型 */ + export enum ShadowType { + NONE = 0, + HARD = 0, + SOFT_PCF3X3 = 0, + SOFT_PCF5X5 = 0, + } + } + + /**************************************************** + * Prefab + *****************************************************/ + + export namespace Prefab { + /** !#zh + Prefab 创建实例所用的优化策略,配合 {{#crossLink "Prefab.optimizationPolicy"}}cc.Prefab#optimizationPolicy{{/crossLink}} 使用。 + !#en + An enumeration used with the {{#crossLink "Prefab.optimizationPolicy"}}cc.Prefab#optimizationPolicy{{/crossLink}} + to specify how to optimize the instantiate operation. */ + export enum OptimizationPolicy { + AUTO = 0, + SINGLE_INSTANCE = 0, + MULTI_INSTANCE = 0, + } + } + + /**************************************************** + * RenderTexture + *****************************************************/ + + export namespace RenderTexture { + /** !#en The depth buffer and stencil buffer format for RenderTexture. + !#zh RenderTexture 的深度缓冲以及模板缓冲格式。 */ + export enum DepthStencilFormat { + RB_FMT_D24S8 = 0, + RB_FMT_S8 = 0, + RB_FMT_D16 = 0, + } + } + + /**************************************************** + * Texture2D + *****************************************************/ + + export namespace Texture2D { + /** The texture pixel format, default value is RGBA8888, + you should note that textures loaded by normal image files (png, jpg) can only support RGBA8888 format, + other formats are supported by compressed file types or raw data. */ + export enum PixelFormat { + RGB565 = 0, + RGB5A1 = 0, + RGBA4444 = 0, + RGB888 = 0, + RGBA8888 = 0, + RGBA32F = 0, + A8 = 0, + I8 = 0, + AI88 = 0, + RGB_PVRTC_2BPPV1 = 0, + RGBA_PVRTC_2BPPV1 = 0, + RGB_A_PVRTC_2BPPV1 = 0, + RGB_PVRTC_4BPPV1 = 0, + RGBA_PVRTC_4BPPV1 = 0, + RGB_A_PVRTC_4BPPV1 = 0, + RGB_ETC1 = 0, + RGBA_ETC1 = 0, + RGB_ETC2 = 0, + RGBA_ETC2 = 0, + } + } + + /**************************************************** + * Texture2D + *****************************************************/ + + export namespace Texture2D { + /** The texture wrap mode */ + export enum WrapMode { + REPEAT = 0, + CLAMP_TO_EDGE = 0, + MIRRORED_REPEAT = 0, + } + } + + /**************************************************** + * Texture2D + *****************************************************/ + + export namespace Texture2D { + /** The texture filter mode */ + export enum Filter { + LINEAR = 0, + NEAREST = 0, + } + } + + /**************************************************** + * Event + *****************************************************/ + + export namespace Event { + /** !#en The Custom event + !#zh 自定义事件 */ + export class EventCustom extends Event { + /** + + @param type The name of the event (case-sensitive), e.g. "click", "fire", or "submit" + @param bubbles A boolean indicating whether the event bubbles up through the tree or not + */ + constructor(type: string, bubbles: boolean); + /** !#en A reference to the detailed data of the event + !#zh 事件的详细数据 */ + detail: any; + /** + !#en Sets user data + !#zh 设置用户数据 + @param data data + */ + setUserData(data: any): void; + /** + !#en Gets user data + !#zh 获取用户数据 + */ + getUserData(): any; + /** + !#en Gets event name + !#zh 获取事件名称 + */ + getEventName(): string; + } + } + + /**************************************************** + * SystemEvent + *****************************************************/ + + export namespace SystemEvent { + /** !#en The event type supported by SystemEvent + !#zh SystemEvent 支持的事件类型 */ + export class EventType { + /** !#en The event type for press the key down event, you can use its value directly: 'keydown' + !#zh 当按下按键时触发的事件 */ + static KEY_DOWN: string; + /** !#en The event type for press the key up event, you can use its value directly: 'keyup' + !#zh 当松开按键时触发的事件 */ + static KEY_UP: string; + /** !#en The event type for press the devicemotion event, you can use its value directly: 'devicemotion' + !#zh 重力感应 */ + static DEVICEMOTION: string; + } + } + + /**************************************************** + * Animation + *****************************************************/ + + export namespace Animation { + /** !#en The event type supported by Animation + !#zh Animation 支持的事件类型 */ + export class EventType { + /** !#en Emit when begin playing animation + !#zh 开始播放时触发 */ + static PLAY: string; + /** !#en Emit when stop playing animation + !#zh 停止播放时触发 */ + static STOP: string; + /** !#en Emit when pause animation + !#zh 暂停播放时触发 */ + static PAUSE: string; + /** !#en Emit when resume animation + !#zh 恢复播放时触发 */ + static RESUME: string; + /** !#en If animation repeat count is larger than 1, emit when animation play to the last frame + !#zh 假如动画循环次数大于 1,当动画播放到最后一帧时触发 */ + static LASTFRAME: string; + /** !#en Emit when finish playing animation + !#zh 动画播放完成时触发 */ + static FINISHED: string; + } + } + + /**************************************************** + * Button + *****************************************************/ + + export namespace Button { + /** !#en Enum for transition type. + !#zh 过渡类型 */ + export enum Transition { + NONE = 0, + COLOR = 0, + SPRITE = 0, + SCALE = 0, + } + } + + /**************************************************** + * Component + *****************************************************/ + + export namespace Component { + /** !#en + Component will register a event to target component's handler. + And it will trigger the handler when a certain event occurs. + + !@zh + “EventHandler” 类用来设置场景中的事件回调, + 该类允许用户设置回调目标节点,目标组件名,组件方法名, + 并可通过 emit 方法调用目标函数。 */ + export class EventHandler { + /** !#en the node that contains target callback, such as the node example script belongs to + !#zh 事件响应函数所在节点 ,比如例子中脚本归属的节点本身 */ + target: Node; + /** !#en name of the component(script) that contains target callback, such as the name 'MainMenu' of script in example + !#zh 事件响应函数所在组件名(脚本名), 比如例子中的脚本名 'MainMenu' */ + component: string; + /** !#en Event handler, such as function's name 'onClick' in example + !#zh 响应事件函数名,比如例子中的 'onClick' */ + handler: string; + /** !#en Custom Event Data, such as 'eventType' in example + !#zh 自定义事件数据,比如例子中的 eventType */ + customEventData: string; + /** + + @param events events + @param params params + */ + static emitEvents(events: EventHandler[], ...params: any[]): void; + /** + !#en Emit event with params + !#zh 触发目标组件上的指定 handler 函数,该参数是回调函数的参数值(可不填)。 + @param params params + + @example + ```js + // Call Function + var eventHandler = new cc.Component.EventHandler(); + eventHandler.target = newTarget; + eventHandler.component = "MainMenu"; + eventHandler.handler = "OnClick" + eventHandler.emit(["param1", "param2", ....]); + ``` + */ + emit(params: any[]): void; + } + } + + /**************************************************** + * Label + *****************************************************/ + + export namespace Label { + /** !#en Enum for text alignment. + !#zh 文本横向对齐类型 */ + export enum HorizontalAlign { + LEFT = 0, + CENTER = 0, + RIGHT = 0, + } + } + + /**************************************************** + * Label + *****************************************************/ + + export namespace Label { + /** !#en Enum for vertical text alignment. + !#zh 文本垂直对齐类型 */ + export enum VerticalAlign { + TOP = 0, + CENTER = 0, + BOTTOM = 0, + } + } + + /**************************************************** + * Label + *****************************************************/ + + export namespace Label { + /** !#en Enum for Overflow. + !#zh Overflow 类型 */ + export enum Overflow { + NONE = 0, + CLAMP = 0, + SHRINK = 0, + RESIZE_HEIGHT = 0, + } + } + + /**************************************************** + * Label + *****************************************************/ + + export namespace Label { + /** !#en Enum for font type. + !#zh Type 类型 */ + export enum Type { + TTF = 0, + BMFont = 0, + SystemFont = 0, + } + } + + /**************************************************** + * Label + *****************************************************/ + + export namespace Label { + /** !#en Enum for cache mode. + !#zh CacheMode 类型 */ + export enum CacheMode { + NONE = 0, + BITMAP = 0, + CHAR = 0, + } + } + + /**************************************************** + * Layout + *****************************************************/ + + export namespace Layout { + /** !#en Enum for Layout type + !#zh 布局类型 */ + export enum Type { + NONE = 0, + HORIZONTAL = 0, + VERTICAL = 0, + GRID = 0, + } + } + + /**************************************************** + * Layout + *****************************************************/ + + export namespace Layout { + /** !#en Enum for Layout Resize Mode + !#zh 缩放模式 */ + export enum ResizeMode { + NONE = 0, + CONTAINER = 0, + CHILDREN = 0, + } + } + + /**************************************************** + * Layout + *****************************************************/ + + export namespace Layout { + /** !#en Enum for Grid Layout start axis direction. + The items in grid layout will be arranged in each axis at first.; + !#zh 布局轴向,只用于 GRID 布局。 */ + export enum AxisDirection { + HORIZONTAL = 0, + VERTICAL = 0, + } + } + + /**************************************************** + * Layout + *****************************************************/ + + export namespace Layout { + /** !#en Enum for vertical layout direction. + Used in Grid Layout together with AxisDirection is VERTICAL + !#zh 垂直方向布局方式 */ + export enum VerticalDirection { + BOTTOM_TO_TOP = 0, + TOP_TO_BOTTOM = 0, + } + } + + /**************************************************** + * Layout + *****************************************************/ + + export namespace Layout { + /** !#en Enum for horizontal layout direction. + Used in Grid Layout together with AxisDirection is HORIZONTAL + !#zh 水平方向布局方式 */ + export enum HorizontalDirection { + LEFT_TO_RIGHT = 0, + RIGHT_TO_LEFT = 0, + } + } + + /**************************************************** + * Mask + *****************************************************/ + + export namespace Mask { + /** !#en the type for mask. + !#zh 遮罩组件类型 */ + export enum Type { + RECT = 0, + ELLIPSE = 0, + IMAGE_STENCIL = 0, + } + } + + /**************************************************** + * PageView + *****************************************************/ + + export namespace PageView { + /** !#en The Page View Size Mode + !#zh 页面视图每个页面统一的大小类型 */ + export enum SizeMode { + Unified = 0, + Free = 0, + } + } + + /**************************************************** + * PageView + *****************************************************/ + + export namespace PageView { + /** !#en The Page View Direction + !#zh 页面视图滚动类型 */ + export enum Direction { + Horizontal = 0, + Vertical = 0, + } + } + + /**************************************************** + * PageView + *****************************************************/ + + export namespace PageView { + /** !#en Enum for ScrollView event type. + !#zh 滚动视图事件类型 */ + export enum EventType { + PAGE_TURNING = 0, + } + } + + /**************************************************** + * ProgressBar + *****************************************************/ + + export namespace ProgressBar { + /** !#en Enum for ProgressBar mode + !#zh 进度条模式 */ + export enum Mode { + HORIZONTAL = 0, + VERTICAL = 0, + FILLED = 0, + } + } + + /**************************************************** + * PageViewIndicator + *****************************************************/ + + export namespace PageViewIndicator { + /** !#en Enum for PageView Indicator direction + !#zh 页面视图指示器的摆放方向 */ + export enum Direction { + HORIZONTAL = 0, + VERTICAL = 0, + } + } + + /**************************************************** + * Scrollbar + *****************************************************/ + + export namespace Scrollbar { + /** Enum for Scrollbar direction */ + export enum Direction { + HORIZONTAL = 0, + VERTICAL = 0, + } + } + + /**************************************************** + * ScrollView + *****************************************************/ + + export namespace ScrollView { + /** !#en Enum for ScrollView event type. + !#zh 滚动视图事件类型 */ + export enum EventType { + SCROLL_TO_TOP = 0, + SCROLL_TO_BOTTOM = 0, + SCROLL_TO_LEFT = 0, + SCROLL_TO_RIGHT = 0, + SCROLLING = 0, + BOUNCE_TOP = 0, + BOUNCE_BOTTOM = 0, + BOUNCE_LEFT = 0, + BOUNCE_RIGHT = 0, + SCROLL_ENDED = 0, + TOUCH_UP = 0, + AUTOSCROLL_ENDED_WITH_THRESHOLD = 0, + SCROLL_BEGAN = 0, + } + } + + /**************************************************** + * Slider + *****************************************************/ + + export namespace Slider { + /** !#en The Slider Direction + !#zh 滑动器方向 */ + export enum Direction { + Horizontal = 0, + Vertical = 0, + } + } + + /**************************************************** + * Sprite + *****************************************************/ + + export namespace Sprite { + /** !#en Enum for sprite type. + !#zh Sprite 类型 */ + export enum Type { + SIMPLE = 0, + SLICED = 0, + TILED = 0, + FILLED = 0, + MESH = 0, + } + } + + /**************************************************** + * Sprite + *****************************************************/ + + export namespace Sprite { + /** !#en Enum for fill type. + !#zh 填充类型 */ + export enum FillType { + HORIZONTAL = 0, + VERTICAL = 0, + RADIAL = 0, + } + } + + /**************************************************** + * Sprite + *****************************************************/ + + export namespace Sprite { + /** !#en Sprite Size can track trimmed size, raw size or none. + !#zh 精灵尺寸调整模式 */ + export enum SizeMode { + CUSTOM = 0, + TRIMMED = 0, + RAW = 0, + } + } + + /**************************************************** + * Sprite + *****************************************************/ + + export namespace Sprite { + /** !#en Sprite state can choice the normal or grayscale. + !#zh 精灵颜色通道模式。 */ + export enum State { + NORMAL = 0, + GRAY = 0, + } + } + + /**************************************************** + * Widget + *****************************************************/ + + export namespace Widget { + /** !#en Enum for Widget's alignment mode, indicating when the widget should refresh. + !#zh Widget 的对齐模式,表示 Widget 应该何时刷新。 */ + export enum AlignMode { + ONCE = 0, + ON_WINDOW_RESIZE = 0, + ALWAYS = 0, + } + } + + /**************************************************** + * Event + *****************************************************/ + + export namespace Event { + /** !#en The mouse event + !#zh 鼠标事件类型 */ + export class EventMouse extends Event { + /** + !#en Sets scroll data. + !#zh 设置鼠标的滚动数据。 + @param scrollX scrollX + @param scrollY scrollY + */ + setScrollData(scrollX: number, scrollY: number): void; + /** + !#en Returns the x axis scroll value. + !#zh 获取鼠标滚动的X轴距离,只有滚动时才有效。 + */ + getScrollX(): number; + /** + !#en Returns the y axis scroll value. + !#zh 获取滚轮滚动的 Y 轴距离,只有滚动时才有效。 + */ + getScrollY(): number; + /** + !#en Sets cursor location. + !#zh 设置当前鼠标位置。 + @param x x + @param y y + */ + setLocation(x: number, y: number): void; + /** + !#en Returns cursor location. + !#zh 获取鼠标位置对象,对象包含 x 和 y 属性。 + */ + getLocation(): Vec2; + /** + !#en Returns the current cursor location in screen coordinates. + !#zh 获取当前事件在游戏窗口内的坐标位置对象,对象包含 x 和 y 属性。 + */ + getLocationInView(): Vec2; + /** + !#en Returns the previous touch location. + !#zh 获取鼠标点击在上一次事件时的位置对象,对象包含 x 和 y 属性。 + */ + getPreviousLocation(): Vec2; + /** + !#en Returns the delta distance from the previous location to current location. + !#zh 获取鼠标距离上一次事件移动的距离对象,对象包含 x 和 y 属性。 + */ + getDelta(): Vec2; + /** + !#en Returns the X axis delta distance from the previous location to current location. + !#zh 获取鼠标距离上一次事件移动的 X 轴距离。 + */ + getDeltaX(): number; + /** + !#en Returns the Y axis delta distance from the previous location to current location. + !#zh 获取鼠标距离上一次事件移动的 Y 轴距离。 + */ + getDeltaY(): number; + /** + !#en Sets mouse button. + !#zh 设置鼠标按键。 + @param button button + */ + setButton(button: number): void; + /** + !#en Returns mouse button. + !#zh 获取鼠标按键。 + */ + getButton(): number; + /** + !#en Returns location X axis data. + !#zh 获取鼠标当前位置 X 轴。 + */ + getLocationX(): number; + /** + !#en Returns location Y axis data. + !#zh 获取鼠标当前位置 Y 轴。 + */ + getLocationY(): number; + /** !#en The none event code of mouse event. + !#zh 无。 */ + static NONE: number; + /** !#en The event type code of mouse down event. + !#zh 鼠标按下事件。 */ + static DOWN: number; + /** !#en The event type code of mouse up event. + !#zh 鼠标按下后释放事件。 */ + static UP: number; + /** !#en The event type code of mouse move event. + !#zh 鼠标移动事件。 */ + static MOVE: number; + /** !#en The event type code of mouse scroll event. + !#zh 鼠标滚轮事件。 */ + static SCROLL: number; + /** !#en The tag of Mouse left button. + !#zh 鼠标左键的标签。 */ + static BUTTON_LEFT: number; + /** !#en The tag of Mouse right button (The right button number is 2 on browser). + !#zh 鼠标右键的标签。 */ + static BUTTON_RIGHT: number; + /** !#en The tag of Mouse middle button (The right button number is 1 on browser). + !#zh 鼠标中键的标签。 */ + static BUTTON_MIDDLE: number; + /** !#en The tag of Mouse button 4. + !#zh 鼠标按键 4 的标签。 */ + static BUTTON_4: number; + /** !#en The tag of Mouse button 5. + !#zh 鼠标按键 5 的标签。 */ + static BUTTON_5: number; + /** !#en The tag of Mouse button 6. + !#zh 鼠标按键 6 的标签。 */ + static BUTTON_6: number; + /** !#en The tag of Mouse button 7. + !#zh 鼠标按键 7 的标签。 */ + static BUTTON_7: number; + /** !#en The tag of Mouse button 8. + !#zh 鼠标按键 8 的标签。 */ + static BUTTON_8: number; + } + } + + /**************************************************** + * Event + *****************************************************/ + + export namespace Event { + /** !#en The touch event + !#zh 触摸事件 */ + export class EventTouch extends Event { + /** + + @param touchArr The array of the touches + @param bubbles A boolean indicating whether the event bubbles up through the tree or not + */ + constructor(touchArr: any[], bubbles: boolean); + /** !#en The current touch object + !#zh 当前触点对象 */ + touch: Touch; + /** + !#en Returns event code. + !#zh 获取事件类型。 + */ + getEventCode(): number; + /** + !#en Returns touches of event. + !#zh 获取触摸点的列表。 + */ + getTouches(): any[]; + /** + !#en Sets touch location. + !#zh 设置当前触点位置 + @param x x + @param y y + */ + setLocation(x: number, y: number): void; + /** + !#en Returns touch location. + !#zh 获取触点位置。 + */ + getLocation(): Vec2; + /** + !#en Returns the current touch location in screen coordinates. + !#zh 获取当前触点在游戏窗口中的位置。 + */ + getLocationInView(): Vec2; + /** + !#en Returns the previous touch location. + !#zh 获取触点在上一次事件时的位置对象,对象包含 x 和 y 属性。 + */ + getPreviousLocation(): Vec2; + /** + !#en Returns the start touch location. + !#zh 获取触点落下时的位置对象,对象包含 x 和 y 属性。 + */ + getStartLocation(): Vec2; + /** + !#en Returns the id of cc.Touch. + !#zh 触点的标识 ID,可以用来在多点触摸中跟踪触点。 + */ + getID(): number; + /** + !#en Returns the delta distance from the previous location to current location. + !#zh 获取触点距离上一次事件移动的距离对象,对象包含 x 和 y 属性。 + */ + getDelta(): Vec2; + /** + !#en Returns the X axis delta distance from the previous location to current location. + !#zh 获取触点距离上一次事件移动的 x 轴距离。 + */ + getDeltaX(): number; + /** + !#en Returns the Y axis delta distance from the previous location to current location. + !#zh 获取触点距离上一次事件移动的 y 轴距离。 + */ + getDeltaY(): number; + /** + !#en Returns location X axis data. + !#zh 获取当前触点 X 轴位置。 + */ + getLocationX(): number; + /** + !#en Returns location Y axis data. + !#zh 获取当前触点 Y 轴位置。 + */ + getLocationY(): number; + } + } + + /**************************************************** + * Event + *****************************************************/ + + export namespace Event { + /** !#en The acceleration event + !#zh 加速度事件 */ + export class EventAcceleration extends Event { + } + } + + /**************************************************** + * Event + *****************************************************/ + + export namespace Event { + /** !#en The keyboard event + !#zh 键盘事件 */ + export class EventKeyboard extends Event { + /** !#en + The keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key. + This is usually the decimal ASCII (RFC 20) or Windows 1252 code corresponding to the key. + If the key can't be identified, this value is 0. + + !#zh + keyCode 是只读属性它表示一个系统和依赖于实现的数字代码,可以识别按键的未修改值。 + 这通常是十进制 ASCII (RFC20) 或者 Windows 1252 代码,所对应的密钥。 + 如果无法识别该键,则该值为 0。 */ + keyCode: number; + } + } + + /**************************************************** + * Graphics + *****************************************************/ + + export namespace Graphics { + /** !#en Enum for LineCap. + !#zh 线段末端属性 */ + export enum LineCap { + BUTT = 0, + ROUND = 0, + SQUARE = 0, + } + } + + /**************************************************** + * Graphics + *****************************************************/ + + export namespace Graphics { + /** !#en Enum for LineJoin. + !#zh 线段拐角属性 */ + export enum LineJoin { + BEVEL = 0, + ROUND = 0, + MITER = 0, + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** Aabb */ + export class Aabb { + /** + create a new aabb + @param px X coordinates for aabb's original point + @param py Y coordinates for aabb's original point + @param pz Z coordinates for aabb's original point + @param w the half of aabb width + @param h the half of aabb height + @param l the half of aabb length + */ + create(px: number, py: number, pz: number, w: number, h: number, l: number): Aabb; + /** + clone a new aabb + @param a the source aabb + */ + clone(a: Aabb): Aabb; + /** + copy the values from one aabb to another + @param out the receiving aabb + @param a the source aabb + */ + copy(out: Aabb, a: Aabb): Aabb; + /** + create a new aabb from two corner points + @param out the receiving aabb + @param minPos lower corner position of the aabb + @param maxPos upper corner position of the aabb + */ + fromPoints(out: Aabb, minPos: Vec3, maxPos: Vec3): Aabb; + /** + Set the components of a aabb to the given values + @param out the receiving aabb + @param px X coordinates for aabb's original point + @param py Y coordinates for aabb's original point + @param pz Z coordinates for aabb's original point + @param w the half of aabb width + @param h the half of aabb height + @param l the half of aabb length + */ + set(out: Aabb, px: number, py: number, pz: number, w: number, h: number, l: number): Aabb; + center: Vec3; + halfExtents: Vec3; + _type: number; + /** + Get the bounding points of this shape + @param minPos minPos + @param maxPos maxPos + */ + getBoundary(minPos: Vec3, maxPos: Vec3): void; + /** + Transform this shape + @param m the transform matrix + @param pos the position part of the transform + @param rot the rotation part of the transform + @param scale the scale part of the transform + @param out the target shape + */ + transform(m: Mat4, pos: Vec3, rot: Quat, scale: Vec3, out?: Aabb): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en Shape type. */ + export enum enums { + SHAPE_RAY = 0, + SHAPE_LINE = 0, + SHAPE_SPHERE = 0, + SHAPE_AABB = 0, + SHAPE_OBB = 0, + SHAPE_PLANE = 0, + SHAPE_TRIANGLE = 0, + SHAPE_FRUSTUM = 0, + SHAPE_FRUSTUM_ACCURATE = 0, + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en frustum + !#zh 平截头体 */ + export class Frustum { + /** Set whether to use accurate intersection testing function on this frustum */ + accurate: boolean; + /** + create a new frustum + */ + static create(): Frustum; + /** + Clone a frustum + @param f f + */ + static clone(f: Frustum): Frustum; + /** + Copy the values from one frustum to another + @param out out + @param f f + */ + copy(out: Frustum, f: Frustum): Frustum; + planes: geomUtils.Plane[]; + planes: Vec3[]; + /** + !#en Update the frustum information according to the given transform matrix. + Note that the resulting planes are not normalized under normal mode. + @param m the view-projection matrix + @param inv the inverse view-projection matrix + */ + update(m: Mat4, inv: Mat4): void; + /** + !#en transform by matrix + @param mat mat + */ + transform(mat: Mat4): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** undefined */ + export class intersect { + /** + !#en + Check whether ray intersect with nodes + !#zh + 检测射线是否与物体有交集 + @param root If root is null, then traversal nodes from scene node + @param worldRay worldRay + @param handler handler + @param filter filter + */ + static ray_cast(root: Node, worldRay: geomUtils.Ray, handler: Function, filter: Function): any[]; + /** + !#en ray-plane intersect
+ !#zh 射线与平面的相交性检测。 + @param ray ray + @param plane plane + */ + static ray_plane(ray: geomUtils.Ray, plane: geomUtils.Plane): number; + /** + !#en line-plane intersect
+ !#zh 线段与平面的相交性检测。 + @param line line + @param plane plane + */ + static line_plane(line: geomUtils.Line, plane: geomUtils.Plane): number; + /** + !#en ray-triangle intersect
+ !#zh 射线与三角形的相交性检测。 + @param ray ray + @param triangle triangle + @param doubleSided doubleSided + */ + static ray_triangle(ray: geomUtils.Ray, triangle: geomUtils.Triangle, doubleSided: boolean): number; + /** + !#en line-triangle intersect
+ !#zh 线段与三角形的相交性检测。 + @param line line + @param triangle triangle + @param outPt optional, The intersection point + */ + static line_triangle(line: geomUtils.Line, triangle: geomUtils.Triangle, outPt: Vec3): number; + /** + !#en line-quad intersect
+ !#zh 线段与四边形的相交性检测。 + @param p A point on a line segment + @param q Another point on the line segment + @param a Quadrilateral point a + @param b Quadrilateral point b + @param c Quadrilateral point c + @param d Quadrilateral point d + @param outPt optional, The intersection point + */ + static line_quad(p: Vec3, q: Vec3, a: Vec3, b: Vec3, c: Vec3, d: Vec3, outPt: Vec3): number; + /** + !#en ray-sphere intersect
+ !#zh 射线和球的相交性检测。 + @param ray ray + @param sphere sphere + */ + static ray_sphere(ray: geomUtils.Ray, sphere: geomUtils.Sphere): number; + /** + !#en ray-aabb intersect
+ !#zh 射线和轴对齐包围盒的相交性检测。 + @param ray ray + @param aabb Align the axis around the box + */ + static ray_aabb(ray: geomUtils.Ray, aabb: Aabb): number; + /** + !#en ray-obb intersect
+ !#zh 射线和方向包围盒的相交性检测。 + @param ray ray + @param obb Direction box + */ + static ray_obb(ray: geomUtils.Ray, obb: geomUtils.Obb): number; + /** + !#en aabb-aabb intersect
+ !#zh 轴对齐包围盒和轴对齐包围盒的相交性检测。 + @param aabb1 Axis alignment surrounds box 1 + @param aabb2 Axis alignment surrounds box 2 + */ + static aabb_aabb(aabb1: Aabb, aabb2: Aabb): number; + /** + !#en aabb-obb intersect
+ !#zh 轴对齐包围盒和方向包围盒的相交性检测。 + @param aabb Align the axis around the box + @param obb Direction box + */ + static aabb_obb(aabb: Aabb, obb: geomUtils.Obb): number; + /** + !#en aabb-plane intersect
+ !#zh 轴对齐包围盒和平面的相交性检测。 + @param aabb Align the axis around the box + @param plane plane + */ + static aabb_plane(aabb: Aabb, plane: geomUtils.Plane): number; + /** + !#en aabb-frustum intersect, faster but has false positive corner cases
+ !#zh 轴对齐包围盒和锥台相交性检测,速度快,但有错误情况。 + @param aabb Align the axis around the box + @param frustum frustum + */ + static aabb_frustum(aabb: Aabb, frustum: Frustum): number; + /** + !#en aabb-frustum intersect, handles most of the false positives correctly
+ !#zh 轴对齐包围盒和锥台相交性检测,正确处理大多数错误情况。 + @param aabb Align the axis around the box + @param frustum frustum + */ + static aabb_frustum_accurate(aabb: Aabb, frustum: Frustum): number; + /** + !#en obb-point intersect
+ !#zh 方向包围盒和点的相交性检测。 + @param obb Direction box + @param point point + */ + static obb_point(obb: geomUtils.Obb, point: geomUtils.Vec3): boolean; + /** + !#en obb-plane intersect
+ !#zh 方向包围盒和平面的相交性检测。 + @param obb Direction box + @param plane plane + */ + static obb_plane(obb: geomUtils.Obb, plane: geomUtils.Plane): number; + /** + !#en obb-frustum intersect, faster but has false positive corner cases
+ !#zh 方向包围盒和锥台相交性检测,速度快,但有错误情况。 + @param obb Direction box + @param frustum frustum + */ + static obb_frustum(obb: geomUtils.Obb, frustum: Frustum): number; + /** + !#en obb-frustum intersect, handles most of the false positives correctly
+ !#zh 方向包围盒和锥台相交性检测,正确处理大多数错误情况。 + @param obb Direction box + @param frustum frustum + */ + static obb_frustum_accurate(obb: geomUtils.Obb, frustum: Frustum): number; + /** + !#en obb-obb intersect
+ !#zh 方向包围盒和方向包围盒的相交性检测。 + @param obb1 Direction box1 + @param obb2 Direction box2 + */ + static obb_obb(obb1: geomUtils.Obb, obb2: geomUtils.Obb): number; + /** + !#en phere-plane intersect, not necessarily faster than obb-plane
+ due to the length calculation of the plane normal to factor out
+ the unnomalized plane distance
+ !#zh 球与平面的相交性检测。 + @param sphere sphere + @param plane plane + */ + static sphere_plane(sphere: geomUtils.Sphere, plane: geomUtils.Plane): number; + /** + !#en sphere-frustum intersect, faster but has false positive corner cases
+ !#zh 球和锥台的相交性检测,速度快,但有错误情况。 + @param sphere sphere + @param frustum frustum + */ + static sphere_frustum(sphere: geomUtils.Sphere, frustum: Frustum): number; + /** + !#en sphere-frustum intersect, handles the false positives correctly
+ !#zh 球和锥台的相交性检测,正确处理大多数错误情况。 + @param sphere sphere + @param frustum frustum + */ + static sphere_frustum_accurate(sphere: geomUtils.Sphere, frustum: Frustum): number; + /** + !#en sphere-sphere intersect
+ !#zh 球和球的相交性检测。 + @param sphere0 sphere0 + @param sphere1 sphere1 + */ + static sphere_sphere(sphere0: geomUtils.Sphere, sphere1: geomUtils.Sphere): boolean; + /** + !#en sphere-aabb intersect
+ !#zh 球和轴对齐包围盒的相交性检测。 + @param sphere sphere + @param aabb aabb + */ + static sphere_aabb(sphere: geomUtils.Sphere, aabb: Aabb): boolean; + /** + !#en sphere-obb intersect
+ !#zh 球和方向包围盒的相交性检测。 + @param sphere sphere + @param obb obb + */ + static sphere_obb(sphere: geomUtils.Sphere, obb: geomUtils.Obb): boolean; + /** + !#en + The intersection detection of g1 and g2 can fill in the shape in the basic geometry. + !#zh + g1 和 g2 的相交性检测,可填入基础几何中的形状。 + @param g1 Geometry 1 + @param g2 Geometry 2 + @param outPt optional, Intersection point. (note: only partial shape detection with this return value) + */ + static resolve(g1: any, g2: any, outPt: any): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en + line + !#zh + 直线 */ + export class Line { + /** + !#en + create a new line + !#zh + 创建一个新的 line。 + @param sx The x part of the starting point. + @param sy The y part of the starting point. + @param sz The z part of the starting point. + @param ex The x part of the end point. + @param ey The y part of the end point. + @param ez The z part of the end point. + */ + create(sx: number, sy: number, sz: number, ex: number, ey: number, ez: number): Line; + /** + !#en + Creates a new line initialized with values from an existing line + !#zh + 克隆一个新的 line。 + @param a The source of cloning. + */ + clone(a: Line): Line; + /** + !#en + Copy the values from one line to another + !#zh + 复制一个线的值到另一个。 + @param out The object that accepts the action. + @param a The source of the copy. + */ + copy(out: Line, a: Line): Line; + /** + !#en + create a line from two points + !#zh + 用两个点创建一个线。 + @param out The object that accepts the action. + @param start The starting point. + @param end At the end. + */ + fromPoints(out: Line, start: Vec3, end: Vec3): Line; + /** + !#en + Set the components of a Vec3 to the given values + !#zh + 将给定线的属性设置为给定值。 + @param out The object that accepts the action. + @param sx The x part of the starting point. + @param sy The y part of the starting point. + @param sz The z part of the starting point. + @param ex The x part of the end point. + @param ey The y part of the end point. + @param ez The z part of the end point. + */ + set(out: Line, sx: number, sy: number, sz: number, ex: number, ey: number, ez: number): Line; + /** + !#en + Calculate the length of the line. + !#zh + 计算线的长度。 + @param a The line to calculate. + */ + len(a: Line): number; + /** !#en + Start points. + !#zh + 起点。 */ + s: Vec3; + /** !#en + End points. + !#zh + 终点。 */ + e: Vec3; + /** + !#en + Calculate the length of the line. + !#zh + 计算线的长度。 + */ + length(): number; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en obb + !#zh + 基础几何 方向包围盒。 */ + export class Obb { + /** !#zh + 获取形状的类型。 */ + type: number; + /** + !#en + create a new obb + !#zh + 创建一个新的 obb 实例。 + @param cx X coordinates of the shape relative to the origin. + @param cy Y coordinates of the shape relative to the origin. + @param cz Z coordinates of the shape relative to the origin. + @param hw Obb is half the width. + @param hh Obb is half the height. + @param hl Obb is half the Length. + @param ox_1 Direction matrix parameter. + @param ox_2 Direction matrix parameter. + @param ox_3 Direction matrix parameter. + @param oy_1 Direction matrix parameter. + @param oy_2 Direction matrix parameter. + @param oy_3 Direction matrix parameter. + @param oz_1 Direction matrix parameter. + @param oz_2 Direction matrix parameter. + @param oz_3 Direction matrix parameter. + */ + create(cx: number, cy: number, cz: number, hw: number, hh: number, hl: number, ox_1: number, ox_2: number, ox_3: number, oy_1: number, oy_2: number, oy_3: number, oz_1: number, oz_2: number, oz_3: number): Obb; + /** + !#en + clone a new obb + !#zh + 克隆一个 obb。 + @param a The target of cloning. + */ + clone(a: Obb): Obb; + /** + !#en + copy the values from one obb to another + !#zh + 将从一个 obb 的值复制到另一个 obb。 + @param out Obb that accepts the operation. + @param a Obb being copied. + */ + copy(out: Obb, a: Obb): Obb; + /** + !#en + create a new obb from two corner points + !#zh + 用两个点创建一个新的 obb。 + @param out Obb that accepts the operation. + @param minPos The smallest point of obb. + @param maxPos Obb's maximum point. + */ + fromPoints(out: Obb, minPos: Vec3, maxPos: Vec3): Obb; + /** + !#en + Set the components of a obb to the given values + !#zh + 将给定 obb 的属性设置为给定的值。 + @param cx X coordinates of the shape relative to the origin. + @param cy Y coordinates of the shape relative to the origin. + @param cz Z coordinates of the shape relative to the origin. + @param hw Obb is half the width. + @param hh Obb is half the height. + @param hl Obb is half the Length. + @param ox_1 Direction matrix parameter. + @param ox_2 Direction matrix parameter. + @param ox_3 Direction matrix parameter. + @param oy_1 Direction matrix parameter. + @param oy_2 Direction matrix parameter. + @param oy_3 Direction matrix parameter. + @param oz_1 Direction matrix parameter. + @param oz_2 Direction matrix parameter. + @param oz_3 Direction matrix parameter. + */ + set(cx: number, cy: number, cz: number, hw: number, hh: number, hl: number, ox_1: number, ox_2: number, ox_3: number, oy_1: number, oy_2: number, oy_3: number, oz_1: number, oz_2: number, oz_3: number): Obb; + /** !#en + The center of the local coordinate. + !#zh + 本地坐标的中心点。 */ + center: Vec3; + /** !#en + Half the length, width, and height. + !#zh + 长宽高的一半。 */ + halfExtents: Vec3; + /** !#en + Direction matrix. + !#zh + 方向矩阵。 */ + orientation: Mat3; + /** + !#en + Get the bounding points of this shape + !#zh + 获取 obb 的最小点和最大点。 + @param minPos minPos + @param maxPos maxPos + */ + getBoundary(minPos: Vec3, maxPos: Vec3): void; + /** + !#en Transform this shape + !#zh + 将 out 根据这个 obb 的数据进行变换。 + @param m The transformation matrix. + @param pos The position part of the transformation. + @param rot The rotating part of the transformation. + @param scale The scaling part of the transformation. + @param out Target of transformation. + */ + transform(m: Mat4, pos: Vec3, rot: Quat, scale: Vec3, out: Obb): void; + /** + !#en + Transform out based on this obb data. + !#zh + 将 out 根据这个 obb 的数据进行变换。 + @param m The transformation matrix. + @param rot The rotating part of the transformation. + @param out Target of transformation. + */ + translateAndRotate(m: Mat4, rot: Quat, out: Obb): void; + /** + !#en + Scale out based on this obb data. + !#zh + 将 out 根据这个 obb 的数据进行缩放。 + @param scale Scale value. + @param out Scaled target. + */ + setScale(scale: Vec3, out: Obb): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en + plane。 + !#zh + 平面。 */ + export class Plane { + /** + !#en + create a new plane + !#zh + 创建一个新的 plane。 + @param nx The x part of the normal component. + @param ny The y part of the normal component. + @param nz The z part of the normal component. + @param d Distance from the origin. + */ + create(nx: number, ny: number, nz: number, d: number): Plane; + /** + !#en + clone a new plane + !#zh + 克隆一个新的 plane。 + @param p The source of cloning. + */ + clone(p: Plane): Plane; + /** + !#en + copy the values from one plane to another + !#zh + 复制一个平面的值到另一个。 + @param out The object that accepts the action. + @param p The source of the copy. + */ + copy(out: Plane, p: Plane): Plane; + /** + !#en + create a plane from three points + !#zh + 用三个点创建一个平面。 + @param out The object that accepts the action. + @param a Point a。 + @param b Point b。 + @param c Point c。 + */ + fromPoints(out: Plane, a: Vec3, b: Vec3, c: Vec3): Plane; + /** + !#en + Set the components of a plane to the given values + !#zh + 将给定平面的属性设置为给定值。 + @param out The object that accepts the action. + @param nx The x part of the normal component. + @param ny The y part of the normal component. + @param nz The z part of the normal component. + @param d Distance from the origin. + */ + set(out: Plane, nx: number, ny: number, nz: number, d: number): Plane; + /** + !#en + create plane from normal and point + !#zh + 用一条法线和一个点创建平面。 + @param out The object that accepts the action. + @param normal The normal of a plane. + @param point A point on the plane. + */ + fromNormalAndPoint(out: Plane, normal: Vec3, point: Vec3): Plane; + /** + !#en + normalize a plane + !#zh + 归一化一个平面。 + @param out The object that accepts the action. + @param a Source data for operations. + */ + normalize(out: Plane, a: Plane): Plane; + /** !#en + A normal vector. + !#zh + 法线向量。 */ + n: Vec3; + /** !#en + The distance from the origin to the plane. + !#zh + 原点到平面的距离。 */ + d: number; + /** + !#en + Transform a plane. + !#zh + 变换一个平面。 + @param mat mat + */ + transform(mat: Mat4): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en + ray + !#zh + 射线。 */ + export class Ray { + /** + !#en + create a new ray + !#zh + 创建一条射线。 + @param ox The x part of the starting point. + @param oy The y part of the starting point. + @param oz The z part of the starting point. + @param dx X in the direction. + @param dy Y in the direction. + @param dz Z in the direction. + */ + create(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number): Ray; + /** + !#en + Creates a new ray initialized with values from an existing ray + !#zh + 从一条射线克隆出一条新的射线。 + @param a Clone target + */ + clone(a: Ray): Ray; + /** + !#en + Copy the values from one ray to another + !#zh + 将从一个 ray 的值复制到另一个 ray。 + @param out Accept the ray of the operation. + @param a Copied ray. + */ + copy(out: Ray, a: Ray): Ray; + /** + !#en + create a ray from two points + !#zh + 用两个点创建一条射线。 + @param out Receive the operating ray. + @param origin Origin of ray + @param target A point on a ray. + */ + fromPoints(out: Ray, origin: Vec3, target: Vec3): Ray; + /** + !#en + Set the components of a ray to the given values + !#zh + 将给定射线的属性设置为给定的值。 + @param out Receive the operating ray. + @param ox The x part of the starting point. + @param oy The y part of the starting point. + @param oz The z part of the starting point. + @param dx X in the direction. + @param dy Y in the direction. + @param dz Z in the direction. + */ + set(out: Ray, ox: number, oy: number, oz: number, dx: number, dy: number, dz: number): Ray; + /** !#en + Start point. + !#zh + 起点。 */ + o: Vec3; + /** !#e + Direction + !#zh + 方向。 */ + d: Vec3; + /** + !#en Compute hit. + @param out out + @param distance distance + */ + computeHit(out: IVec3Like, distance: number): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** !#en + Sphere. + !#zh + 轴对齐球。 */ + export class Sphere { + /** + !#en + create a new sphere + !#zh + 创建一个新的 sphere 实例。 + @param cx X coordinates of the shape relative to the origin. + @param cy Y coordinates of the shape relative to the origin. + @param cz Z coordinates of the shape relative to the origin. + @param r Radius of sphere + */ + create(cx: any, cy: any, cz: any, r: any): Sphere; + /** + !#en + clone a new sphere + !#zh + 克隆一个新的 sphere 实例。 + @param p The target of cloning. + */ + clone(p: Sphere): Sphere; + /** + !#en + copy the values from one sphere to another + !#zh + 将从一个 sphere 的值复制到另一个 sphere。 + @param out Accept the sphere of operations. + @param a Sphere being copied. + */ + copy(out: Sphere, a: Sphere): Sphere; + /** + !#en + create a new bounding sphere from two corner points + !#zh + 从两个点创建一个新的 sphere。 + @param out Accept the sphere of operations. + @param minPos The smallest point of sphere. + @param maxPos The maximum point of sphere. + */ + fromPoints(out: any, minPos: any, maxPos: any): Sphere; + /** + !#en Set the components of a sphere to the given values + !#zh 将球体的属性设置为给定的值。 + @param out Accept the sphere of operations. + @param cx X coordinates of the shape relative to the origin. + @param cy Y coordinates of the shape relative to the origin. + @param cz Z coordinates of the shape relative to the origin. + @param r Radius. + */ + set(out: Sphere, cx: any, cy: any, cz: any, r: number): Sphere; + /** !#en + The center of the local coordinate. + !#zh + 本地坐标的中心点。 */ + center: Vec3; + /** !#zh + 半径。 */ + radius: number; + /** + !#en + Clone. + !#zh + 获得克隆。 + */ + clone(): void; + /** + !#en + Copy sphere + !#zh + 拷贝对象。 + @param a Copy target. + */ + copy(a: any): void; + /** + !#en + Get the bounding points of this shape + !#zh + 获取此形状的边界点。 + @param minPos minPos + @param maxPos maxPos + */ + getBoundary(minPos: Vec3, maxPos: Vec3): void; + /** + !#en + Transform this shape + !#zh + 将 out 根据这个 sphere 的数据进行变换。 + @param m The transformation matrix. + @param pos The position part of the transformation. + @param rot The rotating part of the transformation. + @param scale The scaling part of the transformation. + @param out The target of the transformation. + */ + transform(m: any, pos: any, rot: any, scale: any, out: any): void; + /** + !#en + Scale out based on the sphere data. + !#zh + 将 out 根据这个 sphere 的数据进行缩放。 + @param scale Scale value + @param out Scale target + */ + setScale(scale: any, out: any): void; + } + } + + /**************************************************** + * geomUtils + *****************************************************/ + + export namespace geomUtils { + /** Triangle */ + export class Triangle { + /** + create a new triangle + @param ax ax + @param ay ay + @param az az + @param bx bx + @param by by + @param bz bz + @param cx cx + @param cy cy + @param cz cz + */ + create(ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number): Triangle; + /** + clone a new triangle + @param t the source plane + */ + clone(t: Triangle): Triangle; + /** + copy the values from one triangle to another + @param out the receiving triangle + @param t the source triangle + */ + copy(out: Triangle, t: Triangle): Triangle; + /** + Create a triangle from three points + @param out the receiving triangle + @param a a + @param b b + @param c c + */ + fromPoints(out: Triangle, a: Vec3, b: Vec3, c: Vec3): Triangle; + /** + Set the components of a triangle to the given values + @param out the receiving plane + @param ax X component of a + @param ay Y component of a + @param az Z component of a + @param bx X component of b + @param by Y component of b + @param bz Z component of b + @param cx X component of c + @param cy Y component of c + @param cz Z component of c + */ + set(out: Triangle, ax: number, ay: number, az: number, bx: number, by: number, bz: number, cx: number, cy: number, cz: number): Plane; + a: Vec3; + b: Vec3; + c: Vec3; + } + } + + /**************************************************** + * Camera + *****************************************************/ + + export namespace Camera { + /** !#en Values for Camera.clearFlags, determining what to clear when rendering a Camera. + !#zh 摄像机清除标记位,决定摄像机渲染时会清除哪些状态 */ + export enum ClearFlags { + COLOR = 0, + DEPTH = 0, + STENCIL = 0, + } + } + + /**************************************************** + * MeshRenderer + *****************************************************/ + + export namespace MeshRenderer { + /** !#en Shadow projection mode + + !#ch 阴影投射方式 */ + export enum ShadowCastingMode { + OFF = 0, + ON = 0, + } + } + + /**************************************************** + * PhysicsManager + *****************************************************/ + + export namespace PhysicsManager { + /** !#en + The draw bits for drawing physics debug information.
+ example:
+ ```js + cc.director.getPhysicsManager().debugDrawFlags = + // cc.PhysicsManager.DrawBits.e_aabbBit | + // cc.PhysicsManager.DrawBits.e_pairBit | + // cc.PhysicsManager.DrawBits.e_centerOfMassBit | + cc.PhysicsManager.DrawBits.e_jointBit | + cc.PhysicsManager.DrawBits.e_shapeBit; + ``` + !#zh + 指定物理系统需要绘制哪些调试信息。
+ example:
+ ```js + cc.director.getPhysicsManager().debugDrawFlags = + // cc.PhysicsManager.DrawBits.e_aabbBit | + // cc.PhysicsManager.DrawBits.e_pairBit | + // cc.PhysicsManager.DrawBits.e_centerOfMassBit | + cc.PhysicsManager.DrawBits.e_jointBit | + cc.PhysicsManager.DrawBits.e_shapeBit; + ``` */ + export enum DrawBits { + e_aabbBit = 0, + e_jointBit = 0, + e_shapeBit = 0, + } + } + + /**************************************************** + * macro + *****************************************************/ + + export namespace macro { + /** !#en Key map for keyboard event + !#zh 键盘事件的按键值 */ + export enum KEY { + none = 0, + back = 0, + menu = 0, + backspace = 0, + tab = 0, + enter = 0, + shift = 0, + ctrl = 0, + alt = 0, + pause = 0, + capslock = 0, + escape = 0, + space = 0, + pageup = 0, + pagedown = 0, + end = 0, + home = 0, + left = 0, + up = 0, + right = 0, + down = 0, + select = 0, + insert = 0, + Delete = 0, + a = 0, + b = 0, + c = 0, + d = 0, + e = 0, + f = 0, + g = 0, + h = 0, + i = 0, + j = 0, + k = 0, + l = 0, + m = 0, + n = 0, + o = 0, + p = 0, + q = 0, + r = 0, + s = 0, + t = 0, + u = 0, + v = 0, + w = 0, + x = 0, + y = 0, + z = 0, + num0 = 0, + num1 = 0, + num2 = 0, + num3 = 0, + num4 = 0, + num5 = 0, + num6 = 0, + num7 = 0, + num8 = 0, + num9 = 0, + '*' = 0, + '+' = 0, + '-' = 0, + numdel = 0, + '/' = 0, + f1 = 0, + f2 = 0, + f3 = 0, + f4 = 0, + f5 = 0, + f6 = 0, + f7 = 0, + f8 = 0, + f9 = 0, + f10 = 0, + f11 = 0, + f12 = 0, + numlock = 0, + scrolllock = 0, + ';' = 0, + semicolon = 0, + equal = 0, + '=' = 0, + ',' = 0, + comma = 0, + dash = 0, + '.' = 0, + period = 0, + forwardslash = 0, + grave = 0, + '[' = 0, + openbracket = 0, + backslash = 0, + ']' = 0, + closebracket = 0, + quote = 0, + dpadLeft = 0, + dpadRight = 0, + dpadUp = 0, + dpadDown = 0, + dpadCenter = 0, + } + } + + /**************************************************** + * macro + *****************************************************/ + + export namespace macro { + /** Image formats */ + export enum ImageFormat { + JPG = 0, + PNG = 0, + TIFF = 0, + WEBP = 0, + PVR = 0, + ETC = 0, + S3TC = 0, + ATITC = 0, + TGA = 0, + RAWDATA = 0, + UNKNOWN = 0, + } + } + + /**************************************************** + * macro + *****************************************************/ + + export namespace macro { + /** !#en + Enum for blend factor + Refer to: http://www.andersriggelsen.dk/glblendfunc.php + !#zh + 混合因子 + 可参考: http://www.andersriggelsen.dk/glblendfunc.php */ + export enum BlendFactor { + ONE = 0, + ZERO = 0, + SRC_ALPHA = 0, + SRC_COLOR = 0, + DST_ALPHA = 0, + DST_COLOR = 0, + ONE_MINUS_SRC_ALPHA = 0, + ONE_MINUS_SRC_COLOR = 0, + ONE_MINUS_DST_ALPHA = 0, + ONE_MINUS_DST_COLOR = 0, + } + } + + /**************************************************** + * macro + *****************************************************/ + + export namespace macro { + /** undefined */ + export enum TextAlignment { + LEFT = 0, + CENTER = 0, + RIGHT = 0, + } + } + + /**************************************************** + * sys + *****************************************************/ + + export namespace sys { + /** !#en + Network type enumeration + !#zh + 网络类型枚举 */ + export enum NetworkType { + NONE = 0, + LAN = 0, + WWAN = 0, + } + } + + /**************************************************** + * AnimationCurve + *****************************************************/ + + export namespace AnimationCurve { + /** !#en The wrap mode + !#zh 循环模式 */ + export enum WrapMode { + Default = 0, + Once = 0, + Loop = 0, + PingPong = 0, + ClampForever = 0, + time = 0, + value = 0, + inTangent = 0, + outTangent = 0, + } + } + + /**************************************************** + * ParticleSystem3DAssembler + *****************************************************/ + + export namespace ParticleSystem3DAssembler { + /** undefined */ + export enum Space { + } + } + + /**************************************************** + * ParticleSystem3DAssembler + *****************************************************/ + + export namespace ParticleSystem3DAssembler { + /** 粒子的生成模式 */ + export enum RenderMode { + } + } + + /**************************************************** + * shapeModule + *****************************************************/ + + export namespace shapeModule { + /** 粒子发射器类型 */ + export enum ShapeType { + Box = 0, + Circle = 0, + Cone = 0, + Sphere = 0, + Hemisphere = 0, + } + } + + /**************************************************** + * shapeModule + *****************************************************/ + + export namespace shapeModule { + /** 粒子从发射器的哪个部位发射 */ + export enum EmitLocation { + Base = 0, + Edge = 0, + Shell = 0, + Volume = 0, + } + } + + /**************************************************** + * shapeModule + *****************************************************/ + + export namespace shapeModule { + /** 粒子在扇形区域的发射方式 */ + export enum ArcMode { + Random = 0, + Loop = 0, + PingPong = 0, + } + } + + /**************************************************** + * trailModule + *****************************************************/ + + export namespace trailModule { + /** 选择如何为粒子系统生成轨迹 */ + export enum TrailMode { + } + } + + /**************************************************** + * trailModule + *****************************************************/ + + export namespace trailModule { + /** 纹理填充模式 */ + export enum TextureMode { + } + } + + /**************************************************** + * primitive + *****************************************************/ + + export namespace primitive { + /** undefined */ + export enum PolyhedronType { + Tetrahedron = 0, + Octahedron = 0, + Dodecahedron = 0, + Icosahedron = 0, + Rhombicuboctahedron = 0, + TriangularPrism = 0, + PentagonalPrism = 0, + HexagonalPrism = 0, + SquarePyramid = 0, + PentagonalPyramid = 0, + TriangularDipyramid = 0, + PentagonalDipyramid = 0, + ElongatedSquareDipyramid = 0, + ElongatedPentagonalDipyramid = 0, + ElongatedPentagonalCupola = 0, + } + } + + /**************************************************** + * primitive + *****************************************************/ + + export namespace primitive { + /** undefined */ + export class VertexData { + positions: number[]; + normals: number[]; + uvs: number[]; + indices: number[]; + minPos: Vec3; + maxPos: Vec3; + boundingRadius: number; + } + } + + /**************************************************** + * Material + *****************************************************/ + + export namespace Material { + /** !#en Material builtin name + !#zh 内置材质名字 */ + export enum BUILTIN_NAME { + SPRITE = 0, + GRAY_SPRITE = 0, + UNLIT = 0, + } + } + + /**************************************************** + * EditBox + *****************************************************/ + + export namespace EditBox { + /** !#en Enum for keyboard return types + !#zh 键盘的返回键类型 */ + export enum KeyboardReturnType { + DEFAULT = 0, + DONE = 0, + SEND = 0, + SEARCH = 0, + GO = 0, + NEXT = 0, + } + } + + /**************************************************** + * EditBox + *****************************************************/ + + export namespace EditBox { + /** !#en The EditBox's InputMode defines the type of text that the user is allowed to enter. + !#zh 输入模式 */ + export enum InputMode { + ANY = 0, + EMAIL_ADDR = 0, + NUMERIC = 0, + PHONE_NUMBER = 0, + URL = 0, + DECIMAL = 0, + SINGLE_LINE = 0, + } + } + + /**************************************************** + * EditBox + *****************************************************/ + + export namespace EditBox { + /** !#en Enum for the EditBox's input flags + !#zh 定义了一些用于设置文本显示和文本格式化的标志位。 */ + export enum InputFlag { + PASSWORD = 0, + SENSITIVE = 0, + INITIAL_CAPS_WORD = 0, + INITIAL_CAPS_SENTENCE = 0, + INITIAL_CAPS_ALL_CHARACTERS = 0, + DEFAULT = 0, + } + } + + /**************************************************** + * textureAnimationModule + *****************************************************/ + + export namespace textureAnimationModule { + /** 粒子贴图动画类型 */ + export enum Mode { + } + } + + /**************************************************** + * textureAnimationModule + *****************************************************/ + + export namespace textureAnimationModule { + /** 贴图动画的播放方式 */ + export enum Animation { + } + } + +} + +/** !#en +The global main namespace of DragonBones, all classes, functions, +properties and constants of DragonBones are defined in this namespace +!#zh +DragonBones 的全局的命名空间, +与 DragonBones 相关的所有的类,函数,属性,常量都在这个命名空间中定义。 */ +declare namespace dragonBones { + /** !#en + The Armature Display of DragonBones
+
+ Armature Display has a reference to a DragonBonesAsset and stores the state for ArmatureDisplay instance, + which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible.
+ Multiple Armature Display can use the same DragonBonesAsset which includes all animations, skins, and attachments.
+ !#zh + DragonBones 骨骼动画
+
+ Armature Display 具有对骨骼数据的引用并且存储了骨骼实例的状态, + 它由当前的骨骼动作,slot 颜色,和可见的 slot attachments 组成。
+ 多个 Armature Display 可以使用相同的骨骼数据,其中包括所有的动画,皮肤和 attachments。
*/ + export class ArmatureDisplay extends cc.RenderComponent { + /** !#en + The DragonBones data contains the armatures information (bind pose bones, slots, draw order, + attachments, skins, etc) and animations but does not hold any state.
+ Multiple ArmatureDisplay can share the same DragonBones data. + !#zh + 骨骼数据包含了骨骼信息(绑定骨骼动作,slots,渲染顺序, + attachments,皮肤等等)和动画但不持有任何状态。
+ 多个 ArmatureDisplay 可以共用相同的骨骼数据。 */ + dragonAsset: DragonBonesAsset; + /** !#en + The atlas asset for the DragonBones. + !#zh + 骨骼数据所需的 Atlas Texture 数据。 */ + dragonAtlasAsset: DragonBonesAtlasAsset; + /** !#en The name of current armature. + !#zh 当前的 Armature 名称。 */ + armatureName: string; + /** !#en The name of current playing animation. + !#zh 当前播放的动画名称。 */ + animationName: string; + _defaultArmatureIndex: number; + /** !#en The time scale of this armature. + !#zh 当前骨骼中所有动画的时间缩放率。 */ + timeScale: number; + /** !#en The play times of the default animation. + -1 means using the value of config file; + 0 means repeat for ever + >0 means repeat times + !#zh 播放默认动画的循环次数 + -1 表示使用配置文件中的默认值; + 0 表示无限循环 + >0 表示循环次数 */ + playTimes: number; + /** !#en Indicates whether to enable premultiplied alpha. + You should disable this option when image's transparent area appears to have opaque pixels, + or enable this option when image's half transparent area appears to be darken. + !#zh 是否启用贴图预乘。 + 当图片的透明区域出现色块时需要关闭该选项,当图片的半透明区域颜色变黑时需要启用该选项。 */ + premultipliedAlpha: boolean; + /** !#en Indicates whether open debug bones. + !#zh 是否显示 bone 的 debug 信息。 */ + debugBones: boolean; + /** !#en Enabled batch model, if skeleton is complex, do not enable batch, or will lower performance. + !#zh 开启合批,如果渲染大量相同纹理,且结构简单的骨骼动画,开启合批可以降低drawcall,否则请不要开启,cpu消耗会上升。 */ + enableBatch: boolean; + /** + !#en + The key of dragonbones cache data, which is regard as 'dragonbonesName', when you want to change dragonbones cloth. + !#zh + 缓存龙骨数据的key值,换装的时会使用到该值,作为dragonbonesName使用 + + @example + ```js + let factory = dragonBones.CCFactory.getInstance(); + let needChangeSlot = needChangeArmature.armature().getSlot("changeSlotName"); + factory.replaceSlotDisplay(toChangeArmature.getArmatureKey(), "armatureName", "slotName", "displayName", needChangeSlot); + ``` + */ + getArmatureKey(): string; + /** + !#en + It's best to set cache mode before set property 'dragonAsset', or will waste some cpu time. + If set the mode in editor, then no need to worry about order problem. + !#zh + 若想切换渲染模式,最好在设置'dragonAsset'之前,先设置好渲染模式,否则有运行时开销。 + 若在编辑中设置渲染模式,则无需担心设置次序的问题。 + @param cacheMode cacheMode + + @example + ```js + armatureDisplay.setAnimationCacheMode(dragonBones.ArmatureDisplay.AnimationCacheMode.SHARED_CACHE); + ``` + */ + setAnimationCacheMode(cacheMode: ArmatureDisplay.AnimationCacheMode): void; + /** + !#en Whether in cached mode. + !#zh 当前是否处于缓存模式。 + */ + isAnimationCached(): boolean; + /** + !#en + Play the specified animation. + Parameter animName specify the animation name. + Parameter playTimes specify the repeat times of the animation. + -1 means use the value of the config file. + 0 means play the animation for ever. + >0 means repeat times. + !#zh + 播放指定的动画. + animName 指定播放动画的名称。 + playTimes 指定播放动画的次数。 + -1 为使用配置文件中的次数。 + 0 为无限循环播放。 + >0 为动画的重复次数。 + @param animName animName + @param playTimes playTimes + */ + playAnimation(animName: string, playTimes: number): dragonBones.AnimationState; + /** + !#en + Updating an animation cache to calculate all frame data in the animation is a cost in + performance due to calculating all data in a single frame. + To update the cache, use the invalidAnimationCache method with high performance. + !#zh + 更新某个动画缓存, 预计算动画中所有帧数据,由于在单帧计算所有数据,所以较消耗性能。 + 若想更新缓存,可使用 invalidAnimationCache 方法,具有较高性能。 + @param animName animName + */ + updateAnimationCache(animName: string): void; + /** + !#en + Invalidates the animation cache, which is then recomputed on each frame.. + !#zh + 使动画缓存失效,之后会在每帧重新计算。 + */ + invalidAnimationCache(): void; + /** + !#en + Get the all armature names in the DragonBones Data. + !#zh + 获取 DragonBones 数据中所有的 armature 名称 + */ + getArmatureNames(): any[]; + /** + !#en + Get the all animation names of specified armature. + !#zh + 获取指定的 armature 的所有动画名称。 + @param armatureName armatureName + */ + getAnimationNames(armatureName: string): any[]; + /** + !#en + Add event listener for the DragonBones Event, the same to addEventListener. + !#zh + 添加 DragonBones 事件监听器,与 addEventListener 作用相同。 + @param type A string representing the event type to listen for. + @param listener The callback that will be invoked when the event is dispatched. + @param target The target (this object) to invoke the callback, can be null + */ + on(type: string, listener: (event: cc.Event) => void, target?: any): void; + /** + !#en + Remove the event listener for the DragonBones Event, the same to removeEventListener. + !#zh + 移除 DragonBones 事件监听器,与 removeEventListener 作用相同。 + @param type A string representing the event type to listen for. + @param listener listener + @param target target + */ + off(type: string, listener?: Function, target?: any): void; + /** + !#en + Add DragonBones one-time event listener, the callback will remove itself after the first time it is triggered. + !#zh + 添加 DragonBones 一次性事件监听器,回调会在第一时间被触发后删除自身。 + @param type A string representing the event type to listen for. + @param listener The callback that will be invoked when the event is dispatched. + @param target The target (this object) to invoke the callback, can be null + */ + once(type: string, listener: (event: cc.Event) => void, target?: any): void; + /** + !#en + Add event listener for the DragonBones Event. + !#zh + 添加 DragonBones 事件监听器。 + @param type A string representing the event type to listen for. + @param listener The callback that will be invoked when the event is dispatched. + @param target The target (this object) to invoke the callback, can be null + */ + addEventListener(type: string, listener: (event: cc.Event) => void, target?: any): void; + /** + !#en + Remove the event listener for the DragonBones Event. + !#zh + 移除 DragonBones 事件监听器。 + @param type A string representing the event type to listen for. + @param listener listener + @param target target + */ + removeEventListener(type: string, listener?: Function, target?: any): void; + /** + !#en + Build the armature for specified name. + !#zh + 构建指定名称的 armature 对象 + @param armatureName armatureName + @param node node + */ + buildArmature(armatureName: string, node: cc.Node): ArmatureDisplay; + /** + !#en + Get the current armature object of the ArmatureDisplay. + !#zh + 获取 ArmatureDisplay 当前使用的 Armature 对象 + */ + armature(): any; + } + /** DragonBones factory */ + export class CCFactory extends BaseFactory { + /** + + + @example + ```js + let factory = dragonBones.CCFactory.getInstance(); + ``` + */ + static getInstance(): CCFactory; + } + /** !#en The skeleton data of dragonBones. + !#zh dragonBones 的 骨骼数据。 */ + export class DragonBonesAsset extends cc.Asset { + /** !#en See http://developer.egret.com/cn/github/egret-docs/DB/dbLibs/dataFormat/index.html + !#zh 可查看 DragonBones 官方文档 http://developer.egret.com/cn/github/egret-docs/DB/dbLibs/dataFormat/index.html */ + dragonBonesJson: string; + } + /** !#en The skeleton atlas data of dragonBones. + !#zh dragonBones 的骨骼纹理数据。 */ + export class DragonBonesAtlasAsset extends cc.Asset { + atlasJson: string; + texture: cc.Texture2D; + } + /**************************************************** + * ArmatureDisplay + *****************************************************/ + + export namespace ArmatureDisplay { + /** !#en Enum for cache mode type. + !#zh Dragonbones渲染类型 */ + export enum AnimationCacheMode { + REALTIME = 0, + SHARED_CACHE = 0, + PRIVATE_CACHE = 0, + } + } + + /**************************************************** + * dragonBones + *****************************************************/ + + export namespace dragonBones { + /** !#en Attach node tool + !#zh 挂点工具类 */ + export class AttachUtil { + /** + !#en Gets attached root node. + !#zh 获取挂接节点树的根节点 + */ + getAttachedRootNode(): cc.Node; + /** + !#en Gets attached node which you want. + !#zh 获得对应的挂点 + @param boneName boneName + */ + getAttachedNodes(boneName: string): cc.Node[]; + /** + !#en Destroy attached node which you want. + !#zh 销毁对应的挂点 + @param boneName boneName + */ + destroyAttachedNodes(boneName: string): void; + /** + !#en Traverse all bones to generate the minimum node tree containing the given bone names, NOTE that make sure the skeleton has initialized before calling this interface. + !#zh 遍历所有插槽,生成包含所有给定插槽名称的最小节点树,注意,调用该接口前请确保骨骼动画已经初始化好。 + @param boneName boneName + */ + generateAttachedNodes(boneName: string): cc.Node[]; + /** + !#en Destroy all attached node. + !#zh 销毁所有挂点 + */ + destroyAllAttachedNodes(): void; + /** + !#en Traverse all bones to generate a tree containing all bones nodes, NOTE that make sure the skeleton has initialized before calling this interface. + !#zh 遍历所有插槽,生成包含所有插槽的节点树,注意,调用该接口前请确保骨骼动画已经初始化好。 + */ + generateAllAttachedNodes(): cc.Node; + } + } + +} + +/** !#en +The global main namespace of Spine, all classes, functions, +properties and constants of Spine are defined in this namespace +!#zh +Spine 的全局的命名空间, +与 Spine 相关的所有的类,函数,属性,常量都在这个命名空间中定义。 */ +declare namespace sp { + /** !#en + The skeleton of Spine
+
+ (Skeleton has a reference to a SkeletonData and stores the state for skeleton instance, + which consists of the current pose's bone SRT, slot colors, and which slot attachments are visible.
+ Multiple skeletons can use the same SkeletonData which includes all animations, skins, and attachments.)
+ !#zh + Spine 骨骼动画
+
+ (Skeleton 具有对骨骼数据的引用并且存储了骨骼实例的状态, + 它由当前的骨骼动作,slot 颜色,和可见的 slot attachments 组成。
+ 多个 Skeleton 可以使用相同的骨骼数据,其中包括所有的动画,皮肤和 attachments。 */ + export class Skeleton extends cc.RenderComponent { + /** !#en The skeletal animation is paused? + !#zh 该骨骼动画是否暂停。 */ + paused: boolean; + /** !#en + The skeleton data contains the skeleton information (bind pose bones, slots, draw order, + attachments, skins, etc) and animations but does not hold any state.
+ Multiple skeletons can share the same skeleton data. + !#zh + 骨骼数据包含了骨骼信息(绑定骨骼动作,slots,渲染顺序, + attachments,皮肤等等)和动画但不持有任何状态。
+ 多个 Skeleton 可以共用相同的骨骼数据。 */ + skeletonData: SkeletonData; + /** !#en The name of default skin. + !#zh 默认的皮肤名称。 */ + defaultSkin: string; + /** !#en The name of default animation. + !#zh 默认的动画名称。 */ + defaultAnimation: string; + /** !#en The name of current playing animation. + !#zh 当前播放的动画名称。 */ + animation: string; + _defaultSkinIndex: number; + /** !#en TODO + !#zh 是否循环播放当前骨骼动画。 */ + loop: boolean; + /** !#en Indicates whether to enable premultiplied alpha. + You should disable this option when image's transparent area appears to have opaque pixels, + or enable this option when image's half transparent area appears to be darken. + !#zh 是否启用贴图预乘。 + 当图片的透明区域出现色块时需要关闭该选项,当图片的半透明区域颜色变黑时需要启用该选项。 */ + premultipliedAlpha: boolean; + /** !#en The time scale of this skeleton. + !#zh 当前骨骼中所有动画的时间缩放率。 */ + timeScale: number; + /** !#en Indicates whether open debug slots. + !#zh 是否显示 slot 的 debug 信息。 */ + debugSlots: boolean; + /** !#en Indicates whether open debug bones. + !#zh 是否显示 bone 的 debug 信息。 */ + debugBones: boolean; + /** !#en Indicates whether open debug mesh. + !#zh 是否显示 mesh 的 debug 信息。 */ + debugMesh: boolean; + /** !#en Enabled two color tint. + !#zh 是否启用染色效果。 */ + useTint: boolean; + /** !#en Enabled batch model, if skeleton is complex, do not enable batch, or will lower performance. + !#zh 开启合批,如果渲染大量相同纹理,且结构简单的骨骼动画,开启合批可以降低drawcall,否则请不要开启,cpu消耗会上升。 */ + enableBatch: boolean; + /** + !#en + Sets runtime skeleton data to sp.Skeleton.
+ This method is different from the `skeletonData` property. This method is passed in the raw data provided by the Spine runtime, and the skeletonData type is the asset type provided by Creator. + !#zh + 设置底层运行时用到的 SkeletonData。
+ 这个接口有别于 `skeletonData` 属性,这个接口传入的是 Spine runtime 提供的原始数据,而 skeletonData 的类型是 Creator 提供的资源类型。 + @param skeletonData skeletonData + */ + setSkeletonData(skeletonData: sp.spine.SkeletonData): void; + /** + !#en Sets slots visible range. + !#zh 设置骨骼插槽可视范围。 + @param startSlotIndex startSlotIndex + @param endSlotIndex endSlotIndex + */ + setSlotsRange(startSlotIndex: number, endSlotIndex: number): void; + /** + !#en Sets animation state data.
+ The parameter type is {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.AnimationStateData. + !#zh 设置动画状态数据。
+ 参数是 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.AnimationStateData。 + @param stateData stateData + */ + setAnimationStateData(stateData: sp.spine.AnimationStateData): void; + /** + !#en + It's best to set cache mode before set property 'dragonAsset', or will waste some cpu time. + If set the mode in editor, then no need to worry about order problem. + !#zh + 若想切换渲染模式,最好在设置'dragonAsset'之前,先设置好渲染模式,否则有运行时开销。 + 若在编辑中设置渲染模式,则无需担心设置次序的问题。 + @param cacheMode cacheMode + + @example + ```js + skeleton.setAnimationCacheMode(sp.Skeleton.AnimationCacheMode.SHARED_CACHE); + ``` + */ + setAnimationCacheMode(cacheMode: Skeleton.AnimationCacheMode): void; + /** + !#en Whether in cached mode. + !#zh 当前是否处于缓存模式。 + */ + isAnimationCached(): boolean; + /** + !#en Sets vertex effect delegate. + !#zh 设置顶点动画代理 + @param effectDelegate effectDelegate + */ + setVertexEffectDelegate(effectDelegate: VertexEffectDelegate): void; + /** + !#en Computes the world SRT from the local SRT for each bone. + !#zh 重新更新所有骨骼的世界 Transform, + 当获取 bone 的数值未更新时,即可使用该函数进行更新数值。 + + @example + ```js + var bone = spine.findBone('head'); + cc.log(bone.worldX); // return 0; + spine.updateWorldTransform(); + bone = spine.findBone('head'); + cc.log(bone.worldX); // return -23.12; + ``` + */ + updateWorldTransform(): void; + /** + !#en Sets the bones and slots to the setup pose. + !#zh 还原到起始动作 + */ + setToSetupPose(): void; + /** + !#en + Sets the bones to the setup pose, + using the values from the `BoneData` list in the `SkeletonData`. + !#zh + 设置 bone 到起始动作 + 使用 SkeletonData 中的 BoneData 列表中的值。 + */ + setBonesToSetupPose(): void; + /** + !#en + Sets the slots to the setup pose, + using the values from the `SlotData` list in the `SkeletonData`. + !#zh + 设置 slot 到起始动作。 + 使用 SkeletonData 中的 SlotData 列表中的值。 + */ + setSlotsToSetupPose(): void; + /** + !#en + Updating an animation cache to calculate all frame data in the animation is a cost in + performance due to calculating all data in a single frame. + To update the cache, use the invalidAnimationCache method with high performance. + !#zh + 更新某个动画缓存, 预计算动画中所有帧数据,由于在单帧计算所有数据,所以较消耗性能。 + 若想更新缓存,可使用 invalidAnimationCache 方法,具有较高性能。 + @param animName animName + */ + updateAnimationCache(animName: string): void; + /** + !#en + Invalidates the animation cache, which is then recomputed on each frame.. + !#zh + 使动画缓存失效,之后会在每帧重新计算。 + */ + invalidAnimationCache(): void; + /** + !#en + Finds a bone by name. + This does a string comparison for every bone.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Bone object. + !#zh + 通过名称查找 bone。 + 这里对每个 bone 的名称进行了对比。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Bone 对象。 + @param boneName boneName + */ + findBone(boneName: string): sp.spine.Bone; + /** + !#en + Finds a slot by name. This does a string comparison for every slot.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Slot object. + !#zh + 通过名称查找 slot。这里对每个 slot 的名称进行了比较。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Slot 对象。 + @param slotName slotName + */ + findSlot(slotName: string): sp.spine.Slot; + /** + !#en + Finds a skin by name and makes it the active skin. + This does a string comparison for every skin.
+ Note that setting the skin does not change which attachments are visible.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Skin object. + !#zh + 按名称查找皮肤,激活该皮肤。这里对每个皮肤的名称进行了比较。
+ 注意:设置皮肤不会改变 attachment 的可见性。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Skin 对象。 + @param skinName skinName + */ + setSkin(skinName: string): void; + /** + !#en + Returns the attachment for the slot and attachment name. + The skeleton looks first in its skin, then in the skeleton data’s default skin.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Attachment object. + !#zh + 通过 slot 和 attachment 的名称获取 attachment。Skeleton 优先查找它的皮肤,然后才是 Skeleton Data 中默认的皮肤。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.Attachment 对象。 + @param slotName slotName + @param attachmentName attachmentName + */ + getAttachment(slotName: string, attachmentName: string): sp.spine.Attachment; + /** + !#en + Sets the attachment for the slot and attachment name. + The skeleton looks first in its skin, then in the skeleton data’s default skin. + !#zh + 通过 slot 和 attachment 的名字来设置 attachment。 + Skeleton 优先查找它的皮肤,然后才是 Skeleton Data 中默认的皮肤。 + @param slotName slotName + @param attachmentName attachmentName + */ + setAttachment(slotName: string, attachmentName: string): void; + /** + Return the renderer of attachment. + @param regionAttachment regionAttachment + */ + getTextureAtlas(regionAttachment: sp.spine.RegionAttachment|spine.BoundingBoxAttachment): sp.spine.TextureAtlasRegion; + /** + !#en + Mix applies all keyframe values, + interpolated for the specified time and mixed with the current values. + !#zh 为所有关键帧设定混合及混合时间(从当前值开始差值)。 + @param fromAnimation fromAnimation + @param toAnimation toAnimation + @param duration duration + */ + setMix(fromAnimation: string, toAnimation: string, duration: number): void; + /** + !#en Set the current animation. Any queued animations are cleared.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object. + !#zh 设置当前动画。队列中的任何的动画将被清除。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。 + @param trackIndex trackIndex + @param name name + @param loop loop + */ + setAnimation(trackIndex: number, name: string, loop: boolean): sp.spine.TrackEntry; + /** + !#en Adds an animation to be played delay seconds after the current or last queued animation.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object. + !#zh 添加一个动画到动画队列尾部,还可以延迟指定的秒数。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。 + @param trackIndex trackIndex + @param name name + @param loop loop + @param delay delay + */ + addAnimation(trackIndex: number, name: string, loop: boolean, delay?: number): sp.spine.TrackEntry; + /** + !#en Find animation with specified name. + !#zh 查找指定名称的动画 + @param name name + */ + findAnimation(name: string): sp.spine.Animation; + /** + !#en Returns track entry by trackIndex.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry object. + !#zh 通过 track 索引获取 TrackEntry。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.TrackEntry 对象。 + @param trackIndex trackIndex + */ + getCurrent(trackIndex: any): sp.spine.TrackEntry; + /** + !#en Clears all tracks of animation state. + !#zh 清除所有 track 的动画状态。 + */ + clearTracks(): void; + /** + !#en Clears track of animation state by trackIndex. + !#zh 清除出指定 track 的动画状态。 + @param trackIndex trackIndex + */ + clearTrack(trackIndex: number): void; + /** + !#en Set the start event listener. + !#zh 用来设置开始播放动画的事件监听。 + @param listener listener + */ + setStartListener(listener: Function): void; + /** + !#en Set the interrupt event listener. + !#zh 用来设置动画被打断的事件监听。 + @param listener listener + */ + setInterruptListener(listener: Function): void; + /** + !#en Set the end event listener. + !#zh 用来设置动画播放完后的事件监听。 + @param listener listener + */ + setEndListener(listener: Function): void; + /** + !#en Set the dispose event listener. + !#zh 用来设置动画将被销毁的事件监听。 + @param listener listener + */ + setDisposeListener(listener: Function): void; + /** + !#en Set the complete event listener. + !#zh 用来设置动画播放一次循环结束后的事件监听。 + @param listener listener + */ + setCompleteListener(listener: Function): void; + /** + !#en Set the animation event listener. + !#zh 用来设置动画播放过程中帧事件的监听。 + @param listener listener + */ + setEventListener(listener: Function): void; + /** + !#en Set the start event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画开始播放的事件监听。 + @param entry entry + @param listener listener + */ + setTrackStartListener(entry: sp.spine.TrackEntry, listener: Function): void; + /** + !#en Set the interrupt event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画被打断的事件监听。 + @param entry entry + @param listener listener + */ + setTrackInterruptListener(entry: sp.spine.TrackEntry, listener: Function): void; + /** + !#en Set the end event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画播放结束的事件监听。 + @param entry entry + @param listener listener + */ + setTrackEndListener(entry: sp.spine.TrackEntry, listener: Function): void; + /** + !#en Set the dispose event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画即将被销毁的事件监听。 + @param entry entry + @param listener listener + */ + setTrackDisposeListener(entry: sp.spine.TrackEntry, listener: Function): void; + /** + !#en Set the complete event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画一次循环播放结束的事件监听。 + @param entry entry + @param listener listener + */ + setTrackCompleteListener(entry: sp.spine.TrackEntry, listener: (entry: sp.spine.TrackEntry, loopCount: number) => void): void; + /** + !#en Set the event listener for specified TrackEntry. + !#zh 用来为指定的 TrackEntry 设置动画帧事件的监听。 + @param entry entry + @param listener listener + */ + setTrackEventListener(entry: sp.spine.TrackEntry, listener: Function): void; + /** + !#en Get the animation state object + !#zh 获取动画状态 + */ + getState(): sp.spine.AnimationState; + } + /** !#en The event type of spine skeleton animation. + !#zh 骨骼动画事件类型。 */ + export enum AnimationEventType { + START = 0, + END = 0, + COMPLETE = 0, + EVENT = 0, + } + /** !#en The skeleton data of spine. + !#zh Spine 的 骨骼数据。 */ + export class SkeletonData extends cc.Asset { + /** !#en See http://en.esotericsoftware.com/spine-json-format + !#zh 可查看 Spine 官方文档 http://zh.esotericsoftware.com/spine-json-format */ + skeletonJson: any; + atlasText: string; + textures: cc.Texture2D[]; + /** !#en + A scale can be specified on the JSON or binary loader which will scale the bone positions, + image sizes, and animation translations. + This can be useful when using different sized images than were used when designing the skeleton + in Spine. For example, if using images that are half the size than were used in Spine, + a scale of 0.5 can be used. This is commonly used for games that can run with either low or high + resolution texture atlases. + see http://en.esotericsoftware.com/spine-using-runtimes#Scaling + !#zh 可查看 Spine 官方文档: http://zh.esotericsoftware.com/spine-using-runtimes#Scaling */ + scale: number; + /** + !#en Get the included SkeletonData used in spine runtime.
+ Returns a {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.SkeletonData object. + !#zh 获取 Spine Runtime 使用的 SkeletonData。
+ 返回一个 {{#crossLinkModule "sp.spine"}}sp.spine{{/crossLinkModule}}.SkeletonData 对象。 + @param quiet quiet + */ + getRuntimeData(quiet?: boolean): sp.spine.SkeletonData; + } + /** !#en + The delegate of spine vertex effect + !#zh + Spine 顶点动画代理 */ + export class VertexEffectDelegate { + /** + !#en Clears vertex effect. + !#zh 清空顶点效果 + */ + clear(): void; + /** + !#en Inits delegate with jitter effect + !#zh 设置顶点抖动效果 + @param jitterX jitterX + @param jitterY jitterY + */ + initJitter(jitterX: number, jitterY: number): void; + /** + !#en Inits delegate with swirl effect + !#zh 设置顶点漩涡效果 + @param radius radius + @param power power + */ + initSwirlWithPow(radius: number, power: number): sp.spine.JitterEffect; + /** + !#en Inits delegate with swirl effect + !#zh 设置顶点漩涡效果 + @param radius radius + @param power power + */ + initSwirlWithPowOut(radius: number, power: number): sp.spine.SwirlEffect; + /** + !#en Gets jitter vertex effect + !#zh 获取顶点抖动效果 + */ + getJitterVertexEffect(): sp.spine.JitterEffect; + /** + !#en Gets swirl vertex effect + !#zh 获取顶点漩涡效果 + */ + getSwirlVertexEffect(): sp.spine.SwirlEffect; + /** + !#en Gets vertex effect + !#zh 获取顶点效果 + */ + getVertexEffect(): sp.spine.JitterEffect; + /** + !#en Gets effect type + !#zh 获取效果类型 + */ + getEffectType(): string; + } + /**************************************************** + * sp + *****************************************************/ + + export namespace sp { + /** !#en Attach node tool + !#zh 挂点工具类 */ + export class AttachUtil { + /** + !#en Gets attached root node. + !#zh 获取挂接节点树的根节点 + */ + getAttachedRootNode(): cc.Node; + /** + !#en Gets attached node which you want. + !#zh 获得对应的挂点 + @param boneName boneName + */ + getAttachedNodes(boneName: string): cc.Node[]; + /** + !#en Destroy attached node which you want. + !#zh 销毁对应的挂点 + @param boneName boneName + */ + destroyAttachedNodes(boneName: string): void; + /** + !#en Traverse all bones to generate the minimum node tree containing the given bone names, NOTE that make sure the skeleton has initialized before calling this interface. + !#zh 遍历所有插槽,生成包含所有给定插槽名称的最小节点树,注意,调用该接口前请确保骨骼动画已经初始化好。 + @param boneName boneName + */ + generateAttachedNodes(boneName: string): cc.Node[]; + /** + !#en Destroy all attached node. + !#zh 销毁所有挂点 + */ + destroyAllAttachedNodes(): void; + /** + !#en Traverse all bones to generate a tree containing all bones nodes, NOTE that make sure the skeleton has initialized before calling this interface. + !#zh 遍历所有插槽,生成包含所有插槽的节点树,注意,调用该接口前请确保骨骼动画已经初始化好。 + */ + generateAllAttachedNodes(): cc.Node; + } + } + + /**************************************************** + * Skeleton + *****************************************************/ + + export namespace Skeleton { + /** !#en Enum for animation cache mode type. + !#zh Spine动画缓存类型 */ + export enum AnimationCacheMode { + REALTIME = 0, + SHARED_CACHE = 0, + PRIVATE_CACHE = 0, + } + } + +} + +/** !#en +`sp.spine` is the namespace for official Spine Runtime, which officially implemented and maintained by Spine.
+Please refer to the official documentation for its detailed usage: [http://en.esotericsoftware.com/spine-using-runtimes](http://en.esotericsoftware.com/spine-using-runtimes) +!#zh +sp.spine 模块是 Spine 官方运行库的 API 入口,由 Spine 官方统一实现和维护,具体用法请参考:[http://zh.esotericsoftware.com/spine-using-runtimes](http://zh.esotericsoftware.com/spine-using-runtimes) */ +declare namespace sp.spine { +} + +/** !#en +This module controls asset's behaviors and information, include loading, releasing etc. +All member can be accessed with `cc.assetManager`. All class or enum can be accessed with `cc.AssetManager` + +!#zh +此模块管理资源的行为和信息,包括加载,释放等,所有成员能够通过 `cc.assetManager` 调用. 所有类型或枚举能通过 `cc.AssetManager` 访问 */ +declare namespace cc.AssetManager { + /** !#en + This module contains the builtin asset, it's a singleton, all member can be accessed with `cc.assetManager.builtins` + + !#zh + 此模块包含内建资源,这是一个单例,所有成员能通过 `cc.assetManager.builtins` 访问 */ + export class Builtins { + /** + !#en + Initialize + + !#zh + 初始化 + @param cb Callback when finish loading built-in assets + */ + init (cb: () => void): void; + /** + !#en + Get the built-in asset using specific type and name. + + !#zh + 通过特定的类型和名称获取内建资源 + @param type The type of asset, such as `effect` + @param name The name of asset, such as `phong` + + @example + ```js + cc.assetManaer.builtins.getBuiltin('effect', 'phone'); + ``` + */ + getBuiltin(type?: string, name?: string): cc.Asset | Cache; + /** + !#en + Clear all builtin assets + + !#zh + 清空所有内置资源 + */ + clear(): void; + } + /** !#en + A bundle contains an amount of assets(includes scene), you can load, preload, release asset which is in this bundle + + !#zh + 一个包含一定数量资源(包括场景)的包,你可以加载,预加载,释放此包内的资源 */ + export class Bundle { + /** + !#en + Create a bundle + + !#zh + 创建一个 bundle + */ + constructor(); + /** !#en + The name of this bundle + + !#zh + 此 bundle 的名称 */ + name: string; + /** !#en + The dependency of this bundle + + !#zh + 此 bundle 的依赖 */ + deps: string[]; + /** !#en + The root path of this bundle, such like 'http://example.com/bundle1' + + !#zh + 此 bundle 的根路径, 例如 'http://example.com/bundle1' */ + base: string; + /** + !#en + Get asset's info using path, only valid when asset is in bundle folder. + + !#zh + 使用 path 获取资源的配置信息 + @param path The relative path of asset, such as 'images/a' + @param type The constructor of asset, such as `cc.Texture2D` + + @example + ```js + var info = bundle.getInfoWithPath('image/a', cc.Texture2D); + ``` + */ + getInfoWithPath (path: string, type?: typeof cc.Asset): Record; + /** + !#en + Get all asset's info within specific folder + + !#zh + 获取在某个指定文件夹下的所有资源信息 + @param path The relative path of folder, such as 'images' + @param type The constructor should be used to filter paths + @param out The output array + + @example + ```js + var infos = []; + bundle.getDirWithPath('images', cc.Texture2D, infos); + ``` + */ + getDirWithPath (path: string, type: typeof cc.Asset, out: Array>): Array>; + getDirWithPath (path: string, type: typeof cc.Asset): Array>; + getDirWithPath (path: string): Array>; + /** + !#en + Get asset's info with uuid + + !#zh + 通过 uuid 获取资源信息 + @param uuid The asset's uuid + + @example + ```js + var info = bundle.getAssetInfo('fcmR3XADNLgJ1ByKhqcC5Z'); + ``` + */ + getAssetInfo (uuid: string): Record; + /** + !#en + Get scene'info with name + + !#zh + 通过场景名获取场景信息 + @param name The name of scene + + @example + ```js + var info = bundle.getSceneInfo('first.fire'); + ``` + */ + getSceneInfo(name: string): Record; + /** + !#en + Initialize this bundle with options + + !#zh + 初始化此 bundle + @param options options + */ + init(options: Record): void; + /** + !#en + Load the asset within this bundle by the path which is relative to bundle's path + + !#zh + 通过相对路径加载分包中的资源。路径是相对分包文件夹路径的相对路径 + @param paths Paths of the target assets.The path is relative to the bundle's folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param onProgress Callback invoked when progression change. + @param onComplete Callback invoked when all assets loaded. + + @example + ```js + // load the texture (${project}/assets/resources/textures/background.jpg) from resources + cc.resources.load('textures/background', cc.Texture2D, (err, texture) => console.log(err)); + + // load the audio (${project}/assets/resources/music/hit.mp3) from resources + cc.resources.load('music/hit', cc.AudioClip, (err, audio) => console.log(err)); + + // load the prefab (${project}/assets/bundle1/misc/character/cocos) from bundle1 folder + bundle1.load('misc/character/cocos', cc.Prefab, (err, prefab) => console.log(err)); + + // load the sprite frame (${project}/assets/some/xxx/bundle2/imgs/cocos.png) from bundle2 folder + bundle2.load('imgs/cocos', cc.SpriteFrame, null, (err, spriteFrame) => console.log(err)); + ``` + */ + load(paths: string, type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: T) => void): void; + load(paths: string[], type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array) => void): void; + load(paths: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: T) => void): void; + load(paths: string[], onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array) => void): void; + load(paths: string, type: typeof cc.Asset, onComplete?: (error: Error, assets: T) => void): void; + load(paths: string[], type: typeof cc.Asset, onComplete?: (error: Error, assets: Array) => void): void; + load(paths: string, onComplete?: (error: Error, assets: T) => void): void; + load(paths: string[], onComplete?: (error: Error, assets: Array) => void): void; + /** + !#en + Preload the asset within this bundle by the path which is relative to bundle's path. + After calling this method, you still need to finish loading by calling `Bundle.load`. + It will be totally fine to call `Bundle.load` at any time even if the preloading is not + yet finished + + !#zh + 通过相对路径预加载分包中的资源。路径是相对分包文件夹路径的相对路径。调用完后,你仍然需要通过 `Bundle.load` 来完成加载。 + 就算预加载还没完成,你也可以直接调用 `Bundle.load`。 + @param paths Paths of the target asset.The path is relative to bundle folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param onProgress Callback invoked when progression change. + @param onComplete Callback invoked when the resource loaded. + + @example + ```js + // preload the texture (${project}/assets/resources/textures/background.jpg) from resources + cc.resources.preload('textures/background', cc.Texture2D); + + // preload the audio (${project}/assets/resources/music/hit.mp3) from resources + cc.resources.preload('music/hit', cc.AudioClip); + // wait for while + cc.resources.load('music/hit', cc.AudioClip, (err, audioClip) => {}); + + * // preload the prefab (${project}/assets/bundle1/misc/character/cocos) from bundle1 folder + bundle1.preload('misc/character/cocos', cc.Prefab); + + // load the sprite frame of (${project}/assets/bundle2/imgs/cocos.png) from bundle2 folder + bundle2.preload('imgs/cocos', cc.SpriteFrame); + // wait for while + bundle2.load('imgs/cocos', cc.SpriteFrame, (err, spriteFrame) => {}); + ``` + */ + preload(paths: string|string[], type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void; + preload(paths: string|string[], onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void; + preload(paths: string|string[], type: typeof cc.Asset, onComplete: (error: Error, items: RequestItem[]) => void): void; + preload(paths: string|string[], type: typeof cc.Asset): void; + preload(paths: string|string[], onComplete: (error: Error, items: RequestItem[]) => void): void; + preload(paths: string|string[]): void; + /** + !#en + Load all assets under a folder inside the bundle folder.
+
+ Note: All asset paths in Creator use forward slashes, paths using backslashes will not work. + + !#zh + 加载目标文件夹中的所有资源, 注意:路径中只能使用斜杠,反斜杠将停止工作 + @param dir path of the target folder.The path is relative to the bundle folder, extensions must be omitted. + @param type Only asset of type will be loaded if this argument is supplied. + @param onProgress Callback invoked when progression change. + @param onComplete A callback which is called when all assets have been loaded, or an error occurs. + + @example + ```js + // load all audios (resources/audios/) + cc.resources.loadDir('audios', cc.AudioClip, (err, audios) => {}); + + // load all textures in "resources/imgs/" + cc.resources.loadDir('imgs', cc.Texture2D, null, function (err, textures) { + var texture1 = textures[0]; + var texture2 = textures[1]; + }); + + // load all prefabs (${project}/assets/bundle1/misc/characters/) from bundle1 folder + bundle1.loadDir('misc/characters', cc.Prefab, (err, prefabs) => console.log(err)); + + // load all sprite frame (${project}/assets/some/xxx/bundle2/skills/) from bundle2 folder + bundle2.loadDir('skills', cc.SpriteFrame, null, (err, spriteFrames) => console.log(err)); + ``` + */ + loadDir(dir: string, type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array) => void): void; + loadDir(dir: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, assets: Array) => void): void; + loadDir(dir: string, type: typeof cc.Asset, onComplete: (error: Error, assets: Array) => void): void; + loadDir(dir: string, type: typeof cc.Asset): void; + loadDir(dir: string, onComplete: (error: Error, assets: Array) => void): void; + loadDir(dir: string): void; + /** + !#en + Preload all assets under a folder inside the bundle folder.
After calling this method, you still need to finish loading by calling `Bundle.loadDir`. + It will be totally fine to call `Bundle.loadDir` at any time even if the preloading is not yet finished + + !#zh + 预加载目标文件夹中的所有资源。调用完后,你仍然需要通过 `Bundle.loadDir` 来完成加载。 + 就算预加载还没完成,你也可以直接调用 `Bundle.loadDir`。 + @param dir path of the target folder.The path is relative to the bundle folder, extensions must be omitted. + @param type Only asset of type will be preloaded if this argument is supplied. + @param onProgress Callback invoked when progression change. + @param onComplete A callback which is called when all assets have been loaded, or an error occurs. + + @example + ```js + // preload all audios (resources/audios/) + cc.resources.preloadDir('audios', cc.AudioClip); + + // preload all textures in "resources/imgs/" + cc.resources.preloadDir('imgs', cc.Texture2D); + // wait for while + cc.resources.loadDir('imgs', cc.Texture2D, (err, textures) => {}); + + // preload all prefabs (${project}/assets/bundle1/misc/characters/) from bundle1 folder + bundle1.preloadDir('misc/characters', cc.Prefab); + + // preload all sprite frame (${project}/assets/some/xxx/bundle2/skills/) from bundle2 folder + bundle2.preloadDir('skills', cc.SpriteFrame); + // wait for while + bundle2.loadDir('skills', cc.SpriteFrame, (err, spriteFrames) => {}); + ``` + */ + preloadDir(dir: string, type: typeof cc.Asset, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void; + preloadDir(dir: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, items: RequestItem[]) => void): void; + preloadDir(dir: string, type: typeof cc.Asset, onComplete: (error: Error, items: RequestItem[]) => void): void; + preloadDir(dir: string, type: typeof cc.Asset): void; + preloadDir(dir: string, onComplete: (error: Error, items: RequestItem[]) => void): void; + preloadDir(dir: string): void; + /** + !#en + Loads the scene within this bundle by its name. + + !#zh + 通过场景名称加载分包中的场景。 + @param sceneName The name of the scene to load. + @param options Some optional parameters + @param onProgress Callback invoked when progression change. + @param onComplete callback, will be called after scene launched. + + @example + ```js + bundle1.loadScene('first', (err, sceneAsset) => cc.director.runScene(sceneAsset)); + ``` + */ + loadScene(sceneName: string, options: Record, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void; + loadScene(sceneName: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void; + loadScene(sceneName: string, options: Record, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void; + loadScene(sceneName: string, onComplete: (error: Error, sceneAsset: cc.SceneAsset) => void): void; + loadScene(sceneName: string, options: Record): void; + loadScene(sceneName: string): void; + /** + !#en + Preloads the scene within this bundle by its name. After calling this method, you still need to finish loading by calling `Bundle.loadScene` or `cc.director.loadScene`. + It will be totally fine to call `Bundle.loadDir` at any time even if the preloading is not yet finished + + !#zh + 通过场景名称预加载分包中的场景.调用完后,你仍然需要通过 `Bundle.loadScene` 或 `cc.director.loadScene` 来完成加载。 + 就算预加载还没完成,你也可以直接调用 `Bundle.loadScene` 或 `cc.director.loadScene`。 + @param sceneName The name of the scene to preload. + @param options Some optional parameters + @param onProgress callback, will be called when the load progression change. + @param onComplete callback, will be called after scene loaded. + + @example + ```js + bundle1.preloadScene('first'); + // wait for a while + bundle1.loadScene('first', (err, scene) => cc.director.runScene(scene)); + ``` + */ + preloadScene(sceneName: string, options: Record, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error) => void): void; + preloadScene(sceneName: string, onProgress: (finish: number, total: number, item: RequestItem) => void, onComplete: (error: Error) => void): void; + preloadScene(sceneName: string, options: Record, onComplete: (error: Error) => void): void; + preloadScene(sceneName: string, onComplete: (error: Error) => void): void; + preloadScene(sceneName: string, options: Record): void; + preloadScene(sceneName: string): void; + /** + !#en + Get asset within this bundle by path and type.
+ After you load asset with {{#crossLink "Bundle/load:method"}}{{/crossLink}} or {{#crossLink "Bundle/loadDir:method"}}{{/crossLink}}, + you can acquire them by passing the path to this API. + + !#zh + 通过路径与类型获取资源。在你使用 {{#crossLink "Bundle/load:method"}}{{/crossLink}} 或者 {{#crossLink "Bundle/loadDir:method"}}{{/crossLink}} 之后, + 你能通过传路径通过这个 API 获取到这些资源。 + @param path The path of asset + @param type Only asset of type will be returned if this argument is supplied. + + @example + ```js + bundle1.get('music/hit', cc.AudioClip); + ``` + */ + get (path: string, type?: typeof cc.Asset): T; + /** + !#en + Release the asset loaded by {{#crossLink "Bundle/load:method"}}{{/crossLink}} or {{#crossLink "Bundle/loadDir:method"}}{{/crossLink}} and it's dependencies. + Refer to {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} for detailed informations. + + !#zh + 释放通过 {{#crossLink "Bundle/load:method"}}{{/crossLink}} 或者 {{#crossLink "Bundle/loadDir:method"}}{{/crossLink}} 加载的资源。详细信息请参考 {{#crossLink "AssetManager/releaseAsset:method"}}{{/crossLink}} + @param path The path of asset + @param type Only asset of type will be released if this argument is supplied. + + @example + ```js + // release a texture which is no longer need + bundle1.release('misc/character/cocos'); + ``` + */ + release(path: string, type: typeof cc.Asset): void; + release(path: string): void; + /** + !#en + Release all assets within this bundle. Refer to {{#crossLink "AssetManager/releaseAll:method"}}{{/crossLink}} for detailed informations. + + !#zh + 释放此包中的所有资源。详细信息请参考 {{#crossLink "AssetManager/releaseAll:method"}}{{/crossLink}} + + @example + ```js + // release all asset within bundle1 + bundle1.releaseAll(); + ``` + */ + releaseAll(): void; + } + /** !#en + Cache manager is a module which controls all caches downloaded from server in non-web platform, it is a singleton + All member can be accessed with `cc.assetManager.cacheManager`. + + !#zh + 缓存管理器是一个模块,在非 WEB 平台上,用于管理所有从服务器上下载下来的缓存,这是一个单例,所有成员能通过 `cc.assetManager.cacheManager` 访问。 */ + export class CacheManager { + /** !#en + The name of cacheDir + + !#zh + 缓存目录的名称 */ + cacheDir: string; + /** !#en + Whether or not cache asset into user's storage space, this property only works on mini-game platforms + + !#zh + 是否缓存资源到用户存储空间,此属性只在小游戏平台有效 */ + cacheEnabled: boolean; + /** !#en + Whether or not auto clear cache when storage ran out, this property only works on mini-game platforms + + !#zh + 是否在存储空间满了后自动清理缓存,此属性只在小游戏平台有效 */ + autoClear: boolean; + /** !#en + The interval between caching resources, this property only works on mini-game platforms, unit: ms + + !#zh + 缓存资源的间隔时间,此属性只在小游戏平台有效,单位:ms */ + cacheInterval: number; + /** !#en + The interval between deleting resources, when you use `cleanLRU`, the resources will be deleted as this interval, unit: ms + + !#zh + 清理资源的间隔时间,当你使用 `cleanLRU` 时,资源将以此间隔被删除,单位:ms */ + deleteInterval: number; + /** !#en + List of all cached files + + !#zh + 所有缓存文件列表 */ + cachedFiles: Cache<{ bundle: string, url: string, lastTime: number }>; + /** + !#en + Get cached path with origin url + + !#zh + 通过原始 url 获取缓存后的路径 + @param originUrl originUrl + */ + getCache(originUrl: string): string; + /** + !#en + Get temporary path with origin url, this method only works on mini-game platforms + + !#zh + 通过原始 url 获取临时文件的路径,此方法只在小游戏平台有效 + @param originUrl originUrl + */ + getTemp(originUrl: string): string; + /** + !#en + Clear all caches, please use with caution, If necessary, we recommend using it before the game is launched + + !#zh + 清空所有缓存,请谨慎使用,如果必要的话,我们建议在游戏启动之前使用 + */ + clearCache(): void; + /** + !#en + Clear part of caches with LRU strategy + + !#zh + 使用 LRU 策略清空部分缓存 + */ + clearLRU(): void; + /** + !#en + Remove cache with origin url + + !#zh + 通过原始 url 移除缓存 + */ + removeCache(): void; + } + /** !#en + use to cache something + + !#zh + 用于缓存某些内容 */ + export class Cache { + /** + !#en + Create a cache + + !#zh + 创建一个 cache + @param map An object used to initialize + */ + constructor(map?: Record); + /** + !#en + Add Key-Value to cache + + !#zh + 增加键值对到缓存中 + @param key The key + @param val The value + + @example + ```js + var cache = new Cache(); + cache.add('test', null); + ``` + */ + add(key: string, val: T): T; + /** + !#en + Get the cached content by key + + !#zh + 通过 key 获取对应的 value + @param key The key + + @example + ```js + var cache = new Cache(); + var test = cache.get('test'); + ``` + */ + get(key: string): T; + /** + !#en + Check whether or not content exists by key + + !#zh + 通过 Key 判断是否存在对应的内容 + @param key The key + + @example + ```js + var cache = new Cache(); + var exist = cache.has('test'); + ``` + */ + has(key: string): boolean; + /** + !#en + Remove the cached content by key + + !#zh + 通过 Key 移除对应的内容 + @param key The key + + @example + ```js + var cache = new Cache(); + var content = cache.remove('test'); + ``` + */ + remove(key: string): T; + /** + !#en + Clear all content + + !#zh + 清除所有内容 + + @example + ```js + var cache = new Cache(); + cache.clear(); + ``` + */ + clear():void; + /** + !#en + Enumerate all content and invoke function + + !#zh + 枚举所有内容并执行方法 + @param func Function to be invoked + + @example + ```js + var cache = new Cache(); + cache.forEach((val, key) => console.log(key)); + ``` + */ + forEach(func: (val: T, key: string) => void): void; + /** + !#en + Enumerate all content to find one element which can fulfill condition + + !#zh + 枚举所有内容,找到一个可以满足条件的元素 + @param predicate The condition + + @example + ```js + var cache = new Cache(); + var val = cache.find((val, key) => key === 'test'); + ``` + */ + find(predicate: (val: T, key: string) => boolean): T; + /** !#en + The count of cached content + + !#zh + 缓存数量 */ + count: number; + /** + !#en + Destroy this cache + + !#zh + 销毁这个 cache + */ + destroy(): void; + } + /** !#en + Control asset's dependency list, it is a singleton. All member can be accessed with `cc.assetManager.dependUtil` + + !#zh + 控制资源的依赖列表,这是一个单例, 所有成员能通过 `cc.assetManager.dependUtil` 访问 */ + export class DependUtil { + /** + !#en + Get asset's native dependency. For example, Texture's native dependency is image. + + !#zh + 获取资源的原生依赖,例如 Texture 的原生依赖是图片 + @param uuid asset's uuid + + @example + ```js + var dep = dependUtil.getNativeDep('fcmR3XADNLgJ1ByKhqcC5Z'); + ``` + */ + getNativeDep(uuid: string): Record; + /** + !#en + Get asset's direct referencing non-native dependency list. For example, Material's non-native dependencies are Texture. + + !#zh + 获取资源直接引用的非原生依赖列表,例如,材质的非原生依赖是 Texture + @param uuid asset's uuid + + @example + ```js + var deps = dependUtil.getDeps('fcmR3XADNLgJ1ByKhqcC5Z'); + ``` + */ + getDeps(uuid: string): string[]; + /** + !#en + Get non-native dependency list of the loaded asset, include indirect reference. + The returned array stores the dependencies with their uuid, after retrieve dependencies, + + !#zh + 获取某个已经加载好的资源的所有非原生依赖资源列表,包括间接引用的资源,并保存在数组中返回。 + 返回的数组将仅保存依赖资源的 uuid。 + @param uuid The asset's uuid + + @example + ```js + var deps = dependUtil.getDepsRecursively('fcmR3XADNLgJ1ByKhqcC5Z'); + ``` + */ + getDepsRecursively(uuid: string): string[]; + } + /** !#en + Control all download process, it is a singleton. All member can be accessed with `cc.assetManager.downloader` , it can download several types of files: + 1. Text + 2. Image + 3. Audio + 4. Assets + 5. Scripts + + !#zh + 管理所有下载过程,downloader 是个单例,所有成员能通过 `cc.assetManager.downloader` 访问,它能下载以下几种类型的文件: + 1. 文本 + 2. 图片 + 3. 音频 + 4. 资源 + 5. 脚本 */ + export class Downloader { + /** !#en + The address of remote server + + !#zh + 远程服务器地址 */ + remoteServerAddress: string; + /** !#en + The maximum number of concurrent when downloading + + !#zh + 下载时的最大并发数 */ + maxConcurrency: number; + /** !#en + The maximum number of request can be launched per frame when downloading + + !#zh + 下载时每帧可以启动的最大请求数 */ + maxRequestsPerFrame: number; + /** !#en + The max number of retries when fail + + !#zh + 失败重试次数 */ + maxRetryCount: number; + /** !#en + Wait for while before another retry, unit: ms + + !#zh + 重试的间隔时间 */ + retryInterval: number; + /** + !#en + Register custom handler if you want to change default behavior or extend downloader to download other format file + + !#zh + 当你想修改默认行为或者拓展 downloader 来下载其他格式文件时可以注册自定义的 handler + @param type Extension likes '.jpg' or map likes {'.jpg': jpgHandler, '.png': pngHandler} + @param handler handler + + @example + ```js + downloader.register('.tga', (url, options, onComplete) => onComplete(null, null)); + downloader.register({'.tga': (url, options, onComplete) => onComplete(null, null), '.ext': (url, options, onComplete) => onComplete(null, null)}); + ``` + */ + register(type: string, handler: (url: string, options: Record, onComplete: (err: Error, content: any) => void) => void): void; + register(map: Record, onComplete: (err: Error, content: any) => void) => void>): void; + /** + !#en + Use corresponding handler to download file under limitation + + !#zh + 在限制下使用对应的 handler 来下载文件 + @param url The url should be downloaded + @param type The type indicates that which handler should be used to download, such as '.jpg' + @param options some optional paramters will be transferred to the corresponding handler. + @param onComplete callback when finishing downloading + + @example + ```js + download('http://example.com/test.tga', '.tga', {onFileProgress: (loaded, total) => console.lgo(loaded/total)}, onComplete: (err) => console.log(err)); + ``` + */ + download(id: string, url: string, type: string, options: Record, onComplete: (err: Error, content: any) => void): void; + } + /** !#en + Provide some helpful function, it is a singleton. All member can be accessed with `cc.assetManager.utils` + + !#zh + 提供一些辅助方法,helper 是一个单例, 所有成员能通过 `cc.assetManager.utils` 访问 */ + export class Helper { + /** + !#en + Decode uuid, returns the original uuid + + !#zh + 解码 uuid,返回原始 uuid + @param base64 the encoded uuid + + @example + ```js + var uuid = 'fcmR3XADNLgJ1ByKhqcC5Z'; + var originalUuid = decodeUuid(uuid); // fc991dd7-0033-4b80-9d41-c8a86a702e59 + ``` + */ + decodeUuid(base64: string): string; + /** + !#en + Extract uuid from url + + !#zh + 从 url 中提取 uuid + @param url url + + @example + ```js + var url = 'assets/main/import/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.json'; + var uuid = getUuidFromURL(url); // fc991dd7-0033-4b80-9d41-c8a86a702e59 + ``` + */ + getUuidFromURL(url: string): string; + /** + !#en + Transform uuid to url + + !#zh + 转换 uuid 为 url + @param uuid The uuid of asset + @param options Some optional parameters + + @example + ```js + // json path, 'assets/main/import/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.json'; + var url = getUrlWithUuid('fcmR3XADNLgJ1ByKhqcC5Z', {isNative: false}); + + // png path, 'assets/main/native/fc/fc991dd7-0033-4b80-9d41-c8a86a702e59.png'; + var url = getUrlWithUuid('fcmR3XADNLgJ1ByKhqcC5Z', {isNative: true, nativeExt: '.png'}); + ``` + */ + getUrlWithUuid(uuid: string, options?: Record): string; + /** + !#en + Check if the type of asset is scene + + !#zh + 检查资源类型是否是场景 + @param asset asset + */ + isScene(asset: any): boolean; + /** + !#en + Normalize url, strip './' and '/' + + !#zh + 标准化 url ,去除 './' 和 '/' + @param url url + */ + normalize(url: string): string; + } + /** !#en + Handle the packed asset, include unpacking, loading, cache and so on. It is a singleton. All member can be accessed with `cc.assetManager.packManager` + + !#zh + 处理打包资源,包括拆包,加载,缓存等等,这是一个单例, 所有成员能通过 `cc.assetManager.packManager` 访问 */ + export class PackManager { + /** + !#en + Unpack the json, revert to what it was before packing + + !#zh + 拆解 json 包,恢复为打包之前的内容 + @param pack The pack + @param json The content of pack + @param options Some optional parameters + @param onComplete Callback when finish unpacking + + @example + ```js + downloader.downloadFile('pack.json', {responseType: 'json'}, null, (err, file) => { + packManager.unpackJson(['a', 'b'], file, null, (err, data) => console.log(err)); + }); + ``` + */ + unpackJson(pack: string[], json: any, options: Record, onComplete?: (err: Error, content: any) => void): void; + /** + !#en + Register custom handler if you want to change default behavior or extend packManager to unpack other format pack + + !#zh + 当你想修改默认行为或者拓展 packManager 来拆分其他格式的包时可以注册自定义的 handler + @param type Extension likes '.bin' or map likes {'.bin': binHandler, '.ab': abHandler} + @param handler handler + + @example + ```js + packManager.register('.bin', (packUuid, file, options, onComplete) => onComplete(null, null)); + packManager.register({'.bin': (packUuid, file, options, onComplete) => onComplete(null, null), '.ab': (packUuid, file, options, onComplete) => onComplete(null, null)}); + ``` + */ + register(type: string, handler: (packUuid: string, data: any, options: Record, onComplete: (err: Error, content: any) => void) => void): void; + register(map: Record, onComplete: (err: Error, content: any) => void) => void>): void; + /** + !#en + Use corresponding handler to unpack package + + !#zh + 用对应的 handler 来进行解包 + @param pack The uuid of packed assets + @param data The packed data + @param type The type indicates that which handler should be used to download, such as '.jpg' + @param options Some optional parameter + @param onComplete callback when finishing unpacking + + @example + ```js + downloader.downloadFile('pack.json', {responseType: 'json'}, null, (err, file) => { + packManager.unpack(['2fawq123d', '1zsweq23f'], file, '.json', null, (err, data) => console.log(err)); + }); + ``` + */ + unpack(pack: string[], data: any, type: string, options: Record, onComplete?: (err: Error, data: any) => void): void; + /** + !#en + Download request item, If item is not in any package, download as usual. Otherwise, download the corresponding package and unpack it. + And then retrieve the corresponding content form it. + + !#zh + 下载请求对象,如果请求对象不在任何包内,则正常下载,否则下载对应的 package 并进行拆解,并取回包内对应的内容 + @param item Some item you want to download + @param options Some optional parameters + @param onComplete Callback when finished + + @example + ```js + var requestItem = cc.AssetManager.RequestItem.create(); + requestItem.uuid = 'fcmR3XADNLgJ1ByKhqcC5Z'; + requestItem.info = config.getAssetInfo('fcmR3XADNLgJ1ByKhqcC5Z'); + packManager.load(requestItem, null, (err, data) => console.log(err)); + ``` + */ + load(item: RequestItem, options: Record, onComplete: (err: Error, data: any) => void): void; + } + /** !#en + Parse the downloaded file, it's a singleton, all member can be accessed with `cc.assetManager.parser` + + !#zh + 解析已下载的文件,parser 是一个单例, 所有成员能通过 `cc.assetManaager.parser` 访问 */ + export class Parser { + /** + !#en + Register custom handler if you want to change default behavior or extend parser to parse other format file + + !#zh + 当你想修改默认行为或者拓展 parser 来解析其他格式文件时可以注册自定义的handler + @param type Extension likes '.jpg' or map likes {'.jpg': jpgHandler, '.png': pngHandler} + @param handler The corresponding handler + + @example + ```js + parser.register('.tga', (file, options, onComplete) => onComplete(null, null)); + parser.register({'.tga': (file, options, onComplete) => onComplete(null, null), '.ext': (file, options, onComplete) => onComplete(null, null)}); + ``` + */ + register(type: string, handler: (file: any, options: Record, onComplete: (err: Error, data: any) => void) => void): void; + register(map: Record, onComplete: (err: Error, data: any) => void) => void>): void; + /** + !#en + Use corresponding handler to parse file + + !#zh + 使用对应的handler来解析文件 + @param id The id of file + @param file File + @param type The corresponding type of file, likes '.jpg'. + @param options Some optional paramters will be transferred to the corresponding handler. + @param onComplete callback when finishing downloading + + @example + ```js + downloader.downloadFile('test.jpg', {responseType: 'blob'}, null, (err, file) => { + parser.parse('test.jpg', file, '.jpg', null, (err, img) => console.log(err)); + }); + ``` + */ + parse(id: string, file: any, type: string, options: Record, onComplete: (err: Error, content: any) => void): void; + } + /** !#en + Pipeline can execute the task for some effect. + + !#zh + 管线能执行任务达到某个效果 */ + export class Pipeline { + /** !#en + The id of pipeline + + !#zh + 管线的 id */ + id: number; + /** !#en + The name of pipeline + + !#zh + 管线的名字 */ + name: string; + /** !#en + All pipes of pipeline + + !#zh + 所有的管道 */ + pipes: Function[]; + /** + !#en + Create a new pipeline + + !#zh + 创建一个管线 + @param name The name of pipeline + @param funcs The array of pipe, every pipe must be function which take two parameters, the first is a `Task` flowed in pipeline, the second is complete callback + + @example + ```js + var pipeline = new Pipeline('download', [ + (task, done) => { + var url = task.input; + cc.assetManager.downloader.downloadFile(url, null, null, (err, result) => { + task.output = result; + done(err); + }); + }, + (task, done) => { + var text = task.input; + var json = JSON.stringify(text); + task.output = json; + done(); + } + ]); + ``` + */ + constructor(name: string, funcs: Array<(task: Task, done?: (err: Error) => void) => void>); + /** + !#en + At specific point insert a new pipe to pipeline + + !#zh + 在某个特定的点为管线插入一个新的 pipe + @param func The new pipe + @param index The specific point you want to insert at. + + @example + ```js + var pipeline = new Pipeline('test', []); + pipeline.insert((task, done) => { + // do something + done(); + }, 0); + ``` + */ + insert(func: (task: Task, callback?: (err: Error) => void) => void, index: number): Pipeline; + /** + !#en + Append a new pipe to the pipeline + + !#zh + 添加一个管道到管线中 + @param func The new pipe + + @example + ```js + var pipeline = new Pipeline('test', []); + pipeline.append((task, done) => { + // do something + done(); + }); + ``` + */ + append(func: (task: Task, callback?: (err: Error) => void) => void): Pipeline; + /** + !#en + Remove pipe which at specific point + + !#zh + 移除特定位置的管道 + @param index The specific point + + @example + ```js + var pipeline = new Pipeline('test', (task, done) => { + // do something + done(); + }); + pipeline.remove(0); + ``` + */ + remove(index: number): Pipeline; + /** + !#en + Execute task synchronously + + !#zh + 同步执行任务 + @param task The task will be executed + + @example + ```js + var pipeline = new Pipeline('sync', [(task) => { + let input = task.input; + task.output = doSomething(task.input); + }]); + + var task = new Task({input: 'test'}); + console.log(pipeline.sync(task)); + ``` + */ + sync(task: Task): any; + /** + !#en + Execute task asynchronously + + !#zh + 异步执行任务 + @param task The task will be executed + + @example + ```js + var pipeline = new Pipeline('sync', [(task, done) => { + let input = task.input; + task.output = doSomething(task.input); + done(); + }]); + var task = new Task({input: 'test', onComplete: (err, result) => console.log(result)}); + pipeline.async(task); + ``` + */ + async(task: Task): void; + } + /** !#en + A collection of information about a request + + !#zh + 请求的相关信息集合 */ + export class RequestItem { + /** !#en + The uuid of request + + !#zh + 请求资源的uuid */ + uuid: string; + /** !#en + The final url of request + + !#zh + 请求的最终url */ + url: string; + /** !#en + The extension name of asset + + !#zh + 资源的扩展名 */ + ext: string; + /** !#en + The content of asset + + !#zh + 资源的内容 */ + content: any; + /** !#en + The file of asset + + !#zh + 资源的文件 */ + file: any; + /** !#en + The information of asset + + !#zh + 资源的相关信息 */ + info: any; + /** !#en + Whether or not it is native asset + + !#zh + 资源是否是原生资源 */ + isNative: boolean; + /** !#en + Custom options + + !#zh + 自定义参数 */ + options: any; + /** + !#en + Create a request item + + !#zh + 创建一个 request item + */ + constructor(); + /** !#en + The id of request, combined from uuid and isNative + + !#zh + 请求的 id, 由 uuid 和 isNative 组合而成 */ + id: string; + /** + !#en + Recycle this for reuse + + !#zh + 回收 requestItem 用于复用 + */ + recycle(): void; + /** + !#en + Create a new request item from pool + + !#zh + 从对象池中创建 requestItem + */ + static create(): RequestItem; + } + /** !#en + Task is used to run in the pipeline for some effect + + !#zh + 任务用于在管线中运行以达成某种效果 */ + export class Task { + /** !#en + The id of task + + !#zh + 任务id */ + id: number; + /** !#en + The callback when task is completed + + !#zh + 完成回调 */ + onComplete: Function; + /** !#en + The callback of progression + + !#zh + 进度回调 */ + onProgress: Function; + /** !#en + The callback when something goes wrong + + !#zh + 错误回调 */ + onError: Function; + /** !#en + The source of task + + !#zh + 任务的源 */ + source: any; + /** !#en + The output of task + + !#zh + 任务的输出 */ + output: any; + /** !#en + The input of task + + !#zh + 任务的输入 */ + input: any; + /** !#en + The progression of task + + !#zh + 任务的进度 */ + progress: any; + /** !#en + Custom options + + !#zh + 自定义参数 */ + options: any; + /** + !#en + Create a new Task + + !#zh + 创建一个任务 + @param options Some optional paramters + */ + constructor(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record}); + /** + !#en + Set paramters of this task + + !#zh + 设置任务的参数 + @param options Some optional paramters + + @example + ```js + var task = new Task(); + task.set({input: ['test'], onComplete: (err, result) => console.log(err), onProgress: (finish, total) => console.log(finish / total)}); + ``` + */ + set(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record}): void; + /** + !#en + Dispatch event + + !#zh + 发布事件 + @param event The event name + @param param1 Parameter 1 + @param param2 Parameter 2 + @param param3 Parameter 3 + @param param4 Parameter 4 + + @example + ```js + var task = Task.create(); + Task.onComplete = (msg) => console.log(msg); + Task.dispatch('complete', 'hello world'); + ``` + */ + dispatch(event: string, param1?: any, param2?: any, param3?: any, param4?: any): void; + /** + !#en + Recycle this for reuse + + !#zh + 回收 task 用于复用 + */ + recycle(): void; + /** !#en + Whether or not this task is completed + + !#zh + 此任务是否已经完成 */ + isFinish: boolean; + /** + !#en + Create a new task from pool + + !#zh + 从对象池中创建 task + @param options Some optional paramters + */ + static create(options?: {onComplete?: (err: Error, result: any) => void, onError?: () => void, onProgress?: Function, input: any, progress?: any, options?: Record}): Task; + } + /** !#en + The builtin bundles + + !#zh + 内置 bundle */ + export enum BuiltinBundleName { + RESOURCES = 0, + INTERNAL = 0, + MAIN = 0, + START_SCENE = 0, + } +} + +/** Some helpful utilities */ +declare namespace cc.geomUtils { + /** + !#en + the distance between a point and a plane + !#zh + 计算点和平面之间的距离。 + @param point point + @param plane plane + */ + export function point_plane(point: cc.Vec3, plane: cc.Plane): number; + /** + !#en + the closest point on plane to a given point + !#zh + 计算平面上最接近给定点的点。 + @param out Closest point + @param point Given point + @param plane plane + */ + export function pt_point_plane(out: cc.Vec3, point: cc.Vec3, plane: cc.Plane): cc.Vec3; + /** + !#en + the closest point on aabb to a given point + !#zh + 计算 aabb 上最接近给定点的点。 + @param out Closest point. + @param point Given point. + @param aabb Align the axis around the box. + */ + export function pt_point_aabb(out: cc.Vec3, point: cc.Vec3, aabb: cc.Aabb): cc.Vec3; + /** + !#en + the closest point on obb to a given point + !#zh + 计算 obb 上最接近给定点的点。 + @param out Closest point + @param point Given point + @param obb Direction box + */ + export function pt_point_obb(out: cc.Vec3, point: cc.Vec3, obb: cc.Obb): cc.Vec3; +} + +/** !#en Some JavaScript decorators which can be accessed with "cc._decorator". +!#zh 一些 JavaScript 装饰器,目前可以通过 "cc._decorator" 来访问。 +(这些 API 仍不完全稳定,有可能随着 JavaScript 装饰器的标准实现而调整) */ +declare namespace cc._decorator { + /** + !#en + Declare the standard [ES6 Class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) + as CCClass, please see [Class](../../../manual/en/scripting/class.html) for details. + !#zh + 将标准写法的 [ES6 Class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes) 声明为 CCClass,具体用法请参阅[类型定义](../../../manual/zh/scripting/class.html)。 + @param name The class name used for serialization. + + @example + ```js + const {ccclass} = cc._decorator; + + // define a CCClass, omit the name + @ccclass + class NewScript extends cc.Component { + // ... + } + + // define a CCClass with a name + @ccclass('LoginData') + class LoginData { + // ... + } + ``` + */ + export function ccclass(name?: string): Function; + export function ccclass(_class?: Function): void; + /** + !#en + Declare property for [CCClass](../../../manual/en/scripting/reference/attributes.html). + !#zh + 定义 [CCClass](../../../manual/zh/scripting/reference/attributes.html) 所用的属性。 + @param options an object with some property attributes + + @example + ```js + const {ccclass, property} = cc._decorator; + + @ccclass + class NewScript extends cc.Component { + @property({ + type: cc.Node + }) + targetNode1 = null; + + @property(cc.Node) + targetNode2 = null; + + @property(cc.Button) + targetButton = null; + + @property + _width = 100; + + @property + get width () { + return this._width; + } + + @property + set width (value) { + this._width = value; + } + + @property + offset = new cc.Vec2(100, 100); + + @property(cc.Vec2) + offsets = []; + + @property(cc.SpriteFrame) + frame = null; + } + + // above is equivalent to (上面的代码相当于): + + var NewScript = cc.Class({ + properties: { + targetNode1: { + default: null, + type: cc.Node + }, + + targetNode2: { + default: null, + type: cc.Node + }, + + targetButton: { + default: null, + type: cc.Button + }, + + _width: 100, + + width: { + get () { + return this._width; + }, + set (value) { + this._width = value; + } + }, + + offset: new cc.Vec2(100, 100) + + offsets: { + default: [], + type: cc.Vec2 + } + + frame: { + default: null, + type: cc.SpriteFrame + }, + } + }); + ``` + */ + export function property(options?: {type?: any; visible?: boolean|(() => boolean); displayName?: string; tooltip?: string; multiline?: boolean; readonly?: boolean; min?: number; max?: number; step?: number; range?: number[]; slide?: boolean; serializable?: boolean; formerlySerializedAs?: string; editorOnly?: boolean; override?: boolean; animatable?: boolean} | any[]|Function|cc.ValueType|number|string|boolean): Function; + export function property(_target: Object, _key: any, _desc?: any): void; + /** + !#en + Makes a CCClass that inherit from component execute in edit mode.
+ By default, all components are only executed in play mode, + which means they will not have their callback functions executed while the Editor is in edit mode. + !#zh + 允许继承自 Component 的 CCClass 在编辑器里执行。
+ 默认情况下,所有 Component 都只会在运行时才会执行,也就是说它们的生命周期回调不会在编辑器里触发。 + + @example + ```js + const {ccclass, executeInEditMode} = cc._decorator; + + @ccclass + @executeInEditMode + class NewScript extends cc.Component { + // ... + } + ``` + */ + export function executeInEditMode(): Function; + export function executeInEditMode(_class: Function): void; + /** + !#en + Automatically add required component as a dependency for the CCClass that inherit from component. + !#zh + 为声明为 CCClass 的组件添加依赖的其它组件。当组件添加到节点上时,如果依赖的组件不存在,引擎将会自动将依赖组件添加到同一个节点,防止脚本出错。该设置在运行时同样有效。 + @param requiredComponent requiredComponent + + @example + ```js + const {ccclass, requireComponent} = cc._decorator; + + @ccclass + @requireComponent(cc.Sprite) + class SpriteCtrl extends cc.Component { + // ... + } + ``` + */ + export function requireComponent(requiredComponent: typeof cc.Component): Function; + /** + !#en + The menu path to register a component to the editors "Component" menu. Eg. "Rendering/CameraCtrl". + !#zh + 将当前组件添加到组件菜单中,方便用户查找。例如 "Rendering/CameraCtrl"。 + @param path The path is the menu represented like a pathname. + For example the menu could be "Rendering/CameraCtrl". + + @example + ```js + const {ccclass, menu} = cc._decorator; + + @ccclass + @menu("Rendering/CameraCtrl") + class NewScript extends cc.Component { + // ... + } + ``` + */ + export function menu(path: string): Function; + /** + !#en + The execution order of lifecycle methods for Component. + Those less than 0 will execute before while those greater than 0 will execute after. + The order will only affect onLoad, onEnable, start, update and lateUpdate while onDisable and onDestroy will not be affected. + !#zh + 设置脚本生命周期方法调用的优先级。优先级小于 0 的组件将会优先执行,优先级大于 0 的组件将会延后执行。优先级仅会影响 onLoad, onEnable, start, update 和 lateUpdate,而 onDisable 和 onDestroy 不受影响。 + @param order The execution order of lifecycle methods for Component. Those less than 0 will execute before while those greater than 0 will execute after. + + @example + ```js + const {ccclass, executionOrder} = cc._decorator; + + @ccclass + @executionOrder(1) + class CameraCtrl extends cc.Component { + // ... + } + ``` + */ + export function executionOrder(order: number): Function; + /** + !#en + Prevents Component of the same type (or subtype) to be added more than once to a Node. + !#zh + 防止多个相同类型(或子类型)的组件被添加到同一个节点。 + + @example + ```js + const {ccclass, disallowMultiple} = cc._decorator; + + @ccclass + @disallowMultiple + class CameraCtrl extends cc.Component { + // ... + } + ``` + */ + export function disallowMultiple(): Function; + export function disallowMultiple(_class: Function): void; + /** + !#en + If specified, the editor's scene view will keep updating this node in 60 fps when it is selected, otherwise, it will update only if necessary.
+ This property is only available if executeInEditMode is true. + !#zh + 当指定了 "executeInEditMode" 以后,playOnFocus 可以在选中当前组件所在的节点时,提高编辑器的场景刷新频率到 60 FPS,否则场景就只会在必要的时候进行重绘。 + + @example + ```js + const {ccclass, playOnFocus, executeInEditMode} = cc._decorator; + + @ccclass + @executeInEditMode + @playOnFocus + class CameraCtrl extends cc.Component { + // ... + } + ``` + */ + export function playOnFocus(): Function; + export function playOnFocus(_class: Function): void; + /** + !#en + Specifying the url of the custom html to draw the component in **Properties**. + !#zh + 自定义当前组件在 **属性检查器** 中渲染时所用的网页 url。 + @param url url + + @example + ```js + const {ccclass, inspector} = cc._decorator; + + @ccclass + @inspector("packages://inspector/inspectors/comps/camera-ctrl.js") + class NewScript extends cc.Component { + // ... + } + ``` + */ + export function inspector(path: string): Function; + /** + !#en + The custom documentation URL. + !#zh + 指定当前组件的帮助文档的 url,设置过后,在 **属性检查器** 中就会出现一个帮助图标,用户点击将打开指定的网页。 + @param url url + + @example + ```js + const {ccclass, help} = cc._decorator; + + @ccclass + @help("app://docs/html/components/spine.html") + class NewScript extends cc.Component { + // ... + } + ``` + */ + export function help(path: string): Function; + /** + NOTE:
+ The old mixins implemented in cc.Class(ES5) behaves exact the same as multiple inheritance. + But since ES6, class constructor can't be function-called and class methods become non-enumerable, + so we can not mix in ES6 Classes.
+ See:
+ [https://esdiscuss.org/topic/traits-are-now-impossible-in-es6-until-es7-since-rev32](https://esdiscuss.org/topic/traits-are-now-impossible-in-es6-until-es7-since-rev32)
+ One possible solution (but IDE unfriendly):
+ [http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes](http://justinfagnani.com/2015/12/21/real-mixins-with-javascript-classes/)
+
+ NOTE:
+ You must manually call mixins constructor, this is different from cc.Class(ES5). + @param ctor constructors to mix, only support ES5 constructors or classes defined by using `cc.Class`, + not support ES6 Classes. + + @example + ```js + const {ccclass, mixins} = cc._decorator; + + class Animal { ... } + + const Fly = cc.Class({ + constructor () { ... } + }); + + @ccclass + @mixins(cc.EventTarget, Fly) + class Bird extends Animal { + constructor () { + super(); + + // You must manually call mixins constructor, this is different from cc.Class(ES5) + cc.EventTarget.call(this); + Fly.call(this); + } + // ... + } + ``` + */ + export function mixins(ctor: Function, ...rest: Function[]): Function; +} + +/** !#en This module provides some JavaScript utilities. All members can be accessed with `cc.js`. +!#zh 这个模块封装了 JavaScript 相关的一些实用函数,你可以通过 `cc.js` 来访问这个模块。 */ +declare namespace cc.js { + /** + Check the obj whether is number or not + If a number is created by using 'new Number(10086)', the typeof it will be "object"... + Then you can use this function if you care about this case. + @param obj obj + */ + export function isNumber(obj: any): boolean; + /** + Check the obj whether is string or not. + If a string is created by using 'new String("blabla")', the typeof it will be "object"... + Then you can use this function if you care about this case. + @param obj obj + */ + export function isString(obj: any): boolean; + /** + Copy all properties not defined in obj from arguments[1...n] + @param obj object to extend its properties + @param sourceObj source object to copy properties from + */ + export function addon(obj: any, ...sourceObj: any[]): any; + /** + copy all properties from arguments[1...n] to obj + @param obj obj + @param sourceObj sourceObj + */ + export function mixin(obj: any, ...sourceObj: any[]): any; + /** + Derive the class from the supplied base class. + Both classes are just native javascript constructors, not created by cc.Class, so + usually you will want to inherit using {{#crossLink "cc/Class:method"}}cc.Class {{/crossLink}} instead. + @param cls cls + @param base the baseclass to inherit + */ + export function extend(cls: Function, base: Function): Function; + /** + Get super class + @param ctor the constructor of subclass + */ + export function getSuper(ctor: Function): Function; + /** + Checks whether subclass is child of superclass or equals to superclass + @param subclass subclass + @param superclass superclass + */ + export function isChildClassOf(subclass: Function, superclass: Function): boolean; + /** + Removes all enumerable properties from object + @param obj obj + */ + export function clear(obj: any): void; + /** + Checks whether obj is an empty object + @param obj obj + */ + export function isEmptyObject(obj: any): boolean; + /** + Get property descriptor in object and all its ancestors + @param obj obj + @param name name + */ + export function getPropertyDescriptor(obj: any, name: string): any; + /** + Define value, just help to call Object.defineProperty.
+ The configurable will be true. + @param obj obj + @param prop prop + @param value value + @param writable writable + @param enumerable enumerable + */ + export function value(obj: any, prop: string, value: any, writable?: boolean, enumerable?: boolean): void; + /** + Define get set accessor, just help to call Object.defineProperty(...) + @param obj obj + @param prop prop + @param getter getter + @param setter setter + @param enumerable enumerable + @param configurable configurable + */ + export function getset(obj: any, prop: string, getter: Function, setter?: Function, enumerable?: boolean, configurable?: boolean): void; + /** + Define get accessor, just help to call Object.defineProperty(...) + @param obj obj + @param prop prop + @param getter getter + @param enumerable enumerable + @param configurable configurable + */ + export function get(obj: any, prop: string, getter: Function, enumerable?: boolean, configurable?: boolean): void; + /** + Define set accessor, just help to call Object.defineProperty(...) + @param obj obj + @param prop prop + @param setter setter + @param enumerable enumerable + @param configurable configurable + */ + export function set(obj: any, prop: string, setter: Function, enumerable?: boolean, configurable?: boolean): void; + /** + Get class name of the object, if object is just a {} (and which class named 'Object'), it will return "". + (modified from the code from this stackoverflow post) + @param objOrCtor instance or constructor + */ + export function getClassName(objOrCtor: any|Function): string; + /** !#en All classes registered in the engine, indexed by ID. + !#zh 引擎中已注册的所有类型,通过 ID 进行索引。 */ + export var _registeredClassIds: any; + /** !#en All classes registered in the engine, indexed by name. + !#zh 引擎中已注册的所有类型,通过名称进行索引。 */ + export var _registeredClassNames: any; + /** + Register the class by specified name manually + @param className className + @param constructor constructor + */ + export function setClassName(className: string, constructor: Function): void; + /** + Unregister a class from fireball. + + If you dont need a registered class anymore, you should unregister the class so that Fireball will not keep its reference anymore. + Please note that its still your responsibility to free other references to the class. + @param constructor the class you will want to unregister, any number of classes can be added + */ + export function unregisterClass(...constructor: Function[]): void; + /** + Get the registered class by name + @param classname classname + */ + export function getClassByName(classname: string): Function; + /** + Defines a polyfill field for deprecated codes. + @param obj YourObject or YourClass.prototype + @param obsoleted "OldParam" or "YourClass.OldParam" + @param newExpr "NewParam" or "YourClass.NewParam" + @param writable writable + */ + export function obsolete(obj: any, obsoleted: string, newExpr: string, writable?: boolean): void; + /** + Defines all polyfill fields for obsoleted codes corresponding to the enumerable properties of props. + @param obj YourObject or YourClass.prototype + @param objName "YourObject" or "YourClass" + @param props props + @param writable writable + */ + export function obsoletes(obj: any, objName: any, props: any, writable?: boolean): void; + /** + A string tool to construct a string with format string. + @param msg A JavaScript string containing zero or more substitution strings (%s). + @param subst JavaScript objects with which to replace substitution strings within msg. This gives you additional control over the format of the output. + + @example + ```js + cc.js.formatStr("a: %s, b: %s", a, b); + cc.js.formatStr(a, b, c); + ``` + */ + export function formatStr(msg: string|any, ...subst: any[]): string; + /** + !#en + A simple wrapper of `Object.create(null)` which ensures the return object have no prototype (and thus no inherited members). So we can skip `hasOwnProperty` calls on property lookups. It is a worthwhile optimization than the `{}` literal when `hasOwnProperty` calls are necessary. + !#zh + 该方法是对 `Object.create(null)` 的简单封装。`Object.create(null)` 用于创建无 prototype (也就无继承)的空对象。这样我们在该对象上查找属性时,就不用进行 `hasOwnProperty` 判断。在需要频繁判断 `hasOwnProperty` 时,使用这个方法性能会比 `{}` 更高。 + @param forceDictMode Apply the delete operator to newly created map object. This causes V8 to put the object in "dictionary mode" and disables creation of hidden classes which are very expensive for objects that are constantly changing shape. + */ + export function createMap(forceDictMode?: boolean): any; + /** undefined */ + export class array { + /** + Removes the array item at the specified index. + @param array array + @param index index + */ + static removeAt(array: any[], index: number): void; + /** + Removes the array item at the specified index. + It's faster but the order of the array will be changed. + @param array array + @param index index + */ + static fastRemoveAt(array: any[], index: number): void; + /** + Removes the first occurrence of a specific object from the array. + @param array array + @param value value + */ + static remove(array: any[], value: any): boolean; + /** + Removes the first occurrence of a specific object from the array. + It's faster but the order of the array will be changed. + @param array array + @param value value + */ + static fastRemove(array: any[], value: number): void; + /** + Verify array's Type + @param array array + @param type type + */ + static verifyType(array: any[], type: Function): boolean; + /** + Removes from array all values in minusArr. For each Value in minusArr, the first matching instance in array will be removed. + @param array Source Array + @param minusArr minus Array + */ + static removeArray(array: any[], minusArr: any[]): void; + /** + Inserts some objects at index + @param array array + @param addObjs addObjs + @param index index + */ + static appendObjectsAt(array: any[], addObjs: any[], index: number): any[]; + /** + Determines whether the array contains a specific value. + @param array array + @param value value + */ + static contains(array: any[], value: any): boolean; + /** + Copy an array's item to a new array (its performance is better than Array.slice) + @param array array + */ + static copy(array: any[]): any[]; + } + /** !#en + A fixed-length object pool designed for general type.
+ The implementation of this object pool is very simple, + it can helps you to improve your game performance for objects which need frequent release and recreate operations
+ !#zh + 长度固定的对象缓存池,可以用来缓存各种对象类型。
+ 这个对象池的实现非常精简,它可以帮助您提高游戏性能,适用于优化对象的反复创建和销毁。 */ + export class Pool { + /** + !#en + Constructor for creating an object pool for the specific object type. + You can pass a callback argument for process the cleanup logic when the object is recycled. + !#zh + 使用构造函数来创建一个指定对象类型的对象池,您可以传递一个回调函数,用于处理对象回收时的清理逻辑。 + @param cleanupFunc the callback method used to process the cleanup logic when the object is recycled. + @param size initializes the length of the array + */ + constructor(cleanupFunc: (obj: any) => void, size: number); + constructor(size: number); + /** + !#en + Get and initialize an object from pool. This method defaults to null and requires the user to implement it. + !#zh + 获取并初始化对象池中的对象。这个方法默认为空,需要用户自己实现。 + @param params parameters to used to initialize the object + */ + get(...params: any[]): any; + /** !#en + The current number of available objects, the default is 0, it will gradually increase with the recycle of the object, + the maximum will not exceed the size specified when the constructor is called. + !#zh + 当前可用对象数量,一开始默认是 0,随着对象的回收会逐渐增大,最大不会超过调用构造函数时指定的 size。 */ + count: number; + /** + !#en + Get an object from pool, if no available object in the pool, null will be returned. + !#zh + 获取对象池中的对象,如果对象池没有可用对象,则返回空。 + */ + _get(): any; + /** + !#en Put an object into the pool. + !#zh 向对象池返还一个不再需要的对象。 + */ + put(): void; + /** + !#en Resize the pool. + !#zh 设置对象池容量。 + */ + resize(): void; + } +} + +/** !#en A basic module for creating vertex data for 3D objects. You can access this module by `cc.primitive`. +!#zh 一个创建 3D 物体顶点数据的基础模块,你可以通过 `cc.primitive` 来访问这个模块。 */ +declare namespace cc.primitive { + /** + !#en Create box vertex data + !#zh 创建长方体顶点数据 + @param width width + @param height height + @param length length + @param opts opts + */ + export function box(width: number, height: number, length: number, opts: {widthSegments: number; heightSegments: number; lengthSegments: number; }): cc.VertexData; + /** + !#en Create cone vertex data + !#zh 创建圆锥体顶点数据 + @param radius radius + @param height height + @param opts opts + */ + export function cone(radius: number, height: number, opts: {radialSegments: number; heightSegments: number; capped: boolean; arc: number; }): cc.VertexData; + /** + !#en Create cylinder vertex data + !#zh 创建圆柱体顶点数据 + @param radiusTop radiusTop + @param radiusBottom radiusBottom + @param height height + @param opts opts + */ + export function cylinder(radiusTop: number, radiusBottom: number, height: number, opts: {radialSegments: number; heightSegments: number; capped: boolean; arc: number; }): cc.VertexData; + /** + !#en Create plane vertex data + !#zh 创建平台顶点数据 + @param width width + @param length length + @param opts opts + */ + export function plane(width: number, length: number, opts: {widthSegments: number; lengthSegments: number; }): cc.VertexData; + /** + !#en Create quad vertex data + !#zh 创建面片顶点数据 + */ + export function quad(): cc.VertexData; + /** + !#en Create sphere vertex data + !#zh 创建球体顶点数据 + @param radius radius + @param opts opts + */ + export function sphere(radius: number, opts: {segments: number; }): cc.VertexData; + /** + !#en Create torus vertex data + !#zh 创建圆环顶点数据 + @param radius radius + @param tube tube + @param opts opts + */ + export function torus(radius: number, tube: number, opts: {radialSegments: number; tubularSegments: number; arc: number; }): cc.VertexData; + /** + !#en Create capsule vertex data + !#zh 创建胶囊体顶点数据 + @param radiusTop radiusTop + @param radiusBottom radiusBottom + @param height height + @param opts opts + */ + export function capsule(radiusTop: number, radiusBottom: number, height: number, opts: {sides: number; heightSegments: number; capped: boolean; arc: number; }): cc.VertexData; + /** + !#en Create polyhedron vertex data + !#zh 创建多面体顶点数据 + @param type type + @param Size Size + @param opts opts + */ + export function polyhedron(type: cc.primitive.PolyhedronType, Size: number, opts: {sizeX: number; sizeY: number; sizeZ: number; }): cc.VertexData; +} + +declare let CC_JSB: boolean +declare let CC_NATIVERENDERER: boolean +declare let CC_EDITOR: boolean +declare let CC_PREVIEW: boolean +declare let CC_TEST: boolean +declare let CC_DEBUG: boolean + +declare let cc: { + // polyfills: { + // destroyObject? (object: any): void; + // }; + [x: string]: any; +} + +declare let Editor: any; + +// https://medium.com/dailyjs/typescript-create-a-condition-based-subset-types-9d902cea5b8c +type FlagExcludedType = { [Key in keyof Base]: Base[Key] extends Type ? never : Key }; +type AllowedNames = FlagExcludedType[keyof Base]; +type KeyPartial = { [P in K]?: T[P] }; +type OmitType = KeyPartial>; +type ConstructorType = OmitType; + +declare interface IWritableArrayLike { + readonly length: number; + [index: number]: T; +} + +declare let module: { + exports: object +} + + +declare interface Math { + sign(v: number); +} + +declare interface Object { + assign(target: {}, source: {}); +} + + +type FloatArray = Float64Array | Float32Array; + +interface IColorLike { + r: number; + g: number; + b: number; + a: number; + _val: number; + +} + +interface IMat3Like { + m: FloatArray +} + +interface IMat4Like { + m: FloatArray +} + +interface IQuatLike { + x: number; + y: number; + z: number; + w: number; +} + +interface IRectLike { + x: number; + y: number; + width: number; + height: number; +} + +interface ISizeLike { + width: number; + height: number; +} + +interface IVec2Like { + x: number; + y: number; +} + +interface IVec3Like { + x: number; + y: number; + z: number; +} + +interface IVec4Like { + x: number; + y: number; + z: number; + w: number; +} +declare namespace dragonBones { + /** + * @internal + * @private + */ + const webAssemblyModule: { + HEAP16: Int16Array; + _malloc(byteSize: number): number; + _free(pointer: number): void; + setDataBinary(data: DragonBonesData, binaryPointer: number, intBytesLength: number, floatBytesLength: number, frameIntBytesLength: number, frameFloatBytesLength: number, frameBytesLength: number, timelineBytesLength: number): void; + }; +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + const enum BinaryOffset { + WeigthBoneCount = 0, + WeigthFloatOffset = 1, + WeigthBoneIndices = 2, + MeshVertexCount = 0, + MeshTriangleCount = 1, + MeshFloatOffset = 2, + MeshWeightOffset = 3, + MeshVertexIndices = 4, + TimelineScale = 0, + TimelineOffset = 1, + TimelineKeyFrameCount = 2, + TimelineFrameValueCount = 3, + TimelineFrameValueOffset = 4, + TimelineFrameOffset = 5, + FramePosition = 0, + FrameTweenType = 1, + FrameTweenEasingOrCurveSampleCount = 2, + FrameCurveSamples = 3, + DeformMeshOffset = 0, + DeformCount = 1, + DeformValueCount = 2, + DeformValueOffset = 3, + DeformFloatOffset = 4, + } + /** + * @internal + * @private + */ + const enum ArmatureType { + Armature = 0, + MovieClip = 1, + Stage = 2, + } + /** + * @internal + * @private + */ + const enum BoneType { + Bone = 0, + Surface = 1, + } + /** + * @private + */ + const enum DisplayType { + Image = 0, + Armature = 1, + Mesh = 2, + BoundingBox = 3, + } + /** + * - Bounding box type. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 边界框类型。 + * @version DragonBones 5.0 + * @language zh_CN + */ + const enum BoundingBoxType { + Rectangle = 0, + Ellipse = 1, + Polygon = 2, + } + /** + * @internal + * @private + */ + const enum ActionType { + Play = 0, + Frame = 10, + Sound = 11, + } + /** + * @internal + * @private + */ + const enum BlendMode { + Normal = 0, + Add = 1, + Alpha = 2, + Darken = 3, + Difference = 4, + Erase = 5, + HardLight = 6, + Invert = 7, + Layer = 8, + Lighten = 9, + Multiply = 10, + Overlay = 11, + Screen = 12, + Subtract = 13, + } + /** + * @internal + * @private + */ + const enum TweenType { + None = 0, + Line = 1, + Curve = 2, + QuadIn = 3, + QuadOut = 4, + QuadInOut = 5, + } + /** + * @internal + * @private + */ + const enum TimelineType { + Action = 0, + ZOrder = 1, + BoneAll = 10, + BoneTranslate = 11, + BoneRotate = 12, + BoneScale = 13, + Surface = 50, + SlotDisplay = 20, + SlotColor = 21, + SlotFFD = 22, + IKConstraint = 30, + AnimationTime = 40, + AnimationWeight = 41, + } + /** + * - Offset mode. + * @version DragonBones 5.5 + * @language en_US + */ + /** + * - 偏移模式。 + * @version DragonBones 5.5 + * @language zh_CN + */ + const enum OffsetMode { + None = 0, + Additive = 1, + Override = 2, + } + /** + * - Animation fade out mode. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画淡出模式。 + * @version DragonBones 4.5 + * @language zh_CN + */ + const enum AnimationFadeOutMode { + /** + * - Do not fade out of any animation states. + * @language en_US + */ + /** + * - 不淡出任何的动画状态。 + * @language zh_CN + */ + None = 0, + /** + * - Fade out the animation states of the same layer. + * @language en_US + */ + /** + * - 淡出同层的动画状态。 + * @language zh_CN + */ + SameLayer = 1, + /** + * - Fade out the animation states of the same group. + * @language en_US + */ + /** + * - 淡出同组的动画状态。 + * @language zh_CN + */ + SameGroup = 2, + /** + * - Fade out the animation states of the same layer and group. + * @language en_US + */ + /** + * - 淡出同层并且同组的动画状态。 + * @language zh_CN + */ + SameLayerAndGroup = 3, + /** + * - Fade out of all animation states. + * @language en_US + */ + /** + * - 淡出所有的动画状态。 + * @language zh_CN + */ + All = 4, + /** + * - Does not replace the animation state with the same name. + * @language en_US + */ + /** + * - 不替换同名的动画状态。 + * @language zh_CN + */ + Single = 5, + } + /** + * @private + */ + interface Map { + [key: string]: T; + } + /** + * @private + */ + class DragonBones { + static readonly VERSION: string; + static yDown: boolean; + static debug: boolean; + static debugDraw: boolean; + static webAssembly: boolean; + private readonly _clock; + private readonly _events; + private readonly _objects; + private _eventManager; + constructor(eventManager: IEventDispatcher); + advanceTime(passedTime: number): void; + bufferEvent(value: EventObject): void; + bufferObject(object: BaseObject): void; + readonly clock: WorldClock; + readonly eventManager: IEventDispatcher; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The BaseObject is the base class for all objects in the DragonBones framework. + * All BaseObject instances are cached to the object pool to reduce the performance consumption of frequent requests for memory or memory recovery. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 基础对象,通常 DragonBones 的对象都继承自该类。 + * 所有基础对象的实例都会缓存到对象池,以减少频繁申请内存或内存回收的性能消耗。 + * @version DragonBones 4.5 + * @language zh_CN + */ + abstract class BaseObject { + private static _hashCode; + private static _defaultMaxCount; + private static readonly _maxCountMap; + private static readonly _poolsMap; + private static _returnObject(object); + static toString(): string; + /** + * - Set the maximum cache count of the specify object pool. + * @param objectConstructor - The specify class. (Set all object pools max cache count if not set) + * @param maxCount - Max count. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 设置特定对象池的最大缓存数量。 + * @param objectConstructor - 特定的类。 (不设置则设置所有对象池的最大缓存数量) + * @param maxCount - 最大缓存数量。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static setMaxCount(objectConstructor: (typeof BaseObject) | null, maxCount: number): void; + /** + * - Clear the cached instances of a specify object pool. + * @param objectConstructor - Specify class. (Clear all cached instances if not set) + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 清除特定对象池的缓存实例。 + * @param objectConstructor - 特定的类。 (不设置则清除所有缓存的实例) + * @version DragonBones 4.5 + * @language zh_CN + */ + static clearPool(objectConstructor?: (typeof BaseObject) | null): void; + /** + * - Get an instance of the specify class from object pool. + * @param objectConstructor - The specify class. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 从对象池中获取特定类的实例。 + * @param objectConstructor - 特定的类。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static borrowObject(objectConstructor: { + new (): T; + }): T; + /** + * - A unique identification number assigned to the object. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 分配给此实例的唯一标识号。 + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly hashCode: number; + private _isInPool; + /** + * @private + */ + protected abstract _onClear(): void; + /** + * - Clear the object and return it back to object pool。 + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 清除该实例的所有数据并将其返还对象池。 + * @version DragonBones 4.5 + * @language zh_CN + */ + returnToPool(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - 2D Transform matrix. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 2D 转换矩阵。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class Matrix { + /** + * - The value that affects the positioning of pixels along the x axis when scaling or rotating an image. + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 缩放或旋转图像时影响像素沿 x 轴定位的值。 + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + a: number; + /** + * - The value that affects the positioning of pixels along the y axis when rotating or skewing an image. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 旋转或倾斜图像时影响像素沿 y 轴定位的值。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + b: number; + /** + * - The value that affects the positioning of pixels along the x axis when rotating or skewing an image. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 旋转或倾斜图像时影响像素沿 x 轴定位的值。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + c: number; + /** + * - The value that affects the positioning of pixels along the y axis when scaling or rotating an image. + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 缩放或旋转图像时影响像素沿 y 轴定位的值。 + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + d: number; + /** + * - The distance by which to translate each point along the x axis. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 沿 x 轴平移每个点的距离。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + tx: number; + /** + * - The distance by which to translate each point along the y axis. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 沿 y 轴平移每个点的距离。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + ty: number; + /** + * @private + */ + constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number); + toString(): string; + /** + * @private + */ + copyFrom(value: Matrix): Matrix; + /** + * @private + */ + copyFromArray(value: Array, offset?: number): Matrix; + /** + * - Convert to unit matrix. + * The resulting matrix has the following properties: a=1, b=0, c=0, d=1, tx=0, ty=0. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 转换为单位矩阵。 + * 该矩阵具有以下属性:a=1、b=0、c=0、d=1、tx=0、ty=0。 + * @version DragonBones 3.0 + * @language zh_CN + */ + identity(): Matrix; + /** + * - Multiplies the current matrix with another matrix. + * @param value - The matrix that needs to be multiplied. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 将当前矩阵与另一个矩阵相乘。 + * @param value - 需要相乘的矩阵。 + * @version DragonBones 3.0 + * @language zh_CN + */ + concat(value: Matrix): Matrix; + /** + * - Convert to inverse matrix. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 转换为逆矩阵。 + * @version DragonBones 3.0 + * @language zh_CN + */ + invert(): Matrix; + /** + * - Apply a matrix transformation to a specific point. + * @param x - X coordinate. + * @param y - Y coordinate. + * @param result - The point after the transformation is applied. + * @param delta - Whether to ignore tx, ty's conversion to point. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 将矩阵转换应用于特定点。 + * @param x - 横坐标。 + * @param y - 纵坐标。 + * @param result - 应用转换之后的点。 + * @param delta - 是否忽略 tx,ty 对点的转换。 + * @version DragonBones 3.0 + * @language zh_CN + */ + transformPoint(x: number, y: number, result: { + x: number; + y: number; + }, delta?: boolean): void; + /** + * @private + */ + transformRectangle(rectangle: { + x: number; + y: number; + width: number; + height: number; + }, delta?: boolean): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - 2D Transform. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 2D 变换。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class Transform { + /** + * @private + */ + static readonly PI: number; + /** + * @private + */ + static readonly PI_D: number; + /** + * @private + */ + static readonly PI_H: number; + /** + * @private + */ + static readonly PI_Q: number; + /** + * @private + */ + static readonly RAD_DEG: number; + /** + * @private + */ + static readonly DEG_RAD: number; + /** + * @private + */ + static normalizeRadian(value: number): number; + /** + * - Horizontal translate. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 水平位移。 + * @version DragonBones 3.0 + * @language zh_CN + */ + x: number; + /** + * - Vertical translate. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 垂直位移。 + * @version DragonBones 3.0 + * @language zh_CN + */ + y: number; + /** + * - Skew. (In radians) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 倾斜。 (以弧度为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + skew: number; + /** + * - rotation. (In radians) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 旋转。 (以弧度为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + rotation: number; + /** + * - Horizontal Scaling. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 水平缩放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + scaleX: number; + /** + * - Vertical scaling. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 垂直缩放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + scaleY: number; + /** + * @private + */ + constructor(x?: number, y?: number, skew?: number, rotation?: number, scaleX?: number, scaleY?: number); + toString(): string; + /** + * @private + */ + copyFrom(value: Transform): Transform; + /** + * @private + */ + identity(): Transform; + /** + * @private + */ + add(value: Transform): Transform; + /** + * @private + */ + minus(value: Transform): Transform; + /** + * @private + */ + fromMatrix(matrix: Matrix): Transform; + /** + * @private + */ + toMatrix(matrix: Matrix): Transform; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class ColorTransform { + alphaMultiplier: number; + redMultiplier: number; + greenMultiplier: number; + blueMultiplier: number; + alphaOffset: number; + redOffset: number; + greenOffset: number; + blueOffset: number; + constructor(alphaMultiplier?: number, redMultiplier?: number, greenMultiplier?: number, blueMultiplier?: number, alphaOffset?: number, redOffset?: number, greenOffset?: number, blueOffset?: number); + copyFrom(value: ColorTransform): void; + identity(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The Point object represents a location in a two-dimensional coordinate system. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - Point 对象表示二维坐标系统中的某个位置。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class Point { + /** + * - The horizontal coordinate. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 该点的水平坐标。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + x: number; + /** + * - The vertical coordinate. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 该点的垂直坐标。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + y: number; + /** + * - Creates a new point. If you pass no parameters to this method, a point is created at (0,0). + * @param x - The horizontal coordinate. + * @param y - The vertical coordinate. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 创建一个 egret.Point 对象.若不传入任何参数,将会创建一个位于(0,0)位置的点。 + * @param x - 该对象的x属性值,默认为 0.0。 + * @param y - 该对象的y属性值,默认为 0.0。 + * @version DragonBones 3.0 + * @language zh_CN + */ + constructor(x?: number, y?: number); + /** + * @private + */ + copyFrom(value: Point): void; + /** + * @private + */ + clear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - A Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its + * width and its height.
+ * The x, y, width, and height properties of the Rectangle class are independent of each other; changing the value of + * one property has no effect on the others. However, the right and bottom properties are integrally related to those + * four properties. For example, if you change the value of the right property, the value of the width property changes; + * if you change the bottom property, the value of the height property changes. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - Rectangle 对象是按其位置(由它左上角的点 (x, y) 确定)以及宽度和高度定义的区域。
+ * Rectangle 类的 x、y、width 和 height 属性相互独立;更改一个属性的值不会影响其他属性。 + * 但是,right 和 bottom 属性与这四个属性是整体相关的。例如,如果更改 right 属性的值,则 width + * 属性的值将发生变化;如果更改 bottom 属性,则 height 属性的值将发生变化。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class Rectangle { + /** + * - The x coordinate of the top-left corner of the rectangle. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 矩形左上角的 x 坐标。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + x: number; + /** + * - The y coordinate of the top-left corner of the rectangle. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 矩形左上角的 y 坐标。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + y: number; + /** + * - The width of the rectangle, in pixels. + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 矩形的宽度(以像素为单位)。 + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + width: number; + /** + * - 矩形的高度(以像素为单位)。 + * @default 0.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - The height of the rectangle, in pixels. + * @default 0.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + height: number; + /** + * @private + */ + constructor(x?: number, y?: number, width?: number, height?: number); + /** + * @private + */ + copyFrom(value: Rectangle): void; + /** + * @private + */ + clear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The user custom data. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 用户自定义数据。 + * @version DragonBones 5.0 + * @language zh_CN + */ + class UserData extends BaseObject { + static toString(): string; + /** + * - The custom int numbers. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 自定义整数。 + * @version DragonBones 5.0 + * @language zh_CN + */ + readonly ints: Array; + /** + * - The custom float numbers. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 自定义浮点数。 + * @version DragonBones 5.0 + * @language zh_CN + */ + readonly floats: Array; + /** + * - The custom strings. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 自定义字符串。 + * @version DragonBones 5.0 + * @language zh_CN + */ + readonly strings: Array; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + addInt(value: number): void; + /** + * @internal + * @private + */ + addFloat(value: number): void; + /** + * @internal + * @private + */ + addString(value: string): void; + /** + * - Get the custom int number. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 获取自定义整数。 + * @version DragonBones 5.0 + * @language zh_CN + */ + getInt(index?: number): number; + /** + * - Get the custom float number. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 获取自定义浮点数。 + * @version DragonBones 5.0 + * @language zh_CN + */ + getFloat(index?: number): number; + /** + * - Get the custom string. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 获取自定义字符串。 + * @version DragonBones 5.0 + * @language zh_CN + */ + getString(index?: number): string; + } + /** + * @internal + * @private + */ + class ActionData extends BaseObject { + static toString(): string; + type: ActionType; + name: string; + bone: BoneData | null; + slot: SlotData | null; + data: UserData | null; + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The DragonBones data. + * A DragonBones data contains multiple armature data. + * @see dragonBones.ArmatureData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 龙骨数据。 + * 一个龙骨数据包含多个骨架数据。 + * @see dragonBones.ArmatureData + * @version DragonBones 3.0 + * @language zh_CN + */ + class DragonBonesData extends BaseObject { + static toString(): string; + /** + * @private + */ + autoSearch: boolean; + /** + * - The animation frame rate. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画帧频。 + * @version DragonBones 3.0 + * @language zh_CN + */ + frameRate: number; + /** + * - The data version. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 数据版本。 + * @version DragonBones 3.0 + * @language zh_CN + */ + version: string; + /** + * - The DragonBones data name. + * The name is consistent with the DragonBones project name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 龙骨数据名称。 + * 该名称与龙骨项目名保持一致。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + stage: ArmatureData | null; + /** + * @internal + * @private + */ + readonly frameIndices: Array; + /** + * @internal + * @private + */ + readonly cachedFrames: Array; + /** + * - All armature data names. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 所有的骨架数据名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly armatureNames: Array; + /** + * @private + */ + readonly armatures: Map; + /** + * @internal + * @private + */ + binary: ArrayBuffer; + /** + * @internal + * @private + */ + intArray: Int16Array; + /** + * @internal + * @private + */ + floatArray: Float32Array; + /** + * @internal + * @private + */ + frameIntArray: Int16Array; + /** + * @internal + * @private + */ + frameFloatArray: Float32Array; + /** + * @internal + * @private + */ + frameArray: Int16Array; + /** + * @internal + * @private + */ + timelineArray: Uint16Array; + /** + * @private + */ + userData: UserData | null; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + addArmature(value: ArmatureData): void; + /** + * - Get a specific armature data. + * @param name - The armature data name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的骨架数据。 + * @param name - 骨架数据名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + getArmature(name: string): ArmatureData | null; + /** + * - Deprecated, please refer to {@link #dragonBones.BaseFactory#removeDragonBonesData()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #dragonBones.BaseFactory#removeDragonBonesData()}。 + * @deprecated + * @language zh_CN + */ + dispose(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The armature data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨架数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class ArmatureData extends BaseObject { + static toString(): string; + /** + * @private + */ + type: ArmatureType; + /** + * - The animation frame rate. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画帧率。 + * @version DragonBones 3.0 + * @language zh_CN + */ + frameRate: number; + /** + * @private + */ + cacheFrameRate: number; + /** + * @private + */ + scale: number; + /** + * - The armature name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨架名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + readonly aabb: Rectangle; + /** + * - The names of all the animation data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 所有的动画数据名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly animationNames: Array; + /** + * @private + */ + readonly sortedBones: Array; + /** + * @private + */ + readonly sortedSlots: Array; + /** + * @private + */ + readonly defaultActions: Array; + /** + * @private + */ + readonly actions: Array; + /** + * @private + */ + readonly bones: Map; + /** + * @private + */ + readonly slots: Map; + /** + * @private + */ + readonly constraints: Map; + /** + * @private + */ + readonly skins: Map; + /** + * @private + */ + readonly animations: Map; + /** + * - The default skin data. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 默认插槽数据。 + * @version DragonBones 4.5 + * @language zh_CN + */ + defaultSkin: SkinData | null; + /** + * - The default animation data. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 默认动画数据。 + * @version DragonBones 4.5 + * @language zh_CN + */ + defaultAnimation: AnimationData | null; + /** + * @private + */ + canvas: CanvasData | null; + /** + * @private + */ + userData: UserData | null; + /** + * @private + */ + parent: DragonBonesData; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + sortBones(): void; + /** + * @internal + * @private + */ + cacheFrames(frameRate: number): void; + /** + * @internal + * @private + */ + setCacheFrame(globalTransformMatrix: Matrix, transform: Transform): number; + /** + * @internal + * @private + */ + getCacheFrame(globalTransformMatrix: Matrix, transform: Transform, arrayOffset: number): void; + /** + * @internal + * @private + */ + addBone(value: BoneData): void; + /** + * @internal + * @private + */ + addSlot(value: SlotData): void; + /** + * @internal + * @private + */ + addConstraint(value: ConstraintData): void; + /** + * @internal + * @private + */ + addSkin(value: SkinData): void; + /** + * @internal + * @private + */ + addAnimation(value: AnimationData): void; + /** + * @internal + * @private + */ + addAction(value: ActionData, isDefault: boolean): void; + /** + * - Get a specific done data. + * @param name - The bone name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的骨骼数据。 + * @param name - 骨骼名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + getBone(name: string): BoneData | null; + /** + * - Get a specific slot data. + * @param name - The slot name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的插槽数据。 + * @param name - 插槽名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + getSlot(name: string): SlotData | null; + /** + * @private + */ + getConstraint(name: string): ConstraintData | null; + /** + * - Get a specific skin data. + * @param name - The skin name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定皮肤数据。 + * @param name - 皮肤名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + getSkin(name: string): SkinData | null; + /** + * @internal + * @private + */ + getMesh(skinName: string, slotName: string, meshName: string): MeshDisplayData | null; + /** + * - Get a specific animation data. + * @param name - The animation name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的动画数据。 + * @param name - 动画名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + getAnimation(name: string): AnimationData | null; + } + /** + * - The bone data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨骼数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class BoneData extends BaseObject { + static toString(): string; + /** + * @private + */ + inheritTranslation: boolean; + /** + * @private + */ + inheritRotation: boolean; + /** + * @private + */ + inheritScale: boolean; + /** + * @private + */ + inheritReflection: boolean; + /** + * @private + */ + type: BoneType; + /** + * - The bone length. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨骼长度。 + * @version DragonBones 3.0 + * @language zh_CN + */ + length: number; + /** + * - The bone name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨骼名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + readonly transform: Transform; + /** + * @private + */ + userData: UserData | null; + /** + * - The parent bone data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 父骨骼数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + parent: BoneData | null; + /** + * @inheritDoc + */ + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class SurfaceData extends BoneData { + static toString(): string; + segmentX: number; + segmentY: number; + readonly vertices: Array; + /** + * @inheritDoc + */ + protected _onClear(): void; + } + /** + * - The slot data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class SlotData extends BaseObject { + /** + * @internal + * @private + */ + static readonly DEFAULT_COLOR: ColorTransform; + /** + * @internal + * @private + */ + static createColor(): ColorTransform; + static toString(): string; + /** + * @private + */ + blendMode: BlendMode; + /** + * @private + */ + displayIndex: number; + /** + * @private + */ + zOrder: number; + /** + * - The slot name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + color: ColorTransform; + /** + * @private + */ + userData: UserData | null; + /** + * - The parent bone data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 父骨骼数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + parent: BoneData; + /** + * @inheritDoc + */ + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + abstract class ConstraintData extends BaseObject { + order: number; + name: string; + target: BoneData; + root: BoneData; + bone: BoneData | null; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class IKConstraintData extends ConstraintData { + static toString(): string; + scaleEnabled: boolean; + bendPositive: boolean; + weight: number; + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class CanvasData extends BaseObject { + static toString(): string; + hasBackground: boolean; + color: number; + x: number; + y: number; + width: number; + height: number; + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The skin data, typically a armature data instance contains at least one skinData. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 皮肤数据,通常一个骨架数据至少包含一个皮肤数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class SkinData extends BaseObject { + static toString(): string; + /** + * - The skin name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 皮肤名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + readonly displays: Map>; + /** + * @private + */ + parent: ArmatureData; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + addDisplay(slotName: string, value: DisplayData | null): void; + /** + * @private + */ + getDisplay(slotName: string, displayName: string): DisplayData | null; + /** + * @private + */ + getDisplays(slotName: string): Array | null; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + abstract class DisplayData extends BaseObject { + type: DisplayType; + name: string; + path: string; + parent: SkinData; + readonly transform: Transform; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class ImageDisplayData extends DisplayData { + static toString(): string; + readonly pivot: Point; + texture: TextureData | null; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class ArmatureDisplayData extends DisplayData { + static toString(): string; + inheritAnimation: boolean; + readonly actions: Array; + armature: ArmatureData | null; + protected _onClear(): void; + /** + * @private + */ + addAction(value: ActionData): void; + } + /** + * @internal + * @private + */ + class MeshDisplayData extends DisplayData { + static toString(): string; + inheritDeform: boolean; + offset: number; + weight: WeightData | null; + glue: GlueData | null; + texture: TextureData | null; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class BoundingBoxDisplayData extends DisplayData { + static toString(): string; + boundingBox: BoundingBoxData | null; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class WeightData extends BaseObject { + static toString(): string; + count: number; + offset: number; + readonly bones: Array; + protected _onClear(): void; + addBone(value: BoneData): void; + } + /** + * @internal + * @private + */ + class GlueData extends BaseObject { + static toString(): string; + readonly weights: Array; + readonly meshes: Array; + protected _onClear(): void; + addMesh(value: MeshDisplayData | null): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The base class of bounding box data. + * @see dragonBones.RectangleData + * @see dragonBones.EllipseData + * @see dragonBones.PolygonData + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 边界框数据基类。 + * @see dragonBones.RectangleData + * @see dragonBones.EllipseData + * @see dragonBones.PolygonData + * @version DragonBones 5.0 + * @language zh_CN + */ + abstract class BoundingBoxData extends BaseObject { + /** + * - The bounding box type. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 边界框类型。 + * @version DragonBones 5.0 + * @language zh_CN + */ + type: BoundingBoxType; + /** + * @private + */ + color: number; + /** + * @private + */ + width: number; + /** + * @private + */ + height: number; + /** + * @private + */ + protected _onClear(): void; + /** + * - Check whether the bounding box contains a specific point. (Local coordinate system) + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查边界框是否包含特定点。(本地坐标系) + * @version DragonBones 5.0 + * @language zh_CN + */ + abstract containsPoint(pX: number, pY: number): boolean; + /** + * - Check whether the bounding box intersects a specific segment. (Local coordinate system) + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查边界框是否与特定线段相交。(本地坐标系) + * @version DragonBones 5.0 + * @language zh_CN + */ + abstract intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA: { + x: number; + y: number; + } | null, intersectionPointB: { + x: number; + y: number; + } | null, normalRadians: { + x: number; + y: number; + } | null): number; + } + /** + * - The rectangle bounding box data. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 矩形边界框数据。 + * @version DragonBones 5.1 + * @language zh_CN + */ + class RectangleBoundingBoxData extends BoundingBoxData { + static toString(): string; + /** + * - Compute the bit code for a point (x, y) using the clip rectangle + */ + private static _computeOutCode(x, y, xMin, yMin, xMax, yMax); + /** + * @private + */ + static rectangleIntersectsSegment(xA: number, yA: number, xB: number, yB: number, xMin: number, yMin: number, xMax: number, yMax: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + /** + * @inheritDoc + * @private + */ + protected _onClear(): void; + /** + * @inheritDoc + */ + containsPoint(pX: number, pY: number): boolean; + /** + * @inheritDoc + */ + intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + } + /** + * - The ellipse bounding box data. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 椭圆边界框数据。 + * @version DragonBones 5.1 + * @language zh_CN + */ + class EllipseBoundingBoxData extends BoundingBoxData { + static toString(): string; + /** + * @private + */ + static ellipseIntersectsSegment(xA: number, yA: number, xB: number, yB: number, xC: number, yC: number, widthH: number, heightH: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + /** + * @inheritDoc + * @private + */ + protected _onClear(): void; + /** + * @inheritDoc + */ + containsPoint(pX: number, pY: number): boolean; + /** + * @inheritDoc + */ + intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + } + /** + * - The polygon bounding box data. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 多边形边界框数据。 + * @version DragonBones 5.1 + * @language zh_CN + */ + class PolygonBoundingBoxData extends BoundingBoxData { + static toString(): string; + /** + * @private + */ + static polygonIntersectsSegment(xA: number, yA: number, xB: number, yB: number, vertices: Array, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + /** + * @private + */ + x: number; + /** + * @private + */ + y: number; + /** + * - The polygon vertices. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 多边形顶点。 + * @version DragonBones 5.1 + * @language zh_CN + */ + readonly vertices: Array; + /** + * @private + */ + weight: WeightData | null; + /** + * @inheritDoc + * @private + */ + protected _onClear(): void; + /** + * @inheritDoc + */ + containsPoint(pX: number, pY: number): boolean; + /** + * @inheritDoc + */ + intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The animation data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + class AnimationData extends BaseObject { + static toString(): string; + /** + * - FrameIntArray. + * @internal + * @private + */ + frameIntOffset: number; + /** + * - FrameFloatArray. + * @internal + * @private + */ + frameFloatOffset: number; + /** + * - FrameArray. + * @internal + * @private + */ + frameOffset: number; + /** + * - The frame count of the animation. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画的帧数。 + * @version DragonBones 3.0 + * @language zh_CN + */ + frameCount: number; + /** + * - The play times of the animation. [0: Loop play, [1~N]: Play N times] + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画的播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + * @version DragonBones 3.0 + * @language zh_CN + */ + playTimes: number; + /** + * - The duration of the animation. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画的持续时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + duration: number; + /** + * @private + */ + scale: number; + /** + * - The fade in time of the animation. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画的淡入时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + fadeInTime: number; + /** + * @private + */ + cacheFrameRate: number; + /** + * - The animation name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * @private + */ + readonly cachedFrames: Array; + /** + * @private + */ + readonly boneTimelines: Map>; + /** + * @private + */ + readonly surfaceTimelines: Map>; + /** + * @private + */ + readonly slotTimelines: Map>; + /** + * @private + */ + readonly constraintTimelines: Map>; + /** + * @private + */ + readonly animationTimelines: Map>; + /** + * @private + */ + readonly boneCachedFrameIndices: Map>; + /** + * @private + */ + readonly slotCachedFrameIndices: Map>; + /** + * @private + */ + actionTimeline: TimelineData | null; + /** + * @private + */ + zOrderTimeline: TimelineData | null; + /** + * @private + */ + parent: ArmatureData; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + cacheFrames(frameRate: number): void; + /** + * @private + */ + addBoneTimeline(bone: BoneData, timeline: TimelineData): void; + /** + * @private + */ + addSurfaceTimeline(surface: SurfaceData, timeline: TimelineData): void; + /** + * @private + */ + addSlotTimeline(slot: SlotData, timeline: TimelineData): void; + /** + * @private + */ + addConstraintTimeline(constraint: ConstraintData, timeline: TimelineData): void; + /** + * @private + */ + addAnimationTimeline(name: string, timeline: TimelineData): void; + /** + * @private + */ + getBoneTimelines(name: string): Array | null; + /** + * @private + */ + getSurfaceTimelines(name: string): Array | null; + /** + * @private + */ + getSlotTimelines(name: string): Array | null; + /** + * @private + */ + getConstraintTimelines(name: string): Array | null; + /** + * @private + */ + getAnimationTimelines(name: string): Array | null; + /** + * @private + */ + getBoneCachedFrameIndices(name: string): Array | null; + /** + * @private + */ + getSlotCachedFrameIndices(name: string): Array | null; + } + /** + * @internal + * @private + */ + class TimelineData extends BaseObject { + static toString(): string; + type: TimelineType; + offset: number; + frameIndicesOffset: number; + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The animation config is used to describe all the information needed to play an animation state. + * The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. + * @see dragonBones.AnimationState + * @beta + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画配置用来描述播放一个动画状态所需要的全部信息。 + * 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 + * @see dragonBones.AnimationState + * @beta + * @version DragonBones 5.0 + * @language zh_CN + */ + class AnimationConfig extends BaseObject { + static toString(): string; + /** + * @private + */ + pauseFadeOut: boolean; + /** + * - Fade out the pattern of other animation states when the animation state is fade in. + * This property is typically used to specify the substitution of multiple animation states blend. + * @default dragonBones.AnimationFadeOutMode.All + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 淡入动画状态时淡出其他动画状态的模式。 + * 该属性通常用来指定多个动画状态混合时的相互替换关系。 + * @default dragonBones.AnimationFadeOutMode.All + * @version DragonBones 5.0 + * @language zh_CN + */ + fadeOutMode: AnimationFadeOutMode; + /** + * @private + */ + fadeOutTweenType: TweenType; + /** + * @private + */ + fadeOutTime: number; + /** + * @private + */ + pauseFadeIn: boolean; + /** + * @private + */ + actionEnabled: boolean; + /** + * @private + */ + additiveBlending: boolean; + /** + * - Whether the animation state has control over the display property of the slots. + * Sometimes blend a animation state does not want it to control the display properties of the slots, + * especially if other animation state are controlling the display properties of the slots. + * @default true + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态是否对插槽的显示对象属性有控制权。 + * 有时混合一个动画状态并不希望其控制插槽的显示对象属性, + * 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 + * @default true + * @version DragonBones 5.0 + * @language zh_CN + */ + displayControl: boolean; + /** + * - Whether to reset the objects without animation to the armature pose when the animation state is start to play. + * This property should usually be set to false when blend multiple animation states. + * @default true + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 + * 通常在混合多个动画状态时应该将该属性设置为 false。 + * @default true + * @version DragonBones 5.1 + * @language zh_CN + */ + resetToPose: boolean; + /** + * @private + */ + fadeInTweenType: TweenType; + /** + * - The play times. [0: Loop play, [1~N]: Play N times] + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + * @version DragonBones 3.0 + * @language zh_CN + */ + playTimes: number; + /** + * - The blend layer. + * High layer animation state will get the blend weight first. + * When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. + * @readonly + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合图层。 + * 图层高的动画状态会优先获取混合权重。 + * 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 + * @readonly + * @version DragonBones 5.0 + * @language zh_CN + */ + layer: number; + /** + * - The start time of play. (In seconds) + * @default 0.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 播放的开始时间。 (以秒为单位) + * @default 0.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + position: number; + /** + * - The duration of play. + * [-1: Use the default value of the animation data, 0: Stop play, (0~N]: The duration] (In seconds) + * @default -1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 播放的持续时间。 + * [-1: 使用动画数据默认值, 0: 动画停止, (0~N]: 持续时间] (以秒为单位) + * @default -1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + duration: number; + /** + * - The play speed. + * The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. + * [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放速度。 + * 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 + * [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + timeScale: number; + /** + * - The blend weight. + * @default 1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合权重。 + * @default 1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + weight: number; + /** + * - The fade in time. + * [-1: Use the default value of the animation data, [0~N]: The fade in time] (In seconds) + * @default -1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 淡入时间。 + * [-1: 使用动画数据默认值, [0~N]: 淡入时间] (以秒为单位) + * @default -1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + fadeInTime: number; + /** + * - The auto fade out time when the animation state play completed. + * [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) + * @default -1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态播放完成后的自动淡出时间。 + * [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) + * @default -1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + autoFadeOutTime: number; + /** + * - The name of the animation state. (Can be different from the name of the animation data) + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态名称。 (可以不同于动画数据) + * @version DragonBones 5.0 + * @language zh_CN + */ + name: string; + /** + * - The animation data name. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画数据名称。 + * @version DragonBones 5.0 + * @language zh_CN + */ + animation: string; + /** + * - The blend group name of the animation state. + * This property is typically used to specify the substitution of multiple animation states blend. + * @readonly + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合组名称。 + * 该属性通常用来指定多个动画状态混合时的相互替换关系。 + * @readonly + * @version DragonBones 5.0 + * @language zh_CN + */ + group: string; + /** + * @private + */ + readonly boneMask: Array; + /** + * @private + */ + protected _onClear(): void; + /** + * @private + */ + clear(): void; + /** + * @private + */ + copyFrom(value: AnimationConfig): void; + /** + * @private + */ + containsBoneMask(name: string): boolean; + /** + * @private + */ + addBoneMask(armature: Armature, name: string, recursive?: boolean): void; + /** + * @private + */ + removeBoneMask(armature: Armature, name: string, recursive?: boolean): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The texture atlas data. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 贴图集数据。 + * @version DragonBones 3.0 + * @language zh_CN + */ + abstract class TextureAtlasData extends BaseObject { + /** + * @private + */ + autoSearch: boolean; + /** + * @private + */ + width: number; + /** + * @private + */ + height: number; + /** + * @private + */ + scale: number; + /** + * - The texture atlas name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 贴图集名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + name: string; + /** + * - The image path of the texture atlas. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 贴图集图片路径。 + * @version DragonBones 3.0 + * @language zh_CN + */ + imagePath: string; + /** + * @private + */ + readonly textures: Map; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @private + */ + copyFrom(value: TextureAtlasData): void; + /** + * @internal + * @private + */ + abstract createTexture(): TextureData; + /** + * @internal + * @private + */ + addTexture(value: TextureData): void; + /** + * @private + */ + getTexture(name: string): TextureData | null; + } + /** + * @internal + * @private + */ + abstract class TextureData extends BaseObject { + static createRectangle(): Rectangle; + rotated: boolean; + name: string; + readonly region: Rectangle; + parent: TextureAtlasData; + frame: Rectangle | null; + protected _onClear(): void; + copyFrom(value: TextureData): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The armature proxy interface, the docking engine needs to implement it concretely. + * @see dragonBones.Armature + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 骨架代理接口,对接的引擎需要对其进行具体实现。 + * @see dragonBones.Armature + * @version DragonBones 5.0 + * @language zh_CN + */ + interface IArmatureProxy extends IEventDispatcher { + /** + * @internal + * @private + */ + dbInit(armature: Armature): void; + /** + * @internal + * @private + */ + dbClear(): void; + /** + * @internal + * @private + */ + dbUpdate(): void; + /** + * - Dispose the instance and the Armature instance. (The Armature instance will return to the object pool) + * @example + *
+         *     removeChild(armatureDisplay);
+         *     armatureDisplay.dispose();
+         * 
+ * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 释放该实例和骨架。 (骨架会回收到对象池) + * @example + *
+         *     removeChild(armatureDisplay);
+         *     armatureDisplay.dispose();
+         * 
+ * @version DragonBones 4.5 + * @language zh_CN + */ + dispose(disposeProxy: boolean): void; + /** + * - The armature. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 骨架。 + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly armature: Armature; + /** + * - The animation player. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画播放器。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly animation: Animation; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - Armature is the core of the skeleton animation system. + * @see dragonBones.ArmatureData + * @see dragonBones.Bone + * @see dragonBones.Slot + * @see dragonBones.Animation + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨架是骨骼动画系统的核心。 + * @see dragonBones.ArmatureData + * @see dragonBones.Bone + * @see dragonBones.Slot + * @see dragonBones.Animation + * @version DragonBones 3.0 + * @language zh_CN + */ + class Armature extends BaseObject implements IAnimatable { + static toString(): string; + private static _onSortSlots(a, b); + /** + * - Whether to inherit the animation control of the parent armature. + * True to try to have the child armature play an animation with the same name when the parent armature play the animation. + * @default true + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 是否继承父骨架的动画控制。 + * 如果该值为 true,当父骨架播放动画时,会尝试让子骨架播放同名动画。 + * @default true + * @version DragonBones 4.5 + * @language zh_CN + */ + inheritAnimation: boolean; + /** + * @private + */ + userData: any; + private _lockUpdate; + private _bonesDirty; + private _slotsDirty; + private _zOrderDirty; + private _flipX; + private _flipY; + /** + * @internal + * @private + */ + _cacheFrameIndex: number; + private readonly _bones; + private readonly _slots; + /** + * @internal + * @private + */ + readonly _glueSlots: Array; + /** + * @internal + * @private + */ + readonly _constraints: Array; + private readonly _actions; + /** + * @internal + * @private + */ + _armatureData: ArmatureData; + private _animation; + private _proxy; + private _display; + /** + * @internal + * @private + */ + _replaceTextureAtlasData: TextureAtlasData | null; + private _replacedTexture; + /** + * @internal + * @private + */ + _dragonBones: DragonBones; + private _clock; + /** + * @internal + * @private + */ + _parent: Slot | null; + /** + * @private + */ + protected _onClear(): void; + private _sortBones(); + private _sortSlots(); + /** + * @internal + * @private + */ + _sortZOrder(slotIndices: Array | Int16Array | null, offset: number): void; + /** + * @internal + * @private + */ + _addBoneToBoneList(value: Bone): void; + /** + * @internal + * @private + */ + _removeBoneFromBoneList(value: Bone): void; + /** + * @internal + * @private + */ + _addSlotToSlotList(value: Slot): void; + /** + * @internal + * @private + */ + _removeSlotFromSlotList(value: Slot): void; + /** + * @internal + * @private + */ + _bufferAction(action: ActionData, append: boolean): void; + /** + * - Dispose the armature. (Return to the object pool) + * @example + *
+         *     removeChild(armature.display);
+         *     armature.dispose();
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 释放骨架。 (回收到对象池) + * @example + *
+         *     removeChild(armature.display);
+         *     armature.dispose();
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + dispose(): void; + /** + * @internal + * @private + */ + init(armatureData: ArmatureData, proxy: IArmatureProxy, display: any, dragonBones: DragonBones): void; + /** + * @inheritDoc + */ + advanceTime(passedTime: number): void; + /** + * - Forces a specific bone or its owning slot to update the transform or display property in the next frame. + * @param boneName - The bone name. (If not set, all bones will be update) + * @param updateSlot - Whether to update the bone's slots. (Default: false) + * @see dragonBones.Bone#invalidUpdate() + * @see dragonBones.Slot#invalidUpdate() + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 强制特定骨骼或其拥有的插槽在下一帧更新变换或显示属性。 + * @param boneName - 骨骼名称。 (如果未设置,将更新所有骨骼) + * @param updateSlot - 是否更新骨骼的插槽。 (默认: false) + * @see dragonBones.Bone#invalidUpdate() + * @see dragonBones.Slot#invalidUpdate() + * @version DragonBones 3.0 + * @language zh_CN + */ + invalidUpdate(boneName?: string | null, updateSlot?: boolean): void; + /** + * - Check whether a specific point is inside a custom bounding box in a slot. + * The coordinate system of the point is the inner coordinate system of the armature. + * Custom bounding boxes need to be customized in Dragonbones Pro. + * @param x - The horizontal coordinate of the point. + * @param y - The vertical coordinate of the point. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查特定点是否在某个插槽的自定义边界框内。 + * 点的坐标系为骨架内坐标系。 + * 自定义边界框需要在 DragonBones Pro 中自定义。 + * @param x - 点的水平坐标。 + * @param y - 点的垂直坐标。 + * @version DragonBones 5.0 + * @language zh_CN + */ + containsPoint(x: number, y: number): Slot | null; + /** + * - Check whether a specific segment intersects a custom bounding box for a slot in the armature. + * The coordinate system of the segment and intersection is the inner coordinate system of the armature. + * Custom bounding boxes need to be customized in Dragonbones Pro. + * @param xA - The horizontal coordinate of the beginning of the segment. + * @param yA - The vertical coordinate of the beginning of the segment. + * @param xB - The horizontal coordinate of the end point of the segment. + * @param yB - The vertical coordinate of the end point of the segment. + * @param intersectionPointA - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) + * @param intersectionPointB - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) + * @param normalRadians - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) + * @returns The slot of the first custom bounding box where the segment intersects from the start point to the end point. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查特定线段是否与骨架的某个插槽的自定义边界框相交。 + * 线段和交点的坐标系均为骨架内坐标系。 + * 自定义边界框需要在 DragonBones Pro 中自定义。 + * @param xA - 线段起点的水平坐标。 + * @param yA - 线段起点的垂直坐标。 + * @param xB - 线段终点的水平坐标。 + * @param yB - 线段终点的垂直坐标。 + * @param intersectionPointA - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + * @param intersectionPointB - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + * @param normalRadians - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) + * @returns 线段从起点到终点相交的第一个自定义边界框的插槽。 + * @version DragonBones 5.0 + * @language zh_CN + */ + intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): Slot | null; + /** + * - Get a specific bone. + * @param name - The bone name. + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的骨骼。 + * @param name - 骨骼名称。 + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language zh_CN + */ + getBone(name: string): Bone | null; + /** + * - Get a specific bone by the display. + * @param display - The display object. + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 通过显示对象获取特定的骨骼。 + * @param display - 显示对象。 + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language zh_CN + */ + getBoneByDisplay(display: any): Bone | null; + /** + * - Get a specific slot. + * @param name - The slot name. + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的插槽。 + * @param name - 插槽名称。 + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language zh_CN + */ + getSlot(name: string): Slot | null; + /** + * - Get a specific slot by the display. + * @param display - The display object. + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 通过显示对象获取特定的插槽。 + * @param display - 显示对象。 + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language zh_CN + */ + getSlotByDisplay(display: any): Slot | null; + /** + * @deprecated + */ + addBone(value: Bone, parentName: string): void; + /** + * @deprecated + */ + addSlot(value: Slot, parentName: string): void; + /** + * @private + */ + addConstraint(value: Constraint): void; + /** + * @deprecated + */ + removeBone(value: Bone): void; + /** + * @deprecated + */ + removeSlot(value: Slot): void; + /** + * - Get all bones. + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取所有的骨骼。 + * @see dragonBones.Bone + * @version DragonBones 3.0 + * @language zh_CN + */ + getBones(): Array; + /** + * - Get all slots. + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取所有的插槽。 + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language zh_CN + */ + getSlots(): Array; + /** + * - Whether to flip the armature horizontally. + * @version DragonBones 5.5 + * @language en_US + */ + /** + * - 是否将骨架水平翻转。 + * @version DragonBones 5.5 + * @language zh_CN + */ + flipX: boolean; + /** + * - Whether to flip the armature vertically. + * @version DragonBones 5.5 + * @language en_US + */ + /** + * - 是否将骨架垂直翻转。 + * @version DragonBones 5.5 + * @language zh_CN + */ + flipY: boolean; + /** + * - The animation cache frame rate, which turns on the animation cache when the set value is greater than 0. + * There is a certain amount of memory overhead to improve performance by caching animation data in memory. + * The frame rate should not be set too high, usually with the frame rate of the animation is similar and lower than the program running frame rate. + * When the animation cache is turned on, some features will fail, such as the offset property of bone. + * @example + *
+         *     armature.cacheFrameRate = 24;
+         * 
+ * @see dragonBones.DragonBonesData#frameRate + * @see dragonBones.ArmatureData#frameRate + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画缓存帧率,当设置的值大于 0 的时,将会开启动画缓存。 + * 通过将动画数据缓存在内存中来提高运行性能,会有一定的内存开销。 + * 帧率不宜设置的过高,通常跟动画的帧率相当且低于程序运行的帧率。 + * 开启动画缓存后,某些功能将会失效,比如骨骼的 offset 属性等。 + * @example + *
+         *     armature.cacheFrameRate = 24;
+         * 
+ * @see dragonBones.DragonBonesData#frameRate + * @see dragonBones.ArmatureData#frameRate + * @version DragonBones 4.5 + * @language zh_CN + */ + cacheFrameRate: number; + /** + * - The armature name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨架名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly name: string; + /** + * - The armature data. + * @see dragonBones.ArmatureData + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 骨架数据。 + * @see dragonBones.ArmatureData + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly armatureData: ArmatureData; + /** + * - The animation player. + * @see dragonBones.Animation + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画播放器。 + * @see dragonBones.Animation + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly animation: Animation; + /** + * @pivate + */ + readonly proxy: IArmatureProxy; + /** + * - The EventDispatcher instance of the armature. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 该骨架的 EventDispatcher 实例。 + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly eventDispatcher: IEventDispatcher; + /** + * - The display container. + * The display of the slot is displayed as the parent. + * Depending on the rendering engine, the type will be different, usually the DisplayObjectContainer type. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 显示容器实例。 + * 插槽的显示对象都会以此显示容器为父级。 + * 根据渲染引擎的不同,类型会不同,通常是 DisplayObjectContainer 类型。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly display: any; + /** + * @private + */ + replacedTexture: any; + /** + * @inheritDoc + */ + clock: WorldClock | null; + /** + * - Get the parent slot which the armature belongs to. + * @see dragonBones.Slot + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 该骨架所属的父插槽。 + * @see dragonBones.Slot + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly parent: Slot | null; + /** + * @deprecated + * @private + */ + replaceTexture(texture: any): void; + /** + * - Deprecated, please refer to {@link #eventDispatcher}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #eventDispatcher}。 + * @deprecated + * @language zh_CN + */ + hasEventListener(type: EventStringType): boolean; + /** + * - Deprecated, please refer to {@link #eventDispatcher}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #eventDispatcher}。 + * @deprecated + * @language zh_CN + */ + addEventListener(type: EventStringType, listener: Function, target: any): void; + /** + * - Deprecated, please refer to {@link #eventDispatcher}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #eventDispatcher}。 + * @deprecated + * @language zh_CN + */ + removeEventListener(type: EventStringType, listener: Function, target: any): void; + /** + * - Deprecated, please refer to {@link #cacheFrameRate}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #cacheFrameRate}。 + * @deprecated + * @language zh_CN + */ + enableAnimationCache(frameRate: number): void; + /** + * - Deprecated, please refer to {@link #display}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #display}。 + * @deprecated + * @language zh_CN + */ + getDisplay(): any; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The base class of the transform object. + * @see dragonBones.Transform + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 变换对象的基类。 + * @see dragonBones.Transform + * @version DragonBones 4.5 + * @language zh_CN + */ + abstract class TransformObject extends BaseObject { + /** + * @private + */ + protected static readonly _helpMatrix: Matrix; + /** + * @private + */ + protected static readonly _helpTransform: Transform; + /** + * @private + */ + protected static readonly _helpPoint: Point; + /** + * - A matrix relative to the armature coordinate system. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 相对于骨架坐标系的矩阵。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly globalTransformMatrix: Matrix; + /** + * - A transform relative to the armature coordinate system. + * @see #updateGlobalTransform() + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 相对于骨架坐标系的变换。 + * @see #updateGlobalTransform() + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly global: Transform; + /** + * - The offset transform relative to the armature or the parent bone coordinate system. + * @see #dragonBones.Bone#invalidUpdate() + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 相对于骨架或父骨骼坐标系的偏移变换。 + * @see #dragonBones.Bone#invalidUpdate() + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly offset: Transform; + /** + * @private + */ + origin: Transform | null; + /** + * @private + */ + userData: any; + /** + * @private + */ + protected _globalDirty: boolean; + /** + * @internal + * @private + */ + _armature: Armature; + /** + * @internal + * @private + */ + _parent: Bone; + /** + * @private + */ + protected _onClear(): void; + /** + * @internal + * @private + */ + _setArmature(value: Armature | null): void; + /** + * @internal + * @private + */ + _setParent(value: Bone | null): void; + /** + * - For performance considerations, rotation or scale in the {@link #global} attribute of the bone or slot is not always properly accessible, + * some engines do not rely on these attributes to update rendering, such as Egret. + * The use of this method ensures that the access to the {@link #global} property is correctly rotation or scale. + * @example + *
+         *     bone.updateGlobalTransform();
+         *     let rotation = bone.global.rotation;
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 出于性能的考虑,骨骼或插槽的 {@link #global} 属性中的旋转或缩放并不总是正确可访问的,有些引擎并不依赖这些属性更新渲染,比如 Egret。 + * 使用此方法可以保证访问到 {@link #global} 属性中正确的旋转或缩放。 + * @example + *
+         *     bone.updateGlobalTransform();
+         *     let rotation = bone.global.rotation;
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + updateGlobalTransform(): void; + /** + * - The armature to which it belongs. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 所属的骨架。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly armature: Armature; + /** + * - The parent bone to which it belongs. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 所属的父骨骼。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly parent: Bone; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - Bone is one of the most important logical units in the armature animation system, + * and is responsible for the realization of translate, rotation, scaling in the animations. + * A armature can contain multiple bones. + * @see dragonBones.BoneData + * @see dragonBones.Armature + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨骼在骨骼动画体系中是最重要的逻辑单元之一,负责动画中的平移、旋转、缩放的实现。 + * 一个骨架中可以包含多个骨骼。 + * @see dragonBones.BoneData + * @see dragonBones.Armature + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language zh_CN + */ + class Bone extends TransformObject { + static toString(): string; + /** + * - The offset mode. + * @see #offset + * @version DragonBones 5.5 + * @language en_US + */ + /** + * - 偏移模式。 + * @see #offset + * @version DragonBones 5.5 + * @language zh_CN + */ + offsetMode: OffsetMode; + /** + * @internal + * @private + */ + readonly animationPose: Transform; + /** + * @internal + * @private + */ + _transformDirty: boolean; + /** + * @internal + * @private + */ + _childrenTransformDirty: boolean; + protected _localDirty: boolean; + /** + * @internal + * @private + */ + _hasConstraint: boolean; + private _visible; + protected _cachedFrameIndex: number; + /** + * @internal + * @private + */ + readonly _blendState: BlendState; + /** + * @internal + * @private + */ + _boneData: BoneData; + /** + * @internal + * @private + */ + _cachedFrameIndices: Array | null; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @private + */ + protected _updateGlobalTransformMatrix(isCache: boolean): void; + /** + * @inheritDoc + */ + _setArmature(value: Armature | null): void; + /** + * @internal + * @private + */ + init(boneData: BoneData): void; + /** + * @internal + * @private + */ + update(cacheFrameIndex: number): void; + /** + * @internal + * @private + */ + updateByConstraint(): void; + /** + * - Forces the bone to update the transform in the next frame. + * When the bone is not animated or its animation state is finished, the bone will not continue to update, + * and when the skeleton must be updated for some reason, the method needs to be called explicitly. + * @example + *
+         *     let bone = armature.getBone("arm");
+         *     bone.offset.scaleX = 2.0;
+         *     bone.invalidUpdate();
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 强制骨骼在下一帧更新变换。 + * 当该骨骼没有动画状态或其动画状态播放完成时,骨骼将不在继续更新,而此时由于某些原因必须更新骨骼时,则需要显式调用该方法。 + * @example + *
+         *     let bone = armature.getBone("arm");
+         *     bone.offset.scaleX = 2.0;
+         *     bone.invalidUpdate();
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + invalidUpdate(): void; + /** + * - Check whether the bone contains a specific bone or slot. + * @see dragonBones.Bone + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查该骨骼是否包含特定的骨骼或插槽。 + * @see dragonBones.Bone + * @see dragonBones.Slot + * @version DragonBones 3.0 + * @language zh_CN + */ + contains(value: TransformObject): boolean; + /** + * - The bone data. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 骨骼数据。 + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly boneData: BoneData; + /** + * - The visible of all slots in the bone. + * @default true + * @see dragonBones.Slot#visible + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 此骨骼所有插槽的可见。 + * @default true + * @see dragonBones.Slot#visible + * @version DragonBones 3.0 + * @language zh_CN + */ + visible: boolean; + /** + * - The bone name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 骨骼名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly name: string; + /** + * - Deprecated, please refer to {@link dragonBones.Armature#getBones()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.Armature#getBones()}。 + * @deprecated + * @language zh_CN + */ + getBones(): Array; + /** + * - Deprecated, please refer to {@link dragonBones.Armature#getSlots()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.Armature#getSlots()}。 + * @deprecated + * @language zh_CN + */ + getSlots(): Array; + /** + * - Deprecated, please refer to {@link dragonBones.Armature#getSlot()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.Armature#getSlot()}。 + * @deprecated + * @language zh_CN + */ + readonly slot: Slot | null; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class Surface extends Bone { + static toString(): string; + private _dX; + private _dY; + private _k; + private _kX; + private _kY; + /** + * For debug draw. + * @internal + * @private + */ + readonly _vertices: Array; + /** + * For timeline state. + * @internal + * @private + */ + readonly _deformVertices: Array; + /** + * x1, y1, x2, y2, x3, y3, x4, y4, d1X, d1Y, d2X, d2Y + */ + private readonly _hullCache; + /** + * Inside [flag, a, b, c, d, tx, ty], Outside [flag, a, b, c, d, tx, ty] + */ + private readonly _matrixCahce; + /** + * @inheritDoc + */ + protected _onClear(): void; + private _getAffineTransform(x, y, lX, lY, aX, aY, bX, bY, cX, cY, transform, matrix, isDown); + private _updateVertices(); + /** + * @private + */ + protected _updateGlobalTransformMatrix(isCache: boolean): void; + _getGlobalTransformMatrix(x: number, y: number): Matrix; + init(surfaceData: SurfaceData): void; + /** + * @internal + * @private + */ + update(cacheFrameIndex: number): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The slot attached to the armature, controls the display status and properties of the display object. + * A bone can contain multiple slots. + * A slot can contain multiple display objects, displaying only one of the display objects at a time, + * but you can toggle the display object into frame animation while the animation is playing. + * The display object can be a normal texture, or it can be a display of a child armature, a grid display object, + * and a custom other display object. + * @see dragonBones.Armature + * @see dragonBones.Bone + * @see dragonBones.SlotData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽附着在骨骼上,控制显示对象的显示状态和属性。 + * 一个骨骼上可以包含多个插槽。 + * 一个插槽中可以包含多个显示对象,同一时间只能显示其中的一个显示对象,但可以在动画播放的过程中切换显示对象实现帧动画。 + * 显示对象可以是普通的图片纹理,也可以是子骨架的显示容器,网格显示对象,还可以是自定义的其他显示对象。 + * @see dragonBones.Armature + * @see dragonBones.Bone + * @see dragonBones.SlotData + * @version DragonBones 3.0 + * @language zh_CN + */ + abstract class Slot extends TransformObject { + /** + * - Displays the animated state or mixed group name controlled by the object, set to null to be controlled by all animation states. + * @default null + * @see dragonBones.AnimationState#displayControl + * @see dragonBones.AnimationState#name + * @see dragonBones.AnimationState#group + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 显示对象受到控制的动画状态或混合组名称,设置为 null 则表示受所有的动画状态控制。 + * @default null + * @see dragonBones.AnimationState#displayControl + * @see dragonBones.AnimationState#name + * @see dragonBones.AnimationState#group + * @version DragonBones 4.5 + * @language zh_CN + */ + displayController: string | null; + /** + * @private + */ + protected _displayDirty: boolean; + /** + * @private + */ + protected _zOrderDirty: boolean; + /** + * @private + */ + protected _visibleDirty: boolean; + /** + * @private + */ + protected _blendModeDirty: boolean; + /** + * @internal + * @private + */ + _colorDirty: boolean; + /** + * @internal + * @private + */ + _meshDirty: boolean; + /** + * @private + */ + protected _transformDirty: boolean; + /** + * @private + */ + protected _visible: boolean; + /** + * @private + */ + protected _blendMode: BlendMode; + /** + * @private + */ + protected _displayIndex: number; + /** + * @private + */ + protected _animationDisplayIndex: number; + /** + * @internal + * @private + */ + _zOrder: number; + /** + * @private + */ + protected _cachedFrameIndex: number; + /** + * @internal + * @private + */ + _pivotX: number; + /** + * @internal + * @private + */ + _pivotY: number; + /** + * @private + */ + protected readonly _localMatrix: Matrix; + /** + * @internal + * @private + */ + readonly _colorTransform: ColorTransform; + /** + * @internal + * @private + */ + readonly _deformVertices: Array; + /** + * @private + */ + readonly _displayDatas: Array; + /** + * @private + */ + protected readonly _displayList: Array; + /** + * @private + */ + protected readonly _meshBones: Array; + /** + * @private + */ + protected readonly _meshSlots: Array; + /** + * @internal + * @private + */ + _slotData: SlotData; + /** + * @private + */ + protected _rawDisplayDatas: Array | null; + /** + * @private + */ + protected _displayData: DisplayData | null; + /** + * @private + */ + protected _textureData: TextureData | null; + /** + * @internal + * @private + */ + _meshData: MeshDisplayData | null; + /** + * @private + */ + protected _boundingBoxData: BoundingBoxData | null; + /** + * @private + */ + protected _rawDisplay: any; + /** + * @private + */ + protected _meshDisplay: any; + /** + * @private + */ + protected _display: any; + /** + * @private + */ + protected _childArmature: Armature | null; + /** + * @internal + * @private + */ + _cachedFrameIndices: Array | null; + /** + * @inheritDoc + */ + protected _onClear(): void; + /** + * @private + */ + protected abstract _initDisplay(value: any, isRetain: boolean): void; + /** + * @private + */ + protected abstract _disposeDisplay(value: any, isRelease: boolean): void; + /** + * @private + */ + protected abstract _onUpdateDisplay(): void; + /** + * @private + */ + protected abstract _addDisplay(): void; + /** + * @private + */ + protected abstract _replaceDisplay(value: any): void; + /** + * @private + */ + protected abstract _removeDisplay(): void; + /** + * @private + */ + protected abstract _updateZOrder(): void; + /** + * @private + */ + abstract _updateVisible(): void; + /** + * @private + */ + protected abstract _updateBlendMode(): void; + /** + * @private + */ + protected abstract _updateColor(): void; + /** + * @private + */ + protected abstract _updateFrame(): void; + /** + * @private + */ + protected abstract _updateMesh(): void; + /** + * @internal + * @private + */ + abstract _updateGlueMesh(): void; + /** + * @private + */ + protected abstract _updateTransform(): void; + /** + * @private + */ + protected abstract _identityTransform(): void; + /** + * @private + */ + protected _getDefaultRawDisplayData(): DisplayData | null; + /** + * @private + */ + protected _updateDisplayData(): void; + /** + * @private + */ + protected _updateDisplay(): void; + /** + * @private + */ + protected _updateGlobalTransformMatrix(isCache: boolean): void; + /** + * @private + */ + protected _isMeshBonesUpdate(): boolean; + /** + * @inheritDoc + */ + _setArmature(value: Armature | null): void; + /** + * @internal + * @private + */ + _setDisplayIndex(value: number, isAnimation?: boolean): boolean; + /** + * @internal + * @private + */ + _setZorder(value: number): boolean; + /** + * @internal + * @private + */ + _setColor(value: ColorTransform): boolean; + /** + * @internal + * @private + */ + _setDisplayList(value: Array | null): boolean; + /** + * @internal + * @private + */ + init(slotData: SlotData, displayDatas: Array | null, rawDisplay: any, meshDisplay: any): void; + /** + * @internal + * @private + */ + update(cacheFrameIndex: number): void; + /** + * @private + */ + updateTransformAndMatrix(): void; + /** + * @private + */ + replaceDisplayData(value: DisplayData | null, displayIndex?: number): void; + /** + * - Check whether a specific point is inside a custom bounding box in the slot. + * The coordinate system of the point is the inner coordinate system of the armature. + * Custom bounding boxes need to be customized in Dragonbones Pro. + * @param x - The horizontal coordinate of the point. + * @param y - The vertical coordinate of the point. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查特定点是否在插槽的自定义边界框内。 + * 点的坐标系为骨架内坐标系。 + * 自定义边界框需要在 DragonBones Pro 中自定义。 + * @param x - 点的水平坐标。 + * @param y - 点的垂直坐标。 + * @version DragonBones 5.0 + * @language zh_CN + */ + containsPoint(x: number, y: number): boolean; + /** + * - Check whether a specific segment intersects a custom bounding box for the slot. + * The coordinate system of the segment and intersection is the inner coordinate system of the armature. + * Custom bounding boxes need to be customized in Dragonbones Pro. + * @param xA - The horizontal coordinate of the beginning of the segment. + * @param yA - The vertical coordinate of the beginning of the segment. + * @param xB - The horizontal coordinate of the end point of the segment. + * @param yB - The vertical coordinate of the end point of the segment. + * @param intersectionPointA - The first intersection at which a line segment intersects the bounding box from the beginning to the end. (If not set, the intersection point will not calculated) + * @param intersectionPointB - The first intersection at which a line segment intersects the bounding box from the end to the beginning. (If not set, the intersection point will not calculated) + * @param normalRadians - The normal radians of the tangent of the intersection boundary box. [x: Normal radian of the first intersection tangent, y: Normal radian of the second intersection tangent] (If not set, the normal will not calculated) + * @returns Intersection situation. [1: Disjoint and segments within the bounding box, 0: Disjoint, 1: Intersecting and having a nodal point and ending in the bounding box, 2: Intersecting and having a nodal point and starting at the bounding box, 3: Intersecting and having two intersections, N: Intersecting and having N intersections] + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 检查特定线段是否与插槽的自定义边界框相交。 + * 线段和交点的坐标系均为骨架内坐标系。 + * 自定义边界框需要在 DragonBones Pro 中自定义。 + * @param xA - 线段起点的水平坐标。 + * @param yA - 线段起点的垂直坐标。 + * @param xB - 线段终点的水平坐标。 + * @param yB - 线段终点的垂直坐标。 + * @param intersectionPointA - 线段从起点到终点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + * @param intersectionPointB - 线段从终点到起点与边界框相交的第一个交点。 (如果未设置,则不计算交点) + * @param normalRadians - 交点边界框切线的法线弧度。 [x: 第一个交点切线的法线弧度, y: 第二个交点切线的法线弧度] (如果未设置,则不计算法线) + * @returns 相交的情况。 [-1: 不相交且线段在包围盒内, 0: 不相交, 1: 相交且有一个交点且终点在包围盒内, 2: 相交且有一个交点且起点在包围盒内, 3: 相交且有两个交点, N: 相交且有 N 个交点] + * @version DragonBones 5.0 + * @language zh_CN + */ + intersectsSegment(xA: number, yA: number, xB: number, yB: number, intersectionPointA?: { + x: number; + y: number; + } | null, intersectionPointB?: { + x: number; + y: number; + } | null, normalRadians?: { + x: number; + y: number; + } | null): number; + /** + * - Forces the slot to update the state of the display object in the next frame. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 强制插槽在下一帧更新显示对象的状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + invalidUpdate(): void; + /** + * - The visible of slot's display object. + * @default true + * @version DragonBones 5.6 + * @language en_US + */ + /** + * - 插槽的显示对象的可见。 + * @default true + * @version DragonBones 5.6 + * @language zh_CN + */ + visible: boolean; + /** + * - The index of the display object displayed in the display list. + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     slot.displayIndex = 3;
+         *     slot.displayController = "none";
+         * 
+ * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 此时显示的显示对象在显示列表中的索引。 + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     slot.displayIndex = 3;
+         *     slot.displayController = "none";
+         * 
+ * @version DragonBones 4.5 + * @language zh_CN + */ + displayIndex: number; + /** + * - The slot name. + * @see dragonBones.SlotData#name + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽名称。 + * @see dragonBones.SlotData#name + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly name: string; + /** + * - Contains a display list of display objects or child armatures. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 包含显示对象或子骨架的显示列表。 + * @version DragonBones 3.0 + * @language zh_CN + */ + displayList: Array; + /** + * - The slot data. + * @see dragonBones.SlotData + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 插槽数据。 + * @see dragonBones.SlotData + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly slotData: SlotData; + /** + * @private + */ + rawDisplayDatas: Array | null; + /** + * - The custom bounding box data for the slot at current time. + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 插槽此时的自定义包围盒数据。 + * @version DragonBones 5.0 + * @language zh_CN + */ + readonly boundingBoxData: BoundingBoxData | null; + /** + * @private + */ + readonly rawDisplay: any; + /** + * @private + */ + readonly meshDisplay: any; + /** + * - The display object that the slot displays at this time. + * @example + *
+         *     let slot = armature.getSlot("text");
+         *     slot.display = new yourEngine.TextField();
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽此时显示的显示对象。 + * @example + *
+         *     let slot = armature.getSlot("text");
+         *     slot.display = new yourEngine.TextField();
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + display: any; + /** + * - The child armature that the slot displayed at current time. + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 插槽此时显示的子骨架。 + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     slot.childArmature = factory.buildArmature("weapon_blabla", "weapon_blabla_project");
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + childArmature: Armature | null; + /** + * - Deprecated, please refer to {@link #display}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #display}。 + * @deprecated + * @language zh_CN + */ + getDisplay(): any; + /** + * - Deprecated, please refer to {@link #display}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #display}。 + * @deprecated + * @language zh_CN + */ + setDisplay(value: any): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + abstract class Constraint extends BaseObject { + protected static readonly _helpMatrix: Matrix; + protected static readonly _helpTransform: Transform; + protected static readonly _helpPoint: Point; + /** + * - For timeline state. + * @internal + */ + _constraintData: ConstraintData; + protected _armature: Armature; + /** + * - For sort bones. + * @internal + */ + _target: Bone; + /** + * - For sort bones. + * @internal + */ + _root: Bone; + protected _bone: Bone | null; + protected _onClear(): void; + abstract init(constraintData: ConstraintData, armature: Armature): void; + abstract update(): void; + abstract invalidUpdate(): void; + readonly name: string; + } + /** + * @internal + * @private + */ + class IKConstraint extends Constraint { + static toString(): string; + private _scaleEnabled; + /** + * - For timeline state. + * @internal + */ + _bendPositive: boolean; + /** + * - For timeline state. + * @internal + */ + _weight: number; + protected _onClear(): void; + private _computeA(); + private _computeB(); + init(constraintData: ConstraintData, armature: Armature): void; + update(): void; + invalidUpdate(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - Play animation interface. (Both Armature and Wordclock implement the interface) + * Any instance that implements the interface can be added to the Worldclock instance and advance time by Worldclock instance uniformly. + * @see dragonBones.WorldClock + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放动画接口。 (Armature 和 WordClock 都实现了该接口) + * 任何实现了此接口的实例都可以添加到 WorldClock 实例中,由 WorldClock 实例统一更新时间。 + * @see dragonBones.WorldClock + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language zh_CN + */ + interface IAnimatable { + /** + * - Advance time. + * @param passedTime - Passed time. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 更新时间。 + * @param passedTime - 前进的时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + advanceTime(passedTime: number): void; + /** + * - The Wordclock instance to which the current belongs. + * @example + *
+         *     armature.clock = factory.clock; // Add armature to clock.
+         *     armature.clock = null; // Remove armature from clock.
+         * 
+ * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 当前所属的 WordClock 实例。 + * @example + *
+         *     armature.clock = factory.clock; // 将骨架添加到时钟。
+         *     armature.clock = null; // 将骨架从时钟移除。
+         * 
+ * @version DragonBones 5.0 + * @language zh_CN + */ + clock: WorldClock | null; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - Worldclock provides clock support for animations, advance time for each IAnimatable object added to the instance. + * @see dragonBones.IAnimateble + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - WorldClock 对动画提供时钟支持,为每个加入到该实例的 IAnimatable 对象更新时间。 + * @see dragonBones.IAnimateble + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language zh_CN + */ + class WorldClock implements IAnimatable { + /** + * - Current time. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 当前的时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + time: number; + /** + * - The play speed, used to control animation speed-shift play. + * [0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放速度,用于控制动画变速播放。 + * [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + timeScale: number; + private readonly _animatebles; + private _clock; + /** + * - Creating a Worldclock instance. Typically, you do not need to create Worldclock instance. + * When multiple Worldclock instances are running at different speeds, can achieving some specific animation effects, such as bullet time. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 创建一个 WorldClock 实例。通常并不需要创建 WorldClock 实例。 + * 当多个 WorldClock 实例使用不同的速度运行时,可以实现一些特殊的动画效果,比如子弹时间等。 + * @version DragonBones 3.0 + * @language zh_CN + */ + constructor(time?: number); + /** + * - Advance time for all IAnimatable instances. + * @param passedTime - Passed time. [-1: Automatically calculates the time difference between the current frame and the previous frame, [0~N): Passed time] (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 为所有的 IAnimatable 实例更新时间。 + * @param passedTime - 前进的时间。 [-1: 自动计算当前帧与上一帧的时间差, [0~N): 前进的时间] (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + advanceTime(passedTime: number): void; + /** + * - Check whether contains a specific instance of IAnimatable. + * @param value - The IAnimatable instance. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查是否包含特定的 IAnimatable 实例。 + * @param value - IAnimatable 实例。 + * @version DragonBones 3.0 + * @language zh_CN + */ + contains(value: IAnimatable): boolean; + /** + * - Add IAnimatable instance. + * @param value - The IAnimatable instance. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 添加 IAnimatable 实例。 + * @param value - IAnimatable 实例。 + * @version DragonBones 3.0 + * @language zh_CN + */ + add(value: IAnimatable): void; + /** + * - Removes a specified IAnimatable instance. + * @param value - The IAnimatable instance. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 移除特定的 IAnimatable 实例。 + * @param value - IAnimatable 实例。 + * @version DragonBones 3.0 + * @language zh_CN + */ + remove(value: IAnimatable): void; + /** + * - Clear all IAnimatable instances. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 清除所有的 IAnimatable 实例。 + * @version DragonBones 3.0 + * @language zh_CN + */ + clear(): void; + /** + * @inheritDoc + */ + clock: WorldClock | null; + /** + * - Deprecated, please refer to {@link dragonBones.BaseFactory#clock}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.BaseFactory#clock}。 + * @deprecated + * @language zh_CN + */ + static readonly clock: WorldClock; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The animation player is used to play the animation data and manage the animation states. + * @see dragonBones.AnimationData + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画播放器用来播放动画数据和管理动画状态。 + * @see dragonBones.AnimationData + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + class Animation extends BaseObject { + static toString(): string; + /** + * - The play speed of all animations. [0: Stop, (0~1): Slow, 1: Normal, (1~N): Fast] + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 所有动画的播放速度。 [0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + timeScale: number; + private _lockUpdate; + private _animationDirty; + private _inheritTimeScale; + private readonly _animationNames; + private readonly _animationStates; + private readonly _animations; + private _armature; + private _animationConfig; + private _lastAnimationState; + /** + * @private + */ + protected _onClear(): void; + private _fadeOut(animationConfig); + /** + * @internal + * @private + */ + init(armature: Armature): void; + /** + * @internal + * @private + */ + advanceTime(passedTime: number): void; + /** + * - Clear all animations states. + * @see dragonBones.AnimationState + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 清除所有的动画状态。 + * @see dragonBones.AnimationState + * @version DragonBones 4.5 + * @language zh_CN + */ + reset(): void; + /** + * - Pause a specific animation state. + * @param animationName - The name of animation state. (If not set, it will pause all animations) + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 暂停指定动画状态的播放。 + * @param animationName - 动画状态名称。 (如果未设置,则暂停所有动画) + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + stop(animationName?: string | null): void; + /** + * - Play animation with a specific animation config. + * The API is still in the experimental phase and may encounter bugs or stability or compatibility issues when used. + * @param animationConfig - The animation config. + * @returns The playing animation state. + * @see dragonBones.AnimationConfig + * @beta + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 通过指定的动画配置来播放动画。 + * 该 API 仍在实验阶段,使用时可能遭遇 bug 或稳定性或兼容性问题。 + * @param animationConfig - 动画配置。 + * @returns 播放的动画状态。 + * @see dragonBones.AnimationConfig + * @beta + * @version DragonBones 5.0 + * @language zh_CN + */ + playConfig(animationConfig: AnimationConfig): AnimationState | null; + /** + * - Play a specific animation. + * @param animationName - The name of animation data. (If not set, The default animation will be played, or resume the animation playing from pause status, or replay the last playing animation) + * @param playTimes - Playing repeat times. [-1: Use default value of the animation data, 0: No end loop playing, [1~N]: Repeat N times] (default: -1) + * @returns The playing animation state. + * @example + *
+         *     armature.animation.play("walk");
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放指定动画。 + * @param animationName - 动画数据名称。 (如果未设置,则播放默认动画,或将暂停状态切换为播放状态,或重新播放之前播放的动画) + * @param playTimes - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + * @returns 播放的动画状态。 + * @example + *
+         *     armature.animation.play("walk");
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + play(animationName?: string | null, playTimes?: number): AnimationState | null; + /** + * - Fade in a specific animation. + * @param animationName - The name of animation data. + * @param fadeInTime - The fade in time. [-1: Use the default value of animation data, [0~N]: The fade in time (In seconds)] (Default: -1) + * @param playTimes - playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + * @param layer - The blending layer, the animation states in high level layer will get the blending weights with high priority, when the total blending weights are more than 1.0, there will be no more weights can be allocated to the other animation states. (Default: 0) + * @param group - The blending group name, it is typically used to specify the substitution of multiple animation states blending. (Default: null) + * @param fadeOutMode - The fade out mode, which is typically used to specify alternate mode of multiple animation states blending. (Default: AnimationFadeOutMode.SameLayerAndGroup) + * @returns The playing animation state. + * @example + *
+         *     armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
+         *     armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
+         * 
+ * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 淡入播放指定的动画。 + * @param animationName - 动画数据名称。 + * @param fadeInTime - 淡入时间。 [-1: 使用动画数据默认值, [0~N]: 淡入时间 (以秒为单位)] (默认: -1) + * @param playTimes - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + * @param layer - 混合图层,图层高的动画状态会优先获取混合权重,当混合权重分配总和超过 1.0 时,剩余的动画状态将不能再获得权重分配。 (默认: 0) + * @param group - 混合组名称,该属性通常用来指定多个动画状态混合时的相互替换关系。 (默认: null) + * @param fadeOutMode - 淡出模式,该属性通常用来指定多个动画状态混合时的相互替换模式。 (默认: AnimationFadeOutMode.SameLayerAndGroup) + * @returns 播放的动画状态。 + * @example + *
+         *     armature.animation.fadeIn("walk", 0.3, 0, 0, "normalGroup").resetToPose = false;
+         *     armature.animation.fadeIn("attack", 0.3, 1, 0, "attackGroup").resetToPose = false;
+         * 
+ * @version DragonBones 4.5 + * @language zh_CN + */ + fadeIn(animationName: string, fadeInTime?: number, playTimes?: number, layer?: number, group?: string | null, fadeOutMode?: AnimationFadeOutMode): AnimationState | null; + /** + * - Play a specific animation from the specific time. + * @param animationName - The name of animation data. + * @param time - The start time point of playing. (In seconds) + * @param playTimes - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 从指定时间开始播放指定的动画。 + * @param animationName - 动画数据名称。 + * @param time - 播放开始的时间。 (以秒为单位) + * @param playTimes - 循环播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndPlayByTime(animationName: string, time?: number, playTimes?: number): AnimationState | null; + /** + * - Play a specific animation from the specific frame. + * @param animationName - The name of animation data. + * @param frame - The start frame of playing. + * @param playTimes - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 从指定帧开始播放指定的动画。 + * @param animationName - 动画数据名称。 + * @param frame - 播放开始的帧数。 + * @param playTimes - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndPlayByFrame(animationName: string, frame?: number, playTimes?: number): AnimationState | null; + /** + * - Play a specific animation from the specific progress. + * @param animationName - The name of animation data. + * @param progress - The start progress value of playing. + * @param playTimes - Playing repeat times. [-1: Use the default value of animation data, 0: No end loop playing, [1~N]: Repeat N times] (Default: -1) + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 从指定进度开始播放指定的动画。 + * @param animationName - 动画数据名称。 + * @param progress - 开始播放的进度。 + * @param playTimes - 播放次数。 [-1: 使用动画数据默认值, 0: 无限循环播放, [1~N]: 循环播放 N 次] (默认: -1) + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndPlayByProgress(animationName: string, progress?: number, playTimes?: number): AnimationState | null; + /** + * - Stop a specific animation at the specific time. + * @param animationName - The name of animation data. + * @param time - The stop time. (In seconds) + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 在指定时间停止指定动画播放 + * @param animationName - 动画数据名称。 + * @param time - 停止的时间。 (以秒为单位) + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndStopByTime(animationName: string, time?: number): AnimationState | null; + /** + * - Stop a specific animation at the specific frame. + * @param animationName - The name of animation data. + * @param frame - The stop frame. + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 在指定帧停止指定动画的播放 + * @param animationName - 动画数据名称。 + * @param frame - 停止的帧数。 + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndStopByFrame(animationName: string, frame?: number): AnimationState | null; + /** + * - Stop a specific animation at the specific progress. + * @param animationName - The name of animation data. + * @param progress - The stop progress value. + * @returns The played animation state. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 在指定的进度停止指定的动画播放。 + * @param animationName - 动画数据名称。 + * @param progress - 停止进度。 + * @returns 播放的动画状态。 + * @version DragonBones 4.5 + * @language zh_CN + */ + gotoAndStopByProgress(animationName: string, progress?: number): AnimationState | null; + /** + * - Get a specific animation state. + * @param animationName - The name of animation state. + * @example + *
+         *     armature.animation.play("walk");
+         *     let walkState = armature.animation.getState("walk");
+         *     walkState.timeScale = 0.5;
+         * 
+ * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取指定的动画状态 + * @param animationName - 动画状态名称。 + * @example + *
+         *     armature.animation.play("walk");
+         *     let walkState = armature.animation.getState("walk");
+         *     walkState.timeScale = 0.5;
+         * 
+ * @version DragonBones 3.0 + * @language zh_CN + */ + getState(animationName: string): AnimationState | null; + /** + * - Check whether a specific animation data is included. + * @param animationName - The name of animation data. + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查是否包含指定的动画数据 + * @param animationName - 动画数据名称。 + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language zh_CN + */ + hasAnimation(animationName: string): boolean; + /** + * - Get all the animation states. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 获取所有的动画状态 + * @version DragonBones 5.1 + * @language zh_CN + */ + getStates(): Array; + /** + * - Check whether there is an animation state is playing + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查是否有动画状态正在播放 + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly isPlaying: boolean; + /** + * - Check whether all the animation states' playing were finished. + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查是否所有的动画状态均已播放完毕。 + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly isCompleted: boolean; + /** + * - The name of the last playing animation state. + * @see #lastAnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 上一个播放的动画状态名称 + * @see #lastAnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly lastAnimationName: string; + /** + * - The name of all animation data + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 所有动画数据的名称 + * @version DragonBones 4.5 + * @language zh_CN + */ + readonly animationNames: Array; + /** + * - All animation data. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 所有的动画数据。 + * @version DragonBones 4.5 + * @language zh_CN + */ + animations: Map; + /** + * - An AnimationConfig instance that can be used quickly. + * @see dragonBones.AnimationConfig + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 一个可以快速使用的动画配置实例。 + * @see dragonBones.AnimationConfig + * @version DragonBones 5.0 + * @language zh_CN + */ + readonly animationConfig: AnimationConfig; + /** + * - The last playing animation state + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 上一个播放的动画状态 + * @see dragonBones.AnimationState + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly lastAnimationState: AnimationState | null; + /** + * - Deprecated, please refer to {@link #play()} {@link #fadeIn()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #play()} {@link #fadeIn()}。 + * @deprecated + * @language zh_CN + */ + gotoAndPlay(animationName: string, fadeInTime?: number, duration?: number, playTimes?: number, layer?: number, group?: string | null, fadeOutMode?: AnimationFadeOutMode, pauseFadeOut?: boolean, pauseFadeIn?: boolean): AnimationState | null; + /** + * - Deprecated, please refer to {@link #gotoAndStopByTime()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #gotoAndStopByTime()}。 + * @deprecated + * @language zh_CN + */ + gotoAndStop(animationName: string, time?: number): AnimationState | null; + /** + * - Deprecated, please refer to {@link #animationNames}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #animationNames}。 + * @deprecated + * @language zh_CN + */ + readonly animationList: Array; + /** + * - Deprecated, please refer to {@link #animationNames}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #animationNames}。 + * @deprecated + * @language zh_CN + */ + readonly animationDataList: Array; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The animation state is generated when the animation data is played. + * @see dragonBones.Animation + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画状态由播放动画数据时产生。 + * @see dragonBones.Animation + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language zh_CN + */ + class AnimationState extends BaseObject { + static toString(): string; + /** + * @private + */ + actionEnabled: boolean; + /** + * @private + */ + additiveBlending: boolean; + /** + * - Whether the animation state has control over the display object properties of the slots. + * Sometimes blend a animation state does not want it to control the display object properties of the slots, + * especially if other animation state are controlling the display object properties of the slots. + * @default true + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态是否对插槽的显示对象属性有控制权。 + * 有时混合一个动画状态并不希望其控制插槽的显示对象属性, + * 尤其是其他动画状态正在控制这些插槽的显示对象属性时。 + * @default true + * @version DragonBones 5.0 + * @language zh_CN + */ + displayControl: boolean; + /** + * - Whether to reset the objects without animation to the armature pose when the animation state is start to play. + * This property should usually be set to false when blend multiple animation states. + * @default true + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 开始播放动画状态时是否将没有动画的对象重置为骨架初始值。 + * 通常在混合多个动画状态时应该将该属性设置为 false。 + * @default true + * @version DragonBones 5.1 + * @language zh_CN + */ + resetToPose: boolean; + /** + * - The play times. [0: Loop play, [1~N]: Play N times] + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放次数。 [0: 无限循环播放, [1~N]: 循环播放 N 次] + * @version DragonBones 3.0 + * @language zh_CN + */ + playTimes: number; + /** + * - The blend layer. + * High layer animation state will get the blend weight first. + * When the blend weight is assigned more than 1, the remaining animation states will no longer get the weight assigned. + * @readonly + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合图层。 + * 图层高的动画状态会优先获取混合权重。 + * 当混合权重分配超过 1 时,剩余的动画状态将不再获得权重分配。 + * @readonly + * @version DragonBones 5.0 + * @language zh_CN + */ + layer: number; + /** + * - The play speed. + * The value is an overlay relationship with {@link dragonBones.Animation#timeScale}. + * [(-N~0): Reverse play, 0: Stop play, (0~1): Slow play, 1: Normal play, (1~N): Fast play] + * @default 1.0 + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 播放速度。 + * 该值与 {@link dragonBones.Animation#timeScale} 是叠加关系。 + * [(-N~0): 倒转播放, 0: 停止播放, (0~1): 慢速播放, 1: 正常播放, (1~N): 快速播放] + * @default 1.0 + * @version DragonBones 3.0 + * @language zh_CN + */ + timeScale: number; + /** + * - The blend weight. + * @default 1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合权重。 + * @default 1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + weight: number; + /** + * - The auto fade out time when the animation state play completed. + * [-1: Do not fade out automatically, [0~N]: The fade out time] (In seconds) + * @default -1.0 + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态播放完成后的自动淡出时间。 + * [-1: 不自动淡出, [0~N]: 淡出时间] (以秒为单位) + * @default -1.0 + * @version DragonBones 5.0 + * @language zh_CN + */ + autoFadeOutTime: number; + /** + * @private + */ + fadeTotalTime: number; + /** + * - The name of the animation state. (Can be different from the name of the animation data) + * @readonly + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 动画状态名称。 (可以不同于动画数据) + * @readonly + * @version DragonBones 5.0 + * @language zh_CN + */ + name: string; + /** + * - The blend group name of the animation state. + * This property is typically used to specify the substitution of multiple animation states blend. + * @readonly + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 混合组名称。 + * 该属性通常用来指定多个动画状态混合时的相互替换关系。 + * @readonly + * @version DragonBones 5.0 + * @language zh_CN + */ + group: string; + private _timelineDirty; + /** + * - xx: Play Enabled, Fade Play Enabled + * @internal + * @private + */ + _playheadState: number; + /** + * -1: Fade in, 0: Fade complete, 1: Fade out; + * @internal + * @private + */ + _fadeState: number; + /** + * -1: Fade start, 0: Fading, 1: Fade complete; + * @internal + * @private + */ + _subFadeState: number; + /** + * @internal + * @private + */ + _position: number; + /** + * @internal + * @private + */ + _duration: number; + private _fadeTime; + private _time; + /** + * @internal + * @private + */ + _fadeProgress: number; + /** + * @internal + * @private + */ + _weightResult: number; + /** + * @internal + * @private + */ + readonly _blendState: BlendState; + private readonly _boneMask; + private readonly _boneTimelines; + private readonly _surfaceTimelines; + private readonly _slotTimelines; + private readonly _constraintTimelines; + private readonly _animationTimelines; + private readonly _poseTimelines; + private readonly _bonePoses; + /** + * @internal + * @private + */ + _animationData: AnimationData; + private _armature; + /** + * @internal + * @private + */ + _actionTimeline: ActionTimelineState; + private _zOrderTimeline; + /** + * @internal + * @private + */ + _parent: AnimationState; + /** + * @private + */ + protected _onClear(): void; + private _updateTimelines(); + private _updateBoneAndSlotTimelines(); + private _advanceFadeTime(passedTime); + /** + * @internal + * @private + */ + init(armature: Armature, animationData: AnimationData, animationConfig: AnimationConfig): void; + /** + * @internal + * @private + */ + advanceTime(passedTime: number, cacheFrameRate: number): void; + /** + * - Continue play. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 继续播放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + play(): void; + /** + * - Stop play. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 暂停播放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + stop(): void; + /** + * - Fade out the animation state. + * @param fadeOutTime - The fade out time. (In seconds) + * @param pausePlayhead - Whether to pause the animation playing when fade out. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 淡出动画状态。 + * @param fadeOutTime - 淡出时间。 (以秒为单位) + * @param pausePlayhead - 淡出时是否暂停播放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + fadeOut(fadeOutTime: number, pausePlayhead?: boolean): void; + /** + * - Check if a specific bone mask is included. + * @param name - The bone name. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 检查是否包含特定骨骼遮罩。 + * @param name - 骨骼名称。 + * @version DragonBones 3.0 + * @language zh_CN + */ + containsBoneMask(name: string): boolean; + /** + * - Add a specific bone mask. + * @param name - The bone name. + * @param recursive - Whether or not to add a mask to the bone's sub-bone. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 添加特定的骨骼遮罩。 + * @param name - 骨骼名称。 + * @param recursive - 是否为该骨骼的子骨骼添加遮罩。 + * @version DragonBones 3.0 + * @language zh_CN + */ + addBoneMask(name: string, recursive?: boolean): void; + /** + * - Remove the mask of a specific bone. + * @param name - The bone name. + * @param recursive - Whether to remove the bone's sub-bone mask. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 删除特定骨骼的遮罩。 + * @param name - 骨骼名称。 + * @param recursive - 是否删除该骨骼的子骨骼遮罩。 + * @version DragonBones 3.0 + * @language zh_CN + */ + removeBoneMask(name: string, recursive?: boolean): void; + /** + * - Remove all bone masks. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 删除所有骨骼遮罩。 + * @version DragonBones 3.0 + * @language zh_CN + */ + removeAllBoneMask(): void; + /** + * - Whether the animation state is fading in. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 是否正在淡入。 + * @version DragonBones 5.1 + * @language zh_CN + */ + readonly isFadeIn: boolean; + /** + * - Whether the animation state is fading out. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 是否正在淡出。 + * @version DragonBones 5.1 + * @language zh_CN + */ + readonly isFadeOut: boolean; + /** + * - Whether the animation state is fade completed. + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 是否淡入或淡出完毕。 + * @version DragonBones 5.1 + * @language zh_CN + */ + readonly isFadeComplete: boolean; + /** + * - Whether the animation state is playing. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 是否正在播放。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly isPlaying: boolean; + /** + * - Whether the animation state is play completed. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 是否播放完毕。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly isCompleted: boolean; + /** + * - The times has been played. + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 已经循环播放的次数。 + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly currentPlayTimes: number; + /** + * - The total time. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 总播放时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly totalTime: number; + /** + * - The time is currently playing. (In seconds) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 当前播放的时间。 (以秒为单位) + * @version DragonBones 3.0 + * @language zh_CN + */ + currentTime: number; + /** + * - The animation data. + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 动画数据。 + * @see dragonBones.AnimationData + * @version DragonBones 3.0 + * @language zh_CN + */ + readonly animationData: AnimationData; + } + /** + * @internal + * @private + */ + class BonePose extends BaseObject { + static toString(): string; + readonly current: Transform; + readonly delta: Transform; + readonly result: Transform; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + class BlendState { + dirty: boolean; + layer: number; + leftWeight: number; + layerWeight: number; + blendWeight: number; + update(weight: number, layer: number): number; + clear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + const enum TweenState { + None = 0, + Once = 1, + Always = 2, + } + /** + * @internal + * @private + */ + abstract class TimelineState extends BaseObject { + playState: number; + currentPlayTimes: number; + currentTime: number; + protected _tweenState: TweenState; + protected _frameRate: number; + protected _frameValueOffset: number; + protected _frameCount: number; + protected _frameOffset: number; + protected _frameIndex: number; + protected _frameRateR: number; + protected _position: number; + protected _duration: number; + protected _timeScale: number; + protected _timeOffset: number; + protected _dragonBonesData: DragonBonesData; + protected _animationData: AnimationData; + protected _timelineData: TimelineData | null; + protected _armature: Armature; + protected _animationState: AnimationState; + protected _actionTimeline: TimelineState; + protected _frameArray: Array | Int16Array; + protected _frameIntArray: Array | Int16Array; + protected _frameFloatArray: Array | Int16Array; + protected _timelineArray: Array | Uint16Array; + protected _frameIndices: Array; + protected _onClear(): void; + protected abstract _onArriveAtFrame(): void; + protected abstract _onUpdateFrame(): void; + protected _setCurrentTime(passedTime: number): boolean; + init(armature: Armature, animationState: AnimationState, timelineData: TimelineData | null): void; + fadeOut(): void; + update(passedTime: number): void; + } + /** + * @internal + * @private + */ + abstract class TweenTimelineState extends TimelineState { + private static _getEasingValue(tweenType, progress, easing); + private static _getEasingCurveValue(progress, samples, count, offset); + protected _tweenType: TweenType; + protected _curveCount: number; + protected _framePosition: number; + protected _frameDurationR: number; + protected _tweenProgress: number; + protected _tweenEasing: number; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + } + /** + * @internal + * @private + */ + abstract class BoneTimelineState extends TweenTimelineState { + bone: Bone; + bonePose: BonePose; + protected _onClear(): void; + blend(state: number): void; + } + /** + * @internal + * @private + */ + abstract class SlotTimelineState extends TweenTimelineState { + slot: Slot; + protected _onClear(): void; + } + /** + * @internal + * @private + */ + abstract class ConstraintTimelineState extends TweenTimelineState { + constraint: Constraint; + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class ActionTimelineState extends TimelineState { + static toString(): string; + private _onCrossFrame(frameIndex); + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + update(passedTime: number): void; + setCurrentTime(value: number): void; + } + /** + * @internal + * @private + */ + class ZOrderTimelineState extends TimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + } + /** + * @internal + * @private + */ + class BoneAllTimelineState extends BoneTimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + fadeOut(): void; + } + /** + * @internal + * @private + */ + class BoneTranslateTimelineState extends BoneTimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + } + /** + * @internal + * @private + */ + class BoneRotateTimelineState extends BoneTimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + fadeOut(): void; + } + /** + * @internal + * @private + */ + class BoneScaleTimelineState extends BoneTimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + } + /** + * @internal + * @private + */ + class SurfaceTimelineState extends TweenTimelineState { + static toString(): string; + surface: Surface; + private _frameFloatOffset; + private _valueCount; + private _deformCount; + private _valueOffset; + private readonly _current; + private readonly _delta; + private readonly _result; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + init(armature: Armature, animationState: AnimationState, timelineData: TimelineData | null): void; + blend(state: number): void; + } + /** + * @internal + * @private + */ + class SlotDislayTimelineState extends SlotTimelineState { + static toString(): string; + protected _onArriveAtFrame(): void; + } + /** + * @internal + * @private + */ + class SlotColorTimelineState extends SlotTimelineState { + static toString(): string; + private _dirty; + private readonly _current; + private readonly _delta; + private readonly _result; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + fadeOut(): void; + update(passedTime: number): void; + } + /** + * @internal + * @private + */ + class SlotFFDTimelineState extends SlotTimelineState { + static toString(): string; + meshOffset: number; + private _dirty; + private _frameFloatOffset; + private _valueCount; + private _deformCount; + private _valueOffset; + private readonly _current; + private readonly _delta; + private readonly _result; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + init(armature: Armature, animationState: AnimationState, timelineData: TimelineData | null): void; + fadeOut(): void; + update(passedTime: number): void; + } + /** + * @internal + * @private + */ + class IKConstraintTimelineState extends ConstraintTimelineState { + static toString(): string; + private _current; + private _delta; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + } + /** + * @internal + * @private + */ + class AnimationTimelineState extends TweenTimelineState { + static toString(): string; + animationState: AnimationState; + private readonly _floats; + protected _onClear(): void; + protected _onArriveAtFrame(): void; + protected _onUpdateFrame(): void; + blend(state: number): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - The properties of the object carry basic information about an event, + * which are passed as parameter or parameter's parameter to event listeners when an event occurs. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 事件对象,包含有关事件的基本信息,当发生事件时,该实例将作为参数或参数的参数传递给事件侦听器。 + * @version DragonBones 4.5 + * @language zh_CN + */ + class EventObject extends BaseObject { + /** + * - Animation start play. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画开始播放。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly START: string; + /** + * - Animation loop play complete once. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画循环播放完成一次。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly LOOP_COMPLETE: string; + /** + * - Animation play complete. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画播放完成。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly COMPLETE: string; + /** + * - Animation fade in start. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画淡入开始。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly FADE_IN: string; + /** + * - Animation fade in complete. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画淡入完成。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly FADE_IN_COMPLETE: string; + /** + * - Animation fade out start. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画淡出开始。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly FADE_OUT: string; + /** + * - Animation fade out complete. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画淡出完成。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly FADE_OUT_COMPLETE: string; + /** + * - Animation frame event. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画帧事件。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly FRAME_EVENT: string; + /** + * - Animation frame sound event. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 动画帧声音事件。 + * @version DragonBones 4.5 + * @language zh_CN + */ + static readonly SOUND_EVENT: string; + static toString(): string; + /** + * - If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds) + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 如果是帧事件,此值用来描述该事件在动画时间轴中所处的时间。(以秒为单位) + * @version DragonBones 4.5 + * @language zh_CN + */ + time: number; + /** + * - The event type。 + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 事件类型。 + * @version DragonBones 4.5 + * @language zh_CN + */ + type: EventStringType; + /** + * - The event name. (The frame event name or the frame sound name) + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 事件名称。 (帧事件的名称或帧声音的名称) + * @version DragonBones 4.5 + * @language zh_CN + */ + name: string; + /** + * - The armature that dispatch the event. + * @see dragonBones.Armature + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 发出该事件的骨架。 + * @see dragonBones.Armature + * @version DragonBones 4.5 + * @language zh_CN + */ + armature: Armature; + /** + * - The bone that dispatch the event. + * @see dragonBones.Bone + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 发出该事件的骨骼。 + * @see dragonBones.Bone + * @version DragonBones 4.5 + * @language zh_CN + */ + bone: Bone | null; + /** + * - The slot that dispatch the event. + * @see dragonBones.Slot + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 发出该事件的插槽。 + * @see dragonBones.Slot + * @version DragonBones 4.5 + * @language zh_CN + */ + slot: Slot | null; + /** + * - The animation state that dispatch the event. + * @see dragonBones.AnimationState + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 发出该事件的动画状态。 + * @see dragonBones.AnimationState + * @version DragonBones 4.5 + * @language zh_CN + */ + animationState: AnimationState; + /** + * - The custom data. + * @see dragonBones.CustomData + * @version DragonBones 5.0 + * @language en_US + */ + /** + * - 自定义数据。 + * @see dragonBones.CustomData + * @version DragonBones 5.0 + * @language zh_CN + */ + data: UserData | null; + /** + * @private + */ + protected _onClear(): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @private + */ + type EventStringType = string | "start" | "loopComplete" | "complete" | "fadeIn" | "fadeInComplete" | "fadeOut" | "fadeOutComplete" | "frameEvent" | "soundEvent"; + /** + * - The event dispatcher interface. + * Dragonbones event dispatch usually relies on docking engine to implement, which defines the event method to be implemented when docking the engine. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 事件派发接口。 + * DragonBones 的事件派发通常依赖于对接的引擎来实现,该接口定义了对接引擎时需要实现的事件方法。 + * @version DragonBones 4.5 + * @language zh_CN + */ + interface IEventDispatcher { + /** + * - Checks whether the object has any listeners registered for a specific type of event。 + * @param type - Event type. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 检查是否为特定的事件类型注册了任何侦听器。 + * @param type - 事件类型。 + * @version DragonBones 4.5 + * @language zh_CN + */ + hasDBEventListener(type: EventStringType): boolean; + /** + * - Dispatches an event into the event flow. + * @param type - Event type. + * @param eventObject - Event object. + * @see dragonBones.EventObject + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 分派特定的事件到事件流中。 + * @param type - 事件类型。 + * @param eventObject - 事件数据。 + * @see dragonBones.EventObject + * @version DragonBones 4.5 + * @language zh_CN + */ + dispatchDBEvent(type: EventStringType, eventObject: EventObject): void; + /** + * - Add an event listener object so that the listener receives notification of an event. + * @param type - Event type. + * @param listener - Event listener. + * @param thisObject - The listener function's "this". + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 添加特定事件类型的事件侦听器,以使侦听器能够接收事件通知。 + * @param type - 事件类型。 + * @param listener - 事件侦听器。 + * @param thisObject - 侦听函数绑定的 this 对象。 + * @version DragonBones 4.5 + * @language zh_CN + */ + addDBEventListener(type: EventStringType, listener: Function, thisObject: any): void; + /** + * - Removes a listener from the object. + * @param type - Event type. + * @param listener - Event listener. + * @param thisObject - The listener function's "this". + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 删除特定事件类型的侦听器。 + * @param type - 事件类型。 + * @param listener - 事件侦听器。 + * @param thisObject - 侦听函数绑定的 this 对象。 + * @version DragonBones 4.5 + * @language zh_CN + */ + removeDBEventListener(type: EventStringType, listener: Function, thisObject: any): void; + /** + * - Deprecated, please refer to {@link #hasDBEventListener()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #hasDBEventListener()}。 + * @deprecated + * @language zh_CN + */ + hasEvent(type: EventStringType): boolean; + /** + * - Deprecated, please refer to {@link #addDBEventListener()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #addDBEventListener()}。 + * @deprecated + * @language zh_CN + */ + addEvent(type: EventStringType, listener: Function, thisObject: any): void; + /** + * - Deprecated, please refer to {@link #removeDBEventListener()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #removeDBEventListener()}。 + * @deprecated + * @language zh_CN + */ + removeEvent(type: EventStringType, listener: Function, thisObject: any): void; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + abstract class DataParser { + protected static readonly DATA_VERSION_2_3: string; + protected static readonly DATA_VERSION_3_0: string; + protected static readonly DATA_VERSION_4_0: string; + protected static readonly DATA_VERSION_4_5: string; + protected static readonly DATA_VERSION_5_0: string; + protected static readonly DATA_VERSION_5_5: string; + protected static readonly DATA_VERSION: string; + protected static readonly DATA_VERSIONS: Array; + protected static readonly TEXTURE_ATLAS: string; + protected static readonly SUB_TEXTURE: string; + protected static readonly FORMAT: string; + protected static readonly IMAGE_PATH: string; + protected static readonly WIDTH: string; + protected static readonly HEIGHT: string; + protected static readonly ROTATED: string; + protected static readonly FRAME_X: string; + protected static readonly FRAME_Y: string; + protected static readonly FRAME_WIDTH: string; + protected static readonly FRAME_HEIGHT: string; + protected static readonly DRADON_BONES: string; + protected static readonly USER_DATA: string; + protected static readonly ARMATURE: string; + protected static readonly BONE: string; + protected static readonly SURFACE: string; + protected static readonly SLOT: string; + protected static readonly CONSTRAINT: string; + protected static readonly IK: string; + protected static readonly SKIN: string; + protected static readonly DISPLAY: string; + protected static readonly ANIMATION: string; + protected static readonly Z_ORDER: string; + protected static readonly FFD: string; + protected static readonly FRAME: string; + protected static readonly TRANSLATE_FRAME: string; + protected static readonly ROTATE_FRAME: string; + protected static readonly SCALE_FRAME: string; + protected static readonly DISPLAY_FRAME: string; + protected static readonly COLOR_FRAME: string; + protected static readonly DEFAULT_ACTIONS: string; + protected static readonly ACTIONS: string; + protected static readonly EVENTS: string; + protected static readonly INTS: string; + protected static readonly FLOATS: string; + protected static readonly STRINGS: string; + protected static readonly CANVAS: string; + protected static readonly TRANSFORM: string; + protected static readonly PIVOT: string; + protected static readonly AABB: string; + protected static readonly COLOR: string; + protected static readonly VERSION: string; + protected static readonly COMPATIBLE_VERSION: string; + protected static readonly FRAME_RATE: string; + protected static readonly TYPE: string; + protected static readonly SUB_TYPE: string; + protected static readonly NAME: string; + protected static readonly PARENT: string; + protected static readonly TARGET: string; + protected static readonly STAGE: string; + protected static readonly SHARE: string; + protected static readonly PATH: string; + protected static readonly LENGTH: string; + protected static readonly DISPLAY_INDEX: string; + protected static readonly BLEND_MODE: string; + protected static readonly INHERIT_TRANSLATION: string; + protected static readonly INHERIT_ROTATION: string; + protected static readonly INHERIT_SCALE: string; + protected static readonly INHERIT_REFLECTION: string; + protected static readonly INHERIT_ANIMATION: string; + protected static readonly INHERIT_DEFORM: string; + protected static readonly SEGMENT_X: string; + protected static readonly SEGMENT_Y: string; + protected static readonly BEND_POSITIVE: string; + protected static readonly CHAIN: string; + protected static readonly WEIGHT: string; + protected static readonly FADE_IN_TIME: string; + protected static readonly PLAY_TIMES: string; + protected static readonly SCALE: string; + protected static readonly OFFSET: string; + protected static readonly POSITION: string; + protected static readonly DURATION: string; + protected static readonly TWEEN_EASING: string; + protected static readonly TWEEN_ROTATE: string; + protected static readonly TWEEN_SCALE: string; + protected static readonly CLOCK_WISE: string; + protected static readonly CURVE: string; + protected static readonly SOUND: string; + protected static readonly EVENT: string; + protected static readonly ACTION: string; + protected static readonly X: string; + protected static readonly Y: string; + protected static readonly SKEW_X: string; + protected static readonly SKEW_Y: string; + protected static readonly SCALE_X: string; + protected static readonly SCALE_Y: string; + protected static readonly VALUE: string; + protected static readonly ROTATE: string; + protected static readonly SKEW: string; + protected static readonly ALPHA_OFFSET: string; + protected static readonly RED_OFFSET: string; + protected static readonly GREEN_OFFSET: string; + protected static readonly BLUE_OFFSET: string; + protected static readonly ALPHA_MULTIPLIER: string; + protected static readonly RED_MULTIPLIER: string; + protected static readonly GREEN_MULTIPLIER: string; + protected static readonly BLUE_MULTIPLIER: string; + protected static readonly UVS: string; + protected static readonly VERTICES: string; + protected static readonly TRIANGLES: string; + protected static readonly WEIGHTS: string; + protected static readonly SLOT_POSE: string; + protected static readonly BONE_POSE: string; + protected static readonly GLUE_WEIGHTS: string; + protected static readonly GLUE_MESHES: string; + protected static readonly GOTO_AND_PLAY: string; + protected static readonly DEFAULT_NAME: string; + protected static _getArmatureType(value: string): ArmatureType; + protected static _getBoneType(value: string): BoneType; + protected static _getDisplayType(value: string): DisplayType; + protected static _getBoundingBoxType(value: string): BoundingBoxType; + protected static _getActionType(value: string): ActionType; + protected static _getBlendMode(value: string): BlendMode; + abstract parseDragonBonesData(rawData: any, scale: number): DragonBonesData | null; + abstract parseTextureAtlasData(rawData: any, textureAtlasData: TextureAtlasData, scale: number): boolean; + /** + * - Deprecated, please refer to {@link dragonBones.BaseFactory#parsetTextureAtlasData()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.BaseFactory#parsetTextureAtlasData()}。 + * @deprecated + * @language zh_CN + */ + static parseDragonBonesData(rawData: any): DragonBonesData | null; + /** + * - Deprecated, please refer to {@link dragonBones.BaseFactory#parsetTextureAtlasData()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.BaseFactory#parsetTextureAtlasData()}。 + * @deprecated + * @language zh_CN + */ + static parseTextureAtlasData(rawData: any, scale?: number): any; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class ObjectDataParser extends DataParser { + protected static _getBoolean(rawData: any, key: string, defaultValue: boolean): boolean; + protected static _getNumber(rawData: any, key: string, defaultValue: number): number; + protected static _getString(rawData: any, key: string, defaultValue: string): string; + protected _rawTextureAtlasIndex: number; + protected readonly _rawBones: Array; + protected _data: DragonBonesData; + protected _armature: ArmatureData; + protected _bone: BoneData; + protected _surface: SurfaceData; + protected _slot: SlotData; + protected _skin: SkinData; + protected _mesh: MeshDisplayData; + protected _animation: AnimationData; + protected _timeline: TimelineData; + protected _rawTextureAtlases: Array | null; + private _defaultColorOffset; + private _prevClockwise; + private _prevRotation; + private readonly _helpMatrixA; + private readonly _helpMatrixB; + private readonly _helpTransform; + private readonly _helpColorTransform; + private readonly _helpPoint; + private readonly _helpArray; + private readonly _intArray; + private readonly _floatArray; + private readonly _frameIntArray; + private readonly _frameFloatArray; + private readonly _frameArray; + private readonly _timelineArray; + private readonly _cacheRawMeshes; + private readonly _cacheMeshes; + private readonly _actionFrames; + private readonly _weightSlotPose; + private readonly _weightBonePoses; + private readonly _cacheBones; + private readonly _slotChildActions; + private _getCurvePoint(x1, y1, x2, y2, x3, y3, x4, y4, t, result); + private _samplingEasingCurve(curve, samples); + private _parseActionDataInFrame(rawData, frameStart, bone, slot); + private _mergeActionFrame(rawData, frameStart, type, bone, slot); + protected _parseArmature(rawData: any, scale: number): ArmatureData; + protected _parseBone(rawData: any): BoneData; + protected _parseIKConstraint(rawData: any): ConstraintData | null; + protected _parseSlot(rawData: any, zOrder: number): SlotData; + protected _parseSkin(rawData: any): SkinData; + protected _parseDisplay(rawData: any): DisplayData | null; + protected _parsePivot(rawData: any, display: ImageDisplayData): void; + protected _parseMesh(rawData: any, mesh: MeshDisplayData): void; + protected _parseMeshGlue(rawData: any, mesh: MeshDisplayData): void; + protected _parseBoundingBox(rawData: any): BoundingBoxData | null; + protected _parsePolygonBoundingBox(rawData: any): PolygonBoundingBoxData; + protected _parseAnimation(rawData: any): AnimationData; + protected _parseTimeline(rawData: any, rawFrames: Array | null, framesKey: string, type: TimelineType, addIntOffset: boolean, addFloatOffset: boolean, frameValueCount: number, frameParser: (rawData: any, frameStart: number, frameCount: number) => number): TimelineData | null; + protected _parseBoneTimeline(rawData: any): void; + protected _parseSlotTimeline(rawData: any): void; + protected _parseFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseTweenFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseActionFrame(frame: ActionFrame, frameStart: number, frameCount: number): number; + protected _parseZOrderFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseBoneAllFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseBoneTranslateFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseBoneRotateFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseBoneScaleFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseSurfaceFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseSlotDisplayFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseSlotColorFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseSlotFFDFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseIKConstraintFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseAnimationFrame(rawData: any, frameStart: number, frameCount: number): number; + protected _parseActionData(rawData: any, type: ActionType, bone: BoneData | null, slot: SlotData | null): Array; + protected _parseTransform(rawData: any, transform: Transform, scale: number): void; + protected _parseColorTransform(rawData: any, color: ColorTransform): void; + protected _parseArray(rawData: any): void; + protected _modifyArray(): void; + parseDragonBonesData(rawData: any, scale?: number): DragonBonesData | null; + parseTextureAtlasData(rawData: any, textureAtlasData: TextureAtlasData, scale?: number): boolean; + private static _objectDataParserInstance; + /** + * - Deprecated, please refer to {@link dragonBones.BaseFactory#parseDragonBonesData()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.BaseFactory#parseDragonBonesData()}。 + * @deprecated + * @language zh_CN + */ + static getInstance(): ObjectDataParser; + } + /** + * @internal + * @private + */ + class ActionFrame { + frameStart: number; + readonly actions: Array; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * @internal + * @private + */ + class BinaryDataParser extends ObjectDataParser { + private _binaryOffset; + private _binary; + private _intArrayBuffer; + private _floatArrayBuffer; + private _frameIntArrayBuffer; + private _frameFloatArrayBuffer; + private _frameArrayBuffer; + private _timelineArrayBuffer; + private _inRange(a, min, max); + private _decodeUTF8(data); + private _getUTF16Key(value); + private _parseBinaryTimeline(type, offset, timelineData?); + protected _parseMesh(rawData: any, mesh: MeshDisplayData): void; + protected _parseAnimation(rawData: any): AnimationData; + protected _parseArray(rawData: any): void; + parseDragonBonesData(rawData: any, scale?: number): DragonBonesData | null; + private static _binaryDataParserInstance; + /** + * - Deprecated, please refer to {@link dragonBones.BaseFactory#parseDragonBonesData()}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link dragonBones.BaseFactory#parseDragonBonesData()}。 + * @deprecated + * @language zh_CN + */ + static getInstance(): BinaryDataParser; + } +} +/** + * The MIT License (MIT) + * + * Copyright (c) 2012-2017 DragonBones team and other contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +declare namespace dragonBones { + /** + * - Base class for the factory that create the armatures. (Typically only one global factory instance is required) + * The factory instance create armatures by parsed and added DragonBonesData instances and TextureAtlasData instances. + * Once the data has been parsed, it has been cached in the factory instance and does not need to be parsed again until it is cleared by the factory instance. + * @see dragonBones.DragonBonesData + * @see dragonBones.TextureAtlasData + * @see dragonBones.ArmatureData + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 创建骨架的工厂基类。 (通常只需要一个全局工厂实例) + * 工厂通过解析并添加的 DragonBonesData 实例和 TextureAtlasData 实例来创建骨架。 + * 当数据被解析过之后,已经添加到工厂中,在没有被工厂清理之前,不需要再次解析。 + * @see dragonBones.DragonBonesData + * @see dragonBones.TextureAtlasData + * @see dragonBones.ArmatureData + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language zh_CN + */ + abstract class BaseFactory { + /** + * @private + */ + protected static _objectParser: ObjectDataParser; + /** + * @private + */ + protected static _binaryParser: BinaryDataParser; + /** + * @private + */ + autoSearch: boolean; + /** + * @private + */ + protected readonly _dragonBonesDataMap: Map; + /** + * @private + */ + protected readonly _textureAtlasDataMap: Map>; + /** + * @private + */ + protected _dragonBones: DragonBones; + /** + * @private + */ + protected _dataParser: DataParser; + /** + * - Create a factory instance. (typically only one global factory instance is required) + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 创建一个工厂实例。 (通常只需要一个全局工厂实例) + * @version DragonBones 3.0 + * @language zh_CN + */ + constructor(dataParser?: DataParser | null); + /** + * @private + */ + protected _isSupportMesh(): boolean; + /** + * @private + */ + protected _getTextureData(textureAtlasName: string, textureName: string): TextureData | null; + /** + * @private + */ + protected _fillBuildArmaturePackage(dataPackage: BuildArmaturePackage, dragonBonesName: string, armatureName: string, skinName: string, textureAtlasName: string): boolean; + /** + * @private + */ + protected _buildBones(dataPackage: BuildArmaturePackage, armature: Armature): void; + /** + * @private + */ + protected _buildSlots(dataPackage: BuildArmaturePackage, armature: Armature): void; + /** + * @private + */ + protected _buildChildArmature(dataPackage: BuildArmaturePackage | null, slot: Slot, displayData: DisplayData): Armature | null; + /** + * @private + */ + protected _getSlotDisplay(dataPackage: BuildArmaturePackage | null, displayData: DisplayData, rawDisplayData: DisplayData | null, slot: Slot): any; + /** + * @private + */ + protected abstract _buildTextureAtlasData(textureAtlasData: TextureAtlasData | null, textureAtlas: any): TextureAtlasData; + /** + * @private + */ + protected abstract _buildArmature(dataPackage: BuildArmaturePackage): Armature; + /** + * @private + */ + protected abstract _buildSlot(dataPackage: BuildArmaturePackage, slotData: SlotData, displays: Array | null, armature: Armature): Slot; + /** + * - Parse the raw data to a DragonBonesData instance and cache it to the factory. + * @param rawData - The raw data. + * @param name - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) + * @param scale - Specify a scaling value for all armatures. (Default: 1.0) + * @returns DragonBonesData instance + * @see #getDragonBonesData() + * @see #addDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 将原始数据解析为 DragonBonesData 实例,并缓存到工厂中。 + * @param rawData - 原始数据。 + * @param name - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + * @param scale - 为所有的骨架指定一个缩放值。 (默认: 1.0) + * @returns DragonBonesData 实例 + * @see #getDragonBonesData() + * @see #addDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 4.5 + * @language zh_CN + */ + parseDragonBonesData(rawData: any, name?: string | null, scale?: number): DragonBonesData | null; + /** + * - Parse the raw texture atlas data and the texture atlas object to a TextureAtlasData instance and cache it to the factory. + * @param rawData - The raw texture atlas data. + * @param textureAtlas - The texture atlas object. + * @param name - Specify a cache name for the instance so that the instance can be obtained through this name. (If not set, use the instance name instead) + * @param scale - Specify a scaling value for the map set. (Default: 1.0) + * @returns TextureAtlasData instance + * @see #getTextureAtlasData() + * @see #addTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 将原始贴图集数据和贴图集对象解析为 TextureAtlasData 实例,并缓存到工厂中。 + * @param rawData - 原始贴图集数据。 + * @param textureAtlas - 贴图集对象。 + * @param name - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + * @param scale - 为贴图集指定一个缩放值。 (默认: 1.0) + * @returns TextureAtlasData 实例 + * @see #getTextureAtlasData() + * @see #addTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 4.5 + * @language zh_CN + */ + parseTextureAtlasData(rawData: any, textureAtlas: any, name?: string | null, scale?: number): TextureAtlasData; + /** + * @private + */ + updateTextureAtlasData(name: string, textureAtlases: Array): void; + /** + * - Get a specific DragonBonesData instance. + * @param name - The DragonBonesData instance cache name. + * @returns DragonBonesData instance + * @see #parseDragonBonesData() + * @see #addDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的 DragonBonesData 实例。 + * @param name - DragonBonesData 实例的缓存名称。 + * @returns DragonBonesData 实例 + * @see #parseDragonBonesData() + * @see #addDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language zh_CN + */ + getDragonBonesData(name: string): DragonBonesData | null; + /** + * - Cache a DragonBonesData instance to the factory. + * @param data - The DragonBonesData instance. + * @param name - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) + * @see #parseDragonBonesData() + * @see #getDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 将 DragonBonesData 实例缓存到工厂中。 + * @param data - DragonBonesData 实例。 + * @param name - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + * @see #parseDragonBonesData() + * @see #getDragonBonesData() + * @see #removeDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language zh_CN + */ + addDragonBonesData(data: DragonBonesData, name?: string | null): void; + /** + * - Remove a DragonBonesData instance. + * @param name - The DragonBonesData instance cache name. + * @param disposeData - Whether to dispose data. (Default: true) + * @see #parseDragonBonesData() + * @see #getDragonBonesData() + * @see #addDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 移除 DragonBonesData 实例。 + * @param name - DragonBonesData 实例缓存名称。 + * @param disposeData - 是否释放数据。 (默认: true) + * @see #parseDragonBonesData() + * @see #getDragonBonesData() + * @see #addDragonBonesData() + * @see dragonBones.DragonBonesData + * @version DragonBones 3.0 + * @language zh_CN + */ + removeDragonBonesData(name: string, disposeData?: boolean): void; + /** + * - Get a list of specific TextureAtlasData instances. + * @param name - The TextureAtlasData cahce name. + * @see #parseTextureAtlasData() + * @see #addTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 获取特定的 TextureAtlasData 实例列表。 + * @param name - TextureAtlasData 实例缓存名称。 + * @see #parseTextureAtlasData() + * @see #addTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language zh_CN + */ + getTextureAtlasData(name: string): Array | null; + /** + * - Cache a TextureAtlasData instance to the factory. + * @param data - The TextureAtlasData instance. + * @param name - Specify a cache name for the instance so that the instance can be obtained through this name. (if not set, use the instance name instead) + * @see #parseTextureAtlasData() + * @see #getTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 将 TextureAtlasData 实例缓存到工厂中。 + * @param data - TextureAtlasData 实例。 + * @param name - 为该实例指定一个缓存名称,以便可以通过此名称获取该实例。 (如果未设置,则使用该实例中的名称) + * @see #parseTextureAtlasData() + * @see #getTextureAtlasData() + * @see #removeTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language zh_CN + */ + addTextureAtlasData(data: TextureAtlasData, name?: string | null): void; + /** + * - Remove a TextureAtlasData instance. + * @param name - The TextureAtlasData instance cache name. + * @param disposeData - Whether to dispose data. + * @see #parseTextureAtlasData() + * @see #getTextureAtlasData() + * @see #addTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 移除 TextureAtlasData 实例。 + * @param name - TextureAtlasData 实例的缓存名称。 + * @param disposeData - 是否释放数据。 + * @see #parseTextureAtlasData() + * @see #getTextureAtlasData() + * @see #addTextureAtlasData() + * @see dragonBones.TextureAtlasData + * @version DragonBones 3.0 + * @language zh_CN + */ + removeTextureAtlasData(name: string, disposeData?: boolean): void; + /** + * - Get a specific armature data. + * @param name - The armature data name. + * @param dragonBonesName - The cached name for DragonbonesData instance. + * @see dragonBones.ArmatureData + * @version DragonBones 5.1 + * @language en_US + */ + /** + * - 获取特定的骨架数据。 + * @param name - 骨架数据名称。 + * @param dragonBonesName - DragonBonesData 实例的缓存名称。 + * @see dragonBones.ArmatureData + * @version DragonBones 5.1 + * @language zh_CN + */ + getArmatureData(name: string, dragonBonesName?: string): ArmatureData | null; + /** + * - Clear all cached DragonBonesData instances and TextureAtlasData instances. + * @param disposeData - Whether to dispose data. + * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 清除缓存的所有 DragonBonesData 实例和 TextureAtlasData 实例。 + * @param disposeData - 是否释放数据。 + * @version DragonBones 4.5 + * @language zh_CN + */ + clear(disposeData?: boolean): void; + /** + * - Create a armature from cached DragonBonesData instances and TextureAtlasData instances. + * @param armatureName - The armature data name. + * @param dragonBonesName - The cached name of the DragonBonesData instance. (If not set, all DragonBonesData instances are retrieved, and when multiple DragonBonesData instances contain a the same name armature data, it may not be possible to accurately create a specific armature) + * @param skinName - The skin name, you can set a different ArmatureData name to share it's skin data. (If not set, use the default skin data) + * @returns The armature. + * @example + *
+         *     let armature = factory.buildArmature("armatureName", "dragonBonesName");
+         *     armature.clock = factory.clock;
+         * 
+ * @see dragonBones.DragonBonesData + * @see dragonBones.ArmatureData + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language en_US + */ + /** + * - 通过缓存的 DragonBonesData 实例和 TextureAtlasData 实例创建一个骨架。 + * @param armatureName - 骨架数据名称。 + * @param dragonBonesName - DragonBonesData 实例的缓存名称。 (如果未设置,将检索所有的 DragonBonesData 实例,当多个 DragonBonesData 实例中包含同名的骨架数据时,可能无法准确的创建出特定的骨架) + * @param skinName - 皮肤名称,可以设置一个其他骨架数据名称来共享其皮肤数据(如果未设置,则使用默认的皮肤数据)。 + * @returns 骨架。 + * @example + *
+         *     let armature = factory.buildArmature("armatureName", "dragonBonesName");
+         *     armature.clock = factory.clock;
+         * 
+ * @see dragonBones.DragonBonesData + * @see dragonBones.ArmatureData + * @see dragonBones.Armature + * @version DragonBones 3.0 + * @language zh_CN + */ + buildArmature(armatureName: string, dragonBonesName?: string, skinName?: string, textureAtlasName?: string): Armature | null; + /** + * @private + */ + replaceDisplay(slot: Slot, displayData: DisplayData, displayIndex?: number): void; + /** + * - Replaces the current display data for a particular slot with a specific display data. + * Specify display data with "dragonBonesName/armatureName/slotName/displayName". + * @param dragonBonesName - The DragonBonesData instance cache name. + * @param armatureName - The armature data name. + * @param slotName - The slot data name. + * @param displayName - The display data name. + * @param slot - The slot. + * @param displayIndex - The index of the display data that is replaced. (If it is not set, replaces the current display data) + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
+         * 
+ * @version DragonBones 4.5 + * @language en_US + */ + /** + * - 用特定的显示对象数据替换特定插槽当前的显示对象数据。 + * 用 "dragonBonesName/armatureName/slotName/displayName" 指定显示对象数据。 + * @param dragonBonesName - DragonBonesData 实例的缓存名称。 + * @param armatureName - 骨架数据名称。 + * @param slotName - 插槽数据名称。 + * @param displayName - 显示对象数据名称。 + * @param slot - 插槽。 + * @param displayIndex - 被替换的显示对象数据的索引。 (如果未设置,则替换当前的显示对象数据) + * @example + *
+         *     let slot = armature.getSlot("weapon");
+         *     factory.replaceSlotDisplay("dragonBonesName", "armatureName", "slotName", "displayName", slot);
+         * 
+ * @version DragonBones 4.5 + * @language zh_CN + */ + replaceSlotDisplay(dragonBonesName: string, armatureName: string, slotName: string, displayName: string, slot: Slot, displayIndex?: number): boolean; + /** + * @private + */ + replaceSlotDisplayList(dragonBonesName: string | null, armatureName: string, slotName: string, slot: Slot): boolean; + /** + * - Share specific skin data with specific armature. + * @param armature - The armature. + * @param skin - The skin data. + * @param isOverride - Whether it completely override the original skin. (Default: false) + * @param exclude - A list of slot names that do not need to be replace. + * @example + *
+         *     let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+         *     let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+         *     if (armatureDataB && armatureDataB.defaultSkin) {
+         *     factory.replaceSkin(armatureA, armatureDataB.defaultSkin, false, ["arm_l", "weapon_l"]);
+         *     }
+         * 
+ * @see dragonBones.Armature + * @see dragonBones.SkinData + * @version DragonBones 5.6 + * @language en_US + */ + /** + * - 将特定的皮肤数据共享给特定的骨架使用。 + * @param armature - 骨架。 + * @param skin - 皮肤数据。 + * @param isOverride - 是否完全覆盖原来的皮肤。 (默认: false) + * @param exclude - 不需要被替换的插槽名称列表。 + * @example + *
+         *     let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+         *     let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+         *     if (armatureDataB && armatureDataB.defaultSkin) {
+         *     factory.replaceSkin(armatureA, armatureDataB.defaultSkin, false, ["arm_l", "weapon_l"]);
+         *     }
+         * 
+ * @see dragonBones.Armature + * @see dragonBones.SkinData + * @version DragonBones 5.6 + * @language zh_CN + */ + replaceSkin(armature: Armature, skin: SkinData, isOverride?: boolean, exclude?: Array | null): boolean; + /** + * - Replaces the existing animation data for a specific armature with the animation data for the specific armature data. + * This enables you to make a armature template so that other armature without animations can share it's animations. + * @param armature - The armtaure. + * @param armatureData - The armature data. + * @param isOverride - Whether to completely overwrite the original animation. (Default: false) + * @example + *
+         *     let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+         *     let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+         *     if (armatureDataB) {
+         *     factory.replaceAnimation(armatureA, armatureDataB);
+         *     }
+         * 
+ * @see dragonBones.Armature + * @see dragonBones.ArmatureData + * @version DragonBones 5.6 + * @language en_US + */ + /** + * - 用特定骨架数据的动画数据替换特定骨架现有的动画数据。 + * 这样就能实现制作一个骨架动画模板,让其他没有制作动画的骨架共享该动画。 + * @param armature - 骨架。 + * @param armatureData - 骨架数据。 + * @param isOverride - 是否完全覆盖原来的动画。(默认: false)。 + * @example + *
+         *     let armatureA = factory.buildArmature("armatureA", "dragonBonesA");
+         *     let armatureDataB = factory.getArmatureData("armatureB", "dragonBonesB");
+         *     if (armatureDataB) {
+         *     factory.replaceAnimation(armatureA, armatureDataB);
+         *     }
+         * 
+ * @see dragonBones.Armature + * @see dragonBones.ArmatureData + * @version DragonBones 5.6 + * @language zh_CN + */ + replaceAnimation(armature: Armature, armatureData: ArmatureData, isOverride?: boolean): boolean; + /** + * @private + */ + getAllDragonBonesData(): Map; + /** + * @private + */ + getAllTextureAtlasData(): Map>; + /** + * - An Worldclock instance updated by engine. + * @version DragonBones 5.7 + * @language en_US + */ + /** + * - 由引擎驱动的 WorldClock 实例。 + * @version DragonBones 5.7 + * @language zh_CN + */ + readonly clock: WorldClock; + /** + * @private + */ + readonly dragonBones: DragonBones; + /** + * - Deprecated, please refer to {@link #replaceSkin}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #replaceSkin}。 + * @deprecated + * @language zh_CN + */ + changeSkin(armature: Armature, skin: SkinData, exclude?: Array | null): boolean; + /** + * - Deprecated, please refer to {@link #replaceAnimation}. + * @deprecated + * @language en_US + */ + /** + * - 已废弃,请参考 {@link #replaceAnimation}。 + * @deprecated + * @language zh_CN + */ + copyAnimationsToArmature(toArmature: Armature, fromArmatreName: string, fromSkinName?: string, fromDragonBonesDataName?: string, replaceOriginalAnimation?: boolean): boolean; + } + /** + * @internal + * @private + */ + class BuildArmaturePackage { + dataName: string; + textureAtlasName: string; + data: DragonBonesData; + armature: ArmatureData; + skin: SkinData | null; + } +} + +declare namespace sp.spine { + class Animation { + name: string; + timelines: Array; + timelineIds: Array; + duration: number; + constructor(name: string, timelines: Array, duration: number); + hasTimeline(id: number): boolean; + apply(skeleton: Skeleton, lastTime: number, time: number, loop: boolean, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + static binarySearch(values: ArrayLike, target: number, step?: number): number; + static linearSearch(values: ArrayLike, target: number, step: number): number; + } + interface Timeline { + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + getPropertyId(): number; + } + enum MixBlend { + setup = 0, + first = 1, + replace = 2, + add = 3 + } + enum MixDirection { + mixIn = 0, + mixOut = 1 + } + enum TimelineType { + rotate = 0, + translate = 1, + scale = 2, + shear = 3, + attachment = 4, + color = 5, + deform = 6, + event = 7, + drawOrder = 8, + ikConstraint = 9, + transformConstraint = 10, + pathConstraintPosition = 11, + pathConstraintSpacing = 12, + pathConstraintMix = 13, + twoColor = 14 + } + abstract class CurveTimeline implements Timeline { + static LINEAR: number; + static STEPPED: number; + static BEZIER: number; + static BEZIER_SIZE: number; + private curves; + abstract getPropertyId(): number; + constructor(frameCount: number); + getFrameCount(): number; + setLinear(frameIndex: number): void; + setStepped(frameIndex: number): void; + getCurveType(frameIndex: number): number; + setCurve(frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; + getCurvePercent(frameIndex: number, percent: number): number; + abstract apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class RotateTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATION: number; + static ROTATION: number; + boneIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, degrees: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TranslateTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_X: number; + static PREV_Y: number; + static X: number; + static Y: number; + boneIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, x: number, y: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ScaleTimeline extends TranslateTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ShearTimeline extends TranslateTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class ColorTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_R: number; + static PREV_G: number; + static PREV_B: number; + static PREV_A: number; + static R: number; + static G: number; + static B: number; + static A: number; + slotIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TwoColorTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_R: number; + static PREV_G: number; + static PREV_B: number; + static PREV_A: number; + static PREV_R2: number; + static PREV_G2: number; + static PREV_B2: number; + static R: number; + static G: number; + static B: number; + static A: number; + static R2: number; + static G2: number; + static B2: number; + slotIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, r: number, g: number, b: number, a: number, r2: number, g2: number, b2: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class AttachmentTimeline implements Timeline { + slotIndex: number; + frames: ArrayLike; + attachmentNames: Array; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, time: number, attachmentName: string): void; + apply(skeleton: Skeleton, lastTime: number, time: number, events: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class DeformTimeline extends CurveTimeline { + slotIndex: number; + attachment: VertexAttachment; + frames: ArrayLike; + frameVertices: Array>; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, vertices: ArrayLike): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class EventTimeline implements Timeline { + frames: ArrayLike; + events: Array; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, event: Event): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class DrawOrderTimeline implements Timeline { + frames: ArrayLike; + drawOrders: Array>; + constructor(frameCount: number); + getPropertyId(): number; + getFrameCount(): number; + setFrame(frameIndex: number, time: number, drawOrder: Array): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class IkConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_MIX: number; + static PREV_SOFTNESS: number; + static PREV_BEND_DIRECTION: number; + static PREV_COMPRESS: number; + static PREV_STRETCH: number; + static MIX: number; + static SOFTNESS: number; + static BEND_DIRECTION: number; + static COMPRESS: number; + static STRETCH: number; + ikConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, mix: number, softness: number, bendDirection: number, compress: boolean, stretch: boolean): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class TransformConstraintTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATE: number; + static PREV_TRANSLATE: number; + static PREV_SCALE: number; + static PREV_SHEAR: number; + static ROTATE: number; + static TRANSLATE: number; + static SCALE: number; + static SHEAR: number; + transformConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number, scaleMix: number, shearMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintPositionTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_VALUE: number; + static VALUE: number; + pathConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, value: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintSpacingTimeline extends PathConstraintPositionTimeline { + constructor(frameCount: number); + getPropertyId(): number; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } + class PathConstraintMixTimeline extends CurveTimeline { + static ENTRIES: number; + static PREV_TIME: number; + static PREV_ROTATE: number; + static PREV_TRANSLATE: number; + static ROTATE: number; + static TRANSLATE: number; + pathConstraintIndex: number; + frames: ArrayLike; + constructor(frameCount: number); + getPropertyId(): number; + setFrame(frameIndex: number, time: number, rotateMix: number, translateMix: number): void; + apply(skeleton: Skeleton, lastTime: number, time: number, firedEvents: Array, alpha: number, blend: MixBlend, direction: MixDirection): void; + } +} +declare namespace sp.spine { + class AnimationState { + static emptyAnimation: Animation; + static SUBSEQUENT: number; + static FIRST: number; + static HOLD: number; + static HOLD_MIX: number; + static NOT_LAST: number; + data: AnimationStateData; + tracks: TrackEntry[]; + timeScale: number; + events: Event[]; + listeners: AnimationStateListener[]; + queue: EventQueue; + propertyIDs: IntSet; + animationsChanged: boolean; + trackEntryPool: Pool; + constructor(data: AnimationStateData); + update(delta: number): void; + updateMixingFrom(to: TrackEntry, delta: number): boolean; + apply(skeleton: Skeleton): boolean; + applyMixingFrom(to: TrackEntry, skeleton: Skeleton, blend: MixBlend): number; + applyRotateTimeline(timeline: Timeline, skeleton: Skeleton, time: number, alpha: number, blend: MixBlend, timelinesRotation: Array, i: number, firstFrame: boolean): void; + queueEvents(entry: TrackEntry, animationTime: number): void; + clearTracks(): void; + clearTrack(trackIndex: number): void; + setCurrent(index: number, current: TrackEntry, interrupt: boolean): void; + setAnimation(trackIndex: number, animationName: string, loop: boolean): TrackEntry; + setAnimationWith(trackIndex: number, animation: Animation, loop: boolean): TrackEntry; + addAnimation(trackIndex: number, animationName: string, loop: boolean, delay: number): TrackEntry; + addAnimationWith(trackIndex: number, animation: Animation, loop: boolean, delay: number): TrackEntry; + setEmptyAnimation(trackIndex: number, mixDuration: number): TrackEntry; + addEmptyAnimation(trackIndex: number, mixDuration: number, delay: number): TrackEntry; + setEmptyAnimations(mixDuration: number): void; + expandToIndex(index: number): TrackEntry; + trackEntry(trackIndex: number, animation: Animation, loop: boolean, last: TrackEntry): TrackEntry; + disposeNext(entry: TrackEntry): void; + _animationsChanged(): void; + computeHold(entry: TrackEntry): void; + computeNotLast(entry: TrackEntry): void; + getCurrent(trackIndex: number): TrackEntry; + addListener(listener: AnimationStateListener): void; + removeListener(listener: AnimationStateListener): void; + clearListeners(): void; + clearListenerNotifications(): void; + } + class TrackEntry { + animation: Animation; + next: TrackEntry; + mixingFrom: TrackEntry; + mixingTo: TrackEntry; + listener: AnimationStateListener; + trackIndex: number; + loop: boolean; + holdPrevious: boolean; + eventThreshold: number; + attachmentThreshold: number; + drawOrderThreshold: number; + animationStart: number; + animationEnd: number; + animationLast: number; + nextAnimationLast: number; + delay: number; + trackTime: number; + trackLast: number; + nextTrackLast: number; + trackEnd: number; + timeScale: number; + alpha: number; + mixTime: number; + mixDuration: number; + interruptAlpha: number; + totalAlpha: number; + mixBlend: MixBlend; + timelineMode: number[]; + timelineHoldMix: TrackEntry[]; + timelinesRotation: number[]; + reset(): void; + getAnimationTime(): number; + setAnimationLast(animationLast: number): void; + isComplete(): boolean; + resetRotationDirections(): void; + } + class EventQueue { + objects: Array; + drainDisabled: boolean; + animState: AnimationState; + constructor(animState: AnimationState); + start(entry: TrackEntry): void; + interrupt(entry: TrackEntry): void; + end(entry: TrackEntry): void; + dispose(entry: TrackEntry): void; + complete(entry: TrackEntry): void; + event(entry: TrackEntry, event: Event): void; + drain(): void; + clear(): void; + } + enum EventType { + start = 0, + interrupt = 1, + end = 2, + dispose = 3, + complete = 4, + event = 5 + } + interface AnimationStateListener { + start(entry: TrackEntry): void; + interrupt(entry: TrackEntry): void; + end(entry: TrackEntry): void; + dispose(entry: TrackEntry): void; + complete(entry: TrackEntry): void; + event(entry: TrackEntry, event: Event): void; + } + abstract class AnimationStateAdapter implements AnimationStateListener { + start(entry: TrackEntry): void; + interrupt(entry: TrackEntry): void; + end(entry: TrackEntry): void; + dispose(entry: TrackEntry): void; + complete(entry: TrackEntry): void; + event(entry: TrackEntry, event: Event): void; + } +} +declare namespace sp.spine { + class AnimationStateData { + skeletonData: SkeletonData; + animationToMixTime: Map; + defaultMix: number; + constructor(skeletonData: SkeletonData); + setMix(fromName: string, toName: string, duration: number): void; + setMixWith(from: Animation, to: Animation, duration: number): void; + getMix(from: Animation, to: Animation): number; + } +} +declare namespace sp.spine { + class AssetManager implements Disposable { + private pathPrefix; + private textureLoader; + private assets; + private errors; + private toLoad; + private loaded; + constructor(textureLoader: (image: HTMLImageElement) => any, pathPrefix?: string); + private static downloadText; + private static downloadBinary; + loadBinary(path: string, success?: (path: string, binary: Uint8Array) => void, error?: (path: string, error: string) => void): void; + loadText(path: string, success?: (path: string, text: string) => void, error?: (path: string, error: string) => void): void; + loadTexture(path: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + loadTextureData(path: string, data: string, success?: (path: string, image: HTMLImageElement) => void, error?: (path: string, error: string) => void): void; + loadTextureAtlas(path: string, success?: (path: string, atlas: TextureAtlas) => void, error?: (path: string, error: string) => void): void; + get(path: string): any; + remove(path: string): void; + removeAll(): void; + isLoadingComplete(): boolean; + getToLoad(): number; + getLoaded(): number; + dispose(): void; + hasErrors(): boolean; + getErrors(): Map; + } +} +declare namespace sp.spine { + class AtlasAttachmentLoader implements AttachmentLoader { + atlas: TextureAtlas; + constructor(atlas: TextureAtlas); + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + newPathAttachment(skin: Skin, name: string): PathAttachment; + newPointAttachment(skin: Skin, name: string): PointAttachment; + newClippingAttachment(skin: Skin, name: string): ClippingAttachment; + } +} +declare namespace sp.spine { + enum BlendMode { + Normal = 0, + Additive = 1, + Multiply = 2, + Screen = 3 + } +} +declare namespace sp.spine { + class Bone implements Updatable { + data: BoneData; + skeleton: Skeleton; + parent: Bone; + children: Bone[]; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + ax: number; + ay: number; + arotation: number; + ascaleX: number; + ascaleY: number; + ashearX: number; + ashearY: number; + appliedValid: boolean; + a: number; + b: number; + c: number; + d: number; + worldY: number; + worldX: number; + sorted: boolean; + active: boolean; + constructor(data: BoneData, skeleton: Skeleton, parent: Bone); + isActive(): boolean; + update(): void; + updateWorldTransform(): void; + updateWorldTransformWith(x: number, y: number, rotation: number, scaleX: number, scaleY: number, shearX: number, shearY: number): void; + setToSetupPose(): void; + getWorldRotationX(): number; + getWorldRotationY(): number; + getWorldScaleX(): number; + getWorldScaleY(): number; + updateAppliedTransform(): void; + worldToLocal(world: Vector2): Vector2; + localToWorld(local: Vector2): Vector2; + worldToLocalRotation(worldRotation: number): number; + localToWorldRotation(localRotation: number): number; + rotateWorld(degrees: number): void; + } +} +declare namespace sp.spine { + class BoneData { + index: number; + name: string; + parent: BoneData; + length: number; + x: number; + y: number; + rotation: number; + scaleX: number; + scaleY: number; + shearX: number; + shearY: number; + transformMode: TransformMode; + skinRequired: boolean; + color: Color; + constructor(index: number, name: string, parent: BoneData); + } + enum TransformMode { + Normal = 0, + OnlyTranslation = 1, + NoRotationOrReflection = 2, + NoScale = 3, + NoScaleOrReflection = 4 + } +} +declare namespace sp.spine { + abstract class ConstraintData { + name: string; + order: number; + skinRequired: boolean; + constructor(name: string, order: number, skinRequired: boolean); + } +} +declare namespace sp.spine { + class Event { + data: EventData; + intValue: number; + floatValue: number; + stringValue: string; + time: number; + volume: number; + balance: number; + constructor(time: number, data: EventData); + } +} +declare namespace sp.spine { + class EventData { + name: string; + intValue: number; + floatValue: number; + stringValue: string; + audioPath: string; + volume: number; + balance: number; + constructor(name: string); + } +} +declare namespace sp.spine { + class IkConstraint implements Updatable { + data: IkConstraintData; + bones: Array; + target: Bone; + bendDirection: number; + compress: boolean; + stretch: boolean; + mix: number; + softness: number; + active: boolean; + constructor(data: IkConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + apply1(bone: Bone, targetX: number, targetY: number, compress: boolean, stretch: boolean, uniform: boolean, alpha: number): void; + apply2(parent: Bone, child: Bone, targetX: number, targetY: number, bendDir: number, stretch: boolean, softness: number, alpha: number): void; + } +} +declare namespace sp.spine { + class IkConstraintData extends ConstraintData { + bones: BoneData[]; + target: BoneData; + bendDirection: number; + compress: boolean; + stretch: boolean; + uniform: boolean; + mix: number; + softness: number; + constructor(name: string); + } +} +declare namespace sp.spine { + class PathConstraint implements Updatable { + static NONE: number; + static BEFORE: number; + static AFTER: number; + static epsilon: number; + data: PathConstraintData; + bones: Array; + target: Slot; + position: number; + spacing: number; + rotateMix: number; + translateMix: number; + spaces: number[]; + positions: number[]; + world: number[]; + curves: number[]; + lengths: number[]; + segments: number[]; + active: boolean; + constructor(data: PathConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + computeWorldPositions(path: PathAttachment, spacesCount: number, tangents: boolean, percentPosition: boolean, percentSpacing: boolean): number[]; + addBeforePosition(p: number, temp: Array, i: number, out: Array, o: number): void; + addAfterPosition(p: number, temp: Array, i: number, out: Array, o: number): void; + addCurvePosition(p: number, x1: number, y1: number, cx1: number, cy1: number, cx2: number, cy2: number, x2: number, y2: number, out: Array, o: number, tangents: boolean): void; + } +} +declare namespace sp.spine { + class PathConstraintData extends ConstraintData { + bones: BoneData[]; + target: SlotData; + positionMode: PositionMode; + spacingMode: SpacingMode; + rotateMode: RotateMode; + offsetRotation: number; + position: number; + spacing: number; + rotateMix: number; + translateMix: number; + constructor(name: string); + } + enum PositionMode { + Fixed = 0, + Percent = 1 + } + enum SpacingMode { + Length = 0, + Fixed = 1, + Percent = 2 + } + enum RotateMode { + Tangent = 0, + Chain = 1, + ChainScale = 2 + } +} +declare namespace sp.spine { + class SharedAssetManager implements Disposable { + private pathPrefix; + private clientAssets; + private queuedAssets; + private rawAssets; + private errors; + constructor(pathPrefix?: string); + private queueAsset; + loadText(clientId: string, path: string): void; + loadJson(clientId: string, path: string): void; + loadTexture(clientId: string, textureLoader: (image: HTMLImageElement) => any, path: string): void; + get(clientId: string, path: string): any; + private updateClientAssets; + isLoadingComplete(clientId: string): boolean; + dispose(): void; + hasErrors(): boolean; + getErrors(): Map; + } +} +declare namespace sp.spine { + class Skeleton { + data: SkeletonData; + bones: Array; + slots: Array; + drawOrder: Array; + ikConstraints: Array; + transformConstraints: Array; + pathConstraints: Array; + _updateCache: Updatable[]; + updateCacheReset: Updatable[]; + skin: Skin; + color: Color; + time: number; + scaleX: number; + scaleY: number; + x: number; + y: number; + constructor(data: SkeletonData); + updateCache(): void; + sortIkConstraint(constraint: IkConstraint): void; + sortPathConstraint(constraint: PathConstraint): void; + sortTransformConstraint(constraint: TransformConstraint): void; + sortPathConstraintAttachment(skin: Skin, slotIndex: number, slotBone: Bone): void; + sortPathConstraintAttachmentWith(attachment: Attachment, slotBone: Bone): void; + sortBone(bone: Bone): void; + sortReset(bones: Array): void; + updateWorldTransform(): void; + setToSetupPose(): void; + setBonesToSetupPose(): void; + setSlotsToSetupPose(): void; + getRootBone(): Bone; + findBone(boneName: string): Bone; + findBoneIndex(boneName: string): number; + findSlot(slotName: string): Slot; + findSlotIndex(slotName: string): number; + setSkinByName(skinName: string): void; + setSkin(newSkin: Skin): void; + getAttachmentByName(slotName: string, attachmentName: string): Attachment; + getAttachment(slotIndex: number, attachmentName: string): Attachment; + setAttachment(slotName: string, attachmentName: string): void; + findIkConstraint(constraintName: string): IkConstraint; + findTransformConstraint(constraintName: string): TransformConstraint; + findPathConstraint(constraintName: string): PathConstraint; + getBounds(offset: Vector2, size: Vector2, temp?: Array): void; + update(delta: number): void; + } +} +declare namespace sp.spine { + class SkeletonBinary { + static AttachmentTypeValues: number[]; + static TransformModeValues: TransformMode[]; + static PositionModeValues: PositionMode[]; + static SpacingModeValues: SpacingMode[]; + static RotateModeValues: RotateMode[]; + static BlendModeValues: BlendMode[]; + static BONE_ROTATE: number; + static BONE_TRANSLATE: number; + static BONE_SCALE: number; + static BONE_SHEAR: number; + static SLOT_ATTACHMENT: number; + static SLOT_COLOR: number; + static SLOT_TWO_COLOR: number; + static PATH_POSITION: number; + static PATH_SPACING: number; + static PATH_MIX: number; + static CURVE_LINEAR: number; + static CURVE_STEPPED: number; + static CURVE_BEZIER: number; + scale: number; + attachmentLoader: AttachmentLoader; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(binary: Uint8Array): SkeletonData; + private readSkin; + private readAttachment; + private readVertices; + private readFloatArray; + private readShortArray; + private readAnimation; + private readCurve; + setCurve(timeline: CurveTimeline, frameIndex: number, cx1: number, cy1: number, cx2: number, cy2: number): void; + } +} +declare namespace sp.spine { + class SkeletonBounds { + minX: number; + minY: number; + maxX: number; + maxY: number; + boundingBoxes: BoundingBoxAttachment[]; + polygons: ArrayLike[]; + private polygonPool; + update(skeleton: Skeleton, updateAabb: boolean): void; + aabbCompute(): void; + aabbContainsPoint(x: number, y: number): boolean; + aabbIntersectsSegment(x1: number, y1: number, x2: number, y2: number): boolean; + aabbIntersectsSkeleton(bounds: SkeletonBounds): boolean; + containsPoint(x: number, y: number): BoundingBoxAttachment; + containsPointPolygon(polygon: ArrayLike, x: number, y: number): boolean; + intersectsSegment(x1: number, y1: number, x2: number, y2: number): BoundingBoxAttachment; + intersectsSegmentPolygon(polygon: ArrayLike, x1: number, y1: number, x2: number, y2: number): boolean; + getPolygon(boundingBox: BoundingBoxAttachment): ArrayLike; + getWidth(): number; + getHeight(): number; + } +} +declare namespace sp.spine { + class SkeletonClipping { + private triangulator; + private clippingPolygon; + private clipOutput; + clippedVertices: number[]; + clippedTriangles: number[]; + private scratch; + private clipAttachment; + private clippingPolygons; + clipStart(slot: Slot, clip: ClippingAttachment): number; + clipEndWithSlot(slot: Slot): void; + clipEnd(): void; + isClipping(): boolean; + clipTriangles(vertices: ArrayLike, verticesLength: number, triangles: ArrayLike, trianglesLength: number, uvs: ArrayLike, light: Color, dark: Color, twoColor: boolean): void; + clip(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, clippingArea: Array, output: Array): boolean; + static makeClockwise(polygon: ArrayLike): void; + } +} +declare namespace sp.spine { + class SkeletonData { + name: string; + bones: BoneData[]; + slots: SlotData[]; + skins: Skin[]; + defaultSkin: Skin; + events: EventData[]; + animations: Animation[]; + ikConstraints: IkConstraintData[]; + transformConstraints: TransformConstraintData[]; + pathConstraints: PathConstraintData[]; + x: number; + y: number; + width: number; + height: number; + version: string; + hash: string; + fps: number; + imagesPath: string; + audioPath: string; + findBone(boneName: string): BoneData; + findBoneIndex(boneName: string): number; + findSlot(slotName: string): SlotData; + findSlotIndex(slotName: string): number; + findSkin(skinName: string): Skin; + findEvent(eventDataName: string): EventData; + findAnimation(animationName: string): Animation; + findIkConstraint(constraintName: string): IkConstraintData; + findTransformConstraint(constraintName: string): TransformConstraintData; + findPathConstraint(constraintName: string): PathConstraintData; + findPathConstraintIndex(pathConstraintName: string): number; + } +} +declare namespace sp.spine { + class SkeletonJson { + attachmentLoader: AttachmentLoader; + scale: number; + private linkedMeshes; + constructor(attachmentLoader: AttachmentLoader); + readSkeletonData(json: string | any): SkeletonData; + readAttachment(map: any, skin: Skin, slotIndex: number, name: string, skeletonData: SkeletonData): Attachment; + readVertices(map: any, attachment: VertexAttachment, verticesLength: number): void; + readAnimation(map: any, name: string, skeletonData: SkeletonData): void; + readCurve(map: any, timeline: CurveTimeline, frameIndex: number): void; + getValue(map: any, prop: string, defaultValue: any): any; + static blendModeFromString(str: string): BlendMode; + static positionModeFromString(str: string): PositionMode; + static spacingModeFromString(str: string): SpacingMode; + static rotateModeFromString(str: string): RotateMode; + static transformModeFromString(str: string): TransformMode; + } +} +declare namespace sp.spine { + class SkinEntry { + slotIndex: number; + name: string; + attachment: Attachment; + constructor(slotIndex: number, name: string, attachment: Attachment); + } + class Skin { + name: string; + attachments: Map[]; + bones: BoneData[]; + constraints: ConstraintData[]; + constructor(name: string); + setAttachment(slotIndex: number, name: string, attachment: Attachment): void; + addSkin(skin: Skin): void; + copySkin(skin: Skin): void; + getAttachment(slotIndex: number, name: string): Attachment; + removeAttachment(slotIndex: number, name: string): void; + getAttachments(): Array; + getAttachmentsForSlot(slotIndex: number, attachments: Array): void; + clear(): void; + attachAll(skeleton: Skeleton, oldSkin: Skin): void; + } +} +declare namespace sp.spine { + class Slot { + data: SlotData; + bone: Bone; + color: Color; + darkColor: Color; + private attachment; + private attachmentTime; + deform: number[]; + constructor(data: SlotData, bone: Bone); + getSkeleton(): Skeleton; + getAttachment(): Attachment; + setAttachment(attachment: Attachment): void; + setAttachmentTime(time: number): void; + getAttachmentTime(): number; + setToSetupPose(): void; + } +} +declare namespace sp.spine { + class SlotData { + index: number; + name: string; + boneData: BoneData; + color: Color; + darkColor: Color; + attachmentName: string; + blendMode: BlendMode; + constructor(index: number, name: string, boneData: BoneData); + } +} +declare namespace sp.spine { + abstract class Texture { + protected _image: HTMLImageElement; + constructor(image: HTMLImageElement); + getImage(): HTMLImageElement; + abstract setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + abstract setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + abstract dispose(): void; + static filterFromString(text: string): TextureFilter; + static wrapFromString(text: string): TextureWrap; + } + enum TextureFilter { + Nearest = 9728, + Linear = 9729, + MipMap = 9987, + MipMapNearestNearest = 9984, + MipMapLinearNearest = 9985, + MipMapNearestLinear = 9986, + MipMapLinearLinear = 9987 + } + enum TextureWrap { + MirroredRepeat = 33648, + ClampToEdge = 33071, + Repeat = 10497 + } + class TextureRegion { + renderObject: any; + u: number; + v: number; + u2: number; + v2: number; + width: number; + height: number; + rotate: boolean; + offsetX: number; + offsetY: number; + originalWidth: number; + originalHeight: number; + } + class FakeTexture extends Texture { + setFilters(minFilter: TextureFilter, magFilter: TextureFilter): void; + setWraps(uWrap: TextureWrap, vWrap: TextureWrap): void; + dispose(): void; + } +} +declare namespace sp.spine { + class TextureAtlas implements Disposable { + pages: TextureAtlasPage[]; + regions: TextureAtlasRegion[]; + constructor(atlasText: string, textureLoader: (path: string) => any); + private load; + findRegion(name: string): TextureAtlasRegion; + dispose(): void; + } + class TextureAtlasPage { + name: string; + minFilter: TextureFilter; + magFilter: TextureFilter; + uWrap: TextureWrap; + vWrap: TextureWrap; + texture: Texture; + width: number; + height: number; + } + class TextureAtlasRegion extends TextureRegion { + page: TextureAtlasPage; + name: string; + x: number; + y: number; + index: number; + rotate: boolean; + degrees: number; + texture: Texture; + } +} +declare namespace sp.spine { + class TransformConstraint implements Updatable { + data: TransformConstraintData; + bones: Array; + target: Bone; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + temp: Vector2; + active: boolean; + constructor(data: TransformConstraintData, skeleton: Skeleton); + isActive(): boolean; + apply(): void; + update(): void; + applyAbsoluteWorld(): void; + applyRelativeWorld(): void; + applyAbsoluteLocal(): void; + applyRelativeLocal(): void; + } +} +declare namespace sp.spine { + class TransformConstraintData extends ConstraintData { + bones: BoneData[]; + target: BoneData; + rotateMix: number; + translateMix: number; + scaleMix: number; + shearMix: number; + offsetRotation: number; + offsetX: number; + offsetY: number; + offsetScaleX: number; + offsetScaleY: number; + offsetShearY: number; + relative: boolean; + local: boolean; + constructor(name: string); + } +} +declare namespace sp.spine { + class Triangulator { + private convexPolygons; + private convexPolygonsIndices; + private indicesArray; + private isConcaveArray; + private triangles; + private polygonPool; + private polygonIndicesPool; + triangulate(verticesArray: ArrayLike): Array; + decompose(verticesArray: Array, triangles: Array): Array>; + private static isConcave; + private static positiveArea; + private static winding; + } +} +declare namespace sp.spine { + interface Updatable { + update(): void; + isActive(): boolean; + } +} +declare namespace sp.spine { + interface Map { + [key: string]: T; + } + class IntSet { + array: number[]; + add(value: number): boolean; + contains(value: number): boolean; + remove(value: number): void; + clear(): void; + } + interface Disposable { + dispose(): void; + } + interface Restorable { + restore(): void; + } + class Color { + r: number; + g: number; + b: number; + a: number; + static WHITE: Color; + static RED: Color; + static GREEN: Color; + static BLUE: Color; + static MAGENTA: Color; + constructor(r?: number, g?: number, b?: number, a?: number); + set(r: number, g: number, b: number, a: number): this; + setFromColor(c: Color): this; + setFromString(hex: string): this; + add(r: number, g: number, b: number, a: number): this; + clamp(): this; + static rgba8888ToColor(color: Color, value: number): void; + static rgb888ToColor(color: Color, value: number): void; + } + class MathUtils { + static PI: number; + static PI2: number; + static radiansToDegrees: number; + static radDeg: number; + static degreesToRadians: number; + static degRad: number; + static clamp(value: number, min: number, max: number): number; + static cosDeg(degrees: number): number; + static sinDeg(degrees: number): number; + static signum(value: number): number; + static toInt(x: number): number; + static cbrt(x: number): number; + static randomTriangular(min: number, max: number): number; + static randomTriangularWith(min: number, max: number, mode: number): number; + } + abstract class Interpolation { + protected abstract applyInternal(a: number): number; + apply(start: number, end: number, a: number): number; + } + class Pow extends Interpolation { + protected power: number; + constructor(power: number); + applyInternal(a: number): number; + } + class PowOut extends Pow { + constructor(power: number); + applyInternal(a: number): number; + } + class Utils { + static SUPPORTS_TYPED_ARRAYS: boolean; + static arrayCopy(source: ArrayLike, sourceStart: number, dest: ArrayLike, destStart: number, numElements: number): void; + static setArraySize(array: Array, size: number, value?: any): Array; + static ensureArrayCapacity(array: Array, size: number, value?: any): Array; + static newArray(size: number, defaultValue: T): Array; + static newFloatArray(size: number): ArrayLike; + static newShortArray(size: number): ArrayLike; + static toFloatArray(array: Array): number[] | Float32Array; + static toSinglePrecision(value: number): number; + static webkit602BugfixHelper(alpha: number, blend: MixBlend): void; + static contains(array: Array, element: T, identity?: boolean): boolean; + } + class DebugUtils { + static logBones(skeleton: Skeleton): void; + } + class Pool { + private items; + private instantiator; + constructor(instantiator: () => T); + obtain(): T; + free(item: T): void; + freeAll(items: ArrayLike): void; + clear(): void; + } + class Vector2 { + x: number; + y: number; + constructor(x?: number, y?: number); + set(x: number, y: number): Vector2; + length(): number; + normalize(): this; + } + class TimeKeeper { + maxDelta: number; + framesPerSecond: number; + delta: number; + totalTime: number; + private lastTime; + private frameCount; + private frameTime; + update(): void; + } + interface ArrayLike { + length: number; + [n: number]: T; + } + class WindowedMean { + values: Array; + addedValues: number; + lastValue: number; + mean: number; + dirty: boolean; + constructor(windowSize?: number); + hasEnoughData(): boolean; + addValue(value: number): void; + getMean(): number; + } +} +declare namespace sp.spine { + interface VertexEffect { + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} +interface Math { + fround(n: number): number; +} +declare namespace sp.spine { + abstract class Attachment { + name: string; + constructor(name: string); + abstract copy(): Attachment; + } + abstract class VertexAttachment extends Attachment { + private static nextID; + id: number; + bones: Array; + vertices: ArrayLike; + worldVerticesLength: number; + deformAttachment: VertexAttachment; + constructor(name: string); + computeWorldVertices(slot: Slot, start: number, count: number, worldVertices: ArrayLike, offset: number, stride: number): void; + copyTo(attachment: VertexAttachment): void; + } +} +declare namespace sp.spine { + interface AttachmentLoader { + newRegionAttachment(skin: Skin, name: string, path: string): RegionAttachment; + newMeshAttachment(skin: Skin, name: string, path: string): MeshAttachment; + newBoundingBoxAttachment(skin: Skin, name: string): BoundingBoxAttachment; + newPathAttachment(skin: Skin, name: string): PathAttachment; + newPointAttachment(skin: Skin, name: string): PointAttachment; + newClippingAttachment(skin: Skin, name: string): ClippingAttachment; + } +} +declare namespace sp.spine { + enum AttachmentType { + Region = 0, + BoundingBox = 1, + Mesh = 2, + LinkedMesh = 3, + Path = 4, + Point = 5, + Clipping = 6 + } +} +declare namespace sp.spine { + class BoundingBoxAttachment extends VertexAttachment { + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare namespace sp.spine { + class ClippingAttachment extends VertexAttachment { + endSlot: SlotData; + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare namespace sp.spine { + class MeshAttachment extends VertexAttachment { + region: TextureRegion; + path: string; + regionUVs: ArrayLike; + uvs: ArrayLike; + triangles: Array; + color: Color; + width: number; + height: number; + hullLength: number; + edges: Array; + private parentMesh; + tempColor: Color; + constructor(name: string); + updateUVs(): void; + getParentMesh(): MeshAttachment; + setParentMesh(parentMesh: MeshAttachment): void; + copy(): Attachment; + newLinkedMesh(): MeshAttachment; + } +} +declare namespace sp.spine { + class PathAttachment extends VertexAttachment { + lengths: Array; + closed: boolean; + constantSpeed: boolean; + color: Color; + constructor(name: string); + copy(): Attachment; + } +} +declare namespace sp.spine { + class PointAttachment extends VertexAttachment { + x: number; + y: number; + rotation: number; + color: Color; + constructor(name: string); + computeWorldPosition(bone: Bone, point: Vector2): Vector2; + computeWorldRotation(bone: Bone): number; + copy(): Attachment; + } +} +declare namespace sp.spine { + class RegionAttachment extends Attachment { + static OX1: number; + static OY1: number; + static OX2: number; + static OY2: number; + static OX3: number; + static OY3: number; + static OX4: number; + static OY4: number; + static X1: number; + static Y1: number; + static C1R: number; + static C1G: number; + static C1B: number; + static C1A: number; + static U1: number; + static V1: number; + static X2: number; + static Y2: number; + static C2R: number; + static C2G: number; + static C2B: number; + static C2A: number; + static U2: number; + static V2: number; + static X3: number; + static Y3: number; + static C3R: number; + static C3G: number; + static C3B: number; + static C3A: number; + static U3: number; + static V3: number; + static X4: number; + static Y4: number; + static C4R: number; + static C4G: number; + static C4B: number; + static C4A: number; + static U4: number; + static V4: number; + x: number; + y: number; + scaleX: number; + scaleY: number; + rotation: number; + width: number; + height: number; + color: Color; + path: string; + rendererObject: any; + region: TextureRegion; + offset: ArrayLike; + uvs: ArrayLike; + tempColor: Color; + constructor(name: string); + updateOffset(): void; + setRegion(region: TextureRegion): void; + computeWorldVertices(bone: Bone, worldVertices: ArrayLike, offset: number, stride: number): void; + copy(): Attachment; + } +} +declare namespace sp.spine { + class JitterEffect implements VertexEffect { + jitterX: number; + jitterY: number; + constructor(jitterX: number, jitterY: number); + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} +declare namespace sp.spine { + class SwirlEffect implements VertexEffect { + static interpolation: PowOut; + centerX: number; + centerY: number; + radius: number; + angle: number; + private worldX; + private worldY; + constructor(radius: number); + begin(skeleton: Skeleton): void; + transform(position: Vector2, uv: Vector2, light: Color, dark: Color): void; + end(): void; + } +} + +/** + * API for jsb module + * Author: haroel + * Homepage: https://github.com/haroel/creatorexDTS + */ +declare namespace jsb{ + export module reflection{ + /** + * https://docs.cocos.com/creator/manual/zh/advanced-topics/java-reflection.html + * call OBJC/Java static methods + * + * @param className + * @param methodName + * @param methodSignature + * @param parameters + */ + export function callStaticMethod (className: string, methodName: string, methodSignature: string, ...parameters:any): any; + } + /** + * 下载任务对象 + */ + export type DownloaderTask = { requestURL: string, storagePath: string, identifier: string }; + + /** + * Http file downloader for jsb! + */ + export class Downloader{ + /** + * create a download task + * @param requestURL + * @param storagePath + * @param identifier + */ + createDownloadFileTask (requestURL:string, storagePath:string, identifier?:string): DownloaderTask; + + setOnFileTaskSuccess (onSucceed: (task: DownloaderTask) => void): void; + + setOnTaskProgress (onProgress: (task: DownloaderTask, bytesReceived: number, totalBytesReceived: number, totalBytesExpected: number) => void): void; + + setOnTaskError (onError: (task: DownloaderTask, errorCode: number, errorCodeInternal: number, errorStr: string) => void): void; + + } + + export interface ManifestAsset { + md5: string; + path: string; + compressed: boolean; + size: number; + downloadState: number; + } + + export class Manifest { + constructor (manifestUrl: string); + constructor (content: string, manifestRoot: string); + parseFile (manifestUrl: string): void; + parseJSONString (content: string, manifestRoot: string): void; + + getManifestRoot (): string; + getManifestFileUrl (): string; + getVersionFileUrl (): string; + getSearchPaths (): [string]; + getVersion (): string; + getPackageUrl (): boolean; + + setUpdating (isUpdating: boolean): void; + isUpdating (): boolean; + isVersionLoaded (): boolean; + isLoaded (): boolean; + } + + export class EventAssetsManager { + // EventCode + static ERROR_NO_LOCAL_MANIFEST: number; + static ERROR_DOWNLOAD_MANIFEST: number; + static ERROR_PARSE_MANIFEST: number; + static NEW_VERSION_FOUND: number; + static ALREADY_UP_TO_DATE: number; + static UPDATE_PROGRESSION: number; + static ASSET_UPDATED: number; + static ERROR_UPDATING: number; + static UPDATE_FINISHED: number; + static UPDATE_FAILED: number; + static ERROR_DECOMPRESS: number; + + constructor (eventName: string, manager: AssetsManager, eventCode: number, + assetId?: string, message?: string, curleCode?: number, curlmCode?: number); + getAssetsManagerEx (): AssetsManager; + isResuming (): boolean; + + getDownloadedFiles (): number; + getDownloadedBytes (): number; + getTotalFiles (): number; + getTotalBytes (): number; + getPercent (): number; + getPercentByFile (): number; + + getEventCode (): number; + getMessage (): string; + getAssetId (): string; + getCURLECode (): number; + getCURLMCode (): number; + } + + export module AssetsManager { + export enum State { + UNINITED, + UNCHECKED, + PREDOWNLOAD_VERSION, + DOWNLOADING_VERSION, + VERSION_LOADED, + PREDOWNLOAD_MANIFEST, + DOWNLOADING_MANIFEST, + MANIFEST_LOADED, + NEED_UPDATE, + READY_TO_UPDATE, + UPDATING, + UNZIPPING, + UP_TO_DATE, + FAIL_TO_UPDATE, + } + } + + export class AssetsManager { + constructor (manifestUrl: string, storagePath: string, versionCompareHandle?: (versionA: string, versionB: string) => number); + static create (manifestUrl: string, storagePath: string): AssetsManager; + + getState (): AssetsManager.State; + getStoragePath (): string + getMaxConcurrentTask (): number; + // setMaxConcurrentTask (max: number): void; // actually not supported + + checkUpdate (): void; + prepareUpdate (): void; + update (): void; + isResuming (): boolean; + + getDownloadedFiles (): number; + getDownloadedBytes (): number; + getTotalFiles (): number; + getTotalBytes (): number; + downloadFailedAssets (): void; + + getLocalManifest (): Manifest; + loadLocalManifest (manifestUrl: string): boolean; + loadLocalManifest (localManifest: Manifest, storagePath: string): boolean; + getRemoteManifest (): Manifest; + loadRemoteManifest (remoteManifest: Manifest): boolean; + + /** + * Setup your own version compare handler, versionA and B is versions in string. + * if the return value greater than 0, versionA is greater than B, + * if the return value equals 0, versionA equals to B, + * if the return value smaller than 0, versionA is smaller than B. + */ + setVersionCompareHandle (versionCompareHandle?: (versionA: string, versionB: string) => number): void; + /** + * Setup the verification callback, Return true if the verification passed, otherwise return false + */ + setVerifyCallback (verifyCallback: (path: string, asset: ManifestAsset) => boolean): void; + setEventCallback (eventCallback: (event: EventAssetsManager) => void): void; + } + + /** + * FileUtils Helper class to handle file operations. + */ + export module fileUtils{ + /** + * Checks whether the path is an absolute path. + * + * @note On Android, if the parameter passed in is relative to "@assets/", this method will treat it as an absolute path. + * Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path. + * + * @param path The path that needs to be checked. + * @return True if it's an absolute path, false if not. + */ + export function isAbsolutePath (path:string):boolean; + /** Returns the fullpath for a given filename. + + First it will try to get a new filename from the "filenameLookup" dictionary. + If a new filename can't be found on the dictionary, it will use the original filename. + Then it will try to obtain the full path of the filename using the FileUtils search rules: resolutions, and search paths. + The file search is based on the array element order of search paths and resolution directories. + + For instance: + + We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths, + and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd") + to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/". + + If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`. + Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows: + + /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/sprite.pvr.gz (if not found, search next) + internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next) + internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next) + internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next) + internal_dir/sprite.pvr.gz (if not found, return "sprite.png") + + If the filename contains relative path like "gamescene/uilayer/sprite.png", + and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`. + The file search order will be: + + /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) + /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next) + internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) + internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) + internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) + internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png") + + If the new file can't be found on the file system, it will return the parameter filename directly. + + This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable, + you might need to load different resources for a given file in the different platforms. + + @since v2.1 + */ + export function fullPathForFilename (filename:string):string; + /** + * Gets string from a file. + */ + export function getStringFromFile (filename:string):string; + /** + * Removes a file. + * + * @param filepath The full path of the file, it must be an absolute path. + * @return True if the file have been removed successfully, false if not. + */ + export function removeFile (filepath:string):boolean; + /** + * Checks whether the path is a directory. + * + * @param dirPath The path of the directory, it could be a relative or an absolute path. + * @return True if the directory exists, false if not. + */ + export function isDirectoryExist (dirPath:string):boolean; + /** + * Normalize: remove . and .. + * @param filepath + */ + export function normalizePath (filepath:string):string; + /** + * Get default resource root path. + */ + export function getDefaultResourceRootPath ():string; + /** + * Loads the filenameLookup dictionary from the contents of a filename. + * + * @note The plist file name should follow the format below: + * + * @code + * + * + * + * + * filenames + * + * sounds/click.wav + * sounds/click.caf + * sounds/endgame.wav + * sounds/endgame.caf + * sounds/gem-0.wav + * sounds/gem-0.caf + * + * metadata + * + * version + * 1 + * + * + * + * @endcode + * @param filename The plist file name. + * + @since v2.1 + * @js loadFilenameLookup + * @lua loadFilenameLookup + */ + export function loadFilenameLookup (filepath:string):void; + /** Checks whether to pop up a message box when failed to load an image. + * @return True if pop up a message box when failed to load an image, false if not. + */ + export function isPopupNotify ():boolean; + /** + * Sets whether to pop-up a message box when failed to load an image. + */ + export function setPopupNotify (notify:boolean):void; + + // Converts the contents of a file to a ValueVector. + // This method is used internally. + export function getValueVectorFromFile (filepath:string):Array; + /** + * Gets the array of search paths. + * + * @return The array of search paths which may contain the prefix of default resource root path. + * @note In best practise, getter function should return the value of setter function passes in. + * But since we should not break the compatibility, we keep using the old logic. + * Therefore, If you want to get the original search paths, please call 'getOriginalSearchPaths()' instead. + * @see fullPathForFilename(const char*). + * @lua NA + */ + export function getSearchPaths ():Array; + /** + * + * @param filepath + */ + export function getFileDir (filepath:string):string; + /** + * write a ValueMap into a plist file + * + *@param dict the ValueMap want to save (key,value) + *@param fullPath The full path to the file you want to save a string + *@return bool + */ + export function writeToFile ( valueMap:any ):boolean; + /** + * Gets the original search path array set by 'setSearchPaths' or 'addSearchPath'. + * @return The array of the original search paths + */ + export function getOriginalSearchPaths ():Array; + /** + * List all files in a directory. + * + * @param dirPath The path of the directory, it could be a relative or an absolute path. + * @return File paths in a string vector + */ + export function listFiles (filepath:string):Array; + /** + * Converts the contents of a file to a ValueMap. + * @param filename The filename of the file to gets content. + * @return ValueMap of the file contents. + * @note This method is used internally. + */ + export function getValueMapFromFile (filepath:string):any; + /** + * Retrieve the file size. + * + * @note If a relative path was passed in, it will be inserted a default root path at the beginning. + * @param filepath The path of the file, it could be a relative or absolute path. + * @return The file size. + */ + export function getFileSize (filepath:string):number; + + /** Converts the contents of a file to a ValueMap. + * This method is used internally. + */ + export function getValueMapFromData (filedata:string,filesize:number):any; + /** + * Removes a directory. + * + * @param dirPath The full path of the directory, it must be an absolute path. + * @return True if the directory have been removed successfully, false if not. + */ + export function removeDirectory (dirPath:string):boolean; + /** + * Sets the array of search paths. + * + * You can use this array to modify the search path of the resources. + * If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array. + * + * @note This method could access relative path and absolute path. + * If the relative path was passed to the vector, FileUtils will add the default resource directory before the relative path. + * For instance: + * On Android, the default resource root path is "@assets/". + * If "/mnt/sdcard/" and "resources-large" were set to the search paths vector, + * "resources-large" will be converted to "@assets/resources-large" since it was a relative path. + * + * @param searchPaths The array contains search paths. + * @see fullPathForFilename(const char*) + * @since v2.1 + * In js:var setSearchPaths(var jsval); + * @lua NA + */ + export function setSearchPaths ( searchPath:Array):void; + /** + * write a string into a file + * + * @param dataStr the string want to save + * @param fullPath The full path to the file you want to save a string + * @return bool True if write success + */ + export function writeStringToFile (dataStr:string,fullPath:string):boolean; + /** + * Sets the array that contains the search order of the resources. + * + * @param searchResolutionsOrder The source array that contains the search order of the resources. + * @see getSearchResolutionsOrder(), fullPathForFilename(const char*). + * @since v2.1 + * In js:var setSearchResolutionsOrder(var jsval) + * @lua NA + */ + export function setSearchResolutionsOrder (searchResolutionsOrder:Array):void; + /** + * Append search order of the resources. + * + * @see setSearchResolutionsOrder(), fullPathForFilename(). + * @since v2.1 + */ + export function addSearchResolutionsOrder (order:string,front:boolean):void; + /** + * Add search path. + * + * @since v2.1 + */ + export function addSearchPath (path:string,front:boolean):void; + /** + * write ValueVector into a plist file + * + *@param vecData the ValueVector want to save + *@param fullPath The full path to the file you want to save a string + *@return bool + */ + export function writeValueVectorToFile (vecData:Array,fullPath:string):boolean; + /** + * Checks whether a file exists. + * + * @note If a relative path was passed in, it will be inserted a default root path at the beginning. + * @param filename The path of the file, it could be a relative or absolute path. + * @return True if the file exists, false if not. + */ + export function isFileExist (filename:string):boolean; + /**©∫ + * Purges full path caches. + */ + export function purgeCachedEntries ():void; + /** + * Gets full path from a file name and the path of the relative file. + * @param filename The file name. + * @param relativeFile The path of the relative file. + * @return The full path. + * e.g. filename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist + * Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) + * + */ + export function fullPathFromRelativeFile (filename:string,relativeFile:string):string; + /** + * Windows fopen can't support UTF-8 filename + * Need convert all parameters fopen and other 3rd-party libs + * + * @param filenameUtf8 std::string name file for conversion from utf-8 + * @return std::string ansi filename in current locale + */ + export function getSuitableFOpen (filenameUtf8:string):string; + /** + * write ValueMap into a plist file + * + *@param dict the ValueMap want to save + *@param fullPath The full path to the file you want to save a string + *@return bool + */ + export function writeValueMapToFile (dict:any,fullPath:string):string; + /** + * Gets filename extension is a suffix (separated from the base filename by a dot) in lower case. + * Examples of filename extensions are .png, .jpeg, .exe, .dmg and .txt. + * @param filePath The path of the file, it could be a relative or absolute path. + * @return suffix for filename in lower case or empty if a dot not found. + */ + export function getFileExtension (filePath:string):string; + /** + * Sets writable path. + */ + export function setWritablePath (writablePath:string):void; + /** + * Set default resource root path. + */ + export function setDefaultResourceRootPath (filepath:string):void; + + /** + * Gets the array that contains the search order of the resources. + * + * @see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*). + * @since v2.1 + * @lua NA + */ + export function getSearchResolutionsOrder ():Array; + /** + * Creates a directory. + * + * @param dirPath The path of the directory, it must be an absolute path. + * @return True if the directory have been created successfully, false if not. + */ + export function createDirectory (dirPath:string):string; + /** + * List all files recursively in a directory. + * + * @param dirPath The path of the directory, it could be a relative or an absolute path. + * @return File paths in a string vector + */ + export function listFilesRecursively (dirPath:string, files:Array):void; + /** + * Gets the writable path. + * @return The path that can be write/read a file in + */ + export function getWritablePath ():string; + } +} + +/** Running in the editor. */ +declare const CC_EDITOR: boolean; +/** Preview in browser or simulator. */ +declare const CC_PREVIEW: boolean; +/** Running in the editor or preview. */ +declare const CC_DEV: boolean; +/** Running in the editor or preview, or build in debug mode. */ +declare const CC_DEBUG: boolean; +/** Running in published project. */ +declare const CC_BUILD: boolean; +/** Running in native platforms (mobile app, desktop app, or simulator). */ +declare const CC_JSB: boolean; +/** Running in runtime environments. */ +declare const CC_RUNTIME: boolean; +/** Running in the engine's unit test. */ +declare const CC_TEST: boolean; +/** Running in the WeChat Mini Game. */ +declare const CC_WECHATGAME: boolean; diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..80c2563 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "experimentalDecorators": true + }, + "exclude": [ + "node_modules", + ".vscode", + "library", + "local", + "settings", + "temp" + ] +} \ No newline at end of file diff --git a/library/imports/00/0004d1cf-a0ad-47d8-ab17-34d3db9d35a3.json b/library/imports/00/0004d1cf-a0ad-47d8-ab17-34d3db9d35a3.json new file mode 100644 index 0000000..ee16172 --- /dev/null +++ b/library/imports/00/0004d1cf-a0ad-47d8-ab17-34d3db9d35a3.json @@ -0,0 +1,409 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "slider", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "slider", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 20 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 20 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "31d8962d-babb-4ec7-be19-8e9f54a4ea99" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0004d1cf-a0ad-47d8-ab17-34d3db9d35a3" + }, + "fileId": "f43c4gNvOtBE41OTztiOT6T", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "Handle", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 1, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": true, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$normalSprite": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_N$pressedSprite": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "pressedSprite": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_N$hoverSprite": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "hoverSprite": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_N$disabledSprite": { + "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + }, + "_N$target": { + "__id__": 5 + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0004d1cf-a0ad-47d8-ab17-34d3db9d35a3" + }, + "fileId": "93f4b6UTvtD0Iy5hi3tLIn2", + "sync": false + }, + { + "__type__": "cc.Slider", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "direction": 0, + "slideEvents": [], + "_N$handle": { + "__id__": 7 + }, + "_N$progress": 0.5, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0004d1cf-a0ad-47d8-ab17-34d3db9d35a3" + }, + "fileId": "8ac42iRpDlK6pemd22ZO6x/", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.json b/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.png b/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/library/imports/02/0275e94c-56a7-410f-bd1a-fc7483f7d14a.png differ diff --git a/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.json b/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.png b/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.png new file mode 100644 index 0000000..147354d Binary files /dev/null and b/library/imports/02/0291c134-b3da-4098-b7b5-e397edbe947f.png differ diff --git a/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.json b/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.json new file mode 100644 index 0000000..c7dafb9 --- /dev/null +++ b/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "longyan_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.mp3 b/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.mp3 new file mode 100644 index 0000000..d74f664 Binary files /dev/null and b/library/imports/03/03f3670c-b2e3-44dc-a718-35d83b45a100.mp3 differ diff --git a/library/imports/04/04421a0b-266e-4d13-81df-1873ef3c4a83.json b/library/imports/04/04421a0b-266e-4d13-81df-1873ef3c4a83.json new file mode 100644 index 0000000..8bff0e9 --- /dev/null +++ b/library/imports/04/04421a0b-266e-4d13-81df-1873ef3c4a83.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "beginLabel", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 727, + 415, + 318, + 203 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 318, + 203 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.bin b/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.bin new file mode 100644 index 0000000..bafcd5d Binary files /dev/null and b/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.bin differ diff --git a/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.json b/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.json new file mode 100644 index 0000000..1685753 --- /dev/null +++ b/library/imports/04/046f172c-1574-488b-bbb8-6415a9adb96d.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -0.5, + "z": -0.5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.5, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 24 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 768 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 768, + "length": 72 + } +] \ No newline at end of file diff --git a/library/imports/07/07ea10be-6262-4ace-be21-526e4501b6e5.json b/library/imports/07/07ea10be-6262-4ace-be21-526e4501b6e5.json new file mode 100644 index 0000000..bb9b18a --- /dev/null +++ b/library/imports/07/07ea10be-6262-4ace-be21-526e4501b6e5.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_lizhi", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 769, + 1565, + 322, + 350 + ], + "offset": [ + -13, + -5 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/08/08e5fce4-27f5-445b-a895-f47a7ffb5176.json b/library/imports/08/08e5fce4-27f5-445b-a895-f47a7ffb5176.json new file mode 100644 index 0000000..4193c6a --- /dev/null +++ b/library/imports/08/08e5fce4-27f5-445b-a895-f47a7ffb5176.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "err2", + "texture": "59302142-671f-4983-92db-e5fa8b5aee42", + "atlas": "", + "rect": [ + 194, + 18, + 112, + 34 + ], + "offset": [ + -0.5, + 0 + ], + "originalSize": [ + 501, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/09/09f3b49a-507f-485e-b8bf-809f98dd4923.json b/library/imports/09/09f3b49a-507f-485e-b8bf-809f98dd4923.json new file mode 100644 index 0000000..29ee0ea --- /dev/null +++ b/library/imports/09/09f3b49a-507f-485e-b8bf-809f98dd4923.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "ball0", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1630, + 785, + 66, + 66 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 66, + 66 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/0a/0a9b51e5-23bb-4902-bd02-0b3f91e60173.json b/library/imports/0a/0a9b51e5-23bb-4902-bd02-0b3f91e60173.json new file mode 100644 index 0000000..206221f --- /dev/null +++ b/library/imports/0a/0a9b51e5-23bb-4902-bd02-0b3f91e60173.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "finishi_Bg", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1, + 818, + 580, + 37 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 580, + 37 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/0c/0cf30284-9073-46bc-9eba-e62b69dbbff3.json b/library/imports/0c/0cf30284-9073-46bc-9eba-e62b69dbbff3.json new file mode 100644 index 0000000..09feeb5 --- /dev/null +++ b/library/imports/0c/0cf30284-9073-46bc-9eba-e62b69dbbff3.json @@ -0,0 +1,117 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "point", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "light", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_type": 1, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 1, + "_range": 1000, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowDepthScale": 250, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0cf30284-9073-46bc-9eba-e62b69dbbff3" + }, + "fileId": "33zOkteexCqamZ4PXuwJaW", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/0d/0d784963-d024-4ea6-a7db-03be0ad63010.json b/library/imports/0d/0d784963-d024-4ea6-a7db-03be0ad63010.json new file mode 100644 index 0000000..732cefd --- /dev/null +++ b/library/imports/0d/0d784963-d024-4ea6-a7db-03be0ad63010.json @@ -0,0 +1,384 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "toggle", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "toggle", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 9 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6827ca32-0107-4552-bab2-dfb31799bb44" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0d784963-d024-4ea6-a7db-03be0ad63010" + }, + "fileId": "238bacn/jZGGYuFN7ndSzkO", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "90004ad6-2f6d-40e1-93ef-b714375c6f06" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0d784963-d024-4ea6-a7db-03be0ad63010" + }, + "fileId": "0d447hRg/9AuLVwR7+lDw/1", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 2 + }, + "_N$isChecked": true, + "toggleGroup": null, + "checkMark": { + "__id__": 6 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0d784963-d024-4ea6-a7db-03be0ad63010" + }, + "fileId": "3d81aISgHdGFblE/PZD2Cp3", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/0e/0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c.json b/library/imports/0e/0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c.json new file mode 100644 index 0000000..95d88cf --- /dev/null +++ b/library/imports/0e/0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c.json @@ -0,0 +1,101 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "tiledtile", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "New TiledTile", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 45, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.TiledTile", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_x": 0, + "_y": 0, + "_gid": 6, + "_layer": null, + "_id": "39h1tJvWtC8oLyzYKulleV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c" + }, + "fileId": "fb1JS09SVFapQy1+PoRN4F", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/0e/0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7.json b/library/imports/0e/0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7.json new file mode 100644 index 0000000..f4d3619 --- /dev/null +++ b/library/imports/0e/0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7.json @@ -0,0 +1,125 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-2d-spine", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "properties": { + "texture": { + "value": "white", + "type": 29 + }, + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + } + }, + "program": "builtin-2d-spine|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 3550530479, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\n#if USE_TINT\n in vec4 a_color0;\n#endif\nin vec2 a_uv0;\nout vec2 v_uv0;\nout vec4 v_light;\n#if USE_TINT\n out vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nuniform sampler2D texture;\nin vec2 v_uv0;\nin vec4 v_light;\n#if USE_TINT\n in vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\n#if USE_TINT\n attribute vec4 a_color0;\n#endif\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\nvoid main () {\n mat4 mvp;\n #if CC_USE_MODEL\n mvp = cc_matViewProj * cc_matWorld;\n #else\n mvp = cc_matViewProj;\n #endif\n v_uv0 = a_uv0;\n v_light = a_color;\n #if USE_TINT\n v_dark = a_color0;\n #endif\n gl_Position = mvp * vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nuniform sampler2D texture;\nvarying vec2 v_uv0;\nvarying vec4 v_light;\n#if USE_TINT\n varying vec4 v_dark;\n#endif\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvoid main () {\n vec4 texColor = vec4(1.0);\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n texColor.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n texColor.a *= texture_tmp.a;\n #else\n texColor *= texture_tmp;\n #endif\n vec4 finalColor;\n #if USE_TINT\n finalColor.a = v_light.a * texColor.a;\n finalColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n #else\n finalColor = texColor * v_light;\n #endif\n ALPHA_TEST(finalColor);\n gl_FragColor = finalColor;\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "USE_TINT", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MODEL", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ALPHA_ATLAS_texture", + "type": "boolean", + "defines": [] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 0 + } + ], + "samplers": [ + { + "name": "texture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-2d-spine|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js b/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js new file mode 100644 index 0000000..7aab291 --- /dev/null +++ b/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js @@ -0,0 +1,34 @@ +"use strict"; +cc._RF.push(module, '1002938VFRJd70RiAno9Iys', 'Storage'); +// Script/module/Storage/Storage.ts + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StorageMessage = void 0; +//缓存浏览器数据 +var StorageMessage = { + getStorage: function (key) { + var result = null; + if (cc.sys.localStorage.getItem(key)) { + var result = cc.sys.localStorage.getItem(key); + } + if (result) { + result = JSON.parse(result); + } + return result; + }, + setStorage: function (key, value) { + //主动拉起分享接口 + var temp = JSON.stringify(value); + cc.sys.localStorage.setItem(key, temp); + }, + removeStorage: function (key) { + //主动删除消息接口 + if (cc.sys.localStorage.getItem(key)) { + cc.sys.localStorage.removeItem(key); + } + }, +}; +exports.StorageMessage = StorageMessage; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js.map b/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js.map new file mode 100644 index 0000000..0aa3e8a --- /dev/null +++ b/library/imports/10/10029dfc-5454-4977-bd11-8809e8f48cac.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Storage\\Storage.ts"],"names":[],"mappings":";;;;;;;AAAA,SAAS;AACT,IAAI,cAAc,GAAG;IACjB,UAAU,EAAG,UAAS,GAAG;QACrB,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAG,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAC;YAClC,IAAI,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAC/C;QAED,IAAG,MAAM,EAAC;YACR,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,UAAU,EAAG,UAAS,GAAG,EAAC,KAAK;QAC3B,UAAU;QACV,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC1C,CAAC;IACD,aAAa,EAAG,UAAS,GAAG;QAC1B,UAAU;QACV,IAAG,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAC;YAClC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;SACpC;IACH,CAAC;CACJ,CAAC;AAEO,wCAAc","file":"","sourceRoot":"/","sourcesContent":["//缓存浏览器数据\nvar StorageMessage = {\n getStorage : function(key){\n var result = null;\n if(cc.sys.localStorage.getItem(key)){\n var result = cc.sys.localStorage.getItem(key);\n }\n \n if(result){\n result = JSON.parse(result);\n }\n return result;\n },\n setStorage : function(key,value){\n //主动拉起分享接口\n var temp = JSON.stringify(value);\n cc.sys.localStorage.setItem(key, temp)\n },\n removeStorage : function(key){\n //主动删除消息接口\n if(cc.sys.localStorage.getItem(key)){\n cc.sys.localStorage.removeItem(key)\n }\n },\n};\n\nexport { StorageMessage };"]} \ No newline at end of file diff --git a/library/imports/11/115286d1-2e10-49ee-aab4-341583f607e8.json b/library/imports/11/115286d1-2e10-49ee-aab4-341583f607e8.json new file mode 100644 index 0000000..d0941d4 --- /dev/null +++ b/library/imports/11/115286d1-2e10-49ee-aab4-341583f607e8.json @@ -0,0 +1,106 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "__builtin-editor-gizmo", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "stage": "transparent", + "blendState": { + "targets": [ + { + "blend": true, + "blendEq": 32774, + "blendAlphaEq": 32774, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": false, + "depthWrite": false + }, + "properties": { + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + } + }, + "program": "__builtin-editor-gizmo|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 2992916359, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPosition;\nvarying vec3 v_localPosition;\nvarying vec3 v_right;\nvarying vec3 v_up;\nvarying vec3 v_forward;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n v_localPosition = a_position;\n v_worldPosition = (cc_matWorld * pos).xyz;\n v_worldNormal = (cc_matWorldIT * vec4(a_normal, 0)).xyz;\n v_right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n v_up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n v_forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n gl_Position = cc_matViewProj * cc_matWorld * pos;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nmat3 transpose(mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon(inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1)\n {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2)\n {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3)\n {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4)\n {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5)\n {\n n = 0;\n }\n else if (config == 6)\n {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7)\n {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8)\n {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9)\n {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10)\n {\n n = 0;\n }\n else if (config == 11)\n {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12)\n {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13)\n {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14)\n {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15)\n {\n n = 4;\n }\n if (n == 3)\n L[3] = L[0];\n if (n == 4)\n L[4] = L[0];\n}\nfloat IntegrateEdge(vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate(vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transpose(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0)\n return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4)\n sum += IntegrateEdge(L[3], L[4]);\n if (n == 5)\n sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform DIFFUSE_COLOR {\n vec4 diffuseColor;\n};\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPosition;\nvarying vec3 v_localPosition;\nvarying vec3 v_right;\nvarying vec3 v_up;\nvarying vec3 v_forward;\nvoid main () {\n vec3 N = normalize(v_worldNormal);\n vec3 V = normalize(cc_cameraPos.xyz - v_worldPosition);\n vec3 points[4];\n vec3 up = vec3(0, 1, 0);\n points[0] = (v_forward * 3.0 + v_right + up) * 40.0;\n points[1] = (v_forward * 3.0 - v_right + up) * 40.0;\n points[2] = (v_forward * 3.0 - v_right - up) * 40.0;\n points[3] = (v_forward * 3.0 + v_right - up) * 40.0;\n vec3 diffuse = diffuseColor.rgb * (0.2 + LTC_Evaluate(N, V, v_localPosition, mat3(1), points) * 0.8);\n gl_FragColor = CCFragOutput(vec4(diffuse, diffuseColor.a));\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matWorldIT;\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPosition;\nvarying vec3 v_localPosition;\nvarying vec3 v_right;\nvarying vec3 v_up;\nvarying vec3 v_forward;\nattribute vec3 a_position;\nattribute vec3 a_normal;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n v_localPosition = a_position;\n v_worldPosition = (cc_matWorld * pos).xyz;\n v_worldNormal = (cc_matWorldIT * vec4(a_normal, 0)).xyz;\n v_right = vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]);\n v_up = vec3(cc_matView[0][1], cc_matView[1][1], cc_matView[2][1]);\n v_forward = vec3(cc_matView[0][2], cc_matView[1][2], cc_matView[2][2]);\n gl_Position = cc_matViewProj * cc_matWorld * pos;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nmat3 transpose(mat3 v) {\n mat3 tmp;\n tmp[0] = vec3(v[0].x, v[1].x, v[2].x);\n tmp[1] = vec3(v[0].y, v[1].y, v[2].y);\n tmp[2] = vec3(v[0].z, v[1].z, v[2].z);\n return tmp;\n}\nvoid ClipQuadToHorizon(inout vec3 L[5], out int n) {\n int config = 0;\n if (L[0].z > 0.0) config += 1;\n if (L[1].z > 0.0) config += 2;\n if (L[2].z > 0.0) config += 4;\n if (L[3].z > 0.0) config += 8;\n config = 15;\n n = 0;\n if (config == 0)\n {\n }\n else if (config == 1)\n {\n n = 3;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 2)\n {\n n = 3;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 3)\n {\n n = 4;\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n L[3] = -L[3].z * L[0] + L[0].z * L[3];\n }\n else if (config == 4)\n {\n n = 3;\n L[0] = -L[3].z * L[2] + L[2].z * L[3];\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n }\n else if (config == 5)\n {\n n = 0;\n }\n else if (config == 6)\n {\n n = 4;\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 7)\n {\n n = 5;\n L[4] = -L[3].z * L[0] + L[0].z * L[3];\n L[3] = -L[3].z * L[2] + L[2].z * L[3];\n }\n else if (config == 8)\n {\n n = 3;\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n L[1] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = L[3];\n }\n else if (config == 9)\n {\n n = 4;\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n L[2] = -L[2].z * L[3] + L[3].z * L[2];\n }\n else if (config == 10)\n {\n n = 0;\n }\n else if (config == 11)\n {\n n = 5;\n L[4] = L[3];\n L[3] = -L[2].z * L[3] + L[3].z * L[2];\n L[2] = -L[2].z * L[1] + L[1].z * L[2];\n }\n else if (config == 12)\n {\n n = 4;\n L[1] = -L[1].z * L[2] + L[2].z * L[1];\n L[0] = -L[0].z * L[3] + L[3].z * L[0];\n }\n else if (config == 13)\n {\n n = 5;\n L[4] = L[3];\n L[3] = L[2];\n L[2] = -L[1].z * L[2] + L[2].z * L[1];\n L[1] = -L[1].z * L[0] + L[0].z * L[1];\n }\n else if (config == 14)\n {\n n = 5;\n L[4] = -L[0].z * L[3] + L[3].z * L[0];\n L[0] = -L[0].z * L[1] + L[1].z * L[0];\n }\n else if (config == 15)\n {\n n = 4;\n }\n if (n == 3)\n L[3] = L[0];\n if (n == 4)\n L[4] = L[0];\n}\nfloat IntegrateEdge(vec3 v1, vec3 v2) {\n float cosTheta = dot(v1, v2);\n float theta = acos(cosTheta);\n return cross(v1, v2).z * ((theta > 0.001) ? theta/sin(theta) : 4.0);\n}\nvec3 LTC_Evaluate(vec3 N, vec3 V, vec3 P, mat3 Minv, vec3 points[4]) {\n vec3 T1, T2;\n T1 = normalize(V - N*dot(V, N));\n T2 = cross(N, T1);\n Minv = Minv * transpose(mat3(T1, T2, N));\n vec3 L[5];\n L[0] = Minv * (points[0] - P);\n L[1] = Minv * (points[1] - P);\n L[2] = Minv * (points[2] - P);\n L[3] = Minv * (points[3] - P);\n int n;\n ClipQuadToHorizon(L, n);\n if (n == 0)\n return vec3(0, 0, 0);\n L[0] = normalize(L[0]);\n L[1] = normalize(L[1]);\n L[2] = normalize(L[2]);\n L[3] = normalize(L[3]);\n L[4] = normalize(L[4]);\n float sum = 0.0;\n sum += IntegrateEdge(L[0], L[1]);\n sum += IntegrateEdge(L[1], L[2]);\n sum += IntegrateEdge(L[2], L[3]);\n if (n >= 4)\n sum += IntegrateEdge(L[3], L[4]);\n if (n == 5)\n sum += IntegrateEdge(L[4], L[0]);\n sum = max(0.0, sum);\n vec3 Lo_i = vec3(sum, sum, sum);\n return Lo_i;\n}\nuniform vec4 cc_cameraPos;\nuniform vec4 diffuseColor;\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPosition;\nvarying vec3 v_localPosition;\nvarying vec3 v_right;\nvarying vec3 v_up;\nvarying vec3 v_forward;\nvoid main () {\n vec3 N = normalize(v_worldNormal);\n vec3 V = normalize(cc_cameraPos.xyz - v_worldPosition);\n vec3 points[4];\n vec3 up = vec3(0, 1, 0);\n points[0] = (v_forward * 3.0 + v_right + up) * 40.0;\n points[1] = (v_forward * 3.0 - v_right + up) * 40.0;\n points[2] = (v_forward * 3.0 - v_right - up) * 40.0;\n points[3] = (v_forward * 3.0 + v_right - up) * 40.0;\n vec3 diffuse = diffuseColor.rgb * (0.2 + LTC_Evaluate(N, V, v_localPosition, mat3(1), points) * 0.8);\n gl_FragColor = CCFragOutput(vec4(diffuse, diffuseColor.a));\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "DIFFUSE_COLOR", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [], + "record": null, + "name": "__builtin-editor-gizmo|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/12/12a36c58-641a-4690-8931-dc81a20f2012.json b/library/imports/12/12a36c58-641a-4690-8931-dc81a20f2012.json new file mode 100644 index 0000000..faf65b7 --- /dev/null +++ b/library/imports/12/12a36c58-641a-4690-8931-dc81a20f2012.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_longyan", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1249, + 1545, + 416, + 338 + ], + "offset": [ + -13, + 13 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/13/13257b60-7625-49be-b312-8089bb4a8c73.json b/library/imports/13/13257b60-7625-49be-b312-8089bb4a8c73.json new file mode 100644 index 0000000..2a5b336 --- /dev/null +++ b/library/imports/13/13257b60-7625-49be-b312-8089bb4a8c73.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_chixiaodou", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 417, + 1193, + 420, + 370 + ], + "offset": [ + -2, + 3 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/14/144c3297-af63-49e8-b8ef-1cfa29b3be28.json b/library/imports/14/144c3297-af63-49e8-b8ef-1cfa29b3be28.json new file mode 100644 index 0000000..49bba4a --- /dev/null +++ b/library/imports/14/144c3297-af63-49e8-b8ef-1cfa29b3be28.json @@ -0,0 +1,84 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-2d-gray-sprite", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "properties": { + "texture": { + "value": "white", + "type": 29 + } + }, + "program": "builtin-2d-gray-sprite|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 4278481454, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nin vec3 a_position;\nin mediump vec2 a_uv0;\nout mediump vec2 v_uv0;\nin vec4 a_color;\nout vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}", + "frag": "\nprecision highp float;\nuniform sampler2D texture;\nin mediump vec2 v_uv0;\nin vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nattribute vec3 a_position;\nattribute mediump vec2 a_uv0;\nvarying mediump vec2 v_uv0;\nattribute vec4 a_color;\nvarying vec4 v_color;\nvoid main () {\n gl_Position = cc_matViewProj * vec4(a_position, 1);\n v_uv0 = a_uv0;\n v_color = a_color;\n}", + "frag": "\nprecision highp float;\nuniform sampler2D texture;\nvarying mediump vec2 v_uv0;\nvarying vec4 v_color;\nvoid main () {\n vec4 color = v_color;\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n color.a *= texture_tmp.a;\n #else\n color *= texture_tmp;\n #endif\n float gray = 0.2126*color.r + 0.7152*color.g + 0.0722*color.b;\n gl_FragColor = vec4(gray, gray, gray, color.a);\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_ALPHA_ATLAS_texture", + "type": "boolean", + "defines": [] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [], + "samplers": [ + { + "name": "texture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-2d-gray-sprite|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.bin b/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.bin new file mode 100644 index 0000000..1f0d8b8 Binary files /dev/null and b/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.bin differ diff --git a/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.json b/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.json new file mode 100644 index 0000000..0ead9bd --- /dev/null +++ b/library/imports/14/14c74869-bdb4-4f57-86d8-a7875de2be30.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -0.0999999940395355, + "z": -0.5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.0999999940395355, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 1089 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 34848 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 34848, + "length": 12288 + } +] \ No newline at end of file diff --git a/library/imports/14/14dccec6-9a4f-4e26-9afd-fea06f3a2a62.json b/library/imports/14/14dccec6-9a4f-4e26-9afd-fea06f3a2a62.json new file mode 100644 index 0000000..e87f3e4 --- /dev/null +++ b/library/imports/14/14dccec6-9a4f-4e26-9afd-fea06f3a2a62.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_danggui", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 825, + 414, + 390 + ], + "offset": [ + -4, + 16 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/15/15c8df95-b7df-427c-b48c-57c1392d9e84.json b/library/imports/15/15c8df95-b7df-427c-b48c-57c1392d9e84.json new file mode 100644 index 0000000..6b47908 --- /dev/null +++ b/library/imports/15/15c8df95-b7df-427c-b48c-57c1392d9e84.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire_Bg", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1542, + 647, + 152, + 56 + ], + "offset": [ + 0, + -17 + ], + "originalSize": [ + 152, + 90 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.json b/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.json new file mode 100644 index 0000000..68583ed --- /dev/null +++ b/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "chixiaodou_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.608, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.mp3 b/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.mp3 new file mode 100644 index 0000000..de38e1e Binary files /dev/null and b/library/imports/16/16df01b7-75d9-47f2-96bf-23d29632af47.mp3 differ diff --git a/library/imports/17/17ff98a7-726f-4fc9-a55a-c9f8f97aef1b.json b/library/imports/17/17ff98a7-726f-4fc9-a55a-c9f8f97aef1b.json new file mode 100644 index 0000000..de42739 --- /dev/null +++ b/library/imports/17/17ff98a7-726f-4fc9-a55a-c9f8f97aef1b.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_dazao", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1315, + 1, + 426, + 342 + ], + "offset": [ + -1, + 6 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/19/190debeb-3bf5-4344-924e-d0258863a8f4.json b/library/imports/19/190debeb-3bf5-4344-924e-d0258863a8f4.json new file mode 100644 index 0000000..1058b31 --- /dev/null +++ b/library/imports/19/190debeb-3bf5-4344-924e-d0258863a8f4.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_baishao", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 425, + 813, + 428, + 378 + ], + "offset": [ + -5, + 9 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.jpg b/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.jpg new file mode 100644 index 0000000..deb4539 Binary files /dev/null and b/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.jpg differ diff --git a/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.json b/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.json new file mode 100644 index 0000000..9ddba82 --- /dev/null +++ b/library/imports/19/194abbe2-2c5a-4d46-8aac-957b3bb44457.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "1,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.json b/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.json new file mode 100644 index 0000000..ae9e2dd --- /dev/null +++ b/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "err", + "_objFlags": 0, + "_native": ".mp3", + "duration": 0.626939, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.mp3 b/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.mp3 new file mode 100644 index 0000000..fdc7d13 Binary files /dev/null and b/library/imports/1a/1a1f7dc6-de93-494d-b7be-fe9203b41dc0.mp3 differ diff --git a/library/imports/1a/1a32fc76-f0bd-4f66-980f-56929c0ca0b3.json b/library/imports/1a/1a32fc76-f0bd-4f66-980f-56929c0ca0b3.json new file mode 100644 index 0000000..314a308 --- /dev/null +++ b/library/imports/1a/1a32fc76-f0bd-4f66-980f-56929c0ca0b3.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_radio_button_on", + "texture": "9d60001f-b5f4-4726-a629-2659e3ded0b8", + "atlas": "", + "rect": [ + 1, + 1, + 30, + 30 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 32, + 32 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/1b/1b4aa157-8271-4bd0-a922-e19f452d86fc.json b/library/imports/1b/1b4aa157-8271-4bd0-a922-e19f452d86fc.json new file mode 100644 index 0000000..8dc000c --- /dev/null +++ b/library/imports/1b/1b4aa157-8271-4bd0-a922-e19f452d86fc.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "Firewood", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1550, + 464, + 141, + 157 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 141, + 157 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/1c/1c5e4038-953a-44c2-b620-0bbfc6170477.json b/library/imports/1c/1c5e4038-953a-44c2-b620-0bbfc6170477.json new file mode 100644 index 0000000..c9c8359 --- /dev/null +++ b/library/imports/1c/1c5e4038-953a-44c2-b620-0bbfc6170477.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "cylinder", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "cylinder", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "b430cea3-6ab3-4106-b073-26c698918edd" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "1c5e4038-953a-44c2-b620-0bbfc6170477" + }, + "fileId": "3dlUtIqQhGCrx5Sishojtq", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/1d/1d6bc13a-95e8-41e2-8703-441263ec00bb.json b/library/imports/1d/1d6bc13a-95e8-41e2-8703-441263ec00bb.json new file mode 100644 index 0000000..58613b1 --- /dev/null +++ b/library/imports/1d/1d6bc13a-95e8-41e2-8703-441263ec00bb.json @@ -0,0 +1,5739 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "GuideScene", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + }, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": false, + "_id": "1d6bc13a-95e8-41e2-8703-441263ec00bb" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 117 + }, + { + "__id__": 118 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "GameNode", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 15 + }, + { + "__id__": 20 + }, + { + "__id__": 22 + }, + { + "__id__": 23 + }, + { + "__id__": 25 + }, + { + "__id__": 31 + }, + { + "__id__": 37 + }, + { + "__id__": 57 + }, + { + "__id__": 65 + }, + { + "__id__": 83 + }, + { + "__id__": 101 + }, + { + "__id__": 107 + }, + { + "__id__": 113 + } + ], + "_active": true, + "_components": [ + { + "__id__": 115 + }, + { + "__id__": 116 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0VHqWWqlJ4qVyuwnLGCWw" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9MIzCRC1OGKHNP/Q+VlVk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6b86bfb2-d4d1-4474-a615-6a8a515b9201" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b4dc89EnxNO4TNZJR/F4fF" + }, + { + "__type__": "cc.Node", + "_name": "TimeNode", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -268.945, + 420.683, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5fanACpyFCUo0UbqRf7tLn" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 188, + "height": 225 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -2.093, + 1.68, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "03gZrrl7VDI6/PrPKk7EWo" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "bfZfIenABPoqJqhRtjyx3A" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 195, + "g": 95, + "b": 62, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 76, + "height": 76 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.516, + 0, + 0, + 0, + 0.7071067811865475, + 0.7071067811865476, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 90 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27ck6PdKZCnLzZ2NTxsyMA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "09f3b49a-507f-485e-b8bf-809f98dd4923" + }, + "_type": 3, + "_sizeMode": 0, + "_fillType": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52X2WJAQ5O7oIPu9ciNv7P" + }, + { + "__type__": "cc.Node", + "_name": "needle", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.864, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6ajo4WkQRJophTzEga2ZW2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cf947ea-88e6-4326-a79d-4534335f4e32" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0aipdJWs9KYbRSDLejTy2H" + }, + { + "__type__": "cc.Node", + "_name": "Plant", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 16 + }, + { + "__id__": 18 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1dH+troCBMIbpbgd3McLPt" + }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 95, + "g": 67, + "b": 44, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 389.515, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fdE2U4ly9JZb4QSCSaBUS0" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4aZQeiDw1BlIse68X0zzaY" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 348, + "height": 412 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 116.792, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f8TXcETopPpIHlcYDZErzy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "794756c4-eeac-4a24-a412-4035d0719970" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fc226/y45G6pzMn84yHiGc" + }, + { + "__type__": "cc.Node", + "_name": "Begin", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 318, + "height": 203 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 123.06, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "39dIXWbmhNSpLn6niyVyGq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "04421a0b-266e-4d13-81df-1873ef3c4a83" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "549d/TcvlJ0I9W4GjKco4i" + }, + { + "__type__": "cc.Node", + "_name": "Win", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "beOm6xY9JGcpUIgHepr4za" + }, + { + "__type__": "cc.Node", + "_name": "tip1", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 184, + "g": 138, + "b": 70, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 500, + "height": 94.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -251.366, + 261.785, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b9FE7GbWJOFqQ/EKfuXyho" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 75, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 0, + "_N$fontFamily": "Arial", + "_N$overflow": 3, + "_N$cacheMode": 0, + "_id": "4a+ClThxtI7qkobhAOrbBv" + }, + { + "__type__": "cc.Node", + "_name": "nextBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 26 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -374.44, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8fvfWDa09MYYcHQ4OIBxKu" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 25 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 120, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9LFfI5S5KU604qMnYfr+J" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 26 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "下一步", + "_N$string": "下一步", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "78VgINsx9JbKJVAN68BSN3" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "437x09UB5Eyb8cJzw3kMeC" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 30 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 25 + }, + "_id": "67I/nc4CVEd7oHfDF1OEn+" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "nextClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "jumpBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 32 + } + ], + "_active": true, + "_components": [ + { + "__id__": 34 + }, + { + "__id__": 35 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -518.427, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0mmOMONJJvoRDWLYc61sd" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 31 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 33 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "53GV2FeL1HXo1xjElv3Qmz" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 32 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "跳过引导", + "_N$string": "跳过引导", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "01Lux6UvxP04TZ7dcVpAYN" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "69ey7lYaFFy6HHErqOC27M" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 36 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 31 + }, + "_id": "23JgRv7WFPAbhJjB1SaTCj" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "jumpClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "voiceTip", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 38 + }, + { + "__id__": 41 + }, + { + "__id__": 45 + }, + { + "__id__": 47 + }, + { + "__id__": 51 + }, + { + "__id__": 53 + } + ], + "_active": true, + "_components": [ + { + "__id__": 55 + }, + { + "__id__": 56 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8b7qI3tpdIOpM8Dkqyts5Q" + }, + { + "__type__": "cc.Node", + "_name": "musicBg", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 39 + }, + { + "__id__": 40 + } + ], + "_prefab": null, + "_opacity": 150, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1800 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcYw5UpJlCtLPnaXvdTbzp" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "5ewGyM0qNG4bO0dxdyqzPQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 38 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": -233, + "_bottom": -233, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_id": "3fODOqqddI0KQQ12MYzxae" + }, + { + "__type__": "cc.Node", + "_name": "startBtn", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 42 + }, + { + "__id__": 43 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -445.022, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "efbAeKCt1GtLG4Ix3+6G4n" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 41 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9227615d-1b3f-416c-884d-e33612d57b2e" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fbyF2TxxFNVp6ljfUfDB+k" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 41 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 44 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 41 + }, + "_id": "42ZeJMKJxDNZH/Dg6K/kp8" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "passVoice", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 46 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 724, + "height": 720 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 6.686, + 101.777, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5bypQQWp5LBaURhsI7HBU2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 45 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "7b0b1d20-5a1d-4723-8af8-50a47e841643" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "feHXvO3QtDZ5Yo1bhHAJac" + }, + { + "__type__": "cc.Node", + "_name": "playBtn", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + }, + { + "__id__": 49 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 218, + "height": 218 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 1.657, + 116.232, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c15jgN/0BNAqgJ3elx8QSu" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ffa5a081-5040-487c-a153-4742d21bac1a" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "1fXEqMjItHwIdT4337uam/" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 50 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 47 + }, + "_id": "f8HsO3l1FB+r7iTZSTWmWA" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "playVoice", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 52 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 189, + "g": 172, + "b": 92, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 396, + "height": 41.58 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 20, + 410.484, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "38JuVtWWBBHaJMjMiI4kRJ" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 51 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "游戏过程中需全程开启声音", + "_N$string": "游戏过程中需全程开启声音", + "_fontSize": 33, + "_lineHeight": 33, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "59Fu53kRJB/pkJgLnjsnfA" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 37 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 233, + "b": 129, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 360, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 10, + -92.857, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "087Gyj85NE8IakQMWc0RDf" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "点击播放按钮测试播放音频", + "_N$string": "点击播放按钮测试播放音频", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "f6T8HAA81Ns4nDDtxzmUiC" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 5.684341886080802e-14, + "_bottom": -5.684341886080802e-14, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 40, + "_originalHeight": 36, + "_id": "249AvhbWxKIK+G8v5cHzaL" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "_id": "3dkpDNhRxFMZUo6L98jxEK" + }, + { + "__type__": "cc.Node", + "_name": "tip", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 58 + }, + { + "__id__": 61 + }, + { + "__id__": 63 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -233.105, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fb2IxHCVJB1pNjBteXpqeG" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 59 + }, + { + "__id__": 60 + } + ], + "_prefab": null, + "_opacity": 50, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 2000 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 223.222, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dbginwR49EUoZf6LQcirq/" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 58 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b3kGfYmgBL5pJvV85aFUKG" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 58 + }, + "_enabled": true, + "_id": "41fe1wyaBEFoLzrPvULcBU" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 62 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 508, + "height": 100 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 138.891, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b5sykxjeNHF4ukKyyw5Och" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5797ba40-0232-4eca-8729-719373e39e8c" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "cbB7/6FEJFwLU7JC/8rd7R" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 0, + "_parent": { + "__id__": 57 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 64 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 180, + "g": 71, + "b": 71, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 450, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 138.891, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "caIyRuvb1KmagYAs21NJVo" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 63 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "{植物}刚才出现过呢", + "_N$string": "{植物}刚才出现过呢", + "_fontSize": 30, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 3, + "_N$cacheMode": 0, + "_id": "b5I5BZe1lOA4Novvz0beKb" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Old", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 66 + }, + { + "__id__": 73 + }, + { + "__id__": 78 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -310, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e5yAZJu+ROpL81xp1CIKMj" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 67 + }, + { + "__id__": 69 + } + ], + "_active": true, + "_components": [ + { + "__id__": 71 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8couZL4/FBFKM+JgUeuasH" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 66 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 68 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "94kzGNb3BBj6EshNc+L1vi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 67 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "43NvWMOD1KyYSIYbYiWAPi" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 66 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 70 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9M14CCURHVqPhltpVl1Fi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 69 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b9472a40-1f02-4a4b-8fbc-818b4255e9ce" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "71XT7ev1VL9qJRTtg9P10P" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 66 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 72 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 66 + }, + "_id": "4c0brUO0lBiZYjuWVNxpoF" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "click_Btn", + "customEventData": "Btn_Old" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 74 + }, + { + "__id__": 76 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "eaMjyWG49J6ZlTWxk+SGka" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 73 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 75 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5vi7d/YpBRI65DQni+C8f" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 74 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "28GGb5L7hEP6GV2IxLwbHo" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 73 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 77 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d9MCussC9LXIJYYGWPBNoc" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 76 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "08e5fce4-27f5-445b-a895-f47a7ffb5176" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "30UmrNvJ9Eh65gVGz9+SE1" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [ + { + "__id__": 79 + }, + { + "__id__": 81 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "60FBLrGapL3ZNvOocVmLmq" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 78 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 80 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "96kUWxT05At79s3Rg9EahP" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 79 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "d333qGdflIg43Rr8PEOYTZ" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 78 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 82 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7c4KZBA3xFBp2Ji+Tr7t5s" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 81 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "33d3b1ce-0232-41d5-b379-8316ed3e442d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "efjv2extZMZYTgjamgffPv" + }, + { + "__type__": "cc.Node", + "_name": "Btn_New", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 84 + }, + { + "__id__": 91 + }, + { + "__id__": 96 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -200, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "09m8QMoFRFDqRDSNnesXNu" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 85 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [ + { + "__id__": 89 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f2jYVTr2JG+Y8YU6GVLu6Q" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 84 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 86 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5WhQ3t1ZOH78xlykOuIuR" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 85 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "f2QTFaQI5J5ZzSpTWNNTIr" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 84 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 88 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "36S4vNREpDnKkrKlXKOKwT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b0746a9d-0822-49dd-8cf8-45afc1ee4652" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "a55TWH6ZtMHpVKKtfRHJgR" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 84 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 90 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 84 + }, + "_id": "d0TOFXztRFUYS9mP3ld7pO" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "click_Btn", + "customEventData": "Btn_New" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 92 + }, + { + "__id__": 94 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f3FczQgmBEKYMOG0HFiikL" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 93 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d6m0ZZJf5K256mJHtpuuHB" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 92 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "23KfYkauJJwJeDnkY/OjQv" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 95 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "25W3l5LzpBZ6VhkeKjYB2E" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 94 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "424rMsLm9K+I2YmtPklAAS" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 83 + }, + "_children": [ + { + "__id__": 97 + }, + { + "__id__": 99 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ddGBD4OnREPJIXFn4CseMp" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 96 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 98 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b505j/2bVP27pznYSCDxsJ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 97 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "62fK3fDt5GCZjGkk1CgnTg" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 96 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 100 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcHowC5xlHbI9+byWj0lFz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 99 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8189af2f-6b70-497a-93a5-994048cb2e09" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "60YkAvj+5KWo0ky7re3vTB" + }, + { + "__type__": "cc.Node", + "_name": "startBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 102 + } + ], + "_active": false, + "_components": [ + { + "__id__": 104 + }, + { + "__id__": 105 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -374.44, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "29v/tk/KNLMJ2fU/34y2az" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 103 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "faIolPDnlP44uD+AcIbs5V" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "开始游戏", + "_N$string": "开始游戏", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "0e3CmiIRhNU7UKZx+YGap2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "9aT/6qWXVHLZkQruNZA7wh" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 106 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 101 + }, + "_id": "40om0h/8lA2LNIy2CJjZ4C" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "jumpClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "againBtn", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 108 + } + ], + "_active": false, + "_components": [ + { + "__id__": 110 + }, + { + "__id__": 111 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -518.427, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6bsIvUFUJLAYN2SirToqDt" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 145, + "g": 108, + "b": 53, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 8.013, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "caAOCDzDRJ3pbxOujZrQ8O" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 108 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "再试一次", + "_N$string": "再试一次", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "5cwuuryGNE/bpcRZx6puzM" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "5cJwVyoJBHBJq8aqnjnuYP" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 112 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 107 + }, + "_id": "c0mgIY1zFN2JuToIeq78K4" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "effe2nlNnBES4H9tFM4r38Z", + "handler": "againClick", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "hand", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 114 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 103, + "height": 151.04 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -207.468, + -610.438, + 0, + 0, + 0, + 0.3826834323650898, + 0.9238795325112867, + 0.8, + 0.8, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 45 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0da9xzbKBAXoqEWaTxv1cN" + }, + { + "__type__": "sp.Skeleton", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 113 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "7afd064b-113f-480e-b793-8817d19f63c3" + } + ], + "paused": false, + "defaultSkin": "default", + "defaultAnimation": "animation", + "_preCacheMode": 0, + "_cacheMode": 0, + "loop": true, + "premultipliedAlpha": true, + "timeScale": 1, + "_accTime": 0, + "_playCount": 0, + "_frameCache": null, + "_curFrame": null, + "_skeletonCache": null, + "_animationName": "animation", + "_animationQueue": [], + "_headAniInfo": null, + "_playTimes": 0, + "_isAniComplete": true, + "_N$skeletonData": { + "__uuid__": "3941fdae-279a-48d8-a746-5c5519731a80" + }, + "_N$_defaultCacheMode": 0, + "_N$debugSlots": false, + "_N$debugBones": false, + "_N$debugMesh": false, + "_N$useTint": false, + "_N$enableBatch": false, + "_id": "d4oF1vu7FDr5KWi2ePt60w" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "dfOLca1KVCyLxvg197AIBc" + }, + { + "__type__": "effe2nlNnBES4H9tFM4r38Z", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "Tip": { + "__id__": 57 + }, + "FoodPlist": { + "__uuid__": "7ee88c39-72c3-4896-8faf-b26c1daecabc" + }, + "Btn_New": { + "__id__": 83 + }, + "Btn_Old": { + "__id__": 65 + }, + "Plant": { + "__id__": 15 + }, + "_id": "3c3qy1RFxNvrRNaKcTmg3H" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + } +] \ No newline at end of file diff --git a/library/imports/1f/1f55e3be-b89b-4b79-88de-47fd31018044.json b/library/imports/1f/1f55e3be-b89b-4b79-88de-47fd31018044.json new file mode 100644 index 0000000..5c4dfb3 --- /dev/null +++ b/library/imports/1f/1f55e3be-b89b-4b79-88de-47fd31018044.json @@ -0,0 +1,112 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "sprite_splash", + "_objFlags": 0, + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "New Sprite (Splash)", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 100 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_reorderChildDirty": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_atlas": null + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": null, + "fileId": "1a0f4zwu2VOapqEJkWXIF0R" + } +] \ No newline at end of file diff --git a/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.jpg b/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.jpg new file mode 100644 index 0000000..5ec6352 Binary files /dev/null and b/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.jpg differ diff --git a/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.json b/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.json new file mode 100644 index 0000000..9ddba82 --- /dev/null +++ b/library/imports/20/208eb4d4-f625-47c7-a16f-853d57d0c48f.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "1,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/20/20ec22dc-cd80-453a-9207-b7f462ac8a34.json b/library/imports/20/20ec22dc-cd80-453a-9207-b7f462ac8a34.json new file mode 100644 index 0000000..fd75c2f --- /dev/null +++ b/library/imports/20/20ec22dc-cd80-453a-9207-b7f462ac8a34.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_gancao", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1, + 434, + 434 + ], + "offset": [ + -4, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/23/232d2782-c4bd-4bb4-9e01-909f03d6d3b9.json b/library/imports/23/232d2782-c4bd-4bb4-9e01-909f03d6d3b9.json new file mode 100644 index 0000000..40b3a2e --- /dev/null +++ b/library/imports/23/232d2782-c4bd-4bb4-9e01-909f03d6d3b9.json @@ -0,0 +1,108 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "videoplayer", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "videoplayer", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 428, + "height": 240 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_reorderChildDirty": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "groupIndex": 0, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.VideoPlayer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_resourceType": 1, + "_remoteURL": "", + "_clip": { + "__uuid__": "2be36297-9abb-4fee-8049-9ed5e271da8a" + }, + "_time": 0, + "videoPlayerEvent": [], + "_N$keepAspectRatio": true, + "_N$isFullscreen": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "232d2782-c4bd-4bb4-9e01-909f03d6d3b9" + }, + "fileId": "f0e6ehf9IVMI51Egy+e0ZTA" + } +] \ No newline at end of file diff --git a/library/imports/24/24bb96d6-d160-419c-89a8-8f1a1e203491.json b/library/imports/24/24bb96d6-d160-419c-89a8-8f1a1e203491.json new file mode 100644 index 0000000..fb27878 --- /dev/null +++ b/library/imports/24/24bb96d6-d160-419c-89a8-8f1a1e203491.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire4", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 657, + 723, + 106, + 68 + ], + "offset": [ + -1, + -11 + ], + "originalSize": [ + 152, + 90 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308.json b/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308.json new file mode 100644 index 0000000..7c6760f --- /dev/null +++ b/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308.json @@ -0,0 +1,7 @@ +{ + "__type__": "cc.TTFFont", + "_name": "Font", + "_objFlags": 0, + "_native": "Font.ttf", + "_fontFamily": null +} \ No newline at end of file diff --git a/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308/Font.ttf b/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308/Font.ttf new file mode 100644 index 0000000..bdc9890 Binary files /dev/null and b/library/imports/26/26d2db85-2ef2-4732-8add-adfa6d3c7308/Font.ttf differ diff --git a/library/imports/27/27756ebb-3d33-44b0-9b96-e858fadd4dd4.json b/library/imports/27/27756ebb-3d33-44b0-9b96-e858fadd4dd4.json new file mode 100644 index 0000000..d39c707 --- /dev/null +++ b/library/imports/27/27756ebb-3d33-44b0-9b96-e858fadd4dd4.json @@ -0,0 +1,105 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "label", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 128, + "height": 50 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_ignoreAnchorPointForPosition": false, + "_tag": -1, + "_opacityModifyRGB": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_useOriginalSize": false, + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_isSystemFontUsed": true, + "_N$string": "Label", + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$overflow": 0 + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": null, + "fileId": "d1cddH/doRNQ4Aodz8556bh" + } +] \ No newline at end of file diff --git a/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.json b/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.json new file mode 100644 index 0000000..307a6a3 --- /dev/null +++ b/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "renshen_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.515102, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.mp3 b/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.mp3 new file mode 100644 index 0000000..de9a2c3 Binary files /dev/null and b/library/imports/28/280fe06b-d0a1-4f1d-bf58-4c37e907b7ea.mp3 differ diff --git a/library/imports/28/2874f8dd-416c-4440-81b7-555975426e93.json b/library/imports/28/2874f8dd-416c-4440-81b7-555975426e93.json new file mode 100644 index 0000000..2a1c2d1 --- /dev/null +++ b/library/imports/28/2874f8dd-416c-4440-81b7-555975426e93.json @@ -0,0 +1,136 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-2d-sprite", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "properties": { + "texture": { + "value": "white", + "type": 29 + }, + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + } + }, + "program": "builtin-2d-sprite|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 2440430725, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n #if USE_BGRA\n gl_FragColor = o.bgra;\n #else\n gl_FragColor = o.rgba;\n #endif\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n #if USE_BGRA\n gl_FragColor = o.bgra;\n #else\n gl_FragColor = o.rgba;\n #endif\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "USE_TEXTURE", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MODEL", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ALPHA_ATLAS_texture", + "type": "boolean", + "defines": [ + "USE_TEXTURE" + ] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [ + "USE_TEXTURE" + ] + }, + { + "name": "USE_BGRA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 0 + } + ], + "samplers": [ + { + "name": "texture", + "type": 29, + "count": 1, + "defines": [ + "USE_TEXTURE" + ], + "binding": 30 + } + ], + "record": null, + "name": "builtin-2d-sprite|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/29/29158224-f8dd-4661-a796-1ffab537140e.json b/library/imports/29/29158224-f8dd-4661-a796-1ffab537140e.json new file mode 100644 index 0000000..67cf670 --- /dev/null +++ b/library/imports/29/29158224-f8dd-4661-a796-1ffab537140e.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_btn_disabled", + "texture": "71561142-4c83-4933-afca-cb7a17f67053", + "atlas": "", + "rect": [ + 0, + 0, + 40, + 40 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 12, + 12, + 12, + 12 + ] + } +} \ No newline at end of file diff --git a/library/imports/2a/2a296057-247c-4a1c-bbeb-0548b6c98650.json b/library/imports/2a/2a296057-247c-4a1c-bbeb-0548b6c98650.json new file mode 100644 index 0000000..42be778 --- /dev/null +++ b/library/imports/2a/2a296057-247c-4a1c-bbeb-0548b6c98650.json @@ -0,0 +1,21 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-unlit", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "6d91e591-4ce0-465c-809f-610ec95019c6" + }, + "_techniqueData": { + "0": { + "props": { + "diffuseTexture": { + "__uuid__": "0275e94c-56a7-410f-bd1a-fc7483f7d14a" + } + }, + "defines": { + "USE_DIFFUSE_TEXTURE": true + } + } + } +} \ No newline at end of file diff --git a/library/imports/2a/2a7c0036-e0b3-4fe1-8998-89a54b8a2bec.json b/library/imports/2a/2a7c0036-e0b3-4fe1-8998-89a54b8a2bec.json new file mode 100644 index 0000000..f9a0e79 --- /dev/null +++ b/library/imports/2a/2a7c0036-e0b3-4fe1-8998-89a54b8a2bec.json @@ -0,0 +1,653 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-3d-trail", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "name": "add", + "passes": [ + { + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 1, + "blendSrcAlpha": 770, + "blendDstAlpha": 1 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "frameTile_velLenScale": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-trail|particle-trail:vs_main|tinted-fs:add" + } + ] + }, + { + "name": "alpha-blend", + "passes": [ + { + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 1, + "blendDst": 771, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "frameTile_velLenScale": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-trail|particle-trail:vs_main|tinted-fs:add" + } + ] + }, + { + "name": "add-multiply", + "passes": [ + { + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 1, + "blendDst": 771, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "frameTile_velLenScale": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply" + } + ] + }, + { + "name": "add-smooth", + "passes": [ + { + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 1, + "blendDst": 771, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "frameTile_velLenScale": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth" + } + ] + }, + { + "name": "premultiply-blend", + "passes": [ + { + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 1, + "blendDst": 771, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "frameTile_velLenScale": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied" + } + ] + } + ], + "shaders": [ + { + "hash": 2929688198, + "glsl3": { + "vert": "\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }" + }, + "glsl1": { + "vert": "\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., 1.);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = add(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_DRAW_WIRE_FRAME", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + }, + { + "name": "FragConstants", + "members": [ + { + "name": "tintColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 1 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-trail|particle-trail:vs_main|tinted-fs:add" + }, + { + "hash": 4224037318, + "glsl3": { + "vert": "\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\n#if CC_DRAW_WIRE_FRAME\n in vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = multiply(); }" + }, + "glsl1": { + "vert": "\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture2D(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n #if CC_DRAW_WIRE_FRAME\n if (any(lessThan(vBarycentric, vec3(0.02)))) {\n col = vec4(0., 1., 1., col.a);\n }\n #endif\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = multiply(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_DRAW_WIRE_FRAME", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + }, + { + "name": "FragConstants", + "members": [ + { + "name": "tintColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 1 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-trail|particle-trail:vs_main|tinted-fs:multiply" + }, + { + "hash": 1704877102, + "glsl3": { + "vert": "\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = addSmooth(); }" + }, + "glsl1": { + "vert": "\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture2D(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = addSmooth(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_DRAW_WIRE_FRAME", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-trail|particle-trail:vs_main|no-tint-fs:addSmooth" + }, + { + "hash": 2717357054, + "glsl3": { + "vert": "\nprecision mediump float;\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nin vec3 a_position;\nin vec4 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n out vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = premultiplied(); }" + }, + "glsl1": { + "vert": "\nprecision mediump float;\nuniform vec4 mainTiling_Offset;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nattribute vec3 a_position;\nattribute vec4 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_DRAW_WIRE_FRAME\n varying vec3 vBarycentric;\n#endif\nvec4 vs_main() {\n highp vec4 pos = vec4(a_position, 1);\n vec4 velocity = vec4(a_texCoord1.xyz, 0);\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n velocity = cc_matWorld * velocity;\n#endif\n float vertOffset = (a_texCoord.x - 0.5) * a_texCoord.y;\n vec3 camUp = normalize(cross(pos.xyz - cc_cameraPos.xyz, velocity.xyz));\n pos.xyz += camUp * vertOffset;\n pos = cc_matViewProj * pos;\n uv = a_texCoord.zw * mainTiling_Offset.xy + mainTiling_Offset.zw;;\n color = a_color;\n#if CC_DRAW_WIRE_FRAME\n vBarycentric = a_texCoord2;\n#endif\n return pos;\n}\nvoid main() { gl_Position = vs_main(); }", + "frag": "\nprecision mediump float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture2D(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = premultiplied(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_DRAW_WIRE_FRAME", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-trail|particle-trail:vs_main|no-tint-fs:premultiplied" + } + ] +} \ No newline at end of file diff --git a/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.json b/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.json new file mode 100644 index 0000000..368d8a6 --- /dev/null +++ b/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.json @@ -0,0 +1,6 @@ +{ + "__type__": "cc.VideoClip", + "_name": "default_video", + "_objFlags": 0, + "_native": ".mp4" +} \ No newline at end of file diff --git a/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.mp4 b/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.mp4 new file mode 100644 index 0000000..8159a03 Binary files /dev/null and b/library/imports/2b/2be36297-9abb-4fee-8049-9ed5e271da8a.mp4 differ diff --git a/library/imports/2c/2c937608-2562-40ea-b264-7395df6f0cea.json b/library/imports/2c/2c937608-2562-40ea-b264-7395df6f0cea.json new file mode 100644 index 0000000..35728e3 --- /dev/null +++ b/library/imports/2c/2c937608-2562-40ea-b264-7395df6f0cea.json @@ -0,0 +1,249 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "canvas", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 480, + 320, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 365.46272039703314, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "2c937608-2562-40ea-b264-7395df6f0cea" + }, + "fileId": "d2xIc1y/ZF6Kn7K3yqwDJm", + "sync": false + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "2c937608-2562-40ea-b264-7395df6f0cea" + }, + "fileId": "a6aa1W/pshGFZkMhhqxkZYP", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/2c/2cddbdcb-5dba-4b13-960c-9ebe6d17a7db.json b/library/imports/2c/2cddbdcb-5dba-4b13-960c-9ebe6d17a7db.json new file mode 100644 index 0000000..a3eda05 --- /dev/null +++ b/library/imports/2c/2cddbdcb-5dba-4b13-960c-9ebe6d17a7db.json @@ -0,0 +1,2510 @@ +{ + "__type__": "cc.JsonAsset", + "_name": "LEVEL_INFO", + "_objFlags": 0, + "_native": "", + "json": { + "data": [ + { + "custom": [ + { + "id": 1000, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1001, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 1002, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1003, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1004, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1006, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1007, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1009, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1010, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1011, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1012, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1013, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 1014, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1015, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 1016, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1017, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 1018, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 1019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1020, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 1021, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1022, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1023, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 1026, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1027, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1028, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 1030, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1031, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1032, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 1033, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 1034, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1035, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 1036, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1037, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1038, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1039, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1040, + "item": "renshen", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 2000, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2001, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2002, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 2003, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2004, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 2005, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2006, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2007, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 2008, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2009, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 2010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2011, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2012, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2013, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 2015, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2016, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2017, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 2019, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2020, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2021, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 2022, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 2023, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 2025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2026, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2027, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2028, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2029, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2030, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2031, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 2032, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2033, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2034, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2035, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2036, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2037, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 2038, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2039, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2040, + "item": "zhuye", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 3000, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 3001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 3002, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 3003, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 3004, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3006, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3007, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 3009, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3010, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 3012, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3014, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3015, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 3016, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3017, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3018, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3019, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3021, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3022, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3023, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 3024, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 3025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 3026, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 3027, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3028, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 3029, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3030, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 3032, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3033, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3034, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3035, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3036, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 3037, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3040, + "item": "mudan", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 4000, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4001, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 4003, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 4005, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4006, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 4007, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4008, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 4009, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4010, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 4012, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 4013, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 4014, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4016, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 4017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 4018, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4019, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4020, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4021, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4022, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4024, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 4025, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 4026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4027, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 4028, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4029, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4030, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 4031, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 4032, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4033, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4034, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 4035, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 4036, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4037, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 4039, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 5000, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5001, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 5002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 5003, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5004, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 5005, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5006, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 5007, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 5008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5009, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 5010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5011, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5012, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 5013, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 5015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 5016, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5017, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5019, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5020, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5021, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5022, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 5023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5024, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 5025, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 5026, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5027, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 5029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5032, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 5033, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5034, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5035, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 5036, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5037, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 5038, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 5040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 6000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6001, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6002, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6003, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 6005, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6006, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 6007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6009, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6011, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 6012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 6013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 6014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 6019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 6021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6024, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6025, + "item": "jinjie", + "type": 2, + "flammable": 0 + }, + { + "id": 6026, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 6027, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6028, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6029, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 6030, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 6031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 6032, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6033, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6034, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6035, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 6036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 6037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 6038, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 6039, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 7000, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7003, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 7004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 7006, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7008, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7009, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7012, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 7014, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 7015, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 7016, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 7017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7018, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7019, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 7020, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 7022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 7023, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 7025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7027, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7028, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7029, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 7031, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 7032, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 7033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7034, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7035, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7037, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 7038, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 7039, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 8000, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 8001, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8003, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 8005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8006, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8007, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 8008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8009, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8010, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8011, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 8012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 8014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 8016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8020, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8021, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8022, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8023, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 8025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8026, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 8027, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8028, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 8030, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8031, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8032, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 8034, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8035, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8036, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 8037, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 8038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 8039, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8040, + "item": "gancao", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 9000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9001, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 9002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 9003, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9004, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9005, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 9006, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 9007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9008, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 9009, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9010, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9011, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9012, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9013, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9014, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9015, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9016, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 9017, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 9018, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 9019, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 9020, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 9021, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9022, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 9025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9026, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9027, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 9029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9030, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9031, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 9032, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9033, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9035, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 9036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9037, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 9038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9039, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 9040, + "item": "danggui", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 10000, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 10001, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10002, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10003, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10004, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10005, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10006, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 10007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10008, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 10009, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10010, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 10012, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10013, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 10014, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 10015, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 10016, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10018, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10020, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10021, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10022, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10023, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10025, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10026, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 10027, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10028, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10029, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 10031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10032, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10033, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10035, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 10036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 10038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10039, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10040, + "item": "gouqi", + "type": 2, + "flammable": 0 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/library/imports/2d/2d2f792f-a40c-49bb-a189-ed176a246e49.json b/library/imports/2d/2d2f792f-a40c-49bb-a189-ed176a246e49.json new file mode 100644 index 0000000..4fa51cf --- /dev/null +++ b/library/imports/2d/2d2f792f-a40c-49bb-a189-ed176a246e49.json @@ -0,0 +1,5430 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "RankScene", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + }, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "2d2f792f-a40c-49bb-a189-ed176a246e49" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 6 + }, + { + "__id__": 9 + }, + { + "__id__": 65 + }, + { + "__id__": 79 + }, + { + "__id__": 102 + }, + { + "__id__": 106 + }, + { + "__id__": 141 + } + ], + "_active": true, + "_components": [ + { + "__id__": 147 + }, + { + "__id__": 148 + }, + { + "__id__": 149 + } + ], + "_prefab": { + "__id__": 150 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 252, + "b": 252, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a286bbGknJLZpRpxROV6M94" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 252.87547223450972, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8cVHFRc19FO4you3NT7Y+N" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "40YcGtOLdDr6BSLg4kOPDC" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "97fLKw9fpLKIc0dJLpbPlR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "background", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e2e0crkOLxGrpMxpbC4iQg1" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e46860aa-922b-408c-8a92-ccfb24106c76" + }, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "888hvGBMlC74RLITj4GjZH" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "8dEBgqFXxELpmAzyYl1ZRR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "ScrollView", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 10 + }, + { + "__id__": 17 + } + ], + "_active": true, + "_components": [ + { + "__id__": 62 + }, + { + "__id__": 15 + }, + { + "__id__": 63 + } + ], + "_prefab": { + "__id__": 64 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 174, + "g": 121, + "b": 121, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 188.183, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8ak5WlHVBELqSzRzcpZa3P" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [ + { + "__id__": 11 + } + ], + "_active": false, + "_components": [ + { + "__id__": 14 + }, + { + "__id__": 59 + }, + { + "__id__": 60 + } + ], + "_prefab": { + "__id__": 61 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 820 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 340, + -410, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "16gqVcPfxELJJJvzrWZur+" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 10 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "88oQE4wgFOborC60bIDsV9" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "3c5hqDysBEP4STnJxq6+Kh" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d7LA6B6L9KYrPYs9FOPGKR", + "sync": false + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_scrollView": { + "__id__": 15 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 12 + }, + "_N$direction": 1, + "_id": "96ZRZ1fLtOo4EwcQEvfvZQ" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 16 + }, + "content": { + "__id__": 16 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": null, + "_id": "9e/+xucD5F4ZxPMvguWtL2" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 17 + }, + "_children": [ + { + "__id__": 20 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 58 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7dABu6LfBPVrHU5tOjT7Yt" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [ + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 700 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a2Zfykcl1GPqJhA7ixiKd3" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "26KueHItNK14Rh/HjkmD9I" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "01e0xqlUVFcY0MMajauQHo", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": { + "__id__": 16 + }, + "_children": [ + { + "__id__": 21 + }, + { + "__id__": 24 + }, + { + "__id__": 33 + }, + { + "__id__": 44 + }, + { + "__id__": 47 + }, + { + "__id__": 50 + }, + { + "__id__": 53 + } + ], + "_active": true, + "_components": [ + { + "__id__": 56 + } + ], + "_prefab": { + "__id__": 57 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -50, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "55FH2q1HJAyK0hrjxGH/+q" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -45.954, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6eyN1+nK5HT7svNqUsa2/+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e30f966f-d546-44a0-9ee4-ba5745d69daa" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "3df9QOnDFJV7TAVFba88/C" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 25 + }, + { + "__id__": 28 + } + ], + "_active": true, + "_components": [ + { + "__id__": 31 + } + ], + "_prefab": { + "__id__": 32 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -192.998, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9a3MBWS0tATp1bXC+684by" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 24 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 27 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "afQOj7Nf1G+obAarDvFiss" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "3dQTyGvVtFoYuz2oICw3zW" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 24 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "04+nh113dEUadg6AGURjqn" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "d4jJKsPmREIIvqtNo9qT9a" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "08y5EI06ZOg5mNtTnvGYlB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 34 + }, + { + "__id__": 37 + }, + { + "__id__": 40 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 43 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bdbEH+735OxrggnQuRlqF2" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": { + "__id__": 36 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "34MaLWCWxBHoY//3pYJXcH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4f8a74d6-8e87-4734-9df3-90027b702649" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "81Vy6ELJROcJi8tTw2Qjb5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 38 + } + ], + "_prefab": { + "__id__": 39 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "84qKc8CKlOI522xR39xkzA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 37 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "9b7R4QlpVKqqTMybq9FiqI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 41 + } + ], + "_prefab": { + "__id__": 42 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9166Yb071H1Zr8Ui2B+hsT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "515ff941-a6d1-421a-9243-249091fc5b1d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "43yfKjDd5NG61vmnAMcyS5" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 45 + } + ], + "_prefab": { + "__id__": 46 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "de4HHWkIhExrJq1+nHHMA6" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 44 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "bf3FH41FFOi7NWKgMyLmiz" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + } + ], + "_prefab": { + "__id__": 49 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60.04, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 102.441, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "05c46heZhJV4sYMqYyxlB5" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "90%", + "_N$string": "90%", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "ebZXHD9xdJPKtw0xxjWGui" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 51 + } + ], + "_prefab": { + "__id__": 52 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -122.702, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ccHej6ZKxK6o8+pWYH7dhC" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 50 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "8a0mkATQNJ+535H7jzhXTI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "timeLab", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 54 + } + ], + "_prefab": { + "__id__": 55 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 67.24, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 264.306, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "80DbdqyyhFlqqHDlYCMl/t" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 53 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "1'36''", + "_N$string": "1'36''", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "b5ULXxgz5Ab4DjVlYsNxoV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "4cDapuaZhMqIPz9BEZOKGu", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_id": "c1c+DMgdRG3q56NuEbVYb0" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 20 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "55FH2q1HJAyK0hrjxGH/+q", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "b21uNyrqhLbqirpS1MD+7t", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "15Ij2+io5Kf75wBTFmM1FH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "18yu9m8C1KVImpGMQfBH6e" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "7by3ovAnJLYoQqKmlhCACY", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": false, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "366jlZ4HBD27bc2JZMq5cN" + }, + { + "__type__": "d5421HgLShFKIjj5f18m1mi", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "itemRender": { + "__id__": 20 + }, + "type": 2, + "startAxis": 2, + "spaceX": 10, + "spaceY": 10, + "padding_top": 10, + "padding_buttom": 10, + "padding_left": 10, + "_padding": 0, + "padding_right": 10, + "_id": "5eHjeDnZlKvI3Vhx1nh5nF" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "bdWGhni0BLgaAOrQnsfTP4", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 66 + }, + { + "__id__": 69 + }, + { + "__id__": 72 + }, + { + "__id__": 75 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 78 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 44.282, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "10unPSfi1NUb30N1EjhieB" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 67 + } + ], + "_prefab": { + "__id__": 68 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -279.205, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "16l1mnOX5M1beKvcPbem8A" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 66 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "排名", + "_N$string": "排名", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "8fbqxr8WlF+4EtfRkmqVmB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "7bzdCzsURJc4G7MwOL0Blj", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 70 + } + ], + "_prefab": { + "__id__": 71 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -69.933, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a3bCpEpCRBD7MKBsIRT6v6" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 69 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用户昵称", + "_N$string": "用户昵称", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "0f+OS1A5VBkY5x0F5RYDoj" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "517a9VdPBNUK5P35X44CpK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 73 + } + ], + "_prefab": { + "__id__": 74 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 81, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 141.46, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "efg8TK/nNEdrmy1CcmmR0z" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 72 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "准确率", + "_N$string": "准确率", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "66yy55ZIJLOajbzHnk0Pyq" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "12KoCg1NRLpJU9aRF1iPkq", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 65 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 76 + } + ], + "_prefab": { + "__id__": 77 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 216, + "g": 179, + "b": 144, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 263.249, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d4gJ4FKuFECJLudNLM8B1M" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 75 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用时", + "_N$string": "用时", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "bfVml1kDpNYrLYA2EW/4c4" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "6eqbmcu+BOcp3jPH/yrrDl", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "9963O/IP5CCLrawiVnAqdg", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "player", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 80 + }, + { + "__id__": 91 + } + ], + "_active": true, + "_components": [ + { + "__id__": 100 + } + ], + "_prefab": { + "__id__": 101 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 129 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -289.722, + 353.93, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "791LpnRkFNkqdfpCoJ3Pqk" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 79 + }, + "_children": [ + { + "__id__": 81 + }, + { + "__id__": 84 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 90 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -11.662, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7aHA1K+7hE8YNbYjVirEih" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 82 + } + ], + "_prefab": { + "__id__": 83 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 136, + "g": 80, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 72, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -42.835, + 133.875, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "96xrp90GJO8rwMqGxxlacV" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 81 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "超过了", + "_N$string": "超过了", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "daHyJzw/xLho0dlbkuPHvm" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "b0QUZ3hixHY4BCC7p7EwaX", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 85 + } + ], + "_prefab": { + "__id__": 86 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 136, + "g": 80, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 48, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 74.991, + 133.875, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "66pdXEqLtLUaXZg+PhM/Z/" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 84 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "的人", + "_N$string": "的人", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "5bSRJmjgtCUrA2vxudA4QN" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d3ySguqntO5bgnP95er4PW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "number", + "_objFlags": 0, + "_parent": { + "__id__": 80 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 88 + } + ], + "_prefab": { + "__id__": 89 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 46, + "g": 17, + "b": 81, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 58.04, + "height": 36.54 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21.936, + 134.451, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "08JiIvh25MQLbBHF2EDuB8" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "30%", + "_N$string": "30%", + "_fontSize": 29, + "_lineHeight": 29, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4ejvYL3kxDzq6r/YHZLUuV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "d6vzzOaCBH2JMQzL1q75Qk", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "01Wu1da3hD9qLoiu2u15Dh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "mask", + "_objFlags": 0, + "_parent": { + "__id__": 79 + }, + "_children": [ + { + "__id__": 92 + }, + { + "__id__": 95 + } + ], + "_active": true, + "_components": [ + { + "__id__": 98 + } + ], + "_prefab": { + "__id__": 99 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -0.079, + 11.604, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0fcDfHHpRHXKM9MyyslQY8" + }, + { + "__type__": "cc.Node", + "_name": "phone", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 93 + } + ], + "_prefab": { + "__id__": 94 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "37ak2GKuNHfqHwY+7IEFc+" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 92 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "e5IQcGfCFLqoqf/wuxBYOY" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "a9FdZ8QGNM77omYBmm7jeP", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 91 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 96 + } + ], + "_prefab": { + "__id__": 97 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "4ekK/6ZIFECYG79nYYRw1X" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 95 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "01l/YIk+JMKblUfKTyfTVO" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "082qUxbaNDrIu5wftUXuxE", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 91 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "237hnicvNDF57wjWEhMu97" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "15yWGxXfFKHYDj+6AKZ+hO", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 79 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "700fa527-a104-4d31-846a-99ebc1c5803a" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "c3I2fvdkFB9I3xv3zy8H3C" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "777yycF4RPu7K18m/uyO1m", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 103 + }, + { + "__id__": 104 + } + ], + "_prefab": { + "__id__": 105 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 120 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -609, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b525Z//RNMt7kDFipTkumj" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5d5398c4-b3d5-4045-910e-1bfa6fed47ea" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "3cEUZF+3RNUYwTQQpf9d/W" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": -2, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "d9kYhTG5dO1oZvrIgzsMbS" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "adJ7tHdodDiYvg71t3toeY", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "Self", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 107 + }, + { + "__id__": 116 + }, + { + "__id__": 119 + }, + { + "__id__": 130 + }, + { + "__id__": 133 + }, + { + "__id__": 136 + } + ], + "_active": true, + "_components": [ + { + "__id__": 139 + } + ], + "_prefab": { + "__id__": 140 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "cf4fwLe4hJXLYT5vY7WfC9" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [ + { + "__id__": 108 + }, + { + "__id__": 111 + } + ], + "_active": true, + "_components": [ + { + "__id__": 114 + } + ], + "_prefab": { + "__id__": 115 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fe7qLOC0RM9qPt+IfQpa5W" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": { + "__id__": 110 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "24ACHKIZFGcoFu+5kISL5f" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 108 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "0eYZNHU9lK5Z0d0kmu6v2F" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "f513pLQ/9KMbKpOTC4nuyz", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 107 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 112 + } + ], + "_prefab": { + "__id__": 113 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "54GC+JJxVI+a5Fp8J91GjX" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6c6849e9-8426-4bd8-8298-194917d20da7" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "79BxLIwZdOjIPk+JbpAeFu" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "c8vhbkrhtGw72GydJ4enTg", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 107 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "6fiuDWjOBCBLIM3SAArXZT" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "47dNJgs3hCIZESImEUA8wi", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 117 + } + ], + "_prefab": { + "__id__": 118 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 13.9, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + 59.946, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c5SNuw5RxJOYLInx0KcLRh" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 116 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "f4PjLXFaJKY7WwqSqZK1UD" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "25WXxoGV5I/KgHBE8D1rsK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [ + { + "__id__": 120 + }, + { + "__id__": 123 + }, + { + "__id__": 126 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 129 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8fIUbpCjhI5r01JqiMBRub" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 121 + } + ], + "_prefab": { + "__id__": 122 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "ef7AEay5ZBFJGkhxtuK3Ko" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 120 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4f8a74d6-8e87-4734-9df3-90027b702649" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "9fZk18R5pFzpXsHYRZLIyB" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "09Kg3hfzBBu6HptPpAFSW9", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 124 + } + ], + "_prefab": { + "__id__": 125 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0cB1/6h6lOm4PGv/txe9Wi" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 123 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "bcmZsyS4BDw7p0EU0wLam9" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "0dKJ2TWjFCOJ/iqhRFSLjk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 119 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 127 + } + ], + "_prefab": { + "__id__": 128 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "afrNKzhE5OH5xP4nKm+QPz" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 126 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "515ff941-a6d1-421a-9243-249091fc5b1d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "4aa928a4-3ba6-433f-a3d6-261260e338af" + }, + "_id": "7d/VdpTjhGQZaLUUl7Uh/+" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "1aJ6eRDI5HH7V7ePpX8123", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "1dS3urBJ1F55mw2t/Q3F7w", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 131 + } + ], + "_prefab": { + "__id__": 132 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "50Dn8FD+VLk49n1cFrrRa/" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 130 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "我", + "_N$string": "我", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "f1wOeDKU5ID6PNtDXFhMnG" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "42BvS5Yl5GfY/GLeE5YQOh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 134 + } + ], + "_prefab": { + "__id__": 135 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60.04, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 102.441, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "eclmBhWWBMV4z6eyHgXvJW" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 133 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "90%", + "_N$string": "90%", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "aaRsfb7QZLD4t0zpwodJ7D" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "aa1BwJO7dBxp3HPZ8h/OQe", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "timeLab", + "_objFlags": 0, + "_parent": { + "__id__": 106 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 137 + } + ], + "_prefab": { + "__id__": 138 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 248, + "g": 237, + "b": 212, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 67.24, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 264.306, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0f6y13HkZB9qf4E07aunTB" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "1'36''", + "_N$string": "1'36''", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "96NL3bUtJDBJXFjy5swMXM" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "5ey5Z8LiRJAY1Sdq2fqfvb", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 106 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "d3X22XFMBBOqWuJHIN1DzL" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "02TaTwJ1tM844wDACOg8Uk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "backBtn", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 142 + }, + { + "__id__": 143 + }, + { + "__id__": 144 + } + ], + "_prefab": { + "__id__": 146 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -320.09, + 618, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "581Fkp6jhEH7Z3JUXkk7L4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "43c83a99-6be0-468f-a894-1b624f3d33ac" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "73ZWxCtxxKOZAy/xTAw+AX" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 40.910000000000025, + "_right": 0, + "_top": 29, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "464mXeXUJPK5u6GxXJMzRG" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 141 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 145 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "f4kBI/sjNNqYrNDgEFFZFu" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "e74a999IDFOabyymZgXQIiy", + "handler": "backClick", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "34+hXrhBBJUqEHHRNeqJSa", + "sync": false + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "17HeE62vtFurfhKbLJeXdc" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "45wIx1qRNIfKRBbYhYEP1r" + }, + { + "__type__": "e74a999IDFOabyymZgXQIiy", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "Player": { + "__id__": 79 + }, + "selfNode": { + "__id__": 106 + }, + "phone": { + "__id__": 109 + }, + "_id": "81Iy69gIdCtp0UzAUPZ1+M" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 2 + }, + "asset": { + "__uuid__": "badb56f7-1c07-4fbb-87e6-5bfd805fe81b" + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/2d/2d69a479-18ec-4787-b35f-e9a9b3247435.json b/library/imports/2d/2d69a479-18ec-4787-b35f-e9a9b3247435.json new file mode 100644 index 0000000..73cd3b9 --- /dev/null +++ b/library/imports/2d/2d69a479-18ec-4787-b35f-e9a9b3247435.json @@ -0,0 +1,25 @@ +{ + "__type__": "cc.JsonAsset", + "_name": "GM_INFO", + "_objFlags": 0, + "_native": "", + "json": { + "data": { + "mean_Time": 0, + "total": 0, + "currSeed": 200000, + "gameId": "100014", + "userId": 200139, + "guide": true, + "url": "https://api.sparkus.cn", + "success": false, + "matchId": null, + "custom": 0, + "level": 0, + "stepTimeList": 0, + "successList": [], + "gameTime": 8, + "igniteCount": 0 + } + } +} \ No newline at end of file diff --git a/library/imports/2d/2d9a4b85-b0ab-4c46-84c5-18f393ab2058.json b/library/imports/2d/2d9a4b85-b0ab-4c46-84c5-18f393ab2058.json new file mode 100644 index 0000000..998101e --- /dev/null +++ b/library/imports/2d/2d9a4b85-b0ab-4c46-84c5-18f393ab2058.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "sphere", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "sphere", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "2d9a4b85-b0ab-4c46-84c5-18f393ab2058" + }, + "fileId": "e0chObmn1N5q+1kVoqVegu", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/30/30682f87-9f0d-4f17-8a44-72863791461b.json b/library/imports/30/30682f87-9f0d-4f17-8a44-72863791461b.json new file mode 100644 index 0000000..c7d30ac --- /dev/null +++ b/library/imports/30/30682f87-9f0d-4f17-8a44-72863791461b.json @@ -0,0 +1,102 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-2d-graphics", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 1, + "blendDst": 771, + "blendSrcAlpha": 1, + "blendDstAlpha": 771 + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "properties": { + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + } + }, + "program": "builtin-2d-graphics|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 550349795, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\nin float a_dist;\nout float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}", + "frag": "\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\nin float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\nattribute float a_dist;\nvarying float v_dist;\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n pos = cc_matViewProj * cc_matWorld * pos;\n v_color = a_color;\n v_dist = a_dist;\n gl_Position = pos;\n}", + "frag": "\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\nvarying float v_dist;\nvoid main () {\n vec4 o = v_color;\n ALPHA_TEST(o);\n #if CC_SUPPORT_standard_derivatives\n float aa = fwidth(v_dist);\n #else\n float aa = 0.05;\n #endif\n float alpha = 1. - smoothstep(-aa, 0., abs(v_dist) - 1.0);\n o.rgb *= o.a;\n o *= alpha;\n gl_FragColor = o;\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_SUPPORT_standard_derivatives", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 0 + } + ], + "samplers": [], + "record": null, + "name": "builtin-2d-graphics|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/31/31bc895a-c003-4566-a9f3-2e54ae1c17dc.json b/library/imports/31/31bc895a-c003-4566-a9f3-2e54ae1c17dc.json new file mode 100644 index 0000000..daf39b7 --- /dev/null +++ b/library/imports/31/31bc895a-c003-4566-a9f3-2e54ae1c17dc.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "HelloWorld", + "texture": "6aa0aa6a-ebee-4155-a088-a687a6aadec4", + "atlas": "", + "rect": [ + 0, + 0, + 195, + 270 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 195, + 270 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/31/31d8962d-babb-4ec7-be19-8e9f54a4ea99.json b/library/imports/31/31d8962d-babb-4ec7-be19-8e9f54a4ea99.json new file mode 100644 index 0000000..fba6fa5 --- /dev/null +++ b/library/imports/31/31d8962d-babb-4ec7-be19-8e9f54a4ea99.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_scrollbar", + "texture": "0291c134-b3da-4098-b7b5-e397edbe947f", + "atlas": "", + "rect": [ + 0, + 0, + 30, + 15 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 30, + 15 + ], + "capInsets": [ + 10, + 4, + 10, + 4 + ] + } +} \ No newline at end of file diff --git a/library/imports/32/32044bd2-481f-4cf1-a656-e2b2fb1594eb.json b/library/imports/32/32044bd2-481f-4cf1-a656-e2b2fb1594eb.json new file mode 100644 index 0000000..8176883 --- /dev/null +++ b/library/imports/32/32044bd2-481f-4cf1-a656-e2b2fb1594eb.json @@ -0,0 +1,710 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "scrollview", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "scrollview", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 19 + }, + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 20 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 250 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 16 + }, + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 18 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 250 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 120, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "b1f27kt1ClHyJvwBLxrEfQY", + "sync": false + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_scrollView": { + "__id__": 7 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 4 + }, + "_N$direction": 1, + "_id": "" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 8 + }, + "content": { + "__id__": 8 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": { + "__id__": 6 + }, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [ + { + "__id__": 12 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 15 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 220, + "height": 400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 115.30999755859375, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 8 + } + ], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 11 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 250 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "c1dc9Kk/CRJqaNnBOP4YGDS", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "item", + "_objFlags": 512, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 14 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 131.33, + "height": 65.2 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -102.19999694824219, + -10.149999618530273, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_useOriginalSize": false, + "_string": "ScrollView content\n\n", + "_N$string": "ScrollView content\n\n", + "_fontSize": 16, + "_lineHeight": 20, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 0, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "5280bTjVfhISb/ztQTswOuX", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "036a4WKD5hBcbQJmMrbqoW8", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "f8b835eFHxKj4uMGeoBGz+U", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "32044bd2-481f-4cf1-a656-e2b2fb1594eb" + }, + "fileId": "2bb72ntvphNH4HtVfnSNUVp", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/33/33d3b1ce-0232-41d5-b379-8316ed3e442d.json b/library/imports/33/33d3b1ce-0232-41d5-b379-8316ed3e442d.json new file mode 100644 index 0000000..8759e65 --- /dev/null +++ b/library/imports/33/33d3b1ce-0232-41d5-b379-8316ed3e442d.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "yes2", + "texture": "ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944", + "atlas": "", + "rect": [ + 194, + 18, + 112, + 34 + ], + "offset": [ + -0.5, + 0 + ], + "originalSize": [ + 501, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/38/384ed9a2-ff39-41fd-a3dd-0df283e2e159.json b/library/imports/38/384ed9a2-ff39-41fd-a3dd-0df283e2e159.json new file mode 100644 index 0000000..d4e8006 --- /dev/null +++ b/library/imports/38/384ed9a2-ff39-41fd-a3dd-0df283e2e159.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "err2", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1174, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/39/3941fdae-279a-48d8-a746-5c5519731a80.json b/library/imports/39/3941fdae-279a-48d8-a746-5c5519731a80.json new file mode 100644 index 0000000..4cbb2b4 --- /dev/null +++ b/library/imports/39/3941fdae-279a-48d8-a746-5c5519731a80.json @@ -0,0 +1,365 @@ +{ + "__type__": "sp.SkeletonData", + "_name": "hand", + "_objFlags": 0, + "_native": "", + "_skeletonJson": { + "skeleton": { + "hash": "/Glc657HgCwGQfMxhqvoEP7O3Ko", + "spine": "3.6.52", + "width": 103, + "height": 151.04, + "images": "/Users/liangjiacheng/Desktop/basketball_hand" + }, + "bones": [ + { + "name": "root" + }, + { + "name": "0", + "parent": "root", + "y": 104.49 + }, + { + "name": "1", + "parent": "root", + "length": 85.43, + "rotation": 90.24, + "x": 6.71, + "y": 0.03 + } + ], + "slots": [ + { + "name": "1", + "bone": "1", + "attachment": "1" + }, + { + "name": "0", + "bone": "0", + "attachment": "0" + } + ], + "skins": { + "default": { + "0": { + "0": { + "rotation": 90.24, + "width": 67, + "height": 67 + } + }, + "1": { + "1": { + "x": 49.07, + "y": 1.21, + "rotation": -90.24, + "width": 103, + "height": 124 + } + } + } + }, + "animations": { + "animation": { + "slots": { + "0": { + "color": [ + { + "time": 0, + "color": "ffffff00", + "curve": "stepped" + }, + { + "time": 0.3333, + "color": "ffffff00" + }, + { + "time": 0.5, + "color": "ffffffff" + }, + { + "time": 0.6333, + "color": "ffffff00" + } + ], + "attachment": [ + { + "time": 0, + "name": "0" + }, + { + "time": 0.3333, + "name": "0" + }, + { + "time": 0.6333, + "name": "0" + }, + { + "time": 0.7, + "name": "0" + } + ] + }, + "1": { + "attachment": [ + { + "time": 0, + "name": "1" + }, + { + "time": 0.4, + "name": "1" + }, + { + "time": 0.7, + "name": "1" + } + ] + } + }, + "bones": { + "0": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": "stepped" + }, + { + "time": 0.3333, + "angle": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "angle": 0 + } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.3333, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": "stepped" + }, + { + "time": 0.3333, + "x": 1, + "y": 1 + }, + { + "time": 0.6333, + "x": 1.973, + "y": 1.973, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 1.973, + "y": 1.973 + } + ], + "shear": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.3333, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ] + }, + "1": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": "stepped" + }, + { + "time": 0.4, + "angle": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "angle": 0 + } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.4, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1 + }, + { + "time": 0.1667, + "x": 1.569, + "y": 1.569 + }, + { + "time": 0.3333, + "x": 0.955, + "y": 0.955 + }, + { + "time": 0.4, + "x": 1, + "y": 1, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 1, + "y": 1 + } + ], + "shear": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.4, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ] + }, + "root": { + "rotate": [ + { + "time": 0, + "angle": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "angle": 0 + } + ], + "translate": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ], + "scale": [ + { + "time": 0, + "x": 1, + "y": 1, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 1, + "y": 1 + } + ], + "shear": [ + { + "time": 0, + "x": 0, + "y": 0, + "curve": "stepped" + }, + { + "time": 0.7, + "x": 0, + "y": 0 + } + ] + } + }, + "drawOrder": [ + { + "time": 0 + }, + { + "time": 0.4 + }, + { + "time": 0.7 + } + ] + } + } + }, + "_atlasText": "\r\nhand.png\r\nsize: 256,128\r\nformat: RGBA8888\r\nfilter: Linear,Linear\r\nrepeat: none\r\n0\r\n rotate: false\r\n xy: 107, 59\r\n size: 67, 67\r\n orig: 67, 67\r\n offset: 0, 0\r\n index: -1\r\n1\r\n rotate: false\r\n xy: 2, 2\r\n size: 103, 124\r\n orig: 103, 124\r\n offset: 0, 0\r\n index: -1\r\n", + "textures": [ + { + "__uuid__": "4b49cd83-b149-43f7-925f-f80540e80749" + } + ], + "textureNames": [ + "hand.png" + ], + "scale": 1 +} \ No newline at end of file diff --git a/library/imports/3a/3a7bb79f-32fd-422e-ada2-96f518fed422.json b/library/imports/3a/3a7bb79f-32fd-422e-ada2-96f518fed422.json new file mode 100644 index 0000000..b77eac2 --- /dev/null +++ b/library/imports/3a/3a7bb79f-32fd-422e-ada2-96f518fed422.json @@ -0,0 +1,10 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-gray-sprite", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "144c3297-af63-49e8-b8ef-1cfa29b3be28" + }, + "_techniqueData": {} +} \ No newline at end of file diff --git a/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.bin b/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.bin new file mode 100644 index 0000000..f10cc50 Binary files /dev/null and b/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.bin differ diff --git a/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.json b/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.json new file mode 100644 index 0000000..3237675 --- /dev/null +++ b/library/imports/3b/3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -0.5, + "z": -0.5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.5, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 1089 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 34848 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 34848, + "length": 12288 + } +] \ No newline at end of file diff --git a/library/imports/3c/3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300.json b/library/imports/3c/3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300.json new file mode 100644 index 0000000..d5529c6 --- /dev/null +++ b/library/imports/3c/3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_icon2", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 921, + 1, + 66, + 66 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 66, + 66 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/3f/3f376125-a699-40ca-ad05-04d662eaa1f2.json b/library/imports/3f/3f376125-a699-40ca-ad05-04d662eaa1f2.json new file mode 100644 index 0000000..5de9f59 --- /dev/null +++ b/library/imports/3f/3f376125-a699-40ca-ad05-04d662eaa1f2.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "plane", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "plane", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "3f376125-a699-40ca-ad05-04d662eaa1f2" + }, + "fileId": "9fhEbTXI1IApxjLqbjx+1L", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/41/410fb916-8721-4663-bab8-34397391ace7.json b/library/imports/41/410fb916-8721-4663-bab8-34397391ace7.json new file mode 100644 index 0000000..2e328b8 --- /dev/null +++ b/library/imports/41/410fb916-8721-4663-bab8-34397391ace7.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "singleColor", + "texture": "a8027877-d8d6-4645-97a0-52d4a0123dba", + "atlas": "", + "rect": [ + 0, + 0, + 2, + 2 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 2, + 2 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/41/419712bd-00e6-4352-97bc-105ab199d852.json b/library/imports/41/419712bd-00e6-4352-97bc-105ab199d852.json new file mode 100644 index 0000000..b7c4343 --- /dev/null +++ b/library/imports/41/419712bd-00e6-4352-97bc-105ab199d852.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire1", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1414, + 766, + 104, + 72 + ], + "offset": [ + 0, + -9 + ], + "originalSize": [ + 152, + 90 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/42/42c04718-9864-407c-98cc-b7c2f4fbb863.json b/library/imports/42/42c04718-9864-407c-98cc-b7c2f4fbb863.json new file mode 100644 index 0000000..f88f710 --- /dev/null +++ b/library/imports/42/42c04718-9864-407c-98cc-b7c2f4fbb863.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_gouqi", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 875, + 403, + 442, + 390 + ], + "offset": [ + 0, + -12 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/43/4300f941-ba03-4d19-bdb1-959ef40f1852.json b/library/imports/43/4300f941-ba03-4d19-bdb1-959ef40f1852.json new file mode 100644 index 0000000..c73a4ee --- /dev/null +++ b/library/imports/43/4300f941-ba03-4d19-bdb1-959ef40f1852.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default-particle", + "texture": "600301aa-3357-4a10-b086-84f011fa32ba", + "atlas": "", + "rect": [ + 2, + 2, + 61, + 61 + ], + "offset": [ + 0.5, + -0.5 + ], + "originalSize": [ + 64, + 64 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/43/430eccbf-bf2c-4e6e-8c0c-884bbb487f32.json b/library/imports/43/430eccbf-bf2c-4e6e-8c0c-884bbb487f32.json new file mode 100644 index 0000000..ff20bdc --- /dev/null +++ b/library/imports/43/430eccbf-bf2c-4e6e-8c0c-884bbb487f32.json @@ -0,0 +1,194 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "__builtin-editor-gizmo-line", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "stage": "transparent", + "blendState": { + "targets": [ + { + "blend": true, + "blendEq": 32774, + "blendSrc": 770, + "blendDst": 1 + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": true + }, + "properties": { + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + } + }, + "program": "__builtin-editor-gizmo-line|gizmo-line-vs|gizmo-line-fs:front" + }, + { + "stage": "transparent", + "blendState": { + "targets": [ + { + "blend": true, + "blendEq": 32774, + "blendSrc": 770, + "blendDst": 1 + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": true, + "depthFunc": 516 + }, + "properties": { + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + } + }, + "program": "__builtin-editor-gizmo-line|gizmo-line-vs|gizmo-line-fs:back" + } + ] + } + ], + "shaders": [ + { + "hash": 2579669062, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nattribute vec3 a_position;\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n gl_Position.z -= 0.0001;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform DIFFUSE_COLOR {\n vec4 diffuseColor;\n};\nvec4 front() {\n return CCFragOutput(diffuseColor);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n gl_Position.z -= 0.0001;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform vec4 diffuseColor;\nvec4 front() {\n return CCFragOutput(diffuseColor);\n}\nvoid main() { gl_FragColor = front(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "DIFFUSE_COLOR", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [], + "record": null, + "name": "__builtin-editor-gizmo-line|gizmo-line-vs|gizmo-line-fs:front" + }, + { + "hash": 2538316070, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nattribute vec3 a_position;\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n gl_Position.z -= 0.0001;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform DIFFUSE_COLOR {\n vec4 diffuseColor;\n};\nvec4 back() {\n return CCFragOutput(vec4(diffuseColor.rgb, diffuseColor.a * 0.2));\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = back(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n gl_Position.z -= 0.0001;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform vec4 diffuseColor;\nvec4 back() {\n return CCFragOutput(vec4(diffuseColor.rgb, diffuseColor.a * 0.2));\n}\nvoid main() { gl_FragColor = back(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "DIFFUSE_COLOR", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [], + "record": null, + "name": "__builtin-editor-gizmo-line|gizmo-line-vs|gizmo-line-fs:back" + } + ] +} \ No newline at end of file diff --git a/library/imports/43/432fa09c-cf03-4cff-a186-982604408a07.json b/library/imports/43/432fa09c-cf03-4cff-a186-982604408a07.json new file mode 100644 index 0000000..8912483 --- /dev/null +++ b/library/imports/43/432fa09c-cf03-4cff-a186-982604408a07.json @@ -0,0 +1,39 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-3d-particle", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "829a282c-b049-4019-bd38-5ace8d8a6417" + }, + "_techniqueData": { + "0": { + "props": { + "mainTexture": { + "__uuid__": "600301aa-3357-4a10-b086-84f011fa32ba" + }, + "mainTiling_Offset": { + "__type__": "cc.Vec4", + "x": 1, + "y": 1, + "z": 0, + "w": 0 + }, + "tintColor": { + "__type__": "cc.Color", + "r": 172, + "g": 165, + "b": 165, + "a": 127 + } + }, + "defines": { + "CC_USE_BILLBOARD": true, + "CC_USE_STRETCHED_BILLBOARD": false, + "CC_USE_HORIZONTAL_BILLBOARD": false, + "CC_USE_VERTICAL_BILLBOARD": false, + "CC_USE_MESH": false + } + } + } +} \ No newline at end of file diff --git a/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.json b/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.json new file mode 100644 index 0000000..279d04b --- /dev/null +++ b/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "muchai_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.mp3 b/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.mp3 new file mode 100644 index 0000000..c5ab97a Binary files /dev/null and b/library/imports/43/434c4832-eab0-46c1-a1ef-baa5316386b4.mp3 differ diff --git a/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js b/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js new file mode 100644 index 0000000..ae12203 --- /dev/null +++ b/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js @@ -0,0 +1,423 @@ +"use strict"; +cc._RF.push(module, '43bfcJ6/25Fs4fHUE0PeBOX', 'GameTool'); +// Script/module/Tool/GameTool.ts + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GameTool = void 0; +//最大工具类 各种公共方法,以及处理上传,获取后端接口数据 +var GameTool = { + _startTime: 0, + _endTime: 0, + _totalTime: 0, + //获取userId + Authentication: function () { + var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId; + var data = JSON.parse(localStorage.getItem(name)); + if (data == "undifend" || data == null || data == "") { + var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + + encodeURIComponent(location.href); + console.log("链接没ID准备跳转", url); + window.location.href = url; + } + else { + if (!this.isNumber(data.userId)) { + var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + + encodeURIComponent(location.href); + console.log("链接不合法", url); + window.location.href = url; + } + else { + cc.fx.StorageMessage.setStorage(name, data); + cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId); + } + } + }, + isNumber: function (value) { + var result = false; + result = typeof value === 'number'; + if (result) + if (value < 200000) + result = false; + return result; + }, + containsTrain: function (str) { + return /from=train/i.test(str); + }, + //埋点上传 + setGameData: function () { + //GAME_DATA 初始化 每次清零 + cc.fx.GameConfig.GAME_DATA = []; + cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA); + cc.fx.GameConfig.CLICK_init(); + var data = cc.fx.GameConfig.GAME_DATA; + var matchId = this.getMatchId(); + var postData = { + "gameId": cc.fx.GameConfig.GM_INFO.gameId, + "userId": cc.fx.GameConfig.GM_INFO.userId, + "scode": cc.fx.GameConfig.GM_INFO.scode, + "matchId": matchId, + "data": data + }; + console.log("上传数据:", postData); + cc.fx.HttpUtil.uploadUserLogData(postData, function () { }); + }, + //上传排行榜 type为1 + setRank: function (data) { + //GAME_DATA 初始化 每次清零 + var postData = { + "gameId": cc.fx.GameConfig.GM_INFO.gameId, + "userId": cc.fx.GameConfig.GM_INFO.userId, + "type": 1, + "totleTimes": data.totleTimes, + "accuracy": data.accuracy, + "success": cc.fx.GameConfig.GM_INFO.success + }; + cc.fx.HttpUtil.rankData(1, function () { }, postData); + }, + //获取排行榜 type为2 + getRank: function (data, callback) { + var rankLength = data.length; + var postData = { + "gameId": cc.fx.GameConfig.GM_INFO.gameId, + "userId": cc.fx.GameConfig.GM_INFO.userId, + "page": 1, + "pageSize": rankLength + }; + //回调进getRankData + cc.fx.HttpUtil.rankData(2, function (data) { callback(data); }, postData); + }, + //获取matchId 用于上传每次点击数据里面记录id方便查询 + getMatchId: function () { + var matchId = cc.sys.localStorage.getItem("matchId"); + var tempId = matchId; + if (matchId == "undifend" || matchId == null) { + matchId = this.setMatchId(); + } + else { + if (this.containsNanana(matchId) == true) { + matchId = this.setMatchId(); + } + else { + var char = parseInt(tempId.substring(10, tempId.length)); + if (cc.fx.GameConfig.GM_INFO.level == 1) { + char += 1; + matchId = tempId.slice(0, 10) + char + ""; + if (this.containsNanana(matchId)) + matchId = this.setMatchId(); + cc.fx.GameConfig.GM_INFO.matchId = matchId; + cc.sys.localStorage.setItem("matchId", matchId); + } + } + } + if (this.containsNanana(matchId) == true) { + matchId = this.setMatchId(); + } + return matchId; + }, + //检测matchId 如果有缓存以前的nanana数据清除 + containsNanana: function (str) { + return /na/i.test(str); + }, + //重新设置MatchId + setMatchId: function () { + // 定义包含可用字符的字符集 + var characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + // 创建一个数组以保存随机字符 + var uuidArray = []; + // 循环10次 生成10位的UUID + for (var i = 0; i < 10; i++) { + // 生成随机索引,范围是字符集的长度 + var randomIndex = Math.floor(Math.random() * characters.length); + // 从字符集中获取随机字符 + var randomChar = characters.charAt(randomIndex); + // 将字符添加到数组中 + uuidArray.push(randomChar); + } + var data = uuidArray.join('') + 1 + ""; + cc.sys.localStorage.setItem("matchNumber", 1); + cc.sys.localStorage.setItem("matchId", data); + cc.fx.GameConfig.GM_INFO.matchId = data; + return data; + }, + //截取名字 + subName: function (name, length) { + if (name.length > length) { + name = name.substring(0, length) + "..."; + } + return name; + }, + //设置头像 + setPic: function (node, pic) { + node.active = false; + var url = pic; + setTimeout(function () { + fetch(url) + .then(function (response) { + return response.headers.get('Content-Length'); + }) + .then(function (errNo) { + if (errNo == "5093") { + node.active = true; + } + }) + .catch(function (error) { + // console.error('Error fetching X-Info:', error); + }); + }, 100); + cc.assetManager.loadRemote(url, { ext: '.png' }, function (err, texture) { + if (texture) { + node.active = true; + node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture); + } + else { + // console.log(err,texture) + } + }); + }, + //第一个参数把目标带进来处理,第二个参数为名字长度,不同场景不同需求 + //名字4短,小排行,名字6长,大排行 + getRankData: function (data, target, nameLength) { + target.listData = data.data.list; + target.selfData = data.data.info; + var rankData = []; + var self = false; + cc.fx.GameTool.setPic(target.selfNode.getChildByName("pic").getChildByName("icon"), target.selfData.pic); + for (var i = 0; i <= target.listData.length - 1; i++) { + rankData.push({ rank: (i + 1), name: target.listData[i].nickName, total: target.listData[i].accuracy, time: target.listData[i].totleTimes, pic: target.listData[i].pic }); + if (cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId) { + self = true; + target.rankNumber = i; + target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = (i + 1) + ""; + } + if (i == (target.listData.length - 1) && self == false) { + target.rankNumber = i; + target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string = "99+"; + } + } + var name = cc.fx.GameTool.subName(target.selfData.nickName, nameLength); + target.selfNode.getChildByName("nameLab").getComponent(cc.Label).string = name; + target.selfNode.getChildByName("totalLab").getComponent(cc.Label).string = target.selfData.accuracy + "%"; + var timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes); + target.selfNode.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + ""; + switch (target.selfNode.getChildByName("rankLab").getComponent(cc.Label).string) { + case "1": + target.selfNode.getChildByName("rank").getChildByName("one").active = true; + break; + case "2": + target.selfNode.getChildByName("rank").getChildByName("two").active = true; + break; + case "3": + target.selfNode.getChildByName("rank").getChildByName("three").active = true; + break; + } + // 大排行 + if (nameLength == 6) { + target.rankList.setData(rankData); + target.selfNode.opacity = 255; + if (target.selfData.totalSunCount == 0) + target.selfNode.opacity = 0; + } + }, + getSeedRandom: function (min, max) { + console.log("随机数:", cc.fx.GameConfig.GM_INFO.currSeed); + max = max || 1; + min = min || 0; + cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280; + var rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0; + var tmp = min + rnd * (max - min); + return parseInt(tmp); + }, + //获取关卡配置的那个关卡数 + getCustom: function (type) { + var custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom); + if (custom == "undifend" || custom == null || custom == "") { + this.setCustom(); + } + else { + cc.fx.GameConfig.GM_INFO_SET("custom", custom[0]); + if (custom[0] != 0 || type == true) { + custom.shift(); + if (custom.length == 0) { + this.setCustom(); + } + else + cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, custom); + } + } + }, + //本地没有存储到配置,或者配置用完,重新创建配置 + setCustom: function () { + var arrayLength = cc.fx.GameConfig.LEVEL_INFO.length; + var arrayList = []; + for (var i = 1; i < arrayLength; i++) { + arrayList.push(i); + } + arrayList.sort(function () { return Math.random() - 0.5; }); + arrayList.unshift(0); + cc.fx.GameConfig.GM_INFO_SET("custom", arrayList[0]); + cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom, arrayList); + }, + getFoodName: function (food) { + var name = "葡萄"; + switch (food) { + case "baishao": + name = "白芍"; + break; + case "jingjie": + name = "荆芥"; + break; + case "renshen": + name = "人参"; + break; + case "danshen": + name = "丹参"; + break; + case "danggui": + name = "当归"; + break; + case "gouqi": + name = "枸杞"; + break; + case "mudan": + name = "牡丹"; + break; + case "mulan": + name = "木兰"; + break; + case "pugongying": + name = "蒲公英"; + break; + case "moli": + name = "茉莉"; + break; + case "jinju": + name = "金桔"; + break; + case "dazao": + name = "大枣"; + break; + case "lizi": + name = "李子"; + break; + case "lizhi": + name = "荔枝"; + break; + case "taozi": + name = "桃子"; + break; + case "putao": + name = "葡萄"; + break; + case "muchai": + name = "木柴"; + break; + case "ganjiang": + name = "干姜"; + break; + case "zhuye": + name = "竹叶"; + break; + case "longyan": + name = "龙眼"; + break; + case "chixiaodou": + name = "赤小豆"; + break; + case "gancao": + name = "甘草"; + break; + case "cha": + name = "茶"; + break; + } + return name; + }, + getSetScreenResolutionFlag: function () { + var size = cc.winSize; + var width = size.width; + var height = size.height; + if ((height / width) > (16.2 / 9)) + return false; + return true; + }, + //判断全面屏适配 + setFit: function (canvas) { + var flag = cc.fx.GameTool.getSetScreenResolutionFlag(); + if (flag) { + // console.log("不是全面屏"); + } + else { + // console.log("是全面屏"); + } + return flag; + }, + //获取游戏信息 + getGameInfo: function (node) { + var jg = false; + return jg; + }, + //设置游戏信息 + setGameInfo: function (pd) { + }, + //打字机效果 + typingAni: function (label, text, cb, target) { + var self = target; + var html = ''; + var arr = text.split(''); + var len = arr.length; + var step = 0; + self.func = function () { + html += arr[step]; + label.string = html; + if (++step == len) { + self.unschedule(self.func); + cb && cb(); + } + }; + self.schedule(self.func, 0.1, cc.macro.REPEAT_FOREVER, 0); + }, + //输入秒,返回需要展示时间格式 + getTimeMargin: function (second) { + var total = 0; + total = second; + var hour = 0; + hour = parseInt((total / 3600) + ""); //计算整数小时数 + var afterHour = total - hour * 60 * 60; //取得算出小时数后剩余的秒数 + var min = parseInt((afterHour / 60) + ""); //计算整数分 + var m = "" + min; + if (min < 10) + m = "0" + min; + var afterMin = total - hour * 60 * 60 - min * 60; //取得算出分后剩余的秒数 + var miao = afterMin + ""; + if (afterMin < 10) + miao = "0" + afterMin; + return m + ':' + miao; + }, + //输入秒,返回需要展示时间格式 + getTimeShenNong: function (second) { + second = parseInt(second / 1000 + ""); + var total = 0; + total = second; + var min = 0; + if (total > 60) { + min = parseInt((total / 60) + ""); //计算整数分 + } + var m = min + "'"; + var afterMin = total - min * 60; //取得算出分后剩余的秒数 + var miao = afterMin + "''"; + return m + miao; + }, + //获取时间戳 + getTime: function () { + var timestamp = new Date().getTime(); + return timestamp; + }, + pushLister: function () { + }, + removeAllLister: function () { + }, +}; +exports.GameTool = GameTool; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js.map b/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js.map new file mode 100644 index 0000000..f006a9c --- /dev/null +++ b/library/imports/43/43bfc27a-ff6e-45b3-87c7-504d0f781397.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Tool\\GameTool.ts"],"names":[],"mappings":";;;;;;;AACA,+BAA+B;AAC/B,IAAI,QAAQ,GAAG;IACX,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,CAAC;IACb,UAAU;IACV,cAAc;QACV,IAAI,IAAI,GAAG,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC;QACrD,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAClD,IAAG,IAAI,IAAI,UAAU,IAAI,IAAI,IAAE,IAAI,IAAI,IAAI,IAAI,EAAE,EAAC;YAC9C,IAAI,GAAG,GAAG,8EAA8E;gBACxF,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAC,GAAG,CAAC,CAAC;YAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAC;SAE9B;aACG;YACA,IAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAC;gBAC3B,IAAI,GAAG,GAAG,8EAA8E;oBACxF,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAC,GAAG,CAAC,CAAC;gBACzB,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,CAAC;aAC9B;iBACG;gBACA,EAAE,CAAC,EAAE,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,EAAC,IAAI,CAAC,CAAC;gBAC3C,EAAE,CAAC,EAAE,CAA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QACZ,IAAG,KAAK,GAAG,EAAE,EAAC;YACV,GAAG,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,GAAC,EAAE,CAAC,CAAC,CAAA,OAAO;SAC1C;QACD,IAAI,CAAC,GAAI,GAAG,GAAG,GAAG,CAAC;QAEnB,IAAI,QAAQ,GAAG,KAAK,GAAG,GAAG,GAAG,EAAE,CAAC,CAAA,aAAa;QAC7C,IAAI,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,GAAG,IAAI,CAAA;IACnB,CAAC;IAED,OAAO;IACP,OAAO;QACH,IAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,UAAU,EAAC;IAEX,CAAC;IACD,eAAe,EAAC;IAEhB,CAAC;CAEJ,CAAC;AACO,4BAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\n//最大工具类 各种公共方法,以及处理上传,获取后端接口数据\r\nvar GameTool = {\r\n _startTime: 0,\r\n _endTime: 0,\r\n _totalTime: 0,\r\n //获取userId\r\n Authentication(){\r\n let name = \"user_\" + cc.fx.GameConfig.GM_INFO.gameId;\r\n var data = JSON.parse(localStorage.getItem(name));\r\n if(data == \"undifend\" || data==null || data == \"\"){\r\n let url = \"https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=\"+\r\n encodeURIComponent(location.href);\r\n console.log(\"链接没ID准备跳转\",url);\r\n window.location.href = url;\r\n \r\n }\r\n else{\r\n if(!this.isNumber(data.userId)){\r\n let url = \"https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=\"+\r\n encodeURIComponent(location.href);\r\n console.log(\"链接不合法\",url);\r\n window.location.href = url;\r\n }\r\n else{\r\n cc.fx.StorageMessage.setStorage(name,data);\r\n cc.fx.GameConfig.GM_INFO.userId = parseInt(data.userId);\r\n }\r\n }\r\n },\r\n\r\n isNumber(value) {\r\n var result = false;\r\n result = typeof value === 'number';\r\n if(result) if(value < 200000) result = false;\r\n return result;\r\n },\r\n\r\n containsTrain(str) {\r\n return /from=train/i.test(str);\r\n },\r\n\r\n\r\n //埋点上传\r\n setGameData(){\r\n //GAME_DATA 初始化 每次清零\r\n cc.fx.GameConfig.GAME_DATA = [];\r\n cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA);\r\n cc.fx.GameConfig.CLICK_init();\r\n let data = cc.fx.GameConfig.GAME_DATA;\r\n let matchId = this.getMatchId();\r\n let postData = {\r\n \"gameId\":cc.fx.GameConfig.GM_INFO.gameId,\r\n \"userId\":cc.fx.GameConfig.GM_INFO.userId,\r\n \"scode\":cc.fx.GameConfig.GM_INFO.scode,\r\n \"matchId\":matchId,\r\n \"data\": data\r\n };\r\n\r\n console.log(\"上传数据:\",postData);\r\n cc.fx.HttpUtil.uploadUserLogData(postData,function(){})\r\n },\r\n //上传排行榜 type为1\r\n setRank(data){\r\n //GAME_DATA 初始化 每次清零\r\n let postData = {\r\n \"gameId\":cc.fx.GameConfig.GM_INFO.gameId,\r\n \"userId\":cc.fx.GameConfig.GM_INFO.userId,\r\n \"type\":1,\r\n \"totleTimes\": data.totleTimes,\r\n \"accuracy\": data.accuracy,\r\n \"success\": cc.fx.GameConfig.GM_INFO.success\r\n };\r\n cc.fx.HttpUtil.rankData(1,function(){},postData);\r\n },\r\n //获取排行榜 type为2\r\n getRank(data,callback){\r\n let rankLength = data.length;\r\n let postData = {\r\n \"gameId\":cc.fx.GameConfig.GM_INFO.gameId,\r\n \"userId\":cc.fx.GameConfig.GM_INFO.userId,\r\n \"page\":1,\r\n \"pageSize\":rankLength\r\n }; \r\n //回调进getRankData\r\n cc.fx.HttpUtil.rankData(2,data =>{callback(data)},postData);\r\n },\r\n //获取matchId 用于上传每次点击数据里面记录id方便查询\r\n getMatchId (){\r\n let matchId = cc.sys.localStorage.getItem(\"matchId\");\r\n let tempId = matchId;\r\n if(matchId == \"undifend\" || matchId==null){\r\n matchId = this.setMatchId();\r\n }\r\n else{\r\n if(this.containsNanana(matchId) == true){\r\n matchId = this.setMatchId();\r\n }\r\n else{\r\n let char = parseInt(tempId.substring(10,tempId.length));\r\n if(cc.fx.GameConfig.GM_INFO.level == 1){\r\n char += 1;\r\n matchId = tempId.slice(0, 10) + char + \"\";\r\n if(this.containsNanana(matchId)) matchId = this.setMatchId();\r\n cc.fx.GameConfig.GM_INFO.matchId = matchId;\r\n cc.sys.localStorage.setItem(\"matchId\",matchId);\r\n }\r\n }\r\n }\r\n\r\n if(this.containsNanana(matchId) == true){\r\n matchId = this.setMatchId();\r\n }\r\n return matchId;\r\n },\r\n //检测matchId 如果有缓存以前的nanana数据清除\r\n containsNanana(str) {\r\n return /na/i.test(str);\r\n },\r\n //重新设置MatchId\r\n setMatchId (){\r\n // 定义包含可用字符的字符集\r\n const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\r\n // 创建一个数组以保存随机字符\r\n const uuidArray = [];\r\n // 循环10次 生成10位的UUID\r\n for (let i = 0; i < 10; i++) {\r\n // 生成随机索引,范围是字符集的长度\r\n const randomIndex = Math.floor(Math.random() * characters.length);\r\n // 从字符集中获取随机字符\r\n const randomChar = characters.charAt(randomIndex);\r\n // 将字符添加到数组中\r\n uuidArray.push(randomChar);\r\n }\r\n let data = uuidArray.join('') + 1 + \"\";\r\n cc.sys.localStorage.setItem(\"matchNumber\",1);\r\n cc.sys.localStorage.setItem(\"matchId\",data);\r\n cc.fx.GameConfig.GM_INFO.matchId = data;\r\n return data;\r\n },\r\n //截取名字\r\n subName(name,length){\r\n if(name.length > length){\r\n name = name.substring(0,length) + \"...\"\r\n }\r\n return name;\r\n },\r\n //设置头像\r\n setPic(node,pic){\r\n node.active = false;\r\n let url = pic;\r\n setTimeout(() => {\r\n fetch(url)\r\n .then(response => {\r\n return response.headers.get('Content-Length');\r\n })\r\n .then(errNo => {\r\n if(errNo == \"5093\"){\r\n node.active = true;\r\n }\r\n })\r\n .catch(error => {\r\n // console.error('Error fetching X-Info:', error);\r\n });\r\n }, 100);\r\n cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => {\r\n if(texture){\r\n node.active = true;\r\n node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture);\r\n }\r\n else{\r\n // console.log(err,texture)\r\n }\r\n })\r\n },\r\n //第一个参数把目标带进来处理,第二个参数为名字长度,不同场景不同需求\r\n //名字4短,小排行,名字6长,大排行\r\n getRankData(data,target,nameLength){\r\n target.listData = data.data.list;\r\n target.selfData = data.data.info;\r\n let rankData = [];\r\n let self = false;\r\n cc.fx.GameTool.setPic(target.selfNode.getChildByName(\"pic\").getChildByName(\"icon\"),target.selfData.pic);\r\n for(let i=0;i<=target.listData.length-1;i++){\r\n rankData.push({rank:(i+1), name:target.listData[i].nickName, total:target.listData[i].accuracy,time:target.listData[i].totleTimes, pic:target.listData[i].pic});\r\n if(cc.fx.GameConfig.GM_INFO.userId == target.listData[i].userId){\r\n self = true;\r\n target.rankNumber = i;\r\n target.selfNode.getChildByName(\"rankLab\").getComponent(cc.Label).string =(i+1) + \"\"; \r\n }\r\n if(i == (target.listData.length-1) && self == false){\r\n target.rankNumber = i;\r\n target.selfNode.getChildByName(\"rankLab\").getComponent(cc.Label).string = \"99+\"; \r\n }\r\n }\r\n let name = cc.fx.GameTool.subName(target.selfData.nickName,nameLength);\r\n target.selfNode.getChildByName(\"nameLab\").getComponent(cc.Label).string = name;\r\n target.selfNode.getChildByName(\"totalLab\").getComponent(cc.Label).string = target.selfData.accuracy + \"%\";\r\n let timeTemp = cc.fx.GameTool.getTimeShenNong(target.selfData.totleTimes);\r\n target.selfNode.getChildByName(\"timeLab\").getComponent(cc.Label).string = timeTemp + \"\";\r\n switch(target.selfNode.getChildByName(\"rankLab\").getComponent(cc.Label).string){\r\n case \"1\":\r\n target.selfNode.getChildByName(\"rank\").getChildByName(\"one\").active = true;\r\n break;\r\n case \"2\":\r\n target.selfNode.getChildByName(\"rank\").getChildByName(\"two\").active = true;\r\n break;\r\n case \"3\":\r\n target.selfNode.getChildByName(\"rank\").getChildByName(\"three\").active = true;\r\n break;\r\n }\r\n // 大排行\r\n if(nameLength == 6){\r\n target.rankList.setData(rankData);\r\n target.selfNode.opacity = 255;\r\n if(target.selfData.totalSunCount == 0) target.selfNode.opacity = 0;\r\n }\r\n },\r\n\r\n getSeedRandom: function (min, max) {//包含min 不包含max\r\n console.log(\"随机数:\",cc.fx.GameConfig.GM_INFO.currSeed);\r\n max = max || 1;\r\n min = min || 0;\r\n cc.fx.GameConfig.GM_INFO.currSeed = (cc.fx.GameConfig.GM_INFO.currSeed * 9301 + 49297) % 233280;\r\n let rnd = cc.fx.GameConfig.GM_INFO.currSeed / 233280.0;\r\n let tmp = min + rnd * (max - min);\r\n return parseInt(tmp);\r\n },\r\n //获取关卡配置的那个关卡数\r\n getCustom(type){\r\n let custom = cc.fx.StorageMessage.getStorage(cc.fx.storageType.storageTypeCustom);\r\n if(custom == \"undifend\" || custom==null || custom == \"\"){\r\n this.setCustom();\r\n }\r\n else{\r\n cc.fx.GameConfig.GM_INFO_SET(\"custom\",custom[0]);\r\n if(custom[0] != 0 || type == true){\r\n custom.shift();\r\n if(custom.length == 0){\r\n this.setCustom();\r\n }\r\n else cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,custom);\r\n }\r\n }\r\n },\r\n //本地没有存储到配置,或者配置用完,重新创建配置\r\n setCustom(){\r\n let arrayLength = cc.fx.GameConfig.LEVEL_INFO.length;\r\n let arrayList = [];\r\n for(let i=1; i Math.random() - 0.5);\r\n arrayList.unshift(0)\r\n cc.fx.GameConfig.GM_INFO_SET(\"custom\",arrayList[0]);\r\n cc.fx.StorageMessage.setStorage(cc.fx.storageType.storageTypeCustom,arrayList);\r\n },\r\n\r\n getFoodName(food){\r\n var name = \"葡萄\";\r\n switch(food){\r\n case \"baishao\":\r\n name = \"白芍\";\r\n break;\r\n case \"jingjie\":\r\n name = \"荆芥\";\r\n break;\r\n case \"renshen\":\r\n name = \"人参\";\r\n break;\r\n case \"danshen\":\r\n name = \"丹参\";\r\n break;\r\n case \"danggui\":\r\n name = \"当归\";\r\n break;\r\n case \"gouqi\":\r\n name = \"枸杞\";\r\n break;\r\n case \"mudan\":\r\n name = \"牡丹\";\r\n break;\r\n case \"mulan\":\r\n name = \"木兰\";\r\n break;\r\n case \"pugongying\":\r\n name = \"蒲公英\";\r\n break;\r\n case \"moli\":\r\n name = \"茉莉\";\r\n break;\r\n case \"jinju\":\r\n name = \"金桔\";\r\n break;\r\n case \"dazao\":\r\n name = \"大枣\";\r\n break;\r\n case \"lizi\":\r\n name = \"李子\";\r\n break;\r\n case \"lizhi\":\r\n name = \"荔枝\";\r\n break;\r\n case \"taozi\":\r\n name = \"桃子\";\r\n break;\r\n case \"putao\":\r\n name = \"葡萄\";\r\n break;\r\n case \"muchai\":\r\n name = \"木柴\";\r\n break;\r\n case \"ganjiang\":\r\n name = \"干姜\";\r\n break;\r\n case \"zhuye\":\r\n name = \"竹叶\";\r\n break;\r\n case \"longyan\":\r\n name = \"龙眼\";\r\n break;\r\n case \"chixiaodou\":\r\n name = \"赤小豆\";\r\n break;\r\n case \"gancao\":\r\n name = \"甘草\";\r\n break;\r\n case \"cha\":\r\n name = \"茶\";\r\n break;\r\n }\r\n return name;\r\n },\r\n\r\n getSetScreenResolutionFlag: function () {\r\n let size = cc.winSize;\r\n let width = size.width;\r\n let height = size.height;\r\n if ((height / width) > (16.2 / 9)) return false;\r\n return true;\r\n },\r\n //判断全面屏适配\r\n setFit: function (canvas) {\r\n let flag = cc.fx.GameTool.getSetScreenResolutionFlag();\r\n if (flag) {\r\n \t// console.log(\"不是全面屏\");\r\n } else {\r\n \t// console.log(\"是全面屏\");\r\n }\r\n return flag;\r\n },\r\n //获取游戏信息\r\n getGameInfo: function(node){\r\n var jg = false;\r\n return jg;\r\n },\r\n //设置游戏信息\r\n setGameInfo: function(pd){\r\n \r\n },\r\n\r\n //打字机效果\r\n typingAni(label,text,cb,target){\r\n var self = target;\r\n var html = '';\r\n var arr = text.split('');\r\n var len = arr.length;\r\n var step = 0;\r\n self.func = ()=>{\r\n html += arr[step];\r\n label.string = html;\r\n if (++step == len) {\r\n self.unschedule(self.func);\r\n cb && cb();\r\n }\r\n }\r\n self.schedule(self.func,0.1, cc.macro.REPEAT_FOREVER, 0)\r\n },\r\n\r\n //输入秒,返回需要展示时间格式\r\n getTimeMargin:(second) => {\r\n let total = 0;\r\n total = second;\r\n let hour = 0;\r\n hour = parseInt((total / 3600) + \"\");//计算整数小时数\r\n let afterHour = total - hour * 60 * 60;//取得算出小时数后剩余的秒数\r\n let min = parseInt((afterHour / 60)+\"\");//计算整数分\r\n let m = \"\" + min; \r\n if(min < 10) m = \"0\"+min;\r\n let afterMin = total - hour * 60 * 60 - min * 60;//取得算出分后剩余的秒数\r\n let miao = afterMin + \"\";\r\n if(afterMin < 10) miao = \"0\" + afterMin;\r\n return m + ':' + miao\r\n },\r\n\r\n //输入秒,返回需要展示时间格式\r\n getTimeShenNong:(second) => {\r\n second = parseInt(second/1000+\"\");\r\n let total = 0;\r\n total = second;\r\n let min = 0;\r\n if(total > 60){\r\n min = parseInt((total / 60)+\"\");//计算整数分\r\n }\r\n let m = min + \"'\"; \r\n\r\n let afterMin = total - min * 60;//取得算出分后剩余的秒数\r\n let miao = afterMin + \"''\";\r\n return m + miao\r\n },\r\n\r\n //获取时间戳\r\n getTime(){\r\n const timestamp = new Date().getTime();\r\n return timestamp;\r\n },\r\n pushLister:function () {\r\n \r\n },\r\n removeAllLister:function () {\r\n \r\n },\r\n\r\n};\r\nexport { GameTool };"]} \ No newline at end of file diff --git a/library/imports/43/43c83a99-6be0-468f-a894-1b624f3d33ac.json b/library/imports/43/43c83a99-6be0-468f-a894-1b624f3d33ac.json new file mode 100644 index 0000000..1c4600c --- /dev/null +++ b/library/imports/43/43c83a99-6be0-468f-a894-1b624f3d33ac.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "back", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1047, + 415, + 28, + 40 + ], + "offset": [ + -1, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/43/43cc7ea5-4a81-400c-99b2-f71529750198.json b/library/imports/43/43cc7ea5-4a81-400c-99b2-f71529750198.json new file mode 100644 index 0000000..62ab025 --- /dev/null +++ b/library/imports/43/43cc7ea5-4a81-400c-99b2-f71529750198.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_cha", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1223, + 863, + 428, + 338 + ], + "offset": [ + -6, + 0 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js b/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js new file mode 100644 index 0000000..024d7ac --- /dev/null +++ b/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js @@ -0,0 +1,101 @@ +"use strict"; +cc._RF.push(module, '454adgphRpA6oq5lB6Cg1fK', 'Load'); +// Script/Load.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var share_1 = require("./module/Share/share"); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent; +var NewClass = /** @class */ (function (_super) { + __extends(NewClass, _super); + function NewClass() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.localTest = false; + _this.clientTestVersion = "1.0.0"; + _this.testVersion = null; + return _this; + } + NewClass.prototype.start = function () { + cc.debug.setDisplayStats(false); + window.initMgr(); + // @ts-ignore + if (window.wx !== null && window.wx !== undefined) + share_1.WeChat.setShare(location.href); + cc.fx.GameConfig.init(this.localTest); + this.testVersion.string = this.clientTestVersion; + var urlNow = window.location.href; + if (this.containsTrain(urlNow)) { + console.log("无排行版本"); + this.node.getChildByName("Rank").active = false; + } + else { + console.log("有排行版本"); + } + }; + //判断来源 + NewClass.prototype.containsTrain = function (str) { + return /from=train/i.test(str); + }; + NewClass.prototype.setRank = function () { + var data = { + "totleTimes": 8759, + "accuracy": 80, + }; + cc.fx.GameTool.setRank(data); + }; + //开始游戏,跳转至引导页面 + NewClass.prototype.startGame = function () { + setTimeout(function () { + cc.director.loadScene("GuideScene"); + }, 100); + // cc.director.loadScene("GuideScene"); + }; + //备用,用来测试跳转 指定关卡 + NewClass.prototype.clickBtn = function (event, data) { + // cc.fx.GameConfig.GM_INFO.custom = parseInt(data); + cc.director.loadScene("GameScene"); + }; + //打开排行榜 + NewClass.prototype.openRank = function () { + setTimeout(function () { + cc.director.loadScene("RankScene"); + }, 100); + }; + NewClass.prototype.update = function (dt) { + }; + __decorate([ + property(false) + ], NewClass.prototype, "localTest", void 0); + __decorate([ + property("") + ], NewClass.prototype, "clientTestVersion", void 0); + __decorate([ + property(cc.Label) + ], NewClass.prototype, "testVersion", void 0); + NewClass = __decorate([ + ccclass + ], NewClass); + return NewClass; +}(cc.Component)); +exports.default = NewClass; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js.map b/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js.map new file mode 100644 index 0000000..13f2efb --- /dev/null +++ b/library/imports/45/454ad829-851a-40ea-8ab9-941e828357ca.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\Load.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA8C;AAExC,IAAA,KAAwC,EAAE,CAAC,UAAU,EAApD,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAiB,CAAC;AAG5D;IAAsC,4BAAY;IAAlD;QAAA,qEAkEC;QA/DG,eAAS,GAAY,KAAK,CAAC;QAG3B,uBAAiB,GAAW,OAAO,CAAC;QAGpC,iBAAW,GAAa,IAAI,CAAC;;IAyDjC,CAAC;IAvDG,wBAAK,GAAL;QAEI,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,aAAa;QACb,IAAG,MAAM,CAAC,EAAE,KAAK,IAAI,IAAI,MAAM,CAAC,EAAE,KAAK,SAAS;YAAE,cAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACjF,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC;Q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AQ,CAAC,EAAE,CAAC,KAAK,CAAC;iDACU;IATZ,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAkE5B;IAAD,eAAC;CAlED,AAkEC,CAlEqC,EAAE,CAAC,SAAS,GAkEjD;kBAlEoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["import { WeChat } from \"./module/Share/share\";\r\n\r\nconst {ccclass, property, requireComponent} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(false)\r\n localTest: boolean = false;\r\n\r\n @property(\"\")\r\n clientTestVersion: string = \"1.0.0\";\r\n\r\n @property(cc.Label)\r\n testVersion: cc.Label = null;\r\n\r\n start () {\r\n\r\n cc.debug.setDisplayStats(false);\r\n window.initMgr();\r\n // @ts-ignore\r\n if(window.wx !== null && window.wx !== undefined) WeChat.setShare(location.href);\r\n cc.fx.GameConfig.init(this.localTest);\r\n this.testVersion.string = this.clientTestVersion;\r\n\r\n var urlNow = window.location.href;\r\n if(this.containsTrain(urlNow)){\r\n console.log(\"无排行版本\");\r\n this.node.getChildByName(\"Rank\").active = false;\r\n }\r\n else{\r\n console.log(\"有排行版本\");\r\n }\r\n \r\n }\r\n\r\n //判断来源\r\n containsTrain(str) {\r\n return /from=train/i.test(str);\r\n }\r\n\r\n setRank(){\r\n let data = {\r\n \"totleTimes\": 8759,\r\n \"accuracy\": 80,\r\n }\r\n cc.fx.GameTool.setRank(data);\r\n }\r\n\r\n //开始游戏,跳转至引导页面\r\n startGame(){\r\n \r\n setTimeout(() => {\r\n cc.director.loadScene(\"GuideScene\");\r\n }, 100);\r\n // cc.director.loadScene(\"GuideScene\");\r\n }\r\n //备用,用来测试跳转 指定关卡\r\n clickBtn(event,data){\r\n // cc.fx.GameConfig.GM_INFO.custom = parseInt(data);\r\n cc.director.loadScene(\"GameScene\");\r\n } \r\n //打开排行榜\r\n openRank(){\r\n setTimeout(() => {\r\n cc.director.loadScene(\"RankScene\");\r\n }, 100);\r\n }\r\n \r\n protected update(dt: number): void {\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/46/466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a.json b/library/imports/46/466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a.json new file mode 100644 index 0000000..e2f3cfe --- /dev/null +++ b/library/imports/46/466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a.json @@ -0,0 +1,18 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-3d-trail", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "2a7c0036-e0b3-4fe1-8998-89a54b8a2bec" + }, + "_techniqueData": { + "0": { + "props": { + "mainTexture": { + "__uuid__": "0275e94c-56a7-410f-bd1a-fc7483f7d14a" + } + } + } + } +} \ No newline at end of file diff --git a/library/imports/47/472df5d3-35e7-4184-9e6c-7f41bee65ee3.json b/library/imports/47/472df5d3-35e7-4184-9e6c-7f41bee65ee3.json new file mode 100644 index 0000000..aa87208 --- /dev/null +++ b/library/imports/47/472df5d3-35e7-4184-9e6c-7f41bee65ee3.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "atom", + "texture": "d0a82d39-bede-46c4-b698-c81ff0dedfff", + "atlas": "", + "rect": [ + 0, + 0, + 31, + 31 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 31, + 31 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.json b/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.json new file mode 100644 index 0000000..361ea6e --- /dev/null +++ b/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "baishao_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.mp3 b/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.mp3 new file mode 100644 index 0000000..9947e8b Binary files /dev/null and b/library/imports/47/47388b59-bca9-4607-bdc1-1fc7ba079a12.mp3 differ diff --git a/library/imports/4a/4a37dd57-78cd-4cec-aad4-f11a73d12b63.json b/library/imports/4a/4a37dd57-78cd-4cec-aad4-f11a73d12b63.json new file mode 100644 index 0000000..383aa8b --- /dev/null +++ b/library/imports/4a/4a37dd57-78cd-4cec-aad4-f11a73d12b63.json @@ -0,0 +1,104 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "richtext", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "richText", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 153.38, + "height": 50 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "groupIndex": 0, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.RichText", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_useOriginalSize": true, + "_N$string": "RichText", + "_N$horizontalAlign": 0, + "_N$fontSize": 40, + "_N$maxWidth": 0, + "_N$lineHeight": 50 + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "4a37dd57-78cd-4cec-aad4-f11a73d12b63" + }, + "fileId": "fd4fe1WoCpJK6rVCZ13Z14R" + } +] \ No newline at end of file diff --git a/library/imports/4a/4aa928a4-3ba6-433f-a3d6-261260e338af.json b/library/imports/4a/4aa928a4-3ba6-433f-a3d6-261260e338af.json new file mode 100644 index 0000000..304521e --- /dev/null +++ b/library/imports/4a/4aa928a4-3ba6-433f-a3d6-261260e338af.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteAtlas", + "_name": "rankUI.plist", + "_objFlags": 0, + "_native": "", + "_spriteFrames": { + "rank_icon1": { + "__uuid__": "4f8a74d6-8e87-4734-9df3-90027b702649" + }, + "rank_icon2": { + "__uuid__": "3cc7bc6a-bf5d-4ca9-a7b8-22a399f29300" + }, + "rank_icon3": { + "__uuid__": "515ff941-a6d1-421a-9243-249091fc5b1d" + }, + "rank_other": { + "__uuid__": "e30f966f-d546-44a0-9ee4-ba5745d69daa" + }, + "rank_phoneBg": { + "__uuid__": "700fa527-a104-4d31-846a-99ebc1c5803a" + }, + "rank_self": { + "__uuid__": "5d5398c4-b3d5-4045-910e-1bfa6fed47ea" + }, + "rank_share": { + "__uuid__": "df04b74d-9f23-4e49-a2a0-388f63ce0f2f" + } + } +} \ No newline at end of file diff --git a/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.json b/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.png b/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.png new file mode 100644 index 0000000..c9f199e Binary files /dev/null and b/library/imports/4b/4b49cd83-b149-43f7-925f-f80540e80749.png differ diff --git a/library/imports/4b/4b9c5a7e-c645-48a4-9aca-5df381ce4ef5.json b/library/imports/4b/4b9c5a7e-c645-48a4-9aca-5df381ce4ef5.json new file mode 100644 index 0000000..c11a90d --- /dev/null +++ b/library/imports/4b/4b9c5a7e-c645-48a4-9aca-5df381ce4ef5.json @@ -0,0 +1,1898 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "OverScene", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + }, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 7 + }, + { + "__id__": 9 + }, + { + "__id__": 13 + }, + { + "__id__": 15 + }, + { + "__id__": 17 + }, + { + "__id__": 19 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 38 + }, + { + "__id__": 39 + }, + { + "__id__": 40 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "0fDnScgvlKZoz0WvU7bcCw" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "634acecc-5987-409f-8c81-28569289abb3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "33V0ak83RMQ64u+CvJcisv" + }, + { + "__type__": "cc.Node", + "_name": "zhun", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 67, + "g": 137, + "b": 148, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 90, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0.804, + 245.289, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "13DbiFcVBOWq/4sLwL0woj" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "准确率", + "_N$string": "准确率", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "cbhdb2DAtJ/asl7ki1AUH4" + }, + { + "__type__": "cc.Node", + "_name": "count", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 93, + "g": 65, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 41.71, + "height": 94.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 174.798, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0XjY3oxhLw6l5Sjbdlto4" + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 93, + "g": 65, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28.45, + "height": 40.32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0.804, + -64.004, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "3c+50VKQlDW4SfENziGn33" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "%", + "_N$string": "%", + "_fontSize": 32, + "_lineHeight": 32, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "3eQNZGDClCCr4Oy0XoNlsj" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0", + "_N$string": "0", + "_fontSize": 75, + "_lineHeight": 75, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "33J9Fy+9VDZbdP4dSOqHJ1" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 580, + "height": 37 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -52.678, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "9d47pQ76JAgKwOd0QHAXRT" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "0a9b51e5-23bb-4902-bd02-0b3f91e60173" + }, + "_type": 3, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "f6PPUmWpVCE4hJq5zzwlCh" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 243, + "g": 234, + "b": 227, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 149.39, + "height": 60.48 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -127.789, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "2a6U4DTrxPLLPFxo1noum1" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0分0秒", + "_N$string": "0分0秒", + "_fontSize": 48, + "_lineHeight": 48, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "65enMFCvpLbbGtwz6knn/4" + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 6, + "height": 155 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -227.685, + -154.877, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1fRXAidZhNdZsNQi9ryLwI" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "5btEhu/UNPTI4B+ArhkF8u" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 20 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 552, + "height": 204 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -8.015, + 418.157, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "342AOGbEBHs4KlBsmpCZkd" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ecd8b796-cf3d-45e6-ab5d-99906ff68426" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "32KwzGeTFDy5k6D/cZS3B4" + }, + { + "__type__": "cc.Node", + "_name": "btn", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 28 + }, + { + "__id__": 34 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "19+GdlQVtJM55xDuYFBJSn" + }, + { + "__type__": "cc.Node", + "_name": "again", + "_objFlags": 512, + "_parent": { + "__id__": 21 + }, + "_children": [ + { + "__id__": 23 + } + ], + "_active": true, + "_components": [ + { + "__id__": 25 + }, + { + "__id__": 26 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -315.467, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "3dSvloeRtIOJAHgqIMN6i/" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 22 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 156, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6.32, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9OkbcwA5K4bVH8DP/3oEm" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "75ceffef-e469-4845-80bd-e0052840d248" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "55YRpYnX9PUaRxuLrtzBgO" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "b6l71VEzlJ45ZYDhcJO5t7" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 27 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 22 + }, + "_id": "64rZ47m2pOQr2egGCWonjb" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "again", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [ + { + "__id__": 29 + } + ], + "_active": true, + "_components": [ + { + "__id__": 31 + }, + { + "__id__": 32 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -456.109, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "520mTZlWxGjYT8kO8KuWFE" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 156, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 5.755, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "69J/fV85xGCKLRToUVveAy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "4d3e4edd-f44e-4e1a-8648-d173f746eea8" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "65lFEX5qFIZqf6wf3pqi83" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "4cnNC7FshJS4y//Is9ZxvK" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 33 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 28 + }, + "_id": "20GyHAhBdLb6eXmQZIxAMo" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "openRank", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "finishi", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 35 + }, + { + "__id__": 36 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -385.904, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "75MWyDslJKCpuJ0hRH1qJ2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5890602f-470f-42ea-b785-8d5565214ada" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "2efNKcisBOVZb+CaEaroWi" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 37 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 34 + }, + "_id": "f46dBGYuRNpZ+4GgWnzxDg" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "805c6nf399HWZeuWnNB9CTH", + "handler": "jumpFinishi", + "customEventData": "" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + }, + { + "__type__": "805c6nf399HWZeuWnNB9CTH", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "count": { + "__id__": 12 + }, + "time": { + "__id__": 16 + }, + "finishiTime": { + "__id__": 14 + }, + "_id": "f9bq3mWw5JoYQRI0zhq8ue" + } +] \ No newline at end of file diff --git a/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.json b/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.png b/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.png new file mode 100644 index 0000000..388f6f0 Binary files /dev/null and b/library/imports/4b/4bab67cb-18e6-4099-b840-355f0473f890.png differ diff --git a/library/imports/4d/4d3e4edd-f44e-4e1a-8648-d173f746eea8.json b/library/imports/4d/4d3e4edd-f44e-4e1a-8648-d173f746eea8.json new file mode 100644 index 0000000..634c98d --- /dev/null +++ b/library/imports/4d/4d3e4edd-f44e-4e1a-8648-d173f746eea8.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_Label", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1542, + 705, + 156, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 458, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/4e/4eaf518b-35ec-4262-928d-4d497c3f2830.json b/library/imports/4e/4eaf518b-35ec-4262-928d-4d497c3f2830.json new file mode 100644 index 0000000..2abb1a6 --- /dev/null +++ b/library/imports/4e/4eaf518b-35ec-4262-928d-4d497c3f2830.json @@ -0,0 +1,3796 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "GameScene", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + }, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "4eaf518b-35ec-4262-928d-4d497c3f2830" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + } + ], + "_active": true, + "_components": [ + { + "__id__": 76 + }, + { + "__id__": 77 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "GameNode", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 8 + }, + { + "__id__": 15 + }, + { + "__id__": 20 + }, + { + "__id__": 38 + }, + { + "__id__": 56 + }, + { + "__id__": 67 + }, + { + "__id__": 69 + }, + { + "__id__": 70 + } + ], + "_active": true, + "_components": [ + { + "__id__": 74 + }, + { + "__id__": 75 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b0VHqWWqlJ4qVyuwnLGCWw" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c9MIzCRC1OGKHNP/Q+VlVk" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "6b86bfb2-d4d1-4474-a615-6a8a515b9201" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "b4dc89EnxNO4TNZJR/F4fF" + }, + { + "__type__": "cc.Node", + "_name": "TimeNode", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 11 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -268.945, + 420.683, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5fanACpyFCUo0UbqRf7tLn" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 188, + "height": 225 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -2.093, + 1.68, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "03gZrrl7VDI6/PrPKk7EWo" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "bfZfIenABPoqJqhRtjyx3A" + }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 195, + "g": 95, + "b": 62, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 76, + "height": 76 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.516, + 0, + 0, + 0, + 0.7071067811865475, + 0.7071067811865476, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 90 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27ck6PdKZCnLzZ2NTxsyMA" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "09f3b49a-507f-485e-b8bf-809f98dd4923" + }, + "_type": 3, + "_sizeMode": 0, + "_fillType": 2, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52X2WJAQ5O7oIPu9ciNv7P" + }, + { + "__type__": "cc.Node", + "_name": "needle", + "_objFlags": 0, + "_parent": { + "__id__": 8 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 36.513, + -48.864, + 0, + 0, + 0, + 0, + 1, + 1, + -1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6ajo4WkQRJophTzEga2ZW2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8cf947ea-88e6-4326-a79d-4534335f4e32" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0aipdJWs9KYbRSDLejTy2H" + }, + { + "__type__": "cc.Node", + "_name": "Plant", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 16 + }, + { + "__id__": 18 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "1dH+troCBMIbpbgd3McLPt" + }, + { + "__type__": "cc.Node", + "_name": "name", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 95, + "g": 67, + "b": 44, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 50.4 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 389.515, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fdE2U4ly9JZb4QSCSaBUS0" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "", + "_N$string": "", + "_fontSize": 40, + "_lineHeight": 40, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "4aZQeiDw1BlIse68X0zzaY" + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 348, + "height": 412 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21, + 144.85, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f8TXcETopPpIHlcYDZErzy" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "794756c4-eeac-4a24-a412-4035d0719970" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "fc226/y45G6pzMn84yHiGc" + }, + { + "__type__": "cc.Node", + "_name": "Btn_New", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 21 + }, + { + "__id__": 28 + }, + { + "__id__": 33 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -200, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "dcgQGtJrNFSYN55RWmFdRC" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 24 + } + ], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "70fbQFBo9BZaP/ZkWZXBjM" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "f9+drew0lFNp1nmz0WimRD" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "ebETvxnFZMO62/yyqB2xTJ" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "732HK3/ERHFbYOs1NpdbPS" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b0746a9d-0822-49dd-8cf8-45afc1ee4652" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "71JLZ3LMBAmZJ1VgRlCRJ7" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 27 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 21 + }, + "_id": "e48GvZ+EhDlb1BwBX20oNb" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Choice", + "customEventData": "Btn_New" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 29 + }, + { + "__id__": 31 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "91qNPc3sxBZ6JcGgZJDBQM" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "55AI7r4yxDfqHfD7c06VJE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 29 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "b7pbP1gBdB5rR5gyBcBoB3" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 28 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "4b+sG2Mk9JcZgvZr6mvtc4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "999yCGnxhBFbtorC7KBz6V" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 20 + }, + "_children": [ + { + "__id__": 34 + }, + { + "__id__": 36 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "d5QthFBvVAEYiF3lbXEO8F" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c37haxnrFHlo4bXF3MGsdY" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "edQQYm5oRCzqkmoZr28CWu" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 33 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 117, + "height": 38 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6dTJGf3+lPzo7OGNdugSQa" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "8189af2f-6b70-497a-93a5-994048cb2e09" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "48Klhz86dGEpy4YeuPAPyt" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Old", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 39 + }, + { + "__id__": 46 + }, + { + "__id__": 51 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -330, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e8S/Fw5hVDcZEIoedcUoA5" + }, + { + "__type__": "cc.Node", + "_name": "nomal", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 40 + }, + { + "__id__": 42 + } + ], + "_active": true, + "_components": [ + { + "__id__": 44 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 480, + "height": 80 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b8f7FhnSVD4YdOyVdiaS8w" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 41 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "6804Fr/P5Jcrp/ZgHvQGFp" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 40 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "eeimXM2OpAH6QUrXsQ8DFk" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 39 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 43 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "edVV1XgsRFTaFQqAWq6vRQ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 42 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "b9472a40-1f02-4a4b-8fbc-818b4255e9ce" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "87b1mBSSVFXqo0qBp4uw3R" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.05, + "clickEvents": [ + { + "__id__": 45 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 39 + }, + "_id": "844f8hVoxDyKYF9vmdJPjH" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Choice", + "customEventData": "Btn_Old" + }, + { + "__type__": "cc.Node", + "_name": "err", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 47 + }, + { + "__id__": 49 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "8cNFzZjThDZaGgrbxOSrWB" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 46 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 48 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "b8gS60k55FTIv7sCLhX2IE" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 47 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "1alz4B0WZJoagzx/gYKn80" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 46 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 50 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "cfTeGEeD5Is6Qleot08V69" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "08e5fce4-27f5-445b-a895-f47a7ffb5176" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "38OsTMOjFBHbljuJSFOHKS" + }, + { + "__type__": "cc.Node", + "_name": "correct", + "_objFlags": 0, + "_parent": { + "__id__": 38 + }, + "_children": [ + { + "__id__": 52 + }, + { + "__id__": 54 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7d1vUTNeFLTb9hNFhXVp/C" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 51 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 53 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 501, + "height": 85 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e3VW/ZbbBILpI64lhngSBG" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "6bexNs3ZVIgq9T1svNNqnT" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 51 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 55 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 112, + "height": 34 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 6, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "44NE7DhmFDfbB4NvA9LhXJ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 54 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "33d3b1ce-0232-41d5-b379-8316ed3e442d" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "f0DKOT7mRILY3xDSNmqml8" + }, + { + "__type__": "cc.Node", + "_name": "Btn_Firewood", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 57 + }, + { + "__id__": 59 + }, + { + "__id__": 61 + } + ], + "_active": false, + "_components": [ + { + "__id__": 64 + }, + { + "__id__": 65 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 141, + "height": 157 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -275, + -567, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5a+WTpsZ5GtZFgHGCiqy6C" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 58 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 141, + "height": 157 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "028Rdc0D9Enp/k3+brsUpH" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 57 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1b4aa157-8271-4bd0-a922-e19f452d86fc" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "0eVMzhXWdE8ooYzPkctTaS" + }, + { + "__type__": "cc.Node", + "_name": "fireBg", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 60 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 152, + "height": 56 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -11.041, + -4.32, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "59+YnTBw9LKZd7b+qWv/ih" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 59 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "15c8df95-b7df-427c-b48c-57c1392d9e84" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "ebZ2ICqIlLzZWtBWoBQBYm" + }, + { + "__type__": "cc.Node", + "_name": "fire", + "_objFlags": 0, + "_parent": { + "__id__": 56 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 62 + }, + { + "__id__": 63 + } + ], + "_prefab": null, + "_opacity": 150, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 104, + "height": 72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -14.401, + -38.902, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "aaY+R8TqxOiobnpngy2G4U" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "7fh5rdCndCdb3FxFdPCzI4" + }, + { + "__type__": "cc.Animation", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 61 + }, + "_enabled": true, + "_defaultClip": { + "__uuid__": "cd606b05-2183-4a5a-ad7c-9f3464006aaa" + }, + "_clips": [ + { + "__uuid__": "cd606b05-2183-4a5a-ad7c-9f3464006aaa" + } + ], + "playOnLoad": true, + "_id": "519JRe6K9IH7F/LNZ2Qya4" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 56 + }, + "_enabled": false, + "alignMode": 1, + "_target": null, + "_alignFlags": 12, + "_left": 100, + "_right": 0, + "_top": 0, + "_bottom": 100, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "bdqejmjNFHEb2V3LfNGtFO" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 56 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 0.85, + "clickEvents": [ + { + "__id__": 66 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 56 + }, + "_id": "5fddMOrhpMMYiDg/Xj52mK" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 5 + }, + "component": "", + "_componentId": "b0432BA295DjIOcuitdGKO1", + "handler": "click_Ignition", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "Begin", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 68 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 318, + "height": 203 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 123.06, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "39dIXWbmhNSpLn6niyVyGq" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 67 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "04421a0b-266e-4d13-81df-1873ef3c4a83" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "549d/TcvlJ0I9W4GjKco4i" + }, + { + "__type__": "cc.Node", + "_name": "Win", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "beOm6xY9JGcpUIgHepr4za" + }, + { + "__type__": "cc.Node", + "_name": "GameOver", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 71 + } + ], + "_active": false, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "5dxBdyCr9Dd7WMwsS/0Owj" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite(Splash)", + "_objFlags": 0, + "_parent": { + "__id__": 70 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + }, + { + "__id__": 73 + } + ], + "_prefab": null, + "_opacity": 50, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 2000 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c4602Hd0NIO6CGG6oPjm+C" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "ff0h3MP/lOCZ6oqE4ZSOxy" + }, + { + "__type__": "cc.BlockInputEvents", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_id": "22S5GnmVhCz7EY4orhQpJT" + }, + { + "__type__": "b0432BA295DjIOcuitdGKO1", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "Btn_New": { + "__id__": 20 + }, + "Btn_Old": { + "__id__": 38 + }, + "Plant": { + "__id__": 15 + }, + "timeNode": { + "__id__": 8 + }, + "FoodPlist": { + "__uuid__": "7ee88c39-72c3-4896-8faf-b26c1daecabc" + }, + "_id": "7dXON6+8BHRrnLvjmlXv+P" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "dfOLca1KVCyLxvg197AIBc" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + } +] \ No newline at end of file diff --git a/library/imports/4f/4f70a9c4-5fe2-4aa3-9d88-0b46bcf64f05.json b/library/imports/4f/4f70a9c4-5fe2-4aa3-9d88-0b46bcf64f05.json new file mode 100644 index 0000000..69c89b7 --- /dev/null +++ b/library/imports/4f/4f70a9c4-5fe2-4aa3-9d88-0b46bcf64f05.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_muchai", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 839, + 1291, + 408, + 268 + ], + "offset": [ + -6, + 4 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/4f/4f8a74d6-8e87-4734-9df3-90027b702649.json b/library/imports/4f/4f8a74d6-8e87-4734-9df3-90027b702649.json new file mode 100644 index 0000000..55e8dad --- /dev/null +++ b/library/imports/4f/4f8a74d6-8e87-4734-9df3-90027b702649.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_icon1", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 853, + 1, + 66, + 66 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 66, + 66 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.json b/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.json new file mode 100644 index 0000000..ea0b247 --- /dev/null +++ b/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "taozi_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.567347, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.mp3 b/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.mp3 new file mode 100644 index 0000000..4f165e0 Binary files /dev/null and b/library/imports/4f/4fb5e673-7017-4a1a-bf48-92250446042d.mp3 differ diff --git a/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.json b/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.png b/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.png new file mode 100644 index 0000000..ceb993c Binary files /dev/null and b/library/imports/4f/4fb7b659-6b73-4357-bfec-854837d7ff67.png differ diff --git a/library/imports/51/515ff941-a6d1-421a-9243-249091fc5b1d.json b/library/imports/51/515ff941-a6d1-421a-9243-249091fc5b1d.json new file mode 100644 index 0000000..8c0cf2c --- /dev/null +++ b/library/imports/51/515ff941-a6d1-421a-9243-249091fc5b1d.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_icon3", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 853, + 69, + 66, + 66 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 66, + 66 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/52/5256d2df-6e2d-4cac-9ac7-bd33add06053.json b/library/imports/52/5256d2df-6e2d-4cac-9ac7-bd33add06053.json new file mode 100644 index 0000000..7556a4c --- /dev/null +++ b/library/imports/52/5256d2df-6e2d-4cac-9ac7-bd33add06053.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire8", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1631, + 1, + 102, + 76 + ], + "offset": [ + 0, + -7 + ], + "originalSize": [ + 152, + 90 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.json b/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.json new file mode 100644 index 0000000..866eef3 --- /dev/null +++ b/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "danshen_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.632, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.mp3 b/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.mp3 new file mode 100644 index 0000000..04405ec Binary files /dev/null and b/library/imports/53/5325e681-09c2-4cdd-87f1-7b4d76247f14.mp3 differ diff --git a/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js b/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js new file mode 100644 index 0000000..640d5e7 --- /dev/null +++ b/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js @@ -0,0 +1,52 @@ +"use strict"; +cc._RF.push(module, '55403VjGlpPL564gsdiZBg3', 'Notification'); +// Script/module/Notification/Notification.ts + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Notifications = void 0; +//全局通知 +var Notifications = { + _eventMap: [], + on: function (masgId, callback, target) { + if (this._eventMap[masgId] === undefined) { + this._eventMap[masgId] = []; + } + this._eventMap[masgId].push({ callback: callback, target: target }); + }, + emit: function (masgId, parameter) { + var array = this._eventMap[masgId]; + if (array === undefined) + return; + for (var i = 0; i < array.length; i++) { + var element = array[i]; + if (element) + element.callback.call(element.target, parameter); + } + }, + off: function (masgId, callback) { + var array = this._eventMap[masgId]; + if (array === undefined) + return; + for (var i = 0; i < array.length; i++) { + var element = array[i]; + if (element && element.callback === callback) { + array[i] = undefined; + break; + } + } + }, + offMasgId: function (masgId) { + this._eventMap[masgId] = undefined; + }, + removeAllMsg: function () { + for (var k in this._eventMap) { + if (this._eventMap[k]) { + this.offMasgId(k); + } + } + } +}; +exports.Notifications = Notifications; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js.map b/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js.map new file mode 100644 index 0000000..cf8fb4a --- /dev/null +++ b/library/imports/55/55403563-1a5a-4f2f-9eb8-82c762641837.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Notification\\Notification.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAM;AACN,IAAI,aAAa,GAAG;IAChB,SAAS,EAAE,EAAE;IACb,EAAE,EAAE,UAAU,MAAM,EAAE,QAAQ,EAAE,MAAM;QAClC,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;YACtC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC;SAC/B;QACD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,IAAI,EAAE,UAAU,MAAM,EAAE,SAAS;QAC7B,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO;QAEhC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,OAAO;gBAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;SACjE;IACL,CAAC;IAED,GAAG,EAAE,UAAU,MAAM,EAAE,QAAQ;QAC3B,IAAI,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBAC1C,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;gBACrB,MAAM;aACT;SACJ;IACL,CAAC;IAED,SAAS,EAAE,UAAU,MAAM;QACvB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;IACvC,CAAC;IAED,YAAY,EAAE;QACV,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;YAC1B,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;gBACnB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aACrB;SACJ;IACL,CAAC;CACJ,CAAC;AACO,sCAAa","file":"","sourceRoot":"/","sourcesContent":["//全局通知\nvar Notifications = {\n _eventMap: [],\n on: function (masgId, callback, target) {\n if (this._eventMap[masgId] === undefined) {\n this._eventMap[masgId] = [];\n }\n this._eventMap[masgId].push({ callback: callback, target: target });\n },\n\n emit: function (masgId, parameter) {\n let array = this._eventMap[masgId];\n if (array === undefined) return;\n\n for (let i = 0; i < array.length; i++) {\n let element = array[i];\n if (element) element.callback.call(element.target, parameter);\n }\n },\n\n off: function (masgId, callback) {\n let array = this._eventMap[masgId];\n if (array === undefined) return;\n for (let i = 0; i < array.length; i++) {\n let element = array[i];\n if (element && element.callback === callback) {\n array[i] = undefined;\n break;\n }\n }\n },\n\n offMasgId: function (masgId) {\n this._eventMap[masgId] = undefined;\n },\n\n removeAllMsg: function () {\n for (let k in this._eventMap) {\n if (this._eventMap[k]) {\n this.offMasgId(k);\n }\n }\n }\n};\nexport { Notifications };"]} \ No newline at end of file diff --git a/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.json b/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.png b/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.png new file mode 100644 index 0000000..4b9602c Binary files /dev/null and b/library/imports/56/567dcd80-8bf4-4535-8a5a-313f1caf078a.png differ diff --git a/library/imports/57/5797ba40-0232-4eca-8729-719373e39e8c.json b/library/imports/57/5797ba40-0232-4eca-8729-719373e39e8c.json new file mode 100644 index 0000000..c618283 --- /dev/null +++ b/library/imports/57/5797ba40-0232-4eca-8729-719373e39e8c.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "tipKuang", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1077, + 207, + 508, + 81 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 508, + 81 + ], + "capInsets": [ + 62, + 0, + 64, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/57/57e85453-6997-4242-babb-705697538e98.json b/library/imports/57/57e85453-6997-4242-babb-705697538e98.json new file mode 100644 index 0000000..e56c200 --- /dev/null +++ b/library/imports/57/57e85453-6997-4242-babb-705697538e98.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn_begin", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1, + 723, + 654, + 93 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 654, + 93 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js b/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js new file mode 100644 index 0000000..39af2b5 --- /dev/null +++ b/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js @@ -0,0 +1,333 @@ +"use strict"; +cc._RF.push(module, '58403/n16JCa5sZhNMjZzGo', 'AudioManager'); +// Script/module/Music/AudioManager.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var AudioManager = /** @class */ (function (_super) { + __extends(AudioManager, _super); + function AudioManager() { + var _this = _super !== null && _super.apply(this, arguments) || this; + //背景音乐 + _this.audioGameBgm0 = null; + _this.baishao_audio = null; + _this.cha_audio = null; + _this.chixiaodou_audio = null; + _this.danggui_audio = null; + _this.danshen_audio = null; + _this.dazao_audio = null; + _this.gancao_audio = null; + _this.ganjiang_audio = null; + _this.gouqi_audio = null; + _this.jingjie_audio = null; + _this.jinju_audio = null; + _this.lizhi_audio = null; + _this.lizi_audio = null; + _this.longyan_audio = null; + _this.moli_audio = null; + _this.muchai_audio = null; + _this.mudan_audio = null; + _this.mulan_audio = null; + _this.pugongying_audio = null; + _this.putao_audio = null; + _this.renshen_audio = null; + _this.taozi_audio = null; + _this.zhuye_audio = null; + _this.err = null; + _this.yes = null; + return _this; + } + AudioManager_1 = AudioManager; + AudioManager.prototype.onLoad = function () { + if (AudioManager_1._instance == null) { + AudioManager_1._instance = this; + cc.game.addPersistRootNode(this.node); + } + else { + return; + } + window.addEventListener('backbutton', this.onBackButton, false); + // 监听浏览器的后退按钮点击事件 + window.addEventListener('popstate', this.onBackButton, false); + window.addEventListener('onDisable', this.onExit, false); + // 防止浏览器后退行为 + // history.pushState(null, null, location.href); + // window.addEventListener('popstate', function(event) { + // history.pushState(null, null, location.href); + // }); + this.reward = false; + this.finish = false; + this.rewardCount = 0; + this.ctor(); + this.preload(); + }; + AudioManager.prototype.ctor = function () { + this.mAudioMap = {}; + /** + * 默认音量大小 + * @type {number} + */ + this.bgMusicVolume = 0.1; + this.effectMusicVolume = 1; + this.mMusicSwitch = 1; + this.mEffectSwitch = 1; + }; + AudioManager.prototype.onBackButton = function () { + var data = [{ status: "user_exit", location: "button" }]; + cc.fx.HttpUtil.uploadUserLogData(data, null); + }; + AudioManager.prototype.onExit = function () { + var data = [{ status: "user_exit", location: "exit" }]; + cc.fx.HttpUtil.uploadUserLogData(data, null); + }; + AudioManager.prototype.play = function (audioSource, loop, callback, isBgMusic) { + // if (isBgMusic && !this.mMusicSwitch) return; + // if (!isBgMusic && !this.mEffectSwitch) return; + var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume; + // if (cc.sys.isBrowser) { + // if(audioSource == this.brickSound){ + // volume = 0.1; + // } + volume = 1; + cc.audioEngine.setEffectsVolume(1); + cc.audioEngine.setMusicVolume(1); + var context = cc.audioEngine.playEffect(audioSource, loop); + if (callback) { + cc.audioEngine.setFinishCallback(context, function () { + callback.call(this); + }.bind(this)); + } + // cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src); + this.mAudioMap[audioSource] = context; + return audioSource; + // } else { + // return audioSource; + // } + }; + AudioManager.prototype.save = function () { + // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch); + // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch); + }; + // static get Instance() + // { + // if (this._instance == null) + // { + // this._instance = new AudioManager(); + // } + // return this._instance; + // } + AudioManager.prototype.preload = function () { + if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { + return; + } + var musics = [ + this.audioGameBgm0, + ]; + musics.forEach(function (path) { + }); + }; + AudioManager.prototype.getAudioMusicSwitch = function () { + return this.mMusicSwitch; + }; + AudioManager.prototype.getAudioEffectSwitch = function () { + return this.mEffectSwitch; + }; + AudioManager.prototype.trunAudioSound = function (on) { + this.switchMusic(on); + this.switchEffect(on); + }; + AudioManager.prototype.switchMusic = function (on) { + if (this.mMusicSwitch != (on ? 1 : 0)) { + this.mMusicSwitch = 1 - this.mMusicSwitch; + // this.save(); + } + if (on) { + this.playMusicGame(); + } + else { + this.stopMusic(); + } + }; + AudioManager.prototype.switchEffect = function (on) { + if (this.mEffectSwitch != (on ? 1 : 0)) { + this.mEffectSwitch = 1 - this.mEffectSwitch; + // this.save(); + } + }; + AudioManager.prototype.onHide = function () { + cc.audioEngine.pauseAll(); + }; + AudioManager.prototype.onShow = function () { + cc.audioEngine.resumeAll(); + }; + //播放音效 + AudioManager.prototype.playEffect = function (name, callback) { + if (this[name]) + return this.play(this[name], false, callback, this.mEffectSwitch); + }; + AudioManager.prototype.playMusic = function (key, callback, loop) { + loop = typeof loop == 'undefined' || loop ? true : false; + this.stopMusic(); + this.mMusicKey = this.play(key, loop, callback, true); + }; + /** + * 游戏背景音乐 + */ + AudioManager.prototype.playMusicGame = function () { + // this.playMusic(this.audioGameBgm0,{},true); + }; + /** + * 停止背景音乐播放 + */ + AudioManager.prototype.stopMusic = function () { + // cc.wwx.OutPut.log('stopMusic audio effect wx: ' + this.mMusicKey); + var context = this.mAudioMap[this.mMusicKey]; + if (typeof (context) != 'undefined') { + if (cc.sys.isBrowser) { + cc.audioEngine.stop(context); + } + else { + context.stop(); + } + cc.audioEngine.stop(context); + } + }; + /* + * 游戏开始音效 + * + */ + AudioManager.prototype.playGameStart = function () { + }; + /* + * 失败的游戏结束 + */ + AudioManager.prototype.playGameOver = function () { + }; + /* + * 成功的游戏结束 + */ + AudioManager.prototype.playGameResultFailed = function () { + }; + /* + * 成功的游戏结束 + */ + AudioManager.prototype.playGameResultSuccess = function () { + }; + /** + * 报警的音效 + */ + /** + * 按钮 + */ + AudioManager.prototype.playAudioButton = function () { + // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch); + }; + var AudioManager_1; + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "audioGameBgm0", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "baishao_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "cha_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "chixiaodou_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "danggui_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "danshen_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "dazao_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "gancao_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "ganjiang_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "gouqi_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "jingjie_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "jinju_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "lizhi_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "lizi_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "longyan_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "moli_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "muchai_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "mudan_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "mulan_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "pugongying_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "putao_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "renshen_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "taozi_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "zhuye_audio", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "err", void 0); + __decorate([ + property(cc.AudioClip) + ], AudioManager.prototype, "yes", void 0); + AudioManager = AudioManager_1 = __decorate([ + ccclass + ], AudioManager); + return AudioManager; +}(cc.Component)); +exports.default = AudioManager; +; +// export { AudioManager }; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js.map b/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js.map new file mode 100644 index 0000000..ab8b112 --- /dev/null +++ b/library/imports/58/58403fe7-d7a2-426b-9b19-84d3236731a8.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Music\\AudioManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEM,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAE1C;IAA0C,gCAAY;IAAtD;QAAA,qEAsSC;QApSG,MAAM;QAEN,mBAAa,GAAiB,IAAI,CAAC;QAGnC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,eAAS,GAAiB,IAAI,CAAC;QAE/B,sBAAgB,GAAiB,IAAI,CAAC;QAEtC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,kBAAY,GAAiB,IAAI,CAAC;QAElC,oBAAc,GAAiB,IAAI,CAAC;QAEpC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,gBAAU,GAAiB,IAAI,CAAC;QAEhC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,gBAAU,GAAiB,IAAI,CAAC;QAEhC,kBAAY,GAAiB,IAAI,CAAC;QAElC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,sBAAgB,GAAiB,IAAI,CAAC;QAEtC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,mBAAa,GAAiB,IAAI,CAAC;QAEnC,iBAAW,GAAiB,IAAI,CAAC;QAEjC,iBAAW,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C,EAAE,CAAC,SAAS,CAAC;qDACU;IAEjC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;0DACe;IAEtC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;qDACU;IAEjC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;uDACY;IAEnC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;qDACU;IAEjC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;qDACU;IAEjC;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;6CACE;IAEzB;QADC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC;6CACE;IAvDR,YAAY;QADhC,OAAO;OACa,YAAY,CAsShC;IAAD,mBAAC;CAtSD,AAsSC,CAtSyC,EAAE,CAAC,SAAS,GAsSrD;kBAtSoB,YAAY;AAsShC,CAAC;AAEF,2BAA2B","file":"","sourceRoot":"/","sourcesContent":["\n\nconst {ccclass, property} = cc._decorator;\n@ccclass\nexport default class AudioManager extends cc.Component {\n static _instance: any;\n //背景音乐\n @property(cc.AudioClip)\n audioGameBgm0: cc.AudioClip = null;\n\n @property(cc.AudioClip)\n baishao_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n cha_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n chixiaodou_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n danggui_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n danshen_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n dazao_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n gancao_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n ganjiang_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n gouqi_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n jingjie_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n jinju_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n lizhi_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n lizi_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n longyan_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n moli_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n muchai_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n mudan_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n mulan_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n pugongying_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n putao_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n renshen_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n taozi_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n zhuye_audio: cc.AudioClip = null;\n @property(cc.AudioClip)\n err: cc.AudioClip = null;\n @property(cc.AudioClip)\n yes: cc.AudioClip = null;\n\n\n mAudioMap: {};\n bgMusicVolume: number;\n effectMusicVolume: number;\n mMusicSwitch: number;\n mEffectSwitch: number;\n brickSound: any;\n reward: boolean;\n finish: boolean;\n rewardCount: number;\n mMusicKey: any;\n\n onLoad() {\n if (AudioManager._instance == null) {\n AudioManager._instance = this;\n cc.game.addPersistRootNode(this.node);\n }\n else {\n return;\n }\n\n window.addEventListener('backbutton', this.onBackButton, false);\n \n // 监听浏览器的后退按钮点击事件\n window.addEventListener('popstate', this.onBackButton, false);\n\n window.addEventListener('onDisable', this.onExit, false);\n \n // 防止浏览器后退行为\n // history.pushState(null, null, location.href);\n // window.addEventListener('popstate', function(event) {\n // history.pushState(null, null, location.href);\n // });\n\n this.reward = false;\n this.finish = false;\n this.rewardCount = 0;\n this.ctor();\n\n this.preload();\n }\n\n\n\n ctor () {\n this.mAudioMap = {};\n /**\n * 默认音量大小\n * @type {number}\n */\n this.bgMusicVolume = 0.1;\n this.effectMusicVolume = 1;\n\n this.mMusicSwitch = 1;\n this.mEffectSwitch = 1;\n }\n\n onBackButton(){\n let data = [{status:\"user_exit\",location:\"button\"}];\n cc.fx.HttpUtil.uploadUserLogData(data,null);\n }\n\n onExit(){\n let data = [{status:\"user_exit\",location:\"exit\"}];\n cc.fx.HttpUtil.uploadUserLogData(data,null);\n }\n\n play (audioSource, loop, callback, isBgMusic) {\n // if (isBgMusic && !this.mMusicSwitch) return;\n // if (!isBgMusic && !this.mEffectSwitch) return;\n var volume = isBgMusic ? this.bgMusicVolume : this.effectMusicVolume;\n\n // if (cc.sys.isBrowser) {\n // if(audioSource == this.brickSound){\n // volume = 0.1;\n // } \n volume = 1;\n cc.audioEngine.setEffectsVolume(1);\n cc.audioEngine.setMusicVolume(1);\n \n var context = cc.audioEngine.playEffect(audioSource, loop);\n if (callback){\n cc.audioEngine.setFinishCallback(context, function(){\n callback.call(this);\n }.bind(this));\n }\n // cc.wwx.OutPut.log('play audio effect isBrowser: ' + context.src);\n\n this.mAudioMap[audioSource] = context;\n return audioSource;\n // } else {\n // return audioSource;\n // }\n }\n\n save () {\n // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Music_Volume, this.mMusicSwitch);\n // cc.wwx.Storage.setItem(cc.wwx.Storage.Key_Setting_Effect_Volume, this.mEffectSwitch);\n }\n\n // static get Instance()\n // {\n // if (this._instance == null)\n // {\n // this._instance = new AudioManager();\n // }\n // return this._instance;\n // }\n\n preload () {\n if (!(cc.sys.platform === cc.sys.WECHAT_GAME)) { return; }\n\n var musics = [\n this.audioGameBgm0,\n ];\n musics.forEach(function(path) {\n })\n }\n\n getAudioMusicSwitch()\n {\n return this.mMusicSwitch;\n\n }\n getAudioEffectSwitch()\n {\n return this.mEffectSwitch;\n }\n trunAudioSound(on)\n {\n this.switchMusic(on);\n this.switchEffect(on)\n }\n switchMusic (on) {\n if (this.mMusicSwitch != (on?1:0))\n {\n this.mMusicSwitch = 1-this.mMusicSwitch;\n // this.save();\n }\n if(on)\n {\n this.playMusicGame();\n }\n else\n {\n this.stopMusic();\n }\n }\n switchEffect (on) {\n if (this.mEffectSwitch != (on?1:0)){\n this.mEffectSwitch = 1-this.mEffectSwitch;\n // this.save();\n\n }\n }\n onHide () {\n cc.audioEngine.pauseAll();\n }\n\n onShow () {\n cc.audioEngine.resumeAll();\n }\n\n //播放音效\n playEffect(name,callback){\n if(this[name])\n return this.play(this[name], false,callback,this.mEffectSwitch);\n }\n playMusic (key, callback, loop) {\n loop = typeof loop == 'undefined' || loop ? true : false;\n this.stopMusic();\n this.mMusicKey = this.play(key, loop, callback, true);\n }\n /**\n * 游戏背景音乐\n */\n playMusicGame () {\n // this.playMusic(this.audioGameBgm0,{},true);\n }\n /**\n * 停止背景音乐播放\n */\n stopMusic () {\n // cc.wwx.OutPut.log('stopMusic audio effect wx: ' + this.mMusicKey);\n\n var context = this.mAudioMap[this.mMusicKey];\n\n if (typeof(context) != 'undefined') {\n if (cc.sys.isBrowser) {\n cc.audioEngine.stop(context);\n } else {\n context.stop();\n }\n cc.audioEngine.stop(context);\n\n }\n }\n\n /*\n * 游戏开始音效\n *\n */\n playGameStart()\n {\n \n }\n /*\n * 失败的游戏结束\n */\n playGameOver()\n {\n\n }\n /*\n * 成功的游戏结束\n */\n playGameResultFailed()\n {\n\n }\n /*\n * 成功的游戏结束\n */\n playGameResultSuccess()\n {\n\n }\n /**\n * 报警的音效\n */\n\n /**\n * 按钮\n */\n playAudioButton () {\n // return this.play(this.audioButtonClick, false,null,this.mEffectSwitch);\n }\n};\n\n// export { AudioManager };\n"]} \ No newline at end of file diff --git a/library/imports/58/5890602f-470f-42ea-b785-8d5565214ada.json b/library/imports/58/5890602f-470f-42ea-b785-8d5565214ada.json new file mode 100644 index 0000000..80a62de --- /dev/null +++ b/library/imports/58/5890602f-470f-42ea-b785-8d5565214ada.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn", + "texture": "ebfe6e6f-f068-4227-bfd8-16f834e7203f", + "atlas": "", + "rect": [ + 0, + 0, + 501, + 85 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 501, + 85 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.json b/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.json new file mode 100644 index 0000000..c4d706f --- /dev/null +++ b/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "gouqi_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.mp3 b/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.mp3 new file mode 100644 index 0000000..74144b2 Binary files /dev/null and b/library/imports/58/589a92bd-21cc-43d4-8594-2e9c92930f13.mp3 differ diff --git a/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.json b/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.png b/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.png new file mode 100644 index 0000000..031a8fd Binary files /dev/null and b/library/imports/59/59302142-671f-4983-92db-e5fa8b5aee42.png differ diff --git a/library/imports/59/5965ffac-69da-4b55-bcde-9225d0613c28.json b/library/imports/59/5965ffac-69da-4b55-bcde-9225d0613c28.json new file mode 100644 index 0000000..de04efa --- /dev/null +++ b/library/imports/59/5965ffac-69da-4b55-bcde-9225d0613c28.json @@ -0,0 +1,250 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "progressBar", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "progressBar", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 150, + "height": 15 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -150, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "67e68bc9-dad5-4ad9-a2d8-7e03d458e32f" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "5965ffac-69da-4b55-bcde-9225d0613c28" + }, + "fileId": "38d28QPqAdC1L4aQLAAwhV2", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "88e79fd5-96b4-4a77-a1f4-312467171014" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.ProgressBar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_N$totalLength": 300, + "_N$barSprite": { + "__id__": 3 + }, + "_N$mode": 0, + "_N$progress": 0.5, + "_N$reverse": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "5965ffac-69da-4b55-bcde-9225d0613c28" + }, + "fileId": "c8bd6EVT6lD4bVMS1d/i0BC", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/5a/5ab44f42-4596-44da-8a5f-69ab9d0dd69b.json b/library/imports/5a/5ab44f42-4596-44da-8a5f-69ab9d0dd69b.json new file mode 100644 index 0000000..d787944 --- /dev/null +++ b/library/imports/5a/5ab44f42-4596-44da-8a5f-69ab9d0dd69b.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_jinju", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 437, + 431, + 432, + 380 + ], + "offset": [ + -4, + 21 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.json b/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.json new file mode 100644 index 0000000..74d23d2 --- /dev/null +++ b/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "mulan_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.48898, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.mp3 b/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.mp3 new file mode 100644 index 0000000..79bd584 Binary files /dev/null and b/library/imports/5a/5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4.mp3 differ diff --git a/library/imports/5b/5bb2b601-5166-425e-899d-d3a9b9663c04.json b/library/imports/5b/5bb2b601-5166-425e-899d-d3a9b9663c04.json new file mode 100644 index 0000000..f7dd7ad --- /dev/null +++ b/library/imports/5b/5bb2b601-5166-425e-899d-d3a9b9663c04.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rankBtn2", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1414, + 638, + 126, + 126 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 126, + 126 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/5c/5c3bb932-6c3c-468f-88a9-c8c61d458641.json b/library/imports/5c/5c3bb932-6c3c-468f-88a9-c8c61d458641.json new file mode 100644 index 0000000..a6721ed --- /dev/null +++ b/library/imports/5c/5c3bb932-6c3c-468f-88a9-c8c61d458641.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_scrollbar_vertical", + "texture": "d6d3ca85-4681-47c1-b5dd-d036a9d39ea2", + "atlas": "", + "rect": [ + 0, + 0, + 15, + 30 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 15, + 30 + ], + "capInsets": [ + 4, + 10, + 4, + 10 + ] + } +} \ No newline at end of file diff --git a/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js b/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js new file mode 100644 index 0000000..e2f00ab --- /dev/null +++ b/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js @@ -0,0 +1,15 @@ +"use strict"; +cc._RF.push(module, '5c9b8FZiaNLMrMDs9T3rByf', 'DynamicAtlasManager'); +// Script/DynamicAtlasManager.js + +"use strict"; + +cc.Class({ + "extends": cc.Component, + properties: {}, + onLoad: function onLoad() { + cc.dynamicAtlasManager.enabled = false; + } +}); + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js.map b/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js.map new file mode 100644 index 0000000..73cca2f --- /dev/null +++ b/library/imports/5c/5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\DynamicAtlasManager.js"],"names":["cc","Class","Component","properties","onLoad","dynamicAtlasManager","enabled"],"mappings":";;;;;;AAAAA,EAAE,CAACC,KAAH,CAAS;AACL,aAASD,EAAE,CAACE,SADP;AAGLC,EAAAA,UAAU,EAAE,EAHP;AAMLC,EAAAA,MANK,oBAMK;AACNJ,IAAAA,EAAE,CAACK,mBAAH,CAAuBC,OAAvB,GAAiC,KAAjC;AACH;AARI,CAAT","sourceRoot":"/","sourcesContent":["cc.Class({\r\n extends: cc.Component,\r\n\r\n properties: {\r\n },\r\n\r\n onLoad () {\r\n cc.dynamicAtlasManager.enabled = false;\r\n },\r\n});\r\n"]} \ No newline at end of file diff --git a/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.json b/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.json new file mode 100644 index 0000000..4efc624 --- /dev/null +++ b/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "jingjie_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 0.792, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.mp3 b/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.mp3 new file mode 100644 index 0000000..eceb573 Binary files /dev/null and b/library/imports/5d/5d063b36-f6ad-4d0a-ad0c-1eaf633a1293.mp3 differ diff --git a/library/imports/5d/5d5398c4-b3d5-4045-910e-1bfa6fed47ea.json b/library/imports/5d/5d5398c4-b3d5-4045-910e-1bfa6fed47ea.json new file mode 100644 index 0000000..8f6d2dc --- /dev/null +++ b/library/imports/5d/5d5398c4-b3d5-4045-910e-1bfa6fed47ea.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_self", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 1, + 1, + 750, + 120 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 120 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.json b/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.json new file mode 100644 index 0000000..9b4af77 --- /dev/null +++ b/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "danggui_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.48898, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.mp3 b/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.mp3 new file mode 100644 index 0000000..5acb6f4 Binary files /dev/null and b/library/imports/5f/5f08c436-44f0-4802-bc19-0443972a105b.mp3 differ diff --git a/library/imports/5f/5fe5dcaa-b513-4dc5-a166-573627b3a159.json b/library/imports/5f/5fe5dcaa-b513-4dc5-a166-573627b3a159.json new file mode 100644 index 0000000..c57e552 --- /dev/null +++ b/library/imports/5f/5fe5dcaa-b513-4dc5-a166-573627b3a159.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_scrollbar_vertical_bg", + "texture": "617323dd-11f4-4dd3-8eec-0caf6b3b45b9", + "atlas": "", + "rect": [ + 0, + 0, + 15, + 30 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 15, + 30 + ], + "capInsets": [ + 4, + 10, + 4, + 10 + ] + } +} \ No newline at end of file diff --git a/library/imports/5f/5fe73fd9-beb1-4bcb-942e-6e61e5d1c107.json b/library/imports/5f/5fe73fd9-beb1-4bcb-942e-6e61e5d1c107.json new file mode 100644 index 0000000..b689e1e --- /dev/null +++ b/library/imports/5f/5fe73fd9-beb1-4bcb-942e-6e61e5d1c107.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_renshen", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 855, + 847, + 442, + 366 + ], + "offset": [ + 0, + 14 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/5f/5fead804-1827-4c8d-9b89-c09849aeed4e.json b/library/imports/5f/5fead804-1827-4c8d-9b89-c09849aeed4e.json new file mode 100644 index 0000000..1f9c4dc --- /dev/null +++ b/library/imports/5f/5fead804-1827-4c8d-9b89-c09849aeed4e.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire5", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1631, + 105, + 106, + 70 + ], + "offset": [ + -1, + -10 + ], + "originalSize": [ + 152, + 90 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.json b/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.json new file mode 100644 index 0000000..99d8ebb --- /dev/null +++ b/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,1,0,0" +} \ No newline at end of file diff --git a/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.png b/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.png new file mode 100644 index 0000000..c6adfe9 Binary files /dev/null and b/library/imports/60/600301aa-3357-4a10-b086-84f011fa32ba.png differ diff --git a/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.json b/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.png b/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.png new file mode 100644 index 0000000..a2a849a Binary files /dev/null and b/library/imports/61/617323dd-11f4-4dd3-8eec-0caf6b3b45b9.png differ diff --git a/library/imports/61/61906da3-7003-4bda-9abc-5769c76faee4.json b/library/imports/61/61906da3-7003-4bda-9abc-5769c76faee4.json new file mode 100644 index 0000000..e746c9d --- /dev/null +++ b/library/imports/61/61906da3-7003-4bda-9abc-5769c76faee4.json @@ -0,0 +1,117 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "ambient", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "light", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_type": 3, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 0.25, + "_range": 1, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowDepthScale": 250, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "61906da3-7003-4bda-9abc-5769c76faee4" + }, + "fileId": "33zOkteexCqamZ4PXuwJaW", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/61/61aeb05b-3b32-452b-8eed-2b76deeed554.json b/library/imports/61/61aeb05b-3b32-452b-8eed-2b76deeed554.json new file mode 100644 index 0000000..9f7ffb2 --- /dev/null +++ b/library/imports/61/61aeb05b-3b32-452b-8eed-2b76deeed554.json @@ -0,0 +1,535 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "editbox", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "editbox", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 6 + }, + { + "__id__": 10 + } + ], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 15 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "BACKGROUND_SPRITE", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + }, + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 160, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ff0e91c7-55c6-4086-a39f-cb6e457b8c3b" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 160, + "_originalHeight": 40, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "61aeb05b-3b32-452b-8eed-2b76deeed554" + }, + "fileId": "fcoT9mL35BlLUlR0xQ5QBI", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "TEXT_LABEL", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 7 + }, + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 9 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 158, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -78, + 20, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [], + "_useOriginalSize": true, + "_string": "", + "_N$string": "", + "_fontSize": 20, + "_lineHeight": 25, + "_enableWrapText": false, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 2, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 158, + "_originalHeight": 40, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "61aeb05b-3b32-452b-8eed-2b76deeed554" + }, + "fileId": "0blsIXU11M95uloDvhs/X9", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "PLACEHOLDER_LABEL", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 187, + "g": 187, + "b": 187, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 158, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -78, + 20, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_useOriginalSize": true, + "_string": "Enter text here...", + "_N$string": "Enter text here...", + "_fontSize": 20, + "_lineHeight": 25, + "_enableWrapText": false, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 2, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 158, + "_originalHeight": 40, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "61aeb05b-3b32-452b-8eed-2b76deeed554" + }, + "fileId": "d9Sjcz6gxMGYCoLbO/scJL", + "sync": false + }, + { + "__type__": "cc.EditBox", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_useOriginalSize": false, + "_string": "", + "returnType": 0, + "maxLength": 8, + "_tabIndex": 0, + "editingDidBegan": [], + "textChanged": [], + "editingDidEnded": [], + "editingReturn": [], + "_N$textLabel": { + "__id__": 7 + }, + "_N$placeholderLabel": { + "__id__": 11 + }, + "_N$background": { + "__id__": 3 + }, + "_N$inputFlag": 5, + "_N$inputMode": 6, + "_N$stayOnTop": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "61aeb05b-3b32-452b-8eed-2b76deeed554" + }, + "fileId": "590f66n7/1CY5uRJYcGGuJO", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js b/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js new file mode 100644 index 0000000..5e7ba3a --- /dev/null +++ b/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js @@ -0,0 +1,112 @@ +"use strict"; +cc._RF.push(module, '61d4ccY2ztLMYIh8WvqPPAw', 'GameAppStart'); +// Script/module/GameStart/GameAppStart.ts + +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var GameConfig_1 = require("../Config/GameConfig"); +var HttpUtil_1 = require("../Crypto/HttpUtil"); +var AudioManager_1 = require("../Music/AudioManager"); +var Notification_1 = require("../Notification/Notification"); +var Storage_1 = require("../Storage/Storage"); +var GameTool_1 = require("../Tool/GameTool"); +window.initMgr = function () { + if (cc.fx) { + return; + } + cc.fx = {}; + console.log("1初始化"); + //基础状态信息 + cc.fx.StateInfo = { + debugMode: true, + networkConnected: true, + networkType: 'none', + isOnForeground: true //当前是否是在前台 + }; + //应用系统信息 + //配置文件 + cc.fx.GameConfig = GameConfig_1.GameConfig; + cc.fx.HttpUtil = HttpUtil_1.default; + cc.fx.GameTool = GameTool_1.GameTool; + cc.fx.AudioManager = AudioManager_1.default; + cc.fx.Notifications = Notification_1.Notifications; + cc.fx.StorageMessage = Storage_1.StorageMessage; + cc.fx.ShareInfo = { + queryId: -1 //分享id + }; + /* + * 客户端埋点分享类型 + */ + cc.fx.BurialShareType = { + Default: "default", + Invite: "invite", + DailyInviteRoomJoin: 'invite_join_room', + DailyInviteFriend: 'invite_friend', + DailyInviteGroup: 'invate_group', + DailyInviteGroupAlive: 'invate_alive', + DailyInviteGroupReward: 'invate_rewared', + DailyInviteGroupBox: 'invate_box', + DailyInviteGroupBall: 'invate_ball', + MatchResult: 'matchResult', + MatchFix5: 'MatchFix5', + MatchFix20: 'MatchFix20', + MatchFix100: 'MatchFix100', + MatchFix500: 'MatchFix500', + NewerRedEnvelope: 'newerRedEnvelope', + CoinRoomResult: 'coinRoomResult', + HighRate: "highRate", + CoinRoomWinStreak: 'coinRoomWinStreak', + CoinRoomBankruptcy1: 'coinRoomBankruptcy1', + CoinRoomBankruptcy2: 'coinRoomBankruptcy2', + CoinRoomBankruptcy3: 'coinRoomBankruptcy3', + }; + /* + * 分享到哪儿给奖励 group frined all + */ + cc.fx.ShareWhereReward = { + Group: "group", + Friend: "friend", + All: "all", + }; + //用于存储消息的ID + cc.fx.storageType = cc.Enum({ + storageTypeCustom: 1000101, + }); + //用于存储提示语 按照步骤提示 + cc.fx.tipType = cc.Enum({ + tipOne: '神农氏回到家中,开始整理今天收集来的物品。当拿出或说出一种植物时,请告诉他这是新植物还是已经出现过的植物。', + tipTwo: '', + tipErrNew: '这是这局游戏第一次出现{植物}', + tipErrOld: '{植物}刚才出现过呢', + tipErrHear: '上次遇到{植物}时,似乎不是听到的吧', + tipErrSee: '上次遇到{植物}时,似乎不是看到的吧', + tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢', + }); + //暂时不用 + // cc.fx.clickStatEventType = { + // clickStatEventTypeVideoAD : 20173201,//视频播放完成 + // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成 + // clickStatEventTypeBannerAD : 20173203,//banner播放为完成 + // clickStatEventTypeUserFrom : 99990001,//用户来源 + // clickStatEventTypeShare : 99990002,//用户分享 + // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon + // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预 + // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息 + // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示 + // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮 + // clickStatEventTypeWxLoginStart : 10001,//微信登录开始 + // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功 + // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败 + // clickStatEventTypeAuthorizationStart : 10003,//授权开始 + // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功 + // clickStatEventTypeAuthorizationFailed : 10005,//授权失败 + // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始 + // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功 + // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败 + // clickStatEventTypeTCP_Start : 10009,//TCP连接开始 + // clickStatEventTypeTCP_Success : 10010,//TCP连接成功 + // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败 + // }; +}; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js.map b/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js.map new file mode 100644 index 0000000..13758df --- /dev/null +++ b/library/imports/61/61d4c718-db3b-4b31-8221-f16bea3cf030.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\GameStart\\GameAppStart.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAkD;AAClD,+CAA0C;AAC1C,sDAAiD;AACjD,6DAA6D;AAC7D,8CAAoD;AACpD,6CAA4C;AAG5C,MAAM,CAAC,OAAO,GAAG;IACb,IAAG,EAAE,CAAC,EAAE,EACR;QACI,OAAO;KACV;IACD,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;IACX,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEpB,QAAQ;IACR,EAAE,CAAC,EAAE,CAAC,SAAS,GAAG;QACd,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,IAAI;QACtB,WAAW,EAAE,MAAM;QACnB,cAAc,EAAE,IAAI,CAAM,UAAU;KACvC,CAAC;IAEF,QAAQ;IACR,MAAM;IAEN,EAAE,CAAC,EAAE,CAAC,UAAU,GAAG,uBAAU,CAAC;IAC9B,EAAE,CAAC,EAAE,CAAC,QAAQ,GAAG,kBAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,CAAC,YAAY,GAAG,sBAAY,CAAC;IAClC,EAAE,CAAC,EAAE,CAAC,aAAa,GAAG,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AAE,YAAY;QACvB,UAAU,EAAE,oBAAoB;QAChC,SAAS,EAAE,oBAAoB;QAC/B,UAAU,EAAE,2BAA2B;KAE1C,CAAC,CAAC;IACH,MAAM;IACN,+BAA+B;IAC/B,oDAAoD;IACpD,0DAA0D;IAC1D,0DAA0D;IAC1D,mDAAmD;IACnD,gDAAgD;IAChD,yDAAyD;IACzD,4DAA4D;IAC5D,iEAAiE;IACjE,4DAA4D;IAC5D,6DAA6D;IAC7D,sDAAsD;IACtD,wDAAwD;IACxD,uDAAuD;IACvD,0DAA0D;IAC1D,4DAA4D;IAC5D,2DAA2D;IAC3D,wDAAwD;IACxD,0DAA0D;IAC1D,0DAA0D;IAC1D,oDAAoD;IACpD,sDAAsD;IACtD,qDAAqD;IACrD,KAAK;AAET,CAAC,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { GameConfig } from \"../Config/GameConfig\";\r\nimport HttpUtil from \"../Crypto/HttpUtil\";\r\nimport AudioManager from \"../Music/AudioManager\";\r\nimport { Notifications } from \"../Notification/Notification\";\r\nimport { StorageMessage } from \"../Storage/Storage\";\r\nimport { GameTool } from \"../Tool/GameTool\";\r\n\r\n\r\nwindow.initMgr = function() {\r\n if(cc.fx)\r\n {\r\n return;\r\n }\r\n cc.fx = {};\r\n console.log(\"1初始化\");\r\n\r\n //基础状态信息\r\n cc.fx.StateInfo = {\r\n debugMode: true,\r\n networkConnected: true, //网络状态\r\n networkType: 'none', //网络类型\r\n isOnForeground: true //当前是否是在前台\r\n };\r\n\r\n //应用系统信息\r\n //配置文件\r\n\r\n cc.fx.GameConfig = GameConfig;\r\n cc.fx.HttpUtil = HttpUtil;\r\n cc.fx.GameTool = GameTool;\r\n cc.fx.AudioManager = AudioManager;\r\n cc.fx.Notifications = Notifications;\r\n cc.fx.StorageMessage = StorageMessage;\r\n\r\n cc.fx.ShareInfo = {\r\n queryId : -1 //分享id\r\n };\r\n\r\n /*\r\n * 客户端埋点分享类型\r\n */\r\n cc.fx.BurialShareType = {\r\n Default : \"default\", //默认分享类型,分享到群\r\n Invite : \"invite\", // 邀请好友\r\n\r\n DailyInviteRoomJoin:'invite_join_room', //邀请好友加入\r\n DailyInviteFriend : 'invite_friend', // 日常邀请好友\r\n DailyInviteGroup : 'invate_group', // 日常分享群\r\n DailyInviteGroupAlive: 'invate_alive', //日常分享群复活\r\n DailyInviteGroupReward: 'invate_rewared',//分享奖励翻倍\r\n DailyInviteGroupBox: 'invate_box', //宝箱分享奖励\r\n DailyInviteGroupBall: 'invate_ball', //分享领取球球\r\n\r\n MatchResult : 'matchResult', // 比赛结算分享\r\n MatchFix5: 'MatchFix5', // 5元红包赛\r\n MatchFix20: 'MatchFix20', // 20元红包赛\r\n MatchFix100: 'MatchFix100', // 100元红包赛\r\n MatchFix500: 'MatchFix500', // 500元红包赛\r\n NewerRedEnvelope: 'newerRedEnvelope', // 新手红包\r\n CoinRoomResult: 'coinRoomResult', // 金币桌结算\r\n HighRate : \"highRate\",//高倍分享\r\n CoinRoomWinStreak: 'coinRoomWinStreak', // 连胜\r\n CoinRoomBankruptcy1: 'coinRoomBankruptcy1', // 金币桌破产\r\n CoinRoomBankruptcy2: 'coinRoomBankruptcy2', // 金币桌破产\r\n CoinRoomBankruptcy3: 'coinRoomBankruptcy3', // 金币桌破产\r\n };\r\n\r\n /*\r\n * 分享到哪儿给奖励 group frined all\r\n */\r\n cc.fx.ShareWhereReward = {\r\n Group :\"group\", //微信群\r\n Friend : \"friend\",//好友\r\n All : \"all\", //不区分\r\n };\r\n\r\n //用于存储消息的ID\r\n cc.fx.storageType = cc.Enum({\r\n\t storageTypeCustom: 1000101, //用于存储关卡等级\r\n\t});\r\n\r\n //用于存储提示语 按照步骤提示\r\n cc.fx.tipType = cc.Enum({\r\n tipOne: '神农氏回到家中,开始整理今天收集来的物品。当拿出或说出一种植物时,请告诉他这是新植物还是已经出现过的植物。',\r\n tipTwo: '', //用于存储关卡等级\r\n tipErrNew: '这是这局游戏第一次出现{植物}',\r\n tipErrOld: '{植物}刚才出现过呢',\r\n tipErrHear: '上次遇到{植物}时,似乎不是听到的吧',\r\n tipErrSee: '上次遇到{植物}时,似乎不是看到的吧',\r\n tipErrLast: '之前确实看到过{植物},但最近一次似乎不是看到的呢',\r\n\r\n });\r\n //暂时不用\r\n // cc.fx.clickStatEventType = {\r\n // clickStatEventTypeVideoAD : 20173201,//视频播放完成\r\n // clickStatEventTypeClickAdVideo : 20173202,//视频播放为完成\r\n // clickStatEventTypeBannerAD : 20173203,//banner播放为完成\r\n // clickStatEventTypeUserFrom : 99990001,//用户来源\r\n // clickStatEventTypeShare : 99990002,//用户分享\r\n // clickStatEventTypeClickAdBtn : 99990007,//点击分流icon\r\n // clickStatEventTypeBannerAD2 : 67890033, // banner广告干预\r\n // clickStatEventTypeSubmitVersionInfo : 9999, //上报微信版本及基础库信息\r\n // clickStatEventTypeClickFirstAd : 99990003, //分流icon显示\r\n // clickStatEventTypeClickSecondAd : 99990004, //玩家点击分流按钮\r\n // clickStatEventTypeWxLoginStart : 10001,//微信登录开始\r\n // clickStatEventTypeWxLoginSuccess : 10002,//微信登录成功\r\n // clickStatEventTypeWxLoginFailed : 10003,//微信登录失败\r\n // clickStatEventTypeAuthorizationStart : 10003,//授权开始\r\n // clickStatEventTypeAuthorizationSuccess : 10004,//授权成功\r\n // clickStatEventTypeAuthorizationFailed : 10005,//授权失败\r\n // clickStatEventTypeLoginSDKStart : 10007,//登录SDK开始\r\n // clickStatEventTypeLoginSDKSuccess : 10008,//登录SDK成功\r\n // clickStatEventTypeLoginSDKFailed : 10009,//登录SDK时失败\r\n // clickStatEventTypeTCP_Start : 10009,//TCP连接开始\r\n // clickStatEventTypeTCP_Success : 10010,//TCP连接成功\r\n // clickStatEventTypeTCP_Failed : 10011,//TCP连接失败\r\n // };\r\n\r\n};"]} \ No newline at end of file diff --git a/library/imports/63/634acecc-5987-409f-8c81-28569289abb3.json b/library/imports/63/634acecc-5987-409f-8c81-28569289abb3.json new file mode 100644 index 0000000..839f88e --- /dev/null +++ b/library/imports/63/634acecc-5987-409f-8c81-28569289abb3.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "overBg", + "texture": "194abbe2-2c5a-4d46-8aac-957b3bb44457", + "atlas": "", + "rect": [ + 0, + 0, + 750, + 1660 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 1660 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/67/67e68bc9-dad5-4ad9-a2d8-7e03d458e32f.json b/library/imports/67/67e68bc9-dad5-4ad9-a2d8-7e03d458e32f.json new file mode 100644 index 0000000..5f858bc --- /dev/null +++ b/library/imports/67/67e68bc9-dad5-4ad9-a2d8-7e03d458e32f.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_progressbar", + "texture": "cfef78f1-c8df-49b7-8ed0-4c953ace2621", + "atlas": "", + "rect": [ + 0, + 0, + 30, + 15 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 30, + 15 + ], + "capInsets": [ + 10, + 4, + 10, + 4 + ] + } +} \ No newline at end of file diff --git a/library/imports/68/6827ca32-0107-4552-bab2-dfb31799bb44.json b/library/imports/68/6827ca32-0107-4552-bab2-dfb31799bb44.json new file mode 100644 index 0000000..661f423 --- /dev/null +++ b/library/imports/68/6827ca32-0107-4552-bab2-dfb31799bb44.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_toggle_normal", + "texture": "d29077ba-1627-4a72-9579-7b56a235340c", + "atlas": "", + "rect": [ + 0, + 0, + 28, + 28 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 28, + 28 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.json b/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.png b/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.png new file mode 100644 index 0000000..5708dea Binary files /dev/null and b/library/imports/68/68b739ea-93fe-4fca-a6ab-d3b18c300756.png differ diff --git a/library/imports/69/69127bde-cd60-4ff4-861e-6ea16ccb72d3.json b/library/imports/69/69127bde-cd60-4ff4-861e-6ea16ccb72d3.json new file mode 100644 index 0000000..79363a0 --- /dev/null +++ b/library/imports/69/69127bde-cd60-4ff4-861e-6ea16ccb72d3.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn_yes", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1047, + 551, + 501, + 85 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 501, + 85 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/69/6999b621-4a9f-4a89-970f-4f6637f6ebe1.json b/library/imports/69/6999b621-4a9f-4a89-970f-4f6637f6ebe1.json new file mode 100644 index 0000000..3681459 --- /dev/null +++ b/library/imports/69/6999b621-4a9f-4a89-970f-4f6637f6ebe1.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire3", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1620, + 281, + 104, + 62 + ], + "offset": [ + 0, + -14 + ], + "originalSize": [ + 152, + 90 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.json b/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.png b/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.png new file mode 100644 index 0000000..21d4326 Binary files /dev/null and b/library/imports/6a/6aa0aa6a-ebee-4155-a088-a687a6aadec4.png differ diff --git a/library/imports/6b/6b86bfb2-d4d1-4474-a615-6a8a515b9201.json b/library/imports/6b/6b86bfb2-d4d1-4474-a615-6a8a515b9201.json new file mode 100644 index 0000000..7bee9dd --- /dev/null +++ b/library/imports/6b/6b86bfb2-d4d1-4474-a615-6a8a515b9201.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "bg2", + "texture": "208eb4d4-f625-47c7-a16f-853d57d0c48f", + "atlas": "", + "rect": [ + 0, + 0, + 750, + 1660 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 1660 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/6c/6c5cf6e1-b044-4eac-9431-835644d57381.json b/library/imports/6c/6c5cf6e1-b044-4eac-9431-835644d57381.json new file mode 100644 index 0000000..a86f8af --- /dev/null +++ b/library/imports/6c/6c5cf6e1-b044-4eac-9431-835644d57381.json @@ -0,0 +1,103 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "__builtin-editor-gizmo-unlit", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "stage": "transparent", + "blendState": { + "targets": [ + { + "blend": true, + "blendEq": 32774 + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": false, + "depthWrite": false + }, + "properties": { + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + } + }, + "program": "__builtin-editor-gizmo-unlit|gizmo-unlit-vs|gizmo-unlit-fs:front" + } + ] + } + ], + "shaders": [ + { + "hash": 304964736, + "glsl3": { + "vert": "\nprecision highp float;\nattribute vec3 a_position;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform DIFFUSE_COLOR {\n vec4 diffuseColor;\n};\nvec4 front() {\n return CCFragOutput(diffuseColor);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = front(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nattribute vec3 a_position;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nvoid main () {\n gl_Position = cc_matViewProj * cc_matWorld * vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform vec4 diffuseColor;\nvec4 front() {\n return CCFragOutput(diffuseColor);\n}\nvoid main() { gl_FragColor = front(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "DIFFUSE_COLOR", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [], + "record": null, + "name": "__builtin-editor-gizmo-unlit|gizmo-unlit-vs|gizmo-unlit-fs:front" + } + ] +} \ No newline at end of file diff --git a/library/imports/6c/6c6849e9-8426-4bd8-8298-194917d20da7.json b/library/imports/6c/6c6849e9-8426-4bd8-8298-194917d20da7.json new file mode 100644 index 0000000..5007cef --- /dev/null +++ b/library/imports/6c/6c6849e9-8426-4bd8-8298-194917d20da7.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "icon", + "texture": "8084ec83-76e6-4ef4-a0e9-162a417b5c08", + "atlas": "", + "rect": [ + 0, + 0, + 64, + 64 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 64, + 64 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/6c/6c9ef10d-b479-420b-bfe6-39cdda6a8ae0.json b/library/imports/6c/6c9ef10d-b479-420b-bfe6-39cdda6a8ae0.json new file mode 100644 index 0000000..479bf5c --- /dev/null +++ b/library/imports/6c/6c9ef10d-b479-420b-bfe6-39cdda6a8ae0.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "quad", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "quad", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "e93d3fa9-8c21-4375-8a21-14ba84066c77" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "6c9ef10d-b479-420b-bfe6-39cdda6a8ae0" + }, + "fileId": "9b58ZeS0JLyLtsBZ/OlhCu", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/6d/6d91e591-4ce0-465c-809f-610ec95019c6.json b/library/imports/6d/6d91e591-4ce0-465c-809f-610ec95019c6.json new file mode 100644 index 0000000..f179fed --- /dev/null +++ b/library/imports/6d/6d91e591-4ce0-465c-809f-610ec95019c6.json @@ -0,0 +1,333 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-unlit", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "name": "opaque", + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": true + }, + "properties": { + "diffuseTexture": { + "value": "white", + "type": 29 + }, + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "mainTiling": { + "value": [ + 1, + 1 + ], + "type": 14 + }, + "mainOffset": { + "value": [ + 0, + 0 + ], + "type": 14 + } + }, + "program": "builtin-unlit|unlit-vs|unlit-fs" + } + ] + }, + { + "name": "transparent", + "passes": [ + { + "stage": "transparent", + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "diffuseTexture": { + "value": "white", + "type": 29 + }, + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "mainTiling": { + "value": [ + 1, + 1 + ], + "type": 14 + }, + "mainOffset": { + "value": [ + 0, + 0 + ], + "type": 14 + } + }, + "program": "builtin-unlit|unlit-vs|unlit-fs" + } + ] + } + ], + "shaders": [ + { + "hash": 922858114, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform MAIN_TILING {\n vec2 mainTiling;\n vec2 mainOffset;\n};\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n out mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n out lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform UNLIT {\n lowp vec4 diffuseColor;\n};\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n in lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n in mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matViewProj;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nuniform vec2 mainTiling;\nuniform vec2 mainOffset;\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n gl_Position = cc_matViewProj * cc_matWorld * In.position;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nuniform lowp vec4 diffuseColor;\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n varying mediump vec2 v_uv0;\n#endif\nvoid main () {\n vec4 color = diffuseColor;\n #if CC_USE_ATTRIBUTE_UV0 && USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture2D(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture2D(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n color.a *= diffuseTexture_tmp.a;\n #else\n color *= diffuseTexture_tmp;\n #endif\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n color *= v_color;\n #endif\n ALPHA_TEST(color);\n gl_FragColor = CCFragOutput(color);\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_SKINNING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_JOINTS_TEXTRUE", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING" + ] + }, + { + "name": "CC_JOINTS_TEXTURE_FLOAT32", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ] + }, + { + "name": "CC_USE_ATTRIBUTE_UV0", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_COLOR", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_NORMAL", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_TANGENT", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_DIFFUSE_TEXTURE", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ALPHA_ATLAS_diffuseTexture", + "type": "boolean", + "defines": [ + "CC_USE_ATTRIBUTE_UV0", + "USE_DIFFUSE_TEXTURE" + ] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [ + "CC_USE_ATTRIBUTE_UV0", + "USE_DIFFUSE_TEXTURE" + ] + } + ], + "blocks": [ + { + "name": "SKINNING", + "members": [ + { + "name": "jointsTextureSize", + "type": 14, + "count": 1 + } + ], + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 0 + }, + { + "name": "JOINT_MATRIX", + "members": [ + { + "name": "jointMatrices", + "type": 26, + "count": 50 + } + ], + "defines": [ + "CC_USE_SKINNING" + ], + "binding": 1 + }, + { + "name": "MAIN_TILING", + "members": [ + { + "name": "mainTiling", + "type": 14, + "count": 1 + }, + { + "name": "mainOffset", + "type": 14, + "count": 1 + } + ], + "defines": [], + "binding": 2 + }, + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 3 + }, + { + "name": "UNLIT", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 4 + } + ], + "samplers": [ + { + "name": "jointsTexture", + "type": 29, + "count": 1, + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 30 + }, + { + "name": "diffuseTexture", + "type": 29, + "count": 1, + "defines": [ + "USE_DIFFUSE_TEXTURE" + ], + "binding": 31 + } + ], + "record": null, + "name": "builtin-unlit|unlit-vs|unlit-fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/6e/6e0248f6-ea55-4252-beaa-62736bc53ad7.json b/library/imports/6e/6e0248f6-ea55-4252-beaa-62736bc53ad7.json new file mode 100644 index 0000000..6daa7be --- /dev/null +++ b/library/imports/6e/6e0248f6-ea55-4252-beaa-62736bc53ad7.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "err3", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1214, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.json b/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.png b/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.png new file mode 100644 index 0000000..ffe3879 Binary files /dev/null and b/library/imports/6e/6e056173-d285-473c-b206-40a7fff5386e.png differ diff --git a/library/imports/6f/6f801092-0c37-4f30-89ef-c8d960825b36.json b/library/imports/6f/6f801092-0c37-4f30-89ef-c8d960825b36.json new file mode 100644 index 0000000..003367b --- /dev/null +++ b/library/imports/6f/6f801092-0c37-4f30-89ef-c8d960825b36.json @@ -0,0 +1,10 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-base", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "2874f8dd-416c-4440-81b7-555975426e93" + }, + "_techniqueData": {} +} \ No newline at end of file diff --git a/library/imports/70/700fa527-a104-4d31-846a-99ebc1c5803a.json b/library/imports/70/700fa527-a104-4d31-846a-99ebc1c5803a.json new file mode 100644 index 0000000..5cd32cf --- /dev/null +++ b/library/imports/70/700fa527-a104-4d31-846a-99ebc1c5803a.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_phoneBg", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 753, + 1, + 98, + 129 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 98, + 129 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/70/70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4.json b/library/imports/70/70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4.json new file mode 100644 index 0000000..6e22adb --- /dev/null +++ b/library/imports/70/70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4.json @@ -0,0 +1,2327 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "3d-particle", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "ParticleSystem3D", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 154 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.ParticleSystem3D", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "432fa09c-cf03-4cff-a186-982604408a07" + } + ], + "duration": 5, + "_capacity": 100, + "loop": true, + "playOnAwake": true, + "_prewarm": false, + "_simulationSpace": 1, + "simulationSpeed": 1, + "startDelay": { + "__id__": 3 + }, + "startLifetime": { + "__id__": 9 + }, + "startColor": { + "__id__": 13 + }, + "scaleSpace": 1, + "startSize": { + "__id__": 17 + }, + "startSpeed": { + "__id__": 21 + }, + "startRotation": { + "__id__": 25 + }, + "gravityModifier": { + "__id__": 29 + }, + "rateOverTime": { + "__id__": 33 + }, + "rateOverDistance": { + "__id__": 37 + }, + "bursts": [], + "_renderMode": 0, + "_velocityScale": 1, + "_lengthScale": 1, + "_mesh": null, + "_id": "", + "_shapeModule": { + "__id__": 41 + }, + "_colorOverLifetimeModule": { + "__id__": 46 + }, + "_sizeOvertimeModule": { + "__id__": 51 + }, + "_velocityOvertimeModule": { + "__id__": 68 + }, + "_forceOvertimeModule": { + "__id__": 85 + }, + "_limitVelocityOvertimeModule": { + "__id__": 98 + }, + "_rotationOvertimeModule": { + "__id__": 115 + }, + "_textureAnimationModule": { + "__id__": 128 + }, + "_trailModule": { + "__id__": 137 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 4 + }, + "curveMin": { + "__id__": 7 + }, + "curveMax": { + "__id__": 8 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.Keyframe", + "time": 0, + "value": 1, + "inTangent": 0, + "outTangent": 0 + }, + { + "__type__": "cc.Keyframe", + "time": 1, + "value": 1, + "inTangent": 0, + "outTangent": 0 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 10 + }, + "curveMin": { + "__id__": 11 + }, + "curveMax": { + "__id__": 12 + }, + "constant": 5, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.GradientRange", + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMin": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMax": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "gradient": { + "__id__": 14 + }, + "gradientMin": { + "__id__": 15 + }, + "gradientMax": { + "__id__": 16 + } + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 18 + }, + "curveMin": { + "__id__": 19 + }, + "curveMax": { + "__id__": 20 + }, + "constant": 1, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 22 + }, + "curveMin": { + "__id__": 23 + }, + "curveMax": { + "__id__": 24 + }, + "constant": 5, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 26 + }, + "curveMin": { + "__id__": 27 + }, + "curveMax": { + "__id__": 28 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 30 + }, + "curveMin": { + "__id__": 31 + }, + "curveMax": { + "__id__": 32 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 34 + }, + "curveMin": { + "__id__": 35 + }, + "curveMax": { + "__id__": 36 + }, + "constant": 10, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 38 + }, + "curveMin": { + "__id__": 39 + }, + "curveMax": { + "__id__": 40 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.ShapeModule", + "enable": true, + "_shapeType": 2, + "emitFrom": 0, + "radius": 1, + "radiusThickness": 1, + "_angle": 0.4363323129985824, + "_arc": 6.283185307179586, + "arcMode": 0, + "arcSpread": 0, + "arcSpeed": { + "__id__": 42 + }, + "length": 5, + "boxThickness": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_position": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_rotation": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_scale": { + "__type__": "cc.Vec3", + "x": 1, + "y": 1, + "z": 1 + }, + "alignToDirection": false, + "randomDirectionAmount": 0, + "sphericalDirectionAmount": 0, + "randomPositionAmount": 0 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 43 + }, + "curveMin": { + "__id__": 44 + }, + "curveMax": { + "__id__": 45 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.ColorOvertimeModule", + "enable": false, + "color": { + "__id__": 47 + } + }, + { + "__type__": "cc.GradientRange", + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "color": { + "__type__": "cc.Color", + "r": 253, + "g": 7, + "b": 7, + "a": 255 + }, + "colorMin": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMax": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "gradient": { + "__id__": 48 + }, + "gradientMin": { + "__id__": 49 + }, + "gradientMax": { + "__id__": 50 + } + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.SizeOvertimeModule", + "enable": false, + "separateAxes": false, + "size": { + "__id__": 52 + }, + "x": { + "__id__": 56 + }, + "y": { + "__id__": 60 + }, + "z": { + "__id__": 64 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 53 + }, + "curveMin": { + "__id__": 54 + }, + "curveMax": { + "__id__": 55 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 57 + }, + "curveMin": { + "__id__": 58 + }, + "curveMax": { + "__id__": 59 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 61 + }, + "curveMin": { + "__id__": 62 + }, + "curveMax": { + "__id__": 63 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 65 + }, + "curveMin": { + "__id__": 66 + }, + "curveMax": { + "__id__": 67 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.VelocityOvertimeModule", + "enable": false, + "space": 1, + "x": { + "__id__": 69 + }, + "y": { + "__id__": 73 + }, + "z": { + "__id__": 77 + }, + "speedModifier": { + "__id__": 81 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 70 + }, + "curveMin": { + "__id__": 71 + }, + "curveMax": { + "__id__": 72 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 74 + }, + "curveMin": { + "__id__": 75 + }, + "curveMax": { + "__id__": 76 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 78 + }, + "curveMin": { + "__id__": 79 + }, + "curveMax": { + "__id__": 80 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 82 + }, + "curveMin": { + "__id__": 83 + }, + "curveMax": { + "__id__": 84 + }, + "constant": 1, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.ForceOvertimeModule", + "enable": false, + "space": 1, + "x": { + "__id__": 86 + }, + "y": { + "__id__": 90 + }, + "z": { + "__id__": 94 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 87 + }, + "curveMin": { + "__id__": 88 + }, + "curveMax": { + "__id__": 89 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 91 + }, + "curveMin": { + "__id__": 92 + }, + "curveMax": { + "__id__": 93 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 95 + }, + "curveMin": { + "__id__": 96 + }, + "curveMax": { + "__id__": 97 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.LimitVelocityOvertimeModule", + "enable": false, + "space": 1, + "separateAxes": false, + "limit": { + "__id__": 99 + }, + "limitX": { + "__id__": 103 + }, + "limitY": { + "__id__": 107 + }, + "limitZ": { + "__id__": 111 + }, + "dampen": 3 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 100 + }, + "curveMin": { + "__id__": 101 + }, + "curveMax": { + "__id__": 102 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 104 + }, + "curveMin": { + "__id__": 105 + }, + "curveMax": { + "__id__": 106 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 108 + }, + "curveMin": { + "__id__": 109 + }, + "curveMax": { + "__id__": 110 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 112 + }, + "curveMin": { + "__id__": 113 + }, + "curveMax": { + "__id__": 114 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.RotationOvertimeModule", + "enable": false, + "_separateAxes": false, + "x": { + "__id__": 116 + }, + "y": { + "__id__": 120 + }, + "z": { + "__id__": 124 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 117 + }, + "curveMin": { + "__id__": 118 + }, + "curveMax": { + "__id__": 119 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 121 + }, + "curveMin": { + "__id__": 122 + }, + "curveMax": { + "__id__": 123 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 125 + }, + "curveMin": { + "__id__": 126 + }, + "curveMax": { + "__id__": 127 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.TextureAnimationModule", + "_enable": false, + "_mode": 0, + "animation": 0, + "randomRow": false, + "rowIndex": 0, + "frameOverTime": { + "__id__": 129 + }, + "startFrame": { + "__id__": 133 + }, + "cycleCount": 0, + "_numTilesX": 0, + "_numTilesY": 0 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 130 + }, + "curveMin": { + "__id__": 131 + }, + "curveMax": { + "__id__": 132 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 134 + }, + "curveMin": { + "__id__": 135 + }, + "curveMax": { + "__id__": 136 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.TrailModule", + "_enable": false, + "mode": 0, + "lifeTime": { + "__id__": 138 + }, + "_minParticleDistance": 0.1, + "_space": 0, + "existWithParticles": true, + "textureMode": 0, + "widthFromParticle": true, + "widthRatio": { + "__id__": 142 + }, + "colorFromParticle": false, + "colorOverTrail": { + "__id__": 146 + }, + "colorOvertime": { + "__id__": 150 + } + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 139 + }, + "curveMin": { + "__id__": 140 + }, + "curveMax": { + "__id__": 141 + }, + "constant": 1, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.CurveRange", + "mode": 0, + "curve": { + "__id__": 143 + }, + "curveMin": { + "__id__": 144 + }, + "curveMax": { + "__id__": 145 + }, + "constant": 0, + "constantMin": 0, + "constantMax": 0, + "multiplier": 1 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.AnimationCurve", + "keyFrames": [ + { + "__id__": 5 + }, + { + "__id__": 6 + } + ], + "preWrapMode": 2, + "postWrapMode": 2 + }, + { + "__type__": "cc.GradientRange", + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMin": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMax": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "gradient": { + "__id__": 147 + }, + "gradientMin": { + "__id__": 148 + }, + "gradientMax": { + "__id__": 149 + } + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.GradientRange", + "_mode": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMin": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "colorMax": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "gradient": { + "__id__": 151 + }, + "gradientMin": { + "__id__": 152 + }, + "gradientMax": { + "__id__": 153 + } + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.Gradient", + "colorKeys": [], + "alphaKeys": [], + "mode": 0 + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4" + }, + "fileId": "a7grHQWGBCppuqJqizdE84", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/70/70d7cdb0-04cd-41bb-9480-c06a4785f386.json b/library/imports/70/70d7cdb0-04cd-41bb-9480-c06a4785f386.json new file mode 100644 index 0000000..7ea85d0 --- /dev/null +++ b/library/imports/70/70d7cdb0-04cd-41bb-9480-c06a4785f386.json @@ -0,0 +1,123 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "3d-camera", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "3D Camera", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 10, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 6, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 0, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 1024, + "_ortho": false, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "70d7cdb0-04cd-41bb-9480-c06a4785f386" + }, + "fileId": "abdJ5/jGlPzq+iDQghzEti", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/70/70dfad15-0bc8-45a9-93ef-62dae7fc8c12.json b/library/imports/70/70dfad15-0bc8-45a9-93ef-62dae7fc8c12.json new file mode 100644 index 0000000..4d56592 --- /dev/null +++ b/library/imports/70/70dfad15-0bc8-45a9-93ef-62dae7fc8c12.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "err1", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 727, + 810, + 117, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.json b/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.png b/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.png new file mode 100644 index 0000000..a3f2d16 Binary files /dev/null and b/library/imports/71/71561142-4c83-4933-afca-cb7a17f67053.png differ diff --git a/library/imports/71/7168db62-0edc-42e5-be5d-682cf6c4a165.json b/library/imports/71/7168db62-0edc-42e5-be5d-682cf6c4a165.json new file mode 100644 index 0000000..bae6ef0 --- /dev/null +++ b/library/imports/71/7168db62-0edc-42e5-be5d-682cf6c4a165.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_toggle_disabled", + "texture": "c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f", + "atlas": "", + "rect": [ + 0, + 0, + 28, + 28 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 28, + 28 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js b/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js new file mode 100644 index 0000000..09a93d2 --- /dev/null +++ b/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js @@ -0,0 +1,137 @@ +"use strict"; +cc._RF.push(module, '7290caA39xMWZc2phTMKovP', 'share'); +// Script/module/Share/share.ts + +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WeChat = void 0; +var shareConfig = { + gameId: "100014", + shareLine: "zDLsruVI", + EK: "hui231%1" +}; +// 微信操作类 +var WeChat = /** @class */ (function () { + function WeChat() { + } + WeChat.setShare = function (url) { + var urlTemp = this.removeQueryParams(url); + shareConfig.shareLine = urlTemp; + WeChat.getSignature(url); + }; + WeChat.getResult = function (res) { + if (res) { + var data = res.data; + // @ts-ignore + wx.config({ + debug: false, + appId: data.appId, + timestamp: data.timestamp, + nonceStr: data.nonceStr, + signature: data.signature, + jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage'] + }); + // @ts-ignore + wx.checkJsApi({ + jsApiList: ['updateAppMessageShareData'], + success: function (res) { + setTimeout(function () { + WeChat.changeShare(); + }, 100); + setTimeout(function () { + WeChat.changeShare(); + }, 200); + } + }); + } + }; + WeChat.changeShare = function () { + // @ts-ignore + wx.ready(function () { + // @ts-ignore + wx.updateAppMessageShareData({ + title: '记忆力认知测评', + desc: '你的认知灵活性和选择注意有问题吗', + link: shareConfig.shareLine, + imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', + success: function () { + // 设置成功 + console.log("分享好友成功回调"); + } + }); + setTimeout(function () { + // @ts-ignore + wx.updateTimelineShareData({ + title: '记忆力认知测评', + link: shareConfig.shareLine, + imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', + success: function () { + // 设置成功 + console.log("分享朋友圈成功回调"); + } + }); + }, 200); + }); + }; + WeChat.getSignature = function (url) { + return new Promise(function (resolve) { + WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult); + }); + }; + WeChat.getShareInfo = function (shareUrl, callback) { + return __awaiter(this, void 0, Promise, function () { + var time, url; + return __generator(this, function (_a) { + time = Math.floor((new Date().getTime()) / 1000); + url = cc.fx.HttpUtil.apiSign("/api/share/cfg?gameId=" + shareConfig.gameId + "&time=" + time + "&url=" + shareUrl, {}); + return [2 /*return*/, cc.fx.HttpUtil.get(url, callback, 0)]; + }); + }); + }; + WeChat.containsNanana = function (str) { + return /test/i.test(str); + }; + WeChat.removeQueryParams = function (url) { + return url.replace(/\?.*$/, ''); + }; + return WeChat; +}()); +exports.WeChat = WeChat; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js.map b/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js.map new file mode 100644 index 0000000..c09348b --- /dev/null +++ b/library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Share\\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EAAC,QAAQ,EAAC,CAAC,CAAC,EAAA;;;KAC5C;IAGM,qBAAc,GAArB,UAAsB,GAAG;QACrB,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,wBAAiB,GAAxB,UAAyB,GAAG;QACxB,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;IAEL,aAAC;AAAD,CApFA,AAoFC,IAAA;AApFY,wBAAM","file":"","sourceRoot":"/","sourcesContent":["\n\nvar shareConfig = {\n gameId: \"100014\",\n shareLine: \"zDLsruVI\",\n EK:\"hui231%1\"\n };\n\n// 定义微信配置数据的接口\ninterface IWeChatConfig {\n appId: string;\n timestamp: number;\n nonceStr: string;\n signature: string;\n jsApiList: [];\n}\n\n// 微信操作类\nexport class WeChat {\n static setShare(url) {\n var urlTemp = this.removeQueryParams(url);\n shareConfig.shareLine = urlTemp;\n WeChat.getSignature(url);\n }\n\n static getResult(res){\n if(res){\n var data = res.data;\n // @ts-ignore\n wx.config({\n debug: false,\n appId: data.appId,\n timestamp: data.timestamp,\n nonceStr: data.nonceStr,\n signature: data.signature,\n jsApiList: ['onMenuShareTimeline','updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']\n });\n // @ts-ignore\n wx.checkJsApi({\n jsApiList: ['updateAppMessageShareData'], // 需要检测的JS接口列表,所有JS接口列表见附录2,\n success: function(res) {\n setTimeout(() => { \n WeChat.changeShare();\n }, 100);\n setTimeout(() => {\n WeChat.changeShare();\n }, 200);\n }\n });\n }\n }\n\n static changeShare(){\n // @ts-ignore\n wx.ready(() => {\n // @ts-ignore\n wx.updateAppMessageShareData({ \n title: '记忆力认知测评', // 分享标题\n desc: '你的认知灵活性和选择注意有问题吗', // 分享描述\n link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致\n imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标\n success: function () {\n // 设置成功\n console.log(\"分享好友成功回调\");\n }\n });\n setTimeout(() => {\n // @ts-ignore\n wx.updateTimelineShareData({ \n title: '记忆力认知测评', // 分享标题\n link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致\n imgUrl: 'https://static.sparkus.cn/public/shennong.jpg', // 分享图标\n success: function () {\n // 设置成功\n console.log(\"分享朋友圈成功回调\");\n }\n })\n }, 200);\n\n }); \n }\n\n static getSignature(url: string): Promise {\n return new Promise((resolve) => {\n WeChat.getShareInfo((encodeURIComponent(url)),WeChat.getResult);\n });\n }\n static async getShareInfo(shareUrl: string, callback:Function): Promise {\n const time = Math.floor((new Date().getTime()) / 1000)\n const url = cc.fx.HttpUtil.apiSign(`/api/share/cfg?gameId=${shareConfig.gameId}&time=${time}&url=${shareUrl}`,{})\n return cc.fx.HttpUtil.get(url,callback,0)\n }\n\n \n static containsNanana(str) {\n return /test/i.test(str);\n }\n\n static removeQueryParams(url) {\n return url.replace(/\\?.*$/, '');\n }\n\n}\n"]} \ No newline at end of file diff --git a/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.json b/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.png b/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.png new file mode 100644 index 0000000..a0985fc Binary files /dev/null and b/library/imports/73/73a0903d-d80e-4e3c-aa67-f999543c08f5.png differ diff --git a/library/imports/75/75ceffef-e469-4845-80bd-e0052840d248.json b/library/imports/75/75ceffef-e469-4845-80bd-e0052840d248.json new file mode 100644 index 0000000..c235c9d --- /dev/null +++ b/library/imports/75/75ceffef-e469-4845-80bd-e0052840d248.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "again_Label", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1550, + 607, + 156, + 38 + ], + "offset": [ + 0, + 1 + ], + "originalSize": [ + 458, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js b/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js new file mode 100644 index 0000000..ac70148 --- /dev/null +++ b/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js @@ -0,0 +1,365 @@ +"use strict"; +cc._RF.push(module, '771a32aQBNGVKd3+66gyTKA', 'HttpUtil'); +// Script/module/Crypto/HttpUtil.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js +var BASE_URL = "https://api.sparkus.cn"; +//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool +var HttpUtil = /** @class */ (function (_super) { + __extends(HttpUtil, _super); + function HttpUtil() { + return _super !== null && _super.apply(this, arguments) || this; + } + HttpUtil_1 = HttpUtil; + //排行榜 + HttpUtil.rankData = function (type, callback, data) { + return __awaiter(this, void 0, Promise, function () { + var time, url; + return __generator(this, function (_a) { + time = Math.floor((new Date().getTime()) / 1000); + url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data); + this.post(url, data, callback, 0); + return [2 /*return*/]; + }); + }); + }; + HttpUtil.uploadUserLogData = function (data, callback) { + return __awaiter(this, void 0, Promise, function () { + var url; + return __generator(this, function (_a) { + url = '/log/collect/data'; + this.post(url, data, callback, 3); + return [2 /*return*/]; + }); + }); + }; + //暂时用不到 + HttpUtil.getUserRecord = function (data, callback) { + return __awaiter(this, void 0, Promise, function () { + var time, url; + return __generator(this, function (_a) { + time = Math.floor((new Date().getTime()) / 1000); + url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data); + this.post(url, data, callback, 0); + return [2 /*return*/]; + }); + }); + }; + HttpUtil.get = function (url, callback, count) { + return __awaiter(this, void 0, void 0, function () { + var repeat, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + repeat = count ? count : 0; + return [4 /*yield*/, this.fetchData(url, null, 'GET', repeat)]; + case 1: + response = _a.sent(); + callback && callback(response); + return [2 /*return*/]; + } + }); + }); + }; + HttpUtil.post = function (url, data, callback, count) { + return __awaiter(this, void 0, void 0, function () { + var repeat, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + repeat = count ? count : 0; + return [4 /*yield*/, this.fetchData(url, data, 'POST', repeat)]; + case 1: + response = _a.sent(); + callback && callback(response); + return [2 /*return*/]; + } + }); + }); + }; + HttpUtil.fetchData = function (url, data, method, repeat) { + return __awaiter(this, void 0, void 0, function () { + var fullUrl, headers, options, response, error_1, timeOut; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + fullUrl = "" + BASE_URL + url; + headers = { 'Content-Type': 'application/json' }; + options = { + method: method, + headers: headers, + body: data ? JSON.stringify(data) : null, + }; + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + return [4 /*yield*/, this.fetchWithTimeout(fullUrl, options)]; + case 2: + response = _a.sent(); + if (!response.ok) { + throw new Error("HTTP_______________error! status: " + response.status); + } + return [4 /*yield*/, response.json()]; + case 3: return [2 /*return*/, _a.sent()]; + case 4: + error_1 = _a.sent(); + console.error('Fetch_______________error:', error_1); + if (repeat > 0) { + repeat -= 1; + timeOut = (3 - repeat) * 5000; + setTimeout(function () { return __awaiter(_this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.fetchData(url, data, method, repeat)]; + case 1: + response = _a.sent(); + return [2 /*return*/]; + } + }); + }); }, timeOut); + } + else { + return [2 /*return*/, null]; + } + return [3 /*break*/, 5]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + HttpUtil.fetchWithTimeout = function (resource, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () { + var controller, id, response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + controller = new AbortController(); + id = setTimeout(function () { return controller.abort(); }, 5000); + return [4 /*yield*/, fetch(resource, __assign(__assign({}, options), { signal: controller.signal }))]; + case 1: + response = _a.sent(); + clearTimeout(id); + return [2 /*return*/, response]; + } + }); + }); + }; + /** + * + * @param url {string} 接口地址 + * @param params {object} 需要加密的参数对象 + */ + HttpUtil.apiSign = function (url, params) { + if (params === void 0) { params = {}; } + var convertUrl = url.trim(); + if (convertUrl.indexOf('?') === -1) { + convertUrl += '?'; + } + // 传入参数转换拼接字符串 + var postStr = getQueryString(params); + var signedStr = genSignStr(convertUrl, postStr); + var encryptStr = "sign=" + signedStr; + var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey); + encryptSignStr = encodeURIComponent(encryptSignStr); + return urlencode(convertUrl) + "&_p=" + encryptSignStr; + }; + var HttpUtil_1; + HttpUtil = HttpUtil_1 = __decorate([ + ccclass + ], HttpUtil); + return HttpUtil; +}(cc.Component)); +exports.default = HttpUtil; +function responseHandler(response) { + return response.data; +} +// 响应拦截器 +// Rq.interceptors.response.use(responseHandler) +var config = { + gameId: "100014", + secretKey: "9ymg8ppY", + EK: "hui231%1" +}; +var Crypoto = /** @class */ (function () { + function Crypoto() { + // 加密的向明值,自己根据项目实际情况定,需要跟后端开发保持一致 + this.keyHex = this.getHetKey(); + } + Crypoto.prototype.getHetKey = function () { + return CryptoJS.enc.Utf8.parse(config.EK); + }; + /** DES加密 */ + Crypoto.prototype.encryptByDES = function (message, secret) { + if (!message) { + return message; + } + var key = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex; + var encrypted = CryptoJS.DES.encrypt(message, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }); + return encrypted.toString(); + }; + /** DES解密 */ + Crypoto.prototype.decryptByDES = function (message, secret) { + var key = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex; + var decrypted = CryptoJS.DES.decrypt({ + ciphertext: CryptoJS.enc.Base64.parse(message) + }, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7 + }); + return decrypted.toString(CryptoJS.enc.Utf8); + }; + /** hmacSHA256加密 */ + Crypoto.prototype.hmacSha256 = function (message, secret) { + var keyHex = secret ? CryptoJS.enc.Utf8.parse(secret) : this.keyHex; + var hash = CryptoJS.HmacSHA256(message, keyHex); + return hash.toString(); + }; + /** hmacSHA256验证 */ + Crypoto.prototype.verifyHmacSha256 = function (message, signature) { + var hash = CryptoJS.HmacSHA256(message, this.keyHex); + return hash.toString() === signature; + }; + /** CBC加密 */ + Crypoto.prototype.encryptCBC = function (word) { + if (!word) { + return word; + } + var srcs = CryptoJS.enc.Utf8.parse(word); + var encrypted = CryptoJS.AES.encrypt(srcs, this.keyHex, { + iv: this.keyHex, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.ZeroPadding + }); + return encrypted.toString(); + }; + /** CBC解密 */ + Crypoto.prototype.decryptCBC = function (word) { + if (!word) { + return word; + } + var encryptedHexStr = CryptoJS.enc.Hex.parse(word); + var srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr); + var decrypt = CryptoJS.AES.decrypt(srcs, this.keyHex, { + iv: this.keyHex, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.ZeroPadding + }); + var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8); + return decryptedStr.toString(); + }; + return Crypoto; +}()); +var fxCry = new Crypoto(); +function isEmpty(data) { + return data === "" || data === null || data === undefined || data.length === 0 || JSON.stringify(data) == "{}"; +} +function getQueryString(obj) { + // 首先对对象的键进行排序并过滤空值 + var sortedKeys = Object.keys(obj).sort(); + var sortedObj = {}; + for (var i = 0; i < sortedKeys.length; i++) { + if (isEmpty(obj[sortedKeys[i]])) { + continue; + } + sortedObj[sortedKeys[i]] = obj[sortedKeys[i]]; + } + // 然后将排序后的对象转换为查询字符串 + var params = []; + for (var key in sortedObj) { + params.push(encodeURIComponent(key) + "=" + encodeURIComponent(sortedObj[key])); + } + return params.join('&'); +} +/** + * 组装签名字符串 + * @param string url: 请求地址 + * @param string postStr: post参数的a=1&b=2 + * @returns + */ +function genSignStr(url, postStr) { + var lessUrl = url.replace('?', ''); + lessUrl = lessUrl + "&" + postStr; + return encodeURIComponent(fxCry.hmacSha256(lessUrl)); +} +// 对参数进行统一urlencode +function urlencode(url) { + var _a = url.split("?", 2), baseUrl = _a[0], queryString = _a[1]; + var params = new URLSearchParams(queryString); + return baseUrl + "?" + params.toString(); +} + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js.map b/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js.map new file mode 100644 index 0000000..c90a894 --- /dev/null +++ b/library/imports/77/771a3d9a-4013-4654-a777-fbaea0c93280.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Crypto\\HttpUtil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAC1C,6CAAgD,CAAE,WAAW;AAE7D,IAAM,QAAQ,GAAG,wBAAwB,CAAC;AAC1C,0CAA0C;AAE1C;IAAsC,4BAAY;IAAlD;;IAgGA,CAAC;iBAhGoB,QAAQ;IACzB,KAAK;IACQ,iBAAQ,GAArB,UAAsB,IAAI,EAAC,QAAQ,EAAC,IAAI;uCAAG,OAAO;;;gBAC1C,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;gBAChD,GAAG,GAAG,UAAQ,CAAC,OAAO,CAAC,+BAA6B,MAAM,CAAC,MAAM,kBAAa,IAAI,cAAS,IAAM,EAAE,IAAI,CAAC,CAAA;gBAC9G,IAAI,CAAC,IAAI,CAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;;;;KAChC;IAEY,0BAAiB,GAA9B,UAA+B,IAAI,EAAC,QAAQ;uCAAG,OAAO;;;gBAC9C,GAAG,GAAG,mBAAmB,CAAC;gBAChC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,CAAC,CAAC;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AAC,CAAC;KAC/C;IAED,oBAAoB;IACpB,IAAM,MAAM,GAAG,EAAE,CAAC;IAClB,KAAK,IAAM,GAAG,IAAI,SAAS,EAAE;QAC3B,MAAM,CAAC,IAAI,CAAI,kBAAkB,CAAC,GAAG,CAAC,SAAI,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAG,CAAC,CAAC;KACjF;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAGD;;;;;GAKG;AAEH,SAAS,UAAU,CAAC,GAAW,EAAE,OAAe;IAC9C,IAAI,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAClC,OAAO,GAAG,OAAO,GAAG,GAAG,GAAG,OAAO,CAAA;IACjC,OAAO,kBAAkB,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;AACtD,CAAC;AACD,mBAAmB;AACnB,SAAS,SAAS,CAAC,GAAW;IACtB,IAAA,KAAyB,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAzC,OAAO,QAAA,EAAE,WAAW,QAAqB,CAAC;IACjD,IAAM,MAAM,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC;IAChD,OAAU,OAAO,SAAI,MAAM,CAAC,QAAQ,EAAI,CAAC;AAC3C,CAAC","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property} = cc._decorator;\r\nimport CryptoJS = require('./crypto-js.min.js'); //引用AES源码js\r\n\r\nconst BASE_URL = \"https://api.sparkus.cn\";\r\n//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool\r\n@ccclass\r\nexport default class HttpUtil extends cc.Component {\r\n //排行榜\r\n static async rankData(type,callback,data): Promise {\r\n const time = Math.floor((new Date().getTime()) / 1000)\r\n const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)\r\n this.post(url,data,callback,0);\r\n }\r\n \r\n static async uploadUserLogData(data,callback): Promise {\r\n const url = '/log/collect/data';\r\n this.post(url,data,callback,3);\r\n }\r\n //暂时用不到\r\n static async getUserRecord(data,callback): Promise {\r\n const time = Math.floor((new Date().getTime()) / 1000)\r\n const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)\r\n this.post(url,data,callback,0);\r\n }\r\n\r\n static async get(url, callback,count) {\r\n let repeat = count?count:0;\r\n const response = await this.fetchData(url, null, 'GET',repeat);\r\n callback && callback(response);\r\n }\r\n\r\n static async post(url, data, callback,count) {\r\n let repeat = count?count:0;\r\n const response = await this.fetchData(url, data, 'POST',repeat);\r\n callback && callback(response);\r\n }\r\n\r\n static async fetchData(url, data, method,repeat) {\r\n const fullUrl = `${BASE_URL}${url}`;\r\n const headers = { 'Content-Type': 'application/json' };\r\n const options = {\r\n method,\r\n headers,\r\n body: data ? JSON.stringify(data) : null,\r\n };\r\n\r\n try {\r\n var response = await this.fetchWithTimeout(fullUrl,options);\r\n if (!response.ok) {\r\n throw new Error(`HTTP_______________error! status: ${response.status}`);\r\n }\r\n return await response.json();\r\n } catch (error) {\r\n console.error('Fetch_______________error:', error);\r\n if(repeat > 0){\r\n repeat -= 1;\r\n const timeOut = (3-repeat)*5000;\r\n setTimeout(async () => {\r\n response = await this.fetchData(url, data, method,repeat);\r\n }, timeOut);\r\n }\r\n else{\r\n return null;\r\n }\r\n }\r\n } \r\n\r\n static async fetchWithTimeout(resource, options = {}) {\r\n const controller = new AbortController();\r\n const id = setTimeout(() => controller.abort(), 5000);\r\n const response = await fetch(resource, {\r\n ...options,\r\n signal: controller.signal\r\n });\r\n clearTimeout(id);\r\n\r\n return response;\r\n }\r\n\r\n /**\r\n * \r\n * @param url {string} 接口地址\r\n * @param params {object} 需要加密的参数对象\r\n */\r\n static apiSign(url: string, params = {}) {\r\n\r\n let convertUrl = url.trim()\r\n if (convertUrl.indexOf('?') === -1) {\r\n convertUrl += '?'\r\n }\r\n \r\n // 传入参数转换拼接字符串\r\n let postStr = getQueryString(params)\r\n \r\n const signedStr = genSignStr(convertUrl, postStr)\r\n const encryptStr = `sign=${signedStr}`\r\n\r\n let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)\r\n encryptSignStr = encodeURIComponent(encryptSignStr)\r\n\r\n return `${urlencode(convertUrl)}&_p=${encryptSignStr}`\r\n }\r\n}\r\n\r\nfunction responseHandler(response: { data: any }) {\r\n return response.data\r\n}\r\n// 响应拦截器\r\n// Rq.interceptors.response.use(responseHandler)\r\nconst config = {\r\n gameId: \"100014\",\r\n secretKey: \"9ymg8ppY\",\r\n EK:\"hui231%1\"\r\n};\r\n\r\ninterface CrypotoType {\r\n encryptByDES: any\r\n decryptByDES: any\r\n hmacSha256: any\r\n}\r\n \r\nclass Crypoto implements CrypotoType {\r\n // 加密的向明值,自己根据项目实际情况定,需要跟后端开发保持一致\r\n private keyHex = this.getHetKey()\r\n private getHetKey() {\r\n return CryptoJS.enc.Utf8.parse(config.EK);\r\n }\r\n\r\n /** DES加密 */\r\n encryptByDES(message: string, secret?: string) {\r\n if(!message) {\r\n return message\r\n }\r\n const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex\r\n const encrypted = CryptoJS.DES.encrypt(message, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n return encrypted.toString()\r\n }\r\n\r\n /** DES解密 */\r\n decryptByDES(message: string, secret?: string) {\r\n const key = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex\r\n\r\n const decrypted = CryptoJS.DES.decrypt({\r\n ciphertext: CryptoJS.enc.Base64.parse(message)\r\n }, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n })\r\n\r\n return decrypted.toString(CryptoJS.enc.Utf8)\r\n }\r\n\r\n /** hmacSHA256加密 */\r\n hmacSha256(message: string, secret?: string) {\r\n const keyHex = secret? CryptoJS.enc.Utf8.parse(secret): this.keyHex\r\n \r\n const hash = CryptoJS.HmacSHA256(message, keyHex);\r\n return hash.toString()\r\n }\r\n\r\n /** hmacSHA256验证 */\r\n verifyHmacSha256(message: string, signature: string) {\r\n const hash = CryptoJS.HmacSHA256(message, this.keyHex);\r\n return hash.toString() === signature\r\n }\r\n \r\n /** CBC加密 */\r\n encryptCBC(word: string) {\r\n if (!word) {\r\n return word;\r\n }\r\n const srcs = CryptoJS.enc.Utf8.parse(word);\r\n const encrypted = CryptoJS.AES.encrypt(srcs, this.keyHex, {\r\n iv: this.keyHex,\r\n mode: CryptoJS.mode.CBC,\r\n padding: CryptoJS.pad.ZeroPadding\r\n });\r\n return encrypted.toString(); \r\n }\r\n \r\n /** CBC解密 */\r\n decryptCBC(word: string) {\r\n if (!word) {\r\n return word;\r\n }\r\n const encryptedHexStr = CryptoJS.enc.Hex.parse(word);\r\n const srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);\r\n const decrypt = CryptoJS.AES.decrypt(srcs, this.keyHex, {\r\n iv: this.keyHex,\r\n mode: CryptoJS.mode.CBC,\r\n padding: CryptoJS.pad.ZeroPadding\r\n });\r\n const decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);\r\n return decryptedStr.toString();\r\n }\r\n}\r\nconst fxCry = new Crypoto();\r\n\r\nfunction isEmpty(data) {\r\n return data === \"\" || data === null || data === undefined || data.length === 0 || JSON.stringify(data) == \"{}\"\r\n}\r\n\r\nfunction getQueryString(obj) {\r\n // 首先对对象的键进行排序并过滤空值\r\n const sortedKeys = Object.keys(obj).sort();\r\n const sortedObj = {};\r\n for (let i = 0; i < sortedKeys.length; i++) {\r\n if (isEmpty(obj[sortedKeys[i]])) {\r\n continue;\r\n }\r\n sortedObj[sortedKeys[i]] = obj[sortedKeys[i]];\r\n }\r\n \r\n // 然后将排序后的对象转换为查询字符串\r\n const params = [];\r\n for (const key in sortedObj) {\r\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(sortedObj[key])}`);\r\n }\r\n return params.join('&');\r\n}\r\n\r\n\r\n/**\r\n * 组装签名字符串\r\n * @param string url: 请求地址 \r\n * @param string postStr: post参数的a=1&b=2 \r\n * @returns \r\n */\r\n\r\nfunction genSignStr(url: string, postStr: string): string {\r\n let lessUrl = url.replace('?', '')\r\n lessUrl = lessUrl + \"&\" + postStr\r\n return encodeURIComponent(fxCry.hmacSha256(lessUrl))\r\n}\r\n// 对参数进行统一urlencode\r\nfunction urlencode(url: string): string {\r\n const [baseUrl, queryString] = url.split(\"?\", 2);\r\n const params = new URLSearchParams(queryString);\r\n return `${baseUrl}?${params.toString()}`;\r\n}\r\n\r\n\r\n\r\n"]} \ No newline at end of file diff --git a/library/imports/78/785a442c-3ceb-45be-a46e-7317f625f3b9.json b/library/imports/78/785a442c-3ceb-45be-a46e-7317f625f3b9.json new file mode 100644 index 0000000..552ef35 --- /dev/null +++ b/library/imports/78/785a442c-3ceb-45be-a46e-7317f625f3b9.json @@ -0,0 +1,150 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "layout", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "layout", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + }, + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 200, + "height": 150 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 23, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_state": 0, + "_atlas": null, + "_id": "2ahobdsPRNsqLW+QOpm+dP" + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_layoutSize": { + "__type__": "cc.Size", + "width": 200, + "height": 150 + }, + "_resize": 0, + "_N$layoutType": 0, + "_N$padding": 0, + "_N$cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_N$startAxis": 0, + "_N$paddingLeft": 0, + "_N$paddingRight": 0, + "_N$paddingTop": 0, + "_N$paddingBottom": 0, + "_N$spacingX": 0, + "_N$spacingY": 0, + "_N$verticalDirection": 1, + "_N$horizontalDirection": 0, + "_id": "bfIqKhkQ5DR4a9m9sj/AzV" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "785a442c-3ceb-45be-a46e-7317f625f3b9" + }, + "fileId": "7f8d2O3hcNDT55RjJXZrQyg", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/79/793be74f-dab6-4d93-a264-bb3fe5aae57c.json b/library/imports/79/793be74f-dab6-4d93-a264-bb3fe5aae57c.json new file mode 100644 index 0000000..728f9dd --- /dev/null +++ b/library/imports/79/793be74f-dab6-4d93-a264-bb3fe5aae57c.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rankBtn", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1542, + 705, + 156, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 458, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/79/794756c4-eeac-4a24-a412-4035d0719970.json b/library/imports/79/794756c4-eeac-4a24-a412-4035d0719970.json new file mode 100644 index 0000000..ec4a384 --- /dev/null +++ b/library/imports/79/794756c4-eeac-4a24-a412-4035d0719970.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "voice", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 727, + 1, + 348, + 412 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.bin b/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.bin new file mode 100644 index 0000000..785c0a9 Binary files /dev/null and b/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.bin differ diff --git a/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.json b/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.json new file mode 100644 index 0000000..aa843a8 --- /dev/null +++ b/library/imports/7a/7a17de6e-227a-46b1-8009-e7157d4d3acf.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -0.5, + "z": -0.499999940395355 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.5, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 129 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 4128 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 4128, + "length": 384 + } +] \ No newline at end of file diff --git a/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js b/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js new file mode 100644 index 0000000..d3b7414 --- /dev/null +++ b/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js @@ -0,0 +1,24 @@ +"use strict"; +cc._RF.push(module, '7a231Rz0d9LBYYgY3bDYlLB', 'use_v2.1-2.2.1_cc.Toggle_event'); +// migration/use_v2.1-2.2.1_cc.Toggle_event.js + +"use strict"; + +/* + * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ~ 2.2.1 version. + * You do not need to manually add this script in any other project. + * If you don't use cc.Toggle in your project, you can delete this script directly. + * If your project is hosted in VCS such as git, submit this script together. + * + * 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程, + * 你无需在任何其它项目中手动添加此脚本。 + * 如果你的项目中没用到 Toggle,可直接删除该脚本。 + * 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。 + */ +if (cc.Toggle) { + // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code + // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件 + cc.Toggle._triggerEventInScript_isChecked = true; +} + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js.map b/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js.map new file mode 100644 index 0000000..8cab03c --- /dev/null +++ b/library/imports/7a/7a231473-d1df-4b05-8620-6376c36252c1.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\migration\\use_v2.1-2.2.1_cc.Toggle_event.js"],"names":["cc","Toggle","_triggerEventInScript_isChecked"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAIA,EAAE,CAACC,MAAP,EAAe;AACX;AACA;AACAD,EAAAA,EAAE,CAACC,MAAH,CAAUC,+BAAV,GAA4C,IAA5C;AACH","sourceRoot":"/","sourcesContent":["/*\r\n * This script is automatically generated by Cocos Creator and is only used for projects compatible with the v2.1.0 ~ 2.2.1 version.\r\n * You do not need to manually add this script in any other project.\r\n * If you don't use cc.Toggle in your project, you can delete this script directly.\r\n * If your project is hosted in VCS such as git, submit this script together.\r\n *\r\n * 此脚本由 Cocos Creator 自动生成,仅用于兼容 v2.1.0 ~ 2.2.1 版本的工程,\r\n * 你无需在任何其它项目中手动添加此脚本。\r\n * 如果你的项目中没用到 Toggle,可直接删除该脚本。\r\n * 如果你的项目有托管于 git 等版本库,请将此脚本一并上传。\r\n */\r\n\r\nif (cc.Toggle) {\r\n // Whether to trigger 'toggle' and 'checkEvents' events when modifying 'toggle.isChecked' in the code\r\n // 在代码中修改 'toggle.isChecked' 时是否触发 'toggle' 与 'checkEvents' 事件\r\n cc.Toggle._triggerEventInScript_isChecked = true;\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.json b/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.json new file mode 100644 index 0000000..42d9f11 --- /dev/null +++ b/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "lizi_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.462857, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.mp3 b/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.mp3 new file mode 100644 index 0000000..43bc63f Binary files /dev/null and b/library/imports/7a/7a5029a4-6d49-4a15-a1bb-9faa9506e801.mp3 differ diff --git a/library/imports/7a/7afd064b-113f-480e-b793-8817d19f63c3.json b/library/imports/7a/7afd064b-113f-480e-b793-8817d19f63c3.json new file mode 100644 index 0000000..2afdc94 --- /dev/null +++ b/library/imports/7a/7afd064b-113f-480e-b793-8817d19f63c3.json @@ -0,0 +1,10 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-spine", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7" + }, + "_techniqueData": {} +} \ No newline at end of file diff --git a/library/imports/7b/7b0b1d20-5a1d-4723-8af8-50a47e841643.json b/library/imports/7b/7b0b1d20-5a1d-4723-8af8-50a47e841643.json new file mode 100644 index 0000000..2ce31e6 --- /dev/null +++ b/library/imports/7b/7b0b1d20-5a1d-4723-8af8-50a47e841643.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "guang", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1, + 1, + 724, + 720 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 724, + 720 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/7d/7d4ffd94-42d6-4045-9db7-a744229adfc4.json b/library/imports/7d/7d4ffd94-42d6-4045-9db7-a744229adfc4.json new file mode 100644 index 0000000..e8aecc3 --- /dev/null +++ b/library/imports/7d/7d4ffd94-42d6-4045-9db7-a744229adfc4.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_toggle_pressed", + "texture": "b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd", + "atlas": "", + "rect": [ + 0, + 0, + 28, + 28 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 28, + 28 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/7d/7de03a80-4457-438d-95a7-3e7cdffd6086.json b/library/imports/7d/7de03a80-4457-438d-95a7-3e7cdffd6086.json new file mode 100644 index 0000000..9ceb3f2 --- /dev/null +++ b/library/imports/7d/7de03a80-4457-438d-95a7-3e7cdffd6086.json @@ -0,0 +1,96 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "tiledmap", + "_objFlags": 0, + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "New TiledMap", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_reorderChildDirty": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.TiledMap", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_tmxFile": null + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": null, + "fileId": "6d9cbIJlHhJ/4JAwDJiN9SB" + } +] \ No newline at end of file diff --git a/library/imports/7e/7ed2037c-3eb8-4f03-a2e1-5ab3e81ca34e.json b/library/imports/7e/7ed2037c-3eb8-4f03-a2e1-5ab3e81ca34e.json new file mode 100644 index 0000000..0e0da41 --- /dev/null +++ b/library/imports/7e/7ed2037c-3eb8-4f03-a2e1-5ab3e81ca34e.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "hand", + "texture": "4b49cd83-b149-43f7-925f-f80540e80749", + "atlas": "", + "rect": [ + 2, + 2, + 172, + 124 + ], + "offset": [ + -40, + 0 + ], + "originalSize": [ + 256, + 128 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/7e/7ee88c39-72c3-4896-8faf-b26c1daecabc.json b/library/imports/7e/7ee88c39-72c3-4896-8faf-b26c1daecabc.json new file mode 100644 index 0000000..7646b96 --- /dev/null +++ b/library/imports/7e/7ee88c39-72c3-4896-8faf-b26c1daecabc.json @@ -0,0 +1,77 @@ +{ + "__type__": "cc.SpriteAtlas", + "_name": "Food.plist", + "_objFlags": 0, + "_native": "", + "_spriteFrames": { + "prop_baishao": { + "__uuid__": "190debeb-3bf5-4344-924e-d0258863a8f4" + }, + "prop_cha": { + "__uuid__": "43cc7ea5-4a81-400c-99b2-f71529750198" + }, + "prop_chixiaodou": { + "__uuid__": "13257b60-7625-49be-b312-8089bb4a8c73" + }, + "prop_danggui": { + "__uuid__": "14dccec6-9a4f-4e26-9afd-fea06f3a2a62" + }, + "prop_danshen": { + "__uuid__": "be8f26d8-90f0-4b73-884c-96fe8c8a47ef" + }, + "prop_dazao": { + "__uuid__": "17ff98a7-726f-4fc9-a55a-c9f8f97aef1b" + }, + "prop_gancao": { + "__uuid__": "20ec22dc-cd80-453a-9207-b7f462ac8a34" + }, + "prop_ganjiang": { + "__uuid__": "b4a90350-0463-403c-b8cc-0248f3122578" + }, + "prop_gouqi": { + "__uuid__": "42c04718-9864-407c-98cc-b7c2f4fbb863" + }, + "prop_jingjie": { + "__uuid__": "92e33d3e-0c8a-4cd5-acc6-d0b74cde43d5" + }, + "prop_jinju": { + "__uuid__": "5ab44f42-4596-44da-8a5f-69ab9d0dd69b" + }, + "prop_lizhi": { + "__uuid__": "07ea10be-6262-4ace-be21-526e4501b6e5" + }, + "prop_lizi": { + "__uuid__": "a152c3fc-1a82-4ac3-bfbc-6a9af534d570" + }, + "prop_longyan": { + "__uuid__": "12a36c58-641a-4690-8931-dc81a20f2012" + }, + "prop_moli": { + "__uuid__": "cf15cbaa-3813-433e-93de-23e5ac8de6ba" + }, + "prop_muchai": { + "__uuid__": "4f70a9c4-5fe2-4aa3-9d88-0b46bcf64f05" + }, + "prop_mudan": { + "__uuid__": "a1c18cea-6961-4a68-84d0-8a59528bb0dd" + }, + "prop_mulan": { + "__uuid__": "fbb1e48a-b0be-4b1e-877c-89a20b0e0d2f" + }, + "prop_pugongying": { + "__uuid__": "d1bf6c39-ac09-4ccc-8723-0dc71b8b04a9" + }, + "prop_putao": { + "__uuid__": "ba2df8a8-50d3-49d9-a19d-c5d4233a8bf2" + }, + "prop_renshen": { + "__uuid__": "5fe73fd9-beb1-4bcb-942e-6e61e5d1c107" + }, + "prop_taozi": { + "__uuid__": "ca25e50f-5fc1-42b4-996d-d022ebfd6010" + }, + "prop_zhuye": { + "__uuid__": "a332f672-0dc8-4637-8bef-31bec33425bc" + } + } +} \ No newline at end of file diff --git a/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js b/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js new file mode 100644 index 0000000..53acf9e --- /dev/null +++ b/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js @@ -0,0 +1,170 @@ +"use strict"; +cc._RF.push(module, '805c6nf399HWZeuWnNB9CTH', 'GameOver'); +// Script/GameOver.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var NewClass = /** @class */ (function (_super) { + __extends(NewClass, _super); + function NewClass() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.count = null; + _this.time = null; + _this.finishiTime = null; + return _this; + } + // onLoad () {} + NewClass.prototype.start = function () { + this.count.string = 0 + ""; + this.init(); + // success_${today}_${code}_${matchedReferrer.gameId} + // const today = new Date().toLocaleDateString(); + // const data = "success_${today}_${code}_${matchedReferrer.gameId}" + }; + //初始化数据 + NewClass.prototype.init = function () { + //展示准确率 + this.showAccuracy(); + //展示完成时间 + this.showFinishiTime(); + //上传排行榜 + this.setRank(); + //删除本关卡 + setTimeout(function () { + cc.fx.GameTool.getCustom(true); + }, 100); + var urlNow = window.location.href; + if (this.containsTrain(urlNow)) { + this.node.getChildByName("btn").getChildByName("again").active = false; + this.node.getChildByName("btn").getChildByName("rank").active = false; + this.node.getChildByName("btn").getChildByName("finishi").active = true; + } + else { + this.node.getChildByName("btn").getChildByName("again").active = true; + this.node.getChildByName("btn").getChildByName("rank").active = true; + this.node.getChildByName("btn").getChildByName("finishi").active = false; + } + }; + NewClass.prototype.setRank = function () { + var data = { + "totleTimes": cc.fx.GameConfig.GM_INFO.stepTimeList, + "accuracy": this.accuracy, + }; + cc.fx.GameTool.setRank(data); + }; + NewClass.prototype.showFinishiTime = function () { + var _this = this; + cc.tween(this.finishiTime) + .delay(1.5) + .to(0.5, { fillRange: 1 }) + .start(); + cc.tween(this.time.node) + .delay(1.7) + .to(0.3, { opacity: 255 }) + .call(function () { + _this.conversionTime(); + }) + .start(); + }; + NewClass.prototype.conversionTime = function () { + var _this = this; + var minute = 0; + var second = 0; + var obj = { a: 100 }; + var time = parseInt(cc.fx.GameConfig.GM_INFO.stepTimeList / 1000 + ""); + cc.tween(obj) + // .delay(0.1) + .to(1, { a: time }, { + progress: function (start, end, current, ratio) { + current = end * ratio; + second = current.toFixed(0); + if (second >= 60) { + minute = parseInt(second / 60 + ""); + second -= 60 * minute; + } + _this.time.string = minute + "分" + second + "秒"; + } + }) + .call(function () { + _this.node.getChildByName("btn").active = true; + cc.tween(_this.node.getChildByName("btn")) + .to(0.3, { opacity: 255 }) + .start(); + }) + .start(); + }; + NewClass.prototype.showAccuracy = function () { + var _this = this; + this.accuracy = parseInt(cc.fx.GameConfig.GM_INFO.successList.length / + cc.fx.GameConfig.GM_INFO.level * 100 + ""); + console.log("答对的个数:", cc.fx.GameConfig.GM_INFO.successList.length); + console.log("总数:", cc.fx.GameConfig.GM_INFO.level); + console.log("准确率:", this.accuracy); + var obj = { a: 100 }; + cc.tween(obj) + .delay(0.5) + .to(1, { a: this.accuracy }, { + progress: function (start, end, current, ratio) { + current = end * ratio; + current = current.toFixed(0); + _this.count.string = current + ""; + } + }) + .start(); + }; + NewClass.prototype.jumpFinishi = function () { + var url = "https://train.sparkus.cn/poster/game/" + cc.fx.GameConfig.GM_INFO.scode + "?suc=1"; + window.location.href = url; + }; + //判断来源 + NewClass.prototype.containsTrain = function (str) { + return /from=train/i.test(str); + }; + //打开排行榜 + NewClass.prototype.openRank = function () { + cc.director.loadScene("RankScene"); + }; + //重新开始玩 + NewClass.prototype.again = function () { + cc.director.loadScene("GameScene"); + }; + NewClass.prototype.update = function (dt) { + // this.count.string = this.accuracy + ""; + }; + __decorate([ + property(cc.Label) + ], NewClass.prototype, "count", void 0); + __decorate([ + property(cc.Label) + ], NewClass.prototype, "time", void 0); + __decorate([ + property(cc.Sprite) + ], NewClass.prototype, "finishiTime", void 0); + NewClass = __decorate([ + ccclass + ], NewClass); + return NewClass; +}(cc.Component)); +exports.default = NewClass; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js.map b/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js.map new file mode 100644 index 0000000..6360db7 --- /dev/null +++ b/library/imports/80/805c69df-dfdf-4759-97ae-5a7341f424c7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\GameOver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAG1C;IAAsC,4BAAY;IAAlD;QAAA,qEA0IC;QAxIG,WAAK,GAAa,IAAI,CAAC;QAEvB,UAAI,GAAa,IAAI,CAAC;QAEtB,iBAAW,GAAc,IAAI,CAAC;;IAoIlC,CAAC;IA/HG,eAAe;IACf,wBAAK,GAAL;QACI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;QAC3B,IAAI,CAAC,IAA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a,QAAQ,CA0I5B;IAAD,eAAC;CA1ID,AA0IC,CA1IqC,EAAE,CAAC,SAAS,GA0IjD;kBA1IoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property} = cc._decorator;\r\n\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n @property(cc.Label)\r\n count: cc.Label = null;\r\n @property(cc.Label)\r\n time: cc.Label = null;\r\n @property(cc.Sprite)\r\n finishiTime: cc.Sprite = null;\r\n listData: any;\r\n selfData: any;\r\n accuracy:number;\r\n\r\n // onLoad () {}\r\n start () {\r\n this.count.string = 0 + \"\";\r\n this.init();\r\n\r\n // success_${today}_${code}_${matchedReferrer.gameId}\r\n // const today = new Date().toLocaleDateString();\r\n // const data = \"success_${today}_${code}_${matchedReferrer.gameId}\"\r\n \r\n }\r\n //初始化数据\r\n init(){\r\n //展示准确率\r\n this.showAccuracy();\r\n //展示完成时间\r\n this.showFinishiTime();\r\n //上传排行榜\r\n this.setRank();\r\n //删除本关卡\r\n setTimeout(() => {\r\n cc.fx.GameTool.getCustom(true);\r\n }, 100);\r\n\r\n var urlNow = window.location.href;\r\n if(this.containsTrain(urlNow)){\r\n this.node.getChildByName(\"btn\").getChildByName(\"again\").active = false;\r\n this.node.getChildByName(\"btn\").getChildByName(\"rank\").active = false;\r\n this.node.getChildByName(\"btn\").getChildByName(\"finishi\").active = true;\r\n }\r\n else{\r\n this.node.getChildByName(\"btn\").getChildByName(\"again\").active = true;\r\n this.node.getChildByName(\"btn\").getChildByName(\"rank\").active = true;\r\n this.node.getChildByName(\"btn\").getChildByName(\"finishi\").active = false;\r\n }\r\n }\r\n\r\n setRank(){\r\n let data = {\r\n \"totleTimes\": cc.fx.GameConfig.GM_INFO.stepTimeList,\r\n \"accuracy\": this.accuracy,\r\n }\r\n cc.fx.GameTool.setRank(data);\r\n }\r\n\r\n showFinishiTime(){\r\n cc.tween(this.finishiTime)\r\n .delay(1.5)\r\n .to(0.5,{fillRange:1})\r\n .start();\r\n cc.tween(this.time.node)\r\n .delay(1.7)\r\n .to(0.3,{opacity:255})\r\n .call(()=>{\r\n this.conversionTime();\r\n })\r\n .start();\r\n }\r\n\r\n conversionTime(){\r\n var minute = 0;\r\n var second = 0;\r\n let obj = {a:100};\r\n let time = parseInt(cc.fx.GameConfig.GM_INFO.stepTimeList/1000 + \"\");\r\n cc.tween(obj)\r\n // .delay(0.1)\r\n .to(1,{a:time},{\r\n progress: (start,end,current,ratio)=>{\r\n current = end*ratio;\r\n second = current.toFixed(0);\r\n if(second >= 60){\r\n minute = parseInt(second/60+\"\");\r\n second -= 60*minute;\r\n }\r\n this.time.string = minute + \"分\" + second + \"秒\";\r\n }\r\n })\r\n .call(()=>{\r\n this.node.getChildByName(\"btn\").active = true;\r\n cc.tween(this.node.getChildByName(\"btn\"))\r\n .to(0.3,{opacity:255})\r\n .start();\r\n })\r\n .start()\r\n }\r\n \r\n showAccuracy(){\r\n this.accuracy = parseInt(cc.fx.GameConfig.GM_INFO.successList.length/\r\n cc.fx.GameConfig.GM_INFO.level*100+\"\");\r\n \r\n console.log(\"答对的个数:\",cc.fx.GameConfig.GM_INFO.successList.length);\r\n console.log(\"总数:\",cc.fx.GameConfig.GM_INFO.level);\r\n console.log(\"准确率:\",this.accuracy);\r\n let obj = {a:100};\r\n cc.tween(obj)\r\n .delay(0.5)\r\n .to(1,{a:this.accuracy},{\r\n progress: (start,end,current,ratio)=>{\r\n current = end*ratio;\r\n current = current.toFixed(0);\r\n this.count.string = current + \"\";\r\n }\r\n })\r\n .start()\r\n }\r\n\r\n jumpFinishi(){\r\n let url = \"https://train.sparkus.cn/poster/game/\" + cc.fx.GameConfig.GM_INFO.scode + \"?suc=1\";\r\n window.location.href = url;\r\n }\r\n\r\n //判断来源\r\n containsTrain(str) {\r\n return /from=train/i.test(str);\r\n }\r\n\r\n //打开排行榜\r\n openRank(){\r\n cc.director.loadScene(\"RankScene\");\r\n }\r\n //重新开始玩\r\n again(){\r\n cc.director.loadScene(\"GameScene\");\r\n }\r\n\r\n update(dt: number): void {\r\n // this.count.string = this.accuracy + \"\";\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.json b/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.png b/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.png new file mode 100644 index 0000000..e511c8d Binary files /dev/null and b/library/imports/80/8084ec83-76e6-4ef4-a0e9-162a417b5c08.png differ diff --git a/library/imports/81/8189af2f-6b70-497a-93a5-994048cb2e09.json b/library/imports/81/8189af2f-6b70-497a-93a5-994048cb2e09.json new file mode 100644 index 0000000..492f3f2 --- /dev/null +++ b/library/imports/81/8189af2f-6b70-497a-93a5-994048cb2e09.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "yes1", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1580, + 290, + 117, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/82/829a282c-b049-4019-bd38-5ace8d8a6417.json b/library/imports/82/829a282c-b049-4019-bd38-5ace8d8a6417.json new file mode 100644 index 0000000..acc059c --- /dev/null +++ b/library/imports/82/829a282c-b049-4019-bd38-5ace8d8a6417.json @@ -0,0 +1,939 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-3d-particle", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "name": "opaque-add", + "passes": [ + { + "stage": "opaque", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 1, + "blendSrcAlpha": 770, + "blendDstAlpha": 1 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add" + } + ] + }, + { + "name": "opaque-alpha-blend", + "passes": [ + { + "stage": "opaque", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add" + } + ] + }, + { + "name": "opaque-add-multiply", + "passes": [ + { + "stage": "opaque", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply" + } + ] + }, + { + "name": "opaque-add-smooth", + "passes": [ + { + "stage": "opaque", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth" + } + ] + }, + { + "name": "opaque-premultiply-blend", + "passes": [ + { + "stage": "opaque", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied" + } + ] + }, + { + "name": "transparent-add", + "passes": [ + { + "stage": "transparent", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 1, + "blendSrcAlpha": 770, + "blendDstAlpha": 1 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add" + } + ] + }, + { + "name": "transparent-alpha-blend", + "passes": [ + { + "stage": "transparent", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add" + } + ] + }, + { + "name": "transparent-add-multiply", + "passes": [ + { + "stage": "transparent", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "tintColor": { + "value": [ + 0.5, + 0.5, + 0.5, + 0.5 + ], + "inspector": { + "type": "color" + }, + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply" + } + ] + }, + { + "name": "transparent-add-smooth", + "passes": [ + { + "stage": "transparent", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth" + } + ] + }, + { + "name": "transparent-premultiply-blend", + "passes": [ + { + "stage": "transparent", + "rasterizerState": { + "cullMode": 0 + }, + "blendState": { + "targets": [ + { + "blend": true, + "blendSrc": 770, + "blendDst": 771, + "blendSrcAlpha": 770, + "blendDstAlpha": 771 + } + ] + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": false + }, + "properties": { + "mainTexture": { + "value": "grey", + "type": 29 + }, + "mainTiling_Offset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + } + }, + "program": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied" + } + ] + } + ], + "shaders": [ + { + "hash": 1682193167, + "glsl3": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture(mainTexture, uv);\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = add(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 add () {\n vec4 col = 2.0 * color * tintColor * texture2D(mainTexture, uv);\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = add(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_STRETCHED_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_HORIZONTAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_VERTICAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MESH", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + }, + { + "name": "FragConstants", + "members": [ + { + "name": "tintColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 1 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:add" + }, + { + "hash": 1933642753, + "glsl3": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nuniform FragConstants {\n vec4 tintColor;\n};\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = multiply(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nuniform vec4 tintColor;\nvec4 multiply () {\n vec4 col;\n vec4 texColor = texture2D(mainTexture, uv);\n col.rgb = tintColor.rgb * texColor.rgb * color.rgb * vec3(2.0);\n col.a = (1.0 - texColor.a) * (tintColor.a * color.a * 2.0);\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = multiply(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_STRETCHED_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_HORIZONTAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_VERTICAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MESH", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + }, + { + "name": "FragConstants", + "members": [ + { + "name": "tintColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 1 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-particle|particle-vs-legacy:lpvs_main|tinted-fs:multiply" + }, + { + "hash": 1851787849, + "glsl3": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = addSmooth(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 addSmooth () {\n vec4 col = color * texture2D(mainTexture, uv);\n col.rgb *= col.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = addSmooth(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_STRETCHED_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_HORIZONTAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_VERTICAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MESH", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:addSmooth" + }, + { + "hash": 145387972, + "glsl3": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform Constants{\n vec4 mainTiling_Offset;\n vec4 frameTile_velLenScale;\n vec4 scale;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nout vec2 uv;\nout vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nin vec3 a_position;\nin vec3 a_texCoord;\nin vec3 a_texCoord1;\nin vec3 a_texCoord2;\nin vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n in vec3 a_color1;\n#endif\n#if CC_USE_MESH\n in vec3 a_texCoord3;\n in vec3 a_normal;\n in vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec2 uv;\nin vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = premultiplied(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nvec4 quaternionFromAxis(vec3 xAxis,vec3 yAxis,vec3 zAxis){\n mat3 m = mat3(xAxis,yAxis,zAxis);\n float trace = m[0][0] + m[1][1] + m[2][2];\n vec4 quat;\n if (trace > 0.) {\n float s = 0.5 / sqrt(trace + 1.0);\n quat.w = 0.25 / s;\n quat.x = (m[2][1] - m[1][2]) * s;\n quat.y = (m[0][2] - m[2][0]) * s;\n quat.z = (m[1][0] - m[0][1]) * s;\n } else if ((m[0][0] > m[1][1]) && (m[0][0] > m[2][2])) {\n float s = 2.0 * sqrt(1.0 + m[0][0] - m[1][1] - m[2][2]);\n quat.w = (m[2][1] - m[1][2]) / s;\n quat.x = 0.25 * s;\n quat.y = (m[0][1] + m[1][0]) / s;\n quat.z = (m[0][2] + m[2][0]) / s;\n } else if (m[1][1] > m[2][2]) {\n float s = 2.0 * sqrt(1.0 + m[1][1] - m[0][0] - m[2][2]);\n quat.w = (m[0][2] - m[2][0]) / s;\n quat.x = (m[0][1] + m[1][0]) / s;\n quat.y = 0.25 * s;\n quat.z = (m[1][2] + m[2][1]) / s;\n } else {\n float s = 2.0 * sqrt(1.0 + m[2][2] - m[0][0] - m[1][1]);\n quat.w = (m[1][0] - m[0][1]) / s;\n quat.x = (m[0][2] + m[2][0]) / s;\n quat.y = (m[1][2] + m[2][1]) / s;\n quat.z = 0.25 * s;\n }\n float len = quat.x * quat.x + quat.y * quat.y + quat.z * quat.z + quat.w * quat.w;\n if (len > 0.) {\n len = 1. / sqrt(len);\n quat.x = quat.x * len;\n quat.y = quat.y * len;\n quat.z = quat.z * len;\n quat.w = quat.w * len;\n }\n return quat;\n}\nvec4 quaternionFromEuler(vec3 angle){\n float x = angle.x / 2.;\n float y = angle.y / 2.;\n float z = angle.z / 2.;\n float sx = sin(x);\n float cx = cos(x);\n float sy = sin(y);\n float cy = cos(y);\n float sz = sin(z);\n float cz = cos(z);\n vec4 quat = vec4(0);\n quat.x = sx * cy * cz + cx * sy * sz;\n quat.y = cx * sy * cz + sx * cy * sz;\n quat.z = cx * cy * sz - sx * sy * cz;\n quat.w = cx * cy * cz - sx * sy * sz;\n return quat;\n}\nmat4 matrixFromRT(vec4 q, vec3 p){\n float x2 = q.x + q.x;\n float y2 = q.y + q.y;\n float z2 = q.z + q.z;\n float xx = q.x * x2;\n float xy = q.x * y2;\n float xz = q.x * z2;\n float yy = q.y * y2;\n float yz = q.y * z2;\n float zz = q.z * z2;\n float wx = q.w * x2;\n float wy = q.w * y2;\n float wz = q.w * z2;\n return mat4(\n 1. - (yy + zz), xy + wz, xz - wy, 0,\n xy - wz, 1. - (xx + zz), yz + wx, 0,\n xz + wy, yz - wx, 1. - (xx + yy), 0,\n p.x, p.y, p.z, 1\n );\n}\nmat4 matFromRTS(vec4 q, vec3 t, vec3 s){\n float x = q.x, y = q.y, z = q.z, w = q.w;\n float x2 = x + x;\n float y2 = y + y;\n float z2 = z + z;\n float xx = x * x2;\n float xy = x * y2;\n float xz = x * z2;\n float yy = y * y2;\n float yz = y * z2;\n float zz = z * z2;\n float wx = w * x2;\n float wy = w * y2;\n float wz = w * z2;\n float sx = s.x;\n float sy = s.y;\n float sz = s.z;\n return mat4((1. - (yy + zz)) * sx, (xy + wz) * sx, (xz - wy) * sx, 0,\n (xy - wz) * sy, (1. - (xx + zz)) * sy, (yz + wx) * sy, 0,\n (xz + wy) * sz, (yz - wx) * sz, (1. - (xx + yy)) * sz, 0,\n t.x, t.y, t.z, 1);\n}\nvec4 quatMultiply(vec4 a, vec4 b){\n vec4 quat;\n quat.x = a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y;\n quat.y = a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z;\n quat.z = a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x;\n quat.w = a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z;\n return quat;\n}\nvoid rotateVecFromQuat(inout vec3 v, vec4 q){\n float ix = q.w * v.x + q.y * v.z - q.z * v.y;\n float iy = q.w * v.y + q.z * v.x - q.x * v.z;\n float iz = q.w * v.z + q.x * v.y - q.y * v.x;\n float iw = -q.x * v.x - q.y * v.y - q.z * v.z;\n v.x = ix * q.w + iw * -q.x + iy * -q.z - iz * -q.y;\n v.y = iy * q.w + iw * -q.y + iz * -q.x - ix * -q.z;\n v.z = iz * q.w + iw * -q.z + ix * -q.y - iy * -q.x;\n}\nvec3 rotateInLocalSpace(vec3 pos, vec3 xAxis, vec3 yAxis, vec3 zAxis, vec4 q){\n float z = pos.z;\n float x = pos.x;\n float y = pos.y;\n vec4 viewQuat = quaternionFromAxis(xAxis, yAxis, zAxis);\n vec4 rotQuat = quatMultiply(viewQuat, q);\n rotateVecFromQuat(pos, rotQuat);\n return pos;\n}\nvoid rotateCorner(inout vec2 corner, float angle){\n float xOS = cos(angle) * corner.x - sin(angle) * corner.y;\n float yOS = sin(angle) * corner.x + cos(angle) * corner.y;\n corner.x = xOS;\n corner.y = yOS;\n}\nuniform vec4 mainTiling_Offset;\nuniform vec4 frameTile_velLenScale;\nuniform vec4 scale;\nuniform mat4 cc_matView;\nuniform mat4 cc_matViewInv;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nvarying vec2 uv;\nvarying vec4 color;\nvoid computeVertPos(inout vec4 pos, vec2 vertOffset, vec4 q, vec3 s\n#if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , mat4 viewInv\n#endif\n#if CC_USE_STRETCHED_BILLBOARD\n , vec3 eye\n , vec4 velocity\n , float velocityScale\n , float lengthScale\n , float xIndex\n#endif\n) {\n#if CC_USE_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = normalize(vec3(viewInv[0][0], viewInv[1][0], viewInv[2][0]));\n vec3 camY = normalize(vec3(viewInv[0][1], viewInv[1][1], viewInv[2][1]));\n vec3 camZ = normalize(vec3(viewInv[0][2], viewInv[1][2], viewInv[2][2]));\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, camZ, q);\n#elif CC_USE_STRETCHED_BILLBOARD\n vec3 camRight = normalize(cross(pos.xyz - eye, velocity.xyz)) * s.x;\n vec3 camUp = velocity.xyz * velocityScale + normalize(velocity.xyz) * lengthScale * s.y;\n pos.xyz += (camRight * abs(vertOffset.x) * sign(vertOffset.y)) - camUp * xIndex;\n#elif CC_USE_HORIZONTAL_BILLBOARD\n vec3 viewSpaceVert = vec3(vertOffset.x * s.x, vertOffset.y * s.y, 0.);\n vec3 camX = vec3(1, 0, 0);\n vec3 camY = vec3(0, 0, -1);\n pos.xyz += rotateInLocalSpace(viewSpaceVert, camX, camY, cross(camX, camY), q);\n#elif CC_USE_VERTICAL_BILLBOARD\n vec2 viewSpaceVert = vec2(vertOffset.x * s.x, vertOffset.y * s.y);\n rotateCorner(viewSpaceVert, q.z);\n vec3 camX = normalize(vec3(cc_matView[0][0], cc_matView[1][0], cc_matView[2][0]));\n vec3 camY = vec3(0, 1, 0);\n vec3 offset = camX * viewSpaceVert.x + camY * viewSpaceVert.y;\n pos.xyz += offset;\n#else\n pos.x += vertOffset.x;\n pos.y += vertOffset.y;\n#endif\n}\nvec2 computeUV(float frameIndex, vec2 vertIndex, vec2 frameTile){\n vec2 aniUV = vec2(0, floor(frameIndex * frameTile.y));\n aniUV.x = floor(frameIndex * frameTile.x * frameTile.y - aniUV.y * frameTile.x);\n#if !CC_USE_MESH\n vertIndex.y = 1. - vertIndex.y;\n#endif\n return (aniUV.xy + vertIndex) / vec2(frameTile.x, frameTile.y);\n}\nattribute vec3 a_position;\nattribute vec3 a_texCoord;\nattribute vec3 a_texCoord1;\nattribute vec3 a_texCoord2;\nattribute vec4 a_color;\n#if CC_USE_STRETCHED_BILLBOARD\n attribute vec3 a_color1;\n#endif\n#if CC_USE_MESH\n attribute vec3 a_texCoord3;\n attribute vec3 a_normal;\n attribute vec4 a_color1;\n#endif\nvec4 lpvs_main() {\n vec3 compScale = scale.xyz * a_texCoord1;\n vec4 pos = vec4(a_position, 1);\n#if CC_USE_STRETCHED_BILLBOARD\n vec4 velocity = vec4(a_color1.xyz, 0);\n#endif\n#if !CC_USE_WORLD_SPACE\n pos = cc_matWorld * pos;\n #if CC_USE_STRETCHED_BILLBOARD\n velocity = cc_matWorld * velocity;\n #endif\n#endif\n#if !CC_USE_MESH\n vec2 cornerOffset = vec2((a_texCoord.xy - 0.5));\n #if CC_USE_BILLBOARD\n vec3 rotEuler = a_texCoord2;\n #elif CC_USE_STRETCHED_BILLBOARD\n vec3 rotEuler = vec3(0.);\n #else\n vec3 rotEuler = vec3(0., 0., a_texCoord2.z);\n #endif\n computeVertPos(pos, cornerOffset, quaternionFromEuler(rotEuler), compScale\n #if CC_USE_BILLBOARD || CC_USE_VERTICAL_BILLBOARD\n , cc_matViewInv\n #endif\n #if CC_USE_STRETCHED_BILLBOARD\n , cc_cameraPos.xyz\n , velocity\n , frameTile_velLenScale.z\n , frameTile_velLenScale.w\n , a_texCoord.x\n #endif\n );\n color = a_color;\n#else\n mat4 xformNoScale = matrixFromRT(quaternionFromEuler(a_texCoord2), pos.xyz);\n mat4 xform = matFromRTS(quaternionFromEuler(a_texCoord2), pos.xyz, compScale);\n pos = xform * vec4(a_texCoord3, 1);\n vec4 normal = xformNoScale * vec4(a_normal, 0);\n color = a_color * a_color1;\n#endif\n uv = computeUV(a_texCoord.z, a_texCoord.xy, frameTile_velLenScale.xy) * mainTiling_Offset.xy + mainTiling_Offset.zw;\n pos = cc_matViewProj * pos;\n return pos;\n}\nvoid main() { gl_Position = lpvs_main(); }", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec2 uv;\nvarying vec4 color;\nuniform sampler2D mainTexture;\nvec4 premultiplied () {\n vec4 col = color * texture2D(mainTexture, uv) * color.a;\n return CCFragOutput(col);\n}\nvoid main() { gl_FragColor = premultiplied(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_STRETCHED_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_HORIZONTAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_VERTICAL_BILLBOARD", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MESH", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_WORLD_SPACE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + } + ], + "blocks": [ + { + "name": "Constants", + "members": [ + { + "name": "mainTiling_Offset", + "type": 16, + "count": 1 + }, + { + "name": "frameTile_velLenScale", + "type": 16, + "count": 1 + }, + { + "name": "scale", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 0 + } + ], + "samplers": [ + { + "name": "mainTexture", + "type": 29, + "count": 1, + "defines": [], + "binding": 30 + } + ], + "record": null, + "name": "builtin-3d-particle|particle-vs-legacy:lpvs_main|no-tint-fs:premultiplied" + } + ] +} \ No newline at end of file diff --git a/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.bin b/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.bin new file mode 100644 index 0000000..fd7f98c Binary files /dev/null and b/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.bin differ diff --git a/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.json b/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.json new file mode 100644 index 0000000..c7ff387 --- /dev/null +++ b/library/imports/83/83f5eff8-3385-4f95-9b76-8da0aa1d96cd.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -1, + "z": -0.5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 1, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 1155 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 36960 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 36960, + "length": 12288 + } +] \ No newline at end of file diff --git a/library/imports/84/84a58691-6cbc-439b-8d29-46ae91fd4da3.json b/library/imports/84/84a58691-6cbc-439b-8d29-46ae91fd4da3.json new file mode 100644 index 0000000..167fde0 --- /dev/null +++ b/library/imports/84/84a58691-6cbc-439b-8d29-46ae91fd4da3.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "nomal2", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1254, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/88/88e79fd5-96b4-4a77-a1f4-312467171014.json b/library/imports/88/88e79fd5-96b4-4a77-a1f4-312467171014.json new file mode 100644 index 0000000..f211a73 --- /dev/null +++ b/library/imports/88/88e79fd5-96b4-4a77-a1f4-312467171014.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_progressbar_bg", + "texture": "99170b0b-d210-46f1-b213-7d9e3f23098a", + "atlas": "", + "rect": [ + 0, + 0, + 60, + 15 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 60, + 15 + ], + "capInsets": [ + 10, + 4, + 10, + 4 + ] + } +} \ No newline at end of file diff --git a/library/imports/89/897ef7a1-4860-4f64-968d-f5924b18668a.json b/library/imports/89/897ef7a1-4860-4f64-968d-f5924b18668a.json new file mode 100644 index 0000000..9579ab7 --- /dev/null +++ b/library/imports/89/897ef7a1-4860-4f64-968d-f5924b18668a.json @@ -0,0 +1,123 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "2d-camera", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "2D Camera", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 554.2562584220408, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 6, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 0, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 0.1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "897ef7a1-4860-4f64-968d-f5924b18668a" + }, + "fileId": "abdJ5/jGlPzq+iDQghzEti", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/89/898c2010-408b-4389-8788-f8a7c4d9c4a1.json b/library/imports/89/898c2010-408b-4389-8788-f8a7c4d9c4a1.json new file mode 100644 index 0000000..a6aec6f --- /dev/null +++ b/library/imports/89/898c2010-408b-4389-8788-f8a7c4d9c4a1.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "tip_Line", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1, + 857, + 67, + 16 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 67, + 16 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.json b/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.png b/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.png new file mode 100644 index 0000000..ff833c2 Binary files /dev/null and b/library/imports/8a/8a96b965-2dc0-4e03-aa90-3b79cb93b5b4.png differ diff --git a/library/imports/8c/8c5001fd-07ee-4a4b-a8a0-63e15195e94d.json b/library/imports/8c/8c5001fd-07ee-4a4b-a8a0-63e15195e94d.json new file mode 100644 index 0000000..6236241 --- /dev/null +++ b/library/imports/8c/8c5001fd-07ee-4a4b-a8a0-63e15195e94d.json @@ -0,0 +1,100 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "webview", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "webview", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 300, + "height": 200 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 55, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.WebView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_useOriginalSize": false, + "_url": "", + "webviewEvents": [], + "_id": "12QHFUfdhF+4w/zU5gB7ZI" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "8c5001fd-07ee-4a4b-a8a0-63e15195e94d" + }, + "fileId": "2fb356PwclC8L2CbHhqGUVr", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/8c/8cdb44ac-a3f6-449f-b354-7cd48cf84061.json b/library/imports/8c/8cdb44ac-a3f6-449f-b354-7cd48cf84061.json new file mode 100644 index 0000000..1a0da16 --- /dev/null +++ b/library/imports/8c/8cdb44ac-a3f6-449f-b354-7cd48cf84061.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_sprite", + "texture": "6e056173-d285-473c-b206-40a7fff5386e", + "atlas": "", + "rect": [ + 0, + 2, + 40, + 36 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/8c/8cf947ea-88e6-4326-a79d-4534335f4e32.json b/library/imports/8c/8cf947ea-88e6-4326-a79d-4534335f4e32.json new file mode 100644 index 0000000..d838cce --- /dev/null +++ b/library/imports/8c/8cf947ea-88e6-4326-a79d-4534335f4e32.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "needle", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1695, + 213, + 12, + 40 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 12, + 40 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/90/90004ad6-2f6d-40e1-93ef-b714375c6f06.json b/library/imports/90/90004ad6-2f6d-40e1-93ef-b714375c6f06.json new file mode 100644 index 0000000..398992c --- /dev/null +++ b/library/imports/90/90004ad6-2f6d-40e1-93ef-b714375c6f06.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_toggle_checkmark", + "texture": "73a0903d-d80e-4e3c-aa67-f999543c08f5", + "atlas": "", + "rect": [ + 4, + 5, + 20, + 18 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 28, + 28 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/92/9227615d-1b3f-416c-884d-e33612d57b2e.json b/library/imports/92/9227615d-1b3f-416c-884d-e33612d57b2e.json new file mode 100644 index 0000000..088002b --- /dev/null +++ b/library/imports/92/9227615d-1b3f-416c-884d-e33612d57b2e.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn_tip", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1047, + 464, + 501, + 85 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 501, + 85 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/92/92e33d3e-0c8a-4cd5-acc6-d0b74cde43d5.json b/library/imports/92/92e33d3e-0c8a-4cd5-acc6-d0b74cde43d5.json new file mode 100644 index 0000000..61d01af --- /dev/null +++ b/library/imports/92/92e33d3e-0c8a-4cd5-acc6-d0b74cde43d5.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_jingjie", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1, + 434, + 434 + ], + "offset": [ + -4, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.json b/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.json new file mode 100644 index 0000000..47f273c --- /dev/null +++ b/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "yes", + "_objFlags": 0, + "_native": ".mp3", + "duration": 0.624, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.mp3 b/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.mp3 new file mode 100644 index 0000000..4ded430 Binary files /dev/null and b/library/imports/92/92f37348-24a6-465c-b74a-0afda604dc3d.mp3 differ diff --git a/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.jpg b/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.jpg new file mode 100644 index 0000000..116d70f Binary files /dev/null and b/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.jpg differ diff --git a/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.json b/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.json new file mode 100644 index 0000000..9ddba82 --- /dev/null +++ b/library/imports/93/93b7d36e-73e3-4755-b932-ec0eb7407078.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "1,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/95/954fec8b-cd16-4bb9-a3b7-7719660e7558.json b/library/imports/95/954fec8b-cd16-4bb9-a3b7-7719660e7558.json new file mode 100644 index 0000000..a8f65d3 --- /dev/null +++ b/library/imports/95/954fec8b-cd16-4bb9-a3b7-7719660e7558.json @@ -0,0 +1,215 @@ +{ + "__type__": "cc.Model", + "_name": "primitives", + "_objFlags": 0, + "_native": "", + "_nodes": [ + { + "name": "RootNode", + "scale": [ + 1, + 1, + 1 + ], + "children": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 0, + 0, + 0, + 1 + ], + "path": "" + }, + { + "name": "capsule", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 0, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "capsule" + }, + { + "name": "plane", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 1, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "plane" + }, + { + "name": "cone", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 2, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + -0.707106828689575, + 0, + 0, + 0.707106709480286 + ], + "path": "cone" + }, + { + "name": "torus", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 3, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "torus" + }, + { + "name": "sphere", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 4, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "sphere" + }, + { + "name": "quad", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 5, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "quad" + }, + { + "name": "cylinder", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 6, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "cylinder" + }, + { + "name": "box", + "scale": [ + 100, + 100, + 100 + ], + "mesh": 7, + "parent": null, + "position": [ + 0, + 0, + 0 + ], + "quat": [ + 8.14603353660459e-8, + 0, + 0, + 1 + ], + "path": "box" + } + ], + "_precomputeJointMatrix": false +} \ No newline at end of file diff --git a/library/imports/96/96083d03-c332-4a3f-9386-d03e2d19e8ee.json b/library/imports/96/96083d03-c332-4a3f-9386-d03e2d19e8ee.json new file mode 100644 index 0000000..18f8c2c --- /dev/null +++ b/library/imports/96/96083d03-c332-4a3f-9386-d03e2d19e8ee.json @@ -0,0 +1,112 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "sprite", + "_objFlags": 0, + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Sprite", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_reorderChildDirty": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_spriteFrame": { + "__uuid__": "8cdb44ac-a3f6-449f-b354-7cd48cf84061" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_atlas": null + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": null, + "fileId": "d7118yAG5lKybkFOAh8koPL" + } +] \ No newline at end of file diff --git a/library/imports/97/972b9a4d-47ee-4c74-b5c3-61d8a69bc29f.json b/library/imports/97/972b9a4d-47ee-4c74-b5c3-61d8a69bc29f.json new file mode 100644 index 0000000..7f2be63 --- /dev/null +++ b/library/imports/97/972b9a4d-47ee-4c74-b5c3-61d8a69bc29f.json @@ -0,0 +1,421 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "button", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "button", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + } + ], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Label", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_useOriginalSize": false, + "_string": "button", + "_N$string": "button", + "_fontSize": 20, + "_lineHeight": 40, + "_enableWrapText": false, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "972b9a4d-47ee-4c74-b5c3-61d8a69bc29f" + }, + "fileId": "89ZOGI9GxIA7ukuWhMzutw", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 40, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "972b9a4d-47ee-4c74-b5c3-61d8a69bc29f" + }, + "fileId": "abgf9KGgdMsahHlBHOj/Jv", + "sync": false + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 2, + "transition": 2, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 230, + "g": 230, + "b": 230, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 120, + "g": 120, + "b": 120, + "a": 200 + }, + "_N$normalSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "_N$pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "_N$hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "_N$disabledSprite": { + "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + }, + "_N$target": { + "__id__": 2 + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "972b9a4d-47ee-4c74-b5c3-61d8a69bc29f" + }, + "fileId": "59d3ePxgxhP17q/bKZe2Mkj", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.json b/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.png b/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.png new file mode 100644 index 0000000..72def9a Binary files /dev/null and b/library/imports/99/99170b0b-d210-46f1-b213-7d9e3f23098a.png differ diff --git a/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.json b/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.png b/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.png new file mode 100644 index 0000000..0537a85 Binary files /dev/null and b/library/imports/9a/9a849051-bf1c-4d07-aaef-0994c636ed81.png differ diff --git a/library/imports/9b/9b794c5b-0c52-4264-a891-fe6a85f8cebd.json b/library/imports/9b/9b794c5b-0c52-4264-a891-fe6a85f8cebd.json new file mode 100644 index 0000000..7d585b8 --- /dev/null +++ b/library/imports/9b/9b794c5b-0c52-4264-a891-fe6a85f8cebd.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "againBtn", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1550, + 607, + 156, + 38 + ], + "offset": [ + 0, + 1 + ], + "originalSize": [ + 458, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/9b/9bbda31e-ad49-43c9-aaf2-f7d9896bac69.json b/library/imports/9b/9bbda31e-ad49-43c9-aaf2-f7d9896bac69.json new file mode 100644 index 0000000..8a1a2e0 --- /dev/null +++ b/library/imports/9b/9bbda31e-ad49-43c9-aaf2-f7d9896bac69.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_panel", + "texture": "d81ec8ad-247c-4e62-aa3c-d35c4193c7af", + "atlas": "", + "rect": [ + 0, + 0, + 20, + 20 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 20, + 20 + ], + "capInsets": [ + 6, + 6, + 6, + 6 + ] + } +} \ No newline at end of file diff --git a/library/imports/9c/9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d.json b/library/imports/9c/9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d.json new file mode 100644 index 0000000..a8dbb9f --- /dev/null +++ b/library/imports/9c/9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d.json @@ -0,0 +1,1374 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "LoadScene", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + }, + "asyncLoadAssets": false + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 4 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": true, + "_id": "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d" + }, + { + "__type__": "cc.Node", + "_name": "GameData", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1voegXqFG7pcNFtBwd4RM" + }, + { + "__type__": "58403/n16JCa5sZhNMjZzGo", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "audioGameBgm0": null, + "baishao_audio": { + "__uuid__": "47388b59-bca9-4607-bdc1-1fc7ba079a12" + }, + "cha_audio": { + "__uuid__": "b1a7d924-b756-4abd-9de4-f913e76d7ba6" + }, + "chixiaodou_audio": { + "__uuid__": "16df01b7-75d9-47f2-96bf-23d29632af47" + }, + "danggui_audio": { + "__uuid__": "5f08c436-44f0-4802-bc19-0443972a105b" + }, + "danshen_audio": { + "__uuid__": "5325e681-09c2-4cdd-87f1-7b4d76247f14" + }, + "dazao_audio": { + "__uuid__": "e97e82df-44e2-4294-89fb-dadbf44bf622" + }, + "gancao_audio": { + "__uuid__": "c1fcf0fb-c572-4800-9848-1e78718fdabf" + }, + "ganjiang_audio": { + "__uuid__": "b3d0fc52-3960-42d1-869f-39121e912bdb" + }, + "gouqi_audio": { + "__uuid__": "589a92bd-21cc-43d4-8594-2e9c92930f13" + }, + "jingjie_audio": { + "__uuid__": "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293" + }, + "jinju_audio": { + "__uuid__": "ffdbc929-ffdb-46b7-a93e-29447856ca36" + }, + "lizhi_audio": { + "__uuid__": "ac2f83fb-1f9e-4d58-b043-bdcd25634e14" + }, + "lizi_audio": { + "__uuid__": "7a5029a4-6d49-4a15-a1bb-9faa9506e801" + }, + "longyan_audio": { + "__uuid__": "03f3670c-b2e3-44dc-a718-35d83b45a100" + }, + "moli_audio": { + "__uuid__": "ebf27f93-6c3b-44cd-b228-944b77435936" + }, + "muchai_audio": { + "__uuid__": "434c4832-eab0-46c1-a1ef-baa5316386b4" + }, + "mudan_audio": { + "__uuid__": "c2b82d71-e775-43c4-9ba6-650d7ac46c31" + }, + "mulan_audio": { + "__uuid__": "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4" + }, + "pugongying_audio": { + "__uuid__": "b313152c-a590-406a-90f6-e78ca8cf99fa" + }, + "putao_audio": { + "__uuid__": "b31b447b-2c35-46ea-bb6c-84952055fae8" + }, + "renshen_audio": { + "__uuid__": "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea" + }, + "taozi_audio": { + "__uuid__": "4fb5e673-7017-4a1a-bf48-92250446042d" + }, + "zhuye_audio": { + "__uuid__": "9c9e6c09-6653-44b7-8a72-9eddc54c2425" + }, + "err": { + "__uuid__": "1a1f7dc6-de93-494d-b7be-fe9203b41dc0" + }, + "yes": { + "__uuid__": "92f37348-24a6-465c-b74a-0afda604dc3d" + }, + "_id": "c9svoY3rpPjLRVujzjU/12" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 10 + }, + { + "__id__": 14 + }, + { + "__id__": 20 + }, + { + "__id__": 23 + } + ], + "_active": true, + "_components": [ + { + "__id__": 26 + }, + { + "__id__": 27 + }, + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "5c9b8FZiaNLMrMDs9T3rByf", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_id": "82rBHh8bJIGKuGw03a3Yrd" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1660 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "7cv8DMoeFED6gtfpegKnY4" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "f6cdf53a-8de8-42da-bea3-581b1a681360" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "8azQQNX+VG8axnhJX+MOSM" + }, + { + "__type__": "cc.Node", + "_name": "New Sprite", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 654, + "height": 93 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -297.404, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "fbUHhjpABG74DdpeYzdl/2" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "57e85453-6997-4242-babb-705697538e98" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": { + "__uuid__": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3" + }, + "_id": "52EGND0ndDGotGRX4hdp75" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 13 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 10 + }, + "_id": "5fQ0XX+HFAlq0Hihrzp10i" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 4 + }, + "component": "", + "_componentId": "454adgphRpA6oq5lB6Cg1fK", + "handler": "startGame", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "Rank", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [ + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 234, + "g": 0, + "b": 0, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 126, + "height": 140 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 279.513, + -564.202, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e7rE7SX3NEO4r7RpytIx+t" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + }, + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 126, + "height": 140 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bb+DPySjNLhZcxUUphVuRh" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "ed354adc-1faf-4daa-b3de-776c0499090a" + }, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "e3tnncQgtFn49iTBzwCpMN" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 100, + "_originalHeight": 40, + "_id": "3b6aA5QpdJN5tCMv9rwDLJ" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 19 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 230, + "g": 230, + "b": 230, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 200, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 120, + "g": 120, + "b": 120, + "a": 200 + }, + "_N$normalSprite": null, + "_N$pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "pressedSprite": { + "__uuid__": "e9ec654c-97a2-4787-9325-e6a10375219a" + }, + "_N$hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "hoverSprite": { + "__uuid__": "f0048c10-f03e-4c97-b9d3-3506e1d58952" + }, + "_N$disabledSprite": { + "__uuid__": "29158224-f8dd-4661-a796-1ffab537140e" + }, + "_N$target": { + "__id__": 15 + }, + "_id": "79F7b/WB5F2JOMTqOD3Wq1" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 4 + }, + "component": "", + "_componentId": "454adgphRpA6oq5lB6Cg1fK", + "handler": "openRank", + "customEventData": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + }, + { + "__id__": 22 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66.72, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 337.463, + -646.72, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "27YGKHGM1I5Y41cMXxZ0rs" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "0.0.0", + "_N$string": "0.0.0", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "1covBYbbRHJqGD17ZsJC+d" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 4.176999999999964, + "_top": 0, + "_bottom": 1.3799999999999955, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "6cDomcvMdDrae8KzaaoZg5" + }, + { + "__type__": "cc.Node", + "_name": "version", + "_objFlags": 0, + "_parent": { + "__id__": 4 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + }, + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98.33, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 251.592, + -645.818, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "bdRIfCxsZBpLpMK3p5LzXO" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "版本号:", + "_N$string": "版本号:", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "25U7z7AG5OR5kWiQhll6Z2" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 74.243, + "_top": 0, + "_bottom": 2.282000000000039, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "b9dR0vgWtBPbilfwsIX0Gk" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": true, + "_fitHeight": false, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + }, + { + "__type__": "454adgphRpA6oq5lB6Cg1fK", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "localTest": false, + "clientTestVersion": "1.1.3", + "testVersion": { + "__id__": 21 + }, + "_id": "50zCP3Mq9MKIKjMbohPY8j" + }, + { + "__type__": "58403/n16JCa5sZhNMjZzGo", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 4 + }, + "_enabled": true, + "audioGameBgm0": { + "__uuid__": "bef46737-c323-42ea-9ea7-7dc780b882b7" + }, + "baishao_audio": { + "__uuid__": "47388b59-bca9-4607-bdc1-1fc7ba079a12" + }, + "cha_audio": { + "__uuid__": "b1a7d924-b756-4abd-9de4-f913e76d7ba6" + }, + "chixiaodou_audio": { + "__uuid__": "16df01b7-75d9-47f2-96bf-23d29632af47" + }, + "danggui_audio": { + "__uuid__": "5f08c436-44f0-4802-bc19-0443972a105b" + }, + "danshen_audio": { + "__uuid__": "5325e681-09c2-4cdd-87f1-7b4d76247f14" + }, + "dazao_audio": { + "__uuid__": "e97e82df-44e2-4294-89fb-dadbf44bf622" + }, + "gancao_audio": { + "__uuid__": "c1fcf0fb-c572-4800-9848-1e78718fdabf" + }, + "ganjiang_audio": { + "__uuid__": "b3d0fc52-3960-42d1-869f-39121e912bdb" + }, + "gouqi_audio": { + "__uuid__": "589a92bd-21cc-43d4-8594-2e9c92930f13" + }, + "jingjie_audio": { + "__uuid__": "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293" + }, + "jinju_audio": { + "__uuid__": "ffdbc929-ffdb-46b7-a93e-29447856ca36" + }, + "lizhi_audio": { + "__uuid__": "ac2f83fb-1f9e-4d58-b043-bdcd25634e14" + }, + "lizi_audio": { + "__uuid__": "7a5029a4-6d49-4a15-a1bb-9faa9506e801" + }, + "longyan_audio": { + "__uuid__": "03f3670c-b2e3-44dc-a718-35d83b45a100" + }, + "moli_audio": { + "__uuid__": "ebf27f93-6c3b-44cd-b228-944b77435936" + }, + "muchai_audio": { + "__uuid__": "434c4832-eab0-46c1-a1ef-baa5316386b4" + }, + "mudan_audio": { + "__uuid__": "c2b82d71-e775-43c4-9ba6-650d7ac46c31" + }, + "mulan_audio": { + "__uuid__": "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4" + }, + "pugongying_audio": { + "__uuid__": "b313152c-a590-406a-90f6-e78ca8cf99fa" + }, + "putao_audio": { + "__uuid__": "b31b447b-2c35-46ea-bb6c-84952055fae8" + }, + "renshen_audio": { + "__uuid__": "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea" + }, + "taozi_audio": { + "__uuid__": "4fb5e673-7017-4a1a-bf48-92250446042d" + }, + "zhuye_audio": { + "__uuid__": "9c9e6c09-6653-44b7-8a72-9eddc54c2425" + }, + "err": { + "__uuid__": "1a1f7dc6-de93-494d-b7be-fe9203b41dc0" + }, + "yes": { + "__uuid__": "92f37348-24a6-465c-b74a-0afda604dc3d" + }, + "_id": "c78uwvSdFH7oUk6WRJFjFe" + } +] \ No newline at end of file diff --git a/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.json b/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.json new file mode 100644 index 0000000..09574b0 --- /dev/null +++ b/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "zhuye_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.515102, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.mp3 b/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.mp3 new file mode 100644 index 0000000..fcd94bc Binary files /dev/null and b/library/imports/9c/9c9e6c09-6653-44b7-8a72-9eddc54c2425.mp3 differ diff --git a/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.json b/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.png b/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.png new file mode 100644 index 0000000..4f42da0 Binary files /dev/null and b/library/imports/9d/9d60001f-b5f4-4726-a629-2659e3ded0b8.png differ diff --git a/library/imports/a1/a152c3fc-1a82-4ac3-bfbc-6a9af534d570.json b/library/imports/a1/a152c3fc-1a82-4ac3-bfbc-6a9af534d570.json new file mode 100644 index 0000000..e2cb7ae --- /dev/null +++ b/library/imports/a1/a152c3fc-1a82-4ac3-bfbc-6a9af534d570.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_lizi", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1, + 434, + 434 + ], + "offset": [ + -4, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a1/a153945d-2511-4c14-be7b-05d242f47d57.json b/library/imports/a1/a153945d-2511-4c14-be7b-05d242f47d57.json new file mode 100644 index 0000000..332d844 --- /dev/null +++ b/library/imports/a1/a153945d-2511-4c14-be7b-05d242f47d57.json @@ -0,0 +1,15 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-graphics", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "30682f87-9f0d-4f17-8a44-72863791461b" + }, + "_techniqueIndex": 0, + "_techniqueData": { + "0": { + "defines": {} + } + } +} \ No newline at end of file diff --git a/library/imports/a1/a1c18cea-6961-4a68-84d0-8a59528bb0dd.json b/library/imports/a1/a1c18cea-6961-4a68-84d0-8a59528bb0dd.json new file mode 100644 index 0000000..f2c122a --- /dev/null +++ b/library/imports/a1/a1c18cea-6961-4a68-84d0-8a59528bb0dd.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_mudan", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1, + 434, + 434 + ], + "offset": [ + -4, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.bin b/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.bin new file mode 100644 index 0000000..d38e13f Binary files /dev/null and b/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.bin differ diff --git a/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.json b/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.json new file mode 100644 index 0000000..aefb61b --- /dev/null +++ b/library/imports/a1/a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -5, + "y": 0, + "z": -5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 5, + "y": 0, + "z": 5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 121 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 3872 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 3872, + "length": 1200 + } +] \ No newline at end of file diff --git a/library/imports/a2/a23235d1-15db-4b95-8439-a2e005bfff91.json b/library/imports/a2/a23235d1-15db-4b95-8439-a2e005bfff91.json new file mode 100644 index 0000000..1b02fdd --- /dev/null +++ b/library/imports/a2/a23235d1-15db-4b95-8439-a2e005bfff91.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_sprite_splash", + "texture": "0275e94c-56a7-410f-bd1a-fc7483f7d14a", + "atlas": "", + "rect": [ + 0, + 0, + 2, + 2 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 2, + 2 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a2/a264c8df-80f6-474f-9fe5-28b7ae529d95.json b/library/imports/a2/a264c8df-80f6-474f-9fe5-28b7ae529d95.json new file mode 100644 index 0000000..a459921 --- /dev/null +++ b/library/imports/a2/a264c8df-80f6-474f-9fe5-28b7ae529d95.json @@ -0,0 +1,1364 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "RankListItem", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 14 + }, + { + "__id__": 25 + }, + { + "__id__": 28 + }, + { + "__id__": 31 + }, + { + "__id__": 34 + } + ], + "_active": true, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 38 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -100, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 9 + } + ], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 11 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 15 + }, + { + "__id__": 18 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 24 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 17 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 20 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 14 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 27 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 28 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 32 + } + ], + "_prefab": { + "__id__": 33 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 31 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "测试", + "_N$string": "测试", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 35 + } + ], + "_prefab": { + "__id__": 36 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 34 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "78MlwwIH1CYrPsut4N5MBU", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/a3/a332f672-0dc8-4637-8bef-31bec33425bc.json b/library/imports/a3/a332f672-0dc8-4637-8bef-31bec33425bc.json new file mode 100644 index 0000000..b8c085a --- /dev/null +++ b/library/imports/a3/a332f672-0dc8-4637-8bef-31bec33425bc.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_zhuye", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1267, + 429, + 432, + 388 + ], + "offset": [ + -4, + 4 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a3/a390474d-52da-4752-9fb1-ca5cd89c3f65.json b/library/imports/a3/a390474d-52da-4752-9fb1-ca5cd89c3f65.json new file mode 100644 index 0000000..861a0eb --- /dev/null +++ b/library/imports/a3/a390474d-52da-4752-9fb1-ca5cd89c3f65.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn_err", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1077, + 290, + 501, + 85 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 501, + 85 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.bin b/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.bin new file mode 100644 index 0000000..743d7d2 Binary files /dev/null and b/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.bin differ diff --git a/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.json b/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.json new file mode 100644 index 0000000..2236ff8 --- /dev/null +++ b/library/imports/a5/a579b610-0aa7-4a8b-b36b-be34cc834dcc.json @@ -0,0 +1,7 @@ +{ + "__type__": "cc.BufferAsset", + "_name": "buffer", + "_objFlags": 0, + "_native": ".bin", + "buffer": null +} \ No newline at end of file diff --git a/library/imports/a5/a5849239-3ad3-41d1-8ab4-ae9fea11f97f.json b/library/imports/a5/a5849239-3ad3-41d1-8ab4-ae9fea11f97f.json new file mode 100644 index 0000000..8cd93af --- /dev/null +++ b/library/imports/a5/a5849239-3ad3-41d1-8ab4-ae9fea11f97f.json @@ -0,0 +1,24 @@ +{ + "__type__": "cc.Material", + "_name": "", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "abc2cb62-7852-4525-a90d-d474487b88f2" + }, + "_techniqueIndex": 0, + "_techniqueData": { + "0": { + "props": { + "diffuseColor": { + "__type__": "cc.Color", + "r": 127, + "g": 127, + "b": 127, + "a": 255 + } + }, + "defines": {} + } + } +} \ No newline at end of file diff --git a/library/imports/a6/a67083f3-132b-4dc7-963c-af204012cd97.json b/library/imports/a6/a67083f3-132b-4dc7-963c-af204012cd97.json new file mode 100644 index 0000000..961edd4 --- /dev/null +++ b/library/imports/a6/a67083f3-132b-4dc7-963c-af204012cd97.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire7", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1520, + 785, + 108, + 64 + ], + "offset": [ + -1, + -13 + ], + "originalSize": [ + 152, + 90 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.json b/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.png b/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/library/imports/a8/a8027877-d8d6-4645-97a0-52d4a0123dba.png differ diff --git a/library/imports/a8/a87cc147-01b2-43f8-8e42-a7ca90b0c757.json b/library/imports/a8/a87cc147-01b2-43f8-8e42-a7ca90b0c757.json new file mode 100644 index 0000000..0a667ca --- /dev/null +++ b/library/imports/a8/a87cc147-01b2-43f8-8e42-a7ca90b0c757.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "box", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "box", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "046f172c-1574-488b-bbb8-6415a9adb96d" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "a87cc147-01b2-43f8-8e42-a7ca90b0c757" + }, + "fileId": "04A14e1BZJxrPk6zgr35H5", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/ab/ab2fdde9-10c2-44e4-bfe1-fcfcc1a86aa9.json b/library/imports/ab/ab2fdde9-10c2-44e4-bfe1-fcfcc1a86aa9.json new file mode 100644 index 0000000..0c73930 --- /dev/null +++ b/library/imports/ab/ab2fdde9-10c2-44e4-bfe1-fcfcc1a86aa9.json @@ -0,0 +1,884 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "primitives", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": true + }, + { + "__type__": "cc.Node", + "_name": "RootNode", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 11 + }, + { + "__id__": 14 + }, + { + "__id__": 17 + }, + { + "__id__": 20 + }, + { + "__id__": 23 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 26 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "capsule", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "83f5eff8-3385-4f95-9b76-8da0aa1d96cd" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "capsule", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "plane", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "a1ef2fc9-9c57-418a-8f69-6bed9a7a0e7f" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "plane", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "cone", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + -0.7071068286895765, + 0, + 0, + 0.7071067336835153, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": -90.00000769819565, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "7a17de6e-227a-46b1-8009-e7157d4d3acf" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cone", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "torus", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "14c74869-bdb4-4f57-86d8-a7875de2be30" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "torus", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "sphere", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 15 + } + ], + "_prefab": { + "__id__": 16 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 14 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "3bbdb0f6-c5f6-45de-9f33-8b5cbafb4d6d" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "sphere", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "quad", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 17 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "e93d3fa9-8c21-4375-8a21-14ba84066c77" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "quad", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "cylinder", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 22 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "b430cea3-6ab3-4106-b073-26c698918edd" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "cylinder", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "box", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 24 + } + ], + "_prefab": { + "__id__": 25 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 8.146033536604618e-8, + 0, + 0, + 0.9999999999999967, + 100, + 100, + 100 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0.000009334666828389458, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "046f172c-1574-488b-bbb8-6415a9adb96d" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "box", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/ab/abc2cb62-7852-4525-a90d-d474487b88f2.json b/library/imports/ab/abc2cb62-7852-4525-a90d-d474487b88f2.json new file mode 100644 index 0000000..3aa4a40 --- /dev/null +++ b/library/imports/ab/abc2cb62-7852-4525-a90d-d474487b88f2.json @@ -0,0 +1,653 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-phong", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "name": "phong", + "rasterizerState": { + "cullMode": 1029 + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": true + }, + "properties": { + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "mainTiling": { + "value": [ + 1, + 1 + ], + "type": 14 + }, + "mainOffset": { + "value": [ + 0, + 0 + ], + "type": 14 + }, + "diffuseColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "diffuseTexture": { + "value": "white", + "type": 29 + }, + "specularColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "specularTexture": { + "value": "white", + "type": 29 + }, + "emissiveColor": { + "value": [ + 0, + 0, + 0, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "emissiveTexture": { + "value": "white", + "type": 29 + }, + "glossiness": { + "value": [ + 10 + ], + "type": 13 + }, + "normalTexture": { + "value": "white", + "type": 29 + } + }, + "program": "builtin-phong|phong-vs|phong-fs" + }, + { + "name": "shadowcast", + "stage": "shadowcast", + "rasterizerState": { + "cullMode": 1029 + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": true + }, + "program": "builtin-phong|shadow-map-vs|shadow-map-fs" + } + ] + } + ], + "shaders": [ + { + "hash": 3560892936, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform CC_SHADOW {\n mat4 cc_shadow_lightViewProjMatrix[2];\n vec4 cc_shadow_info[2];\n };\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nvoid CCShadowInput (vec3 worldPos) {\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n for (int i = 0; i < CC_NUM_SHADOW_LIGHTS; i++) {\n v_posLightSpace[i] = cc_shadow_lightViewProjMatrix[i] * vec4(worldPos, 1.0);\n v_depth[i] = (v_posLightSpace[i].z + cc_shadow_info[i].x) / (cc_shadow_info[i].x + cc_shadow_info[i].y);\n }\n #endif\n}\nuniform MAIN_TILING {\n vec2 mainTiling;\n vec2 mainOffset;\n};\n#if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || USE_EMISSIVE_TEXTURE || USE_SPECULAR_TEXTURE || USE_NORMAL_TEXTURE)\n out mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n out lowp vec4 v_color;\n#endif\n#if USE_NORMAL_TEXTURE\n out vec3 v_tangent;\n out vec3 v_bitangent;\n#endif\nout vec3 v_worldNormal;\nout vec3 v_worldPos;\nout vec3 v_viewDirection;\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n vec4 position = In.position;\n v_worldNormal = normalize((cc_matWorldIT * vec4(In.normal, 0)).xyz);\n v_worldPos = (cc_matWorld * position).xyz;\n v_viewDirection = normalize(cc_cameraPos.xyz - v_worldPos);\n #if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || USE_EMISSIVE_TEXTURE || USE_SPECULAR_TEXTURE || USE_NORMAL_TEXTURE)\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if USE_NORMAL_TEXTURE\n v_tangent = normalize((cc_matWorld * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_worldNormal, v_tangent) * In.tangent.w;\n #endif\n CCShadowInput(v_worldPos);\n gl_Position = cc_matViewProj * cc_matWorld * position;\n}", + "frag": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nuniform PhongFrag {\n lowp vec4 diffuseColor;\n lowp vec4 specularColor;\n lowp vec4 emissiveColor;\n float glossiness;\n};\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if USE_SPECULAR && USE_SPECULAR_TEXTURE\n uniform sampler2D specularTexture;\n#endif\n#if USE_EMISSIVE && USE_EMISSIVE_TEXTURE\n uniform sampler2D emissiveTexture;\n#endif\n#if USE_NORMAL_TEXTURE\n in vec3 v_tangent;\n in vec3 v_bitangent;\n uniform sampler2D normalTexture;\n#endif\nin vec3 v_worldNormal;\nin vec3 v_worldPos;\nin vec3 v_viewDirection;\n#if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || (USE_EMISSIVE && USE_EMISSIVE_TEXTURE) || (USE_SPECULAR && USE_SPECULAR_TEXTURE) || USE_NORMAL_TEXTURE)\n in mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n in lowp vec4 v_color;\n#endif\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform CC_SHADOW {\n mat4 cc_shadow_lightViewProjMatrix[2];\n vec4 cc_shadow_info[2];\n };\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nfloat unpackRGBAToDepth(vec4 color) {\n return dot(color, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 160581375.0));\n}\nfloat getDepth(sampler2D shadowMap, vec2 shadowUV) {\n return unpackRGBAToDepth(texture(shadowMap, shadowUV));\n}\nfloat computeFallOff(float shadow, vec2 coords, float frustumEdgeFalloff) {\n return shadow;\n}\nfloat shadowSimple(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness) {\n float closestDepth = getDepth(shadowMap, shadowUV);\n return currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n}\nfloat shadowPCF3X3(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -1; x <= 1; ++x) {\n for (int y = -1; y <= 1; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 9.0;\n return shadow;\n}\nfloat shadowPCF5X5(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -2; x <= 2; ++x) {\n for (int y = -2; y <= 2; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 25.0;\n return shadow;\n}\n#if CC_NUM_LIGHTS > 0\nuniform CCLIGHTS {\n vec4 cc_lightPositionAndRange[4];\n vec4 cc_lightDirection[4];\n vec4 cc_lightColor[4];\n};\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nLightInfo computeDirectionalLighting(\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n ret.lightDir = -normalize(lightDirection.xyz);\n ret.radiance = lightColor.rgb;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computePointLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n ret.lightDir = normalize(lightDir);\n ret.radiance = lightColor.rgb * attenuation;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computeSpotLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n lightDir = normalize(lightDir);\n float cosConeAngle = max(0., dot(lightDirection.xyz, -lightDir));\n cosConeAngle = cosConeAngle < lightDirection.w ? 0. : cosConeAngle;\n cosConeAngle = pow(cosConeAngle, lightColor.w);\n ret.lightDir = lightDir;\n ret.radiance = lightColor.rgb * attenuation * cosConeAngle;\n ret.lightColor = lightColor;\n return ret;\n}\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nstruct PhongSurface {\n vec3 diffuse;\n vec3 emissive;\n vec3 specular;\n float opacity;\n float glossiness;\n vec3 position;\n vec3 normal;\n vec3 viewDirection;\n};\nLighting brdf (PhongSurface s, LightInfo info) {\n Lighting result;\n float ndh = 0.0;\n vec3 halfDir = normalize(s.viewDirection + info.lightDir);\n float NdotH = max(0.0, dot(s.normal, halfDir));\n NdotH = pow(NdotH, max(1.0, s.glossiness * 128.0));\n result.diffuse = info.radiance * max(0.0, dot(s.normal, info.lightDir));\n result.specular = info.radiance * NdotH;\n return result;\n}\nvec4 composePhongShading (Lighting lighting, PhongSurface s) {\n vec4 o = vec4(0.0, 0.0, 0.0, 1.0);\n o.rgb = lighting.diffuse * s.diffuse;\n #if USE_EMISSIVE\n o.rgb += s.emissive;\n #endif\n #if USE_SPECULAR\n o.rgb += lighting.specular * s.specular;\n #endif\n o.a = s.opacity;\n return o;\n}\nvec3 ambient(PhongSurface s, vec4 ambientColor) {\n return s.diffuse * ambientColor.rgb;\n}\nvec4 CCPhongShading (in PhongSurface s) {\n Lighting result;\n result.diffuse = vec3(0, 0, 0);\n result.specular = vec3(0, 0, 0);\n #if CC_NUM_LIGHTS > 0\n #if CC_LIGHT_0_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[0]);\n #else\n LightInfo info0;\n #if CC_LIGHT_0_TYPE == 0\n info0 = computeDirectionalLighting(cc_lightDirection[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 1\n info0 = computePointLighting(s.position, cc_lightPositionAndRange[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 2\n info0 = computeSpotLighting(s.position, cc_lightPositionAndRange[0], cc_lightDirection[0], cc_lightColor[0]);\n #endif\n Lighting result0 = brdf(s, info0);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n float shadow_0 = 1.0;\n vec2 projCoords0 = v_posLightSpace[0].xy / v_posLightSpace[0].w;\n vec2 shadowUV0 = projCoords0 * 0.5 + vec2(0.5);\n if (shadowUV0.x >= 0.0 && shadowUV0.x <= 1.0 && shadowUV0.y >= 0.0 && shadowUV0.y <= 1.0) {\n float currentDepth0 = clamp(v_depth[0], 0.0, 1.0);\n #if CC_SHADOW_0_TYPE == 3\n shadow_0 = shadowPCF3X3(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #elif CC_SHADOW_0_TYPE == 4\n shadow_0 = shadowPCF5X5(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #else\n shadow_0 = shadowSimple(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w);\n #endif\n shadow_0 = computeFallOff(shadow_0, projCoords0, 0.0);\n }\n result0.diffuse *= shadow_0;\n result0.specular *= shadow_0;\n #endif\n result.diffuse += result0.diffuse;\n result.specular += result0.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 1\n #if CC_LIGHT_1_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[1]);\n #else\n LightInfo info1;\n #if CC_LIGHT_1_TYPE == 0\n info1 = computeDirectionalLighting(cc_lightDirection[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 1\n info1 = computePointLighting(s.position, cc_lightPositionAndRange[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 2\n info1 = computeSpotLighting(s.position, cc_lightPositionAndRange[1], cc_lightDirection[1], cc_lightColor[1]);\n #endif\n Lighting result1 = brdf(s, info1);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 1\n float shadow_1 = 1.0;\n vec2 projCoords1 = v_posLightSpace[1].xy / v_posLightSpace[1].w;\n vec2 shadowUV1 = projCoords1 * 0.5 + vec2(0.5);\n if (shadowUV1.x >= 0.0 && shadowUV1.x <= 1.0 && shadowUV1.y >= 0.0 && shadowUV1.y <= 1.0) {\n float currentDepth1 = clamp(v_depth[1], 0.0, 1.0);\n #if CC_SHADOW_1_TYPE == 3\n shadow_1 = shadowPCF3X3(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #elif CC_SHADOW_1_TYPE == 4\n shadow_1 = shadowPCF5X5(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #else\n shadow_1 = shadowSimple(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w);\n #endif\n shadow_1 = computeFallOff(shadow_1, projCoords1, 0.0);\n }\n result1.diffuse *= shadow_1;\n result1.specular *= shadow_1;\n #endif\n result.diffuse += result1.diffuse;\n result.specular += result1.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 2\n #if CC_LIGHT_2_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[2]);\n #else\n LightInfo info2;\n #if CC_LIGHT_2_TYPE == 0\n info2 = computeDirectionalLighting(cc_lightDirection[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 1\n info2 = computePointLighting(s.position, cc_lightPositionAndRange[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 2\n info2 = computeSpotLighting(s.position, cc_lightPositionAndRange[2], cc_lightDirection[2], cc_lightColor[2]);\n #endif\n Lighting result2 = brdf(s, info2);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 2\n float shadow_2 = 1.0;\n vec2 projCoords2 = v_posLightSpace[2].xy / v_posLightSpace[2].w;\n vec2 shadowUV2 = projCoords2 * 0.5 + vec2(0.5);\n if (shadowUV2.x >= 0.0 && shadowUV2.x <= 1.0 && shadowUV2.y >= 0.0 && shadowUV2.y <= 1.0) {\n float currentDepth2 = clamp(v_depth[2], 0.0, 1.0);\n #if CC_SHADOW_2_TYPE == 3\n shadow_2 = shadowPCF3X3(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #elif CC_SHADOW_2_TYPE == 4\n shadow_2 = shadowPCF5X5(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #else\n shadow_2 = shadowSimple(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w);\n #endif\n shadow_2 = computeFallOff(shadow_2, projCoords2, 0.0);\n }\n result2.diffuse *= shadow_2;\n result2.specular *= shadow_2;\n #endif\n result.diffuse += result2.diffuse;\n result.specular += result2.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 3\n #if CC_LIGHT_3_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[3]);\n #else\n LightInfo info3;\n #if CC_LIGHT_3_TYPE == 0\n info3 = computeDirectionalLighting(cc_lightDirection[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 1\n info3 = computePointLighting(s.position, cc_lightPositionAndRange[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 2\n info3 = computeSpotLighting(s.position, cc_lightPositionAndRange[3], cc_lightDirection[3], cc_lightColor[3]);\n #endif\n Lighting result3 = brdf(s, info3);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 3\n float shadow_3 = 1.0;\n vec2 projCoords3 = v_posLightSpace[3].xy / v_posLightSpace[3].w;\n vec2 shadowUV3 = projCoords3 * 0.5 + vec2(0.5);\n if (shadowUV3.x >= 0.0 && shadowUV3.x <= 1.0 && shadowUV3.y >= 0.0 && shadowUV3.y <= 1.0) {\n float currentDepth3 = clamp(v_depth[3], 0.0, 1.0);\n #if CC_SHADOW_3_TYPE == 3\n shadow_3 = shadowPCF3X3(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #elif CC_SHADOW_3_TYPE == 4\n shadow_3 = shadowPCF5X5(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #else\n shadow_3 = shadowSimple(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w);\n #endif\n shadow_3 = computeFallOff(shadow_3, projCoords3, 0.0);\n }\n result3.diffuse *= shadow_3;\n result3.specular *= shadow_3;\n #endif\n result.diffuse += result3.diffuse;\n result.specular += result3.specular;\n #endif\n #endif\n return composePhongShading(result, s);\n}\nvoid surf (out PhongSurface s) {\n vec4 diffuse = vec4(1, 1, 1, 1);\n #if CC_USE_ATTRIBUTE_COLOR\n diffuse *= v_color;\n #endif\n diffuse *= diffuseColor;\n #if USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n diffuse.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n diffuse.a *= diffuseTexture_tmp.a;\n #else\n diffuse *= diffuseTexture_tmp;\n #endif\n #endif\n ALPHA_TEST(diffuse);\n s.diffuse = diffuse.rgb;\n s.opacity = diffuse.a;\n #if USE_EMISSIVE\n s.emissive = emissiveColor.rgb;\n #if USE_EMISSIVE_TEXTURE\n vec4 emissiveTexture_tmp = texture(emissiveTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_emissiveTexture\n emissiveTexture_tmp.a *= texture(emissiveTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.emissive.rgb *= (emissiveTexture_tmp.rgb * emissiveTexture_tmp.rgb);\n #else\n s.emissive.rgb *= emissiveTexture_tmp.rgb;\n #endif\n #endif\n #endif\n #if USE_SPECULAR\n s.specular = specularColor.rgb;\n #if USE_SPECULAR_TEXTURE\n vec4 specularTexture_tmp = texture(specularTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_specularTexture\n specularTexture_tmp.a *= texture(specularTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.specular.rgb *= (specularTexture_tmp.rgb * specularTexture_tmp.rgb);\n #else\n s.specular.rgb *= specularTexture_tmp.rgb;\n #endif\n #endif\n #endif\n s.normal = v_worldNormal;\n #if USE_NORMAL_TEXTURE\n vec3 nmmp = texture(normalTexture, v_uv0).xyz - vec3(0.5);\n s.normal =\n nmmp.x * normalize(v_tangent) +\n nmmp.y * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n s.normal = normalize(s.normal);\n #endif\n s.position = v_worldPos;\n s.viewDirection = v_viewDirection;\n s.glossiness = glossiness;\n}\nvoid main () {\n PhongSurface s;\n surf(s);\n vec4 color = CCPhongShading(s);\n gl_FragColor = CCFragOutput(color);\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matWorldIT;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform mat4 cc_shadow_lightViewProjMatrix[2];\nuniform vec4 cc_shadow_info[2];\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nvoid CCShadowInput (vec3 worldPos) {\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n for (int i = 0; i < CC_NUM_SHADOW_LIGHTS; i++) {\n v_posLightSpace[i] = cc_shadow_lightViewProjMatrix[i] * vec4(worldPos, 1.0);\n v_depth[i] = (v_posLightSpace[i].z + cc_shadow_info[i].x) / (cc_shadow_info[i].x + cc_shadow_info[i].y);\n }\n #endif\n}\nuniform vec2 mainTiling;\nuniform vec2 mainOffset;\n#if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || USE_EMISSIVE_TEXTURE || USE_SPECULAR_TEXTURE || USE_NORMAL_TEXTURE)\n varying mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\n#if USE_NORMAL_TEXTURE\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPos;\nvarying vec3 v_viewDirection;\nvoid main () {\n StandardVertInput In;\n CCVertInput(In);\n vec4 position = In.position;\n v_worldNormal = normalize((cc_matWorldIT * vec4(In.normal, 0)).xyz);\n v_worldPos = (cc_matWorld * position).xyz;\n v_viewDirection = normalize(cc_cameraPos.xyz - v_worldPos);\n #if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || USE_EMISSIVE_TEXTURE || USE_SPECULAR_TEXTURE || USE_NORMAL_TEXTURE)\n v_uv0 = In.uv * mainTiling + mainOffset;\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n v_color = In.color;\n #endif\n #if USE_NORMAL_TEXTURE\n v_tangent = normalize((cc_matWorld * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_worldNormal, v_tangent) * In.tangent.w;\n #endif\n CCShadowInput(v_worldPos);\n gl_Position = cc_matViewProj * cc_matWorld * position;\n}", + "frag": "\nprecision highp float;\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nuniform lowp vec4 diffuseColor;\nuniform lowp vec4 specularColor;\nuniform lowp vec4 emissiveColor;\nuniform float glossiness;\n#if USE_DIFFUSE_TEXTURE\n uniform sampler2D diffuseTexture;\n#endif\n#if USE_SPECULAR && USE_SPECULAR_TEXTURE\n uniform sampler2D specularTexture;\n#endif\n#if USE_EMISSIVE && USE_EMISSIVE_TEXTURE\n uniform sampler2D emissiveTexture;\n#endif\n#if USE_NORMAL_TEXTURE\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n uniform sampler2D normalTexture;\n#endif\nvarying vec3 v_worldNormal;\nvarying vec3 v_worldPos;\nvarying vec3 v_viewDirection;\n#if CC_USE_ATTRIBUTE_UV0 && (USE_DIFFUSE_TEXTURE || (USE_EMISSIVE && USE_EMISSIVE_TEXTURE) || (USE_SPECULAR && USE_SPECULAR_TEXTURE) || USE_NORMAL_TEXTURE)\n varying mediump vec2 v_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\n varying lowp vec4 v_color;\n#endif\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform vec4 cc_shadow_info[2];\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nfloat unpackRGBAToDepth(vec4 color) {\n return dot(color, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 160581375.0));\n}\nfloat getDepth(sampler2D shadowMap, vec2 shadowUV) {\n return unpackRGBAToDepth(texture2D(shadowMap, shadowUV));\n}\nfloat computeFallOff(float shadow, vec2 coords, float frustumEdgeFalloff) {\n return shadow;\n}\nfloat shadowSimple(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness) {\n float closestDepth = getDepth(shadowMap, shadowUV);\n return currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n}\nfloat shadowPCF3X3(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -1; x <= 1; ++x) {\n for (int y = -1; y <= 1; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 9.0;\n return shadow;\n}\nfloat shadowPCF5X5(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -2; x <= 2; ++x) {\n for (int y = -2; y <= 2; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 25.0;\n return shadow;\n}\n#if CC_NUM_LIGHTS > 0\nuniform vec4 cc_lightPositionAndRange[4];\nuniform vec4 cc_lightDirection[4];\nuniform vec4 cc_lightColor[4];\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nLightInfo computeDirectionalLighting(\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n ret.lightDir = -normalize(lightDirection.xyz);\n ret.radiance = lightColor.rgb;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computePointLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n ret.lightDir = normalize(lightDir);\n ret.radiance = lightColor.rgb * attenuation;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computeSpotLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n lightDir = normalize(lightDir);\n float cosConeAngle = max(0., dot(lightDirection.xyz, -lightDir));\n cosConeAngle = cosConeAngle < lightDirection.w ? 0. : cosConeAngle;\n cosConeAngle = pow(cosConeAngle, lightColor.w);\n ret.lightDir = lightDir;\n ret.radiance = lightColor.rgb * attenuation * cosConeAngle;\n ret.lightColor = lightColor;\n return ret;\n}\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nstruct PhongSurface {\n vec3 diffuse;\n vec3 emissive;\n vec3 specular;\n float opacity;\n float glossiness;\n vec3 position;\n vec3 normal;\n vec3 viewDirection;\n};\nLighting brdf (PhongSurface s, LightInfo info) {\n Lighting result;\n float ndh = 0.0;\n vec3 halfDir = normalize(s.viewDirection + info.lightDir);\n float NdotH = max(0.0, dot(s.normal, halfDir));\n NdotH = pow(NdotH, max(1.0, s.glossiness * 128.0));\n result.diffuse = info.radiance * max(0.0, dot(s.normal, info.lightDir));\n result.specular = info.radiance * NdotH;\n return result;\n}\nvec4 composePhongShading (Lighting lighting, PhongSurface s) {\n vec4 o = vec4(0.0, 0.0, 0.0, 1.0);\n o.rgb = lighting.diffuse * s.diffuse;\n #if USE_EMISSIVE\n o.rgb += s.emissive;\n #endif\n #if USE_SPECULAR\n o.rgb += lighting.specular * s.specular;\n #endif\n o.a = s.opacity;\n return o;\n}\nvec3 ambient(PhongSurface s, vec4 ambientColor) {\n return s.diffuse * ambientColor.rgb;\n}\nvec4 CCPhongShading (in PhongSurface s) {\n Lighting result;\n result.diffuse = vec3(0, 0, 0);\n result.specular = vec3(0, 0, 0);\n #if CC_NUM_LIGHTS > 0\n #if CC_LIGHT_0_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[0]);\n #else\n LightInfo info0;\n #if CC_LIGHT_0_TYPE == 0\n info0 = computeDirectionalLighting(cc_lightDirection[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 1\n info0 = computePointLighting(s.position, cc_lightPositionAndRange[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 2\n info0 = computeSpotLighting(s.position, cc_lightPositionAndRange[0], cc_lightDirection[0], cc_lightColor[0]);\n #endif\n Lighting result0 = brdf(s, info0);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n float shadow_0 = 1.0;\n vec2 projCoords0 = v_posLightSpace[0].xy / v_posLightSpace[0].w;\n vec2 shadowUV0 = projCoords0 * 0.5 + vec2(0.5);\n if (shadowUV0.x >= 0.0 && shadowUV0.x <= 1.0 && shadowUV0.y >= 0.0 && shadowUV0.y <= 1.0) {\n float currentDepth0 = clamp(v_depth[0], 0.0, 1.0);\n #if CC_SHADOW_0_TYPE == 3\n shadow_0 = shadowPCF3X3(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #elif CC_SHADOW_0_TYPE == 4\n shadow_0 = shadowPCF5X5(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #else\n shadow_0 = shadowSimple(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w);\n #endif\n shadow_0 = computeFallOff(shadow_0, projCoords0, 0.0);\n }\n result0.diffuse *= shadow_0;\n result0.specular *= shadow_0;\n #endif\n result.diffuse += result0.diffuse;\n result.specular += result0.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 1\n #if CC_LIGHT_1_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[1]);\n #else\n LightInfo info1;\n #if CC_LIGHT_1_TYPE == 0\n info1 = computeDirectionalLighting(cc_lightDirection[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 1\n info1 = computePointLighting(s.position, cc_lightPositionAndRange[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 2\n info1 = computeSpotLighting(s.position, cc_lightPositionAndRange[1], cc_lightDirection[1], cc_lightColor[1]);\n #endif\n Lighting result1 = brdf(s, info1);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 1\n float shadow_1 = 1.0;\n vec2 projCoords1 = v_posLightSpace[1].xy / v_posLightSpace[1].w;\n vec2 shadowUV1 = projCoords1 * 0.5 + vec2(0.5);\n if (shadowUV1.x >= 0.0 && shadowUV1.x <= 1.0 && shadowUV1.y >= 0.0 && shadowUV1.y <= 1.0) {\n float currentDepth1 = clamp(v_depth[1], 0.0, 1.0);\n #if CC_SHADOW_1_TYPE == 3\n shadow_1 = shadowPCF3X3(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #elif CC_SHADOW_1_TYPE == 4\n shadow_1 = shadowPCF5X5(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #else\n shadow_1 = shadowSimple(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w);\n #endif\n shadow_1 = computeFallOff(shadow_1, projCoords1, 0.0);\n }\n result1.diffuse *= shadow_1;\n result1.specular *= shadow_1;\n #endif\n result.diffuse += result1.diffuse;\n result.specular += result1.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 2\n #if CC_LIGHT_2_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[2]);\n #else\n LightInfo info2;\n #if CC_LIGHT_2_TYPE == 0\n info2 = computeDirectionalLighting(cc_lightDirection[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 1\n info2 = computePointLighting(s.position, cc_lightPositionAndRange[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 2\n info2 = computeSpotLighting(s.position, cc_lightPositionAndRange[2], cc_lightDirection[2], cc_lightColor[2]);\n #endif\n Lighting result2 = brdf(s, info2);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 2\n float shadow_2 = 1.0;\n vec2 projCoords2 = v_posLightSpace[2].xy / v_posLightSpace[2].w;\n vec2 shadowUV2 = projCoords2 * 0.5 + vec2(0.5);\n if (shadowUV2.x >= 0.0 && shadowUV2.x <= 1.0 && shadowUV2.y >= 0.0 && shadowUV2.y <= 1.0) {\n float currentDepth2 = clamp(v_depth[2], 0.0, 1.0);\n #if CC_SHADOW_2_TYPE == 3\n shadow_2 = shadowPCF3X3(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #elif CC_SHADOW_2_TYPE == 4\n shadow_2 = shadowPCF5X5(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #else\n shadow_2 = shadowSimple(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w);\n #endif\n shadow_2 = computeFallOff(shadow_2, projCoords2, 0.0);\n }\n result2.diffuse *= shadow_2;\n result2.specular *= shadow_2;\n #endif\n result.diffuse += result2.diffuse;\n result.specular += result2.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 3\n #if CC_LIGHT_3_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[3]);\n #else\n LightInfo info3;\n #if CC_LIGHT_3_TYPE == 0\n info3 = computeDirectionalLighting(cc_lightDirection[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 1\n info3 = computePointLighting(s.position, cc_lightPositionAndRange[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 2\n info3 = computeSpotLighting(s.position, cc_lightPositionAndRange[3], cc_lightDirection[3], cc_lightColor[3]);\n #endif\n Lighting result3 = brdf(s, info3);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 3\n float shadow_3 = 1.0;\n vec2 projCoords3 = v_posLightSpace[3].xy / v_posLightSpace[3].w;\n vec2 shadowUV3 = projCoords3 * 0.5 + vec2(0.5);\n if (shadowUV3.x >= 0.0 && shadowUV3.x <= 1.0 && shadowUV3.y >= 0.0 && shadowUV3.y <= 1.0) {\n float currentDepth3 = clamp(v_depth[3], 0.0, 1.0);\n #if CC_SHADOW_3_TYPE == 3\n shadow_3 = shadowPCF3X3(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #elif CC_SHADOW_3_TYPE == 4\n shadow_3 = shadowPCF5X5(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #else\n shadow_3 = shadowSimple(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w);\n #endif\n shadow_3 = computeFallOff(shadow_3, projCoords3, 0.0);\n }\n result3.diffuse *= shadow_3;\n result3.specular *= shadow_3;\n #endif\n result.diffuse += result3.diffuse;\n result.specular += result3.specular;\n #endif\n #endif\n return composePhongShading(result, s);\n}\nvoid surf (out PhongSurface s) {\n vec4 diffuse = vec4(1, 1, 1, 1);\n #if CC_USE_ATTRIBUTE_COLOR\n diffuse *= v_color;\n #endif\n diffuse *= diffuseColor;\n #if USE_DIFFUSE_TEXTURE\n vec4 diffuseTexture_tmp = texture2D(diffuseTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_diffuseTexture\n diffuseTexture_tmp.a *= texture2D(diffuseTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n diffuse.rgb *= (diffuseTexture_tmp.rgb * diffuseTexture_tmp.rgb);\n diffuse.a *= diffuseTexture_tmp.a;\n #else\n diffuse *= diffuseTexture_tmp;\n #endif\n #endif\n ALPHA_TEST(diffuse);\n s.diffuse = diffuse.rgb;\n s.opacity = diffuse.a;\n #if USE_EMISSIVE\n s.emissive = emissiveColor.rgb;\n #if USE_EMISSIVE_TEXTURE\n vec4 emissiveTexture_tmp = texture2D(emissiveTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_emissiveTexture\n emissiveTexture_tmp.a *= texture2D(emissiveTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.emissive.rgb *= (emissiveTexture_tmp.rgb * emissiveTexture_tmp.rgb);\n #else\n s.emissive.rgb *= emissiveTexture_tmp.rgb;\n #endif\n #endif\n #endif\n #if USE_SPECULAR\n s.specular = specularColor.rgb;\n #if USE_SPECULAR_TEXTURE\n vec4 specularTexture_tmp = texture2D(specularTexture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_specularTexture\n specularTexture_tmp.a *= texture2D(specularTexture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.specular.rgb *= (specularTexture_tmp.rgb * specularTexture_tmp.rgb);\n #else\n s.specular.rgb *= specularTexture_tmp.rgb;\n #endif\n #endif\n #endif\n s.normal = v_worldNormal;\n #if USE_NORMAL_TEXTURE\n vec3 nmmp = texture2D(normalTexture, v_uv0).xyz - vec3(0.5);\n s.normal =\n nmmp.x * normalize(v_tangent) +\n nmmp.y * normalize(v_bitangent) +\n nmmp.z * normalize(s.normal);\n s.normal = normalize(s.normal);\n #endif\n s.position = v_worldPos;\n s.viewDirection = v_viewDirection;\n s.glossiness = glossiness;\n}\nvoid main () {\n PhongSurface s;\n surf(s);\n vec4 color = CCPhongShading(s);\n gl_FragColor = CCFragOutput(color);\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + }, + { + "name": "CC_SHADOW", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "CCLIGHTS", + "defines": [ + "CC_NUM_LIGHTS" + ] + } + ], + "samplers": [ + { + "name": "cc_shadow_map_0", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "cc_shadow_map_1", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + } + ] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_SKINNING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_JOINTS_TEXTRUE", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING" + ] + }, + { + "name": "CC_JOINTS_TEXTURE_FLOAT32", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ] + }, + { + "name": "CC_USE_ATTRIBUTE_UV0", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_COLOR", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_NORMAL", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_TANGENT", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_SHADOW_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_NUM_SHADOW_LIGHTS", + "type": "number", + "defines": [ + "CC_USE_SHADOW_MAP" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "USE_DIFFUSE_TEXTURE", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_NORMAL_TEXTURE", + "type": "boolean", + "defines": [] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_SPECULAR", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_SPECULAR_TEXTURE", + "type": "boolean", + "defines": [ + "USE_SPECULAR" + ] + }, + { + "name": "USE_EMISSIVE", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_EMISSIVE_TEXTURE", + "type": "boolean", + "defines": [ + "USE_EMISSIVE" + ] + }, + { + "name": "CC_NUM_LIGHTS", + "type": "number", + "defines": [], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_0_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_0_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_1_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_1_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_2_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_2_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_3_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_3_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_diffuseTexture", + "type": "boolean", + "defines": [ + "USE_DIFFUSE_TEXTURE" + ] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [ + "USE_DIFFUSE_TEXTURE" + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_emissiveTexture", + "type": "boolean", + "defines": [ + "USE_EMISSIVE", + "USE_EMISSIVE_TEXTURE" + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_specularTexture", + "type": "boolean", + "defines": [ + "USE_SPECULAR", + "USE_SPECULAR_TEXTURE" + ] + } + ], + "blocks": [ + { + "name": "SKINNING", + "members": [ + { + "name": "jointsTextureSize", + "type": 14, + "count": 1 + } + ], + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 0 + }, + { + "name": "JOINT_MATRIX", + "members": [ + { + "name": "jointMatrices", + "type": 26, + "count": 50 + } + ], + "defines": [ + "CC_USE_SKINNING" + ], + "binding": 1 + }, + { + "name": "MAIN_TILING", + "members": [ + { + "name": "mainTiling", + "type": 14, + "count": 1 + }, + { + "name": "mainOffset", + "type": 14, + "count": 1 + } + ], + "defines": [], + "binding": 2 + }, + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 3 + }, + { + "name": "PhongFrag", + "members": [ + { + "name": "diffuseColor", + "type": 16, + "count": 1 + }, + { + "name": "specularColor", + "type": 16, + "count": 1 + }, + { + "name": "emissiveColor", + "type": 16, + "count": 1 + }, + { + "name": "glossiness", + "type": 13, + "count": 1 + } + ], + "defines": [], + "binding": 4 + } + ], + "samplers": [ + { + "name": "jointsTexture", + "type": 29, + "count": 1, + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 30 + }, + { + "name": "diffuseTexture", + "type": 29, + "count": 1, + "defines": [ + "USE_DIFFUSE_TEXTURE" + ], + "binding": 31 + }, + { + "name": "specularTexture", + "type": 29, + "count": 1, + "defines": [ + "USE_SPECULAR", + "USE_SPECULAR_TEXTURE" + ], + "binding": 32 + }, + { + "name": "emissiveTexture", + "type": 29, + "count": 1, + "defines": [ + "USE_EMISSIVE", + "USE_EMISSIVE_TEXTURE" + ], + "binding": 33 + }, + { + "name": "normalTexture", + "type": 29, + "count": 1, + "defines": [ + "USE_NORMAL_TEXTURE" + ], + "binding": 34 + } + ], + "record": null, + "name": "builtin-phong|phong-vs|phong-fs" + }, + { + "hash": 1165371292, + "glsl3": { + "vert": "\nprecision highp float;\nin vec3 a_position;\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nuniform CC_SHADOW_MAP {\n mat4 cc_shadow_map_lightViewProjMatrix;\n vec4 cc_shadow_map_info;\n float cc_shadow_map_bias;\n};\nout float v_depth;\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nvoid SKIN_VERTEX(inout vec4 a1) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n #endif\n}\nvoid SKIN_VERTEX(inout vec4 a1, inout vec4 a2) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n a2 = m * a2;\n #endif\n}\nvoid SKIN_VERTEX(inout vec4 a1, inout vec4 a2, inout vec4 a3) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n a2 = m * a2;\n a3 = m * a3;\n #endif\n}\nvoid main () {\n vec4 position = vec4(a_position, 1);\n SKIN_VERTEX(position);\n gl_Position = cc_shadow_map_lightViewProjMatrix * cc_matWorld * position;\n v_depth = ((gl_Position.z + cc_shadow_map_info.x) / (cc_shadow_map_info.x + cc_shadow_map_info.y)) + cc_shadow_map_bias;\n}", + "frag": "\nprecision highp float;\nin float v_depth;\nvec4 packDepthToRGBA(float depth) {\n vec4 ret = vec4(1.0, 255.0, 65025.0, 160581375.0) * depth;\n ret = fract(ret);\n ret -= ret.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return ret;\n}\nvoid main () {\n gl_FragColor = packDepthToRGBA(v_depth);\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nattribute vec3 a_position;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_shadow_map_lightViewProjMatrix;\nuniform vec4 cc_shadow_map_info;\nuniform float cc_shadow_map_bias;\nvarying float v_depth;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nvoid SKIN_VERTEX(inout vec4 a1) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n #endif\n}\nvoid SKIN_VERTEX(inout vec4 a1, inout vec4 a2) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n a2 = m * a2;\n #endif\n}\nvoid SKIN_VERTEX(inout vec4 a1, inout vec4 a2, inout vec4 a3) {\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n a1 = m * a1;\n a2 = m * a2;\n a3 = m * a3;\n #endif\n}\nvoid main () {\n vec4 position = vec4(a_position, 1);\n SKIN_VERTEX(position);\n gl_Position = cc_shadow_map_lightViewProjMatrix * cc_matWorld * position;\n v_depth = ((gl_Position.z + cc_shadow_map_info.x) / (cc_shadow_map_info.x + cc_shadow_map_info.y)) + cc_shadow_map_bias;\n}", + "frag": "\nprecision highp float;\nvarying float v_depth;\nvec4 packDepthToRGBA(float depth) {\n vec4 ret = vec4(1.0, 255.0, 65025.0, 160581375.0) * depth;\n ret = fract(ret);\n ret -= ret.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return ret;\n}\nvoid main () {\n gl_FragColor = packDepthToRGBA(v_depth);\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CC_SHADOW_MAP", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_SKINNING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_JOINTS_TEXTRUE", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING" + ] + }, + { + "name": "CC_JOINTS_TEXTURE_FLOAT32", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ] + } + ], + "blocks": [ + { + "name": "SKINNING", + "members": [ + { + "name": "jointsTextureSize", + "type": 14, + "count": 1 + } + ], + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 0 + }, + { + "name": "JOINT_MATRIX", + "members": [ + { + "name": "jointMatrices", + "type": 26, + "count": 50 + } + ], + "defines": [ + "CC_USE_SKINNING" + ], + "binding": 1 + } + ], + "samplers": [ + { + "name": "jointsTexture", + "type": 29, + "count": 1, + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 30 + } + ], + "record": null, + "name": "builtin-phong|shadow-map-vs|shadow-map-fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.json b/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.json new file mode 100644 index 0000000..318d3c1 --- /dev/null +++ b/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "lizhi_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.mp3 b/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.mp3 new file mode 100644 index 0000000..915b09a Binary files /dev/null and b/library/imports/ac/ac2f83fb-1f9e-4d58-b043-bdcd25634e14.mp3 differ diff --git a/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.json b/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.png b/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.png new file mode 100644 index 0000000..12a44bc Binary files /dev/null and b/library/imports/ad/adfc2f90-f674-4b11-93a1-3485c1804903.png differ diff --git a/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js b/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js new file mode 100644 index 0000000..852a295 --- /dev/null +++ b/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js @@ -0,0 +1,374 @@ +"use strict"; +cc._RF.push(module, 'b0432BA295DjIOcuitdGKO1', 'GameManager'); +// Script/GameManager.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// 主游戏控制类 +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var GameManager = /** @class */ (function (_super) { + __extends(GameManager, _super); + function GameManager() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.Btn_New = null; + _this.Btn_Old = null; + _this.Plant = null; + _this.timeNode = null; + _this.FoodPlist = null; + return _this; + } + GameManager.prototype.onLoad = function () { + this.fit(); + this.init(); + this.startGame(); + }; + GameManager.prototype.start = function () { + }; + //处理地图 + GameManager.prototype.setMap = function () { + }; + //初始化数据 + GameManager.prototype.init = function () { + this.touchable = false; + this.result = -1; + this.foodAudioArray = []; + this.foodPicArray = []; + this.timeTween = null; + this.needleTween = null; + this.choice = 0; + cc.fx.GameConfig.GM_INFO.stepTimeList = 0; + cc.fx.GameConfig.GM_INFO.successList = []; + cc.fx.GameConfig.GM_INFO.level = 0; + this.voiceSpriteFrame = this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame; + this.btnReset(); + }; + //开始游戏 + GameManager.prototype.startGame = function () { + var _this = this; + cc.tween(this.node.getChildByName("Begin")) + .to(0.1, { opacity: 0 }) + .to(0.5, { opacity: 255 }) + .delay(1) + .to(0.5, { opacity: 0 }) + .call(function () { + _this.createCustom(); + }) + .start(); + }; + //根据是否全面屏,做独立适配方面 + GameManager.prototype.fit = function () { + var jg = cc.fx.GameTool.setFit(); + if (!jg) { + this.Btn_Old.y = -450; + this.Btn_New.y = -300; + } + }; + //创建关卡 + GameManager.prototype.createCustom = function () { + var _this = this; + this.choice = 0; + this.Plant.opacity = 0; + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.timeNode.getChildByName("needle").angle = 0; + if (cc.fx.GameConfig.GM_INFO.level >= cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom.length) { + setTimeout(function () { + cc.director.loadScene("OverScene"); + }, 1000); + return; + } + this.customData = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom[cc.fx.GameConfig.GM_INFO.level]; + var name = this.customData.item; + //埋点数据设置 + cc.fx.GameConfig.CLICK_SET("round", cc.fx.GameConfig.GM_INFO.level + 1); + cc.fx.GameConfig.CLICK_SET("levelConfig", (cc.fx.GameConfig.GM_INFO.custom + 1)); + cc.fx.GameConfig.CLICK_SET("item", name); + cc.fx.GameConfig.CLICK_SET("roundType", this.customData.type); + if (this.customData.type == 1) { + this.Plant.getChildByName("name").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name); + name = "prop_" + name; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.FoodPlist["_spriteFrames"][name]; + this.now_Food = name; + cc.tween(this.Plant) + .to(0.2, { opacity: 255 }) + .call(function () { + _this.startTimer(); + }) + .start(); + } + else { + this.Plant.getChildByName("name").getComponent(cc.Label).string = ""; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame; + var audioName = name + "_audio"; + name = "audio" + name; + this.now_Food = name; + cc.fx.AudioManager._instance.playEffect(audioName); + cc.tween(this.Plant) + .to(0.2, { opacity: 255 }) + .call(function () { + _this.startTimer(); + }) + .start(); + } + //关卡+1 + cc.fx.GameConfig.GM_INFO.level += 1; + }; + //开始转圈倒计时 + GameManager.prototype.startTimer = function () { + var _this = this; + this.startTime = cc.fx.GameTool.getTime(); + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + // if(this.containsNanana(this.now_Food) == true){ + // console.log("可以点火"); + // } + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.needleTween = + cc.tween(this.timeNode.getChildByName("needle")) + .to(8, { angle: -360 }) + .start(); + this.timeTween = + cc.tween(this.timeNode.getChildByName("time").getComponent(cc.Sprite)) + .to(8, { fillRange: 1 }) + .call(function () { + _this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + _this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + _this.click_Choice(null, null); + _this.timeTween = null; + }) + .start(); + }; + GameManager.prototype.containsNanana = function (str) { + return /muchai/i.test(str); + }; + //新植物按钮 + GameManager.prototype.click_Choice = function (customData, data) { + //关掉计时器 处理逻辑之前,先行关掉按钮开关 + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.timeTween.stop(); + this.timeTween = null; + this.needleTween.stop(); + this.needleTween = null; + //判断是否正确,并把出现的物品存入数组 + this.result = this.judgingResult(); + if (data == "Btn_New") { + if (this.result == -1) { + this.result = 1; + } + else { + this.result = -1; + } + } + var tempNode = null; + if (data != null) + tempNode = this[data]; + //设置按钮状态 + this.setBtnState(tempNode, data); + //获取反应时间 + this.setTimeData(); + //根据答题,设置上传数据 + this.setData(data); + //进行下一关 + this.nextLevel(); + }; + //点火按钮 + GameManager.prototype.click_Ignition = function () { + }; + //判断是否有过的结果 type只为new hear see 三选一 + GameManager.prototype.judgingResult = function () { + var result = -1; + var name = this.now_Food.substring(5, this.now_Food.length); + //再检查图盘 + if (this.foodPicArray.length > 0) { + for (var i = 0; i < this.foodPicArray.length; i++) { + console.log(name, this.foodPicArray[i].substring(5, this.foodPicArray[i].length)); + if (name == this.foodPicArray[i].substring(5, this.foodPicArray[i].length)) { + //如果图片里面有 + result = 2; + console.log("出现过", name); + cc.fx.GameConfig.CLICK_SET("rightChoice", 2); + i = 10000; + break; + } + } + } + if (result != 2) { + console.log("没出险过", name); + cc.fx.GameConfig.CLICK_SET("rightChoice", 1); + //把新生成的存放进数组里 + this.foodPicArray.push(this.now_Food); + } + return result; + }; + //计算反应时间 + GameManager.prototype.setTimeData = function () { + this.overTime = cc.fx.GameTool.getTime(); + var time = this.overTime - this.startTime; + //防止溢出 + if (time < 0 || time > 8000) + time = 8000; + cc.fx.GameConfig.CLICK_SET("stepTime", time); + cc.fx.GameConfig.GM_INFO.stepTimeList += time; + }; + //设置按钮状态 + GameManager.prototype.setBtnState = function (node, data) { + if (data == "Btn_New") + this.choice = 1; + else if (data == "Btn_Old") + this.choice = 2; + // else if(data == "Btn_See") this.choice = 3; + if (data == null) { + this.choice = 0; + } + if (this.choice != cc.fx.GameConfig.CLICK_DATA.rightChoice) { + if (node) { + cc.fx.AudioManager._instance.playEffect("err", null); + node.getChildByName("err").active = true; + node.getChildByName("correct").active = false; + } + } + else { + if (node) { + cc.fx.AudioManager._instance.playEffect("yes", null); + node.getChildByName("err").active = false; + node.getChildByName("correct").active = true; + } + } + if (node) + node.getChildByName("nomal").active = false; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + }; + //下一轮 首先重置按钮状态 + GameManager.prototype.nextLevel = function () { + var _this = this; + cc.tween(this.Plant) + .delay(1) + .call(function () { + _this.btnReset(); + }) + .to(0.5, { opacity: 0 }) + .call(function () { + _this.createCustom(); + }) + .start(); + }; + GameManager.prototype.btnReset = function () { + this.Btn_New.getChildByName("nomal").active = true; + this.Btn_New.getChildByName("err").active = false; + this.Btn_New.getChildByName("correct").active = false; + this.Btn_Old.getChildByName("nomal").active = true; + this.Btn_Old.getChildByName("err").active = false; + this.Btn_Old.getChildByName("correct").active = false; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + }; + //返回首页 + GameManager.prototype.backScene = function () { + cc.director.loadScene("LoadScene"); + }; + //下一关,或者重新开始,或者返回上一关,根据level决定 + GameManager.prototype.reStart = function (type) { + }; + //获取时间戳 + GameManager.prototype.getTime = function () { + var timestamp = new Date().getTime(); + return timestamp; + }; + //获胜 + GameManager.prototype.passLevel = function () { + }; + //失败 + GameManager.prototype.loseLevel = function (type) { + }; + //如果是倒计时 调用此方法 + GameManager.prototype.startCountDownTime = function () { + this.timeNode.getChildByName("time").getComponent(cc.Sprite).fillRange = 0; + this.timeNode.getChildByName("needle").angle = 0; + }; + //上传每次操作数据 + GameManager.prototype.setData = function (data) { + console.log("进入上传埋点"); + if (data == "Btn_New") + this.choice = 1; + else if (data == "Btn_Old") + this.choice = 2; + // else if(data == "Btn_See") this.choice = 3; + else if (data == null) { + this.choice = 0; + cc.fx.GameConfig.CLICK_SET("stepTime", 5000); + } + var jg = false; + if (this.choice == cc.fx.GameConfig.CLICK_DATA.rightChoice) { + jg = true; + cc.fx.GameConfig.GM_INFO.successList.push(jg); + } + cc.fx.GameConfig.CLICK_SET("choice", this.choice); + cc.fx.GameConfig.CLICK_SET("success", jg); + console.log("进入GameTool.setGameData", cc.fx.GameConfig.CLICK_DATA); + cc.fx.GameTool.setGameData(); + }; + //上传排行榜数据 + GameManager.prototype.gameOver = function (time) { + cc.fx.GameTool.setRank(time); + this.node.getChildByName("GameOver").active = true; + this.node.getChildByName("GameOver").opacity = 0; + cc.tween(this.node.getChildByName("GameOver")) + .to(0.4, { opacity: 255 }) + .delay(2) + .to(0.4, { opacity: 50 }) + .call(function () { + cc.director.loadScene("OverScene"); + }) + .start(); + }; + GameManager.prototype.onEnable = function () { + // cc.fx.Notifications.on("clickSun", this.clickSun, this); + }; + GameManager.prototype.onDisable = function () { + // cc.fx.Notifications.off("clickSun", this.clickSun); + }; + GameManager.prototype.update = function (dt) { + }; + __decorate([ + property(cc.Node) + ], GameManager.prototype, "Btn_New", void 0); + __decorate([ + property(cc.Node) + ], GameManager.prototype, "Btn_Old", void 0); + __decorate([ + property(cc.Node) + ], GameManager.prototype, "Plant", void 0); + __decorate([ + property(cc.Node) + ], GameManager.prototype, "timeNode", void 0); + __decorate([ + property(cc.SpriteAtlas) + ], GameManager.prototype, "FoodPlist", void 0); + GameManager = __decorate([ + ccclass + ], GameManager); + return GameManager; +}(cc.Component)); +exports.default = GameManager; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js.map b/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js.map new file mode 100644 index 0000000..3ce8fa8 --- /dev/null +++ b/library/imports/b0/b0432040-dbde-438c-839c-ba2b5d18a3b5.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\GameManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS;AACH,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAE1C;IAAyC,+BAAY;IAArD;QAAA,qEAoXC;QAjXG,aAAO,GAAY,IAAI,CAAC;QAExB,aAAO,GAAY,IAAI,CAAC;QAIxB,WAAK,GAAY,IAAI,CAAC;QAGtB,cAAQ,GAAY,IAAI,CAAC;QAGzB,eAAS,GAAmB,IAAI,CAAC;;IAqWrC,CAAC;IAtVG,4BAAM,GAAN;QACI,IAAI,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QACjD,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;aAC7C,EAAE,CAAC,GAAG,EAAC,EAAC,OAAO,EAAC,GAAG,EAAC,CAAC;aACrB,KAAK,CAAC,CAAC,CAAC;aACR,EAAE,CAAC,GAAG,EAAC,EAAC,OAAO,EAAC,EAAE,EAAC,CAAC;aACpB,IAAI,CAAC;YACF,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACvC,CAAC,CAAC;aACD,KAAK,EAAE,CAAA;IACZ,CAAC;IAED,8BAAQ,GAAR;QACI,2DAA2D;IAC/D,CAAC;IACD,+BAAS,GAAT;QACI,sDAAsD;IAC1D,CAAC;IACD,4BAAM,GAAN,UAAQ,EAAE;IACV,CAAC;IAhXD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;gDACM;IAExB;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;gDACM;IAIxB;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;8CACI;IAGtB;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;iDACO;IAGzB;QADC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC;kDACQ;IAfhB,WAAW;QAD/B,OAAO;OACa,WAAW,CAoX/B;IAAD,kBAAC;CApXD,AAoXC,CApXwC,EAAE,CAAC,SAAS,GAoXpD;kBApXoB,WAAW","file":"","sourceRoot":"/","sourcesContent":["import AudioManager from \"./module/Music/AudioManager\";\r\n\r\n// 主游戏控制类\r\nconst {ccclass, property} = cc._decorator;\r\n@ccclass\r\nexport default class GameManager extends cc.Component {\r\n\r\n @property(cc.Node)\r\n Btn_New: cc.Node = null;\r\n @property(cc.Node)\r\n Btn_Old: cc.Node = null;\r\n\r\n\r\n @property(cc.Node)\r\n Plant: cc.Node = null;\r\n \r\n @property(cc.Node)\r\n timeNode: cc.Node = null;\r\n\r\n @property(cc.SpriteAtlas)\r\n FoodPlist: cc.SpriteAtlas = null;\r\n\r\n voiceSpriteFrame: cc.SpriteFrame; //是否可点击\r\n timeTween: cc.Tween;\r\n touchable: boolean; //是否可点击\r\n countTime: number; //每次游戏倒计时\r\n startTime: number; //游戏开始计时\r\n overTime: number; //游戏结束计时\r\n now_Food: string; //当前关卡名字信息\r\n result: number; //当前关卡名字信息\r\n choice: number; //当前关卡选择第几个按钮\r\n foodPicArray: any; //存放当前每一大局游戏所有植物图片\r\n foodAudioArray: any; //存放当前每一大局游戏所有植物声音\r\n customData:any; //存放当前配置\r\n needleTween: cc.Tween;\r\n onLoad () {\r\n this.fit();\r\n this.init();\r\n this.startGame();\r\n }\r\n\r\n start () {\r\n\r\n }\r\n \r\n //处理地图\r\n setMap(){\r\n\r\n }\r\n\r\n //初始化数据\r\n init(){\r\n this.touchable = false;\r\n this.result = -1;\r\n this.foodAudioArray = [];\r\n this.foodPicArray = [];\r\n this.timeTween = null;\r\n this.needleTween = null;\r\n this.choice = 0;\r\n cc.fx.GameConfig.GM_INFO.stepTimeList = 0;\r\n cc.fx.GameConfig.GM_INFO.successList = [];\r\n cc.fx.GameConfig.GM_INFO.level = 0;\r\n this.voiceSpriteFrame = this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame;\r\n this.btnReset();\r\n }\r\n //开始游戏\r\n startGame(){\r\n cc.tween(this.node.getChildByName(\"Begin\"))\r\n .to(0.1,{opacity:0})\r\n .to(0.5,{opacity:255})\r\n .delay(1)\r\n .to(0.5,{opacity:0})\r\n .call(() =>{\r\n this.createCustom();\r\n })\r\n .start();\r\n }\r\n\r\n //根据是否全面屏,做独立适配方面\r\n fit(){\r\n var jg = cc.fx.GameTool.setFit();\r\n if(!jg){\r\n this.Btn_Old.y = -450;\r\n this.Btn_New.y = -300;\r\n }\r\n }\r\n //创建关卡\r\n createCustom(){\r\n this.choice = 0;\r\n this.Plant.opacity = 0;\r\n this.timeNode.getChildByName(\"time\").getComponent(cc.Sprite).fillRange = 0;\r\n this.timeNode.getChildByName(\"needle\").angle = 0;\r\n if(cc.fx.GameConfig.GM_INFO.level >= cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom.length){\r\n\r\n setTimeout(() => {\r\n cc.director.loadScene(\"OverScene\");\r\n }, 1000);\r\n return;\r\n }\r\n this.customData = cc.fx.GameConfig.LEVEL_INFO[cc.fx.GameConfig.GM_INFO.custom].custom[cc.fx.GameConfig.GM_INFO.level];\r\n\r\n let name = this.customData.item;\r\n\r\n //埋点数据设置\r\n cc.fx.GameConfig.CLICK_SET(\"round\",cc.fx.GameConfig.GM_INFO.level+1);\r\n cc.fx.GameConfig.CLICK_SET(\"levelConfig\",(cc.fx.GameConfig.GM_INFO.custom+1));\r\n cc.fx.GameConfig.CLICK_SET(\"item\",name);\r\n cc.fx.GameConfig.CLICK_SET(\"roundType\",this.customData.type);\r\n\r\n if(this.customData.type == 1){\r\n this.Plant.getChildByName(\"name\").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name);\r\n name = \"prop_\"+name;\r\n this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame = this.FoodPlist[\"_spriteFrames\"][name];\r\n this.now_Food = name;\r\n cc.tween(this.Plant)\r\n .to(0.2,{opacity:255})\r\n .call(()=>{\r\n this.startTimer();\r\n })\r\n .start();\r\n }\r\n else{\r\n this.Plant.getChildByName(\"name\").getComponent(cc.Label).string = \"\"\r\n this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame;\r\n let audioName = name + \"_audio\";\r\n name = \"audio\"+ name;\r\n this.now_Food = name;\r\n cc.fx.AudioManager._instance.playEffect(audioName);\r\n cc.tween(this.Plant)\r\n .to(0.2,{opacity:255})\r\n .call(()=>{\r\n this.startTimer();\r\n })\r\n .start();\r\n }\r\n //关卡+1\r\n cc.fx.GameConfig.GM_INFO.level += 1;\r\n\r\n }\r\n //开始转圈倒计时\r\n startTimer(){\r\n this.startTime = cc.fx.GameTool.getTime();\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n\r\n // if(this.containsNanana(this.now_Food) == true){\r\n // console.log(\"可以点火\");\r\n \r\n // }\r\n this.timeNode.getChildByName(\"time\").getComponent(cc.Sprite).fillRange = 0;\r\n this.needleTween = \r\n cc.tween(this.timeNode.getChildByName(\"needle\"))\r\n .to(8,{angle:-360})\r\n .start();\r\n this.timeTween = \r\n cc.tween(this.timeNode.getChildByName(\"time\").getComponent(cc.Sprite))\r\n .to(8,{fillRange:1})\r\n .call(()=>{\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n this.click_Choice(null,null);\r\n this.timeTween = null;\r\n })\r\n .start();\r\n }\r\n\r\n containsNanana(str) {\r\n return /muchai/i.test(str);\r\n }\r\n\r\n //新植物按钮\r\n click_Choice(customData,data){\r\n //关掉计时器 处理逻辑之前,先行关掉按钮开关\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n this.timeTween.stop();\r\n this.timeTween = null;\r\n this.needleTween.stop();\r\n this.needleTween = null;\r\n //判断是否正确,并把出现的物品存入数组\r\n this.result = this.judgingResult();\r\n if(data == \"Btn_New\"){\r\n if(this.result == -1){\r\n this.result = 1; \r\n } \r\n else{\r\n this.result = -1;\r\n }\r\n } \r\n var tempNode = null;\r\n if(data != null) tempNode = this[data]\r\n //设置按钮状态\r\n this.setBtnState(tempNode,data);\r\n //获取反应时间\r\n this.setTimeData();\r\n //根据答题,设置上传数据\r\n this.setData(data);\r\n //进行下一关\r\n this.nextLevel();\r\n }\r\n\r\n //点火按钮\r\n click_Ignition(){\r\n\r\n }\r\n\r\n //判断是否有过的结果 type只为new hear see 三选一 \r\n judgingResult(){\r\n let result = -1;\r\n let name = this.now_Food.substring(5,this.now_Food.length);\r\n //再检查图盘\r\n if(this.foodPicArray.length > 0){\r\n for(let i=0; i 8000) time = 8000;\r\n cc.fx.GameConfig.CLICK_SET(\"stepTime\",time);\r\n cc.fx.GameConfig.GM_INFO.stepTimeList += time;\r\n }\r\n\r\n //设置按钮状态\r\n setBtnState(node,data){\r\n if(data == \"Btn_New\") this.choice = 1;\r\n else if(data == \"Btn_Old\") this.choice = 2;\r\n // else if(data == \"Btn_See\") this.choice = 3;\r\n\r\n if(data == null){\r\n this.choice = 0; \r\n } \r\n\r\n if(this.choice != cc.fx.GameConfig.CLICK_DATA.rightChoice){\r\n if(node){\r\n cc.fx.AudioManager._instance.playEffect(\"err\",null);\r\n node.getChildByName(\"err\").active = true;\r\n node.getChildByName(\"correct\").active = false;\r\n }\r\n\r\n } \r\n else{\r\n if(node){\r\n cc.fx.AudioManager._instance.playEffect(\"yes\",null);\r\n node.getChildByName(\"err\").active = false;\r\n node.getChildByName(\"correct\").active = true;\r\n }\r\n\r\n } \r\n if(node) node.getChildByName(\"nomal\").active = false;\r\n \r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n }\r\n\r\n //下一轮 首先重置按钮状态\r\n nextLevel(){\r\n cc.tween(this.Plant)\r\n .delay(1)\r\n .call(()=>{\r\n this.btnReset();\r\n })\r\n .to(0.5,{opacity:0})\r\n .call(()=>{\r\n this.createCustom();\r\n })\r\n .start();\r\n }\r\n\r\n btnReset(){\r\n this.Btn_New.getChildByName(\"nomal\").active = true;\r\n this.Btn_New.getChildByName(\"err\").active = false;\r\n this.Btn_New.getChildByName(\"correct\").active = false;\r\n this.Btn_Old.getChildByName(\"nomal\").active = true;\r\n this.Btn_Old.getChildByName(\"err\").active = false;\r\n this.Btn_Old.getChildByName(\"correct\").active = false;\r\n\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n }\r\n\r\n //返回首页\r\n backScene(){\r\n cc.director.loadScene(\"LoadScene\");\r\n }\r\n //下一关,或者重新开始,或者返回上一关,根据level决定\r\n reStart(type){\r\n\r\n }\r\n //获取时间戳\r\n getTime(){\r\n const timestamp = new Date().getTime();\r\n return timestamp;\r\n }\r\n //获胜\r\n passLevel(){\r\n\r\n }\r\n //失败\r\n loseLevel(type){\r\n \r\n }\r\n\r\n //如果是倒计时 调用此方法\r\n startCountDownTime () {\r\n this.timeNode.getChildByName(\"time\").getComponent(cc.Sprite).fillRange = 0;\r\n this.timeNode.getChildByName(\"needle\").angle = 0;\r\n }\r\n //上传每次操作数据\r\n setData(data){\r\n console.log(\"进入上传埋点\");\r\n if(data == \"Btn_New\") this.choice = 1;\r\n else if(data == \"Btn_Old\") this.choice = 2;\r\n // else if(data == \"Btn_See\") this.choice = 3;\r\n else if(data == null){\r\n this.choice = 0;\r\n cc.fx.GameConfig.CLICK_SET(\"stepTime\",5000);\r\n } \r\n var jg = false;\r\n if(this.choice == cc.fx.GameConfig.CLICK_DATA.rightChoice){\r\n jg = true;\r\n cc.fx.GameConfig.GM_INFO.successList.push(jg);\r\n } \r\n cc.fx.GameConfig.CLICK_SET(\"choice\",this.choice);\r\n cc.fx.GameConfig.CLICK_SET(\"success\",jg);\r\n console.log(\"进入GameTool.setGameData\",cc.fx.GameConfig.CLICK_DATA);\r\n cc.fx.GameTool.setGameData();\r\n }\r\n //上传排行榜数据\r\n gameOver(time){\r\n cc.fx.GameTool.setRank(time);\r\n this.node.getChildByName(\"GameOver\").active = true;\r\n this.node.getChildByName(\"GameOver\").opacity = 0;\r\n cc.tween(this.node.getChildByName(\"GameOver\"))\r\n .to(0.4,{opacity:255})\r\n .delay(2)\r\n .to(0.4,{opacity:50})\r\n .call(() =>{\r\n cc.director.loadScene(\"OverScene\");\r\n })\r\n .start()\r\n }\r\n\r\n onEnable () {\r\n // cc.fx.Notifications.on(\"clickSun\", this.clickSun, this);\r\n }\r\n onDisable () {\r\n // cc.fx.Notifications.off(\"clickSun\", this.clickSun);\r\n }\r\n update (dt) {\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/b0/b0746a9d-0822-49dd-8cf8-45afc1ee4652.json b/library/imports/b0/b0746a9d-0822-49dd-8cf8-45afc1ee4652.json new file mode 100644 index 0000000..f163b90 --- /dev/null +++ b/library/imports/b0/b0746a9d-0822-49dd-8cf8-45afc1ee4652.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "nomal1", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1542, + 745, + 117, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.json b/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.png b/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.png new file mode 100644 index 0000000..c298191 Binary files /dev/null and b/library/imports/b1/b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd.png differ diff --git a/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.json b/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.json new file mode 100644 index 0000000..5d5fe04 --- /dev/null +++ b/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "cha_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.mp3 b/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.mp3 new file mode 100644 index 0000000..fb0c79c Binary files /dev/null and b/library/imports/b1/b1a7d924-b756-4abd-9de4-f913e76d7ba6.mp3 differ diff --git a/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.json b/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.json new file mode 100644 index 0000000..ff5da9c --- /dev/null +++ b/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.json @@ -0,0 +1,9 @@ +{ + "__type__": "cc.ParticleAsset", + "_name": "atom", + "_objFlags": 0, + "_native": ".plist", + "spriteFrame": { + "__uuid__": "472df5d3-35e7-4184-9e6c-7f41bee65ee3" + } +} \ No newline at end of file diff --git a/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.plist b/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.plist new file mode 100644 index 0000000..fea5100 --- /dev/null +++ b/library/imports/b2/b2687ac4-099e-403c-a192-ff477686f4f5.plist @@ -0,0 +1,108 @@ + + + + + angle + 360 + angleVariance + 360 + blendFuncDestination + 1 + blendFuncSource + 770 + duration + -1 + emitterType + 0 + finishColorAlpha + 0.8399999737739563 + finishColorBlue + 0.0771484375 + finishColorGreen + 0.6349284052848816 + finishColorRed + 0.6808268427848816 + finishColorVarianceAlpha + 0.7400000095367432 + finishColorVarianceBlue + 0.9800000190734863 + finishColorVarianceGreen + 0.9800000190734863 + finishColorVarianceRed + 0.41999998688697815 + finishParticleSize + 30.31999969482422 + finishParticleSizeVariance + 0 + gravityx + 0.25 + gravityy + 0.8600000143051147 + maxParticles + 200 + maxRadius + 100 + maxRadiusVariance + 0 + minRadius + 0 + particleLifespan + 0.20000000298023224 + particleLifespanVariance + 0.5 + radialAccelVariance + 65.79000091552734 + radialAcceleration + -671.0499877929688 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + -47.369998931884766 + rotationEndVariance + -142.11000061035156 + rotationStart + -47.369998931884766 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 7 + sourcePositionx + 373.7277526855469 + sourcePositiony + 478.40472412109375 + speed + 0 + speedVariance + 190.7899932861328 + startColorAlpha + 0.6399999856948853 + startColorBlue + 0.3375650942325592 + startColorGreen + 0.7879231572151184 + startColorRed + 0.794921875 + startColorVarianceAlpha + 0.7799999713897705 + startColorVarianceBlue + 0.6800000071525574 + startColorVarianceGreen + 1 + startColorVarianceRed + 0.8999999761581421 + startParticleSize + 3.369999885559082 + startParticleSizeVariance + 50 + tangentialAccelVariance + 65.79000091552734 + tangentialAcceleration + -92.11000061035156 + spriteFrameUuid + 472df5d3-35e7-4184-9e6c-7f41bee65ee3 + + \ No newline at end of file diff --git a/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.json b/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.json new file mode 100644 index 0000000..16a6ae4 --- /dev/null +++ b/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "pugongying_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.645714, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.mp3 b/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.mp3 new file mode 100644 index 0000000..247f811 Binary files /dev/null and b/library/imports/b3/b313152c-a590-406a-90f6-e78ca8cf99fa.mp3 differ diff --git a/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.json b/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.json new file mode 100644 index 0000000..c2d0130 --- /dev/null +++ b/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "putao_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.515102, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.mp3 b/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.mp3 new file mode 100644 index 0000000..c7e52c0 Binary files /dev/null and b/library/imports/b3/b31b447b-2c35-46ea-bb6c-84952055fae8.mp3 differ diff --git a/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.json b/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.json new file mode 100644 index 0000000..e7f6a1f --- /dev/null +++ b/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "ganjiang_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.48898, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.mp3 b/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.mp3 new file mode 100644 index 0000000..4117a9b Binary files /dev/null and b/library/imports/b3/b3d0fc52-3960-42d1-869f-39121e912bdb.mp3 differ diff --git a/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.json b/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.json new file mode 100644 index 0000000..56f1e57 --- /dev/null +++ b/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.json @@ -0,0 +1,6 @@ +{ + "__type__": "cc.Asset", + "_name": "Share", + "_objFlags": 0, + "_native": ".zip" +} \ No newline at end of file diff --git a/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.zip b/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.zip new file mode 100644 index 0000000..705f190 Binary files /dev/null and b/library/imports/b4/b42c4fc1-4cd1-4b12-b206-930cea3d49ca.zip differ diff --git a/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.bin b/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.bin new file mode 100644 index 0000000..8d3eae3 Binary files /dev/null and b/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.bin differ diff --git a/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.json b/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.json new file mode 100644 index 0000000..52363a8 --- /dev/null +++ b/library/imports/b4/b430cea3-6ab3-4106-b073-26c698918edd.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -1, + "z": -0.5 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 1, + "z": 0.5 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 193 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 6176 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 6176, + "length": 768 + } +] \ No newline at end of file diff --git a/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.json b/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.png b/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.png new file mode 100644 index 0000000..3bb6159 Binary files /dev/null and b/library/imports/b4/b43ff3c2-02bb-4874-81f7-f2dea6970f18.png differ diff --git a/library/imports/b4/b4a90350-0463-403c-b8cc-0248f3122578.json b/library/imports/b4/b4a90350-0463-403c-b8cc-0248f3122578.json new file mode 100644 index 0000000..96cf462 --- /dev/null +++ b/library/imports/b4/b4a90350-0463-403c-b8cc-0248f3122578.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_ganjiang", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 385, + 1565, + 382, + 300 + ], + "offset": [ + -11, + 4 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/b5/b5fc2cf2-7942-483d-be1f-bbeadc4714ad.json b/library/imports/b5/b5fc2cf2-7942-483d-be1f-bbeadc4714ad.json new file mode 100644 index 0000000..5ce72fa --- /dev/null +++ b/library/imports/b5/b5fc2cf2-7942-483d-be1f-bbeadc4714ad.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "cone", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "cone", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + -0.7071068286895765, + 0, + 0, + 0.7071067336835153, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": -90.00000769819565, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "7a17de6e-227a-46b1-8009-e7157d4d3acf" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "b5fc2cf2-7942-483d-be1f-bbeadc4714ad" + }, + "fileId": "71bfK5TRVH64FzEUsiCu4S", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.jpg b/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.jpg new file mode 100644 index 0000000..32057bf Binary files /dev/null and b/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.jpg differ diff --git a/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.json b/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.json new file mode 100644 index 0000000..9ddba82 --- /dev/null +++ b/library/imports/b6/b6890719-3b74-401d-9195-b39ec488d5e0.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "1,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.json b/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.json new file mode 100644 index 0000000..214266f --- /dev/null +++ b/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.json @@ -0,0 +1,9 @@ +{ + "__type__": "cc.ParticleAsset", + "_name": "atom", + "_objFlags": 0, + "_native": ".plist", + "spriteFrame": { + "__uuid__": "bb42ed8e-0867-4584-ad63-b6f84f83bba8" + } +} \ No newline at end of file diff --git a/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.plist b/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.plist new file mode 100644 index 0000000..8e59750 --- /dev/null +++ b/library/imports/b8/b8223619-7e38-47c4-841f-9160c232495a.plist @@ -0,0 +1,108 @@ + + + + + angle + 360 + angleVariance + 360 + blendFuncDestination + 1 + blendFuncSource + 770 + duration + -1 + emitterType + 0 + finishColorAlpha + 0.8399999737739563 + finishColorBlue + 0.0771484375 + finishColorGreen + 0.6349284052848816 + finishColorRed + 0.6808268427848816 + finishColorVarianceAlpha + 0.7400000095367432 + finishColorVarianceBlue + 0.9800000190734863 + finishColorVarianceGreen + 0.9800000190734863 + finishColorVarianceRed + 0.41999998688697815 + finishParticleSize + 30.31999969482422 + finishParticleSizeVariance + 0 + gravityx + 0.25 + gravityy + 0.8600000143051147 + maxParticles + 200 + maxRadius + 100 + maxRadiusVariance + 0 + minRadius + 0 + particleLifespan + 0.20000000298023224 + particleLifespanVariance + 0.5 + radialAccelVariance + 65.79000091552734 + radialAcceleration + -671.0499877929688 + rotatePerSecond + 0 + rotatePerSecondVariance + 0 + rotationEnd + -47.369998931884766 + rotationEndVariance + -142.11000061035156 + rotationStart + -47.369998931884766 + rotationStartVariance + 0 + sourcePositionVariancex + 7 + sourcePositionVariancey + 7 + sourcePositionx + 373.7277526855469 + sourcePositiony + 478.40472412109375 + speed + 0 + speedVariance + 190.7899932861328 + startColorAlpha + 0.6399999856948853 + startColorBlue + 0.3375650942325592 + startColorGreen + 0.7879231572151184 + startColorRed + 0.794921875 + startColorVarianceAlpha + 0.7799999713897705 + startColorVarianceBlue + 0.6800000071525574 + startColorVarianceGreen + 1 + startColorVarianceRed + 0.8999999761581421 + startParticleSize + 3.369999885559082 + startParticleSizeVariance + 50 + tangentialAccelVariance + 65.79000091552734 + tangentialAcceleration + -92.11000061035156 + spriteFrameUuid + bb42ed8e-0867-4584-ad63-b6f84f83bba8 + + \ No newline at end of file diff --git a/library/imports/b9/b9472a40-1f02-4a4b-8fbc-818b4255e9ce.json b/library/imports/b9/b9472a40-1f02-4a4b-8fbc-818b4255e9ce.json new file mode 100644 index 0000000..93b74b7 --- /dev/null +++ b/library/imports/b9/b9472a40-1f02-4a4b-8fbc-818b4255e9ce.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "nomal2", + "texture": "adfc2f90-f674-4b11-93a1-3485c1804903", + "atlas": "", + "rect": [ + 194, + 18, + 112, + 34 + ], + "offset": [ + -0.5, + 0 + ], + "originalSize": [ + 501, + 70 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ba/ba2df8a8-50d3-49d9-a19d-c5d4233a8bf2.json b/library/imports/ba/ba2df8a8-50d3-49d9-a19d-c5d4233a8bf2.json new file mode 100644 index 0000000..79636d3 --- /dev/null +++ b/library/imports/ba/ba2df8a8-50d3-49d9-a19d-c5d4233a8bf2.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_putao", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1249, + 1203, + 418, + 340 + ], + "offset": [ + 12, + -5 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ba/ba9907a5-b5ce-44c1-b93b-73fd9fed5ddb.json b/library/imports/ba/ba9907a5-b5ce-44c1-b93b-73fd9fed5ddb.json new file mode 100644 index 0000000..381091a --- /dev/null +++ b/library/imports/ba/ba9907a5-b5ce-44c1-b93b-73fd9fed5ddb.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "nomal3", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1294, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ba/badb56f7-1c07-4fbb-87e6-5bfd805fe81b.json b/library/imports/ba/badb56f7-1c07-4fbb-87e6-5bfd805fe81b.json new file mode 100644 index 0000000..19f3da7 --- /dev/null +++ b/library/imports/ba/badb56f7-1c07-4fbb-87e6-5bfd805fe81b.json @@ -0,0 +1,5181 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "Canvas", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 64 + }, + { + "__id__": 75 + }, + { + "__id__": 98 + }, + { + "__id__": 101 + }, + { + "__id__": 136 + } + ], + "_active": true, + "_components": [ + { + "__id__": 142 + }, + { + "__id__": 143 + }, + { + "__id__": 144 + } + ], + "_prefab": { + "__id__": 145 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 252, + "b": 252, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 375, + 667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 252.87547223450972, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "97fLKw9fpLKIc0dJLpbPlR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "background", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 1600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 1, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "8dEBgqFXxELpmAzyYl1ZRR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "ScrollView", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 9 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 61 + }, + { + "__id__": 14 + }, + { + "__id__": 62 + } + ], + "_prefab": { + "__id__": 63 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 174, + "g": 121, + "b": 121, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 1400 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 150, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "scrollBar", + "_objFlags": 512, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 10 + } + ], + "_active": false, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 58 + }, + { + "__id__": 59 + } + ], + "_prefab": { + "__id__": 60 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 12, + "height": 820 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 340, + -410, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bar", + "_objFlags": 512, + "_parent": { + "__id__": 9 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 12 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 10, + "height": 30 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5c3bb932-6c3c-468f-88a9-c8c61d458641" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d7LA6B6L9KYrPYs9FOPGKR", + "sync": false + }, + { + "__type__": "cc.Scrollbar", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_scrollView": { + "__id__": 14 + }, + "_touching": false, + "_opacity": 255, + "enableAutoHide": true, + "autoHideTime": 1, + "_N$handle": { + "__id__": 11 + }, + "_N$direction": 1, + "_id": "" + }, + { + "__type__": "cc.ScrollView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "horizontal": false, + "vertical": true, + "inertia": true, + "brake": 0.75, + "elastic": true, + "bounceDuration": 0.23, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 15 + }, + "content": { + "__id__": 15 + }, + "_N$horizontalScrollBar": null, + "_N$verticalScrollBar": null, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 16 + }, + "_children": [ + { + "__id__": 19 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 57 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 600 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 8 + }, + "_children": [ + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 18 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 680, + "height": 700 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 1 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "01e0xqlUVFcY0MMajauQHo", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "RankListItem", + "_objFlags": 0, + "_parent": { + "__id__": 15 + }, + "_children": [ + { + "__id__": 20 + }, + { + "__id__": 23 + }, + { + "__id__": 32 + }, + { + "__id__": 43 + }, + { + "__id__": 46 + }, + { + "__id__": 49 + }, + { + "__id__": 52 + } + ], + "_active": true, + "_components": [ + { + "__id__": 55 + } + ], + "_prefab": { + "__id__": 56 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -100, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 22 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 650, + "height": 94 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "6eyN1+nK5HT7svNqUsa2/+", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 24 + }, + { + "__id__": 27 + } + ], + "_active": true, + "_components": [ + { + "__id__": 30 + } + ], + "_prefab": { + "__id__": 31 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 26 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "08Vcf5jRBOhLOtnEzMUku6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 23 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 28 + } + ], + "_prefab": { + "__id__": 29 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 64, + "height": 64 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 27 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "f0DfDJ4PNDbb7lvykwzyBm", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 23 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "38W68aamJOhbnBDiSboSCF", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [ + { + "__id__": 33 + }, + { + "__id__": 36 + }, + { + "__id__": 39 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 42 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 34 + } + ], + "_prefab": { + "__id__": 35 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 33 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "07jJ4rjvBM3K8UmWuJPTSW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 37 + } + ], + "_prefab": { + "__id__": 38 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 36 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "cf00JqB1FL4J82EdUA2X13", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 32 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 40 + } + ], + "_prefab": { + "__id__": 41 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 39 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "1beDtXl+VD86kzCArCfEPs", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "d03AAa5MpCZY7eWAmnGlia", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 44 + } + ], + "_prefab": { + "__id__": 45 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + -2.054, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 43 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "de4HHWkIhExrJq1+nHHMA6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 47 + } + ], + "_prefab": { + "__id__": 48 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 46 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "05c46heZhJV4sYMqYyxlB5", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 50 + } + ], + "_prefab": { + "__id__": 51 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 240, + "height": 27.72 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 49 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "测试", + "_N$string": "测试", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 1, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "2an+mxcU5ApJz+ZlYlaw5G", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 19 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 53 + } + ], + "_prefab": { + "__id__": 54 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 88, + "g": 69, + "b": 65, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + -2.205, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 52 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "78MlwwIH1CYrPsut4N5MBU", + "sync": false + }, + { + "__type__": "ca0f9k0oBVDbpQC+OMNTF3m", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 19 + }, + "_enabled": true, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 19 + }, + "asset": { + "__uuid__": "a264c8df-80f6-474f-9fe5-28b7ae529d95" + }, + "fileId": "e4hxD496RFvpdq8xavWmsV", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b21uNyrqhLbqirpS1MD+7t", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "alignMode": 0, + "_target": null, + "_alignFlags": 37, + "_left": 350.07654921020657, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 237, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "5fe5dcaa-b513-4dc5-a166-573627b3a159" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7by3ovAnJLYoQqKmlhCACY", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": false, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "d5421HgLShFKIjj5f18m1mi", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "itemRender": null, + "type": 2, + "startAxis": 2, + "spaceX": 10, + "spaceY": 10, + "padding_top": 10, + "padding_buttom": 10, + "padding_left": 10, + "_padding": 0, + "padding_right": 10, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "bdWGhni0BLgaAOrQnsfTP4", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Node", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 65 + }, + { + "__id__": 68 + }, + { + "__id__": 71 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 74 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 66 + } + ], + "_prefab": { + "__id__": 67 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 54, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -258.909, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 65 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "排名", + "_N$string": "排名", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7bzdCzsURJc4G7MwOL0Blj", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 69 + } + ], + "_prefab": { + "__id__": 70 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -48.622, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 68 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "用户昵称", + "_N$string": "用户昵称", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "517a9VdPBNUK5P35X44CpK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 64 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 72 + } + ], + "_prefab": { + "__id__": 73 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 108, + "height": 34.02 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 223.658, + 177.468, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 71 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "驱逐太阳", + "_N$string": "驱逐太阳", + "_fontSize": 27, + "_lineHeight": 27, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "12KoCg1NRLpJU9aRF1iPkq", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "9963O/IP5CCLrawiVnAqdg", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "player", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 76 + }, + { + "__id__": 87 + } + ], + "_active": true, + "_components": [ + { + "__id__": 96 + } + ], + "_prefab": { + "__id__": 97 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 98, + "height": 106 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -254, + 377, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 75 + }, + "_children": [ + { + "__id__": 77 + }, + { + "__id__": 80 + }, + { + "__id__": 83 + } + ], + "_active": false, + "_components": [], + "_prefab": { + "__id__": 86 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 78 + } + ], + "_prefab": { + "__id__": 79 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 72, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -42.835, + 60.883, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 77 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "超过了", + "_N$string": "超过了", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "b0QUZ3hixHY4BCC7p7EwaX", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Label", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 81 + } + ], + "_prefab": { + "__id__": 82 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 131, + "g": 87, + "b": 16, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 48, + "height": 30.24 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 74.991, + 60.883, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 80 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "的人", + "_N$string": "的人", + "_fontSize": 24, + "_lineHeight": 24, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d3ySguqntO5bgnP95er4PW", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "number", + "_objFlags": 0, + "_parent": { + "__id__": 76 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 84 + } + ], + "_prefab": { + "__id__": 85 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 51, + "b": 51, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 58.04, + "height": 36.54 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 21.936, + 61.459, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 83 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "30%", + "_N$string": "30%", + "_fontSize": 29, + "_lineHeight": 29, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 1, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "d6vzzOaCBH2JMQzL1q75Qk", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "01Wu1da3hD9qLoiu2u15Dh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "mask", + "_objFlags": 0, + "_parent": { + "__id__": 75 + }, + "_children": [ + { + "__id__": 88 + }, + { + "__id__": 91 + } + ], + "_active": true, + "_components": [ + { + "__id__": 94 + } + ], + "_prefab": { + "__id__": 95 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -0.079, + 4.153, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "phone", + "_objFlags": 0, + "_parent": { + "__id__": 87 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 89 + } + ], + "_prefab": { + "__id__": 90 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 65, + "height": 65 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 88 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "a9FdZ8QGNM77omYBmm7jeP", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 87 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 92 + } + ], + "_prefab": { + "__id__": 93 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 91 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "082qUxbaNDrIu5wftUXuxE", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 87 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "15yWGxXfFKHYDj+6AKZ+hO", + "sync": false + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 75 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "777yycF4RPu7K18m/uyO1m", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 99 + } + ], + "_prefab": { + "__id__": 100 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 750, + "height": 118 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -609, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 98 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "adJ7tHdodDiYvg71t3toeY", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "Self", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 102 + }, + { + "__id__": 111 + }, + { + "__id__": 114 + }, + { + "__id__": 125 + }, + { + "__id__": 128 + }, + { + "__id__": 131 + } + ], + "_active": true, + "_components": [ + { + "__id__": 134 + } + ], + "_prefab": { + "__id__": 135 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -667, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [ + { + "__id__": 103 + }, + { + "__id__": 106 + } + ], + "_active": true, + "_components": [ + { + "__id__": 109 + } + ], + "_prefab": { + "__id__": 110 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -171.687, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "pic", + "_objFlags": 0, + "_parent": { + "__id__": 102 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 104 + } + ], + "_prefab": { + "__id__": 105 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 103 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "f513pLQ/9KMbKpOTC4nuyz", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "icon", + "_objFlags": 0, + "_parent": { + "__id__": 102 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 107 + } + ], + "_prefab": { + "__id__": 108 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 60, + "height": 60 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 106 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "c8vhbkrhtGw72GydJ4enTg", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 102 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 1, + "_segments": 60, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "47dNJgs3hCIZESImEUA8wi", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rankLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 112 + } + ], + "_prefab": { + "__id__": 113 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 13.9, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -259.131, + 59.946, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 111 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "5", + "_N$string": "5", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "25WXxoGV5I/KgHBE8D1rsK", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "rank", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [ + { + "__id__": 115 + }, + { + "__id__": 118 + }, + { + "__id__": 121 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 124 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 40, + "height": 36 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -261.233, + 62, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "one", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 116 + } + ], + "_prefab": { + "__id__": 117 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 115 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "09Kg3hfzBBu6HptPpAFSW9", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "two", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 119 + } + ], + "_prefab": { + "__id__": 120 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 118 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "0dKJ2TWjFCOJ/iqhRFSLjk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "three", + "_objFlags": 0, + "_parent": { + "__id__": 114 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 122 + } + ], + "_prefab": { + "__id__": 123 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 66, + "height": 66 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 121 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1aJ6eRDI5HH7V7ePpX8123", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "1dS3urBJ1F55mw2t/Q3F7w", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "totalLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 126 + } + ], + "_prefab": { + "__id__": 127 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 16.68, + "height": 37.8 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 1, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 224.356, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 125 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "4", + "_N$string": "4", + "_fontSize": 30, + "_lineHeight": 30, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 2, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "31xa76G7lPaao3sNmpqjSI", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "nameLab", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 129 + } + ], + "_prefab": { + "__id__": 130 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 31.5 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -99.704, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 128 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "我", + "_N$string": "我", + "_fontSize": 25, + "_lineHeight": 25, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 0, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "42BvS5Yl5GfY/GLeE5YQOh", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "label", + "_objFlags": 0, + "_parent": { + "__id__": 101 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 132 + } + ], + "_prefab": { + "__id__": 133 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 252, + "g": 249, + "b": 232, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 28, + "height": 35.28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 246.176, + 59.795, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Label", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 131 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_string": "个", + "_N$string": "个", + "_fontSize": 28, + "_lineHeight": 28, + "_enableWrapText": true, + "_N$file": null, + "_isSystemFontUsed": true, + "_spacingX": 0, + "_batchAsBitmap": false, + "_styleFlags": 0, + "_underlineHeight": 0, + "_N$horizontalAlign": 1, + "_N$verticalAlign": 1, + "_N$fontFamily": "Arial", + "_N$overflow": 0, + "_N$cacheMode": 1, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "7bFLMTAaRJZbZdCmLU7NlT", + "sync": false + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 101 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 4, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "02TaTwJ1tM844wDACOg8Uk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "backBtn", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 137 + }, + { + "__id__": 138 + }, + { + "__id__": 139 + } + ], + "_prefab": { + "__id__": 141 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 25, + "height": 40 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -320.09, + 618, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": null, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 9, + "_left": 42.410000000000025, + "_right": 0, + "_top": 29, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 136 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 140 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 1 + }, + "component": "", + "_componentId": "e74a999IDFOabyymZgXQIiy", + "handler": "backClick", + "customEventData": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "34+hXrhBBJUqEHHRNeqJSa", + "sync": false + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 750, + "height": 1334 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "" + }, + { + "__type__": "e74a999IDFOabyymZgXQIiy", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "Player": { + "__id__": 75 + }, + "selfNode": { + "__id__": 101 + }, + "phone": { + "__id__": 104 + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/bb/bb42ed8e-0867-4584-ad63-b6f84f83bba8.json b/library/imports/bb/bb42ed8e-0867-4584-ad63-b6f84f83bba8.json new file mode 100644 index 0000000..bb18fb8 --- /dev/null +++ b/library/imports/bb/bb42ed8e-0867-4584-ad63-b6f84f83bba8.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "atom", + "texture": "8a96b965-2dc0-4e03-aa90-3b79cb93b5b4", + "atlas": "", + "rect": [ + 0, + 0, + 31, + 31 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 31, + 31 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/be/be8f26d8-90f0-4b73-884c-96fe8c8a47ef.json b/library/imports/be/be8f26d8-90f0-4b73-884c-96fe8c8a47ef.json new file mode 100644 index 0000000..96e03bb --- /dev/null +++ b/library/imports/be/be8f26d8-90f0-4b73-884c-96fe8c8a47ef.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_danshen", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 437, + 422, + 386 + ], + "offset": [ + -7, + 15 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.json b/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.json new file mode 100644 index 0000000..5965400 --- /dev/null +++ b/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "bgMusic", + "_objFlags": 0, + "_native": ".mp3", + "duration": 176.352653, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.mp3 b/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.mp3 new file mode 100644 index 0000000..0c7c98a Binary files /dev/null and b/library/imports/be/bef46737-c323-42ea-9ea7-7dc780b882b7.mp3 differ diff --git a/library/imports/bf/bf0a434c-84dd-4a8e-a08a-7a36f180cc75.json b/library/imports/bf/bf0a434c-84dd-4a8e-a08a-7a36f180cc75.json new file mode 100644 index 0000000..2297fb2 --- /dev/null +++ b/library/imports/bf/bf0a434c-84dd-4a8e-a08a-7a36f180cc75.json @@ -0,0 +1,1217 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "toggleContainer", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "toggleContainer", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 11 + }, + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 29 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 221, + "height": 61 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "toggle1", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 6 + } + ], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 41, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -62, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "12e439SyJxPm6pHTRj/H92b", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "d5f81EvT59O3IYhi0b8awdA", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 2 + }, + "_N$isChecked": true, + "toggleGroup": null, + "checkMark": { + "__id__": 7 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "f8ae482OYFF86r5AHHZHzkB", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "toggle2", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 12 + }, + { + "__id__": 15 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 42, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 15, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 11 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 13 + } + ], + "_prefab": { + "__id__": 14 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "23182iNXjhGfbiM+k2MoPhG", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 11 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 17 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "67160qO3xZPvYfuiiHVaiyt", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 11 + }, + "_N$isChecked": false, + "toggleGroup": null, + "checkMark": { + "__id__": 16 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "4b82d4NuWJDnZcPM+lR6By/", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "toggle3", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 21 + }, + { + "__id__": 24 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + } + ], + "_prefab": { + "__id__": 28 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 37, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 91, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "7042dNy6Q1OmYWrdrd+O8Q7", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 20 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 25 + } + ], + "_prefab": { + "__id__": 26 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 24 + }, + "_enabled": true, + "_materials": [], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "faafbv5RyVCB5deTlAulXVo", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 20 + }, + "_N$isChecked": false, + "toggleGroup": null, + "checkMark": { + "__id__": 25 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "2b5ebCn5ohKwJt/iEtuj16b", + "sync": false + }, + { + "__type__": "cc.ToggleContainer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "allowSwitchOff": false, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "bf0a434c-84dd-4a8e-a08a-7a36f180cc75" + }, + "fileId": "8762b/ljEVCT4m/QHu2tS1g", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/c0/c0040c95-c57f-49cd-9cbc-12316b73d0d4.json b/library/imports/c0/c0040c95-c57f-49cd-9cbc-12316b73d0d4.json new file mode 100644 index 0000000..9b71e99 --- /dev/null +++ b/library/imports/c0/c0040c95-c57f-49cd-9cbc-12316b73d0d4.json @@ -0,0 +1,54 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-clear-stencil", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "program": "builtin-clear-stencil|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 2075641479, + "glsl3": { + "vert": "\nprecision highp float;\nin vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nattribute vec3 a_position;\nvoid main () {\n gl_Position = vec4(a_position, 1);\n}", + "frag": "\nprecision highp float;\nvoid main () {\n gl_FragColor = vec4(1.0);\n}" + }, + "builtins": { + "globals": { + "blocks": [], + "samplers": [] + }, + "locals": { + "blocks": [], + "samplers": [] + } + }, + "defines": [], + "blocks": [], + "samplers": [], + "record": null, + "name": "builtin-clear-stencil|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.json b/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.json new file mode 100644 index 0000000..d989195 --- /dev/null +++ b/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "gancao_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.541224, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.mp3 b/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.mp3 new file mode 100644 index 0000000..df3a032 Binary files /dev/null and b/library/imports/c1/c1fcf0fb-c572-4800-9848-1e78718fdabf.mp3 differ diff --git a/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.json b/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.png b/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.png new file mode 100644 index 0000000..746e92b Binary files /dev/null and b/library/imports/c2/c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f.png differ diff --git a/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.json b/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.json new file mode 100644 index 0000000..5ea8cf6 --- /dev/null +++ b/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "mudan_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.48898, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.mp3 b/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.mp3 new file mode 100644 index 0000000..912e0eb Binary files /dev/null and b/library/imports/c2/c2b82d71-e775-43c4-9ba6-650d7ac46c31.mp3 differ diff --git a/library/imports/c4/c4480a0a-6ac5-443f-8b40-361a14257fc8.json b/library/imports/c4/c4480a0a-6ac5-443f-8b40-361a14257fc8.json new file mode 100644 index 0000000..68bc654 --- /dev/null +++ b/library/imports/c4/c4480a0a-6ac5-443f-8b40-361a14257fc8.json @@ -0,0 +1,16 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-phong", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "abc2cb62-7852-4525-a90d-d474487b88f2" + }, + "_techniqueData": { + "0": { + "defines": { + "USE_SPECULAR": true + } + } + } +} \ No newline at end of file diff --git a/library/imports/c5/c5692be7-8703-45e4-9f67-23b54d290356.js b/library/imports/c5/c5692be7-8703-45e4-9f67-23b54d290356.js new file mode 100644 index 0000000..21046fe --- /dev/null +++ b/library/imports/c5/c5692be7-8703-45e4-9f67-23b54d290356.js @@ -0,0 +1,2651 @@ +"use strict"; +cc._RF.push(module, 'c5692vnhwNF5J9nI7VNKQNW', 'GameConfig'); +// Script/module/Config/GameConfig.ts + +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GameConfig = void 0; +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var GameConfig = /** @class */ (function () { + function GameConfig() { + } + GameConfig_1 = GameConfig; + Object.defineProperty(GameConfig, "Instance", { + //游戏内信息 + get: function () { + if (this._instance == null) { + this._instance = new GameConfig_1(); + } + return this._instance; + }, + enumerable: false, + configurable: true + }); + //getSeedRandom + GameConfig.init = function (Authentication) { + this.CLICK_init(); + this.LEVEL_INFO_init(); + this.GM_INFO_init(); + var self = this; + cc.resources.load('Json/CLICK_DATA', function (err, res) { + if (err) { + return; + } + var jsonData = res.json; + self.CLICK_DATA = jsonData["data"]; + }); + cc.resources.load('Json/LEVEL_INFO', function (err, res) { + if (err) { + return; + } + var jsonData = res.json; + self.LEVEL_INFO = jsonData["data"]; + self.Change_Level(); + }); + cc.resources.load('Json/GM_INFO', function (err, res) { + if (err) { + if (!Authentication) + self.Authentication(); + return; + } + var jsonData = res.json; + self.GM_INFO = jsonData["data"]; + self.setCode(self.getKey("scode")); + cc.fx.GameTool.getCustom(false); + if (!Authentication) + self.Authentication(); + }); + //GAME_DATA 废弃了,暂时不删除以防后面修改回 一整局传一次 + self.GAME_DATA = []; + }; + //数据备用 + GameConfig.GM_INFO_init = function () { + this.GM_INFO = { + // isEnd: false, + mean_Time: 0, + total: 0, + currSeed: 200000, + gameId: "100014", + userId: 200139, + scode: "", + guide: true, + url: "https://api.sparkus.cn", + success: false, + matchId: null, + custom: 0, + level: 0, + stepTimeList: 0, + successList: [], + gameTime: 8, + igniteCount: 0, + }; + this.setCode(this.getKey("scode")); + }; + GameConfig.GM_INFO_SET = function (key, value) { + this.GM_INFO[key] = value; + }; + GameConfig.CLICK_init = function () { + this.CLICK_DATA = + { + type: 1, + success: false, + round: 0, + choice: 0, + rightChoice: 0, + item: "", + roundType: 0, + stepTime: 0, + levelConfig: 0, + ignite: false, + igniteCount: 0, + }; + }; + GameConfig.CLICK_SET = function (key, value) { + this.CLICK_DATA[key] = value; + }; + GameConfig.LEVEL_INFO_init = function () { + this.LEVEL_INFO = [ + { + "custom": [ + { + "id": 1000, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1001, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 1002, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1003, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1004, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1006, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 1007, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1009, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1010, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 1011, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1012, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 1013, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 1014, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 1015, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 1016, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 1017, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 1018, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 1019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1020, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 1021, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 1022, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1023, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 1026, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1027, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 1028, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 1029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 1030, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1031, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1032, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 1033, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 1034, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 1035, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 1036, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 1037, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 1038, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 1039, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 1040, + "item": "renshen", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 2000, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2001, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2002, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 2003, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2004, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 2005, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 2006, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2007, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 2008, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2009, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 2010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2011, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2012, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2013, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 2015, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2016, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2017, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 2018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 2019, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2020, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2021, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 2022, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 2023, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 2024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 2025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 2026, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 2027, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 2028, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 2029, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 2030, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 2031, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 2032, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2033, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2034, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2035, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 2036, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 2037, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 2038, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 2039, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 2040, + "item": "zhuye", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 3000, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 3001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 3002, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 3003, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 3004, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3005, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3006, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3007, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 3009, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3010, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 3011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 3012, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3014, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 3015, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 3016, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 3017, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3018, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3019, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3021, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3022, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3023, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 3024, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 3025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 3026, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 3027, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 3028, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 3029, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 3030, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 3031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 3032, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 3033, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3034, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 3035, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3036, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 3037, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 3038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 3039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 3040, + "item": "mudan", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 4000, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4001, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 4003, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 4005, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 4006, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 4007, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4008, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 4009, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4010, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 4012, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 4013, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 4014, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4016, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 4017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 4018, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 4019, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4020, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 4021, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 4022, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4024, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 4025, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 4026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 4027, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 4028, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 4029, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4030, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 4031, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 4032, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 4033, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 4034, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 4035, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 4036, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 4037, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 4038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 4039, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 4040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 5000, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5001, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 5002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 5003, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5004, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 5005, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5006, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 5007, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 5008, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5009, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 5010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5011, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 5012, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 5013, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5014, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 5015, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 5016, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5017, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 5018, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5019, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5020, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5021, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5022, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 5023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5024, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 5025, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 5026, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 5027, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 5028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 5029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 5031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 5032, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 5033, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 5034, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 5035, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 5036, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5037, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 5038, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 5039, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 5040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 6000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6001, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6002, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6003, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6004, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 6005, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6006, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 6007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6009, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6010, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6011, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 6012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 6013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 6014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 6018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 6019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6020, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 6021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 6022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 6023, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 6024, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 6025, + "item": "jinjie", + "type": 2, + "flammable": 0 + }, + { + "id": 6026, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 6027, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 6028, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 6029, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 6030, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 6031, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 6032, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 6033, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 6034, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 6035, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 6036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 6037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 6038, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 6039, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 6040, + "item": "cha", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 7000, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7001, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7003, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 7004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 7006, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7007, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7008, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7009, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 7010, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 7011, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7012, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7013, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 7014, + "item": "jinju", + "type": 2, + "flammable": 0 + }, + { + "id": 7015, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 7016, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 7017, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7018, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7019, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 7020, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7021, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 7022, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 7023, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 7025, + "item": "chixiaodou", + "type": 1, + "flammable": 0 + }, + { + "id": 7026, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7027, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 7028, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 7029, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 7030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 7031, + "item": "ganjiang", + "type": 2, + "flammable": 0 + }, + { + "id": 7032, + "item": "taozi", + "type": 2, + "flammable": 0 + }, + { + "id": 7033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 7034, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 7035, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 7036, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 7037, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 7038, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 7039, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 7040, + "item": "cha", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 8000, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 8001, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8002, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8003, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8004, + "item": "zhuye", + "type": 2, + "flammable": 0 + }, + { + "id": 8005, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8006, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8007, + "item": "longyan", + "type": 2, + "flammable": 0 + }, + { + "id": 8008, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8009, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8010, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 8011, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 8012, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8013, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 8014, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8015, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 8016, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8018, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8019, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8020, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8021, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8022, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 8023, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 8024, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 8025, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 8026, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 8027, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 8028, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 8029, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 8030, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 8031, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 8032, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 8033, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 8034, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 8035, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 8036, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 8037, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 8038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 8039, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 8040, + "item": "gancao", + "type": 2, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 9000, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9001, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 9002, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 9003, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9004, + "item": "danshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9005, + "item": "moli", + "type": 2, + "flammable": 0 + }, + { + "id": 9006, + "item": "pugongying", + "type": 1, + "flammable": 0 + }, + { + "id": 9007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9008, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 9009, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9010, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9011, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 9012, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9013, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 9014, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9015, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9016, + "item": "jinju", + "type": 1, + "flammable": 0 + }, + { + "id": 9017, + "item": "pugongying", + "type": 2, + "flammable": 0 + }, + { + "id": 9018, + "item": "chixiaodou", + "type": 2, + "flammable": 0 + }, + { + "id": 9019, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 9020, + "item": "jingjie", + "type": 2, + "flammable": 0 + }, + { + "id": 9021, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9022, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9023, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9024, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 9025, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9026, + "item": "moli", + "type": 1, + "flammable": 0 + }, + { + "id": 9027, + "item": "dazao", + "type": 2, + "flammable": 0 + }, + { + "id": 9028, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 9029, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 9030, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 9031, + "item": "muchai", + "type": 1, + "flammable": 1 + }, + { + "id": 9032, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 9033, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 9034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 9035, + "item": "lizhi", + "type": 2, + "flammable": 0 + }, + { + "id": 9036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 9037, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 9038, + "item": "cha", + "type": 1, + "flammable": 0 + }, + { + "id": 9039, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 9040, + "item": "danggui", + "type": 1, + "flammable": 0 + } + ] + }, + { + "custom": [ + { + "id": 10000, + "item": "gouqi", + "type": 1, + "flammable": 0 + }, + { + "id": 10001, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10002, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10003, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10004, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10005, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10006, + "item": "gouqi", + "type": 2, + "flammable": 0 + }, + { + "id": 10007, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10008, + "item": "dazao", + "type": 1, + "flammable": 0 + }, + { + "id": 10009, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10010, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10011, + "item": "longyan", + "type": 1, + "flammable": 0 + }, + { + "id": 10012, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10013, + "item": "putao", + "type": 2, + "flammable": 0 + }, + { + "id": 10014, + "item": "renshen", + "type": 1, + "flammable": 0 + }, + { + "id": 10015, + "item": "baishao", + "type": 1, + "flammable": 0 + }, + { + "id": 10016, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10017, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10018, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10019, + "item": "lizi", + "type": 2, + "flammable": 0 + }, + { + "id": 10020, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10021, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10022, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10023, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10024, + "item": "gancao", + "type": 2, + "flammable": 0 + }, + { + "id": 10025, + "item": "mudan", + "type": 2, + "flammable": 0 + }, + { + "id": 10026, + "item": "zhuye", + "type": 1, + "flammable": 0 + }, + { + "id": 10027, + "item": "danshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10028, + "item": "renshen", + "type": 2, + "flammable": 0 + }, + { + "id": 10029, + "item": "danggui", + "type": 1, + "flammable": 0 + }, + { + "id": 10030, + "item": "baishao", + "type": 2, + "flammable": 0 + }, + { + "id": 10031, + "item": "muchai", + "type": 2, + "flammable": 1 + }, + { + "id": 10032, + "item": "ganjiang", + "type": 1, + "flammable": 0 + }, + { + "id": 10033, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10034, + "item": "cha", + "type": 2, + "flammable": 0 + }, + { + "id": 10035, + "item": "mulan", + "type": 2, + "flammable": 0 + }, + { + "id": 10036, + "item": "danggui", + "type": 2, + "flammable": 0 + }, + { + "id": 10037, + "item": "taozi", + "type": 1, + "flammable": 0 + }, + { + "id": 10038, + "item": "lizhi", + "type": 1, + "flammable": 0 + }, + { + "id": 10039, + "item": "putao", + "type": 1, + "flammable": 0 + }, + { + "id": 10040, + "item": "gouqi", + "type": 2, + "flammable": 0 + } + ] + } + ]; + }; + //根據简易版本修改关卡信息 + GameConfig.Change_Level = function () { + for (var i = 0; i < this.LEVEL_INFO.length; i++) { + for (var j = 0; j < this.LEVEL_INFO[i].custom.length; j++) { + if (this.LEVEL_INFO[i].custom[j].item == "muchai") { + this.LEVEL_INFO[i].custom.splice(j, 1); + j--; + } + } + } + }; + GameConfig.setCode = function (code) { + this.GM_INFO.scode = code; + }; + GameConfig.getKey = function (key) { + var reg = new RegExp('(^|&)' + key + '=([^&]*)(&|$)', 'i'); + var r = window.location.search.substr(1).match(reg); + if (r != null) { + return unescape(r[2]); + } + return ""; + }; + GameConfig.Authentication = function () { + cc.fx.GameTool.Authentication(); + }; + var GameConfig_1; + //所有控制信息都通过GameAppStart内控制 + GameConfig._instance = null; + GameConfig = GameConfig_1 = __decorate([ + ccclass('GameConfig') + ], GameConfig); + return GameConfig; +}()); +exports.GameConfig = GameConfig; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/c5/c5692be7-8703-45e4-9f67-23b54d290356.js.map b/library/imports/c5/c5692be7-8703-45e4-9f67-23b54d290356.js.map new file mode 100644 index 0000000..a4bcf37 --- /dev/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CAAC,CAAC;QAC3D,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,IAAI,EAAE;YACX,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACzB;QACD,OAAO,EAAE,CAAC;IACd,CAAC;IAEM,yBAAc,GAArB;QACI,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;IACpC,CAAC;;IArnFD,0BAA0B;IACX,oBAAS,GAAgB,IAAI,CAAC;IAFpC,UAAU;QADtB,OAAO,CAAC,YAAY,CAAC;OACT,UAAU,CAunFtB;IAAD,iBAAC;CAvnFD,AAunFC,IAAA;AAvnFY,gCAAU","file":"","sourceRoot":"/","sourcesContent":["import { WeChat } from \"../Share/share\";\r\nimport { GameTool } from \"../Tool/GameTool\";\r\n\r\n\r\nconst { ccclass, property } = cc._decorator;\r\n@ccclass('GameConfig')\r\nexport class GameConfig {\r\n //所有控制信息都通过GameAppStart内控制\r\n private static _instance : GameConfig = null;\r\n //用于盛放埋点数据上传,每次上传后清空\r\n static CLICK_DATA: {\r\n type: number; //上传数据类型\r\n success: boolean; //此局游戏正确与否\r\n round: number; //回合数\r\n choice: number; //玩家选择,0:时间截止前未做选择,1,2,3:三个按钮从上到下依次对应\r\n rightChoice: number; //本轮的按正确答案,含义与choice相同\r\n item: string; //此关展示的物品\r\n roundType: number; //展示方式。1:图像 2:音频\r\n stepTime: number; //玩家每一关用时毫秒数 音频关卡从播放结束开始计时\r\n levelConfig: number; //使用的是哪一套关卡配置\r\n ignite: boolean; //玩家此轮有没有点火\r\n igniteCount: number; //玩家总计成功点火数\r\n };\r\n static GAME_DATA: any[];\r\n //关卡数据\r\n static LEVEL_INFO: {\r\n custom: {\r\n id: number; //植物ID\r\n item: string; //植物名稱\r\n type: number; //種類1为头像2是音频\r\n flammable: number; //是否有柴火\r\n }[];\r\n }[];\r\n static GM_INFO: {\r\n // isEnd: false,\r\n mean_Time: number; //平均放箭速度\r\n total: number; //总共对的个数\r\n currSeed: number; //用于随机数种子\r\n gameId: string; //游戏ID\r\n userId: number; //用户ID\r\n scode: string, //用户code,从网页后缀获取\r\n guide: boolean; //是否有引导\r\n url: string; //访问域名\r\n success: boolean; //用户游戏成功与否\r\n matchId: any; //用于埋点上传的ID\r\n custom: number; //用于测试跳关卡\r\n level: number; //具体游戏内进行到第几步 \r\n stepTimeList: number; //整局游戏用时,由于涉及场景切换,数据需要保留\r\n successList: any[]; //整局胜负\r\n gameTime: number; //单次游戏倒计时时间\r\n igniteCount: number; //玩家总计成功点火数\r\n \r\n };\r\n //游戏内信息\r\n\r\n\r\n\r\n static get Instance()\r\n {\r\n if (this._instance == null)\r\n {\r\n this._instance = new GameConfig();\r\n }\r\n return this._instance;\r\n }\r\n //getSeedRandom\r\n static init(Authentication){\r\n this.CLICK_init();\r\n this.LEVEL_INFO_init();\r\n this.GM_INFO_init();\r\n var self = this;\r\n cc.resources.load('Json/CLICK_DATA', (err: any, res: cc.JsonAsset) => {\r\n if (err) {\r\n return;\r\n }\r\n let jsonData: object = res.json!;\r\n self.CLICK_DATA = jsonData[\"data\"];\r\n })\r\n cc.resources.load('Json/LEVEL_INFO', (err: any, res: cc.JsonAsset) => {\r\n if (err) {\r\n return;\r\n }\r\n let jsonData: object = res.json!;\r\n self.LEVEL_INFO = jsonData[\"data\"];\r\n self.Change_Level();\r\n })\r\n cc.resources.load('Json/GM_INFO', (err: any, res: cc.JsonAsset) => {\r\n if (err) {\r\n if(!Authentication) self.Authentication();\r\n return;\r\n }\r\n \r\n let jsonData: object = res.json!;\r\n self.GM_INFO = jsonData[\"data\"];\r\n self.setCode(self.getKey(\"scode\"));\r\n cc.fx.GameTool.getCustom(false);\r\n if(!Authentication) self.Authentication();\r\n })\r\n\r\n //GAME_DATA 废弃了,暂时不删除以防后面修改回 一整局传一次\r\n self.GAME_DATA = [\r\n ]\r\n }\r\n \r\n //数据备用\r\n static GM_INFO_init() {\r\n this.GM_INFO = {\r\n // isEnd: false,\r\n mean_Time: 0, //平均放箭速度\r\n total: 0, //总共对的个数\r\n currSeed: 200000, //用于随机数种子\r\n gameId: \"100014\", //游戏ID\r\n userId: 200139, //用户ID\r\n scode: \"\", //用户code,从网页后缀获取\r\n guide: true, //是否有引导\r\n url: \"https://api.sparkus.cn\",//访问域名\r\n success: false, //用户游戏成功与否\r\n matchId: null, //用于埋点上传的ID\r\n custom: 0, //用于测试跳关卡\r\n level: 0, //具体游戏内进行到第几步 \r\n stepTimeList:0, //整局游戏用时,由于涉及场景切换,数据需要保留\r\n successList:[], //整局胜负\r\n gameTime:8,\r\n igniteCount: 0, //玩家总计成功点火数\r\n };\r\n this.setCode(this.getKey(\"scode\"));\r\n }\r\n static GM_INFO_SET(key,value) {\r\n\r\n this.GM_INFO[key] = value;\r\n }\r\n static CLICK_init() {\r\n this.CLICK_DATA =\r\n {\r\n type: 1, //上传数据类型\r\n success: false, //此局游戏正确与否\r\n round: 0, //回合数\r\n choice: 0, //玩家选择,0:时间截止前未做选择,1,2,3:三个按钮从上到下依次对应\r\n rightChoice: 0, //本轮的按正确答案,含义与choice相同\r\n item: \"\", //此关展示的物品\r\n roundType: 0, //展示方式。1:图像 2:音频\r\n stepTime: 0, //玩家每一关用时毫秒数 音频关卡从播放结束开始计时\r\n levelConfig: 0, //使用的是哪一套关卡配置\r\n ignite: false, //玩家此轮有没有点火\r\n igniteCount: 0, //玩家总计成功点火数\r\n }\r\n }\r\n\r\n static CLICK_SET(key,value) {\r\n this.CLICK_DATA[key] = value;\r\n }\r\n\r\n static LEVEL_INFO_init() {\r\n this.LEVEL_INFO = [\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 1000,\r\n \"item\": \"danshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1001,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1002,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1003,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1004,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1005,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1006,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1007,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1008,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1009,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1010,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1011,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1012,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1013,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1014,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1015,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 1016,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1017,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1018,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1019,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1020,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1021,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1022,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1023,\r\n \"item\": \"lizhi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1024,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1025,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1026,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1027,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1028,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1029,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1030,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1031,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1032,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1033,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1034,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1035,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 1036,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1037,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1038,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1039,\r\n \"item\": \"lizhi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 1040,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 2000,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2001,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2002,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2003,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2004,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 2005,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2006,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2007,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2008,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2009,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2010,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2011,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2012,\r\n \"item\": \"lizhi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2013,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2014,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2015,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2016,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2017,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2018,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2019,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2020,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2021,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2022,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2023,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2024,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 2025,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2026,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2027,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2028,\r\n \"item\": \"lizhi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2029,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2030,\r\n \"item\": \"danshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2031,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2032,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2033,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2034,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2035,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2036,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2037,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2038,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2039,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 2040,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 3000,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3001,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3002,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3003,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3004,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3005,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3006,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3007,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3008,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3009,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3010,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3011,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3012,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3013,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3014,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3015,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3016,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3017,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 3018,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3019,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3020,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3021,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3022,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3023,\r\n \"item\": \"taozi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3024,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3025,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3026,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3027,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 3028,\r\n \"item\": \"jinju\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3029,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3030,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3031,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3032,\r\n \"item\": \"danshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3033,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3034,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3035,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3036,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3037,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3038,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3039,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 3040,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 4000,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4001,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4002,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4003,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4004,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4005,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4006,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4007,\r\n \"item\": \"ganjiang\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4008,\r\n \"item\": \"taozi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4009,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4010,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4011,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4012,\r\n \"item\": \"zhuye\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4013,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 4014,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4015,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4016,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4017,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4018,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4019,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4020,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4021,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4022,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4023,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4024,\r\n \"item\": \"moli\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4025,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4026,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4027,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4028,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4029,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4030,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4031,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4032,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4033,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4034,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 4035,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4036,\r\n \"item\": \"ganjiang\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4037,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4038,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4039,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 4040,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 5000,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5001,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5002,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5003,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5004,\r\n \"item\": \"longyan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5005,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5006,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5007,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5008,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5009,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5010,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5011,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5012,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5013,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5014,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5015,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5016,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 5017,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5018,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5019,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5020,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5021,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5022,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5023,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5024,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5025,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5026,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5027,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5028,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5029,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5030,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5031,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 5032,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5033,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5034,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5035,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5036,\r\n \"item\": \"danshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5037,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5038,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5039,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 5040,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 6000,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6001,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6002,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6003,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6004,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6005,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6006,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6007,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6008,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6009,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6010,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6011,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6012,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 6013,\r\n \"item\": \"jinju\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6014,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6015,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6016,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6017,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6018,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6019,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6020,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6021,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6022,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6023,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6024,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6025,\r\n \"item\": \"jinjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6026,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6027,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6028,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6029,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6030,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 6031,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6032,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6033,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6034,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6035,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6036,\r\n \"item\": \"zhuye\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6037,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6038,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6039,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 6040,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 7000,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7001,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7002,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7003,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7004,\r\n \"item\": \"zhuye\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7005,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7006,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7007,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7008,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7009,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7010,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7011,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7012,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7013,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7014,\r\n \"item\": \"jinju\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7015,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 7016,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7017,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7018,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7019,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7020,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7021,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7022,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7023,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7024,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7025,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7026,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7027,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7028,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7029,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7030,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7031,\r\n \"item\": \"ganjiang\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7032,\r\n \"item\": \"taozi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7033,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7034,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7035,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7036,\r\n \"item\": \"zhuye\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7037,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 7038,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7039,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 7040,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 8000,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8001,\r\n \"item\": \"moli\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8002,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8003,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8004,\r\n \"item\": \"zhuye\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8005,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8006,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8007,\r\n \"item\": \"longyan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8008,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8009,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8010,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8011,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8012,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 8013,\r\n \"item\": \"jinju\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8014,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8015,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8016,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8017,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8018,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8019,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8020,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8021,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8022,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8023,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8024,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8025,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8026,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8027,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8028,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8029,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8030,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8031,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8032,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8033,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8034,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 8035,\r\n \"item\": \"moli\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8036,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8037,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8038,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8039,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 8040,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 9000,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9001,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9002,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9003,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9004,\r\n \"item\": \"danshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9005,\r\n \"item\": \"moli\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9006,\r\n \"item\": \"pugongying\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9007,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9008,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9009,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9010,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9011,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9012,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9013,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9014,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9015,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9016,\r\n \"item\": \"jinju\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9017,\r\n \"item\": \"pugongying\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9018,\r\n \"item\": \"chixiaodou\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9019,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9020,\r\n \"item\": \"jingjie\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9021,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9022,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9023,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9024,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 9025,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9026,\r\n \"item\": \"moli\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9027,\r\n \"item\": \"dazao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9028,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9029,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9030,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9031,\r\n \"item\": \"muchai\",\r\n \"type\": 1,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 9032,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9033,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9034,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9035,\r\n \"item\": \"lizhi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9036,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9037,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9038,\r\n \"item\": \"cha\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9039,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 9040,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n }\r\n ]\r\n },\r\n {\r\n \"custom\": [\r\n {\r\n \"id\": 10000,\r\n \"item\": \"gouqi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10001,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10002,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10003,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10004,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10005,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10006,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10007,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10008,\r\n \"item\": \"dazao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10009,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10010,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10011,\r\n \"item\": \"longyan\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10012,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10013,\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10014,\r\n \"item\": \"renshen\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10015,\r\n \"item\": \"baishao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10016,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10017,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10018,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10019,\r\n \"item\": \"lizi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10020,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10021,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10022,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10023,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 10024,\r\n \"item\": \"gancao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10025,\r\n \"item\": \"mudan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10026,\r\n \"item\": \"zhuye\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10027,\r\n \"item\": \"danshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10028,\r\n \"item\": \"renshen\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10029,\r\n \"item\": \"danggui\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10030,\r\n \"item\": \"baishao\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10031,\r\n \"item\": \"muchai\",\r\n \"type\": 2,\r\n \"flammable\": 1\r\n },\r\n {\r\n \"id\": 10032,\r\n \"item\": \"ganjiang\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10033,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10034,\r\n \"item\": \"cha\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10035,\r\n \"item\": \"mulan\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10036,\r\n \"item\": \"danggui\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10037,\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10038,\r\n \"item\": \"lizhi\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10039,\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"flammable\": 0\r\n },\r\n {\r\n \"id\": 10040,\r\n \"item\": \"gouqi\",\r\n \"type\": 2,\r\n \"flammable\": 0\r\n }\r\n ]\r\n }\r\n ]\r\n \r\n }\r\n //根據简易版本修改关卡信息\r\n static Change_Level() {\r\n for(let i=0; i= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var ItemRender = /** @class */ (function (_super) { + __extends(ItemRender, _super); + function ItemRender() { + var _this = _super !== null && _super.apply(this, arguments) || this; + /**数据 */ + _this.data = null; + /**索引 0表示第一项*/ + _this.itemIndex = 0; + return _this; + } + /**数据改变时调用 */ + ItemRender.prototype.dataChanged = function () { + var name = cc.fx.GameTool.subName(this.data.name, 6); + this.node.getChildByName("rankLab").getComponent(cc.Label).string = this.data.rank + ""; + this.node.getChildByName("nameLab").getComponent(cc.Label).string = name + ""; + this.node.getChildByName("totalLab").getComponent(cc.Label).string = this.data.total + "%"; + var timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time); + this.node.getChildByName("timeLab").getComponent(cc.Label).string = timeTemp + ""; + this.node.getChildByName("rank").getChildByName("one").active = false; + this.node.getChildByName("rank").getChildByName("two").active = false; + this.node.getChildByName("rank").getChildByName("three").active = false; + if (this.data.rank == 1) { + this.node.getChildByName("rank").getChildByName("one").active = true; + this.node.getChildByName("rankLab").active = false; + } + else if (this.data.rank == 2) { + this.node.getChildByName("rank").getChildByName("two").active = true; + this.node.getChildByName("rankLab").active = false; + } + else if (this.data.rank == 3) { + this.node.getChildByName("rank").getChildByName("three").active = true; + this.node.getChildByName("rankLab").active = false; + } + else { + this.node.getChildByName("rankLab").active = true; + } + this.setPic(); + }; + ItemRender.prototype.setPic = function () { + var _this = this; + this.node.getChildByName("pic").getChildByName("icon").active = false; + this.node.getChildByName("pic").getChildByName("pic").active = false; + var self = this; + var url = this.data.pic; + fetch(url) + .then(function (response) { + return response.headers.get('Content-Length'); + }) + .then(function (errNo) { + // console.log(this.data.rank,'X-Info:', errNo); // 输出X-ErrNo的值 + if (errNo == "5093") { + // console.log(this.data.rank,"没头像"); + _this.node.getChildByName("pic").getChildByName("icon").active = true; + } + }) + .catch(function (error) { + // console.error('Error fetching X-Info:', error); + }); + cc.assetManager.loadRemote(url, { ext: '.png' }, function (err, texture) { + if (texture) { + _this.node.getChildByName("pic").getChildByName("pic").active = true; + var sprite = _this.node.getChildByName("pic").getChildByName("pic").getComponent(cc.Sprite); + sprite.spriteFrame = new cc.SpriteFrame(texture); + // console.log(this.data.rank,"设置头像成功",err); + } + else { + // console.log("设置头像失败",url); + // console.log(err,texture) + } + }); + }; + ItemRender = __decorate([ + ccclass + ], ItemRender); + return ItemRender; +}(cc.Component)); +exports.default = ItemRender; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/ca/ca0f9934-a015-436e-9402-f8e30d4c5de6.js.map b/library/imports/ca/ca0f9934-a015-436e-9402-f8e30d4c5de6.js.map new file mode 100644 index 0000000..5a8a663 --- /dev/null +++ b/library/imports/ca/ca0f9934-a015-436e-9402-f8e30d4c5de6.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\RankList\\ItemRender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGM,IAAA,KAAwB,EAAE,CAAC,UAAU,EAAnC,OAAO,aAAA,EAAE,QAAQ,cAAkB,CAAC;AAG5C;IAAwC,8BAAY;IAApD;QAAA,qEAqEC;QApEG,QAAQ;QACD,UAAI,GAAO,IAAI,CAAC;QACvB,cAAc;QACP,eAAS,GAAU,CAAC,CAAC;;IAiEhC,CAAC;IA/DG,aAAa;IACN,gCAAW,GAAlB;QACI,IAAI,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAC,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACxF,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG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AC,UAAA,KAAK;YACR,kDAAkD;QACtD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,EAAC,GAAG,EAAC,MAAM,EAAC,EAAC,UAAC,GAAG,EAAE,OAAoB;YACnE,IAAG,OAAO,EAAC;gBACP,KAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,MAAM,GAAE,IAAI,CAAC;gBACnE,IAAI,MAAM,GAAG,KAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;gBAC3F,MAAM,CAAC,WAAW,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBACjD,4CAA4C;aAC/C;iBACG;gBACA,6BAA6B;gBAC7B,2BAA2B;aAC9B;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IAlEgB,UAAU;QAD9B,OAAO;OACa,UAAU,CAqE9B;IAAD,iBAAC;CArED,AAqEC,CArEuC,EAAE,CAAC,SAAS,GAqEnD;kBArEoB,UAAU","file":"","sourceRoot":"/","sourcesContent":["\r\nimport List, { ListType } from \"./List\";\r\n\r\nconst { ccclass, property } = cc._decorator;\r\n\r\n@ccclass\r\nexport default class ItemRender extends cc.Component {\r\n /**数据 */\r\n public data:any = null;\r\n /**索引 0表示第一项*/\r\n public itemIndex:number = 0;\r\n\r\n /**数据改变时调用 */\r\n public dataChanged(){\r\n let name = cc.fx.GameTool.subName(this.data.name,6);\r\n this.node.getChildByName(\"rankLab\").getComponent(cc.Label).string = this.data.rank + \"\";\r\n this.node.getChildByName(\"nameLab\").getComponent(cc.Label).string = name + \"\";\r\n this.node.getChildByName(\"totalLab\").getComponent(cc.Label).string = this.data.total + \"%\";\r\n let timeTemp = cc.fx.GameTool.getTimeShenNong(this.data.time);\r\n this.node.getChildByName(\"timeLab\").getComponent(cc.Label).string = timeTemp + \"\";\r\n this.node.getChildByName(\"rank\").getChildByName(\"one\").active = false;\r\n this.node.getChildByName(\"rank\").getChildByName(\"two\").active = false;\r\n this.node.getChildByName(\"rank\").getChildByName(\"three\").active = false;\r\n if(this.data.rank == 1){\r\n this.node.getChildByName(\"rank\").getChildByName(\"one\").active = true;\r\n this.node.getChildByName(\"rankLab\").active = false;\r\n }\r\n else if(this.data.rank == 2){\r\n this.node.getChildByName(\"rank\").getChildByName(\"two\").active = true;\r\n this.node.getChildByName(\"rankLab\").active = false;\r\n }\r\n else if(this.data.rank == 3){\r\n this.node.getChildByName(\"rank\").getChildByName(\"three\").active = true;\r\n this.node.getChildByName(\"rankLab\").active = false;\r\n }else{\r\n this.node.getChildByName(\"rankLab\").active = true;\r\n }\r\n this.setPic();\r\n } \r\n \r\n public setPic(){\r\n this.node.getChildByName(\"pic\").getChildByName(\"icon\").active = false;\r\n this.node.getChildByName(\"pic\").getChildByName(\"pic\").active= false;\r\n var self = this;\r\n let url = this.data.pic;\r\n fetch(url)\r\n .then(response => {\r\n return response.headers.get('Content-Length');\r\n })\r\n\r\n .then(errNo => {\r\n // console.log(this.data.rank,'X-Info:', errNo); // 输出X-ErrNo的值\r\n if(errNo == \"5093\"){\r\n // console.log(this.data.rank,\"没头像\");\r\n this.node.getChildByName(\"pic\").getChildByName(\"icon\").active = true;\r\n }\r\n })\r\n .catch(error => {\r\n // console.error('Error fetching X-Info:', error);\r\n });\r\n cc.assetManager.loadRemote(url, {ext:'.png'},(err, texture:cc.Texture2D) => {\r\n if(texture){\r\n this.node.getChildByName(\"pic\").getChildByName(\"pic\").active= true;\r\n var sprite = this.node.getChildByName(\"pic\").getChildByName(\"pic\").getComponent(cc.Sprite);\r\n sprite.spriteFrame = new cc.SpriteFrame(texture);\r\n // console.log(this.data.rank,\"设置头像成功\",err);\r\n }\r\n else{\r\n // console.log(\"设置头像失败\",url);\r\n // console.log(err,texture)\r\n }\r\n })\r\n }\r\n\r\n\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/ca/ca25e50f-5fc1-42b4-996d-d022ebfd6010.json b/library/imports/ca/ca25e50f-5fc1-42b4-996d-d022ebfd6010.json new file mode 100644 index 0000000..0caf54c --- /dev/null +++ b/library/imports/ca/ca25e50f-5fc1-42b4-996d-d022ebfd6010.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_taozi", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1217, + 382, + 382 + ], + "offset": [ + -16, + -15 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ca/ca8401fe-ad6e-41a8-bd46-8e3e4e9945be.json b/library/imports/ca/ca8401fe-ad6e-41a8-bd46-8e3e4e9945be.json new file mode 100644 index 0000000..33c871e --- /dev/null +++ b/library/imports/ca/ca8401fe-ad6e-41a8-bd46-8e3e4e9945be.json @@ -0,0 +1,875 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "pageview", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "pageview", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 20 + } + ], + "_active": true, + "_components": [ + { + "__id__": 22 + } + ], + "_prefab": { + "__id__": 24 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 350 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "background", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 350 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "d4995IHzA9DsKLlMTyCB0bq", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "view", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 6 + } + ], + "_active": true, + "_components": [ + { + "__id__": 18 + } + ], + "_prefab": { + "__id__": 19 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 350 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "content", + "_objFlags": 512, + "_parent": { + "__id__": 5 + }, + "_children": [ + { + "__id__": 7 + }, + { + "__id__": 10 + }, + { + "__id__": 13 + } + ], + "_active": true, + "_components": [ + { + "__id__": 16 + } + ], + "_prefab": { + "__id__": 17 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1200, + "height": 350 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -200, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "page_1", + "_objFlags": 512, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 8 + } + ], + "_prefab": { + "__id__": 9 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 200, + "b": 200, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 290 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 200, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 7 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "e4b25otxWBLVpmoEY72dW1B", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "page_2", + "_objFlags": 512, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 11 + } + ], + "_prefab": { + "__id__": 12 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 200, + "g": 255, + "b": 200, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 290 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 600, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 10 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "0460dpbuuVL6IrBc9SGei8F", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "page_3", + "_objFlags": 512, + "_parent": { + "__id__": 6 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 15 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 200, + "g": 200, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 400, + "height": 290 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 1000, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9bbda31e-ad49-43c9-aaf2-f7d9896bac69" + }, + "_type": 1, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "7a1b8sccmBN1Jj/ZHKaE3JK", + "sync": false + }, + { + "__type__": "cc.Layout", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_layoutSize": { + "__type__": "cc.Size", + "width": 1200, + "height": 350 + }, + "_resize": 1, + "_N$layoutType": 1, + "_N$cellSize": { + "__type__": "cc.Size", + "width": 40, + "height": 40 + }, + "_N$startAxis": 0, + "_N$paddingLeft": 0, + "_N$paddingRight": 0, + "_N$paddingTop": 0, + "_N$paddingBottom": 0, + "_N$spacingX": 0, + "_N$spacingY": 15, + "_N$verticalDirection": 1, + "_N$horizontalDirection": 0, + "_N$affectedByScale": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "47588+/BXNHEK1F1sC9uHbf", + "sync": false + }, + { + "__type__": "cc.Mask", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_spriteFrame": null, + "_type": 0, + "_segments": 64, + "_N$alphaThreshold": 0, + "_N$inverted": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "5b1864GVRZEC7Qc8fzYUge7", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "indicator", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": { + "__id__": 23 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 100, + "height": 27 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + -160, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.PageViewIndicator", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 20 + }, + "_enabled": true, + "_layout": null, + "_pageView": { + "__id__": 22 + }, + "_indicators": [], + "spriteFrame": { + "__uuid__": "c9fa51ff-3f01-4601-8f80-325d1b11dab7" + }, + "direction": 0, + "cellSize": { + "__type__": "cc.Size", + "width": 10, + "height": 10 + }, + "spacing": 10, + "_id": "" + }, + { + "__type__": "cc.PageView", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "horizontal": true, + "vertical": true, + "inertia": true, + "brake": 0.5, + "elastic": true, + "bounceDuration": 0.5, + "scrollEvents": [], + "cancelInnerEvents": true, + "_N$content": { + "__id__": 6 + }, + "content": { + "__id__": 6 + }, + "scrollThreshold": 0.5, + "autoPageTurningThreshold": 100, + "pageTurningEventTiming": 0.1, + "pageTurningSpeed": 0.3, + "pageEvents": [], + "_N$sizeMode": 0, + "_N$direction": 0, + "_N$indicator": { + "__id__": 21 + }, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "c3bcdZElclEBJbaV6uqwUJx", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be" + }, + "fileId": "52f01L6ceBGDrJGf8m2N/2X", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/cd/cd33edea-55f5-46c2-958d-357a01384a36.json b/library/imports/cd/cd33edea-55f5-46c2-958d-357a01384a36.json new file mode 100644 index 0000000..73d7484 --- /dev/null +++ b/library/imports/cd/cd33edea-55f5-46c2-958d-357a01384a36.json @@ -0,0 +1,177 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "particlesystem", + "_objFlags": 0, + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "ParticleSystem", + "_objFlags": 0, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_cascadeOpacityEnabled": true, + "_parent": null, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_children": [], + "_skewX": 0, + "_skewY": 0, + "_localZOrder": 0, + "_globalZOrder": 0, + "_tag": -1, + "_opacityModifyRGB": false, + "_reorderChildDirty": false, + "_id": "", + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.ParticleSystem", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_custom": false, + "_file": { + "__uuid__": "b2687ac4-099e-403c-a192-ff477686f4f5" + }, + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "playOnLoad": true, + "_autoRemoveOnFinish": false, + "totalParticles": 150, + "duration": -1, + "emissionRate": 10, + "life": 1, + "lifeVar": 0, + "_startColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_startColorVar": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_endColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 0 + }, + "_endColorVar": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 0 + }, + "angle": 90, + "angleVar": 20, + "startSize": 50, + "startSizeVar": 0, + "endSize": 0, + "endSizeVar": 0, + "startSpin": 0, + "startSpinVar": 0, + "endSpin": 0, + "endSpinVar": 0, + "sourcePos": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "posVar": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_positionType": 0, + "_emitterMode": 0, + "gravity": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "speed": 180, + "speedVar": 50, + "tangentialAccel": 80, + "tangentialAccelVar": 0, + "radialAccel": 0, + "radialAccelVar": 0, + "rotationIsDir": false, + "startRadius": 0, + "startRadiusVar": 0, + "endRadius": 0, + "endRadiusVar": 0, + "rotatePerS": 0, + "rotatePerSVar": 0, + "_N$preview": true + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": null, + "fileId": "868c9k4nqZNHpGMlTm0Yx6q" + } +] \ No newline at end of file diff --git a/library/imports/cd/cd606b05-2183-4a5a-ad7c-9f3464006aaa.json b/library/imports/cd/cd606b05-2183-4a5a-ad7c-9f3464006aaa.json new file mode 100644 index 0000000..e6fbc1a --- /dev/null +++ b/library/imports/cd/cd606b05-2183-4a5a-ad7c-9f3464006aaa.json @@ -0,0 +1,79 @@ +{ + "__type__": "cc.AnimationClip", + "_name": "fire", + "_objFlags": 0, + "_native": "", + "_duration": 1.5166666666666666, + "sample": 60, + "speed": 0.8, + "wrapMode": 1, + "curveData": { + "comps": { + "cc.Sprite": { + "spriteFrame": [ + { + "frame": 0, + "value": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + } + }, + { + "frame": 0.16666666666666666, + "value": { + "__uuid__": "eef1f6ad-ae7d-4f74-ab87-cd4c81dea072" + } + }, + { + "frame": 0.3333333333333333, + "value": { + "__uuid__": "6999b621-4a9f-4a89-970f-4f6637f6ebe1" + } + }, + { + "frame": 0.5, + "value": { + "__uuid__": "24bb96d6-d160-419c-89a8-8f1a1e203491" + } + }, + { + "frame": 0.6666666666666666, + "value": { + "__uuid__": "5fead804-1827-4c8d-9b89-c09849aeed4e" + } + }, + { + "frame": 0.8333333333333334, + "value": { + "__uuid__": "e363a676-9b52-4402-b43a-37062f24c250" + } + }, + { + "frame": 1, + "value": { + "__uuid__": "e363a676-9b52-4402-b43a-37062f24c250" + } + }, + { + "frame": 1.1666666666666667, + "value": { + "__uuid__": "a67083f3-132b-4dc7-963c-af204012cd97" + } + }, + { + "frame": 1.3333333333333333, + "value": { + "__uuid__": "5256d2df-6e2d-4cac-9ac7-bd33add06053" + } + }, + { + "frame": 1.5, + "value": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + } + } + ] + } + } + }, + "events": [] +} \ No newline at end of file diff --git a/library/imports/cf/cf15cbaa-3813-433e-93de-23e5ac8de6ba.json b/library/imports/cf/cf15cbaa-3813-433e-93de-23e5ac8de6ba.json new file mode 100644 index 0000000..11c4445 --- /dev/null +++ b/library/imports/cf/cf15cbaa-3813-433e-93de-23e5ac8de6ba.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_moli", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 437, + 1, + 428, + 436 + ], + "offset": [ + -7, + 3 + ], + "originalSize": [ + 442, + 442 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/cf/cf7e0bb8-a81c-44a9-ad79-d28d43991032.json b/library/imports/cf/cf7e0bb8-a81c-44a9-ad79-d28d43991032.json new file mode 100644 index 0000000..02c1e1e --- /dev/null +++ b/library/imports/cf/cf7e0bb8-a81c-44a9-ad79-d28d43991032.json @@ -0,0 +1,10 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-clear-stencil", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "c0040c95-c57f-49cd-9cbc-12316b73d0d4" + }, + "_techniqueData": {} +} \ No newline at end of file diff --git a/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.json b/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.png b/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.png new file mode 100644 index 0000000..3a103b8 Binary files /dev/null and b/library/imports/cf/cfef78f1-c8df-49b7-8ed0-4c953ace2621.png differ diff --git a/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.json b/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.png b/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.png new file mode 100644 index 0000000..ff833c2 Binary files /dev/null and b/library/imports/d0/d0a82d39-bede-46c4-b698-c81ff0dedfff.png differ diff --git a/library/imports/d1/d1b8be49-b0a0-435c-83b7-552bed4bbe35.json b/library/imports/d1/d1b8be49-b0a0-435c-83b7-552bed4bbe35.json new file mode 100644 index 0000000..34be145 --- /dev/null +++ b/library/imports/d1/d1b8be49-b0a0-435c-83b7-552bed4bbe35.json @@ -0,0 +1,1222 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "toggleGroup", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 1, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "toggleGroup", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 12 + }, + { + "__id__": 21 + } + ], + "_active": true, + "_components": [ + { + "__id__": 10 + } + ], + "_prefab": { + "__id__": 30 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 221, + "height": 61 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "toggle1", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 6 + } + ], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 11 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 41, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -62, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": { + "__id__": 5 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "77Nw/VkxBDlYn1tJHSiW69", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + } + ], + "_prefab": { + "__id__": 8 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "eabUMeFj1JHYgwbMpSg1zc", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 2 + }, + "_N$isChecked": true, + "toggleGroup": { + "__id__": 10 + }, + "checkMark": { + "__id__": 7 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.ToggleGroup", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "allowSwitchOff": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "25DeyD94tFkalmK6Tg7UdE", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "toggle2", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 13 + }, + { + "__id__": 16 + } + ], + "_active": true, + "_components": [ + { + "__id__": 19 + } + ], + "_prefab": { + "__id__": 20 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 42, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 15, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 14 + } + ], + "_prefab": { + "__id__": 15 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 13 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "72QEruyX5CrIAFmVn9a3F6", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 12 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 17 + } + ], + "_prefab": { + "__id__": 18 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 16 + }, + "_enabled": true, + "_materials": [], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "c7L6vaJVRBDZfq/ZftHdp1", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 12 + }, + "_N$isChecked": false, + "toggleGroup": { + "__id__": 10 + }, + "checkMark": { + "__id__": 17 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "61w1JEqOlGsaSeDBTtJqu3", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "toggle3", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 22 + }, + { + "__id__": 25 + } + ], + "_active": true, + "_components": [ + { + "__id__": 28 + } + ], + "_prefab": { + "__id__": 29 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 37, + "height": 28 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 91, + 3, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "Background", + "_objFlags": 512, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + } + ], + "_prefab": { + "__id__": 24 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "e7aba14b-f956-4480-b254-8d57832e273f" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "9dSgcVxjxAToRrdMlwhWpR", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "checkmark", + "_objFlags": 512, + "_parent": { + "__id__": 21 + }, + "_children": [], + "_active": false, + "_components": [ + { + "__id__": 26 + } + ], + "_prefab": { + "__id__": 27 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 32, + "height": 32 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 25 + }, + "_enabled": true, + "_materials": [], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1a32fc76-f0bd-4f66-980f-56929c0ca0b3" + }, + "_type": 0, + "_sizeMode": 2, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": false, + "_atlas": null, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "24Fq6PF85FxZmTxjsAlpwl", + "sync": false + }, + { + "__type__": "cc.Toggle", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 21 + }, + "_enabled": true, + "_normalMaterial": null, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.2, + "clickEvents": [], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 214, + "g": 214, + "b": 214, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": { + "__id__": 21 + }, + "_N$isChecked": false, + "toggleGroup": { + "__id__": 10 + }, + "checkMark": { + "__id__": 26 + }, + "checkEvents": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "99UOOvWWtLsock+J9rw0jb", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "d1b8be49-b0a0-435c-83b7-552bed4bbe35" + }, + "fileId": "d7d5Rc1ntDm421UemL1Qj0", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/d1/d1bf6c39-ac09-4ccc-8723-0dc71b8b04a9.json b/library/imports/d1/d1bf6c39-ac09-4ccc-8723-0dc71b8b04a9.json new file mode 100644 index 0000000..89b5ae7 --- /dev/null +++ b/library/imports/d1/d1bf6c39-ac09-4ccc-8723-0dc71b8b04a9.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_pugongying", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 875, + 1, + 438, + 400 + ], + "offset": [ + -2, + 6 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.json b/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.png b/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.png new file mode 100644 index 0000000..d63c921 Binary files /dev/null and b/library/imports/d2/d29077ba-1627-4a72-9579-7b56a235340c.png differ diff --git a/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js b/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js new file mode 100644 index 0000000..b8a393c --- /dev/null +++ b/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js @@ -0,0 +1,622 @@ +"use strict"; +cc._RF.push(module, 'd5421HgLShFKIjj5f18m1mi', 'List'); +// Script/module/RankList/List.ts + +"use strict"; +// Learn TypeScript: +// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html +// Learn Attribute: +// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html +// Learn life-cycle callbacks: +// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StartAxisType = exports.ListType = void 0; +var ItemRender_1 = require("./ItemRender"); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +/**列表排列方式 */ +var ListType; +(function (ListType) { + /**水平排列 */ + ListType[ListType["Horizontal"] = 1] = "Horizontal"; + /**垂直排列 */ + ListType[ListType["Vertical"] = 2] = "Vertical"; + /**网格排列 */ + ListType[ListType["Grid"] = 3] = "Grid"; +})(ListType = exports.ListType || (exports.ListType = {})); +/**网格布局中的方向 */ +var StartAxisType; +(function (StartAxisType) { + /**水平排列 */ + StartAxisType[StartAxisType["Horizontal"] = 1] = "Horizontal"; + /**垂直排列 */ + StartAxisType[StartAxisType["Vertical"] = 2] = "Vertical"; +})(StartAxisType = exports.StartAxisType || (exports.StartAxisType = {})); +/** + * 列表 + * 根据cocos_example的listView改动而来 + * @author chenkai 2020.7.8 + * @example + * 1.创建cocos的ScrollView组件,添加List,设置List属性即可 + * + */ +var List = /** @class */ (function (_super) { + __extends(List, _super); + function List() { + var _this = _super !== null && _super.apply(this, arguments) || this; + //==================== 属性面板 ========================= + /**列表选项 */ + _this.itemRender = null; + /**排列方式 */ + _this.type = ListType.Vertical; + /**网格布局中的方向 */ + _this.startAxis = StartAxisType.Horizontal; + /**列表项之间X间隔 */ + _this.spaceX = 0; + /**列表项之间Y间隔 */ + _this.spaceY = 0; + /**上间距 */ + _this.padding_top = 0; + /**下间距 */ + _this.padding_buttom = 0; + /**左间距 */ + _this.padding_left = 0; + _this._padding = 0; + /**右间距 */ + _this.padding_right = 0; + //====================== 滚动容器 =============================== + /**列表滚动容器 */ + _this.scrollView = null; + /**scrollView的内容容器 */ + _this.content = null; + //======================== 列表项 =========================== + /**列表项数据 */ + _this.itemDataList = []; + /**应创建的实例数量 */ + _this.spawnCount = 0; + /**存放列表项实例的数组 */ + _this.itemList = []; + /**item的高度 */ + _this.itemHeight = 0; + /**item的宽度 */ + _this.itemWidth = 0; + /**存放不再使用中的列表项 */ + _this.itemPool = []; + //======================= 计算参数 ========================== + /**距离scrollView中心点的距离,超过这个距离的item会被重置,一般设置为 scrollVIew.height/2 + item.heigt/2 + space,因为这个距离item正好超出scrollView显示范围 */ + _this.halfScrollView = 0; + /**上一次content的X值,用于和现在content的X值比较,得出是向左还是向右滚动 */ + _this.lastContentPosX = 0; + /**上一次content的Y值,用于和现在content的Y值比较,得出是向上还是向下滚动 */ + _this.lastContentPosY = 0; + /**网格行数 */ + _this.gridRow = 0; + /**网格列数 */ + _this.gridCol = 0; + /**刷新时间,单位s */ + _this.updateTimer = 0; + /**刷新间隔,单位s */ + _this.updateInterval = 0.1; + /**是否滚动容器 */ + _this.bScrolling = false; + /**刷新的函数 */ + _this.updateFun = function () { }; + return _this; + } + List.prototype.onLoad = function () { + this.itemHeight = this.itemRender.height; + this.itemWidth = this.itemRender.width; + this.scrollView = this.node.getComponent(cc.ScrollView); + this.content = this.scrollView.content; + this.content.anchorX = 0; + this.content.anchorY = 1; + this.content.removeAllChildren(); + this.scrollView.node.on("scrolling", this.onScrolling, this); + }; + /** + * 列表数据 (列表数据复制使用,如果列表数据改变,则需要重新设置一遍数据) + * @param itemDataList item数据列表 + */ + List.prototype.setData = function (itemDataList) { + this.itemDataList = itemDataList.slice(); + this.updateContent(); + }; + /**计算列表的各项参数 */ + List.prototype.countListParam = function () { + var dataLen = this.itemDataList.length; + if (this.type == ListType.Vertical) { + this.scrollView.horizontal = false; + this.scrollView.vertical = true; + this.content.width = this.content.parent.width; + this.content.height = dataLen * this.itemHeight + (dataLen - 1) * this.spaceY + this.padding_top + this.padding_buttom; + this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) + 2; //计算创建的item实例数量,比当前scrollView容器能放下的item数量再加上2个 + this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; //计算bufferZone,item的显示范围 + this.updateFun = this.updateV; + } + else if (this.type == ListType.Horizontal) { + this.scrollView.horizontal = true; + this.scrollView.vertical = false; + this.content.width = dataLen * this.itemWidth + (dataLen - 1) * this.spaceX + this.padding_left + this.padding_right; + this.content.height = this.content.parent.height; + this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) + 2; + this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX; + this.updateFun = this.udpateH; + } + else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + this.scrollView.horizontal = false; + this.scrollView.vertical = true; + this.content.width = this.content.parent.width; + //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效 + if (this.padding_left + this.padding_right + this.itemWidth + this.spaceX > this.content.width) { + this.padding_left = 0; + this.padding_right = 0; + console.error("padding_left或padding_right过大"); + } + this.gridCol = Math.floor((this.content.width - this.padding_left - this.padding_right) / (this.itemWidth + this.spaceX)); + this.gridRow = Math.ceil(dataLen / this.gridCol); + this.content.height = this.gridRow * this.itemHeight + (this.gridRow - 1) * this.spaceY + this.padding_top + this.padding_buttom; + this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) * this.gridCol + this.gridCol * 2; + this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; + this.updateFun = this.updateGrid_V; + } + else if (this.startAxis == StartAxisType.Horizontal) { + this.scrollView.horizontal = true; + this.scrollView.vertical = false; + //计算高间隔 + this.content.height = this.content.parent.height; + //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效 + if (this.padding_top + this.padding_buttom + this.itemHeight + this.spaceY > this.content.height) { + this.padding_top = 0; + this.padding_buttom = 0; + console.error("padding_top或padding_buttom过大"); + } + this.gridRow = Math.floor((this.content.height - this.padding_top - this.padding_buttom) / (this.itemHeight + this.spaceY)); + this.gridCol = Math.ceil(dataLen / this.gridRow); + this.content.width = this.gridCol * this.itemWidth + (this.gridCol - 1) * this.spaceX + this.padding_left + this.padding_right; + this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) * this.gridRow + this.gridRow * 2; + this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX; + this.updateFun = this.updateGrid_H; + } + } + }; + /** + * 创建列表 + * @param startIndex 起始显示的数据索引 0表示第一项 + * @param offset scrollView偏移量 + */ + List.prototype.createList = function (startIndex, offset) { + //当需要显示的数据长度 > 虚拟列表长度, 删除最末尾几个数据时,列表需要重置位置到scrollView最底端 + if (this.itemDataList.length > this.spawnCount && (startIndex + this.spawnCount - 1) >= this.itemDataList.length) { + startIndex = this.itemDataList.length - this.spawnCount; + offset = this.scrollView.getMaxScrollOffset(); + //当需要显示的数据长度 <= 虚拟列表长度, 隐藏多余的虚拟列表项 + } + else if (this.itemDataList.length <= this.spawnCount) { + startIndex = 0; + } + for (var i = 0; i < this.spawnCount; i++) { + var item = void 0; + //需要显示的数据索引在数据范围内,则item实例显示出来 + if (i + startIndex < this.itemDataList.length) { + if (this.itemList[i] == null) { + item = this.getItem(); + this.itemList.push(item); + item.parent = this.content; + } + else { + item = this.itemList[i]; + } + //需要显示的数据索引超过了数据范围,则item实例隐藏起来 + } + else { + //item实例数量 > 需要显示的数据量 + if (this.itemList.length > (this.itemDataList.length - startIndex)) { + item = this.itemList.pop(); + item.removeFromParent(); + this.itemPool.push(item); + } + continue; + } + var itemRender = item.getComponent(ItemRender_1.default); + itemRender.itemIndex = i + startIndex; + itemRender.data = this.itemDataList[i + startIndex]; + itemRender.dataChanged(); + if (this.type == ListType.Vertical) { + //因为content的锚点X是0,所以item的x值是content.with/2表示居中,锚点Y是1,所以item的y值从content顶部向下是0到负无穷。所以item.y= -item.height/2时,是在content的顶部。 + item.setPosition(this.content.width / 2, -item.height * (0.5 + i + startIndex) - this.spaceY * (i + startIndex) - this.padding_top); + } + else if (this.type == ListType.Horizontal) { + item.setPosition(item.width * (0.5 + i + startIndex) + this.spaceX * (i + startIndex) + this.padding_left, -this.content.height / 2); + } + else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + var row = Math.floor((i + startIndex) / this.gridCol); + var col = (i + startIndex) % this.gridCol; + item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top); + item.opacity = 255; + } + else if (this.startAxis == StartAxisType.Horizontal) { + var row = (i + startIndex) % this.gridRow; + var col = Math.floor((i + startIndex) / this.gridRow); + item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top); + item.opacity = 255; + } + } + } + this.scrollView.scrollToOffset(offset); + }; + /**获取一个列表项 */ + List.prototype.getItem = function () { + if (this.itemPool.length == 0) { + return cc.instantiate(this.itemRender); + } + else { + return this.itemPool.pop(); + } + }; + List.prototype.update = function (dt) { + if (this.bScrolling == false) { + return; + } + this.updateTimer += dt; + if (this.updateTimer < this.updateInterval) { + return; + } + this.updateTimer = 0; + this.bScrolling = false; + this.updateFun(); + }; + List.prototype.onScrolling = function () { + this.bScrolling = true; + }; + /**垂直排列 */ + List.prototype.updateV = function () { + var items = this.itemList; + var item; + var bufferZone = this.halfScrollView; + var isUp = this.scrollView.content.y > this.lastContentPosY; + var offset = (this.itemHeight + this.spaceY) * items.length; + for (var i = 0; i < items.length; i++) { + item = items[i]; + var viewPos = this.getPositionInView(item); + if (isUp) { + //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界 + if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex + items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y - offset; + } + } + else { + //item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界 + if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex - items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.y = item.y + offset; + } + } + } + this.lastContentPosY = this.scrollView.content.y; + }; + /**水平排列 */ + List.prototype.udpateH = function () { + var items = this.itemList; + var item; + var bufferZone = this.halfScrollView; + var isRight = this.scrollView.content.x > this.lastContentPosX; + var offset = (this.itemWidth + this.spaceX) * items.length; + for (var i = 0; i < items.length; i++) { + item = items[i]; + var viewPos = this.getPositionInView(item); + if (isRight) { + //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界 + if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex - items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.x = item.x - offset; + } + } + else { + //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界 + if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex + items.length; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.x = item.x + offset; + } + } + } + this.lastContentPosX = this.scrollView.content.x; + }; + /**网格垂直排列 */ + List.prototype.updateGrid_V = function () { + var items = this.itemList; + var item; + var bufferZone = this.halfScrollView; + var isUp = this.scrollView.content.y > this.lastContentPosY; + var offset = (this.itemHeight + this.spaceY) * (this.spawnCount / this.gridCol); + for (var i = 0; i < items.length; i++) { + item = items[i]; + var viewPos = this.getPositionInView(item); + if (isUp) { + //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界 + if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridCol) * this.gridCol; + if (this.itemDataList[itemIndex] != null) { + item.y = item.y - offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } + else { + item.y = item.y - offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + else { //item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界 + if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridCol) * this.gridCol; + if (this.itemDataList[itemIndex] != null) { + item.y = item.y + offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } + else { + item.y = item.y + offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + } + this.lastContentPosY = this.scrollView.content.y; + }; + /**网格水平排列 */ + List.prototype.updateGrid_H = function () { + var items = this.itemList; + var item; + var bufferZone = this.halfScrollView; + var isRight = this.scrollView.content.x > this.lastContentPosX; + var offset = (this.itemWidth + this.spaceX) * (this.spawnCount / this.gridRow); + for (var i = 0; i < items.length; i++) { + item = items[i]; + var viewPos = this.getPositionInView(item); + if (isRight) { + //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界 + if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridRow) * this.gridRow; + if (this.itemDataList[itemIndex] != null) { + item.x = item.x - offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } + else { + item.x = item.x - offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + else { + //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界 + if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) { + var itemRender = item.getComponent(ItemRender_1.default); + var itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridRow) * this.gridRow; + if (this.itemDataList[itemIndex] != null) { + item.x = item.x + offset; + itemRender.itemIndex = itemIndex; + itemRender.data = this.itemDataList[itemIndex]; + itemRender.dataChanged(); + item.opacity = 255; + } + else { + item.x = item.x + offset; + itemRender.itemIndex = itemIndex; + item.opacity = 0; + } + } + } + } + this.lastContentPosX = this.scrollView.content.x; + }; + /**获取item在scrollView的局部坐标 */ + List.prototype.getPositionInView = function (item) { + var worldPos = item.parent.convertToWorldSpaceAR(item.position); + var viewPos = this.scrollView.node.convertToNodeSpaceAR(worldPos); + return viewPos; + }; + /**获取列表数据 */ + List.prototype.getListData = function () { + return this.itemDataList; + }; + /** + * 增加一项数据到列表的末尾 + * @param data 数据 + */ + List.prototype.addItem = function (data) { + this.itemDataList.push(data); + this.updateContent(); + }; + /** + * 增加一项数据到列表指定位置 + * @param index 位置,0表示第1项 + * @param data 数据 + */ + List.prototype.addItemAt = function (index, data) { + if (this.itemDataList[index] != null || this.itemDataList.length == index) { + this.itemDataList.splice(index, 1, data); + this.updateContent(); + } + }; + /** + * 删除一项数据 + * @param index 删除项的位置 ,0表示第1项 + */ + List.prototype.deleteItem = function (index) { + if (this.itemDataList[index] != null) { + this.itemDataList.splice(index, 1); + this.updateContent(); + } + }; + /** + * 改变一项数据 + * @param index 位置,0表示第1项 + * @param data 替换的数据 + */ + List.prototype.changeItem = function (index, data) { + if (this.itemDataList[index] != null) { + this.itemDataList[index] = data; + this.updateContent(); + } + }; + /**获取第一个Item的位置 */ + List.prototype.updateContent = function () { + //显示列表实例为0个 + if (this.itemList.length == 0) { + this.countListParam(); + this.createList(0, new cc.Vec2(0, 0)); + //显示列表的实例不为0个,则需要重新排列item实例数组 + } + else { + if (this.type == ListType.Vertical) { + this.itemList.sort(function (a, b) { + return b.y - a.y; + }); + } + else if (this.type == ListType.Horizontal) { + this.itemList.sort(function (a, b) { + return a.x - b.x; + }); + } + else if (this.type == ListType.Grid) { + if (this.startAxis == StartAxisType.Vertical) { + this.itemList.sort(function (a, b) { + return a.x - b.x; + }); + this.itemList.sort(function (a, b) { + return b.y - a.y; + }); + } + else if (this.startAxis == StartAxisType.Horizontal) { + this.itemList.sort(function (a, b) { + return b.y - a.y; + }); + this.itemList.sort(function (a, b) { + return a.x - b.x; + }); + } + } + this.countListParam(); + //获取第一个item实例需要显示的数据索引 + var startIndex = this.itemList[0].getComponent(ItemRender_1.default).itemIndex; + if (this.type == ListType.Grid && this.startAxis == StartAxisType.Vertical) { + startIndex += (startIndex + this.spawnCount) % this.gridCol; + } + else if (this.type == ListType.Grid && this.startAxis == StartAxisType.Horizontal) { + startIndex += (startIndex + this.spawnCount) % this.gridRow; + } + //getScrollOffset()和scrollToOffset()的x值是相反的 + var offset = this.scrollView.getScrollOffset(); + offset.x = -offset.x; + this.createList(startIndex, offset); + } + }; + /**销毁 */ + List.prototype.onDestroy = function () { + //清理列表项 + var len = this.itemList.length; + for (var i = 0; i < len; i++) { + if (cc.isValid(this.itemList[i], true)) { + this.itemList[i].destroy(); + } + } + this.itemList.length = 0; + //清理对象池 + len = this.itemPool.length; + for (var i = 0; i < len; i++) { + if (cc.isValid(this.itemPool[i], true)) { + this.itemPool[i].destroy(); + } + } + this.itemPool.length = 0; + //清理列表数据 + this.itemDataList.length = 0; + }; + __decorate([ + property({ type: cc.Node, tooltip: "列表项" }) + ], List.prototype, "itemRender", void 0); + __decorate([ + property({ type: cc.Enum(ListType), tooltip: "排列方式" }) + ], List.prototype, "type", void 0); + __decorate([ + property({ type: cc.Enum(StartAxisType), tooltip: "网格布局中的方向", visible: function () { return this.type == ListType.Grid; } }) + ], List.prototype, "startAxis", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "列表项X间隔", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } }) + ], List.prototype, "spaceX", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "列表项Y间隔", visible: function () { return this.type == ListType.Vertical || this.type == ListType.Grid; } }) + ], List.prototype, "spaceY", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "上间距", visible: function () { return (this.type == ListType.Vertical || this.type == ListType.Grid); } }) + ], List.prototype, "padding_top", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "下间距", visible: function () { return (this.type == ListType.Vertical || this.type == ListType.Grid); } }) + ], List.prototype, "padding_buttom", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "左间距", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } }) + ], List.prototype, "padding_left", void 0); + __decorate([ + property(cc.Integer) + ], List.prototype, "_padding", void 0); + __decorate([ + property({ type: cc.Integer, tooltip: "右间距", visible: function () { return (this.type == ListType.Horizontal || this.type == ListType.Grid); } }) + ], List.prototype, "padding_right", void 0); + List = __decorate([ + ccclass + ], List); + return List; +}(cc.Component)); +exports.default = List; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js.map b/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js.map new file mode 100644 index 0000000..09188b9 --- /dev/null +++ b/library/imports/d5/d54211e0-2d28-4528-88e3-e5fd7c9b59a2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\RankList\\List.ts"],"names":[],"mappings":";;;;;AAAA,oBAAoB;AACpB,wEAAwE;AACxE,mBAAmB;AACnB,kFAAkF;AAClF,8BAA8B;AAC9B,kFAAkF;;;;;;;;;;;;;;;;;;;;;;AAElF,2CAAqC;AAE/B,IAAA,KAAwB,EAAE,CAAC,UAAU,EAAnC,OAAO,aAAA,EAAE,QAAQ,cAAkB,CAAC;AAE5C,YAAY;AACZ,IAAY,QAOX;AAPD,WAAY,QAAQ;IAChB,UAAU;IACV,mDAAc,CAAA;IACd,UAAU;IACV,+CAAY,CAAA;IACZ,UAAU;IACV,uCAAQ,CAAA;AACZ,CAAC,EAPW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAOnB;AAED,cAAc;AACd,IAAY,aAKX;AAL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,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,EAAE,CAAC;gDAClG;IAIlC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,gBAAK,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,EAAE,CAAC;8CACtG;IAKhC;QADC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC;0CACO;IAI5B;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,gBAAK,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC,EAAE,CAAC;+CACrG;IA1ChB,IAAI;QADxB,OAAO;OACa,IAAI,CAyiBxB;IAAD,WAAC;CAziBD,AAyiBC,CAziBiC,EAAE,CAAC,SAAS,GAyiB7C;kBAziBoB,IAAI","file":"","sourceRoot":"/","sourcesContent":["// Learn TypeScript:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html\r\n// Learn Attribute:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html\r\n// Learn life-cycle callbacks:\r\n// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html\r\n\r\nimport ItemRender from \"./ItemRender\"\r\n\r\nconst { ccclass, property } = cc._decorator;\r\n\r\n/**列表排列方式 */\r\nexport enum ListType {\r\n /**水平排列 */\r\n Horizontal = 1,\r\n /**垂直排列 */\r\n Vertical = 2,\r\n /**网格排列 */\r\n Grid = 3\r\n}\r\n\r\n/**网格布局中的方向 */\r\nexport enum StartAxisType {\r\n /**水平排列 */\r\n Horizontal = 1,\r\n /**垂直排列 */\r\n Vertical = 2,\r\n}\r\n\r\n/**\r\n * 列表\r\n * 根据cocos_example的listView改动而来\r\n * @author chenkai 2020.7.8\r\n * @example\r\n * 1.创建cocos的ScrollView组件,添加List,设置List属性即可\r\n * \r\n */\r\n@ccclass\r\nexport default class List extends cc.Component {\r\n\r\n //==================== 属性面板 =========================\r\n /**列表选项 */\r\n @property({ type: cc.Node, tooltip: \"列表项\" })\r\n public itemRender: cc.Node = null;\r\n\r\n /**排列方式 */\r\n @property({ type: cc.Enum(ListType), tooltip: \"排列方式\" })\r\n public type: ListType = ListType.Vertical;\r\n\r\n /**网格布局中的方向 */\r\n @property({ type: cc.Enum(StartAxisType), tooltip: \"网格布局中的方向\", visible() { return this.type == ListType.Grid } })\r\n public startAxis: StartAxisType = StartAxisType.Horizontal;\r\n\r\n /**列表项之间X间隔 */\r\n @property({ type: cc.Integer, tooltip: \"列表项X间隔\", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })\r\n public spaceX: number = 0;\r\n\r\n /**列表项之间Y间隔 */\r\n @property({ type: cc.Integer, tooltip: \"列表项Y间隔\", visible() { return this.type == ListType.Vertical || this.type == ListType.Grid } })\r\n public spaceY: number = 0;\r\n\r\n /**上间距 */\r\n @property({ type: cc.Integer, tooltip: \"上间距\", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } })\r\n public padding_top: number = 0;\r\n\r\n /**下间距 */\r\n @property({ type: cc.Integer, tooltip: \"下间距\", visible() { return (this.type == ListType.Vertical || this.type == ListType.Grid) } })\r\n public padding_buttom: number = 0;\r\n\r\n /**左间距 */\r\n @property({ type: cc.Integer, tooltip: \"左间距\", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })\r\n public padding_left: number = 0;\r\n\r\n\r\n\r\n @property(cc.Integer)\r\n public _padding: number = 0;\r\n\r\n /**右间距 */\r\n @property({ type: cc.Integer, tooltip: \"右间距\", visible() { return (this.type == ListType.Horizontal || this.type == ListType.Grid) } })\r\n public padding_right: number = 0;\r\n\r\n //====================== 滚动容器 ===============================\r\n /**列表滚动容器 */\r\n public scrollView: cc.ScrollView = null;\r\n /**scrollView的内容容器 */\r\n private content: cc.Node = null;\r\n\r\n //======================== 列表项 ===========================\r\n /**列表项数据 */\r\n private itemDataList: Array = [];\r\n /**应创建的实例数量 */\r\n private spawnCount: number = 0;\r\n /**存放列表项实例的数组 */\r\n private itemList: Array = [];\r\n /**item的高度 */\r\n private itemHeight: number = 0;\r\n /**item的宽度 */\r\n private itemWidth: number = 0;\r\n /**存放不再使用中的列表项 */\r\n private itemPool: Array = [];\r\n\r\n //======================= 计算参数 ==========================\r\n /**距离scrollView中心点的距离,超过这个距离的item会被重置,一般设置为 scrollVIew.height/2 + item.heigt/2 + space,因为这个距离item正好超出scrollView显示范围 */\r\n private halfScrollView: number = 0;\r\n /**上一次content的X值,用于和现在content的X值比较,得出是向左还是向右滚动 */\r\n private lastContentPosX: number = 0;\r\n /**上一次content的Y值,用于和现在content的Y值比较,得出是向上还是向下滚动 */\r\n private lastContentPosY: number = 0;\r\n /**网格行数 */\r\n private gridRow: number = 0;\r\n /**网格列数 */\r\n private gridCol: number = 0;\r\n /**刷新时间,单位s */\r\n private updateTimer: number = 0;\r\n /**刷新间隔,单位s */\r\n private updateInterval: number = 0.1;\r\n /**是否滚动容器 */\r\n private bScrolling: boolean = false;\r\n /**刷新的函数 */\r\n private updateFun: Function = function () { };\r\n\r\n onLoad() {\r\n this.itemHeight = this.itemRender.height;\r\n this.itemWidth = this.itemRender.width;\r\n this.scrollView = this.node.getComponent(cc.ScrollView);\r\n this.content = this.scrollView.content;\r\n this.content.anchorX = 0;\r\n this.content.anchorY = 1;\r\n this.content.removeAllChildren();\r\n this.scrollView.node.on(\"scrolling\", this.onScrolling, this);\r\n }\r\n\r\n /**\r\n * 列表数据 (列表数据复制使用,如果列表数据改变,则需要重新设置一遍数据)\r\n * @param itemDataList item数据列表\r\n */\r\n public setData(itemDataList: Array) {\r\n this.itemDataList = itemDataList.slice();\r\n this.updateContent();\r\n \r\n }\r\n\r\n /**计算列表的各项参数 */\r\n private countListParam() {\r\n let dataLen = this.itemDataList.length;\r\n if (this.type == ListType.Vertical) {\r\n this.scrollView.horizontal = false;\r\n this.scrollView.vertical = true;\r\n this.content.width = this.content.parent.width;\r\n this.content.height = dataLen * this.itemHeight + (dataLen - 1) * this.spaceY + this.padding_top + this.padding_buttom;\r\n this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) + 2; //计算创建的item实例数量,比当前scrollView容器能放下的item数量再加上2个\r\n this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY; //计算bufferZone,item的显示范围\r\n this.updateFun = this.updateV;\r\n } else if (this.type == ListType.Horizontal) {\r\n this.scrollView.horizontal = true;\r\n this.scrollView.vertical = false;\r\n this.content.width = dataLen * this.itemWidth + (dataLen - 1) * this.spaceX + this.padding_left + this.padding_right;\r\n this.content.height = this.content.parent.height;\r\n this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) + 2;\r\n this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;\r\n this.updateFun = this.udpateH;\r\n } else if (this.type == ListType.Grid) {\r\n if (this.startAxis == StartAxisType.Vertical) {\r\n this.scrollView.horizontal = false;\r\n this.scrollView.vertical = true;\r\n this.content.width = this.content.parent.width;\r\n //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效\r\n if (this.padding_left + this.padding_right + this.itemWidth + this.spaceX > this.content.width) {\r\n this.padding_left = 0;\r\n this.padding_right = 0;\r\n console.error(\"padding_left或padding_right过大\");\r\n }\r\n\r\n this.gridCol = Math.floor((this.content.width - this.padding_left - this.padding_right) / (this.itemWidth + this.spaceX));\r\n this.gridRow = Math.ceil(dataLen / this.gridCol);\r\n this.content.height = this.gridRow * this.itemHeight + (this.gridRow - 1) * this.spaceY + this.padding_top + this.padding_buttom;\r\n this.spawnCount = Math.round(this.scrollView.node.height / (this.itemHeight + this.spaceY)) * this.gridCol + this.gridCol * 2;\r\n this.halfScrollView = this.scrollView.node.height / 2 + this.itemHeight / 2 + this.spaceY;\r\n this.updateFun = this.updateGrid_V;\r\n } else if (this.startAxis == StartAxisType.Horizontal) {\r\n this.scrollView.horizontal = true;\r\n this.scrollView.vertical = false;\r\n //计算高间隔\r\n this.content.height = this.content.parent.height;\r\n //如果left和right间隔过大,导致放不下一个item,则left和right都设置为0,相当于不生效\r\n if (this.padding_top + this.padding_buttom + this.itemHeight + this.spaceY > this.content.height) {\r\n this.padding_top = 0;\r\n this.padding_buttom = 0;\r\n console.error(\"padding_top或padding_buttom过大\");\r\n }\r\n\r\n this.gridRow = Math.floor((this.content.height - this.padding_top - this.padding_buttom) / (this.itemHeight + this.spaceY));\r\n this.gridCol = Math.ceil(dataLen / this.gridRow);\r\n this.content.width = this.gridCol * this.itemWidth + (this.gridCol - 1) * this.spaceX + this.padding_left + this.padding_right;\r\n this.spawnCount = Math.round(this.scrollView.node.width / (this.itemWidth + this.spaceX)) * this.gridRow + this.gridRow * 2;\r\n this.halfScrollView = this.scrollView.node.width / 2 + this.itemWidth / 2 + this.spaceX;\r\n this.updateFun = this.updateGrid_H;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * 创建列表 \r\n * @param startIndex 起始显示的数据索引 0表示第一项\r\n * @param offset scrollView偏移量\r\n */\r\n private createList(startIndex: number, offset: cc.Vec2) {\r\n //当需要显示的数据长度 > 虚拟列表长度, 删除最末尾几个数据时,列表需要重置位置到scrollView最底端\r\n if (this.itemDataList.length > this.spawnCount && (startIndex + this.spawnCount - 1) >= this.itemDataList.length) {\r\n startIndex = this.itemDataList.length - this.spawnCount;\r\n offset = this.scrollView.getMaxScrollOffset();\r\n\r\n //当需要显示的数据长度 <= 虚拟列表长度, 隐藏多余的虚拟列表项 \r\n } else if (this.itemDataList.length <= this.spawnCount) {\r\n startIndex = 0;\r\n }\r\n\r\n for (let i = 0; i < this.spawnCount; i++) {\r\n let item: cc.Node;\r\n //需要显示的数据索引在数据范围内,则item实例显示出来\r\n if (i + startIndex < this.itemDataList.length) {\r\n if (this.itemList[i] == null) {\r\n item = this.getItem();\r\n this.itemList.push(item);\r\n item.parent = this.content;\r\n } else {\r\n item = this.itemList[i];\r\n }\r\n //需要显示的数据索引超过了数据范围,则item实例隐藏起来\r\n } else {\r\n //item实例数量 > 需要显示的数据量\r\n if (this.itemList.length > (this.itemDataList.length - startIndex)) {\r\n item = this.itemList.pop();\r\n item.removeFromParent();\r\n this.itemPool.push(item);\r\n }\r\n continue;\r\n }\r\n\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n itemRender.itemIndex = i + startIndex;\r\n itemRender.data = this.itemDataList[i + startIndex];\r\n itemRender.dataChanged();\r\n\r\n if (this.type == ListType.Vertical) {\r\n //因为content的锚点X是0,所以item的x值是content.with/2表示居中,锚点Y是1,所以item的y值从content顶部向下是0到负无穷。所以item.y= -item.height/2时,是在content的顶部。\r\n item.setPosition(this.content.width / 2, -item.height * (0.5 + i + startIndex) - this.spaceY * (i + startIndex) - this.padding_top);\r\n } else if (this.type == ListType.Horizontal) {\r\n item.setPosition(item.width * (0.5 + i + startIndex) + this.spaceX * (i + startIndex) + this.padding_left, -this.content.height / 2);\r\n } else if (this.type == ListType.Grid) {\r\n if (this.startAxis == StartAxisType.Vertical) {\r\n var row = Math.floor((i + startIndex) / this.gridCol);\r\n var col = (i + startIndex) % this.gridCol;\r\n item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);\r\n item.opacity = 255;\r\n } else if (this.startAxis == StartAxisType.Horizontal) {\r\n var row = (i + startIndex) % this.gridRow;\r\n var col = Math.floor((i + startIndex) / this.gridRow);\r\n item.setPosition(item.width * (0.5 + col) + this.spaceX * col + this.padding_left, -item.height * (0.5 + row) - this.spaceY * row - this.padding_top);\r\n item.opacity = 255;\r\n }\r\n }\r\n }\r\n\r\n this.scrollView.scrollToOffset(offset);\r\n }\r\n\r\n /**获取一个列表项 */\r\n private getItem() {\r\n if (this.itemPool.length == 0) {\r\n return cc.instantiate(this.itemRender);\r\n } else {\r\n return this.itemPool.pop();\r\n }\r\n }\r\n\r\n update(dt) {\r\n if (this.bScrolling == false) {\r\n return;\r\n }\r\n this.updateTimer += dt;\r\n if (this.updateTimer < this.updateInterval) {\r\n return;\r\n }\r\n this.updateTimer = 0;\r\n this.bScrolling = false;\r\n this.updateFun();\r\n }\r\n\r\n onScrolling() {\r\n this.bScrolling = true;\r\n }\r\n\r\n /**垂直排列 */\r\n private updateV() {\r\n let items = this.itemList;\r\n let item;\r\n let bufferZone = this.halfScrollView;\r\n let isUp = this.scrollView.content.y > this.lastContentPosY;\r\n let offset = (this.itemHeight + this.spaceY) * items.length;\r\n for (let i = 0; i < items.length; i++) {\r\n item = items[i];\r\n let viewPos = this.getPositionInView(item);\r\n if (isUp) {\r\n //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界\r\n if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex + items.length;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.y = item.y - offset;\r\n }\r\n } else {\r\n //item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界\r\n if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex - items.length;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.y = item.y + offset;\r\n }\r\n }\r\n }\r\n this.lastContentPosY = this.scrollView.content.y;\r\n }\r\n\r\n /**水平排列 */\r\n private udpateH() {\r\n let items = this.itemList;\r\n let item;\r\n let bufferZone = this.halfScrollView;\r\n let isRight = this.scrollView.content.x > this.lastContentPosX;\r\n let offset = (this.itemWidth + this.spaceX) * items.length;\r\n for (let i = 0; i < items.length; i++) {\r\n item = items[i];\r\n let viewPos = this.getPositionInView(item);\r\n if (isRight) {\r\n //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界\r\n if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex - items.length;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.x = item.x - offset;\r\n }\r\n } else {\r\n //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界\r\n if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex + items.length;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.x = item.x + offset;\r\n }\r\n }\r\n }\r\n this.lastContentPosX = this.scrollView.content.x;\r\n }\r\n\r\n /**网格垂直排列 */\r\n private updateGrid_V() {\r\n let items = this.itemList;\r\n let item: cc.Node;\r\n let bufferZone = this.halfScrollView;\r\n let isUp = this.scrollView.content.y > this.lastContentPosY;\r\n let offset = (this.itemHeight + this.spaceY) * (this.spawnCount / this.gridCol);\r\n for (let i = 0; i < items.length; i++) {\r\n item = items[i];\r\n let viewPos = this.getPositionInView(item);\r\n if (isUp) {\r\n //item上滑时,超出了scrollView上边界,将item移动到下方复用,item移动到下方的位置必须不超过content的下边界\r\n if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridCol) * this.gridCol;\r\n if (this.itemDataList[itemIndex] != null) {\r\n item.y = item.y - offset;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.opacity = 255;\r\n } else {\r\n item.y = item.y - offset;\r\n itemRender.itemIndex = itemIndex;\r\n item.opacity = 0;\r\n }\r\n }\r\n } else {//item下滑时,超出了scrollView下边界,将item移动到上方复用,item移动到上方的位置必须不超过content的上边界\r\n if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < 0) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridCol) * this.gridCol;\r\n if (this.itemDataList[itemIndex] != null) {\r\n item.y = item.y + offset;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.opacity = 255;\r\n } else {\r\n item.y = item.y + offset;\r\n itemRender.itemIndex = itemIndex;\r\n item.opacity = 0;\r\n }\r\n }\r\n }\r\n }\r\n this.lastContentPosY = this.scrollView.content.y;\r\n }\r\n\r\n /**网格水平排列 */\r\n private updateGrid_H() {\r\n let items = this.itemList;\r\n let item;\r\n let bufferZone = this.halfScrollView;\r\n let isRight = this.scrollView.content.x > this.lastContentPosX;\r\n let offset = (this.itemWidth + this.spaceX) * (this.spawnCount / this.gridRow);\r\n for (let i = 0; i < items.length; i++) {\r\n item = items[i];\r\n let viewPos = this.getPositionInView(item);\r\n if (isRight) {\r\n //item右滑时,超出了scrollView右边界,将item移动到左方复用,item移动到左方的位置必须不超过content的左边界\r\n if (viewPos.x > bufferZone && item.x - offset - this.padding_left > 0) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex - (this.spawnCount / this.gridRow) * this.gridRow;\r\n if (this.itemDataList[itemIndex] != null) {\r\n item.x = item.x - offset;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.opacity = 255;\r\n } else {\r\n item.x = item.x - offset;\r\n itemRender.itemIndex = itemIndex;\r\n item.opacity = 0;\r\n }\r\n }\r\n } else {\r\n //item左滑时,超出了scrollView左边界,将item移动到右方复用,item移动到右方的位置必须不超过content的右边界\r\n if (viewPos.x < -bufferZone && item.x + offset + this.padding_right < this.content.width) {\r\n let itemRender: ItemRender = item.getComponent(ItemRender);\r\n let itemIndex = itemRender.itemIndex + (this.spawnCount / this.gridRow) * this.gridRow;\r\n if (this.itemDataList[itemIndex] != null) {\r\n item.x = item.x + offset;\r\n itemRender.itemIndex = itemIndex;\r\n itemRender.data = this.itemDataList[itemIndex];\r\n itemRender.dataChanged();\r\n item.opacity = 255;\r\n } else {\r\n item.x = item.x + offset;\r\n itemRender.itemIndex = itemIndex;\r\n item.opacity = 0;\r\n }\r\n }\r\n }\r\n }\r\n this.lastContentPosX = this.scrollView.content.x;\r\n }\r\n\r\n /**获取item在scrollView的局部坐标 */\r\n private getPositionInView(item) {\r\n let worldPos = item.parent.convertToWorldSpaceAR(item.position);\r\n let viewPos = this.scrollView.node.convertToNodeSpaceAR(worldPos);\r\n return viewPos;\r\n }\r\n\r\n /**获取列表数据 */\r\n public getListData() {\r\n return this.itemDataList;\r\n }\r\n\r\n /**\r\n * 增加一项数据到列表的末尾\r\n * @param data 数据\r\n */\r\n public addItem(data: any) {\r\n this.itemDataList.push(data);\r\n this.updateContent();\r\n }\r\n\r\n /**\r\n * 增加一项数据到列表指定位置\r\n * @param index 位置,0表示第1项\r\n * @param data 数据\r\n */\r\n public addItemAt(index: number, data: any) {\r\n if (this.itemDataList[index] != null || this.itemDataList.length == index) {\r\n this.itemDataList.splice(index, 1, data);\r\n this.updateContent();\r\n }\r\n }\r\n\r\n /**\r\n * 删除一项数据\r\n * @param index 删除项的位置 ,0表示第1项\r\n */\r\n public deleteItem(index: number) {\r\n if (this.itemDataList[index] != null) {\r\n this.itemDataList.splice(index, 1);\r\n this.updateContent();\r\n }\r\n }\r\n\r\n /**\r\n * 改变一项数据\r\n * @param index 位置,0表示第1项\r\n * @param data 替换的数据\r\n */\r\n public changeItem(index: number, data: any) {\r\n if (this.itemDataList[index] != null) {\r\n this.itemDataList[index] = data;\r\n this.updateContent();\r\n }\r\n }\r\n\r\n /**获取第一个Item的位置 */\r\n private updateContent() {\r\n //显示列表实例为0个\r\n if (this.itemList.length == 0) {\r\n this.countListParam();\r\n this.createList(0, new cc.Vec2(0, 0));\r\n //显示列表的实例不为0个,则需要重新排列item实例数组\r\n } else {\r\n if (this.type == ListType.Vertical) {\r\n this.itemList.sort((a: any, b: any) => {\r\n return b.y - a.y;\r\n });\r\n } else if (this.type == ListType.Horizontal) {\r\n this.itemList.sort((a: any, b: any) => {\r\n return a.x - b.x;\r\n });\r\n } else if (this.type == ListType.Grid) {\r\n if (this.startAxis == StartAxisType.Vertical) {\r\n this.itemList.sort((a: any, b: any) => {\r\n return a.x - b.x;\r\n });\r\n this.itemList.sort((a: any, b: any) => {\r\n return b.y - a.y;\r\n });\r\n } else if (this.startAxis == StartAxisType.Horizontal) {\r\n this.itemList.sort((a: any, b: any) => {\r\n return b.y - a.y;\r\n });\r\n this.itemList.sort((a: any, b: any) => {\r\n return a.x - b.x;\r\n });\r\n }\r\n }\r\n\r\n this.countListParam();\r\n\r\n //获取第一个item实例需要显示的数据索引\r\n var startIndex = this.itemList[0].getComponent(ItemRender).itemIndex;\r\n\r\n if (this.type == ListType.Grid && this.startAxis == StartAxisType.Vertical) {\r\n startIndex += (startIndex + this.spawnCount) % this.gridCol;\r\n } else if (this.type == ListType.Grid && this.startAxis == StartAxisType.Horizontal) {\r\n startIndex += (startIndex + this.spawnCount) % this.gridRow;\r\n }\r\n\r\n //getScrollOffset()和scrollToOffset()的x值是相反的\r\n var offset: cc.Vec2 = this.scrollView.getScrollOffset();\r\n offset.x = - offset.x;\r\n\r\n this.createList(startIndex, offset);\r\n }\r\n }\r\n\r\n /**销毁 */\r\n public onDestroy() {\r\n //清理列表项\r\n let len = this.itemList.length;\r\n for (let i = 0; i < len; i++) {\r\n if (cc.isValid(this.itemList[i], true)) {\r\n this.itemList[i].destroy();\r\n }\r\n }\r\n this.itemList.length = 0;\r\n //清理对象池\r\n len = this.itemPool.length;\r\n for (let i = 0; i < len; i++) {\r\n if (cc.isValid(this.itemPool[i], true)) {\r\n this.itemPool[i].destroy();\r\n }\r\n }\r\n this.itemPool.length = 0;\r\n //清理列表数据\r\n this.itemDataList.length = 0;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.json b/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.png b/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.png new file mode 100644 index 0000000..6bda1af Binary files /dev/null and b/library/imports/d6/d6d3ca85-4681-47c1-b5dd-d036a9d39ea2.png differ diff --git a/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.json b/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.png b/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.png new file mode 100644 index 0000000..78314b4 Binary files /dev/null and b/library/imports/d8/d81ec8ad-247c-4e62-aa3c-d35c4193c7af.png differ diff --git a/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js b/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js new file mode 100644 index 0000000..5aecb1e --- /dev/null +++ b/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js @@ -0,0 +1,68 @@ +"use strict"; +cc._RF.push(module, 'dd5bcw2TbFCjqI5Q+oUBjuX', 'Block'); +// Script/Block.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var NewClass = /** @class */ (function (_super) { + __extends(NewClass, _super); + function NewClass() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.label = null; + _this.text = 'hello'; + return _this; + } + // LIFE-CYCLE CALLBACKS: + NewClass.prototype.onLoad = function () { + }; + NewClass.prototype.start = function () { + }; + NewClass.prototype.init = function () { + }; + NewClass.prototype.hide = function () { + var _this = this; + cc.tween(this.node) + .to(0.2, { opacity: 0 }) + .call(function () { + _this.node.active = false; + _this.node.removeFromParent(); + _this.node = null; + }) + .start(); + }; + NewClass.prototype.update = function (dt) { + }; + __decorate([ + property(cc.Label) + ], NewClass.prototype, "label", void 0); + __decorate([ + property + ], NewClass.prototype, "text", void 0); + NewClass = __decorate([ + ccclass + ], NewClass); + return NewClass; +}(cc.Component)); +exports.default = NewClass; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js.map b/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js.map new file mode 100644 index 0000000..39cd24c --- /dev/null +++ b/library/imports/dd/dd5bcc36-4db1-428e-a239-43ea14063b97.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\Block.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACM,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAE1C;IAAsC,4BAAY;IAAlD;QAAA,qEAyCC;QAtCG,WAAK,GAAa,IAAI,CAAC;QAGvB,UAAI,GAAW,OAAO,CAAC;;IAmC3B,CAAC;IA5BG,wBAAwB;IAExB,yBAAM,GAAN;IAEA,CAAC;IAED,wBAAK,GAAL;IACA,CAAC;IAED,uBAAI,GAAJ;IAEA,CAAC;IAID,uBAAI,GAAJ;QAAA,iBASC;QARG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;aAClB,EAAE,CAAC,GAAG,EAAC,EAAC,OAAO,EAAC,CAAC,EAAC,CAAC;aACnB,IAAI,CAAC;YACF,KAAI,CAAC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACzB,KAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC7B,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;IACb,CAAC;IAED,yBAAM,GAAN,UAAQ,EAAE;IACV,CAAC;IArCD;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;2CACI;IAGvB;QADC,QAAQ;0CACc;IANN,QAAQ;QAD5B,OAAO;OACa,QAAQ,CAyC5B;IAAD,eAAC;CAzCD,AAyCC,CAzCqC,EAAE,CAAC,SAAS,GAyCjD;kBAzCoB,QAAQ","file":"","sourceRoot":"/","sourcesContent":["\r\nconst {ccclass, property} = cc._decorator;\r\n@ccclass\r\nexport default class NewClass extends cc.Component {\r\n\r\n @property(cc.Label)\r\n label: cc.Label = null;\r\n\r\n @property\r\n text: string = 'hello';\r\n tween: cc.Tween;\r\n speed: number; //移动速度,时间参数,位移个固定\r\n move: boolean; //是否在移动状态。\r\n num: number;\r\n difficulty: number;\r\n\r\n // LIFE-CYCLE CALLBACKS:\r\n\r\n onLoad () {\r\n\r\n }\r\n\r\n start () {\r\n }\r\n\r\n init(){\r\n\r\n }\r\n\r\n\r\n\r\n hide(){\r\n cc.tween(this.node)\r\n .to(0.2,{opacity:0})\r\n .call(() =>{\r\n this.node.active = false;\r\n this.node.removeFromParent();\r\n this.node = null;\r\n })\r\n .start();\r\n }\r\n\r\n update (dt) {\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/dd/ddb99b39-7004-47cd-9705-751905c43c46.json b/library/imports/dd/ddb99b39-7004-47cd-9705-751905c43c46.json new file mode 100644 index 0000000..0f22a96 --- /dev/null +++ b/library/imports/dd/ddb99b39-7004-47cd-9705-751905c43c46.json @@ -0,0 +1,117 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "directional", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "light", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "x": 0, + "y": 0, + "z": 0, + "__type__": "cc.Vec3" + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_type": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 1, + "_range": 1000, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowDepthScale": 250, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ddb99b39-7004-47cd-9705-751905c43c46" + }, + "fileId": "33zOkteexCqamZ4PXuwJaW", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/de/de510076-056b-484f-b94c-83bef217d0e1.json b/library/imports/de/de510076-056b-484f-b94c-83bef217d0e1.json new file mode 100644 index 0000000..4f32d22 --- /dev/null +++ b/library/imports/de/de510076-056b-484f-b94c-83bef217d0e1.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "torus", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "torus", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "14c74869-bdb4-4f57-86d8-a7875de2be30" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "de510076-056b-484f-b94c-83bef217d0e1" + }, + "fileId": "a1gx3/CoNJb6xz1joaf6oM", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/df/df04b74d-9f23-4e49-a2a0-388f63ce0f2f.json b/library/imports/df/df04b74d-9f23-4e49-a2a0-388f63ce0f2f.json new file mode 100644 index 0000000..7cc92dd --- /dev/null +++ b/library/imports/df/df04b74d-9f23-4e49-a2a0-388f63ce0f2f.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_share", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 921, + 69, + 36, + 36 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 36, + 36 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e0/e02d87d4-e599-4d16-8001-e14891ac6506.json b/library/imports/e0/e02d87d4-e599-4d16-8001-e14891ac6506.json new file mode 100644 index 0000000..5a4d972 --- /dev/null +++ b/library/imports/e0/e02d87d4-e599-4d16-8001-e14891ac6506.json @@ -0,0 +1,16 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-label", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "f18742d7-56d2-4eb5-ae49-2d9d710b37c8" + }, + "_techniqueData": { + "0": { + "defines": { + "USE_TEXTURE": true + } + } + } +} \ No newline at end of file diff --git a/library/imports/e1/e1d57e63-4f2f-467d-9c55-0a889d5533a8.json b/library/imports/e1/e1d57e63-4f2f-467d-9c55-0a889d5533a8.json new file mode 100644 index 0000000..8422013 --- /dev/null +++ b/library/imports/e1/e1d57e63-4f2f-467d-9c55-0a889d5533a8.json @@ -0,0 +1,21 @@ +{ + "__type__": "cc.JsonAsset", + "_name": "CLICK_DATA", + "_objFlags": 0, + "_native": "", + "json": { + "data": { + "type": 1, + "success": false, + "round": 0, + "choice": 0, + "rightChoice": 0, + "item": "", + "roundType": 0, + "stepTime": 0, + "levelConfig": 0, + "ignite": false, + "igniteCount": 0 + } + } +} \ No newline at end of file diff --git a/library/imports/e2/e2f00085-c597-422d-9759-52c360279106.json b/library/imports/e2/e2f00085-c597-422d-9759-52c360279106.json new file mode 100644 index 0000000..5744bae --- /dev/null +++ b/library/imports/e2/e2f00085-c597-422d-9759-52c360279106.json @@ -0,0 +1,825 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-toon", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "name": "outline", + "rasterizerState": { + "cullMode": 1028 + }, + "depthStencilState": { + "depthTest": true, + "depthWrite": true + }, + "properties": { + "lineWidth": { + "value": [ + 10 + ], + "type": 13 + }, + "depthBias": { + "value": [ + 0 + ], + "type": 13 + }, + "outlineBaseColor": { + "value": [ + 0, + 0, + 0, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "outlineBaseColorMap": { + "value": "gray", + "type": 29 + } + }, + "program": "builtin-toon|outline-vs:vert|outline-fs:frag" + }, + { + "name": "toon", + "depthStencilState": { + "depthTest": true, + "depthWrite": true + }, + "properties": { + "tilingOffset": { + "value": [ + 1, + 1, + 0, + 0 + ], + "type": 16 + }, + "normalMap": { + "value": "normal", + "type": 29 + }, + "baseColorMap": { + "value": "white", + "type": 29 + }, + "specular": { + "value": [ + 1, + 1, + 1, + 0.5 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "specularMap": { + "value": "white", + "type": 29 + }, + "specularThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "emissive": { + "value": [ + 0, + 0, + 0, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "emissiveMap": { + "value": "white", + "type": 29 + }, + "shadowColor": { + "value": [ + 0, + 0, + 0, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "shadowIntensity": { + "value": [ + 0.5 + ], + "type": 13 + }, + "highlightColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "editor": { + "type": "color" + }, + "type": 16 + }, + "lightThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "lightSmoothness": { + "value": [ + 0.1 + ], + "type": 13 + } + }, + "program": "builtin-toon|toon-vs:vert|toon-fs:frag" + } + ] + } + ], + "shaders": [ + { + "hash": 2752667346, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nout vec2 v_uv;\nuniform OutlineVert {\n float lineWidth;\n float depthBias;\n};\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n float width = lineWidth * 0.001;\n #if USE_POSITION_SCALING\n vec3 dir = normalize(In.position.xyz);\n float flip = dot(dir, normalize(In.normal)) < 0.0 ? -1.0 : 1.0;\n In.position.xyz += flip * dir * width * 2.0;\n vec4 pos = cc_matViewProj * cc_matWorld * In.position;\n #else\n In.position.xyz += normalize(In.normal) * width;\n vec4 pos = cc_matViewProj * cc_matWorld * In.position;\n #endif\n pos.z -= depthBias * 0.002;\n v_uv = In.uv;\n return pos;\n}\nvoid main() { gl_Position = vert(); }", + "frag": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform CC_SHADOW {\n mat4 cc_shadow_lightViewProjMatrix[2];\n vec4 cc_shadow_info[2];\n };\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\n#if CC_NUM_LIGHTS > 0\nuniform CCLIGHTS {\n vec4 cc_lightPositionAndRange[4];\n vec4 cc_lightDirection[4];\n vec4 cc_lightColor[4];\n};\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nin vec2 v_uv;\nuniform OutlineFrag {\n vec4 outlineBaseColor;\n};\n#if USE_OUTLINE_BASE_COLOR_MAP\n uniform sampler2D outlineBaseColorMap;\n#endif\nvec4 frag () {\n vec4 color = outlineBaseColor;\n #if CC_NUM_DIR_LIGHTS > 0\n for (int i = 0; i < CC_NUM_DIR_LIGHTS; i++) {\n color *= cc_dirLightColor[i];\n }\n #endif\n #if USE_OUTLINE_BASE_COLOR_MAP\n vec4 outlineBaseColorMap_tmp = texture(outlineBaseColorMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_outlineBaseColorMap\n outlineBaseColorMap_tmp.a *= texture(outlineBaseColorMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (outlineBaseColorMap_tmp.rgb * outlineBaseColorMap_tmp.rgb);\n color.a *= outlineBaseColorMap_tmp.a;\n #else\n color *= outlineBaseColorMap_tmp;\n #endif\n #endif\n return vec4(color.rgb, 1.0);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nvarying vec2 v_uv;\nuniform float lineWidth;\nuniform float depthBias;\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n float width = lineWidth * 0.001;\n #if USE_POSITION_SCALING\n vec3 dir = normalize(In.position.xyz);\n float flip = dot(dir, normalize(In.normal)) < 0.0 ? -1.0 : 1.0;\n In.position.xyz += flip * dir * width * 2.0;\n vec4 pos = cc_matViewProj * cc_matWorld * In.position;\n #else\n In.position.xyz += normalize(In.normal) * width;\n vec4 pos = cc_matViewProj * cc_matWorld * In.position;\n #endif\n pos.z -= depthBias * 0.002;\n v_uv = In.uv;\n return pos;\n}\nvoid main() { gl_Position = vert(); }", + "frag": "\nprecision highp float;\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\n#if CC_NUM_LIGHTS > 0\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nvarying vec2 v_uv;\nuniform vec4 outlineBaseColor;\n#if USE_OUTLINE_BASE_COLOR_MAP\n uniform sampler2D outlineBaseColorMap;\n#endif\nvec4 frag () {\n vec4 color = outlineBaseColor;\n #if CC_NUM_DIR_LIGHTS > 0\n for (int i = 0; i < CC_NUM_DIR_LIGHTS; i++) {\n color *= cc_dirLightColor[i];\n }\n #endif\n #if USE_OUTLINE_BASE_COLOR_MAP\n vec4 outlineBaseColorMap_tmp = texture2D(outlineBaseColorMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_outlineBaseColorMap\n outlineBaseColorMap_tmp.a *= texture2D(outlineBaseColorMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n color.rgb *= (outlineBaseColorMap_tmp.rgb * outlineBaseColorMap_tmp.rgb);\n color.a *= outlineBaseColorMap_tmp.a;\n #else\n color *= outlineBaseColorMap_tmp;\n #endif\n #endif\n return vec4(color.rgb, 1.0);\n}\nvoid main() { gl_FragColor = frag(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + }, + { + "name": "CC_SHADOW", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "CCLIGHTS", + "defines": [ + "CC_NUM_LIGHTS" + ] + } + ], + "samplers": [ + { + "name": "cc_shadow_map_0", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "cc_shadow_map_1", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + } + ] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_SKINNING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_JOINTS_TEXTRUE", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING" + ] + }, + { + "name": "CC_JOINTS_TEXTURE_FLOAT32", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ] + }, + { + "name": "CC_USE_ATTRIBUTE_UV0", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_COLOR", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_NORMAL", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_TANGENT", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_POSITION_SCALING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_SHADOW_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_NUM_SHADOW_LIGHTS", + "type": "number", + "defines": [ + "CC_USE_SHADOW_MAP" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_NUM_LIGHTS", + "type": "number", + "defines": [], + "range": [ + 0, + 3 + ] + }, + { + "name": "USE_OUTLINE_BASE_COLOR_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_NUM_DIR_LIGHTS", + "type": "number", + "defines": [], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_outlineBaseColorMap", + "type": "boolean", + "defines": [ + "USE_OUTLINE_BASE_COLOR_MAP" + ] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [ + "USE_OUTLINE_BASE_COLOR_MAP" + ] + } + ], + "blocks": [ + { + "name": "SKINNING", + "members": [ + { + "name": "jointsTextureSize", + "type": 14, + "count": 1 + } + ], + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 0 + }, + { + "name": "JOINT_MATRIX", + "members": [ + { + "name": "jointMatrices", + "type": 26, + "count": 50 + } + ], + "defines": [ + "CC_USE_SKINNING" + ], + "binding": 1 + }, + { + "name": "OutlineVert", + "members": [ + { + "name": "lineWidth", + "type": 13, + "count": 1 + }, + { + "name": "depthBias", + "type": 13, + "count": 1 + } + ], + "defines": [], + "binding": 2 + }, + { + "name": "OutlineFrag", + "members": [ + { + "name": "outlineBaseColor", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 3 + } + ], + "samplers": [ + { + "name": "jointsTexture", + "type": 29, + "count": 1, + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 30 + }, + { + "name": "outlineBaseColorMap", + "type": 29, + "count": 1, + "defines": [ + "USE_OUTLINE_BASE_COLOR_MAP" + ], + "binding": 31 + } + ], + "record": null, + "name": "builtin-toon|outline-vs:vert|outline-fs:frag" + }, + { + "hash": 1621866752, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\n#if CC_USE_SKINNING\n in vec4 a_weights;\n in vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform SKINNING {\n vec2 jointsTextureSize;\n };\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform JOINT_MATRIX {\n mat4 jointMatrices[50];\n };\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nin vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nin vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nin vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nin vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nin vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nout vec3 v_position;\nout vec2 v_uv;\nout vec3 v_normal;\nout vec3 v_viewDirection;\n#if USE_NORMAL_MAP\n out vec3 v_tangent;\n out vec3 v_bitangent;\n#endif\nuniform ToonVert {\n vec4 tilingOffset;\n};\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n vec4 pos = cc_matWorld * In.position;\n v_position = pos.xyz;\n v_uv = In.uv * tilingOffset.xy + tilingOffset.zw;\n v_viewDirection = normalize(cc_cameraPos.xyz - v_position);\n v_normal = (cc_matWorldIT * vec4(In.normal, 0.0)).xyz;\n #if USE_NORMAL_MAP\n v_tangent = normalize((cc_matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_normal, v_tangent) * In.tangent.w;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }", + "frag": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform CC_SHADOW {\n mat4 cc_shadow_lightViewProjMatrix[2];\n vec4 cc_shadow_info[2];\n };\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nfloat unpackRGBAToDepth(vec4 color) {\n return dot(color, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 160581375.0));\n}\nfloat getDepth(sampler2D shadowMap, vec2 shadowUV) {\n return unpackRGBAToDepth(texture(shadowMap, shadowUV));\n}\nfloat computeFallOff(float shadow, vec2 coords, float frustumEdgeFalloff) {\n return shadow;\n}\nfloat shadowSimple(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness) {\n float closestDepth = getDepth(shadowMap, shadowUV);\n return currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n}\nfloat shadowPCF3X3(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -1; x <= 1; ++x) {\n for (int y = -1; y <= 1; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 9.0;\n return shadow;\n}\nfloat shadowPCF5X5(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -2; x <= 2; ++x) {\n for (int y = -2; y <= 2; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 25.0;\n return shadow;\n}\n#if CC_NUM_LIGHTS > 0\nuniform CCLIGHTS {\n vec4 cc_lightPositionAndRange[4];\n vec4 cc_lightDirection[4];\n vec4 cc_lightColor[4];\n};\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nLightInfo computeDirectionalLighting(\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n ret.lightDir = -normalize(lightDirection.xyz);\n ret.radiance = lightColor.rgb;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computePointLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n ret.lightDir = normalize(lightDir);\n ret.radiance = lightColor.rgb * attenuation;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computeSpotLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n lightDir = normalize(lightDir);\n float cosConeAngle = max(0., dot(lightDirection.xyz, -lightDir));\n cosConeAngle = cosConeAngle < lightDirection.w ? 0. : cosConeAngle;\n cosConeAngle = pow(cosConeAngle, lightColor.w);\n ret.lightDir = lightDir;\n ret.radiance = lightColor.rgb * attenuation * cosConeAngle;\n ret.lightColor = lightColor;\n return ret;\n}\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nstruct ToonSurface {\n vec4 baseColor;\n vec3 specular;\n float specularThreshold;\n vec3 position;\n vec3 normal;\n vec3 viewDirection;\n vec3 emissive;\n vec3 shadowColor;\n float shadowIntensity;\n vec3 highlightColor;\n float lightThreshold;\n float lightSmoothness;\n};\nconst float T_H = 0.25;\nfloat TreshHoldLighting(float lThreshold, float smoothness, float v) {\n return smoothstep(lThreshold-smoothness*T_H, lThreshold+smoothness*T_H, v);\n}\nLighting toon (ToonSurface s, LightInfo info) {\n Lighting result;\n vec3 N = s.normal;\n vec3 L = info.lightDir;\n vec3 V = s.viewDirection;\n vec3 H = normalize(L + V);\n float NL = 0.5 * dot(N, L) + 0.5;\n float NH = 0.5 * dot(H, N) + 0.5;\n vec3 c = vec3(0.0);\n vec3 attenuation = info.radiance;\n vec3 lightColor = info.lightColor.rgb;\n vec3 shadowColor = mix(s.highlightColor * lightColor, s.shadowColor, s.shadowIntensity);\n vec3 diffuse = TreshHoldLighting(s.lightThreshold, s.lightSmoothness, NL) * attenuation;\n diffuse = mix(shadowColor, s.highlightColor * lightColor, diffuse);\n result.diffuse = diffuse * s.baseColor.rgb;\n float specularWeight = 1.0 - pow(s.specularThreshold, 5.0);\n float specularMask = step(specularWeight, NH);\n vec3 specular = s.specular.rgb * specularMask;\n result.specular = specular * attenuation;\n return result;\n}\nvec3 ambient(ToonSurface s, vec4 ambientColor) {\n return s.baseColor.rgb * ambientColor.rgb;\n}\nvec4 CCToonShading (ToonSurface s) {\n Lighting result;\n result.diffuse = vec3(0, 0, 0);\n result.specular = vec3(0, 0, 0);\n #if CC_NUM_LIGHTS > 0\n #if CC_LIGHT_0_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[0]);\n #else\n LightInfo info0;\n #if CC_LIGHT_0_TYPE == 0\n info0 = computeDirectionalLighting(cc_lightDirection[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 1\n info0 = computePointLighting(s.position, cc_lightPositionAndRange[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 2\n info0 = computeSpotLighting(s.position, cc_lightPositionAndRange[0], cc_lightDirection[0], cc_lightColor[0]);\n #endif\n Lighting result0 = toon(s, info0);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n float shadow_0 = 1.0;\n vec2 projCoords0 = v_posLightSpace[0].xy / v_posLightSpace[0].w;\n vec2 shadowUV0 = projCoords0 * 0.5 + vec2(0.5);\n if (shadowUV0.x >= 0.0 && shadowUV0.x <= 1.0 && shadowUV0.y >= 0.0 && shadowUV0.y <= 1.0) {\n float currentDepth0 = clamp(v_depth[0], 0.0, 1.0);\n #if CC_SHADOW_0_TYPE == 3\n shadow_0 = shadowPCF3X3(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #elif CC_SHADOW_0_TYPE == 4\n shadow_0 = shadowPCF5X5(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #else\n shadow_0 = shadowSimple(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w);\n #endif\n shadow_0 = computeFallOff(shadow_0, projCoords0, 0.0);\n }\n result0.diffuse *= shadow_0;\n result0.specular *= shadow_0;\n #endif\n result.diffuse += result0.diffuse;\n result.specular += result0.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 1\n #if CC_LIGHT_1_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[1]);\n #else\n LightInfo info1;\n #if CC_LIGHT_1_TYPE == 0\n info1 = computeDirectionalLighting(cc_lightDirection[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 1\n info1 = computePointLighting(s.position, cc_lightPositionAndRange[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 2\n info1 = computeSpotLighting(s.position, cc_lightPositionAndRange[1], cc_lightDirection[1], cc_lightColor[1]);\n #endif\n Lighting result1 = toon(s, info1);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 1\n float shadow_1 = 1.0;\n vec2 projCoords1 = v_posLightSpace[1].xy / v_posLightSpace[1].w;\n vec2 shadowUV1 = projCoords1 * 0.5 + vec2(0.5);\n if (shadowUV1.x >= 0.0 && shadowUV1.x <= 1.0 && shadowUV1.y >= 0.0 && shadowUV1.y <= 1.0) {\n float currentDepth1 = clamp(v_depth[1], 0.0, 1.0);\n #if CC_SHADOW_1_TYPE == 3\n shadow_1 = shadowPCF3X3(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #elif CC_SHADOW_1_TYPE == 4\n shadow_1 = shadowPCF5X5(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #else\n shadow_1 = shadowSimple(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w);\n #endif\n shadow_1 = computeFallOff(shadow_1, projCoords1, 0.0);\n }\n result1.diffuse *= shadow_1;\n result1.specular *= shadow_1;\n #endif\n result.diffuse += result1.diffuse;\n result.specular += result1.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 2\n #if CC_LIGHT_2_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[2]);\n #else\n LightInfo info2;\n #if CC_LIGHT_2_TYPE == 0\n info2 = computeDirectionalLighting(cc_lightDirection[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 1\n info2 = computePointLighting(s.position, cc_lightPositionAndRange[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 2\n info2 = computeSpotLighting(s.position, cc_lightPositionAndRange[2], cc_lightDirection[2], cc_lightColor[2]);\n #endif\n Lighting result2 = toon(s, info2);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 2\n float shadow_2 = 1.0;\n vec2 projCoords2 = v_posLightSpace[2].xy / v_posLightSpace[2].w;\n vec2 shadowUV2 = projCoords2 * 0.5 + vec2(0.5);\n if (shadowUV2.x >= 0.0 && shadowUV2.x <= 1.0 && shadowUV2.y >= 0.0 && shadowUV2.y <= 1.0) {\n float currentDepth2 = clamp(v_depth[2], 0.0, 1.0);\n #if CC_SHADOW_2_TYPE == 3\n shadow_2 = shadowPCF3X3(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #elif CC_SHADOW_2_TYPE == 4\n shadow_2 = shadowPCF5X5(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #else\n shadow_2 = shadowSimple(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w);\n #endif\n shadow_2 = computeFallOff(shadow_2, projCoords2, 0.0);\n }\n result2.diffuse *= shadow_2;\n result2.specular *= shadow_2;\n #endif\n result.diffuse += result2.diffuse;\n result.specular += result2.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 3\n #if CC_LIGHT_3_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[3]);\n #else\n LightInfo info3;\n #if CC_LIGHT_3_TYPE == 0\n info3 = computeDirectionalLighting(cc_lightDirection[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 1\n info3 = computePointLighting(s.position, cc_lightPositionAndRange[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 2\n info3 = computeSpotLighting(s.position, cc_lightPositionAndRange[3], cc_lightDirection[3], cc_lightColor[3]);\n #endif\n Lighting result3 = toon(s, info3);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 3\n float shadow_3 = 1.0;\n vec2 projCoords3 = v_posLightSpace[3].xy / v_posLightSpace[3].w;\n vec2 shadowUV3 = projCoords3 * 0.5 + vec2(0.5);\n if (shadowUV3.x >= 0.0 && shadowUV3.x <= 1.0 && shadowUV3.y >= 0.0 && shadowUV3.y <= 1.0) {\n float currentDepth3 = clamp(v_depth[3], 0.0, 1.0);\n #if CC_SHADOW_3_TYPE == 3\n shadow_3 = shadowPCF3X3(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #elif CC_SHADOW_3_TYPE == 4\n shadow_3 = shadowPCF5X5(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #else\n shadow_3 = shadowSimple(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w);\n #endif\n shadow_3 = computeFallOff(shadow_3, projCoords3, 0.0);\n }\n result3.diffuse *= shadow_3;\n result3.specular *= shadow_3;\n #endif\n result.diffuse += result3.diffuse;\n result.specular += result3.specular;\n #endif\n #endif\n vec3 finalColor = result.diffuse + result.specular + s.emissive;\n return vec4(finalColor, s.baseColor.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nin vec3 v_position;\nin vec2 v_uv;\nin vec3 v_viewDirection;\nin vec3 v_normal;\n#if USE_NORMAL_MAP\n in vec3 v_tangent;\n in vec3 v_bitangent;\n uniform sampler2D normalMap;\n#endif\n#if USE_BASE_COLOR_MAP\n uniform sampler2D baseColorMap;\n#endif\n#if USE_SPECULAR_MAP\n uniform sampler2D specularMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\nuniform ToonFrag {\n vec4 colorScale;\n vec4 specular;\n vec4 emissive;\n vec4 shadowColor;\n vec4 highlightColor;\n float specularThreshold;\n float shadowIntensity;\n float lightThreshold;\n float lightSmoothness;\n};\nvoid surf (out ToonSurface s) {\n #if USE_BASE_COLOR_MAP\n s.baseColor = vec4(1.);\n vec4 baseColorMap_tmp = texture(baseColorMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_baseColorMap\n baseColorMap_tmp.a *= texture(baseColorMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.baseColor.rgb *= (baseColorMap_tmp.rgb * baseColorMap_tmp.rgb);\n s.baseColor.a *= baseColorMap_tmp.a;\n #else\n s.baseColor *= baseColorMap_tmp;\n #endif\n #else\n s.baseColor = highlightColor;\n #endif\n s.normal = normalize(v_normal);\n #if USE_NORMAL_MAP\n vec3 nmmp = texture2D(normalMap, v_uv).xyz - vec3(0.5);\n s.normal = normalize(\n nmmp.x * normalize(v_tangent) +\n nmmp.y * normalize(v_bitangent) +\n nmmp.z * s.normal);\n #endif\n s.position = v_position;\n s.specular = specular.rgb * specular.a;\n #if USE_SPECULAR_MAP\n vec4 specularMap_tmp = texture(specularMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_specularMap\n specularMap_tmp.a *= texture(specularMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.specular.rgb *= (specularMap_tmp.rgb * specularMap_tmp.rgb);\n #else\n s.specular.rgb *= specularMap_tmp.rgb;\n #endif\n #endif\n s.emissive = emissive.rgb;\n #if USE_EMISSIVE_MAP\n vec4 emissiveMap_tmp = texture(emissiveMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_emissiveMap\n emissiveMap_tmp.a *= texture(emissiveMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.emissive.rgb *= (emissiveMap_tmp.rgb * emissiveMap_tmp.rgb);\n #else\n s.emissive.rgb *= emissiveMap_tmp.rgb;\n #endif\n #endif\n s.lightThreshold = lightThreshold;\n s.lightSmoothness = lightSmoothness;\n s.shadowColor = shadowColor.rgb;\n s.highlightColor = highlightColor.rgb;\n s.shadowIntensity = shadowIntensity;\n s.specularThreshold = specularThreshold;\n s.viewDirection = v_viewDirection;\n}\nvec4 frag () {\n ToonSurface s;\n surf(s);\n vec4 color = CCToonShading(s);\n return CCFragOutput(color);\n}\nout vec4 cc_FragColor;\nvoid main() { cc_FragColor = frag(); }" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform vec4 cc_cameraPos;\nuniform mat4 cc_matWorld;\nuniform mat4 cc_matWorldIT;\n#if CC_USE_SKINNING\n attribute vec4 a_weights;\n attribute vec4 a_joints;\n #if CC_USE_JOINTS_TEXTRUE\n uniform vec2 jointsTextureSize;\n uniform sampler2D jointsTexture;\n #if CC_JOINTS_TEXTURE_FLOAT32\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 4.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = texture2D(jointsTexture, vec2(dx * (x + 0.5), y));\n vec4 v2 = texture2D(jointsTexture, vec2(dx * (x + 1.5), y));\n vec4 v3 = texture2D(jointsTexture, vec2(dx * (x + 2.5), y));\n vec4 v4 = texture2D(jointsTexture, vec2(dx * (x + 3.5), y));\n return mat4(v1, v2, v3, v4);\n }\n #else\n float decode32(vec4 rgba) {\n float Sign = 1.0 - step(128.0, rgba[0]) * 2.0;\n float Exponent = 2.0 * mod(rgba[0], 128.0) + step(128.0, rgba[1]) - 127.0;\n float Mantissa = mod(rgba[1], 128.0) * 65536.0 + rgba[2] * 256.0 + rgba[3] + 8388608.0;\n return Sign * exp2(Exponent - 23.0) * Mantissa;\n }\n vec4 decodevec4 (vec4 x, vec4 y, vec4 z, vec4 w) {\n return vec4(\n decode32(x.wzyx * 255.0),\n decode32(y.wzyx * 255.0),\n decode32(z.wzyx * 255.0),\n decode32(w.wzyx * 255.0)\n );\n }\n vec4 decodevec4 (float dx, float x, float y) {\n return decodevec4(\n texture2D(jointsTexture, vec2(dx * (x + 0.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 1.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 2.5), y)),\n texture2D(jointsTexture, vec2(dx * (x + 3.5), y))\n );\n }\n mat4 getBoneMatrix(const in float i) {\n float width = jointsTextureSize.x;\n float height = jointsTextureSize.y;\n float j = i * 16.0;\n float x = mod(j, width);\n float y = floor(j / width);\n float dx = 1.0 / width;\n float dy = 1.0 / height;\n y = dy * (y + 0.5);\n vec4 v1 = decodevec4(dx, x, y);\n vec4 v2 = decodevec4(dx, x+4.0, y);\n vec4 v3 = decodevec4(dx, x+8.0, y);\n vec4 v4 = decodevec4(dx, x+12.0, y);\n return mat4(v1, v2, v3, v4);\n }\n #endif\n #else\n uniform mat4 jointMatrices[50];\n mat4 getBoneMatrix(const in float i) {\n return jointMatrices[int(i)];\n }\n #endif\n mat4 skinMatrix() {\n return\n getBoneMatrix(a_joints.x) * a_weights.x +\n getBoneMatrix(a_joints.y) * a_weights.y +\n getBoneMatrix(a_joints.z) * a_weights.z +\n getBoneMatrix(a_joints.w) * a_weights.w\n ;\n }\n#endif\nstruct StandardVertInput {\n vec2 uv;\n vec4 position;\n vec3 normal;\n vec4 tangent;\n vec4 color;\n};\nattribute vec3 a_position;\n#if CC_USE_ATTRIBUTE_UV0\nattribute vec2 a_uv0;\n#endif\n#if CC_USE_ATTRIBUTE_COLOR\nattribute vec4 a_color;\n#endif\n#if CC_USE_ATTRIBUTE_NORMAL\nattribute vec3 a_normal;\n#endif\n#if CC_USE_ATTRIBUTE_TANGENT\nattribute vec4 a_tangent;\n#endif\nvoid CCAttribute (out StandardVertInput In) {\n In.position = vec4(a_position, 1.0);\n #if CC_USE_ATTRIBUTE_UV0\n In.uv = a_uv0;\n #else\n In.uv = vec2(0.0);\n #endif\n #if CC_USE_ATTRIBUTE_COLOR\n In.color = a_color;\n #else\n In.color = vec4(1.0);\n #endif\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = a_normal;\n #else\n In.normal = vec3(0.0, 1.0, 0.0);\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = a_tangent;\n #else\n In.tangent = vec4(1.0, 0.0, 0.0, 0.0);\n #endif\n}\nvoid CCVertInput(out StandardVertInput In) {\n CCAttribute(In);\n #if CC_USE_SKINNING\n mat4 m = skinMatrix();\n In.position = m * In.position;\n #if CC_USE_ATTRIBUTE_NORMAL\n In.normal = (m * vec4(In.normal, 0)).xyz;\n #endif\n #if CC_USE_ATTRIBUTE_TANGENT\n In.tangent = m * In.tangent;\n #endif\n #endif\n}\nvarying vec3 v_position;\nvarying vec2 v_uv;\nvarying vec3 v_normal;\nvarying vec3 v_viewDirection;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n#endif\nuniform vec4 tilingOffset;\nvec4 vert () {\n StandardVertInput In;\n CCVertInput(In);\n vec4 pos = cc_matWorld * In.position;\n v_position = pos.xyz;\n v_uv = In.uv * tilingOffset.xy + tilingOffset.zw;\n v_viewDirection = normalize(cc_cameraPos.xyz - v_position);\n v_normal = (cc_matWorldIT * vec4(In.normal, 0.0)).xyz;\n #if USE_NORMAL_MAP\n v_tangent = normalize((cc_matWorldIT * vec4(In.tangent.xyz, 0.0)).xyz);\n v_bitangent = cross(v_normal, v_tangent) * In.tangent.w;\n #endif\n return cc_matViewProj * pos;\n}\nvoid main() { gl_Position = vert(); }", + "frag": "\nprecision highp float;\n#if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n uniform vec4 cc_shadow_info[2];\n #if CC_NUM_SHADOW_LIGHTS > 0\n uniform sampler2D cc_shadow_map_0;\n #endif\n #if CC_NUM_SHADOW_LIGHTS > 1\n uniform sampler2D cc_shadow_map_1;\n #endif\n varying vec4 v_posLightSpace[2];\n varying float v_depth[2];\n#endif\nfloat unpackRGBAToDepth(vec4 color) {\n return dot(color, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 160581375.0));\n}\nfloat getDepth(sampler2D shadowMap, vec2 shadowUV) {\n return unpackRGBAToDepth(texture2D(shadowMap, shadowUV));\n}\nfloat computeFallOff(float shadow, vec2 coords, float frustumEdgeFalloff) {\n return shadow;\n}\nfloat shadowSimple(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness) {\n float closestDepth = getDepth(shadowMap, shadowUV);\n return currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n}\nfloat shadowPCF3X3(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -1; x <= 1; ++x) {\n for (int y = -1; y <= 1; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 9.0;\n return shadow;\n}\nfloat shadowPCF5X5(sampler2D shadowMap, vec2 shadowUV, float currentDepth, float darkness, float shadowSize) {\n float shadow = 0.0;\n for (int x = -2; x <= 2; ++x) {\n for (int y = -2; y <= 2; ++y) {\n float closestDepth = getDepth(shadowMap, shadowUV + vec2(x, y) * 1.0/shadowSize);\n shadow += currentDepth > closestDepth ? 1.0 - darkness : 1.0;\n }\n }\n shadow /= 25.0;\n return shadow;\n}\n#if CC_NUM_LIGHTS > 0\nuniform vec4 cc_lightPositionAndRange[4];\nuniform vec4 cc_lightDirection[4];\nuniform vec4 cc_lightColor[4];\n#endif\nstruct LightInfo {\n vec3 lightDir;\n vec3 radiance;\n vec4 lightColor;\n};\nLightInfo computeDirectionalLighting(\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n ret.lightDir = -normalize(lightDirection.xyz);\n ret.radiance = lightColor.rgb;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computePointLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n ret.lightDir = normalize(lightDir);\n ret.radiance = lightColor.rgb * attenuation;\n ret.lightColor = lightColor;\n return ret;\n}\nLightInfo computeSpotLighting(\n vec3 worldPosition,\n vec4 lightPositionAndRange,\n vec4 lightDirection,\n vec4 lightColor\n) {\n LightInfo ret;\n vec3 lightDir = lightPositionAndRange.xyz - worldPosition;\n float attenuation = max(0., 1.0 - length(lightDir) / lightPositionAndRange.w);\n lightDir = normalize(lightDir);\n float cosConeAngle = max(0., dot(lightDirection.xyz, -lightDir));\n cosConeAngle = cosConeAngle < lightDirection.w ? 0. : cosConeAngle;\n cosConeAngle = pow(cosConeAngle, lightColor.w);\n ret.lightDir = lightDir;\n ret.radiance = lightColor.rgb * attenuation * cosConeAngle;\n ret.lightColor = lightColor;\n return ret;\n}\nstruct Lighting {\n vec3 diffuse;\n vec3 specular;\n};\nstruct ToonSurface {\n vec4 baseColor;\n vec3 specular;\n float specularThreshold;\n vec3 position;\n vec3 normal;\n vec3 viewDirection;\n vec3 emissive;\n vec3 shadowColor;\n float shadowIntensity;\n vec3 highlightColor;\n float lightThreshold;\n float lightSmoothness;\n};\nconst float T_H = 0.25;\nfloat TreshHoldLighting(float lThreshold, float smoothness, float v) {\n return smoothstep(lThreshold-smoothness*T_H, lThreshold+smoothness*T_H, v);\n}\nLighting toon (ToonSurface s, LightInfo info) {\n Lighting result;\n vec3 N = s.normal;\n vec3 L = info.lightDir;\n vec3 V = s.viewDirection;\n vec3 H = normalize(L + V);\n float NL = 0.5 * dot(N, L) + 0.5;\n float NH = 0.5 * dot(H, N) + 0.5;\n vec3 c = vec3(0.0);\n vec3 attenuation = info.radiance;\n vec3 lightColor = info.lightColor.rgb;\n vec3 shadowColor = mix(s.highlightColor * lightColor, s.shadowColor, s.shadowIntensity);\n vec3 diffuse = TreshHoldLighting(s.lightThreshold, s.lightSmoothness, NL) * attenuation;\n diffuse = mix(shadowColor, s.highlightColor * lightColor, diffuse);\n result.diffuse = diffuse * s.baseColor.rgb;\n float specularWeight = 1.0 - pow(s.specularThreshold, 5.0);\n float specularMask = step(specularWeight, NH);\n vec3 specular = s.specular.rgb * specularMask;\n result.specular = specular * attenuation;\n return result;\n}\nvec3 ambient(ToonSurface s, vec4 ambientColor) {\n return s.baseColor.rgb * ambientColor.rgb;\n}\nvec4 CCToonShading (ToonSurface s) {\n Lighting result;\n result.diffuse = vec3(0, 0, 0);\n result.specular = vec3(0, 0, 0);\n #if CC_NUM_LIGHTS > 0\n #if CC_LIGHT_0_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[0]);\n #else\n LightInfo info0;\n #if CC_LIGHT_0_TYPE == 0\n info0 = computeDirectionalLighting(cc_lightDirection[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 1\n info0 = computePointLighting(s.position, cc_lightPositionAndRange[0], cc_lightColor[0]);\n #elif CC_LIGHT_0_TYPE == 2\n info0 = computeSpotLighting(s.position, cc_lightPositionAndRange[0], cc_lightDirection[0], cc_lightColor[0]);\n #endif\n Lighting result0 = toon(s, info0);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 0\n float shadow_0 = 1.0;\n vec2 projCoords0 = v_posLightSpace[0].xy / v_posLightSpace[0].w;\n vec2 shadowUV0 = projCoords0 * 0.5 + vec2(0.5);\n if (shadowUV0.x >= 0.0 && shadowUV0.x <= 1.0 && shadowUV0.y >= 0.0 && shadowUV0.y <= 1.0) {\n float currentDepth0 = clamp(v_depth[0], 0.0, 1.0);\n #if CC_SHADOW_0_TYPE == 3\n shadow_0 = shadowPCF3X3(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #elif CC_SHADOW_0_TYPE == 4\n shadow_0 = shadowPCF5X5(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w, cc_shadow_info[0].z);\n #else\n shadow_0 = shadowSimple(cc_shadow_map_0, shadowUV0, currentDepth0, cc_shadow_info[0].w);\n #endif\n shadow_0 = computeFallOff(shadow_0, projCoords0, 0.0);\n }\n result0.diffuse *= shadow_0;\n result0.specular *= shadow_0;\n #endif\n result.diffuse += result0.diffuse;\n result.specular += result0.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 1\n #if CC_LIGHT_1_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[1]);\n #else\n LightInfo info1;\n #if CC_LIGHT_1_TYPE == 0\n info1 = computeDirectionalLighting(cc_lightDirection[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 1\n info1 = computePointLighting(s.position, cc_lightPositionAndRange[1], cc_lightColor[1]);\n #elif CC_LIGHT_1_TYPE == 2\n info1 = computeSpotLighting(s.position, cc_lightPositionAndRange[1], cc_lightDirection[1], cc_lightColor[1]);\n #endif\n Lighting result1 = toon(s, info1);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 1\n float shadow_1 = 1.0;\n vec2 projCoords1 = v_posLightSpace[1].xy / v_posLightSpace[1].w;\n vec2 shadowUV1 = projCoords1 * 0.5 + vec2(0.5);\n if (shadowUV1.x >= 0.0 && shadowUV1.x <= 1.0 && shadowUV1.y >= 0.0 && shadowUV1.y <= 1.0) {\n float currentDepth1 = clamp(v_depth[1], 0.0, 1.0);\n #if CC_SHADOW_1_TYPE == 3\n shadow_1 = shadowPCF3X3(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #elif CC_SHADOW_1_TYPE == 4\n shadow_1 = shadowPCF5X5(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w, cc_shadow_info[1].z);\n #else\n shadow_1 = shadowSimple(cc_shadow_map_1, shadowUV1, currentDepth1, cc_shadow_info[1].w);\n #endif\n shadow_1 = computeFallOff(shadow_1, projCoords1, 0.0);\n }\n result1.diffuse *= shadow_1;\n result1.specular *= shadow_1;\n #endif\n result.diffuse += result1.diffuse;\n result.specular += result1.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 2\n #if CC_LIGHT_2_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[2]);\n #else\n LightInfo info2;\n #if CC_LIGHT_2_TYPE == 0\n info2 = computeDirectionalLighting(cc_lightDirection[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 1\n info2 = computePointLighting(s.position, cc_lightPositionAndRange[2], cc_lightColor[2]);\n #elif CC_LIGHT_2_TYPE == 2\n info2 = computeSpotLighting(s.position, cc_lightPositionAndRange[2], cc_lightDirection[2], cc_lightColor[2]);\n #endif\n Lighting result2 = toon(s, info2);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 2\n float shadow_2 = 1.0;\n vec2 projCoords2 = v_posLightSpace[2].xy / v_posLightSpace[2].w;\n vec2 shadowUV2 = projCoords2 * 0.5 + vec2(0.5);\n if (shadowUV2.x >= 0.0 && shadowUV2.x <= 1.0 && shadowUV2.y >= 0.0 && shadowUV2.y <= 1.0) {\n float currentDepth2 = clamp(v_depth[2], 0.0, 1.0);\n #if CC_SHADOW_2_TYPE == 3\n shadow_2 = shadowPCF3X3(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #elif CC_SHADOW_2_TYPE == 4\n shadow_2 = shadowPCF5X5(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w, cc_shadow_info[2].z);\n #else\n shadow_2 = shadowSimple(cc_shadow_map_2, shadowUV2, currentDepth2, cc_shadow_info[2].w);\n #endif\n shadow_2 = computeFallOff(shadow_2, projCoords2, 0.0);\n }\n result2.diffuse *= shadow_2;\n result2.specular *= shadow_2;\n #endif\n result.diffuse += result2.diffuse;\n result.specular += result2.specular;\n #endif\n #endif\n #if CC_NUM_LIGHTS > 3\n #if CC_LIGHT_3_TYPE == 3\n result.diffuse += ambient(s, cc_lightColor[3]);\n #else\n LightInfo info3;\n #if CC_LIGHT_3_TYPE == 0\n info3 = computeDirectionalLighting(cc_lightDirection[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 1\n info3 = computePointLighting(s.position, cc_lightPositionAndRange[3], cc_lightColor[3]);\n #elif CC_LIGHT_3_TYPE == 2\n info3 = computeSpotLighting(s.position, cc_lightPositionAndRange[3], cc_lightDirection[3], cc_lightColor[3]);\n #endif\n Lighting result3 = toon(s, info3);\n #if CC_USE_SHADOW_MAP && CC_NUM_SHADOW_LIGHTS > 3\n float shadow_3 = 1.0;\n vec2 projCoords3 = v_posLightSpace[3].xy / v_posLightSpace[3].w;\n vec2 shadowUV3 = projCoords3 * 0.5 + vec2(0.5);\n if (shadowUV3.x >= 0.0 && shadowUV3.x <= 1.0 && shadowUV3.y >= 0.0 && shadowUV3.y <= 1.0) {\n float currentDepth3 = clamp(v_depth[3], 0.0, 1.0);\n #if CC_SHADOW_3_TYPE == 3\n shadow_3 = shadowPCF3X3(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #elif CC_SHADOW_3_TYPE == 4\n shadow_3 = shadowPCF5X5(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w, cc_shadow_info[3].z);\n #else\n shadow_3 = shadowSimple(cc_shadow_map_3, shadowUV3, currentDepth3, cc_shadow_info[3].w);\n #endif\n shadow_3 = computeFallOff(shadow_3, projCoords3, 0.0);\n }\n result3.diffuse *= shadow_3;\n result3.specular *= shadow_3;\n #endif\n result.diffuse += result3.diffuse;\n result.specular += result3.specular;\n #endif\n #endif\n vec3 finalColor = result.diffuse + result.specular + s.emissive;\n return vec4(finalColor, s.baseColor.a);\n}\nvec4 CCFragOutput (vec4 color) {\n #if OUTPUT_TO_GAMMA\n color.rgb = sqrt(color.rgb);\n #endif\n\treturn color;\n}\nvarying vec3 v_position;\nvarying vec2 v_uv;\nvarying vec3 v_viewDirection;\nvarying vec3 v_normal;\n#if USE_NORMAL_MAP\n varying vec3 v_tangent;\n varying vec3 v_bitangent;\n uniform sampler2D normalMap;\n#endif\n#if USE_BASE_COLOR_MAP\n uniform sampler2D baseColorMap;\n#endif\n#if USE_SPECULAR_MAP\n uniform sampler2D specularMap;\n#endif\n#if USE_EMISSIVE_MAP\n uniform sampler2D emissiveMap;\n#endif\nuniform vec4 specular;\nuniform vec4 emissive;\nuniform vec4 shadowColor;\nuniform vec4 highlightColor;\nuniform float specularThreshold;\nuniform float shadowIntensity;\nuniform float lightThreshold;\nuniform float lightSmoothness;\nvoid surf (out ToonSurface s) {\n #if USE_BASE_COLOR_MAP\n s.baseColor = vec4(1.);\n vec4 baseColorMap_tmp = texture2D(baseColorMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_baseColorMap\n baseColorMap_tmp.a *= texture2D(baseColorMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.baseColor.rgb *= (baseColorMap_tmp.rgb * baseColorMap_tmp.rgb);\n s.baseColor.a *= baseColorMap_tmp.a;\n #else\n s.baseColor *= baseColorMap_tmp;\n #endif\n #else\n s.baseColor = highlightColor;\n #endif\n s.normal = normalize(v_normal);\n #if USE_NORMAL_MAP\n vec3 nmmp = texture2D(normalMap, v_uv).xyz - vec3(0.5);\n s.normal = normalize(\n nmmp.x * normalize(v_tangent) +\n nmmp.y * normalize(v_bitangent) +\n nmmp.z * s.normal);\n #endif\n s.position = v_position;\n s.specular = specular.rgb * specular.a;\n #if USE_SPECULAR_MAP\n vec4 specularMap_tmp = texture2D(specularMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_specularMap\n specularMap_tmp.a *= texture2D(specularMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.specular.rgb *= (specularMap_tmp.rgb * specularMap_tmp.rgb);\n #else\n s.specular.rgb *= specularMap_tmp.rgb;\n #endif\n #endif\n s.emissive = emissive.rgb;\n #if USE_EMISSIVE_MAP\n vec4 emissiveMap_tmp = texture2D(emissiveMap, v_uv);\n #if CC_USE_ALPHA_ATLAS_emissiveMap\n emissiveMap_tmp.a *= texture2D(emissiveMap, v_uv + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n s.emissive.rgb *= (emissiveMap_tmp.rgb * emissiveMap_tmp.rgb);\n #else\n s.emissive.rgb *= emissiveMap_tmp.rgb;\n #endif\n #endif\n s.lightThreshold = lightThreshold;\n s.lightSmoothness = lightSmoothness;\n s.shadowColor = shadowColor.rgb;\n s.highlightColor = highlightColor.rgb;\n s.shadowIntensity = shadowIntensity;\n s.specularThreshold = specularThreshold;\n s.viewDirection = v_viewDirection;\n}\nvec4 frag () {\n ToonSurface s;\n surf(s);\n vec4 color = CCToonShading(s);\n return CCFragOutput(color);\n}\nvoid main() { gl_FragColor = frag(); }" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + }, + { + "name": "CC_SHADOW", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "CCLIGHTS", + "defines": [ + "CC_NUM_LIGHTS" + ] + } + ], + "samplers": [ + { + "name": "cc_shadow_map_0", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + }, + { + "name": "cc_shadow_map_1", + "defines": [ + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ] + } + ] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "CC_USE_SKINNING", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_JOINTS_TEXTRUE", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING" + ] + }, + { + "name": "CC_JOINTS_TEXTURE_FLOAT32", + "type": "boolean", + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ] + }, + { + "name": "CC_USE_ATTRIBUTE_UV0", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_COLOR", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_NORMAL", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ATTRIBUTE_TANGENT", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_NORMAL_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_SHADOW_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_NUM_SHADOW_LIGHTS", + "type": "number", + "defines": [ + "CC_USE_SHADOW_MAP" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_NUM_LIGHTS", + "type": "number", + "defines": [], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_0_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_0_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_1_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_1_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_2_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_2_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_LIGHT_3_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "CC_SHADOW_3_TYPE", + "type": "number", + "defines": [ + "CC_NUM_LIGHTS", + "CC_USE_SHADOW_MAP", + "CC_NUM_SHADOW_LIGHTS" + ], + "range": [ + 0, + 3 + ] + }, + { + "name": "OUTPUT_TO_GAMMA", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_BASE_COLOR_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_SPECULAR_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_EMISSIVE_MAP", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_ALPHA_ATLAS_baseColorMap", + "type": "boolean", + "defines": [ + "USE_BASE_COLOR_MAP" + ] + }, + { + "name": "INPUT_IS_GAMMA", + "type": "boolean", + "defines": [ + "USE_BASE_COLOR_MAP" + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_specularMap", + "type": "boolean", + "defines": [ + "USE_SPECULAR_MAP" + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_emissiveMap", + "type": "boolean", + "defines": [ + "USE_EMISSIVE_MAP" + ] + } + ], + "blocks": [ + { + "name": "SKINNING", + "members": [ + { + "name": "jointsTextureSize", + "type": 14, + "count": 1 + } + ], + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 0 + }, + { + "name": "JOINT_MATRIX", + "members": [ + { + "name": "jointMatrices", + "type": 26, + "count": 50 + } + ], + "defines": [ + "CC_USE_SKINNING" + ], + "binding": 1 + }, + { + "name": "ToonVert", + "members": [ + { + "name": "tilingOffset", + "type": 16, + "count": 1 + } + ], + "defines": [], + "binding": 2 + }, + { + "name": "ToonFrag", + "members": [ + { + "name": "colorScale", + "type": 16, + "count": 1 + }, + { + "name": "specular", + "type": 16, + "count": 1 + }, + { + "name": "emissive", + "type": 16, + "count": 1 + }, + { + "name": "shadowColor", + "type": 16, + "count": 1 + }, + { + "name": "highlightColor", + "type": 16, + "count": 1 + }, + { + "name": "specularThreshold", + "type": 13, + "count": 1 + }, + { + "name": "shadowIntensity", + "type": 13, + "count": 1 + }, + { + "name": "lightThreshold", + "type": 13, + "count": 1 + }, + { + "name": "lightSmoothness", + "type": 13, + "count": 1 + } + ], + "defines": [], + "binding": 3 + } + ], + "samplers": [ + { + "name": "jointsTexture", + "type": 29, + "count": 1, + "defines": [ + "CC_USE_SKINNING", + "CC_USE_JOINTS_TEXTRUE" + ], + "binding": 30 + }, + { + "name": "normalMap", + "type": 29, + "count": 1, + "defines": [ + "USE_NORMAL_MAP" + ], + "binding": 31 + }, + { + "name": "baseColorMap", + "type": 29, + "count": 1, + "defines": [ + "USE_BASE_COLOR_MAP" + ], + "binding": 32 + }, + { + "name": "specularMap", + "type": 29, + "count": 1, + "defines": [ + "USE_SPECULAR_MAP" + ], + "binding": 33 + }, + { + "name": "emissiveMap", + "type": 29, + "count": 1, + "defines": [ + "USE_EMISSIVE_MAP" + ], + "binding": 34 + } + ], + "record": null, + "name": "builtin-toon|toon-vs:vert|toon-fs:frag" + } + ] +} \ No newline at end of file diff --git a/library/imports/e3/e30f966f-d546-44a0-9ee4-ba5745d69daa.json b/library/imports/e3/e30f966f-d546-44a0-9ee4-ba5745d69daa.json new file mode 100644 index 0000000..777c822 --- /dev/null +++ b/library/imports/e3/e30f966f-d546-44a0-9ee4-ba5745d69daa.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_other", + "texture": "ff2159b6-082c-4a51-8ae1-77f8acbb60a1", + "atlas": "4aa928a4-3ba6-433f-a3d6-261260e338af", + "rect": [ + 1, + 123, + 750, + 30 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 30 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e3/e363a676-9b52-4402-b43a-37062f24c250.json b/library/imports/e3/e363a676-9b52-4402-b43a-37062f24c250.json new file mode 100644 index 0000000..363d8f1 --- /dev/null +++ b/library/imports/e3/e363a676-9b52-4402-b43a-37062f24c250.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire6", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1587, + 213, + 106, + 66 + ], + "offset": [ + -1, + -12 + ], + "originalSize": [ + 152, + 90 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e4/e46860aa-922b-408c-8a92-ccfb24106c76.json b/library/imports/e4/e46860aa-922b-408c-8a92-ccfb24106c76.json new file mode 100644 index 0000000..5c2a973 --- /dev/null +++ b/library/imports/e4/e46860aa-922b-408c-8a92-ccfb24106c76.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rank_Bg", + "texture": "b6890719-3b74-401d-9195-b39ec488d5e0", + "atlas": "", + "rect": [ + 0, + 0, + 750, + 1660 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 1660 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js b/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js new file mode 100644 index 0000000..39fbf83 --- /dev/null +++ b/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js @@ -0,0 +1,2328 @@ +"use strict"; +cc._RF.push(module, 'e64e1qXyT9CV6s0gDQdj/ed', 'crypto-js.min'); +// Script/module/Crypto/crypto-js.min.js + +"use strict"; + +!function (t, r) { + "object" == typeof exports ? module.exports = exports = r() : "function" == typeof define && define.amd ? define([], r) : t.CryptoJS = r(); +}(void 0, function () { + var t = t || function (t, r) { + var e = Object.create || function () { + function t() {} + + return function (r) { + var e; + return t.prototype = r, e = new t(), t.prototype = null, e; + }; + }(), + i = {}, + n = i.lib = {}, + o = n.Base = function () { + return { + extend: function extend(t) { + var r = e(this); + return t && r.mixIn(t), r.hasOwnProperty("init") && this.init !== r.init || (r.init = function () { + r.$super.init.apply(this, arguments); + }), r.init.prototype = r, r.$super = this, r; + }, + create: function create() { + var t = this.extend(); + return t.init.apply(t, arguments), t; + }, + init: function init() {}, + mixIn: function mixIn(t) { + for (var r in t) { + t.hasOwnProperty(r) && (this[r] = t[r]); + } + + t.hasOwnProperty("toString") && (this.toString = t.toString); + }, + clone: function clone() { + return this.init.prototype.extend(this); + } + }; + }(), + s = n.WordArray = o.extend({ + init: function init(t, e) { + t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 4 * t.length; + }, + toString: function toString(t) { + return (t || c).stringify(this); + }, + concat: function concat(t) { + var r = this.words, + e = t.words, + i = this.sigBytes, + n = t.sigBytes; + if (this.clamp(), i % 4) for (var o = 0; o < n; o++) { + var s = e[o >>> 2] >>> 24 - o % 4 * 8 & 255; + r[i + o >>> 2] |= s << 24 - (i + o) % 4 * 8; + } else for (var o = 0; o < n; o += 4) { + r[i + o >>> 2] = e[o >>> 2]; + } + return this.sigBytes += n, this; + }, + clamp: function clamp() { + var r = this.words, + e = this.sigBytes; + r[e >>> 2] &= 4294967295 << 32 - e % 4 * 8, r.length = t.ceil(e / 4); + }, + clone: function clone() { + var t = o.clone.call(this); + return t.words = this.words.slice(0), t; + }, + random: function random(r) { + for (var e, i = [], n = function n(r) { + var r = r, + e = 987654321, + i = 4294967295; + return function () { + e = 36969 * (65535 & e) + (e >> 16) & i, r = 18e3 * (65535 & r) + (r >> 16) & i; + var n = (e << 16) + r & i; + return n /= 4294967296, n += .5, n * (t.random() > .5 ? 1 : -1); + }; + }, o = 0; o < r; o += 4) { + var a = n(4294967296 * (e || t.random())); + e = 987654071 * a(), i.push(4294967296 * a() | 0); + } + + return new s.init(i, r); + } + }), + a = i.enc = {}, + c = a.Hex = { + stringify: function stringify(t) { + for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { + var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; + i.push((o >>> 4).toString(16)), i.push((15 & o).toString(16)); + } + + return i.join(""); + }, + parse: function parse(t) { + for (var r = t.length, e = [], i = 0; i < r; i += 2) { + e[i >>> 3] |= parseInt(t.substr(i, 2), 16) << 24 - i % 8 * 4; + } + + return new s.init(e, r / 2); + } + }, + h = a.Latin1 = { + stringify: function stringify(t) { + for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n++) { + var o = r[n >>> 2] >>> 24 - n % 4 * 8 & 255; + i.push(String.fromCharCode(o)); + } + + return i.join(""); + }, + parse: function parse(t) { + for (var r = t.length, e = [], i = 0; i < r; i++) { + e[i >>> 2] |= (255 & t.charCodeAt(i)) << 24 - i % 4 * 8; + } + + return new s.init(e, r); + } + }, + l = a.Utf8 = { + stringify: function stringify(t) { + try { + return decodeURIComponent(escape(h.stringify(t))); + } catch (t) { + throw new Error("Malformed UTF-8 data"); + } + }, + parse: function parse(t) { + return h.parse(unescape(encodeURIComponent(t))); + } + }, + f = n.BufferedBlockAlgorithm = o.extend({ + reset: function reset() { + this._data = new s.init(), this._nDataBytes = 0; + }, + _append: function _append(t) { + "string" == typeof t && (t = l.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes; + }, + _process: function _process(r) { + var e = this._data, + i = e.words, + n = e.sigBytes, + o = this.blockSize, + a = 4 * o, + c = n / a; + c = r ? t.ceil(c) : t.max((0 | c) - this._minBufferSize, 0); + var h = c * o, + l = t.min(4 * h, n); + + if (h) { + for (var f = 0; f < h; f += o) { + this._doProcessBlock(i, f); + } + + var u = i.splice(0, h); + e.sigBytes -= l; + } + + return new s.init(u, l); + }, + clone: function clone() { + var t = o.clone.call(this); + return t._data = this._data.clone(), t; + }, + _minBufferSize: 0 + }), + u = (n.Hasher = f.extend({ + cfg: o.extend(), + init: function init(t) { + this.cfg = this.cfg.extend(t), this.reset(); + }, + reset: function reset() { + f.reset.call(this), this._doReset(); + }, + update: function update(t) { + return this._append(t), this._process(), this; + }, + finalize: function finalize(t) { + t && this._append(t); + + var r = this._doFinalize(); + + return r; + }, + blockSize: 16, + _createHelper: function _createHelper(t) { + return function (r, e) { + return new t.init(e).finalize(r); + }; + }, + _createHmacHelper: function _createHmacHelper(t) { + return function (r, e) { + return new u.HMAC.init(t, e).finalize(r); + }; + } + }), i.algo = {}); + + return i; + }(Math); + + return function () { + function r(t, r, e) { + for (var i = [], o = 0, s = 0; s < r; s++) { + if (s % 4) { + var a = e[t.charCodeAt(s - 1)] << s % 4 * 2, + c = e[t.charCodeAt(s)] >>> 6 - s % 4 * 2; + i[o >>> 2] |= (a | c) << 24 - o % 4 * 8, o++; + } + } + + return n.create(i, o); + } + + var e = t, + i = e.lib, + n = i.WordArray, + o = e.enc; + o.Base64 = { + stringify: function stringify(t) { + var r = t.words, + e = t.sigBytes, + i = this._map; + t.clamp(); + + for (var n = [], o = 0; o < e; o += 3) { + for (var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255, a = r[o + 1 >>> 2] >>> 24 - (o + 1) % 4 * 8 & 255, c = r[o + 2 >>> 2] >>> 24 - (o + 2) % 4 * 8 & 255, h = s << 16 | a << 8 | c, l = 0; l < 4 && o + .75 * l < e; l++) { + n.push(i.charAt(h >>> 6 * (3 - l) & 63)); + } + } + + var f = i.charAt(64); + if (f) for (; n.length % 4;) { + n.push(f); + } + return n.join(""); + }, + parse: function parse(t) { + var e = t.length, + i = this._map, + n = this._reverseMap; + + if (!n) { + n = this._reverseMap = []; + + for (var o = 0; o < i.length; o++) { + n[i.charCodeAt(o)] = o; + } + } + + var s = i.charAt(64); + + if (s) { + var a = t.indexOf(s); + a !== -1 && (e = a); + } + + return r(t, e, n); + }, + _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" + }; + }(), function (r) { + function e(t, r, e, i, n, o, s) { + var a = t + (r & e | ~r & i) + n + s; + return (a << o | a >>> 32 - o) + r; + } + + function i(t, r, e, i, n, o, s) { + var a = t + (r & i | e & ~i) + n + s; + return (a << o | a >>> 32 - o) + r; + } + + function n(t, r, e, i, n, o, s) { + var a = t + (r ^ e ^ i) + n + s; + return (a << o | a >>> 32 - o) + r; + } + + function o(t, r, e, i, n, o, s) { + var a = t + (e ^ (r | ~i)) + n + s; + return (a << o | a >>> 32 - o) + r; + } + + var s = t, + a = s.lib, + c = a.WordArray, + h = a.Hasher, + l = s.algo, + f = []; + !function () { + for (var t = 0; t < 64; t++) { + f[t] = 4294967296 * r.abs(r.sin(t + 1)) | 0; + } + }(); + var u = l.MD5 = h.extend({ + _doReset: function _doReset() { + this._hash = new c.init([1732584193, 4023233417, 2562383102, 271733878]); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var s = 0; s < 16; s++) { + var a = r + s, + c = t[a]; + t[a] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8); + } + + var h = this._hash.words, + l = t[r + 0], + u = t[r + 1], + d = t[r + 2], + v = t[r + 3], + p = t[r + 4], + _ = t[r + 5], + y = t[r + 6], + g = t[r + 7], + B = t[r + 8], + w = t[r + 9], + k = t[r + 10], + S = t[r + 11], + m = t[r + 12], + x = t[r + 13], + b = t[r + 14], + H = t[r + 15], + z = h[0], + A = h[1], + C = h[2], + D = h[3]; + z = e(z, A, C, D, l, 7, f[0]), D = e(D, z, A, C, u, 12, f[1]), C = e(C, D, z, A, d, 17, f[2]), A = e(A, C, D, z, v, 22, f[3]), z = e(z, A, C, D, p, 7, f[4]), D = e(D, z, A, C, _, 12, f[5]), C = e(C, D, z, A, y, 17, f[6]), A = e(A, C, D, z, g, 22, f[7]), z = e(z, A, C, D, B, 7, f[8]), D = e(D, z, A, C, w, 12, f[9]), C = e(C, D, z, A, k, 17, f[10]), A = e(A, C, D, z, S, 22, f[11]), z = e(z, A, C, D, m, 7, f[12]), D = e(D, z, A, C, x, 12, f[13]), C = e(C, D, z, A, b, 17, f[14]), A = e(A, C, D, z, H, 22, f[15]), z = i(z, A, C, D, u, 5, f[16]), D = i(D, z, A, C, y, 9, f[17]), C = i(C, D, z, A, S, 14, f[18]), A = i(A, C, D, z, l, 20, f[19]), z = i(z, A, C, D, _, 5, f[20]), D = i(D, z, A, C, k, 9, f[21]), C = i(C, D, z, A, H, 14, f[22]), A = i(A, C, D, z, p, 20, f[23]), z = i(z, A, C, D, w, 5, f[24]), D = i(D, z, A, C, b, 9, f[25]), C = i(C, D, z, A, v, 14, f[26]), A = i(A, C, D, z, B, 20, f[27]), z = i(z, A, C, D, x, 5, f[28]), D = i(D, z, A, C, d, 9, f[29]), C = i(C, D, z, A, g, 14, f[30]), A = i(A, C, D, z, m, 20, f[31]), z = n(z, A, C, D, _, 4, f[32]), D = n(D, z, A, C, B, 11, f[33]), C = n(C, D, z, A, S, 16, f[34]), A = n(A, C, D, z, b, 23, f[35]), z = n(z, A, C, D, u, 4, f[36]), D = n(D, z, A, C, p, 11, f[37]), C = n(C, D, z, A, g, 16, f[38]), A = n(A, C, D, z, k, 23, f[39]), z = n(z, A, C, D, x, 4, f[40]), D = n(D, z, A, C, l, 11, f[41]), C = n(C, D, z, A, v, 16, f[42]), A = n(A, C, D, z, y, 23, f[43]), z = n(z, A, C, D, w, 4, f[44]), D = n(D, z, A, C, m, 11, f[45]), C = n(C, D, z, A, H, 16, f[46]), A = n(A, C, D, z, d, 23, f[47]), z = o(z, A, C, D, l, 6, f[48]), D = o(D, z, A, C, g, 10, f[49]), C = o(C, D, z, A, b, 15, f[50]), A = o(A, C, D, z, _, 21, f[51]), z = o(z, A, C, D, m, 6, f[52]), D = o(D, z, A, C, v, 10, f[53]), C = o(C, D, z, A, k, 15, f[54]), A = o(A, C, D, z, u, 21, f[55]), z = o(z, A, C, D, B, 6, f[56]), D = o(D, z, A, C, H, 10, f[57]), C = o(C, D, z, A, y, 15, f[58]), A = o(A, C, D, z, x, 21, f[59]), z = o(z, A, C, D, p, 6, f[60]), D = o(D, z, A, C, S, 10, f[61]), C = o(C, D, z, A, d, 15, f[62]), A = o(A, C, D, z, w, 21, f[63]), h[0] = h[0] + z | 0, h[1] = h[1] + A | 0, h[2] = h[2] + C | 0, h[3] = h[3] + D | 0; + }, + _doFinalize: function _doFinalize() { + var t = this._data, + e = t.words, + i = 8 * this._nDataBytes, + n = 8 * t.sigBytes; + e[n >>> 5] |= 128 << 24 - n % 32; + var o = r.floor(i / 4294967296), + s = i; + e[(n + 64 >>> 9 << 4) + 15] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), e[(n + 64 >>> 9 << 4) + 14] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), t.sigBytes = 4 * (e.length + 1), this._process(); + + for (var a = this._hash, c = a.words, h = 0; h < 4; h++) { + var l = c[h]; + c[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8); + } + + return a; + }, + clone: function clone() { + var t = h.clone.call(this); + return t._hash = this._hash.clone(), t; + } + }); + s.MD5 = h._createHelper(u), s.HmacMD5 = h._createHmacHelper(u); + }(Math), function () { + var r = t, + e = r.lib, + i = e.WordArray, + n = e.Hasher, + o = r.algo, + s = [], + a = o.SHA1 = n.extend({ + _doReset: function _doReset() { + this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], a = e[3], c = e[4], h = 0; h < 80; h++) { + if (h < 16) s[h] = 0 | t[r + h];else { + var l = s[h - 3] ^ s[h - 8] ^ s[h - 14] ^ s[h - 16]; + s[h] = l << 1 | l >>> 31; + } + var f = (i << 5 | i >>> 27) + c + s[h]; + f += h < 20 ? (n & o | ~n & a) + 1518500249 : h < 40 ? (n ^ o ^ a) + 1859775393 : h < 60 ? (n & o | n & a | o & a) - 1894007588 : (n ^ o ^ a) - 899497514, c = a, a = o, o = n << 30 | n >>> 2, n = i, i = f; + } + + e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + a | 0, e[4] = e[4] + c | 0; + }, + _doFinalize: function _doFinalize() { + var t = this._data, + r = t.words, + e = 8 * this._nDataBytes, + i = 8 * t.sigBytes; + return r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = Math.floor(e / 4294967296), r[(i + 64 >>> 9 << 4) + 15] = e, t.sigBytes = 4 * r.length, this._process(), this._hash; + }, + clone: function clone() { + var t = n.clone.call(this); + return t._hash = this._hash.clone(), t; + } + }); + r.SHA1 = n._createHelper(a), r.HmacSHA1 = n._createHmacHelper(a); + }(), function (r) { + var e = t, + i = e.lib, + n = i.WordArray, + o = i.Hasher, + s = e.algo, + a = [], + c = []; + !function () { + function t(t) { + for (var e = r.sqrt(t), i = 2; i <= e; i++) { + if (!(t % i)) return !1; + } + + return !0; + } + + function e(t) { + return 4294967296 * (t - (0 | t)) | 0; + } + + for (var i = 2, n = 0; n < 64;) { + t(i) && (n < 8 && (a[n] = e(r.pow(i, .5))), c[n] = e(r.pow(i, 1 / 3)), n++), i++; + } + }(); + var h = [], + l = s.SHA256 = o.extend({ + _doReset: function _doReset() { + this._hash = new n.init(a.slice(0)); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], l = e[5], f = e[6], u = e[7], d = 0; d < 64; d++) { + if (d < 16) h[d] = 0 | t[r + d];else { + var v = h[d - 15], + p = (v << 25 | v >>> 7) ^ (v << 14 | v >>> 18) ^ v >>> 3, + _ = h[d - 2], + y = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10; + h[d] = p + h[d - 7] + y + h[d - 16]; + } + var g = a & l ^ ~a & f, + B = i & n ^ i & o ^ n & o, + w = (i << 30 | i >>> 2) ^ (i << 19 | i >>> 13) ^ (i << 10 | i >>> 22), + k = (a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25), + S = u + k + g + c[d] + h[d], + m = w + B; + u = f, f = l, l = a, a = s + S | 0, s = o, o = n, n = i, i = S + m | 0; + } + + e[0] = e[0] + i | 0, e[1] = e[1] + n | 0, e[2] = e[2] + o | 0, e[3] = e[3] + s | 0, e[4] = e[4] + a | 0, e[5] = e[5] + l | 0, e[6] = e[6] + f | 0, e[7] = e[7] + u | 0; + }, + _doFinalize: function _doFinalize() { + var t = this._data, + e = t.words, + i = 8 * this._nDataBytes, + n = 8 * t.sigBytes; + return e[n >>> 5] |= 128 << 24 - n % 32, e[(n + 64 >>> 9 << 4) + 14] = r.floor(i / 4294967296), e[(n + 64 >>> 9 << 4) + 15] = i, t.sigBytes = 4 * e.length, this._process(), this._hash; + }, + clone: function clone() { + var t = o.clone.call(this); + return t._hash = this._hash.clone(), t; + } + }); + e.SHA256 = o._createHelper(l), e.HmacSHA256 = o._createHmacHelper(l); + }(Math), function () { + function r(t) { + return t << 8 & 4278255360 | t >>> 8 & 16711935; + } + + var e = t, + i = e.lib, + n = i.WordArray, + o = e.enc; + o.Utf16 = o.Utf16BE = { + stringify: function stringify(t) { + for (var r = t.words, e = t.sigBytes, i = [], n = 0; n < e; n += 2) { + var o = r[n >>> 2] >>> 16 - n % 4 * 8 & 65535; + i.push(String.fromCharCode(o)); + } + + return i.join(""); + }, + parse: function parse(t) { + for (var r = t.length, e = [], i = 0; i < r; i++) { + e[i >>> 1] |= t.charCodeAt(i) << 16 - i % 2 * 16; + } + + return n.create(e, 2 * r); + } + }; + o.Utf16LE = { + stringify: function stringify(t) { + for (var e = t.words, i = t.sigBytes, n = [], o = 0; o < i; o += 2) { + var s = r(e[o >>> 2] >>> 16 - o % 4 * 8 & 65535); + n.push(String.fromCharCode(s)); + } + + return n.join(""); + }, + parse: function parse(t) { + for (var e = t.length, i = [], o = 0; o < e; o++) { + i[o >>> 1] |= r(t.charCodeAt(o) << 16 - o % 2 * 16); + } + + return n.create(i, 2 * e); + } + }; + }(), function () { + if ("function" == typeof ArrayBuffer) { + var r = t, + e = r.lib, + i = e.WordArray, + n = i.init, + o = i.init = function (t) { + if (t instanceof ArrayBuffer && (t = new Uint8Array(t)), (t instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && t instanceof Uint8ClampedArray || t instanceof Int16Array || t instanceof Uint16Array || t instanceof Int32Array || t instanceof Uint32Array || t instanceof Float32Array || t instanceof Float64Array) && (t = new Uint8Array(t.buffer, t.byteOffset, t.byteLength)), t instanceof Uint8Array) { + for (var r = t.byteLength, e = [], i = 0; i < r; i++) { + e[i >>> 2] |= t[i] << 24 - i % 4 * 8; + } + + n.call(this, e, r); + } else n.apply(this, arguments); + }; + + o.prototype = i; + } + }(), function (r) { + function e(t, r, e) { + return t ^ r ^ e; + } + + function i(t, r, e) { + return t & r | ~t & e; + } + + function n(t, r, e) { + return (t | ~r) ^ e; + } + + function o(t, r, e) { + return t & e | r & ~e; + } + + function s(t, r, e) { + return t ^ (r | ~e); + } + + function a(t, r) { + return t << r | t >>> 32 - r; + } + + var c = t, + h = c.lib, + l = h.WordArray, + f = h.Hasher, + u = c.algo, + d = l.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), + v = l.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), + p = l.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), + _ = l.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), + y = l.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), + g = l.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), + B = u.RIPEMD160 = f.extend({ + _doReset: function _doReset() { + this._hash = l.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var c = 0; c < 16; c++) { + var h = r + c, + l = t[h]; + t[h] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8); + } + + var f, + u, + B, + w, + k, + S, + m, + x, + b, + H, + z = this._hash.words, + A = y.words, + C = g.words, + D = d.words, + R = v.words, + E = p.words, + M = _.words; + S = f = z[0], m = u = z[1], x = B = z[2], b = w = z[3], H = k = z[4]; + + for (var F, c = 0; c < 80; c += 1) { + F = f + t[r + D[c]] | 0, F += c < 16 ? e(u, B, w) + A[0] : c < 32 ? i(u, B, w) + A[1] : c < 48 ? n(u, B, w) + A[2] : c < 64 ? o(u, B, w) + A[3] : s(u, B, w) + A[4], F |= 0, F = a(F, E[c]), F = F + k | 0, f = k, k = w, w = a(B, 10), B = u, u = F, F = S + t[r + R[c]] | 0, F += c < 16 ? s(m, x, b) + C[0] : c < 32 ? o(m, x, b) + C[1] : c < 48 ? n(m, x, b) + C[2] : c < 64 ? i(m, x, b) + C[3] : e(m, x, b) + C[4], F |= 0, F = a(F, M[c]), F = F + H | 0, S = H, H = b, b = a(x, 10), x = m, m = F; + } + + F = z[1] + B + b | 0, z[1] = z[2] + w + H | 0, z[2] = z[3] + k + S | 0, z[3] = z[4] + f + m | 0, z[4] = z[0] + u + x | 0, z[0] = F; + }, + _doFinalize: function _doFinalize() { + var t = this._data, + r = t.words, + e = 8 * this._nDataBytes, + i = 8 * t.sigBytes; + r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 64 >>> 9 << 4) + 14] = 16711935 & (e << 8 | e >>> 24) | 4278255360 & (e << 24 | e >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(); + + for (var n = this._hash, o = n.words, s = 0; s < 5; s++) { + var a = o[s]; + o[s] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8); + } + + return n; + }, + clone: function clone() { + var t = f.clone.call(this); + return t._hash = this._hash.clone(), t; + } + }); + + c.RIPEMD160 = f._createHelper(B), c.HmacRIPEMD160 = f._createHmacHelper(B); + }(Math), function () { + var r = t, + e = r.lib, + i = e.Base, + n = r.enc, + o = n.Utf8, + s = r.algo; + s.HMAC = i.extend({ + init: function init(t, r) { + t = this._hasher = new t.init(), "string" == typeof r && (r = o.parse(r)); + var e = t.blockSize, + i = 4 * e; + r.sigBytes > i && (r = t.finalize(r)), r.clamp(); + + for (var n = this._oKey = r.clone(), s = this._iKey = r.clone(), a = n.words, c = s.words, h = 0; h < e; h++) { + a[h] ^= 1549556828, c[h] ^= 909522486; + } + + n.sigBytes = s.sigBytes = i, this.reset(); + }, + reset: function reset() { + var t = this._hasher; + t.reset(), t.update(this._iKey); + }, + update: function update(t) { + return this._hasher.update(t), this; + }, + finalize: function finalize(t) { + var r = this._hasher, + e = r.finalize(t); + r.reset(); + var i = r.finalize(this._oKey.clone().concat(e)); + return i; + } + }); + }(), function () { + var r = t, + e = r.lib, + i = e.Base, + n = e.WordArray, + o = r.algo, + s = o.SHA1, + a = o.HMAC, + c = o.PBKDF2 = i.extend({ + cfg: i.extend({ + keySize: 4, + hasher: s, + iterations: 1 + }), + init: function init(t) { + this.cfg = this.cfg.extend(t); + }, + compute: function compute(t, r) { + for (var e = this.cfg, i = a.create(e.hasher, t), o = n.create(), s = n.create([1]), c = o.words, h = s.words, l = e.keySize, f = e.iterations; c.length < l;) { + var u = i.update(r).finalize(s); + i.reset(); + + for (var d = u.words, v = d.length, p = u, _ = 1; _ < f; _++) { + p = i.finalize(p), i.reset(); + + for (var y = p.words, g = 0; g < v; g++) { + d[g] ^= y[g]; + } + } + + o.concat(u), h[0]++; + } + + return o.sigBytes = 4 * l, o; + } + }); + + r.PBKDF2 = function (t, r, e) { + return c.create(e).compute(t, r); + }; + }(), function () { + var r = t, + e = r.lib, + i = e.Base, + n = e.WordArray, + o = r.algo, + s = o.MD5, + a = o.EvpKDF = i.extend({ + cfg: i.extend({ + keySize: 4, + hasher: s, + iterations: 1 + }), + init: function init(t) { + this.cfg = this.cfg.extend(t); + }, + compute: function compute(t, r) { + for (var e = this.cfg, i = e.hasher.create(), o = n.create(), s = o.words, a = e.keySize, c = e.iterations; s.length < a;) { + h && i.update(h); + var h = i.update(t).finalize(r); + i.reset(); + + for (var l = 1; l < c; l++) { + h = i.finalize(h), i.reset(); + } + + o.concat(h); + } + + return o.sigBytes = 4 * a, o; + } + }); + + r.EvpKDF = function (t, r, e) { + return a.create(e).compute(t, r); + }; + }(), function () { + var r = t, + e = r.lib, + i = e.WordArray, + n = r.algo, + o = n.SHA256, + s = n.SHA224 = o.extend({ + _doReset: function _doReset() { + this._hash = new i.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]); + }, + _doFinalize: function _doFinalize() { + var t = o._doFinalize.call(this); + + return t.sigBytes -= 4, t; + } + }); + r.SHA224 = o._createHelper(s), r.HmacSHA224 = o._createHmacHelper(s); + }(), function (r) { + var e = t, + i = e.lib, + n = i.Base, + o = i.WordArray, + s = e.x64 = {}; + s.Word = n.extend({ + init: function init(t, r) { + this.high = t, this.low = r; + } + }), s.WordArray = n.extend({ + init: function init(t, e) { + t = this.words = t || [], e != r ? this.sigBytes = e : this.sigBytes = 8 * t.length; + }, + toX32: function toX32() { + for (var t = this.words, r = t.length, e = [], i = 0; i < r; i++) { + var n = t[i]; + e.push(n.high), e.push(n.low); + } + + return o.create(e, this.sigBytes); + }, + clone: function clone() { + for (var t = n.clone.call(this), r = t.words = this.words.slice(0), e = r.length, i = 0; i < e; i++) { + r[i] = r[i].clone(); + } + + return t; + } + }); + }(), function (r) { + var e = t, + i = e.lib, + n = i.WordArray, + o = i.Hasher, + s = e.x64, + a = s.Word, + c = e.algo, + h = [], + l = [], + f = []; + !function () { + for (var t = 1, r = 0, e = 0; e < 24; e++) { + h[t + 5 * r] = (e + 1) * (e + 2) / 2 % 64; + var i = r % 5, + n = (2 * t + 3 * r) % 5; + t = i, r = n; + } + + for (var t = 0; t < 5; t++) { + for (var r = 0; r < 5; r++) { + l[t + 5 * r] = r + (2 * t + 3 * r) % 5 * 5; + } + } + + for (var o = 1, s = 0; s < 24; s++) { + for (var c = 0, u = 0, d = 0; d < 7; d++) { + if (1 & o) { + var v = (1 << d) - 1; + v < 32 ? u ^= 1 << v : c ^= 1 << v - 32; + } + + 128 & o ? o = o << 1 ^ 113 : o <<= 1; + } + + f[s] = a.create(c, u); + } + }(); + var u = []; + !function () { + for (var t = 0; t < 25; t++) { + u[t] = a.create(); + } + }(); + var d = c.SHA3 = o.extend({ + cfg: o.cfg.extend({ + outputLength: 512 + }), + _doReset: function _doReset() { + for (var t = this._state = [], r = 0; r < 25; r++) { + t[r] = new a.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var e = this._state, i = this.blockSize / 2, n = 0; n < i; n++) { + var o = t[r + 2 * n], + s = t[r + 2 * n + 1]; + o = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), s = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8); + var a = e[n]; + a.high ^= s, a.low ^= o; + } + + for (var c = 0; c < 24; c++) { + for (var d = 0; d < 5; d++) { + for (var v = 0, p = 0, _ = 0; _ < 5; _++) { + var a = e[d + 5 * _]; + v ^= a.high, p ^= a.low; + } + + var y = u[d]; + y.high = v, y.low = p; + } + + for (var d = 0; d < 5; d++) { + for (var g = u[(d + 4) % 5], B = u[(d + 1) % 5], w = B.high, k = B.low, v = g.high ^ (w << 1 | k >>> 31), p = g.low ^ (k << 1 | w >>> 31), _ = 0; _ < 5; _++) { + var a = e[d + 5 * _]; + a.high ^= v, a.low ^= p; + } + } + + for (var S = 1; S < 25; S++) { + var a = e[S], + m = a.high, + x = a.low, + b = h[S]; + if (b < 32) var v = m << b | x >>> 32 - b, + p = x << b | m >>> 32 - b;else var v = x << b - 32 | m >>> 64 - b, + p = m << b - 32 | x >>> 64 - b; + var H = u[l[S]]; + H.high = v, H.low = p; + } + + var z = u[0], + A = e[0]; + z.high = A.high, z.low = A.low; + + for (var d = 0; d < 5; d++) { + for (var _ = 0; _ < 5; _++) { + var S = d + 5 * _, + a = e[S], + C = u[S], + D = u[(d + 1) % 5 + 5 * _], + R = u[(d + 2) % 5 + 5 * _]; + a.high = C.high ^ ~D.high & R.high, a.low = C.low ^ ~D.low & R.low; + } + } + + var a = e[0], + E = f[c]; + a.high ^= E.high, a.low ^= E.low; + } + }, + _doFinalize: function _doFinalize() { + var t = this._data, + e = t.words, + i = (8 * this._nDataBytes, 8 * t.sigBytes), + o = 32 * this.blockSize; + e[i >>> 5] |= 1 << 24 - i % 32, e[(r.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, t.sigBytes = 4 * e.length, this._process(); + + for (var s = this._state, a = this.cfg.outputLength / 8, c = a / 8, h = [], l = 0; l < c; l++) { + var f = s[l], + u = f.high, + d = f.low; + u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8), d = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8), h.push(d), h.push(u); + } + + return new n.init(h, a); + }, + clone: function clone() { + for (var t = o.clone.call(this), r = t._state = this._state.slice(0), e = 0; e < 25; e++) { + r[e] = r[e].clone(); + } + + return t; + } + }); + e.SHA3 = o._createHelper(d), e.HmacSHA3 = o._createHmacHelper(d); + }(Math), function () { + function r() { + return s.create.apply(s, arguments); + } + + var e = t, + i = e.lib, + n = i.Hasher, + o = e.x64, + s = o.Word, + a = o.WordArray, + c = e.algo, + h = [r(1116352408, 3609767458), r(1899447441, 602891725), r(3049323471, 3964484399), r(3921009573, 2173295548), r(961987163, 4081628472), r(1508970993, 3053834265), r(2453635748, 2937671579), r(2870763221, 3664609560), r(3624381080, 2734883394), r(310598401, 1164996542), r(607225278, 1323610764), r(1426881987, 3590304994), r(1925078388, 4068182383), r(2162078206, 991336113), r(2614888103, 633803317), r(3248222580, 3479774868), r(3835390401, 2666613458), r(4022224774, 944711139), r(264347078, 2341262773), r(604807628, 2007800933), r(770255983, 1495990901), r(1249150122, 1856431235), r(1555081692, 3175218132), r(1996064986, 2198950837), r(2554220882, 3999719339), r(2821834349, 766784016), r(2952996808, 2566594879), r(3210313671, 3203337956), r(3336571891, 1034457026), r(3584528711, 2466948901), r(113926993, 3758326383), r(338241895, 168717936), r(666307205, 1188179964), r(773529912, 1546045734), r(1294757372, 1522805485), r(1396182291, 2643833823), r(1695183700, 2343527390), r(1986661051, 1014477480), r(2177026350, 1206759142), r(2456956037, 344077627), r(2730485921, 1290863460), r(2820302411, 3158454273), r(3259730800, 3505952657), r(3345764771, 106217008), r(3516065817, 3606008344), r(3600352804, 1432725776), r(4094571909, 1467031594), r(275423344, 851169720), r(430227734, 3100823752), r(506948616, 1363258195), r(659060556, 3750685593), r(883997877, 3785050280), r(958139571, 3318307427), r(1322822218, 3812723403), r(1537002063, 2003034995), r(1747873779, 3602036899), r(1955562222, 1575990012), r(2024104815, 1125592928), r(2227730452, 2716904306), r(2361852424, 442776044), r(2428436474, 593698344), r(2756734187, 3733110249), r(3204031479, 2999351573), r(3329325298, 3815920427), r(3391569614, 3928383900), r(3515267271, 566280711), r(3940187606, 3454069534), r(4118630271, 4000239992), r(116418474, 1914138554), r(174292421, 2731055270), r(289380356, 3203993006), r(460393269, 320620315), r(685471733, 587496836), r(852142971, 1086792851), r(1017036298, 365543100), r(1126000580, 2618297676), r(1288033470, 3409855158), r(1501505948, 4234509866), r(1607167915, 987167468), r(1816402316, 1246189591)], + l = []; + !function () { + for (var t = 0; t < 80; t++) { + l[t] = r(); + } + }(); + var f = c.SHA512 = n.extend({ + _doReset: function _doReset() { + this._hash = new a.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + for (var e = this._hash.words, i = e[0], n = e[1], o = e[2], s = e[3], a = e[4], c = e[5], f = e[6], u = e[7], d = i.high, v = i.low, p = n.high, _ = n.low, y = o.high, g = o.low, B = s.high, w = s.low, k = a.high, S = a.low, m = c.high, x = c.low, b = f.high, H = f.low, z = u.high, A = u.low, C = d, D = v, R = p, E = _, M = y, F = g, P = B, W = w, O = k, U = S, I = m, K = x, X = b, L = H, j = z, N = A, T = 0; T < 80; T++) { + var Z = l[T]; + if (T < 16) var q = Z.high = 0 | t[r + 2 * T], + G = Z.low = 0 | t[r + 2 * T + 1];else { + var J = l[T - 15], + $ = J.high, + Q = J.low, + V = ($ >>> 1 | Q << 31) ^ ($ >>> 8 | Q << 24) ^ $ >>> 7, + Y = (Q >>> 1 | $ << 31) ^ (Q >>> 8 | $ << 24) ^ (Q >>> 7 | $ << 25), + tt = l[T - 2], + rt = tt.high, + et = tt.low, + it = (rt >>> 19 | et << 13) ^ (rt << 3 | et >>> 29) ^ rt >>> 6, + nt = (et >>> 19 | rt << 13) ^ (et << 3 | rt >>> 29) ^ (et >>> 6 | rt << 26), + ot = l[T - 7], + st = ot.high, + at = ot.low, + ct = l[T - 16], + ht = ct.high, + lt = ct.low, + G = Y + at, + q = V + st + (G >>> 0 < Y >>> 0 ? 1 : 0), + G = G + nt, + q = q + it + (G >>> 0 < nt >>> 0 ? 1 : 0), + G = G + lt, + q = q + ht + (G >>> 0 < lt >>> 0 ? 1 : 0); + Z.high = q, Z.low = G; + } + + var ft = O & I ^ ~O & X, + ut = U & K ^ ~U & L, + dt = C & R ^ C & M ^ R & M, + vt = D & E ^ D & F ^ E & F, + pt = (C >>> 28 | D << 4) ^ (C << 30 | D >>> 2) ^ (C << 25 | D >>> 7), + _t = (D >>> 28 | C << 4) ^ (D << 30 | C >>> 2) ^ (D << 25 | C >>> 7), + yt = (O >>> 14 | U << 18) ^ (O >>> 18 | U << 14) ^ (O << 23 | U >>> 9), + gt = (U >>> 14 | O << 18) ^ (U >>> 18 | O << 14) ^ (U << 23 | O >>> 9), + Bt = h[T], + wt = Bt.high, + kt = Bt.low, + St = N + gt, + mt = j + yt + (St >>> 0 < N >>> 0 ? 1 : 0), + St = St + ut, + mt = mt + ft + (St >>> 0 < ut >>> 0 ? 1 : 0), + St = St + kt, + mt = mt + wt + (St >>> 0 < kt >>> 0 ? 1 : 0), + St = St + G, + mt = mt + q + (St >>> 0 < G >>> 0 ? 1 : 0), + xt = _t + vt, + bt = pt + dt + (xt >>> 0 < _t >>> 0 ? 1 : 0); + + j = X, N = L, X = I, L = K, I = O, K = U, U = W + St | 0, O = P + mt + (U >>> 0 < W >>> 0 ? 1 : 0) | 0, P = M, W = F, M = R, F = E, R = C, E = D, D = St + xt | 0, C = mt + bt + (D >>> 0 < St >>> 0 ? 1 : 0) | 0; + } + + v = i.low = v + D, i.high = d + C + (v >>> 0 < D >>> 0 ? 1 : 0), _ = n.low = _ + E, n.high = p + R + (_ >>> 0 < E >>> 0 ? 1 : 0), g = o.low = g + F, o.high = y + M + (g >>> 0 < F >>> 0 ? 1 : 0), w = s.low = w + W, s.high = B + P + (w >>> 0 < W >>> 0 ? 1 : 0), S = a.low = S + U, a.high = k + O + (S >>> 0 < U >>> 0 ? 1 : 0), x = c.low = x + K, c.high = m + I + (x >>> 0 < K >>> 0 ? 1 : 0), H = f.low = H + L, f.high = b + X + (H >>> 0 < L >>> 0 ? 1 : 0), A = u.low = A + N, u.high = z + j + (A >>> 0 < N >>> 0 ? 1 : 0); + }, + _doFinalize: function _doFinalize() { + var t = this._data, + r = t.words, + e = 8 * this._nDataBytes, + i = 8 * t.sigBytes; + r[i >>> 5] |= 128 << 24 - i % 32, r[(i + 128 >>> 10 << 5) + 30] = Math.floor(e / 4294967296), r[(i + 128 >>> 10 << 5) + 31] = e, t.sigBytes = 4 * r.length, this._process(); + + var n = this._hash.toX32(); + + return n; + }, + clone: function clone() { + var t = n.clone.call(this); + return t._hash = this._hash.clone(), t; + }, + blockSize: 32 + }); + e.SHA512 = n._createHelper(f), e.HmacSHA512 = n._createHmacHelper(f); + }(), function () { + var r = t, + e = r.x64, + i = e.Word, + n = e.WordArray, + o = r.algo, + s = o.SHA512, + a = o.SHA384 = s.extend({ + _doReset: function _doReset() { + this._hash = new n.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]); + }, + _doFinalize: function _doFinalize() { + var t = s._doFinalize.call(this); + + return t.sigBytes -= 16, t; + } + }); + r.SHA384 = s._createHelper(a), r.HmacSHA384 = s._createHmacHelper(a); + }(), t.lib.Cipher || function (r) { + var e = t, + i = e.lib, + n = i.Base, + o = i.WordArray, + s = i.BufferedBlockAlgorithm, + a = e.enc, + c = (a.Utf8, a.Base64), + h = e.algo, + l = h.EvpKDF, + f = i.Cipher = s.extend({ + cfg: n.extend(), + createEncryptor: function createEncryptor(t, r) { + return this.create(this._ENC_XFORM_MODE, t, r); + }, + createDecryptor: function createDecryptor(t, r) { + return this.create(this._DEC_XFORM_MODE, t, r); + }, + init: function init(t, r, e) { + this.cfg = this.cfg.extend(e), this._xformMode = t, this._key = r, this.reset(); + }, + reset: function reset() { + s.reset.call(this), this._doReset(); + }, + process: function process(t) { + return this._append(t), this._process(); + }, + finalize: function finalize(t) { + t && this._append(t); + + var r = this._doFinalize(); + + return r; + }, + keySize: 4, + ivSize: 4, + _ENC_XFORM_MODE: 1, + _DEC_XFORM_MODE: 2, + _createHelper: function () { + function t(t) { + return "string" == typeof t ? m : w; + } + + return function (r) { + return { + encrypt: function encrypt(e, i, n) { + return t(i).encrypt(r, e, i, n); + }, + decrypt: function decrypt(e, i, n) { + return t(i).decrypt(r, e, i, n); + } + }; + }; + }() + }), + u = (i.StreamCipher = f.extend({ + _doFinalize: function _doFinalize() { + var t = this._process(!0); + + return t; + }, + blockSize: 1 + }), e.mode = {}), + d = i.BlockCipherMode = n.extend({ + createEncryptor: function createEncryptor(t, r) { + return this.Encryptor.create(t, r); + }, + createDecryptor: function createDecryptor(t, r) { + return this.Decryptor.create(t, r); + }, + init: function init(t, r) { + this._cipher = t, this._iv = r; + } + }), + v = u.CBC = function () { + function t(t, e, i) { + var n = this._iv; + + if (n) { + var o = n; + this._iv = r; + } else var o = this._prevBlock; + + for (var s = 0; s < i; s++) { + t[e + s] ^= o[s]; + } + } + + var e = d.extend(); + return e.Encryptor = e.extend({ + processBlock: function processBlock(r, e) { + var i = this._cipher, + n = i.blockSize; + t.call(this, r, e, n), i.encryptBlock(r, e), this._prevBlock = r.slice(e, e + n); + } + }), e.Decryptor = e.extend({ + processBlock: function processBlock(r, e) { + var i = this._cipher, + n = i.blockSize, + o = r.slice(e, e + n); + i.decryptBlock(r, e), t.call(this, r, e, n), this._prevBlock = o; + } + }), e; + }(), + p = e.pad = {}, + _ = p.Pkcs7 = { + pad: function pad(t, r) { + for (var e = 4 * r, i = e - t.sigBytes % e, n = i << 24 | i << 16 | i << 8 | i, s = [], a = 0; a < i; a += 4) { + s.push(n); + } + + var c = o.create(s, i); + t.concat(c); + }, + unpad: function unpad(t) { + var r = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= r; + } + }, + y = (i.BlockCipher = f.extend({ + cfg: f.cfg.extend({ + mode: v, + padding: _ + }), + reset: function reset() { + f.reset.call(this); + var t = this.cfg, + r = t.iv, + e = t.mode; + if (this._xformMode == this._ENC_XFORM_MODE) var i = e.createEncryptor;else { + var i = e.createDecryptor; + this._minBufferSize = 1; + } + this._mode && this._mode.__creator == i ? this._mode.init(this, r && r.words) : (this._mode = i.call(e, this, r && r.words), this._mode.__creator = i); + }, + _doProcessBlock: function _doProcessBlock(t, r) { + this._mode.processBlock(t, r); + }, + _doFinalize: function _doFinalize() { + var t = this.cfg.padding; + + if (this._xformMode == this._ENC_XFORM_MODE) { + t.pad(this._data, this.blockSize); + + var r = this._process(!0); + } else { + var r = this._process(!0); + + t.unpad(r); + } + + return r; + }, + blockSize: 4 + }), i.CipherParams = n.extend({ + init: function init(t) { + this.mixIn(t); + }, + toString: function toString(t) { + return (t || this.formatter).stringify(this); + } + })), + g = e.format = {}, + B = g.OpenSSL = { + stringify: function stringify(t) { + var r = t.ciphertext, + e = t.salt; + if (e) var i = o.create([1398893684, 1701076831]).concat(e).concat(r);else var i = r; + return i.toString(c); + }, + parse: function parse(t) { + var r = c.parse(t), + e = r.words; + + if (1398893684 == e[0] && 1701076831 == e[1]) { + var i = o.create(e.slice(2, 4)); + e.splice(0, 4), r.sigBytes -= 16; + } + + return y.create({ + ciphertext: r, + salt: i + }); + } + }, + w = i.SerializableCipher = n.extend({ + cfg: n.extend({ + format: B + }), + encrypt: function encrypt(t, r, e, i) { + i = this.cfg.extend(i); + var n = t.createEncryptor(e, i), + o = n.finalize(r), + s = n.cfg; + return y.create({ + ciphertext: o, + key: e, + iv: s.iv, + algorithm: t, + mode: s.mode, + padding: s.padding, + blockSize: t.blockSize, + formatter: i.format + }); + }, + decrypt: function decrypt(t, r, e, i) { + i = this.cfg.extend(i), r = this._parse(r, i.format); + var n = t.createDecryptor(e, i).finalize(r.ciphertext); + return n; + }, + _parse: function _parse(t, r) { + return "string" == typeof t ? r.parse(t, this) : t; + } + }), + k = e.kdf = {}, + S = k.OpenSSL = { + execute: function execute(t, r, e, i) { + i || (i = o.random(8)); + var n = l.create({ + keySize: r + e + }).compute(t, i), + s = o.create(n.words.slice(r), 4 * e); + return n.sigBytes = 4 * r, y.create({ + key: n, + iv: s, + salt: i + }); + } + }, + m = i.PasswordBasedCipher = w.extend({ + cfg: w.cfg.extend({ + kdf: S + }), + encrypt: function encrypt(t, r, e, i) { + i = this.cfg.extend(i); + var n = i.kdf.execute(e, t.keySize, t.ivSize); + i.iv = n.iv; + var o = w.encrypt.call(this, t, r, n.key, i); + return o.mixIn(n), o; + }, + decrypt: function decrypt(t, r, e, i) { + i = this.cfg.extend(i), r = this._parse(r, i.format); + var n = i.kdf.execute(e, t.keySize, t.ivSize, r.salt); + i.iv = n.iv; + var o = w.decrypt.call(this, t, r, n.key, i); + return o; + } + }); + }(), t.mode.CFB = function () { + function r(t, r, e, i) { + var n = this._iv; + + if (n) { + var o = n.slice(0); + this._iv = void 0; + } else var o = this._prevBlock; + + i.encryptBlock(o, 0); + + for (var s = 0; s < e; s++) { + t[r + s] ^= o[s]; + } + } + + var e = t.lib.BlockCipherMode.extend(); + return e.Encryptor = e.extend({ + processBlock: function processBlock(t, e) { + var i = this._cipher, + n = i.blockSize; + r.call(this, t, e, n, i), this._prevBlock = t.slice(e, e + n); + } + }), e.Decryptor = e.extend({ + processBlock: function processBlock(t, e) { + var i = this._cipher, + n = i.blockSize, + o = t.slice(e, e + n); + r.call(this, t, e, n, i), this._prevBlock = o; + } + }), e; + }(), t.mode.ECB = function () { + var r = t.lib.BlockCipherMode.extend(); + return r.Encryptor = r.extend({ + processBlock: function processBlock(t, r) { + this._cipher.encryptBlock(t, r); + } + }), r.Decryptor = r.extend({ + processBlock: function processBlock(t, r) { + this._cipher.decryptBlock(t, r); + } + }), r; + }(), t.pad.AnsiX923 = { + pad: function pad(t, r) { + var e = t.sigBytes, + i = 4 * r, + n = i - e % i, + o = e + n - 1; + t.clamp(), t.words[o >>> 2] |= n << 24 - o % 4 * 8, t.sigBytes += n; + }, + unpad: function unpad(t) { + var r = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= r; + } + }, t.pad.Iso10126 = { + pad: function pad(r, e) { + var i = 4 * e, + n = i - r.sigBytes % i; + r.concat(t.lib.WordArray.random(n - 1)).concat(t.lib.WordArray.create([n << 24], 1)); + }, + unpad: function unpad(t) { + var r = 255 & t.words[t.sigBytes - 1 >>> 2]; + t.sigBytes -= r; + } + }, t.pad.Iso97971 = { + pad: function pad(r, e) { + r.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(r, e); + }, + unpad: function unpad(r) { + t.pad.ZeroPadding.unpad(r), r.sigBytes--; + } + }, t.mode.OFB = function () { + var r = t.lib.BlockCipherMode.extend(), + e = r.Encryptor = r.extend({ + processBlock: function processBlock(t, r) { + var e = this._cipher, + i = e.blockSize, + n = this._iv, + o = this._keystream; + n && (o = this._keystream = n.slice(0), this._iv = void 0), e.encryptBlock(o, 0); + + for (var s = 0; s < i; s++) { + t[r + s] ^= o[s]; + } + } + }); + return r.Decryptor = e, r; + }(), t.pad.NoPadding = { + pad: function pad() {}, + unpad: function unpad() {} + }, function (r) { + var e = t, + i = e.lib, + n = i.CipherParams, + o = e.enc, + s = o.Hex, + a = e.format; + a.Hex = { + stringify: function stringify(t) { + return t.ciphertext.toString(s); + }, + parse: function parse(t) { + var r = s.parse(t); + return n.create({ + ciphertext: r + }); + } + }; + }(), function () { + var r = t, + e = r.lib, + i = e.BlockCipher, + n = r.algo, + o = [], + s = [], + a = [], + c = [], + h = [], + l = [], + f = [], + u = [], + d = [], + v = []; + !function () { + for (var t = [], r = 0; r < 256; r++) { + r < 128 ? t[r] = r << 1 : t[r] = r << 1 ^ 283; + } + + for (var e = 0, i = 0, r = 0; r < 256; r++) { + var n = i ^ i << 1 ^ i << 2 ^ i << 3 ^ i << 4; + n = n >>> 8 ^ 255 & n ^ 99, o[e] = n, s[n] = e; + var p = t[e], + _ = t[p], + y = t[_], + g = 257 * t[n] ^ 16843008 * n; + a[e] = g << 24 | g >>> 8, c[e] = g << 16 | g >>> 16, h[e] = g << 8 | g >>> 24, l[e] = g; + var g = 16843009 * y ^ 65537 * _ ^ 257 * p ^ 16843008 * e; + f[n] = g << 24 | g >>> 8, u[n] = g << 16 | g >>> 16, d[n] = g << 8 | g >>> 24, v[n] = g, e ? (e = p ^ t[t[t[y ^ p]]], i ^= t[t[i]]) : e = i = 1; + } + }(); + + var p = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], + _ = n.AES = i.extend({ + _doReset: function _doReset() { + if (!this._nRounds || this._keyPriorReset !== this._key) { + for (var t = this._keyPriorReset = this._key, r = t.words, e = t.sigBytes / 4, i = this._nRounds = e + 6, n = 4 * (i + 1), s = this._keySchedule = [], a = 0; a < n; a++) { + if (a < e) s[a] = r[a];else { + var c = s[a - 1]; + a % e ? e > 6 && a % e == 4 && (c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c]) : (c = c << 8 | c >>> 24, c = o[c >>> 24] << 24 | o[c >>> 16 & 255] << 16 | o[c >>> 8 & 255] << 8 | o[255 & c], c ^= p[a / e | 0] << 24), s[a] = s[a - e] ^ c; + } + } + + for (var h = this._invKeySchedule = [], l = 0; l < n; l++) { + var a = n - l; + if (l % 4) var c = s[a];else var c = s[a - 4]; + l < 4 || a <= 4 ? h[l] = c : h[l] = f[o[c >>> 24]] ^ u[o[c >>> 16 & 255]] ^ d[o[c >>> 8 & 255]] ^ v[o[255 & c]]; + } + } + }, + encryptBlock: function encryptBlock(t, r) { + this._doCryptBlock(t, r, this._keySchedule, a, c, h, l, o); + }, + decryptBlock: function decryptBlock(t, r) { + var e = t[r + 1]; + t[r + 1] = t[r + 3], t[r + 3] = e, this._doCryptBlock(t, r, this._invKeySchedule, f, u, d, v, s); + var e = t[r + 1]; + t[r + 1] = t[r + 3], t[r + 3] = e; + }, + _doCryptBlock: function _doCryptBlock(t, r, e, i, n, o, s, a) { + for (var c = this._nRounds, h = t[r] ^ e[0], l = t[r + 1] ^ e[1], f = t[r + 2] ^ e[2], u = t[r + 3] ^ e[3], d = 4, v = 1; v < c; v++) { + var p = i[h >>> 24] ^ n[l >>> 16 & 255] ^ o[f >>> 8 & 255] ^ s[255 & u] ^ e[d++], + _ = i[l >>> 24] ^ n[f >>> 16 & 255] ^ o[u >>> 8 & 255] ^ s[255 & h] ^ e[d++], + y = i[f >>> 24] ^ n[u >>> 16 & 255] ^ o[h >>> 8 & 255] ^ s[255 & l] ^ e[d++], + g = i[u >>> 24] ^ n[h >>> 16 & 255] ^ o[l >>> 8 & 255] ^ s[255 & f] ^ e[d++]; + + h = p, l = _, f = y, u = g; + } + + var p = (a[h >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & u]) ^ e[d++], + _ = (a[l >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[u >>> 8 & 255] << 8 | a[255 & h]) ^ e[d++], + y = (a[f >>> 24] << 24 | a[u >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & l]) ^ e[d++], + g = (a[u >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & f]) ^ e[d++]; + + t[r] = p, t[r + 1] = _, t[r + 2] = y, t[r + 3] = g; + }, + keySize: 8 + }); + + r.AES = i._createHelper(_); + }(), function () { + function r(t, r) { + var e = (this._lBlock >>> t ^ this._rBlock) & r; + this._rBlock ^= e, this._lBlock ^= e << t; + } + + function e(t, r) { + var e = (this._rBlock >>> t ^ this._lBlock) & r; + this._lBlock ^= e, this._rBlock ^= e << t; + } + + var i = t, + n = i.lib, + o = n.WordArray, + s = n.BlockCipher, + a = i.algo, + c = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], + h = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], + l = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], + f = [{ + 0: 8421888, + 268435456: 32768, + 536870912: 8421378, + 805306368: 2, + 1073741824: 512, + 1342177280: 8421890, + 1610612736: 8389122, + 1879048192: 8388608, + 2147483648: 514, + 2415919104: 8389120, + 2684354560: 33280, + 2952790016: 8421376, + 3221225472: 32770, + 3489660928: 8388610, + 3758096384: 0, + 4026531840: 33282, + 134217728: 0, + 402653184: 8421890, + 671088640: 33282, + 939524096: 32768, + 1207959552: 8421888, + 1476395008: 512, + 1744830464: 8421378, + 2013265920: 2, + 2281701376: 8389120, + 2550136832: 33280, + 2818572288: 8421376, + 3087007744: 8389122, + 3355443200: 8388610, + 3623878656: 32770, + 3892314112: 514, + 4160749568: 8388608, + 1: 32768, + 268435457: 2, + 536870913: 8421888, + 805306369: 8388608, + 1073741825: 8421378, + 1342177281: 33280, + 1610612737: 512, + 1879048193: 8389122, + 2147483649: 8421890, + 2415919105: 8421376, + 2684354561: 8388610, + 2952790017: 33282, + 3221225473: 514, + 3489660929: 8389120, + 3758096385: 32770, + 4026531841: 0, + 134217729: 8421890, + 402653185: 8421376, + 671088641: 8388608, + 939524097: 512, + 1207959553: 32768, + 1476395009: 8388610, + 1744830465: 2, + 2013265921: 33282, + 2281701377: 32770, + 2550136833: 8389122, + 2818572289: 514, + 3087007745: 8421888, + 3355443201: 8389120, + 3623878657: 0, + 3892314113: 33280, + 4160749569: 8421378 + }, { + 0: 1074282512, + 16777216: 16384, + 33554432: 524288, + 50331648: 1074266128, + 67108864: 1073741840, + 83886080: 1074282496, + 100663296: 1073758208, + 117440512: 16, + 134217728: 540672, + 150994944: 1073758224, + 167772160: 1073741824, + 184549376: 540688, + 201326592: 524304, + 218103808: 0, + 234881024: 16400, + 251658240: 1074266112, + 8388608: 1073758208, + 25165824: 540688, + 41943040: 16, + 58720256: 1073758224, + 75497472: 1074282512, + 92274688: 1073741824, + 109051904: 524288, + 125829120: 1074266128, + 142606336: 524304, + 159383552: 0, + 176160768: 16384, + 192937984: 1074266112, + 209715200: 1073741840, + 226492416: 540672, + 243269632: 1074282496, + 260046848: 16400, + 268435456: 0, + 285212672: 1074266128, + 301989888: 1073758224, + 318767104: 1074282496, + 335544320: 1074266112, + 352321536: 16, + 369098752: 540688, + 385875968: 16384, + 402653184: 16400, + 419430400: 524288, + 436207616: 524304, + 452984832: 1073741840, + 469762048: 540672, + 486539264: 1073758208, + 503316480: 1073741824, + 520093696: 1074282512, + 276824064: 540688, + 293601280: 524288, + 310378496: 1074266112, + 327155712: 16384, + 343932928: 1073758208, + 360710144: 1074282512, + 377487360: 16, + 394264576: 1073741824, + 411041792: 1074282496, + 427819008: 1073741840, + 444596224: 1073758224, + 461373440: 524304, + 478150656: 0, + 494927872: 16400, + 511705088: 1074266128, + 528482304: 540672 + }, { + 0: 260, + 1048576: 0, + 2097152: 67109120, + 3145728: 65796, + 4194304: 65540, + 5242880: 67108868, + 6291456: 67174660, + 7340032: 67174400, + 8388608: 67108864, + 9437184: 67174656, + 10485760: 65792, + 11534336: 67174404, + 12582912: 67109124, + 13631488: 65536, + 14680064: 4, + 15728640: 256, + 524288: 67174656, + 1572864: 67174404, + 2621440: 0, + 3670016: 67109120, + 4718592: 67108868, + 5767168: 65536, + 6815744: 65540, + 7864320: 260, + 8912896: 4, + 9961472: 256, + 11010048: 67174400, + 12058624: 65796, + 13107200: 65792, + 14155776: 67109124, + 15204352: 67174660, + 16252928: 67108864, + 16777216: 67174656, + 17825792: 65540, + 18874368: 65536, + 19922944: 67109120, + 20971520: 256, + 22020096: 67174660, + 23068672: 67108868, + 24117248: 0, + 25165824: 67109124, + 26214400: 67108864, + 27262976: 4, + 28311552: 65792, + 29360128: 67174400, + 30408704: 260, + 31457280: 65796, + 32505856: 67174404, + 17301504: 67108864, + 18350080: 260, + 19398656: 67174656, + 20447232: 0, + 21495808: 65540, + 22544384: 67109120, + 23592960: 256, + 24641536: 67174404, + 25690112: 65536, + 26738688: 67174660, + 27787264: 65796, + 28835840: 67108868, + 29884416: 67109124, + 30932992: 67174400, + 31981568: 4, + 33030144: 65792 + }, { + 0: 2151682048, + 65536: 2147487808, + 131072: 4198464, + 196608: 2151677952, + 262144: 0, + 327680: 4198400, + 393216: 2147483712, + 458752: 4194368, + 524288: 2147483648, + 589824: 4194304, + 655360: 64, + 720896: 2147487744, + 786432: 2151678016, + 851968: 4160, + 917504: 4096, + 983040: 2151682112, + 32768: 2147487808, + 98304: 64, + 163840: 2151678016, + 229376: 2147487744, + 294912: 4198400, + 360448: 2151682112, + 425984: 0, + 491520: 2151677952, + 557056: 4096, + 622592: 2151682048, + 688128: 4194304, + 753664: 4160, + 819200: 2147483648, + 884736: 4194368, + 950272: 4198464, + 1015808: 2147483712, + 1048576: 4194368, + 1114112: 4198400, + 1179648: 2147483712, + 1245184: 0, + 1310720: 4160, + 1376256: 2151678016, + 1441792: 2151682048, + 1507328: 2147487808, + 1572864: 2151682112, + 1638400: 2147483648, + 1703936: 2151677952, + 1769472: 4198464, + 1835008: 2147487744, + 1900544: 4194304, + 1966080: 64, + 2031616: 4096, + 1081344: 2151677952, + 1146880: 2151682112, + 1212416: 0, + 1277952: 4198400, + 1343488: 4194368, + 1409024: 2147483648, + 1474560: 2147487808, + 1540096: 64, + 1605632: 2147483712, + 1671168: 4096, + 1736704: 2147487744, + 1802240: 2151678016, + 1867776: 4160, + 1933312: 2151682048, + 1998848: 4194304, + 2064384: 4198464 + }, { + 0: 128, + 4096: 17039360, + 8192: 262144, + 12288: 536870912, + 16384: 537133184, + 20480: 16777344, + 24576: 553648256, + 28672: 262272, + 32768: 16777216, + 36864: 537133056, + 40960: 536871040, + 45056: 553910400, + 49152: 553910272, + 53248: 0, + 57344: 17039488, + 61440: 553648128, + 2048: 17039488, + 6144: 553648256, + 10240: 128, + 14336: 17039360, + 18432: 262144, + 22528: 537133184, + 26624: 553910272, + 30720: 536870912, + 34816: 537133056, + 38912: 0, + 43008: 553910400, + 47104: 16777344, + 51200: 536871040, + 55296: 553648128, + 59392: 16777216, + 63488: 262272, + 65536: 262144, + 69632: 128, + 73728: 536870912, + 77824: 553648256, + 81920: 16777344, + 86016: 553910272, + 90112: 537133184, + 94208: 16777216, + 98304: 553910400, + 102400: 553648128, + 106496: 17039360, + 110592: 537133056, + 114688: 262272, + 118784: 536871040, + 122880: 0, + 126976: 17039488, + 67584: 553648256, + 71680: 16777216, + 75776: 17039360, + 79872: 537133184, + 83968: 536870912, + 88064: 17039488, + 92160: 128, + 96256: 553910272, + 100352: 262272, + 104448: 553910400, + 108544: 0, + 112640: 553648128, + 116736: 16777344, + 120832: 262144, + 124928: 537133056, + 129024: 536871040 + }, { + 0: 268435464, + 256: 8192, + 512: 270532608, + 768: 270540808, + 1024: 268443648, + 1280: 2097152, + 1536: 2097160, + 1792: 268435456, + 2048: 0, + 2304: 268443656, + 2560: 2105344, + 2816: 8, + 3072: 270532616, + 3328: 2105352, + 3584: 8200, + 3840: 270540800, + 128: 270532608, + 384: 270540808, + 640: 8, + 896: 2097152, + 1152: 2105352, + 1408: 268435464, + 1664: 268443648, + 1920: 8200, + 2176: 2097160, + 2432: 8192, + 2688: 268443656, + 2944: 270532616, + 3200: 0, + 3456: 270540800, + 3712: 2105344, + 3968: 268435456, + 4096: 268443648, + 4352: 270532616, + 4608: 270540808, + 4864: 8200, + 5120: 2097152, + 5376: 268435456, + 5632: 268435464, + 5888: 2105344, + 6144: 2105352, + 6400: 0, + 6656: 8, + 6912: 270532608, + 7168: 8192, + 7424: 268443656, + 7680: 270540800, + 7936: 2097160, + 4224: 8, + 4480: 2105344, + 4736: 2097152, + 4992: 268435464, + 5248: 268443648, + 5504: 8200, + 5760: 270540808, + 6016: 270532608, + 6272: 270540800, + 6528: 270532616, + 6784: 8192, + 7040: 2105352, + 7296: 2097160, + 7552: 0, + 7808: 268435456, + 8064: 268443656 + }, { + 0: 1048576, + 16: 33555457, + 32: 1024, + 48: 1049601, + 64: 34604033, + 80: 0, + 96: 1, + 112: 34603009, + 128: 33555456, + 144: 1048577, + 160: 33554433, + 176: 34604032, + 192: 34603008, + 208: 1025, + 224: 1049600, + 240: 33554432, + 8: 34603009, + 24: 0, + 40: 33555457, + 56: 34604032, + 72: 1048576, + 88: 33554433, + 104: 33554432, + 120: 1025, + 136: 1049601, + 152: 33555456, + 168: 34603008, + 184: 1048577, + 200: 1024, + 216: 34604033, + 232: 1, + 248: 1049600, + 256: 33554432, + 272: 1048576, + 288: 33555457, + 304: 34603009, + 320: 1048577, + 336: 33555456, + 352: 34604032, + 368: 1049601, + 384: 1025, + 400: 34604033, + 416: 1049600, + 432: 1, + 448: 0, + 464: 34603008, + 480: 33554433, + 496: 1024, + 264: 1049600, + 280: 33555457, + 296: 34603009, + 312: 1, + 328: 33554432, + 344: 1048576, + 360: 1025, + 376: 34604032, + 392: 33554433, + 408: 34603008, + 424: 0, + 440: 34604033, + 456: 1049601, + 472: 1024, + 488: 33555456, + 504: 1048577 + }, { + 0: 134219808, + 1: 131072, + 2: 134217728, + 3: 32, + 4: 131104, + 5: 134350880, + 6: 134350848, + 7: 2048, + 8: 134348800, + 9: 134219776, + 10: 133120, + 11: 134348832, + 12: 2080, + 13: 0, + 14: 134217760, + 15: 133152, + 2147483648: 2048, + 2147483649: 134350880, + 2147483650: 134219808, + 2147483651: 134217728, + 2147483652: 134348800, + 2147483653: 133120, + 2147483654: 133152, + 2147483655: 32, + 2147483656: 134217760, + 2147483657: 2080, + 2147483658: 131104, + 2147483659: 134350848, + 2147483660: 0, + 2147483661: 134348832, + 2147483662: 134219776, + 2147483663: 131072, + 16: 133152, + 17: 134350848, + 18: 32, + 19: 2048, + 20: 134219776, + 21: 134217760, + 22: 134348832, + 23: 131072, + 24: 0, + 25: 131104, + 26: 134348800, + 27: 134219808, + 28: 134350880, + 29: 133120, + 30: 2080, + 31: 134217728, + 2147483664: 131072, + 2147483665: 2048, + 2147483666: 134348832, + 2147483667: 133152, + 2147483668: 32, + 2147483669: 134348800, + 2147483670: 134217728, + 2147483671: 134219808, + 2147483672: 134350880, + 2147483673: 134217760, + 2147483674: 134219776, + 2147483675: 0, + 2147483676: 133120, + 2147483677: 2080, + 2147483678: 131104, + 2147483679: 134350848 + }], + u = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], + d = a.DES = s.extend({ + _doReset: function _doReset() { + for (var t = this._key, r = t.words, e = [], i = 0; i < 56; i++) { + var n = c[i] - 1; + e[i] = r[n >>> 5] >>> 31 - n % 32 & 1; + } + + for (var o = this._subKeys = [], s = 0; s < 16; s++) { + for (var a = o[s] = [], f = l[s], i = 0; i < 24; i++) { + a[i / 6 | 0] |= e[(h[i] - 1 + f) % 28] << 31 - i % 6, a[4 + (i / 6 | 0)] |= e[28 + (h[i + 24] - 1 + f) % 28] << 31 - i % 6; + } + + a[0] = a[0] << 1 | a[0] >>> 31; + + for (var i = 1; i < 7; i++) { + a[i] = a[i] >>> 4 * (i - 1) + 3; + } + + a[7] = a[7] << 5 | a[7] >>> 27; + } + + for (var u = this._invSubKeys = [], i = 0; i < 16; i++) { + u[i] = o[15 - i]; + } + }, + encryptBlock: function encryptBlock(t, r) { + this._doCryptBlock(t, r, this._subKeys); + }, + decryptBlock: function decryptBlock(t, r) { + this._doCryptBlock(t, r, this._invSubKeys); + }, + _doCryptBlock: function _doCryptBlock(t, i, n) { + this._lBlock = t[i], this._rBlock = t[i + 1], r.call(this, 4, 252645135), r.call(this, 16, 65535), e.call(this, 2, 858993459), e.call(this, 8, 16711935), r.call(this, 1, 1431655765); + + for (var o = 0; o < 16; o++) { + for (var s = n[o], a = this._lBlock, c = this._rBlock, h = 0, l = 0; l < 8; l++) { + h |= f[l][((c ^ s[l]) & u[l]) >>> 0]; + } + + this._lBlock = c, this._rBlock = a ^ h; + } + + var d = this._lBlock; + this._lBlock = this._rBlock, this._rBlock = d, r.call(this, 1, 1431655765), e.call(this, 8, 16711935), e.call(this, 2, 858993459), r.call(this, 16, 65535), r.call(this, 4, 252645135), t[i] = this._lBlock, t[i + 1] = this._rBlock; + }, + keySize: 2, + ivSize: 2, + blockSize: 2 + }); + i.DES = s._createHelper(d); + var v = a.TripleDES = s.extend({ + _doReset: function _doReset() { + var t = this._key, + r = t.words; + this._des1 = d.createEncryptor(o.create(r.slice(0, 2))), this._des2 = d.createEncryptor(o.create(r.slice(2, 4))), this._des3 = d.createEncryptor(o.create(r.slice(4, 6))); + }, + encryptBlock: function encryptBlock(t, r) { + this._des1.encryptBlock(t, r), this._des2.decryptBlock(t, r), this._des3.encryptBlock(t, r); + }, + decryptBlock: function decryptBlock(t, r) { + this._des3.decryptBlock(t, r), this._des2.encryptBlock(t, r), this._des1.decryptBlock(t, r); + }, + keySize: 6, + ivSize: 2, + blockSize: 2 + }); + i.TripleDES = s._createHelper(v); + }(), function () { + function r() { + for (var t = this._S, r = this._i, e = this._j, i = 0, n = 0; n < 4; n++) { + r = (r + 1) % 256, e = (e + t[r]) % 256; + var o = t[r]; + t[r] = t[e], t[e] = o, i |= t[(t[r] + t[e]) % 256] << 24 - 8 * n; + } + + return this._i = r, this._j = e, i; + } + + var e = t, + i = e.lib, + n = i.StreamCipher, + o = e.algo, + s = o.RC4 = n.extend({ + _doReset: function _doReset() { + for (var t = this._key, r = t.words, e = t.sigBytes, i = this._S = [], n = 0; n < 256; n++) { + i[n] = n; + } + + for (var n = 0, o = 0; n < 256; n++) { + var s = n % e, + a = r[s >>> 2] >>> 24 - s % 4 * 8 & 255; + o = (o + i[n] + a) % 256; + var c = i[n]; + i[n] = i[o], i[o] = c; + } + + this._i = this._j = 0; + }, + _doProcessBlock: function _doProcessBlock(t, e) { + t[e] ^= r.call(this); + }, + keySize: 8, + ivSize: 0 + }); + e.RC4 = n._createHelper(s); + var a = o.RC4Drop = s.extend({ + cfg: s.cfg.extend({ + drop: 192 + }), + _doReset: function _doReset() { + s._doReset.call(this); + + for (var t = this.cfg.drop; t > 0; t--) { + r.call(this); + } + } + }); + e.RC4Drop = n._createHelper(a); + }(), t.mode.CTRGladman = function () { + function r(t) { + if (255 === (t >> 24 & 255)) { + var r = t >> 16 & 255, + e = t >> 8 & 255, + i = 255 & t; + 255 === r ? (r = 0, 255 === e ? (e = 0, 255 === i ? i = 0 : ++i) : ++e) : ++r, t = 0, t += r << 16, t += e << 8, t += i; + } else t += 1 << 24; + + return t; + } + + function e(t) { + return 0 === (t[0] = r(t[0])) && (t[1] = r(t[1])), t; + } + + var i = t.lib.BlockCipherMode.extend(), + n = i.Encryptor = i.extend({ + processBlock: function processBlock(t, r) { + var i = this._cipher, + n = i.blockSize, + o = this._iv, + s = this._counter; + o && (s = this._counter = o.slice(0), this._iv = void 0), e(s); + var a = s.slice(0); + i.encryptBlock(a, 0); + + for (var c = 0; c < n; c++) { + t[r + c] ^= a[c]; + } + } + }); + return i.Decryptor = n, i; + }(), function () { + function r() { + for (var t = this._X, r = this._C, e = 0; e < 8; e++) { + a[e] = r[e]; + } + + r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; + + for (var e = 0; e < 8; e++) { + var i = t[e] + r[e], + n = 65535 & i, + o = i >>> 16, + s = ((n * n >>> 17) + n * o >>> 15) + o * o, + h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); + c[e] = s ^ h; + } + + t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0; + } + + var e = t, + i = e.lib, + n = i.StreamCipher, + o = e.algo, + s = [], + a = [], + c = [], + h = o.Rabbit = n.extend({ + _doReset: function _doReset() { + for (var t = this._key.words, e = this.cfg.iv, i = 0; i < 4; i++) { + t[i] = 16711935 & (t[i] << 8 | t[i] >>> 24) | 4278255360 & (t[i] << 24 | t[i] >>> 8); + } + + var n = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], + o = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; + this._b = 0; + + for (var i = 0; i < 4; i++) { + r.call(this); + } + + for (var i = 0; i < 8; i++) { + o[i] ^= n[i + 4 & 7]; + } + + if (e) { + var s = e.words, + a = s[0], + c = s[1], + h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), + l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), + f = h >>> 16 | 4294901760 & l, + u = l << 16 | 65535 & h; + o[0] ^= h, o[1] ^= f, o[2] ^= l, o[3] ^= u, o[4] ^= h, o[5] ^= f, o[6] ^= l, o[7] ^= u; + + for (var i = 0; i < 4; i++) { + r.call(this); + } + } + }, + _doProcessBlock: function _doProcessBlock(t, e) { + var i = this._X; + r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; + + for (var n = 0; n < 4; n++) { + s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n]; + } + }, + blockSize: 4, + ivSize: 2 + }); + e.Rabbit = n._createHelper(h); + }(), t.mode.CTR = function () { + var r = t.lib.BlockCipherMode.extend(), + e = r.Encryptor = r.extend({ + processBlock: function processBlock(t, r) { + var e = this._cipher, + i = e.blockSize, + n = this._iv, + o = this._counter; + n && (o = this._counter = n.slice(0), this._iv = void 0); + var s = o.slice(0); + e.encryptBlock(s, 0), o[i - 1] = o[i - 1] + 1 | 0; + + for (var a = 0; a < i; a++) { + t[r + a] ^= s[a]; + } + } + }); + return r.Decryptor = e, r; + }(), function () { + function r() { + for (var t = this._X, r = this._C, e = 0; e < 8; e++) { + a[e] = r[e]; + } + + r[0] = r[0] + 1295307597 + this._b | 0, r[1] = r[1] + 3545052371 + (r[0] >>> 0 < a[0] >>> 0 ? 1 : 0) | 0, r[2] = r[2] + 886263092 + (r[1] >>> 0 < a[1] >>> 0 ? 1 : 0) | 0, r[3] = r[3] + 1295307597 + (r[2] >>> 0 < a[2] >>> 0 ? 1 : 0) | 0, r[4] = r[4] + 3545052371 + (r[3] >>> 0 < a[3] >>> 0 ? 1 : 0) | 0, r[5] = r[5] + 886263092 + (r[4] >>> 0 < a[4] >>> 0 ? 1 : 0) | 0, r[6] = r[6] + 1295307597 + (r[5] >>> 0 < a[5] >>> 0 ? 1 : 0) | 0, r[7] = r[7] + 3545052371 + (r[6] >>> 0 < a[6] >>> 0 ? 1 : 0) | 0, this._b = r[7] >>> 0 < a[7] >>> 0 ? 1 : 0; + + for (var e = 0; e < 8; e++) { + var i = t[e] + r[e], + n = 65535 & i, + o = i >>> 16, + s = ((n * n >>> 17) + n * o >>> 15) + o * o, + h = ((4294901760 & i) * i | 0) + ((65535 & i) * i | 0); + c[e] = s ^ h; + } + + t[0] = c[0] + (c[7] << 16 | c[7] >>> 16) + (c[6] << 16 | c[6] >>> 16) | 0, t[1] = c[1] + (c[0] << 8 | c[0] >>> 24) + c[7] | 0, t[2] = c[2] + (c[1] << 16 | c[1] >>> 16) + (c[0] << 16 | c[0] >>> 16) | 0, t[3] = c[3] + (c[2] << 8 | c[2] >>> 24) + c[1] | 0, t[4] = c[4] + (c[3] << 16 | c[3] >>> 16) + (c[2] << 16 | c[2] >>> 16) | 0, t[5] = c[5] + (c[4] << 8 | c[4] >>> 24) + c[3] | 0, t[6] = c[6] + (c[5] << 16 | c[5] >>> 16) + (c[4] << 16 | c[4] >>> 16) | 0, t[7] = c[7] + (c[6] << 8 | c[6] >>> 24) + c[5] | 0; + } + + var e = t, + i = e.lib, + n = i.StreamCipher, + o = e.algo, + s = [], + a = [], + c = [], + h = o.RabbitLegacy = n.extend({ + _doReset: function _doReset() { + var t = this._key.words, + e = this.cfg.iv, + i = this._X = [t[0], t[3] << 16 | t[2] >>> 16, t[1], t[0] << 16 | t[3] >>> 16, t[2], t[1] << 16 | t[0] >>> 16, t[3], t[2] << 16 | t[1] >>> 16], + n = this._C = [t[2] << 16 | t[2] >>> 16, 4294901760 & t[0] | 65535 & t[1], t[3] << 16 | t[3] >>> 16, 4294901760 & t[1] | 65535 & t[2], t[0] << 16 | t[0] >>> 16, 4294901760 & t[2] | 65535 & t[3], t[1] << 16 | t[1] >>> 16, 4294901760 & t[3] | 65535 & t[0]]; + this._b = 0; + + for (var o = 0; o < 4; o++) { + r.call(this); + } + + for (var o = 0; o < 8; o++) { + n[o] ^= i[o + 4 & 7]; + } + + if (e) { + var s = e.words, + a = s[0], + c = s[1], + h = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8), + l = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), + f = h >>> 16 | 4294901760 & l, + u = l << 16 | 65535 & h; + n[0] ^= h, n[1] ^= f, n[2] ^= l, n[3] ^= u, n[4] ^= h, n[5] ^= f, n[6] ^= l, n[7] ^= u; + + for (var o = 0; o < 4; o++) { + r.call(this); + } + } + }, + _doProcessBlock: function _doProcessBlock(t, e) { + var i = this._X; + r.call(this), s[0] = i[0] ^ i[5] >>> 16 ^ i[3] << 16, s[1] = i[2] ^ i[7] >>> 16 ^ i[5] << 16, s[2] = i[4] ^ i[1] >>> 16 ^ i[7] << 16, s[3] = i[6] ^ i[3] >>> 16 ^ i[1] << 16; + + for (var n = 0; n < 4; n++) { + s[n] = 16711935 & (s[n] << 8 | s[n] >>> 24) | 4278255360 & (s[n] << 24 | s[n] >>> 8), t[e + n] ^= s[n]; + } + }, + blockSize: 4, + ivSize: 2 + }); + e.RabbitLegacy = n._createHelper(h); + }(), t.pad.ZeroPadding = { + pad: function pad(t, r) { + var e = 4 * r; + t.clamp(), t.sigBytes += e - (t.sigBytes % e || e); + }, + unpad: function unpad(t) { + for (var r = t.words, e = t.sigBytes - 1; !(r[e >>> 2] >>> 24 - e % 4 * 8 & 255);) { + e--; + } + + t.sigBytes = e + 1; + } + }, t; +}); //# sourceMappingURL=crypto-js.min.js.map + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js.map b/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js.map new file mode 100644 index 0000000..baf63da --- /dev/null +++ b/library/imports/e6/e64e1a97-c93f-4257-ab34-80341d8ff79d.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\module\\Crypto\\crypto-js.min.js"],"names":["t","r","exports","module","define","amd","CryptoJS","e","Object","create","prototype","i","n","lib","o","Base","extend","mixIn","hasOwnProperty","init","$super","apply","arguments","toString","clone","s","WordArray","words","sigBytes","length","c","stringify","concat","clamp","ceil","call","slice","random","a","push","enc","Hex","join","parse","parseInt","substr","h","Latin1","String","fromCharCode","charCodeAt","l","Utf8","decodeURIComponent","escape","Error","unescape","encodeURIComponent","f","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","blockSize","max","_minBufferSize","min","_doProcessBlock","u","splice","Hasher","cfg","_doReset","update","finalize","_doFinalize","_createHelper","_createHmacHelper","HMAC","algo","Math","Base64","_map","charAt","_reverseMap","indexOf","abs","sin","MD5","_hash","d","v","p","_","y","g","B","w","k","S","m","x","b","H","z","A","C","D","floor","HmacMD5","SHA1","HmacSHA1","sqrt","pow","SHA256","HmacSHA256","Utf16","Utf16BE","Utf16LE","ArrayBuffer","Uint8Array","Int8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","buffer","byteOffset","byteLength","RIPEMD160","R","E","M","F","HmacRIPEMD160","_hasher","_oKey","_iKey","PBKDF2","keySize","hasher","iterations","compute","EvpKDF","SHA224","HmacSHA224","x64","Word","high","low","toX32","SHA3","outputLength","_state","HmacSHA3","SHA512","P","W","O","U","I","K","X","L","j","N","T","Z","q","G","J","$","Q","V","Y","tt","rt","et","it","nt","ot","st","at","ct","ht","lt","ft","ut","dt","vt","pt","_t","yt","gt","Bt","wt","kt","St","mt","xt","bt","HmacSHA512","SHA384","HmacSHA384","Cipher","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","_xformMode","_key","process","ivSize","encrypt","decrypt","StreamCipher","mode","BlockCipherMode","Encryptor","Decryptor","_cipher","_iv","CBC","_prevBlock","processBlock","encryptBlock","decryptBlock","pad","Pkcs7","unpad","BlockCipher","padding","iv","_mode","__creator","CipherParams","formatter","format","OpenSSL","ciphertext","salt","SerializableCipher","key","algorithm","_parse","kdf","execute","PasswordBasedCipher","CFB","ECB","AnsiX923","Iso10126","Iso97971","ZeroPadding","OFB","_keystream","NoPadding","AES","_nRounds","_keyPriorReset","_keySchedule","_invKeySchedule","_doCryptBlock","_lBlock","_rBlock","DES","_subKeys","_invSubKeys","TripleDES","_des1","_des2","_des3","_S","_i","_j","RC4","RC4Drop","drop","CTRGladman","_counter","_X","_C","_b","Rabbit","CTR","RabbitLegacy"],"mappings":";;;;;;AAAA,CAAC,UAASA,CAAT,EAAWC,CAAX,EAAa;AAAC,cAAU,OAAOC,OAAjB,GAAyBC,MAAM,CAACD,OAAP,GAAeA,OAAO,GAACD,CAAC,EAAjD,GAAoD,cAAY,OAAOG,MAAnB,IAA2BA,MAAM,CAACC,GAAlC,GAAsCD,MAAM,CAAC,EAAD,EAAIH,CAAJ,CAA5C,GAAmDD,CAAC,CAACM,QAAF,GAAWL,CAAC,EAA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CAAC4B,QAAF,IAAYrB,CAAC,IAAEP,CAAC,CAAC4B,QAAF,GAAWrB,CAAX,IAAcA,CAAhB,CAAvB;AAA0C,KAAvE;AAAwEmO,IAAAA,KAAK,EAAC,eAAS1O,CAAT,EAAW;AAAC,WAAI,IAAIC,CAAC,GAACD,CAAC,CAAC2B,KAAR,EAAcpB,CAAC,GAACP,CAAC,CAAC4B,QAAF,GAAW,CAA/B,EAAiC,EAAE3B,CAAC,CAACM,CAAC,KAAG,CAAL,CAAD,KAAW,KAAGA,CAAC,GAAC,CAAF,GAAI,CAAlB,GAAoB,GAAtB,CAAjC;AAA6DA,QAAAA,CAAC;AAA9D;;AAAiEP,MAAAA,CAAC,CAAC4B,QAAF,GAAWrB,CAAC,GAAC,CAAb;AAAe;AAA1K,GADnyX,EAC+8XP,CADt9X;AACw9X,CADjhf,CAAD,EAEA","sourceRoot":"/","sourcesContent":["!function(t,r){\"object\"==typeof exports?module.exports=exports=r():\"function\"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,r){var e=Object.create||function(){function t(){}return function(r){var e;return t.prototype=r,e=new t,t.prototype=null,e}}(),i={},n=i.lib={},o=n.Base=function(){return{extend:function(t){var r=e(this);return t&&r.mixIn(t),r.hasOwnProperty(\"init\")&&this.init!==r.init||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var r in t)t.hasOwnProperty(r)&&(this[r]=t[r]);t.hasOwnProperty(\"toString\")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=n.WordArray=o.extend({init:function(t,e){t=this.words=t||[],e!=r?this.sigBytes=e:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var r=this.words,e=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o>>2]>>>24-o%4*8&255;r[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var o=0;o>>2]=e[o>>>2];return this.sigBytes+=n,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=t.ceil(e/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(r){for(var e,i=[],n=function(r){var r=r,e=987654321,i=4294967295;return function(){e=36969*(65535&e)+(e>>16)&i,r=18e3*(65535&r)+(r>>16)&i;var n=(e<<16)+r&i;return n/=4294967296,n+=.5,n*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join(\"\")},parse:function(t){for(var r=t.length,e=[],i=0;i>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new s.init(e,r/2)}},h=a.Latin1={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join(\"\")},parse:function(t){for(var r=t.length,e=[],i=0;i>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new s.init(e,r)}},l=a.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch(t){throw new Error(\"Malformed UTF-8 data\")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},f=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){\"string\"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(r){var e=this._data,i=e.words,n=e.sigBytes,o=this.blockSize,a=4*o,c=n/a;c=r?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var h=c*o,l=t.min(4*h,n);if(h){for(var f=0;f>>6-s%4*2;i[o>>>2]|=(a|c)<<24-o%4*8,o++}return n.create(i,o)}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Base64={stringify:function(t){var r=t.words,e=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o>>2]>>>24-o%4*8&255,a=r[o+1>>>2]>>>24-(o+1)%4*8&255,c=r[o+2>>>2]>>>24-(o+2)%4*8&255,h=s<<16|a<<8|c,l=0;l<4&&o+.75*l>>6*(3-l)&63));var f=i.charAt(64);if(f)for(;n.length%4;)n.push(f);return n.join(\"\")},parse:function(t){var e=t.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>32-o)+r}function i(t,r,e,i,n,o,s){var a=t+(r&i|e&~i)+n+s;return(a<>>32-o)+r}function n(t,r,e,i,n,o,s){var a=t+(r^e^i)+n+s;return(a<>>32-o)+r}function o(t,r,e,i,n,o,s){var a=t+(e^(r|~i))+n+s;return(a<>>32-o)+r}var s=t,a=s.lib,c=a.WordArray,h=a.Hasher,l=s.algo,f=[];!function(){for(var t=0;t<64;t++)f[t]=4294967296*r.abs(r.sin(t+1))|0}();var u=l.MD5=h.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,r){for(var s=0;s<16;s++){var a=r+s,c=t[a];t[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var h=this._hash.words,l=t[r+0],u=t[r+1],d=t[r+2],v=t[r+3],p=t[r+4],_=t[r+5],y=t[r+6],g=t[r+7],B=t[r+8],w=t[r+9],k=t[r+10],S=t[r+11],m=t[r+12],x=t[r+13],b=t[r+14],H=t[r+15],z=h[0],A=h[1],C=h[2],D=h[3];z=e(z,A,C,D,l,7,f[0]),D=e(D,z,A,C,u,12,f[1]),C=e(C,D,z,A,d,17,f[2]),A=e(A,C,D,z,v,22,f[3]),z=e(z,A,C,D,p,7,f[4]),D=e(D,z,A,C,_,12,f[5]),C=e(C,D,z,A,y,17,f[6]),A=e(A,C,D,z,g,22,f[7]),z=e(z,A,C,D,B,7,f[8]),D=e(D,z,A,C,w,12,f[9]),C=e(C,D,z,A,k,17,f[10]),A=e(A,C,D,z,S,22,f[11]),z=e(z,A,C,D,m,7,f[12]),D=e(D,z,A,C,x,12,f[13]),C=e(C,D,z,A,b,17,f[14]),A=e(A,C,D,z,H,22,f[15]),z=i(z,A,C,D,u,5,f[16]),D=i(D,z,A,C,y,9,f[17]),C=i(C,D,z,A,S,14,f[18]),A=i(A,C,D,z,l,20,f[19]),z=i(z,A,C,D,_,5,f[20]),D=i(D,z,A,C,k,9,f[21]),C=i(C,D,z,A,H,14,f[22]),A=i(A,C,D,z,p,20,f[23]),z=i(z,A,C,D,w,5,f[24]),D=i(D,z,A,C,b,9,f[25]),C=i(C,D,z,A,v,14,f[26]),A=i(A,C,D,z,B,20,f[27]),z=i(z,A,C,D,x,5,f[28]),D=i(D,z,A,C,d,9,f[29]),C=i(C,D,z,A,g,14,f[30]),A=i(A,C,D,z,m,20,f[31]),z=n(z,A,C,D,_,4,f[32]),D=n(D,z,A,C,B,11,f[33]),C=n(C,D,z,A,S,16,f[34]),A=n(A,C,D,z,b,23,f[35]),z=n(z,A,C,D,u,4,f[36]),D=n(D,z,A,C,p,11,f[37]),C=n(C,D,z,A,g,16,f[38]),A=n(A,C,D,z,k,23,f[39]),z=n(z,A,C,D,x,4,f[40]),D=n(D,z,A,C,l,11,f[41]),C=n(C,D,z,A,v,16,f[42]),A=n(A,C,D,z,y,23,f[43]),z=n(z,A,C,D,w,4,f[44]),D=n(D,z,A,C,m,11,f[45]),C=n(C,D,z,A,H,16,f[46]),A=n(A,C,D,z,d,23,f[47]),z=o(z,A,C,D,l,6,f[48]),D=o(D,z,A,C,g,10,f[49]),C=o(C,D,z,A,b,15,f[50]),A=o(A,C,D,z,_,21,f[51]),z=o(z,A,C,D,m,6,f[52]),D=o(D,z,A,C,v,10,f[53]),C=o(C,D,z,A,k,15,f[54]),A=o(A,C,D,z,u,21,f[55]),z=o(z,A,C,D,B,6,f[56]),D=o(D,z,A,C,H,10,f[57]),C=o(C,D,z,A,y,15,f[58]),A=o(A,C,D,z,x,21,f[59]),z=o(z,A,C,D,p,6,f[60]),D=o(D,z,A,C,S,10,f[61]),C=o(C,D,z,A,d,15,f[62]),A=o(A,C,D,z,w,21,f[63]),h[0]=h[0]+z|0,h[1]=h[1]+A|0,h[2]=h[2]+C|0,h[3]=h[3]+D|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;e[n>>>5]|=128<<24-n%32;var o=r.floor(i/4294967296),s=i;e[(n+64>>>9<<4)+15]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),e[(n+64>>>9<<4)+14]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,c=a.words,h=0;h<4;h++){var l=c[h];c[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=h.clone.call(this);return t._hash=this._hash.clone(),t}});s.MD5=h._createHelper(u),s.HmacMD5=h._createHmacHelper(u)}(Math),function(){var r=t,e=r.lib,i=e.WordArray,n=e.Hasher,o=r.algo,s=[],a=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],a=e[3],c=e[4],h=0;h<80;h++){if(h<16)s[h]=0|t[r+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+c+s[h];f+=h<20?(n&o|~n&a)+1518500249:h<40?(n^o^a)+1859775393:h<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=i,i=f}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+a|0,e[4]=e[4]+c|0},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=Math.floor(e/4294967296),r[(i+64>>>9<<4)+15]=e,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});r.SHA1=n._createHelper(a),r.HmacSHA1=n._createHmacHelper(a)}(),function(r){var e=t,i=e.lib,n=i.WordArray,o=i.Hasher,s=e.algo,a=[],c=[];!function(){function t(t){for(var e=r.sqrt(t),i=2;i<=e;i++)if(!(t%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)t(i)&&(n<8&&(a[n]=e(r.pow(i,.5))),c[n]=e(r.pow(i,1/3)),n++),i++}();var h=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new n.init(a.slice(0))},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],l=e[5],f=e[6],u=e[7],d=0;d<64;d++){if(d<16)h[d]=0|t[r+d];else{var v=h[d-15],p=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=h[d-2],y=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;h[d]=p+h[d-7]+y+h[d-16]}var g=a&l^~a&f,B=i&n^i&o^n&o,w=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),k=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),S=u+k+g+c[d]+h[d],m=w+B;u=f,f=l,l=a,a=s+S|0,s=o,o=n,n=i,i=S+m|0}e[0]=e[0]+i|0,e[1]=e[1]+n|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+l|0,e[6]=e[6]+f|0,e[7]=e[7]+u|0},_doFinalize:function(){var t=this._data,e=t.words,i=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[(n+64>>>9<<4)+14]=r.floor(i/4294967296),e[(n+64>>>9<<4)+15]=i,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),function(){function r(t){return t<<8&4278255360|t>>>8&16711935}var e=t,i=e.lib,n=i.WordArray,o=e.enc;o.Utf16=o.Utf16BE={stringify:function(t){for(var r=t.words,e=t.sigBytes,i=[],n=0;n>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join(\"\")},parse:function(t){for(var r=t.length,e=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return n.create(e,2*r)}};o.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join(\"\")},parse:function(t){for(var e=t.length,i=[],o=0;o>>1]|=r(t.charCodeAt(o)<<16-o%2*16);return n.create(i,2*e)}}}(),function(){if(\"function\"==typeof ArrayBuffer){var r=t,e=r.lib,i=e.WordArray,n=i.init,o=i.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||\"undefined\"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,e=[],i=0;i>>2]|=t[i]<<24-i%4*8;n.call(this,e,r)}else n.apply(this,arguments)};o.prototype=i}}(),function(r){function e(t,r,e){return t^r^e}function i(t,r,e){return t&r|~t&e}function n(t,r,e){return(t|~r)^e}function o(t,r,e){return t&e|r&~e}function s(t,r,e){return t^(r|~e)}function a(t,r){return t<>>32-r}var c=t,h=c.lib,l=h.WordArray,f=h.Hasher,u=c.algo,d=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),_=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=u.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,r){for(var c=0;c<16;c++){var h=r+c,l=t[h];t[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var f,u,B,w,k,S,m,x,b,H,z=this._hash.words,A=y.words,C=g.words,D=d.words,R=v.words,E=p.words,M=_.words;S=f=z[0],m=u=z[1],x=B=z[2],b=w=z[3],H=k=z[4];for(var F,c=0;c<80;c+=1)F=f+t[r+D[c]]|0,F+=c<16?e(u,B,w)+A[0]:c<32?i(u,B,w)+A[1]:c<48?n(u,B,w)+A[2]:c<64?o(u,B,w)+A[3]:s(u,B,w)+A[4],F|=0,F=a(F,E[c]),F=F+k|0,f=k,k=w,w=a(B,10),B=u,u=F,F=S+t[r+R[c]]|0,F+=c<16?s(m,x,b)+C[0]:c<32?o(m,x,b)+C[1]:c<48?n(m,x,b)+C[2]:c<64?i(m,x,b)+C[3]:e(m,x,b)+C[4],F|=0,F=a(F,M[c]),F=F+H|0,S=H,H=b,b=a(x,10),x=m,m=F;F=z[1]+B+b|0,z[1]=z[2]+w+H|0,z[2]=z[3]+k+S|0,z[3]=z[4]+f+m|0,z[4]=z[0]+u+x|0,z[0]=F},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t.sigBytes=4*(r.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=f._createHelper(B),c.HmacRIPEMD160=f._createHmacHelper(B)}(Math),function(){var r=t,e=r.lib,i=e.Base,n=r.enc,o=n.Utf8,s=r.algo;s.HMAC=i.extend({init:function(t,r){t=this._hasher=new t.init,\"string\"==typeof r&&(r=o.parse(r));var e=t.blockSize,i=4*e;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var n=this._oKey=r.clone(),s=this._iKey=r.clone(),a=n.words,c=s.words,h=0;h>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=e[n];a.high^=s,a.low^=o}for(var c=0;c<24;c++){for(var d=0;d<5;d++){for(var v=0,p=0,_=0;_<5;_++){var a=e[d+5*_];v^=a.high,p^=a.low}var y=u[d];y.high=v,y.low=p}for(var d=0;d<5;d++)for(var g=u[(d+4)%5],B=u[(d+1)%5],w=B.high,k=B.low,v=g.high^(w<<1|k>>>31),p=g.low^(k<<1|w>>>31),_=0;_<5;_++){var a=e[d+5*_];a.high^=v,a.low^=p}for(var S=1;S<25;S++){var a=e[S],m=a.high,x=a.low,b=h[S];if(b<32)var v=m<>>32-b,p=x<>>32-b;else var v=x<>>64-b,p=m<>>64-b;var H=u[l[S]];H.high=v,H.low=p}var z=u[0],A=e[0];z.high=A.high,z.low=A.low;for(var d=0;d<5;d++)for(var _=0;_<5;_++){var S=d+5*_,a=e[S],C=u[S],D=u[(d+1)%5+5*_],R=u[(d+2)%5+5*_];a.high=C.high^~D.high&R.high,a.low=C.low^~D.low&R.low}var a=e[0],E=f[c];a.high^=E.high,a.low^=E.low}},_doFinalize:function(){var t=this._data,e=t.words,i=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,c=a/8,h=[],l=0;l>>24)|4278255360&(u<<24|u>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h.push(d),h.push(u)}return new n.init(h,a)},clone:function(){for(var t=o.clone.call(this),r=t._state=this._state.slice(0),e=0;e<25;e++)r[e]=r[e].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),function(){function r(){return s.create.apply(s,arguments)}var e=t,i=e.lib,n=i.Hasher,o=e.x64,s=o.Word,a=o.WordArray,c=e.algo,h=[r(1116352408,3609767458),r(1899447441,602891725),r(3049323471,3964484399),r(3921009573,2173295548),r(961987163,4081628472),r(1508970993,3053834265),r(2453635748,2937671579),r(2870763221,3664609560),r(3624381080,2734883394),r(310598401,1164996542),r(607225278,1323610764),r(1426881987,3590304994),r(1925078388,4068182383),r(2162078206,991336113),r(2614888103,633803317),r(3248222580,3479774868),r(3835390401,2666613458),r(4022224774,944711139),r(264347078,2341262773),r(604807628,2007800933),r(770255983,1495990901),r(1249150122,1856431235),r(1555081692,3175218132),r(1996064986,2198950837),r(2554220882,3999719339),r(2821834349,766784016),r(2952996808,2566594879),r(3210313671,3203337956),r(3336571891,1034457026),r(3584528711,2466948901),r(113926993,3758326383),r(338241895,168717936),r(666307205,1188179964),r(773529912,1546045734),r(1294757372,1522805485),r(1396182291,2643833823),r(1695183700,2343527390),r(1986661051,1014477480),r(2177026350,1206759142),r(2456956037,344077627),r(2730485921,1290863460),r(2820302411,3158454273),r(3259730800,3505952657),r(3345764771,106217008),r(3516065817,3606008344),r(3600352804,1432725776),r(4094571909,1467031594),r(275423344,851169720),r(430227734,3100823752),r(506948616,1363258195),r(659060556,3750685593),r(883997877,3785050280),r(958139571,3318307427),r(1322822218,3812723403),r(1537002063,2003034995),r(1747873779,3602036899),r(1955562222,1575990012),r(2024104815,1125592928),r(2227730452,2716904306),r(2361852424,442776044),r(2428436474,593698344),r(2756734187,3733110249),r(3204031479,2999351573),r(3329325298,3815920427),r(3391569614,3928383900),r(3515267271,566280711),r(3940187606,3454069534),r(4118630271,4000239992),r(116418474,1914138554),r(174292421,2731055270),r(289380356,3203993006),r(460393269,320620315),r(685471733,587496836),r(852142971,1086792851),r(1017036298,365543100),r(1126000580,2618297676),r(1288033470,3409855158),r(1501505948,4234509866),r(1607167915,987167468),r(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=r()}();var f=c.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new s.init(1013904242,4271175723),new s.init(2773480762,1595750129),new s.init(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(t,r){for(var e=this._hash.words,i=e[0],n=e[1],o=e[2],s=e[3],a=e[4],c=e[5],f=e[6],u=e[7],d=i.high,v=i.low,p=n.high,_=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=a.high,S=a.low,m=c.high,x=c.low,b=f.high,H=f.low,z=u.high,A=u.low,C=d,D=v,R=p,E=_,M=y,F=g,P=B,W=w,O=k,U=S,I=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var Z=l[T];if(T<16)var q=Z.high=0|t[r+2*T],G=Z.low=0|t[r+2*T+1];else{var J=l[T-15],$=J.high,Q=J.low,V=($>>>1|Q<<31)^($>>>8|Q<<24)^$>>>7,Y=(Q>>>1|$<<31)^(Q>>>8|$<<24)^(Q>>>7|$<<25),tt=l[T-2],rt=tt.high,et=tt.low,it=(rt>>>19|et<<13)^(rt<<3|et>>>29)^rt>>>6,nt=(et>>>19|rt<<13)^(et<<3|rt>>>29)^(et>>>6|rt<<26),ot=l[T-7],st=ot.high,at=ot.low,ct=l[T-16],ht=ct.high,lt=ct.low,G=Y+at,q=V+st+(G>>>0>>0?1:0),G=G+nt,q=q+it+(G>>>0>>0?1:0),G=G+lt,q=q+ht+(G>>>0>>0?1:0);Z.high=q,Z.low=G}var ft=O&I^~O&X,ut=U&K^~U&L,dt=C&R^C&M^R&M,vt=D&E^D&F^E&F,pt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),_t=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),yt=(O>>>14|U<<18)^(O>>>18|U<<14)^(O<<23|U>>>9),gt=(U>>>14|O<<18)^(U>>>18|O<<14)^(U<<23|O>>>9),Bt=h[T],wt=Bt.high,kt=Bt.low,St=N+gt,mt=j+yt+(St>>>0>>0?1:0),St=St+ut,mt=mt+ft+(St>>>0>>0?1:0),St=St+kt,mt=mt+wt+(St>>>0>>0?1:0),St=St+G,mt=mt+q+(St>>>0>>0?1:0),xt=_t+vt,bt=pt+dt+(xt>>>0<_t>>>0?1:0);j=X,N=L,X=I,L=K,I=O,K=U,U=W+St|0,O=P+mt+(U>>>0>>0?1:0)|0,P=M,W=F,M=R,F=E,R=C,E=D,D=St+xt|0,C=mt+bt+(D>>>0>>0?1:0)|0}v=i.low=v+D,i.high=d+C+(v>>>0>>0?1:0),_=n.low=_+E,n.high=p+R+(_>>>0>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0>>0?1:0),S=a.low=S+U,a.high=k+O+(S>>>0>>0?1:0),x=c.low=x+K,c.high=m+I+(x>>>0>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0>>0?1:0),A=u.low=A+N,u.high=z+j+(A>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,r=t.words,e=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32,r[(i+128>>>10<<5)+30]=Math.floor(e/4294967296),r[(i+128>>>10<<5)+31]=e,t.sigBytes=4*r.length,this._process();var n=this._hash.toX32();return n},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=n._createHelper(f),e.HmacSHA512=n._createHmacHelper(f)}(),function(){var r=t,e=r.x64,i=e.Word,n=e.WordArray,o=r.algo,s=o.SHA512,a=o.SHA384=s.extend({_doReset:function(){this._hash=new n.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new i.init(1731405415,4290775857),new i.init(2394180231,1750603025),new i.init(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=16,t}});r.SHA384=s._createHelper(a),r.HmacSHA384=s._createHmacHelper(a)}(),t.lib.Cipher||function(r){var e=t,i=e.lib,n=i.Base,o=i.WordArray,s=i.BufferedBlockAlgorithm,a=e.enc,c=(a.Utf8,a.Base64),h=e.algo,l=h.EvpKDF,f=i.Cipher=s.extend({cfg:n.extend(),createEncryptor:function(t,r){return this.create(this._ENC_XFORM_MODE,t,r)},createDecryptor:function(t,r){return this.create(this._DEC_XFORM_MODE,t,r)},init:function(t,r,e){this.cfg=this.cfg.extend(e),this._xformMode=t,this._key=r,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var r=this._doFinalize();return r},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return\"string\"==typeof t?m:w}return function(r){return{encrypt:function(e,i,n){return t(i).encrypt(r,e,i,n)},decrypt:function(e,i,n){return t(i).decrypt(r,e,i,n)}}}}()}),u=(i.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),e.mode={}),d=i.BlockCipherMode=n.extend({createEncryptor:function(t,r){return this.Encryptor.create(t,r)},createDecryptor:function(t,r){return this.Decryptor.create(t,r)},init:function(t,r){this._cipher=t,this._iv=r}}),v=u.CBC=function(){function t(t,e,i){var n=this._iv;if(n){var o=n;this._iv=r}else var o=this._prevBlock;for(var s=0;s>>2];t.sigBytes-=r}},y=(i.BlockCipher=f.extend({cfg:f.cfg.extend({mode:v,padding:_}),reset:function(){f.reset.call(this);var t=this.cfg,r=t.iv,e=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=e.createEncryptor;else{var i=e.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,r&&r.words):(this._mode=i.call(e,this,r&&r.words),this._mode.__creator=i)},_doProcessBlock:function(t,r){this._mode.processBlock(t,r)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var r=this._process(!0)}else{var r=this._process(!0);t.unpad(r)}return r},blockSize:4}),i.CipherParams=n.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=e.format={},B=g.OpenSSL={stringify:function(t){var r=t.ciphertext,e=t.salt;if(e)var i=o.create([1398893684,1701076831]).concat(e).concat(r);else var i=r;return i.toString(c)},parse:function(t){var r=c.parse(t),e=r.words;if(1398893684==e[0]&&1701076831==e[1]){var i=o.create(e.slice(2,4));e.splice(0,4),r.sigBytes-=16}return y.create({ciphertext:r,salt:i})}},w=i.SerializableCipher=n.extend({cfg:n.extend({format:B}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=t.createEncryptor(e,i),o=n.finalize(r),s=n.cfg;return y.create({ciphertext:o,key:e,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=t.createDecryptor(e,i).finalize(r.ciphertext);return n},_parse:function(t,r){return\"string\"==typeof t?r.parse(t,this):t}}),k=e.kdf={},S=k.OpenSSL={execute:function(t,r,e,i){i||(i=o.random(8));var n=l.create({keySize:r+e}).compute(t,i),s=o.create(n.words.slice(r),4*e);return n.sigBytes=4*r,y.create({key:n,iv:s,salt:i})}},m=i.PasswordBasedCipher=w.extend({cfg:w.cfg.extend({kdf:S}),encrypt:function(t,r,e,i){i=this.cfg.extend(i);var n=i.kdf.execute(e,t.keySize,t.ivSize);i.iv=n.iv;var o=w.encrypt.call(this,t,r,n.key,i);return o.mixIn(n),o},decrypt:function(t,r,e,i){i=this.cfg.extend(i),r=this._parse(r,i.format);var n=i.kdf.execute(e,t.keySize,t.ivSize,r.salt);i.iv=n.iv;var o=w.decrypt.call(this,t,r,n.key,i);return o}})}(),t.mode.CFB=function(){function r(t,r,e,i){var n=this._iv;if(n){var o=n.slice(0);this._iv=void 0}else var o=this._prevBlock;i.encryptBlock(o,0);for(var s=0;s>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso10126={pad:function(r,e){var i=4*e,n=i-r.sigBytes%i;r.concat(t.lib.WordArray.random(n-1)).concat(t.lib.WordArray.create([n<<24],1))},unpad:function(t){var r=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=r}},t.pad.Iso97971={pad:function(r,e){r.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(r,e)},unpad:function(r){t.pad.ZeroPadding.unpad(r),r.sigBytes--}},t.mode.OFB=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),e.encryptBlock(o,0);for(var s=0;s>>8^255&n^99,o[e]=n,s[n]=e;var p=t[e],_=t[p],y=t[_],g=257*t[n]^16843008*n;a[e]=g<<24|g>>>8,c[e]=g<<16|g>>>16,h[e]=g<<8|g>>>24,l[e]=g;var g=16843009*y^65537*_^257*p^16843008*e;f[n]=g<<24|g>>>8,u[n]=g<<16|g>>>16,d[n]=g<<8|g>>>24,v[n]=g,e?(e=p^t[t[t[y^p]]],i^=t[t[i]]):e=i=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=i.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,r=t.words,e=t.sigBytes/4,i=this._nRounds=e+6,n=4*(i+1),s=this._keySchedule=[],a=0;a6&&a%e==4&&(c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c]):(c=c<<8|c>>>24,c=o[c>>>24]<<24|o[c>>>16&255]<<16|o[c>>>8&255]<<8|o[255&c],c^=p[a/e|0]<<24),s[a]=s[a-e]^c}for(var h=this._invKeySchedule=[],l=0;l>>24]]^u[o[c>>>16&255]]^d[o[c>>>8&255]]^v[o[255&c]]}}},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._keySchedule,a,c,h,l,o)},decryptBlock:function(t,r){var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e,this._doCryptBlock(t,r,this._invKeySchedule,f,u,d,v,s);var e=t[r+1];t[r+1]=t[r+3],t[r+3]=e},_doCryptBlock:function(t,r,e,i,n,o,s,a){for(var c=this._nRounds,h=t[r]^e[0],l=t[r+1]^e[1],f=t[r+2]^e[2],u=t[r+3]^e[3],d=4,v=1;v>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&u]^e[d++],_=i[l>>>24]^n[f>>>16&255]^o[u>>>8&255]^s[255&h]^e[d++],y=i[f>>>24]^n[u>>>16&255]^o[h>>>8&255]^s[255&l]^e[d++],g=i[u>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^e[d++];h=p,l=_,f=y,u=g}var p=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[f>>>8&255]<<8|a[255&u])^e[d++],_=(a[l>>>24]<<24|a[f>>>16&255]<<16|a[u>>>8&255]<<8|a[255&h])^e[d++],y=(a[f>>>24]<<24|a[u>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^e[d++],g=(a[u>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&f])^e[d++];t[r]=p,t[r+1]=_,t[r+2]=y,t[r+3]=g},keySize:8});r.AES=i._createHelper(_)}(),function(){function r(t,r){var e=(this._lBlock>>>t^this._rBlock)&r;this._rBlock^=e,this._lBlock^=e<>>t^this._lBlock)&r;this._lBlock^=e,this._rBlock^=e<>>5]>>>31-n%32&1}for(var o=this._subKeys=[],s=0;s<16;s++){for(var a=o[s]=[],f=l[s],i=0;i<24;i++)a[i/6|0]|=e[(h[i]-1+f)%28]<<31-i%6,a[4+(i/6|0)]|=e[28+(h[i+24]-1+f)%28]<<31-i%6;a[0]=a[0]<<1|a[0]>>>31;for(var i=1;i<7;i++)a[i]=a[i]>>>4*(i-1)+3;a[7]=a[7]<<5|a[7]>>>27}for(var u=this._invSubKeys=[],i=0;i<16;i++)u[i]=o[15-i]},encryptBlock:function(t,r){this._doCryptBlock(t,r,this._subKeys)},decryptBlock:function(t,r){this._doCryptBlock(t,r,this._invSubKeys)},_doCryptBlock:function(t,i,n){this._lBlock=t[i],this._rBlock=t[i+1],r.call(this,4,252645135),r.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),r.call(this,1,1431655765);for(var o=0;o<16;o++){for(var s=n[o],a=this._lBlock,c=this._rBlock,h=0,l=0;l<8;l++)h|=f[l][((c^s[l])&u[l])>>>0];this._lBlock=c,this._rBlock=a^h}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,r.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),t[i]=this._lBlock,t[i+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});i.DES=s._createHelper(d);var v=a.TripleDES=s.extend({_doReset:function(){var t=this._key,r=t.words;this._des1=d.createEncryptor(o.create(r.slice(0,2))),this._des2=d.createEncryptor(o.create(r.slice(2,4))),this._des3=d.createEncryptor(o.create(r.slice(4,6)))},encryptBlock:function(t,r){this._des1.encryptBlock(t,r),this._des2.decryptBlock(t,r),this._des3.encryptBlock(t,r)},decryptBlock:function(t,r){this._des3.decryptBlock(t,r),this._des2.encryptBlock(t,r),this._des1.decryptBlock(t,r)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=s._createHelper(v)}(),function(){function r(){for(var t=this._S,r=this._i,e=this._j,i=0,n=0;n<4;n++){r=(r+1)%256,e=(e+t[r])%256;var o=t[r];t[r]=t[e],t[e]=o,i|=t[(t[r]+t[e])%256]<<24-8*n}return this._i=r,this._j=e,i}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=o.RC4=n.extend({_doReset:function(){for(var t=this._key,r=t.words,e=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;for(var n=0,o=0;n<256;n++){var s=n%e,a=r[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+a)%256;var c=i[n];i[n]=i[o],i[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=r.call(this)},keySize:8,ivSize:0});e.RC4=n._createHelper(s);var a=o.RC4Drop=s.extend({cfg:s.cfg.extend({drop:192}),_doReset:function(){s._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)r.call(this)}});e.RC4Drop=n._createHelper(a)}(),t.mode.CTRGladman=function(){function r(t){if(255===(t>>24&255)){var r=t>>16&255,e=t>>8&255,i=255&t;255===r?(r=0,255===e?(e=0,255===i?i=0:++i):++e):++r,t=0,t+=r<<16,t+=e<<8,t+=i}else t+=1<<24;return t}function e(t){return 0===(t[0]=r(t[0]))&&(t[1]=r(t[1])),t}var i=t.lib.BlockCipherMode.extend(),n=i.Encryptor=i.extend({processBlock:function(t,r){var i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),e(s);var a=s.slice(0);i.encryptBlock(a,0);for(var c=0;c>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.Rabbit=n.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,i=0;i<4;i++)t[i]=16711935&(t[i]<<8|t[i]>>>24)|4278255360&(t[i]<<24|t[i]>>>8);var n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)r.call(this);for(var i=0;i<8;i++)o[i]^=n[i+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;o[0]^=h,o[1]^=f,o[2]^=l,o[3]^=u,o[4]^=h,o[5]^=f,o[6]^=l,o[7]^=u;for(var i=0;i<4;i++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.Rabbit=n._createHelper(h)}(),t.mode.CTR=function(){var r=t.lib.BlockCipherMode.extend(),e=r.Encryptor=r.extend({processBlock:function(t,r){var e=this._cipher,i=e.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);e.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var a=0;a>>0>>0?1:0)|0,r[2]=r[2]+886263092+(r[1]>>>0>>0?1:0)|0,r[3]=r[3]+1295307597+(r[2]>>>0>>0?1:0)|0,r[4]=r[4]+3545052371+(r[3]>>>0>>0?1:0)|0,r[5]=r[5]+886263092+(r[4]>>>0>>0?1:0)|0,r[6]=r[6]+1295307597+(r[5]>>>0>>0?1:0)|0,r[7]=r[7]+3545052371+(r[6]>>>0>>0?1:0)|0,this._b=r[7]>>>0>>0?1:0;for(var e=0;e<8;e++){var i=t[e]+r[e],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,h=((4294901760&i)*i|0)+((65535&i)*i|0);c[e]=s^h}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var e=t,i=e.lib,n=i.StreamCipher,o=e.algo,s=[],a=[],c=[],h=o.RabbitLegacy=n.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var o=0;o<4;o++)r.call(this);for(var o=0;o<8;o++)n[o]^=i[o+4&7];if(e){var s=e.words,a=s[0],c=s[1],h=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=h>>>16|4294901760&l,u=l<<16|65535&h;n[0]^=h,n[1]^=f,n[2]^=l,n[3]^=u,n[4]^=h,n[5]^=f,n[6]^=l,n[7]^=u;for(var o=0;o<4;o++)r.call(this)}},_doProcessBlock:function(t,e){var i=this._X;r.call(this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),t[e+n]^=s[n]},blockSize:4,ivSize:2});e.RabbitLegacy=n._createHelper(h)}(),t.pad.ZeroPadding={pad:function(t,r){var e=4*r;t.clamp(),t.sigBytes+=e-(t.sigBytes%e||e)},unpad:function(t){for(var r=t.words,e=t.sigBytes-1;!(r[e>>>2]>>>24-e%4*8&255);)e--;t.sigBytes=e+1}},t});\n//# sourceMappingURL=crypto-js.min.js.map"]} \ No newline at end of file diff --git a/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js b/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js new file mode 100644 index 0000000..58a656f --- /dev/null +++ b/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js @@ -0,0 +1,186 @@ +"use strict"; +cc._RF.push(module, 'e74a999IDFOabyymZgXQIiy', 'RankManager'); +// Script/RankManager.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var List_1 = require("./module/RankList/List"); +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +//排行榜 +var RankManager = /** @class */ (function (_super) { + __extends(RankManager, _super); + function RankManager() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.Player = null; + _this.selfNode = null; + _this.phone = null; + return _this; + } + RankManager.prototype.onLoad = function () { + this.init(); + }; + //初始化数据 + RankManager.prototype.init = function () { + this.rankList = cc.find("ScrollView", this.node).getComponent(List_1.default); + this.Player.getChildByName("rank").active = false; + this.listData = []; + this.selfData = null; + this.rankNumber = 100; + this.rankTotal = 100; + this.selfNode.opacity = 0; + this.fit(); + }; + RankManager.prototype.start = function () { + this.Player.active = false; + this.getRank(); + }; + RankManager.prototype.fit = function () { + var jg = cc.fx.GameTool.setFit(); + if (!jg) { + this.node.getChildByName("ScrollView").getChildByName("view").height = 800; + } + }; + //调用获取排行榜接口 + RankManager.prototype.getRank = function () { + var _this = this; + var dataFile = { + length: 100 + }; + cc.fx.GameTool.getRank(dataFile, function (data) { return _this.getRankData(data); }); + }; + //实际设置排行数据 + RankManager.prototype.getRankData = function (data) { + if (data) { + //console.log(data); + cc.fx.GameTool.getRankData(data, this, 6); + this.setPic(this.selfData.pic); + } + }; + //返回按钮 + RankManager.prototype.backClick = function () { + cc.director.loadScene("LoadScene"); + }; + //最上方用户动画 + RankManager.prototype.playerAction = function () { + var _this = this; + //-254 377 210 453 + this.Player.getChildByName("rank").active = false; + var time = 1; + this.tween = cc.tween(this.Player) + .to(2, { position: cc.v3(232, 446, 0) }) + .call(function () { + _this.Player.getChildByName("rank").active = true; + _this.Player.getChildByName("rank").getChildByName("number") + .getComponent(cc.Label).string = parseInt(time * 100 + "") + "%"; + }) + .start(); + if (this.listData.length > 0) { + time = (this.listData.length - this.rankNumber) / this.listData.length; + } + if (this.listData.length > 0) { + if (this.listData.length >= 99) { + if (this.rankNumber >= 99) { + time = (Math.random() * 49 + 1) / 100; + } + else + time = (this.listData.length - this.rankNumber) / this.listData.length; + } + else { + if (this.rankNumber > 99) { + time = 0; + } + else + time = (this.listData.length - this.rankNumber) / this.listData.length; + } + } + else { + time = 0; + } + setTimeout(function () { + if (_this.tween) + _this.tween.stop(); + _this.Player.getChildByName("rank").active = true; + _this.Player.getChildByName("rank").getChildByName("number") + .getComponent(cc.Label).string = parseInt(time * 100 + "") + "%"; + }, time * 2000); + }; + //设置头像 处理的逻辑比较多,不用公共类的了 + RankManager.prototype.setPic = function (pic) { + var _this = this; + this.phone.node.parent.getChildByName("icon").active = false; + this.phone.node.active = false; + this.Player.active = true; + this.Player.opacity = 0; + this.Player.getChildByName("mask").getChildByName("icon").active = false; + this.Player.getChildByName("mask").getChildByName("phone").active = false; + fetch(pic) + .then(function (response) { + return response.headers.get('Content-Length'); + }) + .then(function (errNo) { + if (errNo == "5093") { + _this.phone.node.parent.getChildByName("icon").active = true; + _this.Player.getChildByName("mask").getChildByName("icon").active = true; + } + }) + .catch(function (error) { + // console.error('Error fetching X-Info:', error); + }); + var self = this; + cc.assetManager.loadRemote(pic, { ext: '.png' }, function (err, texture) { + self.Player.opacity = 255; + if (texture) { + self.phone.node.active = true; + self.phone.spriteFrame = new cc.SpriteFrame(texture); + self.Player.getChildByName("mask").getChildByName("icon").active = false; + self.Player.getChildByName("mask").getChildByName("phone").active = true; + self.Player.getChildByName("mask").getChildByName("phone").getComponent(cc.Sprite) + .spriteFrame = new cc.SpriteFrame(texture); + setTimeout(function () { + self.playerAction(); + }, 500); + } + else { + self.Player.getChildByName("mask").getChildByName("icon").active = true; + setTimeout(function () { + self.playerAction(); + }, 500); + } + }); + }; + __decorate([ + property(cc.Node) //用户上方头像 + ], RankManager.prototype, "Player", void 0); + __decorate([ + property(cc.Node) //用户最下方个人信息 + ], RankManager.prototype, "selfNode", void 0); + __decorate([ + property(cc.Sprite) //用户头像换图 + ], RankManager.prototype, "phone", void 0); + RankManager = __decorate([ + ccclass + ], RankManager); + return RankManager; +}(cc.Component)); +exports.default = RankManager; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js.map b/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js.map new file mode 100644 index 0000000..368e332 --- /dev/null +++ b/library/imports/e7/e74a9f7d-2031-4e69-bcb2-9998174088b2.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\RankManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA0C;AACpC,IAAA,KAAwB,EAAE,CAAC,UAAU,EAAnC,OAAO,aAAA,EAAE,QAAQ,cAAkB,CAAC;AAC5C,KAAK;AAEL;IAAyC,+BAAY;IAArD;QAAA,qEAoJC;QAlJG,YAAM,GAAY,IAAI,CAAC;QAEvB,cAAQ,GAAY,IAAI,CAAC;QAEzB,WAAK,GAAc,IAAI,CAAC;;IA8I5B,CAAC;IAtIG,4BAAM,GAAN;QACI,IAAI,CAAC,IAAI,EAAE,CAAC;IAChB,CAAC;IACD,OAAO;IACP,0BAAI,GAAJ;QACI,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,cAAI,CAAC,CAAC;QACpE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,I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c,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;gBACzE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC;qBACjF,WAAW,GAAG,IAAI,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBAC3C,UAAU,CAAC;oBACP,IAAI,CAAC,YAAY,EAAE,CAAC;gBACxB,CAAC,EAAE,GAAG,CAAC,CAAC;aACX;iBACG;gBACA,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC;gBACxE,UAAU,CAAC;oBACP,IAAI,CAAC,YAAY,EAAE,CAAC;gBACxB,CAAC,EAAE,GAAG,CAAC,CAAC;aACX;QAEL,CAAC,CAAC,CAAA;IACN,CAAC;IAhJD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAU,QAAQ;+CACb;IAEvB;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAU,WAAW;iDACd;IAEzB;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAQ,QAAQ;8CACZ;IANP,WAAW;QAD/B,OAAO;OACa,WAAW,CAoJ/B;IAAD,kBAAC;CApJD,AAoJC,CApJwC,EAAE,CAAC,SAAS,GAoJpD;kBApJoB,WAAW","file":"","sourceRoot":"/","sourcesContent":["\r\nimport List from \"./module/RankList/List\";\r\nconst { ccclass, property } = cc._decorator;\r\n//排行榜\r\n@ccclass\r\nexport default class RankManager extends cc.Component {\r\n @property(cc.Node) //用户上方头像\r\n Player: cc.Node = null;\r\n @property(cc.Node) //用户最下方个人信息\r\n selfNode: cc.Node = null;\r\n @property(cc.Sprite) //用户头像换图\r\n phone: cc.Sprite = null;\r\n private rankList: List; //排行榜\r\n tween: cc.Tween; //最上方用户头像动画\r\n listData: any; //总列表信息\r\n selfData: any; //自己信息\r\n rankNumber: number; //用户自己排名 有可能不在排行榜内99+\r\n rankTotal: number; //获取排行榜用户数量 现在为100\r\n\r\n onLoad() {\r\n this.init();\r\n }\r\n //初始化数据\r\n init(){\r\n this.rankList = cc.find(\"ScrollView\", this.node).getComponent(List);\r\n this.Player.getChildByName(\"rank\").active = false;\r\n this.listData = [];\r\n this.selfData = null;\r\n this.rankNumber = 100;\r\n this.rankTotal= 100;\r\n this.selfNode.opacity = 0;\r\n this.fit();\r\n }\r\n\r\n start() {\r\n this.Player.active = false;\r\n this.getRank();\r\n }\r\n\r\n fit(){\r\n var jg = cc.fx.GameTool.setFit();\r\n if(!jg){\r\n this.node.getChildByName(\"ScrollView\").getChildByName(\"view\").height = 800;\r\n }\r\n }\r\n\r\n //调用获取排行榜接口\r\n getRank(){\r\n let dataFile = {\r\n length:100\r\n }\r\n cc.fx.GameTool.getRank(dataFile,data =>this.getRankData(data));\r\n }\r\n //实际设置排行数据\r\n getRankData(data){\r\n if(data){\r\n //console.log(data);\r\n cc.fx.GameTool.getRankData(data,this,6);\r\n this.setPic(this.selfData.pic);\r\n }\r\n }\r\n //返回按钮\r\n backClick(){\r\n cc.director.loadScene(\"LoadScene\");\r\n }\r\n //最上方用户动画\r\n playerAction(){\r\n //-254 377 210 453\r\n this.Player.getChildByName(\"rank\").active = false;\r\n let time = 1;\r\n this.tween = cc.tween(this.Player)\r\n .to(2,{position:cc.v3(232,446,0)})\r\n .call(() =>{\r\n this.Player.getChildByName(\"rank\").active = true;\r\n this.Player.getChildByName(\"rank\").getChildByName(\"number\")\r\n .getComponent(cc.Label).string = parseInt(time*100 + \"\") + \"%\";\r\n })\r\n .start();\r\n if(this.listData.length > 0){\r\n time = (this.listData.length - this.rankNumber)/this.listData.length;\r\n }\r\n\r\n if(this.listData.length > 0){\r\n if(this.listData.length >= 99){\r\n if(this.rankNumber >= 99){\r\n time = (Math.random()*49+1)/100\r\n }\r\n else time = (this.listData.length - this.rankNumber)/this.listData.length;\r\n }\r\n else{\r\n if(this.rankNumber > 99){\r\n time = 0\r\n }\r\n else time = (this.listData.length - this.rankNumber)/this.listData.length;\r\n }\r\n }\r\n else{\r\n time = 0;\r\n }\r\n\r\n setTimeout(() => {\r\n if(this.tween)this.tween.stop();\r\n this.Player.getChildByName(\"rank\").active = true;\r\n this.Player.getChildByName(\"rank\").getChildByName(\"number\")\r\n .getComponent(cc.Label).string = parseInt(time*100 + \"\") + \"%\";\r\n }, time*2000);\r\n\r\n }\r\n //设置头像 处理的逻辑比较多,不用公共类的了\r\n public setPic(pic){\r\n this.phone.node.parent.getChildByName(\"icon\").active = false;\r\n this.phone.node.active = false;\r\n this.Player.active = true;\r\n this.Player.opacity = 0;\r\n this.Player.getChildByName(\"mask\").getChildByName(\"icon\").active = false;\r\n this.Player.getChildByName(\"mask\").getChildByName(\"phone\").active = false;\r\n fetch(pic)\r\n .then(response => {\r\n return response.headers.get('Content-Length');\r\n })\r\n .then(errNo => {\r\n if(errNo == \"5093\"){\r\n this.phone.node.parent.getChildByName(\"icon\").active = true;\r\n this.Player.getChildByName(\"mask\").getChildByName(\"icon\").active = true;\r\n }\r\n })\r\n .catch(error => {\r\n // console.error('Error fetching X-Info:', error);\r\n });\r\n var self = this;\r\n cc.assetManager.loadRemote(pic, {ext:'.png'},(err, texture:cc.Texture2D) => {\r\n self.Player.opacity = 255;\r\n if(texture){\r\n self.phone.node.active = true;\r\n self.phone.spriteFrame = new cc.SpriteFrame(texture);\r\n self.Player.getChildByName(\"mask\").getChildByName(\"icon\").active = false;\r\n self.Player.getChildByName(\"mask\").getChildByName(\"phone\").active = true;\r\n self.Player.getChildByName(\"mask\").getChildByName(\"phone\").getComponent(cc.Sprite)\r\n .spriteFrame = new cc.SpriteFrame(texture);\r\n setTimeout(() => {\r\n self.playerAction();\r\n }, 500);\r\n }\r\n else{\r\n self.Player.getChildByName(\"mask\").getChildByName(\"icon\").active = true;\r\n setTimeout(() => {\r\n self.playerAction();\r\n }, 500);\r\n }\r\n \r\n })\r\n }\r\n\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/e7/e7aba14b-f956-4480-b254-8d57832e273f.json b/library/imports/e7/e7aba14b-f956-4480-b254-8d57832e273f.json new file mode 100644 index 0000000..4bcfaf0 --- /dev/null +++ b/library/imports/e7/e7aba14b-f956-4480-b254-8d57832e273f.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_radio_button_off", + "texture": "567dcd80-8bf4-4535-8a5a-313f1caf078a", + "atlas": "", + "rect": [ + 3, + 3, + 26, + 26 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 32, + 32 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.json b/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.png b/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.png new file mode 100644 index 0000000..dff9999 Binary files /dev/null and b/library/imports/e8/e851e89b-faa2-4484-bea6-5c01dd9f06e2.png differ diff --git a/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js b/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js new file mode 100644 index 0000000..1dc8e4f --- /dev/null +++ b/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js @@ -0,0 +1,47 @@ +"use strict"; +cc._RF.push(module, 'e8b235WjRBErajwLmN8xFUz', 'GameScene'); +// Script/GameScene.js + +// cc.Class({ +// extends: cc.Component, +// properties: { +// localTest: { +// default: false, +// tooltip: '本地测试时勾选,避免tz_url和Configure报错,提交前勾掉' +// }, +// clientTest: { +// default: false, +// tooltip: '客户端测试时勾选,展示版本标记方便测试区分,上线前勾掉' +// }, +// clientTestVersion: { +// default: '', +// tooltip: '版本标记' +// }, +// testVersion: cc.Label, +// score: cc.Label, +// double_hit: cc.Node, +// add: cc.Node, +// add2: cc.Node, +// double_title: cc.Node, +// count_time: cc.Node, +// beginNode: cc.Node, +// ball_nomal: [cc.SpriteFrame], +// bg_nomal: [cc.SpriteFrame], +// ball_light: [cc.SpriteFrame], +// kuang_Frame: [cc.SpriteFrame], +// daojishi: cc.Label, +// pause_anniu: cc.Sprite, +// mask: cc.Node, +// flashUI: { +// default: null, +// type: cc.SpriteAtlas +// }, +// }, +// onLoad() { +// }, +// update(dt) { +// }, +// }); +"use strict"; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js.map b/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js.map new file mode 100644 index 0000000..7b1d114 --- /dev/null +++ b/library/imports/e8/e8b23e56-8d10-44ad-a8f0-2e637cc45533.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\GameScene.js"],"names":[],"mappings":";;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAGA;AAEA;AAEA;AAEA","sourceRoot":"/","sourcesContent":["\r\n// cc.Class({\r\n// extends: cc.Component,\r\n// properties: {\r\n// localTest: {\r\n// default: false,\r\n// tooltip: '本地测试时勾选,避免tz_url和Configure报错,提交前勾掉'\r\n// },\r\n// clientTest: {\r\n// default: false,\r\n// tooltip: '客户端测试时勾选,展示版本标记方便测试区分,上线前勾掉'\r\n// },\r\n// clientTestVersion: {\r\n// default: '',\r\n// tooltip: '版本标记'\r\n// },\r\n// testVersion: cc.Label,\r\n// score: cc.Label,\r\n// double_hit: cc.Node,\r\n// add: cc.Node,\r\n// add2: cc.Node,\r\n// double_title: cc.Node,\r\n// count_time: cc.Node,\r\n// beginNode: cc.Node,\r\n// ball_nomal: [cc.SpriteFrame],\r\n// bg_nomal: [cc.SpriteFrame],\r\n// ball_light: [cc.SpriteFrame],\r\n// kuang_Frame: [cc.SpriteFrame],\r\n// daojishi: cc.Label,\r\n// pause_anniu: cc.Sprite,\r\n// mask: cc.Node,\r\n\r\n// flashUI: {\r\n// default: null,\r\n// type: cc.SpriteAtlas\r\n// },\r\n// },\r\n\r\n// onLoad() {\r\n\r\n\r\n// },\r\n\r\n// update(dt) {\r\n\r\n// },\r\n\r\n// });"]} \ No newline at end of file diff --git a/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.bin b/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.bin new file mode 100644 index 0000000..2a87dd2 Binary files /dev/null and b/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.bin differ diff --git a/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.json b/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.json new file mode 100644 index 0000000..e12424b --- /dev/null +++ b/library/imports/e9/e93d3fa9-8c21-4375-8a21-14ba84066c77.json @@ -0,0 +1,90 @@ +[ + { + "__type__": "cc.Mesh", + "_name": "", + "_objFlags": 0, + "_native": ".bin", + "_vertexBundles": [ + { + "__id__": 1 + } + ], + "_primitives": [ + { + "__id__": 6 + } + ], + "_minPos": { + "__type__": "cc.Vec3", + "x": -0.5, + "y": -0.5, + "z": 0 + }, + "_maxPos": { + "__type__": "cc.Vec3", + "x": 0.5, + "y": 0.5, + "z": 0 + } + }, + { + "__type__": "cc.mesh.VertexBundle", + "data": { + "__id__": 2 + }, + "formats": [ + { + "__id__": 3 + }, + { + "__id__": 4 + }, + { + "__id__": 5 + } + ], + "verticesCount": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 0, + "length": 128 + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_normal", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_position", + "type": 5126, + "num": 3, + "normalize": false + }, + { + "__type__": "cc.mesh.VertexFormat", + "name": "a_uv0", + "type": 5126, + "num": 2, + "normalize": false + }, + { + "__type__": "cc.mesh.Primitive", + "vertexBundleIndices": [ + 0 + ], + "data": { + "__id__": 7 + }, + "indexUnit": 5123, + "topology": 4 + }, + { + "__type__": "cc.BufferRange", + "offset": 128, + "length": 12 + } +] \ No newline at end of file diff --git a/library/imports/e9/e9602a96-91d1-4a65-98a8-f81745ace7f0.json b/library/imports/e9/e9602a96-91d1-4a65-98a8-f81745ace7f0.json new file mode 100644 index 0000000..7234322 --- /dev/null +++ b/library/imports/e9/e9602a96-91d1-4a65-98a8-f81745ace7f0.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "btn_nomal", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1077, + 377, + 501, + 85 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 501, + 85 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.json b/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.json new file mode 100644 index 0000000..88abb11 --- /dev/null +++ b/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "dazao_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.48898, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.mp3 b/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.mp3 new file mode 100644 index 0000000..e6b4585 Binary files /dev/null and b/library/imports/e9/e97e82df-44e2-4294-89fb-dadbf44bf622.mp3 differ diff --git a/library/imports/e9/e9ec654c-97a2-4787-9325-e6a10375219a.json b/library/imports/e9/e9ec654c-97a2-4787-9325-e6a10375219a.json new file mode 100644 index 0000000..487e43d --- /dev/null +++ b/library/imports/e9/e9ec654c-97a2-4787-9325-e6a10375219a.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_btn_pressed", + "texture": "b43ff3c2-02bb-4874-81f7-f2dea6970f18", + "atlas": "", + "rect": [ + 0, + 0, + 40, + 40 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 12, + 12, + 12, + 12 + ] + } +} \ No newline at end of file diff --git a/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.json b/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.json new file mode 100644 index 0000000..6455620 --- /dev/null +++ b/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "moli_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.515102, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.mp3 b/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.mp3 new file mode 100644 index 0000000..5010b1f Binary files /dev/null and b/library/imports/eb/ebf27f93-6c3b-44cd-b228-944b77435936.mp3 differ diff --git a/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.json b/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.png b/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.png new file mode 100644 index 0000000..15e5b27 Binary files /dev/null and b/library/imports/eb/ebfe6e6f-f068-4227-bfd8-16f834e7203f.png differ diff --git a/library/imports/ec/ec907644-5798-4db7-bbaa-3aeacc2150f4.json b/library/imports/ec/ec907644-5798-4db7-bbaa-3aeacc2150f4.json new file mode 100644 index 0000000..48b1f53 --- /dev/null +++ b/library/imports/ec/ec907644-5798-4db7-bbaa-3aeacc2150f4.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "yes2", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1334, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ec/eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432.json b/library/imports/ec/eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432.json new file mode 100644 index 0000000..dfa75fc --- /dev/null +++ b/library/imports/ec/eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432.json @@ -0,0 +1,16 @@ +{ + "__type__": "cc.Material", + "_name": "builtin-2d-sprite", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "2874f8dd-416c-4440-81b7-555975426e93" + }, + "_techniqueData": { + "0": { + "defines": { + "USE_TEXTURE": true + } + } + } +} \ No newline at end of file diff --git a/library/imports/ec/ecd8b796-cf3d-45e6-ab5d-99906ff68426.json b/library/imports/ec/ecd8b796-cf3d-45e6-ab5d-99906ff68426.json new file mode 100644 index 0000000..11eb129 --- /dev/null +++ b/library/imports/ec/ecd8b796-cf3d-45e6-ab5d-99906ff68426.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "finishi", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1077, + 1, + 552, + 204 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 552, + 204 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ed/ed354adc-1faf-4daa-b3de-776c0499090a.json b/library/imports/ed/ed354adc-1faf-4daa-b3de-776c0499090a.json new file mode 100644 index 0000000..1098eca --- /dev/null +++ b/library/imports/ed/ed354adc-1faf-4daa-b3de-776c0499090a.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "rankBtn", + "texture": "9a849051-bf1c-4d07-aaef-0994c636ed81", + "atlas": "", + "rect": [ + 0, + 0, + 126, + 140 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 126, + 140 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ed/ed566dcb-65eb-4702-8583-1bec1208b40d.json b/library/imports/ed/ed566dcb-65eb-4702-8583-1bec1208b40d.json new file mode 100644 index 0000000..faa99d7 --- /dev/null +++ b/library/imports/ed/ed566dcb-65eb-4702-8583-1bec1208b40d.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "yes3", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 1374, + 638, + 235, + 38 + ], + "offset": [ + -1, + 1 + ], + "originalSize": [ + 501, + 70 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ed/ed88f13d-fcad-4848-aa35-65a2cb973584.json b/library/imports/ed/ed88f13d-fcad-4848-aa35-65a2cb973584.json new file mode 100644 index 0000000..4c141df --- /dev/null +++ b/library/imports/ed/ed88f13d-fcad-4848-aa35-65a2cb973584.json @@ -0,0 +1,512 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "3d-stage", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "New 3D Stage", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + }, + { + "__id__": 11 + } + ], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 14 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Node", + "_name": "3D Camera", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 3 + } + ], + "_prefab": { + "__id__": 4 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 10, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 6, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": 0, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 1024, + "_ortho": false, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": false, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ed88f13d-fcad-4848-aa35-65a2cb973584" + }, + "fileId": "09OTSCM6BL1LhNz6/uluXk", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Directional Light", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + } + ], + "_prefab": { + "__id__": 7 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + -0.25881904510252074, + 0, + 0, + 0.9659258262890683, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": -30, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_type": 0, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 1, + "_range": 1000, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ed88f13d-fcad-4848-aa35-65a2cb973584" + }, + "fileId": "3a6x6Es1NL4rpUC3Efs1MH", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Ambient Light", + "_objFlags": 512, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + } + ], + "_prefab": { + "__id__": 10 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_type": 3, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 0.25, + "_range": 1, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ed88f13d-fcad-4848-aa35-65a2cb973584" + }, + "fileId": "77dtDtUX9D6KSMMqNy4utl", + "sync": false + }, + { + "__type__": "cc.Node", + "_name": "New Box", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 12 + } + ], + "_prefab": { + "__id__": 13 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 11 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "046f172c-1574-488b-bbb8-6415a9adb96d" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ed88f13d-fcad-4848-aa35-65a2cb973584" + }, + "fileId": "53C6mOUF5FXpk7lkLCsXQc", + "sync": false + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "ed88f13d-fcad-4848-aa35-65a2cb973584" + }, + "fileId": "38R8VzTKlGM4vBvAyA2GaF", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.json b/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.png b/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.png new file mode 100644 index 0000000..ec12e51 Binary files /dev/null and b/library/imports/ed/edd215b9-2796-4a05-aaf5-81f96c9281ce.png differ diff --git a/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.json b/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.png b/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.png new file mode 100644 index 0000000..b714bd2 Binary files /dev/null and b/library/imports/ee/ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944.png differ diff --git a/library/imports/ee/eef1f6ad-ae7d-4f74-ab87-cd4c81dea072.json b/library/imports/ee/eef1f6ad-ae7d-4f74-ab87-cd4c81dea072.json new file mode 100644 index 0000000..cb86a37 --- /dev/null +++ b/library/imports/ee/eef1f6ad-ae7d-4f74-ab87-cd4c81dea072.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "fire2", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 846, + 810, + 104, + 62 + ], + "offset": [ + -1, + -14 + ], + "originalSize": [ + 152, + 90 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ef/ef1ad44d-51f9-416e-9fc4-9c35dee52cf3.json b/library/imports/ef/ef1ad44d-51f9-416e-9fc4-9c35dee52cf3.json new file mode 100644 index 0000000..23ae026 --- /dev/null +++ b/library/imports/ef/ef1ad44d-51f9-416e-9fc4-9c35dee52cf3.json @@ -0,0 +1,131 @@ +{ + "__type__": "cc.SpriteAtlas", + "_name": "publicUI.plist", + "_objFlags": 0, + "_native": "", + "_spriteFrames": { + "Clock": { + "__uuid__": "f2d1c16a-0e6b-4120-bfaf-01ce720b2756" + }, + "Firewood": { + "__uuid__": "1b4aa157-8271-4bd0-a922-e19f452d86fc" + }, + "againBtn": { + "__uuid__": "9b794c5b-0c52-4264-a891-fe6a85f8cebd" + }, + "again_Label": { + "__uuid__": "75ceffef-e469-4845-80bd-e0052840d248" + }, + "back": { + "__uuid__": "43c83a99-6be0-468f-a894-1b624f3d33ac" + }, + "ball0": { + "__uuid__": "09f3b49a-507f-485e-b8bf-809f98dd4923" + }, + "beginLabel": { + "__uuid__": "04421a0b-266e-4d13-81df-1873ef3c4a83" + }, + "btn_begin": { + "__uuid__": "57e85453-6997-4242-babb-705697538e98" + }, + "btn_err": { + "__uuid__": "a390474d-52da-4752-9fb1-ca5cd89c3f65" + }, + "btn_nomal": { + "__uuid__": "e9602a96-91d1-4a65-98a8-f81745ace7f0" + }, + "btn_tip": { + "__uuid__": "9227615d-1b3f-416c-884d-e33612d57b2e" + }, + "btn_yes": { + "__uuid__": "69127bde-cd60-4ff4-861e-6ea16ccb72d3" + }, + "err1": { + "__uuid__": "70dfad15-0bc8-45a9-93ef-62dae7fc8c12" + }, + "err2": { + "__uuid__": "384ed9a2-ff39-41fd-a3dd-0df283e2e159" + }, + "err3": { + "__uuid__": "6e0248f6-ea55-4252-beaa-62736bc53ad7" + }, + "finishi": { + "__uuid__": "ecd8b796-cf3d-45e6-ab5d-99906ff68426" + }, + "finishi_Bg": { + "__uuid__": "0a9b51e5-23bb-4902-bd02-0b3f91e60173" + }, + "fire1": { + "__uuid__": "419712bd-00e6-4352-97bc-105ab199d852" + }, + "fire2": { + "__uuid__": "eef1f6ad-ae7d-4f74-ab87-cd4c81dea072" + }, + "fire3": { + "__uuid__": "6999b621-4a9f-4a89-970f-4f6637f6ebe1" + }, + "fire4": { + "__uuid__": "24bb96d6-d160-419c-89a8-8f1a1e203491" + }, + "fire5": { + "__uuid__": "5fead804-1827-4c8d-9b89-c09849aeed4e" + }, + "fire6": { + "__uuid__": "e363a676-9b52-4402-b43a-37062f24c250" + }, + "fire7": { + "__uuid__": "a67083f3-132b-4dc7-963c-af204012cd97" + }, + "fire8": { + "__uuid__": "5256d2df-6e2d-4cac-9ac7-bd33add06053" + }, + "fire_Bg": { + "__uuid__": "15c8df95-b7df-427c-b48c-57c1392d9e84" + }, + "guang": { + "__uuid__": "7b0b1d20-5a1d-4723-8af8-50a47e841643" + }, + "needle": { + "__uuid__": "8cf947ea-88e6-4326-a79d-4534335f4e32" + }, + "nomal1": { + "__uuid__": "b0746a9d-0822-49dd-8cf8-45afc1ee4652" + }, + "nomal2": { + "__uuid__": "84a58691-6cbc-439b-8d29-46ae91fd4da3" + }, + "nomal3": { + "__uuid__": "ba9907a5-b5ce-44c1-b93b-73fd9fed5ddb" + }, + "play_test": { + "__uuid__": "ffa5a081-5040-487c-a153-4742d21bac1a" + }, + "rankBtn": { + "__uuid__": "793be74f-dab6-4d93-a264-bb3fe5aae57c" + }, + "rankBtn2": { + "__uuid__": "5bb2b601-5166-425e-899d-d3a9b9663c04" + }, + "rank_Label": { + "__uuid__": "4d3e4edd-f44e-4e1a-8648-d173f746eea8" + }, + "tipKuang": { + "__uuid__": "5797ba40-0232-4eca-8729-719373e39e8c" + }, + "tip_Line": { + "__uuid__": "898c2010-408b-4389-8788-f8a7c4d9c4a1" + }, + "voice": { + "__uuid__": "794756c4-eeac-4a24-a412-4035d0719970" + }, + "yes1": { + "__uuid__": "8189af2f-6b70-497a-93a5-994048cb2e09" + }, + "yes2": { + "__uuid__": "ec907644-5798-4db7-bbaa-3aeacc2150f4" + }, + "yes3": { + "__uuid__": "ed566dcb-65eb-4702-8583-1bec1208b40d" + } + } +} \ No newline at end of file diff --git a/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js b/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js new file mode 100644 index 0000000..076e052 --- /dev/null +++ b/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js @@ -0,0 +1,300 @@ +"use strict"; +cc._RF.push(module, 'effe2nlNnBES4H9tFM4r38Z', 'GuideManager'); +// Script/GuideManager.ts + +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// 主游戏控制类 +var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property; +var GuideManager = /** @class */ (function (_super) { + __extends(GuideManager, _super); + function GuideManager() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.Tip = null; + _this.FoodPlist = null; + _this.Btn_New = null; + _this.Btn_Old = null; + _this.Plant = null; + return _this; + } + GuideManager.prototype.onLoad = function () { + this.custom = 1; + }; + GuideManager.prototype.start = function () { + this.fit(); + }; + GuideManager.prototype.fit = function () { + var jg = cc.fx.GameTool.setFit(); + if (!jg) { + } + }; + //初始化数据 + GuideManager.prototype.init = function () { + this.voiceSpriteFrame = this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame; + ""; + this.node.getChildByName("nextBtn").active = false; + var name = cc.fx.GameConfig.GM_INFO.gameId + "_guide"; + if (cc.fx.StorageMessage.getStorage(name) != null) + cc.fx.GameConfig.GM_INFO.guide = cc.fx.StorageMessage.getStorage(name); + if (cc.fx.GameConfig.GM_INFO.guide == false) { + this.node.getChildByName("jumpBtn").active = true; + cc.tween(this.node.getChildByName("jumpBtn")) + .to(0.35, { opacity: 255 }) + .start(); + } + var tip = cc.fx.tipType.tipOne; + var label = this.node.getChildByName("tip1").getComponent(cc.Label); + cc.fx.GameTool.typingAni(label, tip, this.startGame.bind(this), this); + this.initData(); + }; + GuideManager.prototype.initData = function () { + this.customData = [ + { + "item": "putao", + "type": 1, + "right": 1, + }, + { + "item": "taozi", + "type": 2, + "right": 1, + }, + { + "item": "putao", + "type": 2, + "right": 2, + }, + { + "item": "taozi", + "type": 1, + "right": 2, + } + ]; + }; + GuideManager.prototype.passVoice = function () { + var _this = this; + // cc.fx.AudioManager._instance.playMusicGame(); + var voice = this.node.getChildByName("voiceTip"); + voice.getChildByName("startBtn").getComponent(cc.Button).interactable = false; + voice.getChildByName("playBtn").getComponent(cc.Button).interactable = false; + cc.tween(voice) + .to(0.5, { opacity: 0 }) + .call(function () { + voice.active = false; + }) + .start(); + setTimeout(function () { + _this.init(); + }, 1000); + }; + GuideManager.prototype.playVoice = function () { + cc.fx.AudioManager._instance.playEffect("taozi_audio", null); + }; + GuideManager.prototype.jumpClick = function () { + cc.director.loadScene("GameScene"); + }; + GuideManager.prototype.nextClick = function () { + var _this = this; + //第一步 + this.node.getChildByName("nextBtn").active = false; + var label = this.node.getChildByName("tip1").getComponent(cc.Label); + if (this.custom == 0) { + cc.tween(this.node.getChildByName("tip1")) + .to(0.2, { opacity: 0 }) + .call(function () { + label.string = ""; + }) + .to(0.1, { opacity: 255 }) + .call(function () { + var tip = cc.fx.tipType.tipTwo; + cc.fx.GameTool.typingAni(label, tip, _this.startGame.bind(_this), _this); + }) + .start(); + } + else if (this.custom == 1) { + this.node.getChildByName("nextBtn").active = false; + this.node.getChildByName("jumpBtn").active = false; + cc.tween(this.node.getChildByName("tip1")) + .to(0.2, { opacity: 0 }) + .call(function () { + label.string = ""; + _this.nextLevel(); + }) + .start(); + } + this.custom += 1; + }; + GuideManager.prototype.nextLevel = function () { + var _this = this; + this.choice = 0; + this.Btn_Old.active = true; + this.Btn_New.active = true; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + var name = this.customData[this.custom - 2].item; + if (this.customData[this.custom - 2].type == 1) { + this.Plant.getChildByName("name").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name); + name = "prop_" + name; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.FoodPlist["_spriteFrames"][name]; + this.now_Food = name; + cc.tween(this.Plant) + .to(0.2, { opacity: 255 }) + .call(function () { + _this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + _this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + }) + .start(); + } + else { + this.Plant.getChildByName("name").getComponent(cc.Label).string = ""; + this.Plant.getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame; + var audioName = name + "_audio"; + name = "audio" + name; + this.now_Food = name; + cc.fx.AudioManager._instance.playEffect(audioName, null); + cc.tween(this.Plant) + .to(0.2, { opacity: 255 }) + .call(function () { + _this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = true; + _this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = true; + }) + .start(); + } + //关卡+1 + }; + //新植物按钮 + GuideManager.prototype.click_Btn = function (customData, data) { + var _this = this; + //关掉计时器 处理逻辑之前,先行关掉按钮开关 + if (data == "Btn_New") { + this.choice = 1; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + } + else if (data == "Btn_Old") { + this.choice = 2; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + } + var target = this[data]; + var label = this.Tip.getChildByName("content").getComponent(cc.Label); + //正确 + if (this.choice == this.customData[this.custom - 2].right) { + cc.fx.AudioManager._instance.playEffect("yes", null); + this.Tip.stopAllActions(); + this.Tip.active = false; + this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + target.getChildByName("err").active = false; + target.getChildByName("correct").active = true; + setTimeout(function () { + _this.Btn_New.getChildByName("nomal").active = true; + _this.Btn_New.getChildByName("err").active = false; + _this.Btn_New.getChildByName("correct").active = false; + _this.Btn_Old.getChildByName("nomal").active = true; + _this.Btn_Old.getChildByName("err").active = false; + _this.Btn_Old.getChildByName("correct").active = false; + _this.Btn_Old.getChildByName("nomal").getComponent(cc.Button).interactable = false; + _this.Btn_New.getChildByName("nomal").getComponent(cc.Button).interactable = false; + _this.custom += 1; + if (_this.custom >= 6) { + _this.node.getChildByName("againBtn").active = true; + _this.node.getChildByName("startBtn").active = true; + _this.Btn_Old.active = false; + _this.Btn_New.active = false; + cc.fx.GameConfig.GM_INFO.guide = false; + var name = cc.fx.GameConfig.GM_INFO.gameId + "_guide"; + cc.fx.StorageMessage.setStorage(name, cc.fx.GameConfig.GM_INFO.guide); + } + else + _this.nextLevel(); + }, 1000); + } + else { + cc.fx.AudioManager._instance.playEffect("yes", null); + var tipTemp = '葡萄刚才出现过呢'; + this.Tip.active = true; + target.getChildByName("err").active = true; + target.getChildByName("correct").active = false; + switch ((this.custom - 2)) { + case 0: + tipTemp = "这是这局游戏第一次出现葡萄"; + break; + case 1: + tipTemp = "这是这局游戏第一次出现桃子"; + break; + case 2: + tipTemp = '这不是这局游戏第一次出现葡萄'; + break; + case 3: + tipTemp = "这不是这局游戏第一次出现桃子"; + break; + } + label.string = tipTemp; + this.Tip.opacity = 255; + this.Tip.stopAllActions(); + var self = this; + var action = cc.callFunc(function () { + self.Tip.active = false; + }); + this.Tip.runAction(cc.sequence(cc.delayTime(2), cc.fadeIn(0.5), action)); + } + }; + //开始游戏 + GuideManager.prototype.startGame = function () { + this.node.getChildByName("nextBtn").active = true; + cc.tween(this.node.getChildByName("nextBtn")) + .to(0.35, { opacity: 255 }) + .start(); + }; + GuideManager.prototype.againClick = function () { + cc.director.loadScene("GuideScene"); + }; + GuideManager.prototype.onEnable = function () { + // cc.fx.Notifications.on("clickSun", this.clickSun, this); + }; + GuideManager.prototype.onDisable = function () { + // cc.fx.Notifications.off("clickSun", this.clickSun); + }; + GuideManager.prototype.update = function (dt) { + }; + __decorate([ + property(cc.Node) + ], GuideManager.prototype, "Tip", void 0); + __decorate([ + property(cc.SpriteAtlas) + ], GuideManager.prototype, "FoodPlist", void 0); + __decorate([ + property(cc.Node) + ], GuideManager.prototype, "Btn_New", void 0); + __decorate([ + property(cc.Node) + ], GuideManager.prototype, "Btn_Old", void 0); + __decorate([ + property(cc.Node) + ], GuideManager.prototype, "Plant", void 0); + GuideManager = __decorate([ + ccclass + ], GuideManager); + return GuideManager; +}(cc.Component)); +exports.default = GuideManager; + +cc._RF.pop(); \ No newline at end of file diff --git a/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js.map b/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js.map new file mode 100644 index 0000000..258dff5 --- /dev/null +++ b/library/imports/ef/effe29e5-3670-444b-81fd-b45338af7f19.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["assets\\Script\\GuideManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS;AACH,IAAA,KAAsB,EAAE,CAAC,UAAU,EAAlC,OAAO,aAAA,EAAE,QAAQ,cAAiB,CAAC;AAE1C;IAA0C,gCAAY;IAAtD;QAAA,qEAoSC;QAjSG,SAAG,GAAY,IAAI,CAAC;QAGpB,eAAS,GAAmB,IAAI,CAAC;QAGjC,aAAO,GAAY,IAAI,CAAC;QAExB,aAAO,GAAY,IAAI,CAAC;QAIxB,WAAK,GAAY,IAAI,CAAC;;IAqR1B,CAAC;IAzQG,6BAAM,GAAN;QACI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,4BAAK,GAAL;QACI,IAAI,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;IAED,0BAAG,GAAH;QACI,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACjC,IAAG,CAAC,EAAE,EAAC;SAEN;IAEL,CAAC;IAED,OAAO;IACP,2BAAI,GAAJ;QACI,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC;QAAA,EAAE,CAAA;QAChG,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;QACnD,IAAI,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAA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;iDACM;IAIxB;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;+CACI;IAfL,YAAY;QADhC,OAAO;OACa,YAAY,CAoShC;IAAD,mBAAC;CApSD,AAoSC,CApSyC,EAAE,CAAC,SAAS,GAoSrD;kBApSoB,YAAY","file":"","sourceRoot":"/","sourcesContent":["import AudioManager from \"./module/Music/AudioManager\";\r\n\r\n// 主游戏控制类\r\nconst {ccclass, property} = cc._decorator;\r\n@ccclass\r\nexport default class GuideManager extends cc.Component {\r\n\r\n @property(cc.Node)\r\n Tip: cc.Node = null;\r\n \r\n @property(cc.SpriteAtlas)\r\n FoodPlist: cc.SpriteAtlas = null;\r\n\r\n @property(cc.Node)\r\n Btn_New: cc.Node = null;\r\n @property(cc.Node)\r\n Btn_Old: cc.Node = null;\r\n\r\n\r\n @property(cc.Node)\r\n Plant: cc.Node = null;\r\n voiceSpriteFrame: cc.SpriteFrame; //是否可点击\r\n\r\n needleTween: cc.Tween;\r\n func: () => void;\r\n\r\n custom:number;\r\n\r\n now_Food: string; //当前关卡名字信息\r\n customData: { item: string; type: number; right: number; }[];\r\n choice: number;\r\n\r\n onLoad () {\r\n this.custom = 1;\r\n }\r\n\r\n start () {\r\n this.fit();\r\n }\r\n\r\n fit(){\r\n var jg = cc.fx.GameTool.setFit();\r\n if(!jg){\r\n\r\n }\r\n\r\n }\r\n\r\n //初始化数据\r\n init(){\r\n this.voiceSpriteFrame = this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame;``\r\n this.node.getChildByName(\"nextBtn\").active = false;\r\n let name = cc.fx.GameConfig.GM_INFO.gameId + \"_guide\";\r\n if(cc.fx.StorageMessage.getStorage(name) != null)\r\n cc.fx.GameConfig.GM_INFO.guide = cc.fx.StorageMessage.getStorage(name);\r\n if(cc.fx.GameConfig.GM_INFO.guide == false){\r\n this.node.getChildByName(\"jumpBtn\").active = true;\r\n cc.tween(this.node.getChildByName(\"jumpBtn\"))\r\n .to(0.35,{opacity:255})\r\n .start();\r\n }\r\n\r\n let tip = cc.fx.tipType.tipOne;\r\n\r\n let label = this.node.getChildByName(\"tip1\").getComponent(cc.Label);\r\n cc.fx.GameTool.typingAni(label,tip,this.startGame.bind(this),this);\r\n\r\n this.initData();\r\n }\r\n\r\n initData(){\r\n this.customData = [\r\n {\r\n \"item\": \"putao\",\r\n \"type\": 1,\r\n \"right\":1,\r\n },\r\n {\r\n \"item\": \"taozi\",\r\n \"type\": 2,\r\n \"right\":1,\r\n },\r\n {\r\n \"item\": \"putao\",\r\n \"type\": 2,\r\n \"right\":2,\r\n },\r\n {\r\n \"item\": \"taozi\",\r\n \"type\": 1,\r\n \"right\":2,\r\n }\r\n ]\r\n }\r\n\r\n passVoice(){\r\n // cc.fx.AudioManager._instance.playMusicGame();\r\n let voice = this.node.getChildByName(\"voiceTip\");\r\n voice.getChildByName(\"startBtn\").getComponent(cc.Button).interactable = false;\r\n voice.getChildByName(\"playBtn\").getComponent(cc.Button).interactable = false;\r\n cc.tween(voice)\r\n .to(0.5,{opacity:0})\r\n .call(()=>{\r\n voice.active = false;\r\n })\r\n .start();\r\n setTimeout(() => {\r\n this.init();\r\n }, 1000);\r\n }\r\n\r\n playVoice(){\r\n cc.fx.AudioManager._instance.playEffect(\"taozi_audio\",null);\r\n }\r\n\r\n jumpClick(){\r\n cc.director.loadScene(\"GameScene\");\r\n }\r\n\r\n nextClick(){\r\n //第一步\r\n this.node.getChildByName(\"nextBtn\").active = false;\r\n let label = this.node.getChildByName(\"tip1\").getComponent(cc.Label);\r\n \r\n if(this.custom == 0){\r\n cc.tween(this.node.getChildByName(\"tip1\"))\r\n .to(0.2,{opacity:0})\r\n .call(() =>{\r\n label.string = \"\";\r\n })\r\n .to(0.1,{opacity:255})\r\n .call(() =>{ \r\n let tip = cc.fx.tipType.tipTwo;\r\n cc.fx.GameTool.typingAni(label,tip,this.startGame.bind(this),this);\r\n })\r\n .start();\r\n }\r\n else if(this.custom == 1){\r\n this.node.getChildByName(\"nextBtn\").active = false;\r\n this.node.getChildByName(\"jumpBtn\").active = false;\r\n cc.tween(this.node.getChildByName(\"tip1\"))\r\n .to(0.2,{opacity:0})\r\n .call(() =>{\r\n label.string = \"\";\r\n this.nextLevel();\r\n })\r\n .start();\r\n }\r\n this.custom += 1;\r\n }\r\n\r\n nextLevel(){\r\n this.choice = 0;\r\n this.Btn_Old.active = true;\r\n this.Btn_New.active = true;\r\n\r\n\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n\r\n let name = this.customData[this.custom-2].item;\r\n if(this.customData[this.custom-2].type == 1){\r\n this.Plant.getChildByName(\"name\").getComponent(cc.Label).string = cc.fx.GameTool.getFoodName(name);\r\n name = \"prop_\"+name;\r\n this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame = this.FoodPlist[\"_spriteFrames\"][name];\r\n this.now_Food = name;\r\n cc.tween(this.Plant)\r\n .to(0.2,{opacity:255})\r\n .call(()=>{\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n })\r\n .start();\r\n }\r\n else{\r\n this.Plant.getChildByName(\"name\").getComponent(cc.Label).string = \"\"\r\n this.Plant.getChildByName(\"icon\").getComponent(cc.Sprite).spriteFrame = this.voiceSpriteFrame;\r\n let audioName = name + \"_audio\";\r\n name = \"audio\"+ name;\r\n this.now_Food = name;\r\n cc.fx.AudioManager._instance.playEffect(audioName,null);\r\n cc.tween(this.Plant)\r\n .to(0.2,{opacity:255})\r\n .call(()=>{\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = true;\r\n\r\n })\r\n .start();\r\n }\r\n //关卡+1\r\n\r\n }\r\n\r\n //新植物按钮\r\n click_Btn(customData,data){\r\n //关掉计时器 处理逻辑之前,先行关掉按钮开关\r\n if(data == \"Btn_New\"){\r\n this.choice = 1;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n } \r\n else if(data == \"Btn_Old\"){\r\n this.choice = 2;\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n } \r\n\r\n let target = this[data];\r\n var label = this.Tip.getChildByName(\"content\").getComponent(cc.Label);\r\n //正确\r\n if(this.choice == this.customData[this.custom-2].right){\r\n cc.fx.AudioManager._instance.playEffect(\"yes\",null);\r\n this.Tip.stopAllActions();\r\n this.Tip.active = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n target.getChildByName(\"err\").active = false;\r\n target.getChildByName(\"correct\").active = true;\r\n setTimeout(() => {\r\n this.Btn_New.getChildByName(\"nomal\").active = true;\r\n this.Btn_New.getChildByName(\"err\").active = false;\r\n this.Btn_New.getChildByName(\"correct\").active = false;\r\n this.Btn_Old.getChildByName(\"nomal\").active = true;\r\n this.Btn_Old.getChildByName(\"err\").active = false;\r\n this.Btn_Old.getChildByName(\"correct\").active = false;\r\n\r\n this.Btn_Old.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n this.Btn_New.getChildByName(\"nomal\").getComponent(cc.Button).interactable = false;\r\n\r\n this.custom += 1;\r\n if(this.custom >= 6){\r\n this.node.getChildByName(\"againBtn\").active = true;\r\n this.node.getChildByName(\"startBtn\").active = true;\r\n this.Btn_Old.active = false;\r\n this.Btn_New.active = false;\r\n cc.fx.GameConfig.GM_INFO.guide = false;\r\n let name = cc.fx.GameConfig.GM_INFO.gameId + \"_guide\";\r\n cc.fx.StorageMessage.setStorage(name,cc.fx.GameConfig.GM_INFO.guide);\r\n } \r\n else this.nextLevel();\r\n }, 1000);\r\n }\r\n else{\r\n cc.fx.AudioManager._instance.playEffect(\"yes\",null);\r\n var tipTemp = '葡萄刚才出现过呢'\r\n this.Tip.active = true;\r\n target.getChildByName(\"err\").active = true;\r\n target.getChildByName(\"correct\").active = false;\r\n\r\n switch((this.custom-2)){\r\n case 0:\r\n tipTemp = \"这是这局游戏第一次出现葡萄\";\r\n break;\r\n case 1:\r\n tipTemp = \"这是这局游戏第一次出现桃子\";\r\n break;\r\n case 2:\r\n tipTemp = '这不是这局游戏第一次出现葡萄';\r\n break;\r\n case 3:\r\n tipTemp = \"这不是这局游戏第一次出现桃子\";\r\n break;\r\n }\r\n label.string = tipTemp;\r\n this.Tip.opacity = 255;\r\n this.Tip.stopAllActions();\r\n var self = this;\r\n var action = cc.callFunc(function(){\r\n self.Tip.active = false;\r\n })\r\n this.Tip.runAction(cc.sequence(cc.delayTime(2),cc.fadeIn(0.5),action))\r\n }\r\n }\r\n\r\n //开始游戏\r\n startGame(){\r\n this.node.getChildByName(\"nextBtn\").active = true;\r\n cc.tween(this.node.getChildByName(\"nextBtn\"))\r\n .to(0.35,{opacity:255})\r\n .start();\r\n }\r\n\r\n againClick(){\r\n cc.director.loadScene(\"GuideScene\");\r\n }\r\n\r\n \r\n\r\n onEnable () {\r\n // cc.fx.Notifications.on(\"clickSun\", this.clickSun, this);\r\n }\r\n onDisable () {\r\n // cc.fx.Notifications.off(\"clickSun\", this.clickSun);\r\n }\r\n update (dt) {\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/library/imports/f0/f0048c10-f03e-4c97-b9d3-3506e1d58952.json b/library/imports/f0/f0048c10-f03e-4c97-b9d3-3506e1d58952.json new file mode 100644 index 0000000..02a9a3c --- /dev/null +++ b/library/imports/f0/f0048c10-f03e-4c97-b9d3-3506e1d58952.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_btn_normal", + "texture": "e851e89b-faa2-4484-bea6-5c01dd9f06e2", + "atlas": "", + "rect": [ + 0, + 0, + 40, + 40 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 12, + 12, + 12, + 12 + ] + } +} \ No newline at end of file diff --git a/library/imports/f1/f18742d7-56d2-4eb5-ae49-2d9d710b37c8.json b/library/imports/f1/f18742d7-56d2-4eb5-ae49-2d9d710b37c8.json new file mode 100644 index 0000000..8636c21 --- /dev/null +++ b/library/imports/f1/f18742d7-56d2-4eb5-ae49-2d9d710b37c8.json @@ -0,0 +1,182 @@ +{ + "__type__": "cc.EffectAsset", + "_name": "builtin-2d-label", + "_objFlags": 0, + "_native": "", + "properties": null, + "techniques": [ + { + "passes": [ + { + "blendState": { + "targets": [ + { + "blend": true + } + ] + }, + "rasterizerState": { + "cullMode": 0 + }, + "properties": { + "texture": { + "value": "white", + "type": 29 + }, + "alphaThreshold": { + "value": [ + 0.5 + ], + "type": 13 + }, + "outlineSize": { + "value": [ + 0 + ], + "type": 13 + }, + "outlineColor": { + "value": [ + 1, + 1, + 1, + 1 + ], + "type": 16 + } + }, + "program": "builtin-2d-label|vs|fs" + } + ] + } + ], + "shaders": [ + { + "hash": 1105459032, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform Outline {\n vec4 outlineColor;\n float outlineSize;\n};\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture(texture, v_uv0).a;\n #else\n float dist = texture(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture(texture, v_uv0).a;\n #else\n o *= texture(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}" + }, + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\n#if CC_SUPPORT_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\n#if USE_SDF\nuniform vec4 outlineColor;\nuniform float outlineSize;\n#endif\nvoid main () {\n#if USE_SDF\n #if USE_TEXTURE_ALPHAONLY\n float dist = texture2D(texture, v_uv0).a;\n #else\n float dist = texture2D(texture, v_uv0).r;\n #endif\n #if USE_SDF_EXTEND\n const float EDGE_VALUE = 0.45;\n #else\n const float EDGE_VALUE = 0.5;\n #endif\n #if CC_SUPPORT_standard_derivatives\n float smoothing = fwidth(dist);\n #else\n float smoothing = 0.05;\n #endif\n float outEdge = EDGE_VALUE - outlineSize;\n float bg = smoothstep(outEdge - smoothing, outEdge, dist);\n float fg = smoothstep(EDGE_VALUE - smoothing, EDGE_VALUE, dist);\n vec4 fgColor = outlineColor * (1.0 - fg) + v_color * fg;\n gl_FragColor = vec4(fgColor.rgb, fgColor.a * bg);\n#else\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n #if USE_TEXTURE_ALPHAONLY\n o.a *= texture2D(texture, v_uv0).a;\n #else\n o *= texture2D(texture, v_uv0);\n #endif\n #if CC_USE_ALPHA_ATLAS_TEXTURE\n o.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n#endif\n}" + }, + "builtins": { + "globals": { + "blocks": [ + { + "name": "CCGlobal", + "defines": [] + } + ], + "samplers": [] + }, + "locals": { + "blocks": [ + { + "name": "CCLocal", + "defines": [] + } + ], + "samplers": [] + } + }, + "defines": [ + { + "name": "USE_TEXTURE", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_USE_MODEL", + "type": "boolean", + "defines": [] + }, + { + "name": "CC_SUPPORT_standard_derivatives", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_ALPHA_TEST", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_SDF", + "type": "boolean", + "defines": [] + }, + { + "name": "USE_TEXTURE_ALPHAONLY", + "type": "boolean", + "defines": [ + "USE_SDF" + ] + }, + { + "name": "USE_SDF_EXTEND", + "type": "boolean", + "defines": [ + "USE_SDF" + ] + }, + { + "name": "CC_USE_ALPHA_ATLAS_TEXTURE", + "type": "boolean", + "defines": [ + "USE_TEXTURE" + ] + } + ], + "blocks": [ + { + "name": "ALPHA_TEST", + "members": [ + { + "name": "alphaThreshold", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_ALPHA_TEST" + ], + "binding": 0 + }, + { + "name": "Outline", + "members": [ + { + "name": "outlineColor", + "type": 16, + "count": 1 + }, + { + "name": "outlineSize", + "type": 13, + "count": 1 + } + ], + "defines": [ + "USE_SDF" + ], + "binding": 1 + } + ], + "samplers": [ + { + "name": "texture", + "type": 29, + "count": 1, + "defines": [ + "USE_TEXTURE" + ], + "binding": 30 + } + ], + "record": null, + "name": "builtin-2d-label|vs|fs" + } + ] +} \ No newline at end of file diff --git a/library/imports/f2/f2d1c16a-0e6b-4120-bfaf-01ce720b2756.json b/library/imports/f2/f2d1c16a-0e6b-4120-bfaf-01ce720b2756.json new file mode 100644 index 0000000..761c13f --- /dev/null +++ b/library/imports/f2/f2d1c16a-0e6b-4120-bfaf-01ce720b2756.json @@ -0,0 +1,29 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "Clock", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 727, + 620, + 188, + 225 + ], + "offset": [ + 0, + 7 + ], + "originalSize": [ + 188, + 239 + ], + "rotated": 1, + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/f5/f5331fd2-bf42-4ee3-a3fd-3e1657600eff.json b/library/imports/f5/f5331fd2-bf42-4ee3-a3fd-3e1657600eff.json new file mode 100644 index 0000000..80791fc --- /dev/null +++ b/library/imports/f5/f5331fd2-bf42-4ee3-a3fd-3e1657600eff.json @@ -0,0 +1,117 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "spot", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "light", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_level": 1, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "groupIndex": 0, + "_id": "", + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1 + ] + } + }, + { + "__type__": "cc.Light", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_type": 2, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_intensity": 1, + "_range": 1000, + "_spotAngle": 60, + "_spotExp": 1, + "_shadowType": 0, + "_shadowResolution": 1024, + "_shadowDarkness": 0.5, + "_shadowMinDepth": 1, + "_shadowMaxDepth": 1000, + "_shadowDepthScale": 250, + "_shadowFrustumSize": 50, + "_shadowBias": 0.0005, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "f5331fd2-bf42-4ee3-a3fd-3e1657600eff" + }, + "fileId": "33zOkteexCqamZ4PXuwJaW", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/f6/f6cdf53a-8de8-42da-bea3-581b1a681360.json b/library/imports/f6/f6cdf53a-8de8-42da-bea3-581b1a681360.json new file mode 100644 index 0000000..6674aae --- /dev/null +++ b/library/imports/f6/f6cdf53a-8de8-42da-bea3-581b1a681360.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "bg1", + "texture": "93b7d36e-73e3-4755-b932-ec0eb7407078", + "atlas": "", + "rect": [ + 0, + 0, + 750, + 1660 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 750, + 1660 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/f9/f9992ab9-caa0-462c-8baf-6908677fd296.json b/library/imports/f9/f9992ab9-caa0-462c-8baf-6908677fd296.json new file mode 100644 index 0000000..66f8211 --- /dev/null +++ b/library/imports/f9/f9992ab9-caa0-462c-8baf-6908677fd296.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "labelBg", + "texture": "4fb7b659-6b73-4357-bfec-854837d7ff67", + "atlas": "", + "rect": [ + 0, + 0, + 713, + 324 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 713, + 324 + ], + "capInsets": [ + 60, + 20, + 60, + 20 + ] + } +} \ No newline at end of file diff --git a/library/imports/fb/fbb1e48a-b0be-4b1e-877c-89a20b0e0d2f.json b/library/imports/fb/fbb1e48a-b0be-4b1e-877c-89a20b0e0d2f.json new file mode 100644 index 0000000..cb99c57 --- /dev/null +++ b/library/imports/fb/fbb1e48a-b0be-4b1e-877c-89a20b0e0d2f.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "prop_mulan", + "texture": "68b739ea-93fe-4fca-a6ab-d3b18c300756", + "atlas": "7ee88c39-72c3-4896-8faf-b26c1daecabc", + "rect": [ + 1, + 1, + 434, + 434 + ], + "offset": [ + -4, + 1 + ], + "originalSize": [ + 442, + 442 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/fe/fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a.json b/library/imports/fe/fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a.json new file mode 100644 index 0000000..940bec2 --- /dev/null +++ b/library/imports/fe/fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a.json @@ -0,0 +1,109 @@ +[ + { + "__type__": "cc.Prefab", + "_name": "capsule", + "_objFlags": 0, + "_native": "", + "data": { + "__id__": 1 + }, + "optimizationPolicy": 0, + "asyncLoadAssets": false, + "readonly": false + }, + { + "__type__": "cc.Node", + "_name": "capsule", + "_objFlags": 0, + "_parent": null, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 2 + } + ], + "_prefab": { + "__id__": 3 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.MeshRenderer", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 1 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "a5849239-3ad3-41d1-8ab4-ae9fea11f97f" + } + ], + "_mesh": { + "__uuid__": "83f5eff8-3385-4f95-9b76-8da0aa1d96cd" + }, + "_receiveShadows": false, + "_shadowCastingMode": 0, + "_enableAutoBatch": false, + "textures": [], + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__uuid__": "fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a" + }, + "fileId": "03MuJmYVpF+Kz929rGKeef", + "sync": false + } +] \ No newline at end of file diff --git a/library/imports/ff/ff0e91c7-55c6-4086-a39f-cb6e457b8c3b.json b/library/imports/ff/ff0e91c7-55c6-4086-a39f-cb6e457b8c3b.json new file mode 100644 index 0000000..b60fd4f --- /dev/null +++ b/library/imports/ff/ff0e91c7-55c6-4086-a39f-cb6e457b8c3b.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "default_editbox_bg", + "texture": "edd215b9-2796-4a05-aaf5-81f96c9281ce", + "atlas": "", + "rect": [ + 0, + 0, + 40, + 40 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 40, + 40 + ], + "capInsets": [ + 12, + 12, + 12, + 12 + ] + } +} \ No newline at end of file diff --git a/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.json b/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.json new file mode 100644 index 0000000..e7522d6 --- /dev/null +++ b/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.json @@ -0,0 +1,4 @@ +{ + "__type__": "cc.Texture2D", + "content": "0,9729,9729,33071,33071,0,0,1" +} \ No newline at end of file diff --git a/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.png b/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.png new file mode 100644 index 0000000..a1e8f0a Binary files /dev/null and b/library/imports/ff/ff2159b6-082c-4a51-8ae1-77f8acbb60a1.png differ diff --git a/library/imports/ff/ffa5a081-5040-487c-a153-4742d21bac1a.json b/library/imports/ff/ffa5a081-5040-487c-a153-4742d21bac1a.json new file mode 100644 index 0000000..53810a1 --- /dev/null +++ b/library/imports/ff/ffa5a081-5040-487c-a153-4742d21bac1a.json @@ -0,0 +1,28 @@ +{ + "__type__": "cc.SpriteFrame", + "content": { + "name": "play_test", + "texture": "c818910f-f1ff-45e2-bf2f-6c69d87723e6", + "atlas": "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3", + "rect": [ + 954, + 638, + 218, + 218 + ], + "offset": [ + 0, + 0 + ], + "originalSize": [ + 218, + 218 + ], + "capInsets": [ + 0, + 0, + 0, + 0 + ] + } +} \ No newline at end of file diff --git a/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.json b/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.json new file mode 100644 index 0000000..f14b1eb --- /dev/null +++ b/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.json @@ -0,0 +1,8 @@ +{ + "__type__": "cc.AudioClip", + "_name": "jinju_audio", + "_objFlags": 0, + "_native": ".mp3", + "duration": 1.567347, + "loadMode": 0 +} \ No newline at end of file diff --git a/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.mp3 b/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.mp3 new file mode 100644 index 0000000..426ca1d Binary files /dev/null and b/library/imports/ff/ffdbc929-ffdb-46b7-a93e-29447856ca36.mp3 differ diff --git a/library/uuid-to-mtime.json b/library/uuid-to-mtime.json new file mode 100644 index 0000000..0b5baea --- /dev/null +++ b/library/uuid-to-mtime.json @@ -0,0 +1,1042 @@ +{ + "2e3d6223-9889-4122-8121-c6d837f5367e": { + "asset": 1725262844853, + "meta": 1725328082652, + "relativePath": "migration" + }, + "29f52784-2fca-467b-92e7-8fd9ef8c57b7": { + "asset": 1725262845057, + "meta": 1725328082657, + "relativePath": "Scene" + }, + "4734c20c-0db8-4eb2-92ea-e692f4d70934": { + "asset": 1725262845083, + "meta": 1725328082657, + "relativePath": "Script" + }, + "7b81d4e8-ec84-4716-968d-500ac1d78a54": { + "asset": 1725262845170, + "meta": 1725328082657, + "relativePath": "Texture" + }, + "7a231473-d1df-4b05-8620-6376c36252c1": { + "asset": 1594224021434, + "meta": 1715325874879, + "relativePath": "migration\\use_v2.1-2.2.1_cc.Toggle_event.js" + }, + "2d2f792f-a40c-49bb-a189-ed176a246e49": { + "asset": 1721384877728, + "meta": 1721384877736, + "relativePath": "Scene\\RankScene.fire" + }, + "a8027877-d8d6-4645-97a0-52d4a0123dba": { + "asset": 1594224015094, + "meta": 1715325875069, + "relativePath": "Texture\\singleColor.png" + }, + "6aa0aa6a-ebee-4155-a088-a687a6aadec4": { + "asset": 1594224015093, + "meta": 1715325875077, + "relativePath": "Texture\\HelloWorld.png" + }, + "7c1d6faa-66b9-4423-aa04-8c38a15768cf": { + "asset": 1725262844847, + "meta": 1725328082652, + "relativePath": "animation" + }, + "6ebfe2d9-539a-4853-8b16-fca5c89cf2ce": { + "asset": 1718619525008, + "meta": 1718619583053, + "relativePath": "music" + }, + "bf3935ca-518a-42f4-84e4-ad96badfd1b4": { + "asset": 1725262844863, + "meta": 1725328082652, + "relativePath": "prefab" + }, + "52e78fe3-9095-42ad-8e4d-f9bb12dc69ce": { + "asset": 1725262845021, + "meta": 1725328082657, + "relativePath": "resources" + }, + "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5": { + "asset": 1730195677421, + "meta": 1730195677427, + "relativePath": "Scene\\OverScene.fire" + }, + "afa9e39a-94ca-477f-8a2a-25082d9092c3": { + "asset": 1718619669043, + "meta": 1718619784996, + "relativePath": "Shader" + }, + "2880dc26-5b38-48bd-baba-daaec97499cb": { + "asset": 1725333734732, + "meta": 1725346074545, + "relativePath": "res" + }, + "4eaf518b-35ec-4262-928d-4d497c3f2830": { + "asset": 1725346914339, + "meta": 1725346914349, + "relativePath": "Scene\\GameScene.fire" + }, + "eaa8b84d-69d0-4170-9f7d-8179ea948cde": { + "asset": 1725262845155, + "meta": 1725328082662, + "relativePath": "Script\\module" + }, + "8848cd9b-8115-456d-a656-2abcda1dadbe": { + "asset": 1725262845104, + "meta": 1725328082662, + "relativePath": "Script\\module\\Config" + }, + "13a0b173-d59e-4a9d-b5e3-4dbe4dc37cc1": { + "asset": 1725262845113, + "meta": 1725328082665, + "relativePath": "Script\\module\\Crypto" + }, + "b4e113c6-a987-4133-bfa0-3355d8ab4bd1": { + "asset": 1725262845118, + "meta": 1725328082665, + "relativePath": "Script\\module\\GameStart" + }, + "0487cacb-b94a-4ab6-a301-b6402ab0ac5d": { + "asset": 1725262845123, + "meta": 1725328082665, + "relativePath": "Script\\module\\Music" + }, + "ff6560d9-676d-42ad-8ec7-e44acb84ad9e": { + "asset": 1725262845130, + "meta": 1725328082665, + "relativePath": "Script\\module\\Notification" + }, + "d3520299-33dc-43d2-b522-d424efb5575d": { + "asset": 1725262845139, + "meta": 1725328082665, + "relativePath": "Script\\module\\RankList" + }, + "2af8f2ef-b8a0-43ad-a144-ef4a887f2fa9": { + "asset": 1725262845153, + "meta": 1725328082665, + "relativePath": "Script\\module\\Storage" + }, + "2a81f82d-8d16-44af-b947-44eea4dde54f": { + "asset": 1725262845158, + "meta": 1725328082665, + "relativePath": "Script\\module\\Tool" + }, + "e64e1a97-c93f-4257-ab34-80341d8ff79d": { + "asset": 1627607030000, + "meta": 1718260711110, + "relativePath": "Script\\module\\Crypto\\crypto-js.min.js" + }, + "55403563-1a5a-4f2f-9eb8-82c762641837": { + "asset": 1718260279375, + "meta": 1718260711215, + "relativePath": "Script\\module\\Notification\\Notification.ts" + }, + "d54211e0-2d28-4528-88e3-e5fd7c9b59a2": { + "asset": 1716189341583, + "meta": 1718260711351, + "relativePath": "Script\\module\\RankList\\List.ts" + }, + "5c9b8159-89a3-4b32-b303-b3d4f7ac1c9f": { + "asset": 1626178655932, + "meta": 1718265038280, + "relativePath": "Script\\DynamicAtlasManager.js" + }, + "10029dfc-5454-4977-bd11-8809e8f48cac": { + "asset": 1718269090717, + "meta": 1718269102270, + "relativePath": "Script\\module\\Storage\\Storage.ts" + }, + "066e91c2-fc55-407c-b061-9e4de4a9f224": { + "asset": 1725262844919, + "meta": 1725328082657, + "relativePath": "resources\\Json" + }, + "badb56f7-1c07-4fbb-87e6-5bfd805fe81b": { + "asset": 1718678368931, + "meta": 1718678368939, + "relativePath": "prefab\\Canvas.prefab" + }, + "a264c8df-80f6-474f-9fe5-28b7ae529d95": { + "asset": 1718678335892, + "meta": 1718678335895, + "relativePath": "prefab\\RankListItem.prefab" + }, + "e8b23e56-8d10-44ad-a8f0-2e637cc45533": { + "asset": 1718681194622, + "meta": 1718681195177, + "relativePath": "Script\\GameScene.js" + }, + "dd5bcc36-4db1-428e-a239-43ea14063b97": { + "asset": 1718697084014, + "meta": 1718697343202, + "relativePath": "Script\\Block.ts" + }, + "c1153c9d-e6dd-490d-8d4c-2b26baa039a8": { + "asset": 1725262844908, + "meta": 1725328082657, + "relativePath": "resources\\Font" + }, + "26d2db85-2ef2-4732-8add-adfa6d3c7308": { + "asset": 1718697407697, + "meta": 1718697450059, + "relativePath": "resources\\Font\\Font.ttf" + }, + "194f1f26-5bbf-43e6-b623-3af4e4c71586": { + "asset": 1725262844900, + "meta": 1725328082657, + "relativePath": "resources\\Bg" + }, + "7860ffbb-49ff-4d2b-b389-fea8edff5d11": { + "asset": 1725262845039, + "meta": 1725328082662, + "relativePath": "resources\\Ui" + }, + "208eb4d4-f625-47c7-a16f-853d57d0c48f": { + "asset": 1718682238203, + "meta": 1718767831850, + "relativePath": "resources\\Bg\\bg2.jpg" + }, + "a9e918f7-4968-417f-995b-c2db9d0ea6d9": { + "asset": 1725262844998, + "meta": 1725328082657, + "relativePath": "resources\\Music" + }, + "571ada69-963a-415d-8f4a-bd6e19c68094": { + "asset": 1725262845006, + "meta": 1725328082657, + "relativePath": "resources\\Rank" + }, + "ff2159b6-082c-4a51-8ae1-77f8acbb60a1": { + "asset": 1719303079035, + "meta": 1719303105920, + "relativePath": "resources\\Rank\\rankUI.png" + }, + "4aa928a4-3ba6-433f-a3d6-261260e338af": { + "asset": 1719303069644, + "meta": 1719303105929, + "relativePath": "resources\\Rank\\rankUI.plist" + }, + "b6890719-3b74-401d-9195-b39ec488d5e0": { + "asset": 1719280475484, + "meta": 1719300559009, + "relativePath": "resources\\Bg\\rank_Bg.jpg" + }, + "cd606b05-2183-4a5a-ad7c-9f3464006aaa": { + "asset": 1719458107183, + "meta": 1719458107189, + "relativePath": "animation\\fire.anim" + }, + "16df01b7-75d9-47f2-96bf-23d29632af47": { + "asset": 1719400846000, + "meta": 1719455065908, + "relativePath": "resources\\Music\\chixiaodou_audio.mp3" + }, + "8084ec83-76e6-4ef4-a0e9-162a417b5c08": { + "asset": 1716259500860, + "meta": 1719455258083, + "relativePath": "res\\icon.png" + }, + "1d6bc13a-95e8-41e2-8703-441263ec00bb": { + "asset": 1725348221693, + "meta": 1725348221697, + "relativePath": "Scene\\GuideScene.fire" + }, + "ca0f9934-a015-436e-9402-f8e30d4c5de6": { + "asset": 1722331848349, + "meta": 1722410762318, + "relativePath": "Script\\module\\RankList\\ItemRender.ts" + }, + "c818910f-f1ff-45e2-bf2f-6c69d87723e6": { + "asset": 1719563593308, + "meta": 1719563607841, + "relativePath": "resources\\Ui\\publicUI.png" + }, + "ef1ad44d-51f9-416e-9fc4-9c35dee52cf3": { + "asset": 1719563581032, + "meta": 1719563607870, + "relativePath": "resources\\Ui\\publicUI.plist" + }, + "93b7d36e-73e3-4755-b932-ec0eb7407078": { + "asset": 1719563742471, + "meta": 1719563900661, + "relativePath": "resources\\Bg\\bg1.jpg" + }, + "194abbe2-2c5a-4d46-8aac-957b3bb44457": { + "asset": 1719563797233, + "meta": 1719563900662, + "relativePath": "resources\\Bg\\overBg.jpg" + }, + "68b739ea-93fe-4fca-a6ab-d3b18c300756": { + "asset": 1719814666114, + "meta": 1719814948328, + "relativePath": "resources\\Ui\\Food.png" + }, + "7ee88c39-72c3-4896-8faf-b26c1daecabc": { + "asset": 1719814643395, + "meta": 1719814948336, + "relativePath": "resources\\Ui\\Food.plist" + }, + "e1d57e63-4f2f-467d-9c55-0a889d5533a8": { + "asset": 1719886454318, + "meta": 1719886483117, + "relativePath": "resources\\Json\\CLICK_DATA.json" + }, + "ffdbc929-ffdb-46b7-a93e-29447856ca36": { + "asset": 1720176810000, + "meta": 1720177326462, + "relativePath": "resources\\Music\\jinju_audio.mp3" + }, + "5d063b36-f6ad-4d0a-ad0c-1eaf633a1293": { + "asset": 1725870533047, + "meta": 1725870669501, + "relativePath": "resources\\Music\\jingjie_audio.mp3" + }, + "7a5029a4-6d49-4a15-a1bb-9faa9506e801": { + "asset": 1720176878000, + "meta": 1720177326467, + "relativePath": "resources\\Music\\lizi_audio.mp3" + }, + "e97e82df-44e2-4294-89fb-dadbf44bf622": { + "asset": 1720176534000, + "meta": 1720177326468, + "relativePath": "resources\\Music\\dazao_audio.mp3" + }, + "b1a7d924-b756-4abd-9de4-f913e76d7ba6": { + "asset": 1720176488000, + "meta": 1720177326469, + "relativePath": "resources\\Music\\cha_audio.mp3" + }, + "589a92bd-21cc-43d4-8594-2e9c92930f13": { + "asset": 1720176630000, + "meta": 1720177326470, + "relativePath": "resources\\Music\\gouqi_audio.mp3" + }, + "5f08c436-44f0-4802-bc19-0443972a105b": { + "asset": 1720176506000, + "meta": 1720177326473, + "relativePath": "resources\\Music\\danggui_audio.mp3" + }, + "47388b59-bca9-4607-bdc1-1fc7ba079a12": { + "asset": 1720176410000, + "meta": 1720177326475, + "relativePath": "resources\\Music\\baishao_audio.mp3" + }, + "03f3670c-b2e3-44dc-a718-35d83b45a100": { + "asset": 1720176896000, + "meta": 1720177326477, + "relativePath": "resources\\Music\\longyan_audio.mp3" + }, + "b3d0fc52-3960-42d1-869f-39121e912bdb": { + "asset": 1720176574000, + "meta": 1720177326478, + "relativePath": "resources\\Music\\ganjiang_audio.mp3" + }, + "c1fcf0fb-c572-4800-9848-1e78718fdabf": { + "asset": 1720176560000, + "meta": 1720177326484, + "relativePath": "resources\\Music\\gancao_audio.mp3" + }, + "ebf27f93-6c3b-44cd-b228-944b77435936": { + "asset": 1720176916000, + "meta": 1720177326485, + "relativePath": "resources\\Music\\moli_audio.mp3" + }, + "ac2f83fb-1f9e-4d58-b043-bdcd25634e14": { + "asset": 1720176864000, + "meta": 1720177326485, + "relativePath": "resources\\Music\\lizhi_audio.mp3" + }, + "bef46737-c323-42ea-9ea7-7dc780b882b7": { + "asset": 1720176474000, + "meta": 1720177326492, + "relativePath": "resources\\Music\\bgMusic.mp3" + }, + "434c4832-eab0-46c1-a1ef-baa5316386b4": { + "asset": 1720176942000, + "meta": 1720177326494, + "relativePath": "resources\\Music\\muchai_audio.mp3" + }, + "c2b82d71-e775-43c4-9ba6-650d7ac46c31": { + "asset": 1720176966000, + "meta": 1720177326496, + "relativePath": "resources\\Music\\mudan_audio.mp3" + }, + "5ae0ebd3-2b4a-4ea4-9454-7b8b4fcefad4": { + "asset": 1720176982000, + "meta": 1720177326501, + "relativePath": "resources\\Music\\mulan_audio.mp3" + }, + "280fe06b-d0a1-4f1d-bf58-4c37e907b7ea": { + "asset": 1720177020000, + "meta": 1720177326504, + "relativePath": "resources\\Music\\renshen_audio.mp3" + }, + "4fb5e673-7017-4a1a-bf48-92250446042d": { + "asset": 1720176698000, + "meta": 1720177326506, + "relativePath": "resources\\Music\\taozi_audio.mp3" + }, + "b31b447b-2c35-46ea-bb6c-84952055fae8": { + "asset": 1720177006000, + "meta": 1720177326507, + "relativePath": "resources\\Music\\putao_audio.mp3" + }, + "b313152c-a590-406a-90f6-e78ca8cf99fa": { + "asset": 1720176994000, + "meta": 1720177326507, + "relativePath": "resources\\Music\\pugongying_audio.mp3" + }, + "9c9e6c09-6653-44b7-8a72-9eddc54c2425": { + "asset": 1720177076000, + "meta": 1720177326508, + "relativePath": "resources\\Music\\zhuye_audio.mp3" + }, + "1a1f7dc6-de93-494d-b7be-fe9203b41dc0": { + "asset": 1720062015869, + "meta": 1720177697812, + "relativePath": "resources\\Music\\err.mp3" + }, + "92f37348-24a6-465c-b74a-0afda604dc3d": { + "asset": 1720062017000, + "meta": 1720177697813, + "relativePath": "resources\\Music\\yes.mp3" + }, + "bdc76845-baea-4381-911e-af437cccf839": { + "asset": 1725262845146, + "meta": 1725328082665, + "relativePath": "Script\\module\\Share" + }, + "b42c4fc1-4cd1-4b12-b206-930cea3d49ca": { + "asset": 1720419330469, + "meta": 1720427793572, + "relativePath": "Script\\module\\Share.zip" + }, + "9a849051-bf1c-4d07-aaef-0994c636ed81": { + "asset": 1714149065569, + "meta": 1720689299125, + "relativePath": "resources\\Ui\\rankBtn.png" + }, + "5325e681-09c2-4cdd-87f1-7b4d76247f14": { + "asset": 1721030116679, + "meta": 1721030189327, + "relativePath": "resources\\Music\\danshen_audio.mp3" + }, + "e74a9f7d-2031-4e69-bcb2-9998174088b2": { + "asset": 1725353838749, + "meta": 1725354638270, + "relativePath": "Script\\RankManager.ts" + }, + "58403fe7-d7a2-426b-9b19-84d3236731a8": { + "asset": 1721790840736, + "meta": 1721790841329, + "relativePath": "Script\\module\\Music\\AudioManager.ts" + }, + "4fb7b659-6b73-4357-bfec-854837d7ff67": { + "asset": 1722327716315, + "meta": 1722829247827, + "relativePath": "resources\\Ui\\labelBg.png" + }, + "856e2656-6026-44ae-a133-60ab71e7a805": { + "asset": 1725262845020, + "meta": 1725328082662, + "relativePath": "resources\\Spine" + }, + "c69b98b6-ff41-4bbe-84d3-93808dbc9ddf": { + "asset": 1544006365114, + "meta": 1722842240342, + "relativePath": "resources\\Spine\\hand.atlas" + }, + "4b49cd83-b149-43f7-925f-f80540e80749": { + "asset": 1675244256109, + "meta": 1722842240349, + "relativePath": "resources\\Spine\\hand.png" + }, + "3941fdae-279a-48d8-a746-5c5519731a80": { + "asset": 1544006365115, + "meta": 1722842240352, + "relativePath": "resources\\Spine\\hand.json" + }, + "9836134e-b892-4283-b6b2-78b5acf3ed45": { + "asset": 1714966328642, + "meta": 1730195615486, + "relativePath": "effects" + }, + "abc2cb62-7852-4525-a90d-d474487b88f2": { + "asset": 1714966328642, + "meta": 1730195615619, + "relativePath": "effects\\builtin-phong.effect" + }, + "e2f00085-c597-422d-9759-52c360279106": { + "asset": 1714966328642, + "meta": 1730195615683, + "relativePath": "effects\\builtin-toon.effect" + }, + "430eccbf-bf2c-4e6e-8c0c-884bbb487f32": { + "asset": 1714966328642, + "meta": 1730195615696, + "relativePath": "effects\\__builtin-editor-gizmo-line.effect" + }, + "6c5cf6e1-b044-4eac-9431-835644d57381": { + "asset": 1714966328642, + "meta": 1730195615706, + "relativePath": "effects\\__builtin-editor-gizmo-unlit.effect" + }, + "115286d1-2e10-49ee-aab4-341583f607e8": { + "asset": 1714966328642, + "meta": 1730195615734, + "relativePath": "effects\\__builtin-editor-gizmo.effect" + }, + "f8e6b000-5643-4b86-9080-aa680ce1f599": { + "asset": 1714966328706, + "meta": 1730195615489, + "relativePath": "image" + }, + "b43ff3c2-02bb-4874-81f7-f2dea6970f18": { + "asset": 1714966328658, + "meta": 1730195615793, + "relativePath": "image\\default_btn_pressed.png" + }, + "e851e89b-faa2-4484-bea6-5c01dd9f06e2": { + "asset": 1714966328658, + "meta": 1730195615787, + "relativePath": "image\\default_btn_normal.png" + }, + "edd215b9-2796-4a05-aaf5-81f96c9281ce": { + "asset": 1714966328658, + "meta": 1730195615789, + "relativePath": "image\\default_editbox_bg.png" + }, + "cfef78f1-c8df-49b7-8ed0-4c953ace2621": { + "asset": 1714966328673, + "meta": 1730195615792, + "relativePath": "image\\default_progressbar.png" + }, + "d8afc78c-4eac-4a9f-83dd-67bc70344d33": { + "asset": 1714966328862, + "meta": 1730195615496, + "relativePath": "resources" + }, + "294c1663-4adf-4a1e-a795-53808011a38a": { + "asset": 1714966328862, + "meta": 1730195616099, + "relativePath": "resources\\effects" + }, + "bbee2217-c261-49bd-a8ce-708d6bcc3500": { + "asset": 1714966328893, + "meta": 1730195616101, + "relativePath": "resources\\materials" + }, + "30682f87-9f0d-4f17-8a44-72863791461b": { + "asset": 1714966328831, + "meta": 1730195616134, + "relativePath": "resources\\effects\\builtin-2d-graphics.effect" + }, + "144c3297-af63-49e8-b8ef-1cfa29b3be28": { + "asset": 1714966328831, + "meta": 1730195616146, + "relativePath": "resources\\effects\\builtin-2d-gray-sprite.effect" + }, + "f18742d7-56d2-4eb5-ae49-2d9d710b37c8": { + "asset": 1714966328831, + "meta": 1730195616160, + "relativePath": "resources\\effects\\builtin-2d-label.effect" + }, + "0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": { + "asset": 1714966328831, + "meta": 1730195616172, + "relativePath": "resources\\effects\\builtin-2d-spine.effect" + }, + "2874f8dd-416c-4440-81b7-555975426e93": { + "asset": 1714966328846, + "meta": 1730195616180, + "relativePath": "resources\\effects\\builtin-2d-sprite.effect" + }, + "829a282c-b049-4019-bd38-5ace8d8a6417": { + "asset": 1714966328846, + "meta": 1730195616242, + "relativePath": "resources\\effects\\builtin-3d-particle.effect" + }, + "2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": { + "asset": 1714966328846, + "meta": 1730195616261, + "relativePath": "resources\\effects\\builtin-3d-trail.effect" + }, + "c0040c95-c57f-49cd-9cbc-12316b73d0d4": { + "asset": 1714966328846, + "meta": 1730195616272, + "relativePath": "resources\\effects\\builtin-clear-stencil.effect" + }, + "6d91e591-4ce0-465c-809f-610ec95019c6": { + "asset": 1714966328862, + "meta": 1730195616285, + "relativePath": "resources\\effects\\builtin-unlit.effect" + }, + "e02d87d4-e599-4d16-8001-e14891ac6506": { + "asset": 1714966328878, + "meta": 1730195616398, + "relativePath": "resources\\materials\\builtin-2d-label.mtl" + }, + "a153945d-2511-4c14-be7b-05d242f47d57": { + "asset": 1714966328862, + "meta": 1730195616395, + "relativePath": "resources\\materials\\builtin-2d-graphics.mtl" + }, + "6f801092-0c37-4f30-89ef-c8d960825b36": { + "asset": 1714966328862, + "meta": 1730195616397, + "relativePath": "resources\\materials\\builtin-2d-base.mtl" + }, + "7afd064b-113f-480e-b793-8817d19f63c3": { + "asset": 1714966328878, + "meta": 1730195616397, + "relativePath": "resources\\materials\\builtin-2d-spine.mtl" + }, + "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": { + "asset": 1714966328878, + "meta": 1730195616399, + "relativePath": "resources\\materials\\builtin-2d-sprite.mtl" + }, + "2a296057-247c-4a1c-bbeb-0548b6c98650": { + "asset": 1714966328893, + "meta": 1730195616401, + "relativePath": "resources\\materials\\builtin-unlit.mtl" + }, + "cf7e0bb8-a81c-44a9-ad79-d28d43991032": { + "asset": 1714966328878, + "meta": 1730195616400, + "relativePath": "resources\\materials\\builtin-clear-stencil.mtl" + }, + "466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": { + "asset": 1714966328878, + "meta": 1730195616400, + "relativePath": "resources\\materials\\builtin-3d-trail.mtl" + }, + "3a7bb79f-32fd-422e-ada2-96f518fed422": { + "asset": 1714966328862, + "meta": 1730195616396, + "relativePath": "resources\\materials\\builtin-2d-gray-sprite.mtl" + }, + "432fa09c-cf03-4cff-a186-982604408a07": { + "asset": 1714966328878, + "meta": 1730195616402, + "relativePath": "resources\\materials\\builtin-3d-particle.mtl" + }, + "5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": { + "asset": 1714966328721, + "meta": 1730195615490, + "relativePath": "materials" + }, + "fc09f9bd-2cce-4605-b630-8145ef809ed6": { + "asset": 1714966328721, + "meta": 1730195615491, + "relativePath": "misc" + }, + "db019bf7-f71c-4111-98cf-918ea180cb48": { + "asset": 1714966328737, + "meta": 1730195615492, + "relativePath": "model" + }, + "e39e96e6-6f6e-413f-bcf1-ac7679bb648a": { + "asset": 1714966328737, + "meta": 1730195615802, + "relativePath": "model\\prefab" + }, + "617323dd-11f4-4dd3-8eec-0caf6b3b45b9": { + "asset": 1714966328689, + "meta": 1730195616023, + "relativePath": "image\\default_scrollbar_vertical_bg.png" + }, + "b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": { + "asset": 1714966328706, + "meta": 1730195616096, + "relativePath": "image\\default_toggle_pressed.png" + }, + "d81ec8ad-247c-4e62-aa3c-d35c4193c7af": { + "asset": 1714966328673, + "meta": 1730195615800, + "relativePath": "image\\default_panel.png" + }, + "c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": { + "asset": 1714966328706, + "meta": 1730195616102, + "relativePath": "image\\default_toggle_disabled.png" + }, + "6e056173-d285-473c-b206-40a7fff5386e": { + "asset": 1714966328689, + "meta": 1730195616029, + "relativePath": "image\\default_sprite.png" + }, + "f6e6dd15-71d1-4ffe-ace7-24fd39942c05": { + "asset": 1714966328752, + "meta": 1730195615494, + "relativePath": "obsolete" + }, + "9d60001f-b5f4-4726-a629-2659e3ded0b8": { + "asset": 1714966328673, + "meta": 1730195616020, + "relativePath": "image\\default_radio_button_on.png" + }, + "4bab67cb-18e6-4099-b840-355f0473f890": { + "asset": 1714966328689, + "meta": 1730195616023, + "relativePath": "image\\default_scrollbar_bg.png" + }, + "71561142-4c83-4933-afca-cb7a17f67053": { + "asset": 1714966328658, + "meta": 1730195616028, + "relativePath": "image\\default_btn_disabled.png" + }, + "f743d2b6-b7ea-4c14-a55b-547ed4d0a045": { + "asset": 1714966328752, + "meta": 1730195615495, + "relativePath": "particle" + }, + "567dcd80-8bf4-4535-8a5a-313f1caf078a": { + "asset": 1714966328673, + "meta": 1730195615795, + "relativePath": "image\\default_radio_button_off.png" + }, + "99170b0b-d210-46f1-b213-7d9e3f23098a": { + "asset": 1714966328673, + "meta": 1730195615797, + "relativePath": "image\\default_progressbar_bg.png" + }, + "ae6c6c98-11e4-452f-8758-75f5c6a56e83": { + "asset": 1714966328831, + "meta": 1730195615495, + "relativePath": "prefab" + }, + "0275e94c-56a7-410f-bd1a-fc7483f7d14a": { + "asset": 1714966328705, + "meta": 1730195616012, + "relativePath": "image\\default_sprite_splash.png" + }, + "c4480a0a-6ac5-443f-8b40-361a14257fc8": { + "asset": 1714966328706, + "meta": 1730195616373, + "relativePath": "materials\\builtin-phong.mtl" + }, + "d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": { + "asset": 1714966328689, + "meta": 1730195616019, + "relativePath": "image\\default_scrollbar_vertical.png" + }, + "a87cc147-01b2-43f8-8e42-a7ca90b0c757": { + "asset": 1714966328721, + "meta": 1730195616288, + "relativePath": "model\\prefab\\box.prefab" + }, + "fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": { + "asset": 1714966328737, + "meta": 1730195616292, + "relativePath": "model\\prefab\\capsule.prefab" + }, + "b5fc2cf2-7942-483d-be1f-bbeadc4714ad": { + "asset": 1714966328737, + "meta": 1730195616294, + "relativePath": "model\\prefab\\cone.prefab" + }, + "0291c134-b3da-4098-b7b5-e397edbe947f": { + "asset": 1714966328689, + "meta": 1730195616012, + "relativePath": "image\\default_scrollbar.png" + }, + "2d9a4b85-b0ab-4c46-84c5-18f393ab2058": { + "asset": 1714966328737, + "meta": 1730195616298, + "relativePath": "model\\prefab\\sphere.prefab" + }, + "3f376125-a699-40ca-ad05-04d662eaa1f2": { + "asset": 1714966328737, + "meta": 1730195616300, + "relativePath": "model\\prefab\\plane.prefab" + }, + "73a0903d-d80e-4e3c-aa67-f999543c08f5": { + "asset": 1714966328706, + "meta": 1730195616110, + "relativePath": "image\\default_toggle_checkmark.png" + }, + "de510076-056b-484f-b94c-83bef217d0e1": { + "asset": 1714966328737, + "meta": 1730195616307, + "relativePath": "model\\prefab\\torus.prefab" + }, + "a3ee0214-b432-4865-9666-4a3211814282": { + "asset": 1714966328800, + "meta": 1730195616042, + "relativePath": "prefab\\light" + }, + "6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": { + "asset": 1714966328737, + "meta": 1730195616306, + "relativePath": "model\\prefab\\quad.prefab" + }, + "d29077ba-1627-4a72-9579-7b56a235340c": { + "asset": 1714966328706, + "meta": 1730195616094, + "relativePath": "image\\default_toggle_normal.png" + }, + "1c5e4038-953a-44c2-b620-0bbfc6170477": { + "asset": 1714966328737, + "meta": 1730195616290, + "relativePath": "model\\prefab\\cylinder.prefab" + }, + "897ef7a1-4860-4f64-968d-f5924b18668a": { + "asset": 1714966328752, + "meta": 1730195616042, + "relativePath": "prefab\\2d-camera.prefab" + }, + "70d7cdb0-04cd-41bb-9480-c06a4785f386": { + "asset": 1714966328768, + "meta": 1730195616042, + "relativePath": "prefab\\3d-camera.prefab" + }, + "600301aa-3357-4a10-b086-84f011fa32ba": { + "asset": 1714966328642, + "meta": 1730195616016, + "relativePath": "image\\default-particle.png" + }, + "70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": { + "asset": 1714966328768, + "meta": 1730195616050, + "relativePath": "prefab\\3d-particle.prefab" + }, + "ed88f13d-fcad-4848-aa35-65a2cb973584": { + "asset": 1714966328768, + "meta": 1730195616048, + "relativePath": "prefab\\3d-stage.prefab" + }, + "972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": { + "asset": 1714966328768, + "meta": 1730195616052, + "relativePath": "prefab\\button.prefab" + }, + "2c937608-2562-40ea-b264-7395df6f0cea": { + "asset": 1714966328768, + "meta": 1730195616052, + "relativePath": "prefab\\canvas.prefab" + }, + "61aeb05b-3b32-452b-8eed-2b76deeed554": { + "asset": 1714966328783, + "meta": 1730195616055, + "relativePath": "prefab\\editbox.prefab" + }, + "27756ebb-3d33-44b0-9b96-e858fadd4dd4": { + "asset": 1714966328783, + "meta": 1730195616061, + "relativePath": "prefab\\label.prefab" + }, + "785a442c-3ceb-45be-a46e-7317f625f3b9": { + "asset": 1714966328783, + "meta": 1730195616063, + "relativePath": "prefab\\layout.prefab" + }, + "ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": { + "asset": 1714966328800, + "meta": 1730195616065, + "relativePath": "prefab\\pageview.prefab" + }, + "5965ffac-69da-4b55-bcde-9225d0613c28": { + "asset": 1714966328800, + "meta": 1730195616072, + "relativePath": "prefab\\progressBar.prefab" + }, + "cd33edea-55f5-46c2-958d-357a01384a36": { + "asset": 1714966328800, + "meta": 1730195616067, + "relativePath": "prefab\\particlesystem.prefab" + }, + "4a37dd57-78cd-4cec-aad4-f11a73d12b63": { + "asset": 1714966328800, + "meta": 1730195616070, + "relativePath": "prefab\\richtext.prefab" + }, + "0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": { + "asset": 1714966328800, + "meta": 1730195616081, + "relativePath": "prefab\\slider.prefab" + }, + "32044bd2-481f-4cf1-a656-e2b2fb1594eb": { + "asset": 1714966328800, + "meta": 1730195616075, + "relativePath": "prefab\\scrollview.prefab" + }, + "96083d03-c332-4a3f-9386-d03e2d19e8ee": { + "asset": 1714966328815, + "meta": 1730195616100, + "relativePath": "prefab\\sprite.prefab" + }, + "7de03a80-4457-438d-95a7-3e7cdffd6086": { + "asset": 1714966328815, + "meta": 1730195616109, + "relativePath": "prefab\\tiledmap.prefab" + }, + "1f55e3be-b89b-4b79-88de-47fd31018044": { + "asset": 1714966328815, + "meta": 1730195616105, + "relativePath": "prefab\\sprite_splash.prefab" + }, + "2be36297-9abb-4fee-8049-9ed5e271da8a": { + "asset": 1714966328721, + "meta": 1730195616119, + "relativePath": "misc\\default_video.mp4" + }, + "0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": { + "asset": 1714966328815, + "meta": 1730195616114, + "relativePath": "prefab\\tiledtile.prefab" + }, + "bf0a434c-84dd-4a8e-a08a-7a36f180cc75": { + "asset": 1714966328815, + "meta": 1730195616118, + "relativePath": "prefab\\toggleContainer.prefab" + }, + "0d784963-d024-4ea6-a7db-03be0ad63010": { + "asset": 1714966328815, + "meta": 1730195616114, + "relativePath": "prefab\\toggle.prefab" + }, + "232d2782-c4bd-4bb4-9e01-909f03d6d3b9": { + "asset": 1714966328815, + "meta": 1730195616148, + "relativePath": "prefab\\videoplayer.prefab" + }, + "d1b8be49-b0a0-435c-83b7-552bed4bbe35": { + "asset": 1714966328815, + "meta": 1730195616123, + "relativePath": "prefab\\toggleGroup.prefab" + }, + "8c5001fd-07ee-4a4b-a8a0-63e15195e94d": { + "asset": 1714966328831, + "meta": 1730195616287, + "relativePath": "prefab\\webview.prefab" + }, + "61906da3-7003-4bda-9abc-5769c76faee4": { + "asset": 1714966328783, + "meta": 1730195616305, + "relativePath": "prefab\\light\\ambient.prefab" + }, + "0cf30284-9073-46bc-9eba-e62b69dbbff3": { + "asset": 1714966328800, + "meta": 1730195616309, + "relativePath": "prefab\\light\\point.prefab" + }, + "ddb99b39-7004-47cd-9705-751905c43c46": { + "asset": 1714966328800, + "meta": 1730195616302, + "relativePath": "prefab\\light\\directional.prefab" + }, + "f5331fd2-bf42-4ee3-a3fd-3e1657600eff": { + "asset": 1714966328800, + "meta": 1730195616309, + "relativePath": "prefab\\light\\spot.prefab" + }, + "d0a82d39-bede-46c4-b698-c81ff0dedfff": { + "asset": 1714966328752, + "meta": 1730195616121, + "relativePath": "particle\\atom.png" + }, + "8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": { + "asset": 1714966328752, + "meta": 1730195616107, + "relativePath": "obsolete\\atom.png" + }, + "b2687ac4-099e-403c-a192-ff477686f4f5": { + "asset": 1714966328752, + "meta": 1730195616432, + "relativePath": "particle\\atom.plist" + }, + "b8223619-7e38-47c4-841f-9160c232495a": { + "asset": 1714966328752, + "meta": 1730195616431, + "relativePath": "obsolete\\atom.plist" + }, + "954fec8b-cd16-4bb9-a3b7-7719660e7558": { + "asset": 1714966328737, + "meta": 1730195618365, + "relativePath": "model\\primitives.fbx" + }, + "ebfe6e6f-f068-4227-bfd8-16f834e7203f": { + "asset": 1723690178093, + "meta": 1723690237680, + "relativePath": "res\\btn.png" + }, + "2cddbdcb-5dba-4b13-960c-9ebe6d17a7db": { + "asset": 1723690641486, + "meta": 1723690642758, + "relativePath": "resources\\Json\\LEVEL_INFO.json" + }, + "805c69df-dfdf-4759-97ae-5a7341f424c7": { + "asset": 1730189712732, + "meta": 1730195618593, + "relativePath": "Script\\GameOver.ts" + }, + "43bfc27a-ff6e-45b3-87c7-504d0f781397": { + "asset": 1724224763301, + "meta": 1724225328971, + "relativePath": "Script\\module\\Tool\\GameTool.ts" + }, + "771a3d9a-4013-4654-a777-fbaea0c93280": { + "asset": 1725329122182, + "meta": 1725329167535, + "relativePath": "Script\\module\\Crypto\\HttpUtil.ts" + }, + "7290c680-dfdc-4c59-9736-a614cc2a8bcf": { + "asset": 1725329840651, + "meta": 1725330091340, + "relativePath": "Script\\module\\Share\\share.ts" + }, + "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d": { + "asset": 1729844315271, + "meta": 1729844315275, + "relativePath": "Scene\\LoadScene.fire" + }, + "adfc2f90-f674-4b11-93a1-3485c1804903": { + "asset": 1725266276449, + "meta": 1725333734764, + "relativePath": "res\\nomal2.png" + }, + "59302142-671f-4983-92db-e5fa8b5aee42": { + "asset": 1725266276335, + "meta": 1725333734764, + "relativePath": "res\\err2.png" + }, + "ee7fc6f8-eb01-4dcb-9ddf-5c81e31b7944": { + "asset": 1725266276419, + "meta": 1725333734764, + "relativePath": "res\\yes2.png" + }, + "2d69a479-18ec-4787-b35f-e9a9b3247435": { + "asset": 1725334365560, + "meta": 1725335043379, + "relativePath": "resources\\Json\\GM_INFO.json" + }, + "c5692be7-8703-45e4-9f67-23b54d290356": { + "asset": 1725345177047, + "meta": 1725345202432, + "relativePath": "Script\\module\\Config\\GameConfig.ts" + }, + "454ad829-851a-40ea-8ab9-941e828357ca": { + "asset": 1725346207117, + "meta": 1725346258558, + "relativePath": "Script\\Load.ts" + }, + "b0432040-dbde-438c-839c-ba2b5d18a3b5": { + "asset": 1725851001321, + "meta": 1725851076428, + "relativePath": "Script\\GameManager.ts" + }, + "effe29e5-3670-444b-81fd-b45338af7f19": { + "asset": 1725854003164, + "meta": 1725854003770, + "relativePath": "Script\\GuideManager.ts" + }, + "61d4c718-db3b-4b31-8221-f16bea3cf030": { + "asset": 1725853967422, + "meta": 1725854003787, + "relativePath": "Script\\module\\GameStart\\GameAppStart.ts" + } +} \ No newline at end of file diff --git a/local/builder.json b/local/builder.json new file mode 100644 index 0000000..54ac66e --- /dev/null +++ b/local/builder.json @@ -0,0 +1,20 @@ +{ + "platform": "web-mobile", + "actualPlatform": "web-mobile", + "template": "link", + "buildPath": "./build", + "debug": false, + "sourceMaps": false, + "embedWebDebugger": false, + "previewWidth": "1280", + "previewHeight": "720", + "useDebugKeystore": true, + "keystorePath": "", + "keystorePassword": "", + "keystoreAlias": "", + "keystoreAliasPassword": "", + "apiLevel": "", + "appABIs": [], + "vsVersion": "auto", + "buildScriptsOnly": false +} diff --git a/local/layout.editor.json b/local/layout.editor.json new file mode 100644 index 0000000..c8cde33 --- /dev/null +++ b/local/layout.editor.json @@ -0,0 +1,116 @@ +{ + "version": "1.1.1", + "windows": { + "main": { + "main": true, + "url": "app://editor/index.html", + "windowType": "dockable", + "x": 0, + "y": 0, + "width": 1280, + "height": 672, + "layout": { + "type": "dock-h", + "children": [ + { + "width": 255.1666717529297, + "height": 556.3333740234375, + "type": "dock-v", + "children": [ + { + "width": 255.1666717529297, + "height": 292.25, + "type": "panel", + "active": 0, + "children": [ + "hierarchy" + ] + }, + { + "width": 255.1666717529297, + "height": 261.0833435058594, + "type": "panel", + "active": 0, + "children": [ + "assets" + ] + } + ] + }, + { + "width": 629.0104370117188, + "height": 556.3333740234375, + "type": "panel", + "active": 0, + "children": [ + "scene" + ] + }, + { + "width": 375.82293701171875, + "height": 556.3333740234375, + "type": "panel", + "active": 0, + "children": [ + "inspector", + "cocos-services" + ] + } + ] + }, + "panels": [ + "hierarchy", + "assets", + "scene", + "inspector", + "cocos-services" + ] + }, + " common-asset-worker-worker": {} + }, + "panels": { + "builder": { + "x": 372, + "y": 0, + "width": 520, + "height": 676 + }, + "project-settings": { + "x": -8, + "y": -8, + "width": 1296, + "height": 688 + }, + "console": { + "x": 258, + "y": 192, + "width": 834, + "height": 352 + }, + "store": { + "x": 124, + "y": 0, + "width": 1016, + "height": 672 + }, + "timeline": { + "x": 372, + "y": 228, + "width": 522, + "height": 340 + }, + "sprite-editor": { + "x": 382, + "y": 56, + "width": 514, + "height": 538 + }, + "mini_font": { + "x": 404, + "y": 36, + "width": 516, + "height": 672 + } + }, + "panelLabelWidth": {} +} diff --git a/local/local.json b/local/local.json new file mode 100644 index 0000000..c7f8fb3 --- /dev/null +++ b/local/local.json @@ -0,0 +1,20 @@ +{ + "last-edit": "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5", + "recent-items": [ + "40ba7e70-1826-4aa1-92f3-aa63ae39294b", + "32254f37-ac95-4912-a787-b8e0429ba0f1", + "3a232388-d8dc-4f79-a1ea-82f6385b7ce2", + "5e515837-650e-4584-a089-e2a025e36c39", + "13110e4f-3587-4e6b-8811-0ca16cac8149", + "d1323772-4ab2-4527-bd20-501fe4fb9723", + "774829bb-123e-48b6-930e-6b3e02491506", + "badb56f7-1c07-4fbb-87e6-5bfd805fe81b", + "0cfcd0fc-314e-4c60-8997-a1c1b95599bc", + "a264c8df-80f6-474f-9fe5-28b7ae529d95", + "2d2f792f-a40c-49bb-a189-ed176a246e49", + "4eaf518b-35ec-4262-928d-4d497c3f2830", + "1d6bc13a-95e8-41e2-8703-441263ec00bb", + "9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d", + "4b9c5a7e-c645-48a4-9aca-5df381ce4ef5" + ] +} diff --git a/local/node-library.json b/local/node-library.json new file mode 100644 index 0000000..4493d9b --- /dev/null +++ b/local/node-library.json @@ -0,0 +1,6 @@ +{ + "user": { + "name": "User", + "prefab": [] + } +} diff --git a/local/node-tree-state.json b/local/node-tree-state.json new file mode 100644 index 0000000..3d6c331 --- /dev/null +++ b/local/node-tree-state.json @@ -0,0 +1,273 @@ +{ + "nodeFoldStates": [ + "a8e1beXG9L6Y6olS7/pLOx", + "a286bbGknJLZpRpxROV6M94", + "ddze4tR+dL8LGnASrWLViW", + "44eAx7/NhDGKJAWwsE7lVW", + "3eN7cf4MNOK5UyPWyxX83Z", + "ccPlHmKHtFsL2f+wrwiqVk", + "72YDFmW7tGWoRWmmeZQ05b", + "3bnt01ullMULzkGgQ/1+BE", + "0f8YVBqw9JYovRtGVoYhcA", + "fftjo13iREUrHGImD1PYL7", + "03tOe01gtL0LTlZbSaiGHC", + "80tMs1pCpEnafofwke0o74", + "585GM7mV5LN7ykQ3Sg2gvo", + "c6KRtU6xNCpZrLAyvPDXn1", + "6eiFx6kolC57s0b5SqlVUQ", + "358F/Y6TJGKbhaBorGBTd5", + "e1yJgcrFZKzbBEzFlxJEds", + "470l8xm1tCU4Dsb10rancm", + "13A74RFRlCHrCME2yKb7ag", + "76WmSmPyBFMJuhUWx5KN/K", + "57DRua7odMXprhTRJoSqn4", + "c5leZH9/BDwYPilYk2w+b6", + "b7MSJMUixCDrds3RR+88yR", + "cdnAd9W0dJ4q9V/qxsgYm9", + "fe6VpuEFFL8L8Jy5BbEhC7", + "e7DfWogAVJgqXoXQUhOhC8", + "25eeIBwOBPaJlMOvvl++/o", + "94muWuYDxOMrcW6mZ3MwZ1", + "74yiWTScRLhJRtm3ZoEYvV", + "96GJ8s2x9Hjam20/xfT2oW", + "86Qiu0yNpMG6pFlNFQ/2U3", + "ceEytI2TVBnrrxjNjIeUB6", + "50v0K+29RNvYyZMzNK0HlC", + "2c2VwiQFZDi7S0RZrp3xY2", + "0fcDfHHpRHXKM9MyyslQY8", + "80UN5iBc9K9pd8hXCc1VAk", + "9a3MBWS0tATp1bXC+684by", + "bdbEH+735OxrggnQuRlqF2", + "85AQ3wR2VBJ7P/esG1IsjH", + "bb+DPySjNLhZcxUUphVuRh", + "235SMzDbhOq6ztcaxq2zgs", + "5athgBtiFNOJe+DCAIMam3", + "d85qKPpT1EtqV0GDNB7tE3", + "05zrhv4M5Oi545Yl6haU2p", + "49KFV1rH5KboUqTSE73oKm", + "a9wE3HwTdLYIgknvVdH4Ja", + "a8OJDyLEtLPaSIKwcHkGwM", + "6e7xDgkiZP6bvHrsAjwVEx", + "32a/zTbpdOEqEKn2OHAvKf", + "11B8BrmG5AMKT0PVCOmTqQ", + "aeSOPcUelPeK3F0MJSSf8L", + "b0vfVXP2VFAovfKmMjZ8FN", + "d5OPPmUo1OqLSB3cNeoC3k", + "ad1Qi0WAVEsbboH5RTTtLg", + "c6B+pT8q9O862/lp1PsAm9", + "3aWWBXkDRE3bJ3DDipKAcc", + "a9i7PCh2tGN52CTPy4WJKl", + "ccpZ4NXTVIQrnkVWQ13cmq", + "fcWcVpXMdINYiRiJDDx0lV", + "a7cfP2le1Beb+YWHblNxFD", + "f1j8kdo7RHv6Rvh+3P8tTw", + "22iCrJORVGCLYRM1Z1n0wp", + "99IKRDjA9IYKqv3gynm5Zm", + "f9Cw01651C2Zl+trl7WVsP", + "cfxr47kQ5LA6a7THlAhDRR", + "2eG7aFr39DH67H2IGiVPPb", + "90KISCL0RF5JhWEC9mtJcZ", + "8cvS2HAkBM05fjj60bD03B", + "16gqVcPfxELJJJvzrWZur+", + "beVty643BMKbTRukfIU7HV", + "1193kI5mxIVb/DB02RtHNQ", + "15115GCXVAoq7PaCopL4v4", + "0eWfH0ZCFKEZFjROefT9BK", + "08JetjWRBJXbLPmfq9dOSw", + "18JbI31llNOLRBILjHsqaC", + "a0r8i56+VD/YBNhdfsmlqi", + "f6oDI+X2dBiYP/rF4fMim2", + "e1tWKcU7lJVJismrZe073k", + "9aHHsFHkhM+LGrCUm+pMtx", + "c9kIDf6hpBt5eI8SJ27k8J", + "d5tHmGhBBIpL5amAENlSZX", + "fbUHhjpABG74DdpeYzdl/2", + "c8s1kO+S5HV5StGDSisi9O", + "9bJGLXeRVMeoYK74VqLEpZ", + "68pJFSF6BC1qvH2FFYvEPi", + "33IlaaZbpCjYPJy8JS5ID6", + "b4zrLycE5K2qTacy1SIgGn", + "6edJ3h7yhNb58PkU04FbEw", + "4bLXuzJd5CPJHZOyOtl8ME", + "64u5o0GQ5N0Ipij2YNzkuu", + "9clC2j3NpArIjJQzy7zTrr", + "abtKGIVBdOjZW0v9PWvFfT", + "7fpigMbsJIdbzDu5SYPPjD", + "9cjM52fAhGHryddtm4DA8R", + "fdVmac3ZRHPoowK67Jq6Yt", + "a0x81dXs1C0KAQ0fTfn3XE", + "2dTBS0H75LZJtI4jRof1QW", + "93Qxnp3f9D9pgZaIOzVT7T", + "c8rJ+rRJxPwbb5PFW9GSJm", + "d7mXCiRrxD9IVbg0s3M3LF", + "a76VOCBm9CqZYwT3fWHdj7", + "bbv9RDYspIcJW7UTqUlsdB", + "65kveZ1FFJKbo/iTvvpFW2", + "ac38ZARBlM7bXz6oBB5VOR", + "11yyTruw9OL7ucqg8VpVVi", + "50UB65dCBJTbZGO0EnjLFW", + "13hgkcLcJHqpA36zbROnz7", + "1b6UU0rTRNtIJigj5zDpnO", + "92Bxdq/nxJrKbyHZwa4jwm", + "eahu5Qi+RGYbJveL2sjd9E", + "c8+DIo6iBFRoHHuMStaRmg", + "53Pa/U9npHVaLLi4mcXCDl", + "3bRpAXkXhC5KGgG14EgGiz", + "caA1gIw+dDIKpQRMeiQ5aE", + "80svXWiYBI9Ylk6TVYLhFf", + "dcWLbydrREfbzXyWzuuoOc", + "67Y944ah1K5Yt2IzWCHOE0", + "87Iwfstz9IgJrGdhWc1ece", + "93AB/tAtpJiLIhsM2hj4oS", + "19pF4+lS9JVKxLaFN6zmKh", + "a4t+8IfEBL5IRPc1LZVawN", + "16n0c3PGdH0L2eZEIIZqR9", + "67pDCJ/gVK55UJKFtKqYeN", + "ccLZ7WP2lAFbuvAuozTr9P", + "b9Hv870blHRp1RUXDge2or", + "67pEU2PjBC/plQ3c6A+/2G", + "ba7gXVGG1F65dbCJcPc5w3", + "68jKefAHFFR7U+xHdxGnUT", + "d1OArZuhJB9YD6/vAIcPRR", + "d6yAdsq2xF3pAwetc2higT", + "fcgipOlLpGjaEAQ5N8p9Q3", + "19KYYkexxPpIM9INhTRI6g", + "ddAJsdSBdHbp05yGUBA3e1", + "f0mxIJ78ZFGL41VXlNAceQ", + "86aT3Ws0hLmY2uYrTFI/h/", + "e6rWoQ+M9CMY7I5AsszNvM", + "7dXktoJC1DmrEZuVASnE3V", + "86Y6zNII5LZYR2RphiHZAk", + "e6U6/pL1xFvpT+HqZ6bsjz", + "316aemMQdKkbLHWO3FF+We", + "4eWwtv1o5JeIXzuY/avlmn", + "dcfrZEKbJJMIq3frz7LIR5", + "a3gXDXy5JOQZ2Qnj9ZCUFK", + "4dssINnjdDHJYhdil8khq9", + "34osXbSDZP2aYOd6zjT+dA", + "4bdC3dJhZEoL1tGOBeWAFW", + "78UMPV1m5ABqnKfaA0QPTV", + "dfLkf1hkBK75kof1Q6OmDh", + "b5y/qyrvlEdrL8eJVH/jn2", + "femlJW96FFkJ3vqt1ZV8A8", + "1dtPN96ENK4rNDGeyXoDjh", + "83sPOoHdxEYKjGxoSaM0qs", + "099fBgiItNAZGt+FmRzphy", + "a9mMXgbUVKrraT/vqVCVIE", + "e1+Ep5C1JCdY73gjVbslja", + "c8yoqytmtNTJJgyelkUe7g", + "b0JI6xYTZLqbmWA1p7yH6m", + "a2FE/ArDJMvYxCIXp+aJNs", + "d7Go7VAudBuoLS0+DrZ3M2", + "5ed3tKYdxCPJ51e/i3ecou", + "a9Y/TP/QhAdq9i2KGsTC0d", + "a1BRwywGFMT6iJxK+nijOf", + "7aHA1K+7hE8YNbYjVirEih", + "78pYT7vxBK7YbD2aVkC4Kw", + "a5NTB6LZBO4a2Z6RkeebsY", + "411Nmuus1J2b6okQS3uSCm", + "c1+P7wcW9K3oQyAJA29gUv", + "aaIQpgppxE1Lw8V2w48d1u", + "43d8C6FvFMF48NKdshSvDB", + "a5O+jG/8JF/bXXMh61VbrP", + "ecZU+ZNaxJvovWhjTwolW3", + "1eUcABlmZJH62rOyXieYFR", + "9ah+lyxSVO6Jf1EY5aebLK", + "6bCpWS8ktAfIpBUoWywuvF", + "beOm6xY9JGcpUIgHepr4za", + "05VwVz2ohMvbMUbFxpVLs6", + "a0jBYkupRJ1qUCnIBv+/lY", + "99Fe5tv8pMaYMcXAIOO6ZV", + "68QXyex9ZCjpGvlESAcHm3", + "a7NUURWktGVbn5uaL7RgDc", + "cfD+6eekJE44Ilk2xG5ORu", + "83fdXjJEdM1rCZghbgf9lv", + "ddR9GXKuBKg5J0qSoBz++j", + "cf4fwLe4hJXLYT5vY7WfC9", + "e2e0crkOLxGrpMxpbC4iQg1", + "8ak5WlHVBELqSzRzcpZa3P", + "10unPSfi1NUb30N1EjhieB", + "791LpnRkFNkqdfpCoJ3Pqk", + "25sjQHSA5NIp1hpdb709QK", + "a2Zfykcl1GPqJhA7ixiKd3", + "7dABu6LfBPVrHU5tOjT7Yt", + "fe7qLOC0RM9qPt+IfQpa5W", + "a5esZu+45LA5mBpvttspPD", + "78Sk802p9L/Ip+ZPEFbJnp", + "97jJpx7PFP3KaIhLHDBrwq", + "d7dz5M5UZGWb3XdTtMwKTr", + "7aHus20CdIdKqjCIenHMeT", + "e7rE7SX3NEO4r7RpytIx+t", + "5dxBdyCr9Dd7WMwsS/0Owj", + "71eI6ngRxMA6nFaij/GBBF", + "beznsQjCxCtaZomqE1pDGy", + "b6hiMN2zdAPaO/y3rVlPza", + "70apjsnQBN249r+rDiKX/Y", + "511DaNWh9Ohr98Kalp9ks0", + "e5aH69dP9BjJ/ukTGlCY0Y", + "ab0tTP+pdD+r9bkbDgZ9fW", + "b27nw9ve5B4bPWpqO7C9jc", + "55syHdG2ZFQ5Dec33yZv+A", + "43sQIfSlBMKLVgdAyVPyKa", + "2cGrHujJVA34tqJm2TGwyQ", + "02JjAR2ZJDAbicO31iHLkf", + "fbh7SPleBD6KVwUX8ZUj+X", + "2aNn6Sp+9EV6/jqnQHlgO7", + "e8vFiagHpOlbjZpOXvj4uY", + "c66oAP5cRGapKiGfe74FLx", + "80QPlOdIJPoaH2q0H9durZ", + "3b6z53P9FDL6t0qWgOypyL", + "bdRIfCxsZBpLpMK3p5LzXO", + "70fbQFBo9BZaP/ZkWZXBjM", + "91qNPc3sxBZ6JcGgZJDBQM", + "d5QthFBvVAEYiF3lbXEO8F", + "b8f7FhnSVD4YdOyVdiaS8w", + "8cNFzZjThDZaGgrbxOSrWB", + "7d1vUTNeFLTb9hNFhXVp/C", + "93t002hjND8buKwEPg+F3u", + "5amSja35NLD4ebpu3Mgnhg", + "84UeR6Ro5Po5QNQV5Gg77A", + "e1voegXqFG7pcNFtBwd4RM", + "04tiFXp89GYILbewpFP54c", + "59+YnTBw9LKZd7b+qWv/ih", + "b0XjY3oxhLw6l5Sjbdlto4", + "19+GdlQVtJM55xDuYFBJSn", + "3dSvloeRtIOJAHgqIMN6i/", + "520mTZlWxGjYT8kO8KuWFE", + "b0VHqWWqlJ4qVyuwnLGCWw", + "eaAriLn6lM7LJABLBD4gyz", + "69bPCjVe5BGIGbgKh+50GP", + "8fIUbpCjhI5r01JqiMBRub", + "2eH25neF1OPpiUrRs0iclr", + "77Sz5BJUNPuKegHwLRTEgB", + "90VKWL28VHGI+9G/Lyjx7J", + "f2jYVTr2JG+Y8YU6GVLu6Q", + "f3FczQgmBEKYMOG0HFiikL", + "ddGBD4OnREPJIXFn4CseMp", + "5a+WTpsZ5GtZFgHGCiqy6C", + "55FH2q1HJAyK0hrjxGH/+q", + "6e23Z/yUFNubl4VhXw5FYi", + "8cHLW+leJPrYWJz1oiW3Dv", + "8couZL4/FBFKM+JgUeuasH", + "eaMjyWG49J6ZlTWxk+SGka", + "60FBLrGapL3ZNvOocVmLmq", + "9eIdQnGcxCEqicDOS7Qg4y", + "1dH+troCBMIbpbgd3McLPt", + "8fvfWDa09MYYcHQ4OIBxKu", + "b0mmOMONJJvoRDWLYc61sd", + "fb2IxHCVJB1pNjBteXpqeG", + "d4/hA8N+FI0KcZjNQ1RrNS", + "5fanACpyFCUo0UbqRf7tLn", + "32cL83sWpL0Lze4W/zYsyF", + "8fkOKPwsVKe57ro9Nkm2HD", + "75MWyDslJKCpuJ0hRH1qJ2", + "12VNTtvqlNKpsp4ieOSc76", + "e8S/Fw5hVDcZEIoedcUoA5", + "dcgQGtJrNFSYN55RWmFdRC", + "8b7qI3tpdIOpM8Dkqyts5Q", + "6bsIvUFUJLAYN2SirToqDt", + "e5yAZJu+ROpL81xp1CIKMj", + "09m8QMoFRFDqRDSNnesXNu", + "29v/tk/KNLMJ2fU/34y2az" + ] +} diff --git a/local/settings.json b/local/settings.json new file mode 100644 index 0000000..0a30162 --- /dev/null +++ b/local/settings.json @@ -0,0 +1,7 @@ +{ + "use-global-engine-setting": true, + "use-default-js-engine": true, + "js-engine-path": "", + "use-default-cpp-engine": true, + "cpp-engine-path": "" +} diff --git a/packages/字体精简工具/dist/index.js b/packages/字体精简工具/dist/index.js new file mode 100644 index 0000000..08bc975 --- /dev/null +++ b/packages/字体精简工具/dist/index.js @@ -0,0 +1 @@ +global.pluginNodeModulesPath=Editor.url("packages://mini_font/node_modules"),global.pluginDistPath="packages://mini_font/dist";var t=Editor.url("packages://mini_font/libs/fixrequire.js");t&&""!==t&&require(t);var e=require("fs"),n=require("path");function i(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=i(e),a=i(n),r=require("fontmin"),o=function(){this.input_path="",this.out_path="",this.text_content="",this.text_content2="",this.switch_number=!0,this.switch_lowercase_letters=!0,this.switch_capital_letters=!0,this.switch_symbol_letters=!0,this.switch_find_ts=!0,this.switch_find_js=!0,this.switch_find_json=!0},_=["0","1","2","3","4","5","6","7","8","9"],c=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],h=['!@#$%^&*()_+;.,<>:"{}[]=-|`'],u=function(){function t(){}return t.init=function(t){var e=this;this.panel_context=t,this.cfg_path=Editor.Project.path+"/settings/font_cfg.json",s.existsSync(this.cfg_path)?this.setting_data=JSON.parse(s.readFileSync(this.cfg_path,"utf-8").toString()):this.setting_data=new o,this.read_path(),this.panel_context.$btn_find.addEventListener("confirm",(function(){e.panel_context.$text_content2.value="";var t="";e.dir(Editor.Project.path+"/assets",(function(n){var i=function(n){s.readFile(n,(function(n,i){if(n)Editor.error(n);else for(var s=i.toString(),a=0;a=0){var s=Editor.remote.assetdb.fspathToUrl(i.path);Editor.remote.assetdb.refresh(s)}e.save()}}))}else Editor.warn("\u8f93\u51fa\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a!");else Editor.warn("\u8f93\u5165\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a!");else Editor.warn("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a!")}))},t.save=function(){this.setting_data.text_content=this.panel_context.$text_content.value,this.setting_data.text_content2=this.panel_context.$text_content2.value,this.setting_data.switch_number=this.panel_context.$switch_number.value,this.setting_data.switch_symbol_letters=this.panel_context.$switch_symbol_letters.value,this.setting_data.switch_capital_letters=this.panel_context.$switch_capital_letters.value,this.setting_data.switch_lowercase_letters=this.panel_context.$switch_lowercase_letters.value,this.setting_data.switch_find_js=this.panel_context.$switch_find_js.value,this.setting_data.switch_find_json=this.panel_context.$switch_find_json.value,this.setting_data.switch_find_ts=this.panel_context.$switch_find_ts.value,s.writeFile(this.cfg_path,JSON.stringify(this.setting_data),(function(t){t&&Editor.error(t)}))},t.read_path=function(){this.panel_context.$input_path.value=this.setting_data.input_path,this.panel_context.$out_path.value=this.setting_data.out_path,this.panel_context.$text_content.value=this.setting_data.text_content,this.panel_context.$text_content2.value=this.setting_data.text_content2,this.panel_context.$switch_number.value=this.setting_data.switch_number,this.panel_context.$switch_symbol_letters.value=this.setting_data.switch_symbol_letters,this.panel_context.$switch_capital_letters.value=this.setting_data.switch_capital_letters,this.panel_context.$switch_lowercase_letters.value=this.setting_data.switch_lowercase_letters,this.panel_context.$switch_find_js.value=this.setting_data.switch_find_js,this.panel_context.$switch_find_json.value=this.setting_data.switch_find_json,this.panel_context.$switch_find_ts.value=this.setting_data.switch_find_ts},t.check_number=function(t){for(var e=0;e<_.length;e++){var n=_[e];this.panel_context.$switch_number.value&&-1===t.indexOf(n)&&(t+=n)}return t},t.check_lowercase_letters=function(t){for(var e=0;e\r\n\r\n\r\n \r\n \u5b57\u4f53\u7626\u8eab\u5de5\u5177\r\n\r\n\r\n
\r\n
\u8f93\u5165\u8def\u5f84
\r\n \r\n \u9009\u62e9\r\n
\r\n\r\n
\r\n
\u8f93\u51fa\u8def\u5f84
\r\n \r\n \u9009\u62e9\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n \r\n
\u67e5\u627e\u5f53\u524d\u9879\u76ee\u4e2d\u6240\u6709\u6c49\u5b57
\r\n
\r\n json\r\n ts\r\n js\r\n \u67e5\u627e\r\n
\r\n
\r\n
\r\n
\r\n\x3c!--clear both\u89e3\u51b3float\u7684\u9519\u4e71\u95ee\u9898--\x3e\r\n
\r\n
\r\n \u6570\u5b57\r\n \u5927\u5199\u5b57\u6bcd\r\n \u5c0f\u5199\u5b57\u6bcd\r\n \u7b26\u53f7\r\n
\r\n
\r\n \u751f\u6210\r\n
\r\n\r\n\r\n\r\n',$:{input_path:"#input_path",out_path:"#out_path",btn_input_path:"#btn_input_path",btn_out_path:"#btn_out_path",text_content:"#text_content",text_content2:"#text_content2",btn_ok:"#btn_ok",btn_find:"#btn_find",switch_number:"#switch_number",switch_lowercase_letters:"#switch_lowercase_letters",switch_capital_letters:"#switch_capital_letters",switch_symbol_letters:"#switch_symbol_letters",switch_find_js:"#switch_find_js",switch_find_ts:"#switch_find_ts",switch_find_json:"#switch_find_json"},ready:function(){u.init(this)},messages:{}}); diff --git a/packages/字体精简工具/dist/main.js b/packages/字体精简工具/dist/main.js new file mode 100644 index 0000000..d8d839e --- /dev/null +++ b/packages/字体精简工具/dist/main.js @@ -0,0 +1 @@ +global.pluginNodeModulesPath=Editor.url("packages://mini_font/node_modules"),global.pluginDistPath="packages://mini_font/dist";var e=Editor.url("packages://mini_font/libs/fixrequire.js");e&&""!==e&&require(e),Object.defineProperty(exports,"__esModule",{value:!0});var o={open:function(){Editor.Panel.open("mini_font")}};exports.load=function(){},exports.messages=o,exports.unload=function(){}; diff --git a/packages/字体精简工具/libs/fixrequire.js b/packages/字体精简工具/libs/fixrequire.js new file mode 100644 index 0000000..29a85ee --- /dev/null +++ b/packages/字体精简工具/libs/fixrequire.js @@ -0,0 +1,61 @@ +// 'index.' character codes +if (Editor.remote.App.version === "2.4.5") return; +const pluginDistPath = Editor.url(global.pluginDistPath); +const Module = require.main.constructor; +const NativeModule = process.NativeModule; +const pluginNodeModulesPath = global.pluginNodeModulesPath; +// const panelId +if (!process.mainModule.paths.includes(pluginNodeModulesPath)) { + process.mainModule.paths.push(pluginNodeModulesPath) +} +Module._resolveFilename = function(request, parent, isMain, options) { + if (NativeModule.canBeRequiredByUsers(request)) { + return request; + } + + var paths; + + if (typeof options === 'object' && options !== null && + Array.isArray(options.paths)) { + const fakeParent = new Module('', null); + + paths = []; + + for (var i = 0; i < options.paths.length; i++) { + const path = options.paths[i]; + fakeParent.paths = Module._nodeModulePaths(path); + const lookupPaths = Module._resolveLookupPaths(request, fakeParent, true); + + for (var j = 0; j < lookupPaths.length; j++) { + if (!paths.includes(lookupPaths[j])) + paths.push(lookupPaths[j]); + } + } + } else { + paths = Module._resolveLookupPaths(request, parent, true); + } + + // Look up the filename first, since that's the cache key. + let filename = Module._findPath(request, paths, isMain); + if (!filename) { + //找不到,尝试去插件目录找啊--------- + filename = Module._findPath(request, [pluginDistPath], isMain); + if (!filename) { + const requireStack = []; + for (var cursor = parent; cursor; cursor = cursor.parent) { + requireStack.push(cursor.filename || cursor.id); + } + let message = `Cannot find module '${request}'`; + if (requireStack.length > 0) { + message = message + '\nRequire stack:\n- ' + requireStack.join('\n- '); + } + // eslint-disable-next-line no-restricted-syntax + var err = new Error(message); + err.code = 'MODULE_NOT_FOUND'; + err.requireStack = requireStack; + throw err; + } + + } + return filename; +}; \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/.bin/fontmin b/packages/字体精简工具/node_modules/.bin/fontmin new file mode 100644 index 0000000..f438a7e --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/fontmin @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../fontmin/cli.js" "$@" + ret=$? +else + node "$basedir/../fontmin/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/fontmin.cmd b/packages/字体精简工具/node_modules/.bin/fontmin.cmd new file mode 100644 index 0000000..76cd84f --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/fontmin.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\fontmin\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/fontmin.ps1 b/packages/字体精简工具/node_modules/.bin/fontmin.ps1 new file mode 100644 index 0000000..c4a740f --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/fontmin.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../fontmin/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../fontmin/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/mkdirp b/packages/字体精简工具/node_modules/.bin/mkdirp new file mode 100644 index 0000000..bcd333f --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/mkdirp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/mkdirp.cmd b/packages/字体精简工具/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..c2c9350 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/mkdirp.ps1 b/packages/字体精简工具/node_modules/.bin/mkdirp.ps1 new file mode 100644 index 0000000..35ce690 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/mkdirp.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/node-gyp b/packages/字体精简工具/node_modules/.bin/node-gyp new file mode 100644 index 0000000..68303f9 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/node-gyp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../node-gyp/bin/node-gyp.js" "$@" + ret=$? +else + node "$basedir/../node-gyp/bin/node-gyp.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/node-gyp.cmd b/packages/字体精简工具/node_modules/.bin/node-gyp.cmd new file mode 100644 index 0000000..9025417 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/node-gyp.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\node-gyp\bin\node-gyp.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/node-gyp.ps1 b/packages/字体精简工具/node_modules/.bin/node-gyp.ps1 new file mode 100644 index 0000000..5367845 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/node-gyp.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../node-gyp/bin/node-gyp.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/nopt b/packages/字体精简工具/node_modules/.bin/nopt new file mode 100644 index 0000000..e658aac --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/nopt @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@" + ret=$? +else + node "$basedir/../nopt/bin/nopt.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/nopt.cmd b/packages/字体精简工具/node_modules/.bin/nopt.cmd new file mode 100644 index 0000000..c92ec03 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/nopt.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\nopt\bin\nopt.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/nopt.ps1 b/packages/字体精简工具/node_modules/.bin/nopt.ps1 new file mode 100644 index 0000000..68c40bf --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/nopt.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../nopt/bin/nopt.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/rimraf b/packages/字体精简工具/node_modules/.bin/rimraf new file mode 100644 index 0000000..a3e9f71 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/rimraf @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../rimraf/bin.js" "$@" + ret=$? +else + node "$basedir/../rimraf/bin.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/rimraf.cmd b/packages/字体精简工具/node_modules/.bin/rimraf.cmd new file mode 100644 index 0000000..698f4ba --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/rimraf.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\rimraf\bin.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/rimraf.ps1 b/packages/字体精简工具/node_modules/.bin/rimraf.ps1 new file mode 100644 index 0000000..a244a80 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/rimraf.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../rimraf/bin.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/semver b/packages/字体精简工具/node_modules/.bin/semver new file mode 100644 index 0000000..10497aa --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/semver @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/semver.cmd b/packages/字体精简工具/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..eb3aaa1 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/semver.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\semver\bin\semver" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/semver.ps1 b/packages/字体精简工具/node_modules/.bin/semver.ps1 new file mode 100644 index 0000000..a3315ff --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/semver.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../semver/bin/semver" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-conv b/packages/字体精简工具/node_modules/.bin/sshpk-conv new file mode 100644 index 0000000..91957fa --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-conv @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-conv" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-conv" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-conv.cmd b/packages/字体精简工具/node_modules/.bin/sshpk-conv.cmd new file mode 100644 index 0000000..42f9ce4 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-conv.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\sshpk\bin\sshpk-conv" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-conv.ps1 b/packages/字体精简工具/node_modules/.bin/sshpk-conv.ps1 new file mode 100644 index 0000000..d27c311 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-conv.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../sshpk/bin/sshpk-conv" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-sign b/packages/字体精简工具/node_modules/.bin/sshpk-sign new file mode 100644 index 0000000..0dd7644 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-sign @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-sign" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-sign" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-sign.cmd b/packages/字体精简工具/node_modules/.bin/sshpk-sign.cmd new file mode 100644 index 0000000..17f60de --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-sign.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\sshpk\bin\sshpk-sign" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-sign.ps1 b/packages/字体精简工具/node_modules/.bin/sshpk-sign.ps1 new file mode 100644 index 0000000..10d9186 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-sign.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../sshpk/bin/sshpk-sign" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-verify b/packages/字体精简工具/node_modules/.bin/sshpk-verify new file mode 100644 index 0000000..04f5d05 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-verify @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../sshpk/bin/sshpk-verify" "$@" + ret=$? +else + node "$basedir/../sshpk/bin/sshpk-verify" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-verify.cmd b/packages/字体精简工具/node_modules/.bin/sshpk-verify.cmd new file mode 100644 index 0000000..4b81f35 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-verify.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\sshpk\bin\sshpk-verify" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/sshpk-verify.ps1 b/packages/字体精简工具/node_modules/.bin/sshpk-verify.ps1 new file mode 100644 index 0000000..d5a23e2 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/sshpk-verify.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../sshpk/bin/sshpk-verify" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/strip-indent b/packages/字体精简工具/node_modules/.bin/strip-indent new file mode 100644 index 0000000..0f0810a --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/strip-indent @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../strip-indent/cli.js" "$@" + ret=$? +else + node "$basedir/../strip-indent/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/strip-indent.cmd b/packages/字体精简工具/node_modules/.bin/strip-indent.cmd new file mode 100644 index 0000000..a5c6285 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/strip-indent.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\strip-indent\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/strip-indent.ps1 b/packages/字体精简工具/node_modules/.bin/strip-indent.ps1 new file mode 100644 index 0000000..2185fab --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/strip-indent.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../strip-indent/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../strip-indent/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/ttf2woff2 b/packages/字体精简工具/node_modules/.bin/ttf2woff2 new file mode 100644 index 0000000..b052887 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/ttf2woff2 @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@" + ret=$? +else + node "$basedir/../ttf2woff2/bin/ttf2woff2.js" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/ttf2woff2.cmd b/packages/字体精简工具/node_modules/.bin/ttf2woff2.cmd new file mode 100644 index 0000000..6d46365 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/ttf2woff2.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\ttf2woff2\bin\ttf2woff2.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/ttf2woff2.ps1 b/packages/字体精简工具/node_modules/.bin/ttf2woff2.ps1 new file mode 100644 index 0000000..18d64b3 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/ttf2woff2.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../ttf2woff2/bin/ttf2woff2.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/which b/packages/字体精简工具/node_modules/.bin/which new file mode 100644 index 0000000..12cde79 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/which @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../which/bin/which" "$@" + ret=$? +else + node "$basedir/../which/bin/which" "$@" + ret=$? +fi +exit $ret diff --git a/packages/字体精简工具/node_modules/.bin/which.cmd b/packages/字体精简工具/node_modules/.bin/which.cmd new file mode 100644 index 0000000..0664965 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/which.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\which\bin\which" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/packages/字体精简工具/node_modules/.bin/which.ps1 b/packages/字体精简工具/node_modules/.bin/which.ps1 new file mode 100644 index 0000000..d023170 --- /dev/null +++ b/packages/字体精简工具/node_modules/.bin/which.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../which/bin/which" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../which/bin/which" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/CHANGELOG.md b/packages/字体精简工具/node_modules/@ailhc/egf-core/CHANGELOG.md new file mode 100644 index 0000000..f198788 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/CHANGELOG.md @@ -0,0 +1,140 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [1.2.4](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.3...@ailhc/egf-core@1.2.4) (2021-05-15) + + +### Bug Fixes + +* 修复iife规范的.d.ts声明错误 ([5deed01](https://github.com/AILHC/EasyGameFrameworkOpen/commit/5deed01795ca4abab2bbafbb7b55664d4d23be8f)) + + + + + +## [1.2.3](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.2...@ailhc/egf-core@1.2.3) (2021-05-09) + +**Note:** Version bump only for package @ailhc/egf-core + + + + + +## [1.2.2](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.1...@ailhc/egf-core@1.2.2) (2021-04-23) + + +### Bug Fixes + +* 重新导出,修复声明识别错误的问题 ([4139c9e](https://github.com/AILHC/EasyGameFrameworkOpen/commit/4139c9ece90ef11d12374a42065bf89ebe44d053)) + + + + + +## [1.2.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.2.0...@ailhc/egf-core@1.2.1) (2021-03-31) + + +### Bug Fixes + +* 修复package.json的exports字段,这会导致cocoscreator2.4.5import报错 ([6c22d71](https://github.com/AILHC/EasyGameFrameworkOpen/commit/6c22d71f6f32ec566b95e7b299ec91e732e99585)) + + + + + +# [1.2.0](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.4...@ailhc/egf-core@1.2.0) (2021-03-27) + + +### Features + +* 多入口编译支持 ([fb7a70f](https://github.com/AILHC/EasyGameFrameworkOpen/commit/fb7a70f11d77ede4938b72931e9aac63b059e500)) + + + + + +## [1.1.4](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.3...@ailhc/egf-core@1.1.4) (2021-02-21) + + +### Bug Fixes + +* 修复构建出iife规范的bug ([dc435c8](https://github.com/AILHC/EasyGameFrameworkOpen/commit/dc435c8ed264447b8a80263e7d157b1576c414b3)) + + + + + +## [1.1.3](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.2...@ailhc/egf-core@1.1.3) (2021-02-18) + +**Note:** Version bump only for package @ailhc/egf-core + + + + + +## [1.1.2](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.1...@ailhc/egf-core@1.1.2) (2021-02-15) + + +### Bug Fixes + +* 修复状态切换bug setState 增加切换状态判断 ([52cd947](https://github.com/AILHC/EasyGameFrameworkOpen/commit/52cd947c6532cb811ec6fc9ac8cbd449b079e580)) + + + + + +## [1.1.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.1.0...@ailhc/egf-core@1.1.1) (2021-02-15) + +**Note:** Version bump only for package @ailhc/egf-core + + + + + +# [1.1.0](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.0.1...@ailhc/egf-core@1.1.0) (2021-02-07) + + +### Features + +* 同时支持CommonJs和ES Modules ([409a819](https://github.com/AILHC/EasyGameFrameworkOpen/commit/409a819cfca6808a4070abcbc8acc80a2caf1c84)) + + + + + +## [1.0.1](https://github.com/AILHC/EasyGameFrameworkOpen/compare/@ailhc/egf-core@1.0.0...@ailhc/egf-core@1.0.1) (2021-02-07) + +**Note:** Version bump only for package @ailhc/egf-core + + + + + + + +# 1.0.0 (2021-01-27) +1. 去掉proxy + +# 0.1.6 (2020-12-02) +1. 修改类型声明使getModule也能有更好的类型提示 + +# 0.1.5 (2020-11-25) +更新iife的声明文件 +删除多余的声明文件 + +# 0.1.4 (2020-11-25) +重新发布,更新github地址 + +# 0.1.3 (2020-11-25) +重新发布,更新声明文件 + +# 0.1.2 (2020-10-07) +移除加载子程序的逻辑,整理声明文件 + +# 0.0.1 (2020-10-07) +完善iife格式的声明文件 + +# 0.0.1 (2020-10-07) +第一次发布 diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/LICENSE b/packages/字体精简工具/node_modules/@ailhc/egf-core/LICENSE new file mode 100644 index 0000000..5b70f4a --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 AILHC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/README.md b/packages/字体精简工具/node_modules/@ailhc/egf-core/README.md new file mode 100644 index 0000000..0cc7a29 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/README.md @@ -0,0 +1,119 @@ +# `@ailhc/egf-core` + +## 简介 + +EasyGameFramework 的核心模块,用于H5游戏/应用程序的渐进式模块化开发 + +EasyGameFramework core module for progressive modular development of H5 games/applications +## 特性 +1. 模块注册、初始化管理机制 +2. 智能提示 + +## Demo + +1. [CocosCreator2.4.2 模板](https://github.com/AILHC/egf-ccc-empty) +2. [CocosCreator3D 1.2 模板](https://github.com/AILHC/egf-ccc3d-empty) (ps:使用systemjs+插件模式使用) +3. [CocosCreator3.0 模板](https://github.com/AILHC/egf-ccc3-empty) (ps:使用npm方式使用) +4. [Egret 5.3 支持npm的模板](https://github.com/AILHC/egf-egret-empty) +5. [Laya 2.7.1 支持npm的模板](https://github.com/AILHC/egf-laya-empty) + +## 使用 +0. 安装 + + 通过npm安装 + npm install @ailhc/egf-core + + 如果支持使用npm模块,则 通过导入npm模块的方式 + ```ts + import { App } from "@ailhc/egf-core" + + ``` + 如果不支持,则使用dist下的iife格式,声明文件则需要自己整理一下 + 或者直接复制src下的源码 + +1. 基础使用 + ```ts + export class XXXLoader implements egf.IBootLoader { + onBoot(app: egf.IApp, bootEnd: egf.BootEndCallback): void { + app.loadModule(moduleIns,"moduleName"); + bootEnd(true); + } + + } + + import { App } from "@ailhc/egf-core" + const app = new App(); + //启动 + app.bootstrap([new XXXLoader()]); + //初始化 + app.init(); + ``` +2. 智能提示和接口提示 + ```ts + //智能提示的基础,可以在任意模块文件里进行声明比如 + //ModuleA.ts + declare global { + interface IModuleMap { + moduleAName :IXXXModuleA + } + } + //ModuleB.ts + declare global { + interface IModuleMap { + moduleBName :IXXXModuleB + } + } + + const app = new App(); + //在运行时也可调用,这里的moduleIns可以是任意实例,moduleName可以有智能提示 + app.loadModule(moduleIns,"moduleName"); + ``` +3. 全局模块调用 + ```ts + // 可以将模块实例的字典赋值给全局的对象,比如 + //setModuleMap.ts + export let m: IModuleMap; + export function setModuleMap(moduleMap: IModuleMap) { + m = moduleMap; + } + //AppMain.ts + import { setModuleMap, m } from "./ModuleMap"; + + setModuleMap(app.moduleMap); + + //在别的逻辑里可以通过 + import { m } from "./ModuleMap"; + //调用模块逻辑 + m.moduleA.doSometing() + ``` +## [CHANGELOG](packages/core/CHANGELOG.md) + +## 我在哪? + +**游戏开发之路有趣但不易,** + +**玩起来才能一直热情洋溢。** + +关注我, 一起玩转游戏开发! + +你的关注是我持续更新的动力~ + +让我们在这游戏开发的道路上并肩前行 + +在以下这些渠道可以找到我和我的创作: + +公众号搜索:玩转游戏开发 + +或扫码:img + + + +一起讨论技术的 QQ 群: 1103157878 + + + +博客主页: https://pgd.vercel.app/ + +掘金: https://juejin.cn/user/3069492195769469 + +github: https://github.com/AILHC \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.js new file mode 100644 index 0000000..e2584c3 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.js @@ -0,0 +1,215 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var App = (function () { + function App() { + this._state = 0; + this._moduleMap = {}; + } + Object.defineProperty(App.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(App.prototype, "moduleMap", { + get: function () { + return this._moduleMap; + }, + enumerable: false, + configurable: true + }); + App.prototype.bootstrap = function (bootLoaders) { + return __awaiter(this, void 0, void 0, function () { + var bootPromises, _loop_1, i, e_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState(App.BOOTING); + if (!bootLoaders || bootLoaders.length <= 0) { + this.setState(App.BOOTEND); + return [2, true]; + } + if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4]; + bootPromises = []; + _loop_1 = function (i) { + var bootLoader = bootLoaders[i]; + bootPromises.push(new Promise(function (res, rej) { + bootLoader.onBoot(_this, function (isOk) { + if (isOk) { + res(); + } + else { + rej(); + } + }); + })); + }; + for (i = 0; i < bootLoaders.length; i++) { + _loop_1(i); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4, Promise.all(bootPromises)]; + case 2: + _a.sent(); + this.setState(App.BOOTEND); + return [2, true]; + case 3: + e_1 = _a.sent(); + console.error(e_1); + this.setState(App.BOOTEND); + return [2, false]; + case 4: return [2]; + } + }); + }); + }; + App.prototype.init = function () { + var moduleMap = this._moduleMap; + var moduleIns; + if (this.state === App.RUNING) + return; + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onInit && moduleIns.onInit(this); + } + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onAfterInit && moduleIns.onAfterInit(this); + } + this.setState(App.RUNING); + }; + App.prototype.loadModule = function (moduleIns, key) { + if (this._state === App.STOP) + return false; + var res = false; + if (!key) { + key = moduleIns.key; + } + if (key && typeof key === "string") { + if (moduleIns) { + if (!this._moduleMap[key]) { + this._moduleMap[key] = moduleIns; + res = true; + if (this._state === App.RUNING) { + moduleIns.onInit && moduleIns.onInit(this); + moduleIns.onAfterInit && moduleIns.onAfterInit(); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A"); + } + return res; + }; + App.prototype.hasModule = function (moduleKey) { + return !!this._moduleMap[moduleKey]; + }; + App.prototype.stop = function () { + var moduleMap = this._moduleMap; + var moduleIns; + this.setState(App.STOP); + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onStop && moduleIns.onStop(); + } + }; + App.prototype.getModule = function (moduleKey) { + return this._moduleMap[moduleKey]; + }; + App.prototype.setState = function (state) { + if (!isNaN(this._state)) { + if (this._state >= state) + return; + } + this._state = state; + }; + App.prototype._log = function (msg, level) { + switch (level) { + case 1: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + case 2: + console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + default: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + } + }; + App.UN_RUN = 0; + App.BOOTING = 1; + App.BOOTEND = 2; + App.RUNING = 3; + App.STOP = 4; + return App; +}()); + +exports.App = App; + + +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIkBhaWxoYy9lZ2YtY29yZS9zcmMvZWdmLWFwcC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgQXBwPE1vZHVsZU1hcCA9IGFueT4gaW1wbGVtZW50cyBlZ2YuSUFwcDxNb2R1bGVNYXA+IHtcbiAgICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IFVOX1JVTjogbnVtYmVyID0gMDtcbiAgICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IEJPT1RJTkc6IG51bWJlciA9IDE7XG4gICAgcHVibGljIHN0YXRpYyByZWFkb25seSBCT09URU5EOiBudW1iZXIgPSAyO1xuICAgIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgUlVOSU5HOiBudW1iZXIgPSAzO1xuICAgIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgU1RPUDogbnVtYmVyID0gNDtcbiAgICBwcm90ZWN0ZWQgX3N0YXRlOiBudW1iZXIgPSAwO1xuICAgIHByb3RlY3RlZCBfbW9kdWxlTWFwOiB7IFtrZXk6IHN0cmluZ106IGVnZi5JTW9kdWxlIH0gPSB7fTtcbiAgICBwdWJsaWMgZ2V0IHN0YXRlKCk6IG51bWJlciB7XG4gICAgICAgIHJldHVybiB0aGlzLl9zdGF0ZTtcbiAgICB9XG4gICAgcHVibGljIGdldCBtb2R1bGVNYXAoKTogTW9kdWxlTWFwIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX21vZHVsZU1hcCBhcyBhbnk7XG4gICAgfVxuICAgIHB1YmxpYyBhc3luYyBib290c3RyYXAoYm9vdExvYWRlcnM/OiBlZ2YuSUJvb3RMb2FkZXJbXSk6IFByb21pc2U8Ym9vbGVhbj4ge1xuICAgICAgICB0aGlzLnNldFN0YXRlKEFwcC5CT09USU5HKTtcbiAgICAgICAgaWYgKCFib290TG9hZGVycyB8fCBib290TG9hZGVycy5sZW5ndGggPD0gMCkge1xuICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShBcHAuQk9PVEVORCk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYm9vdExvYWRlcnMgJiYgYm9vdExvYWRlcnMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgY29uc3QgYm9vdFByb21pc2VzOiBQcm9taXNlPHZvaWQ+W10gPSBbXTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYm9vdExvYWRlcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBib290TG9hZGVyOiBlZ2YuSUJvb3RMb2FkZXIgPSBib290TG9hZGVyc1tpXTtcbiAgICAgICAgICAgICAgICBib290UHJvbWlzZXMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgbmV3IFByb21pc2UoKHJlcywgcmVqKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBib290TG9hZGVyLm9uQm9vdCh0aGlzIGFzIGFueSwgKGlzT2spID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWooKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBQcm9taXNlLmFsbChib290UHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoQXBwLkJPT1RFTkQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShBcHAuQk9PVEVORCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIGluaXQoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IG1vZHVsZU1hcCA9IHRoaXMuX21vZHVsZU1hcDtcbiAgICAgICAgbGV0IG1vZHVsZUluczogZWdmLklNb2R1bGU7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlID09PSBBcHAuUlVOSU5HKSByZXR1cm47XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIG1vZHVsZU1hcCkge1xuICAgICAgICAgICAgbW9kdWxlSW5zID0gbW9kdWxlTWFwW2tleV07XG4gICAgICAgICAgICBtb2R1bGVJbnMub25Jbml0ICYmIG1vZHVsZUlucy5vbkluaXQodGhpcyBhcyBhbnkpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIG1vZHVsZU1hcCkge1xuICAgICAgICAgICAgbW9kdWxlSW5zID0gbW9kdWxlTWFwW2tleV07XG4gICAgICAgICAgICBtb2R1bGVJbnMub25BZnRlckluaXQgJiYgbW9kdWxlSW5zLm9uQWZ0ZXJJbml0KHRoaXMgYXMgYW55KTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNldFN0YXRlKEFwcC5SVU5JTkcpO1xuICAgIH1cbiAgICBwdWJsaWMgbG9hZE1vZHVsZShtb2R1bGVJbnM6IGFueSB8IGVnZi5JTW9kdWxlLCBrZXk/OiBrZXlvZiBNb2R1bGVNYXApOiBib29sZWFuIHtcbiAgICAgICAgaWYgKHRoaXMuX3N0YXRlID09PSBBcHAuU1RPUCkgcmV0dXJuIGZhbHNlO1xuICAgICAgICBsZXQgcmVzOiBib29sZWFuID0gZmFsc2U7XG4gICAgICAgIGlmICgha2V5KSB7XG4gICAgICAgICAgICBrZXkgPSBtb2R1bGVJbnMua2V5IGFzIG5ldmVyO1xuICAgICAgICB9XG4gICAgICAgIGlmIChrZXkgJiYgdHlwZW9mIGtleSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKG1vZHVsZUlucykge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbW9kdWxlTWFwW2tleV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbW9kdWxlTWFwW2tleV0gPSBtb2R1bGVJbnM7XG4gICAgICAgICAgICAgICAgICAgIHJlcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zdGF0ZSA9PT0gQXBwLlJVTklORykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlSW5zLm9uSW5pdCAmJiBtb2R1bGVJbnMub25Jbml0KHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlSW5zLm9uQWZ0ZXJJbml0ICYmIG1vZHVsZUlucy5vbkFmdGVySW5pdCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbG9nKGDliqDovb3mqKHlnZc65qih5Z2XOiR7a2V5feW3sue7j+WtmOWcqCzkuI3ph43lpI3liqDovb1gKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX2xvZyhg5Yqg6L295qih5Z2XOuaooeWdlzoke2tleX3lrp7kvovkuLrnqbpgKTtcbiA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JQUNuQixXQUFPLEdBQVcsQ0FBQyxDQUFDO0lBQ3BCLFdBQU8sR0FBVyxDQUFDLENBQUM7SUFDcEIsVUFBTSxHQUFXLENBQUMsQ0FBQztJQUNuQixRQUFJLEdBQVcsQ0FBQyxDQUFDO0lBMkg1QyxVQUFDO0NBaElEOzs7Ozs7OzsifQ== diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.min.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.min.js new file mode 100644 index 0000000..1bca987 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/lib/index.min.js @@ -0,0 +1,16 @@ +"use strict";function t(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(a,(function(e){e?t():n()}))})))},i=0;i=t||(this._state=t)},e.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},e.UN_RUN=0,e.BOOTING=1,e.BOOTEND=2,e.RUNING=3,e.STOP=4,e}();exports.App=e; diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/types/index.d.ts b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/types/index.d.ts new file mode 100644 index 0000000..821b951 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/cjs/types/index.d.ts @@ -0,0 +1,111 @@ +declare module '@ailhc/egf-core' { + export class App implements egf.IApp { + static readonly UN_RUN: number; + static readonly BOOTING: number; + static readonly BOOTEND: number; + static readonly RUNING: number; + static readonly STOP: number; + protected _state: number; + protected _moduleMap: { + [key: string]: egf.IModule; + }; + get state(): number; + get moduleMap(): ModuleMap; + bootstrap(bootLoaders?: egf.IBootLoader[]): Promise; + init(): void; + loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean; + hasModule(moduleKey: keyof ModuleMap): boolean; + stop(): void; + getModule(moduleKey: K): ModuleMap[K]; + protected setState(state: number): void; + /** + * 输出 + * @param level 1 warn 2 error + * @param msg + */ + protected _log(msg: string, level?: number): void; + } + +} +declare module '@ailhc/egf-core' { + global { + namespace egf { + interface IModule { + /**模块名 */ + key?: string; + /** + * 当初始化时 + */ + onInit?(app: IApp): void; + /** + * 所有模块初始化完成时 + */ + onAfterInit?(app: IApp): void; + /** + * 模块停止时 + */ + onStop?(): void; + } + type BootEndCallback = (isSuccess: boolean) => void; + /** + * 引导程序 + */ + interface IBootLoader { + /** + * 引导 + * @param app + */ + onBoot(app: IApp, bootEnd: BootEndCallback): void; + } + /** + * 主程序 + */ + interface IApp { + /** + * 程序状态 + * 0 未启动 1 引导中, 2 初始化, 3 运行中 + */ + state: number; + /** + * 模块字典 + */ + moduleMap: ModuleMap; + /** + * 引导 + * @param bootLoaders + */ + bootstrap(bootLoaders: egf.IBootLoader[]): Promise; + /** + * 初始化 + */ + init(): void; + /** + * 加载模块 + * @param module + */ + loadModule(module: IModule | any, key?: keyof ModuleMap): void; + /** + * 停止 + */ + stop(): void; + /** + * 获取模块实例 + * @param moduleKey + */ + getModule(moduleKey: K): ModuleMap[K]; + /** + * 判断有没有这个模块 + * @param moduleKey + */ + hasModule(moduleKey: keyof ModuleMap): boolean; + } + } + } + export {}; + +} +declare module '@ailhc/egf-core' { + export * from '@ailhc/egf-core'; + export * from '@ailhc/egf-core'; + +} diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.min.mjs b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.min.mjs new file mode 100644 index 0000000..ea140ee --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.min.mjs @@ -0,0 +1,15 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +function t(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i=t||(this._state=t)},e.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},e.UN_RUN=0,e.BOOTING=1,e.BOOTEND=2,e.RUNING=3,e.STOP=4,e}();export{e as App}; diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.mjs b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.mjs new file mode 100644 index 0000000..d0e2f37 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/lib/index.mjs @@ -0,0 +1,211 @@ +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +var App = (function () { + function App() { + this._state = 0; + this._moduleMap = {}; + } + Object.defineProperty(App.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(App.prototype, "moduleMap", { + get: function () { + return this._moduleMap; + }, + enumerable: false, + configurable: true + }); + App.prototype.bootstrap = function (bootLoaders) { + return __awaiter(this, void 0, void 0, function () { + var bootPromises, _loop_1, i, e_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState(App.BOOTING); + if (!bootLoaders || bootLoaders.length <= 0) { + this.setState(App.BOOTEND); + return [2, true]; + } + if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4]; + bootPromises = []; + _loop_1 = function (i) { + var bootLoader = bootLoaders[i]; + bootPromises.push(new Promise(function (res, rej) { + bootLoader.onBoot(_this, function (isOk) { + if (isOk) { + res(); + } + else { + rej(); + } + }); + })); + }; + for (i = 0; i < bootLoaders.length; i++) { + _loop_1(i); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4, Promise.all(bootPromises)]; + case 2: + _a.sent(); + this.setState(App.BOOTEND); + return [2, true]; + case 3: + e_1 = _a.sent(); + console.error(e_1); + this.setState(App.BOOTEND); + return [2, false]; + case 4: return [2]; + } + }); + }); + }; + App.prototype.init = function () { + var moduleMap = this._moduleMap; + var moduleIns; + if (this.state === App.RUNING) + return; + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onInit && moduleIns.onInit(this); + } + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onAfterInit && moduleIns.onAfterInit(this); + } + this.setState(App.RUNING); + }; + App.prototype.loadModule = function (moduleIns, key) { + if (this._state === App.STOP) + return false; + var res = false; + if (!key) { + key = moduleIns.key; + } + if (key && typeof key === "string") { + if (moduleIns) { + if (!this._moduleMap[key]) { + this._moduleMap[key] = moduleIns; + res = true; + if (this._state === App.RUNING) { + moduleIns.onInit && moduleIns.onInit(this); + moduleIns.onAfterInit && moduleIns.onAfterInit(); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A"); + } + return res; + }; + App.prototype.hasModule = function (moduleKey) { + return !!this._moduleMap[moduleKey]; + }; + App.prototype.stop = function () { + var moduleMap = this._moduleMap; + var moduleIns; + this.setState(App.STOP); + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onStop && moduleIns.onStop(); + } + }; + App.prototype.getModule = function (moduleKey) { + return this._moduleMap[moduleKey]; + }; + App.prototype.setState = function (state) { + if (!isNaN(this._state)) { + if (this._state >= state) + return; + } + this._state = state; + }; + App.prototype._log = function (msg, level) { + switch (level) { + case 1: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + case 2: + console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + default: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + } + }; + App.UN_RUN = 0; + App.BOOTING = 1; + App.BOOTEND = 2; + App.RUNING = 3; + App.STOP = 4; + return App; +}()); + +export { App }; + + +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXgubWpzIiwic291cmNlcyI6WyJAYWlsaGMvZWdmLWNvcmUvc3JjL2VnZi1hcHAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIEFwcDxNb2R1bGVNYXAgPSBhbnk+IGltcGxlbWVudHMgZWdmLklBcHA8TW9kdWxlTWFwPiB7XG4gICAgcHVibGljIHN0YXRpYyByZWFkb25seSBVTl9SVU46IG51bWJlciA9IDA7XG4gICAgcHVibGljIHN0YXRpYyByZWFkb25seSBCT09USU5HOiBudW1iZXIgPSAxO1xuICAgIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgQk9PVEVORDogbnVtYmVyID0gMjtcbiAgICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IFJVTklORzogbnVtYmVyID0gMztcbiAgICBw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5ldyBQcm9taXNlKChyZXMsIHJlaikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgYm9vdExvYWRlci5vbkJvb3QodGhpcyBhcyBhbnksIChpc09rKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgYXdhaXQgUHJvbWlzZS5hbGwoYm9vdFByb21pc2VzKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKEFwcC5CT09URU5EKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGUpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoQXBwLkJPT1RFTkQpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHB1YmxpYyBpbml0KCk6IHZvaWQge1xuICAgICAgICBjb25zdCBtb2R1bGVNYXAgPSB0aGlzLl9tb2R1bGVNYXA7XG4gICAgICAgIGxldCBtb2R1bGVJbnM6IGVnZi5JTW9kdWxlO1xuICAgICAgICBpZiAodGhpcy5zdGF0ZSA9PT0gQXBwLlJVTklORykgcmV0dXJuO1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBtb2R1bGVNYXApIHtcbiAgICAgICAgICAgIG1vZHVsZUlucyA9IG1vZHVsZU1hcFtrZXldO1xuICAgICAgICAgICAgbW9kdWxlSW5zLm9uSW5pdCAmJiBtb2R1bGVJbnMub25Jbml0KHRoaXMgYXMgYW55KTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBtb2R1bGVNYXApIHtcbiAgICAgICAgICAgIG1vZHVsZUlucyA9IG1vZHVsZU1hcFtrZXldO1xuICAgICAgICAgICAgbW9kdWxlSW5zLm9uQWZ0ZXJJbml0ICYmIG1vZHVsZUlucy5vbkFmdGVySW5pdCh0aGlzIGFzIGFueSk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXRTdGF0ZShBcHAuUlVOSU5HKTtcbiAgICB9XG4gICAgcHVibGljIGxvYWRNb2R1bGUobW9kdWxlSW5zOiBhbnkgfCBlZ2YuSU1vZHVsZSwga2V5Pzoga2V5b2YgTW9kdWxlTWFwKTogYm9vbGVhbiB7XG4gICAgICAgIGlmICh0aGlzLl9zdGF0ZSA9PT0gQXBwLlNUT1ApIHJldHVybiBmYWxzZTtcbiAgICAgICAgbGV0IHJlczogYm9vbGVhbiA9IGZhbHNlO1xuICAgICAgICBpZiAoIWtleSkge1xuICAgICAgICAgICAga2V5ID0gbW9kdWxlSW5zLmtleSBhcyBuZXZlcjtcbiAgICAgICAgfVxuICAgICAgICBpZiAoa2V5ICYmIHR5cGVvZiBrZXkgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIGlmIChtb2R1bGVJbnMpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuX21vZHVsZU1hcFtrZXldKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX21vZHVsZU1hcFtrZXldID0gbW9kdWxlSW5zO1xuICAgICAgICAgICAgICAgICAgICByZXMgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fc3RhdGUgPT09IEFwcC5SVU5JTkcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZUlucy5vbkluaXQgJiYgbW9kdWxlSW5zLm9uSW5pdCh0aGlzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZUlucy5vbkFmdGVySW5pdCAmJiBtb2R1bGVJbnMub25BZnRlckluaXQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2xvZyhg5Yqg6L295qih5Z2XOuaooeWdlzoke2tleX3lt7Lnu4/lrZjlnKgs5LiN6YeN5aSN5Yqg6L29YCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9sb2coYOWKoOi9veaooeWdlzrmqKHlnZc6JHtrZXl95a6e5L6L5Li656m6YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLl9sb2coYOWKoOi9veaooeWdlzrmqKHlnZdrZXnkuLrnqbpgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzO1xuICAgIH1cbiAgICBwdWJsaWMgaGFzTW9kdWxlKG1vZHVsZUtleToga2V5b2YgTW9kdWxlTWFwKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiAhIXRoaXMuX21vZHVsZU1hcFttb2R1bGVLZXkgYXMgYW55XTtcbiAgICB9XG4gICAgcHVibGljIHN0b3AoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IG1vZHVsZU1hcCA9IHRoaXMuX21vZHVsZU1hcDtcbiAgICAgICAgbGV0IG1vZHVsZUluczogZWdmLklNb2R1bGU7XG4gICAgICAgIHRoaXMuc2V0U3RhdGUoQXBwLlNUT1ApO1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBtb2R1bGVNYXApIHtcbiAgICAgICAgICAgIG1vZHVsZUlucyA9IG1vZHVsZU1hcFtrZXldO1xuICAgICAgICAgICAgbW9kdWxlSW5zLm9uU3RvcCAmJiBtb2R1bGVJbnMub25TdG9wKCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcHVibGljIGdldE1vZHVsZTxLIGV4dGVuZHMga2V5b2YgTW9kdWxlTWFwPihtb2R1bGVLZXk6IEspOiBNb2R1bGVNYXBbS10ge1xuICAgICAgICByZXR1cm4gdGhpcy5fbW9kdWxlTWFwW21vZHVsZUtleSBhcyBhbnldIGFzIGFueTtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgc2V0U3RhdGUoc3RhdGU6IG51bWJlcikge1xuICAgICAgICBpZiAoIWlzTmFOKHRoaXMuX3N0YXRlKSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3N0YXRlID49IHN0YXRlKSByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc3RhdGUgPSBzdGF0ZTtcbiAgICB9XG4gICAgLyoqXG4gICAgICog6L6T5Ye6XG4gICAgICogQHBhcmFtIGxldmVsIDEgd2FybiAyIGVycm9yXG4gICAgICogQHBhcmFtIG1zZ1xuICAgICAqL1xuICAgIHByb3RlY3RlZCBfbG9nKG1zZzogc3RyaW5nLCBsZXZlbD86IG51bWJlcik6IHZvaWQge1xuICAgICAgICBzd2l0Y2ggKGxldmVsKSB7XG4gICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGDjgJDkuLvnqIvluo/jgJEke21zZ31gKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGDjgJDkuLvnqIvluo/jgJEke21zZ31gKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKGDjgJDkuLvnqIvluo/jgJEke21zZ31gKTtcbiAgICAgICAgICAgICAgICB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NQUFNLEdBQUcsS0FBSyxDQUFDO0tBQ3ZCO0lBTVMsa0JBQUksR0FBZCxVQUFlLEdBQVcsRUFBRSxLQUFjO1FBQ3RDLFFBQVEsS0FBSztZQUNULEtBQUssQ0FBQztnQkFDRixPQUFPLENBQUMsSUFBSSxDQUFDLG1DQUFRLEdBQUssQ0FBQyxDQUFDO2dCQUM1QixNQUFNO1lBQ1YsS0FBSyxDQUFDO2dCQUNGLE9BQU8sQ0FBQyxLQUFLLENBQUMsbUNBQVEsR0FBSyxDQUFDLENBQUM7Z0JBQzdCLE1BQU07WUFDVjtnQkFDSSxPQUFPLENBQUMsSUFBSSxDQUFDLG1DQUFRLEdBQUssQ0FBQyxDQUFDO2dCQUM1QixNQUFNO1NBQ2I7S0FDSjtJQTlIc0IsVUFBTSxHQUFXLENBQUMsQ0FBQztJQUNuQixXQUFPLEdBQVcsQ0FBQyxDQUFDO0lBQ3BCLFdBQU8sR0FBVyxDQUFDLENBQUM7SUFDcEIsVUFBTSxHQUFXLENBQUMsQ0FBQztJQUNuQixRQUFJLEdBQVcsQ0FBQyxDQUFDO0lBMkg1QyxVQUFDO0NBaElEOzs7Ozs7OzsifQ== diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/types/index.d.ts b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/types/index.d.ts new file mode 100644 index 0000000..821b951 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/es/types/index.d.ts @@ -0,0 +1,111 @@ +declare module '@ailhc/egf-core' { + export class App implements egf.IApp { + static readonly UN_RUN: number; + static readonly BOOTING: number; + static readonly BOOTEND: number; + static readonly RUNING: number; + static readonly STOP: number; + protected _state: number; + protected _moduleMap: { + [key: string]: egf.IModule; + }; + get state(): number; + get moduleMap(): ModuleMap; + bootstrap(bootLoaders?: egf.IBootLoader[]): Promise; + init(): void; + loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean; + hasModule(moduleKey: keyof ModuleMap): boolean; + stop(): void; + getModule(moduleKey: K): ModuleMap[K]; + protected setState(state: number): void; + /** + * 输出 + * @param level 1 warn 2 error + * @param msg + */ + protected _log(msg: string, level?: number): void; + } + +} +declare module '@ailhc/egf-core' { + global { + namespace egf { + interface IModule { + /**模块名 */ + key?: string; + /** + * 当初始化时 + */ + onInit?(app: IApp): void; + /** + * 所有模块初始化完成时 + */ + onAfterInit?(app: IApp): void; + /** + * 模块停止时 + */ + onStop?(): void; + } + type BootEndCallback = (isSuccess: boolean) => void; + /** + * 引导程序 + */ + interface IBootLoader { + /** + * 引导 + * @param app + */ + onBoot(app: IApp, bootEnd: BootEndCallback): void; + } + /** + * 主程序 + */ + interface IApp { + /** + * 程序状态 + * 0 未启动 1 引导中, 2 初始化, 3 运行中 + */ + state: number; + /** + * 模块字典 + */ + moduleMap: ModuleMap; + /** + * 引导 + * @param bootLoaders + */ + bootstrap(bootLoaders: egf.IBootLoader[]): Promise; + /** + * 初始化 + */ + init(): void; + /** + * 加载模块 + * @param module + */ + loadModule(module: IModule | any, key?: keyof ModuleMap): void; + /** + * 停止 + */ + stop(): void; + /** + * 获取模块实例 + * @param moduleKey + */ + getModule(moduleKey: K): ModuleMap[K]; + /** + * 判断有没有这个模块 + * @param moduleKey + */ + hasModule(moduleKey: keyof ModuleMap): boolean; + } + } + } + export {}; + +} +declare module '@ailhc/egf-core' { + export * from '@ailhc/egf-core'; + export * from '@ailhc/egf-core'; + +} diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.d.ts b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.d.ts new file mode 100644 index 0000000..2436145 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.d.ts @@ -0,0 +1,116 @@ +declare module 'egfCore' { + class App implements egf.IApp { + static readonly UN_RUN: number; + static readonly BOOTING: number; + static readonly BOOTEND: number; + static readonly RUNING: number; + static readonly STOP: number; + protected _state: number; + protected _moduleMap: { + [key: string]: egf.IModule; + }; + get state(): number; + get moduleMap(): ModuleMap; + bootstrap(bootLoaders?: egf.IBootLoader[]): Promise; + init(): void; + loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean; + hasModule(moduleKey: keyof ModuleMap): boolean; + stop(): void; + getModule(moduleKey: K): ModuleMap[K]; + protected setState(state: number): void; + /** + * 输出 + * @param level 1 warn 2 error + * @param msg + */ + protected _log(msg: string, level?: number): void; + } + +} +declare module 'egfCore' { + global { + namespace egf { + interface IModule { + /**模块名 */ + key?: string; + /** + * 当初始化时 + */ + onInit?(app: IApp): void; + /** + * 所有模块初始化完成时 + */ + onAfterInit?(app: IApp): void; + /** + * 模块停止时 + */ + onStop?(): void; + } + type BootEndCallback = (isSuccess: boolean) => void; + /** + * 引导程序 + */ + interface IBootLoader { + /** + * 引导 + * @param app + */ + onBoot(app: IApp, bootEnd: BootEndCallback): void; + } + /** + * 主程序 + */ + interface IApp { + /** + * 程序状态 + * 0 未启动 1 引导中, 2 初始化, 3 运行中 + */ + state: number; + /** + * 模块字典 + */ + moduleMap: ModuleMap; + /** + * 引导 + * @param bootLoaders + */ + bootstrap(bootLoaders: egf.IBootLoader[]): Promise; + /** + * 初始化 + */ + init(): void; + /** + * 加载模块 + * @param module + */ + loadModule(module: IModule | any, key?: keyof ModuleMap): void; + /** + * 停止 + */ + stop(): void; + /** + * 获取模块实例 + * @param moduleKey + */ + getModule(moduleKey: K): ModuleMap[K]; + /** + * 判断有没有这个模块 + * @param moduleKey + */ + hasModule(moduleKey: keyof ModuleMap): boolean; + } + } + } + + +} +declare module 'egfCore' { + + + +} + +declare namespace egfCore { + type App = import('egfCore').App; +} +declare const egfCore:typeof import("egfCore"); \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js new file mode 100644 index 0000000..c4197e6 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js @@ -0,0 +1,221 @@ +var egfCore = (function (exports) { + 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */ + + function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + var App = (function () { + function App() { + this._state = 0; + this._moduleMap = {}; + } + Object.defineProperty(App.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(App.prototype, "moduleMap", { + get: function () { + return this._moduleMap; + }, + enumerable: false, + configurable: true + }); + App.prototype.bootstrap = function (bootLoaders) { + return __awaiter(this, void 0, void 0, function () { + var bootPromises, _loop_1, i, e_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState(App.BOOTING); + if (!bootLoaders || bootLoaders.length <= 0) { + this.setState(App.BOOTEND); + return [2, true]; + } + if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4]; + bootPromises = []; + _loop_1 = function (i) { + var bootLoader = bootLoaders[i]; + bootPromises.push(new Promise(function (res, rej) { + bootLoader.onBoot(_this, function (isOk) { + if (isOk) { + res(); + } + else { + rej(); + } + }); + })); + }; + for (i = 0; i < bootLoaders.length; i++) { + _loop_1(i); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4, Promise.all(bootPromises)]; + case 2: + _a.sent(); + this.setState(App.BOOTEND); + return [2, true]; + case 3: + e_1 = _a.sent(); + console.error(e_1); + this.setState(App.BOOTEND); + return [2, false]; + case 4: return [2]; + } + }); + }); + }; + App.prototype.init = function () { + var moduleMap = this._moduleMap; + var moduleIns; + if (this.state === App.RUNING) + return; + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onInit && moduleIns.onInit(this); + } + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onAfterInit && moduleIns.onAfterInit(this); + } + this.setState(App.RUNING); + }; + App.prototype.loadModule = function (moduleIns, key) { + if (this._state === App.STOP) + return false; + var res = false; + if (!key) { + key = moduleIns.key; + } + if (key && typeof key === "string") { + if (moduleIns) { + if (!this._moduleMap[key]) { + this._moduleMap[key] = moduleIns; + res = true; + if (this._state === App.RUNING) { + moduleIns.onInit && moduleIns.onInit(this); + moduleIns.onAfterInit && moduleIns.onAfterInit(); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A"); + } + return res; + }; + App.prototype.hasModule = function (moduleKey) { + return !!this._moduleMap[moduleKey]; + }; + App.prototype.stop = function () { + var moduleMap = this._moduleMap; + var moduleIns; + this.setState(App.STOP); + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onStop && moduleIns.onStop(); + } + }; + App.prototype.getModule = function (moduleKey) { + return this._moduleMap[moduleKey]; + }; + App.prototype.setState = function (state) { + if (!isNaN(this._state)) { + if (this._state >= state) + return; + } + this._state = state; + }; + App.prototype._log = function (msg, level) { + switch (level) { + case 1: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + case 2: + console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + default: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + } + }; + App.UN_RUN = 0; + App.BOOTING = 1; + App.BOOTEND = 2; + App.RUNING = 3; + App.STOP = 4; + return App; + }()); + + exports.App = App; + + Object.defineProperty(exports, '__esModule', { value: true }); + + return exports; + +}({})); + + var globalTarget =window?window:global; + globalTarget.egfCore?Object.assign({},globalTarget.egfCore):(globalTarget.egfCore = egfCore) +//# sourceMappingURL=egfCore.js.map diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js.map b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js.map new file mode 100644 index 0000000..0dc650b --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"egfCore.js","sources":["@ailhc/egf-core/src/egf-app.ts"],"sourcesContent":["export class App implements egf.IApp {\n public static readonly UN_RUN: number = 0;\n public static readonly BOOTING: number = 1;\n public static readonly BOOTEND: number = 2;\n public static readonly RUNING: number = 3;\n public static readonly STOP: number = 4;\n protected _state: number = 0;\n protected _moduleMap: { [key: string]: egf.IModule } = {};\n public get state(): number {\n return this._state;\n }\n public get moduleMap(): ModuleMap {\n return this._moduleMap as any;\n }\n public async bootstrap(bootLoaders?: egf.IBootLoader[]): Promise {\n this.setState(App.BOOTING);\n if (!bootLoaders || bootLoaders.length <= 0) {\n this.setState(App.BOOTEND);\n return true;\n }\n if (bootLoaders && bootLoaders.length > 0) {\n const bootPromises: Promise[] = [];\n for (let i = 0; i < bootLoaders.length; i++) {\n const bootLoader: egf.IBootLoader = bootLoaders[i];\n bootPromises.push(\n new Promise((res, rej) => {\n bootLoader.onBoot(this as any, (isOk) => {\n if (isOk) {\n res();\n } else {\n rej();\n }\n });\n })\n );\n }\n try {\n await Promise.all(bootPromises);\n this.setState(App.BOOTEND);\n return true;\n } catch (e) {\n console.error(e);\n this.setState(App.BOOTEND);\n return false;\n }\n }\n }\n\n public init(): void {\n const moduleMap = this._moduleMap;\n let moduleIns: egf.IModule;\n if (this.state === App.RUNING) return;\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onInit && moduleIns.onInit(this as any);\n }\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onAfterInit && moduleIns.onAfterInit(this as any);\n }\n this.setState(App.RUNING);\n }\n public loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean {\n if (this._state === App.STOP) return false;\n let res: boolean = false;\n if (!key) {\n key = moduleIns.key as never;\n }\n if (key && typeof key === \"string\") {\n if (moduleIns) {\n if (!this._moduleMap[key]) {\n this._moduleMap[key] = moduleIns;\n res = true;\n if (this._state === App.RUNING) {\n moduleIns.onInit && moduleIns.onInit(this);\n moduleIns.onAfterInit && moduleIns.onAfterInit();\n }\n } else {\n this._log(`加载模块:模块:${key}已经存在,不重复加载`);\n }\n } else {\n this._log(`加载模块:模块:${key}实例为空`);\n }\n } else {\n this._log(`加载模块:模块key为空`);\n }\n return res;\n }\n public hasModule(moduleKey: keyof ModuleMap): boolean {\n return !!this._moduleMap[moduleKey as any];\n }\n public stop(): void {\n const moduleMap = this._moduleMap;\n let moduleIns: egf.IModule;\n this.setState(App.STOP);\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onStop && moduleIns.onStop();\n }\n }\n public getModule(moduleKey: K): ModuleMap[K] {\n return this._moduleMap[moduleKey as any] as any;\n }\n\n protected setState(state: number) {\n if (!isNaN(this._state)) {\n if (this._state >= state) return;\n }\n this._state = state;\n }\n /**\n * 输出\n * @param level 1 warn 2 error\n * @param msg\n */\n protected _log(msg: string, level?: number): void {\n switch (level) {\n case 1:\n console.warn(`【主程序】${msg}`);\n break;\n case 2:\n console.error(`【主程序】${msg}`);\n break;\n default:\n console.warn(`【主程序】${msg}`);\n break;\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAA;YAMc,WAAM,GAAW,CAAC,CAAC;YACnB,eAAU,GAAmC,EAAE,CAAC;SAyH7D;QAxHG,sBAAW,sBA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O,CAAC,KAAK,CAAC,mCAAQ,GAAK,CAAC,CAAC;oBAC7B,MAAM;gBACV;oBACI,OAAO,CAAC,IAAI,CAAC,mCAAQ,GAAK,CAAC,CAAC;oBAC5B,MAAM;aACb;SACJ;QA9HsB,UAAM,GAAW,CAAC,CAAC;QACnB,WAAO,GAAW,CAAC,CAAC;QACpB,WAAO,GAAW,CAAC,CAAC;QACpB,UAAM,GAAW,CAAC,CAAC;QACnB,QAAI,GAAW,CAAC,CAAC;QA2H5C,UAAC;KAhID;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.min.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.min.js new file mode 100644 index 0000000..4477c05 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/iife/egfCore.min.js @@ -0,0 +1,15 @@ +var egfCore=function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */function e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}();return t.App=n,Object.defineProperty(t,"__esModule",{value:!0}),t}({}),globalTarget=window||global;globalTarget.egfCore?Object.assign({},globalTarget.egfCore):globalTarget.egfCore=egfCore; diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/lib/index.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/lib/index.js new file mode 100644 index 0000000..9e95cd5 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/lib/index.js @@ -0,0 +1,218 @@ +System.register('@ailhc/egf-core', [], function (exports) { + 'use strict'; + return { + execute: function () { + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */ + + function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + var App = exports('App', (function () { + function App() { + this._state = 0; + this._moduleMap = {}; + } + Object.defineProperty(App.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(App.prototype, "moduleMap", { + get: function () { + return this._moduleMap; + }, + enumerable: false, + configurable: true + }); + App.prototype.bootstrap = function (bootLoaders) { + return __awaiter(this, void 0, void 0, function () { + var bootPromises, _loop_1, i, e_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState(App.BOOTING); + if (!bootLoaders || bootLoaders.length <= 0) { + this.setState(App.BOOTEND); + return [2, true]; + } + if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4]; + bootPromises = []; + _loop_1 = function (i) { + var bootLoader = bootLoaders[i]; + bootPromises.push(new Promise(function (res, rej) { + bootLoader.onBoot(_this, function (isOk) { + if (isOk) { + res(); + } + else { + rej(); + } + }); + })); + }; + for (i = 0; i < bootLoaders.length; i++) { + _loop_1(i); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4, Promise.all(bootPromises)]; + case 2: + _a.sent(); + this.setState(App.BOOTEND); + return [2, true]; + case 3: + e_1 = _a.sent(); + console.error(e_1); + this.setState(App.BOOTEND); + return [2, false]; + case 4: return [2]; + } + }); + }); + }; + App.prototype.init = function () { + var moduleMap = this._moduleMap; + var moduleIns; + if (this.state === App.RUNING) + return; + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onInit && moduleIns.onInit(this); + } + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onAfterInit && moduleIns.onAfterInit(this); + } + this.setState(App.RUNING); + }; + App.prototype.loadModule = function (moduleIns, key) { + if (this._state === App.STOP) + return false; + var res = false; + if (!key) { + key = moduleIns.key; + } + if (key && typeof key === "string") { + if (moduleIns) { + if (!this._moduleMap[key]) { + this._moduleMap[key] = moduleIns; + res = true; + if (this._state === App.RUNING) { + moduleIns.onInit && moduleIns.onInit(this); + moduleIns.onAfterInit && moduleIns.onAfterInit(); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A"); + } + return res; + }; + App.prototype.hasModule = function (moduleKey) { + return !!this._moduleMap[moduleKey]; + }; + App.prototype.stop = function () { + var moduleMap = this._moduleMap; + var moduleIns; + this.setState(App.STOP); + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onStop && moduleIns.onStop(); + } + }; + App.prototype.getModule = function (moduleKey) { + return this._moduleMap[moduleKey]; + }; + App.prototype.setState = function (state) { + if (!isNaN(this._state)) { + if (this._state >= state) + return; + } + this._state = state; + }; + App.prototype._log = function (msg, level) { + switch (level) { + case 1: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + case 2: + console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + default: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + } + }; + App.UN_RUN = 0; + App.BOOTING = 1; + App.BOOTEND = 2; + App.RUNING = 3; + App.STOP = 4; + return App; + }())); + + } + }; +}); + + +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbIkBhaWxoYy9lZ2YtY29yZS9zcmMvZWdmLWFwcC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgQXBwPE1vZHVsZU1hcCA9IGFueT4gaW1wbGVtZW50cyBlZ2YuSUFwcDxNb2R1bGVNYX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c2VzOiBQcm9taXNlPHZvaWQ+W10gPSBbXTtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYm9vdExvYWRlcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBib290TG9hZGVyOiBlZ2YuSUJvb3RMb2FkZXIgPSBib290TG9hZGVyc1tpXTtcbiAgICAgICAgICAgICAgICBib290UHJvbWlzZXMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgbmV3IFByb21pc2UoKHJlcywgcmVqKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBib290TG9hZGVyLm9uQm9vdCh0aGlzIGFzIGFueSwgKGlzT2spID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWooKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBhd2FpdCBQcm9taXNlLmFsbChib290UHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoQXBwLkJPT1RFTkQpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShBcHAuQk9PVEVORCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHVibGljIGluaXQoKTogdm9pZCB7XG4gICAgICAgIGNvbnN0IG1vZHVsZU1hcCA9IHRoaXMuX21vZHVsZU1hcDtcbiAgICAgICAgbGV0IG1vZHVsZUluczogZWdmLklNb2R1bGU7XG4gICAgICAgIGlmICh0aGlzLnN0YXRlID09PSBBcHAuUlVOSU5HKSByZXR1cm47XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIG1vZHVsZU1hcCkge1xuICAgICAgICAgICAgbW9kdWxlSW5zID0gbW9kdWxlTWFwW2tleV07XG4gICAgICAgICAgICBtb2R1bGVJbnMub25Jbml0ICYmIG1vZHVsZUlucy5vbkluaXQodGhpcyBhcyBhbnkpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIG1vZHVsZU1hcCkge1xuICAgICAgICAgICAgbW9kdWxlSW5zID0gbW9kdWxlTWFwW2tleV07XG4gICAgICAgICAgICBtb2R1bGVJbnMub25BZnRlckluaXQgJiYgbW9kdWxlSW5zLm9uQWZ0ZXJJbml0KHRoaXMgYXMgYW55KTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNldFN0YXRlKEFwcC5SVU5JTkcpO1xuICAgIH1cbiAgICBwdWJsaWMgbG9hZE1vZHVsZShtb2R1bGVJbnM6IGFueSB8IGVnZi5JTW9kdWxlLCBrZXk/OiBrZXlvZiBNb2R1bGVNYXApOiBib29sZWFuIHtcbiAgICAgICAgaWYgKHRoaXMuX3N0YXRlID09PSBBcHAuU1RPUCkgcmV0dXJuIGZhbHNlO1xuICAgICAgICBsZXQgcmVzOiBib29sZWFuID0gZmFsc2U7XG4gICAgICAgIGlmICgha2V5KSB7XG4gICAgICAgICAgICBrZXkgPSBtb2R1bGVJbnMua2V5IGFzIG5ldmVyO1xuICAgICAgICB9XG4gICAgICAgIGlmIChrZXkgJiYgdHlwZW9mIGtleSA9PT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgaWYgKG1vZHVsZUlucykge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5fbW9kdWxlTWFwW2tleV0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbW9kdWxlTWFwW2tleV0gPSBtb2R1bGVJbnM7XG4gICAgICAgICAgICAgICAgICAgIHJlcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9zdGF0ZSA9PT0gQXBwLlJVTklORykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlSW5zLm9uSW5pdCAmJiBtb2R1bGVJbnMub25Jbml0KHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbW9kdWxlSW5zLm9uQWZ0ZXJJbml0ICYmIG1vZHVsZUlucy5vbkFmdGVySW5pdCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fbG9nKGDliqDovb3mqKHlnZc65qih5Z2XOiR7a2V5feW3sue7j+WtmOWcqCzkuI3ph43lpI3liqDovb1gKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX2xvZyhg5Yqg6L295qih5Z2XOuaooeWdlzoke2tleX3lrp7kvovkuLrnqbpgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuX2xvZyhg5Yqg6L295qih5Z2XOuaooeWdl2tleeS4uuepumApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXM7XG4gICAgfVxuICAgIHB1YmxpYyBoYXNNb2R1bGUobW9kdWxlS2V5OiBrZXlvZiBNb2R1bGVNYXApOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuICEhdGhpcy5fbW9kdWxlTWFwW21vZHVsZUtleSBhcyBhbnldO1xuICAgIH1cbiAgICBwdWJsaWMgc3RvcCgpOiB2b2lkIHtcbiAgICAgICAgY29uc3QgbW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/字体精简工具/node_modules/@ailhc/egf-core/dist/system/lib/index.min.js new file mode 100644 index 0000000..f4f2f5a --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/lib/index.min.js @@ -0,0 +1,16 @@ +System.register("@ailhc/egf-core",[],(function(t){"use strict";return{execute:function(){function e(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,o=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(a,(function(e){e?t():n()}))})))},i=0;i=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}())}}})); diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/types/index.d.ts b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/types/index.d.ts new file mode 100644 index 0000000..821b951 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/system/types/index.d.ts @@ -0,0 +1,111 @@ +declare module '@ailhc/egf-core' { + export class App implements egf.IApp { + static readonly UN_RUN: number; + static readonly BOOTING: number; + static readonly BOOTEND: number; + static readonly RUNING: number; + static readonly STOP: number; + protected _state: number; + protected _moduleMap: { + [key: string]: egf.IModule; + }; + get state(): number; + get moduleMap(): ModuleMap; + bootstrap(bootLoaders?: egf.IBootLoader[]): Promise; + init(): void; + loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean; + hasModule(moduleKey: keyof ModuleMap): boolean; + stop(): void; + getModule(moduleKey: K): ModuleMap[K]; + protected setState(state: number): void; + /** + * 输出 + * @param level 1 warn 2 error + * @param msg + */ + protected _log(msg: string, level?: number): void; + } + +} +declare module '@ailhc/egf-core' { + global { + namespace egf { + interface IModule { + /**模块名 */ + key?: string; + /** + * 当初始化时 + */ + onInit?(app: IApp): void; + /** + * 所有模块初始化完成时 + */ + onAfterInit?(app: IApp): void; + /** + * 模块停止时 + */ + onStop?(): void; + } + type BootEndCallback = (isSuccess: boolean) => void; + /** + * 引导程序 + */ + interface IBootLoader { + /** + * 引导 + * @param app + */ + onBoot(app: IApp, bootEnd: BootEndCallback): void; + } + /** + * 主程序 + */ + interface IApp { + /** + * 程序状态 + * 0 未启动 1 引导中, 2 初始化, 3 运行中 + */ + state: number; + /** + * 模块字典 + */ + moduleMap: ModuleMap; + /** + * 引导 + * @param bootLoaders + */ + bootstrap(bootLoaders: egf.IBootLoader[]): Promise; + /** + * 初始化 + */ + init(): void; + /** + * 加载模块 + * @param module + */ + loadModule(module: IModule | any, key?: keyof ModuleMap): void; + /** + * 停止 + */ + stop(): void; + /** + * 获取模块实例 + * @param moduleKey + */ + getModule(moduleKey: K): ModuleMap[K]; + /** + * 判断有没有这个模块 + * @param moduleKey + */ + hasModule(moduleKey: keyof ModuleMap): boolean; + } + } + } + export {}; + +} +declare module '@ailhc/egf-core' { + export * from '@ailhc/egf-core'; + export * from '@ailhc/egf-core'; + +} diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.d.ts b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.d.ts new file mode 100644 index 0000000..2436145 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.d.ts @@ -0,0 +1,116 @@ +declare module 'egfCore' { + class App implements egf.IApp { + static readonly UN_RUN: number; + static readonly BOOTING: number; + static readonly BOOTEND: number; + static readonly RUNING: number; + static readonly STOP: number; + protected _state: number; + protected _moduleMap: { + [key: string]: egf.IModule; + }; + get state(): number; + get moduleMap(): ModuleMap; + bootstrap(bootLoaders?: egf.IBootLoader[]): Promise; + init(): void; + loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean; + hasModule(moduleKey: keyof ModuleMap): boolean; + stop(): void; + getModule(moduleKey: K): ModuleMap[K]; + protected setState(state: number): void; + /** + * 输出 + * @param level 1 warn 2 error + * @param msg + */ + protected _log(msg: string, level?: number): void; + } + +} +declare module 'egfCore' { + global { + namespace egf { + interface IModule { + /**模块名 */ + key?: string; + /** + * 当初始化时 + */ + onInit?(app: IApp): void; + /** + * 所有模块初始化完成时 + */ + onAfterInit?(app: IApp): void; + /** + * 模块停止时 + */ + onStop?(): void; + } + type BootEndCallback = (isSuccess: boolean) => void; + /** + * 引导程序 + */ + interface IBootLoader { + /** + * 引导 + * @param app + */ + onBoot(app: IApp, bootEnd: BootEndCallback): void; + } + /** + * 主程序 + */ + interface IApp { + /** + * 程序状态 + * 0 未启动 1 引导中, 2 初始化, 3 运行中 + */ + state: number; + /** + * 模块字典 + */ + moduleMap: ModuleMap; + /** + * 引导 + * @param bootLoaders + */ + bootstrap(bootLoaders: egf.IBootLoader[]): Promise; + /** + * 初始化 + */ + init(): void; + /** + * 加载模块 + * @param module + */ + loadModule(module: IModule | any, key?: keyof ModuleMap): void; + /** + * 停止 + */ + stop(): void; + /** + * 获取模块实例 + * @param moduleKey + */ + getModule(moduleKey: K): ModuleMap[K]; + /** + * 判断有没有这个模块 + * @param moduleKey + */ + hasModule(moduleKey: keyof ModuleMap): boolean; + } + } + } + + +} +declare module 'egfCore' { + + + +} + +declare namespace egfCore { + type App = import('egfCore').App; +} +declare const egfCore:typeof import("egfCore"); \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js new file mode 100644 index 0000000..2ad8d5b --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js @@ -0,0 +1,222 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.egfCore = {})); +}(this, (function (exports) { 'use strict'; + + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */ + + function __awaiter(thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + } + + function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } + } + + var App = (function () { + function App() { + this._state = 0; + this._moduleMap = {}; + } + Object.defineProperty(App.prototype, "state", { + get: function () { + return this._state; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(App.prototype, "moduleMap", { + get: function () { + return this._moduleMap; + }, + enumerable: false, + configurable: true + }); + App.prototype.bootstrap = function (bootLoaders) { + return __awaiter(this, void 0, void 0, function () { + var bootPromises, _loop_1, i, e_1; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + this.setState(App.BOOTING); + if (!bootLoaders || bootLoaders.length <= 0) { + this.setState(App.BOOTEND); + return [2, true]; + } + if (!(bootLoaders && bootLoaders.length > 0)) return [3, 4]; + bootPromises = []; + _loop_1 = function (i) { + var bootLoader = bootLoaders[i]; + bootPromises.push(new Promise(function (res, rej) { + bootLoader.onBoot(_this, function (isOk) { + if (isOk) { + res(); + } + else { + rej(); + } + }); + })); + }; + for (i = 0; i < bootLoaders.length; i++) { + _loop_1(i); + } + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4, Promise.all(bootPromises)]; + case 2: + _a.sent(); + this.setState(App.BOOTEND); + return [2, true]; + case 3: + e_1 = _a.sent(); + console.error(e_1); + this.setState(App.BOOTEND); + return [2, false]; + case 4: return [2]; + } + }); + }); + }; + App.prototype.init = function () { + var moduleMap = this._moduleMap; + var moduleIns; + if (this.state === App.RUNING) + return; + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onInit && moduleIns.onInit(this); + } + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onAfterInit && moduleIns.onAfterInit(this); + } + this.setState(App.RUNING); + }; + App.prototype.loadModule = function (moduleIns, key) { + if (this._state === App.STOP) + return false; + var res = false; + if (!key) { + key = moduleIns.key; + } + if (key && typeof key === "string") { + if (moduleIns) { + if (!this._moduleMap[key]) { + this._moduleMap[key] = moduleIns; + res = true; + if (this._state === App.RUNING) { + moduleIns.onInit && moduleIns.onInit(this); + moduleIns.onAfterInit && moduleIns.onAfterInit(); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5DF2\u7ECF\u5B58\u5728,\u4E0D\u91CD\u590D\u52A0\u8F7D"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757:" + key + "\u5B9E\u4F8B\u4E3A\u7A7A"); + } + } + else { + this._log("\u52A0\u8F7D\u6A21\u5757:\u6A21\u5757key\u4E3A\u7A7A"); + } + return res; + }; + App.prototype.hasModule = function (moduleKey) { + return !!this._moduleMap[moduleKey]; + }; + App.prototype.stop = function () { + var moduleMap = this._moduleMap; + var moduleIns; + this.setState(App.STOP); + for (var key in moduleMap) { + moduleIns = moduleMap[key]; + moduleIns.onStop && moduleIns.onStop(); + } + }; + App.prototype.getModule = function (moduleKey) { + return this._moduleMap[moduleKey]; + }; + App.prototype.setState = function (state) { + if (!isNaN(this._state)) { + if (this._state >= state) + return; + } + this._state = state; + }; + App.prototype._log = function (msg, level) { + switch (level) { + case 1: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + case 2: + console.error("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + default: + console.warn("\u3010\u4E3B\u7A0B\u5E8F\u3011" + msg); + break; + } + }; + App.UN_RUN = 0; + App.BOOTING = 1; + App.BOOTEND = 2; + App.RUNING = 3; + App.STOP = 4; + return App; + }()); + + exports.App = App; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + + var globalTarget =window?window:global; + globalTarget.egfCore?Object.assign({},globalTarget.egfCore):(globalTarget.egfCore = egfCore) +//# sourceMappingURL=egfCore.js.map diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js.map b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js.map new file mode 100644 index 0000000..67dd0ab --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"egfCore.js","sources":["@ailhc/egf-core/src/egf-app.ts"],"sourcesContent":["export class App implements egf.IApp {\n public static readonly UN_RUN: number = 0;\n public static readonly BOOTING: number = 1;\n public static readonly BOOTEND: number = 2;\n public static readonly RUNING: number = 3;\n public static readonly STOP: number = 4;\n protected _state: number = 0;\n protected _moduleMap: { [key: string]: egf.IModule } = {};\n public get state(): number {\n return this._state;\n }\n public get moduleMap(): ModuleMap {\n return this._moduleMap as any;\n }\n public async bootstrap(bootLoaders?: egf.IBootLoader[]): Promise {\n this.setState(App.BOOTING);\n if (!bootLoaders || bootLoaders.length <= 0) {\n this.setState(App.BOOTEND);\n return true;\n }\n if (bootLoaders && bootLoaders.length > 0) {\n const bootPromises: Promise[] = [];\n for (let i = 0; i < bootLoaders.length; i++) {\n const bootLoader: egf.IBootLoader = bootLoaders[i];\n bootPromises.push(\n new Promise((res, rej) => {\n bootLoader.onBoot(this as any, (isOk) => {\n if (isOk) {\n res();\n } else {\n rej();\n }\n });\n })\n );\n }\n try {\n await Promise.all(bootPromises);\n this.setState(App.BOOTEND);\n return true;\n } catch (e) {\n console.error(e);\n this.setState(App.BOOTEND);\n return false;\n }\n }\n }\n\n public init(): void {\n const moduleMap = this._moduleMap;\n let moduleIns: egf.IModule;\n if (this.state === App.RUNING) return;\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onInit && moduleIns.onInit(this as any);\n }\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onAfterInit && moduleIns.onAfterInit(this as any);\n }\n this.setState(App.RUNING);\n }\n public loadModule(moduleIns: any | egf.IModule, key?: keyof ModuleMap): boolean {\n if (this._state === App.STOP) return false;\n let res: boolean = false;\n if (!key) {\n key = moduleIns.key as never;\n }\n if (key && typeof key === \"string\") {\n if (moduleIns) {\n if (!this._moduleMap[key]) {\n this._moduleMap[key] = moduleIns;\n res = true;\n if (this._state === App.RUNING) {\n moduleIns.onInit && moduleIns.onInit(this);\n moduleIns.onAfterInit && moduleIns.onAfterInit();\n }\n } else {\n this._log(`加载模块:模块:${key}已经存在,不重复加载`);\n }\n } else {\n this._log(`加载模块:模块:${key}实例为空`);\n }\n } else {\n this._log(`加载模块:模块key为空`);\n }\n return res;\n }\n public hasModule(moduleKey: keyof ModuleMap): boolean {\n return !!this._moduleMap[moduleKey as any];\n }\n public stop(): void {\n const moduleMap = this._moduleMap;\n let moduleIns: egf.IModule;\n this.setState(App.STOP);\n for (const key in moduleMap) {\n moduleIns = moduleMap[key];\n moduleIns.onStop && moduleIns.onStop();\n }\n }\n public getModule(moduleKey: K): ModuleMap[K] {\n return this._moduleMap[moduleKey as any] as any;\n }\n\n protected setState(state: number) {\n if (!isNaN(this._state)) {\n if (this._state >= state) return;\n }\n this._state = state;\n }\n /**\n * 输出\n * @param level 1 warn 2 error\n * @param msg\n */\n protected _log(msg: string, level?: number): void {\n switch (level) {\n case 1:\n console.warn(`【主程序】${msg}`);\n break;\n case 2:\n console.error(`【主程序】${msg}`);\n break;\n default:\n console.warn(`【主程序】${msg}`);\n break;\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAAA;YAMc,WAAM,GAAW,CAAC,CAAC;YACnB,eAAU,GAAmC,EAAE,CAAC;SAyH7D;QAxHG,sBAAW,sBAAK;iBAAhB;gBACI,OAAO,IAAI,CAAC,MAAM,CAAC;aACtB;;;WAAA;QACD,sBAAW,0BAAS;iBAApB;gBACI,OAAO,IAAI,CAAC,UAAiB,CAAC;aACjC;;;WAAA;QACY,uBAAS,GAAtB,UAAuB,WAA+B;;;;;;;4BAClD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;4BAC3B,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,IAAI,CAAC,EAAE;gCACzC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gCAC3B,WAAO,IAAI,EAAC;6BACf;kCACG,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,CAAA,EAArC,cAAqC;4BAC/B,YAAY,GAAoB,EAAE,CAAC;gDAChC,CAAC;gCACN,IAAM,UAAU,GAAoB,WAAW,CAAC,CAAC,CAAC,CAAC;gCACnD,YAAY,CAAC,IAAI,CACb,IAAI,OAAO,CAAC,UAAC,GAAG,EAAE,GAAG;oCACjB,UAAU,CAAC,MAAM,CAAC,KAAW,EAAE,UAAC,IAAI;wCAChC,IAAI,IAAI,EAAE;4CACN,GAAG,EAAE,CAAC;yCACT;6CAAM;4CACH,G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A4C,SAAY;YACpD,OAAO,IAAI,CAAC,UAAU,CAAC,SAAgB,CAAQ,CAAC;SACnD;QAES,sBAAQ,GAAlB,UAAmB,KAAa;YAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;gBACrB,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK;oBAAE,OAAO;aACpC;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACvB;QAMS,kBAAI,GAAd,UAAe,GAAW,EAAE,KAAc;YACtC,QAAQ,KAAK;gBACT,KAAK,CAAC;oBACF,OAAO,CAAC,IAAI,CAAC,mCAAQ,GAAK,CAAC,CAAC;oBAC5B,MAAM;gBACV,KAAK,CAAC;oBACF,OAAO,CAAC,KAAK,CAAC,mCAAQ,GAAK,CAAC,CAAC;oBAC7B,MAAM;gBACV;oBACI,OAAO,CAAC,IAAI,CAAC,mCAAQ,GAAK,CAAC,CAAC;oBAC5B,MAAM;aACb;SACJ;QA9HsB,UAAM,GAAW,CAAC,CAAC;QACnB,WAAO,GAAW,CAAC,CAAC;QACpB,WAAO,GAAW,CAAC,CAAC;QACpB,UAAM,GAAW,CAAC,CAAC;QACnB,QAAI,GAAW,CAAC,CAAC;QA2H5C,UAAC;KAhID;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.min.js b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.min.js new file mode 100644 index 0000000..2f246d0 --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/dist/umd/egfCore.min.js @@ -0,0 +1,15 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).egfCore={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. All rights reserved. + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + this file except in compliance with the License. You may obtain a copy of the + License at http://www.apache.org/licenses/LICENSE-2.0 + + THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED + WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, + MERCHANTABLITY OR NON-INFRINGEMENT. + + See the Apache Version 2.0 License for specific language governing permissions + and limitations under the License. + ***************************************************************************** */function e(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0))return[3,4];for(o=[],r=function(t){var e=n[t];o.push(new Promise((function(t,n){e.onBoot(s,(function(e){e?t():n()}))})))},i=0;i=t||(this._state=t)},t.prototype._log=function(t,e){switch(e){case 1:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;case 2:console.error("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t);break;default:console.warn("\u3010\u4e3b\u7a0b\u5e8f\u3011"+t)}},t.UN_RUN=0,t.BOOTING=1,t.BOOTEND=2,t.RUNING=3,t.STOP=4,t}();t.App=n,Object.defineProperty(t,"__esModule",{value:!0})}));var globalTarget=window||global;globalTarget.egfCore?Object.assign({},globalTarget.egfCore):globalTarget.egfCore=egfCore; diff --git a/packages/字体精简工具/node_modules/@ailhc/egf-core/package.json b/packages/字体精简工具/node_modules/@ailhc/egf-core/package.json new file mode 100644 index 0000000..7e060eb --- /dev/null +++ b/packages/字体精简工具/node_modules/@ailhc/egf-core/package.json @@ -0,0 +1,75 @@ +{ + "_from": "@ailhc/egf-core@^1.2.0", + "_id": "@ailhc/egf-core@1.2.4", + "_inBundle": false, + "_integrity": "sha1-7s7WrU086rB93VvcDbu01+ilhQk=", + "_location": "/@ailhc/egf-core", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@ailhc/egf-core@^1.2.0", + "name": "@ailhc/egf-core", + "escapedName": "@ailhc%2fegf-core", + "scope": "@ailhc", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.nlark.com/@ailhc/egf-core/download/@ailhc/egf-core-1.2.4.tgz", + "_shasum": "eeced6ad4d3ceab07ddd5bdc0dbbb4d7e8a58509", + "_spec": "@ailhc/egf-core@^1.2.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font", + "author": { + "name": "AILHC", + "email": "505126057@qq.com" + }, + "bugs": { + "url": "https://github.com/AILHC/EasyGameFrameworkOpen/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "This is the core of EasyGameFramework, which provides the ability to register modules, get module instances, and load subroutine scripts", + "exports": { + "require": "./dist/cjs/lib/index.js", + "import": "./dist/es/lib/index.mjs" + }, + "files": [ + "dist" + ], + "homepage": "https://github.com/AILHC/EasyGameFrameworkOpen/tree/main/packages/core#readme", + "keywords": [ + "module", + "framework", + "game", + "manager" + ], + "license": "MIT", + "main": "dist/cjs/lib/index.js", + "module": "dist/es/lib/index.mjs", + "name": "@ailhc/egf-core", + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/AILHC/EasyGameFrameworkOpen.git" + }, + "scripts": { + "build:all": "npm run clean-dist && npm run build:cjs&&npm run build:es&&npm run build:umd&&npm run build:iife&&npm run build:system", + "build:cjs": "egf build -f cjs -m true -s inline", + "build:es": "egf build -f es -m true -s inline", + "build:iife": "egf build -f iife -m true", + "build:system": "egf build -f system -m true -s inline", + "build:umd": "egf build -f umd -m true", + "clean-dist": "rimraf dist", + "test": "cross-var lerna exec --scope $npm_package_name --concurrency 1 -- jest --config=../../jest.config.js --roots $PWD", + "watch:cjs": "egf build -w true -f cjs -s inline" + }, + "typings": "dist/cjs/types", + "version": "1.2.4" +} diff --git a/packages/字体精简工具/node_modules/abbrev/LICENSE b/packages/字体精简工具/node_modules/abbrev/LICENSE new file mode 100644 index 0000000..9bcfa9d --- /dev/null +++ b/packages/字体精简工具/node_modules/abbrev/LICENSE @@ -0,0 +1,46 @@ +This software is dual-licensed under the ISC and MIT licenses. +You may use this software under EITHER of the following licenses. + +---------- + +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---------- + +Copyright Isaac Z. Schlueter and Contributors +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/abbrev/README.md b/packages/字体精简工具/node_modules/abbrev/README.md new file mode 100644 index 0000000..99746fe --- /dev/null +++ b/packages/字体精简工具/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/packages/字体精简工具/node_modules/abbrev/abbrev.js b/packages/字体精简工具/node_modules/abbrev/abbrev.js new file mode 100644 index 0000000..7b1dc5d --- /dev/null +++ b/packages/字体精简工具/node_modules/abbrev/abbrev.js @@ -0,0 +1,61 @@ +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/packages/字体精简工具/node_modules/abbrev/package.json b/packages/字体精简工具/node_modules/abbrev/package.json new file mode 100644 index 0000000..e9b851d --- /dev/null +++ b/packages/字体精简工具/node_modules/abbrev/package.json @@ -0,0 +1,56 @@ +{ + "_from": "abbrev@1", + "_id": "abbrev@1.1.1", + "_inBundle": false, + "_integrity": "sha1-+PLIh60Qv2f2NPAFtph/7TF5qsg=", + "_location": "/abbrev", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "abbrev@1", + "name": "abbrev", + "escapedName": "abbrev", + "rawSpec": "1", + "saveSpec": null, + "fetchSpec": "1" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.nlark.com/abbrev/download/abbrev-1.1.1.tgz", + "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", + "_spec": "abbrev@1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^10.1" + }, + "files": [ + "abbrev.js" + ], + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "name": "abbrev", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test.js --100" + }, + "version": "1.1.1" +} diff --git a/packages/字体精简工具/node_modules/ajv/.tonic_example.js b/packages/字体精简工具/node_modules/ajv/.tonic_example.js new file mode 100644 index 0000000..aa11812 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/ajv/LICENSE b/packages/字体精简工具/node_modules/ajv/LICENSE new file mode 100644 index 0000000..96ee719 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/packages/字体精简工具/node_modules/ajv/README.md b/packages/字体精简工具/node_modules/ajv/README.md new file mode 100644 index 0000000..5aa2078 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/README.md @@ -0,0 +1,1497 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser. Supports draft-04/06/07. + +[![Build Status](https://travis-ci.org/ajv-validator/ajv.svg?branch=master)](https://travis-ci.org/ajv-validator/ajv) +[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm (beta)](https://img.shields.io/npm/v/ajv/beta)](https://www.npmjs.com/package/ajv/v/7.0.0-beta.0) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) +[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) + + +## Ajv v7 beta is released + +[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/tree/v7-beta) is released with these changes: + +- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements. +- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe. +- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas. +- schemas are compiled to ES6 code (ES5 code generation is supported with an option). +- to improve reliability and maintainability the code is migrated to TypeScript. + +**Please note**: + +- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021). +- all formats are separated to ajv-formats package - they have to be explicitely added if you use them. + +See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details. + +To install the new version: + +```bash +npm install ajv@beta +``` + +See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example. + + +## Mozilla MOSS grant and OpenJS Foundation + +[](https://www.mozilla.org/en-US/moss/)     [](https://openjsf.org/blog/2020/08/14/ajv-joins-openjs-foundation-as-an-incubation-project/) + +Ajv has been awarded a grant from Mozilla’s [Open Source Support (MOSS) program](https://www.mozilla.org/en-US/moss/) in the “Foundational Technology” track! It will sponsor the development of Ajv support of [JSON Schema version 2019-09](https://tools.ietf.org/html/draft-handrews-json-schema-02) and of [JSON Type Definition](https://tools.ietf.org/html/draft-ucarion-json-type-definition-04). + +Ajv also joined [OpenJS Foundation](https://openjsf.org/) – having this support will help ensure the longevity and stability of Ajv for all its users. + +This [blog post](https://www.poberezkin.com/posts/2020-08-14-ajv-json-validator-mozilla-open-source-grant-openjs-foundation.html) has more details. + +I am looking for the long term maintainers of Ajv – working with [ReadySet](https://www.thereadyset.co/), also sponsored by Mozilla, to establish clear guidelines for the role of a "maintainer" and the contribution standards, and to encourage a wider, more inclusive, contribution from the community. + + +## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin) + +Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant! + +Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released. + +Please sponsor Ajv via: +- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it) +- [Ajv Open Collective️](https://opencollective.com/ajv) + +Thank you. + + +#### Open Collective sponsors + + + + + + + + + + + + + + + +## Using version 6 + +[JSON Schema draft-07](http://json-schema.org/latest/json-schema-validation.html) is published. + +[Ajv version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0) that supports draft-07 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas, draft-06 schemas will be supported without changes). + +__Please note__: To use Ajv with draft-06 schemas you need to explicitly add the meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json')); +``` + +To use Ajv with draft-04 schemas in addition to explicitly adding meta-schema you also need to use option schemaId: + +```javascript +var ajv = new Ajv({schemaId: 'id'}); +// If you want to use both draft-04 and draft-06/07 schemas: +// var ajv = new Ajv({schemaId: 'auto'}); +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/ajv-validator/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) + - [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Annotation keywords](#annotation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- [Security considerations](#security-considerations) + - [Security contact](#security-contact) + - [Untrusted schemas](#untrusted-schemas) + - [Circular references in objects](#circular-references-in-javascript-objects) + - [Trusted schemas](#security-risks-of-trusted-schemas) + - [ReDoS attack](#redos-attack) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Plugins](#plugins) +- [Related packages](#related-packages) +- [Some packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, Changes history](#tests) +- [Support, Code of conduct, License](#open-source-software-support) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft-06/07](http://json-schema.org/) and draft-04 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft-07 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-14.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-06/07 keywords `const`, `contains`, `propertyNames` and `if/then/else` +- draft-06 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + + +## Install + +``` +npm install ajv +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +// Node.js require: +var Ajv = require('ajv'); +// or ESM/TypeScript import +import Ajv from 'ajv'; + +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + +__Note for TypeScript users__: `ajv` provides its own TypeScript declarations +out of the box, so you don't need to install the deprecated `@types/ajv` +module. + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/ajv-validator/ajv/issues/234)). + + +### Ajv and Content Security Policies (CSP) + +If you're using Ajv to compile a schema (the typical use) in a browser document that is loaded with a Content Security Policy (CSP), that policy will require a `script-src` directive that includes the value `'unsafe-eval'`. +:warning: NOTE, however, that `unsafe-eval` is NOT recommended in a secure CSP[[1]](https://developer.chrome.com/extensions/contentSecurityPolicy#relaxing-eval), as it has the potential to open the document to cross-site scripting (XSS) attacks. + +In order to make use of Ajv without easing your CSP, you can [pre-compile a schema using the CLI](https://github.com/ajv-validator/ajv-cli#compile-schemas). This will transpile the schema JSON into a JavaScript file that exports a `validate` function that works simlarly to a schema compiled at runtime. + +Note that pre-compilation of schemas is performed using [ajv-pack](https://github.com/ajv-validator/ajv-pack) and there are [some limitations to the schema features it can compile](https://github.com/ajv-validator/ajv-pack#limitations). A successfully pre-compiled schema is equivalent to the same schema compiled at runtime. + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/ajv-validator/ajv-cli). It supports: + +- compiling JSON Schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/ajv-validator/ajv-pack)) +- migrate schemas to draft-07 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON Schema +- testing expected validity of data against JSON Schema +- referenced schemas +- custom meta-schemas +- files in JSON, JSON5, YAML, and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft-07 of JSON Schema standard: + +- [type](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf, [if/then/else](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#ifthenelse) + +With [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON Schema standard: + +- [patternRequired](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/ajv-validator/ajv/blob/master/KEYWORDS.md) for more details. + + +## Annotation keywords + +JSON Schema specification defines several annotation keywords that describe schema itself but do not perform any validation. + +- `title` and `description`: information about the data represented by that schema +- `$comment` (NEW in draft-07): information for developers. With option `$comment` Ajv logs or passes the comment string to the user-supplied function. See [Options](#options). +- `default`: a default value of the data instance, see [Assigning defaults](#assigning-defaults). +- `examples` (NEW in draft-06): an array of data instances. Ajv does not check the validity of these instances against the schema. +- `readOnly` and `writeOnly` (NEW in draft-07): marks data-instance as read-only or write-only in relation to the source of the data (database, api, etc.). +- `contentEncoding`: [RFC 2045](https://tools.ietf.org/html/rfc2045#section-6.1 ), e.g., "base64". +- `contentMediaType`: [RFC 2046](https://tools.ietf.org/html/rfc2046), e.g., "image/png". + +__Please note__: Ajv does not implement validation of the keywords `examples`, `contentEncoding` and `contentMediaType` but it reserves them. If you want to create a plugin that implements some of them, it should remove these keywords from the instance. + + +## Formats + +Ajv implements formats defined by JSON Schema specification and several other formats. It is recommended NOT to use "format" keyword implementations with untrusted data, as they use potentially unsafe regular expressions - see [ReDoS attack](#redos-attack). + +__Please note__: if you need to use "format" keyword to validate untrusted data, you MUST assess their suitability and safety for your validation scenarios. + +The following formats are implemented for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full URI. +- _uri-reference_: URI reference, including full and relative URIs. +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _url_ (deprecated): [URL record](https://url.spec.whatwg.org/#concept-url). +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +__Please note__: JSON Schema draft-07 also defines formats `iri`, `iri-reference`, `idn-hostname` and `idn-email` for URLs, hostnames and emails with international characters. Ajv does not implement these formats. If you create Ajv plugin that implements them please make a PR to mention this plugin here. + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `uri-reference`, and `email`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can allow specific format(s) that will be ignored. See [Options](#options) for details. + +You can find regular expressions used for format validation and the sources that were used in [formats.js](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema-org/json-schema-spec/issues/51) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON Schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON Schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/ajv-validator/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). + +Ajv compiles asynchronous schemas to [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent). Async functions are supported in Node.js 7+ and all modern browsers. You can also supply any other transpiler as a function via `processCode` option. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +var ajv = new Ajv; +// require('ajv-async')(ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +[ajv-async](https://github.com/ajv-validator/ajv-async) uses [nodent](https://github.com/MatAtBread/nodent) to transpile async functions. To use another transpiler you should separately install it (or load its bundle in the browser). + + +#### Using nodent + +```javascript +var ajv = new Ajv; +require('ajv-async')(ajv); +// in the browser if you want to load ajv-async bundle separately you can: +// window.ajvAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +## Security considerations + +JSON Schema, if properly used, can replace data sanitisation. It doesn't replace other API security considerations. It also introduces additional security aspects to consider. + + +##### Security contact + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. + + +##### Untrusted schemas + +Ajv treats JSON schemas as trusted as your application code. This security model is based on the most common use case, when the schemas are static and bundled together with the application. + +If your schemas are received from untrusted sources (or generated from untrusted data) there are several scenarios you need to prevent: +- compiling schemas can cause stack overflow (if they are too deep) +- compiling schemas can be slow (e.g. [#557](https://github.com/ajv-validator/ajv/issues/557)) +- validating certain data can be slow + +It is difficult to predict all the scenarios, but at the very least it may help to limit the size of untrusted schemas (e.g. limit JSON string length) and also the maximum schema object depth (that can be high for relatively small JSON strings). You also may want to mitigate slow regular expressions in `pattern` and `patternProperties` keywords. + +Regardless the measures you take, using untrusted schemas increases security risks. + + +##### Circular references in JavaScript objects + +Ajv does not support schemas and validated data that have circular references in objects. See [issue #802](https://github.com/ajv-validator/ajv/issues/802). + +An attempt to compile such schemas or validate such data would cause stack overflow (or will not complete in case of asynchronous validation). Depending on the parser you use, untrusted data can lead to circular references. + + +##### Security risks of trusted schemas + +Some keywords in JSON Schemas can lead to very slow validation for certain data. These keywords include (but may be not limited to): + +- `pattern` and `format` for large strings - in some cases using `maxLength` can help mitigate it, but certain regular expressions can lead to exponential validation time even with relatively short strings (see [ReDoS attack](#redos-attack)). +- `patternProperties` for large property names - use `propertyNames` to mitigate, but some regular expressions can have exponential evaluation time as well. +- `uniqueItems` for large non-scalar arrays - use `maxItems` to mitigate + +__Please note__: The suggestions above to prevent slow validation would only work if you do NOT use `allErrors: true` in production code (using it would continue validation after validation errors). + +You can validate your JSON schemas against [this meta-schema](https://github.com/ajv-validator/ajv/blob/master/lib/refs/json-schema-secure.json) to check that these recommendations are followed: + +```javascript +const isSchemaSecure = ajv.compile(require('ajv/lib/refs/json-schema-secure.json')); + +const schema1 = {format: 'email'}; +isSchemaSecure(schema1); // false + +const schema2 = {format: 'email', maxLength: MAX_LENGTH}; +isSchemaSecure(schema2); // true +``` + +__Please note__: following all these recommendation is not a guarantee that validation of untrusted data is safe - it can still lead to some undesirable results. + + +##### Content Security Policies (CSP) +See [Ajv and Content Security Policies (CSP)](#ajv-and-content-security-policies-csp) + + +## ReDoS attack + +Certain regular expressions can lead to the exponential evaluation time even with relatively short strings. + +Please assess the regular expressions you use in the schemas on their vulnerability to this attack - see [safe-regex](https://github.com/substack/safe-regex), for example. + +__Please note__: some formats that Ajv implements use [regular expressions](https://github.com/ajv-validator/ajv/blob/master/lib/compile/formats.js) that can be vulnerable to ReDoS attack, so if you use Ajv to validate data from untrusted sources __it is strongly recommended__ to consider the following: + +- making assessment of "format" implementations in Ajv. +- using `format: 'fast'` option that simplifies some of the regular expressions (although it does not guarantee that they are safe). +- replacing format implementations provided by Ajv with your own implementations of "format" keyword that either uses different regular expressions or another approach to format validation. Please see [addFormat](#api-addformat) method. +- disabling format validation by ignoring "format" keyword with option `format: false` + +Whatever mitigation you choose, please assume all formats provided by Ajv as potentially unsafe and make your own assessment of their suitability for your validation scenarios. + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/ajv-validator/ajv/issues/129), [#134](https://github.com/ajv-validator/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +With the option value `"empty"` properties and items equal to `null` or `""` (empty string) will be considered missing and assigned defaults. + +This option modifies original data. + +__Please note__: the default value is inserted in the generated validation code as a literal, so the value inserted in the data will be the deep clone of the default in the schema. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/ajv-validator/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + +The [`strictDefaults` option](#options) customizes Ajv's behavior for the defaults that Ajv ignores (`true` raises an error, and `"log"` outputs a warning). + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns a boolean value. This function has properties `errors` and `schema`. Errors encountered during the last validation are assigned to `errors` property (it is assigned `null` if there was no errors). `schema` property contains the reference to the original schema. + +The schema passed to this method will be validated against meta-schema unless `validateSchema` option is false. If schema is invalid, an error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft-07 meta schema (http://json-schema.org/draft-07/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/ajv-validator/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON Schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _dependencies_: an optional list of properties that must be present in the parent schema - it will be checked during schema compilation +- _modifying_: `true` MUST be passed if keyword modifies data +- _statements_: `true` can be passed in case inline keyword generates statements (as opposed to expression) +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean or string `"full"` indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + $comment: false, // NEW in Ajv version 6.0 + jsonPointers: false, + uniqueItems: true, + unicode: true, + nullable: false, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: '$id', + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // strict mode options + strictDefaults: false, + strictKeywords: false, + strictNumbers: false, + // asynchronous validation options: + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', // deprecated + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string, schema: object): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _$comment_ (NEW in Ajv version 6.0): log or pass the value of `$comment` keyword to a function. Option values: + - `false` (default): ignore $comment keyword. + - `true`: log the keyword value to console. + - function: pass the keyword value, its schema path and root schema to the specified function +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _nullable_: support keyword "nullable" from [Open API 3 specification](https://swagger.io/docs/specification/data-models/data-types/). +- _format_: formats validation mode. Option values: + - `"fast"` (default) - simplified and fast validation (see [Formats](#formats) for details of which formats are available and affected by this option). + - `"full"` - more restrictive and slow validation. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. + - `false` - ignore all format keywords. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _keywords_: an object with custom keywords. Keys and values will be passed to `addKeyword` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON Schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. See [Error logging](#error-logging). Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (default) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06/07), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `"auto"` - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing or undefined properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (object literal is used). + - `"empty"` - in addition to missing or undefined, use defaults for properties and items that are equal to `null` or `""` (an empty string). + - `"shared"` (deprecated) - insert defaults by reference. If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/ajv-validator/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Strict mode options + +- _strictDefaults_: report ignored `default` keywords in schemas. Option values: + - `false` (default) - ignored defaults are not reported + - `true` - if an ignored default is present, throw an error + - `"log"` - if an ignored default is present, log warning +- _strictKeywords_: report unknown keywords in schemas. Option values: + - `false` (default) - unknown keywords are not reported + - `true` - if an unknown keyword is present, throw an error + - `"log"` - if an unknown keyword is present, log warning +- _strictNumbers_: validate numbers strictly, failing validation for NaN and Infinity. Option values: + - `false` (default) - NaN or Infinity will pass validation for numeric types + - `true` - NaN or Infinity will not pass validation for numeric types + +##### Asynchronous validation options + +- _transpile_: Requires [ajv-async](https://github.com/ajv-validator/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `undefined` (default) - transpile with [nodent](https://github.com/MatAtBread/nodent) if async functions are not supported. + - `true` - always transpile with nodent. + - `false` - do not transpile; if async functions are not supported an exception will be thrown. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can be http://json-schema.org/draft-07/schema or absent (draft-07 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/ajv-validator/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_ (deprecated): set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass a function calling `require('js-beautify').js_beautify` as `processCode: code => js_beautify(code)`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/ajv-validator/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `const` - property `allowedValue` pointing to the value (the schema of the keyword). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- `oneOf` - property `passingSchemas` (array of indices of passing schemas, null if no schema passes). +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +### Error logging + +Using the `logger` option when initiallizing Ajv will allow you to define custom logging. Here you can build upon the exisiting logging. The use of other logging packages is supported as long as the package or its associated wrapper exposes the required methods. If any of the required methods are missing an exception will be thrown. +- **Required Methods**: `log`, `warn`, `error` + +```javascript +var otherLogger = new OtherLogger(); +var ajv = new Ajv({ + logger: { + log: console.log.bind(console), + warn: function warn() { + otherLogger.logWarn.apply(otherLogger, arguments); + }, + error: function error() { + otherLogger.logError.apply(otherLogger, arguments); + console.error.apply(console, arguments); + } + } +}); +``` + + +## Plugins + +Ajv can be extended with plugins that add custom keywords, formats or functions to process generated code. When such plugin is published as npm package it is recommended that it follows these conventions: + +- it exports a function +- this function accepts ajv instance as the first parameter and returns the same instance to allow chaining +- this function can accept an optional configuration as the second parameter + +If you have published a useful plugin please submit a PR to add it to the next section. + + +## Related packages + +- [ajv-async](https://github.com/ajv-validator/ajv-async) - plugin to configure async validation mode +- [ajv-bsontype](https://github.com/BoLaMN/ajv-bsontype) - plugin to validate mongodb's bsonType formats +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/ajv-validator/ajv-errors) - plugin for custom error messages +- [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/ajv-validator/ajv-istanbul) - plugin to instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) - plugin with custom validation keywords (select, typeof, etc.) +- [ajv-merge-patch](https://github.com/ajv-validator/ajv-merge-patch) - plugin with keywords $merge and $patch +- [ajv-pack](https://github.com/ajv-validator/ajv-pack) - produces a compact module exporting validation functions +- [ajv-formats-draft2019](https://github.com/luzlab/ajv-formats-draft2019) - format validators for draft2019 that aren't already included in ajv (ie. `idn-hostname`, `idn-email`, `iri`, `iri-reference` and `duration`). + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON Schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON Schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages +- [ESLint](https://github.com/eslint/eslint) - the pluggable linting utility for JavaScript and JSX + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/ajv-validator/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/ajv-validator/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/ajv-validator/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/ajv-validator/ajv/releases + +__Please note__: [Changes in version 7.0.0-beta](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) + +[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). + +## Code of conduct + +Please review and follow the [Code of conduct](https://github.com/ajv-validator/ajv/blob/master/CODE_OF_CONDUCT.md). + +Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team. + + +## Open-source software support + +Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. + + +## License + +[MIT](https://github.com/ajv-validator/ajv/blob/master/LICENSE) diff --git a/packages/字体精简工具/node_modules/ajv/dist/ajv.bundle.js b/packages/字体精简工具/node_modules/ajv/dist/ajv.bundle.js new file mode 100644 index 0000000..e4d9d15 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/dist/ajv.bundle.js @@ -0,0 +1,7189 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + +},{"./util":10}],5:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],21:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],22:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],24:[function(require,module,exports){ +'use strict'; +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],27:[function(require,module,exports){ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; + +},{"./_limit":13,"./_limitItems":14,"./_limitLength":15,"./_limitProperties":16,"./allOf":17,"./anyOf":18,"./comment":19,"./const":20,"./contains":21,"./dependencies":23,"./enum":24,"./format":25,"./if":26,"./items":28,"./multipleOf":29,"./not":30,"./oneOf":31,"./pattern":32,"./properties":33,"./propertyNames":34,"./ref":35,"./required":36,"./uniqueItems":37,"./validate":38}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],32:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],33:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + +},{}],34:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],37:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],38:[function(require,module,exports){ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + +},{}],39:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i 1) { + sets[0] = sets[0].slice(0, -1); + var xl = sets.length - 1; + for (var x = 1; x < xl; ++x) { + sets[x] = sets[x].slice(1, -1); + } + sets[xl] = sets[xl].slice(1); + return sets.join(''); + } else { + return sets[0]; + } +} +function subexp(str) { + return "(?:" + str + ")"; +} +function typeOf(o) { + return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase(); +} +function toUpperCase(str) { + return str.toUpperCase(); +} +function toArray(obj) { + return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : []; +} +function assign(target, source) { + var obj = target; + if (source) { + for (var key in source) { + obj[key] = source[key]; + } + } + return obj; +} + +function buildExps(isIRI) { + var ALPHA$$ = "[A-Za-z]", + CR$ = "[\\x0D]", + DIGIT$$ = "[0-9]", + DQUOTE$$ = "[\\x22]", + HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), + //case-insensitive + LF$$ = "[\\x0A]", + SP$$ = "[\\x20]", + PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), + //expanded + GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", + SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", + RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), + UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", + //subset, excludes bidi control characters + IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", + //subset + UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), + SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), + USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), + DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), + DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), + //relaxed parsing rules + IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), + H16$ = subexp(HEXDIG$$ + "{1,4}"), + LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), + IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), + // 6( h16 ":" ) ls32 + IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), + // "::" 5( h16 ":" ) ls32 + IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), + //[ h16 ] "::" 4( h16 ":" ) ls32 + IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), + //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 + IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), + //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 + IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), + //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 + IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), + //[ *4( h16 ":" ) h16 ] "::" ls32 + IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), + //[ *5( h16 ":" ) h16 ] "::" h16 + IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), + //[ *6( h16 ":" ) h16 ] "::" + IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), + ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), + //RFC 6874 + IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), + //RFC 6874 + IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), + //RFC 6874, with relaxed parsing rules + IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), + IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), + //RFC 6874 + REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), + HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), + PORT$ = subexp(DIGIT$$ + "*"), + AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), + PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), + SEGMENT$ = subexp(PCHAR$ + "*"), + SEGMENT_NZ$ = subexp(PCHAR$ + "+"), + SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), + PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), + PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), + //simplified + PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), + //simplified + PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), + //simplified + PATH_EMPTY$ = "(?!" + PCHAR$ + ")", + PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), + FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), + HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), + URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), + RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), + URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), + ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), + GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", + SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", + AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$"; + return { + NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"), + NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"), + NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"), + NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"), + ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"), + UNRESERVED: new RegExp(UNRESERVED$$, "g"), + OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"), + PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"), + IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"), + IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules + }; +} +var URI_PROTOCOL = buildExps(false); + +var IRI_PROTOCOL = buildExps(true); + +var slicedToArray = function () { + function sliceIterator(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"]) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; + } + + return function (arr, i) { + if (Array.isArray(arr)) { + return arr; + } else if (Symbol.iterator in Object(arr)) { + return sliceIterator(arr, i); + } else { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + }; +}(); + + + + + + + + + + + + + +var toConsumableArray = function (arr) { + if (Array.isArray(arr)) { + for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; + + return arr2; + } else { + return Array.from(arr); + } +}; + +/** Highest positive signed 32-bit float value */ + +var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 + +/** Bootstring parameters */ +var base = 36; +var tMin = 1; +var tMax = 26; +var skew = 38; +var damp = 700; +var initialBias = 72; +var initialN = 128; // 0x80 +var delimiter = '-'; // '\x2D' + +/** Regular expressions */ +var regexPunycode = /^xn--/; +var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars +var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators + +/** Error messages */ +var errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' +}; + +/** Convenience shortcuts */ +var baseMinusTMin = base - tMin; +var floor = Math.floor; +var stringFromCharCode = String.fromCharCode; + +/*--------------------------------------------------------------------------*/ + +/** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ +function error$1(type) { + throw new RangeError(errors[type]); +} + +/** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ +function map(array, fn) { + var result = []; + var length = array.length; + while (length--) { + result[length] = fn(array[length]); + } + return result; +} + +/** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ +function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; +} + +/** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ +function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + while (counter < length) { + var value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // It's a high surrogate, and there is a next character. + var extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { + // Low surrogate. + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // It's an unmatched surrogate; only append this code unit, in case the + // next code unit is the high surrogate of a surrogate pair. + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; +} + +/** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ +var ucs2encode = function ucs2encode(array) { + return String.fromCodePoint.apply(String, toConsumableArray(array)); +}; + +/** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ +var basicToDigit = function basicToDigit(codePoint) { + if (codePoint - 0x30 < 0x0A) { + return codePoint - 0x16; + } + if (codePoint - 0x41 < 0x1A) { + return codePoint - 0x41; + } + if (codePoint - 0x61 < 0x1A) { + return codePoint - 0x61; + } + return base; +}; + +/** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ +var digitToBasic = function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); +}; + +/** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ +var adapt = function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); +}; + +/** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ +var decode = function decode(input) { + // Don't use UCS-2. + var output = []; + var inputLength = input.length; + var i = 0; + var n = initialN; + var bias = initialBias; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + var basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (var j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error$1('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{ + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + var oldi = i; + for (var w = 1, k = base;; /* no condition */k += base) { + + if (index >= inputLength) { + error$1('invalid-input'); + } + + var digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error$1('overflow'); + } + + i += digit * w; + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + + if (digit < t) { + break; + } + + var baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error$1('overflow'); + } + + w *= baseMinusT; + } + + var out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error$1('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output. + output.splice(i++, 0, n); + } + + return String.fromCodePoint.apply(String, output); +}; + +/** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ +var encode = function encode(input) { + var output = []; + + // Convert the input in UCS-2 to an array of Unicode code points. + input = ucs2decode(input); + + // Cache the length. + var inputLength = input.length; + + // Initialize the state. + var n = initialN; + var delta = 0; + var bias = initialBias; + + // Handle the basic code points. + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _currentValue2 = _step.value; + + if (_currentValue2 < 0x80) { + output.push(stringFromCharCode(_currentValue2)); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + var basicLength = output.length; + var handledCPCount = basicLength; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string with a delimiter unless it's empty. + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + var m = maxInt; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var currentValue = _step2.value; + + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow. + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + var handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error$1('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + var _iteratorNormalCompletion3 = true; + var _didIteratorError3 = false; + var _iteratorError3 = undefined; + + try { + for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { + var _currentValue = _step3.value; + + if (_currentValue < n && ++delta > maxInt) { + error$1('overflow'); + } + if (_currentValue == n) { + // Represent delta as a generalized variable-length integer. + var q = delta; + for (var k = base;; /* no condition */k += base) { + var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; + if (q < t) { + break; + } + var qMinusT = q - t; + var baseMinusT = base - t; + output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + } catch (err) { + _didIteratorError3 = true; + _iteratorError3 = err; + } finally { + try { + if (!_iteratorNormalCompletion3 && _iterator3.return) { + _iterator3.return(); + } + } finally { + if (_didIteratorError3) { + throw _iteratorError3; + } + } + } + + ++delta; + ++n; + } + return output.join(''); +}; + +/** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ +var toUnicode = function toUnicode(input) { + return mapDomain(input, function (string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); +}; + +/** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ +var toASCII = function toASCII(input) { + return mapDomain(input, function (string) { + return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; + }); +}; + +/*--------------------------------------------------------------------------*/ + +/** Define the public API */ +var punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '2.1.0', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode +}; + +/** + * URI.js + * + * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript. + * @author Gary Court + * @see http://github.com/garycourt/uri-js + */ +/** + * Copyright 2011 Gary Court. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of Gary Court. + */ +var SCHEMES = {}; +function pctEncChar(chr) { + var c = chr.charCodeAt(0); + var e = void 0; + if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase(); + return e; +} +function pctDecChars(str) { + var newStr = ""; + var i = 0; + var il = str.length; + while (i < il) { + var c = parseInt(str.substr(i + 1, 2), 16); + if (c < 128) { + newStr += String.fromCharCode(c); + i += 3; + } else if (c >= 194 && c < 224) { + if (il - i >= 6) { + var c2 = parseInt(str.substr(i + 4, 2), 16); + newStr += String.fromCharCode((c & 31) << 6 | c2 & 63); + } else { + newStr += str.substr(i, 6); + } + i += 6; + } else if (c >= 224) { + if (il - i >= 9) { + var _c = parseInt(str.substr(i + 4, 2), 16); + var c3 = parseInt(str.substr(i + 7, 2), 16); + newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63); + } else { + newStr += str.substr(i, 9); + } + i += 9; + } else { + newStr += str.substr(i, 3); + i += 3; + } + } + return newStr; +} +function _normalizeComponentEncoding(components, protocol) { + function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(protocol.UNRESERVED) ? str : decStr; + } + if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, ""); + if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase); + return components; +} + +function _stripLeadingZeros(str) { + return str.replace(/^0*(.*)/, "$1") || "0"; +} +function _normalizeIPv4(host, protocol) { + var matches = host.match(protocol.IPV4ADDRESS) || []; + + var _matches = slicedToArray(matches, 2), + address = _matches[1]; + + if (address) { + return address.split(".").map(_stripLeadingZeros).join("."); + } else { + return host; + } +} +function _normalizeIPv6(host, protocol) { + var matches = host.match(protocol.IPV6ADDRESS) || []; + + var _matches2 = slicedToArray(matches, 3), + address = _matches2[1], + zone = _matches2[2]; + + if (address) { + var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(), + _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), + last = _address$toLowerCase$2[0], + first = _address$toLowerCase$2[1]; + + var firstFields = first ? first.split(":").map(_stripLeadingZeros) : []; + var lastFields = last.split(":").map(_stripLeadingZeros); + var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]); + var fieldCount = isLastFieldIPv4Address ? 7 : 8; + var lastFieldsStart = lastFields.length - fieldCount; + var fields = Array(fieldCount); + for (var x = 0; x < fieldCount; ++x) { + fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || ''; + } + if (isLastFieldIPv4Address) { + fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol); + } + var allZeroFields = fields.reduce(function (acc, field, index) { + if (!field || field === "0") { + var lastLongest = acc[acc.length - 1]; + if (lastLongest && lastLongest.index + lastLongest.length === index) { + lastLongest.length++; + } else { + acc.push({ index: index, length: 1 }); + } + } + return acc; + }, []); + var longestZeroFields = allZeroFields.sort(function (a, b) { + return b.length - a.length; + })[0]; + var newHost = void 0; + if (longestZeroFields && longestZeroFields.length > 1) { + var newFirst = fields.slice(0, longestZeroFields.index); + var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length); + newHost = newFirst.join(":") + "::" + newLast.join(":"); + } else { + newHost = fields.join(":"); + } + if (zone) { + newHost += "%" + zone; + } + return newHost; + } else { + return host; + } +} +var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i; +var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined; +function parse(uriString) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var components = {}; + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString; + var matches = uriString.match(URI_PARSE); + if (matches) { + if (NO_MATCH_IS_UNDEFINED) { + //store each component + components.scheme = matches[1]; + components.userinfo = matches[3]; + components.host = matches[4]; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = matches[7]; + components.fragment = matches[8]; + //fix port number + if (isNaN(components.port)) { + components.port = matches[5]; + } + } else { + //IE FIX for improper RegExp matching + //store each component + components.scheme = matches[1] || undefined; + components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined; + components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined; + components.port = parseInt(matches[5], 10); + components.path = matches[6] || ""; + components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined; + components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined; + //fix port number + if (isNaN(components.port)) { + components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined; + } + } + if (components.host) { + //normalize IP hosts + components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol); + } + //determine reference type + if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) { + components.reference = "same-document"; + } else if (components.scheme === undefined) { + components.reference = "relative"; + } else if (components.fragment === undefined) { + components.reference = "absolute"; + } else { + components.reference = "uri"; + } + //check for reference errors + if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) { + components.error = components.error || "URI is not a " + options.reference + " reference."; + } + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //check if scheme can't handle IRIs + if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) { + //if host component is a domain name + if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) { + //convert Unicode IDN -> ASCII IDN + try { + components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e; + } + } + //convert IRI -> URI + _normalizeComponentEncoding(components, URI_PROTOCOL); + } else { + //normalize encodings + _normalizeComponentEncoding(components, protocol); + } + //perform scheme specific parsing + if (schemeHandler && schemeHandler.parse) { + schemeHandler.parse(components, options); + } + } else { + components.error = components.error || "URI can not be parsed."; + } + return components; +} + +function _recomposeAuthority(components, options) { + var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + if (components.userinfo !== undefined) { + uriTokens.push(components.userinfo); + uriTokens.push("@"); + } + if (components.host !== undefined) { + //normalize IP hosts, add brackets and escape zone separator for IPv6 + uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) { + return "[" + $1 + ($2 ? "%25" + $2 : "") + "]"; + })); + } + if (typeof components.port === "number" || typeof components.port === "string") { + uriTokens.push(":"); + uriTokens.push(String(components.port)); + } + return uriTokens.length ? uriTokens.join("") : undefined; +} + +var RDS1 = /^\.\.?\//; +var RDS2 = /^\/\.(\/|$)/; +var RDS3 = /^\/\.\.(\/|$)/; +var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/; +function removeDotSegments(input) { + var output = []; + while (input.length) { + if (input.match(RDS1)) { + input = input.replace(RDS1, ""); + } else if (input.match(RDS2)) { + input = input.replace(RDS2, "/"); + } else if (input.match(RDS3)) { + input = input.replace(RDS3, "/"); + output.pop(); + } else if (input === "." || input === "..") { + input = ""; + } else { + var im = input.match(RDS5); + if (im) { + var s = im[0]; + input = input.slice(s.length); + output.push(s); + } else { + throw new Error("Unexpected dot segment condition"); + } + } + } + return output.join(""); +} + +function serialize(components) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL; + var uriTokens = []; + //find scheme handler + var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()]; + //perform scheme specific serialization + if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options); + if (components.host) { + //if host component is an IPv6 address + if (protocol.IPV6ADDRESS.test(components.host)) {} + //TODO: normalize IPv6 address as per RFC 5952 + + //if host component is a domain name + else if (options.domainHost || schemeHandler && schemeHandler.domainHost) { + //convert IDN via punycode + try { + components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host); + } catch (e) { + components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + } + } + //normalize encoding + _normalizeComponentEncoding(components, protocol); + if (options.reference !== "suffix" && components.scheme) { + uriTokens.push(components.scheme); + uriTokens.push(":"); + } + var authority = _recomposeAuthority(components, options); + if (authority !== undefined) { + if (options.reference !== "suffix") { + uriTokens.push("//"); + } + uriTokens.push(authority); + if (components.path && components.path.charAt(0) !== "/") { + uriTokens.push("/"); + } + } + if (components.path !== undefined) { + var s = components.path; + if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) { + s = removeDotSegments(s); + } + if (authority === undefined) { + s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//" + } + uriTokens.push(s); + } + if (components.query !== undefined) { + uriTokens.push("?"); + uriTokens.push(components.query); + } + if (components.fragment !== undefined) { + uriTokens.push("#"); + uriTokens.push(components.fragment); + } + return uriTokens.join(""); //merge tokens into a string +} + +function resolveComponents(base, relative) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var skipNormalization = arguments[3]; + + var target = {}; + if (!skipNormalization) { + base = parse(serialize(base, options), options); //normalize base components + relative = parse(serialize(relative, options), options); //normalize relative components + } + options = options || {}; + if (!options.tolerant && relative.scheme) { + target.scheme = relative.scheme; + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) { + //target.authority = relative.authority; + target.userinfo = relative.userinfo; + target.host = relative.host; + target.port = relative.port; + target.path = removeDotSegments(relative.path || ""); + target.query = relative.query; + } else { + if (!relative.path) { + target.path = base.path; + if (relative.query !== undefined) { + target.query = relative.query; + } else { + target.query = base.query; + } + } else { + if (relative.path.charAt(0) === "/") { + target.path = removeDotSegments(relative.path); + } else { + if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) { + target.path = "/" + relative.path; + } else if (!base.path) { + target.path = relative.path; + } else { + target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path; + } + target.path = removeDotSegments(target.path); + } + target.query = relative.query; + } + //target.authority = base.authority; + target.userinfo = base.userinfo; + target.host = base.host; + target.port = base.port; + } + target.scheme = base.scheme; + } + target.fragment = relative.fragment; + return target; +} + +function resolve(baseURI, relativeURI, options) { + var schemelessOptions = assign({ scheme: 'null' }, options); + return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions); +} + +function normalize(uri, options) { + if (typeof uri === "string") { + uri = serialize(parse(uri, options), options); + } else if (typeOf(uri) === "object") { + uri = parse(serialize(uri, options), options); + } + return uri; +} + +function equal(uriA, uriB, options) { + if (typeof uriA === "string") { + uriA = serialize(parse(uriA, options), options); + } else if (typeOf(uriA) === "object") { + uriA = serialize(uriA, options); + } + if (typeof uriB === "string") { + uriB = serialize(parse(uriB, options), options); + } else if (typeOf(uriB) === "object") { + uriB = serialize(uriB, options); + } + return uriA === uriB; +} + +function escapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar); +} + +function unescapeComponent(str, options) { + return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars); +} + +var handler = { + scheme: "http", + domainHost: true, + parse: function parse(components, options) { + //report missing host + if (!components.host) { + components.error = components.error || "HTTP URIs must have a host."; + } + return components; + }, + serialize: function serialize(components, options) { + var secure = String(components.scheme).toLowerCase() === "https"; + //normalize the default port + if (components.port === (secure ? 443 : 80) || components.port === "") { + components.port = undefined; + } + //normalize the empty path + if (!components.path) { + components.path = "/"; + } + //NOTE: We do not parse query strings for HTTP URIs + //as WWW Form Url Encoded query strings are part of the HTML4+ spec, + //and not the HTTP spec. + return components; + } +}; + +var handler$1 = { + scheme: "https", + domainHost: handler.domainHost, + parse: handler.parse, + serialize: handler.serialize +}; + +function isSecure(wsComponents) { + return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss"; +} +//RFC 6455 +var handler$2 = { + scheme: "ws", + domainHost: true, + parse: function parse(components, options) { + var wsComponents = components; + //indicate if the secure flag is set + wsComponents.secure = isSecure(wsComponents); + //construct resouce name + wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : ''); + wsComponents.path = undefined; + wsComponents.query = undefined; + return wsComponents; + }, + serialize: function serialize(wsComponents, options) { + //normalize the default port + if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") { + wsComponents.port = undefined; + } + //ensure scheme matches secure flag + if (typeof wsComponents.secure === 'boolean') { + wsComponents.scheme = wsComponents.secure ? 'wss' : 'ws'; + wsComponents.secure = undefined; + } + //reconstruct path from resource name + if (wsComponents.resourceName) { + var _wsComponents$resourc = wsComponents.resourceName.split('?'), + _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), + path = _wsComponents$resourc2[0], + query = _wsComponents$resourc2[1]; + + wsComponents.path = path && path !== '/' ? path : undefined; + wsComponents.query = query; + wsComponents.resourceName = undefined; + } + //forbid fragment component + wsComponents.fragment = undefined; + return wsComponents; + } +}; + +var handler$3 = { + scheme: "wss", + domainHost: handler$2.domainHost, + parse: handler$2.parse, + serialize: handler$2.serialize +}; + +var O = {}; +var isIRI = true; +//RFC 3986 +var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]"; +var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive +var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded +//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; = +//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127) +//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext +//const VCHAR$$ = "[\\x21-\\x7E]"; +//const WSP$$ = "[\\x20\\x09]"; +//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext +//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+"); +//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$); +//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"'); +var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]"; +var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]"; +var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]"); +var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"; +var UNRESERVED = new RegExp(UNRESERVED$$, "g"); +var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g"); +var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g"); +var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g"); +var NOT_HFVALUE = NOT_HFNAME; +function decodeUnreserved(str) { + var decStr = pctDecChars(str); + return !decStr.match(UNRESERVED) ? str : decStr; +} +var handler$4 = { + scheme: "mailto", + parse: function parse$$1(components, options) { + var mailtoComponents = components; + var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : []; + mailtoComponents.path = undefined; + if (mailtoComponents.query) { + var unknownHeaders = false; + var headers = {}; + var hfields = mailtoComponents.query.split("&"); + for (var x = 0, xl = hfields.length; x < xl; ++x) { + var hfield = hfields[x].split("="); + switch (hfield[0]) { + case "to": + var toAddrs = hfield[1].split(","); + for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) { + to.push(toAddrs[_x]); + } + break; + case "subject": + mailtoComponents.subject = unescapeComponent(hfield[1], options); + break; + case "body": + mailtoComponents.body = unescapeComponent(hfield[1], options); + break; + default: + unknownHeaders = true; + headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options); + break; + } + } + if (unknownHeaders) mailtoComponents.headers = headers; + } + mailtoComponents.query = undefined; + for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) { + var addr = to[_x2].split("@"); + addr[0] = unescapeComponent(addr[0]); + if (!options.unicodeSupport) { + //convert Unicode IDN -> ASCII IDN + try { + addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase()); + } catch (e) { + mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e; + } + } else { + addr[1] = unescapeComponent(addr[1], options).toLowerCase(); + } + to[_x2] = addr.join("@"); + } + return mailtoComponents; + }, + serialize: function serialize$$1(mailtoComponents, options) { + var components = mailtoComponents; + var to = toArray(mailtoComponents.to); + if (to) { + for (var x = 0, xl = to.length; x < xl; ++x) { + var toAddr = String(to[x]); + var atIdx = toAddr.lastIndexOf("@"); + var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar); + var domain = toAddr.slice(atIdx + 1); + //convert IDN via punycode + try { + domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain); + } catch (e) { + components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e; + } + to[x] = localPart + "@" + domain; + } + components.path = to.join(","); + } + var headers = mailtoComponents.headers = mailtoComponents.headers || {}; + if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject; + if (mailtoComponents.body) headers["body"] = mailtoComponents.body; + var fields = []; + for (var name in headers) { + if (headers[name] !== O[name]) { + fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)); + } + } + if (fields.length) { + components.query = fields.join("&"); + } + return components; + } +}; + +var URN_PARSE = /^([^\:]+)\:(.*)/; +//RFC 2141 +var handler$5 = { + scheme: "urn", + parse: function parse$$1(components, options) { + var matches = components.path && components.path.match(URN_PARSE); + var urnComponents = components; + if (matches) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = matches[1].toLowerCase(); + var nss = matches[2]; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + urnComponents.nid = nid; + urnComponents.nss = nss; + urnComponents.path = undefined; + if (schemeHandler) { + urnComponents = schemeHandler.parse(urnComponents, options); + } + } else { + urnComponents.error = urnComponents.error || "URN can not be parsed."; + } + return urnComponents; + }, + serialize: function serialize$$1(urnComponents, options) { + var scheme = options.scheme || urnComponents.scheme || "urn"; + var nid = urnComponents.nid; + var urnScheme = scheme + ":" + (options.nid || nid); + var schemeHandler = SCHEMES[urnScheme]; + if (schemeHandler) { + urnComponents = schemeHandler.serialize(urnComponents, options); + } + var uriComponents = urnComponents; + var nss = urnComponents.nss; + uriComponents.path = (nid || options.nid) + ":" + nss; + return uriComponents; + } +}; + +var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/; +//RFC 4122 +var handler$6 = { + scheme: "urn:uuid", + parse: function parse(urnComponents, options) { + var uuidComponents = urnComponents; + uuidComponents.uuid = uuidComponents.nss; + uuidComponents.nss = undefined; + if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) { + uuidComponents.error = uuidComponents.error || "UUID is not valid."; + } + return uuidComponents; + }, + serialize: function serialize(uuidComponents, options) { + var urnComponents = uuidComponents; + //normalize UUID + urnComponents.nss = (uuidComponents.uuid || "").toLowerCase(); + return urnComponents; + } +}; + +SCHEMES[handler.scheme] = handler; +SCHEMES[handler$1.scheme] = handler$1; +SCHEMES[handler$2.scheme] = handler$2; +SCHEMES[handler$3.scheme] = handler$3; +SCHEMES[handler$4.scheme] = handler$4; +SCHEMES[handler$5.scheme] = handler$5; +SCHEMES[handler$6.scheme] = handler$6; + +exports.SCHEMES = SCHEMES; +exports.pctEncChar = pctEncChar; +exports.pctDecChars = pctDecChars; +exports.parse = parse; +exports.removeDotSegments = removeDotSegments; +exports.serialize = serialize; +exports.resolveComponents = resolveComponents; +exports.resolve = resolve; +exports.normalize = normalize; +exports.equal = equal; +exports.escapeComponent = escapeComponent; +exports.unescapeComponent = unescapeComponent; + +Object.defineProperty(exports, '__esModule', { value: true }); + +}))); + + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,u=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,p=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function m(e){return a.copy(m[e="full"==e?"full":"fast"])}function v(e){var r=e.match(o);if(!r)return!1;var t,a=+r[2],s=+r[3];return 1<=a&&a<=12&&1<=s&&s<=(2!=a||((t=+r[1])%4!=0||t%100==0&&t%400!=0)?i[a]:29)}function y(e,r){var t=e.match(n);if(!t)return!1;var a=t[1],s=t[2],o=t[3];return(a<=23&&s<=59&&o<=59||23==a&&59==s&&60==o)&&(!r||t[5])}(r.exports=m).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:u,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f},m.full={date:v,time:y,"date-time":function(e){var r=e.split(g);return 2==r.length&&v(r[0])&&y(r[1],!0)},uri:function(e){return P.test(e)&&l.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]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9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:w,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":p,"relative-json-pointer":f};var g=/t|\s/i;var P=/\/|:/;var E=/[^\\]\\Z/;function w(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},{"./util":10}],5:[function(e,r,t){"use strict";var R=e("./resolve"),$=e("./util"),j=e("./error_classes"),D=e("fast-json-stable-stringify"),O=e("../dotjs/validate"),I=$.ucs2length,A=e("fast-deep-equal"),k=j.Validation;function C(e,c,u,r){var d=this,p=this._opts,h=[void 0],f={},l=[],t={},m=[],a={},v=[],s=function(e,r,t){var a=L.call(this,e,r,t);return 0<=a?{index:a,compiling:!0}:{index:a=this._compilations.length,compiling:!(this._compilations[a]={schema:e,root:r,baseId:t})}}.call(this,e,c=c||{schema:e,refVal:h,refs:f},r),o=this._compilations[s.index];if(s.compiling)return o.callValidate=P;var y=this._formats,g=this.RULES;try{var i=E(e,c,u,r);o.validate=i;var n=o.callValidate;return n&&(n.schema=i.schema,n.errors=null,n.refs=i.refs,n.refVal=i.refVal,n.root=i.root,n.$async=i.$async,p.sourceCode&&(n.source=i.source)),i}finally{(function(e,r,t){var a=L.call(this,e,r,t);0<=a&&this._compilations.splice(a,1)}).call(this,e,c,r)}function P(){var e=o.validate,r=e.apply(this,arguments);return P.errors=e.errors,r}function E(e,r,t,a){var s=!r||r&&r.schema==e;if(r.schema!=c.schema)return C.call(d,e,r,t,a);var o=!0===e.$async,i=O({isTop:!0,schema:e,isRoot:s,baseId:a,root:r,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:j.MissingRef,RULES:g,validate:O,util:$,resolve:R,resolveRef:w,usePattern:_,useDefault:F,useCustomRule:x,opts:p,formats:y,logger:d.logger,self:d}),i=Q(h,z)+Q(l,N)+Q(m,q)+Q(v,T)+i;p.processCode&&(i=p.processCode(i,e));try{var n=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(d,g,y,c,h,m,v,A,I,k);h[0]=n}catch(e){throw d.logger.error("Error compiling schema, function code:",i),e}return n.schema=e,n.errors=null,n.refs=f,n.refVal=h,n.root=s?n:r,o&&(n.$async=!0),!0===p.sourceCode&&(n.source={code:i,patterns:l,defaults:m}),n}function w(e,r,t){r=R.url(e,r);var a,s,o=f[r];if(void 0!==o)return S(a=h[o],s="refVal["+o+"]");if(!t&&c.refs){var i=c.refs[r];if(void 0!==i)return S(a=c.refVal[i],s=b(r,a))}s=b(r);var n,l=R.call(d,E,c,r);if(void 0!==l||(n=u&&u[r])&&(l=R.inlineRef(n,p.inlineRefs)?n:C.call(d,n,c,u,e)),void 0!==l)return S(h[f[r]]=l,s);delete f[r]}function b(e,r){var t=h.length;return h[t]=r,"refVal"+(f[e]=t)}function S(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&!!e.$async}}function _(e){var r=t[e];return void 0===r&&(r=t[e]=l.length,l[r]=e),"pattern"+r}function F(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return $.toQuotedString(e);case"object":if(null===e)return"null";var r=D(e),t=a[r];return void 0===t&&(t=a[r]=m.length,m[t]=e),"default"+t}}function x(e,r,t,a){if(!1!==d._opts.validateSchema){var s=e.definition.dependencies;if(s&&!s.every(function(e){return Object.prototype.hasOwnProperty.call(t,e)}))throw new Error("parent schema must have all required keywords: "+s.join(","));var o=e.definition.validateSchema;if(o)if(!o(r)){var i="keyword schema is invalid: "+d.errorsText(o.errors);if("log"!=d._opts.validateSchema)throw new Error(i);d.logger.error(i)}}var n,l=e.definition.compile,c=e.definition.inline,u=e.definition.macro;if(l)n=l.call(d,r,t,a);else if(u)n=u.call(d,r,t,a),!1!==p.validateSchema&&d.validateSchema(n,!0);else if(c)n=c.call(d,a,e.keyword,r,t);else if(!(n=e.definition.validate))return;if(void 0===n)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var h=v.length;return{code:"customRule"+h,validate:v[h]=n}}}function L(e,r,t){for(var a=0;a",_=P?">":"<",F=void 0;if(!y&&"number"!=typeof d&&void 0!==d)throw new Error(r+" must be number");if(!b&&void 0!==w&&"number"!=typeof w&&"boolean"!=typeof w)throw new Error(E+" must be number or boolean");b?(o="exclIsNumber"+u,i="' + "+(n="op"+u)+" + '",c+=" var schemaExcl"+u+" = "+(t=e.util.getData(w.$data,h,e.dataPathArr))+"; ",F=E,(l=l||[]).push(c+=" var "+(a="exclusive"+u)+"; var "+(s="exclType"+u)+" = typeof "+(t="schemaExcl"+u)+"; if ("+s+" != 'boolean' && "+s+" != 'undefined' && "+s+" != 'number') { "),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",!1!==e.opts.messages&&(c+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(c+=" , schema: validate.schema"+p+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ",x=c,c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } else if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+s+" == 'number' ? ( ("+a+" = "+g+" === undefined || "+t+" "+S+"= "+g+") ? "+v+" "+_+"= "+t+" : "+v+" "+_+" "+g+" ) : ( ("+a+" = "+t+" === true) ? "+v+" "+_+"= "+g+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { var op"+u+" = "+a+" ? '"+S+"' : '"+S+"='; ",void 0===d&&(f=e.errSchemaPath+"/"+(F=E),g=t,y=b)):(i=S,(o="number"==typeof w)&&y?(n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" ( "+g+" === undefined || "+w+" "+S+"= "+g+" ? "+v+" "+_+"= "+w+" : "+v+" "+_+" "+g+" ) || "+v+" !== "+v+") { "):(o&&void 0===d?(a=!0,f=e.errSchemaPath+"/"+(F=E),g=w,_+="="):(o&&(g=Math[P?"min":"max"](w,d)),w===(!o||g)?(a=!0,f=e.errSchemaPath+"/"+(F=E),_+="="):(a=!1,i+="=")),n="'"+i+"'",c+=" if ( ",y&&(c+=" ("+g+" !== undefined && typeof "+g+" != 'number') || "),c+=" "+v+" "+_+" "+g+" || "+v+" !== "+v+") { ")),F=F||r,(l=l||[]).push(c),c="",!1!==e.createErrors?(c+=" { keyword: '"+(F||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+n+", limit: "+g+", exclusive: "+a+" } ",!1!==e.opts.messages&&(c+=" , message: 'should be "+i+" ",c+=y?"' + "+g:g+"'"),e.opts.verbose&&(c+=" , schema: ",c+=y?"validate.schema"+p:""+d,c+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),c+=" } "):c+=" {} ";var x=c;return c=l.pop(),c+=!e.compositeRule&&m?e.async?" throw new ValidationError(["+x+"]); ":" validate.errors = ["+x+"]; return false; ":" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c+=" } ",m&&(c+=" else { "),c}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" "+c+".length "+("maxItems"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxItems"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" items' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || "),t+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ";var d=r,p=p||[];p.push(t+=" "+("maxLength"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be ",t+="maxLength"==r?"longer":"shorter",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" characters' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u=e.opts.$data&&o&&o.$data,h=u?(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ","schema"+a):o;if(!u&&"number"!=typeof o)throw new Error(r+" must be number");t+="if ( ",u&&(t+=" ("+h+" !== undefined && typeof "+h+" != 'number') || ");var d=r,p=p||[];p.push(t+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+h+") { "),t="",!1!==e.createErrors?(t+=" { keyword: '"+(d||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { limit: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have ",t+="maxProperties"==r?"more":"fewer",t+=" than ",t+=u?"' + "+h+" + '":""+o,t+=" properties' "),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var f=t,t=p.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+f+"]); ":" validate.errors = ["+f+"]; return false; ":" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,u=n.baseId,h=!0,d=a;if(d)for(var p,f=-1,m=d.length-1;f "+_+") { ",x=c+"["+_+"]",d.schema=$,d.schemaPath=i+"["+_+"]",d.errSchemaPath=n+"/"+_,d.errorPath=e.util.getPathExpr(e.errorPath,_,e.opts.jsonPointers,!0),d.dataPathArr[v]=_,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",t+=" } ",l&&(t+=" if ("+f+") { ",p+="}"))}"object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&0 "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0),x=c+"["+m+"]",d.dataPathArr[v]=m,R=e.validate(d),d.baseId=g,e.util.varOccurences(R,y)<2?t+=" "+e.util.varReplace(R,y,x)+" ":t+=" var "+y+" = "+x+"; "+R+" ",l&&(t+=" if (!"+f+") break; "),t+=" } } ",l&&(t+=" if ("+f+") { ",p+="}"))}else{(e.opts.strictKeywords?"object"==typeof o&&0 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",t+=" ) ",u&&(t+=" ) ");var d=d||[];d.push(t+=" ) { "),t="",!1!==e.createErrors?(t+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { multipleOf: "+h+" } ",!1!==e.opts.messages&&(t+=" , message: 'should be multiple of ",t+=u?"' + "+h:h+"'"),e.opts.verbose&&(t+=" , schema: ",t+=u?"validate.schema"+i:""+o,t+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var p=t,t=d.pop();return t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+="} ",l&&(t+=" else { "),t}},{}],30:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),u="errs__"+a,h=e.util.copy(e);h.level++;var d,p,f,m,v="valid"+h.level;return(e.opts.strictKeywords?"object"==typeof o&&0 1) { ",t=e.schema.items&&e.schema.items.type,a=Array.isArray(t),!t||"object"==t||"array"==t||a&&(0<=t.indexOf("object")||0<=t.indexOf("array"))?i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } ":(i+=" var itemIndices = {}, item; for (;i--;) { var item = "+p+"[i]; ",i+=" if ("+e.util["checkDataType"+(a?"s":"")](t,"item",e.opts.strictNumbers,!0)+") continue; ",a&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+f+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),i+=" } ",m&&(i+=" } "),(s=s||[]).push(i+=" if (!"+f+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=m?"validate.schema"+u:""+c,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),i+=!e.compositeRule&&d?e.async?" throw new ValidationError(["+o+"]); ":" validate.errors = ["+o+"]; return false; ":" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",d&&(i+=" else { ")):d&&(i+=" if (true) { "),i}},{}],38:[function(e,r,t){"use strict";r.exports=function(a,e){var r="",t=!0===a.schema.$async,s=a.util.schemaHasRulesExcept(a.schema,a.RULES.all,"$ref"),o=a.self._getId(a.schema);if(a.opts.strictKeywords){var i=a.util.schemaUnknownRules(a.schema,a.RULES.keywords);if(i){var n="unknown keyword: "+i;if("log"!==a.opts.strictKeywords)throw new Error(n);a.logger.warn(n)}}if(a.isTop&&(r+=" var validate = ",t&&(a.async=!0,r+="async "),r+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(a.opts.sourceCode||a.opts.processCode)&&(r+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof a.schema||!s&&!a.schema.$ref){var l=a.level,c=a.dataLevel,u=a.schema[e="false schema"],h=a.schemaPath+a.util.getProperty(e),d=a.errSchemaPath+"/"+e,p=!a.opts.allErrors,f="data"+(c||""),m="valid"+l;return!1===a.schema?(a.isTop?p=!0:r+=" var "+m+" = false; ",(U=U||[]).push(r),r="",!1!==a.createErrors?(r+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+a.errorPath+" , schemaPath: "+a.util.toQuotedString(d)+" , params: {} ",!1!==a.opts.messages&&(r+=" , message: 'boolean schema is false' "),a.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+a.schemaPath+" , data: "+f+" "),r+=" } "):r+=" {} ",D=r,r=U.pop(),r+=!a.compositeRule&&p?a.async?" throw new ValidationError(["+D+"]); ":" validate.errors = ["+D+"]; return false; ":" var err = "+D+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):r+=a.isTop?t?" return data; ":" validate.errors = null; return true; ":" var "+m+" = true; ",a.isTop&&(r+=" }; return validate; "),r}if(a.isTop){var v=a.isTop,l=a.level=0,c=a.dataLevel=0,f="data";if(a.rootId=a.resolve.fullPath(a.self._getId(a.root.schema)),a.baseId=a.baseId||a.rootId,delete a.isTop,a.dataPathArr=[""],void 0!==a.schema.default&&a.opts.useDefaults&&a.opts.strictDefaults){var y="default is ignored in the schema root";if("log"!==a.opts.strictDefaults)throw new Error(y);a.logger.warn(y)}r+=" var vErrors = null; ",r+=" var errors = 0; ",r+=" if (rootData === undefined) rootData = data; "}else{l=a.level,f="data"+((c=a.dataLevel)||"");if(o&&(a.baseId=a.resolve.url(a.baseId,o)),t&&!a.async)throw new Error("async schema in sync schema");r+=" var errs_"+l+" = errors;"}var g,m="valid"+l,p=!a.opts.allErrors,P="",E="",w=a.schema.type,b=Array.isArray(w);if(w&&a.opts.nullable&&!0===a.schema.nullable&&(b?-1==w.indexOf("null")&&(w=w.concat("null")):"null"!=w&&(w=[w,"null"],b=!0)),b&&1==w.length&&(w=w[0],b=!1),a.schema.$ref&&s){if("fail"==a.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+a.errSchemaPath+'" (see option extendRefs)');!0!==a.opts.extendRefs&&(s=!1,a.logger.warn('$ref: keywords ignored in schema at path "'+a.errSchemaPath+'"'))}if(a.schema.$comment&&a.opts.$comment&&(r+=" "+a.RULES.all.$comment.code(a,"$comment")),w){a.opts.coerceTypes&&(g=a.util.coerceToTypes(a.opts.coerceTypes,w));var S=a.RULES.types[w];if(g||b||!0===S||S&&!Z(S)){h=a.schemaPath+".type",d=a.errSchemaPath+"/type",h=a.schemaPath+".type",d=a.errSchemaPath+"/type";if(r+=" if ("+a.util[b?"checkDataTypes":"checkDataType"](w,f,a.opts.strictNumbers,!0)+") { ",g){var _="dataType"+l,F="coerced"+l;r+=" var "+_+" = typeof "+f+"; var "+F+" = undefined; ","array"==a.opts.coerceTypes&&(r+=" if ("+_+" == 'object' && Array.isArray("+f+") && "+f+".length == 1) { "+f+" = "+f+"[0]; "+_+" = typeof "+f+"; if ("+a.util.checkDataType(a.schema.type,f,a.opts.strictNumbers)+") "+F+" = "+f+"; } "),r+=" if ("+F+" !== undefined) ; ";var x=g;if(x)for(var R,$=-1,j=x.length-1;$= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=Math.floor,C=String.fromCharCode;function L(e){throw new RangeError(i[e])}function n(e,r){var t=e.split("@"),a="";return 1>1,e+=k(e/r);455k((A-a)/h))&&L("overflow"),a+=p*h;var f=d<=o?1:o+26<=d?26:d-o;if(pk(A/m)&&L("overflow"),h*=m}var v=r.length+1,o=z(a-u,v,0==u);k(a/v)>A-s&&L("overflow"),s+=k(a/v),a%=v,r.splice(a++,0,s)}return String.fromCodePoint.apply(String,r)}function c(e){var r=[],t=(e=N(e)).length,a=128,s=0,o=72,i=!0,n=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var h=c.value;h<128&&r.push(C(h))}}catch(e){n=!0,l=e}finally{try{!i&&u.return&&u.return()}finally{if(n)throw l}}var d=r.length,p=d;for(d&&r.push("-");pk((A-s)/w)&&L("overflow"),s+=(f-a)*w,a=f;var b=!0,S=!1,_=void 0;try{for(var F,x=e[Symbol.iterator]();!(b=(F=x.next()).done);b=!0){var R=F.value;if(RA&&L("overflow"),R==a){for(var $=s,j=36;;j+=36){var D=j<=o?1:o+26<=j?26:j-o;if($>6|192).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase():"%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(63&r|128).toString(16).toUpperCase()}function p(e){for(var r="",t=0,a=e.length;tA-Z\\x5E-\\x7E]",'[\\"\\\\]')),Y=new RegExp(K,"g"),W=new RegExp("(?:(?:%[EFef][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[89A-Fa-f][0-9A-Fa-f]%[0-9A-Fa-f][0-9A-Fa-f])|(?:%[0-9A-Fa-f][0-9A-Fa-f]))","g"),X=new RegExp(J("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',G),"g"),ee=new RegExp(J("[^]",K,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=ee;function te(e){var r=p(e);return r.match(Y)?r:e}var ae={scheme:"mailto",parse:function(e,r){var t=e,a=t.to=t.path?t.path.split(","):[];if(t.path=void 0,t.query){for(var s=!1,o={},i=t.query.split("&"),n=0,l=i.length;n); + + message: string; + errors: Array; + ajv: true; + validation: true; + } + + class MissingRefError extends Error { + constructor(baseId: string, ref: string, message?: string); + static message: (baseId: string, ref: string) => string; + + message: string; + missingRef: string; + missingSchema: string; + } +} + +declare namespace ajv { + type ValidationError = AjvErrors.ValidationError; + + type MissingRefError = AjvErrors.MissingRefError; + + interface Ajv { + /** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key, [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize by default). + * @param {string|object|Boolean} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ + validate(schemaKeyRef: object | string | boolean, data: any): boolean | PromiseLike; + /** + * Create validating function for passed schema. + * @param {object|Boolean} schema schema object + * @return {Function} validating function + */ + compile(schema: object | boolean): ValidateFunction; + /** + * Creates validating function for passed schema with asynchronous loading of missing schemas. + * `loadSchema` option should be a function that accepts schema uri and node-style callback. + * @this Ajv + * @param {object|Boolean} schema schema object + * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped + * @param {Function} callback optional node-style callback, it is always called with 2 parameters: error (or null) and validating function. + * @return {PromiseLike} validating function + */ + compileAsync(schema: object | boolean, meta?: Boolean, callback?: (err: Error, validate: ValidateFunction) => any): PromiseLike; + /** + * Adds schema to the instance. + * @param {object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {string} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @return {Ajv} this for method chaining + */ + addSchema(schema: Array | object, key?: string): Ajv; + /** + * Add schema that will be used to validate other schemas + * options in META_IGNORE_OPTIONS are alway set to false + * @param {object} schema schema object + * @param {string} key optional schema key + * @return {Ajv} this for method chaining + */ + addMetaSchema(schema: object, key?: string): Ajv; + /** + * Validate schema + * @param {object|Boolean} schema schema to validate + * @return {Boolean} true if schema is valid + */ + validateSchema(schema: object | boolean): boolean; + /** + * Get compiled schema from the instance by `key` or `ref`. + * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). + * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema. + */ + getSchema(keyRef: string): ValidateFunction | undefined; + /** + * Remove cached schema(s). + * If no parameter is passed all schemas but meta-schemas are removed. + * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. + * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. + * @param {string|object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining + */ + removeSchema(schemaKeyRef?: object | string | RegExp | boolean): Ajv; + /** + * Add custom format + * @param {string} name format name + * @param {string|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) + * @return {Ajv} this for method chaining + */ + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; + /** + * Define custom keyword + * @this Ajv + * @param {string} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. + * @param {object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; + /** + * Get keyword definition + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise. + */ + getKeyword(keyword: string): object | boolean; + /** + * Remove keyword + * @this Ajv + * @param {string} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining + */ + removeKeyword(keyword: string): Ajv; + /** + * Validate keyword + * @this Ajv + * @param {object} definition keyword definition object + * @param {boolean} throwError true to throw exception if definition is invalid + * @return {boolean} validation result + */ + validateKeyword(definition: KeywordDefinition, throwError: boolean): boolean; + /** + * Convert array of error message objects to string + * @param {Array} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {object} options optional options with properties `separator` and `dataVar`. + * @return {string} human readable string with all errors descriptions + */ + errorsText(errors?: Array | null, options?: ErrorsTextOptions): string; + errors?: Array | null; + _opts: Options; + } + + interface CustomLogger { + log(...args: any[]): any; + warn(...args: any[]): any; + error(...args: any[]): any; + } + + interface ValidateFunction { + ( + data: any, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + schema?: object | boolean; + errors?: null | Array; + refs?: object; + refVal?: Array; + root?: ValidateFunction | object; + $async?: true; + source?: object; + } + + interface Options { + $data?: boolean; + allErrors?: boolean; + verbose?: boolean; + jsonPointers?: boolean; + uniqueItems?: boolean; + unicode?: boolean; + format?: false | string; + formats?: object; + keywords?: object; + unknownFormats?: true | string[] | 'ignore'; + schemas?: Array | object; + schemaId?: '$id' | 'id' | 'auto'; + missingRefs?: true | 'ignore' | 'fail'; + extendRefs?: true | 'ignore' | 'fail'; + loadSchema?: (uri: string, cb?: (err: Error, schema: object) => void) => PromiseLike; + removeAdditional?: boolean | 'all' | 'failing'; + useDefaults?: boolean | 'empty' | 'shared'; + coerceTypes?: boolean | 'array'; + strictDefaults?: boolean | 'log'; + strictKeywords?: boolean | 'log'; + strictNumbers?: boolean; + async?: boolean | string; + transpile?: string | ((code: string) => string); + meta?: boolean | object; + validateSchema?: boolean | 'log'; + addUsedSchema?: boolean; + inlineRefs?: boolean | number; + passContext?: boolean; + loopRequired?: number; + ownProperties?: boolean; + multipleOfPrecision?: boolean | number; + errorDataPath?: string, + messages?: boolean; + sourceCode?: boolean; + processCode?: (code: string, schema: object) => string; + cache?: object; + logger?: CustomLogger | false; + nullable?: boolean; + serialize?: ((schema: object | boolean) => any) | false; + } + + type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike); + type NumberFormatValidator = ((data: number) => boolean | PromiseLike); + + interface NumberFormatDefinition { + type: "number", + validate: NumberFormatValidator; + compare?: (data1: number, data2: number) => number; + async?: boolean; + } + + interface StringFormatDefinition { + type?: "string", + validate: FormatValidator; + compare?: (data1: string, data2: string) => number; + async?: boolean; + } + + type FormatDefinition = NumberFormatDefinition | StringFormatDefinition; + + interface KeywordDefinition { + type?: string | Array; + async?: boolean; + $data?: boolean; + errors?: boolean | string; + metaSchema?: object; + // schema: false makes validate not to expect schema (ValidateFunction) + schema?: boolean; + statements?: boolean; + dependencies?: Array; + modifying?: boolean; + valid?: boolean; + // one and only one of the following properties should be present + validate?: SchemaValidateFunction | ValidateFunction; + compile?: (schema: any, parentSchema: object, it: CompilationContext) => ValidateFunction; + macro?: (schema: any, parentSchema: object, it: CompilationContext) => object | boolean; + inline?: (it: CompilationContext, keyword: string, schema: any, parentSchema: object) => string; + } + + interface CompilationContext { + level: number; + dataLevel: number; + dataPathArr: string[]; + schema: any; + schemaPath: string; + baseId: string; + async: boolean; + opts: Options; + formats: { + [index: string]: FormatDefinition | undefined; + }; + keywords: { + [index: string]: KeywordDefinition | undefined; + }; + compositeRule: boolean; + validate: (schema: object) => boolean; + util: { + copy(obj: any, target?: any): any; + toHash(source: string[]): { [index: string]: true | undefined }; + equal(obj: any, target: any): boolean; + getProperty(str: string): string; + schemaHasRules(schema: object, rules: any): string; + escapeQuotes(str: string): string; + toQuotedString(str: string): string; + getData(jsonPointer: string, dataLevel: number, paths: string[]): string; + escapeJsonPointer(str: string): string; + unescapeJsonPointer(str: string): string; + escapeFragment(str: string): string; + unescapeFragment(str: string): string; + }; + self: Ajv; + } + + interface SchemaValidateFunction { + ( + schema: any, + data: any, + parentSchema?: object, + dataPath?: string, + parentData?: object | Array, + parentDataProperty?: string | number, + rootData?: object | Array + ): boolean | PromiseLike; + errors?: Array; + } + + interface ErrorsTextOptions { + separator?: string; + dataVar?: string; + } + + interface ErrorObject { + keyword: string; + dataPath: string; + schemaPath: string; + params: ErrorParameters; + // Added to validation errors of propertyNames keyword schema + propertyName?: string; + // Excluded if messages set to false. + message?: string; + // These are added with the `verbose` option. + schema?: any; + parentSchema?: object; + data?: any; + } + + type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams | + DependenciesParams | FormatParams | ComparisonParams | + MultipleOfParams | PatternParams | RequiredParams | + TypeParams | UniqueItemsParams | CustomParams | + PatternRequiredParams | PropertyNamesParams | + IfParams | SwitchParams | NoParams | EnumParams; + + interface RefParams { + ref: string; + } + + interface LimitParams { + limit: number; + } + + interface AdditionalPropertiesParams { + additionalProperty: string; + } + + interface DependenciesParams { + property: string; + missingProperty: string; + depsCount: number; + deps: string; + } + + interface FormatParams { + format: string + } + + interface ComparisonParams { + comparison: string; + limit: number | string; + exclusive: boolean; + } + + interface MultipleOfParams { + multipleOf: number; + } + + interface PatternParams { + pattern: string; + } + + interface RequiredParams { + missingProperty: string; + } + + interface TypeParams { + type: string; + } + + interface UniqueItemsParams { + i: number; + j: number; + } + + interface CustomParams { + keyword: string; + } + + interface PatternRequiredParams { + missingPattern: string; + } + + interface PropertyNamesParams { + propertyName: string; + } + + interface IfParams { + failingKeyword: string; + } + + interface SwitchParams { + caseIndex: number; + } + + interface NoParams { } + + interface EnumParams { + allowedValues: Array; + } +} + +export = ajv; diff --git a/packages/字体精简工具/node_modules/ajv/lib/ajv.js b/packages/字体精简工具/node_modules/ajv/lib/ajv.js new file mode 100644 index 0000000..06a45b6 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/ajv.js @@ -0,0 +1,506 @@ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./data') + , util = require('./compile/util'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[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:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/compile/index.js b/packages/字体精简工具/node_modules/ajv/lib/compile/index.js new file mode 100644 index 0000000..97518c4 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/compile/index.js @@ -0,0 +1,387 @@ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; diff --git a/packages/字体精简工具/node_modules/ajv/lib/compile/util.js b/packages/字体精简工具/node_modules/ajv/lib/compile/util.js new file mode 100644 index 0000000..ef07b8c --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/compile/util.js @@ -0,0 +1,239 @@ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i' + , $notOp = $isMax ? '>' : '<' + , $errorKeyword = undefined; + + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined + || typeof $schemaExcl == 'number' + || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } +}} + +{{? $isDataExcl }} + {{ + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr) + , $exclusive = 'exclusive' + $lvl + , $exclType = 'exclType' + $lvl + , $exclIsNumber = 'exclIsNumber' + $lvl + , $opExpr = 'op' + $lvl + , $opStr = '\' + ' + $opExpr + ' + \''; + }} + var schemaExcl{{=$lvl}} = {{=$schemaValueExcl}}; + {{ $schemaValueExcl = 'schemaExcl' + $lvl; }} + + var {{=$exclusive}}; + var {{=$exclType}} = typeof {{=$schemaValueExcl}}; + if ({{=$exclType}} != 'boolean' && {{=$exclType}} != 'undefined' && {{=$exclType}} != 'number') { + {{ var $errorKeyword = $exclusiveKeyword; }} + {{# def.error:'_exclusiveLimit' }} + } else if ({{# def.$dataNotType:'number' }} + {{=$exclType}} == 'number' + ? ( + ({{=$exclusive}} = {{=$schemaValue}} === undefined || {{=$schemaValueExcl}} {{=$op}}= {{=$schemaValue}}) + ? {{=$data}} {{=$notOp}}= {{=$schemaValueExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + : ( + ({{=$exclusive}} = {{=$schemaValueExcl}} === true) + ? {{=$data}} {{=$notOp}}= {{=$schemaValue}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} + ) + || {{=$data}} !== {{=$data}}) { + var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}='; + {{ + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + }} +{{??}} + {{ + var $exclIsNumber = typeof $schemaExcl == 'number' + , $opStr = $op; /*used in error*/ + }} + + {{? $exclIsNumber && $isData }} + {{ var $opExpr = '\'' + $opStr + '\''; /*used in error*/ }} + if ({{# def.$dataNotType:'number' }} + ( {{=$schemaValue}} === undefined + || {{=$schemaExcl}} {{=$op}}= {{=$schemaValue}} + ? {{=$data}} {{=$notOp}}= {{=$schemaExcl}} + : {{=$data}} {{=$notOp}} {{=$schemaValue}} ) + || {{=$data}} !== {{=$data}}) { + {{??}} + {{ + if ($exclIsNumber && $schema === undefined) { + {{# def.setExclusiveLimit }} + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) + $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + {{# def.setExclusiveLimit }} + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + + var $opExpr = '\'' + $opStr + '\''; /*used in error*/ + }} + + if ({{# def.$dataNotType:'number' }} + {{=$data}} {{=$notOp}} {{=$schemaValue}} + || {{=$data}} !== {{=$data}}) { + {{?}} +{{?}} + {{ $errorKeyword = $errorKeyword || $keyword; }} + {{# def.error:'_limit' }} + } {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/_limitItems.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitItems.jst new file mode 100644 index 0000000..741329e --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitItems.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxItems' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{=$data}}.length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitItems' }} +} {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/_limitLength.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitLength.jst new file mode 100644 index 0000000..285c66b --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitLength.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxLength' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} {{# def.strLength }} {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitLength' }} +} {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/_limitProperties.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitProperties.jst new file mode 100644 index 0000000..c4c2155 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/_limitProperties.jst @@ -0,0 +1,12 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +{{ var $op = $keyword == 'maxProperties' ? '>' : '<'; }} +if ({{# def.$dataNotType:'number' }} Object.keys({{=$data}}).length {{=$op}} {{=$schemaValue}}) { + {{ var $errorKeyword = $keyword; }} + {{# def.error:'_limitProperties' }} +} {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/allOf.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/allOf.jst new file mode 100644 index 0000000..0e782fe --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/allOf.jst @@ -0,0 +1,32 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $allSchemasEmpty = true; +}} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{# def.ifResultValid }} + {{?}} +{{~}} + +{{? $breakOnError }} + {{? $allSchemasEmpty }} + if (true) { + {{??}} + {{= $closingBraces.slice(0,-1) }} + {{?}} +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/anyOf.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/anyOf.jst new file mode 100644 index 0000000..ea909ee --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/anyOf.jst @@ -0,0 +1,46 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $noEmptySchema = $schema.every(function($sch) { + return {{# def.nonEmptySchema:$sch }}; + }); +}} +{{? $noEmptySchema }} + {{ var $currentBaseId = $it.baseId; }} + var {{=$errs}} = errors; + var {{=$valid}} = false; + + {{# def.setCompositeRule }} + + {{~ $schema:$sch:$i }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + + {{=$valid}} = {{=$valid}} || {{=$nextValid}}; + + if (!{{=$valid}}) { + {{ $closingBraces += '}'; }} + {{~}} + + {{# def.resetCompositeRule }} + + {{= $closingBraces }} + + if (!{{=$valid}}) { + {{# def.extraError:'anyOf' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/coerce.def b/packages/字体精简工具/node_modules/ajv/lib/dot/coerce.def new file mode 100644 index 0000000..c947ed6 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/coerce.def @@ -0,0 +1,51 @@ +{{## def.coerceType: + {{ + var $dataType = 'dataType' + $lvl + , $coerced = 'coerced' + $lvl; + }} + var {{=$dataType}} = typeof {{=$data}}; + var {{=$coerced}} = undefined; + + {{? it.opts.coerceTypes == 'array' }} + if ({{=$dataType}} == 'object' && Array.isArray({{=$data}}) && {{=$data}}.length == 1) { + {{=$data}} = {{=$data}}[0]; + {{=$dataType}} = typeof {{=$data}}; + if ({{=it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)}}) {{=$coerced}} = {{=$data}}; + } + {{?}} + + if ({{=$coerced}} !== undefined) ; + {{~ $coerceToTypes:$type:$i }} + {{? $type == 'string' }} + else if ({{=$dataType}} == 'number' || {{=$dataType}} == 'boolean') + {{=$coerced}} = '' + {{=$data}}; + else if ({{=$data}} === null) {{=$coerced}} = ''; + {{?? $type == 'number' || $type == 'integer' }} + else if ({{=$dataType}} == 'boolean' || {{=$data}} === null + || ({{=$dataType}} == 'string' && {{=$data}} && {{=$data}} == +{{=$data}} + {{? $type == 'integer' }} && !({{=$data}} % 1){{?}})) + {{=$coerced}} = +{{=$data}}; + {{?? $type == 'boolean' }} + else if ({{=$data}} === 'false' || {{=$data}} === 0 || {{=$data}} === null) + {{=$coerced}} = false; + else if ({{=$data}} === 'true' || {{=$data}} === 1) + {{=$coerced}} = true; + {{?? $type == 'null' }} + else if ({{=$data}} === '' || {{=$data}} === 0 || {{=$data}} === false) + {{=$coerced}} = null; + {{?? it.opts.coerceTypes == 'array' && $type == 'array' }} + else if ({{=$dataType}} == 'string' || {{=$dataType}} == 'number' || {{=$dataType}} == 'boolean' || {{=$data}} == null) + {{=$coerced}} = [{{=$data}}]; + {{?}} + {{~}} + else { + {{# def.error:'type' }} + } + + if ({{=$coerced}} !== undefined) { + {{# def.setParentData }} + {{=$data}} = {{=$coerced}}; + {{? !$dataLvl }}if ({{=$parentData}} !== undefined){{?}} + {{=$parentData}}[{{=$parentDataProperty}}] = {{=$coerced}}; + } +#}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/comment.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/comment.jst new file mode 100644 index 0000000..f959150 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/comment.jst @@ -0,0 +1,9 @@ +{{# def.definitions }} +{{# def.setupKeyword }} + +{{ var $comment = it.util.toQuotedString($schema); }} +{{? it.opts.$comment === true }} + console.log({{=$comment}}); +{{?? typeof it.opts.$comment == 'function' }} + self._opts.$comment({{=$comment}}, {{=it.util.toQuotedString($errSchemaPath)}}, validate.root.schema); +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/const.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/const.jst new file mode 100644 index 0000000..2aa2298 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/const.jst @@ -0,0 +1,11 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{? !$isData }} + var schema{{=$lvl}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}} = equal({{=$data}}, schema{{=$lvl}}); +{{# def.checkError:'const' }} +{{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/contains.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/contains.jst new file mode 100644 index 0000000..4dc9967 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/contains.jst @@ -0,0 +1,55 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId + , $nonEmptySchema = {{# def.nonEmptySchema:$schema }}; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? $nonEmptySchema }} + {{# def.setCompositeRule }} + + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$nextValid}} = false; + + for (var {{=$idx}} = 0; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + if ({{=$nextValid}}) break; + } + + {{# def.resetCompositeRule }} + {{= $closingBraces }} + + if (!{{=$nextValid}}) { +{{??}} + if ({{=$data}}.length == 0) { +{{?}} + + {{# def.error:'contains' }} + } else { + {{? $nonEmptySchema }} + {{# def.resetErrors }} + {{?}} + {{? it.opts.allErrors }} } {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/custom.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/custom.jst new file mode 100644 index 0000000..d30588f --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/custom.jst @@ -0,0 +1,191 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $rule = this + , $definition = 'definition' + $lvl + , $rDef = $rule.definition + , $closingBraces = ''; + var $validate = $rDef.validate; + var $compile, $inline, $macro, $ruleValidate, $validateCode; +}} + +{{? $isData && $rDef.$data }} + {{ + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + }} + var {{=$definition}} = RULES.custom['{{=$keyword}}'].definition; + var {{=$validateCode}} = {{=$definition}}.validate; +{{??}} + {{ + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + }} +{{?}} + +{{ + var $ruleErrs = $validateCode + '.errors' + , $i = 'i' + $lvl + , $ruleErr = 'ruleErr' + $lvl + , $asyncKeyword = $rDef.async; + + if ($asyncKeyword && !it.async) + throw new Error('async keyword in sync schema'); +}} + + +{{? !($inline || $macro) }}{{=$ruleErrs}} = null;{{?}} +var {{=$errs}} = errors; +var {{=$valid}}; + +{{## def.callRuleValidate: + {{=$validateCode}}.call( + {{? it.opts.passContext }}this{{??}}self{{?}} + {{? $compile || $rDef.schema === false }} + , {{=$data}} + {{??}} + , {{=$schemaValue}} + , {{=$data}} + , validate.schema{{=it.schemaPath}} + {{?}} + , {{# def.dataPath }} + {{# def.passParentData }} + , rootData + ) +#}} + +{{## def.extendErrors:_inline: + for (var {{=$i}}={{=$errs}}; {{=$i}} 0) + || _schema === false + : it.util.schemaHasRules(_schema, it.RULES.all)) +#}} + + +{{## def.strLength: + {{? it.opts.unicode === false }} + {{=$data}}.length + {{??}} + ucs2length({{=$data}}) + {{?}} +#}} + + +{{## def.willOptimize: + it.util.varOccurences($code, $nextData) < 2 +#}} + + +{{## def.generateSubschemaCode: + {{ + var $code = it.validate($it); + $it.baseId = $currentBaseId; + }} +#}} + + +{{## def.insertSubschemaCode: + {{= it.validate($it) }} + {{ $it.baseId = $currentBaseId; }} +#}} + + +{{## def._optimizeValidate: + it.util.varReplace($code, $nextData, $passData) +#}} + + +{{## def.optimizeValidate: + {{? {{# def.willOptimize}} }} + {{= {{# def._optimizeValidate }} }} + {{??}} + var {{=$nextData}} = {{=$passData}}; + {{= $code }} + {{?}} +#}} + + +{{## def.$data: + {{ + var $isData = it.opts.$data && $schema && $schema.$data + , $schemaValue; + }} + {{? $isData }} + var schema{{=$lvl}} = {{= it.util.getData($schema.$data, $dataLvl, it.dataPathArr) }}; + {{ $schemaValue = 'schema' + $lvl; }} + {{??}} + {{ $schemaValue = $schema; }} + {{?}} +#}} + + +{{## def.$dataNotType:_type: + {{?$isData}} ({{=$schemaValue}} !== undefined && typeof {{=$schemaValue}} != _type) || {{?}} +#}} + + +{{## def.check$dataIsArray: + if (schema{{=$lvl}} === undefined) {{=$valid}} = true; + else if (!Array.isArray(schema{{=$lvl}})) {{=$valid}} = false; + else { +#}} + + +{{## def.numberKeyword: + {{? !($isData || typeof $schema == 'number') }} + {{ throw new Error($keyword + ' must be number'); }} + {{?}} +#}} + + +{{## def.beginDefOut: + {{ + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + }} +#}} + + +{{## def.storeDefOut:_variable: + {{ + var _variable = out; + out = $$outStack.pop(); + }} +#}} + + +{{## def.dataPath:(dataPath || ''){{? it.errorPath != '""'}} + {{= it.errorPath }}{{?}}#}} + +{{## def.setParentData: + {{ + var $parentData = $dataLvl ? 'data' + (($dataLvl-1)||'') : 'parentData' + , $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + }} +#}} + +{{## def.passParentData: + {{# def.setParentData }} + , {{= $parentData }} + , {{= $parentDataProperty }} +#}} + + +{{## def.iterateProperties: + {{? $ownProperties }} + {{=$dataProperties}} = {{=$dataProperties}} || Object.keys({{=$data}}); + for (var {{=$idx}}=0; {{=$idx}}<{{=$dataProperties}}.length; {{=$idx}}++) { + var {{=$key}} = {{=$dataProperties}}[{{=$idx}}]; + {{??}} + for (var {{=$key}} in {{=$data}}) { + {{?}} +#}} + + +{{## def.noPropertyInData: + {{=$useData}} === undefined + {{? $ownProperties }} + || !{{# def.isOwnProperty }} + {{?}} +#}} + + +{{## def.isOwnProperty: + Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($propertyKey)}}') +#}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/dependencies.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/dependencies.jst new file mode 100644 index 0000000..e4bddde --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/dependencies.jst @@ -0,0 +1,79 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.missing }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.propertyInData: + {{=$data}}{{= it.util.getProperty($property) }} !== undefined + {{? $ownProperties }} + && Object.prototype.hasOwnProperty.call({{=$data}}, '{{=it.util.escapeQuotes($property)}}') + {{?}} +#}} + + +{{ + var $schemaDeps = {} + , $propertyDeps = {} + , $ownProperties = it.opts.ownProperties; + + for ($property in $schema) { + if ($property == '__proto__') continue; + var $sch = $schema[$property]; + var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; + $deps[$property] = $sch; + } +}} + +var {{=$errs}} = errors; + +{{ var $currentErrorPath = it.errorPath; }} + +var missing{{=$lvl}}; +{{ for (var $property in $propertyDeps) { }} + {{ $deps = $propertyDeps[$property]; }} + {{? $deps.length }} + if ({{# def.propertyInData }} + {{? $breakOnError }} + && ({{# def.checkMissingProperty:$deps }})) { + {{# def.errorMissingProperty:'dependencies' }} + {{??}} + ) { + {{~ $deps:$propertyKey }} + {{# def.allErrorsMissingProperty:'dependencies' }} + {{~}} + {{?}} + } {{# def.elseIfValid }} + {{?}} +{{ } }} + +{{ + it.errorPath = $currentErrorPath; + var $currentBaseId = $it.baseId; +}} + + +{{ for (var $property in $schemaDeps) { }} + {{ var $sch = $schemaDeps[$property]; }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{# def.propertyInData }}) { + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + }} + + {{# def.insertSubschemaCode }} + } + + {{# def.ifResultValid }} + {{?}} +{{ } }} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/enum.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/enum.jst new file mode 100644 index 0000000..357c2e8 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/enum.jst @@ -0,0 +1,30 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $i = 'i' + $lvl + , $vSchema = 'schema' + $lvl; +}} + +{{? !$isData }} + var {{=$vSchema}} = validate.schema{{=$schemaPath}}; +{{?}} +var {{=$valid}}; + +{{?$isData}}{{# def.check$dataIsArray }}{{?}} + +{{=$valid}} = false; + +for (var {{=$i}}=0; {{=$i}}<{{=$vSchema}}.length; {{=$i}}++) + if (equal({{=$data}}, {{=$vSchema}}[{{=$i}}])) { + {{=$valid}} = true; + break; + } + +{{? $isData }} } {{?}} + +{{# def.checkError:'enum' }} + +{{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/errors.def b/packages/字体精简工具/node_modules/ajv/lib/dot/errors.def new file mode 100644 index 0000000..5c5752c --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/errors.def @@ -0,0 +1,194 @@ +{{# def.definitions }} + +{{## def._error:_rule: + {{ 'istanbul ignore else'; }} + {{? it.createErrors !== false }} + { + keyword: '{{= $errorKeyword || _rule }}' + , dataPath: (dataPath || '') + {{= it.errorPath }} + , schemaPath: {{=it.util.toQuotedString($errSchemaPath)}} + , params: {{# def._errorParams[_rule] }} + {{? it.opts.messages !== false }} + , message: {{# def._errorMessages[_rule] }} + {{?}} + {{? it.opts.verbose }} + , schema: {{# def._errorSchemas[_rule] }} + , parentSchema: validate.schema{{=it.schemaPath}} + , data: {{=$data}} + {{?}} + } + {{??}} + {} + {{?}} +#}} + + +{{## def._addError:_rule: + if (vErrors === null) vErrors = [err]; + else vErrors.push(err); + errors++; +#}} + + +{{## def.addError:_rule: + var err = {{# def._error:_rule }}; + {{# def._addError:_rule }} +#}} + + +{{## def.error:_rule: + {{# def.beginDefOut}} + {{# def._error:_rule }} + {{# def.storeDefOut:__err }} + + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError([{{=__err}}]); + {{??}} + validate.errors = [{{=__err}}]; + return false; + {{?}} + {{??}} + var err = {{=__err}}; + {{# def._addError:_rule }} + {{?}} +#}} + + +{{## def.extraError:_rule: + {{# def.addError:_rule}} + {{? !it.compositeRule && $breakOnError }} + {{ 'istanbul ignore if'; }} + {{? it.async }} + throw new ValidationError(vErrors); + {{??}} + validate.errors = vErrors; + return false; + {{?}} + {{?}} +#}} + + +{{## def.checkError:_rule: + if (!{{=$valid}}) { + {{# def.error:_rule }} + } +#}} + + +{{## def.resetErrors: + errors = {{=$errs}}; + if (vErrors !== null) { + if ({{=$errs}}) vErrors.length = {{=$errs}}; + else vErrors = null; + } +#}} + + +{{## def.concatSchema:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=$schema}}{{?}}#}} +{{## def.appendSchema:{{?$isData}}' + {{=$schemaValue}}{{??}}{{=$schemaValue}}'{{?}}#}} +{{## def.concatSchemaEQ:{{?$isData}}' + {{=$schemaValue}} + '{{??}}{{=it.util.escapeQuotes($schema)}}{{?}}#}} + +{{## def._errorMessages = { + 'false schema': "'boolean schema is false'", + $ref: "'can\\\'t resolve reference {{=it.util.escapeQuotes($schema)}}'", + additionalItems: "'should NOT have more than {{=$schema.length}} items'", + additionalProperties: "'{{? it.opts._errorDataPathProperty }}is an invalid additional property{{??}}should NOT have additional properties{{?}}'", + anyOf: "'should match some schema in anyOf'", + const: "'should be equal to constant'", + contains: "'should contain a valid item'", + dependencies: "'should have {{? $deps.length == 1 }}property {{= it.util.escapeQuotes($deps[0]) }}{{??}}properties {{= it.util.escapeQuotes($deps.join(\", \")) }}{{?}} when property {{= it.util.escapeQuotes($property) }} is present'", + 'enum': "'should be equal to one of the allowed values'", + format: "'should match format \"{{#def.concatSchemaEQ}}\"'", + 'if': "'should match \"' + {{=$ifClause}} + '\" schema'", + _limit: "'should be {{=$opStr}} {{#def.appendSchema}}", + _exclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'", + _limitItems: "'should NOT have {{?$keyword=='maxItems'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} items'", + _limitLength: "'should NOT be {{?$keyword=='maxLength'}}longer{{??}}shorter{{?}} than {{#def.concatSchema}} characters'", + _limitProperties:"'should NOT have {{?$keyword=='maxProperties'}}more{{??}}fewer{{?}} than {{#def.concatSchema}} properties'", + multipleOf: "'should be multiple of {{#def.appendSchema}}", + not: "'should NOT be valid'", + oneOf: "'should match exactly one schema in oneOf'", + pattern: "'should match pattern \"{{#def.concatSchemaEQ}}\"'", + propertyNames: "'property name \\'{{=$invalidName}}\\' is invalid'", + required: "'{{? it.opts._errorDataPathProperty }}is a required property{{??}}should have required property \\'{{=$missingProperty}}\\'{{?}}'", + type: "'should be {{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}'", + uniqueItems: "'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)'", + custom: "'should pass \"{{=$rule.keyword}}\" keyword validation'", + patternRequired: "'should have property matching pattern \\'{{=$missingPattern}}\\''", + switch: "'should pass \"switch\" keyword validation'", + _formatLimit: "'should be {{=$opStr}} \"{{#def.concatSchemaEQ}}\"'", + _formatExclusiveLimit: "'{{=$exclusiveKeyword}} should be boolean'" +} #}} + + +{{## def.schemaRefOrVal: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=$schema}}{{?}} #}} +{{## def.schemaRefOrQS: {{?$isData}}validate.schema{{=$schemaPath}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} + +{{## def._errorSchemas = { + 'false schema': "false", + $ref: "{{=it.util.toQuotedString($schema)}}", + additionalItems: "false", + additionalProperties: "false", + anyOf: "validate.schema{{=$schemaPath}}", + const: "validate.schema{{=$schemaPath}}", + contains: "validate.schema{{=$schemaPath}}", + dependencies: "validate.schema{{=$schemaPath}}", + 'enum': "validate.schema{{=$schemaPath}}", + format: "{{#def.schemaRefOrQS}}", + 'if': "validate.schema{{=$schemaPath}}", + _limit: "{{#def.schemaRefOrVal}}", + _exclusiveLimit: "validate.schema{{=$schemaPath}}", + _limitItems: "{{#def.schemaRefOrVal}}", + _limitLength: "{{#def.schemaRefOrVal}}", + _limitProperties:"{{#def.schemaRefOrVal}}", + multipleOf: "{{#def.schemaRefOrVal}}", + not: "validate.schema{{=$schemaPath}}", + oneOf: "validate.schema{{=$schemaPath}}", + pattern: "{{#def.schemaRefOrQS}}", + propertyNames: "validate.schema{{=$schemaPath}}", + required: "validate.schema{{=$schemaPath}}", + type: "validate.schema{{=$schemaPath}}", + uniqueItems: "{{#def.schemaRefOrVal}}", + custom: "validate.schema{{=$schemaPath}}", + patternRequired: "validate.schema{{=$schemaPath}}", + switch: "validate.schema{{=$schemaPath}}", + _formatLimit: "{{#def.schemaRefOrQS}}", + _formatExclusiveLimit: "validate.schema{{=$schemaPath}}" +} #}} + + +{{## def.schemaValueQS: {{?$isData}}{{=$schemaValue}}{{??}}{{=it.util.toQuotedString($schema)}}{{?}} #}} + +{{## def._errorParams = { + 'false schema': "{}", + $ref: "{ ref: '{{=it.util.escapeQuotes($schema)}}' }", + additionalItems: "{ limit: {{=$schema.length}} }", + additionalProperties: "{ additionalProperty: '{{=$additionalProperty}}' }", + anyOf: "{}", + const: "{ allowedValue: schema{{=$lvl}} }", + contains: "{}", + dependencies: "{ property: '{{= it.util.escapeQuotes($property) }}', missingProperty: '{{=$missingProperty}}', depsCount: {{=$deps.length}}, deps: '{{= it.util.escapeQuotes($deps.length==1 ? $deps[0] : $deps.join(\", \")) }}' }", + 'enum': "{ allowedValues: schema{{=$lvl}} }", + format: "{ format: {{#def.schemaValueQS}} }", + 'if': "{ failingKeyword: {{=$ifClause}} }", + _limit: "{ comparison: {{=$opExpr}}, limit: {{=$schemaValue}}, exclusive: {{=$exclusive}} }", + _exclusiveLimit: "{}", + _limitItems: "{ limit: {{=$schemaValue}} }", + _limitLength: "{ limit: {{=$schemaValue}} }", + _limitProperties:"{ limit: {{=$schemaValue}} }", + multipleOf: "{ multipleOf: {{=$schemaValue}} }", + not: "{}", + oneOf: "{ passingSchemas: {{=$passingSchemas}} }", + pattern: "{ pattern: {{#def.schemaValueQS}} }", + propertyNames: "{ propertyName: '{{=$invalidName}}' }", + required: "{ missingProperty: '{{=$missingProperty}}' }", + type: "{ type: '{{? $typeIsArray }}{{= $typeSchema.join(\",\") }}{{??}}{{=$typeSchema}}{{?}}' }", + uniqueItems: "{ i: i, j: j }", + custom: "{ keyword: '{{=$rule.keyword}}' }", + patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", + switch: "{ caseIndex: {{=$caseIndex}} }", + _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }", + _formatExclusiveLimit: "{}" +} #}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/format.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/format.jst new file mode 100644 index 0000000..37f14da --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/format.jst @@ -0,0 +1,106 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} + +{{## def.skipFormat: + {{? $breakOnError }} if (true) { {{?}} + {{ return out; }} +#}} + +{{? it.opts.format === false }}{{# def.skipFormat }}{{?}} + + +{{# def.$data }} + + +{{## def.$dataCheckFormat: + {{# def.$dataNotType:'string' }} + ({{? $unknownFormats != 'ignore' }} + ({{=$schemaValue}} && !{{=$format}} + {{? $allowUnknown }} + && self._opts.unknownFormats.indexOf({{=$schemaValue}}) == -1 + {{?}}) || + {{?}} + ({{=$format}} && {{=$formatType}} == '{{=$ruleType}}' + && !(typeof {{=$format}} == 'function' + ? {{? it.async}} + (async{{=$lvl}} ? await {{=$format}}({{=$data}}) : {{=$format}}({{=$data}})) + {{??}} + {{=$format}}({{=$data}}) + {{?}} + : {{=$format}}.test({{=$data}})))) +#}} + +{{## def.checkFormat: + {{ + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + }} + {{? typeof $format == 'function' }} + {{=$formatRef}}({{=$data}}) + {{??}} + {{=$formatRef}}.test({{=$data}}) + {{?}} +#}} + + +{{ + var $unknownFormats = it.opts.unknownFormats + , $allowUnknown = Array.isArray($unknownFormats); +}} + +{{? $isData }} + {{ + var $format = 'format' + $lvl + , $isObject = 'isObject' + $lvl + , $formatType = 'formatType' + $lvl; + }} + var {{=$format}} = formats[{{=$schemaValue}}]; + var {{=$isObject}} = typeof {{=$format}} == 'object' + && !({{=$format}} instanceof RegExp) + && {{=$format}}.validate; + var {{=$formatType}} = {{=$isObject}} && {{=$format}}.type || 'string'; + if ({{=$isObject}}) { + {{? it.async}} + var async{{=$lvl}} = {{=$format}}.async; + {{?}} + {{=$format}} = {{=$format}}.validate; + } + if ({{# def.$dataCheckFormat }}) { +{{??}} + {{ var $format = it.formats[$schema]; }} + {{? !$format }} + {{? $unknownFormats == 'ignore' }} + {{ it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); }} + {{# def.skipFormat }} + {{?? $allowUnknown && $unknownFormats.indexOf($schema) >= 0 }} + {{# def.skipFormat }} + {{??}} + {{ throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); }} + {{?}} + {{?}} + {{ + var $isObject = typeof $format == 'object' + && !($format instanceof RegExp) + && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + }} + {{? $formatType != $ruleType }} + {{# def.skipFormat }} + {{?}} + {{? $async }} + {{ + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + }} + if (!(await {{=$formatRef}}({{=$data}}))) { + {{??}} + if (!{{# def.checkFormat }}) { + {{?}} +{{?}} + {{# def.error:'format' }} + } {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/if.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/if.jst new file mode 100644 index 0000000..adb5036 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/if.jst @@ -0,0 +1,73 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateIfClause:_clause: + {{ + $it.schema = it.schema['_clause']; + $it.schemaPath = it.schemaPath + '._clause'; + $it.errSchemaPath = it.errSchemaPath + '/_clause'; + }} + {{# def.insertSubschemaCode }} + {{=$valid}} = {{=$nextValid}}; + {{? $thenPresent && $elsePresent }} + {{ $ifClause = 'ifClause' + $lvl; }} + var {{=$ifClause}} = '_clause'; + {{??}} + {{ $ifClause = '\'_clause\''; }} + {{?}} +#}} + +{{ + var $thenSch = it.schema['then'] + , $elseSch = it.schema['else'] + , $thenPresent = $thenSch !== undefined && {{# def.nonEmptySchema:$thenSch }} + , $elsePresent = $elseSch !== undefined && {{# def.nonEmptySchema:$elseSch }} + , $currentBaseId = $it.baseId; +}} + +{{? $thenPresent || $elsePresent }} + {{ + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + var {{=$errs}} = errors; + var {{=$valid}} = true; + + {{# def.setCompositeRule }} + {{# def.insertSubschemaCode }} + {{ $it.createErrors = true; }} + {{# def.resetErrors }} + {{# def.resetCompositeRule }} + + {{? $thenPresent }} + if ({{=$nextValid}}) { + {{# def.validateIfClause:then }} + } + {{? $elsePresent }} + else { + {{?}} + {{??}} + if (!{{=$nextValid}}) { + {{?}} + + {{? $elsePresent }} + {{# def.validateIfClause:else }} + } + {{?}} + + if (!{{=$valid}}) { + {{# def.extraError:'if' }} + } + {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} + if (true) { + {{?}} +{{?}} + diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/items.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/items.jst new file mode 100644 index 0000000..acc932a --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/items.jst @@ -0,0 +1,98 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateItems:startFrom: + for (var {{=$idx}} = {{=startFrom}}; {{=$idx}} < {{=$data}}.length; {{=$idx}}++) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} + if (!{{=$nextValid}}) break; + {{?}} + } +#}} + +{{ + var $idx = 'i' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $currentBaseId = it.baseId; +}} + +var {{=$errs}} = errors; +var {{=$valid}}; + +{{? Array.isArray($schema) }} + {{ /* 'items' is an array of schemas */}} + {{ var $additionalItems = it.schema.additionalItems; }} + {{? $additionalItems === false }} + {{=$valid}} = {{=$data}}.length <= {{= $schema.length }}; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{# def.checkError:'additionalItems' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{# def.elseIfValid}} + {{?}} + + {{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{=$i}}) { + {{ + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + } + + {{# def.ifResultValid }} + {{?}} + {{~}} + + {{? typeof $additionalItems == 'object' && {{# def.nonEmptySchema:$additionalItems }} }} + {{ + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + }} + {{=$nextValid}} = true; + + if ({{=$data}}.length > {{= $schema.length }}) { + {{# def.validateItems: $schema.length }} + } + + {{# def.ifResultValid }} + {{?}} + +{{?? {{# def.nonEmptySchema:$schema }} }} + {{ /* 'items' is a single schema */}} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + {{# def.validateItems: 0 }} +{{?}} + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/missing.def b/packages/字体精简工具/node_modules/ajv/lib/dot/missing.def new file mode 100644 index 0000000..a73b9f9 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/missing.def @@ -0,0 +1,39 @@ +{{## def.checkMissingProperty:_properties: + {{~ _properties:$propertyKey:$i }} + {{?$i}} || {{?}} + {{ + var $prop = it.util.getProperty($propertyKey) + , $useData = $data + $prop; + }} + ( ({{# def.noPropertyInData }}) && (missing{{=$lvl}} = {{= it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop) }}) ) + {{~}} +#}} + + +{{## def.errorMissingProperty:_error: + {{ + var $propertyPath = 'missing' + $lvl + , $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers + ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) + : $currentErrorPath + ' + ' + $propertyPath; + } + }} + {{# def.error:_error }} +#}} + + +{{## def.allErrorsMissingProperty:_error: + {{ + var $prop = it.util.getProperty($propertyKey) + , $missingProperty = it.util.escapeQuotes($propertyKey) + , $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + }} + if ({{# def.noPropertyInData }}) { + {{# def.addError:_error }} + } +#}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/multipleOf.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/multipleOf.jst new file mode 100644 index 0000000..6d88a45 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/multipleOf.jst @@ -0,0 +1,22 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{# def.numberKeyword }} + +var division{{=$lvl}}; +if ({{?$isData}} + {{=$schemaValue}} !== undefined && ( + typeof {{=$schemaValue}} != 'number' || + {{?}} + (division{{=$lvl}} = {{=$data}} / {{=$schemaValue}}, + {{? it.opts.multipleOfPrecision }} + Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}} + {{??}} + division{{=$lvl}} !== parseInt(division{{=$lvl}}) + {{?}} + ) + {{?$isData}} ) {{?}} ) { + {{# def.error:'multipleOf' }} +} {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/not.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/not.jst new file mode 100644 index 0000000..e03185a --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/not.jst @@ -0,0 +1,43 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + var {{=$errs}} = errors; + + {{# def.setCompositeRule }} + + {{ + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + }} + {{= it.validate($it) }} + {{ + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + }} + + {{# def.resetCompositeRule }} + + if ({{=$nextValid}}) { + {{# def.error:'not' }} + } else { + {{# def.resetErrors }} + {{? it.opts.allErrors }} } {{?}} +{{??}} + {{# def.addError:'not' }} + {{? $breakOnError}} + if (false) { + {{?}} +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/oneOf.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/oneOf.jst new file mode 100644 index 0000000..bcce2c6 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/oneOf.jst @@ -0,0 +1,54 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +{{ + var $currentBaseId = $it.baseId + , $prevValid = 'prevValid' + $lvl + , $passingSchemas = 'passingSchemas' + $lvl; +}} + +var {{=$errs}} = errors + , {{=$prevValid}} = false + , {{=$valid}} = false + , {{=$passingSchemas}} = null; + +{{# def.setCompositeRule }} + +{{~ $schema:$sch:$i }} + {{? {{# def.nonEmptySchema:$sch }} }} + {{ + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + }} + + {{# def.insertSubschemaCode }} + {{??}} + var {{=$nextValid}} = true; + {{?}} + + {{? $i }} + if ({{=$nextValid}} && {{=$prevValid}}) { + {{=$valid}} = false; + {{=$passingSchemas}} = [{{=$passingSchemas}}, {{=$i}}]; + } else { + {{ $closingBraces += '}'; }} + {{?}} + + if ({{=$nextValid}}) { + {{=$valid}} = {{=$prevValid}} = true; + {{=$passingSchemas}} = {{=$i}}; + } +{{~}} + +{{# def.resetCompositeRule }} + +{{= $closingBraces }} + +if (!{{=$valid}}) { + {{# def.extraError:'oneOf' }} +} else { + {{# def.resetErrors }} +{{? it.opts.allErrors }} } {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/pattern.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/pattern.jst new file mode 100644 index 0000000..3a37ef6 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/pattern.jst @@ -0,0 +1,14 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + +{{ + var $regexp = $isData + ? '(new RegExp(' + $schemaValue + '))' + : it.usePattern($schema); +}} + +if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) { + {{# def.error:'pattern' }} +} {{? $breakOnError }} else { {{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/properties.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/properties.jst new file mode 100644 index 0000000..5cebb9b --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/properties.jst @@ -0,0 +1,245 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + + +{{## def.validateAdditional: + {{ /* additionalProperties is schema */ + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty + ? it.errorPath + : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} +#}} + + +{{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl; + + var $schemaKeys = Object.keys($schema || {}).filter(notProto) + , $pProperties = it.schema.patternProperties || {} + , $pPropertyKeys = Object.keys($pProperties).filter(notProto) + , $aProperties = it.schema.additionalProperties + , $someProperties = $schemaKeys.length || $pPropertyKeys.length + , $noAdditional = $aProperties === false + , $additionalIsSchema = typeof $aProperties == 'object' + && Object.keys($aProperties).length + , $removeAdditional = it.opts.removeAdditional + , $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { return p !== '__proto__'; } +}} + + +var {{=$errs}} = errors; +var {{=$nextValid}} = true; +{{? $ownProperties }} + var {{=$dataProperties}} = undefined; +{{?}} + +{{? $checkAdditional }} + {{# def.iterateProperties }} + {{? $someProperties }} + var isAdditional{{=$lvl}} = !(false + {{? $schemaKeys.length }} + {{? $schemaKeys.length > 8 }} + || validate.schema{{=$schemaPath}}.hasOwnProperty({{=$key}}) + {{??}} + {{~ $schemaKeys:$propertyKey }} + || {{=$key}} == {{= it.util.toQuotedString($propertyKey) }} + {{~}} + {{?}} + {{?}} + {{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty:$i }} + || {{= it.usePattern($pProperty) }}.test({{=$key}}) + {{~}} + {{?}} + ); + + if (isAdditional{{=$lvl}}) { + {{?}} + {{? $removeAdditional == 'all' }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{ + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + }} + {{? $noAdditional }} + {{? $removeAdditional }} + delete {{=$data}}[{{=$key}}]; + {{??}} + {{=$nextValid}} = false; + {{ + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + }} + {{# def.error:'additionalProperties' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{? $breakOnError }} break; {{?}} + {{?}} + {{?? $additionalIsSchema }} + {{? $removeAdditional == 'failing' }} + var {{=$errs}} = errors; + {{# def.setCompositeRule }} + + {{# def.validateAdditional }} + + if (!{{=$nextValid}}) { + errors = {{=$errs}}; + if (validate.errors !== null) { + if (errors) validate.errors.length = errors; + else validate.errors = null; + } + delete {{=$data}}[{{=$key}}]; + } + + {{# def.resetCompositeRule }} + {{??}} + {{# def.validateAdditional }} + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + {{?}} + {{?}} + {{ it.errorPath = $currentErrorPath; }} + {{?}} + {{? $someProperties }} + } + {{?}} + } + + {{# def.ifResultValid }} +{{?}} + +{{ var $useDefaults = it.opts.useDefaults && !it.compositeRule; }} + +{{? $schemaKeys.length }} + {{~ $schemaKeys:$propertyKey }} + {{ var $sch = $schema[$propertyKey]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + var $prop = it.util.getProperty($propertyKey) + , $passData = $data + $prop + , $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + }} + + {{# def.generateSubschemaCode }} + + {{? {{# def.willOptimize }} }} + {{ + $code = {{# def._optimizeValidate }}; + var $useData = $passData; + }} + {{??}} + {{ var $useData = $nextData; }} + var {{=$nextData}} = {{=$passData}}; + {{?}} + + {{? $hasDefault }} + {{= $code }} + {{??}} + {{? $requiredHash && $requiredHash[$propertyKey] }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = false; + {{ + var $currentErrorPath = it.errorPath + , $currErrSchemaPath = $errSchemaPath + , $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + }} + {{# def.error:'required' }} + {{ $errSchemaPath = $currErrSchemaPath; }} + {{ it.errorPath = $currentErrorPath; }} + } else { + {{??}} + {{? $breakOnError }} + if ({{# def.noPropertyInData }}) { + {{=$nextValid}} = true; + } else { + {{??}} + if ({{=$useData}} !== undefined + {{? $ownProperties }} + && {{# def.isOwnProperty }} + {{?}} + ) { + {{?}} + {{?}} + + {{= $code }} + } + {{?}} {{ /* $hasDefault */ }} + {{?}} {{ /* def.nonEmptySchema */ }} + + {{# def.ifResultValid }} + {{~}} +{{?}} + +{{? $pPropertyKeys.length }} + {{~ $pPropertyKeys:$pProperty }} + {{ var $sch = $pProperties[$pProperty]; }} + + {{? {{# def.nonEmptySchema:$sch}} }} + {{ + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + + it.util.escapeFragment($pProperty); + }} + + {{# def.iterateProperties }} + if ({{= it.usePattern($pProperty) }}.test({{=$key}})) { + {{ + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + }} + + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + + {{? $breakOnError }} if (!{{=$nextValid}}) break; {{?}} + } + {{? $breakOnError }} else {{=$nextValid}} = true; {{?}} + } + + {{# def.ifResultValid }} + {{?}} {{ /* def.nonEmptySchema */ }} + {{~}} +{{?}} + + +{{? $breakOnError }} + {{= $closingBraces }} + if ({{=$errs}} == errors) { +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/propertyNames.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/propertyNames.jst new file mode 100644 index 0000000..d456cca --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/propertyNames.jst @@ -0,0 +1,52 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.setupNextLevel }} + +var {{=$errs}} = errors; + +{{? {{# def.nonEmptySchema:$schema }} }} + {{ + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + }} + + {{ + var $key = 'key' + $lvl + , $idx = 'idx' + $lvl + , $i = 'i' + $lvl + , $invalidName = '\' + ' + $key + ' + \'' + , $dataNxt = $it.dataLevel = it.dataLevel + 1 + , $nextData = 'data' + $dataNxt + , $dataProperties = 'dataProperties' + $lvl + , $ownProperties = it.opts.ownProperties + , $currentBaseId = it.baseId; + }} + + {{? $ownProperties }} + var {{=$dataProperties}} = undefined; + {{?}} + {{# def.iterateProperties }} + var startErrs{{=$lvl}} = errors; + + {{ var $passData = $key; }} + {{# def.setCompositeRule }} + {{# def.generateSubschemaCode }} + {{# def.optimizeValidate }} + {{# def.resetCompositeRule }} + + if (!{{=$nextValid}}) { + for (var {{=$i}}=startErrs{{=$lvl}}; {{=$i}}= it.opts.loopRequired + , $ownProperties = it.opts.ownProperties; + }} + + {{? $breakOnError }} + var missing{{=$lvl}}; + {{? $loopRequired }} + {{# def.setupLoop }} + var {{=$valid}} = true; + + {{?$isData}}{{# def.check$dataIsArray }}{{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + {{=$valid}} = {{=$data}}[{{=$vSchema}}[{{=$i}}]] !== undefined + {{? $ownProperties }} + && {{# def.isRequiredOwnProperty }} + {{?}}; + if (!{{=$valid}}) break; + } + + {{? $isData }} } {{?}} + + {{# def.checkError:'required' }} + else { + {{??}} + if ({{# def.checkMissingProperty:$required }}) { + {{# def.errorMissingProperty:'required' }} + } else { + {{?}} + {{??}} + {{? $loopRequired }} + {{# def.setupLoop }} + {{? $isData }} + if ({{=$vSchema}} && !Array.isArray({{=$vSchema}})) { + {{# def.addError:'required' }} + } else if ({{=$vSchema}} !== undefined) { + {{?}} + + for (var {{=$i}} = 0; {{=$i}} < {{=$vSchema}}.length; {{=$i}}++) { + if ({{=$data}}[{{=$vSchema}}[{{=$i}}]] === undefined + {{? $ownProperties }} + || !{{# def.isRequiredOwnProperty }} + {{?}}) { + {{# def.addError:'required' }} + } + } + + {{? $isData }} } {{?}} + {{??}} + {{~ $required:$propertyKey }} + {{# def.allErrorsMissingProperty:'required' }} + {{~}} + {{?}} + {{?}} + + {{ it.errorPath = $currentErrorPath; }} + +{{?? $breakOnError }} + if (true) { +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/uniqueItems.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/uniqueItems.jst new file mode 100644 index 0000000..e69b830 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/uniqueItems.jst @@ -0,0 +1,62 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.setupKeyword }} +{{# def.$data }} + + +{{? ($schema || $isData) && it.opts.uniqueItems !== false }} + {{? $isData }} + var {{=$valid}}; + if ({{=$schemaValue}} === false || {{=$schemaValue}} === undefined) + {{=$valid}} = true; + else if (typeof {{=$schemaValue}} != 'boolean') + {{=$valid}} = false; + else { + {{?}} + + var i = {{=$data}}.length + , {{=$valid}} = true + , j; + if (i > 1) { + {{ + var $itemType = it.schema.items && it.schema.items.type + , $typeIsArray = Array.isArray($itemType); + }} + {{? !$itemType || $itemType == 'object' || $itemType == 'array' || + ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0)) }} + outer: + for (;i--;) { + for (j = i; j--;) { + if (equal({{=$data}}[i], {{=$data}}[j])) { + {{=$valid}} = false; + break outer; + } + } + } + {{??}} + var itemIndices = {}, item; + for (;i--;) { + var item = {{=$data}}[i]; + {{ var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); }} + if ({{= it.util[$method]($itemType, 'item', it.opts.strictNumbers, true) }}) continue; + {{? $typeIsArray}} + if (typeof item == 'string') item = '"' + item; + {{?}} + if (typeof itemIndices[item] == 'number') { + {{=$valid}} = false; + j = itemIndices[item]; + break; + } + itemIndices[item] = i; + } + {{?}} + } + + {{? $isData }} } {{?}} + + if (!{{=$valid}}) { + {{# def.error:'uniqueItems' }} + } {{? $breakOnError }} else { {{?}} +{{??}} + {{? $breakOnError }} if (true) { {{?}} +{{?}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dot/validate.jst b/packages/字体精简工具/node_modules/ajv/lib/dot/validate.jst new file mode 100644 index 0000000..32087e7 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dot/validate.jst @@ -0,0 +1,276 @@ +{{# def.definitions }} +{{# def.errors }} +{{# def.defaults }} +{{# def.coerce }} + +{{ /** + * schema compilation (render) time: + * it = { schema, RULES, _validate, opts } + * it.validate - this template function, + * it is used recursively to generate code for subschemas + * + * runtime: + * "validate" is a variable name to which this function will be assigned + * validateRef etc. are defined in the parent scope in index.js + */ }} + +{{ + var $async = it.schema.$async === true + , $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref') + , $id = it.self._getId(it.schema); +}} + +{{ + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } +}} + +{{? it.isTop }} + var validate = {{?$async}}{{it.async = true;}}async {{?}}function(data, dataPath, parentData, parentDataProperty, rootData) { + 'use strict'; + {{? $id && (it.opts.sourceCode || it.opts.processCode) }} + {{= '/\*# sourceURL=' + $id + ' */' }} + {{?}} +{{?}} + +{{? typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref) }} + {{ var $keyword = 'false schema'; }} + {{# def.setupKeyword }} + {{? it.schema === false}} + {{? it.isTop}} + {{ $breakOnError = true; }} + {{??}} + var {{=$valid}} = false; + {{?}} + {{# def.error:'false schema' }} + {{??}} + {{? it.isTop}} + {{? $async }} + return data; + {{??}} + validate.errors = null; + return true; + {{?}} + {{??}} + var {{=$valid}} = true; + {{?}} + {{?}} + + {{? it.isTop}} + }; + return validate; + {{?}} + + {{ return out; }} +{{?}} + + +{{? it.isTop }} + {{ + var $top = it.isTop + , $lvl = it.level = 0 + , $dataLvl = it.dataLevel = 0 + , $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + + it.dataPathArr = [""]; + + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + }} + + var vErrors = null; {{ /* don't edit, used in replace */ }} + var errors = 0; {{ /* don't edit, used in replace */ }} + if (rootData === undefined) rootData = data; {{ /* don't edit, used in replace */ }} +{{??}} + {{ + var $lvl = it.level + , $dataLvl = it.dataLevel + , $data = 'data' + ($dataLvl || ''); + + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + + if ($async && !it.async) throw new Error('async schema in sync schema'); + }} + + var errs_{{=$lvl}} = errors; +{{?}} + +{{ + var $valid = 'valid' + $lvl + , $breakOnError = !it.opts.allErrors + , $closingBraces1 = '' + , $closingBraces2 = ''; + + var $errorKeyword; + var $typeSchema = it.schema.type + , $typeIsArray = Array.isArray($typeSchema); + + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) + $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } +}} + +{{## def.checkType: + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type' + , $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + }} + + if ({{= it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true) }}) { +#}} + +{{? it.schema.$ref && $refKeywords }} + {{? it.opts.extendRefs == 'fail' }} + {{ throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); }} + {{?? it.opts.extendRefs !== true }} + {{ + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + }} + {{?}} +{{?}} + +{{? it.schema.$comment && it.opts.$comment }} + {{= it.RULES.all.$comment.code(it, '$comment') }} +{{?}} + +{{? $typeSchema }} + {{? it.opts.coerceTypes }} + {{ var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); }} + {{?}} + + {{ var $rulesGroup = it.RULES.types[$typeSchema]; }} + {{? $coerceToTypes || $typeIsArray || $rulesGroup === true || + ($rulesGroup && !$shouldUseGroup($rulesGroup)) }} + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.checkType }} + {{? $coerceToTypes }} + {{# def.coerceType }} + {{??}} + {{# def.error:'type' }} + {{?}} + } + {{?}} +{{?}} + + +{{? it.schema.$ref && !$refKeywords }} + {{= it.RULES.all.$ref.code(it, '$ref') }} + {{? $breakOnError }} + } + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} +{{??}} + {{~ it.RULES:$rulesGroup }} + {{? $shouldUseGroup($rulesGroup) }} + {{? $rulesGroup.type }} + if ({{= it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers) }}) { + {{?}} + {{? it.opts.useDefaults }} + {{? $rulesGroup.type == 'object' && it.schema.properties }} + {{# def.defaultProperties }} + {{?? $rulesGroup.type == 'array' && Array.isArray(it.schema.items) }} + {{# def.defaultItems }} + {{?}} + {{?}} + {{~ $rulesGroup.rules:$rule }} + {{? $shouldUseRule($rule) }} + {{ var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); }} + {{? $code }} + {{= $code }} + {{? $breakOnError }} + {{ $closingBraces1 += '}'; }} + {{?}} + {{?}} + {{?}} + {{~}} + {{? $breakOnError }} + {{= $closingBraces1 }} + {{ $closingBraces1 = ''; }} + {{?}} + {{? $rulesGroup.type }} + } + {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }} + else { + {{ + var $schemaPath = it.schemaPath + '.type' + , $errSchemaPath = it.errSchemaPath + '/type'; + }} + {{# def.error:'type' }} + } + {{?}} + {{?}} + + {{? $breakOnError }} + if (errors === {{?$top}}0{{??}}errs_{{=$lvl}}{{?}}) { + {{ $closingBraces2 += '}'; }} + {{?}} + {{?}} + {{~}} +{{?}} + +{{? $breakOnError }} {{= $closingBraces2 }} {{?}} + +{{? $top }} + {{? $async }} + if (errors === 0) return data; {{ /* don't edit, used in replace */ }} + else throw new ValidationError(vErrors); {{ /* don't edit, used in replace */ }} + {{??}} + validate.errors = vErrors; {{ /* don't edit, used in replace */ }} + return errors === 0; {{ /* don't edit, used in replace */ }} + {{?}} + }; + + return validate; +{{??}} + var {{=$valid}} = errors === errs_{{=$lvl}}; +{{?}} + +{{ + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i=0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) + return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || + ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i=0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) + return true; + } +}} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/README.md b/packages/字体精简工具/node_modules/ajv/lib/dotjs/README.md new file mode 100644 index 0000000..4d99484 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/README.md @@ -0,0 +1,3 @@ +These files are compiled dot templates from dot folder. + +Do NOT edit them directly, edit the templates and run `npm run build` from main ajv folder. diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limit.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limit.js new file mode 100644 index 0000000..05a1979 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limit.js @@ -0,0 +1,163 @@ +'use strict'; +module.exports = function generate__limit(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitItems.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitItems.js new file mode 100644 index 0000000..e092a55 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitItems.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitLength.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitLength.js new file mode 100644 index 0000000..ecbd3fe --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitLength.js @@ -0,0 +1,85 @@ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitProperties.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitProperties.js new file mode 100644 index 0000000..d232755 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/_limitProperties.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/allOf.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/allOf.js new file mode 100644 index 0000000..fb8c2e4 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/allOf.js @@ -0,0 +1,42 @@ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/anyOf.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/anyOf.js new file mode 100644 index 0000000..0600a9d --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/anyOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/comment.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/comment.js new file mode 100644 index 0000000..dd66bb8 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/comment.js @@ -0,0 +1,14 @@ +'use strict'; +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/const.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/const.js new file mode 100644 index 0000000..15b7c61 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/const.js @@ -0,0 +1,56 @@ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/contains.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/contains.js new file mode 100644 index 0000000..7d76300 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/contains.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/custom.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/custom.js new file mode 100644 index 0000000..f3e641e --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/custom.js @@ -0,0 +1,228 @@ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/enum.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/enum.js new file mode 100644 index 0000000..90580b9 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/enum.js @@ -0,0 +1,66 @@ +'use strict'; +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/format.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/format.js new file mode 100644 index 0000000..cd9a569 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/format.js @@ -0,0 +1,150 @@ +'use strict'; +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/if.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/if.js new file mode 100644 index 0000000..94d27ad --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/if.js @@ -0,0 +1,103 @@ +'use strict'; +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/index.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/index.js new file mode 100644 index 0000000..2fb1b00 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/index.js @@ -0,0 +1,33 @@ +'use strict'; + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': require('./ref'), + allOf: require('./allOf'), + anyOf: require('./anyOf'), + '$comment': require('./comment'), + const: require('./const'), + contains: require('./contains'), + dependencies: require('./dependencies'), + 'enum': require('./enum'), + format: require('./format'), + 'if': require('./if'), + items: require('./items'), + maximum: require('./_limit'), + minimum: require('./_limit'), + maxItems: require('./_limitItems'), + minItems: require('./_limitItems'), + maxLength: require('./_limitLength'), + minLength: require('./_limitLength'), + maxProperties: require('./_limitProperties'), + minProperties: require('./_limitProperties'), + multipleOf: require('./multipleOf'), + not: require('./not'), + oneOf: require('./oneOf'), + pattern: require('./pattern'), + properties: require('./properties'), + propertyNames: require('./propertyNames'), + required: require('./required'), + uniqueItems: require('./uniqueItems'), + validate: require('./validate') +}; diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/items.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/items.js new file mode 100644 index 0000000..bee5d67 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/items.js @@ -0,0 +1,140 @@ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/multipleOf.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/multipleOf.js new file mode 100644 index 0000000..9d6401b --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/multipleOf.js @@ -0,0 +1,80 @@ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/not.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/not.js new file mode 100644 index 0000000..f50c937 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/not.js @@ -0,0 +1,84 @@ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/oneOf.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/oneOf.js new file mode 100644 index 0000000..dfe2fd5 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/oneOf.js @@ -0,0 +1,73 @@ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/pattern.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/pattern.js new file mode 100644 index 0000000..1d74d6b --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/pattern.js @@ -0,0 +1,75 @@ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/properties.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/properties.js new file mode 100644 index 0000000..bc5ee55 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/properties.js @@ -0,0 +1,335 @@ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/propertyNames.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/propertyNames.js new file mode 100644 index 0000000..2a54a08 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/propertyNames.js @@ -0,0 +1,81 @@ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/uniqueItems.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/uniqueItems.js new file mode 100644 index 0000000..0736a0e --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/uniqueItems.js @@ -0,0 +1,86 @@ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/dotjs/validate.js b/packages/字体精简工具/node_modules/ajv/lib/dotjs/validate.js new file mode 100644 index 0000000..f295824 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/dotjs/validate.js @@ -0,0 +1,482 @@ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} diff --git a/packages/字体精简工具/node_modules/ajv/lib/keyword.js b/packages/字体精简工具/node_modules/ajv/lib/keyword.js new file mode 100644 index 0000000..06da9a2 --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/lib/keyword.js @@ -0,0 +1,146 @@ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); +var definitionSchema = require('./definition_schema'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i ../ajv-dist/bower.json + cd ../ajv-dist + + if [[ `git status --porcelain` ]]; then + echo "Changes detected. Updating master branch..." + git add -A + git commit -m "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin master > /dev/null 2>&1 + fi + + echo "Publishing tag..." + + git tag $TRAVIS_TAG + git push --tags > /dev/null 2>&1 + + echo "Done" +fi diff --git a/packages/字体精简工具/node_modules/ajv/scripts/travis-gh-pages b/packages/字体精简工具/node_modules/ajv/scripts/travis-gh-pages new file mode 100644 index 0000000..b3d4f3d --- /dev/null +++ b/packages/字体精简工具/node_modules/ajv/scripts/travis-gh-pages @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +set -e + +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_JOB_NUMBER =~ ".3" ]]; then + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '\.md$|^LICENSE$|travis-gh-pages$' && { + rm -rf ../gh-pages + git clone -b gh-pages --single-branch https://${GITHUB_TOKEN}@github.com/ajv-validator/ajv.git ../gh-pages + mkdir -p ../gh-pages/_source + cp *.md ../gh-pages/_source + cp LICENSE ../gh-pages/_source + currentDir=$(pwd) + cd ../gh-pages + $currentDir/node_modules/.bin/gh-pages-generator + # remove logo from README + sed -i -E "s/]+ajv_logo[^>]+>//" index.md + git config user.email "$GIT_USER_EMAIL" + git config user.name "$GIT_USER_NAME" + git add . + git commit -am "updated by travis build #$TRAVIS_BUILD_NUMBER" + git push --quiet origin gh-pages > /dev/null 2>&1 + } +fi diff --git a/packages/字体精简工具/node_modules/ansi-regex/index.js b/packages/字体精简工具/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..b9574ed --- /dev/null +++ b/packages/字体精简工具/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/packages/字体精简工具/node_modules/ansi-regex/license b/packages/字体精简工具/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/字体精简工具/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/ansi-regex/package.json b/packages/字体精简工具/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..bdd5bc8 --- /dev/null +++ b/packages/字体精简工具/node_modules/ansi-regex/package.json @@ -0,0 +1,108 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/strip-ansi" + ], + "_resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/packages/字体精简工具/node_modules/ansi-regex/readme.md b/packages/字体精简工具/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..6a928ed --- /dev/null +++ b/packages/字体精简工具/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/packages/字体精简工具/node_modules/append-buffer/LICENSE b/packages/字体精简工具/node_modules/append-buffer/LICENSE new file mode 100644 index 0000000..ffb7ec5 --- /dev/null +++ b/packages/字体精简工具/node_modules/append-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/append-buffer/README.md b/packages/字体精简工具/node_modules/append-buffer/README.md new file mode 100644 index 0000000..681a3c3 --- /dev/null +++ b/packages/字体精简工具/node_modules/append-buffer/README.md @@ -0,0 +1,95 @@ +# append-buffer [![NPM version](https://img.shields.io/npm/v/append-buffer.svg?style=flat)](https://www.npmjs.com/package/append-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![Linux Build Status](https://img.shields.io/travis/doowb/append-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/append-buffer) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/append-buffer.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/append-buffer) + +> Append a buffer to another buffer ensuring to preserve line ending characters. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save append-buffer +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add append-buffer +``` + +## Usage + +```js +var appendBuffer = require('append-buffer'); +``` + +## API + +### [appendBuffer](index.js#L28) + +Append a buffer to another buffer ensuring to preserve line ending characters. + +**Params** + +* `buf` **{Buffer}**: Buffer that will be used to check for an existing line ending. The suffix is appended to this. +* `suffix` **{Buffer}**: Buffer that will be appended to the buf. +* `returns` **{Buffer}**: Final Buffer + +**Example** + +```js +console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); +//=> [ 'abc\r\ndef\r\n' ] + +console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef\n' ] + +// uses os.EOL when a line ending is not found +console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef' ] +``` + +## Attribution + +The code in this module was originally added in a [PR](https://github.com/jonschlinkert/file-normalize/pull/3) to [file-normalize](https://github.com/jonschlinkert/file-normalize). It has been split out to allow for standalone use cases. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2017, [Brian Woodward](https://doowb.com). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 01, 2017._ \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/append-buffer/index.js b/packages/字体精简工具/node_modules/append-buffer/index.js new file mode 100644 index 0000000..a385570 --- /dev/null +++ b/packages/字体精简工具/node_modules/append-buffer/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var os = require('os'); +var equals = require('buffer-equal'); +var cr = new Buffer('\r\n'); +var nl = new Buffer('\n'); + +/** + * Append a buffer to another buffer ensuring to preserve line ending characters. + * + * ```js + * console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\r\ndef\r\n' ] + * + * console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef\n' ] + * + * // uses os.EOL when a line ending is not found + * console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef' ] + * * ``` + * @param {Buffer} `buf` Buffer that will be used to check for an existing line ending. The suffix is appended to this. + * @param {Buffer} `suffix` Buffer that will be appended to the buf. + * @return {Buffer} Final Buffer + * @api public + */ + +module.exports = function appendBuffer(buf, suffix) { + if (!suffix || !suffix.length) { + return buf; + } + var eol; + if (equals(buf.slice(-2), cr)) { + eol = cr; + } else if (equals(buf.slice(-1), nl)) { + eol = nl; + } else { + return Buffer.concat([buf, new Buffer(os.EOL), new Buffer(suffix)]); + } + return Buffer.concat([buf, new Buffer(suffix), eol]); +}; diff --git a/packages/字体精简工具/node_modules/append-buffer/package.json b/packages/字体精简工具/node_modules/append-buffer/package.json new file mode 100644 index 0000000..0374267 --- /dev/null +++ b/packages/字体精简工具/node_modules/append-buffer/package.json @@ -0,0 +1,84 @@ +{ + "_from": "append-buffer@^1.0.2", + "_id": "append-buffer@1.0.2", + "_inBundle": false, + "_integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "_location": "/append-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "append-buffer@^1.0.2", + "name": "append-buffer", + "escapedName": "append-buffer", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/vinyl-sourcemap" + ], + "_resolved": "https://registry.nlark.com/append-buffer/download/append-buffer-1.0.2.tgz", + "_shasum": "d8220cf466081525efea50614f3de6514dfa58f1", + "_spec": "append-buffer@^1.0.2", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl-sourcemap", + "author": { + "name": "Brian Woodward", + "url": "https://doowb.com" + }, + "bugs": { + "url": "https://github.com/doowb/append-buffer/issues" + }, + "bundleDependencies": false, + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "deprecated": false, + "description": "Append a buffer to another buffer ensuring to preserve line ending characters.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/doowb/append-buffer", + "keywords": [ + "append", + "append-buffer", + "concat", + "concat-buffer", + "eol", + "join", + "join-buffer", + "normalize", + "buffer" + ], + "license": "MIT", + "main": "index.js", + "name": "append-buffer", + "repository": { + "type": "git", + "url": "git+https://github.com/doowb/append-buffer.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/aproba/LICENSE b/packages/字体精简工具/node_modules/aproba/LICENSE new file mode 100644 index 0000000..f4be44d --- /dev/null +++ b/packages/字体精简工具/node_modules/aproba/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/packages/字体精简工具/node_modules/aproba/README.md b/packages/字体精简工具/node_modules/aproba/README.md new file mode 100644 index 0000000..0bfc594 --- /dev/null +++ b/packages/字体精简工具/node_modules/aproba/README.md @@ -0,0 +1,94 @@ +aproba +====== + +A ridiculously light-weight function argument validator + +``` +var validate = require("aproba") + +function myfunc(a, b, c) { + // `a` must be a string, `b` a number, `c` a function + validate('SNF', arguments) // [a,b,c] is also valid +} + +myfunc('test', 23, function () {}) // ok +myfunc(123, 23, function () {}) // type error +myfunc('test', 23) // missing arg error +myfunc('test', 23, function () {}, true) // too many args error + +``` + +Valid types are: + +| type | description +| :--: | :---------- +| * | matches any type +| A | `Array.isArray` OR an `arguments` object +| S | typeof == string +| N | typeof == number +| F | typeof == function +| O | typeof == object and not type A and not type E +| B | typeof == boolean +| E | `instanceof Error` OR `null` **(special: see below)** +| Z | == `null` + +Validation failures throw one of three exception types, distinguished by a +`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`. + +If you pass in an invalid type then it will throw with a code of +`EUNKNOWNTYPE`. + +If an **error** argument is found and is not null then the remaining +arguments are optional. That is, if you say `ESO` then that's like using a +non-magical `E` in: `E|ESO|ZSO`. + +### But I have optional arguments?! + +You can provide more than one signature by separating them with pipes `|`. +If any signature matches the arguments then they'll be considered valid. + +So for example, say you wanted to write a signature for +`fs.createWriteStream`. The docs for it describe it thusly: + +``` +fs.createWriteStream(path[, options]) +``` + +This would be a signature of `SO|S`. That is, a string and and object, or +just a string. + +Now, if you read the full `fs` docs, you'll see that actually path can ALSO +be a buffer. And options can be a string, that is: +``` +path | +options | +``` + +To reproduce this you have to fully enumerate all of the possible +combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The +awkwardness is a feature: It reminds you of the complexity you're adding to +your API when you do this sort of thing. + + +### Browser support + +This has no dependencies and should work in browsers, though you'll have +noisier stack traces. + +### Why this exists + +I wanted a very simple argument validator. It needed to do two things: + +1. Be more concise and easier to use than assertions + +2. Not encourage an infinite bikeshed of DSLs + +This is why types are specified by a single character and there's no such +thing as an optional argument. + +This is not intended to validate user data. This is specifically about +asserting the interface of your functions. + +If you need greater validation, I encourage you to write them by hand or +look elsewhere. + diff --git a/packages/字体精简工具/node_modules/aproba/index.js b/packages/字体精简工具/node_modules/aproba/index.js new file mode 100644 index 0000000..6f3f797 --- /dev/null +++ b/packages/字体精简工具/node_modules/aproba/index.js @@ -0,0 +1,105 @@ +'use strict' + +function isArguments (thingy) { + return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee') +} + +var types = { + '*': {label: 'any', check: function () { return true }}, + A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }}, + S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }}, + N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }}, + F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }}, + O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }}, + B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }}, + E: {label: 'error', check: function (thingy) { return thingy instanceof Error }}, + Z: {label: 'null', check: function (thingy) { return thingy == null }} +} + +function addSchema (schema, arity) { + var group = arity[schema.length] = arity[schema.length] || [] + if (group.indexOf(schema) === -1) group.push(schema) +} + +var validate = module.exports = function (rawSchemas, args) { + if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length) + if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas') + if (!args) throw missingRequiredArg(1, 'args') + if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas) + if (!types.A.check(args)) throw invalidType(1, ['array'], args) + var schemas = rawSchemas.split('|') + var arity = {} + + schemas.forEach(function (schema) { + for (var ii = 0; ii < schema.length; ++ii) { + var type = schema[ii] + if (!types[type]) throw unknownType(ii, type) + } + if (/E.*E/.test(schema)) throw moreThanOneError(schema) + addSchema(schema, arity) + if (/E/.test(schema)) { + addSchema(schema.replace(/E.*$/, 'E'), arity) + addSchema(schema.replace(/E/, 'Z'), arity) + if (schema.length === 1) addSchema('', arity) + } + }) + var matching = arity[args.length] + if (!matching) { + throw wrongNumberOfArgs(Object.keys(arity), args.length) + } + for (var ii = 0; ii < args.length; ++ii) { + var newMatching = matching.filter(function (schema) { + var type = schema[ii] + var typeCheck = types[type].check + return typeCheck(args[ii]) + }) + if (!newMatching.length) { + var labels = matching.map(function (schema) { + return types[schema[ii]].label + }).filter(function (schema) { return schema != null }) + throw invalidType(ii, labels, args[ii]) + } + matching = newMatching + } +} + +function missingRequiredArg (num) { + return newException('EMISSINGARG', 'Missing required argument #' + (num + 1)) +} + +function unknownType (num, type) { + return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1)) +} + +function invalidType (num, expectedTypes, value) { + var valueType + Object.keys(types).forEach(function (typeCode) { + if (types[typeCode].check(value)) valueType = types[typeCode].label + }) + return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' + + englishList(expectedTypes) + ' but got ' + valueType) +} + +function englishList (list) { + return list.join(', ').replace(/, ([^,]+)$/, ' or $1') +} + +function wrongNumberOfArgs (expected, got) { + var english = englishList(expected) + var args = expected.every(function (ex) { return ex.length === 1 }) + ? 'argument' + : 'arguments' + return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got) +} + +function moreThanOneError (schema) { + return newException('ETOOMANYERRORTYPES', + 'Only one error type per argument signature is allowed, more than one found in "' + schema + '"') +} + +function newException (code, msg) { + var e = new Error(msg) + e.code = code + if (Error.captureStackTrace) Error.captureStackTrace(e, validate) + return e +} diff --git a/packages/字体精简工具/node_modules/aproba/package.json b/packages/字体精简工具/node_modules/aproba/package.json new file mode 100644 index 0000000..79a1c23 --- /dev/null +++ b/packages/字体精简工具/node_modules/aproba/package.json @@ -0,0 +1,62 @@ +{ + "_from": "aproba@^1.0.3", + "_id": "aproba@1.2.0", + "_inBundle": false, + "_integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo=", + "_location": "/aproba", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "aproba@^1.0.3", + "name": "aproba", + "escapedName": "aproba", + "rawSpec": "^1.0.3", + "saveSpec": null, + "fetchSpec": "^1.0.3" + }, + "_requiredBy": [ + "/gauge" + ], + "_resolved": "https://registry.nlark.com/aproba/download/aproba-1.2.0.tgz", + "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a", + "_spec": "aproba@^1.0.3", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\gauge", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org" + }, + "bugs": { + "url": "https://github.com/iarna/aproba/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "A ridiculously light-weight argument validator (now browser friendly)", + "devDependencies": { + "standard": "^10.0.3", + "tap": "^10.0.2" + }, + "directories": { + "test": "test" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/iarna/aproba", + "keywords": [ + "argument", + "validate" + ], + "license": "ISC", + "main": "index.js", + "name": "aproba", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/aproba.git" + }, + "scripts": { + "test": "standard && tap -j3 test/*.js" + }, + "version": "1.2.0" +} diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/CHANGES.md b/packages/字体精简工具/node_modules/are-we-there-yet/CHANGES.md new file mode 100644 index 0000000..21f3b1c --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/CHANGES.md @@ -0,0 +1,37 @@ +Hi, figured we could actually use a changelog now: + +## 1.1.5 2018-05-24 + +* [#92](https://github.com/iarna/are-we-there-yet/pull/92) Fix bug where + `finish` would throw errors when including `TrackerStream` objects in + `TrackerGroup` collections. (@brianloveswords) + +## 1.1.4 2017-04-21 + +* Fix typo in package.json + +## 1.1.3 2017-04-21 + +* Improve documentation and limit files included in the distribution. + +## 1.1.2 2016-03-15 + +* Add tracker group cycle detection and tests for it + +## 1.1.1 2016-01-29 + +* Fix a typo in stream completion tracker + +## 1.1.0 2016-01-29 + +* Rewrote completion percent computation to be low impact– no more walking a + tree of completion groups every time we need this info. Previously, with + medium sized tree of completion groups, even a relatively modest number of + calls to the top level `completed()` method would result in absurd numbers + of calls overall as it walked down the tree. We now, instead, keep track as + we bubble up changes, so the computation is limited to when data changes and + to the depth of that one branch, instead of _every_ node. (Plus, we were already + incurring _this_ cost, since we already bubbled out changes.) +* Moved different tracker types out to their own files. +* Made tests test for TOO MANY events too. +* Standarized the source code formatting diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/LICENSE b/packages/字体精简工具/node_modules/are-we-there-yet/LICENSE new file mode 100644 index 0000000..af45880 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/LICENSE @@ -0,0 +1,5 @@ +Copyright (c) 2015, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/README.md b/packages/字体精简工具/node_modules/are-we-there-yet/README.md new file mode 100644 index 0000000..7e2b42d --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/README.md @@ -0,0 +1,195 @@ +are-we-there-yet +---------------- + +Track complex hiearchies of asynchronous task completion statuses. This is +intended to give you a way of recording and reporting the progress of the big +recursive fan-out and gather type workflows that are so common in async. + +What you do with this completion data is up to you, but the most common use case is to +feed it to one of the many progress bar modules. + +Most progress bar modules include a rudamentary version of this, but my +needs were more complex. + +Usage +===== + +```javascript +var TrackerGroup = require("are-we-there-yet").TrackerGroup + +var top = new TrackerGroup("program") + +var single = top.newItem("one thing", 100) +single.completeWork(20) + +console.log(top.completed()) // 0.2 + +fs.stat("file", function(er, stat) { + if (er) throw er + var stream = top.newStream("file", stat.size) + console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete + // and 50% * 20% == 10% + fs.createReadStream("file").pipe(stream).on("data", function (chunk) { + // do stuff with chunk + }) + top.on("change", function (name) { + // called each time a chunk is read from "file" + // top.completed() will start at 0.1 and fill up to 0.6 as the file is read + }) +}) +``` + +Shared Methods +============== + +* var completed = tracker.completed() + +Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream` + +Returns the ratio of completed work to work to be done. Range of 0 to 1. + +* tracker.finish() + +Implemented in: `Tracker`, `TrackerGroup` + +Marks the tracker as completed. With a TrackerGroup this marks all of its +components as completed. + +Marks all of the components of this tracker as finished, which in turn means +that `tracker.completed()` for this will now be 1. + +This will result in one or more `change` events being emitted. + +Events +====== + +All tracker objects emit `change` events with the following arguments: + +``` +function (name, completed, tracker) +``` + +`name` is the name of the tracker that originally emitted the event, +or if it didn't have one, the first containing tracker group that had one. + +`completed` is the percent complete (as returned by `tracker.completed()` method). + +`tracker` is the tracker object that you are listening for events on. + +TrackerGroup +============ + +* var tracker = new TrackerGroup(**name**) + + * **name** *(optional)* - The name of this tracker group, used in change + notifications if the component updating didn't have a name. Defaults to undefined. + +Creates a new empty tracker aggregation group. These are trackers whose +completion status is determined by the completion status of other trackers. + +* tracker.addUnit(**otherTracker**, **weight**) + + * **otherTracker** - Any of the other are-we-there-yet tracker objects + * **weight** *(optional)* - The weight to give the tracker, defaults to 1. + +Adds the **otherTracker** to this aggregation group. The weight determines +how long you expect this tracker to take to complete in proportion to other +units. So for instance, if you add one tracker with a weight of 1 and +another with a weight of 2, you're saying the second will take twice as long +to complete as the first. As such, the first will account for 33% of the +completion of this tracker and the second will account for the other 67%. + +Returns **otherTracker**. + +* var subGroup = tracker.newGroup(**name**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subGroup = tracker.addUnit(new TrackerGroup(name), weight) +``` + +* var subItem = tracker.newItem(**name**, **todo**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subItem = tracker.addUnit(new Tracker(name, todo), weight) +``` + +* var subStream = tracker.newStream(**name**, **todo**, **weight**) + +The above is exactly equivalent to: + +```javascript + var subStream = tracker.addUnit(new TrackerStream(name, todo), weight) +``` + +* console.log( tracker.debug() ) + +Returns a tree showing the completion of this tracker group and all of its +children, including recursively entering all of the children. + +Tracker +======= + +* var tracker = new Tracker(**name**, **todo**) + + * **name** *(optional)* The name of this counter to report in change + events. Defaults to undefined. + * **todo** *(optional)* The amount of work todo (a number). Defaults to 0. + +Ordinarily these are constructed as a part of a tracker group (via +`newItem`). + +* var completed = tracker.completed() + +Returns the ratio of completed work to work to be done. Range of 0 to 1. If +total work to be done is 0 then it will return 0. + +* tracker.addWork(**todo**) + + * **todo** A number to add to the amount of work to be done. + +Increases the amount of work to be done, thus decreasing the completion +percentage. Triggers a `change` event. + +* tracker.completeWork(**completed**) + + * **completed** A number to add to the work complete + +Increase the amount of work complete, thus increasing the completion percentage. +Will never increase the work completed past the amount of work todo. That is, +percentages > 100% are not allowed. Triggers a `change` event. + +* tracker.finish() + +Marks this tracker as finished, tracker.completed() will now be 1. Triggers +a `change` event. + +TrackerStream +============= + +* var tracker = new TrackerStream(**name**, **size**, **options**) + + * **name** *(optional)* The name of this counter to report in change + events. Defaults to undefined. + * **size** *(optional)* The number of bytes being sent through this stream. + * **options** *(optional)* A hash of stream options + +The tracker stream object is a pass through stream that updates an internal +tracker object each time a block passes through. It's intended to track +downloads, file extraction and other related activities. You use it by piping +your data source into it and then using it as your data source. + +If your data has a length attribute then that's used as the amount of work +completed when the chunk is passed through. If it does not (eg, object +streams) then each chunk counts as completing 1 unit of work, so your size +should be the total number of objects being streamed. + +* tracker.addWork(**todo**) + + * **todo** Increase the expected overall size by **todo** bytes. + +Increases the amount of work to be done, thus decreasing the completion +percentage. Triggers a `change` event. diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/index.js b/packages/字体精简工具/node_modules/are-we-there-yet/index.js new file mode 100644 index 0000000..57d8743 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/index.js @@ -0,0 +1,4 @@ +'use strict' +exports.TrackerGroup = require('./tracker-group.js') +exports.Tracker = require('./tracker.js') +exports.TrackerStream = require('./tracker-stream.js') diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/package.json b/packages/字体精简工具/node_modules/are-we-there-yet/package.json new file mode 100644 index 0000000..2042706 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/package.json @@ -0,0 +1,63 @@ +{ + "_from": "are-we-there-yet@~1.1.2", + "_id": "are-we-there-yet@1.1.5", + "_inBundle": false, + "_integrity": "sha1-SzXClE8GKov82mZBB2A1D+nd/CE=", + "_location": "/are-we-there-yet", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "are-we-there-yet@~1.1.2", + "name": "are-we-there-yet", + "escapedName": "are-we-there-yet", + "rawSpec": "~1.1.2", + "saveSpec": null, + "fetchSpec": "~1.1.2" + }, + "_requiredBy": [ + "/npmlog" + ], + "_resolved": "https://registry.nlark.com/are-we-there-yet/download/are-we-there-yet-1.1.5.tgz", + "_shasum": "4b35c2944f062a8bfcda66410760350fe9ddfc21", + "_spec": "are-we-there-yet@~1.1.2", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\npmlog", + "author": { + "name": "Rebecca Turner", + "url": "http://re-becca.org" + }, + "bugs": { + "url": "https://github.com/iarna/are-we-there-yet/issues" + }, + "bundleDependencies": false, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + }, + "deprecated": false, + "description": "Keep track of the overall completion of many disparate processes", + "devDependencies": { + "standard": "^11.0.1", + "tap": "^12.0.1" + }, + "files": [ + "index.js", + "tracker-base.js", + "tracker-group.js", + "tracker-stream.js", + "tracker.js", + "CHANGES.md" + ], + "homepage": "https://github.com/iarna/are-we-there-yet", + "license": "ISC", + "main": "index.js", + "name": "are-we-there-yet", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/are-we-there-yet.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "version": "1.1.5" +} diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/tracker-base.js b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-base.js new file mode 100644 index 0000000..6f43687 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-base.js @@ -0,0 +1,11 @@ +'use strict' +var EventEmitter = require('events').EventEmitter +var util = require('util') + +var trackerId = 0 +var TrackerBase = module.exports = function (name) { + EventEmitter.call(this) + this.id = ++trackerId + this.name = name +} +util.inherits(TrackerBase, EventEmitter) diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/tracker-group.js b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-group.js new file mode 100644 index 0000000..9759e12 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-group.js @@ -0,0 +1,107 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') +var Tracker = require('./tracker.js') +var TrackerStream = require('./tracker-stream.js') + +var TrackerGroup = module.exports = function (name) { + TrackerBase.call(this, name) + this.parentGroup = null + this.trackers = [] + this.completion = {} + this.weight = {} + this.totalWeight = 0 + this.finished = false + this.bubbleChange = bubbleChange(this) +} +util.inherits(TrackerGroup, TrackerBase) + +function bubbleChange (trackerGroup) { + return function (name, completed, tracker) { + trackerGroup.completion[tracker.id] = completed + if (trackerGroup.finished) return + trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup) + } +} + +TrackerGroup.prototype.nameInTree = function () { + var names = [] + var from = this + while (from) { + names.unshift(from.name) + from = from.parentGroup + } + return names.join('/') +} + +TrackerGroup.prototype.addUnit = function (unit, weight) { + if (unit.addUnit) { + var toTest = this + while (toTest) { + if (unit === toTest) { + throw new Error( + 'Attempted to add tracker group ' + + unit.name + ' to tree that already includes it ' + + this.nameInTree(this)) + } + toTest = toTest.parentGroup + } + unit.parentGroup = this + } + this.weight[unit.id] = weight || 1 + this.totalWeight += this.weight[unit.id] + this.trackers.push(unit) + this.completion[unit.id] = unit.completed() + unit.on('change', this.bubbleChange) + if (!this.finished) this.emit('change', unit.name, this.completion[unit.id], unit) + return unit +} + +TrackerGroup.prototype.completed = function () { + if (this.trackers.length === 0) return 0 + var valPerWeight = 1 / this.totalWeight + var completed = 0 + for (var ii = 0; ii < this.trackers.length; ii++) { + var trackerId = this.trackers[ii].id + completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId] + } + return completed +} + +TrackerGroup.prototype.newGroup = function (name, weight) { + return this.addUnit(new TrackerGroup(name), weight) +} + +TrackerGroup.prototype.newItem = function (name, todo, weight) { + return this.addUnit(new Tracker(name, todo), weight) +} + +TrackerGroup.prototype.newStream = function (name, todo, weight) { + return this.addUnit(new TrackerStream(name, todo), weight) +} + +TrackerGroup.prototype.finish = function () { + this.finished = true + if (!this.trackers.length) this.addUnit(new Tracker(), 1, true) + for (var ii = 0; ii < this.trackers.length; ii++) { + var tracker = this.trackers[ii] + tracker.finish() + tracker.removeListener('change', this.bubbleChange) + } + this.emit('change', this.name, 1, this) +} + +var buffer = ' ' +TrackerGroup.prototype.debug = function (depth) { + depth = depth || 0 + var indent = depth ? buffer.substr(0, depth) : '' + var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n' + this.trackers.forEach(function (tracker) { + if (tracker instanceof TrackerGroup) { + output += tracker.debug(depth + 1) + } else { + output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n' + } + }) + return output +} diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/tracker-stream.js b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-stream.js new file mode 100644 index 0000000..e1cf850 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/tracker-stream.js @@ -0,0 +1,36 @@ +'use strict' +var util = require('util') +var stream = require('readable-stream') +var delegate = require('delegates') +var Tracker = require('./tracker.js') + +var TrackerStream = module.exports = function (name, size, options) { + stream.Transform.call(this, options) + this.tracker = new Tracker(name, size) + this.name = name + this.id = this.tracker.id + this.tracker.on('change', delegateChange(this)) +} +util.inherits(TrackerStream, stream.Transform) + +function delegateChange (trackerStream) { + return function (name, completion, tracker) { + trackerStream.emit('change', name, completion, trackerStream) + } +} + +TrackerStream.prototype._transform = function (data, encoding, cb) { + this.tracker.completeWork(data.length ? data.length : 1) + this.push(data) + cb() +} + +TrackerStream.prototype._flush = function (cb) { + this.tracker.finish() + cb() +} + +delegate(TrackerStream.prototype, 'tracker') + .method('completed') + .method('addWork') + .method('finish') diff --git a/packages/字体精简工具/node_modules/are-we-there-yet/tracker.js b/packages/字体精简工具/node_modules/are-we-there-yet/tracker.js new file mode 100644 index 0000000..68c2339 --- /dev/null +++ b/packages/字体精简工具/node_modules/are-we-there-yet/tracker.js @@ -0,0 +1,30 @@ +'use strict' +var util = require('util') +var TrackerBase = require('./tracker-base.js') + +var Tracker = module.exports = function (name, todo) { + TrackerBase.call(this, name) + this.workDone = 0 + this.workTodo = todo || 0 +} +util.inherits(Tracker, TrackerBase) + +Tracker.prototype.completed = function () { + return this.workTodo === 0 ? 0 : this.workDone / this.workTodo +} + +Tracker.prototype.addWork = function (work) { + this.workTodo += work + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.completeWork = function (work) { + this.workDone += work + if (this.workDone > this.workTodo) this.workDone = this.workTodo + this.emit('change', this.name, this.completed(), this) +} + +Tracker.prototype.finish = function () { + this.workTodo = this.workDone = 1 + this.emit('change', this.name, 1, this) +} diff --git a/packages/字体精简工具/node_modules/array-find-index/index.js b/packages/字体精简工具/node_modules/array-find-index/index.js new file mode 100644 index 0000000..e2dcd9a --- /dev/null +++ b/packages/字体精简工具/node_modules/array-find-index/index.js @@ -0,0 +1,25 @@ +'use strict'; +module.exports = function (arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === 'function') { + return arr.findIndex(predicate, ctx); + } + + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + var list = Object(arr); + var len = list.length; + + if (len === 0) { + return -1; + } + + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + + return -1; +}; diff --git a/packages/字体精简工具/node_modules/array-find-index/license b/packages/字体精简工具/node_modules/array-find-index/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/字体精简工具/node_modules/array-find-index/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/array-find-index/package.json b/packages/字体精简工具/node_modules/array-find-index/package.json new file mode 100644 index 0000000..d17d1ab --- /dev/null +++ b/packages/字体精简工具/node_modules/array-find-index/package.json @@ -0,0 +1,67 @@ +{ + "_from": "array-find-index@^1.0.1", + "_id": "array-find-index@1.0.2", + "_inBundle": false, + "_integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "_location": "/array-find-index", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-find-index@^1.0.1", + "name": "array-find-index", + "escapedName": "array-find-index", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/currently-unhandled" + ], + "_resolved": "https://registry.nlark.com/array-find-index/download/array-find-index-1.0.2.tgz", + "_shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1", + "_spec": "array-find-index@^1.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\currently-unhandled", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-find-index/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ES2015 `Array#findIndex()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/array-find-index#readme", + "keywords": [ + "es2015", + "ponyfill", + "polyfill", + "shim", + "find", + "index", + "findindex", + "array" + ], + "license": "MIT", + "name": "array-find-index", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-find-index.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/array-find-index/readme.md b/packages/字体精简工具/node_modules/array-find-index/readme.md new file mode 100644 index 0000000..3166341 --- /dev/null +++ b/packages/字体精简工具/node_modules/array-find-index/readme.md @@ -0,0 +1,30 @@ +# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index) + +> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save array-find-index +``` + + +## Usage + +```js +const arrayFindIndex = require('array-find-index'); + +arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn'); +//=> 1 +``` + + +## API + +Same as `Array#findIndex()`, but with the input array as the first argument. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/packages/字体精简工具/node_modules/asn1/LICENSE b/packages/字体精简工具/node_modules/asn1/LICENSE new file mode 100644 index 0000000..9b5dcdb --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Mark Cavage, All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/packages/字体精简工具/node_modules/asn1/README.md b/packages/字体精简工具/node_modules/asn1/README.md new file mode 100644 index 0000000..2208210 --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/README.md @@ -0,0 +1,50 @@ +node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. +Currently BER encoding is supported; at some point I'll likely have to do DER. + +## Usage + +Mostly, if you're *actually* needing to read and write ASN.1, you probably don't +need this readme to explain what and why. If you have no idea what ASN.1 is, +see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +The source is pretty much self-explanatory, and has read/write methods for the +common types out there. + +### Decoding + +The following reads an ASN.1 sequence with a boolean. + + var Ber = require('asn1').Ber; + + var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff])); + + reader.readSequence(); + console.log('Sequence len: ' + reader.length); + if (reader.peek() === Ber.Boolean) + console.log(reader.readBoolean()); + +### Encoding + +The following generates the same payload as above. + + var Ber = require('asn1').Ber; + + var writer = new Ber.Writer(); + + writer.startSequence(); + writer.writeBoolean(true); + writer.endSequence(); + + console.log(writer.buffer); + +## Installation + + npm install asn1 + +## License + +MIT. + +## Bugs + +See . diff --git a/packages/字体精简工具/node_modules/asn1/lib/ber/errors.js b/packages/字体精简工具/node_modules/asn1/lib/ber/errors.js new file mode 100644 index 0000000..4557b8a --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/ber/errors.js @@ -0,0 +1,13 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + + newInvalidAsn1Error: function (msg) { + var e = new Error(); + e.name = 'InvalidAsn1Error'; + e.message = msg || ''; + return e; + } + +}; diff --git a/packages/字体精简工具/node_modules/asn1/lib/ber/index.js b/packages/字体精简工具/node_modules/asn1/lib/ber/index.js new file mode 100644 index 0000000..387d132 --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/ber/index.js @@ -0,0 +1,27 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var errors = require('./errors'); +var types = require('./types'); + +var Reader = require('./reader'); +var Writer = require('./writer'); + + +// --- Exports + +module.exports = { + + Reader: Reader, + + Writer: Writer + +}; + +for (var t in types) { + if (types.hasOwnProperty(t)) + module.exports[t] = types[t]; +} +for (var e in errors) { + if (errors.hasOwnProperty(e)) + module.exports[e] = errors[e]; +} diff --git a/packages/字体精简工具/node_modules/asn1/lib/ber/reader.js b/packages/字体精简工具/node_modules/asn1/lib/ber/reader.js new file mode 100644 index 0000000..8a7e4ca --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/ber/reader.js @@ -0,0 +1,262 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; + +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + + + +// --- API + +function Reader(data) { + if (!data || !Buffer.isBuffer(data)) + throw new TypeError('data must be a node Buffer'); + + this._buf = data; + this._size = data.length; + + // These hold the "current" state + this._len = 0; + this._offset = 0; +} + +Object.defineProperty(Reader.prototype, 'length', { + enumerable: true, + get: function () { return (this._len); } +}); + +Object.defineProperty(Reader.prototype, 'offset', { + enumerable: true, + get: function () { return (this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'remain', { + get: function () { return (this._size - this._offset); } +}); + +Object.defineProperty(Reader.prototype, 'buffer', { + get: function () { return (this._buf.slice(this._offset)); } +}); + + +/** + * Reads a single byte and advances offset; you can pass in `true` to make this + * a "peek" operation (i.e., get the byte, but don't advance the offset). + * + * @param {Boolean} peek true means don't move offset. + * @return {Number} the next byte, null if not enough data. + */ +Reader.prototype.readByte = function (peek) { + if (this._size - this._offset < 1) + return null; + + var b = this._buf[this._offset] & 0xff; + + if (!peek) + this._offset += 1; + + return b; +}; + + +Reader.prototype.peek = function () { + return this.readByte(true); +}; + + +/** + * Reads a (potentially) variable length off the BER buffer. This call is + * not really meant to be called directly, as callers have to manipulate + * the internal buffer afterwards. + * + * As a result of this call, you can call `Reader.length`, until the + * next thing called that does a readLength. + * + * @return {Number} the amount of offset to advance the buffer. + * @throws {InvalidAsn1Error} on bad ASN.1 + */ +Reader.prototype.readLength = function (offset) { + if (offset === undefined) + offset = this._offset; + + if (offset >= this._size) + return null; + + var lenB = this._buf[offset++] & 0xff; + if (lenB === null) + return null; + + if ((lenB & 0x80) === 0x80) { + lenB &= 0x7f; + + if (lenB === 0) + throw newInvalidAsn1Error('Indefinite length not supported'); + + if (lenB > 4) + throw newInvalidAsn1Error('encoding too long'); + + if (this._size - offset < lenB) + return null; + + this._len = 0; + for (var i = 0; i < lenB; i++) + this._len = (this._len << 8) + (this._buf[offset++] & 0xff); + + } else { + // Wasn't a variable length + this._len = lenB; + } + + return offset; +}; + + +/** + * Parses the next sequence in this BER buffer. + * + * To get the length of the sequence, call `Reader.length`. + * + * @return {Number} the sequence's tag. + */ +Reader.prototype.readSequence = function (tag) { + var seq = this.peek(); + if (seq === null) + return null; + if (tag !== undefined && tag !== seq) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + seq.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + this._offset = o; + return seq; +}; + + +Reader.prototype.readInt = function () { + return this._readTag(ASN1.Integer); +}; + + +Reader.prototype.readBoolean = function () { + return (this._readTag(ASN1.Boolean) === 0 ? false : true); +}; + + +Reader.prototype.readEnumeration = function () { + return this._readTag(ASN1.Enumeration); +}; + + +Reader.prototype.readString = function (tag, retbuf) { + if (!tag) + tag = ASN1.OctetString; + + var b = this.peek(); + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + + if (o === null) + return null; + + if (this.length > this._size - o) + return null; + + this._offset = o; + + if (this.length === 0) + return retbuf ? Buffer.alloc(0) : ''; + + var str = this._buf.slice(this._offset, this._offset + this.length); + this._offset += this.length; + + return retbuf ? str : str.toString('utf8'); +}; + +Reader.prototype.readOID = function (tag) { + if (!tag) + tag = ASN1.OID; + + var b = this.readString(tag, true); + if (b === null) + return null; + + var values = []; + var value = 0; + + for (var i = 0; i < b.length; i++) { + var byte = b[i] & 0xff; + + value <<= 7; + value += byte & 0x7f; + if ((byte & 0x80) === 0) { + values.push(value); + value = 0; + } + } + + value = values.shift(); + values.unshift(value % 40); + values.unshift((value / 40) >> 0); + + return values.join('.'); +}; + + +Reader.prototype._readTag = function (tag) { + assert.ok(tag !== undefined); + + var b = this.peek(); + + if (b === null) + return null; + + if (b !== tag) + throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) + + ': got 0x' + b.toString(16)); + + var o = this.readLength(this._offset + 1); // stored in `length` + if (o === null) + return null; + + if (this.length > 4) + throw newInvalidAsn1Error('Integer too long: ' + this.length); + + if (this.length > this._size - o) + return null; + this._offset = o; + + var fb = this._buf[this._offset]; + var value = 0; + + for (var i = 0; i < this.length; i++) { + value <<= 8; + value |= (this._buf[this._offset++] & 0xff); + } + + if ((fb & 0x80) === 0x80 && i !== 4) + value -= (1 << (i * 8)); + + return value >> 0; +}; + + + +// --- Exported API + +module.exports = Reader; diff --git a/packages/字体精简工具/node_modules/asn1/lib/ber/types.js b/packages/字体精简工具/node_modules/asn1/lib/ber/types.js new file mode 100644 index 0000000..8aea000 --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/ber/types.js @@ -0,0 +1,36 @@ +// Copyright 2011 Mark Cavage All rights reserved. + + +module.exports = { + EOC: 0, + Boolean: 1, + Integer: 2, + BitString: 3, + OctetString: 4, + Null: 5, + OID: 6, + ObjectDescriptor: 7, + External: 8, + Real: 9, // float + Enumeration: 10, + PDV: 11, + Utf8String: 12, + RelativeOID: 13, + Sequence: 16, + Set: 17, + NumericString: 18, + PrintableString: 19, + T61String: 20, + VideotexString: 21, + IA5String: 22, + UTCTime: 23, + GeneralizedTime: 24, + GraphicString: 25, + VisibleString: 26, + GeneralString: 28, + UniversalString: 29, + CharacterString: 30, + BMPString: 31, + Constructor: 32, + Context: 128 +}; diff --git a/packages/字体精简工具/node_modules/asn1/lib/ber/writer.js b/packages/字体精简工具/node_modules/asn1/lib/ber/writer.js new file mode 100644 index 0000000..3515acf --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/ber/writer.js @@ -0,0 +1,317 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +var assert = require('assert'); +var Buffer = require('safer-buffer').Buffer; +var ASN1 = require('./types'); +var errors = require('./errors'); + + +// --- Globals + +var newInvalidAsn1Error = errors.newInvalidAsn1Error; + +var DEFAULT_OPTS = { + size: 1024, + growthFactor: 8 +}; + + +// --- Helpers + +function merge(from, to) { + assert.ok(from); + assert.equal(typeof (from), 'object'); + assert.ok(to); + assert.equal(typeof (to), 'object'); + + var keys = Object.getOwnPropertyNames(from); + keys.forEach(function (key) { + if (to[key]) + return; + + var value = Object.getOwnPropertyDescriptor(from, key); + Object.defineProperty(to, key, value); + }); + + return to; +} + + + +// --- API + +function Writer(options) { + options = merge(DEFAULT_OPTS, options || {}); + + this._buf = Buffer.alloc(options.size || 1024); + this._size = this._buf.length; + this._offset = 0; + this._options = options; + + // A list of offsets in the buffer where we need to insert + // sequence tag/len pairs. + this._seq = []; +} + +Object.defineProperty(Writer.prototype, 'buffer', { + get: function () { + if (this._seq.length) + throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)'); + + return (this._buf.slice(0, this._offset)); + } +}); + +Writer.prototype.writeByte = function (b) { + if (typeof (b) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(1); + this._buf[this._offset++] = b; +}; + + +Writer.prototype.writeInt = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Integer; + + var sz = 4; + + while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) && + (sz > 1)) { + sz--; + i <<= 8; + } + + if (sz > 4) + throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff'); + + this._ensure(2 + sz); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = sz; + + while (sz-- > 0) { + this._buf[this._offset++] = ((i & 0xff000000) >>> 24); + i <<= 8; + } + +}; + + +Writer.prototype.writeNull = function () { + this.writeByte(ASN1.Null); + this.writeByte(0x00); +}; + + +Writer.prototype.writeEnumeration = function (i, tag) { + if (typeof (i) !== 'number') + throw new TypeError('argument must be a Number'); + if (typeof (tag) !== 'number') + tag = ASN1.Enumeration; + + return this.writeInt(i, tag); +}; + + +Writer.prototype.writeBoolean = function (b, tag) { + if (typeof (b) !== 'boolean') + throw new TypeError('argument must be a Boolean'); + if (typeof (tag) !== 'number') + tag = ASN1.Boolean; + + this._ensure(3); + this._buf[this._offset++] = tag; + this._buf[this._offset++] = 0x01; + this._buf[this._offset++] = b ? 0xff : 0x00; +}; + + +Writer.prototype.writeString = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string (was: ' + typeof (s) + ')'); + if (typeof (tag) !== 'number') + tag = ASN1.OctetString; + + var len = Buffer.byteLength(s); + this.writeByte(tag); + this.writeLength(len); + if (len) { + this._ensure(len); + this._buf.write(s, this._offset); + this._offset += len; + } +}; + + +Writer.prototype.writeBuffer = function (buf, tag) { + if (typeof (tag) !== 'number') + throw new TypeError('tag must be a number'); + if (!Buffer.isBuffer(buf)) + throw new TypeError('argument must be a buffer'); + + this.writeByte(tag); + this.writeLength(buf.length); + this._ensure(buf.length); + buf.copy(this._buf, this._offset, 0, buf.length); + this._offset += buf.length; +}; + + +Writer.prototype.writeStringArray = function (strings) { + if ((!strings instanceof Array)) + throw new TypeError('argument must be an Array[String]'); + + var self = this; + strings.forEach(function (s) { + self.writeString(s); + }); +}; + +// This is really to solve DER cases, but whatever for now +Writer.prototype.writeOID = function (s, tag) { + if (typeof (s) !== 'string') + throw new TypeError('argument must be a string'); + if (typeof (tag) !== 'number') + tag = ASN1.OID; + + if (!/^([0-9]+\.){3,}[0-9]+$/.test(s)) + throw new Error('argument is not a valid OID string'); + + function encodeOctet(bytes, octet) { + if (octet < 128) { + bytes.push(octet); + } else if (octet < 16384) { + bytes.push((octet >>> 7) | 0x80); + bytes.push(octet & 0x7F); + } else if (octet < 2097152) { + bytes.push((octet >>> 14) | 0x80); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else if (octet < 268435456) { + bytes.push((octet >>> 21) | 0x80); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } else { + bytes.push(((octet >>> 28) | 0x80) & 0xFF); + bytes.push(((octet >>> 21) | 0x80) & 0xFF); + bytes.push(((octet >>> 14) | 0x80) & 0xFF); + bytes.push(((octet >>> 7) | 0x80) & 0xFF); + bytes.push(octet & 0x7F); + } + } + + var tmp = s.split('.'); + var bytes = []; + bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10)); + tmp.slice(2).forEach(function (b) { + encodeOctet(bytes, parseInt(b, 10)); + }); + + var self = this; + this._ensure(2 + bytes.length); + this.writeByte(tag); + this.writeLength(bytes.length); + bytes.forEach(function (b) { + self.writeByte(b); + }); +}; + + +Writer.prototype.writeLength = function (len) { + if (typeof (len) !== 'number') + throw new TypeError('argument must be a Number'); + + this._ensure(4); + + if (len <= 0x7f) { + this._buf[this._offset++] = len; + } else if (len <= 0xff) { + this._buf[this._offset++] = 0x81; + this._buf[this._offset++] = len; + } else if (len <= 0xffff) { + this._buf[this._offset++] = 0x82; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else if (len <= 0xffffff) { + this._buf[this._offset++] = 0x83; + this._buf[this._offset++] = len >> 16; + this._buf[this._offset++] = len >> 8; + this._buf[this._offset++] = len; + } else { + throw newInvalidAsn1Error('Length too long (> 4 bytes)'); + } +}; + +Writer.prototype.startSequence = function (tag) { + if (typeof (tag) !== 'number') + tag = ASN1.Sequence | ASN1.Constructor; + + this.writeByte(tag); + this._seq.push(this._offset); + this._ensure(3); + this._offset += 3; +}; + + +Writer.prototype.endSequence = function () { + var seq = this._seq.pop(); + var start = seq + 3; + var len = this._offset - start; + + if (len <= 0x7f) { + this._shift(start, len, -2); + this._buf[seq] = len; + } else if (len <= 0xff) { + this._shift(start, len, -1); + this._buf[seq] = 0x81; + this._buf[seq + 1] = len; + } else if (len <= 0xffff) { + this._buf[seq] = 0x82; + this._buf[seq + 1] = len >> 8; + this._buf[seq + 2] = len; + } else if (len <= 0xffffff) { + this._shift(start, len, 1); + this._buf[seq] = 0x83; + this._buf[seq + 1] = len >> 16; + this._buf[seq + 2] = len >> 8; + this._buf[seq + 3] = len; + } else { + throw newInvalidAsn1Error('Sequence too long'); + } +}; + + +Writer.prototype._shift = function (start, len, shift) { + assert.ok(start !== undefined); + assert.ok(len !== undefined); + assert.ok(shift); + + this._buf.copy(this._buf, start + shift, start, start + len); + this._offset += shift; +}; + +Writer.prototype._ensure = function (len) { + assert.ok(len); + + if (this._size - this._offset < len) { + var sz = this._size * this._options.growthFactor; + if (sz - this._offset < len) + sz += len; + + var buf = Buffer.alloc(sz); + + this._buf.copy(buf, 0, 0, this._offset); + this._buf = buf; + this._size = sz; + } +}; + + + +// --- Exported API + +module.exports = Writer; diff --git a/packages/字体精简工具/node_modules/asn1/lib/index.js b/packages/字体精简工具/node_modules/asn1/lib/index.js new file mode 100644 index 0000000..ede3ab2 --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/lib/index.js @@ -0,0 +1,20 @@ +// Copyright 2011 Mark Cavage All rights reserved. + +// If you have no idea what ASN.1 or BER is, see this: +// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc + +var Ber = require('./ber/index'); + + + +// --- Exported API + +module.exports = { + + Ber: Ber, + + BerReader: Ber.Reader, + + BerWriter: Ber.Writer + +}; diff --git a/packages/字体精简工具/node_modules/asn1/package.json b/packages/字体精简工具/node_modules/asn1/package.json new file mode 100644 index 0000000..261ce7f --- /dev/null +++ b/packages/字体精简工具/node_modules/asn1/package.json @@ -0,0 +1,75 @@ +{ + "_from": "asn1@~0.2.3", + "_id": "asn1@0.2.4", + "_inBundle": false, + "_integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "_location": "/asn1", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "asn1@~0.2.3", + "name": "asn1", + "escapedName": "asn1", + "rawSpec": "~0.2.3", + "saveSpec": null, + "fetchSpec": "~0.2.3" + }, + "_requiredBy": [ + "/sshpk" + ], + "_resolved": "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", + "_shasum": "8d2475dfab553bb33e77b54e59e880bb8ce23136", + "_spec": "asn1@~0.2.3", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\sshpk", + "author": { + "name": "Joyent", + "url": "joyent.com" + }, + "bugs": { + "url": "https://github.com/joyent/node-asn1/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "David Gwynne", + "email": "loki@animata.net" + }, + { + "name": "Yunong Xiao", + "email": "yunong@joyent.com" + }, + { + "name": "Alex Wilson", + "email": "alex.wilson@joyent.com" + } + ], + "dependencies": { + "safer-buffer": "~2.1.0" + }, + "deprecated": false, + "description": "Contains parsers and serializers for ASN.1 (currently BER only)", + "devDependencies": { + "eslint": "2.13.1", + "eslint-plugin-joyent": "~1.3.0", + "faucet": "0.0.1", + "istanbul": "^0.3.6", + "tape": "^3.5.0" + }, + "homepage": "https://github.com/joyent/node-asn1#readme", + "license": "MIT", + "main": "lib/index.js", + "name": "asn1", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-asn1.git" + }, + "scripts": { + "test": "tape ./test/ber/*.test.js" + }, + "version": "0.2.4" +} diff --git a/packages/字体精简工具/node_modules/assert-plus/AUTHORS b/packages/字体精简工具/node_modules/assert-plus/AUTHORS new file mode 100644 index 0000000..1923524 --- /dev/null +++ b/packages/字体精简工具/node_modules/assert-plus/AUTHORS @@ -0,0 +1,6 @@ +Dave Eddy +Fred Kuo +Lars-Magnus Skog +Mark Cavage +Patrick Mooney +Rob Gulewich diff --git a/packages/字体精简工具/node_modules/assert-plus/CHANGES.md b/packages/字体精简工具/node_modules/assert-plus/CHANGES.md new file mode 100644 index 0000000..57d92bf --- /dev/null +++ b/packages/字体精简工具/node_modules/assert-plus/CHANGES.md @@ -0,0 +1,14 @@ +# assert-plus Changelog + +## 1.0.0 + +- *BREAKING* assert.number (and derivatives) now accept Infinity as valid input +- Add assert.finite check. Previous assert.number callers should use this if + they expect Infinity inputs to throw. + +## 0.2.0 + +- Fix `assert.object(null)` so it throws +- Fix optional/arrayOf exports for non-type-of asserts +- Add optiona/arrayOf exports for Stream/Date/Regex/uuid +- Add basic unit test coverage diff --git a/packages/字体精简工具/node_modules/assert-plus/README.md b/packages/字体精简工具/node_modules/assert-plus/README.md new file mode 100644 index 0000000..ec200d1 --- /dev/null +++ b/packages/字体精简工具/node_modules/assert-plus/README.md @@ -0,0 +1,162 @@ +# assert-plus + +This library is a super small wrapper over node's assert module that has two +things: (1) the ability to disable assertions with the environment variable +NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like +`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks +like this: + +```javascript + var assert = require('assert-plus'); + + function fooAccount(options, callback) { + assert.object(options, 'options'); + assert.number(options.id, 'options.id'); + assert.bool(options.isManager, 'options.isManager'); + assert.string(options.name, 'options.name'); + assert.arrayOfString(options.email, 'options.email'); + assert.func(callback, 'callback'); + + // Do stuff + callback(null, {}); + } +``` + +# API + +All methods that *aren't* part of node's core assert API are simply assumed to +take an argument, and then a string 'name' that's not a message; `AssertionError` +will be thrown if the assertion fails with a message like: + + AssertionError: foo (string) is required + at test (/home/mark/work/foo/foo.js:3:9) + at Object. (/home/mark/work/foo/foo.js:15:1) + at Module._compile (module.js:446:26) + at Object..js (module.js:464:10) + at Module.load (module.js:353:31) + at Function._load (module.js:311:12) + at Array.0 (module.js:484:10) + at EventEmitter._tickCallback (node.js:190:38) + +from: + +```javascript + function test(foo) { + assert.string(foo, 'foo'); + } +``` + +There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`: + +```javascript + function test(foo) { + assert.arrayOfString(foo, 'foo'); + } +``` + +You can assert IFF an argument is not `undefined` (i.e., an optional arg): + +```javascript + assert.optionalString(foo, 'foo'); +``` + +Lastly, you can opt-out of assertion checking altogether by setting the +environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have +lots of assertions, and don't want to pay `typeof ()` taxes to v8 in +production. Be advised: The standard functions re-exported from `assert` are +also disabled in assert-plus if NDEBUG is specified. Using them directly from +the `assert` module avoids this behavior. + +The complete list of APIs is: + +* assert.array +* assert.bool +* assert.buffer +* assert.func +* assert.number +* assert.finite +* assert.object +* assert.string +* assert.stream +* assert.date +* assert.regexp +* assert.uuid +* assert.arrayOfArray +* assert.arrayOfBool +* assert.arrayOfBuffer +* assert.arrayOfFunc +* assert.arrayOfNumber +* assert.arrayOfFinite +* assert.arrayOfObject +* assert.arrayOfString +* assert.arrayOfStream +* assert.arrayOfDate +* assert.arrayOfRegexp +* assert.arrayOfUuid +* assert.optionalArray +* assert.optionalBool +* assert.optionalBuffer +* assert.optionalFunc +* assert.optionalNumber +* assert.optionalFinite +* assert.optionalObject +* assert.optionalString +* assert.optionalStream +* assert.optionalDate +* assert.optionalRegexp +* assert.optionalUuid +* assert.optionalArrayOfArray +* assert.optionalArrayOfBool +* assert.optionalArrayOfBuffer +* assert.optionalArrayOfFunc +* assert.optionalArrayOfNumber +* assert.optionalArrayOfFinite +* assert.optionalArrayOfObject +* assert.optionalArrayOfString +* assert.optionalArrayOfStream +* assert.optionalArrayOfDate +* assert.optionalArrayOfRegexp +* assert.optionalArrayOfUuid +* assert.AssertionError +* assert.fail +* assert.ok +* assert.equal +* assert.notEqual +* assert.deepEqual +* assert.notDeepEqual +* assert.strictEqual +* assert.notStrictEqual +* assert.throws +* assert.doesNotThrow +* assert.ifError + +# Installation + + npm install assert-plus + +## License + +The MIT License (MIT) +Copyright (c) 2012 Mark Cavage + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +## Bugs + +See . diff --git a/packages/字体精简工具/node_modules/assert-plus/assert.js b/packages/字体精简工具/node_modules/assert-plus/assert.js new file mode 100644 index 0000000..26f944e --- /dev/null +++ b/packages/字体精简工具/node_modules/assert-plus/assert.js @@ -0,0 +1,211 @@ +// Copyright (c) 2012, Mark Cavage. All rights reserved. +// Copyright 2015 Joyent, Inc. + +var assert = require('assert'); +var Stream = require('stream').Stream; +var util = require('util'); + + +///--- Globals + +/* JSSTYLED */ +var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/; + + +///--- Internal + +function _capitalize(str) { + return (str.charAt(0).toUpperCase() + str.slice(1)); +} + +function _toss(name, expected, oper, arg, actual) { + throw new assert.AssertionError({ + message: util.format('%s (%s) is required', name, expected), + actual: (actual === undefined) ? typeof (arg) : actual(arg), + expected: expected, + operator: oper || '===', + stackStartFunction: _toss.caller + }); +} + +function _getClass(arg) { + return (Object.prototype.toString.call(arg).slice(8, -1)); +} + +function noop() { + // Why even bother with asserts? +} + + +///--- Exports + +var types = { + bool: { + check: function (arg) { return typeof (arg) === 'boolean'; } + }, + func: { + check: function (arg) { return typeof (arg) === 'function'; } + }, + string: { + check: function (arg) { return typeof (arg) === 'string'; } + }, + object: { + check: function (arg) { + return typeof (arg) === 'object' && arg !== null; + } + }, + number: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg); + } + }, + finite: { + check: function (arg) { + return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg); + } + }, + buffer: { + check: function (arg) { return Buffer.isBuffer(arg); }, + operator: 'Buffer.isBuffer' + }, + array: { + check: function (arg) { return Array.isArray(arg); }, + operator: 'Array.isArray' + }, + stream: { + check: function (arg) { return arg instanceof Stream; }, + operator: 'instanceof', + actual: _getClass + }, + date: { + check: function (arg) { return arg instanceof Date; }, + operator: 'instanceof', + actual: _getClass + }, + regexp: { + check: function (arg) { return arg instanceof RegExp; }, + operator: 'instanceof', + actual: _getClass + }, + uuid: { + check: function (arg) { + return typeof (arg) === 'string' && UUID_REGEXP.test(arg); + }, + operator: 'isUUID' + } +}; + +function _setExports(ndebug) { + var keys = Object.keys(types); + var out; + + /* re-export standard assert */ + if (process.env.NODE_NDEBUG) { + out = noop; + } else { + out = function (arg, msg) { + if (!arg) { + _toss(msg, 'true', arg); + } + }; + } + + /* standard checks */ + keys.forEach(function (k) { + if (ndebug) { + out[k] = noop; + return; + } + var type = types[k]; + out[k] = function (arg, msg) { + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* optional checks */ + keys.forEach(function (k) { + var name = 'optional' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!type.check(arg)) { + _toss(msg, k, type.operator, arg, type.actual); + } + }; + }); + + /* arrayOf checks */ + keys.forEach(function (k) { + var name = 'arrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* optionalArrayOf checks */ + keys.forEach(function (k) { + var name = 'optionalArrayOf' + _capitalize(k); + if (ndebug) { + out[name] = noop; + return; + } + var type = types[k]; + var expected = '[' + k + ']'; + out[name] = function (arg, msg) { + if (arg === undefined || arg === null) { + return; + } + if (!Array.isArray(arg)) { + _toss(msg, expected, type.operator, arg, type.actual); + } + var i; + for (i = 0; i < arg.length; i++) { + if (!type.check(arg[i])) { + _toss(msg, expected, type.operator, arg, type.actual); + } + } + }; + }); + + /* re-export built-in assertions */ + Object.keys(assert).forEach(function (k) { + if (k === 'AssertionError') { + out[k] = assert[k]; + return; + } + if (ndebug) { + out[k] = noop; + return; + } + out[k] = assert[k]; + }); + + /* export ourselves (for unit tests _only_) */ + out._setExports = _setExports; + + return out; +} + +module.exports = _setExports(process.env.NODE_NDEBUG); diff --git a/packages/字体精简工具/node_modules/assert-plus/package.json b/packages/字体精简工具/node_modules/assert-plus/package.json new file mode 100644 index 0000000..406bf03 --- /dev/null +++ b/packages/字体精简工具/node_modules/assert-plus/package.json @@ -0,0 +1,87 @@ +{ + "_from": "assert-plus@^1.0.0", + "_id": "assert-plus@1.0.0", + "_inBundle": false, + "_integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "_location": "/assert-plus", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "assert-plus@^1.0.0", + "name": "assert-plus", + "escapedName": "assert-plus", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/dashdash", + "/getpass", + "/http-signature", + "/jsprim", + "/sshpk", + "/verror" + ], + "_resolved": "https://registry.nlark.com/assert-plus/download/assert-plus-1.0.0.tgz", + "_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525", + "_spec": "assert-plus@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\http-signature", + "author": { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + "bugs": { + "url": "https://github.com/mcavage/node-assert-plus/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Dave Eddy", + "email": "dave@daveeddy.com" + }, + { + "name": "Fred Kuo", + "email": "fred.kuo@joyent.com" + }, + { + "name": "Lars-Magnus Skog", + "email": "ralphtheninja@riseup.net" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com" + }, + { + "name": "Patrick Mooney", + "email": "pmooney@pfmooney.com" + }, + { + "name": "Rob Gulewich", + "email": "robert.gulewich@joyent.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Extra assertions on top of node's assert module", + "devDependencies": { + "faucet": "0.0.1", + "tape": "4.2.2" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/mcavage/node-assert-plus#readme", + "license": "MIT", + "main": "./assert.js", + "name": "assert-plus", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git+https://github.com/mcavage/node-assert-plus.git" + }, + "scripts": { + "test": "tape tests/*.js | ./node_modules/.bin/faucet" + }, + "version": "1.0.0" +} diff --git a/packages/字体精简工具/node_modules/asynckit/LICENSE b/packages/字体精简工具/node_modules/asynckit/LICENSE new file mode 100644 index 0000000..c9eca5d --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/asynckit/README.md b/packages/字体精简工具/node_modules/asynckit/README.md new file mode 100644 index 0000000..ddcc7e6 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/README.md @@ -0,0 +1,233 @@ +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) + +Minimal async jobs utility library, with streams support. + +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) + +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) + + + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/packages/字体精简工具/node_modules/asynckit/bench.js b/packages/字体精简工具/node_modules/asynckit/bench.js new file mode 100644 index 0000000..c612f1a --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/packages/字体精简工具/node_modules/asynckit/index.js b/packages/字体精简工具/node_modules/asynckit/index.js new file mode 100644 index 0000000..455f945 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/packages/字体精简工具/node_modules/asynckit/lib/abort.js b/packages/字体精简工具/node_modules/asynckit/lib/abort.js new file mode 100644 index 0000000..114367e --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/async.js b/packages/字体精简工具/node_modules/asynckit/lib/async.js new file mode 100644 index 0000000..7f1288a --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/defer.js b/packages/字体精简工具/node_modules/asynckit/lib/defer.js new file mode 100644 index 0000000..b67110c --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/iterate.js b/packages/字体精简工具/node_modules/asynckit/lib/iterate.js new file mode 100644 index 0000000..5d2839a --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/readable_asynckit.js b/packages/字体精简工具/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 0000000..78ad240 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/readable_parallel.js b/packages/字体精简工具/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 0000000..5d2929f --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/readable_serial.js b/packages/字体精简工具/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 0000000..7822698 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/readable_serial_ordered.js b/packages/字体精简工具/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 0000000..3de89c4 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/state.js b/packages/字体精简工具/node_modules/asynckit/lib/state.js new file mode 100644 index 0000000..cbea7ad --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/streamify.js b/packages/字体精简工具/node_modules/asynckit/lib/streamify.js new file mode 100644 index 0000000..f56a1c9 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/packages/字体精简工具/node_modules/asynckit/lib/terminator.js b/packages/字体精简工具/node_modules/asynckit/lib/terminator.js new file mode 100644 index 0000000..d6eb992 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/packages/字体精简工具/node_modules/asynckit/package.json b/packages/字体精简工具/node_modules/asynckit/package.json new file mode 100644 index 0000000..6730e68 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/package.json @@ -0,0 +1,91 @@ +{ + "_from": "asynckit@^0.4.0", + "_id": "asynckit@0.4.0", + "_inBundle": false, + "_integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "_location": "/asynckit", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "asynckit@^0.4.0", + "name": "asynckit", + "escapedName": "asynckit", + "rawSpec": "^0.4.0", + "saveSpec": null, + "fetchSpec": "^0.4.0" + }, + "_requiredBy": [ + "/form-data" + ], + "_resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", + "_shasum": "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79", + "_spec": "asynckit@^0.4.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\form-data", + "author": { + "name": "Alex Indigo", + "email": "iam@alexindigo.com" + }, + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Minimal async jobs utility library, with streams support", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "license": "MIT", + "main": "index.js", + "name": "asynckit", + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "scripts": { + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "clean": "rimraf coverage", + "debug": "tape test/test-*.js", + "lint": "eslint *.js lib/*.js test/*.js", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js" + }, + "version": "0.4.0" +} diff --git a/packages/字体精简工具/node_modules/asynckit/parallel.js b/packages/字体精简工具/node_modules/asynckit/parallel.js new file mode 100644 index 0000000..3c50344 --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/packages/字体精简工具/node_modules/asynckit/serial.js b/packages/字体精简工具/node_modules/asynckit/serial.js new file mode 100644 index 0000000..6cd949a --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/packages/字体精简工具/node_modules/asynckit/serialOrdered.js b/packages/字体精简工具/node_modules/asynckit/serialOrdered.js new file mode 100644 index 0000000..607eafe --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/packages/字体精简工具/node_modules/asynckit/stream.js b/packages/字体精简工具/node_modules/asynckit/stream.js new file mode 100644 index 0000000..d43465f --- /dev/null +++ b/packages/字体精简工具/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/packages/字体精简工具/node_modules/aws-sign2/LICENSE b/packages/字体精简工具/node_modules/aws-sign2/LICENSE new file mode 100644 index 0000000..a4a9aee --- /dev/null +++ b/packages/字体精简工具/node_modules/aws-sign2/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/aws-sign2/README.md b/packages/字体精简工具/node_modules/aws-sign2/README.md new file mode 100644 index 0000000..763564e --- /dev/null +++ b/packages/字体精简工具/node_modules/aws-sign2/README.md @@ -0,0 +1,4 @@ +aws-sign +======== + +AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module. diff --git a/packages/字体精简工具/node_modules/aws-sign2/index.js b/packages/字体精简工具/node_modules/aws-sign2/index.js new file mode 100644 index 0000000..fb35f6d --- /dev/null +++ b/packages/字体精简工具/node_modules/aws-sign2/index.js @@ -0,0 +1,212 @@ + +/*! + * Copyright 2010 LearnBoost + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Module dependencies. + */ + +var crypto = require('crypto') + , parse = require('url').parse + ; + +/** + * Valid keys. + */ + +var keys = + [ 'acl' + , 'location' + , 'logging' + , 'notification' + , 'partNumber' + , 'policy' + , 'requestPayment' + , 'torrent' + , 'uploadId' + , 'uploads' + , 'versionId' + , 'versioning' + , 'versions' + , 'website' + ] + +/** + * Return an "Authorization" header value with the given `options` + * in the form of "AWS :" + * + * @param {Object} options + * @return {String} + * @api private + */ + +function authorization (options) { + return 'AWS ' + options.key + ':' + sign(options) +} + +module.exports = authorization +module.exports.authorization = authorization + +/** + * Simple HMAC-SHA1 Wrapper + * + * @param {Object} options + * @return {String} + * @api private + */ + +function hmacSha1 (options) { + return crypto.createHmac('sha1', options.secret).update(options.message).digest('base64') +} + +module.exports.hmacSha1 = hmacSha1 + +/** + * Create a base64 sha1 HMAC for `options`. + * + * @param {Object} options + * @return {String} + * @api private + */ + +function sign (options) { + options.message = stringToSign(options) + return hmacSha1(options) +} +module.exports.sign = sign + +/** + * Create a base64 sha1 HMAC for `options`. + * + * Specifically to be used with S3 presigned URLs + * + * @param {Object} options + * @return {String} + * @api private + */ + +function signQuery (options) { + options.message = queryStringToSign(options) + return hmacSha1(options) +} +module.exports.signQuery= signQuery + +/** + * Return a string for sign() with the given `options`. + * + * Spec: + * + * \n + * \n + * \n + * \n + * [headers\n] + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function stringToSign (options) { + var headers = options.amazonHeaders || '' + if (headers) headers += '\n' + var r = + [ options.verb + , options.md5 + , options.contentType + , options.date ? options.date.toUTCString() : '' + , headers + options.resource + ] + return r.join('\n') +} +module.exports.stringToSign = stringToSign + +/** + * Return a string for sign() with the given `options`, but is meant exclusively + * for S3 presigned URLs + * + * Spec: + * + * \n + * + * + * @param {Object} options + * @return {String} + * @api private + */ + +function queryStringToSign (options){ + return 'GET\n\n\n' + options.date + '\n' + options.resource +} +module.exports.queryStringToSign = queryStringToSign + +/** + * Perform the following: + * + * - ignore non-amazon headers + * - lowercase fields + * - sort lexicographically + * - trim whitespace between ":" + * - join with newline + * + * @param {Object} headers + * @return {String} + * @api private + */ + +function canonicalizeHeaders (headers) { + var buf = [] + , fields = Object.keys(headers) + ; + for (var i = 0, len = fields.length; i < len; ++i) { + var field = fields[i] + , val = headers[field] + , field = field.toLowerCase() + ; + if (0 !== field.indexOf('x-amz')) continue + buf.push(field + ':' + val) + } + return buf.sort().join('\n') +} +module.exports.canonicalizeHeaders = canonicalizeHeaders + +/** + * Perform the following: + * + * - ignore non sub-resources + * - sort lexicographically + * + * @param {String} resource + * @return {String} + * @api private + */ + +function canonicalizeResource (resource) { + var url = parse(resource, true) + , path = url.pathname + , buf = [] + ; + + Object.keys(url.query).forEach(function(key){ + if (!~keys.indexOf(key)) return + var val = '' == url.query[key] ? '' : '=' + encodeURIComponent(url.query[key]) + buf.push(key + val) + }) + + return path + (buf.length ? '?' + buf.sort().join('&') : '') +} +module.exports.canonicalizeResource = canonicalizeResource diff --git a/packages/字体精简工具/node_modules/aws-sign2/package.json b/packages/字体精简工具/node_modules/aws-sign2/package.json new file mode 100644 index 0000000..62675ef --- /dev/null +++ b/packages/字体精简工具/node_modules/aws-sign2/package.json @@ -0,0 +1,50 @@ +{ + "_from": "aws-sign2@~0.7.0", + "_id": "aws-sign2@0.7.0", + "_inBundle": false, + "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "_location": "/aws-sign2", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "aws-sign2@~0.7.0", + "name": "aws-sign2", + "escapedName": "aws-sign2", + "rawSpec": "~0.7.0", + "saveSpec": null, + "fetchSpec": "~0.7.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.nlark.com/aws-sign2/download/aws-sign2-0.7.0.tgz", + "_shasum": "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8", + "_spec": "aws-sign2@~0.7.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\request", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/aws-sign/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "AWS signing. Originally pulled from LearnBoost/knox, maintained as vendor in request, now a standalone module.", + "devDependencies": {}, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/mikeal/aws-sign#readme", + "license": "Apache-2.0", + "main": "index.js", + "name": "aws-sign2", + "optionalDependencies": {}, + "repository": { + "url": "git+https://github.com/mikeal/aws-sign.git" + }, + "version": "0.7.0" +} diff --git a/packages/字体精简工具/node_modules/aws4/.github/FUNDING.yml b/packages/字体精简工具/node_modules/aws4/.github/FUNDING.yml new file mode 100644 index 0000000..b7fdd97 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: mhart diff --git a/packages/字体精简工具/node_modules/aws4/.travis.yml b/packages/字体精简工具/node_modules/aws4/.travis.yml new file mode 100644 index 0000000..178bf31 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +node_js: + - "0.10" + - "0.12" + - "4" + - "6" + - "8" + - "10" + - "12" diff --git a/packages/字体精简工具/node_modules/aws4/LICENSE b/packages/字体精简工具/node_modules/aws4/LICENSE new file mode 100644 index 0000000..4f321e5 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/LICENSE @@ -0,0 +1,19 @@ +Copyright 2013 Michael Hart (michael.hart.au@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/aws4/README.md b/packages/字体精简工具/node_modules/aws4/README.md new file mode 100644 index 0000000..7202e45 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/README.md @@ -0,0 +1,183 @@ +aws4 +---- + +[![Build Status](https://api.travis-ci.org/mhart/aws4.png?branch=master)](https://travis-ci.org/github/mhart/aws4) + +A small utility to sign vanilla Node.js http(s) request options using Amazon's +[AWS Signature Version 4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). + +If you want to sign and send AWS requests in a modern browser, or an environment like [Cloudflare Workers](https://developers.cloudflare.com/workers/), then check out [aws4fetch](https://github.com/mhart/aws4fetch) – otherwise you can also bundle this library for use [in older browsers](./browser). + +The only AWS service that *doesn't* support v4 as of 2020-05-22 is +[SimpleDB](https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API.html) +(it only supports [AWS Signature Version 2](https://github.com/mhart/aws2)). + +It also provides defaults for a number of core AWS headers and +request parameters, making it very easy to query AWS services, or +build out a fully-featured AWS library. + +Example +------- + +```javascript +var https = require('https') +var aws4 = require('aws4') + +// to illustrate usage, we'll create a utility function to request and pipe to stdout +function request(opts) { https.request(opts, function(res) { res.pipe(process.stdout) }).end(opts.body || '') } + +// aws4 will sign an options object as you'd pass to http.request, with an AWS service and region +var opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object', service: 's3', region: 'us-west-1' } + +// aws4.sign() will sign and modify these options, ready to pass to http.request +aws4.sign(opts, { accessKeyId: '', secretAccessKey: '' }) + +// or it can get credentials from process.env.AWS_ACCESS_KEY_ID, etc +aws4.sign(opts) + +// for most AWS services, aws4 can figure out the service and region if you pass a host +opts = { host: 'my-bucket.s3.us-west-1.amazonaws.com', path: '/my-object' } + +// usually it will add/modify request headers, but you can also sign the query: +opts = { host: 'my-bucket.s3.amazonaws.com', path: '/?X-Amz-Expires=12345', signQuery: true } + +// and for services with simple hosts, aws4 can infer the host from service and region: +opts = { service: 'sqs', region: 'us-east-1', path: '/?Action=ListQueues' } + +// and if you're using us-east-1, it's the default: +opts = { service: 'sqs', path: '/?Action=ListQueues' } + +aws4.sign(opts) +console.log(opts) +/* +{ + host: 'sqs.us-east-1.amazonaws.com', + path: '/?Action=ListQueues', + headers: { + Host: 'sqs.us-east-1.amazonaws.com', + 'X-Amz-Date': '20121226T061030Z', + Authorization: 'AWS4-HMAC-SHA256 Credential=ABCDEF/20121226/us-east-1/sqs/aws4_request, ...' + } +} +*/ + +// we can now use this to query AWS +request(opts) +/* + + +... +*/ + +// aws4 can infer the HTTP method if a body is passed in +// method will be POST and Content-Type: 'application/x-www-form-urlencoded; charset=utf-8' +request(aws4.sign({ service: 'iam', body: 'Action=ListGroups&Version=2010-05-08' })) +/* + +... +*/ + +// you can specify any custom option or header as per usual +request(aws4.sign({ + service: 'dynamodb', + region: 'ap-southeast-2', + method: 'POST', + path: '/', + headers: { + 'Content-Type': 'application/x-amz-json-1.0', + 'X-Amz-Target': 'DynamoDB_20120810.ListTables' + }, + body: '{}' +})) +/* +{"TableNames":[]} +... +*/ + +// The raw RequestSigner can be used to generate CodeCommit Git passwords +var signer = new aws4.RequestSigner({ + service: 'codecommit', + host: 'git-codecommit.us-east-1.amazonaws.com', + method: 'GIT', + path: '/v1/repos/MyAwesomeRepo', +}) +var password = signer.getDateTime() + 'Z' + signer.signature() + +// see example.js for examples with other services +``` + +API +--- + +### aws4.sign(requestOptions, [credentials]) + +Calculates and populates any necessary AWS headers and/or request +options on `requestOptions`. Returns `requestOptions` as a convenience for chaining. + +`requestOptions` is an object holding the same options that the Node.js +[http.request](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback) +function takes. + +The following properties of `requestOptions` are used in the signing or +populated if they don't already exist: + +- `hostname` or `host` (will try to be determined from `service` and `region` if not given) +- `method` (will use `'GET'` if not given or `'POST'` if there is a `body`) +- `path` (will use `'/'` if not given) +- `body` (will use `''` if not given) +- `service` (will try to be calculated from `hostname` or `host` if not given) +- `region` (will try to be calculated from `hostname` or `host` or use `'us-east-1'` if not given) +- `signQuery` (to sign the query instead of adding an `Authorization` header, defaults to false) +- `headers['Host']` (will use `hostname` or `host` or be calculated if not given) +- `headers['Content-Type']` (will use `'application/x-www-form-urlencoded; charset=utf-8'` + if not given and there is a `body`) +- `headers['Date']` (used to calculate the signature date if given, otherwise `new Date` is used) + +Your AWS credentials (which can be found in your +[AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) +can be specified in one of two ways: + +- As the second argument, like this: + +```javascript +aws4.sign(requestOptions, { + secretAccessKey: "", + accessKeyId: "", + sessionToken: "" +}) +``` + +- From `process.env`, such as this: + +``` +export AWS_ACCESS_KEY_ID="" +export AWS_SECRET_ACCESS_KEY="" +export AWS_SESSION_TOKEN="" +``` + +(will also use `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` if available) + +The `sessionToken` property and `AWS_SESSION_TOKEN` environment variable are optional for signing +with [IAM STS temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html). + +Installation +------------ + +With [npm](https://www.npmjs.com/) do: + +``` +npm install aws4 +``` + +Can also be used [in the browser](./browser). + +Thanks +------ + +Thanks to [@jed](https://github.com/jed) for his +[dynamo-client](https://github.com/jed/dynamo-client) lib where I first +committed and subsequently extracted this code. + +Also thanks to the +[official Node.js AWS SDK](https://github.com/aws/aws-sdk-js) for giving +me a start on implementing the v4 signature. diff --git a/packages/字体精简工具/node_modules/aws4/aws4.js b/packages/字体精简工具/node_modules/aws4/aws4.js new file mode 100644 index 0000000..b99b319 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/aws4.js @@ -0,0 +1,373 @@ +var aws4 = exports, + url = require('url'), + querystring = require('querystring'), + crypto = require('crypto'), + lru = require('./lru'), + credentialsCache = lru(1000) + +// http://docs.amazonwebservices.com/general/latest/gr/signature-version-4.html + +function hmac(key, string, encoding) { + return crypto.createHmac('sha256', key).update(string, 'utf8').digest(encoding) +} + +function hash(string, encoding) { + return crypto.createHash('sha256').update(string, 'utf8').digest(encoding) +} + +// This function assumes the string has already been percent encoded +function encodeRfc3986(urlEncodedString) { + return urlEncodedString.replace(/[!'()*]/g, function(c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +function encodeRfc3986Full(str) { + return encodeRfc3986(encodeURIComponent(str)) +} + +// A bit of a combination of: +// https://github.com/aws/aws-sdk-java-v2/blob/dc695de6ab49ad03934e1b02e7263abbd2354be0/core/auth/src/main/java/software/amazon/awssdk/auth/signer/internal/AbstractAws4Signer.java#L59 +// https://github.com/aws/aws-sdk-js/blob/18cb7e5b463b46239f9fdd4a65e2ff8c81831e8f/lib/signers/v4.js#L191-L199 +// https://github.com/mhart/aws4fetch/blob/b3aed16b6f17384cf36ea33bcba3c1e9f3bdfefd/src/main.js#L25-L34 +var HEADERS_TO_IGNORE = { + 'authorization': true, + 'connection': true, + 'x-amzn-trace-id': true, + 'user-agent': true, + 'expect': true, + 'presigned-expires': true, + 'range': true, +} + +// request: { path | body, [host], [method], [headers], [service], [region] } +// credentials: { accessKeyId, secretAccessKey, [sessionToken] } +function RequestSigner(request, credentials) { + + if (typeof request === 'string') request = url.parse(request) + + var headers = request.headers = (request.headers || {}), + hostParts = (!this.service || !this.region) && this.matchHost(request.hostname || request.host || headers.Host || headers.host) + + this.request = request + this.credentials = credentials || this.defaultCredentials() + + this.service = request.service || hostParts[0] || '' + this.region = request.region || hostParts[1] || 'us-east-1' + + // SES uses a different domain from the service name + if (this.service === 'email') this.service = 'ses' + + if (!request.method && request.body) + request.method = 'POST' + + if (!headers.Host && !headers.host) { + headers.Host = request.hostname || request.host || this.createHost() + + // If a port is specified explicitly, use it as is + if (request.port) + headers.Host += ':' + request.port + } + if (!request.hostname && !request.host) + request.hostname = headers.Host || headers.host + + this.isCodeCommitGit = this.service === 'codecommit' && request.method === 'GIT' +} + +RequestSigner.prototype.matchHost = function(host) { + var match = (host || '').match(/([^\.]+)\.(?:([^\.]*)\.)?amazonaws\.com(\.cn)?$/) + var hostParts = (match || []).slice(1, 3) + + // ES's hostParts are sometimes the other way round, if the value that is expected + // to be region equals ‘es’ switch them back + // e.g. search-cluster-name-aaaa00aaaa0aaa0aaaaaaa0aaa.us-east-1.es.amazonaws.com + if (hostParts[1] === 'es') + hostParts = hostParts.reverse() + + if (hostParts[1] == 's3') { + hostParts[0] = 's3' + hostParts[1] = 'us-east-1' + } else { + for (var i = 0; i < 2; i++) { + if (/^s3-/.test(hostParts[i])) { + hostParts[1] = hostParts[i].slice(3) + hostParts[0] = 's3' + break + } + } + } + + return hostParts +} + +// http://docs.aws.amazon.com/general/latest/gr/rande.html +RequestSigner.prototype.isSingleRegion = function() { + // Special case for S3 and SimpleDB in us-east-1 + if (['s3', 'sdb'].indexOf(this.service) >= 0 && this.region === 'us-east-1') return true + + return ['cloudfront', 'ls', 'route53', 'iam', 'importexport', 'sts'] + .indexOf(this.service) >= 0 +} + +RequestSigner.prototype.createHost = function() { + var region = this.isSingleRegion() ? '' : '.' + this.region, + subdomain = this.service === 'ses' ? 'email' : this.service + return subdomain + region + '.amazonaws.com' +} + +RequestSigner.prototype.prepareRequest = function() { + this.parsePath() + + var request = this.request, headers = request.headers, query + + if (request.signQuery) { + + this.parsedPath.query = query = this.parsedPath.query || {} + + if (this.credentials.sessionToken) + query['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !query['X-Amz-Expires']) + query['X-Amz-Expires'] = 86400 + + if (query['X-Amz-Date']) + this.datetime = query['X-Amz-Date'] + else + query['X-Amz-Date'] = this.getDateTime() + + query['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256' + query['X-Amz-Credential'] = this.credentials.accessKeyId + '/' + this.credentialString() + query['X-Amz-SignedHeaders'] = this.signedHeaders() + + } else { + + if (!request.doNotModifyHeaders && !this.isCodeCommitGit) { + if (request.body && !headers['Content-Type'] && !headers['content-type']) + headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8' + + if (request.body && !headers['Content-Length'] && !headers['content-length']) + headers['Content-Length'] = Buffer.byteLength(request.body) + + if (this.credentials.sessionToken && !headers['X-Amz-Security-Token'] && !headers['x-amz-security-token']) + headers['X-Amz-Security-Token'] = this.credentials.sessionToken + + if (this.service === 's3' && !headers['X-Amz-Content-Sha256'] && !headers['x-amz-content-sha256']) + headers['X-Amz-Content-Sha256'] = hash(this.request.body || '', 'hex') + + if (headers['X-Amz-Date'] || headers['x-amz-date']) + this.datetime = headers['X-Amz-Date'] || headers['x-amz-date'] + else + headers['X-Amz-Date'] = this.getDateTime() + } + + delete headers.Authorization + delete headers.authorization + } +} + +RequestSigner.prototype.sign = function() { + if (!this.parsedPath) this.prepareRequest() + + if (this.request.signQuery) { + this.parsedPath.query['X-Amz-Signature'] = this.signature() + } else { + this.request.headers.Authorization = this.authHeader() + } + + this.request.path = this.formatPath() + + return this.request +} + +RequestSigner.prototype.getDateTime = function() { + if (!this.datetime) { + var headers = this.request.headers, + date = new Date(headers.Date || headers.date || new Date) + + this.datetime = date.toISOString().replace(/[:\-]|\.\d{3}/g, '') + + // Remove the trailing 'Z' on the timestamp string for CodeCommit git access + if (this.isCodeCommitGit) this.datetime = this.datetime.slice(0, -1) + } + return this.datetime +} + +RequestSigner.prototype.getDate = function() { + return this.getDateTime().substr(0, 8) +} + +RequestSigner.prototype.authHeader = function() { + return [ + 'AWS4-HMAC-SHA256 Credential=' + this.credentials.accessKeyId + '/' + this.credentialString(), + 'SignedHeaders=' + this.signedHeaders(), + 'Signature=' + this.signature(), + ].join(', ') +} + +RequestSigner.prototype.signature = function() { + var date = this.getDate(), + cacheKey = [this.credentials.secretAccessKey, date, this.region, this.service].join(), + kDate, kRegion, kService, kCredentials = credentialsCache.get(cacheKey) + if (!kCredentials) { + kDate = hmac('AWS4' + this.credentials.secretAccessKey, date) + kRegion = hmac(kDate, this.region) + kService = hmac(kRegion, this.service) + kCredentials = hmac(kService, 'aws4_request') + credentialsCache.set(cacheKey, kCredentials) + } + return hmac(kCredentials, this.stringToSign(), 'hex') +} + +RequestSigner.prototype.stringToSign = function() { + return [ + 'AWS4-HMAC-SHA256', + this.getDateTime(), + this.credentialString(), + hash(this.canonicalString(), 'hex'), + ].join('\n') +} + +RequestSigner.prototype.canonicalString = function() { + if (!this.parsedPath) this.prepareRequest() + + var pathStr = this.parsedPath.path, + query = this.parsedPath.query, + headers = this.request.headers, + queryStr = '', + normalizePath = this.service !== 's3', + decodePath = this.service === 's3' || this.request.doNotEncodePath, + decodeSlashesInPath = this.service === 's3', + firstValOnly = this.service === 's3', + bodyHash + + if (this.service === 's3' && this.request.signQuery) { + bodyHash = 'UNSIGNED-PAYLOAD' + } else if (this.isCodeCommitGit) { + bodyHash = '' + } else { + bodyHash = headers['X-Amz-Content-Sha256'] || headers['x-amz-content-sha256'] || + hash(this.request.body || '', 'hex') + } + + if (query) { + var reducedQuery = Object.keys(query).reduce(function(obj, key) { + if (!key) return obj + obj[encodeRfc3986Full(key)] = !Array.isArray(query[key]) ? query[key] : + (firstValOnly ? query[key][0] : query[key]) + return obj + }, {}) + var encodedQueryPieces = [] + Object.keys(reducedQuery).sort().forEach(function(key) { + if (!Array.isArray(reducedQuery[key])) { + encodedQueryPieces.push(key + '=' + encodeRfc3986Full(reducedQuery[key])) + } else { + reducedQuery[key].map(encodeRfc3986Full).sort() + .forEach(function(val) { encodedQueryPieces.push(key + '=' + val) }) + } + }) + queryStr = encodedQueryPieces.join('&') + } + if (pathStr !== '/') { + if (normalizePath) pathStr = pathStr.replace(/\/{2,}/g, '/') + pathStr = pathStr.split('/').reduce(function(path, piece) { + if (normalizePath && piece === '..') { + path.pop() + } else if (!normalizePath || piece !== '.') { + if (decodePath) piece = decodeURIComponent(piece.replace(/\+/g, ' ')) + path.push(encodeRfc3986Full(piece)) + } + return path + }, []).join('/') + if (pathStr[0] !== '/') pathStr = '/' + pathStr + if (decodeSlashesInPath) pathStr = pathStr.replace(/%2F/g, '/') + } + + return [ + this.request.method || 'GET', + pathStr, + queryStr, + this.canonicalHeaders() + '\n', + this.signedHeaders(), + bodyHash, + ].join('\n') +} + +RequestSigner.prototype.canonicalHeaders = function() { + var headers = this.request.headers + function trimAll(header) { + return header.toString().trim().replace(/\s+/g, ' ') + } + return Object.keys(headers) + .filter(function(key) { return HEADERS_TO_IGNORE[key.toLowerCase()] == null }) + .sort(function(a, b) { return a.toLowerCase() < b.toLowerCase() ? -1 : 1 }) + .map(function(key) { return key.toLowerCase() + ':' + trimAll(headers[key]) }) + .join('\n') +} + +RequestSigner.prototype.signedHeaders = function() { + return Object.keys(this.request.headers) + .map(function(key) { return key.toLowerCase() }) + .filter(function(key) { return HEADERS_TO_IGNORE[key] == null }) + .sort() + .join(';') +} + +RequestSigner.prototype.credentialString = function() { + return [ + this.getDate(), + this.region, + this.service, + 'aws4_request', + ].join('/') +} + +RequestSigner.prototype.defaultCredentials = function() { + var env = process.env + return { + accessKeyId: env.AWS_ACCESS_KEY_ID || env.AWS_ACCESS_KEY, + secretAccessKey: env.AWS_SECRET_ACCESS_KEY || env.AWS_SECRET_KEY, + sessionToken: env.AWS_SESSION_TOKEN, + } +} + +RequestSigner.prototype.parsePath = function() { + var path = this.request.path || '/' + + // S3 doesn't always encode characters > 127 correctly and + // all services don't encode characters > 255 correctly + // So if there are non-reserved chars (and it's not already all % encoded), just encode them all + if (/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(path)) { + path = encodeURI(decodeURI(path)) + } + + var queryIx = path.indexOf('?'), + query = null + + if (queryIx >= 0) { + query = querystring.parse(path.slice(queryIx + 1)) + path = path.slice(0, queryIx) + } + + this.parsedPath = { + path: path, + query: query, + } +} + +RequestSigner.prototype.formatPath = function() { + var path = this.parsedPath.path, + query = this.parsedPath.query + + if (!query) return path + + // Services don't support empty query string keys + if (query[''] != null) delete query[''] + + return path + '?' + encodeRfc3986(querystring.stringify(query)) +} + +aws4.RequestSigner = RequestSigner + +aws4.sign = function(request, credentials) { + return new RequestSigner(request, credentials).sign() +} diff --git a/packages/字体精简工具/node_modules/aws4/lru.js b/packages/字体精简工具/node_modules/aws4/lru.js new file mode 100644 index 0000000..333f66a --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/lru.js @@ -0,0 +1,96 @@ +module.exports = function(size) { + return new LruCache(size) +} + +function LruCache(size) { + this.capacity = size | 0 + this.map = Object.create(null) + this.list = new DoublyLinkedList() +} + +LruCache.prototype.get = function(key) { + var node = this.map[key] + if (node == null) return undefined + this.used(node) + return node.val +} + +LruCache.prototype.set = function(key, val) { + var node = this.map[key] + if (node != null) { + node.val = val + } else { + if (!this.capacity) this.prune() + if (!this.capacity) return false + node = new DoublyLinkedNode(key, val) + this.map[key] = node + this.capacity-- + } + this.used(node) + return true +} + +LruCache.prototype.used = function(node) { + this.list.moveToFront(node) +} + +LruCache.prototype.prune = function() { + var node = this.list.pop() + if (node != null) { + delete this.map[node.key] + this.capacity++ + } +} + + +function DoublyLinkedList() { + this.firstNode = null + this.lastNode = null +} + +DoublyLinkedList.prototype.moveToFront = function(node) { + if (this.firstNode == node) return + + this.remove(node) + + if (this.firstNode == null) { + this.firstNode = node + this.lastNode = node + node.prev = null + node.next = null + } else { + node.prev = null + node.next = this.firstNode + node.next.prev = node + this.firstNode = node + } +} + +DoublyLinkedList.prototype.pop = function() { + var lastNode = this.lastNode + if (lastNode != null) { + this.remove(lastNode) + } + return lastNode +} + +DoublyLinkedList.prototype.remove = function(node) { + if (this.firstNode == node) { + this.firstNode = node.next + } else if (node.prev != null) { + node.prev.next = node.next + } + if (this.lastNode == node) { + this.lastNode = node.prev + } else if (node.next != null) { + node.next.prev = node.prev + } +} + + +function DoublyLinkedNode(key, val) { + this.key = key + this.val = val + this.prev = null + this.next = null +} diff --git a/packages/字体精简工具/node_modules/aws4/package.json b/packages/字体精简工具/node_modules/aws4/package.json new file mode 100644 index 0000000..001b554 --- /dev/null +++ b/packages/字体精简工具/node_modules/aws4/package.json @@ -0,0 +1,53 @@ +{ + "_from": "aws4@^1.8.0", + "_id": "aws4@1.11.0", + "_inBundle": false, + "_integrity": "sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=", + "_location": "/aws4", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "aws4@^1.8.0", + "name": "aws4", + "escapedName": "aws4", + "rawSpec": "^1.8.0", + "saveSpec": null, + "fetchSpec": "^1.8.0" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.nlark.com/aws4/download/aws4-1.11.0.tgz", + "_shasum": "d61f46d83b2519250e2784daf5b09479a8b41c59", + "_spec": "aws4@^1.8.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\request", + "author": { + "name": "Michael Hart", + "email": "michael.hart.au@gmail.com", + "url": "https://github.com/mhart" + }, + "bugs": { + "url": "https://github.com/mhart/aws4/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Signs and prepares requests using AWS Signature Version 4", + "devDependencies": { + "mocha": "^2.5.3", + "should": "^8.4.0" + }, + "homepage": "https://github.com/mhart/aws4#readme", + "license": "MIT", + "main": "aws4.js", + "name": "aws4", + "repository": { + "type": "git", + "url": "git+https://github.com/mhart/aws4.git" + }, + "scripts": { + "integration": "node ./test/slow.js", + "test": "mocha ./test/fast.js -R list" + }, + "version": "1.11.0" +} diff --git a/packages/字体精简工具/node_modules/b3b/.npmignore b/packages/字体精简工具/node_modules/b3b/.npmignore new file mode 100644 index 0000000..57ec6c9 --- /dev/null +++ b/packages/字体精简工具/node_modules/b3b/.npmignore @@ -0,0 +1,5 @@ +.DS_Store +npm-debug.log +node_modules/ +build.js +_README.md diff --git a/packages/字体精简工具/node_modules/b3b/README.md b/packages/字体精简工具/node_modules/b3b/README.md new file mode 100644 index 0000000..9cfe746 --- /dev/null +++ b/packages/字体精简工具/node_modules/b3b/README.md @@ -0,0 +1,84 @@ +# b3b + +buffer convert util + +### convert map + +``` +ArrayBuffer -------- Buffer +\ / + \ / + ---- base64 ----- +``` + +### api + +- #### 0 + + - **file**: + + buffer convert util + + - **author**: + + junmer + + - **description**: + + ArrayBuffer / Buffer / base64 convert util + +- #### ab2b (alias: arrayBufferToBuffer ) + convert arrayBuffer to buffer + + - **param**: `ab` { _ArrayBuffer_ } + + arrayBuffer + + - **return**: { _buffer_ } + + buffer + +- #### b2ab (alias: bufferToArrayBuffer ) + convert buffer to arrayBuffer + + - **param**: `buffer` { _buffer_ } + + buffer + + - **return**: { _ArrayBuffer_ } + + arrayBuffer + +- #### a2b (alias: base64ToBuffer ) + convert base64 string to buffer + + - **param**: `str` { _string_ } + + base64 string + + - **return**: { _Buffer_ } + + buffer + +- #### b2a (alias: bufferToBase64 ) + convert buffer to base64 string + + - **param**: `str` { _string|Buffer_ } + + string or buffer + + - **return**: { _string_ } + + base64 string + +- #### b2b (alias: bytesToBase64 ) + convert arraybuffer to base64 string + + - **param**: `ab` { _ArrayBuffer|Array_ } + + ArrayBuffer or Array + + - **return**: { _string_ } + + base64 string + diff --git a/packages/字体精简工具/node_modules/b3b/index.js b/packages/字体精简工具/node_modules/b3b/index.js new file mode 100644 index 0000000..975efca --- /dev/null +++ b/packages/字体精简工具/node_modules/b3b/index.js @@ -0,0 +1,115 @@ +/* * + * @file buffer convert util + * @author junmer + * @description ArrayBuffer / Buffer / base64 convert util + */ + +void 0; // only for doc + +/** + * convert arrayBuffer to buffer + * + * @alias arrayBufferToBuffer + * @param {ArrayBuffer} ab arrayBuffer + * @return {buffer} buffer + */ +function ab2b(ab) { + + var buffer = new Buffer(ab.byteLength); + var view = new Uint8Array(ab); + + for (var i = 0, l = buffer.length; i < l; i++) { + buffer[i] = view[i]; + } + + return buffer; + +} + +/** + * convert buffer to arrayBuffer + * + * @alias bufferToArrayBuffer + * @param {buffer} buffer buffer + * @return {ArrayBuffer} arrayBuffer + */ +function b2ab(buffer) { + + var ab = new ArrayBuffer(buffer.length); + var view = new Uint8Array(ab); + + for (var i = 0, l = buffer.length; i < l; ++i) { + view[i] = buffer[i]; + } + + return ab; + +} + +/** + * convert base64 string to buffer + * + * @alias base64ToBuffer + * @param {string} str base64 string + * @return {Buffer} buffer + */ +function a2b(str) { + return new Buffer(str, 'base64').toString('binary'); +} + +/** + * convert buffer to base64 string + * + * @alias bufferToBase64 + * @param {string|Buffer} str string or buffer + * @return {string} base64 string + */ +function b2a(str) { + var buffer; + + if (str instanceof Buffer) { + buffer = str; + } + else { + buffer = new Buffer(str.toString(), 'binary'); + } + + return buffer.toString('base64'); +} + +/** + * convert arraybuffer to base64 string + * + * @alias bytesToBase64 + * @param {ArrayBuffer|Array} ab ArrayBuffer or Array + * @return {string} base64 string + */ +function b2b(ab) { + + var str = ''; + + if (ab instanceof ArrayBuffer) { + var length = ab.byteLength; + var view = new DataView(ab, 0, length); + for (var i = 0; i < length; i++) { + str += String.fromCharCode(view.getUint8(i, false)); + } + } + else if (ab instanceof Array) { + for (var i = 0, length = ab.length; i < length; i++) { + str += String.fromCharCode(ab[i]); + } + } + + return btoa(str); + +} + +// exports + +exports.b2ab = exports.bufferToArrayBuffer = b2ab; +exports.ab2b = exports.arrayBufferToBuffer = ab2b; +exports.b2a = exports.btoa = exports.bufferToBase64 = b2a; +exports.a2b = exports.atob = exports.base64ToBuffer = a2b; +exports.b2b = exports.bytesToBase64 = b2b; + diff --git a/packages/字体精简工具/node_modules/b3b/package.json b/packages/字体精简工具/node_modules/b3b/package.json new file mode 100644 index 0000000..821df61 --- /dev/null +++ b/packages/字体精简工具/node_modules/b3b/package.json @@ -0,0 +1,56 @@ +{ + "_from": "b3b@0.0.1", + "_id": "b3b@0.0.1", + "_inBundle": false, + "_integrity": "sha1-/2n4pY2JGscysgF15HVGeZdU75s=", + "_location": "/b3b", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "b3b@0.0.1", + "name": "b3b", + "escapedName": "b3b", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" + }, + "_requiredBy": [ + "/fontmin", + "/is-otf", + "/is-ttf" + ], + "_resolved": "https://registry.npm.taobao.org/b3b/download/b3b-0.0.1.tgz", + "_shasum": "ff69f8a58d891ac732b20175e47546799754ef9b", + "_spec": "b3b@0.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\fontmin", + "author": { + "name": "junmer" + }, + "bugs": { + "url": "https://github.com/junmer/b3b/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ArrayBuffer / Buffer / base64 convert util", + "devDependencies": { + "nodoc": "^0.1.1" + }, + "homepage": "https://github.com/junmer/b3b", + "keywords": [ + "ArrayBuffer", + "Buffer", + "base64" + ], + "license": "ISC", + "main": "index.js", + "name": "b3b", + "repository": { + "type": "git", + "url": "git+https://github.com/junmer/b3b.git" + }, + "scripts": { + "build": "node build.js" + }, + "version": "0.0.1" +} diff --git a/packages/字体精简工具/node_modules/balanced-match/.github/FUNDING.yml b/packages/字体精简工具/node_modules/balanced-match/.github/FUNDING.yml new file mode 100644 index 0000000..cea8b16 --- /dev/null +++ b/packages/字体精简工具/node_modules/balanced-match/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: "npm/balanced-match" +patreon: juliangruber diff --git a/packages/字体精简工具/node_modules/balanced-match/LICENSE.md b/packages/字体精简工具/node_modules/balanced-match/LICENSE.md new file mode 100644 index 0000000..2cdc8e4 --- /dev/null +++ b/packages/字体精简工具/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/balanced-match/README.md b/packages/字体精简工具/node_modules/balanced-match/README.md new file mode 100644 index 0000000..d2a48b6 --- /dev/null +++ b/packages/字体精简工具/node_modules/balanced-match/README.md @@ -0,0 +1,97 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## Security contact information + +To report a security vulnerability, please use the +[Tidelift security contact](https://tidelift.com/security). +Tidelift will coordinate the fix and disclosure. + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/balanced-match/index.js b/packages/字体精简工具/node_modules/balanced-match/index.js new file mode 100644 index 0000000..c67a646 --- /dev/null +++ b/packages/字体精简工具/node_modules/balanced-match/index.js @@ -0,0 +1,62 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/packages/字体精简工具/node_modules/balanced-match/package.json b/packages/字体精简工具/node_modules/balanced-match/package.json new file mode 100644 index 0000000..ee9ee59 --- /dev/null +++ b/packages/字体精简工具/node_modules/balanced-match/package.json @@ -0,0 +1,76 @@ +{ + "_from": "balanced-match@^1.0.0", + "_id": "balanced-match@1.0.2", + "_inBundle": false, + "_integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", + "_location": "/balanced-match", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "balanced-match@^1.0.0", + "name": "balanced-match", + "escapedName": "balanced-match", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.nlark.com/balanced-match/download/balanced-match-1.0.2.tgz", + "_shasum": "e83e3a7e3f300b34cb9d87f615fa0cbf357690ee", + "_spec": "balanced-match@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\brace-expansion", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "license": "MIT", + "main": "index.js", + "name": "balanced-match", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "bench": "matcha test/bench.js", + "test": "tape test/test.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/bcrypt-pbkdf/CONTRIBUTING.md b/packages/字体精简工具/node_modules/bcrypt-pbkdf/CONTRIBUTING.md new file mode 100644 index 0000000..401d34e --- /dev/null +++ b/packages/字体精简工具/node_modules/bcrypt-pbkdf/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing + +This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new +changes. Anyone can submit changes. To get started, see the [cr.joyent.us user +guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). +This repo does not use GitHub pull requests. + +See the [Joyent Engineering +Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general +best practices expected in this repository. + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/packages/字体精简工具/node_modules/bcrypt-pbkdf/LICENSE b/packages/字体精简工具/node_modules/bcrypt-pbkdf/LICENSE new file mode 100644 index 0000000..fc58d2a --- /dev/null +++ b/packages/字体精简工具/node_modules/bcrypt-pbkdf/LICENSE @@ -0,0 +1,66 @@ +The Blowfish portions are under the following license: + +Blowfish block cipher for OpenBSD +Copyright 1997 Niels Provos +All rights reserved. + +Implementation advice by David Mazieres . + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The bcrypt_pbkdf portions are under the following license: + +Copyright (c) 2013 Ted Unangst + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + + +Performance improvements (Javascript-specific): + +Copyright 2016, Joyent Inc +Author: Alex Wilson + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/字体精简工具/node_modules/bcrypt-pbkdf/README.md b/packages/字体精简工具/node_modules/bcrypt-pbkdf/README.md new file mode 100644 index 0000000..7551f33 --- /dev/null +++ b/packages/字体精简工具/node_modules/bcrypt-pbkdf/README.md @@ -0,0 +1,45 @@ +Port of the OpenBSD `bcrypt_pbkdf` function to pure Javascript. `npm`-ified +version of [Devi Mandiri's port](https://github.com/devi/tmp/blob/master/js/bcrypt_pbkdf.js), +with some minor performance improvements. The code is copied verbatim (and +un-styled) from Devi's work. + +This product includes software developed by Niels Provos. + +## API + +### `bcrypt_pbkdf.pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds)` + +Derive a cryptographic key of arbitrary length from a given password and salt, +using the OpenBSD `bcrypt_pbkdf` function. This is a combination of Blowfish and +SHA-512. + +See [this article](http://www.tedunangst.com/flak/post/bcrypt-pbkdf) for +further information. + +Parameters: + + * `pass`, a Uint8Array of length `passlen` + * `passlen`, an integer Number + * `salt`, a Uint8Array of length `saltlen` + * `saltlen`, an integer Number + * `key`, a Uint8Array of length `keylen`, will be filled with output + * `keylen`, an integer Number + * `rounds`, an integer Number, number of rounds of the PBKDF to run + +### `bcrypt_pbkdf.hash(sha2pass, sha2salt, out)` + +Calculate a Blowfish hash, given SHA2-512 output of a password and salt. Used as +part of the inner round function in the PBKDF. + +Parameters: + + * `sha2pass`, a Uint8Array of length 64 + * `sha2salt`, a Uint8Array of length 64 + * `out`, a Uint8Array of length 32, will be filled with output + +## License + +This source form is a 1:1 port from the OpenBSD `blowfish.c` and `bcrypt_pbkdf.c`. +As a result, it retains the original copyright and license. The two files are +under slightly different (but compatible) licenses, and are here combined in +one file. For each of the full license texts see `LICENSE`. diff --git a/packages/字体精简工具/node_modules/bcrypt-pbkdf/index.js b/packages/字体精简工具/node_modules/bcrypt-pbkdf/index.js new file mode 100644 index 0000000..b1b5ad4 --- /dev/null +++ b/packages/字体精简工具/node_modules/bcrypt-pbkdf/index.js @@ -0,0 +1,556 @@ +'use strict'; + +var crypto_hash_sha512 = require('tweetnacl').lowlevel.crypto_hash; + +/* + * This file is a 1:1 port from the OpenBSD blowfish.c and bcrypt_pbkdf.c. As a + * result, it retains the original copyright and license. The two files are + * under slightly different (but compatible) licenses, and are here combined in + * one file. + * + * Credit for the actual porting work goes to: + * Devi Mandiri + */ + +/* + * The Blowfish portions are under the following license: + * + * Blowfish block cipher for OpenBSD + * Copyright 1997 Niels Provos + * All rights reserved. + * + * Implementation advice by David Mazieres . + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * The bcrypt_pbkdf portions are under the following license: + * + * Copyright (c) 2013 Ted Unangst + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * Performance improvements (Javascript-specific): + * + * Copyright 2016, Joyent Inc + * Author: Alex Wilson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +// Ported from OpenBSD bcrypt_pbkdf.c v1.9 + +var BLF_J = 0; + +var Blowfish = function() { + this.S = [ + new Uint32Array([ + 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, + 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, + 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, + 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, + 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, + 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, + 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, + 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, + 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, + 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, + 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, + 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, + 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, + 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, + 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, + 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, + 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, + 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, + 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, + 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, + 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, + 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, + 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, + 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, + 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, + 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, + 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, + 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, + 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, + 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, + 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, + 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, + 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, + 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, + 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, + 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, + 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, + 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, + 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, + 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, + 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, + 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, + 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, + 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, + 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, + 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, + 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, + 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, + 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, + 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, + 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, + 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, + 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, + 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, + 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, + 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, + 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, + 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, + 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, + 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, + 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, + 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, + 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, + 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a]), + new Uint32Array([ + 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, + 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, + 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, + 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, + 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, + 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, + 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, + 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, + 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, + 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, + 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, + 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, + 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, + 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, + 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, + 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, + 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, + 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, + 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, + 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, + 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, + 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, + 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, + 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, + 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, + 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, + 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, + 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, + 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, + 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, + 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, + 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, + 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, + 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, + 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, + 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, + 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, + 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, + 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, + 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, + 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, + 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, + 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, + 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, + 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, + 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, + 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, + 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, + 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, + 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, + 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, + 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, + 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, + 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, + 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, + 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, + 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, + 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, + 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, + 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, + 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, + 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, + 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, + 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7]), + new Uint32Array([ + 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, + 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, + 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, + 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, + 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, + 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, + 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, + 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, + 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, + 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, + 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, + 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, + 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, + 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, + 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, + 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, + 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, + 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, + 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, + 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, + 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, + 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, + 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, + 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, + 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, + 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, + 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, + 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, + 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, + 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, + 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, + 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, + 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, + 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, + 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, + 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, + 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, + 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, + 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, + 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, + 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, + 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, + 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, + 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, + 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, + 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, + 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, + 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, + 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, + 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, + 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, + 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, + 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, + 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, + 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, + 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, + 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, + 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, + 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, + 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, + 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, + 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, + 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, + 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0]), + new Uint32Array([ + 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, + 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, + 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, + 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, + 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, + 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, + 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, + 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, + 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, + 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, + 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, + 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, + 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, + 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, + 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, + 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, + 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, + 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, + 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, + 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, + 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, + 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, + 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, + 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, + 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, + 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, + 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, + 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, + 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, + 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, + 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, + 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, + 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, + 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, + 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, + 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, + 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, + 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, + 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, + 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, + 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, + 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, + 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, + 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, + 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, + 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, + 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, + 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, + 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, + 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, + 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, + 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, + 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, + 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, + 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, + 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, + 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, + 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, + 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, + 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, + 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, + 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, + 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, + 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6]) + ]; + this.P = new Uint32Array([ + 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, + 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, + 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, + 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, + 0x9216d5d9, 0x8979fb1b]); +}; + +function F(S, x8, i) { + return (((S[0][x8[i+3]] + + S[1][x8[i+2]]) ^ + S[2][x8[i+1]]) + + S[3][x8[i]]); +}; + +Blowfish.prototype.encipher = function(x, x8) { + if (x8 === undefined) { + x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + } + x[0] ^= this.P[0]; + for (var i = 1; i < 16; i += 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i+1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[17]; + x[1] = t; +}; + +Blowfish.prototype.decipher = function(x) { + var x8 = new Uint8Array(x.buffer); + if (x.byteOffset !== 0) + x8 = x8.subarray(x.byteOffset); + x[0] ^= this.P[17]; + for (var i = 16; i > 0; i -= 2) { + x[1] ^= F(this.S, x8, 0) ^ this.P[i]; + x[0] ^= F(this.S, x8, 4) ^ this.P[i-1]; + } + var t = x[0]; + x[0] = x[1] ^ this.P[0]; + x[1] = t; +}; + +function stream2word(data, databytes){ + var i, temp = 0; + for (i = 0; i < 4; i++, BLF_J++) { + if (BLF_J >= databytes) BLF_J = 0; + temp = (temp << 8) | data[BLF_J]; + } + return temp; +}; + +Blowfish.prototype.expand0state = function(key, keybytes) { + var d = new Uint32Array(2), i, k; + var d8 = new Uint8Array(d.buffer); + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + BLF_J = 0; + + for (i = 0; i < 18; i += 2) { + this.encipher(d, d8); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + this.encipher(d, d8); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } +}; + +Blowfish.prototype.expandstate = function(data, databytes, key, keybytes) { + var d = new Uint32Array(2), i, k; + + for (i = 0, BLF_J = 0; i < 18; i++) { + this.P[i] ^= stream2word(key, keybytes); + } + + for (i = 0, BLF_J = 0; i < 18; i += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.P[i] = d[0]; + this.P[i+1] = d[1]; + } + + for (i = 0; i < 4; i++) { + for (k = 0; k < 256; k += 2) { + d[0] ^= stream2word(data, databytes); + d[1] ^= stream2word(data, databytes); + this.encipher(d); + this.S[i][k] = d[0]; + this.S[i][k+1] = d[1]; + } + } + BLF_J = 0; +}; + +Blowfish.prototype.enc = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.encipher(data.subarray(i*2)); + } +}; + +Blowfish.prototype.dec = function(data, blocks) { + for (var i = 0; i < blocks; i++) { + this.decipher(data.subarray(i*2)); + } +}; + +var BCRYPT_BLOCKS = 8, + BCRYPT_HASHSIZE = 32; + +function bcrypt_hash(sha2pass, sha2salt, out) { + var state = new Blowfish(), + cdata = new Uint32Array(BCRYPT_BLOCKS), i, + ciphertext = new Uint8Array([79,120,121,99,104,114,111,109,97,116,105, + 99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109, + 105,116,101]); //"OxychromaticBlowfishSwatDynamite" + + state.expandstate(sha2salt, 64, sha2pass, 64); + for (i = 0; i < 64; i++) { + state.expand0state(sha2salt, 64); + state.expand0state(sha2pass, 64); + } + + for (i = 0; i < BCRYPT_BLOCKS; i++) + cdata[i] = stream2word(ciphertext, ciphertext.byteLength); + for (i = 0; i < 64; i++) + state.enc(cdata, cdata.byteLength / 8); + + for (i = 0; i < BCRYPT_BLOCKS; i++) { + out[4*i+3] = cdata[i] >>> 24; + out[4*i+2] = cdata[i] >>> 16; + out[4*i+1] = cdata[i] >>> 8; + out[4*i+0] = cdata[i]; + } +}; + +function bcrypt_pbkdf(pass, passlen, salt, saltlen, key, keylen, rounds) { + var sha2pass = new Uint8Array(64), + sha2salt = new Uint8Array(64), + out = new Uint8Array(BCRYPT_HASHSIZE), + tmpout = new Uint8Array(BCRYPT_HASHSIZE), + countsalt = new Uint8Array(saltlen+4), + i, j, amt, stride, dest, count, + origkeylen = keylen; + + if (rounds < 1) + return -1; + if (passlen === 0 || saltlen === 0 || keylen === 0 || + keylen > (out.byteLength * out.byteLength) || saltlen > (1<<20)) + return -1; + + stride = Math.floor((keylen + out.byteLength - 1) / out.byteLength); + amt = Math.floor((keylen + stride - 1) / stride); + + for (i = 0; i < saltlen; i++) + countsalt[i] = salt[i]; + + crypto_hash_sha512(sha2pass, pass, passlen); + + for (count = 1; keylen > 0; count++) { + countsalt[saltlen+0] = count >>> 24; + countsalt[saltlen+1] = count >>> 16; + countsalt[saltlen+2] = count >>> 8; + countsalt[saltlen+3] = count; + + crypto_hash_sha512(sha2salt, countsalt, saltlen + 4); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (i = out.byteLength; i--;) + out[i] = tmpout[i]; + + for (i = 1; i < rounds; i++) { + crypto_hash_sha512(sha2salt, tmpout, tmpout.byteLength); + bcrypt_hash(sha2pass, sha2salt, tmpout); + for (j = 0; j < out.byteLength; j++) + out[j] ^= tmpout[j]; + } + + amt = Math.min(amt, keylen); + for (i = 0; i < amt; i++) { + dest = i * stride + (count - 1); + if (dest >= origkeylen) + break; + key[dest] = out[i]; + } + keylen -= i; + } + + return 0; +}; + +module.exports = { + BLOCKS: BCRYPT_BLOCKS, + HASHSIZE: BCRYPT_HASHSIZE, + hash: bcrypt_hash, + pbkdf: bcrypt_pbkdf +}; diff --git a/packages/字体精简工具/node_modules/bcrypt-pbkdf/package.json b/packages/字体精简工具/node_modules/bcrypt-pbkdf/package.json new file mode 100644 index 0000000..c601b20 --- /dev/null +++ b/packages/字体精简工具/node_modules/bcrypt-pbkdf/package.json @@ -0,0 +1,44 @@ +{ + "_from": "bcrypt-pbkdf@^1.0.0", + "_id": "bcrypt-pbkdf@1.0.2", + "_inBundle": false, + "_integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "_location": "/bcrypt-pbkdf", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bcrypt-pbkdf@^1.0.0", + "name": "bcrypt-pbkdf", + "escapedName": "bcrypt-pbkdf", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/sshpk" + ], + "_resolved": "https://registry.nlark.com/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz", + "_shasum": "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e", + "_spec": "bcrypt-pbkdf@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\sshpk", + "bugs": { + "url": "https://github.com/joyent/node-bcrypt-pbkdf/issues" + }, + "bundleDependencies": false, + "dependencies": { + "tweetnacl": "^0.14.3" + }, + "deprecated": false, + "description": "Port of the OpenBSD bcrypt_pbkdf function to pure JS", + "devDependencies": {}, + "homepage": "https://github.com/joyent/node-bcrypt-pbkdf#readme", + "license": "BSD-3-Clause", + "main": "index.js", + "name": "bcrypt-pbkdf", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-bcrypt-pbkdf.git" + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/bindings/LICENSE.md b/packages/字体精简工具/node_modules/bindings/LICENSE.md new file mode 100644 index 0000000..5a92289 --- /dev/null +++ b/packages/字体精简工具/node_modules/bindings/LICENSE.md @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/bindings/README.md b/packages/字体精简工具/node_modules/bindings/README.md new file mode 100644 index 0000000..5b3e7a8 --- /dev/null +++ b/packages/字体精简工具/node_modules/bindings/README.md @@ -0,0 +1,98 @@ +node-bindings +============= +### Helper module for loading your native module's `.node` file + +This is a helper module for authors of Node.js native addon modules. +It is basically the "swiss army knife" of `require()`ing your native module's +`.node` file. + +Throughout the course of Node's native addon history, addons have ended up being +compiled in a variety of different places, depending on which build tool and which +version of node was used. To make matters worse, now the `gyp` build tool can +produce either a __Release__ or __Debug__ build, each being built into different +locations. + +This module checks _all_ the possible locations that a native addon would be built +at, and returns the first one that loads successfully. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install --save bindings +``` + +Or add it to the `"dependencies"` section of your `package.json` file. + + +Example +------- + +`require()`ing the proper bindings file for the current node version, platform +and architecture is as simple as: + +``` js +var bindings = require('bindings')('binding.node') + +// Use your bindings defined in your C files +bindings.your_c_function() +``` + + +Nice Error Output +----------------- + +When the `.node` file could not be loaded, `node-bindings` throws an Error with +a nice error message telling you exactly what was tried. You can also check the +`err.tries` Array property. + +``` +Error: Could not load the bindings file. Tried: + → /Users/nrajlich/ref/build/binding.node + → /Users/nrajlich/ref/build/Debug/binding.node + → /Users/nrajlich/ref/build/Release/binding.node + → /Users/nrajlich/ref/out/Debug/binding.node + → /Users/nrajlich/ref/Debug/binding.node + → /Users/nrajlich/ref/out/Release/binding.node + → /Users/nrajlich/ref/Release/binding.node + → /Users/nrajlich/ref/build/default/binding.node + → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node + at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13) + at Object. (/Users/nrajlich/ref/lib/ref.js:5:47) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + ... +``` + +The searching for the `.node` file will originate from the first directory in which has a `package.json` file is found. + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/bindings/bindings.js b/packages/字体精简工具/node_modules/bindings/bindings.js new file mode 100644 index 0000000..727413a --- /dev/null +++ b/packages/字体精简工具/node_modules/bindings/bindings.js @@ -0,0 +1,221 @@ +/** + * Module dependencies. + */ + +var fs = require('fs'), + path = require('path'), + fileURLToPath = require('file-uri-to-path'), + join = path.join, + dirname = path.dirname, + exists = + (fs.accessSync && + function(path) { + try { + fs.accessSync(path); + } catch (e) { + return false; + } + return true; + }) || + fs.existsSync || + path.existsSync, + defaults = { + arrow: process.env.NODE_BINDINGS_ARROW || ' → ', + compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled', + platform: process.platform, + arch: process.arch, + nodePreGyp: + 'node-v' + + process.versions.modules + + '-' + + process.platform + + '-' + + process.arch, + version: process.versions.node, + bindings: 'bindings.node', + try: [ + // node-gyp's linked version in the "build" dir + ['module_root', 'build', 'bindings'], + // node-waf and gyp_addon (a.k.a node-gyp) + ['module_root', 'build', 'Debug', 'bindings'], + ['module_root', 'build', 'Release', 'bindings'], + // Debug files, for development (legacy behavior, remove for node v0.9) + ['module_root', 'out', 'Debug', 'bindings'], + ['module_root', 'Debug', 'bindings'], + // Release files, but manually compiled (legacy behavior, remove for node v0.9) + ['module_root', 'out', 'Release', 'bindings'], + ['module_root', 'Release', 'bindings'], + // Legacy from node-waf, node <= 0.4.x + ['module_root', 'build', 'default', 'bindings'], + // Production "Release" buildtype binary (meh...) + ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'], + // node-qbs builds + ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], + ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], + ['module_root', 'addon-build', 'default', 'install-root', 'bindings'], + // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch} + ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings'] + ] + }; + +/** + * The main `bindings()` function loads the compiled bindings for a given module. + * It uses V8's Error API to determine the parent filename that this function is + * being invoked from, which is then used to find the root directory. + */ + +function bindings(opts) { + // Argument surgery + if (typeof opts == 'string') { + opts = { bindings: opts }; + } else if (!opts) { + opts = {}; + } + + // maps `defaults` onto `opts` object + Object.keys(defaults).map(function(i) { + if (!(i in opts)) opts[i] = defaults[i]; + }); + + // Get the module root + if (!opts.module_root) { + opts.module_root = exports.getRoot(exports.getFileName()); + } + + // Ensure the given bindings name ends with .node + if (path.extname(opts.bindings) != '.node') { + opts.bindings += '.node'; + } + + // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035 + var requireFunc = + typeof __webpack_require__ === 'function' + ? __non_webpack_require__ + : require; + + var tries = [], + i = 0, + l = opts.try.length, + n, + b, + err; + + for (; i < l; i++) { + n = join.apply( + null, + opts.try[i].map(function(p) { + return opts[p] || p; + }) + ); + tries.push(n); + try { + b = opts.path ? requireFunc.resolve(n) : requireFunc(n); + if (!opts.path) { + b.path = n; + } + return b; + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND' && + e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && + !/not find/i.test(e.message)) { + throw e; + } + } + } + + err = new Error( + 'Could not locate the bindings file. Tried:\n' + + tries + .map(function(a) { + return opts.arrow + a; + }) + .join('\n') + ); + err.tries = tries; + throw err; +} +module.exports = exports = bindings; + +/** + * Gets the filename of the JavaScript file that invokes this function. + * Used to help find the root directory of a module. + * Optionally accepts an filename argument to skip when searching for the invoking filename + */ + +exports.getFileName = function getFileName(calling_file) { + var origPST = Error.prepareStackTrace, + origSTL = Error.stackTraceLimit, + dummy = {}, + fileName; + + Error.stackTraceLimit = 10; + + Error.prepareStackTrace = function(e, st) { + for (var i = 0, l = st.length; i < l; i++) { + fileName = st[i].getFileName(); + if (fileName !== __filename) { + if (calling_file) { + if (fileName !== calling_file) { + return; + } + } else { + return; + } + } + } + }; + + // run the 'prepareStackTrace' function above + Error.captureStackTrace(dummy); + dummy.stack; + + // cleanup + Error.prepareStackTrace = origPST; + Error.stackTraceLimit = origSTL; + + // handle filename that starts with "file://" + var fileSchema = 'file://'; + if (fileName.indexOf(fileSchema) === 0) { + fileName = fileURLToPath(fileName); + } + + return fileName; +}; + +/** + * Gets the root directory of a module, given an arbitrary filename + * somewhere in the module tree. The "root directory" is the directory + * containing the `package.json` file. + * + * In: /home/nate/node-native-module/lib/index.js + * Out: /home/nate/node-native-module + */ + +exports.getRoot = function getRoot(file) { + var dir = dirname(file), + prev; + while (true) { + if (dir === '.') { + // Avoids an infinite loop in rare cases, like the REPL + dir = process.cwd(); + } + if ( + exists(join(dir, 'package.json')) || + exists(join(dir, 'node_modules')) + ) { + // Found the 'package.json' file or 'node_modules' dir; we're done + return dir; + } + if (prev === dir) { + // Got to the top + throw new Error( + 'Could not find module root given file: "' + + file + + '". Do you have a `package.json` file? ' + ); + } + // Try the parent dir next + prev = dir; + dir = join(dir, '..'); + } +}; diff --git a/packages/字体精简工具/node_modules/bindings/package.json b/packages/字体精简工具/node_modules/bindings/package.json new file mode 100644 index 0000000..928e331 --- /dev/null +++ b/packages/字体精简工具/node_modules/bindings/package.json @@ -0,0 +1,58 @@ +{ + "_from": "bindings@^1.3.0", + "_id": "bindings@1.5.0", + "_inBundle": false, + "_integrity": "sha1-EDU8npRTNLwFEabZCzj7x8nFBN8=", + "_location": "/bindings", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bindings@^1.3.0", + "name": "bindings", + "escapedName": "bindings", + "rawSpec": "^1.3.0", + "saveSpec": null, + "fetchSpec": "^1.3.0" + }, + "_requiredBy": [ + "/chokidar/fsevents", + "/ttf2woff2" + ], + "_resolved": "https://registry.nlark.com/bindings/download/bindings-1.5.0.tgz", + "_shasum": "10353c9e945334bc0511a6d90b38fbc7c9c504df", + "_spec": "bindings@^1.3.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\ttf2woff2", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-bindings/issues" + }, + "bundleDependencies": false, + "dependencies": { + "file-uri-to-path": "1.0.0" + }, + "deprecated": false, + "description": "Helper module for loading your native module's .node file", + "homepage": "https://github.com/TooTallNate/node-bindings", + "keywords": [ + "native", + "addon", + "bindings", + "gyp", + "waf", + "c", + "c++" + ], + "license": "MIT", + "main": "./bindings.js", + "name": "bindings", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-bindings.git" + }, + "version": "1.5.0" +} diff --git a/packages/字体精简工具/node_modules/brace-expansion/LICENSE b/packages/字体精简工具/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000..de32266 --- /dev/null +++ b/packages/字体精简工具/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/brace-expansion/README.md b/packages/字体精简工具/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..6b4e0e1 --- /dev/null +++ b/packages/字体精简工具/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/brace-expansion/index.js b/packages/字体精简工具/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..0478be8 --- /dev/null +++ b/packages/字体精简工具/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/packages/字体精简工具/node_modules/brace-expansion/package.json b/packages/字体精简工具/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..fce5172 --- /dev/null +++ b/packages/字体精简工具/node_modules/brace-expansion/package.json @@ -0,0 +1,75 @@ +{ + "_from": "brace-expansion@^1.1.7", + "_id": "brace-expansion@1.1.11", + "_inBundle": false, + "_integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "_location": "/brace-expansion", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "brace-expansion@^1.1.7", + "name": "brace-expansion", + "escapedName": "brace-expansion", + "rawSpec": "^1.1.7", + "saveSpec": null, + "fetchSpec": "^1.1.7" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", + "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", + "_spec": "brace-expansion@^1.1.7", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "bundleDependencies": false, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "deprecated": false, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "name": "brace-expansion", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.11" +} diff --git a/packages/字体精简工具/node_modules/buffer-equal/.travis.yml b/packages/字体精简工具/node_modules/buffer-equal/.travis.yml new file mode 100644 index 0000000..dad2273 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/packages/字体精简工具/node_modules/buffer-equal/LICENSE b/packages/字体精简工具/node_modules/buffer-equal/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/buffer-equal/README.markdown b/packages/字体精简工具/node_modules/buffer-equal/README.markdown new file mode 100644 index 0000000..8c062fd --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/README.markdown @@ -0,0 +1,62 @@ +buffer-equal +============ + +Return whether two buffers are equal. + +[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal) + +example +======= + +``` js +var bufferEqual = require('buffer-equal'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); +``` + +output: + +``` +true +false +undefined +``` + +methods +======= + +``` js +var bufferEqual = require('buffer-equal') +``` + +bufferEqual(a, b) +----------------- + +Return whether the two buffers `a` and `b` are equal. + +If `a` or `b` is not a buffer, return `undefined`. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install buffer-equal +``` + +license +======= + +MIT diff --git a/packages/字体精简工具/node_modules/buffer-equal/example/eq.js b/packages/字体精简工具/node_modules/buffer-equal/example/eq.js new file mode 100644 index 0000000..1eb0509 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/example/eq.js @@ -0,0 +1,14 @@ +var bufferEqual = require('../'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); diff --git a/packages/字体精简工具/node_modules/buffer-equal/index.js b/packages/字体精简工具/node_modules/buffer-equal/index.js new file mode 100644 index 0000000..e640d4e --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/index.js @@ -0,0 +1,14 @@ +var Buffer = require('buffer').Buffer; // for use with browserify + +module.exports = function (a, b) { + if (!Buffer.isBuffer(a)) return undefined; + if (!Buffer.isBuffer(b)) return undefined; + if (typeof a.equals === 'function') return a.equals(b); + if (a.length !== b.length) return false; + + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + + return true; +}; diff --git a/packages/字体精简工具/node_modules/buffer-equal/package.json b/packages/字体精简工具/node_modules/buffer-equal/package.json new file mode 100644 index 0000000..3a81931 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/package.json @@ -0,0 +1,62 @@ +{ + "_from": "buffer-equal@^1.0.0", + "_id": "buffer-equal@1.0.0", + "_inBundle": false, + "_integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "_location": "/buffer-equal", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-equal@^1.0.0", + "name": "buffer-equal", + "escapedName": "buffer-equal", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/append-buffer" + ], + "_resolved": "https://registry.npm.taobao.org/buffer-equal/download/buffer-equal-1.0.0.tgz", + "_shasum": "59616b498304d556abd466966b22eeda3eca5fbe", + "_spec": "buffer-equal@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\append-buffer", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-buffer-equal/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "return whether two buffers are equal", + "devDependencies": { + "tap": "0.2.4" + }, + "directories": { + "example": "example", + "test": "test" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/substack/node-buffer-equal#readme", + "keywords": [ + "buffer", + "equal" + ], + "license": "MIT", + "main": "index.js", + "name": "buffer-equal", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-buffer-equal.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.0" +} diff --git a/packages/字体精简工具/node_modules/buffer-equal/test/eq.js b/packages/字体精简工具/node_modules/buffer-equal/test/eq.js new file mode 100644 index 0000000..3d34006 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-equal/test/eq.js @@ -0,0 +1,35 @@ +var bufferEqual = require('../'); +var test = require('tap').test; + +test('equal', function (t) { + var eq = bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) + ); + t.strictEqual(eq, true); + t.end(); +}); + +test('not equal', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + new Buffer('abcd') + ); + t.strictEqual(eq, false); + t.end(); +}); + +test('not equal not buffer', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + 'abc' + ); + t.strictEqual(eq, undefined); + t.end(); +}); + +test('equal not buffer', function (t) { + var eq = bufferEqual('abc', 'abc'); + t.strictEqual(eq, undefined); + t.end(); +}); diff --git a/packages/字体精简工具/node_modules/buffer-from/LICENSE b/packages/字体精简工具/node_modules/buffer-from/LICENSE new file mode 100644 index 0000000..e4bf1d6 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-from/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/buffer-from/index.js b/packages/字体精简工具/node_modules/buffer-from/index.js new file mode 100644 index 0000000..d92a83d --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-from/index.js @@ -0,0 +1,69 @@ +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom diff --git a/packages/字体精简工具/node_modules/buffer-from/package.json b/packages/字体精简工具/node_modules/buffer-from/package.json new file mode 100644 index 0000000..b108ee9 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-from/package.json @@ -0,0 +1,53 @@ +{ + "_from": "buffer-from@^1.0.0", + "_id": "buffer-from@1.1.1", + "_inBundle": false, + "_integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=", + "_location": "/buffer-from", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-from@^1.0.0", + "name": "buffer-from", + "escapedName": "buffer-from", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/concat-stream", + "/source-map-support" + ], + "_resolved": "https://registry.nlark.com/buffer-from/download/buffer-from-1.1.1.tgz", + "_shasum": "32713bc028f75c02fdb710d7c7bcec1f2c6070ef", + "_spec": "buffer-from@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\concat-stream", + "bugs": { + "url": "https://github.com/LinusU/buffer-from/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.", + "devDependencies": { + "standard": "^7.1.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-from#readme", + "keywords": [ + "buffer", + "buffer from" + ], + "license": "MIT", + "name": "buffer-from", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-from.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.1.1" +} diff --git a/packages/字体精简工具/node_modules/buffer-from/readme.md b/packages/字体精简工具/node_modules/buffer-from/readme.md new file mode 100644 index 0000000..9880a55 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-from/readme.md @@ -0,0 +1,69 @@ +# Buffer From + +A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. + +## Installation + +```sh +npm install --save buffer-from +``` + +## Usage + +```js +const bufferFrom = require('buffer-from') + +console.log(bufferFrom([1, 2, 3, 4])) +//=> + +const arr = new Uint8Array([1, 2, 3, 4]) +console.log(bufferFrom(arr.buffer, 1, 2)) +//=> + +console.log(bufferFrom('test', 'utf8')) +//=> + +const buf = bufferFrom('test') +console.log(bufferFrom(buf)) +//=> +``` + +## API + +### bufferFrom(array) + +- `array` <Array> + +Allocates a new `Buffer` using an `array` of octets. + +### bufferFrom(arrayBuffer[, byteOffset[, length]]) + +- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer +- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` +- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a TypedArray instance, the +newly created `Buffer` will share the same allocated memory as the TypedArray. + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +### bufferFrom(buffer) + +- `buffer` <Buffer> An existing `Buffer` to copy data from + +Copies the passed `buffer` data onto a new `Buffer` instance. + +### bufferFrom(string[, encoding]) + +- `string` <String> A string to encode. +- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `string`. If +provided, the `encoding` parameter identifies the character encoding of +`string`. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/packages/字体精简工具/node_modules/buffer-to-vinyl/index.js b/packages/字体精简工具/node_modules/buffer-to-vinyl/index.js new file mode 100644 index 0000000..2549ce7 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-to-vinyl/index.js @@ -0,0 +1,20 @@ +'use strict'; +var fileType = require('file-type'); +var PassThrough = require('readable-stream/passthrough'); +var uuid = require('uuid'); +var Vinyl = require('vinyl'); + +module.exports.file = function (buf, name) { + var ext = fileType(buf) ? '.' + fileType(buf).ext : null; + + return new Vinyl({ + contents: buf, + path: (name || uuid.v4()) + (ext || '') + }); +}; + +module.exports.stream = function (buf, name) { + var stream = new PassThrough({objectMode: true}); + stream.end(module.exports.file(buf, name)); + return stream; +}; diff --git a/packages/字体精简工具/node_modules/buffer-to-vinyl/license b/packages/字体精简工具/node_modules/buffer-to-vinyl/license new file mode 100644 index 0000000..a8ecbbe --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-to-vinyl/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/buffer-to-vinyl/package.json b/packages/字体精简工具/node_modules/buffer-to-vinyl/package.json new file mode 100644 index 0000000..734d232 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-to-vinyl/package.json @@ -0,0 +1,65 @@ +{ + "_from": "buffer-to-vinyl@^1.0.0", + "_id": "buffer-to-vinyl@1.1.0", + "_inBundle": false, + "_integrity": "sha1-APFfruOreh3aLN5tkSG//dB7ImI=", + "_location": "/buffer-to-vinyl", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-to-vinyl@^1.0.0", + "name": "buffer-to-vinyl", + "escapedName": "buffer-to-vinyl", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/fontmin" + ], + "_resolved": "https://registry.npm.taobao.org/buffer-to-vinyl/download/buffer-to-vinyl-1.1.0.tgz", + "_shasum": "00f15faee3ab7a1dda2cde6d9121bffdd07b2262", + "_spec": "buffer-to-vinyl@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\fontmin", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/buffer-to-vinyl/issues" + }, + "bundleDependencies": false, + "dependencies": { + "file-type": "^3.1.0", + "readable-stream": "^2.0.2", + "uuid": "^2.0.1", + "vinyl": "^1.0.0" + }, + "deprecated": false, + "description": "Create a vinyl file or stream from a buffer", + "devDependencies": { + "ava": "^0.0.4", + "concat-stream": "^1.4.7", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/buffer-to-vinyl#readme", + "keywords": [], + "license": "MIT", + "name": "buffer-to-vinyl", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/buffer-to-vinyl.git" + }, + "scripts": { + "test": "xo && node test.js" + }, + "version": "1.1.0" +} diff --git a/packages/字体精简工具/node_modules/buffer-to-vinyl/readme.md b/packages/字体精简工具/node_modules/buffer-to-vinyl/readme.md new file mode 100644 index 0000000..585db14 --- /dev/null +++ b/packages/字体精简工具/node_modules/buffer-to-vinyl/readme.md @@ -0,0 +1,37 @@ +# buffer-to-vinyl [![Build Status](http://img.shields.io/travis/kevva/buffer-to-vinyl.svg?style=flat)](https://travis-ci.org/kevva/buffer-to-vinyl) + +> Create a vinyl file or stream from a buffer + + +## Install + +``` +$ npm install --save buffer-to-vinyl +``` + + +## Usage + +```js +var bufferToVinyl = require('buffer-to-vinyl'); +var fs = require('fs'); + +bufferToVinyl.file(fs.readFileSync('foo.jpg', null)); +bufferToVinyl.stream(fs.readFileSync('foo.jpg', null)); +``` + + +## API + +### .file(buf, [name]) + +Creates a vinyl file. + +### .stream(buf, [name]) + +Creates a object stream. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/packages/字体精简工具/node_modules/bufferstreams/CHANGELOG.md b/packages/字体精简工具/node_modules/bufferstreams/CHANGELOG.md new file mode 100644 index 0000000..279e31a --- /dev/null +++ b/packages/字体精简工具/node_modules/bufferstreams/CHANGELOG.md @@ -0,0 +1,82 @@ + +## [2.0.1](https://github.com/nfroidure/BufferStreams/compare/v2.0.0...v2.0.1) (2018-04-23) + + +### Bug Fixes + +* Remove debug dependency ([2719573](https://github.com/nfroidure/BufferStreams/commit/2719573)) + + + + +# [2.0.0](https://github.com/nfroidure/BufferStreams/compare/v1.1.1...v2.0.0) (2017-12-06) + + +### build + +* **metapak-nfroidure:** Add metapak-nfroidure ([ed104f6](https://github.com/nfroidure/BufferStreams/commit/ed104f6)) + + +### BREAKING CHANGES + +* **metapak-nfroidure:** Removing support for versions minors to the last LTS + + + +## Change Log + +### upcoming (2017/03/05 07:36 +00:00) +- [f1bea6b](https://github.com/nfroidure/bufferstreams/commit/f1bea6bc9ad1c013457b9b9137f6dae70e9cab6b) Add Node 4-6-7 (@nfroidure) + +### v1.1.1 (2016/06/28 11:20 +00:00) +- [acd1875](https://github.com/nfroidure/bufferstreams/commit/acd18756a3066c72b4cff8aa79aa44a3dcb4f85f) 1.1.1 (@shinnn) +- [4fc64b9](https://github.com/nfroidure/bufferstreams/commit/4fc64b9be16693e59920b976d4822adf52ec6f3d) Use wider badges to fit modern Github design (@shinnn) +- [2b28391](https://github.com/nfroidure/bufferstreams/commit/2b2839191eec654af9361fc654d430f69bc6d622) Fix invalid license statement in package.json (@shinnn) +- [e330151](https://github.com/nfroidure/bufferstreams/commit/e330151fd994b90d4383e2e189f18f628c3c1157) Fix file mode (@shinnn) +- [#4](https://github.com/nfroidure/bufferstreams/pull/4) Use files field instead of .npmignore (@shinnn) +- [d7435e5](https://github.com/nfroidure/bufferstreams/commit/d7435e5729b4684492e746d015bbfee39ac564dc) Use files field instead of .npmignore (@shinnn) + +### v1.1.0 (2015/08/04 09:48 +00:00) +- [8b3f905](https://github.com/nfroidure/bufferstreams/commit/8b3f9058764b4ff8095df90eea55ea7683d3ee33) 1.1.0 (@nfroidure) +- [e7a4854](https://github.com/nfroidure/bufferstreams/commit/e7a4854d032682593851e20c20ac0b63587594d7) Better doc (@nfroidure) +- [0567b10](https://github.com/nfroidure/bufferstreams/commit/0567b10f2a8cc6ddb1eada72a9178533b1fa1dd2) Also build on Node 0.12 (@nfroidure) +- [92cd9de](https://github.com/nfroidure/bufferstreams/commit/92cd9de1752cbb70d403c4fbbee0532e762bf3e1) Dependencies update (@nfroidure) +- [5bc3649](https://github.com/nfroidure/bufferstreams/commit/5bc3649e1c8f58505cad3393cbf67c47581dac13) Better handling of errors (@nfroidure) +- [1ca6222](https://github.com/nfroidure/bufferstreams/commit/1ca6222b488072004305156c94a388c100df6fc7) Code cleanup and backward compatibility (@nfroidure) +- [999b805](https://github.com/nfroidure/bufferstreams/commit/999b805be2007b5a1100f9cdbf0f911aa667afab) Using Duplex stream instead of Transform one (@nfroidure) +- [77051e3](https://github.com/nfroidure/bufferstreams/commit/77051e330e82931acf3fb4c4b0b4f24aa4ae13de) Add tests for callback error emitting (@nfroidure) +- [6475b82](https://github.com/nfroidure/bufferstreams/commit/6475b820cbc5a80f4e98bea86cdda3acc6ec7743) Adding linter and suppress warnings (@nfroidure) +- [8d24a90](https://github.com/nfroidure/bufferstreams/commit/8d24a90bf5b91c1185f5c5f00cc32a4b65fc9fc5) Improving the README file (@nfroidure) +- [d5ab44e](https://github.com/nfroidure/bufferstreams/commit/d5ab44e5ddeaddd73744158d046eb71b2fb29fb6) Add stats (@nfroidure) + +### v1.0.2 (2015/06/21 07:11 +00:00) +- [8aaf7a5](https://github.com/nfroidure/bufferstreams/commit/8aaf7a576177d3c2c1e626d8bfba091d47d7cea3) 1.0.2 (@nfroidure) +- [fe52a06](https://github.com/nfroidure/bufferstreams/commit/fe52a06f252b161676f722624e74e9290b845320) Fix trinity script (@nfroidure) +- [d512161](https://github.com/nfroidure/bufferstreams/commit/d5121614d055a63fca0072ebfc360fc17f8e04aa) Dependencies update (@nfroidure) +- [48687ed](https://github.com/nfroidure/bufferstreams/commit/48687ed86eea5262693bb9b11097003bc0985b19) Merge branch 'master' of github.com:nfroidure/bufferstreams (@nfroidure) +- [#3](https://github.com/nfroidure/bufferstreams/pull/3) Use SVG-based badges (@shinnn) +- [88eccc5](https://github.com/nfroidure/bufferstreams/commit/88eccc50275e9317cba820a72f69f611c69cf3ab) Use SVG-based badges (@shinnn) +- [a2875b3](https://github.com/nfroidure/bufferstreams/commit/a2875b323ec90b0d4d7afb60186a07c9f60f9350) Simplify test scripts (@shinnn) + +### v1.0.1 (2015/02/09 17:57 +00:00) +- [7d4c975](https://github.com/nfroidure/bufferstreams/commit/7d4c975accd17ea382845d93e11761ad8c364534) 1.0.1 (@nfroidure) +- [6027553](https://github.com/nfroidure/bufferstreams/commit/602755373fd77d9ca34248b2ba106bcd57e49dce) Update deps (@nfroidure) + +### v1.0.0 (2015/02/09 17:49 +00:00) +- [438812d](https://github.com/nfroidure/bufferstreams/commit/438812dc9e6ecfbc7bd184503a341b0627aa9bf6) 1.0.0 (@nfroidure) +- [01859b0](https://github.com/nfroidure/bufferstreams/commit/01859b0b32a8bb630d97aec3e01dac9148fd7b17) Documenting objectMode (@nfroidure) +- [d3cac8d](https://github.com/nfroidure/bufferstreams/commit/d3cac8dab9a8d6f8275e82eedfafe929b156c258) Fixing tests (@nfroidure) +- [d7ae39a](https://github.com/nfroidure/bufferstreams/commit/d7ae39a4bab7f77a93cde5993f8da703e21db0f0) Adding code climate metrics badge (@nfroidure) +- [677f394](https://github.com/nfroidure/bufferstreams/commit/677f394d68a49afd6a24865a111c061985f8739f) Allowing objectMode, adding a better test lib and 100% coveraging (@nfroidure) +- [1bf9b40](https://github.com/nfroidure/bufferstreams/commit/1bf9b404b47c801387867b9a3614041c5285cfe2) New version 0.0.2 (@nfroidure) +- [17723e2](https://github.com/nfroidure/bufferstreams/commit/17723e212599d3a6dd582980b98331c0651a93ea) Added readable-stream closes#1 (@nfroidure) +- [51545c3](https://github.com/nfroidure/bufferstreams/commit/51545c3e26b26315c17b17bb9a09986b39a538bf) Accept forgiving new (@nfroidure) +- [8d87f57](https://github.com/nfroidure/bufferstreams/commit/8d87f576047d65b2a86680df4d4a6469202d96e1) Dependencies update (@nfroidure) +- [3a1408f](https://github.com/nfroidure/bufferstreams/commit/3a1408fd7886a0dd5f1edf357d4c2373521ae032) Added deps (@nfroidure) +- [38f0690](https://github.com/nfroidure/bufferstreams/commit/38f06902efe745a9cbf648fe6634a2c78c18a544) Added coverage tests (@nfroidure) +- [2a631d6](https://github.com/nfroidure/bufferstreams/commit/2a631d66a41547e32f79dcba2ffe164d3f890bf9) Typo fix (@nfroidure) +- [7ce57c9](https://github.com/nfroidure/bufferstreams/commit/7ce57c96aa95a24038442026b318f98ee5e9318e) Fixing npm badge (@nfroidure) +- [c6d7b48](https://github.com/nfroidure/bufferstreams/commit/c6d7b486bc537b57997dd329966d53a216f30bff) Adding npm badge (@nfroidure) +- [bfbca40](https://github.com/nfroidure/bufferstreams/commit/bfbca40112d3341989961a7ddbed838d2620b8e2) Adding instructions, fixing naming (@nfroidure) +- [1a531c7](https://github.com/nfroidure/bufferstreams/commit/1a531c78b79642c76bcdd09aa0262342833e6203) Readme updated (@nfroidure) +- [b0e1be8](https://github.com/nfroidure/bufferstreams/commit/b0e1be875aa9583ed44b2f1e9c74d050ef777ebb) First commit (@nfroidure) \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/bufferstreams/LICENSE b/packages/字体精简工具/node_modules/bufferstreams/LICENSE new file mode 100644 index 0000000..df9966e --- /dev/null +++ b/packages/字体精简工具/node_modules/bufferstreams/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright © 2017 Nicolas Froidure + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/bufferstreams/README.md b/packages/字体精简工具/node_modules/bufferstreams/README.md new file mode 100644 index 0000000..6d624ca --- /dev/null +++ b/packages/字体精简工具/node_modules/bufferstreams/README.md @@ -0,0 +1,102 @@ +[//]: # ( ) +[//]: # (This file is automatically generated by a `metapak`) +[//]: # (module. Do not change it except between the) +[//]: # (`content:start/end` flags, your changes would) +[//]: # (be overridden.) +[//]: # ( ) +# bufferstreams +> Abstract streams to deal with the whole buffered contents. + +[![NPM version](https://badge.fury.io/js/bufferstreams.svg)](https://npmjs.org/package/bufferstreams) +[![Build status](https://secure.travis-ci.org/nfroidure/bufferstreams.svg)](https://travis-ci.org/nfroidure/bufferstreams) +[![Dependency Status](https://david-dm.org/nfroidure/bufferstreams.svg)](https://david-dm.org/nfroidure/bufferstreams) +[![devDependency Status](https://david-dm.org/nfroidure/bufferstreams/dev-status.svg)](https://david-dm.org/nfroidure/bufferstreams#info=devDependencies) +[![Coverage Status](https://coveralls.io/repos/nfroidure/bufferstreams/badge.svg?branch=master)](https://coveralls.io/r/nfroidure/bufferstreams?branch=master) +[![Code Climate](https://codeclimate.com/github/nfroidure/bufferstreams.svg)](https://codeclimate.com/github/nfroidure/bufferstreams) +[![Dependency Status](https://dependencyci.com/github/nfroidure/bufferstreams/badge)](https://dependencyci.com/github/nfroidure/bufferstreams) + + +[//]: # (::contents:start) + +`bufferstreams` abstracts streams to allow you to deal with their whole content + in a single buffer when it becomes necessary (by example: a legacy library that + do not support streams). + +It is not a good practice, just some glue. Using `bufferstreams` means: +* there is no library dealing with streams for your needs +* you filled an issue to the wrapped library to support streams + +`bufferstreams` can also be used to control the whole stream content in a single + point of a streaming pipeline for testing purposes. + +## Usage +Install the [npm module](https://npmjs.org/package/bufferstreams): +```sh +npm install bufferstreams --save +``` +Then, in your scripts: +```js +var fs = require('fs'); +var bufferstreams = require('bufferstreams'); + +fs.createReadStream('input.txt') + .pipe(new bufferstreams(function(err, buf, cb) { + + // err will be filled with an error if the piped in stream emits one. + if(err) { + throw err; + } + + // buf will contain the whole piped in stream contents + buf = Buffer(buf.toString('utf-8').replace('foo', 'bar')); + + // cb is a callback to pass the result back to the piped out stream + // first argument is an error that will be emitted if any + // the second argument is the modified buffer + cb(null, buf); + + })) + .pipe(fs.createWriteStream('output.txt')); +``` + +Note that you can use `bufferstreams` with the objectMode option. In this case, + the given buffer will be an array containing the streamed objects: +```js +new BufferStreams({objectMode: true}, myCallback); +``` + +## API + +### Stream : BufferStreams([options], callback) + +#### options + +##### options.objectMode +Type: `Boolean` +Default value: `false` + +Use if piped in streams are in object mode. In this case, an array of the + buffered will be transmitted to the `callback` function. + +##### options.* + +`bufferstreams` inherits of Stream.Duplex, the options are passed to the + parent constructor so you can use it's options too. + +##### callback(err, buf, cb) +Type: `Function`, required. + +A function to handle the buffered content. + +## Stats + +[![NPM](https://nodei.co/npm/bufferstreams.png?downloads=true&stars=true)](https://nodei.co/npm/bufferstreams/) +[![NPM](https://nodei.co/npm-dl/bufferstreams.png)](https://nodei.co/npm/bufferstreams/) + +## Contributing +Feel free to pull your code if you agree with publishing it under the MIT license. + +[//]: # (::contents:end) + +# License +[MIT](https://github.com/nfroidure/bufferstreams/blob/master/LICENSE) diff --git a/packages/字体精简工具/node_modules/bufferstreams/package.json b/packages/字体精简工具/node_modules/bufferstreams/package.json new file mode 100644 index 0000000..d667f4e --- /dev/null +++ b/packages/字体精简工具/node_modules/bufferstreams/package.json @@ -0,0 +1,121 @@ +{ + "_from": "bufferstreams@^2.0.1", + "_id": "bufferstreams@2.0.1", + "_inBundle": false, + "_integrity": "sha1-RBsmfC/D/uArsdkpKJ2hE5A71e8=", + "_location": "/bufferstreams", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bufferstreams@^2.0.1", + "name": "bufferstreams", + "escapedName": "bufferstreams", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/ttf2woff2" + ], + "_resolved": "https://registry.npm.taobao.org/bufferstreams/download/bufferstreams-2.0.1.tgz", + "_shasum": "441b267c2fc3fee02bb1d929289da113903bd5ef", + "_spec": "bufferstreams@^2.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\ttf2woff2", + "author": { + "name": "Nicolas Froidure" + }, + "bugs": { + "url": "https://github.com/nfroidure/BufferStreams/issues" + }, + "bundleDependencies": false, + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + }, + "dependencies": { + "readable-stream": "^2.3.6" + }, + "deprecated": false, + "description": "Abstract streams to deal with the whole buffered contents.", + "devDependencies": { + "commitizen": "^2.9.6", + "conventional-changelog-cli": "^1.3.8", + "coveralls": "^3.0.0", + "cz-conventional-changelog": "^2.1.0", + "eslint": "^4.19.0", + "eslint-plugin-prettier": "^2.6.0", + "istanbul": "^0.4.5", + "istanbul-coveralls": "^1.0.3", + "metapak": "^1.0.3", + "metapak-nfroidure": "^6.0.0", + "mocha": "^5.0.0", + "mocha-lcov-reporter": "^1.3.0", + "prettier": "^1.11.1", + "streamtest": "^1.2.1" + }, + "engines": { + "node": ">=6.9.5" + }, + "files": [ + "src" + ], + "greenkeeper": { + "ignore": [ + "commitizen", + "cz-conventional-changelog", + "conventional-changelog-cli", + "eslint", + "eslint-config-prettier", + "prettier", + "mocha", + "mocha-lcov-reporter", + "coveralls", + "istanbul" + ] + }, + "homepage": "https://github.com/nfroidure/BufferStreams", + "keywords": [ + "buffer", + "streaming", + "stream", + "async", + "abstract" + ], + "license": "MIT", + "main": "src/index.js", + "metapak": { + "configs": [ + "readme", + "eslint", + "mocha", + "codeclimate", + "travis" + ], + "data": { + "files": "src/*.js tests/*.mocha.js", + "testsFiles": "tests/*.mocha.js" + } + }, + "name": "bufferstreams", + "repository": { + "type": "git", + "url": "git://github.com/nfroidure/BufferStreams.git" + }, + "scripts": { + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", + "cli": "env NODE_ENV=${NODE_ENV:-cli}", + "cover": "istanbul cover _mocha --report html -- tests/*.mocha.js -R spec -t 5000", + "coveralls": "istanbul cover _mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", + "cz": "env NODE_ENV=${NODE_ENV:-cli} git cz", + "lint": "eslint src/*.js tests/*.mocha.js", + "metapak": "metapak", + "mocha": "mocha tests/*.mocha.js", + "prettier": "prettier --write src/*.js tests/*.mocha.js", + "preversion": "npm t && npm run lint && npm run metapak -s", + "test": "npm run mocha", + "version": "npm run changelog && git add CHANGELOG.md" + }, + "version": "2.0.1" +} diff --git a/packages/字体精简工具/node_modules/bufferstreams/src/index.js b/packages/字体精简工具/node_modules/bufferstreams/src/index.js new file mode 100644 index 0000000..35492f2 --- /dev/null +++ b/packages/字体精简工具/node_modules/bufferstreams/src/index.js @@ -0,0 +1,97 @@ +'use strict'; + +const Duplex = require('readable-stream').Duplex; +const util = require('util'); + +// Inherit of Duplex stream +util.inherits(BufferStream, Duplex); + +// Constructor +function BufferStream(options, cb) { + const _this = this; + + // Ensure new were used + if (!(_this instanceof BufferStream)) { + return new BufferStream(options, cb); + } + + // Cast args + if (options instanceof Function) { + cb = options; + options = {}; + } + options = options || {}; + if (!(cb instanceof Function)) { + throw new Error('The given callback must be a function.'); + } + _this.__objectMode = options.objectMode; + + // Parent constructor + Duplex.call(_this, options); + + // Keep a reference to the callback + _this._cb = cb; + + // Add a finished flag + _this._bufferStreamFinished = false; + + // Internal buffer + _this._bufferStreamBuffer = []; + + // Internal logic + function _bufferStreamCallbackWrapper(err) { + const buffer = options.objectMode + ? _this._bufferStreamBuffer + : Buffer.concat(_this._bufferStreamBuffer); + + err = err || null; + _this._cb(err, buffer, (err2, buf) => { + setImmediate(() => { + _this.removeListener('error', _bufferStreamError); + if (err2) { + _this.emit('error', err2); + } + _this._bufferStreamBuffer = options.objectMode ? buf || [] : [buf]; + _this._bufferStreamFinished = true; + _this._read(); + }); + }); + } + + function _bufferStreamError(err) { + if (_this._bufferStreamFinished) { + return; + } + _bufferStreamCallbackWrapper(err); + } + + _this.once('finish', _bufferStreamCallbackWrapper); + + _this.on('error', _bufferStreamError); +} + +BufferStream.prototype._write = function _bufferStreamWrite( + chunk, + encoding, + done +) { + this._bufferStreamBuffer.push(chunk); + done(); +}; + +BufferStream.prototype._read = function _bufferStreamRead() { + const _this = this; + + if (_this._bufferStreamFinished) { + while (_this._bufferStreamBuffer.length) { + if (!_this.push(_this._bufferStreamBuffer.shift())) { + break; + } + } + if (0 === _this._bufferStreamBuffer.length) { + _this.push(null); + } + } +}; + +module.exports = BufferStream; diff --git a/packages/字体精简工具/node_modules/call-bind/.eslintignore b/packages/字体精简工具/node_modules/call-bind/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/packages/字体精简工具/node_modules/call-bind/.eslintrc b/packages/字体精简工具/node_modules/call-bind/.eslintrc new file mode 100644 index 0000000..e5d3c9a --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + "no-magic-numbers": 0, + "operator-linebreak": [2, "before"], + }, +} diff --git a/packages/字体精简工具/node_modules/call-bind/.github/FUNDING.yml b/packages/字体精简工具/node_modules/call-bind/.github/FUNDING.yml new file mode 100644 index 0000000..c70c2ec --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/call-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/packages/字体精简工具/node_modules/call-bind/.nycrc b/packages/字体精简工具/node_modules/call-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/packages/字体精简工具/node_modules/call-bind/CHANGELOG.md b/packages/字体精简工具/node_modules/call-bind/CHANGELOG.md new file mode 100644 index 0000000..62a3727 --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11 + +### Commits + +- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d) + +## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08 + +### Commits + +- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1) +- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e) +- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb) +- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71) +- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee) +- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2) +- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8) +- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6) + +## v1.0.0 - 2020-10-30 + +### Commits + +- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50) +- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df) +- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65) +- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13) +- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4) +- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717) +- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af) +- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650) +- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f) diff --git a/packages/字体精简工具/node_modules/call-bind/LICENSE b/packages/字体精简工具/node_modules/call-bind/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/call-bind/README.md b/packages/字体精简工具/node_modules/call-bind/README.md new file mode 100644 index 0000000..53649eb --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/README.md @@ -0,0 +1,2 @@ +# call-bind +Robustly `.call.bind()` a function. diff --git a/packages/字体精简工具/node_modules/call-bind/callBound.js b/packages/字体精简工具/node_modules/call-bind/callBound.js new file mode 100644 index 0000000..8374adf --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/callBound.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('./'); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; diff --git a/packages/字体精简工具/node_modules/call-bind/index.js b/packages/字体精简工具/node_modules/call-bind/index.js new file mode 100644 index 0000000..6fa3e4a --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} diff --git a/packages/字体精简工具/node_modules/call-bind/package.json b/packages/字体精简工具/node_modules/call-bind/package.json new file mode 100644 index 0000000..e8d2e38 --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/package.json @@ -0,0 +1,108 @@ +{ + "_from": "call-bind@^1.0.0", + "_id": "call-bind@1.0.2", + "_inBundle": false, + "_integrity": "sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw=", + "_location": "/call-bind", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "call-bind@^1.0.0", + "name": "call-bind", + "escapedName": "call-bind", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/object.assign" + ], + "_resolved": "https://registry.nlark.com/call-bind/download/call-bind-1.0.2.tgz", + "_shasum": "b1d4e89e688119c3c9a903ad30abb2f6a919be3c", + "_spec": "call-bind@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\object.assign", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "bugs": { + "url": "https://github.com/ljharb/call-bind/issues" + }, + "bundleDependencies": false, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "deprecated": false, + "description": "Robustly `.call.bind()` a function", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.17.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.1.1" + }, + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./callBound": [ + { + "default": "./callBound.js" + }, + "./callBound.js" + ], + "./package.json": "./package.json" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "homepage": "https://github.com/ljharb/call-bind#readme", + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "callbind", + "callbound", + "call", + "bind", + "bound", + "call-bind", + "call-bound", + "function", + "es-abstract" + ], + "license": "MIT", + "main": "index.js", + "name": "call-bind", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/call-bind.git" + }, + "scripts": { + "lint": "eslint --ext=.js,.mjs .", + "posttest": "aud --production", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/*'", + "version": "auto-changelog && git add CHANGELOG.md" + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/call-bind/test/callBound.js b/packages/字体精简工具/node_modules/call-bind/test/callBound.js new file mode 100644 index 0000000..209ce3c --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/test/callBound.js @@ -0,0 +1,55 @@ +'use strict'; + +var test = require('tape'); + +var callBound = require('../callBound'); + +test('callBound', function (t) { + // static primitive + t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); + t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); + + // static non-function object + t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); + t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); + t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); + t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); + + // static function + t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); + t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); + + // prototype primitive + t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); + t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); + + // prototype function + t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); + t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); + t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); + t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); + + t['throws']( + function () { callBound('does not exist'); }, + SyntaxError, + 'nonexistent intrinsic throws' + ); + t['throws']( + function () { callBound('does not exist', true); }, + SyntaxError, + 'allowMissing arg still throws for unknown intrinsic' + ); + + /* globals WeakRef: false */ + t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { + st['throws']( + function () { callBound('WeakRef'); }, + TypeError, + 'real but absent intrinsic throws' + ); + st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); + st.end(); + }); + + t.end(); +}); diff --git a/packages/字体精简工具/node_modules/call-bind/test/index.js b/packages/字体精简工具/node_modules/call-bind/test/index.js new file mode 100644 index 0000000..bf6769c --- /dev/null +++ b/packages/字体精简工具/node_modules/call-bind/test/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var callBind = require('../'); +var bind = require('function-bind'); + +var test = require('tape'); + +/* + * older engines have length nonconfigurable + * in io.js v3, it is configurable except on bound functions, hence the .bind() + */ +var functionsHaveConfigurableLengths = !!( + Object.getOwnPropertyDescriptor + && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable +); + +test('callBind', function (t) { + var sentinel = { sentinel: true }; + var func = function (a, b) { + // eslint-disable-next-line no-invalid-this + return [this, a, b]; + }; + t.equal(func.length, 2, 'original function length is 2'); + t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); + t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); + t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); + + var bound = callBind(func); + t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); + t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args'); + t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args'); + + var boundR = callBind(func, sentinel); + t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); + t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); + t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); + + var boundArg = callBind(func, sentinel, 1); + t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); + t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); + t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); + + t.test('callBind.apply', function (st) { + var aBound = callBind.apply(func); + st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args'); + st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + + var aBoundArg = callBind.apply(func); + st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args'); + st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + + var aBoundR = callBind.apply(func, sentinel); + st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args'); + st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args'); + st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args'); + + st.end(); + }); + + t.end(); +}); diff --git a/packages/字体精简工具/node_modules/camelcase-keys/index.js b/packages/字体精简工具/node_modules/camelcase-keys/index.js new file mode 100644 index 0000000..0eca08c --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase-keys/index.js @@ -0,0 +1,12 @@ +'use strict'; +var mapObj = require('map-obj'); +var camelCase = require('camelcase'); + +module.exports = function (input, options) { + options = options || {}; + var exclude = options.exclude || []; + return mapObj(input, function (key, val) { + key = exclude.indexOf(key) === -1 ? camelCase(key) : key; + return [key, val]; + }); +}; diff --git a/packages/字体精简工具/node_modules/camelcase-keys/license b/packages/字体精简工具/node_modules/camelcase-keys/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase-keys/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/camelcase-keys/package.json b/packages/字体精简工具/node_modules/camelcase-keys/package.json new file mode 100644 index 0000000..80a673a --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase-keys/package.json @@ -0,0 +1,84 @@ +{ + "_from": "camelcase-keys@^2.0.0", + "_id": "camelcase-keys@2.1.0", + "_inBundle": false, + "_integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "_location": "/camelcase-keys", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase-keys@^2.0.0", + "name": "camelcase-keys", + "escapedName": "camelcase-keys", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/meow" + ], + "_resolved": "https://registry.nlark.com/camelcase-keys/download/camelcase-keys-2.1.0.tgz", + "_shasum": "308beeaffdf28119051efa1d932213c91b8f92e7", + "_spec": "camelcase-keys@^2.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\meow", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase-keys/issues" + }, + "bundleDependencies": false, + "dependencies": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "deprecated": false, + "description": "Convert object keys to camelCase", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/camelcase-keys#readme", + "keywords": [ + "map", + "obj", + "object", + "key", + "keys", + "value", + "values", + "val", + "iterate", + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "name": "camelcase-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase-keys.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/packages/字体精简工具/node_modules/camelcase-keys/readme.md b/packages/字体精简工具/node_modules/camelcase-keys/readme.md new file mode 100644 index 0000000..ca37328 --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase-keys/readme.md @@ -0,0 +1,54 @@ +# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys) + +> Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase) + + +## Install + +``` +$ npm install --save camelcase-keys +``` + + +## Usage + +```js +const camelcaseKeys = require('camelcase-keys'); + +camelcaseKeys({'foo-bar': true}); +//=> {fooBar: true} + + +const argv = require('minimist')(process.argv.slice(2)); +//=> {_: [], 'foo-bar': true} + +camelcaseKeys(argv); +//=> {_: [], fooBar: true} +``` + + +## API + +### camelcaseKeys(input, [options]) + +#### input + +Type: `object` + +Object to camelCase. + +#### options + +Type: `object` + +##### exclude + +Type: `array` +Default: `[]` + +Exclude keys from being camelCased. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/packages/字体精简工具/node_modules/camelcase/index.js b/packages/字体精简工具/node_modules/camelcase/index.js new file mode 100644 index 0000000..929facb --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase/index.js @@ -0,0 +1,56 @@ +'use strict'; + +function preserveCamelCase(str) { + var isLastCharLower = false; + + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + + if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + i++; + } else { + isLastCharLower = (c.toLowerCase() === c); + } + } + + return str; +} + +module.exports = function () { + var str = [].map.call(arguments, function (str) { + return str.trim(); + }).filter(function (str) { + return str.length; + }).join('-'); + + if (!str.length) { + return ''; + } + + if (str.length === 1) { + return str; + } + + if (!(/[_.\- ]+/).test(str)) { + if (str === str.toUpperCase()) { + return str.toLowerCase(); + } + + if (str[0] !== str[0].toLowerCase()) { + return str[0].toLowerCase() + str.slice(1); + } + + return str; + } + + str = preserveCamelCase(str); + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; diff --git a/packages/字体精简工具/node_modules/camelcase/license b/packages/字体精简工具/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/camelcase/package.json b/packages/字体精简工具/node_modules/camelcase/package.json new file mode 100644 index 0000000..b677eda --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase/package.json @@ -0,0 +1,71 @@ +{ + "_from": "camelcase@^2.0.0", + "_id": "camelcase@2.1.1", + "_inBundle": false, + "_integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "_location": "/camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase@^2.0.0", + "name": "camelcase", + "escapedName": "camelcase", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/camelcase-keys" + ], + "_resolved": "https://registry.nlark.com/camelcase/download/camelcase-2.1.1.tgz", + "_shasum": "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f", + "_spec": "camelcase@^2.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\camelcase-keys", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/camelcase#readme", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "name": "camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1" +} diff --git a/packages/字体精简工具/node_modules/camelcase/readme.md b/packages/字体精简工具/node_modules/camelcase/readme.md new file mode 100644 index 0000000..080b2a1 --- /dev/null +++ b/packages/字体精简工具/node_modules/camelcase/readme.md @@ -0,0 +1,57 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +``` +$ npm install --save camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('--foo.bar'); +//=> 'fooBar' + +camelCase('__foo__bar__'); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase('foo', 'bar'); +//=> 'fooBar' + +camelCase('__foo__', '--bar'); +//=> 'fooBar' +``` + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/packages/字体精简工具/node_modules/caseless/LICENSE b/packages/字体精简工具/node_modules/caseless/LICENSE new file mode 100644 index 0000000..61789f4 --- /dev/null +++ b/packages/字体精简工具/node_modules/caseless/LICENSE @@ -0,0 +1,28 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +1. Definitions. +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/caseless/README.md b/packages/字体精简工具/node_modules/caseless/README.md new file mode 100644 index 0000000..e5077a2 --- /dev/null +++ b/packages/字体精简工具/node_modules/caseless/README.md @@ -0,0 +1,45 @@ +## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. + +This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manner while also preserving the caseing of headers the first time they are set. + +## Usage + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'asdf') +c.get('a-header') === 'asdf' +``` + +## has(key) + +Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. + +```javascript +c.has('a-header') === 'a-Header' +``` + +## set(key, value[, clobber=true]) + +Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. + +```javascript +c.set('a-Header', 'fdas') +c.set('a-HEADER', 'more', false) +c.get('a-header') === 'fdsa,more' +``` + +## swap(key) + +Swaps the casing of a header with the new one that is passed in. + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'fdas') +c.swap('a-HEADER') +c.has('a-header') === 'a-HEADER' +headers === {'a-HEADER': 'fdas'} +``` diff --git a/packages/字体精简工具/node_modules/caseless/index.js b/packages/字体精简工具/node_modules/caseless/index.js new file mode 100644 index 0000000..b194734 --- /dev/null +++ b/packages/字体精简工具/node_modules/caseless/index.js @@ -0,0 +1,67 @@ +function Caseless (dict) { + this.dict = dict || {} +} +Caseless.prototype.set = function (name, value, clobber) { + if (typeof name === 'object') { + for (var i in name) { + this.set(i, name[i], value) + } + } else { + if (typeof clobber === 'undefined') clobber = true + var has = this.has(name) + + if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value + else this.dict[has || name] = value + return has + } +} +Caseless.prototype.has = function (name) { + var keys = Object.keys(this.dict) + , name = name.toLowerCase() + ; + for (var i=0;i { + try { + return fs[LCHOWNSYNC](path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const chownSync = (path, uid, gid) => { + try { + return fs.chownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'ENOENT') + throw er + } +} + +/* istanbul ignore next */ +const handleEISDIR = + needEISDIRHandled ? (path, uid, gid, cb) => er => { + // Node prior to v10 had a very questionable implementation of + // fs.lchown, which would always try to call fs.open on a directory + // Fall back to fs.chown in those cases. + if (!er || er.code !== 'EISDIR') + cb(er) + else + fs.chown(path, uid, gid, cb) + } + : (_, __, ___, cb) => cb + +/* istanbul ignore next */ +const handleEISDirSync = + needEISDIRHandled ? (path, uid, gid) => { + try { + return lchownSync(path, uid, gid) + } catch (er) { + if (er.code !== 'EISDIR') + throw er + chownSync(path, uid, gid) + } + } + : (path, uid, gid) => lchownSync(path, uid, gid) + +// fs.readdir could only accept an options object as of node v6 +const nodeVersion = process.version +let readdir = (path, options, cb) => fs.readdir(path, options, cb) +let readdirSync = (path, options) => fs.readdirSync(path, options) +/* istanbul ignore next */ +if (/^v4\./.test(nodeVersion)) + readdir = (path, options, cb) => fs.readdir(path, cb) + +const chown = (cpath, uid, gid, cb) => { + fs[LCHOWN](cpath, uid, gid, handleEISDIR(cpath, uid, gid, er => { + // Skip ENOENT error + cb(er && er.code !== 'ENOENT' ? er : null) + })) +} + +const chownrKid = (p, child, uid, gid, cb) => { + if (typeof child === 'string') + return fs.lstat(path.resolve(p, child), (er, stats) => { + // Skip ENOENT error + if (er) + return cb(er.code !== 'ENOENT' ? er : null) + stats.name = child + chownrKid(p, stats, uid, gid, cb) + }) + + if (child.isDirectory()) { + chownr(path.resolve(p, child.name), uid, gid, er => { + if (er) + return cb(er) + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + }) + } else { + const cpath = path.resolve(p, child.name) + chown(cpath, uid, gid, cb) + } +} + + +const chownr = (p, uid, gid, cb) => { + readdir(p, { withFileTypes: true }, (er, children) => { + // any error other than ENOTDIR or ENOTSUP means it's not readable, + // or doesn't exist. give up. + if (er) { + if (er.code === 'ENOENT') + return cb() + else if (er.code !== 'ENOTDIR' && er.code !== 'ENOTSUP') + return cb(er) + } + if (er || !children.length) + return chown(p, uid, gid, cb) + + let len = children.length + let errState = null + const then = er => { + if (errState) + return + if (er) + return cb(errState = er) + if (-- len === 0) + return chown(p, uid, gid, cb) + } + + children.forEach(child => chownrKid(p, child, uid, gid, then)) + }) +} + +const chownrKidSync = (p, child, uid, gid) => { + if (typeof child === 'string') { + try { + const stats = fs.lstatSync(path.resolve(p, child)) + stats.name = child + child = stats + } catch (er) { + if (er.code === 'ENOENT') + return + else + throw er + } + } + + if (child.isDirectory()) + chownrSync(path.resolve(p, child.name), uid, gid) + + handleEISDirSync(path.resolve(p, child.name), uid, gid) +} + +const chownrSync = (p, uid, gid) => { + let children + try { + children = readdirSync(p, { withFileTypes: true }) + } catch (er) { + if (er.code === 'ENOENT') + return + else if (er.code === 'ENOTDIR' || er.code === 'ENOTSUP') + return handleEISDirSync(p, uid, gid) + else + throw er + } + + if (children && children.length) + children.forEach(child => chownrKidSync(p, child, uid, gid)) + + return handleEISDirSync(p, uid, gid) +} + +module.exports = chownr +chownr.sync = chownrSync diff --git a/packages/字体精简工具/node_modules/chownr/package.json b/packages/字体精简工具/node_modules/chownr/package.json new file mode 100644 index 0000000..bc5e847 --- /dev/null +++ b/packages/字体精简工具/node_modules/chownr/package.json @@ -0,0 +1,62 @@ +{ + "_from": "chownr@^1.1.1", + "_id": "chownr@1.1.4", + "_inBundle": false, + "_integrity": "sha1-b8nXtC0ypYNZYzdmbn0ICE2izGs=", + "_location": "/chownr", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "chownr@^1.1.1", + "name": "chownr", + "escapedName": "chownr", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/tar" + ], + "_resolved": "https://registry.npm.taobao.org/chownr/download/chownr-1.1.4.tgz", + "_shasum": "6fc9d7b42d32a583596337666e7d08084da2cc6b", + "_spec": "chownr@^1.1.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\tar", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/chownr/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "like `chown -R`", + "devDependencies": { + "mkdirp": "0.3", + "rimraf": "^2.7.1", + "tap": "^14.10.6" + }, + "files": [ + "chownr.js" + ], + "homepage": "https://github.com/isaacs/chownr#readme", + "license": "ISC", + "main": "chownr.js", + "name": "chownr", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/chownr.git" + }, + "scripts": { + "postversion": "npm publish", + "prepublishOnly": "git push origin --follow-tags", + "preversion": "npm test", + "test": "tap" + }, + "tap": { + "check-coverage": true + }, + "version": "1.1.4" +} diff --git a/packages/字体精简工具/node_modules/clone-buffer/LICENSE b/packages/字体精简工具/node_modules/clone-buffer/LICENSE new file mode 100644 index 0000000..fa16a89 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Blaine Bublitz , Eric Schoffstall and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/clone-buffer/README.md b/packages/字体精简工具/node_modules/clone-buffer/README.md new file mode 100644 index 0000000..51c8a8d --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-buffer/README.md @@ -0,0 +1,47 @@ +

+ + + +

+ +# clone-buffer + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Easier Buffer cloning in node. + +## Example + +```js +var cloneBuffer = require('clone-buffer'); + +var buffer = new Buffer('test'); +var cloned = cloneBuffer(buffer); +// buffer !== cloned +``` + +## API + +### `cloneBuffer(buffer)` + +Takes a `Buffer` object and returns a clone. Throws if a non-`Buffer` is passed. + +## License + +MIT + +[downloads-image]: http://img.shields.io/npm/dm/clone-buffer.svg +[npm-url]: https://npmjs.org/package/clone-buffer +[npm-image]: http://img.shields.io/npm/v/clone-buffer.svg + +[travis-url]: https://travis-ci.org/gulpjs/clone-buffer +[travis-image]: http://img.shields.io/travis/gulpjs/clone-buffer.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/clone-buffer +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/clone-buffer.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/clone-buffer +[coveralls-image]: http://img.shields.io/coveralls/gulpjs/clone-buffer/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png diff --git a/packages/字体精简工具/node_modules/clone-buffer/index.js b/packages/字体精简工具/node_modules/clone-buffer/index.js new file mode 100644 index 0000000..eb3837e --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-buffer/index.js @@ -0,0 +1,28 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; + +function hasFrom() { + // Node versions 5.x below 5.10 seem to have a `from` method + // However, it doesn't clone Buffers + // Luckily, it reports as `false` to hasOwnProperty + return (Buffer.hasOwnProperty('from') && typeof Buffer.from === 'function'); +} + +function cloneBuffer(buf) { + if (!Buffer.isBuffer(buf)) { + throw new Error('Can only clone Buffer.'); + } + + if (hasFrom()) { + return Buffer.from(buf); + } + + var copy = new Buffer(buf.length); + buf.copy(copy); + return copy; +} + +cloneBuffer.hasFrom = hasFrom; + +module.exports = cloneBuffer; diff --git a/packages/字体精简工具/node_modules/clone-buffer/package.json b/packages/字体精简工具/node_modules/clone-buffer/package.json new file mode 100644 index 0000000..bae1b4b --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-buffer/package.json @@ -0,0 +1,84 @@ +{ + "_from": "clone-buffer@^1.0.0", + "_id": "clone-buffer@1.0.0", + "_inBundle": false, + "_integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "_location": "/clone-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "clone-buffer@^1.0.0", + "name": "clone-buffer", + "escapedName": "clone-buffer", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/gulp-clean/vinyl", + "/vinyl-fs/vinyl", + "/vinyl-sourcemap/vinyl" + ], + "_resolved": "https://registry.npm.taobao.org/clone-buffer/download/clone-buffer-1.0.0.tgz", + "_shasum": "e3e25b207ac4e701af721e2cb5a16792cac3dc58", + "_spec": "clone-buffer@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl-fs\\node_modules\\vinyl", + "author": { + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "http://gulpjs.com/" + }, + "bugs": { + "url": "https://github.com/gulpjs/clone-buffer/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Easier Buffer cloning in node.", + "devDependencies": { + "eslint": "^1.7.3", + "eslint-config-gulp": "^2.0.0", + "expect": "^1.19.0", + "istanbul": "^0.4.3", + "istanbul-coveralls": "^1.0.3", + "jscs": "^2.3.5", + "jscs-preset-gulp": "^1.0.0", + "mocha": "^2.4.5" + }, + "engines": { + "node": ">= 0.10" + }, + "files": [ + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/gulpjs/clone-buffer#readme", + "keywords": [ + "buffer", + "clone", + "from", + "copy" + ], + "license": "MIT", + "main": "index.js", + "name": "clone-buffer", + "repository": { + "type": "git", + "url": "git+https://github.com/gulpjs/clone-buffer.git" + }, + "scripts": { + "cover": "istanbul cover _mocha --report lcovonly", + "coveralls": "npm run cover && istanbul-coveralls", + "lint": "eslint . && jscs index.js test/", + "pretest": "npm run lint", + "test": "mocha --async-only" + }, + "version": "1.0.0" +} diff --git a/packages/字体精简工具/node_modules/clone-stats/LICENSE.md b/packages/字体精简工具/node_modules/clone-stats/LICENSE.md new file mode 100644 index 0000000..146cb32 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-stats/LICENSE.md @@ -0,0 +1,21 @@ +## The MIT License (MIT) ## + +Copyright (c) 2014 Hugh Kennedy + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/clone-stats/README.md b/packages/字体精简工具/node_modules/clone-stats/README.md new file mode 100644 index 0000000..8b12b6f --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # + +Safely clone node's +[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without +losing their class methods, i.e. `stat.isDirectory()` and co. + +## Usage ## + +[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](https://nodei.co/npm/clone-stats) + +### `copy = require('clone-stats')(stat)` ### + +Returns a clone of the original `fs.Stats` instance (`stat`). + +## License ## + +MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details. diff --git a/packages/字体精简工具/node_modules/clone-stats/index.js b/packages/字体精简工具/node_modules/clone-stats/index.js new file mode 100644 index 0000000..e797cfe --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-stats/index.js @@ -0,0 +1,13 @@ +var Stat = require('fs').Stats + +module.exports = cloneStats + +function cloneStats(stats) { + var replacement = new Stat + + Object.keys(stats).forEach(function(key) { + replacement[key] = stats[key] + }) + + return replacement +} diff --git a/packages/字体精简工具/node_modules/clone-stats/package.json b/packages/字体精简工具/node_modules/clone-stats/package.json new file mode 100644 index 0000000..c5f5b93 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-stats/package.json @@ -0,0 +1,60 @@ +{ + "_from": "clone-stats@^0.0.1", + "_id": "clone-stats@0.0.1", + "_inBundle": false, + "_integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", + "_location": "/clone-stats", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "clone-stats@^0.0.1", + "name": "clone-stats", + "escapedName": "clone-stats", + "rawSpec": "^0.0.1", + "saveSpec": null, + "fetchSpec": "^0.0.1" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.nlark.com/clone-stats/download/clone-stats-0.0.1.tgz", + "_shasum": "b88f94a82cf38b8791d58046ea4029ad88ca99d1", + "_spec": "clone-stats@^0.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl", + "author": { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com", + "url": "http://hughsk.io/" + }, + "browser": "index.js", + "bugs": { + "url": "https://github.com/hughsk/clone-stats/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Safely clone node's fs.Stats instances without losing their class methods", + "devDependencies": { + "tape": "~2.3.2" + }, + "homepage": "https://github.com/hughsk/clone-stats", + "keywords": [ + "stats", + "fs", + "clone", + "copy", + "prototype" + ], + "license": "MIT", + "main": "index.js", + "name": "clone-stats", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/clone-stats.git" + }, + "scripts": { + "test": "node test" + }, + "version": "0.0.1" +} diff --git a/packages/字体精简工具/node_modules/clone-stats/test.js b/packages/字体精简工具/node_modules/clone-stats/test.js new file mode 100644 index 0000000..e4bb281 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone-stats/test.js @@ -0,0 +1,36 @@ +var test = require('tape') +var clone = require('./') +var fs = require('fs') + +test('file', function(t) { + compare(t, fs.statSync(__filename)) + t.end() +}) + +test('directory', function(t) { + compare(t, fs.statSync(__dirname)) + t.end() +}) + +function compare(t, stat) { + var copy = clone(stat) + + t.deepEqual(stat, copy, 'clone has equal properties') + t.ok(stat instanceof fs.Stats, 'original is an fs.Stat') + t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat') + + ;['isDirectory' + , 'isFile' + , 'isBlockDevice' + , 'isCharacterDevice' + , 'isSymbolicLink' + , 'isFIFO' + , 'isSocket' + ].forEach(function(method) { + t.equal( + stat[method].call(stat) + , copy[method].call(copy) + , 'equal value for stat.' + method + '()' + ) + }) +} diff --git a/packages/字体精简工具/node_modules/clone/.npmignore b/packages/字体精简工具/node_modules/clone/.npmignore new file mode 100644 index 0000000..c797cbf --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/.npmignore @@ -0,0 +1,4 @@ +/node_modules/ +/test.js +/*.html +/.travis.yml diff --git a/packages/字体精简工具/node_modules/clone/LICENSE b/packages/字体精简工具/node_modules/clone/LICENSE new file mode 100644 index 0000000..cc3c87b --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/LICENSE @@ -0,0 +1,18 @@ +Copyright © 2011-2015 Paul Vorbach + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/clone/README.md b/packages/字体精简工具/node_modules/clone/README.md new file mode 100644 index 0000000..0b6ceca --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/README.md @@ -0,0 +1,126 @@ +# clone + +[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) + +[![info badge](https://nodei.co/npm/clone.png?downloads=true&downloadRank=true&stars=true)](http://npm-stat.com/charts.html?package=clone) + +offers foolproof _deep cloning_ of objects, arrays, numbers, strings etc. in JavaScript. + + +## Installation + + npm install clone + +(It also works with browserify, ender or standalone.) + + +## Example + +~~~ javascript +var clone = require('clone'); + +var a, b; + +a = { foo: { bar: 'baz' } }; // initial value of a + +b = clone(a); // clone a -> b +a.foo.bar = 'foo'; // change a + +console.log(a); // show a +console.log(b); // show b +~~~ + +This will print: + +~~~ javascript +{ foo: { bar: 'foo' } } +{ foo: { bar: 'baz' } } +~~~ + +**clone** masters cloning simple objects (even with custom prototype), arrays, +Date objects, and RegExp objects. Everything is cloned recursively, so that you +can clone dates in arrays in objects, for example. + + +## API + +`clone(val, circular, depth)` + + * `val` -- the value that you want to clone, any type allowed + * `circular` -- boolean + + Call `clone` with `circular` set to `false` if you are certain that `obj` + contains no circular references. This will give better performance if needed. + There is no error if `undefined` or `null` is passed as `obj`. + * `depth` -- depth to which the object is to be cloned (optional, + defaults to infinity) + +`clone.clonePrototype(obj)` + + * `obj` -- the object that you want to clone + +Does a prototype clone as +[described by Oran Looney](http://oranlooney.com/functional-javascript/). + + +## Circular References + +~~~ javascript +var a, b; + +a = { hello: 'world' }; + +a.myself = a; +b = clone(a); + +console.log(b); +~~~ + +This will print: + +~~~ javascript +{ hello: "world", myself: [Circular] } +~~~ + +So, `b.myself` points to `b`, not `a`. Neat! + + +## Test + + npm test + + +## Caveat + +Some special objects like a socket or `process.stdout`/`stderr` are known to not +be cloneable. If you find other objects that cannot be cloned, please [open an +issue](https://github.com/pvorb/node-clone/issues/new). + + +## Bugs and Issues + +If you encounter any bugs or issues, feel free to [open an issue at +github](https://github.com/pvorb/node-clone/issues) or send me an email to +. I also always like to hear from you, if you’re using my code. + +## License + +Copyright © 2011-2015 [Paul Vorbach](http://paul.vorba.ch/) and +[contributors](https://github.com/pvorb/node-clone/graphs/contributors). + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/clone/clone.iml b/packages/字体精简工具/node_modules/clone/clone.iml new file mode 100644 index 0000000..30de8ae --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/clone.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/clone/clone.js b/packages/字体精简工具/node_modules/clone/clone.js new file mode 100644 index 0000000..ba200c2 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/clone.js @@ -0,0 +1,166 @@ +var clone = (function() { +'use strict'; + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). +*/ +function clone(parent, circular, depth, prototype) { + var filter; + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + filter = circular.filter; + circular = circular.circular + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth == 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + if (Buffer.allocUnsafe) { + // Node.js >= 4.5.0 + child = Buffer.allocUnsafe(parent.length); + } else { + // Older Node.js versions + child = new Buffer(parent.length); + } + parent.copy(child); + return child; + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; + +// private utility functions + +function __objToStr(o) { + return Object.prototype.toString.call(o); +}; +clone.__objToStr = __objToStr; + +function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; +}; +clone.__isDate = __isDate; + +function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; +}; +clone.__isArray = __isArray; + +function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; +}; +clone.__isRegExp = __isRegExp; + +function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; +}; +clone.__getRegExpFlags = __getRegExpFlags; + +return clone; +})(); + +if (typeof module === 'object' && module.exports) { + module.exports = clone; +} diff --git a/packages/字体精简工具/node_modules/clone/package.json b/packages/字体精简工具/node_modules/clone/package.json new file mode 100644 index 0000000..f3f1543 --- /dev/null +++ b/packages/字体精简工具/node_modules/clone/package.json @@ -0,0 +1,137 @@ +{ + "_from": "clone@^1.0.0", + "_id": "clone@1.0.4", + "_inBundle": false, + "_integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "_location": "/clone", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "clone@^1.0.0", + "name": "clone", + "escapedName": "clone", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/vinyl" + ], + "_resolved": "https://registry.nlark.com/clone/download/clone-1.0.4.tgz", + "_shasum": "da309cc263df15994c688ca902179ca3c7cd7c7e", + "_spec": "clone@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch/" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Blake Miner", + "email": "miner.blake@gmail.com", + "url": "http://www.blakeminer.com/" + }, + { + "name": "Tian You", + "email": "axqd001@gmail.com", + "url": "http://blog.axqd.net/" + }, + { + "name": "George Stagas", + "email": "gstagas@gmail.com", + "url": "http://stagas.com/" + }, + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "url": "https://github.com/TobiaszCudnik" + }, + { + "name": "Pavel Lang", + "email": "langpavel@phpskelet.org", + "url": "https://github.com/langpavel" + }, + { + "name": "Dan MacTough", + "url": "http://yabfog.com/" + }, + { + "name": "w1nk", + "url": "https://github.com/w1nk" + }, + { + "name": "Hugh Kennedy", + "url": "http://twitter.com/hughskennedy" + }, + { + "name": "Dustin Diaz", + "url": "http://dustindiaz.com" + }, + { + "name": "Ilya Shaisultanov", + "url": "https://github.com/diversario" + }, + { + "name": "Nathan MacInnes", + "email": "nathan@macinn.es", + "url": "http://macinn.es/" + }, + { + "name": "Benjamin E. Coe", + "email": "ben@npmjs.com", + "url": "https://twitter.com/benjamincoe" + }, + { + "name": "Nathan Zadoks", + "url": "https://github.com/nathan7" + }, + { + "name": "Róbert Oroszi", + "email": "robert+gh@oroszi.net", + "url": "https://github.com/oroce" + }, + { + "name": "Aurélio A. Heckert", + "url": "http://softwarelivre.org/aurium" + }, + { + "name": "Guy Ellis", + "url": "http://www.guyellisrocks.com/" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "deep cloning of objects and arrays", + "devDependencies": { + "nodeunit": "~0.9.0" + }, + "engines": { + "node": ">=0.8" + }, + "homepage": "https://github.com/pvorb/node-clone#readme", + "license": "MIT", + "main": "clone.js", + "name": "clone", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "scripts": { + "test": "nodeunit test.js" + }, + "tags": [ + "clone", + "object", + "array", + "function", + "date" + ], + "version": "1.0.4" +} diff --git a/packages/字体精简工具/node_modules/cloneable-readable/.travis.yml b/packages/字体精简工具/node_modules/cloneable-readable/.travis.yml new file mode 100644 index 0000000..c352b0e --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/.travis.yml @@ -0,0 +1,13 @@ +language: node_js +sudo: false +node_js: + - "0.10" + - "0.12" + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + - "12" diff --git a/packages/字体精简工具/node_modules/cloneable-readable/LICENSE b/packages/字体精简工具/node_modules/cloneable-readable/LICENSE new file mode 100644 index 0000000..ecf6245 --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Matteo Collina + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/字体精简工具/node_modules/cloneable-readable/README.md b/packages/字体精简工具/node_modules/cloneable-readable/README.md new file mode 100644 index 0000000..17b25a2 --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/README.md @@ -0,0 +1,54 @@ +# cloneable-readable + +[![Greenkeeper badge](https://badges.greenkeeper.io/mcollina/cloneable-readable.svg)](https://greenkeeper.io/) + +[![Build Status](https://travis-ci.org/mcollina/cloneable-readable.svg?branch=master)](https://travis-ci.org/mcollina/cloneable-readable) + +Clone a Readable stream, safely. + +```js +'use strict' + +var cloneable = require('cloneable-readable') +var fs = require('fs') +var pump = require('pump') + +var stream = cloneable(fs.createReadStream('./package.json')) + +pump(stream.clone(), fs.createWriteStream('./out1')) + +// simulate some asynchronicity +setImmediate(function () { + pump(stream, fs.createWriteStream('./out2')) +}) +``` + +**cloneable-readable** automatically handles `objectMode: true`. + +This module comes out of an healthy discussion on the 'right' way to +clone a Readable in https://github.com/gulpjs/vinyl/issues/85 +and https://github.com/nodejs/readable-stream/issues/202. This is my take. + +**YOU MUST PIPE ALL CLONES TO START THE FLOW** + +You can also attach `'data'` and `'readable'` events to them. + +## API + +### cloneable(stream) + +Create a `Cloneable` stream. +A Cloneable has a `clone()` method to create more clones. +All clones must be resumed/piped to start the flow. + +### cloneable.isCloneable(stream) + +Check if `stream` needs to be wrapped in a `Cloneable` or not. + +## Acknowledgements + +This project was kindly sponsored by [nearForm](http://nearform.com). + +## License + +MIT diff --git a/packages/字体精简工具/node_modules/cloneable-readable/example.js b/packages/字体精简工具/node_modules/cloneable-readable/example.js new file mode 100644 index 0000000..e980b97 --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/example.js @@ -0,0 +1,14 @@ +'use strict' + +var cloneable = require('./') +var fs = require('fs') +var pump = require('pump') + +var stream = cloneable(fs.createReadStream('./package.json')) + +pump(stream.clone(), fs.createWriteStream('./out1')) + +// simulate some asynchronicity +setImmediate(function () { + pump(stream, fs.createWriteStream('./out2')) +}) diff --git a/packages/字体精简工具/node_modules/cloneable-readable/index.js b/packages/字体精简工具/node_modules/cloneable-readable/index.js new file mode 100644 index 0000000..a68765b --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/index.js @@ -0,0 +1,153 @@ +'use strict' + +var PassThrough = require('readable-stream').PassThrough +var inherits = require('inherits') +var p = require('process-nextick-args') + +function Cloneable (stream, opts) { + if (!(this instanceof Cloneable)) { + return new Cloneable(stream, opts) + } + + var objectMode = stream._readableState.objectMode + this._original = stream + this._clonesCount = 1 + + opts = opts || {} + opts.objectMode = objectMode + + PassThrough.call(this, opts) + + forwardDestroy(stream, this) + + this.on('newListener', onData) + this.once('resume', onResume) + + this._hasListener = true +} + +inherits(Cloneable, PassThrough) + +function onData (event, listener) { + if (event === 'data' || event === 'readable') { + this._hasListener = false + this.removeListener('newListener', onData) + this.removeListener('resume', onResume) + p.nextTick(clonePiped, this) + } +} + +function onResume () { + this._hasListener = false + this.removeListener('newListener', onData) + p.nextTick(clonePiped, this) +} + +Cloneable.prototype.clone = function () { + if (!this._original) { + throw new Error('already started') + } + + this._clonesCount++ + + // the events added by the clone should not count + // for starting the flow + this.removeListener('newListener', onData) + var clone = new Clone(this) + if (this._hasListener) { + this.on('newListener', onData) + } + + return clone +} + +Cloneable.prototype._destroy = function (err, cb) { + if (!err) { + this.push(null) + this.end() + this.emit('close') + } + + p.nextTick(cb, err) +} + +function forwardDestroy (src, dest) { + src.on('error', destroy) + src.on('close', onClose) + + function destroy (err) { + src.removeListener('close', onClose) + dest.destroy(err) + } + + function onClose () { + dest.end() + } +} + +function clonePiped (that) { + if (--that._clonesCount === 0 && !that._readableState.destroyed) { + that._original.pipe(that) + that._original = undefined + } +} + +function Clone (parent, opts) { + if (!(this instanceof Clone)) { + return new Clone(parent, opts) + } + + var objectMode = parent._readableState.objectMode + + opts = opts || {} + opts.objectMode = objectMode + + this.parent = parent + + PassThrough.call(this, opts) + + forwardDestroy(parent, this) + + parent.pipe(this) + + // the events added by the clone should not count + // for starting the flow + // so we add the newListener handle after we are done + this.on('newListener', onDataClone) + this.on('resume', onResumeClone) +} + +function onDataClone (event, listener) { + // We start the flow once all clones are piped or destroyed + if (event === 'data' || event === 'readable' || event === 'close') { + p.nextTick(clonePiped, this.parent) + this.removeListener('newListener', onDataClone) + } +} + +function onResumeClone () { + this.removeListener('newListener', onDataClone) + p.nextTick(clonePiped, this.parent) +} + +inherits(Clone, PassThrough) + +Clone.prototype.clone = function () { + return this.parent.clone() +} + +Cloneable.isCloneable = function (stream) { + return stream instanceof Cloneable || stream instanceof Clone +} + +Clone.prototype._destroy = function (err, cb) { + if (!err) { + this.push(null) + this.end() + this.emit('close') + } + + p.nextTick(cb, err) +} + +module.exports = Cloneable diff --git a/packages/字体精简工具/node_modules/cloneable-readable/package.json b/packages/字体精简工具/node_modules/cloneable-readable/package.json new file mode 100644 index 0000000..80e2ce3 --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/package.json @@ -0,0 +1,69 @@ +{ + "_from": "cloneable-readable@^1.0.0", + "_id": "cloneable-readable@1.1.3", + "_inBundle": false, + "_integrity": "sha1-EgoAywU7+2OiIucJ+Wg+ouEdjOw=", + "_location": "/cloneable-readable", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cloneable-readable@^1.0.0", + "name": "cloneable-readable", + "escapedName": "cloneable-readable", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/gulp-clean/vinyl", + "/vinyl-fs/vinyl", + "/vinyl-sourcemap/vinyl" + ], + "_resolved": "https://registry.npm.taobao.org/cloneable-readable/download/cloneable-readable-1.1.3.tgz", + "_shasum": "120a00cb053bfb63a222e709f9683ea2e11d8cec", + "_spec": "cloneable-readable@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl-fs\\node_modules\\vinyl", + "author": { + "name": "Matteo Collina", + "email": "hello@matteocollina.com" + }, + "bugs": { + "url": "https://github.com/mcollina/cloneable-readable/issues" + }, + "bundleDependencies": false, + "dependencies": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + }, + "deprecated": false, + "description": "Clone a Readable stream, safely", + "devDependencies": { + "flush-write-stream": "^1.0.0", + "from2": "^2.1.1", + "pre-commit": "^1.1.2", + "pump": "^3.0.0", + "standard": "^11.0.0", + "tap-spec": "^4.1.1", + "tape": "^4.9.0" + }, + "homepage": "https://github.com/mcollina/cloneable-readable#readme", + "keywords": [ + "readable", + "stream", + "clone" + ], + "license": "MIT", + "main": "index.js", + "name": "cloneable-readable", + "precommit": "test", + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/cloneable-readable.git" + }, + "scripts": { + "test": "standard && tape test.js | tap-spec" + }, + "version": "1.1.3" +} diff --git a/packages/字体精简工具/node_modules/cloneable-readable/test.js b/packages/字体精简工具/node_modules/cloneable-readable/test.js new file mode 100644 index 0000000..35bb78b --- /dev/null +++ b/packages/字体精简工具/node_modules/cloneable-readable/test.js @@ -0,0 +1,702 @@ +'use strict' + +var fs = require('fs') +var path = require('path') +var test = require('tape').test +var from = require('from2') +var crypto = require('crypto') +var sink = require('flush-write-stream') +var pump = require('pump') +var cloneable = require('./') + +test('basic passthrough', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('clone sync', function (t) { + t.plan(4) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('clone async', function (t) { + t.plan(4) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + setImmediate(function () { + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + }) +}) + +test('basic passthrough in obj mode', function (t) { + t.plan(2) + + var read = false + var source = from.obj(function (size, next) { + if (read) { + return this.push(null) + } else { + read = true + this.push({ hello: 'world' }) + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) +}) + +test('multiple clone in object mode', function (t) { + t.plan(4) + + var read = false + var source = from.obj(function (size, next) { + if (read) { + return this.push(null) + } else { + read = true + this.push({ hello: 'world' }) + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) + + setImmediate(function () { + cloned.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk, { hello: 'world' }, 'chunk matches') + cb() + })) + }) +}) + +test('basic passthrough with data event', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var data = '' + instance.on('data', function (chunk) { + data += chunk.toString() + }) + + instance.on('end', function () { + t.equal(data, 'hello world', 'chunk matches') + }) +}) + +test('basic passthrough with data event on clone', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + var cloned = instance.clone() + + t.notOk(read, 'stream not started') + + var data = '' + cloned.on('data', function (chunk) { + data += chunk.toString() + }) + + cloned.on('end', function () { + t.equal(data, 'hello world', 'chunk matches in clone') + }) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') + cb() + })) +}) + +test('errors if cloned after start', function (t) { + t.plan(2) + + var source = from(function (size, next) { + this.push('hello world') + this.push(null) + next() + }) + + var instance = cloneable(source) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + t.throws(function () { + instance.clone() + }, 'throws if cloned after start') + cb() + })) +}) + +test('basic passthrough with readable event', function (t) { + t.plan(2) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var data = '' + instance.on('readable', function () { + var chunk + while ((chunk = this.read()) !== null) { + data += chunk.toString() + } + }) + + instance.on('end', function () { + t.equal(data, 'hello world', 'chunk matches') + }) +}) + +test('basic passthrough with readable event on clone', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + var cloned = instance.clone() + + t.notOk(read, 'stream not started') + + var data = '' + cloned.on('readable', function () { + var chunk + while ((chunk = this.read()) !== null) { + data += chunk.toString() + } + }) + + cloned.on('end', function () { + t.equal(data, 'hello world', 'chunk matches in clone') + }) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches in instance') + cb() + })) +}) + +test('source error destroys all', function (t) { + t.plan(3) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('error', function (err) { + t.ok(err, 'source errors') + + instance.on('error', function (err2) { + t.ok(err === err2, 'instance receives same error') + }) + + clone.on('error', function (err3) { + t.ok(err === err3, 'clone receives same error') + }) + }) + + source.emit('error', new Error()) +}) + +test('source destroy destroys all', function (t) { + t.plan(2) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + instance.on('end', function () { + t.pass('instance has ended') + }) + + clone.on('end', function () { + t.pass('clone has ended') + }) + + clone.resume() + instance.resume() + + source.destroy() +}) + +test('instance error destroys all but the source', function (t) { + t.plan(2) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('error', function (err) { + t.is(err.message, 'beep', 'instance errors') + }) + + instance.on('close', function () { + t.fail('close should not be emitted') + }) + + clone.on('error', function (err) { + t.is(err.message, 'beep', 'instance errors') + }) + + clone.on('close', function () { + t.fail('close should not be emitted') + }) + + instance.destroy(new Error('beep')) +}) + +test('instance destroy destroys all but the source', function (t) { + t.plan(2) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('end', function () { + t.pass('instance has ended') + }) + + clone.on('end', function () { + t.pass('clone has ended') + }) + + instance.resume() + clone.resume() + + instance.destroy() +}) + +test('clone destroy does not affect other clones, cloneable or source', function (t) { + t.plan(1) + + var source = from() + var instance = cloneable(source) + var clone = instance.clone() + var other = instance.clone() + + source.on('close', function () { + t.fail('source should not be closed') + }) + + instance.on('close', function () { + t.fail('instance should not be closed') + }) + + other.on('close', function () { + t.fail('other clone should not be closed') + }) + + clone.on('close', function () { + t.pass('clone is closed') + }) + + clone.destroy() +}) + +test('clone remains readable if other is destroyed', function (t) { + t.plan(3) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello') + } + next() + }) + + var instance = cloneable(source) + var clone = instance.clone() + var other = instance.clone() + + instance.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk.toString(), 'hello', 'instance chunk matches') + cb() + })) + + clone.pipe(sink.obj(function (chunk, enc, cb) { + t.deepEqual(chunk.toString(), 'hello', 'clone chunk matches') + cb() + })) + + clone.on('close', function () { + t.fail('clone should not be closed') + }) + + instance.on('close', function () { + t.fail('instance should not be closed') + }) + + other.on('close', function () { + t.pass('other is closed') + }) + + other.destroy() +}) + +test('clone of clone', function (t) { + t.plan(6) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + var replica = cloned.clone() + t.notOk(read, 'stream not started') + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + cloned.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) + + replica.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), 'hello world', 'chunk matches') + cb() + })) +}) + +test('from vinyl', function (t) { + t.plan(3) + + var source = from(['wa', 'dup']) + + var instance = cloneable(source) + var clone = instance.clone() + + var data = '' + var data2 = '' + var ends = 2 + + function latch () { + if (--ends === 0) { + t.equal(data, data2) + } + } + + instance.on('data', function (chunk) { + data += chunk.toString() + }) + + process.nextTick(function () { + t.equal('', data, 'nothing was written yet') + t.equal('', data2, 'nothing was written yet') + + clone.on('data', function (chunk) { + data2 += chunk.toString() + }) + }) + + instance.on('end', latch) + clone.on('end', latch) +}) + +test('waits till all are flowing', function (t) { + t.plan(1) + + var source = from(['wa', 'dup']) + + var instance = cloneable(source) + + // we create a clone + instance.clone() + + instance.on('data', function (chunk) { + t.fail('this should never happen') + }) + + process.nextTick(function () { + t.pass('wait till nextTick') + }) +}) + +test('isCloneable', function (t) { + t.plan(4) + + var source = from(['hello', ' ', 'world']) + t.notOk(cloneable.isCloneable(source), 'a generic readable is not cloneable') + + var instance = cloneable(source) + t.ok(cloneable.isCloneable(instance), 'a cloneable is cloneable') + + var clone = instance.clone() + t.ok(cloneable.isCloneable(clone), 'a clone is cloneable') + + var cloneClone = clone.clone() + t.ok(cloneable.isCloneable(cloneClone), 'a clone of a clone is cloneable') +}) + +test('emits finish', function (t) { + var chunks = ['a', 'b', 'c', 'd', null] + var e1 = ['a', 'b', 'c', 'd'] + var e2 = ['a', 'b', 'c', 'd'] + + t.plan(2 + e1.length + e2.length) + + var source = from(function (size, next) { + setImmediate(next, null, chunks.shift()) + }) + + var instance = cloneable(source) + + var clone = instance.clone() + + clone.on('finish', t.pass.bind(null, 'clone emits finish')) + instance.on('finish', t.pass.bind(null, 'main emits finish')) + + instance.pipe(sink(function (chunk, enc, cb) { + t.equal(chunk.toString(), e1.shift(), 'chunk matches') + cb() + })) + + clone.on('data', function (chunk) { + t.equal(chunk.toString(), e2.shift(), 'chunk matches') + }) +}) + +test('clone async w resume', function (t) { + t.plan(4) + + var read = false + var source = from(function (size, next) { + if (read) { + this.push(null) + } else { + read = true + this.push('hello world') + } + next() + }) + + var instance = cloneable(source) + t.notOk(read, 'stream not started') + + var cloned = instance.clone() + t.notOk(read, 'stream not started') + + instance.on('end', t.pass.bind(null, 'end emitted')) + instance.resume() + + setImmediate(function () { + cloned.on('end', t.pass.bind(null, 'end emitted')) + cloned.resume() + }) +}) + +test('big file', function (t) { + t.plan(13) + + var stream = cloneable(fs.createReadStream(path.join(__dirname, 'big'))) + var hash = crypto.createHash('sha1') + hash.setEncoding('hex') + + var toCheck + + fs.createReadStream(path.join(__dirname, 'big')) + .pipe(hash) + .once('readable', function () { + toCheck = hash.read() + t.ok(toCheck) + }) + + function pipe (s, num) { + s.on('end', function () { + t.pass('end for ' + num) + }) + + var dest = path.join(__dirname, 'out') + + s.pipe(fs.createWriteStream(dest)) + .on('finish', function () { + t.pass('finish for ' + num) + + var destHash = crypto.createHash('sha1') + destHash.setEncoding('hex') + + fs.createReadStream(dest) + .pipe(destHash) + .once('readable', function () { + var hash = destHash.read() + t.ok(hash) + t.equal(hash, toCheck) + }) + }) + } + + // Pipe in another event loop tick <-- this one finished only, it's the original cloneable. + setImmediate(pipe.bind(null, stream, 1)) + + // Pipe in the same event loop tick + pipe(stream.clone(), 0) + + // Pipe a long time after + setTimeout(pipe.bind(null, stream.clone(), 2), 1000) +}) + +test('pump error', function (t) { + t.plan(1) + + var err = new Error('kaboom') + + pump([ + cloneable(from(function () { + this.destroy(err) + })), + sink(function (chunk, enc, cb) { + t.fail('this should not be called') + }) + ], function (_err) { + t.equal(_err, err) + }) +}) diff --git a/packages/字体精简工具/node_modules/code-point-at/index.js b/packages/字体精简工具/node_modules/code-point-at/index.js new file mode 100644 index 0000000..0432fe6 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point-at/index.js @@ -0,0 +1,32 @@ +/* eslint-disable babel/new-cap, xo/throw-new-error */ +'use strict'; +module.exports = function (str, pos) { + if (str === null || str === undefined) { + throw TypeError(); + } + + str = String(str); + + var size = str.length; + var i = pos ? Number(pos) : 0; + + if (Number.isNaN(i)) { + i = 0; + } + + if (i < 0 || i >= size) { + return undefined; + } + + var first = str.charCodeAt(i); + + if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { + var second = str.charCodeAt(i + 1); + + if (second >= 0xDC00 && second <= 0xDFFF) { + return ((first - 0xD800) * 0x400) + second - 0xDC00 + 0x10000; + } + } + + return first; +}; diff --git a/packages/字体精简工具/node_modules/code-point-at/license b/packages/字体精简工具/node_modules/code-point-at/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point-at/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/code-point-at/package.json b/packages/字体精简工具/node_modules/code-point-at/package.json new file mode 100644 index 0000000..43fe4bc --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point-at/package.json @@ -0,0 +1,70 @@ +{ + "_from": "code-point-at@^1.0.0", + "_id": "code-point-at@1.1.0", + "_inBundle": false, + "_integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "_location": "/code-point-at", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "code-point-at@^1.0.0", + "name": "code-point-at", + "escapedName": "code-point-at", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/string-width" + ], + "_resolved": "https://registry.nlark.com/code-point-at/download/code-point-at-1.1.0.tgz", + "_shasum": "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77", + "_spec": "code-point-at@^1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/code-point-at/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ES2015 `String#codePointAt()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "^0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/code-point-at#readme", + "keywords": [ + "es2015", + "ponyfill", + "polyfill", + "shim", + "string", + "str", + "code", + "point", + "at", + "codepoint", + "unicode" + ], + "license": "MIT", + "name": "code-point-at", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/code-point-at.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.1.0" +} diff --git a/packages/字体精简工具/node_modules/code-point-at/readme.md b/packages/字体精简工具/node_modules/code-point-at/readme.md new file mode 100644 index 0000000..4c97730 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point-at/readme.md @@ -0,0 +1,32 @@ +# code-point-at [![Build Status](https://travis-ci.org/sindresorhus/code-point-at.svg?branch=master)](https://travis-ci.org/sindresorhus/code-point-at) + +> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save code-point-at +``` + + +## Usage + +```js +var codePointAt = require('code-point-at'); + +codePointAt('🐴'); +//=> 128052 + +codePointAt('abc', 2); +//=> 99 +``` + +## API + +### codePointAt(input, [position]) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/packages/字体精简工具/node_modules/code-point/LICENSES.md b/packages/字体精简工具/node_modules/code-point/LICENSES.md new file mode 100644 index 0000000..fc89ff0 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point/LICENSES.md @@ -0,0 +1,56 @@ +# Licenses + +### String.prototype.codePointAt + + + +(The MIT License) + +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +### code-point.js + + + +(The MIT License) + +Copyright (c) 2014 - 2016 Shinnosuke Watanabe + + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/code-point/README.md b/packages/字体精简工具/node_modules/code-point/README.md new file mode 100644 index 0000000..86c7d53 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point/README.md @@ -0,0 +1,75 @@ +# code-point.js + +[![NPM version](https://img.shields.io/npm/v/code-point.svg)](https://www.npmjs.com/package/code-point) +[![Bower version](https://img.shields.io/bower/v/code-point.svg)](https://github.com/shinnn/code-point.js/releases) +[![Build Status](https://travis-ci.org/shinnn/code-point.js.svg?branch=master)](https://travis-ci.org/shinnn/code-point.js) +[![Coverage Status](https://img.shields.io/coveralls/shinnn/code-point.js.svg)](https://coveralls.io/r/shinnn/code-point.js) +[![devDependency Status](https://david-dm.org/shinnn/code-point.js/dev-status.svg)](https://david-dm.org/shinnn/code-point.js#info=devDependencies) + +Get a [UTF-16](https://wikipedia.org/wiki/UTF-16)-encoded code point number of a character + +```javascript +'A'.charCodeAt(0); //=> 65 +codePoint('A'); //=> 65 + +'嶲'.charCodeAt(0); //=> 55422 +codePoint('嶲'); //=> 195060 +``` + +## Installation + +### Package managers + +#### [npm](https://www.npmjs.com/) + +``` +npm install code-point +``` + +#### [Bower](http://bower.io/) + +``` +bower install code-point +``` + +### Standalone + +[Download the script file directly.](https://raw.githubusercontent.com/shinnn/code-point.js/master/browser.js) + +## API + +### codePoint(*character*) + +*character*: `String` +Return: `Number` + +If it takes a string as an argument, it returns the same result of `character.codePointAt(0)`. + +It throws an error if the argument is not a string or the string is empty. + +```javascript +codePoint('\udada'); //=> 56026 +codePoint('\udada\udfdf'); //=> 814047 +``` + +It works correctly even in ECMAScript <= 5 environments that don't support [`String.prototype.codePointAt`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt). + +## Credit + +This module includes the code of [mathiasbynens](https://github.com/mathiasbynens) / [String.prototype.codePointAt](https://github.com/mathiasbynens/String.prototype.codePointAt). Thanks, [Mathias Bynens][mathias]. + +## Licenses + +### [String.prototype.codePointAt](https://github.com/mathiasbynens/String.prototype.codePointAt#license) + +Author: [Mathias Bynens][mathias] + +> This polyfill is available under the [MIT](https://opensource.org/licenses/mit-license) license. + +### code-point.js + +Copyright (c) 2014 - 2016 [Shinnosuke Watanabe](https://github.com/shinnn) + +Licensed under [the MIT License](https://github.com/shinnn/code-point/blob/master/LICENSES.md#code-pointjs). + +[mathias]: https://mathiasbynens.be/ diff --git a/packages/字体精简工具/node_modules/code-point/index.js b/packages/字体精简工具/node_modules/code-point/index.js new file mode 100644 index 0000000..24a1bfa --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point/index.js @@ -0,0 +1,36 @@ +/*! + * String.prototype.codePointAt v0.2.0 | MIT (c) Mathias Bynens (@mathias) + * http://mths.be/codepointat + * + * code-point | MIT (c) Shinnosuke Watanabe + * https://github.com/shinnn/code-point.js +*/ +'use strict'; + +var getCodePoint = typeof String.prototype.codePointAt === 'function' ? function getCodePoint(str) { + return str.codePointAt(0); +} : function getCodePoint(str) { + var first = str.charCodeAt(0); + + if (first >= 0xD800 && first <= 0xDBFF && str.length > 1) { + var second = str.charCodeAt(1); + + if (second >= 0xDC00 && second <= 0xDFFF) { + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + + return first; +}; + +module.exports = function codePoint(str) { + if (typeof str !== 'string') { + throw new TypeError(String(str) + ' is not a string. Argument must be a string.'); + } + + if (str.length === 0) { + throw new Error('Argument must be a non-empty string.'); + } + + return getCodePoint(str); +}; diff --git a/packages/字体精简工具/node_modules/code-point/index.jsnext.js b/packages/字体精简工具/node_modules/code-point/index.jsnext.js new file mode 100644 index 0000000..c6b180e --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point/index.jsnext.js @@ -0,0 +1,34 @@ +/*! + * String.prototype.codePointAt v0.2.0 | MIT (c) Mathias Bynens (@mathias) + * http://mths.be/codepointat + * + * code-point | MIT (c) Shinnosuke Watanabe + * https://github.com/shinnn/code-point.js +*/ +var getCodePoint = typeof String.prototype.codePointAt === 'function' ? function getCodePoint(str) { + return str.codePointAt(0); +} : function getCodePoint(str) { + var first = str.charCodeAt(0); + + if (first >= 0xD800 && first <= 0xDBFF && str.length > 1) { + var second = str.charCodeAt(1); + + if (second >= 0xDC00 && second <= 0xDFFF) { + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + + return first; +}; + +export default function codePoint(str) { + if (typeof str !== 'string') { + throw new TypeError(String(str) + ' is not a string. Argument must be a string.'); + } + + if (str.length === 0) { + throw new Error('Argument must be a non-empty string.'); + } + + return getCodePoint(str); +} diff --git a/packages/字体精简工具/node_modules/code-point/package.json b/packages/字体精简工具/node_modules/code-point/package.json new file mode 100644 index 0000000..074769a --- /dev/null +++ b/packages/字体精简工具/node_modules/code-point/package.json @@ -0,0 +1,76 @@ +{ + "_from": "code-point@^1.0.1", + "_id": "code-point@1.1.0", + "_inBundle": false, + "_integrity": "sha1-mZhB9R9UzK5KDau8hpBjI0YD/s0=", + "_location": "/code-point", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "code-point@^1.0.1", + "name": "code-point", + "escapedName": "code-point", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/code-points" + ], + "_resolved": "https://registry.npm.taobao.org/code-point/download/code-point-1.1.0.tgz", + "_shasum": "999841f51f54ccae4a0dabbc869063234603fecd", + "_spec": "code-point@^1.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\code-points", + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "bugs": { + "url": "https://github.com/shinnn/code-point.js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Get a UTF-16-encoded code point number of a character", + "devDependencies": { + "@shinnn/eslint-config": "^2.3.0", + "eslint": "^2.11.1", + "require-from-string": "^1.2.0", + "rollup": "^0.26.3", + "tap": "^5.7.2" + }, + "files": [ + "index.js", + "index.jsnext.js", + "LICENSES.md" + ], + "homepage": "https://github.com/shinnn/code-point.js#readme", + "jsnext:main": "index.jsnext.js", + "keywords": [ + "code", + "point", + "code-point", + "string", + "char", + "character", + "unicode", + "utf16", + "utf-16", + "codepointat", + "surrogate", + "plane", + "browser", + "client-side" + ], + "license": "MIT", + "name": "code-point", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/code-point.js.git" + }, + "scripts": { + "pretest": "eslint --fix --config @shinnn --ignore-path .gitignore .", + "test": "tap --node-arg=--strong_mode --coverage test.js test-es5.js" + }, + "version": "1.1.0" +} diff --git a/packages/字体精简工具/node_modules/code-points/LICENSE b/packages/字体精简工具/node_modules/code-points/LICENSE new file mode 100644 index 0000000..5882f81 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-points/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 - 2019 Shinnosuke Watanabe + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/code-points/README.md b/packages/字体精简工具/node_modules/code-points/README.md new file mode 100644 index 0000000..2f1366c --- /dev/null +++ b/packages/字体精简工具/node_modules/code-points/README.md @@ -0,0 +1,53 @@ +# code-points + +[![npm version](https://img.shields.io/npm/v/code-points.svg)](https://www.npmjs.com/package/code-points) +[![Build Status](https://travis-ci.com/shinnn/code-points.js.svg?branch=master)](https://travis-ci.com/shinnn/code-points.js) +[![Coverage Status](https://img.shields.io/coveralls/shinnn/code-points.js.svg)](https://coveralls.io/github/shinnn/code-points.js) + +Get the [UTF-16](https://wikipedia.org/wiki/UTF-16)-encoded code points of each character in the string + +```javascript +codePoints('Hello, 世界\n'); //=> [72, 101, 108, 108, 111, 44, 32, 19990, 30028] +``` + +## Installation + +[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/). + +``` +npm install code-points +``` + +## API + +### codePoints(*str*, *option*) + +*str*: `string` +*option*: `Object` +Return: `Array` + +It returns the [code point](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)s of each character in the string as an array. + +```javascript +codePoints('\udada'); //=> [56026] +codePoints('\udfdf\udada\udada'); //=> [57311, 56026, 56026] +codePoints('\udada\udfdf\udada'); //=> [814047, 56026] +``` + +#### option.unique + +Type: `boolean` +Default: `false` + +Removes duplicates from result. + +```javascript +codePoints('banana'); //=> [98, 97, 110, 97, 110, 97] +codePoints('banana', {unique: true}); //=> [98,97,110] +``` + +## License + +Copyright (c) 2014 - 2019 [Shinnosuke Watanabe](https://github.com/shinnn) + +Licensed under [the MIT License](https://github.com/shinnn/code-points/blob/master/LICENSE). diff --git a/packages/字体精简工具/node_modules/code-points/dist/code-points-cjs.js b/packages/字体精简工具/node_modules/code-points/dist/code-points-cjs.js new file mode 100644 index 0000000..c671e24 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-points/dist/code-points-cjs.js @@ -0,0 +1,40 @@ +/*! + * code-points | MIT (c) Shinnosuke Watanabe + * https://github.com/shinnn/code-points.js +*/ +function codePoints(str, option) { + 'use strict'; + + option = option || {unique: false}; + + if (typeof str !== 'string') { + throw new TypeError( + str + + ' is not a string. First argument to code-points must be a string.' + ); + } + + var result = []; + + var index = 0; + while (index < str.length) { + var point = codePoint(str.charAt(index) + str.charAt(index + 1)); + + if (point > 0xffff) { + index += 2; + } else { + index += 1; + } + + if (option.unique && result.indexOf(point) !== -1) { + continue; + } + + result.push(point); + } + + return result; +} + +var codePoint = require('code-point'); +module.exports = codePoints; diff --git a/packages/字体精简工具/node_modules/code-points/package.json b/packages/字体精简工具/node_modules/code-points/package.json new file mode 100644 index 0000000..7842fb0 --- /dev/null +++ b/packages/字体精简工具/node_modules/code-points/package.json @@ -0,0 +1,94 @@ +{ + "_from": "code-points@^2.0.0-1", + "_id": "code-points@2.0.0-1", + "_inBundle": false, + "_integrity": "sha1-AcI72nDPRe9XclkMOri6T4d09Yo=", + "_location": "/code-points", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "code-points@^2.0.0-1", + "name": "code-points", + "escapedName": "code-points", + "rawSpec": "^2.0.0-1", + "saveSpec": null, + "fetchSpec": "^2.0.0-1" + }, + "_requiredBy": [ + "/fontmin" + ], + "_resolved": "https://registry.npm.taobao.org/code-points/download/code-points-2.0.0-1.tgz", + "_shasum": "01c23bda70cf45ef5772590c3ab8ba4f8774f58a", + "_spec": "code-points@^2.0.0-1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\fontmin", + "author": { + "name": "Shinnosuke Watanabe", + "url": "https://github.com/shinnn" + }, + "bugs": { + "url": "https://github.com/shinnn/code-points.js/issues" + }, + "bundleDependencies": false, + "dependencies": { + "code-point": "^1.0.1" + }, + "deprecated": false, + "description": "Get the code points of each character in the string", + "devDependencies": { + "gulp": "^3.8.11", + "gulp-footer": "^1.0.5", + "gulp-header": "^1.2.2", + "gulp-jscs": "^1.6.0", + "gulp-jshint": "^1.11.0", + "gulp-jsonlint": "^1.0.1", + "gulp-load-plugins": "^0.10.0", + "gulp-rename": "^1.2.2", + "gulp-replace": "^0.5.3", + "istanbul": "^0.3.14", + "istanbul-coveralls": "^1.0.2", + "jshint-stylish": "^2.0.0", + "merge-stream": "^0.1.7", + "rimraf": "^2.3.4", + "tape": "^4.0.0", + "tiny-npm-license": "^1.0.0", + "to-camel-case": "^0.2.1" + }, + "files": [ + "dist/code-points-cjs.js" + ], + "homepage": "https://github.com/shinnn/code-points.js#readme", + "jscsConfig": { + "preset": "google", + "maximumLineLength": 98, + "requireBlocksOnNewline": true, + "validateLineBreaks": "LF" + }, + "keywords": [ + "code", + "point", + "code-point", + "string", + "char", + "character", + "unicode", + "utf16", + "utf-16", + "codepointat", + "surrogate", + "plane" + ], + "license": "MIT", + "main": "dist/code-points-cjs.js", + "name": "code-points", + "repository": { + "type": "git", + "url": "git+https://github.com/shinnn/code-points.js.git" + }, + "scripts": { + "coverage": "istanbul cover test.js", + "coveralls": "${npm_package_scripts_coverage} && istanbul-coveralls", + "test": "gulp test" + }, + "version": "2.0.0-1" +} diff --git a/packages/字体精简工具/node_modules/combined-stream/License b/packages/字体精简工具/node_modules/combined-stream/License new file mode 100644 index 0000000..4804b7a --- /dev/null +++ b/packages/字体精简工具/node_modules/combined-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/combined-stream/Readme.md b/packages/字体精简工具/node_modules/combined-stream/Readme.md new file mode 100644 index 0000000..9e367b5 --- /dev/null +++ b/packages/字体精简工具/node_modules/combined-stream/Readme.md @@ -0,0 +1,138 @@ +# combined-stream + +A stream that emits multiple other streams one after another. + +**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. + +- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. + +- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. + +## Installation + +``` bash +npm install combined-stream +``` + +## Usage + +Here is a simple example that shows how you can use combined-stream to combine +two files into one: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +While the example above works great, it will pause all source streams until +they are needed. If you don't want that to happen, you can set `pauseStreams` +to `false`: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create({pauseStreams: false}); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +However, what if you don't have all the source streams yet, or you don't want +to allocate the resources (file descriptors, memory, etc.) for them right away? +Well, in that case you can simply provide a callback that supplies the stream +by calling a `next()` function: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(function(next) { + next(fs.createReadStream('file1.txt')); +}); +combinedStream.append(function(next) { + next(fs.createReadStream('file2.txt')); +}); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +## API + +### CombinedStream.create([options]) + +Returns a new combined stream object. Available options are: + +* `maxDataSize` +* `pauseStreams` + +The effect of those options is described below. + +### combinedStream.pauseStreams = `true` + +Whether to apply back pressure to the underlaying streams. If set to `false`, +the underlaying streams will never be paused. If set to `true`, the +underlaying streams will be paused right after being appended, as well as when +`delayedStream.pipe()` wants to throttle. + +### combinedStream.maxDataSize = `2 * 1024 * 1024` + +The maximum amount of bytes (or characters) to buffer for all source streams. +If this value is exceeded, `combinedStream` emits an `'error'` event. + +### combinedStream.dataSize = `0` + +The amount of bytes (or characters) currently buffered by `combinedStream`. + +### combinedStream.append(stream) + +Appends the given `stream` to the combinedStream object. If `pauseStreams` is +set to `true, this stream will also be paused right away. + +`streams` can also be a function that takes one parameter called `next`. `next` +is a function that must be invoked in order to provide the `next` stream, see +example above. + +Regardless of how the `stream` is appended, combined-stream always attaches an +`'error'` listener to it, so you don't have to do that manually. + +Special case: `stream` can also be a String or Buffer. + +### combinedStream.write(data) + +You should not call this, `combinedStream` takes care of piping the appended +streams into itself for you. + +### combinedStream.resume() + +Causes `combinedStream` to start drain the streams it manages. The function is +idempotent, and also emits a `'resume'` event each time which usually goes to +the stream that is currently being drained. + +### combinedStream.pause(); + +If `combinedStream.pauseStreams` is set to `false`, this does nothing. +Otherwise a `'pause'` event is emitted, this goes to the stream that is +currently being drained, so you can use it to apply back pressure. + +### combinedStream.end(); + +Sets `combinedStream.writable` to false, emits an `'end'` event, and removes +all streams from the queue. + +### combinedStream.destroy(); + +Same as `combinedStream.end()`, except it emits a `'close'` event instead of +`'end'`. + +## License + +combined-stream is licensed under the MIT license. diff --git a/packages/字体精简工具/node_modules/combined-stream/lib/combined_stream.js b/packages/字体精简工具/node_modules/combined-stream/lib/combined_stream.js new file mode 100644 index 0000000..125f097 --- /dev/null +++ b/packages/字体精简工具/node_modules/combined-stream/lib/combined_stream.js @@ -0,0 +1,208 @@ +var util = require('util'); +var Stream = require('stream').Stream; +var DelayedStream = require('delayed-stream'); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; diff --git a/packages/字体精简工具/node_modules/combined-stream/package.json b/packages/字体精简工具/node_modules/combined-stream/package.json new file mode 100644 index 0000000..4335357 --- /dev/null +++ b/packages/字体精简工具/node_modules/combined-stream/package.json @@ -0,0 +1,58 @@ +{ + "_from": "combined-stream@~1.0.6", + "_id": "combined-stream@1.0.8", + "_inBundle": false, + "_integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", + "_location": "/combined-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "combined-stream@~1.0.6", + "name": "combined-stream", + "escapedName": "combined-stream", + "rawSpec": "~1.0.6", + "saveSpec": null, + "fetchSpec": "~1.0.6" + }, + "_requiredBy": [ + "/form-data", + "/request" + ], + "_resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz", + "_shasum": "c3d45a8b34fd730631a110a8a2520682b31d5a7f", + "_spec": "combined-stream@~1.0.6", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\request", + "author": { + "name": "Felix Geisendörfer", + "email": "felix@debuggable.com", + "url": "http://debuggable.com/" + }, + "bugs": { + "url": "https://github.com/felixge/node-combined-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "deprecated": false, + "description": "A stream that emits multiple other streams one after another.", + "devDependencies": { + "far": "~0.0.7" + }, + "engines": { + "node": ">= 0.8" + }, + "homepage": "https://github.com/felixge/node-combined-stream", + "license": "MIT", + "main": "./lib/combined_stream", + "name": "combined-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-combined-stream.git" + }, + "scripts": { + "test": "node test/run.js" + }, + "version": "1.0.8" +} diff --git a/packages/字体精简工具/node_modules/combined-stream/yarn.lock b/packages/字体精简工具/node_modules/combined-stream/yarn.lock new file mode 100644 index 0000000..7edf418 --- /dev/null +++ b/packages/字体精简工具/node_modules/combined-stream/yarn.lock @@ -0,0 +1,17 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +far@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" + dependencies: + oop "0.0.3" + +oop@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/packages/字体精简工具/node_modules/concat-map/.travis.yml b/packages/字体精简工具/node_modules/concat-map/.travis.yml new file mode 100644 index 0000000..f1d0f13 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/packages/字体精简工具/node_modules/concat-map/LICENSE b/packages/字体精简工具/node_modules/concat-map/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/concat-map/README.markdown b/packages/字体精简工具/node_modules/concat-map/README.markdown new file mode 100644 index 0000000..408f70a --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/packages/字体精简工具/node_modules/concat-map/example/map.js b/packages/字体精简工具/node_modules/concat-map/example/map.js new file mode 100644 index 0000000..3365621 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/packages/字体精简工具/node_modules/concat-map/index.js b/packages/字体精简工具/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/packages/字体精简工具/node_modules/concat-map/package.json b/packages/字体精简工具/node_modules/concat-map/package.json new file mode 100644 index 0000000..f2d9c58 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/package.json @@ -0,0 +1,88 @@ +{ + "_from": "concat-map@0.0.1", + "_id": "concat-map@0.0.1", + "_inBundle": false, + "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "_location": "/concat-map", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "concat-map@0.0.1", + "name": "concat-map", + "escapedName": "concat-map", + "rawSpec": "0.0.1", + "saveSpec": null, + "fetchSpec": "0.0.1" + }, + "_requiredBy": [ + "/brace-expansion" + ], + "_resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_spec": "concat-map@0.0.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\brace-expansion", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "concatenative mapdashery", + "devDependencies": { + "tape": "~2.4.0" + }, + "directories": { + "example": "example", + "test": "test" + }, + "homepage": "https://github.com/substack/node-concat-map#readme", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "license": "MIT", + "main": "index.js", + "name": "concat-map", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "0.0.1" +} diff --git a/packages/字体精简工具/node_modules/concat-map/test/map.js b/packages/字体精简工具/node_modules/concat-map/test/map.js new file mode 100644 index 0000000..fdbd702 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/packages/字体精简工具/node_modules/concat-stream/LICENSE b/packages/字体精简工具/node_modules/concat-stream/LICENSE new file mode 100644 index 0000000..99c130e --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-stream/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Max Ogden + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/concat-stream/index.js b/packages/字体精简工具/node_modules/concat-stream/index.js new file mode 100644 index 0000000..dd672a7 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-stream/index.js @@ -0,0 +1,144 @@ +var Writable = require('readable-stream').Writable +var inherits = require('inherits') +var bufferFrom = require('buffer-from') + +if (typeof Uint8Array === 'undefined') { + var U8 = require('typedarray').Uint8Array +} else { + var U8 = Uint8Array +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts + opts = {} + } + if (!opts) opts = {} + + var encoding = opts.encoding + var shouldInferEncoding = false + + if (!encoding) { + shouldInferEncoding = true + } else { + encoding = String(encoding).toLowerCase() + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array' + } + } + + Writable.call(this, { objectMode: true }) + + this.encoding = encoding + this.shouldInferEncoding = shouldInferEncoding + + if (cb) this.on('finish', function () { cb(this.getBody()) }) + this.body = [] +} + +module.exports = ConcatStream +inherits(ConcatStream, Writable) + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk) + next() +} + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +} + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding() + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +} + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]' +} + +function isArrayish (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function isBufferish (p) { + return typeof p === 'string' || isArrayish(p) || (p && typeof p.subarray === 'function') +} + +function stringConcat (parts) { + var strings = [] + var needsToString = false + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (typeof p === 'string') { + strings.push(p) + } else if (Buffer.isBuffer(p)) { + strings.push(p) + } else if (isBufferish(p)) { + strings.push(bufferFrom(p)) + } else { + strings.push(bufferFrom(String(p))) + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings) + strings = strings.toString('utf8') + } else { + strings = strings.join('') + } + return strings +} + +function bufferConcat (parts) { + var bufs = [] + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (Buffer.isBuffer(p)) { + bufs.push(p) + } else if (isBufferish(p)) { + bufs.push(bufferFrom(p)) + } else { + bufs.push(bufferFrom(String(p))) + } + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = [] + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]) + } + return res +} + +function u8Concat (parts) { + var len = 0 + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = bufferFrom(parts[i]) + } + len += parts[i].length + } + var u8 = new U8(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j] + } + } + return u8 +} diff --git a/packages/字体精简工具/node_modules/concat-stream/package.json b/packages/字体精简工具/node_modules/concat-stream/package.json new file mode 100644 index 0000000..a434f60 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-stream/package.json @@ -0,0 +1,85 @@ +{ + "_from": "concat-stream@^1.6.2", + "_id": "concat-stream@1.6.2", + "_inBundle": false, + "_integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", + "_location": "/concat-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "concat-stream@^1.6.2", + "name": "concat-stream", + "escapedName": "concat-stream", + "rawSpec": "^1.6.2", + "saveSpec": null, + "fetchSpec": "^1.6.2" + }, + "_requiredBy": [ + "/fontmin", + "/gulp/gulp-cli" + ], + "_resolved": "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz", + "_shasum": "904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34", + "_spec": "concat-stream@^1.6.2", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\fontmin", + "author": { + "name": "Max Ogden", + "email": "max@maxogden.com" + }, + "bugs": { + "url": "http://github.com/maxogden/concat-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "deprecated": false, + "description": "writable stream that concatenates strings or binary data and calls a callback with the result", + "devDependencies": { + "tape": "^4.6.3" + }, + "engines": [ + "node >= 0.8" + ], + "files": [ + "index.js" + ], + "homepage": "https://github.com/maxogden/concat-stream#readme", + "license": "MIT", + "main": "index.js", + "name": "concat-stream", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/maxogden/concat-stream.git" + }, + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "tags": [ + "stream", + "simple", + "util", + "utility" + ], + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.6.2" +} diff --git a/packages/字体精简工具/node_modules/concat-stream/readme.md b/packages/字体精简工具/node_modules/concat-stream/readme.md new file mode 100644 index 0000000..7aa19c4 --- /dev/null +++ b/packages/字体精简工具/node_modules/concat-stream/readme.md @@ -0,0 +1,102 @@ +# concat-stream + +Writable stream that concatenates all the data from a stream and calls a callback with the result. Use this when you want to collect all the data from a stream into a single buffer. + +[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) + +[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) + +### description + +Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. + +Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). + +There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. + +## Related + +`concat-stream` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. + +### examples + +#### Buffers + +```js +var fs = require('fs') +var concat = require('concat-stream') + +var readStream = fs.createReadStream('cat.png') +var concatStream = concat(gotPicture) + +readStream.on('error', handleError) +readStream.pipe(concatStream) + +function gotPicture(imageBuffer) { + // imageBuffer is all of `cat.png` as a node.js Buffer +} + +function handleError(err) { + // handle your error appropriately here, e.g.: + console.error(err) // print the error to STDERR + process.exit(1) // exit program with non-zero exit code +} + +``` + +#### Arrays + +```js +var write = concat(function(data) {}) +write.write([1,2,3]) +write.write([4,5,6]) +write.end() +// data will be [1,2,3,4,5,6] in the above callback +``` + +#### Uint8Arrays + +```js +var write = concat(function(data) {}) +var a = new Uint8Array(3) +a[0] = 97; a[1] = 98; a[2] = 99 +write.write(a) +write.write('!') +write.end(Buffer.from('!!1')) +``` + +See `test/` for more examples + +# methods + +```js +var concat = require('concat-stream') +``` + +## var writable = concat(opts={}, cb) + +Return a `writable` stream that will fire `cb(data)` with all of the data that +was written to the stream. Data can be written to `writable` as strings, +Buffers, arrays of byte integers, and Uint8Arrays. + +By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. + +* `string` - get a string +* `buffer` - get back a Buffer +* `array` - get an array of byte integers +* `uint8array`, `u8`, `uint8` - get back a Uint8Array +* `object`, get back an array of Objects + +If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. + +If nothing is written to `writable` then `data` will be an empty array `[]`. + +# error handling + +`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. + +We recommend using [`end-of-stream`](https://npmjs.org/end-of-stream) or [`pump`](https://npmjs.org/pump) for writing error tolerant stream code. + +# license + +MIT LICENSE diff --git a/packages/字体精简工具/node_modules/console-control-strings/LICENSE b/packages/字体精简工具/node_modules/console-control-strings/LICENSE new file mode 100644 index 0000000..e756052 --- /dev/null +++ b/packages/字体精简工具/node_modules/console-control-strings/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2014, Rebecca Turner + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/字体精简工具/node_modules/console-control-strings/README.md b/packages/字体精简工具/node_modules/console-control-strings/README.md new file mode 100644 index 0000000..f58cc8d --- /dev/null +++ b/packages/字体精简工具/node_modules/console-control-strings/README.md @@ -0,0 +1,145 @@ +# Console Control Strings + +A library of cross-platform tested terminal/console command strings for +doing things like color and cursor positioning. This is a subset of both +ansi and vt100. All control codes included work on both Windows & Unix-like +OSes, except where noted. + +## Usage + +```js +var consoleControl = require('console-control-strings') + +console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset')) +process.stdout.write(consoleControl.goto(75, 10)) +``` + +## Why Another? + +There are tons of libraries similar to this one. I wanted one that was: + +1. Very clear about compatibility goals. +2. Could emit, for instance, a start color code without an end one. +3. Returned strings w/o writing to streams. +4. Was not weighed down with other unrelated baggage. + +## Functions + +### var code = consoleControl.up(_num = 1_) + +Returns the escape sequence to move _num_ lines up. + +### var code = consoleControl.down(_num = 1_) + +Returns the escape sequence to move _num_ lines down. + +### var code = consoleControl.forward(_num = 1_) + +Returns the escape sequence to move _num_ lines righ. + +### var code = consoleControl.back(_num = 1_) + +Returns the escape sequence to move _num_ lines left. + +### var code = consoleControl.nextLine(_num = 1_) + +Returns the escape sequence to move _num_ lines down and to the beginning of +the line. + +### var code = consoleControl.previousLine(_num = 1_) + +Returns the escape sequence to move _num_ lines up and to the beginning of +the line. + +### var code = consoleControl.eraseData() + +Returns the escape sequence to erase everything from the current cursor +position to the bottom right of the screen. This is line based, so it +erases the remainder of the current line and all following lines. + +### var code = consoleControl.eraseLine() + +Returns the escape sequence to erase to the end of the current line. + +### var code = consoleControl.goto(_x_, _y_) + +Returns the escape sequence to move the cursor to the designated position. +Note that the origin is _1, 1_ not _0, 0_. + +### var code = consoleControl.gotoSOL() + +Returns the escape sequence to move the cursor to the beginning of the +current line. (That is, it returns a carriage return, `\r`.) + +### var code = consoleControl.beep() + +Returns the escape sequence to cause the termianl to beep. (That is, it +returns unicode character `\x0007`, a Control-G.) + +### var code = consoleControl.hideCursor() + +Returns the escape sequence to hide the cursor. + +### var code = consoleControl.showCursor() + +Returns the escape sequence to show the cursor. + +### var code = consoleControl.color(_colors = []_) + +### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_) + +Returns the escape sequence to set the current terminal display attributes +(mostly colors). Arguments can either be a list of attributes or an array +of attributes. The difference between passing in an array or list of colors +and calling `.color` separately for each one, is that in the former case a +single escape sequence will be produced where as in the latter each change +will have its own distinct escape sequence. Each attribute can be one of: + +* Reset: + * **reset** – Reset all attributes to the terminal default. +* Styles: + * **bold** – Display text as bold. In some terminals this means using a + bold font, in others this means changing the color. In some it means + both. + * **italic** – Display text as italic. This is not available in most Windows terminals. + * **underline** – Underline text. This is not available in most Windows Terminals. + * **inverse** – Invert the foreground and background colors. + * **stopBold** – Do not display text as bold. + * **stopItalic** – Do not display text as italic. + * **stopUnderline** – Do not underline text. + * **stopInverse** – Do not invert foreground and background. +* Colors: + * **white** + * **black** + * **blue** + * **cyan** + * **green** + * **magenta** + * **red** + * **yellow** + * **grey** / **brightBlack** + * **brightRed** + * **brightGreen** + * **brightYellow** + * **brightBlue** + * **brightMagenta** + * **brightCyan** + * **brightWhite** +* Background Colors: + * **bgWhite** + * **bgBlack** + * **bgBlue** + * **bgCyan** + * **bgGreen** + * **bgMagenta** + * **bgRed** + * **bgYellow** + * **bgGrey** / **bgBrightBlack** + * **bgBrightRed** + * **bgBrightGreen** + * **bgBrightYellow** + * **bgBrightBlue** + * **bgBrightMagenta** + * **bgBrightCyan** + * **bgBrightWhite** + diff --git a/packages/字体精简工具/node_modules/console-control-strings/README.md~ b/packages/字体精简工具/node_modules/console-control-strings/README.md~ new file mode 100644 index 0000000..6eb34e8 --- /dev/null +++ b/packages/字体精简工具/node_modules/console-control-strings/README.md~ @@ -0,0 +1,140 @@ +# Console Control Strings + +A library of cross-platform tested terminal/console command strings for +doing things like color and cursor positioning. This is a subset of both +ansi and vt100. All control codes included work on both Windows & Unix-like +OSes, except where noted. + +## Usage + +```js +var consoleControl = require('console-control-strings') + +console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset')) +process.stdout.write(consoleControl.goto(75, 10)) +``` + +## Why Another? + +There are tons of libraries similar to this one. I wanted one that was: + +1. Very clear about compatibility goals. +2. Could emit, for instance, a start color code without an end one. +3. Returned strings w/o writing to streams. +4. Was not weighed down with other unrelated baggage. + +## Functions + +### var code = consoleControl.up(_num = 1_) + +Returns the escape sequence to move _num_ lines up. + +### var code = consoleControl.down(_num = 1_) + +Returns the escape sequence to move _num_ lines down. + +### var code = consoleControl.forward(_num = 1_) + +Returns the escape sequence to move _num_ lines righ. + +### var code = consoleControl.back(_num = 1_) + +Returns the escape sequence to move _num_ lines left. + +### var code = consoleControl.nextLine(_num = 1_) + +Returns the escape sequence to move _num_ lines down and to the beginning of +the line. + +### var code = consoleControl.previousLine(_num = 1_) + +Returns the escape sequence to move _num_ lines up and to the beginning of +the line. + +### var code = consoleControl.eraseData() + +Returns the escape sequence to erase everything from the current cursor +position to the bottom right of the screen. This is line based, so it +erases the remainder of the current line and all following lines. + +### var code = consoleControl.eraseLine() + +Returns the escape sequence to erase to the end of the current line. + +### var code = consoleControl.goto(_x_, _y_) + +Returns the escape sequence to move the cursor to the designated position. +Note that the origin is _1, 1_ not _0, 0_. + +### var code = consoleControl.gotoSOL() + +Returns the escape sequence to move the cursor to the beginning of the +current line. (That is, it returns a carriage return, `\r`.) + +### var code = consoleControl.hideCursor() + +Returns the escape sequence to hide the cursor. + +### var code = consoleControl.showCursor() + +Returns the escape sequence to show the cursor. + +### var code = consoleControl.color(_colors = []_) + +### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_) + +Returns the escape sequence to set the current terminal display attributes +(mostly colors). Arguments can either be a list of attributes or an array +of attributes. The difference between passing in an array or list of colors +and calling `.color` separately for each one, is that in the former case a +single escape sequence will be produced where as in the latter each change +will have its own distinct escape sequence. Each attribute can be one of: + +* Reset: + * **reset** – Reset all attributes to the terminal default. +* Styles: + * **bold** – Display text as bold. In some terminals this means using a + bold font, in others this means changing the color. In some it means + both. + * **italic** – Display text as italic. This is not available in most Windows terminals. + * **underline** – Underline text. This is not available in most Windows Terminals. + * **inverse** – Invert the foreground and background colors. + * **stopBold** – Do not display text as bold. + * **stopItalic** – Do not display text as italic. + * **stopUnderline** – Do not underline text. + * **stopInverse** – Do not invert foreground and background. +* Colors: + * **white** + * **black** + * **blue** + * **cyan** + * **green** + * **magenta** + * **red** + * **yellow** + * **grey** / **brightBlack** + * **brightRed** + * **brightGreen** + * **brightYellow** + * **brightBlue** + * **brightMagenta** + * **brightCyan** + * **brightWhite** +* Background Colors: + * **bgWhite** + * **bgBlack** + * **bgBlue** + * **bgCyan** + * **bgGreen** + * **bgMagenta** + * **bgRed** + * **bgYellow** + * **bgGrey** / **bgBrightBlack** + * **bgBrightRed** + * **bgBrightGreen** + * **bgBrightYellow** + * **bgBrightBlue** + * **bgBrightMagenta** + * **bgBrightCyan** + * **bgBrightWhite** + diff --git a/packages/字体精简工具/node_modules/console-control-strings/index.js b/packages/字体精简工具/node_modules/console-control-strings/index.js new file mode 100644 index 0000000..bf89034 --- /dev/null +++ b/packages/字体精简工具/node_modules/console-control-strings/index.js @@ -0,0 +1,125 @@ +'use strict' + +// These tables borrowed from `ansi` + +var prefix = '\x1b[' + +exports.up = function up (num) { + return prefix + (num || '') + 'A' +} + +exports.down = function down (num) { + return prefix + (num || '') + 'B' +} + +exports.forward = function forward (num) { + return prefix + (num || '') + 'C' +} + +exports.back = function back (num) { + return prefix + (num || '') + 'D' +} + +exports.nextLine = function nextLine (num) { + return prefix + (num || '') + 'E' +} + +exports.previousLine = function previousLine (num) { + return prefix + (num || '') + 'F' +} + +exports.horizontalAbsolute = function horizontalAbsolute (num) { + if (num == null) throw new Error('horizontalAboslute requires a column to position to') + return prefix + num + 'G' +} + +exports.eraseData = function eraseData () { + return prefix + 'J' +} + +exports.eraseLine = function eraseLine () { + return prefix + 'K' +} + +exports.goto = function (x, y) { + return prefix + y + ';' + x + 'H' +} + +exports.gotoSOL = function () { + return '\r' +} + +exports.beep = function () { + return '\x07' +} + +exports.hideCursor = function hideCursor () { + return prefix + '?25l' +} + +exports.showCursor = function showCursor () { + return prefix + '?25h' +} + +var colors = { + reset: 0, +// styles + bold: 1, + italic: 3, + underline: 4, + inverse: 7, +// resets + stopBold: 22, + stopItalic: 23, + stopUnderline: 24, + stopInverse: 27, +// colors + white: 37, + black: 30, + blue: 34, + cyan: 36, + green: 32, + magenta: 35, + red: 31, + yellow: 33, + bgWhite: 47, + bgBlack: 40, + bgBlue: 44, + bgCyan: 46, + bgGreen: 42, + bgMagenta: 45, + bgRed: 41, + bgYellow: 43, + + grey: 90, + brightBlack: 90, + brightRed: 91, + brightGreen: 92, + brightYellow: 93, + brightBlue: 94, + brightMagenta: 95, + brightCyan: 96, + brightWhite: 97, + + bgGrey: 100, + bgBrightBlack: 100, + bgBrightRed: 101, + bgBrightGreen: 102, + bgBrightYellow: 103, + bgBrightBlue: 104, + bgBrightMagenta: 105, + bgBrightCyan: 106, + bgBrightWhite: 107 +} + +exports.color = function color (colorWith) { + if (arguments.length !== 1 || !Array.isArray(colorWith)) { + colorWith = Array.prototype.slice.call(arguments) + } + return prefix + colorWith.map(colorNameToCode).join(';') + 'm' +} + +function colorNameToCode (color) { + if (colors[color] != null) return colors[color] + throw new Error('Unknown color or style name: ' + color) +} diff --git a/packages/字体精简工具/node_modules/console-control-strings/package.json b/packages/字体精简工具/node_modules/console-control-strings/package.json new file mode 100644 index 0000000..d9f47c0 --- /dev/null +++ b/packages/字体精简工具/node_modules/console-control-strings/package.json @@ -0,0 +1,61 @@ +{ + "_from": "console-control-strings@~1.1.0", + "_id": "console-control-strings@1.1.0", + "_inBundle": false, + "_integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "_location": "/console-control-strings", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "console-control-strings@~1.1.0", + "name": "console-control-strings", + "escapedName": "console-control-strings", + "rawSpec": "~1.1.0", + "saveSpec": null, + "fetchSpec": "~1.1.0" + }, + "_requiredBy": [ + "/gauge", + "/npmlog" + ], + "_resolved": "https://registry.nlark.com/console-control-strings/download/console-control-strings-1.1.0.tgz", + "_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e", + "_spec": "console-control-strings@~1.1.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\npmlog", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/console-control-strings/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.", + "devDependencies": { + "standard": "^7.1.2", + "tap": "^5.7.2" + }, + "directories": { + "test": "test" + }, + "files": [ + "LICENSE", + "index.js" + ], + "homepage": "https://github.com/iarna/console-control-strings#readme", + "keywords": [], + "license": "ISC", + "main": "index.js", + "name": "console-control-strings", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/console-control-strings.git" + }, + "scripts": { + "test": "standard && tap test/*.js" + }, + "version": "1.1.0" +} diff --git a/packages/字体精简工具/node_modules/convert-source-map/LICENSE b/packages/字体精简工具/node_modules/convert-source-map/LICENSE new file mode 100644 index 0000000..41702c5 --- /dev/null +++ b/packages/字体精简工具/node_modules/convert-source-map/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/convert-source-map/README.md b/packages/字体精简工具/node_modules/convert-source-map/README.md new file mode 100644 index 0000000..86b218e --- /dev/null +++ b/packages/字体精简工具/node_modules/convert-source-map/README.md @@ -0,0 +1,125 @@ +# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.svg?branch=master)](http://travis-ci.org/thlorenz/convert-source-map) + +become a patron + +Converts a source-map from/to different formats and allows adding/changing properties. + +```js +var convert = require('convert-source-map'); + +var json = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .toJSON(); + +var modified = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQvZm9vLm1pbi5qcyIsInNvdXJjZXMiOlsic3JjL2Zvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .setProperty('sources', [ 'SRC/FOO.JS' ]) + .toJSON(); + +console.log(json); +console.log(modified); +``` + +```json +{"version":3,"file":"build/foo.min.js","sources":["src/foo.js"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +{"version":3,"file":"build/foo.min.js","sources":["SRC/FOO.JS"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +``` + +## API + +### fromObject(obj) + +Returns source map converter from given object. + +### fromJSON(json) + +Returns source map converter from given json string. + +### fromBase64(base64) + +Returns source map converter from given base64 encoded json string. + +### fromComment(comment) + +Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. + +### fromMapFileComment(comment, mapFileDir) + +Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. + +`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the +generated file, i.e. the one containing the source map. + +### fromSource(source) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was found. + +### fromMapFileSource(source, mapFileDir) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was +found. + +The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see +fromMapFileComment. + +### toObject() + +Returns a copy of the underlying source map. + +### toJSON([space]) + +Converts source map to json string. If `space` is given (optional), this will be passed to +[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the +JSON string is generated. + +### toBase64() + +Converts source map to base64 encoded json string. + +### toComment([options]) + +Converts source map to an inline comment that can be appended to the source-file. + +By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would +normally see in a JS source file. + +When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. + +### addProperty(key, value) + +Adds given property to the source map. Throws an error if property already exists. + +### setProperty(key, value) + +Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. + +### getProperty(key) + +Gets given property of the source map. + +### removeComments(src) + +Returns `src` with all source map comments removed + +### removeMapFileComments(src) + +Returns `src` with all source map comments pointing to map files removed. + +### commentRegex + +Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments. + +### mapFileCommentRegex + +Provides __a fresh__ RegExp each time it is accessed. Can be used to find source map comments pointing to map files. + +### generateMapFileComment(file, [options]) + +Returns a comment that links to an external source map via `file`. + +By default, the comment is formatted like: `//# sourceMappingURL=...`, which you would normally see in a JS source file. + +When `options.multiline == true`, the comment is formatted like: `/*# sourceMappingURL=... */`, which you would find in a CSS source file. + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/packages/字体精简工具/node_modules/convert-source-map/index.js b/packages/字体精简工具/node_modules/convert-source-map/index.js new file mode 100644 index 0000000..3aeae10 --- /dev/null +++ b/packages/字体精简工具/node_modules/convert-source-map/index.js @@ -0,0 +1,136 @@ +'use strict'; +var fs = require('fs'); +var path = require('path'); +var SafeBuffer = require('safe-buffer'); + +Object.defineProperty(exports, 'commentRegex', { + get: function getCommentRegex () { + return /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/mg; + } +}); + +Object.defineProperty(exports, 'mapFileCommentRegex', { + get: function getMapFileCommentRegex () { + // Matches sourceMappingURL in either // or /* comment styles. + return /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/mg; + } +}); + + +function decodeBase64(base64) { + return SafeBuffer.Buffer.from(base64, 'base64').toString(); +} + +function stripComment(sm) { + return sm.split(',').pop(); +} + +function readFromFileMap(sm, dir) { + // NOTE: this will only work on the server since it attempts to read the map file + + var r = exports.mapFileCommentRegex.exec(sm); + + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + var filepath = path.resolve(dir, filename); + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (e) { + throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); + } +} + +function Converter (sm, opts) { + opts = opts || {}; + + if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); + if (opts.hasComment) sm = stripComment(sm); + if (opts.isEncoded) sm = decodeBase64(sm); + if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); + + this.sourcemap = sm; +} + +Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); +}; + +Converter.prototype.toBase64 = function () { + var json = this.toJSON(); + return SafeBuffer.Buffer.from(json, 'utf8').toString('base64'); +}; + +Converter.prototype.toComment = function (options) { + var base64 = this.toBase64(); + var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; + +// returns copy instead of original +Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); +}; + +Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property "' + key + '" already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); +}; + +Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; +}; + +Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; +}; + +exports.fromObject = function (obj) { + return new Converter(obj); +}; + +exports.fromJSON = function (json) { + return new Converter(json, { isJSON: true }); +}; + +exports.fromBase64 = function (base64) { + return new Converter(base64, { isEncoded: true }); +}; + +exports.fromComment = function (comment) { + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); + + return new Converter(comment, { isEncoded: true, hasComment: true }); +}; + +exports.fromMapFileComment = function (comment, dir) { + return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromSource = function (content) { + var m = content.match(exports.commentRegex); + return m ? exports.fromComment(m.pop()) : null; +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromMapFileSource = function (content, dir) { + var m = content.match(exports.mapFileCommentRegex); + return m ? exports.fromMapFileComment(m.pop(), dir) : null; +}; + +exports.removeComments = function (src) { + return src.replace(exports.commentRegex, ''); +}; + +exports.removeMapFileComments = function (src) { + return src.replace(exports.mapFileCommentRegex, ''); +}; + +exports.generateMapFileComment = function (file, options) { + var data = 'sourceMappingURL=' + file; + return options && options.multiline ? '/*# ' + data + ' */' : '//# ' + data; +}; diff --git a/packages/字体精简工具/node_modules/convert-source-map/package.json b/packages/字体精简工具/node_modules/convert-source-map/package.json new file mode 100644 index 0000000..2f04a2f --- /dev/null +++ b/packages/字体精简工具/node_modules/convert-source-map/package.json @@ -0,0 +1,72 @@ +{ + "_from": "convert-source-map@^1.5.0", + "_id": "convert-source-map@1.7.0", + "_inBundle": false, + "_integrity": "sha1-F6LLiC1/d9NJBYXizmxSRCSjpEI=", + "_location": "/convert-source-map", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "convert-source-map@^1.5.0", + "name": "convert-source-map", + "escapedName": "convert-source-map", + "rawSpec": "^1.5.0", + "saveSpec": null, + "fetchSpec": "^1.5.0" + }, + "_requiredBy": [ + "/vinyl-sourcemap" + ], + "_resolved": "https://registry.nlark.com/convert-source-map/download/convert-source-map-1.7.0.tgz?cache=0&sync_timestamp=1618847182423&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fconvert-source-map%2Fdownload%2Fconvert-source-map-1.7.0.tgz", + "_shasum": "17a2cb882d7f77d3490585e2ce6c524424a3a442", + "_spec": "convert-source-map@^1.5.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\vinyl-sourcemap", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/thlorenz/convert-source-map/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safe-buffer": "~5.1.1" + }, + "deprecated": false, + "description": "Converts a source-map from/to different formats and allows adding/changing properties.", + "devDependencies": { + "inline-source-map": "~0.6.2", + "tap": "~9.0.0" + }, + "engine": { + "node": ">=0.6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/thlorenz/convert-source-map", + "keywords": [ + "convert", + "sourcemap", + "source", + "map", + "browser", + "debug" + ], + "license": "MIT", + "main": "index.js", + "name": "convert-source-map", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/convert-source-map.git" + }, + "scripts": { + "test": "tap test/*.js --color" + }, + "version": "1.7.0" +} diff --git a/packages/字体精简工具/node_modules/core-util-is/LICENSE b/packages/字体精简工具/node_modules/core-util-is/LICENSE new file mode 100644 index 0000000..d8d7f94 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/core-util-is/README.md b/packages/字体精简工具/node_modules/core-util-is/README.md new file mode 100644 index 0000000..5a76b41 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/packages/字体精简工具/node_modules/core-util-is/float.patch b/packages/字体精简工具/node_modules/core-util-is/float.patch new file mode 100644 index 0000000..a06d5c0 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/packages/字体精简工具/node_modules/core-util-is/lib/util.js b/packages/字体精简工具/node_modules/core-util-is/lib/util.js new file mode 100644 index 0000000..ff4c851 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/packages/字体精简工具/node_modules/core-util-is/package.json b/packages/字体精简工具/node_modules/core-util-is/package.json new file mode 100644 index 0000000..b74eaa5 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/package.json @@ -0,0 +1,64 @@ +{ + "_from": "core-util-is@~1.0.0", + "_id": "core-util-is@1.0.2", + "_inBundle": false, + "_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "_location": "/core-util-is", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "core-util-is@~1.0.0", + "name": "core-util-is", + "escapedName": "core-util-is", + "rawSpec": "~1.0.0", + "saveSpec": null, + "fetchSpec": "~1.0.0" + }, + "_requiredBy": [ + "/readable-stream", + "/through2/readable-stream", + "/verror" + ], + "_resolved": "https://registry.nlark.com/core-util-is/download/core-util-is-1.0.2.tgz", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_spec": "core-util-is@~1.0.0", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\readable-stream", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "The `util.is*` functions introduced in Node v0.12.", + "devDependencies": { + "tap": "^2.3.0" + }, + "homepage": "https://github.com/isaacs/core-util-is#readme", + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "license": "MIT", + "main": "lib/util.js", + "name": "core-util-is", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.2" +} diff --git a/packages/字体精简工具/node_modules/core-util-is/test.js b/packages/字体精简工具/node_modules/core-util-is/test.js new file mode 100644 index 0000000..1a490c6 --- /dev/null +++ b/packages/字体精简工具/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/packages/字体精简工具/node_modules/currently-unhandled/browser.js b/packages/字体精简工具/node_modules/currently-unhandled/browser.js new file mode 100644 index 0000000..aa9e56f --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/browser.js @@ -0,0 +1,27 @@ +'use strict'; +var core = require('./core'); + +function unwrapEvent(event) { + if (event && event.detail && event.detail.promise) { + return event.detail; + } + + return event; +} + +module.exports = function (w) { + w = w || window; + var c = core(); + + w.addEventListener('unhandledrejection', function (event) { + event = unwrapEvent(event); + c.onUnhandledRejection(event.reason, event.promise); + }); + + w.addEventListener('rejectionhandled', function (event) { + event = unwrapEvent(event); + c.onRejectionHandled(event.promise); + }); + + return c.currentlyUnhandled; +}; diff --git a/packages/字体精简工具/node_modules/currently-unhandled/core.js b/packages/字体精简工具/node_modules/currently-unhandled/core.js new file mode 100644 index 0000000..73db22e --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/core.js @@ -0,0 +1,33 @@ +'use strict'; +var arrayFindIndex = require('array-find-index'); + +module.exports = function () { + var unhandledRejections = []; + + function onUnhandledRejection(reason, promise) { + unhandledRejections.push({reason: reason, promise: promise}); + } + + function onRejectionHandled(promise) { + var index = arrayFindIndex(unhandledRejections, function (x) { + return x.promise === promise; + }); + + unhandledRejections.splice(index, 1); + } + + function currentlyUnhandled() { + return unhandledRejections.map(function (entry) { + return { + reason: entry.reason, + promise: entry.promise + }; + }); + } + + return { + onUnhandledRejection: onUnhandledRejection, + onRejectionHandled: onRejectionHandled, + currentlyUnhandled: currentlyUnhandled + }; +}; diff --git a/packages/字体精简工具/node_modules/currently-unhandled/index.js b/packages/字体精简工具/node_modules/currently-unhandled/index.js new file mode 100644 index 0000000..238b9d9 --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/index.js @@ -0,0 +1,12 @@ +'use strict'; +var core = require('./core'); + +module.exports = function (p) { + p = p || process; + var c = core(); + + p.on('unhandledRejection', c.onUnhandledRejection); + p.on('rejectionHandled', c.onRejectionHandled); + + return c.currentlyUnhandled; +}; diff --git a/packages/字体精简工具/node_modules/currently-unhandled/license b/packages/字体精简工具/node_modules/currently-unhandled/license new file mode 100644 index 0000000..ad5d021 --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) James Talmage (github.com/jamestalmage) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/packages/字体精简工具/node_modules/currently-unhandled/package.json b/packages/字体精简工具/node_modules/currently-unhandled/package.json new file mode 100644 index 0000000..caf8184 --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/package.json @@ -0,0 +1,103 @@ +{ + "_from": "currently-unhandled@^0.4.1", + "_id": "currently-unhandled@0.4.1", + "_inBundle": false, + "_integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "_location": "/currently-unhandled", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "currently-unhandled@^0.4.1", + "name": "currently-unhandled", + "escapedName": "currently-unhandled", + "rawSpec": "^0.4.1", + "saveSpec": null, + "fetchSpec": "^0.4.1" + }, + "_requiredBy": [ + "/loud-rejection" + ], + "_resolved": "https://registry.npm.taobao.org/currently-unhandled/download/currently-unhandled-0.4.1.tgz", + "_shasum": "988df33feab191ef799a61369dd76c17adf957ea", + "_spec": "currently-unhandled@^0.4.1", + "_where": "D:\\workspace\\plugin\\mini_font\\packages\\mini_font\\publish\\mini_font\\node_modules\\loud-rejection", + "author": { + "name": "James Talmage", + "email": "james@talmage.io", + "url": "github.com/jamestalmage" + }, + "ava": { + "files": "test.js" + }, + "browser": { + "./index.js": "./browser.js" + }, + "bugs": { + "url": "https://github.com/jamestalmage/currently-unhandled/issues" + }, + "bundleDependencies": false, + "dependencies": { + "array-find-index": "^1.0.1" + }, + "deprecated": false, + "description": "Track the list of currently unhandled promise rejections.", + "devDependencies": { + "ava": "^0.15.1", + "bluebird": "^3.4.0", + "browserify": "^13.0.1", + "coveralls": "^2.11.9", + "delay": "^1.3.1", + "is-ci": "^1.0.8", + "karma": "^0.13.22", + "karma-browserify": "^5.0.5", + "karma-chrome-launcher": "^1.0.1", + "karma-firefox-launcher": "^1.0.0", + "karma-mocha": "^1.0.1", + "mocha": "^2.5.3", + "nyc": "^6.4.0", + "watchify": "^3.7.0", + "xo": "^0.15.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "core.js", + "browser.js" + ], + "homepage": "https://github.com/jamestalmage/currently-unhandled#readme", + "keywords": [ + "unhandled", + "unhandledRejection", + "rejected", + "promises" + ], + "license": "MIT", + "name": "currently-unhandled", + "nyc": { + "reporter": [ + "lcov", + "text" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jamestalmage/currently-unhandled.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "0.4.1", + "xo": { + "ignores": [ + "browser-bluebird-test.js" + ], + "envs": [ + "browser", + "mocha", + "node" + ] + } +} diff --git a/packages/字体精简工具/node_modules/currently-unhandled/readme.md b/packages/字体精简工具/node_modules/currently-unhandled/readme.md new file mode 100644 index 0000000..b73c568 --- /dev/null +++ b/packages/字体精简工具/node_modules/currently-unhandled/readme.md @@ -0,0 +1,44 @@ +# currently-unhandled [![Build Status](https://travis-ci.org/jamestalmage/currently-unhandled.svg?branch=master)](https://travis-ci.org/jamestalmage/currently-unhandled) [![Coverage Status](https://coveralls.io/repos/github/jamestalmage/currently-unhandled/badge.svg?branch=master)](https://coveralls.io/github/jamestalmage/currently-unhandled?branch=master) + +> Track the list of currently unhandled promise rejections. + + +## Install + +``` +$ npm install --save currently-unhandled +``` + + +## Usage + +```js +const currentlyUnhandled = require('currently-unhandled')(); // <- note the invocation + +var fooError = new Error('foo'); +var p = Promise.reject(new Error('foo')); + +// on the next tick - unhandled rejected promise is added to the list: +currentlyUnhandled(); +//=> [{promise: p, reason: fooError}]' + +p.catch(() => {}); + +// on the next tick - handled promise is now removed from the list: +currentlyUnhandled(); +//=> []; +``` + +## API + +### currentlyUnhandled() + +Returns an array of objects with `promise` and `reason` properties representing the rejected promises that currently do not have a rejection handler. The list grows and shrinks as unhandledRejections are published, and later handled. + +## Browser Support + +This module can be bundled with `browserify`. At time of writing, it will work with native Promises in the Chrome browser only. For best cross-browser support, use `bluebird` instead of native Promise support in browsers. + +## License + +MIT © [James Talmage](http://github.com/jamestalmage) diff --git a/packages/字体精简工具/node_modules/dashdash/CHANGES.md b/packages/字体精简工具/node_modules/dashdash/CHANGES.md new file mode 100644 index 0000000..d7c8f4e --- /dev/null +++ b/packages/字体精简工具/node_modules/dashdash/CHANGES.md @@ -0,0 +1,364 @@ +# node-dashdash changelog + +## not yet released + +(nothing yet) + +## 1.14.1 + +- [issue #30] Change the output used by dashdash's Bash completion support to + indicate "there are no completions for this argument" to cope with different + sorting rules on different Bash/platforms. For example: + + $ triton -v -p test2 package get # before + ##-no -tritonpackage- completions-## + + $ triton -v -p test2 package get # after + ##-no-completion- -results-## + +## 1.14.0 + +- New `synopsisFromOpt(