diff --git a/assets/Scene/Circle_avatar/circle_avatar.effect.meta b/assets/Scene/Circle_avatar/circle_avatar.effect.meta index b4c2e69..7b9b20f 100644 --- a/assets/Scene/Circle_avatar/circle_avatar.effect.meta +++ b/assets/Scene/Circle_avatar/circle_avatar.effect.meta @@ -5,11 +5,11 @@ { "glsl1": { "vert": "\nprecision highp float;\nuniform mediump mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", - "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n#endif\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform float radius;\nuniform float blur;\nuniform vec2 center;\nuniform float wh_ratio;\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture2D(texture, v_uv0);\n o *= v_color;\n float circle = radius * radius;\n float rx = center.x * wh_ratio;\n float ry = center.y;\n float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry);\n o.a = smoothstep(circle, circle - blur, dis);\n gl_FragColor = o;\n}" + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n#endif\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform float radius;\nuniform float blur;\nuniform vec2 center;\nuniform float wh_ratio;\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture2D(texture, v_uv0);\n o *= v_color;\n float circle = radius * radius;\n float rx = center.x * wh_ratio;\n float ry = center.y;\n float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry);\n o.a = smoothstep(circle, circle - blur, dis) * o.a;\n gl_FragColor = o;\n}" }, "glsl3": { "vert": "\nprecision highp float;\nuniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_nativeSize;\n highp mat4 cc_matView;\n mediump mat4 cc_matViewInv;\n mediump mat4 cc_matProj;\n mediump mat4 cc_matProjInv;\n mediump mat4 cc_matViewProj;\n mediump mat4 cc_matViewProjInv;\n mediump vec4 cc_cameraPos;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", - "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform ARGS{\n float radius;\n float blur;\n vec2 center;\n float wh_ratio;\n};\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture(texture, v_uv0);\n o *= v_color;\n float circle = radius * radius;\n float rx = center.x * wh_ratio;\n float ry = center.y;\n float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry);\n o.a = smoothstep(circle, circle - blur, dis);\n gl_FragColor = o;\n}" + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform ARGS{\n float radius;\n float blur;\n vec2 center;\n float wh_ratio;\n};\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n o *= texture(texture, v_uv0);\n o *= v_color;\n float circle = radius * radius;\n float rx = center.x * wh_ratio;\n float ry = center.y;\n float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry);\n o.a = smoothstep(circle, circle - blur, dis) * o.a;\n gl_FragColor = o;\n}" } } ], diff --git a/assets/Scene/Home/Home.ts b/assets/Scene/Home/Home.ts index 7574f92..eee2bb8 100644 --- a/assets/Scene/Home/Home.ts +++ b/assets/Scene/Home/Home.ts @@ -19,7 +19,8 @@ enum sceneList { 'Screen_vibrating' = '震屏效果+动画恢复第一帧', 'Joystick' = '遥控杆', 'Filter' = '颜色滤镜', - 'Mosaic' = '马赛克/像素风(shader)' + 'Mosaic' = '马赛克/像素风(shader)', + 'Photo_gallery' = '渐变过渡的相册(shader)' } @ccclass diff --git a/assets/Scene/Photo_gallery.meta b/assets/Scene/Photo_gallery.meta new file mode 100644 index 0000000..94049ea --- /dev/null +++ b/assets/Scene/Photo_gallery.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "3f7ef956-c957-4e12-951a-97f6c5a11393", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Photo_gallery.fire b/assets/Scene/Photo_gallery/Photo_gallery.fire new file mode 100644 index 0000000..6762c72 --- /dev/null +++ b/assets/Scene/Photo_gallery/Photo_gallery.fire @@ -0,0 +1,1246 @@ +[ + { + "__type__": "cc.SceneAsset", + "_name": "", + "_objFlags": 0, + "_native": "", + "scene": { + "__id__": 1 + } + }, + { + "__type__": "cc.Scene", + "_objFlags": 0, + "_parent": null, + "_children": [ + { + "__id__": 2 + } + ], + "_active": true, + "_components": [], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_is3DNode": true, + "_groupIndex": 0, + "groupIndex": 0, + "autoReleaseAssets": false, + "_id": "96343569-0f12-4ed5-8ba0-596a8ffde78c" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 22 + } + ], + "_active": true, + "_components": [ + { + "__id__": 27 + }, + { + "__id__": 28 + }, + { + "__id__": 29 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 667, + 375, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "a5esZu+45LA5mBpvttspPD" + }, + { + "__type__": "cc.Node", + "_name": "Main Camera", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 4 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 443.4050067376326, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "box", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [ + { + "__id__": 6 + }, + { + "__id__": 9 + }, + { + "__id__": 12 + }, + { + "__id__": 15 + }, + { + "__id__": 18 + } + ], + "_active": true, + "_components": [ + { + "__id__": 21 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c6MaboL1FK0rotTAiySYrT" + }, + { + "__type__": "cc.Node", + "_name": "bg1", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 7 + }, + { + "__id__": 8 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "35vbTKwI1OV4yhA3ZSwRxY" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "c19dcfd2-1514-4816-ae60-a2bd155220d6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "d61bb924-4a50-4487-90ce-e35d82c2e7a9" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "f4IPUojFtNzaitsbexvwTQ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 6 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1024, + "_originalHeight": 445, + "_id": "76mcUypnFIGL0c6nle/uaq" + }, + { + "__type__": "cc.Node", + "_name": "bg2", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 10 + }, + { + "__id__": 11 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "afqCRbGyRDNKlbjxiNKPSL" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "c19dcfd2-1514-4816-ae60-a2bd155220d6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "897869c8-2252-4cdc-8590-a4cd75951029" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "cecD5FqQVC2Z6F++X3BLZD" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 9 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1335, + "_originalHeight": 864, + "_id": "cbTNcdNh5HI5yxjNhUkeu7" + }, + { + "__type__": "cc.Node", + "_name": "bg3", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 13 + }, + { + "__id__": 14 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e5Vg9QSfRC/rMltWRNZ36q" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "c19dcfd2-1514-4816-ae60-a2bd155220d6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1d7fee62-0711-4d91-97a8-e6126253d95e" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "178Ins+C9LbaLtrVgFaBlG" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 12 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 1024, + "_originalHeight": 445, + "_id": "d8vRlA1WJDKbK1i1EgP0C/" + }, + { + "__type__": "cc.Node", + "_name": "bg4", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 16 + }, + { + "__id__": 17 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "16HM9YratO+5uIobg32XLs" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "c19dcfd2-1514-4816-ae60-a2bd155220d6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "a4b26052-bda2-4bec-ba05-adf268ff62f3" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "deCOyC7QlDR5a1690NBfo3" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 15 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 800, + "_originalHeight": 445, + "_id": "6bbOkh+xlBLYYf2lqHSkZX" + }, + { + "__type__": "cc.Node", + "_name": "bg5", + "_objFlags": 0, + "_parent": { + "__id__": 5 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 19 + }, + { + "__id__": 20 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e3pgf2pLlFXY2ARmQvGD2y" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "c19dcfd2-1514-4816-ae60-a2bd155220d6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "18a56f47-1625-4ab1-a7e9-5754637c0d57" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "d93g0hcJRDiqvBnHgfNUyh" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 18 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 800, + "_originalHeight": 445, + "_id": "a5n45B8XlCcqOkv8iCGjco" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "3bduIPPqRFK7f1/OLWIhlT" + }, + { + "__type__": "cc.Node", + "_name": "next", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 23 + }, + { + "__id__": 24 + }, + { + "__id__": 25 + } + ], + "_prefab": null, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 124, + "height": 48 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 466, + -219.5, + 0, + 0, + 0, + 0, + 1, + 1.5, + 1.5, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "c45smWnSFDCb0GYKZ16ynt" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "1969f470-bc7b-4feb-9dbe-2aee4f26556a" + }, + "_type": 0, + "_sizeMode": 1, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "94xCWP3mhOq5Nr15ONNZwg" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 36, + "_left": 0, + "_right": 108, + "_top": 0, + "_bottom": 119.5, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "10PLXBbudNo5LSdN4xcngo" + }, + { + "__type__": "cc.Button", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 22 + }, + "_enabled": true, + "_normalMaterial": { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + }, + "_grayMaterial": null, + "duration": 0.1, + "zoomScale": 1.1, + "clickEvents": [ + { + "__id__": 26 + } + ], + "_N$interactable": true, + "_N$enableAutoGrayEffect": false, + "_N$transition": 3, + "transition": 3, + "_N$normalColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "pressedColor": { + "__type__": "cc.Color", + "r": 211, + "g": 211, + "b": 211, + "a": 255 + }, + "_N$hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "hoverColor": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_N$disabledColor": { + "__type__": "cc.Color", + "r": 124, + "g": 124, + "b": 124, + "a": 255 + }, + "_N$normalSprite": null, + "_N$pressedSprite": null, + "pressedSprite": null, + "_N$hoverSprite": null, + "hoverSprite": null, + "_N$disabledSprite": null, + "_N$target": null, + "_id": "33PKqfn41NM5FIFxoZ15fh" + }, + { + "__type__": "cc.ClickEvent", + "target": { + "__id__": 2 + }, + "component": "", + "_componentId": "26442Io+xpOVYLjZDK0EwlV", + "handler": "bgTramsform", + "customEventData": "" + }, + { + "__type__": "cc.Canvas", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "_designResolution": { + "__type__": "cc.Size", + "width": 1334, + "height": 750 + }, + "_fitWidth": false, + "_fitHeight": true, + "_id": "59Cd0ovbdF4byw5sbjJDx7" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "alignMode": 1, + "_target": null, + "_alignFlags": 45, + "_left": 0, + "_right": 0, + "_top": 0, + "_bottom": 0, + "_verticalCenter": 0, + "_horizontalCenter": 0, + "_isAbsLeft": true, + "_isAbsRight": true, + "_isAbsTop": true, + "_isAbsBottom": true, + "_isAbsHorizontalCenter": true, + "_isAbsVerticalCenter": true, + "_originalWidth": 0, + "_originalHeight": 0, + "_id": "29zXboiXFBKoIV4PQ2liTe" + }, + { + "__type__": "26442Io+xpOVYLjZDK0EwlV", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "switchNodeList": [ + { + "__id__": 18 + }, + { + "__id__": 15 + }, + { + "__id__": 12 + }, + { + "__id__": 9 + }, + { + "__id__": 6 + } + ], + "_id": "0eJgPQwH5EX6o0SwonR2iE" + } +] \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Photo_gallery.fire.meta b/assets/Scene/Photo_gallery/Photo_gallery.fire.meta new file mode 100644 index 0000000..e8c45fd --- /dev/null +++ b/assets/Scene/Photo_gallery/Photo_gallery.fire.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.2.6", + "uuid": "96343569-0f12-4ed5-8ba0-596a8ffde78c", + "asyncLoadAssets": false, + "autoReleaseAssets": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Photo_gallery.ts b/assets/Scene/Photo_gallery/Photo_gallery.ts new file mode 100644 index 0000000..f51a553 --- /dev/null +++ b/assets/Scene/Photo_gallery/Photo_gallery.ts @@ -0,0 +1,42 @@ +const { ccclass, property } = cc._decorator; + +@ccclass +export default class Scene_transition extends cc.Component { + @property([cc.Node]) + switchNodeList: cc.Node[] = []; + fadeRadius: number = 0.1; + + onLoad() { + this.switchNodeList.forEach((node, idx) => { + node.zIndex = this.switchNodeList.length - idx; + }) + } + + isTransforming: boolean = false; + bgTramsform() { + if (this.isTransforming) return; + this.isTransforming = true; + + let time = 0.0; + let node = this.switchNodeList[0]; + let material = node.getComponent(cc.Sprite).getMaterial(0); + material.setProperty('u_fade_radius', this.fadeRadius); + material.setProperty('u_time', time); + material.define('USE_TRAMSFORM', true, 0, true); + + let timer = setInterval(() => { + time += 0.03; + material.setProperty('u_time', time); + if (time > 1.0 + this.fadeRadius) { + this.switchNodeList.shift(); + this.switchNodeList.push(node); + this.switchNodeList.forEach((node, idx) => { + node.zIndex = this.switchNodeList.length - idx; + }) + material.define('USE_TRAMSFORM', false, 0, true); + this.isTransforming = false; + timer && clearInterval(timer); + } + }, 30); + } +} diff --git a/assets/Scene/Photo_gallery/Photo_gallery.ts.meta b/assets/Scene/Photo_gallery/Photo_gallery.ts.meta new file mode 100644 index 0000000..6a68a34 --- /dev/null +++ b/assets/Scene/Photo_gallery/Photo_gallery.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "26442228-fb1a-4e55-82e3-6432b4130955", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture.meta b/assets/Scene/Photo_gallery/Texture.meta new file mode 100644 index 0000000..da983fe --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "e8ed3b15-d6c2-4c35-be4f-6495c46dbe42", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/bg1.jpg b/assets/Scene/Photo_gallery/Texture/bg1.jpg new file mode 100755 index 0000000..52b0c48 Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/bg1.jpg differ diff --git a/assets/Scene/Photo_gallery/Texture/bg1.jpg.meta b/assets/Scene/Photo_gallery/Texture/bg1.jpg.meta new file mode 100644 index 0000000..e18f76f --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/bg1.jpg.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "ee9b221f-8ed3-4418-8cbf-b987bbb772ca", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": false, + "width": 1024, + "height": 445, + "platformSettings": {}, + "subMetas": { + "bg1": { + "ver": "1.0.4", + "uuid": "d61bb924-4a50-4487-90ce-e35d82c2e7a9", + "rawTextureUuid": "ee9b221f-8ed3-4418-8cbf-b987bbb772ca", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 1024, + "height": 445, + "rawWidth": 1024, + "rawHeight": 445, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/bg2.jpg b/assets/Scene/Photo_gallery/Texture/bg2.jpg new file mode 100755 index 0000000..5e3c892 Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/bg2.jpg differ diff --git a/assets/Scene/Photo_gallery/Texture/bg2.jpg.meta b/assets/Scene/Photo_gallery/Texture/bg2.jpg.meta new file mode 100644 index 0000000..95cc66c --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/bg2.jpg.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "19c794aa-df1e-41ca-95f1-6cb3e1697ae4", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": false, + "width": 1335, + "height": 864, + "platformSettings": {}, + "subMetas": { + "bg2": { + "ver": "1.0.4", + "uuid": "897869c8-2252-4cdc-8590-a4cd75951029", + "rawTextureUuid": "19c794aa-df1e-41ca-95f1-6cb3e1697ae4", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 1335, + "height": 864, + "rawWidth": 1335, + "rawHeight": 864, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/bg3.jpg b/assets/Scene/Photo_gallery/Texture/bg3.jpg new file mode 100755 index 0000000..52b0c48 Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/bg3.jpg differ diff --git a/assets/Scene/Photo_gallery/Texture/bg3.jpg.meta b/assets/Scene/Photo_gallery/Texture/bg3.jpg.meta new file mode 100644 index 0000000..2a48898 --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/bg3.jpg.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "574b895a-3021-49b2-8e07-0c6f94fa77a1", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 1024, + "height": 445, + "platformSettings": {}, + "subMetas": { + "bg3": { + "ver": "1.0.4", + "uuid": "1d7fee62-0711-4d91-97a8-e6126253d95e", + "rawTextureUuid": "574b895a-3021-49b2-8e07-0c6f94fa77a1", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 1024, + "height": 445, + "rawWidth": 1024, + "rawHeight": 445, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/bg4.jpg b/assets/Scene/Photo_gallery/Texture/bg4.jpg new file mode 100755 index 0000000..a177af1 Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/bg4.jpg differ diff --git a/assets/Scene/Photo_gallery/Texture/bg4.jpg.meta b/assets/Scene/Photo_gallery/Texture/bg4.jpg.meta new file mode 100644 index 0000000..052c975 --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/bg4.jpg.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "2737adaa-2eba-48cf-ab02-0ebdbac933d6", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 800, + "height": 445, + "platformSettings": {}, + "subMetas": { + "bg4": { + "ver": "1.0.4", + "uuid": "a4b26052-bda2-4bec-ba05-adf268ff62f3", + "rawTextureUuid": "2737adaa-2eba-48cf-ab02-0ebdbac933d6", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 800, + "height": 445, + "rawWidth": 800, + "rawHeight": 445, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/bg5.jpg b/assets/Scene/Photo_gallery/Texture/bg5.jpg new file mode 100755 index 0000000..a2180cc Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/bg5.jpg differ diff --git a/assets/Scene/Photo_gallery/Texture/bg5.jpg.meta b/assets/Scene/Photo_gallery/Texture/bg5.jpg.meta new file mode 100644 index 0000000..9321f96 --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/bg5.jpg.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "a7d2fa64-184c-4a57-b5f7-0bc703fcb9b8", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 800, + "height": 445, + "platformSettings": {}, + "subMetas": { + "bg5": { + "ver": "1.0.4", + "uuid": "18a56f47-1625-4ab1-a7e9-5754637c0d57", + "rawTextureUuid": "a7d2fa64-184c-4a57-b5f7-0bc703fcb9b8", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 800, + "height": 445, + "rawWidth": 800, + "rawHeight": 445, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/Texture/next.png b/assets/Scene/Photo_gallery/Texture/next.png new file mode 100644 index 0000000..adde68b Binary files /dev/null and b/assets/Scene/Photo_gallery/Texture/next.png differ diff --git a/assets/Scene/Photo_gallery/Texture/next.png.meta b/assets/Scene/Photo_gallery/Texture/next.png.meta new file mode 100644 index 0000000..cc072f4 --- /dev/null +++ b/assets/Scene/Photo_gallery/Texture/next.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "ef40a864-df76-464a-9525-358aab5d4919", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 124, + "height": 48, + "platformSettings": {}, + "subMetas": { + "next": { + "ver": "1.0.4", + "uuid": "1969f470-bc7b-4feb-9dbe-2aee4f26556a", + "rawTextureUuid": "ef40a864-df76-464a-9525-358aab5d4919", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 124, + "height": 48, + "rawWidth": 124, + "rawHeight": 48, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/pic_transform.effect b/assets/Scene/Photo_gallery/pic_transform.effect new file mode 100644 index 0000000..b5713fa --- /dev/null +++ b/assets/Scene/Photo_gallery/pic_transform.effect @@ -0,0 +1,80 @@ +// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +CCEffect %{ + techniques: + - passes: + - vert: vs + frag: fs + blendState: + targets: + - blend: true + rasterizerState: + cullMode: none + properties: + texture: { value: white } + u_time: { value: 1.0 } + u_fade_radius: { value: 0.2 } +}% + + +CCProgram vs %{ + precision highp float; + + #include + #include + + in vec3 a_position; + in vec4 a_color; + out vec4 v_color; + + #if USE_TEXTURE + in vec2 a_uv0; + out vec2 v_uv0; + #endif + + void main () { + vec4 pos = vec4(a_position, 1); + + #if CC_USE_MODEL + pos = cc_matViewProj * cc_matWorld * pos; + #else + pos = cc_matViewProj * pos; + #endif + + #if USE_TEXTURE + v_uv0 = a_uv0; + #endif + + v_color = a_color; + + gl_Position = pos; + } +}% + + +CCProgram fs %{ + precision highp float; + in vec4 v_color; + + #if USE_TEXTURE + in vec2 v_uv0; + uniform sampler2D texture; + #endif + + uniform ARGS { + float u_time; + float u_fade_radius; + }; + + void main () { + vec4 color = vec4(1, 1, 1, 1); + color *= texture(texture, v_uv0); + color *= v_color; + + #if USE_TRAMSFORM + color.a = smoothstep(0.0, u_fade_radius, u_fade_radius + v_uv0.x - u_time); + #endif + + gl_FragColor = color; + } +}% diff --git a/assets/Scene/Photo_gallery/pic_transform.effect.meta b/assets/Scene/Photo_gallery/pic_transform.effect.meta new file mode 100644 index 0000000..ee813aa --- /dev/null +++ b/assets/Scene/Photo_gallery/pic_transform.effect.meta @@ -0,0 +1,17 @@ +{ + "ver": "1.0.25", + "uuid": "51844cdd-b9a2-48ae-866a-e162d76c202c", + "compiledShaders": [ + { + "glsl1": { + "vert": "\nprecision highp float;\nuniform mediump mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform float u_time;\nuniform float u_fade_radius;\nvoid main () {\n vec4 color = vec4(1, 1, 1, 1);\n color *= texture2D(texture, v_uv0);\n color *= v_color;\n #if USE_TRAMSFORM\n color.a = smoothstep(0.0, u_fade_radius, u_fade_radius + v_uv0.x - u_time);\n #endif\n gl_FragColor = color;\n}" + }, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n highp vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n mediump vec4 cc_nativeSize;\n highp mat4 cc_matView;\n mediump mat4 cc_matViewInv;\n mediump mat4 cc_matProj;\n mediump mat4 cc_matProjInv;\n mediump mat4 cc_matViewProj;\n mediump mat4 cc_matViewProjInv;\n mediump vec4 cc_cameraPos;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform ARGS {\n float u_time;\n float u_fade_radius;\n};\nvoid main () {\n vec4 color = vec4(1, 1, 1, 1);\n color *= texture(texture, v_uv0);\n color *= v_color;\n #if USE_TRAMSFORM\n color.a = smoothstep(0.0, u_fade_radius, u_fade_radius + v_uv0.x - u_time);\n #endif\n gl_FragColor = color;\n}" + } + } + ], + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/pic_transform.mtl b/assets/Scene/Photo_gallery/pic_transform.mtl new file mode 100644 index 0000000..cbd1f77 --- /dev/null +++ b/assets/Scene/Photo_gallery/pic_transform.mtl @@ -0,0 +1,18 @@ +{ + "__type__": "cc.Material", + "_name": "Scene_transition", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "51844cdd-b9a2-48ae-866a-e162d76c202c" + }, + "_techniqueIndex": 0, + "_techniqueData": { + "0": { + "defines": { + "USE_TEXTURE": true, + "USE_TRAMSFORM": false + } + } + } +} \ No newline at end of file diff --git a/assets/Scene/Photo_gallery/pic_transform.mtl.meta b/assets/Scene/Photo_gallery/pic_transform.mtl.meta new file mode 100644 index 0000000..54210ef --- /dev/null +++ b/assets/Scene/Photo_gallery/pic_transform.mtl.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.3", + "uuid": "c19dcfd2-1514-4816-ae60-a2bd155220d6", + "dataAsSubAsset": null, + "subMetas": {} +} \ No newline at end of file