diff --git a/assets/Scene/Metaball.meta b/assets/Scene/Metaball.meta new file mode 100644 index 0000000..ce33dca --- /dev/null +++ b/assets/Scene/Metaball.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "e7d3241c-f464-4004-abf2-272c0f48f77d", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.effect b/assets/Scene/Metaball/Metaball.effect new file mode 100644 index 0000000..e19a5b4 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.effect @@ -0,0 +1,85 @@ +// 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_point: { value: [ 0.5, 0.5 ] } + u_radius: { value: 0.1 } + +}% + + +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; + + #include + #include + + in vec4 v_color; + + #if USE_TEXTURE + in vec2 v_uv0; + uniform sampler2D texture; + #endif + + uniform ARGS { + vec2 u_point; + float u_radius; + }; + + float energy(float r, vec2 point1, vec2 point2) { + return (r * r) / ((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y)); + } + + void main(){ + vec4 color = texture(texture, v_uv0); + + float fragEnergy = energy(u_radius + 0.1, v_uv0.xy, vec2(0.5)) + energy(u_radius, v_uv0.xy, u_point); + color.a = smoothstep(0.95, 1.0, fragEnergy); + gl_FragColor = color; + } +}% diff --git a/assets/Scene/Metaball/Metaball.effect.meta b/assets/Scene/Metaball/Metaball.effect.meta new file mode 100644 index 0000000..999b7c5 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.effect.meta @@ -0,0 +1,17 @@ +{ + "ver": "1.0.25", + "uuid": "9334fb7c-0605-4285-8664-be8c2f8cc5b6", + "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;\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 vec2 u_point;\nuniform float u_radius;\nfloat energy(float r, vec2 point1, vec2 point2) {\n return (r * r) / ((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y));\n}\nvoid main(){\n vec4 color = texture2D(texture, v_uv0);\n float fragEnergy = energy(u_radius + 0.1, v_uv0.xy, vec2(0.5)) + energy(u_radius, v_uv0.xy, u_point);\n color.a = smoothstep(0.95, 1.0, fragEnergy);\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;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\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};\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nuniform sampler2D texture;\n#endif\nuniform ARGS {\n vec2 u_point;\n float u_radius;\n};\nfloat energy(float r, vec2 point1, vec2 point2) {\n return (r * r) / ((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y));\n}\nvoid main(){\n vec4 color = texture(texture, v_uv0);\n float fragEnergy = energy(u_radius + 0.1, v_uv0.xy, vec2(0.5)) + energy(u_radius, v_uv0.xy, u_point);\n color.a = smoothstep(0.95, 1.0, fragEnergy);\n gl_FragColor = color;\n}" + } + } + ], + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.fire b/assets/Scene/Metaball/Metaball.fire new file mode 100644 index 0000000..64e15fa --- /dev/null +++ b/assets/Scene/Metaball/Metaball.fire @@ -0,0 +1,544 @@ +[ + { + "__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": "d03579ca-145f-469b-a01a-7e7db045d3db" + }, + { + "__type__": "cc.Node", + "_name": "Canvas", + "_objFlags": 0, + "_parent": { + "__id__": 1 + }, + "_children": [ + { + "__id__": 3 + }, + { + "__id__": 5 + }, + { + "__id__": 8 + } + ], + "_active": true, + "_components": [ + { + "__id__": 11 + }, + { + "__id__": 12 + }, + { + "__id__": 13 + } + ], + "_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": 960, + "height": 640 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + 0, + 0, + 452.93128617926146, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "e1WoFrQ79G7r4ZuQE3HlNb" + }, + { + "__type__": "cc.Camera", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 3 + }, + "_enabled": true, + "_cullingMask": 4294967295, + "_clearFlags": 7, + "_backgroundColor": { + "__type__": "cc.Color", + "r": 0, + "g": 0, + "b": 0, + "a": 255 + }, + "_depth": -1, + "_zoomRatio": 1, + "_targetTexture": null, + "_fov": 60, + "_orthoSize": 10, + "_nearClip": 1, + "_farClip": 4096, + "_ortho": true, + "_rect": { + "__type__": "cc.Rect", + "x": 0, + "y": 0, + "width": 1, + "height": 1 + }, + "_renderStages": 1, + "_alignWithScreen": true, + "_id": "81GN3uXINKVLeW4+iKSlim" + }, + { + "__type__": "cc.Node", + "_name": "bg", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 6 + }, + { + "__id__": 7 + } + ], + "_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": "5dU1UpV5pIEZyPZ4BJ1pSZ" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 5 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "03c5510e-17d5-4aa8-b3f6-96411b956194" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "faI0AWR1NPp4/ve/+saf/x" + }, + { + "__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": 2, + "_originalHeight": 2, + "_id": "7bTq34ATZLfKaweAlAKq6o" + }, + { + "__type__": "cc.Node", + "_name": "ball", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_children": [], + "_active": true, + "_components": [ + { + "__id__": 9 + }, + { + "__id__": 10 + } + ], + "_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": "8e1fjk0w9MFY3lCPMSvio8" + }, + { + "__type__": "cc.Sprite", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_enabled": true, + "_materials": [ + { + "__uuid__": "b92f1409-b338-47b1-91e1-a654d4378ee6" + } + ], + "_srcBlendFactor": 770, + "_dstBlendFactor": 771, + "_spriteFrame": { + "__uuid__": "9eb445d1-c290-42c0-932b-20c92553a9e4" + }, + "_type": 0, + "_sizeMode": 0, + "_fillType": 0, + "_fillCenter": { + "__type__": "cc.Vec2", + "x": 0, + "y": 0 + }, + "_fillStart": 0, + "_fillRange": 0, + "_isTrimmedMode": true, + "_atlas": null, + "_id": "bdAIVVu6lKX5+y5XvSGNdJ" + }, + { + "__type__": "cc.Widget", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 8 + }, + "_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": 2, + "_originalHeight": 2, + "_id": "4bMn0NHsdK9riV53ES7Iqk" + }, + { + "__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__": "7d68bZisFBP06BUmEtWSaVY", + "_name": "", + "_objFlags": 0, + "node": { + "__id__": 2 + }, + "_enabled": true, + "ball": { + "__id__": 8 + }, + "_id": "7bE+l2HL1La7EG3vOwL9Tq" + } +] \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.fire.meta b/assets/Scene/Metaball/Metaball.fire.meta new file mode 100644 index 0000000..e3463e9 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.fire.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.2.6", + "uuid": "d03579ca-145f-469b-a01a-7e7db045d3db", + "asyncLoadAssets": false, + "autoReleaseAssets": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.mtl b/assets/Scene/Metaball/Metaball.mtl new file mode 100644 index 0000000..38eb395 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.mtl @@ -0,0 +1,20 @@ +{ + "__type__": "cc.Material", + "_name": "Metaball", + "_objFlags": 0, + "_native": "", + "_effectAsset": { + "__uuid__": "9334fb7c-0605-4285-8664-be8c2f8cc5b6" + }, + "_techniqueIndex": 0, + "_techniqueData": { + "0": { + "defines": { + "USE_TEXTURE": true + }, + "props": { + "u_radius": 0.05 + } + } + } +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.mtl.meta b/assets/Scene/Metaball/Metaball.mtl.meta new file mode 100644 index 0000000..ddd5d29 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.mtl.meta @@ -0,0 +1,6 @@ +{ + "ver": "1.0.3", + "uuid": "b92f1409-b338-47b1-91e1-a654d4378ee6", + "dataAsSubAsset": null, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Metaball.ts b/assets/Scene/Metaball/Metaball.ts new file mode 100644 index 0000000..0453cf3 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.ts @@ -0,0 +1,22 @@ +const { ccclass, property } = cc._decorator; + +@ccclass +export default class Metaball extends cc.Component { + @property(cc.Node) + ball: cc.Node = null; + material: cc.Material = null; + + onLoad() { + this.material = this.ball.getComponent(cc.Sprite).getMaterial(0); + this.touchStartPoint = cc.v2(this.ball.width / 2,this.ball.height/2); + this.ball.on(cc.Node.EventType.TOUCH_MOVE, this.touchMoveEvent, this); + } + + touchStartPoint: cc.Vec2= null; + touchMoveEvent(evt: cc.Event.EventTouch) { + this.touchStartPoint = this.touchStartPoint.add(evt.getDelta()); + const x = this.touchStartPoint.x; + const y = this.ball.height - this.touchStartPoint.y; + this.material.setProperty('u_point', [ x / this.ball.width, y / this.ball.height]); + } +} diff --git a/assets/Scene/Metaball/Metaball.ts.meta b/assets/Scene/Metaball/Metaball.ts.meta new file mode 100644 index 0000000..cf753e0 --- /dev/null +++ b/assets/Scene/Metaball/Metaball.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "7d68b662-b050-4fd3-a054-984b5649a558", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Texture.meta b/assets/Scene/Metaball/Texture.meta new file mode 100644 index 0000000..88e6776 --- /dev/null +++ b/assets/Scene/Metaball/Texture.meta @@ -0,0 +1,7 @@ +{ + "ver": "1.0.1", + "uuid": "c0e134a1-8814-4ac7-bfab-94b5cbe24c1a", + "isSubpackage": false, + "subpackageName": "", + "subMetas": {} +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Texture/bg.png b/assets/Scene/Metaball/Texture/bg.png new file mode 100644 index 0000000..e624a70 Binary files /dev/null and b/assets/Scene/Metaball/Texture/bg.png differ diff --git a/assets/Scene/Metaball/Texture/bg.png.meta b/assets/Scene/Metaball/Texture/bg.png.meta new file mode 100644 index 0000000..0dd70d5 --- /dev/null +++ b/assets/Scene/Metaball/Texture/bg.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "1315a9cb-6a9f-4342-b379-c115d4a5846e", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": true, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "bg": { + "ver": "1.0.4", + "uuid": "03c5510e-17d5-4aa8-b3f6-96411b956194", + "rawTextureUuid": "1315a9cb-6a9f-4342-b379-c115d4a5846e", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 2, + "height": 2, + "rawWidth": 2, + "rawHeight": 2, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Texture/single_color.png b/assets/Scene/Metaball/Texture/single_color.png new file mode 100644 index 0000000..fa6376e Binary files /dev/null and b/assets/Scene/Metaball/Texture/single_color.png differ diff --git a/assets/Scene/Metaball/Texture/single_color.png.meta b/assets/Scene/Metaball/Texture/single_color.png.meta new file mode 100644 index 0000000..56c6049 --- /dev/null +++ b/assets/Scene/Metaball/Texture/single_color.png.meta @@ -0,0 +1,36 @@ +{ + "ver": "2.3.4", + "uuid": "ed0d18f2-7ff7-44ea-a665-c68b10e286ee", + "type": "sprite", + "wrapMode": "clamp", + "filterMode": "bilinear", + "premultiplyAlpha": false, + "genMipmaps": false, + "packable": false, + "width": 2, + "height": 2, + "platformSettings": {}, + "subMetas": { + "single_color": { + "ver": "1.0.4", + "uuid": "9eb445d1-c290-42c0-932b-20c92553a9e4", + "rawTextureUuid": "ed0d18f2-7ff7-44ea-a665-c68b10e286ee", + "trimType": "auto", + "trimThreshold": 1, + "rotated": false, + "offsetX": 0, + "offsetY": 0, + "trimX": 0, + "trimY": 0, + "width": 2, + "height": 2, + "rawWidth": 2, + "rawHeight": 2, + "borderTop": 0, + "borderBottom": 0, + "borderLeft": 0, + "borderRight": 0, + "subMetas": {} + } + } +} \ No newline at end of file diff --git a/assets/Scene/Metaball/Untitled-1.js b/assets/Scene/Metaball/Untitled-1.js new file mode 100644 index 0000000..d0d0e6a --- /dev/null +++ b/assets/Scene/Metaball/Untitled-1.js @@ -0,0 +1,11 @@ +//原始=>响应式 +let toProxy = new WeakMap(); + +//响应式=》原始 +let toRaw = new WeakMap(); + +//响应式 + +function reactive() {} + +function computed() {} diff --git a/assets/Scene/Metaball/Untitled-1.js.meta b/assets/Scene/Metaball/Untitled-1.js.meta new file mode 100644 index 0000000..bbcfb2f --- /dev/null +++ b/assets/Scene/Metaball/Untitled-1.js.meta @@ -0,0 +1,9 @@ +{ + "ver": "1.0.5", + "uuid": "01fae144-cddd-4304-bbae-d21f44193eed", + "isPlugin": false, + "loadPluginInWeb": true, + "loadPluginInNative": true, + "loadPluginInEditor": false, + "subMetas": {} +} \ No newline at end of file