Commit f5222b22 authored by rockyl's avatar rockyl

内容太多,懒得写

parent 64dc3214
{
"options": {
"pageTitle": "屈臣氏刮刮卡1219",
"entrySceneView": "屈臣氏刮刮卡1219",
"pageTitle": "no title",
"entrySceneView": "view-image",
"containerId": "game-container",
"designWidth": 750,
"designHeight": 1334,
"frameRate": 60,
"scaleMode": "fixedWidth",
"rendererType": "webgl",
"tpl": "<!DOCTYPE html>\n<html lang=\"en\">\n\n\t<head>\n\t<meta charset=\"UTF-8\">\n\t<title>$PAGE_TITLE$</title>\n\t<meta name=\"viewport\"\ncontent=\"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no\"/>\n\t<meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n\t<meta name=\"full-screen\" content=\"true\"/>\n\t<meta name=\"screen-orientation\" content=\"portrait\"/>\n\t<meta name=\"x5-fullscreen\" content=\"true\"/>\n\t<meta name=\"360-fullscreen\" content=\"true\"/>\n\t<style>\n\thtml,\n\tbody {\n\tpadding: 0;\n\tmargin: 0;\n\tborder: 0;\n\n\twidth: 100%;\n\theight: 100%;\n\toverflow: hidden;\n\tposition: absolute;\n\tbackground-color: white;\n}\n</style>\n</head>\n\n<body>\n<div id=\"$CONTAINER_ID$\" style=\"line-height:0;font-size:0\"></div>\n\t<script src=\"http://yun.duiba.com.cn/editor/zeroing/libs/engine.7a5de46a29e3323c479ba7481002f5adf09a9622.js\"></script>\n\t$SCRIPTS$\n\t<script>\n\t\tengine.launch('//yun.duiba.com.cn/aurora/$VERSION$-data.json');\n\t</script>\n</body>\n</html>\n",
"tpl": "\t<meta charset=\"UTF-8\">\n\t<title>$PAGE_TITLE$</title>\n\t<meta name=\"viewport\"\ncontent=\"width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no\"/>\n\t<meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n\t<meta name=\"full-screen\" content=\"true\"/>\n\t<meta name=\"screen-orientation\" content=\"portrait\"/>\n\t<meta name=\"x5-fullscreen\" content=\"true\"/>\n\t<meta name=\"360-fullscreen\" content=\"true\"/>\n\t<style>\n\thtml,\n\tbody {\n\tpadding: 0;\n\tmargin: 0;\n\tborder: 0;\n\n\twidth: 100%;\n\theight: 100%;\n\toverflow: hidden;\n\tposition: absolute;\n\tbackground-color: white;\n}\n</style>\n</head>\n\n<body>\n<div id=\"$CONTAINER_ID$\" style=\"line-height:0;font-size:0\"></div>\n\t<script src=\"http://localhost:4002/debug/engine.js\"></script>\n\t$SCRIPTS$\n\t<script>\n\t\tengine.launch('//yun.duiba.com.cn/aurora/$VERSION$-data.json');\n\t</script>\n</body>\n</html>\n",
"env": [
{
"name": "appID",
"value": "1234"
"value": ""
},
{
"name": "projectID",
"value": "1"
"value": ""
}
]
},
"views": [
{
"name": "屈臣氏刮刮卡1219",
"type": "node",
"uuid": "74c9e6bf-0929-480e-b633-7b13141773a6",
"children": [
{
"name": "背景",
"properties": {
"width": 750,
"height": 1624,
"alpha": 1,
"visible": true,
"source": "asset://5f09b688-eb0a-4bf6-ac52-ed18ce663846",
"x": 0,
"y": 0
},
"uuid": "cf12b0c1-cce7-4629-bee3-12097f99ba44",
"type": "image"
},
{
"name": "奖品",
"properties": {
"width": 678,
"height": 326,
"alpha": 1,
"visible": true,
"x": 36,
"y": 865
},
"uuid": "9f6e5a02-c8e0-4d3b-9dc2-fe1d2fedef12",
"type": "node",
"children": [
{
"name": "木板",
"properties": {
"width": 678,
"height": 31,
"alpha": 1,
"visible": true,
"y": 211,
"source": "asset://2c59e041-898c-40cc-b88b-6a817b9a1e38"
},
"uuid": "2378b530-d343-461e-8297-3cefec9ae8d7",
"type": "image"
},
{
"name": "奖品",
"properties": {
"width": 650,
"height": 220,
"alpha": 1,
"visible": false,
"x": 12,
"y": 76,
"horizonCenter": 0
},
"uuid": "b83704e9-2201-4740-9755-a82173d3c80d",
"type": "node",
"children": [],
"events": {}
},
{
"name": "奖品标题",
"properties": {
"width": 343,
"height": 69,
"alpha": 1,
"visible": true,
"x": 168,
"source": "asset://f77c1092-e60c-48a6-83a7-fe97113497e1"
},
"uuid": "0a51019c-8c79-4285-bbac-b0dfd28b1319",
"type": "image"
}
]
},
{
"name": "抽奖",
"properties": {
"width": 610,
"height": 458,
"alpha": 1,
"visible": true,
"x": 71,
"y": 371
},
"uuid": "cdfc1eac-2ada-42cb-9425-f92aa7a71a52",
"type": "node",
"children": [
{
"name": "礼物盒",
"properties": {
"width": 610,
"height": 458,
"alpha": 1,
"visible": true,
"source": "asset://83a321db-2df3-4412-b373-f6c7f1248d03"
},
"uuid": "c9f0dfe4-228f-4500-987d-345a51748d57",
"type": "image"
},
{
"name": "刮卡区",
"properties": {
"width": 499,
"height": 243,
"alpha": 1,
"visible": true,
"x": 55,
"y": 172
},
"uuid": "b7d19ccc-e327-45cf-ac3e-827971cfeaf8",
"type": "node",
"children": [
{
"name": "刮刮卡-未刮开",
"properties": {
"width": 499,
"height": 236,
"alpha": 1,
"visible": true,
"y": 4,
"source": "asset://bacc2948-e65d-4b30-9290-e9c6a35f2b3f"
},
"uuid": "ae59bef0-d4eb-4d9e-9bff-2cd933b7086d",
"type": "image"
},
{
"name": "刮刮卡-开始背景",
"properties": {
"width": 499,
"height": 243,
"alpha": 1,
"visible": true,
"source": "asset://34769270-365a-404a-a042-1c50a8add295"
},
"uuid": "7ea884af-3ecb-4b24-8ee2-5091d8e291ca",
"type": "image"
},
{
"name": "遮罩-刮卡奖品",
"type": "rect",
"properties": {
"width": 498,
"height": 241,
"visible": false
},
"events": {},
"uuid": "3905b34d-79ee-4401-9d9e-f9ee913af490"
}
],
"events": {}
},
{
"name": "按钮状态",
"properties": {
"width": 452,
"height": 113,
"alpha": 1,
"visible": true,
"x": 80,
"y": 226
},
"uuid": "d6b59cf1-d135-4774-a1f3-411f75c7b529",
"type": "node",
"children": [
{
"name": "开始按钮",
"name": "view",
"type": "scrollView",
"properties": {
"width": 452,
"height": 113,
"alpha": 1,
"visible": true,
"source": "asset://c19439bb-ed98-4cd5-9ad9-2903565375d3",
"x": 0,
"y": 0
"width": 400,
"height": 400
},
"uuid": "44e9622b-337f-4eaf-a33c-d7598098f9a9",
"type": "image",
"events": {
"click": {
"init": {
"once": false,
"behaviors": [
{
"uuid": "b53a6c5d-0482-4cd0-85c5-0fbf25e1deff",
"alias": "开始按钮_click",
"meta": "f469222f-144f-4006-8a5c-54ed7104a7e5"
}
]
}
}
"uuid": "640feff1-39bb-467b-878f-378820e1c9ce",
"alias": "view_init",
"meta": "65f2ff05-3ba4-42c6-9130-ca3b3bab786b"
},
{
"name": "按钮无抽奖次数",
"properties": {
"width": 452,
"height": 113,
"alpha": 1,
"visible": false,
"source": "asset://088bc60d-1803-46da-98d7-9f7e6091f8f0",
"x": 0,
"y": 0
"uuid": "2f2c63d5-5e80-4bf2-b570-7c719be36f65",
"alias": "view_init_2",
"meta": "446db6e4-b94b-4d14-95ec-3acede72cb49"
},
"uuid": "e49cee18-2ba2-4161-85c3-a22c794d4fdf",
"type": "image",
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "02c185c2-316e-43ca-b503-f8f48a140382",
"alias": "按钮无抽奖次数_click",
"meta": "43b32f28-99a0-4198-b9e0-5b7ef18aecc4"
}
]
}
}
}
],
"scripts": [
{
"script": "touch-zoom",
"props": {
"zoomTo": 0.95
}
}
]
"uuid": "42e4735f-7433-43a2-bbbd-98dcc05faac6",
"alias": "view_init_3",
"meta": "ab50adb9-3762-4306-a471-b7f6ba4268fc"
},
{
"name": "抽奖次数",
"properties": {
"width": 375,
"height": 24,
"alpha": 1,
"visible": true,
"x": 117,
"y": 343
"uuid": "f91f418b-e03b-4ad2-b8cd-46dcd71181ab",
"alias": "view_init_444",
"meta": "df5d7b6c-2b56-4c04-87a1-3b2948f04a5f"
},
"uuid": "87120f29-bea3-48b8-897b-373ab0d23574",
"type": "node",
"children": [
{
"name": "剩余抽奖次数",
"properties": {
"height": 24,
"alpha": 1,
"visible": true,
"x": 91,
"text": "剩余抽奖次数:0",
"size": 24,
"fillColor": "rgba(216, 184, 109, 1)",
"horizonCenter": 0
"uuid": "af2b5851-42af-4875-a614-baa41e56ffe9",
"alias": "view_init_5",
"meta": "c1fc3151-4284-4c50-b87b-fb376fe92f51"
},
"uuid": "82df149d-2929-451e-936e-06011333a15b",
"type": "label",
"events": {
"data-center": {
"once": false,
"behaviors": [
{
"uuid": "10002953-1ed0-4407-9221-b76b0029a435",
"alias": "剩余抽奖次数_data-center",
"meta": "5e1514bd-1856-4316-8b54-f2ebb8b48118"
"uuid": "ce20f333-81ab-4489-a80d-0a7db31c9998",
"alias": "view_init_6",
"meta": "6b2bfe23-4c3f-4557-933d-f3d3f283425d"
}
]
}
}
},
"uuid": "3cc546ef-65ea-4e50-92a8-b730374e444f",
"children": [
{
"name": "线条",
"name": "rect",
"type": "rect",
"properties": {
"width": 375,
"height": 2,
"alpha": 1,
"visible": true,
"y": 11,
"source": "asset://ab718406-b1a3-42e2-a10b-01de5680f65b"
"width": 400,
"height": 400,
"strokeColor": "rgba(42, 255, 0, 1)",
"strokeWidth": 1
},
"uuid": "13438b89-bb8c-4800-b4d4-bf1f72f12bd4",
"type": "image"
}
]
}
]
"events": {},
"uuid": "9cf696d0-3b8a-453f-ad7f-c3d23d135d83"
},
{
"name": "组-中奖",
"type": "node",
"name": "scrollView",
"type": "scrollView",
"properties": {
"width": 489,
"height": 237,
"visible": false,
"x": 130,
"y": 545
"width": 400,
"height": 200,
"x": 0,
"y": 200,
"direction": "horizontal"
},
"events": {},
"uuid": "55fb5a22-a133-4815-9815-6107fbd63c61",
"uuid": "3ec103a6-3666-4db8-84ea-8a45b72ff8ef",
"children": [
{
"name": "图片-刮卡奖品",
"type": "image",
"name": "rect",
"type": "rect",
"properties": {
"width": 500,
"height": 200,
"fillColor": "rgba(166, 7, 7, 1)",
"strokeWidth": 3,
"x": 0,
"y": 0,
"width": 498,
"height": 241,
"visible": false
"y": 0
},
"events": {},
"uuid": "165050c2-91ba-4fb6-bac5-d0f63b0e993e"
"uuid": "2c65bf16-059a-4a6a-9a7e-b4137258a386"
}
]
}
]
},
{
"name": "组-未中奖",
"name": "dialog",
"type": "node",
"properties": {
"width": 495,
"height": 239,
"visible": false,
"x": 129,
"y": 545
"width": 750
},
"events": {},
"uuid": "8f646122-be68-4766-94b5-21ed49f1d257",
"uuid": "6762cf39-2997-4321-8bd2-c2afbbb6cdeb",
"children": [
{
"name": "谢谢参与底图",
"name": "rect",
"type": "rect",
"properties": {
"width": 498,
"height": 241,
"alpha": 0.5
"width": 750,
"height": 200,
"fillColor": "rgba(10, 157, 22, 1)"
},
"events": {},
"uuid": "e0364a8a-9c2c-43a8-86a1-287a14a01942"
"uuid": "34807786-9b15-4bb6-93dd-4855b946b04c"
},
{
"name": "谢谢参与",
"type": "label",
"name": "rect2",
"type": "rect",
"properties": {
"text": "谢谢参与",
"size": 80,
"fillColor": "rgba(255, 255, 255, 1)",
"verticalCenter": 0,
"horizonCenter": 0
"width": 109,
"height": 112,
"x": 109,
"y": 244,
"fillColor": "rgba(0, 40, 183, 1)"
},
"events": {},
"uuid": "66d4b196-a2a5-471a-8970-ac564b72ca2c"
"uuid": "6e36e8e5-833e-4ffa-b1aa-a3848bc43627"
}
]
},
{
"name": "大标题",
"name": "view-image",
"type": "node",
"properties": {
"width": 676,
"height": 158,
"alpha": 1,
"visible": true,
"x": 37,
"y": 186,
"source": "asset://ac57f0b0-9362-472b-b22b-da97e1720cc2"
},
"uuid": "f8171747-fb12-49b5-8625-867338bec680",
"type": "image"
"width": 500
},
"events": {},
"uuid": "e75a81c4-9d7e-41ae-9373-9362f7e1c045",
"children": [
{
"name": "按钮-我的奖品",
"properties": {
"width": 110,
"height": 30,
"alpha": 1,
"visible": true,
"x": 622,
"y": 106,
"source": "asset://f0c54205-c8c0-4220-8172-b11455f3f0a8"
},
"uuid": "234fd038-2304-459c-826a-fc6a4e9546d3",
"name": "image",
"type": "image",
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "c4e5ebe3-0eab-4f90-ab61-2741fa53a323",
"alias": "活动奖品_click",
"meta": "623e623c-d887-442f-a810-4ffefaed1bc1"
}
]
}
},
"scripts": [
{
"script": "touch-zoom",
"props": {
"zoomTo": 0.95
}
}
]
},
{
"name": "按钮-活动规则",
"properties": {
"width": 110,
"height": 30,
"alpha": 1,
"visible": true,
"x": 624,
"y": 63,
"source": "asset://bc2cbf01-3fd6-4af6-8916-0a3b980b114f"
"width": 50,
"height": 50
},
"uuid": "b7c84c94-2adc-4f93-8072-ff3f9e8c57ba",
"type": "image",
"events": {
"click": {
"init": {
"once": false,
"behaviors": [
{
"uuid": "df4bcad9-ab1a-42ed-9e11-27dfb20fd79c",
"alias": "活动细则_click",
"meta": "bc6612a7-a468-4082-9534-97537baa6639"
"uuid": "a5827989-6b9a-4239-8f83-644e1648f930",
"alias": "image_init",
"meta": "dab876ac-9fb4-4528-a967-342445d33106"
}
]
}
},
"scripts": [
{
"script": "touch-zoom",
"props": {
"zoomTo": 0.95
}
"uuid": "378609e8-a6a1-45bb-80ed-ca703a11f63f"
}
]
},
{
"name": "Logo",
"properties": {
"width": 372,
"height": 70,
"alpha": 1,
"visible": true,
"x": 188,
"y": 89,
"source": "asset://d0452d45-9776-461b-a68e-d07a6043feed"
},
"uuid": "74b62214-593d-423a-bc02-2360eefdba9c",
"type": "image"
},
{
"name": "轮播",
"properties": {
"width": 754,
"height": 44,
"alpha": 1,
"visible": true,
"x": -1,
"y": -1
},
"uuid": "eaad83e2-bae0-4f2a-ad5e-48efd33ed070",
"type": "node",
"children": [
{
"name": "垫底",
"properties": {
"width": 754,
"height": 44,
"alpha": 0.7490196078431373,
"visible": true,
"fillColor": "#d7a546"
},
"uuid": "6fbd4897-1ab5-4144-bce9-66bf26ec699d",
"type": "rect"
},
{
"name": "组-中奖轮播",
"name": "view-polling",
"type": "node",
"properties": {
"verticalCenter": 0,
"height": 40,
"y": 2,
"x": 0
},
"events": {},
"uuid": "b08c80e0-2220-4bb3-ba27-f79e83e1454f",
"children": []
}
]
},
{
"name": "弹窗蒙层",
"properties": {
"width": 750,
"height": 1624,
"alpha": 0.8,
"visible": false,
"source": "asset://1de9775b-9f9e-46e1-bdff-84f7d488c026"
},
"uuid": "d2250f29-a1e6-4965-aadc-ff3cacfb93a8",
"type": "image"
},
{
"name": "奖品滚动视图",
"type": "scrollView",
"properties": {
"width": 700,
"height": 205,
"x": 24,
"y": 944,
"isVertical": false,
"horizonCenter": 0,
"direction": "horizontal",
"isSpringBack": true
},
"events": {},
"uuid": "e2055082-c4ee-4403-b4f9-4e8df1254932",
"children": []
}
],
"properties": {},
"events": {
"init": {
"once": false,
"behaviors": [
{
"uuid": "bf86110b-880b-40cb-9893-90c3c5345000",
"alias": "屈臣氏刮刮卡1219_init",
"meta": "9aeb7c34-a41a-45c5-8c7e-9ab7be81c716"
"uuid": "4902c447-3a04-4a81-803c-bdc21726633c",
"alias": "view-polling_init",
"meta": "b80bfc2a-b6e9-407d-a12c-db601d2a1e28"
}
]
}
}
},
{
"name": "弹窗-中奖",
"type": "node",
"properties": {
"horizonCenter": 0,
"verticalCenter": 0,
"width": 750,
"height": 1334,
"x": 0,
"y": 0
"uuid": "0f3e0534-e273-4913-9ce2-0b75461a871e"
},
"events": {
"awake": {
"once": false,
"behaviors": [
{
"uuid": "f5ad68db-5fd1-44f1-bbfb-3e498957a036",
"alias": "弹窗-中奖_awake",
"meta": "a3606651-1355-40d8-aeb5-ef6cf722d413"
}
]
}
},
"uuid": "9712f13a-e849-460c-bae1-98b4fdadcf21",
"name": "graphics-clone",
"type": "node",
"properties": {},
"events": {},
"uuid": "1d8ad4d9-9803-4329-954e-a414565eafba",
"children": [
{
"name": "背景光",
"properties": {
"width": 750,
"height": 1057,
"alpha": 1,
"visible": true,
"source": "asset://810008b4-2a25-4163-acf7-22f8922edc01"
},
"uuid": "8d4d5a5b-a8c5-410a-a639-df8f79a6b35b",
"type": "image"
},
{
"name": "弹窗背景",
"properties": {
"width": 640,
"height": 632,
"alpha": 1,
"visible": true,
"x": 55,
"y": 209,
"source": "asset://b2f3f3af-c655-4788-a5c6-eab61db089d2"
},
"uuid": "189972c1-fb17-447c-99cd-9f2417160362",
"type": "image"
},
{
"name": "按钮-立即领取",
"properties": {
"width": 452,
"height": 113,
"alpha": 1,
"visible": true,
"x": 150,
"y": 698,
"source": "asset://e4d548d3-09c7-4213-89ae-ab6da5cd7718"
},
"uuid": "485f3b98-ea0a-417b-b3c2-a540a0eb45d6",
"type": "image",
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "5d9f1db8-3346-462b-a875-30dd4c5f22f9",
"alias": "按钮-立即领取_click",
"meta": "62002b01-f97f-44f1-88c7-f7bea61a9a96"
}
]
}
}
},
{
"name": "按钮-关闭弹窗",
"type": "image",
"name": "rect",
"type": "rect",
"properties": {
"source": "按钮-关闭弹窗",
"width": 50,
"height": 50,
"x": 638,
"y": 133
"fillColor": "rgba(255, 0, 0, 1)",
"width": 100,
"height": 100
},
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "880e87bb-64dd-4019-8b9b-83c451da9fa1",
"alias": "按钮-关闭弹窗_click",
"meta": "bc02c850-912e-4428-a055-ada6a0c78fba"
}
]
}
},
"uuid": "f69f14b0-98b1-424e-ada3-f1a5d550fe68"
},
{
"name": "6字奖品名称",
"properties": {
"height": 27,
"alpha": 1,
"visible": true,
"x": 298,
"y": 627,
"text": "",
"size": 27.97349,
"fillColor": "rgba(242, 202, 142, 1)",
"horizonCenter": 0
},
"uuid": "d689dac0-a726-4873-b21b-9be03d36003b",
"type": "label"
},
{
"name": "奖品图片",
"type": "image",
"properties": {
"width": 230,
"height": 230,
"x": 259,
"y": 373,
"horizonCenter": 0
},
"events": {},
"uuid": "3fcd61d7-8a40-43c1-821d-0e3fdb486cab"
}
]
},
{
"name": "弹窗-活动规则",
"type": "node",
"properties": {
"horizonCenter": 0,
"verticalCenter": 0,
"x": 0,
"y": 0
},
"events": {},
"uuid": "8d987fb3-5dc4-432b-ab5d-650a7820994c",
"children": [
{
"name": "弹窗背景",
"properties": {
"width": 597,
"height": 736,
"alpha": 1,
"visible": true,
"source": "asset://383df34a-b575-4e1b-8527-9982e97442dd",
"horizonCenter": -15
},
"uuid": "bf55b815-58f4-498d-81da-07de15cdbbed",
"type": "image",
"children": []
},
{
"name": "规则容器",
"type": "scrollView",
"properties": {
"width": 500,
"height": 562,
"x": 67,
"y": 111
},
"events": {},
"uuid": "204081f4-dd8e-4669-a679-563401130db6",
"children": [
{
"name": "规则文案",
"properties": {
"alpha": 1,
"visible": true,
"x": 0,
"y": 0,
"text": "${游戏规则}",
"size": 24,
"fillColor": "rgba(242, 202, 142, 1)",
"horizonCenter": 0
},
"uuid": "554f4bf8-5f70-406e-8bca-118aa9919c5d",
"type": "label"
}
]
},
{
"name": "关闭按钮",
"type": "image",
"properties": {
"source": "按钮-关闭弹窗",
"width": 50,
"height": 50,
"x": 600,
"y": -50
},
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "6457b94c-7f3e-4c5e-aef9-2f03ed32524f",
"alias": "关闭按钮_click",
"meta": "04aed616-8f51-4176-80c3-3bcabc6d2e15"
}
]
}
},
"uuid": "368e9a49-c2c7-466a-9989-d18d6dcaae85"
}
]
},
{
"name": "弹窗-未中奖",
"type": "node",
"properties": {},
"events": {},
"uuid": "9327f5a2-c56c-447c-b0ea-73455cf471b7",
"children": [
{
"name": "弹窗背景",
"properties": {
"width": 538,
"height": 462,
"alpha": 1,
"visible": true,
"source": "asset://fbb78028-c3b9-47ad-a72a-37dab667003e",
"x": 0,
"y": 0,
"horizonCenter": 10
},
"uuid": "8cde1163-65d4-43df-b356-260cf8ca8086",
"type": "image"
},
{
"name": "按钮-关闭弹窗",
"type": "image",
"properties": {
"source": "按钮-关闭弹窗",
"width": 50,
"height": 50,
"x": 520,
"y": -60
},
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "607f4773-afde-4a87-aaed-f9f0ae8ac9b0",
"alias": "按钮-关闭弹窗_click",
"meta": "fc0ad7cb-454b-4dac-8591-43645d90a6c5"
}
]
}
},
"uuid": "bbff2496-a75b-4516-b305-ac00f2fd16d2"
},
{
"name": "按钮-我知道了",
"properties": {
"width": 452,
"height": 113,
"alpha": 1,
"visible": true,
"x": 43,
"y": 334,
"source": "asset://ee1dbd2c-d0e9-483e-8c4e-fe4a37e0b302",
"horizonCenter": 10
},
"uuid": "1aa53271-217e-4121-b826-e0e71f539066",
"type": "image",
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "17b7585d-7459-4022-961e-927b63f51df2",
"alias": "按钮-我知道了_click",
"meta": "023a47c1-a590-4dd3-a13c-3de205fb8e40"
}
]
}
},
"scripts": [
{
"script": "touch-zoom",
"props": {
"zoomTo": 0.95
}
}
]
},
{
"name": "很遗憾~",
"properties": {
"height": 26,
"alpha": 1,
"visible": true,
"x": 217,
"y": 227,
"text": "很遗憾~",
"size": 27.97349,
"fillColor": "rgba(242, 202, 142, 1)",
"horizonCenter": 10
},
"uuid": "d3ac7145-bc4d-40d1-9def-cc2b06028dba",
"type": "label"
},
{
"name": "您与奖品擦肩而过",
"properties": {
"alpha": 1,
"visible": true,
"x": 173,
"y": 266,
"text": "您与奖品擦肩而过",
"size": 25.82168,
"fillColor": "rgba(242, 202, 142, 1)",
"horizonCenter": 10
},
"uuid": "1c9f3257-991d-4b32-ab6e-4050430e834a",
"type": "label"
}
]
},
{
"name": "弹窗-消息",
"type": "node",
"properties": {},
"events": {},
"uuid": "ce5cf696-d706-42dd-8f54-3f801f4843af",
"children": [
{
"name": "弹窗背景",
"type": "image",
"properties": {
"source": "asset://fbb78028-c3b9-47ad-a72a-37dab667003e",
"width": 538,
"height": 462
},
"events": {},
"uuid": "1311efac-c321-4acb-9ae8-536efff232d0"
},
{
"name": "关闭按钮",
"type": "image",
"properties": {
"source": "asset://ee1dbd2c-d0e9-483e-8c4e-fe4a37e0b302",
"width": 452,
"height": 113,
"x": 46,
"y": 333
},
"events": {
"click": {
"once": false,
"behaviors": [
{
"uuid": "f6497939-de6f-4fa0-929f-91b2e3b17a78",
"alias": "关闭按钮_click",
"meta": "b105098a-b7a4-4613-afa6-a830be4a8b0a"
}
]
}
},
"uuid": "7e6bdde1-5389-42a4-8b42-e3274e18cf95",
"scripts": [
{
"script": "touch-zoom",
"props": {
"zoomTo": 0.95
}
}
]
},
{
"name": "消息",
"type": "label",
"properties": {
"text": "网络异常,请稍后再试~",
"fillColor": "rgba(218, 166, 54, 1)",
"x": 86,
"y": 248,
"height": 41,
"horizonCenter": 0,
"verticalCenter": 0,
"size": 24
},
"events": {},
"uuid": "8def4bd4-fcfb-4d73-b06f-35a01d44dc8e"
}
]
}
],
"assets": [
{
"name": "背景",
"ext": ".png",
"uuid": "5f09b688-eb0a-4bf6-ac52-ed18ce663846",
"url": "//yun.duiba.com.cn/aurora/eb06aec6b98b00d331ac3d526427929bc88d0502.png"
},
{
"name": "木板",
"ext": ".png",
"uuid": "2c59e041-898c-40cc-b88b-6a817b9a1e38",
"url": "//yun.duiba.com.cn/aurora/a04d2df84f37fb6e6ac6c1a0aec2dfc42c11eb08.png"
},
{
"name": "携程卡",
"ext": ".png",
"uuid": "09f2695f-52e6-4c8e-8512-e0e876702192",
"url": "//yun.duiba.com.cn/aurora/043c3b1ebdb7a4d8771f6abfef416f98ccf1e405.png"
},
{
"name": "优惠券 拷贝",
"ext": ".png",
"uuid": "f16baed7-05d3-4bd5-92d2-1c1aa2f54a3b",
"url": "//yun.duiba.com.cn/aurora/7d9f2b47623db6f4946c47df17c9344ac5db59ca.png"
},
{
"name": "优惠券",
"ext": ".png",
"uuid": "21efe6eb-7324-492d-9832-862e93a64d3b",
"url": "//yun.duiba.com.cn/aurora/7ee70b654472b6def058628717656ae299ac119f.png"
},
{
"name": "发膜",
"ext": ".png",
"uuid": "ef18ff32-1fcf-431d-a70f-9c453769f61b",
"url": "//yun.duiba.com.cn/aurora/ba810e3562143e3ea0e4f95c24113d520c119b0d.png"
},
{
"name": "戴森吹风机",
"ext": ".png",
"uuid": "08158966-8395-4da5-a0b2-fbddb9b08cf5",
"url": "//yun.duiba.com.cn/aurora/af0d2690134a9e0fa99469be2cdc5f52ea12c381.png"
},
{
"name": "奖品标题",
"ext": ".png",
"uuid": "f77c1092-e60c-48a6-83a7-fe97113497e1",
"url": "//yun.duiba.com.cn/aurora/48a10d25409732a8be4896ea283ba6b22920a9e5.png"
},
{
"name": "礼物盒",
"ext": ".png",
"uuid": "83a321db-2df3-4412-b373-f6c7f1248d03",
"url": "//yun.duiba.com.cn/aurora/acd7f8e65fa068d6544827469c17479705bd619d.png"
},
{
"name": "刮刮卡-刮开",
"ext": ".png",
"uuid": "bacc2948-e65d-4b30-9290-e9c6a35f2b3f",
"url": "//yun.duiba.com.cn/aurora/69f47697737cbaccf80a4a7e99a4cf7fabf3c939.png"
},
{
"name": "刮刮卡-未刮开",
"ext": ".png",
"uuid": "34769270-365a-404a-a042-1c50a8add295",
"url": "//yun.duiba.com.cn/aurora/12edc0b77721d0df451c2626ff6eb2975119e1ef.png"
},
{
"name": "开始按钮",
"ext": ".png",
"uuid": "c19439bb-ed98-4cd5-9ad9-2903565375d3",
"url": "//yun.duiba.com.cn/aurora/9b8d605b539be8487c8f1414f771cbf960a2073c.png"
},
{
"name": "按钮无抽奖次数",
"ext": ".png",
"uuid": "088bc60d-1803-46da-98d7-9f7e6091f8f0",
"url": "//yun.duiba.com.cn/aurora/39332bc508ae22cddc79fc876220a06bc476ad31.png"
},
{
"name": "线条",
"ext": ".png",
"uuid": "ab718406-b1a3-42e2-a10b-01de5680f65b",
"url": "//yun.duiba.com.cn/aurora/6623aaee4c0f3a11a4b2adefa88d2aff3d8165be.png"
},
{
"name": "大标题",
"ext": ".png",
"uuid": "ac57f0b0-9362-472b-b22b-da97e1720cc2",
"url": "//yun.duiba.com.cn/aurora/d3148c330f966eaab70d3e0a675514247c5801ad.png"
},
{
"name": "活动奖品",
"ext": ".png",
"uuid": "f0c54205-c8c0-4220-8172-b11455f3f0a8",
"url": "//yun.duiba.com.cn/aurora/3ad29cbbb97ea4ac17f78c9a224a488fcb80af6b.png"
},
{
"name": "活动细则",
"ext": ".png",
"uuid": "bc2cbf01-3fd6-4af6-8916-0a3b980b114f",
"url": "//yun.duiba.com.cn/aurora/7b96d5dd6c8172978f4605be8e01473ed1ad0ab2.png"
},
{
"name": "Logo",
"ext": ".png",
"uuid": "d0452d45-9776-461b-a68e-d07a6043feed",
"url": "//yun.duiba.com.cn/aurora/b1b1646631ca092378d1929d882f9353ed8eca54.png"
},
{
"name": "弹窗蒙层",
"ext": ".png",
"uuid": "1de9775b-9f9e-46e1-bdff-84f7d488c026",
"url": "//yun.duiba.com.cn/aurora/70f7a74c93fec2cade23990ffa4a63842946fcb4.png"
},
{
"name": "按钮-关闭弹窗",
"ext": ".png",
"uuid": "d462f701-8879-4662-917f-e7218369c02f",
"url": "//yun.duiba.com.cn/aurora/36fea4395a70d10d94dbb55ea1fd6f74a4f4fd9c.png"
},
{
"name": "背景光",
"ext": ".png",
"uuid": "810008b4-2a25-4163-acf7-22f8922edc01",
"url": "//yun.duiba.com.cn/aurora/83a8be0f32d7b84e04bcbf4f4380b60378d42845.png"
},
{
"name": "弹窗背景",
"ext": ".png",
"uuid": "b2f3f3af-c655-4788-a5c6-eab61db089d2",
"url": "//yun.duiba.com.cn/aurora/a21b2c528bd8ce8bd1a2abf4dabe0cb043f7d891.png"
},
{
"name": "立即领取",
"ext": ".png",
"uuid": "e4d548d3-09c7-4213-89ae-ab6da5cd7718",
"url": "//yun.duiba.com.cn/aurora/5c7d09fb00042b1ee4ce1a1a1193b5644b0d4f6d.png"
},
{
"name": "弹窗背景",
"ext": ".png",
"uuid": "fbb78028-c3b9-47ad-a72a-37dab667003e",
"url": "//yun.duiba.com.cn/aurora/06dee5525d0b3efca38f93497ea66c0a5111e984.png"
},
{
"name": "我知道了按钮",
"ext": ".png",
"uuid": "ee1dbd2c-d0e9-483e-8c4e-fe4a37e0b302",
"url": "//yun.duiba.com.cn/aurora/b62e05a19e06e08b3f361950beb81fe13c4c80e8.png"
},
{
"name": "弹窗背景",
"ext": ".png",
"uuid": "383df34a-b575-4e1b-8527-9982e97442dd",
"url": "//yun.duiba.com.cn/aurora/29c4cfede74082a2fe84050f379857dc9d00db15.png"
}
],
"dataMapping": [
{
"name": "剩余次数",
"path": "getRemainTimes"
},
{
"name": "轮播数据",
"path": "getAllUserRecords"
},
{
"name": "游戏规则",
"path": "getRule"
},
{
"name": "奖品信息",
"path": "doJoin"
},
{
"name": "奖项信息",
"path": "getPrizeInfo"
}
],
"processes": [
{
"id": "bc6612a7-a468-4082-9534-97537baa6639",
"name": "活动细则_click",
"props": {},
"subEntry": "d47d3f4e-8095-4cc4-886d-11555794d495",
"sub": {
"d47d3f4e-8095-4cc4-886d-11555794d495": {
"uuid": "d47d3f4e-8095-4cc4-886d-11555794d495",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"70bfcebf-97e1-406f-a9e0-8c38c653964a"
]
}
},
"81fac73e-9641-4eb8-b317-57b409d67f05": {
"uuid": "81fac73e-9641-4eb8-b317-57b409d67f05",
"meta": "push-dialog",
"design": {
"x": 503,
"y": 47,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-活动规则"
},
"output": {}
},
"70bfcebf-97e1-406f-a9e0-8c38c653964a": {
"uuid": "70bfcebf-97e1-406f-a9e0-8c38c653964a",
"meta": "api-request",
"design": {
"x": 238,
"y": 47,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "/projectRule.query",
"dataName": "getRule"
},
"output": {
"success": [
"81fac73e-9641-4eb8-b317-57b409d67f05"
],
"failed": [
"115d2597-7652-4bc2-80b1-e4701e3a7906"
]
},
"alias": "查询项目规则"
},
"115d2597-7652-4bc2-80b1-e4701e3a7906": {
"uuid": "115d2597-7652-4bc2-80b1-e4701e3a7906",
"meta": "show-toast",
"design": {
"x": 484,
"y": 159,
"input": {
"default": [
{
"x": 5.5,
"y": 79
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 79
}
]
}
},
"props": {
"padding": 10,
"duration": 2000,
"showDuration": 300,
"hideDuration": 200,
"text": "查询规则失败,请稍后再试~"
},
"output": {}
}
}
},
{
"id": "99abf7c7-dcac-411b-a0df-63a6847a198f",
"name": "立即领取_click",
"props": {},
"subEntry": "65d04879-7670-4338-b0aa-3e592a5fe72e",
"sub": {
"65d04879-7670-4338-b0aa-3e592a5fe72e": {
"uuid": "65d04879-7670-4338-b0aa-3e592a5fe72e",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"d410dd21-fb01-4a14-8a23-e5b1f301e035"
]
}
},
"d410dd21-fb01-4a14-8a23-e5b1f301e035": {
"uuid": "d410dd21-fb01-4a14-8a23-e5b1f301e035",
"meta": "jump",
"design": {
"x": 231,
"y": 128,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 39
}
]
}
},
"props": {
"url": {
"type": "data-center",
"value": "doJoin.url"
}
},
"output": {}
}
}
},
{
"id": "623e623c-d887-442f-a810-4ffefaed1bc1",
"name": "活动奖品_click",
"props": {},
"subEntry": "6f2da443-224a-4635-b818-99d842b5ade9",
"sub": {
"6f2da443-224a-4635-b818-99d842b5ade9": {
"uuid": "6f2da443-224a-4635-b818-99d842b5ade9",
"alias": "入口",
"meta": "entry",
"design": {
"x": 9,
"y": 9,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"f8f1a226-4904-44f5-97be-0682ed285fdd"
]
}
},
"f8f1a226-4904-44f5-97be-0682ed285fdd": {
"uuid": "f8f1a226-4904-44f5-97be-0682ed285fdd",
"meta": "jump",
"design": {
"x": 353,
"y": 75,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 39
}
]
}
},
"props": {
"url": {
"type": "static",
"value": "baidu.com"
}
},
"output": {}
}
}
},
{
"id": "04aed616-8f51-4176-80c3-3bcabc6d2e15",
"name": "关闭按钮_click",
"props": {},
"subEntry": "bee3cf5f-9661-47f0-8116-ece5f53e4c87",
"sub": {
"bee3cf5f-9661-47f0-8116-ece5f53e4c87": {
"uuid": "bee3cf5f-9661-47f0-8116-ece5f53e4c87",
"alias": "入口",
"meta": "entry",
"design": {
"x": 22,
"y": 6,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"8b3d986f-e58f-4420-84f9-0d2fcccd4ea9"
]
}
},
"8b3d986f-e58f-4420-84f9-0d2fcccd4ea9": {
"uuid": "8b3d986f-e58f-4420-84f9-0d2fcccd4ea9",
"meta": "pop-dialog",
"design": {
"x": 268,
"y": 28,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 39
}
]
}
},
"props": {},
"output": {}
}
}
},
{
"id": "81c3b861-02ca-4230-a80e-5ecd8a3102fb",
"name": "初始化场景",
"props": {},
"subEntry": "771c4750-9a72-4f35-9151-11b755ad3432",
"sub": {
"771c4750-9a72-4f35-9151-11b755ad3432": {
"uuid": "771c4750-9a72-4f35-9151-11b755ad3432",
"alias": "入口",
"meta": "entry",
"design": {
"x": 31,
"y": 366,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"bbeddc58-aa56-4529-95f4-9d637ff97b2a"
]
}
},
"bbeddc58-aa56-4529-95f4-9d637ff97b2a": {
"uuid": "bbeddc58-aa56-4529-95f4-9d637ff97b2a",
"meta": "api-request",
"design": {
"x": 273,
"y": 333,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "join_1/getRemainTime.do",
"dataName": "getRemainTimes"
},
"output": {
"success": [
"390a0a31-78a3-4291-9782-1c6b82a9fe15"
],
"failed": [
"74ee883d-cdaa-4056-a3a2-f317923e75b3"
]
},
"alias": "获取剩余抽奖次数"
},
"74ee883d-cdaa-4056-a3a2-f317923e75b3": {
"uuid": "74ee883d-cdaa-4056-a3a2-f317923e75b3",
"meta": "push-dialog",
"design": {
"x": 730,
"y": 567,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-消息"
},
"output": {}
},
"baea6a9a-31aa-444b-913a-0256a94012a0": {
"uuid": "baea6a9a-31aa-444b-913a-0256a94012a0",
"meta": "api-request",
"design": {
"x": 930,
"y": 208,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "strategyRecords.query",
"method": "post",
"dataName": "getAllUserRecords",
"params": {
"type": "map",
"value": {
"strategyId": {
"type": "static",
"value": "“ru_1,ru_2,ru_3”"
}
}
}
},
"output": {
"success": [
"e4b144ac-7a58-4e51-a28d-a502db7d669b"
],
"failed": [
"74ee883d-cdaa-4056-a3a2-f317923e75b3"
]
},
"alias": "获取获奖信息轮播"
},
"390a0a31-78a3-4291-9782-1c6b82a9fe15": {
"uuid": "390a0a31-78a3-4291-9782-1c6b82a9fe15",
"meta": "api-request",
"design": {
"x": 499,
"y": 185,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "prize.query",
"dataName": "getPrizeInfo",
"params": {
"type": "map",
"value": {
"ids": {
"type": "static",
"value": "\"sss_1,sss_2,sss_3,sss_4,sss_5,sss_6\""
}
}
}
},
"output": {
"success": [
"88ccc6a0-606e-48da-93f0-6acbe861a76f"
],
"failed": [
"74ee883d-cdaa-4056-a3a2-f317923e75b3"
]
},
"alias": "获取所有奖项信息"
},
"711332a8-d3b9-4d14-b687-89fbcb750449": {
"uuid": "711332a8-d3b9-4d14-b687-89fbcb750449",
"meta": "5b34e6cd-46c1-492f-a46e-2d9d9280e166",
"design": {
"x": 900,
"y": 78,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {}
},
"props": {
"prizeInfoGroup": "node://e2055082-c4ee-4403-b4f9-4e8df1254932",
"mainScene": "node://74c9e6bf-0929-480e-b633-7b13141773a6"
},
"output": {},
"alias": "初始化奖项信息"
},
"e4b144ac-7a58-4e51-a28d-a502db7d669b": {
"uuid": "e4b144ac-7a58-4e51-a28d-a502db7d669b",
"meta": "91a45698-f1fc-4248-8ccc-bd927465d8de",
"design": {
"x": 1121,
"y": 138,
"input": {
"default": [
{
"x": 5.5,
"y": 55
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 48
}
],
"failed": [
{
"x": 124.5,
"y": 62
}
]
}
},
"props": {
"group": "node://eaad83e2-bae0-4f2a-ad5e-48efd33ed070",
"txtGroup": "node://b08c80e0-2220-4bb3-ba27-f79e83e1454f"
},
"output": {},
"alias": "初始化获奖信息轮播"
},
"88ccc6a0-606e-48da-93f0-6acbe861a76f": {
"uuid": "88ccc6a0-606e-48da-93f0-6acbe861a76f",
"meta": "32b1845f-ed17-4b9d-b5f2-194aeb9a43b5",
"design": {
"x": 734,
"y": 173,
"input": {
"default": [
{
"x": 5.5,
"y": 45
}
]
},
"output": {
"p0": [
{
"x": 124.5,
"y": 38
}
],
"p1": [
{
"x": 124.5,
"y": 52
}
]
}
},
"props": {},
"output": {
"p0": [
"711332a8-d3b9-4d14-b687-89fbcb750449"
],
"p1": [
"baea6a9a-31aa-444b-913a-0256a94012a0"
]
}
},
"79cb08f5-3fb9-4c78-8d5e-e968c6221fb2": {
"uuid": "79cb08f5-3fb9-4c78-8d5e-e968c6221fb2",
"meta": "04913f37-5951-429a-88cf-a1e3cc533adf",
"design": {
"x": 561,
"y": 27,
"input": {
"default": [
{
"x": 5.5,
"y": 55
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 48
}
],
"failed": [
{
"x": 124.5,
"y": 62
}
]
}
},
"props": {
"startBtn": "node://44e9622b-337f-4eaf-a33c-d7598098f9a9",
"dStartBtn": "node://e49cee18-2ba2-4161-85c3-a22c794d4fdf",
"remainTimesTxt": "node://82df149d-2929-451e-936e-06011333a15b"
},
"output": {}
}
},
"metas": [
{
"id": "5b34e6cd-46c1-492f-a46e-2d9d9280e166",
"script": "let prizeInfo = global.dataCenter.getDataByName('奖项信息');\nconsole.log(engine)\nif(prizeInfo && prizeInfo.length>0){\n\tfor(let i = 0;i<prizeInfo.length;i++){\n \tlet prizeItem = prizeInfo[i]\n let prize = new engine.Container()\n prize.width = 240;\n prize.height = props.prizeInfoGroup.height;\n let prizeImg = new engine.Image()\n prizeImg.source = \"\" + prizeItem.icon\n prizeImg.width = 140;\n prizeImg.height = 140;\n prizeImg.horizonCenter = 0;\n prizeImg.top =0;\n \n let prizeName = new engine.Label()\n prizeName.text = \"\" + prizeItem.name\n prizeName.size = 24;\n prizeName.fillColor = \"#FBD89F\";\n prizeName.bottom = 0;\n prizeName.horizonCenter = 0;\n prize.addChild(prizeImg)\n prize.addChild(prizeName)\n prize.x = i*240;\n props.prizeInfoGroup.addChild(prize)\n\t}\n}\n",
"props": {
"prizeInfoGroup": {
"type": "node",
"enum": []
}
},
"isInline": true,
"name": "初始化奖项信息",
"output": [],
"sub": {
"8f3dd2ab-5056-48dc-ab6f-0589784b585b": {
"uuid": "8f3dd2ab-5056-48dc-ab6f-0589784b585b",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "8f3dd2ab-5056-48dc-ab6f-0589784b585b"
},
{
"id": "91a45698-f1fc-4248-8ccc-bd927465d8de",
"script": "let startX=0;\nlet data = global.dataCenter.getDataByName('轮播数据');\nconsole.log(data)\nif(data&&data.length>0){\n\tfor(let i=0;i<data.length;i++){\n \tlet item = data[i]\n \tlet label = new engine.Label()\n \tlabel.size = 24;\n \tlabel.fillColor = \"#fff\"\n label.y = 8;\n \tlabel.text = `${item.userId}获得了${item.extra.name}`\n \tlabel.x = startX;\n\t\tlabel.verticalAlign = \"center\"\n \tprops.txtGroup.addChild(label) \n \tstartX += label.width+30;\n\t}\n engine.Tween.get(props.txtGroup)\n \t.set({x:800})\n \t.to({x:-target.width-200},3000*data.length+2000)\n \t.call(()=>{\n \tengine.Tween.get(props.group)\n \t\t.to({y:-50},1000)\n \t})\n \n}else {\n props.group.y = -50\n}\n",
"props": {
"group": {
"type": "node",
"enum": []
},
"txtGroup": {
"type": "node",
"enum": []
}
},
"isInline": true,
"name": "自定义节点",
"output": [
"success",
"failed"
]
},
{
"id": "32b1845f-ed17-4b9d-b5f2-194aeb9a43b5",
"script": "",
"props": {},
"isInline": true,
"name": "分流节点",
"output": [
"p0",
"p1"
],
"isDivider": true
}
],
"output": []
},
{
"id": "4eb1c520-cef3-4e5a-a5b0-536561c043ff",
"name": "规则容器_init",
"props": {},
"subEntry": "d1a80a4c-003d-4f8e-9c4a-a7b4120a90bb",
"sub": {
"d1a80a4c-003d-4f8e-9c4a-a7b4120a90bb": {
"uuid": "d1a80a4c-003d-4f8e-9c4a-a7b4120a90bb",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
}
},
{
"id": "b1b708d3-ec1a-4f81-8ca4-61c3fd55c7f2",
"name": "中奖轮播_data-center",
"props": {},
"subEntry": "5c9eb210-300d-4350-bd05-9475a687e1ed",
"sub": {
"5c9eb210-300d-4350-bd05-9475a687e1ed": {
"uuid": "5c9eb210-300d-4350-bd05-9475a687e1ed",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"f6c1f346-cd9b-4153-944b-6e8f4014483b"
]
}
},
"f6c1f346-cd9b-4153-944b-6e8f4014483b": {
"uuid": "f6c1f346-cd9b-4153-944b-6e8f4014483b",
"meta": "data-center-event-filter",
"design": {
"x": 234,
"y": 74,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
],
"cancel": [
{
"x": 124.5,
"y": 46
}
]
}
},
"props": {},
"output": {
"success": [
"b4dc3e67-0ca4-49e3-9310-00c901add50e"
]
}
},
"b4dc3e67-0ca4-49e3-9310-00c901add50e": {
"uuid": "b4dc3e67-0ca4-49e3-9310-00c901add50e",
"meta": "8f36b5db-dccf-400a-aedd-726a1f92d12a",
"design": {
"x": 440,
"y": 146,
"input": {
"default": [
{
"x": 5.5,
"y": 31
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24
}
],
"failed": [
{
"x": 124.5,
"y": 38
}
]
}
},
"props": {},
"output": {}
}
},
"metas": [
{
"id": "8f36b5db-dccf-400a-aedd-726a1f92d12a",
"script": "",
"props": {},
"isInline": true,
"name": "自定义节点",
"output": [
"success",
"failed"
]
}
]
},
{
"id": "8d94b5ef-aedc-4dc0-a1cb-14ac22942f1e",
"name": "组-中奖轮播_data-center",
"props": {},
"subEntry": "4a04e5e7-bc05-45ef-ae55-ae71bf0e516d",
"sub": {
"4a04e5e7-bc05-45ef-ae55-ae71bf0e516d": {
"uuid": "4a04e5e7-bc05-45ef-ae55-ae71bf0e516d",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
}
},
"metas": []
},
{
"id": "2d172618-d7d6-49e7-9ebc-781e1b94506c",
"name": "奖品_data-center",
"props": {},
"subEntry": "6874205a-1101-4a54-b39c-89bd4bba4e3d",
"sub": {
"6874205a-1101-4a54-b39c-89bd4bba4e3d": {
"uuid": "6874205a-1101-4a54-b39c-89bd4bba4e3d",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
}
},
"metas": []
},
{
"id": "a0dafbcf-c698-446f-af83-5e1ba1690741",
"name": "剩余抽奖次数_data-center",
"props": {},
"subEntry": "aee060fb-97b9-4a57-8430-85e33cde3caa",
"sub": {
"aee060fb-97b9-4a57-8430-85e33cde3caa": {
"uuid": "aee060fb-97b9-4a57-8430-85e33cde3caa",
"alias": "入口",
"meta": "entry",
"design": {
"x": -5,
"y": 64,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"8c6f84cc-85da-4259-a208-acfa9834f6c7"
]
}
},
"8c6f84cc-85da-4259-a208-acfa9834f6c7": {
"uuid": "8c6f84cc-85da-4259-a208-acfa9834f6c7",
"meta": "data-center-event-filter",
"design": {
"x": 219,
"y": 54,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
],
"cancel": [
{
"x": 124.5,
"y": 46
}
]
}
},
"props": {
"dataName": "剩余次数"
},
"output": {
"success": [
"b412434e-bb02-416e-b607-3c79e2d872de"
],
"cancel": []
}
},
"b412434e-bb02-416e-b607-3c79e2d872de": {
"uuid": "b412434e-bb02-416e-b607-3c79e2d872de",
"meta": "f22a800b-a32a-474d-ab3f-1abc4e375822",
"design": {
"x": 491,
"y": 47,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 40
}
],
"failed": [
{
"x": 124.5,
"y": 54
}
]
}
},
"props": {
"startBtn": "node://44e9622b-337f-4eaf-a33c-d7598098f9a9",
"dstartBtn": "node://e49cee18-2ba2-4161-85c3-a22c794d4fdf"
},
"output": {},
"alias": "更新开始按钮状态"
}
},
"metas": [
{
"id": "f22a800b-a32a-474d-ab3f-1abc4e375822",
"script": "\nlet remainTimes = global.dataCenter.getDataByName('剩余次数');\n\nconsole.log(remainTimes)\nif(remainTimes>0){\n props.dstartBtn.visible = false\n props.startBtn.visible = true\n}else{\n props.dstartBtn.visible = true\n props.startBtn.visible = false\n}\ntarget.text = \"剩余抽奖次数:\"+(remainTimes&&remainTimes>0?remainTimes : 0)",
"props": {
"startBtn": {
"type": "node",
"enum": []
},
"dstartBtn": {
"type": "node",
"enum": []
}
},
"isInline": true,
"name": "自定义节点",
"output": [
"success",
"failed"
]
}
]
},
{
"id": "f469222f-144f-4006-8a5c-54ed7104a7e5",
"name": "开始按钮_click",
"props": {},
"subEntry": "68b0c527-5581-4658-97c0-825c14a72848",
"sub": {
"68b0c527-5581-4658-97c0-825c14a72848": {
"uuid": "68b0c527-5581-4658-97c0-825c14a72848",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"cad43b7f-5baa-4630-ba6b-8eb3a1c394e6"
]
}
},
"cad43b7f-5baa-4630-ba6b-8eb3a1c394e6": {
"uuid": "cad43b7f-5baa-4630-ba6b-8eb3a1c394e6",
"meta": "api-request",
"design": {
"x": 245,
"y": 103,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "join_1/join.do",
"dataName": "doJoin"
},
"output": {
"success": [
"a7834546-75a1-4360-bc66-5513b196a95b"
],
"failed": [
"a9eae0d1-0a2a-4fda-9c50-1d3f56998756"
]
}
},
"a7834546-75a1-4360-bc66-5513b196a95b": {
"uuid": "a7834546-75a1-4360-bc66-5513b196a95b",
"meta": "a6c9e9c7-7934-4e5e-8bf7-8a5151f65781",
"design": {
"x": 578,
"y": 49,
"input": {
"default": [
{
"x": 5.5,
"y": 103
}
]
},
"output": {
"弹出中奖弹窗": [
{
"x": 124.5,
"y": 96
}
],
"弹出未中奖弹窗": [
{
"x": 124.5,
"y": 110
}
]
}
},
"props": {
"drawBg": "node://ae59bef0-d4eb-4d9e-9bff-2cd933b7086d",
"startBtn": "node://d6b59cf1-d135-4774-a1f3-411f75c7b529",
"startDrawBg": "node://7ea884af-3ecb-4b24-8ee2-5091d8e291ca",
"remainTimesGroup": "node://87120f29-bea3-48b8-897b-373ab0d23574",
"prizeGroup": "node://55fb5a22-a133-4815-9815-6107fbd63c61",
"noPrizeGroup": "node://8f646122-be68-4766-94b5-21ed49f1d257",
"mainScene": "node://74c9e6bf-0929-480e-b633-7b13141773a6",
"prizeImg": "node://165050c2-91ba-4fb6-bac5-d0f63b0e993e"
},
"output": {
"1": [],
"2": [],
"success": [],
"弹出中奖弹窗": [
"2013d723-6a92-431a-8bed-06ff4ee80884"
],
"弹出未中奖弹窗": [
"cca5da3b-cbca-4623-b816-75a68f165178"
]
}
},
"a9eae0d1-0a2a-4fda-9c50-1d3f56998756": {
"uuid": "a9eae0d1-0a2a-4fda-9c50-1d3f56998756",
"meta": "push-dialog",
"design": {
"x": 376,
"y": 425,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-消息"
},
"output": {}
},
"2013d723-6a92-431a-8bed-06ff4ee80884": {
"uuid": "2013d723-6a92-431a-8bed-06ff4ee80884",
"meta": "push-dialog",
"design": {
"x": 882,
"y": 53,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-中奖"
},
"output": {}
},
"cca5da3b-cbca-4623-b816-75a68f165178": {
"uuid": "cca5da3b-cbca-4623-b816-75a68f165178",
"meta": "push-dialog",
"design": {
"x": 875,
"y": 172,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-未中奖"
},
"output": {}
}
},
"metas": [
{
"id": "a6c9e9c7-7934-4e5e-8bf7-8a5151f65781",
"script": "global.distance = 0;\nglobal.points = [];\nglobal.tempPoints = [];\nglobal.startPoint = {}\nlet prizeInfo = global.dataCenter.getDataByName('奖品信息');\nlet allPrizeInfo = global.dataCenter.getDataByName('奖项信息');\nlet container = new engine.Container()\nprops.mainScene.addChild(container)\nprops.startDrawBg.visible = false;\nprops.drawBg.visible = true;\nprops.startBtn.visible = false;\nprops.remainTimesGroup.visible = false;\nprops.prizeGroup.mouseEnabled = false;\nprops.prizeGroup.mouseChildren = false;\nprops.noPrizeGroup.mouseEnabled = false;\nprops.noPrizeGroup.mouseChildren = false;\n\nprops.prizeMask = new engine.Graphics()\nprops.mainScene.addChild(props.prizeMask)\nprops.drawBg.addEventListener(engine.MouseEvent.MOUSE_DOWN, global.onDownPrize = (e) => {\n global.points.push(global.tempPoints);\n global.startPoint = {\n x: e.stageX,\n y: e.stageY\n }\n global.tempPoints.push(global.startPoint)\n}, this)\nprops.drawBg.addEventListener(engine.MouseEvent.MOUSE_MOVE, global.onMovePrize = (e) => {\n let endPoint = {\n x: e.stageX,\n y: e.stageY\n }\n global.tempPoints.push({\n x: e.stageX,\n y: e.stageY\n });\n draw(global.points, props.prizeMask)\n global.distance += distance(global.startPoint, endPoint)\n console.log(global.distance)\n global.startPoint = endPoint\n\n if (global.distance > 2000) {\n global.distance = 0;\n global.points = [];\n global.tempPoints = [];\n global.startPoint = {}\n props.drawBg.removeEventListener(engine.MouseEvent.MOUSE_DOWN, global.onDownPrize, this)\n props.drawBg.removeEventListener(engine.MouseEvent.MOUSE_MOVE, global.onMovePrize, this)\n props.drawBg.removeEventListener(engine.MouseEvent.MOUSE_UP, global.onUpPrize, this)\n props.drawBg.removeEventListener(engine.MouseEvent.MOUSE_OUT, global.onOutPrize, this)\n\t\t\t\tif (prizeInfo && prizeInfo.prizeId !== \"thanks\") {\n \t\t\t\tnext(\"弹出中奖弹窗\")\n\t\t\t\t}else{\n \t\t\t\tnext(\"弹出未中奖弹窗\")\n\t\t\t\t}\n \n }\n}, this)\nprops.drawBg.addEventListener(engine.MouseEvent.MOUSE_UP, global.onUpPrize = (e) => {\n global.tempPoints = [];\n}, this)\nprops.drawBg.addEventListener(engine.MouseEvent.MOUSE_OUT, global.onOutPrize = (e) => {\n //global.tempPoints = [];\n}, this)\n\nif (prizeInfo && prizeInfo.prizeId !== \"thanks\") {\n // 有奖\n let prize = null\n for (let i = 0; i < allPrizeInfo.length; i++) {\n if (prizeInfo.prizeId == allPrizeInfo[i].id) {\n prize = allPrizeInfo[i]\n }\n }\n props.prizeImg.source = prize.icon\n \n props.prizeGroup.mask = props.prizeMask;\n\n props.prizeGroup.visible = true;\n props.noPrizeGroup.visible = false;\n} else {\n // 没奖\n props.noPrizeGroup.mask = props.prizeMask;\n\n props.prizeGroup.visible = false;\n props.noPrizeGroup.visible = true;\n}\n\nfunction draw(points, mask) {\n if (!points.length) return;\n mask.clear();\n for (var i = 0; i < points.length; i++) {\n let tempPoints = points[i];\n if (tempPoints.length < 2) continue\n mask.beginFill(0xff0000);\n mask.drawCircle(tempPoints[0].x, tempPoints[0].y, 2);\n mask.endFill()\n mask.lineStyle(50, 0xff0000, 1)\n mask.moveTo(tempPoints[0].x, tempPoints[0].y);\n for (var j = 1; j < tempPoints.length - 1; j++) {\n mask.lineTo(tempPoints[j].x, tempPoints[j].y);\n }\n mask.endFill()\n mask.beginFill(0xff0000);\n mask.drawCircle(tempPoints[tempPoints.length - 1].x, tempPoints[tempPoints.length - 1].y, 2);\n mask.endFill()\n }\n}\n\nfunction distance(obj1, obj2) {\n let distance = Math.sqrt(Math.pow(obj1.x - obj2.x, 2) + Math.pow(obj1.y - obj2.y, 2));\n return distance;\n}",
"props": {
"drawBg": {
"type": "node",
"enum": []
},
"startBtn": {
"type": "node",
"enum": []
},
"startDrawBg": {
"type": "node",
"enum": []
},
"remainTimesGroup": {
"type": "node",
"enum": []
},
"prizeGroup": {
"type": "node",
"enum": []
},
"noPrizeGroup": {
"type": "node",
"enum": []
},
"prizeMask": {
"type": "node",
"enum": []
},
"mainScene": {
"type": "node",
"enum": []
},
"prizeImg": {
"type": "node",
"enum": []
}
},
"isInline": true,
"name": "开始刮奖",
"output": [
"弹出中奖弹窗",
"弹出未中奖弹窗"
],
"sub": {
"2ec12088-d051-4d93-8157-c92ae8ab40ee": {
"uuid": "2ec12088-d051-4d93-8157-c92ae8ab40ee",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "2ec12088-d051-4d93-8157-c92ae8ab40ee"
}
]
},
{
"id": "43b32f28-99a0-4198-b9e0-5b7ef18aecc4",
"name": "按钮无抽奖次数_click",
"props": {},
"subEntry": "b5d7f1d4-8c67-4a58-a47c-89d5ae61b63f",
"sub": {
"b5d7f1d4-8c67-4a58-a47c-89d5ae61b63f": {
"uuid": "b5d7f1d4-8c67-4a58-a47c-89d5ae61b63f",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"d28b4a26-2b9b-480c-9899-c7325d856b62"
]
}
},
"d28b4a26-2b9b-480c-9899-c7325d856b62": {
"uuid": "d28b4a26-2b9b-480c-9899-c7325d856b62",
"meta": "show-toast",
"design": {
"x": 267,
"y": 53,
"input": {
"default": [
{
"x": 5.5,
"y": 79
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 79
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": "无抽奖次数提示",
"text": "您暂无抽奖次数~凡消费即可参与"
},
"output": {}
}
}
},
{
"id": "371ced37-395d-42cb-ae4c-40fe9f1cea79",
"name": "刮卡区_init",
"props": {},
"subEntry": "0c3e9632-3f21-4df9-bf27-d7058aeb029a",
"sub": {
"0c3e9632-3f21-4df9-bf27-d7058aeb029a": {
"uuid": "0c3e9632-3f21-4df9-bf27-d7058aeb029a",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
}
}
},
{
"id": "94bd7d18-5340-4a8c-95b0-0ec2af4bfbe7",
"name": "关闭弹窗并更新剩余次数",
"props": {},
"subEntry": "cd571600-fcc7-4629-a9b9-d89b4879310c",
"sub": {
"cd571600-fcc7-4629-a9b9-d89b4879310c": {
"uuid": "cd571600-fcc7-4629-a9b9-d89b4879310c",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"ff0c97c2-0c53-43ea-b9ba-92e63ea101d6"
]
}
},
"ff0c97c2-0c53-43ea-b9ba-92e63ea101d6": {
"uuid": "ff0c97c2-0c53-43ea-b9ba-92e63ea101d6",
"meta": "api-request",
"design": {
"x": 176,
"y": 83,
"input": {
"default": [
{
"x": 5.5,
"y": 63
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 49
}
],
"failed": [
{
"x": 124.5,
"y": 63
}
],
"exception": [
{
"x": 124.5,
"y": 77
}
]
}
},
"props": {
"uri": "join_1/getRemainTime.do",
"dataName": "getRemainTimes"
},
"output": {
"success": [
"75914e4e-e1df-4157-9e9a-f1fad37c3f3f"
],
"failed": [
"5aa00df0-7161-4850-af38-71e4f9ecc392"
]
}
},
"5aa00df0-7161-4850-af38-71e4f9ecc392": {
"uuid": "5aa00df0-7161-4850-af38-71e4f9ecc392",
"meta": "show-toast",
"design": {
"x": 377,
"y": 243,
"input": {
"default": [
{
"x": 5.5,
"y": 79
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 79
}
]
}
},
"props": {
"padding": 10,
"duration": 1000,
"showDuration": 300,
"hideDuration": 200,
"viewName": "更新数据失败"
},
"output": {
"success": [
"75914e4e-e1df-4157-9e9a-f1fad37c3f3f"
]
}
},
"75914e4e-e1df-4157-9e9a-f1fad37c3f3f": {
"uuid": "75914e4e-e1df-4157-9e9a-f1fad37c3f3f",
"meta": "c08718d8-28e4-41c5-9739-be9f1abe0d93",
"design": {
"x": 625,
"y": 108,
"input": {
"default": [
{
"x": 5.5,
"y": 79
}
]
},
"output": {
"next": [
{
"x": 124.5,
"y": 79
}
]
}
},
"props": {
"prizeGroup": "node://55fb5a22-a133-4815-9815-6107fbd63c61",
"noPrizeGroup": "node://8f646122-be68-4766-94b5-21ed49f1d257",
"remainTimesTxt": "node://87120f29-bea3-48b8-897b-373ab0d23574",
"drawBg": "node://ae59bef0-d4eb-4d9e-9bff-2cd933b7086d",
"startDrawBg": "node://7ea884af-3ecb-4b24-8ee2-5091d8e291ca",
"startBtnGroup": "node://d6b59cf1-d135-4774-a1f3-411f75c7b529"
},
"output": {
"success": [],
"next": [
"877365bc-5b57-42f0-af60-3087a7b3d2e7"
]
},
"alias": "初始化刮奖区"
},
"877365bc-5b57-42f0-af60-3087a7b3d2e7": {
"uuid": "877365bc-5b57-42f0-af60-3087a7b3d2e7",
"meta": "pop-dialog",
"design": {
"x": 843,
"y": 132,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 39
}
]
}
},
"props": {
"closeAll": false
},
"output": {}
}
},
"metas": [
{
"id": "c08718d8-28e4-41c5-9739-be9f1abe0d93",
"script": "props.prizeGroup.visible=false;\nprops.noPrizeGroup.visible=false;\nprops.remainTimesTxt.visible= true;\nprops.drawBg.visible=false;\nprops.startDrawBg.visible=true;\nprops.startBtnGroup.visible=true;\nnext(\"next\")",
"props": {
"prizeGroup": {
"type": "node",
"enum": []
},
"noPrizeGroup": {
"type": "node",
"enum": []
},
"remainTimesTxt": {
"type": "node",
"enum": []
},
"drawBg": {
"type": "node",
"enum": []
},
"startDrawBg": {
"type": "node",
"enum": []
},
"startBtnGroup": {
"type": "node",
"enum": []
}
},
"isInline": true,
"name": "自定义节点",
"output": [
"next"
],
"sub": {
"35a4d5ee-09be-4e18-8b90-b2c0d18a56bb": {
"uuid": "35a4d5ee-09be-4e18-8b90-b2c0d18a56bb",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "35a4d5ee-09be-4e18-8b90-b2c0d18a56bb"
}
],
"output": []
},
{
"id": "bc02c850-912e-4428-a055-ada6a0c78fba",
"name": "按钮-关闭弹窗_click",
"props": {},
"subEntry": "a2bd9935-0719-426d-bda8-864e6766d5a9",
"sub": {
"a2bd9935-0719-426d-bda8-864e6766d5a9": {
"uuid": "a2bd9935-0719-426d-bda8-864e6766d5a9",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"e82e8271-b5ea-459d-9e32-e69465e57a9b"
]
}
},
"e82e8271-b5ea-459d-9e32-e69465e57a9b": {
"uuid": "e82e8271-b5ea-459d-9e32-e69465e57a9b",
"meta": "94bd7d18-5340-4a8c-95b0-0ec2af4bfbe7",
"design": {
"x": 284,
"y": 94,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {}
},
"props": {},
"output": {}
}
}
},
{
"id": "240e342c-bd55-47d0-a1d7-4ec526ab46a3",
"name": "奖品滚动视图_data-center",
"props": {},
"subEntry": "a0acae55-e736-4b54-9312-3bf0795abcfa",
"sub": {
"a0acae55-e736-4b54-9312-3bf0795abcfa": {
"uuid": "a0acae55-e736-4b54-9312-3bf0795abcfa",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
}
},
"metas": []
},
{
"id": "b105098a-b7a4-4613-afa6-a830be4a8b0a",
"name": "关闭按钮_click",
"props": {},
"subEntry": "36b06dd4-0bf5-4698-8e5f-97d9d988e414",
"sub": {
"36b06dd4-0bf5-4698-8e5f-97d9d988e414": {
"uuid": "36b06dd4-0bf5-4698-8e5f-97d9d988e414",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"c49ffcb4-537c-47f2-ba09-5219deeb2689"
]
}
},
"c49ffcb4-537c-47f2-ba09-5219deeb2689": {
"uuid": "c49ffcb4-537c-47f2-ba09-5219deeb2689",
"meta": "pop-dialog",
"design": {
"x": 233,
"y": 87,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 39
}
]
}
},
"props": {},
"output": {}
}
}
},
{
"id": "8f5cf707-4484-48d7-aa8b-1f817211c046",
"name": "屈臣氏刮刮卡1219_data-center",
"props": {},
"subEntry": "26dc9b2f-36b8-4b06-b3b8-e96fac6a9457",
"sub": {
"26dc9b2f-36b8-4b06-b3b8-e96fac6a9457": {
"uuid": "26dc9b2f-36b8-4b06-b3b8-e96fac6a9457",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"f68e36dd-3a73-429c-958b-ebb40bf2330b"
]
}
},
"f68e36dd-3a73-429c-958b-ebb40bf2330b": {
"uuid": "f68e36dd-3a73-429c-958b-ebb40bf2330b",
"meta": "data-center-event-filter",
"design": {
"x": 190,
"y": 128,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 32
}
],
"cancel": [
{
"x": 124.5,
"y": 46
}
]
}
},
"props": {
"dataName": "dialog"
},
"output": {
"success": [
"dc4ea6c8-d84c-40af-b645-d78f83a95a64"
]
}
},
"dc4ea6c8-d84c-40af-b645-d78f83a95a64": {
"uuid": "dc4ea6c8-d84c-40af-b645-d78f83a95a64",
"meta": "0de6c7ba-273a-4e55-9739-37c7270b8838",
"design": {
"x": 426,
"y": 186,
"input": {
"default": [
{
"x": 5.5,
"y": 39
}
]
},
"output": {
"1": [
{
"x": 124.5,
"y": 32
}
],
"2": [
{
"x": 124.5,
"y": 46
}
]
}
},
"props": {},
"output": {
"1": [
"f1589121-0a20-4e57-86ae-1136aaa7474a"
],
"2": [
"1159e972-b829-4e3f-a63d-ed16ca23bd3a"
]
}
},
"f1589121-0a20-4e57-86ae-1136aaa7474a": {
"uuid": "f1589121-0a20-4e57-86ae-1136aaa7474a",
"meta": "push-dialog",
"design": {
"x": 674,
"y": 136,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-中奖弹窗"
},
"output": {}
},
"1159e972-b829-4e3f-a63d-ed16ca23bd3a": {
"uuid": "1159e972-b829-4e3f-a63d-ed16ca23bd3a",
"meta": "push-dialog",
"design": {
"x": 674,
"y": 252,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"complete": [
{
"x": 124.5,
"y": 47
}
]
}
},
"props": {
"viewName": "弹窗-未中奖"
},
"output": {}
}
},
"metas": [
{
"id": "0de6c7ba-273a-4e55-9739-37c7270b8838",
"script": "next(props.dialogType + '');",
"props": {
"dialogType": {
"type": "number",
"enum": [],
"alias": "类型"
}
},
"isInline": true,
"name": "自定义节点",
"output": [
"1",
"2"
]
}
]
},
{
"id": "114670b7-f451-4963-986d-c21f909f546c",
"name": "屈臣氏刮刮卡1219_data-center",
"props": {},
"subEntry": "a2d37fba-bda0-4b1a-999d-47ced3dab8d4",
"sub": {
"a2d37fba-bda0-4b1a-999d-47ced3dab8d4": {
"uuid": "a2d37fba-bda0-4b1a-999d-47ced3dab8d4",
"alias": "入口",
"meta": "entry",
"design": {
"x": 35,
"y": 20,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
},
"e50ab8aa-8d14-470c-89d7-a62725014939": {
"uuid": "e50ab8aa-8d14-470c-89d7-a62725014939",
"meta": "6ebe307d-aee6-4091-b4b2-dd2ea15b852d",
"design": {
"x": 255,
"y": 151,
"input": {
"default": [
{
"x": 5.5,
"y": 31
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 24
}
],
"failed": [
{
"x": 124.5,
"y": 38
}
]
}
},
"props": {},
"output": {}
}
},
"metas": [
{
"id": "6ebe307d-aee6-4091-b4b2-dd2ea15b852d",
"script": "",
"props": {},
"isInline": true,
"name": "自定义节点",
"output": [
"success",
"failed"
],
"sub": {
"fd3c771e-ea60-4524-9df8-0d60d94868ce": {
"uuid": "fd3c771e-ea60-4524-9df8-0d60d94868ce",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "fd3c771e-ea60-4524-9df8-0d60d94868ce"
}
]
},
{
"id": "9aeb7c34-a41a-45c5-8c7e-9ab7be81c716",
"name": "屈臣氏刮刮卡1219_init",
"props": {},
"subEntry": "f9ec1b02-eb39-4606-8f22-95c5865bcec7",
"sub": {
"f9ec1b02-eb39-4606-8f22-95c5865bcec7": {
"uuid": "f9ec1b02-eb39-4606-8f22-95c5865bcec7",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": [
"6d75f480-3287-4d00-9ef3-902907ab9aa1"
]
}
},
"6d75f480-3287-4d00-9ef3-902907ab9aa1": {
"uuid": "6d75f480-3287-4d00-9ef3-902907ab9aa1",
"meta": "81c3b861-02ca-4230-a80e-5ecd8a3102fb",
"design": {
"x": 280,
"y": 14,
"input": {
"default": [
{
"x": 5.5,
"y": 31
}
]
},
"output": {}
},
"props": {},
"output": {}
}
}
},
{
"id": "fc0ad7cb-454b-4dac-8591-43645d90a6c5",
"name": "按钮-关闭弹窗_click",
"props": {},
"subEntry": "a05a1c8a-22e2-4515-808a-94d0525f8c00",
"sub": {
"a05a1c8a-22e2-4515-808a-94d0525f8c00": {
"uuid": "a05a1c8a-22e2-4515-808a-94d0525f8c00",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
"behaviors": [
{
"x": 124.5,
"y": 31.5
}
]
"uuid": "0effc205-44ae-4b71-b4b4-4ffdd1969ca4",
"alias": "rect_click",
"meta": "2609390d-53ed-45fe-9354-a789b75aa109"
}
},
"props": {},
"output": {
"success": [
"69e38a06-3837-4f24-9c90-67447a8422ba"
]
}
},
"69e38a06-3837-4f24-9c90-67447a8422ba": {
"uuid": "69e38a06-3837-4f24-9c90-67447a8422ba",
"meta": "94bd7d18-5340-4a8c-95b0-0ec2af4bfbe7",
"design": {
"x": 260,
"y": 71,
"input": {
"default": [
{
"x": 5.5,
"y": 39
"uuid": "b7ac2754-b74c-4737-9414-c067b08cae26"
}
]
},
"output": {}
},
"props": {},
"output": {}
}
],
"assets": [
{
"name": "次数用完背景",
"ext": ".png",
"url": "//yun.duiba.com.cn/aurora/assets/2f0ac55119497660450e0e2e9d62c0738fc18c4d.png",
"uuid": "54d53499-a402-45fa-9fb5-ef58d3a912c5"
}
},
],
"dataMapping": [],
"processes": [
{
"id": "023a47c1-a590-4dd3-a13c-3de205fb8e40",
"name": "按钮-我知道了_click",
"id": "65f2ff05-3ba4-42c6-9130-ca3b3bab786b",
"name": "view_init1",
"props": {},
"subEntry": "be72617f-0f11-40f1-87fd-661bf76cf501",
"subEntry": "8cc3819f-d523-4f0e-8cd7-c30b269bcbe6",
"sub": {
"be72617f-0f11-40f1-87fd-661bf76cf501": {
"uuid": "be72617f-0f11-40f1-87fd-661bf76cf501",
"8cc3819f-d523-4f0e-8cd7-c30b269bcbe6": {
"uuid": "8cc3819f-d523-4f0e-8cd7-c30b269bcbe6",
"alias": "入口",
"meta": "entry",
"design": {
......@@ -3383,7 +255,7 @@
"success": [
{
"x": 124.5,
"y": 31.5
"y": 32
}
]
}
......@@ -3391,39 +263,48 @@
"props": {},
"output": {
"success": [
"a461fc26-ad6b-4b0e-83ed-0d78499d008d"
"6a20258e-6f08-4f28-ac6b-9fb13883d633"
]
}
},
"a461fc26-ad6b-4b0e-83ed-0d78499d008d": {
"uuid": "a461fc26-ad6b-4b0e-83ed-0d78499d008d",
"meta": "94bd7d18-5340-4a8c-95b0-0ec2af4bfbe7",
"6a20258e-6f08-4f28-ac6b-9fb13883d633": {
"uuid": "6a20258e-6f08-4f28-ac6b-9fb13883d633",
"meta": "log",
"design": {
"x": 264,
"y": 134,
"x": 182,
"y": 110,
"input": {
"default": [
{
"x": 5.5,
"y": 39
"y": 48.5
}
]
},
"output": {}
"output": {
"success": [
{
"x": 124.5,
"y": 48.5
}
]
}
},
"props": {
"content": "进入啦"
},
"props": {},
"output": {}
}
}
},
{
"id": "5e1514bd-1856-4316-8b54-f2ebb8b48118",
"name": "剩余抽奖次数_data-center",
"id": "b80bfc2a-b6e9-407d-a12c-db601d2a1e28",
"name": "view-polling_init",
"props": {},
"subEntry": "dff7c0af-cc36-4a9a-a913-5e8b267723f2",
"subEntry": "1eff6f1e-906c-4404-8fd5-f7a1776f5313",
"sub": {
"dff7c0af-cc36-4a9a-a913-5e8b267723f2": {
"uuid": "dff7c0af-cc36-4a9a-a913-5e8b267723f2",
"1eff6f1e-906c-4404-8fd5-f7a1776f5313": {
"uuid": "1eff6f1e-906c-4404-8fd5-f7a1776f5313",
"alias": "入口",
"meta": "entry",
"design": {
......@@ -3434,7 +315,7 @@
"success": [
{
"x": 124.5,
"y": 31.5
"y": 32
}
]
}
......@@ -3442,43 +323,21 @@
"props": {},
"output": {
"success": [
"9d94f352-ddaf-41e3-a3f8-e453881a3f2d"
"9c44309d-4f91-4f3a-95a6-71e50c822f63"
]
}
},
"7b2f42c1-038c-41a7-832c-d6489ea7c393": {
"uuid": "7b2f42c1-038c-41a7-832c-d6489ea7c393",
"meta": "90290f8b-768a-4853-ab80-ff14ce390cdd",
"design": {
"x": 448,
"y": 27,
"input": {
"default": [
{
"x": 5.5,
"y": 55
}
]
},
"output": {}
},
"props": {
"dstartBtn": "node://e49cee18-2ba2-4161-85c3-a22c794d4fdf",
"startBtn": "node://44e9622b-337f-4eaf-a33c-d7598098f9a9"
},
"output": {}
},
"9d94f352-ddaf-41e3-a3f8-e453881a3f2d": {
"uuid": "9d94f352-ddaf-41e3-a3f8-e453881a3f2d",
"meta": "data-center-event-filter",
"9c44309d-4f91-4f3a-95a6-71e50c822f63": {
"uuid": "9c44309d-4f91-4f3a-95a6-71e50c822f63",
"meta": "api-polling",
"design": {
"x": 220,
"y": 8,
"x": 184,
"y": 105,
"input": {
"default": [
{
"x": 5.5,
"y": 39
"y": 99.5
}
]
},
......@@ -3486,78 +345,58 @@
"success": [
{
"x": 124.5,
"y": 32
"y": 78.5
}
],
"cancel": [
"failed": [
{
"x": 124.5,
"y": 46
"y": 92.5
}
]
],
"timeout": [
{
"x": 124.5,
"y": 106.5
}
},
"props": {
"dataName": "getRemainTimes"
},
"output": {
"success": [
"7b2f42c1-038c-41a7-832c-d6489ea7c393"
],
"cancel": []
"exception": [
{
"x": 124.5,
"y": 120.5
}
]
}
},
"metas": [
{
"id": "90290f8b-768a-4853-ab80-ff14ce390cdd",
"script": "\nlet remainTimes = global.dataCenter.getDataByName('剩余次数');\nconsole.log(remainTimes)\nif(remainTimes>0){\n props.dstartBtn.visible = false\n props.startBtn.visible = true\n}else{\n props.dstartBtn.visible = true\n props.startBtn.visible = false\n}\ntarget.text = \"剩余抽奖次数:\"+(remainTimes&&remainTimes>0?remainTimes : 0)",
"props": {
"dstartBtn": {
"type": "node",
"enum": []
},
"startBtn": {
"type": "node",
"enum": []
"count": 10,
"delay": 500,
"uri": "http://localhost:3003/hdtool/recon/getOrderStatus",
"dataName": "order",
"field": "status",
"successValues": "1",
"params": {
"type": "map",
"value": {
"aaa": {
"type": "static",
"value": "test"
}
},
"isInline": true,
"name": "更新剩余次数及按钮状态",
"output": [],
"sub": {
"3d82b985-0b15-49e8-b5df-5c90662d724d": {
"uuid": "3d82b985-0b15-49e8-b5df-5c90662d724d",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "3d82b985-0b15-49e8-b5df-5c90662d724d"
}
]
},
{
"id": "1ec189e5-98ac-417d-b548-ec3d24e2f24d",
"name": "弹窗-中奖_init",
"id": "dab876ac-9fb4-4528-a967-342445d33106",
"name": "image_init",
"props": {},
"subEntry": "b5f0a22b-6560-467e-949b-1f326e98b76a",
"subEntry": "4eb94d25-4d2f-4c60-a729-3f3be1a4cc70",
"sub": {
"b5f0a22b-6560-467e-949b-1f326e98b76a": {
"uuid": "b5f0a22b-6560-467e-949b-1f326e98b76a",
"4eb94d25-4d2f-4c60-a729-3f3be1a4cc70": {
"uuid": "4eb94d25-4d2f-4c60-a729-3f3be1a4cc70",
"alias": "入口",
"meta": "entry",
"design": {
......@@ -3568,7 +407,7 @@
"success": [
{
"x": 124.5,
"y": 31.5
"y": 32
}
]
}
......@@ -3576,21 +415,21 @@
"props": {},
"output": {
"success": [
"ca88686b-2e42-43c2-ba62-369b4b3e704d"
"9b983c4f-c76b-4faa-b1f6-3bf0683c17b3"
]
}
},
"ca88686b-2e42-43c2-ba62-369b4b3e704d": {
"uuid": "ca88686b-2e42-43c2-ba62-369b4b3e704d",
"meta": "data-center-event-filter",
"9b983c4f-c76b-4faa-b1f6-3bf0683c17b3": {
"uuid": "9b983c4f-c76b-4faa-b1f6-3bf0683c17b3",
"meta": "cff6075e-bf23-4a5b-a0e7-8e5fa846bc39",
"design": {
"x": 228,
"y": 100,
"x": 212,
"y": 145,
"input": {
"default": [
{
"x": 5.5,
"y": 39
"y": 31.5
}
]
},
......@@ -3598,108 +437,43 @@
"success": [
{
"x": 124.5,
"y": 32
"y": 24.5
}
],
"cancel": [
"failed": [
{
"x": 124.5,
"y": 46
}
]
"y": 38.5
}
},
"props": {
"dataName": "doJoin"
},
"output": {
"success": [
"a44e2fcd-425b-4f5b-bbeb-95b2336b99e8"
]
}
},
"a44e2fcd-425b-4f5b-bbeb-95b2336b99e8": {
"uuid": "a44e2fcd-425b-4f5b-bbeb-95b2336b99e8",
"meta": "a41f71c8-283e-4c20-aa04-58c66d80d052",
"design": {
"x": 473,
"y": 117,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {}
},
"props": {
"prizeImg": "node://3fcd61d7-8a40-43c1-821d-0e3fdb486cab",
"prizeName": "node://d689dac0-a726-4873-b21b-9be03d36003b"
},
"props": {},
"output": {}
}
},
"metas": [
{
"id": "a41f71c8-283e-4c20-aa04-58c66d80d052",
"script": "let prize = global.\nif (this.prize && this.prize.prizeId !== \"thanks\") {\n this.prizeImg.source = this.lottery.icon;\n this.prizeName.text = this.lottery.name + \"\"\n }",
"props": {
"prizeImg": {
"type": "node",
"enum": []
},
"prizeName": {
"type": "node",
"enum": []
}
},
"id": "cff6075e-bf23-4a5b-a0e7-8e5fa846bc39",
"script": "target.source = '//yun.dui88.com/projectxh5/credits-250-250.png'",
"props": {},
"isInline": true,
"name": "自定义节点",
"output": []
}
"output": [
"success",
"failed"
]
},
{
"id": "6e5bd4a8-5658-4d3c-9452-3b31fe867c85",
"name": "弹窗-中奖_awake",
"props": {},
"subEntry": "beff851a-caca-4696-a96c-18b659a4adf2",
"sub": {
"beff851a-caca-4696-a96c-18b659a4adf2": {
"uuid": "beff851a-caca-4696-a96c-18b659a4adf2",
"alias": "入口",
"meta": "entry",
"design": {
"x": 9,
"y": 9,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {
"success": []
}
}
},
"metas": []
},
{
"id": "62002b01-f97f-44f1-88c7-f7bea61a9a96",
"name": "按钮-立即领取_click",
"id": "2609390d-53ed-45fe-9354-a789b75aa109",
"name": "rect_click",
"props": {},
"subEntry": "8f3e1b71-f0c6-42c3-96d6-25c0ad89dce8",
"subEntry": "7cd211bf-9837-411e-b830-a4ac2f3f850d",
"sub": {
"8f3e1b71-f0c6-42c3-96d6-25c0ad89dce8": {
"uuid": "8f3e1b71-f0c6-42c3-96d6-25c0ad89dce8",
"7cd211bf-9837-411e-b830-a4ac2f3f850d": {
"uuid": "7cd211bf-9837-411e-b830-a4ac2f3f850d",
"alias": "入口",
"meta": "entry",
"design": {
......@@ -3710,7 +484,7 @@
"success": [
{
"x": 124.5,
"y": 31.5
"y": 32
}
]
}
......@@ -3718,21 +492,21 @@
"props": {},
"output": {
"success": [
"325aadb1-d650-4d9c-8218-7aca47016bd7"
"16129060-cbd4-448d-aee2-b7327addc7dc"
]
}
},
"325aadb1-d650-4d9c-8218-7aca47016bd7": {
"uuid": "325aadb1-d650-4d9c-8218-7aca47016bd7",
"meta": "9eeb4f30-0428-4803-83f2-e8ffbacd0368",
"16129060-cbd4-448d-aee2-b7327addc7dc": {
"uuid": "16129060-cbd4-448d-aee2-b7327addc7dc",
"meta": "3931f9c8-5ddf-43df-85db-99113de5be57",
"design": {
"x": 246,
"y": 58,
"x": 187,
"y": 115,
"input": {
"default": [
{
"x": 5.5,
"y": 31
"y": 31.5
}
]
},
......@@ -3740,13 +514,13 @@
"success": [
{
"x": 124.5,
"y": 24
"y": 24.5
}
],
"failed": [
{
"x": 124.5,
"y": 38
"y": 38.5
}
]
}
......@@ -3757,183 +531,105 @@
},
"metas": [
{
"id": "9eeb4f30-0428-4803-83f2-e8ffbacd0368",
"script": "let prize = global.dataCenter.getDataByName('奖品信息');\nwindow.location.href = prize.url",
"id": "3931f9c8-5ddf-43df-85db-99113de5be57",
"script": "let copy = target.clone();\nconsole.log(copy);\n\nnext('success');",
"props": {},
"isInline": true,
"name": "领奖",
"name": "自定义节点",
"output": [
"success",
"failed"
],
"sub": {
"125f1ba0-8829-43fa-b948-363027372446": {
"uuid": "125f1ba0-8829-43fa-b948-363027372446",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
}
},
"props": {},
"output": {}
}
},
"subEntry": "125f1ba0-8829-43fa-b948-363027372446"
}
]
},
{
"id": "a4bb438f-2e22-4433-84da-5a21e650122d",
"name": "弹窗-中奖_init",
"id": "446db6e4-b94b-4d14-95ec-3acede72cb49",
"name": "view_init_2",
"props": {},
"subEntry": "fb8c1218-2b88-4139-91d2-5af9f54895a6",
"subEntry": "554361ea-146a-4b99-a629-49357ac51671",
"sub": {
"fb8c1218-2b88-4139-91d2-5af9f54895a6": {
"uuid": "fb8c1218-2b88-4139-91d2-5af9f54895a6",
"554361ea-146a-4b99-a629-49357ac51671": {
"uuid": "554361ea-146a-4b99-a629-49357ac51671",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
"y": 10
}
},
"props": {},
"output": {}
}
}
},
{
"id": "167f599c-bd48-404a-9e5b-8172106262fd",
"name": "弹窗-中奖_init",
"id": "ab50adb9-3762-4306-a471-b7f6ba4268fc",
"name": "view_init_3",
"props": {},
"subEntry": "f49c5321-564c-41c3-9f59-ba3c555f67e8",
"subEntry": "203e618a-918a-4543-ab10-f5dcbcfb4285",
"sub": {
"f49c5321-564c-41c3-9f59-ba3c555f67e8": {
"uuid": "f49c5321-564c-41c3-9f59-ba3c555f67e8",
"203e618a-918a-4543-ab10-f5dcbcfb4285": {
"uuid": "203e618a-918a-4543-ab10-f5dcbcfb4285",
"alias": "入口",
"meta": "entry",
"design": {
"x": 28,
"y": 11,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
"x": 10,
"y": 10
}
},
"props": {},
"output": {}
}
}
},
{
"id": "a3606651-1355-40d8-aeb5-ef6cf722d413",
"name": "弹窗-中奖_awake",
"id": "df5d7b6c-2b56-4c04-87a1-3b2948f04a5f",
"name": "view_init_4",
"props": {},
"subEntry": "0f1594fb-82b7-47c1-b6d0-3e753198a292",
"subEntry": "e9dfb2ac-9552-40bd-b642-2c65a004011c",
"sub": {
"0f1594fb-82b7-47c1-b6d0-3e753198a292": {
"uuid": "0f1594fb-82b7-47c1-b6d0-3e753198a292",
"e9dfb2ac-9552-40bd-b642-2c65a004011c": {
"uuid": "e9dfb2ac-9552-40bd-b642-2c65a004011c",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10,
"input": {},
"output": {
"success": [
{
"x": 124.5,
"y": 31.5
}
]
"y": 10
}
},
"props": {},
"output": {
"success": [
"07da0464-a197-41c4-8c7b-b45de8d986d0"
]
}
},
"07da0464-a197-41c4-8c7b-b45de8d986d0": {
"uuid": "07da0464-a197-41c4-8c7b-b45de8d986d0",
"meta": "5c163620-52a9-49db-8651-7460bff1ba2a",
"design": {
"x": 181,
"y": 65,
"input": {
"default": [
{
"x": 5.5,
"y": 47
}
]
},
"output": {
"success": [
{
"x": 124.5,
"y": 40
"id": "c1fc3151-4284-4c50-b87b-fb376fe92f51",
"name": "view_init_5",
"props": {},
"subEntry": "5c740899-1be4-4908-8b67-8878ba8ea403",
"sub": {
"5c740899-1be4-4908-8b67-8878ba8ea403": {
"uuid": "5c740899-1be4-4908-8b67-8878ba8ea403",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10
}
],
"failed": [
{
"x": 124.5,
"y": 54
}
]
}
},
"props": {
"prizeImg": "node://3fcd61d7-8a40-43c1-821d-0e3fdb486cab",
"prizeName": "node://d689dac0-a726-4873-b21b-9be03d36003b"
},
"output": {},
"alias": "更新奖品信息"
{
"id": "6b2bfe23-4c3f-4557-933d-f3d3f283425d",
"name": "view_init_6",
"props": {},
"subEntry": "35649405-21dc-4b0c-8292-62811dd6ebf9",
"sub": {
"35649405-21dc-4b0c-8292-62811dd6ebf9": {
"uuid": "35649405-21dc-4b0c-8292-62811dd6ebf9",
"alias": "入口",
"meta": "entry",
"design": {
"x": 10,
"y": 10
}
}
},
{
"id": "5c163620-52a9-49db-8651-7460bff1ba2a",
"script": "let prize = global.dataCenter.getDataByName('奖品信息');\nlet prizeInfo =global.dataCenter.getDataByName('奖项信息');\nlet getPrize=null\nif(prizeInfo &&prizeInfo.length>0){\n\tfor(let i=0;i<prizeInfo.length;i++){\n \tif(prize.prizeId == prizeInfo[i].id){\n getPrize = prizeInfo[i];\n \t\t\tprops.prizeImg.source = getPrize.icon\n \tprops.prizeName.text = \"\"+getPrize.name\n }\n\t} \n}\nconsole.log(prize)",
"props": {
"prizeImg": {
"type": "node",
"enum": []
},
"prizeName": {
"type": "node",
"enum": []
}
},
"name": "自定义节点",
"output": [
"success",
"failed"
]
}
],
"customs": []
"customs": [
"test1"
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,8 @@
"main": "index.js",
"types": "index.d.ts",
"dependencies": {
"color": "^3.1.2"
"color": "^3.1.2",
"howler": "^2.1.2"
},
"devDependencies": {
"dts-bundle": "^0.7.3",
......
......@@ -180,6 +180,14 @@ export default class Container extends DisplayObject {
return index;
}
/**
* 是否含有child
* @param child
*/
contains(child: DisplayObject):boolean{
return !!this.getChildIndex(child);
}
/**
* 设置child的层级
* @param {DisplayObject} child
......
......@@ -5,6 +5,7 @@ import { Point } from "../math/Point";
import { Event } from "../events/Event";
import Graphics from '../graphics/Graphics';
import { DEG_TO_RAD, RAD_TO_DEG } from '../const';
import {Stage} from "./Stage";
/**
* 基础显示对象抽象类
......@@ -36,7 +37,7 @@ export class DisplayObject extends EventDispatcher {
/**
* 舞台
*/
stage: any;
stage: Stage;
/**
* 名字,预留
......
......@@ -2,6 +2,8 @@ import {Event} from "../events/Event";
import {DisplayObject} from "./DisplayObject";
import {devicePixelRatio} from "../const";
let container;
/**
* 此类对于需要在canvas上放置html其他类型元素的时候非常有用<br/>
* 比如有时候我们需要放置一个注册,登录或者其他的内容.这些内容包含了输入框<br/>
......@@ -22,7 +24,7 @@ export class FloatDisplay extends DisplayObject {
* @since 1.0.0
* @type{HtmlElement}
*/
public htmlElement: any = null;
private _htmlElement: any = null;
/**
* 是否已经添加了舞台事件
* @property _isAdded
......@@ -75,19 +77,26 @@ export class FloatDisplay extends DisplayObject {
let s = this;
s._instanceType = "FloatDisplay";
s.addEventListener(Event.REMOVED_FROM_STAGE, function (e: Event) {
if (s.htmlElement) {
s.htmlElement.style.display = "none";
if (s._htmlElement) {
s._htmlElement.style.display = "none";
}
});
s.addEventListener(Event.ADDED_TO_STAGE, function (e: Event) {
if (s.htmlElement) {
let style = s.htmlElement.style;
if(!container){
container = document.createElement('div');
container.style.position = "absolute";
container.style.left = "0";
container.style.top = "0";
s.stage.rootDiv.appendChild(container);//, s.stage.rootDiv.childNodes[0]
}
if (s._htmlElement) {
let style = s._htmlElement.style;
if (!s._isAdded) {
s._isAdded = true;
s.stage.rootDiv.insertBefore(s.htmlElement, s.stage.rootDiv.childNodes[0]);
container.appendChild(s._htmlElement);
s.stage["_floatDisplayList"].push(s);
} else {
if (s.htmlElement && s.visible) {
if (s._htmlElement && s.visible) {
style.display = "block";
}
}
......@@ -97,6 +106,15 @@ export class FloatDisplay extends DisplayObject {
this._transformID = -1;
}
get htmlElement() {
return this._htmlElement;
}
set htmlElement(v) {
this.init(v);
this.updateStyle();
}
/**
* 初始化方法,htmlElement 一定要设置width和height样式,并且一定要用px单位
* @method init
......@@ -104,7 +122,7 @@ export class FloatDisplay extends DisplayObject {
* @since 1.0.0
* @param {HtmlElement} htmlElement 需要封装起来的html元素的引用。你可以通过这个引用来调用或设置此元素自身的属性方法和事件,甚至是样式
*/
public init(htmlElement: any): void {
protected init(htmlElement: any): void {
let s = this;
let she: any;
if (typeof (htmlElement) == "string") {
......@@ -131,7 +149,7 @@ export class FloatDisplay extends DisplayObject {
// s._bounds.height = h;
s._localBoundsSelf.width = w;
s._localBoundsSelf.height = h;
s.htmlElement = she;
s._htmlElement = she;
}
/**
......@@ -163,7 +181,7 @@ export class FloatDisplay extends DisplayObject {
*/
public updateStyle(): void {
let s = this;
let o = s.htmlElement;
let o = s._htmlElement;
if (o) {
let style = o.style;
let visible = s.visible;
......@@ -201,14 +219,14 @@ export class FloatDisplay extends DisplayObject {
public destroy(): void {
//清除相应的数据引用
let s = this;
let elem = s.htmlElement;
let elem = s._htmlElement;
if (elem) {
elem.style.display = "none";
if (elem.parentNode) {
elem.parentNode.removeChild(elem);
}
s._isAdded = false;
s.htmlElement = null;
s._htmlElement = null;
}
let sf: any = s.stage["_floatDisplayList"];
let len = sf.length;
......
......@@ -371,30 +371,30 @@ export default class Sprite extends Container {
* texture的宽度和缩放乘积
* @member {number}
*/
// get width() {
// return Math.abs(this.scale.x) * this._texture.orig.width;
// }
get width() {
return Math.abs(this.scale.x) * this._texture.orig.width;
}
// set width(value) {
// const s = sign(this.scale.x) || 1;
set width(value) {
const s = sign(this.scale.x) || 1;
// this.scale.x = s * value / this._texture.orig.width;
// this._width = value;
// }
this.scale.x = s * value / this._texture.orig.width;
this._width = value;
}
/**
* texture的高度和缩放乘积
* @member {number}
*/
// get height() {
// return Math.abs(this.scale.y) * this._texture.orig.height;
// }
// set height(value) {
// const s = sign(this.scale.y) || 1;
// this.scale.y = s * value / this._texture.orig.height;
// this._height = value;
// }
get height() {
return Math.abs(this.scale.y) * this._texture.orig.height;
}
set height(value) {
const s = sign(this.scale.y) || 1;
this.scale.y = s * value / this._texture.orig.height;
this._height = value;
}
/**
* 0,0标识左上角,0.5,0.5表示中间,1,1表示右下角
......
......@@ -72,7 +72,7 @@ export class Stage extends Container {
* @type {Html Div}
* @default null
*/
public rootDiv: any = null;
public rootDiv: any = HTMLElement;
/**
* 当前stage所使用的渲染器
* 渲染器有两种,一种是canvas 一种是webGl
......@@ -432,7 +432,7 @@ export class Stage extends Container {
s.dispatchEvent(Event.ON_INIT_STAGE);
// }
}, 100);
let rc = s.rootDiv;
let rc = canvas;//s.rootDiv;
let mouseEvent = s.onMouseEvent.bind(s);
//鼠标事件
if (osType != "pc") {
......
......@@ -133,6 +133,26 @@ export class Event extends HashObject {
* @since 1.0.0
*/
public static PROGRESS: string = "onProgress";
/**
* 获取焦点
* @Event
* @property FOCUS
* @type {string}
* @static
* @public
* @since 1.0.0
*/
public static FOCUS: string = "focus";
/**
* 失去焦点
* @Event
* @property BLUR
* @type {string}
* @static
* @public
* @since 1.0.0
*/
public static BLUR: string = "blur";
/**
* 出错事件
* @Event
......
......@@ -113,6 +113,10 @@ export class Loader extends EventDispatcher {
}
this.caches[name] = data;
}
get(name: string){
return this.caches[name];
}
}
async function fetchAsync(url: string) {
......
......@@ -9,7 +9,7 @@ import {TextField} from "./TextField";
* @class InputText
* @public
* @since 1.0.0
* @extends annie.FloatDisplay
* @extends FloatDisplay
*/
export class InputText extends FloatDisplay {
/**
......@@ -90,7 +90,7 @@ export class InputText extends FloatDisplay {
* @return {void}
* @since 1.0.0
*/
public init(htmlElement: any): void {
protected init(htmlElement: any): void {
super.init(htmlElement);
//默认设置
let s = this;
......
......@@ -170,9 +170,9 @@ export class TextField extends Sprite {
set width(value: number) {
if (this._width !== value) {
this.dispatchEvent(Event.RESIZE);
this._width = value;
this.dirty = true;
this.dispatchEvent(Event.RESIZE);
}
}
......@@ -184,9 +184,9 @@ export class TextField extends Sprite {
set height(value: number) {
if (this._height !== value) {
this.dispatchEvent(Event.RESIZE);
this._height = value;
this.dirty = true;
this.dispatchEvent(Event.RESIZE);
}
}
......@@ -240,21 +240,21 @@ export class TextField extends Sprite {
* @since 1.0.0
*/
public set text(value: string) {
if (this._text != value) {
this._setText(value);
}
}
public get text(): string {
return this._text;
}
protected _setText(value) {
if (this._text != value) {
this._text = value;
this.dirty = true;
this.dispatchEvent(Event.RESIZE);
}
}
protected _text: string = "";
......@@ -271,7 +271,6 @@ export class TextField extends Sprite {
this._font = value;
this.dirty = true;
}
;
}
public get font(): string {
......
......@@ -137,7 +137,7 @@ export default class BaseTexture extends EventDispatcher {
update() {
this.width = this.source.width;
this.height = this.source.height;
this.isPowerOfTwo = isPow2(this.width) && isPow2(this.width);
this.isPowerOfTwo = isPow2(this.width) && isPow2(this.height);
this.dispatchEvent("update")
}
......
......@@ -38,9 +38,8 @@ export function afterConstructor(ctor: Function) {
}
if(withEvents){
if (events) {
target.eventsProxy.eventsConfig = events;
target.eventsProxy.start(events);
}
target.eventsProxy.start();
}
for(let child of this.children){
......
......@@ -28,7 +28,7 @@ export function applyEvents(ctor: Function) {
ctor.prototype.applyEvents = function () {
let eventsProxy = this.eventsProxy = new EventsProxy(this);
for (let k in eventsMapping) {
this.addEventListener(k, eventsProxy.onEvent, eventsProxy);
this.addEventListener(k, eventsProxy.onBuiltinEvent, eventsProxy);
}
globalEvent.addEventListener(DATA_CENTER_EVENT, eventsProxy.onDateCenterEvent, eventsProxy);
......@@ -37,37 +37,56 @@ export function applyEvents(ctor: Function) {
class EventsProxy extends HashObject {
host;
eventsConfig: any;
private _eventsConfig: any;
constructor(host) {
super();
this.host = host;
}
start() {
this.invoke('init', this.host);
get eventsConfig() {
return this._eventsConfig;
}
start(eventsConfig) {
this._eventsConfig = eventsConfig;
for(let name in eventsConfig){
globalEvent.addEventListener(name, this.onCustomEvent, this);
}
this.invokeBehavior('init', this.host);
}
invoke(name, target, payload?) {
if (this.eventsConfig) {
const eventConfig = this.eventsConfig[name];
invokeBehavior(name, target, payload?) {
if (this._eventsConfig) {
const eventConfig = this._eventsConfig[name];
if (eventConfig) {
for(let behavior of eventConfig.behaviors){
if(behavior.disabled){
continue;
}
executeBehavior({
main: eventConfig.behaviors[0],
main: behavior,
}, 'main', target, payload);
}
}
}
}
onEvent(e) {
onBuiltinEvent(e) {
let eventName = eventsMapping[e.type];
if (eventName) {
this.invoke(eventName, e.target, e.data);
this.invokeBehavior(eventName, e.target, e.data);
}
}
onCustomEvent(e) {
this.invokeBehavior(e.type, this.host, e.data);
}
onDateCenterEvent(e) {
this.invoke('data-center', this.host, e.data);
this.invokeBehavior('data-center', this.host, e.data);
}
destroy(): void {
......
......@@ -49,7 +49,7 @@ export class GameStage extends Container {
this.addChild(this._sceneContainer = new StackContainer());
this.addChild(blackLayer);
this.addChild(this._popupContainer = new StackContainer(false));
this.addChild(this._popupContainer = new StackContainer());
this.addChild(this._toast = new Toast(this));
blackLayer.percentWidth = 100;
......@@ -98,7 +98,7 @@ export class GameStage extends Container {
* @param onAssetsProgress
* @param onAssetsComplete
*/
async launch(config, onAssetsProgress?, onAssetsComplete?) {
async launch(config, onAssetsProgress?, onAssetsComplete?, onStart?) {
this._config = config;
const {assets, customs} = config;
let loaded = 0;
......@@ -128,6 +128,8 @@ export class GameStage extends Container {
this.start();
onStart && onStart();
function p() {
loaded++;
......@@ -150,7 +152,9 @@ export class GameStage extends Container {
//registerScripts(scripts);
//registerCustomModuleFromConfig(customs);
if(dataMapping){
this.dataCenter.registerDataMapping(dataMapping);
}
setProcessMetaLibs(processes, builtinProcesses);
let sceneEntry = this.instantiateView(entrySceneView);
......
......@@ -32,7 +32,8 @@ export function loadAssets(config, onProgress?, onComplete?) {
config.map(assetConfig => {
assetsConfig.push(assetConfig);
const loadFunc = loaderMapping[assetConfig.ext] || 'Raw';
let method = globalLoader['load' + loadFunc] || globalLoader.loadRaw;
let method = globalLoader['load' + loadFunc];
if(method){
return method.call(globalLoader, assetConfig.url, assetConfig.uuid).then(
(data)=>{
loaded++;
......@@ -42,6 +43,11 @@ export function loadAssets(config, onProgress?, onComplete?) {
failedList.push(assetConfig.url);
}
);
}else{
loaded++;
onProgress && onProgress(loaded, total);
return Promise.resolve();
}
})
).then(
() => {
......
......@@ -6,3 +6,5 @@ export * from './GameStage'
export * from './enviroment'
export * from './custom-module'
export * from './nodes'
export * from './sound'
export * from './assets-manager'
......@@ -31,21 +31,20 @@ export class Image extends Sprite {
let url = this._source;
if(url.indexOf('://') >= 0){ //如果是有协议的地址
if (url.indexOf(assetScheme) === 0) {
let uuid = url.replace(assetScheme, '');
url = url.replace(assetScheme, '');
/*const assetConfig = getAssetByUUID(uuid);
if(assetConfig){
url = assetConfig.url;
this.texture = Texture.fromImage(url);
}*/
this.texture = Texture.from(uuid);
}
} else{ //否则就使用素材名
const assetConfig = getAssetByName(url);
if(assetConfig){
url = assetConfig.url;
}
this.texture = Texture.fromImage(url);
}
this.texture = Texture.fromImage(url);
}
private _setSourceDirect(value){
......
/**
* Created by rockyl on 2019-12-13.
*/
import {Label} from "./Label";
import {MouseEvent} from "../../../2d/events/MouseEvent";
import {Event} from "../../../2d/events/Event";
import {FloatDisplay} from "../../../2d/display/FloatDisplay";
import {TextField} from "../../../2d/text";
import {Point} from "../../../2d/math";
import {VERTICAL_ALIGN} from "../../..";
export class TextInput extends Label {
private _floatDisplay: FloatDisplay;
private _placeholderLabel: TextField;
private _input: any;
private _placeholder: string = '';
private _placeholderColor: any = '#666666';
private _maxLength: number;
private _oldFillColor;
private _oldStrokeColor;
constructor() {
super();
this.setup();
this.addEventListener(MouseEvent.CLICK, this.onClickStatic, this);
this.addEventListener(Event.RESIZE, this.onResize, this);
this.text = '';
}
get placeholder(): string {
return this._placeholder;
}
set placeholder(value: string) {
this._placeholder = value;
this._placeholderLabel.text = value;
}
get placeholderColor(): any {
return this._placeholderColor;
}
set placeholderColor(value: any) {
this._placeholderColor = value;
this._placeholderLabel.fillColor = value;
}
get maxLength(): number {
return this._maxLength;
}
set maxLength(value: number) {
if(this._maxLength != value){
this._maxLength = value;
this.setMaxLength();
}
}
private setup() {
let fd = this._floatDisplay = new FloatDisplay();
let input = this._input = document.createElement('input');
fd.htmlElement = input;
fd.alpha = 0;
input.style.pointerEvents = 'none';
let style = input.style;
style.outline = 'none';
style.padding = '0';
style.border = '0';
style.backgroundColor = 'transparent';
input.type = 'text';
input.addEventListener('blur', this.onBlur);
let pl = this._placeholderLabel = new TextField();
pl.fillColor = this._placeholderColor;
this.verticalAlign = pl.verticalAlign = VERTICAL_ALIGN.MIDDLE;
this.addChild(fd);
}
protected _setText(value) {
super._setText(value);
this.setMaxLength();
setTimeout(() => {
this.showPlaceholderLabel(value)
}, 1);
}
private setMaxLength() {
let value = this._text;
let maxLength = this._maxLength;
if (maxLength > 0 && value && value.length > maxLength) {
this.text = value.substr(0, maxLength);
}
}
private showPlaceholderLabel(value) {
let pl = this._placeholderLabel;
if(value){
let pl = this._placeholderLabel;
if (pl.parent) {
pl.parent.removeChild(pl);
}
}else{
if (!pl.parent) {
pl.text = this._placeholder;
pl.size = this.size;
pl.font = this.font;
this.addChildAt(pl, 0);
}
}
}
setFocus() {
let fd = this._floatDisplay;
let input = this._input;
let pl = this._placeholderLabel;
fd.width = this.width;
fd.height = this.height;
input.value = this.text;
let style = input.style;
style.fontSize = this.size + 'px';
style.color = this.fillColor;
style.width = this.width + 'px';
style.height = this.height + 'px';
style.fontFamily = this.font;
this._oldFillColor = this.fillColor;
this._oldStrokeColor = this.strokeColor;
this.fillColor = 'transparent';
this.strokeColor = 'transparent';
if (pl.parent) {
pl.parent.removeChild(pl);
}
//this.addChild(this._floatDisplay);
this._floatDisplay.alpha = 1;
input.style.pointerEvents = 'auto';
if(this._maxLength > 0){
input.maxLength = this._maxLength;
}else{
input.removeAttribute('maxLength')
}
input.focus();
this.dispatchEvent(Event.FOCUS);
}
setBlur() {
let input = this._input;
this._floatDisplay.alpha = 0;
input.style.pointerEvents = 'none';
input.blur();
this.text = input.value;
this.fillColor = this._oldFillColor;
this.strokeColor = this._oldStrokeColor;
this.dispatchEvent(Event.BLUR);
}
private onBlur = (e) => {
this.setBlur();
};
private onClickStage(e){
if(e.currentTarget !== this){
this.setBlur();
}
}
private onClickStatic() {
this.setFocus();
this.stage.once(MouseEvent.CLICK, this.onClickStage, this);
}
private onResize() {
let pl = this._placeholderLabel;
pl.width = this.width;
pl.height = this.height;
}
public static _bp: Point = new Point();
/**
* 检测点是否在任何child上
* 重写父类方法
*/
hitTestPoint(globalPoint: Point, isMouseEvent: boolean = false) {
const s = this;
//如果不可见
if (!this.visible) return null;
//如果禁止子级的鼠标事件
if (isMouseEvent && !this.mouseChildren) return null;
if (!isMouseEvent) {
//如果不是系统调用则不考虑这个点是从全局来的,只认为这个点就是当前要碰撞测试同级别下的坐标点
if (s._localBoundsSelf.isPointIn(globalPoint)) {
return s;
}
} else {
let {x, y} = s.globalToLocal(globalPoint, TextInput._bp);
if (x > 0 && x < s.width && y > 0 && y < s.height) {
return s;
}
}
return null;
}
}
......@@ -5,4 +5,5 @@
export * from './shapes'
export * from './Image'
export * from './Label'
export * from './TextInput'
export * from './ScrollView'
\ No newline at end of file
/**
* Created by rockyl on 2019-12-16.
*/
import {getAssetByUUID} from "./assets-manager";
import {Howl, Howler} from 'howler';
import {injectProperties} from "../utils";
const instances = {};
export function playSound(uuid, options = {}, name?) {
let assetConfig = getAssetByUUID(uuid);
if (assetConfig) {
let url = assetConfig.url;
let opts: any = {
src: [url],
autoplay: true,
};
injectProperties(opts, options);
let sound = new Howl(opts);
if (name !== undefined) {
instances[name] = sound;
sound.on('end', function () {
delete instances[name];
});
}
return sound;
}
}
export function stopSound(name){
let sound = instances[name];
if(sound){
sound.stop();
delete instances[name];
}
}
......@@ -3,7 +3,7 @@
*/
import {Container} from "../../2d/display";
import {Rect, Image, Label, Circle, ScrollView} from "./nodes";
import {Rect, Image, Label, Circle, ScrollView, TextInput} from "./nodes";
import {injectProperties, instantiateScript, propertyParse} from "../utils";
const nodeTypeMapping = {
......@@ -12,6 +12,7 @@ const nodeTypeMapping = {
circle: Circle,
label: Label,
image: Image,
textinput: TextInput,
scrollView: ScrollView,
};
......@@ -41,9 +42,8 @@ function instantiateView(config) {
}
}
if (events) {
node.eventsProxy.eventsConfig = events;
node.eventsProxy.start(events);
}
node.eventsProxy.start();
if (children && children.length > 0) {
for (let childConfig of children) {
......
......@@ -13,6 +13,8 @@ export * from './web'
export * from './log-switch'
import {instantiate} from './game-warpper/view-interpreter'
export {Howl, Howler} from 'howler';
export {
instantiate
}
......@@ -11,14 +11,14 @@ import {Event} from "../2d/events/Event";
export let gameStage: GameStage;
export function launch(url, onAssetsProgress, onAssetsComplete) {
export function launch(url, onAssetsProgress, onAssetsComplete, onStart) {
return globalLoader.loadJson(url)
.then(config => {
return launchWithConfig(config, onAssetsProgress, onAssetsComplete);
return launchWithConfig(config, onAssetsProgress, onAssetsComplete, onStart);
});
}
export function launchWithLocalStorage(id, onAssetsProgress, onAssetsComplete) {
export function launchWithLocalStorage(id, onAssetsProgress, onAssetsComplete, onStart) {
const storeKey = 'preview-project-' + id;
let storeData = localStorage.getItem(storeKey);
let {data, processes, scripts, customs,} = JSON.parse(storeData);
......@@ -27,10 +27,10 @@ export function launchWithLocalStorage(id, onAssetsProgress, onAssetsComplete) {
registerScripts(scripts);
registerCustomModuleFromConfig(customs);
return launchWithConfig(data, onAssetsProgress, onAssetsComplete);
return launchWithConfig(data, onAssetsProgress, onAssetsComplete, onStart);
}
export function launchWithConfig(config, onAssetsProgress, onAssetsComplete) {
export function launchWithConfig(config, onAssetsProgress, onAssetsComplete, onStart) {
return new Promise(resolve => {
const {containerId, designWidth, designHeight, frameRate, scaleMode, rendererType,} = config.options;
let stage = window['stage'] = new Stage(
......@@ -50,7 +50,7 @@ export function launchWithConfig(config, onAssetsProgress, onAssetsComplete) {
});
stage.addChild(gameStage);
gameStage.launch(config, onAssetsProgress, onAssetsComplete);
gameStage.launch(config, onAssetsProgress, onAssetsComplete, onStart);
});
resolve(gameStage);
......
......@@ -7,10 +7,12 @@ export function findNodeByUUID(node, uuid) {
return node;
}
if(node.children && node.children.length > 0){
for (let child of node.children) {
let target = findNodeByUUID(child, uuid);
if (target) {
return target;
}
}
}
}
......@@ -1862,6 +1862,11 @@ homedir-polyfill@^1.0.1:
dependencies:
parse-passwd "^1.0.0"
howler@^2.1.2:
version "2.1.2"
resolved "https://registry.npm.taobao.org/howler/download/howler-2.1.2.tgz#8433a09d8fe84132a3e726e05cb2bd352ef8bd49"
integrity sha1-hDOgnY/oQTKj5ybgXLK9NS74vUk=
hpack.js@^2.1.6:
version "2.1.6"
resolved "https://registry.npm.taobao.org/hpack.js/download/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment