Commit abe35ba9 authored by Li MingZhe's avatar Li MingZhe

fix: 删除透明背景脚本

parent a746aa7f
No preview for this file type
...@@ -76,6 +76,15 @@ ...@@ -76,6 +76,15 @@
}, },
{ {
"__id__": 8 "__id__": 8
},
{
"__id__": 10
},
{
"__id__": 12
},
{
"__id__": 14
} }
], ],
"_active": true, "_active": true,
...@@ -362,24 +371,18 @@ ...@@ -362,24 +371,18 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "res", "_name": "btn_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 2 "__id__": 2
}, },
"_children": [ "_children": [],
"_active": true,
"_components": [
{ {
"__id__": 9 "__id__": 9
},
{
"__id__": 22
},
{
"__id__": 25
} }
], ],
"_active": false,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -391,8 +394,8 @@ ...@@ -391,8 +394,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 0, "width": 61,
"height": 0 "height": 67
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -403,8 +406,8 @@ ...@@ -403,8 +406,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 481.171,
0, -258.602,
0, 0,
0, 0,
0, 0,
...@@ -426,91 +429,46 @@ ...@@ -426,91 +429,46 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "77TSH9gGdLsZHvoci6Fd5D" "_id": "44x6DQDg9Aq7QFb26kMb2g"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Sprite",
"_name": "img", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "node": {
"__id__": 8 "__id__": 8
}, },
"_children": [ "_enabled": true,
{ "_materials": [
"__id__": 10
},
{
"__id__": 12
},
{
"__id__": 14
},
{
"__id__": 16
},
{
"__id__": 18
},
{ {
"__id__": 20 "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
} }
], ],
"_active": true, "_srcBlendFactor": 770,
"_components": [], "_dstBlendFactor": 771,
"_prefab": null, "_spriteFrame": {
"_opacity": 255, "__uuid__": "bbc0c425-e225-4ca1-8856-8e92a7bf7b7c"
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
}, },
"_anchorPoint": { "_type": 0,
"_sizeMode": 1,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0, "y": 0
"z": 0
}, },
"_skewX": 0, "_fillStart": 0,
"_skewY": 0, "_fillRange": 0,
"_is3DNode": false, "_isTrimmedMode": true,
"_groupIndex": 0, "_atlas": null,
"groupIndex": 0, "_id": "b5NyeUjC1K4J4jpq7IcXpt"
"_id": "ecc8kx3rJDyZtC/9zv6Zjk"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_left", "_name": "btn_right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 2
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -542,8 +500,8 @@ ...@@ -542,8 +500,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 572.318,
0, -258.602,
0, 0,
0, 0,
0, 0,
...@@ -565,7 +523,7 @@ ...@@ -565,7 +523,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "44x6DQDg9Aq7QFb26kMb2g" "_id": "2bgmQznRxC7LNnq4pouYf1"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -575,11 +533,15 @@ ...@@ -575,11 +533,15 @@
"__id__": 10 "__id__": 10
}, },
"_enabled": true, "_enabled": true,
"_materials": [], "_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
"__uuid__": "bbc0c425-e225-4ca1-8856-8e92a7bf7b7c" "__uuid__": "ce9855f3-2ba9-4e0e-becb-01fc0ea67b37"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 1,
...@@ -593,14 +555,14 @@ ...@@ -593,14 +555,14 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "b5NyeUjC1K4J4jpq7IcXpt" "_id": "d6pf8CcFZIrqZjdqAfB2/6"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "text_bg", "_name": "text_bg",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 2
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -632,8 +594,8 @@ ...@@ -632,8 +594,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 523.565,
0, -173.815,
0, 0,
0, 0,
0, 0,
...@@ -655,7 +617,7 @@ ...@@ -655,7 +617,7 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "1ehNLmPwNLJIHNbjDiOgFE" "_id": "54r+DGgPtBvZq/vJAMMaPg"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Sprite",
...@@ -665,7 +627,11 @@ ...@@ -665,7 +627,11 @@
"__id__": 12 "__id__": 12
}, },
"_enabled": true, "_enabled": true,
"_materials": [], "_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": {
...@@ -683,22 +649,28 @@ ...@@ -683,22 +649,28 @@
"_fillRange": 0, "_fillRange": 0,
"_isTrimmedMode": true, "_isTrimmedMode": true,
"_atlas": null, "_atlas": null,
"_id": "d0u+inyVBNqYoPKJY8LCda" "_id": "96PHvIBglCBJGFuVQXNadC"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_right", "_name": "res",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 2
}, },
"_children": [], "_children": [
"_active": true,
"_components": [
{ {
"__id__": 15 "__id__": 15
},
{
"__id__": 22
},
{
"__id__": 25
} }
], ],
"_active": false,
"_components": [],
"_prefab": null, "_prefab": null,
"_opacity": 255, "_opacity": 255,
"_color": { "_color": {
...@@ -710,8 +682,8 @@ ...@@ -710,8 +682,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 61, "width": 0,
"height": 67 "height": 0
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -745,42 +717,82 @@ ...@@ -745,42 +717,82 @@
"_is3DNode": false, "_is3DNode": false,
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"_id": "2bgmQznRxC7LNnq4pouYf1" "_id": "77TSH9gGdLsZHvoci6Fd5D"
}, },
{ {
"__type__": "cc.Sprite", "__type__": "cc.Node",
"_name": "", "_name": "img",
"_objFlags": 0, "_objFlags": 0,
"node": { "_parent": {
"__id__": 14 "__id__": 14
}, },
"_enabled": true, "_children": [
"_materials": [], {
"_srcBlendFactor": 770, "__id__": 16
"_dstBlendFactor": 771, },
"_spriteFrame": { {
"__uuid__": "ce9855f3-2ba9-4e0e-becb-01fc0ea67b37" "__id__": 18
},
{
"__id__": 20
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
}, },
"_type": 0, "_contentSize": {
"_sizeMode": 1, "__type__": "cc.Size",
"_fillType": 0, "width": 0,
"_fillCenter": { "height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0 "y": 0,
"z": 0
}, },
"_fillStart": 0, "_skewX": 0,
"_fillRange": 0, "_skewY": 0,
"_isTrimmedMode": true, "_is3DNode": false,
"_atlas": null, "_groupIndex": 0,
"_id": "d6pf8CcFZIrqZjdqAfB2/6" "groupIndex": 0,
"_id": "ecc8kx3rJDyZtC/9zv6Zjk"
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "btn_play", "_name": "btn_play",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 15
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -870,7 +882,7 @@ ...@@ -870,7 +882,7 @@
"_name": "btn_replay", "_name": "btn_replay",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 15
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -960,7 +972,7 @@ ...@@ -960,7 +972,7 @@
"_name": "btn_stop", "_name": "btn_stop",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 9 "__id__": 15
}, },
"_children": [], "_children": [],
"_active": true, "_active": true,
...@@ -1050,7 +1062,7 @@ ...@@ -1050,7 +1062,7 @@
"_name": "font", "_name": "font",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 8 "__id__": 14
}, },
"_children": [ "_children": [
{ {
...@@ -1205,7 +1217,7 @@ ...@@ -1205,7 +1217,7 @@
"_name": "audio", "_name": "audio",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 8 "__id__": 14
}, },
"_children": [ "_children": [
{ {
......
cc.macro.ENABLE_TRANSPARENT_CANVAS = true;
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "e7780569-85d9-4616-9503-9716baa443d9",
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -162,8 +162,8 @@ cc.Class({ ...@@ -162,8 +162,8 @@ cc.Class({
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => { cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
// console.log(' preload data, ', data); // console.log(' preload data, ', data);
// this.loadEnd(); this.loadEnd();
this.addServerListener(); // this.addServerListener();
if (window && window["air"]) { if (window && window["air"]) {
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
...@@ -515,10 +515,11 @@ cc.Class({ ...@@ -515,10 +515,11 @@ cc.Class({
const leftBtn = getSprNode("btn_left") const leftBtn = cc.find("Canvas/btn_left") // getSprNode("btn_left")
leftBtn.scale = this._mapScaleMin; leftBtn.scale = this._mapScaleMin;
leftBtn.x = px - offX; leftBtn.x = px - offX;
leftBtn.y = py; leftBtn.y = py;
leftBtn.zIndex = 5;
leftBtn.on(cc.Node.EventType.TOUCH_START, () => { leftBtn.on(cc.Node.EventType.TOUCH_START, () => {
if (!this.canTouch) { if (!this.canTouch) {
return; return;
...@@ -528,10 +529,11 @@ cc.Class({ ...@@ -528,10 +529,11 @@ cc.Class({
}); });
const rightBtn = getSprNode("btn_right") const rightBtn = cc.find("Canvas/btn_right") //getSprNode("btn_right")
rightBtn.scale = this._mapScaleMin; rightBtn.scale = this._mapScaleMin;
rightBtn.x = px + offX; rightBtn.x = px + offX;
rightBtn.y = py; rightBtn.y = py;
rightBtn.zIndex = 5;
rightBtn.on(cc.Node.EventType.TOUCH_START, () => { rightBtn.on(cc.Node.EventType.TOUCH_START, () => {
if (!this.canTouch) { if (!this.canTouch) {
return; return;
...@@ -540,14 +542,16 @@ cc.Class({ ...@@ -540,14 +542,16 @@ cc.Class({
this.nextPageClick(); this.nextPageClick();
}); });
this.canvas.addChild(leftBtn); // this.canvas.addChild(leftBtn);
this.canvas.addChild(rightBtn); // this.canvas.addChild(rightBtn);
const textBg = getSprNode("text_bg") const textBg = cc.find("Canvas/text_bg") //getSprNode("text_bg")
textBg.scale = this._mapScaleMin; textBg.scale = this._mapScaleMin;
textBg.x = px; textBg.x = px;
textBg.y = py + 65 * this._mapScaleMin; textBg.y = py + 65 * this._mapScaleMin;
this.canvas.addChild(textBg); textBg.zIndex = 5;
// this.canvas.addChild(textBg);
textBg.opacity = 100;
const labelNode = new cc.Node(); const labelNode = new cc.Node();
...@@ -564,7 +568,10 @@ cc.Class({ ...@@ -564,7 +568,10 @@ cc.Class({
if (labelNode.width > textBg.width * textBg.scaleX * 0.9) { if (labelNode.width > textBg.width * textBg.scaleX * 0.9) {
labelNode.scale = textBg.width * textBg.scaleX * 0.9 / labelNode.width; labelNode.scale = textBg.width * textBg.scaleX * 0.9 / labelNode.width;
} }
textBg.addChild(labelNode);
labelNode.x = textBg.x;
labelNode.y = textBg.y;
textBg.parent.addChild(labelNode, 7);
this.leftBtn = leftBtn; this.leftBtn = leftBtn;
......
play/assets/ww_cc_image_player/texture/text_bg.png

293 Bytes | W: | H:

play/assets/ww_cc_image_player/texture/text_bg.png

218 Bytes | W: | H:

play/assets/ww_cc_image_player/texture/text_bg.png
play/assets/ww_cc_image_player/texture/text_bg.png
play/assets/ww_cc_image_player/texture/text_bg.png
play/assets/ww_cc_image_player/texture/text_bg.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": true,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 89, "width": 89,
......
No preview for this file type
{"ios":{"sceneName":"ww_cc_image_player","version":"21e0a"},"android":{"sceneName":"ww_cc_image_player","version":"21e0a"}} {"ios":{"sceneName":"ww_cc_image_player","version":"bf92e"},"android":{"sceneName":"ww_cc_image_player","version":"bf92e"}}
\ No newline at end of file \ No newline at end of file
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