Commit abe35ba9 authored by Li MingZhe's avatar Li MingZhe

fix: 删除透明背景脚本

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