How to achieve the effect of disappearing grid

I want to achieve the following effect:
effect

I initially implemented it in GridHelper, but it didn"t work.
later I used the following code:

var materialcolor1 = new THREE.MeshBasicMaterial ({color: color1,vertexColors: THREE.VertexColors, linewidth: 30, linecap: "round", linejoin:" round", transparent: true, opacity: 0.5, blending: THREE.MultiplyBlending}); var depthMaterial = new THREE.MeshDepthMaterial (); var geometry=new THREE.Geometry (); geometry.vertices.push (new THREE.Vector3 (- halfSize, 0, k)); geometry.vertices.push (new THREE.Vector3 (halfSize, 0, k));)) Var line = new THREE.SceneUtils.createMultiMaterialObject (geometry, [material, depthMaterial]);

but I can"t see the gridlines in the scene. What"s wrong with my code? Or is there another good way to achieve this effect?
Thank you.

Nov.14,2021

the problem has been resolved, using ShaderMaterial. See https://stackoverflow.com/que.

Menu