Name
*
Code
{"properties":{"frame":26425,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera1","versions":{"polygonjs":"1.1.264"}},"root":{"type":"root","nodes":{"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls"}}},"postProcessNetwork1":{"type":"postProcessNetwork","nodes":{"antialiasing1":{"type":"antialiasing"},"OUT":{"type":"null","inputs":["antialiasing1"],"flags":{"display":true}}},"params":{"sampling":4},"selection":["antialiasing1"]},"renderersNetwork1":{"type":"renderersNetwork","nodes":{"WebGLRenderer1":{"type":"WebGLRenderer","params":{"alpha":0,"premultipliedAlpha":0,"antialias":0,"stencil":0,"depth":0,"toneMapping":0,"outputEncoding":3000,"physicallyCorrectLights":0,"sortObjects":0,"tshadowMap":0}}}}},"params":{"t":[-5.3,2.4,0],"controls":"./events1/cameraOrbitControls1","setRenderer":1,"renderer":"renderersNetwork1/WebGLRenderer1","doPostProcess":1,"postProcessNode":"postProcessNetwork1"},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"imageEnv":{"type":"imageEXR","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/piz_compressed.exr"}},"imageUv":{"type":"image","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/uv.jpg","tflipY":true}},"envMap":{"type":"envMap","inputs":["imageEnv"]}}},"lines":{"type":"geo","nodes":{"line1":{"type":"line","params":{"length":50,"pointsCount":500,"origin":[0,0,"-0.5*ch(\"length\")"],"direction":[0,0,1]}},"copy1":{"type":"copy","params":{"count":20,"t":[1,0,0]},"inputs":["line1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasicBuilder1"},"inputs":["transform1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasicBuilder1":{"type":"lineBasicBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[{"index":0,"node":"add1","output":"sum"},{"index":1,"node":"mix1","output":"mix"}]},"noise1":{"type":"noise","params":{"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false}},"position":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"freq":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false}},"offset":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"maxInputsCount":4,"inputs":[{"index":0,"node":"floatToVec3_2","output":"vec3"},{"index":1,"node":"globals1","output":"position"},{"index":2,"node":"floatToVec3_1","output":"vec3"},{"index":3,"node":"floatToVec3_3","output":"vec3"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec3"},{"name":"freq","type":"vec3"},{"name":"offset","type":"vec3"}],"out":[{"name":"noise","type":"vec3"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"globals1","output":"position"},{"index":1,"node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"constant1":{"type":"constant","params":{"float":0.06},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"},{"index":1,"node":"constant1","output":"val"},{"index":2,"node":"constant1","output":"val"}]},"constant2":{"type":"constant","params":{"float":1.6},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant2","output":"val"},{"index":1,"node":"constant2","output":"val"},{"index":2,"node":"constant2","output":"val"}]},"globals2":{"type":"globals"},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":0.11},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"globals2","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"floatToVec3_3":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[null,{"index":1,"node":"multAdd1","output":"val"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"add1","output":"sum"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true},"raw_input":1.5},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":7.5},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[null,null,{"index":2,"node":"vec3ToFloat1","output":"x"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"param1":{"type":"param","params":{"name":"baseColor","type":4,"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param2":{"type":"param","params":{"name":"bgColor","type":4,"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"param1","output":"val"},{"index":1,"node":"param2","output":"val"},{"index":2,"node":"smoothstep1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}}},"params":{"linewidth":3.5,"baseColor":{"type":"color","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":[0.8313725490196079,0.7294117647058823,0.7294117647058823],"overriden_options":{"callback":"{}"}},"bgColor":{"type":"color","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["ch(\"/bgColorr\")","ch(\"/bgColorg\")","ch(\"/bgColorb\")"],"overriden_options":{"callback":"{}"}}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-main","type":"LineBasicMaterial","name":"/lines/MAT/lineBasicBuilder1","color":16777215,"depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"linewidth":3.5},"onBeforeCompileDataJSON":{"vertexShader":"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\t#include <morphcolor_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}","fragmentShader":"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]},"customMaterials":{"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDistanceMaterial","type":"ShaderMaterial","name":"customDistanceMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0},"referencePosition":{"type":"v3","value":[0,0,0]},"nearDistance":{"value":1},"farDistance":{"value":1000}},"defines":{"USE_SIZEATTENUATION":1,"DEPTH_PACKING":3201},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}},"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDepthMaterial","type":"ShaderMaterial","name":"customDepthMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0}},"defines":{"DEPTH_PACKING":3201},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDepthDOFMaterial","type":"ShaderMaterial","name":"customDepthDOFMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0}},"defines":{"DEPTH_PACKING":3200},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}}}}}}},"merge1":{"type":"merge","params":{"compact":1},"inputs":["copy1"]},"transform1":{"type":"transform","params":{"t":["-$CEX","-$CEY","-$CEZ"]},"inputs":["merge1"]}},"flags":{"display":true}}},"params":{"bgColor":{"raw_input":[0.10588235294117647,0.11372549019607843,0.11372549019607843],"overriden_options":{"conversion":"no conversion"}},"mainCameraPath":"/perspectiveCamera1"}},"ui":{"nodes":{"perspectiveCamera1":{"pos":[-200,100],"nodes":{"events1":{"pos":[-200,-50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}},"postProcessNetwork1":{"pos":[-200,150],"nodes":{"antialiasing1":{"pos":[0,100]},"OUT":{"pos":[0,200]}}},"renderersNetwork1":{"pos":[-200,50],"nodes":{"WebGLRenderer1":{"pos":[-100,50]}}}}},"COP":{"pos":[-200,200],"nodes":{"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]},"envMap":{"pos":[50,200]}}},"lines":{"pos":[-50,-150],"nodes":{"line1":{"pos":[0,-400]},"copy1":{"pos":[0,-300]},"material1":{"pos":[0,50]},"MAT":{"pos":[-200,50],"nodes":{"lineBasicBuilder1":{"pos":[0,-100],"nodes":{"globals1":{"pos":[-700,-100]},"output1":{"pos":[1000,-100]},"noise1":{"pos":[-200,0]},"add1":{"pos":[0,-100]},"constant1":{"pos":[-550,200]},"floatToVec3_1":{"pos":[-450,200]},"constant2":{"pos":[-600,100]},"floatToVec3_2":{"pos":[-500,100]},"globals2":{"pos":[-550,400]},"multAdd1":{"pos":[-400,400]},"floatToVec3_3":{"pos":[-300,400]},"vec3ToFloat1":{"pos":[150,-350]},"smoothstep1":{"pos":[350,-300]},"param1":{"pos":[500,100]},"param2":{"pos":[500,250]},"mix1":{"pos":[700,0]}}}}},"merge1":{"pos":[0,-200]},"transform1":{"pos":[0,-50]}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera1","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":null,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-244.53424778370766,"y":50.72686512248811},"zoom":0.4740000000000001},"history":{"2":{"position":{"x":-98.5226480836237,"y":9.3588850174216},"zoom":0.5740000000000001},"3":{"position":{"x":-48,"y":-22},"zoom":0.5},"6":{"position":{"x":11.339999999999996,"y":-96.49999999999999},"zoom":0.6172839506172841},"9":{"position":{"x":-32,"y":-88},"zoom":0.5},"33":{"position":{"x":-35.27874564459929,"y":170.03484320557487},"zoom":0.5740000000000001},"34":{"position":{"x":-1.7770597738287393,"y":150.76736672051697},"zoom":0.6190000000000001},"60":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"76":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"77":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"161":{"position":{"x":-299.65156794425087,"y":113.93728222996515},"zoom":0.5740000000000001},"203":{"position":{"x":-244.53424778370766,"y":50.72686512248811},"zoom":0.4740000000000001},"236":{"position":{"x":-150,"y":-50},"zoom":0.5740000000000001},"451":{"position":{"x":-69.68641114982577,"y":27.874564459930312},"zoom":0.5740000000000001},"456":{"position":{"x":0,"y":-150},"zoom":0.5740000000000001},"468":{"position":{"x":0,"y":0},"zoom":0.5740000000000001},"529":{"position":{"x":-490.581714376675,"y":166.08136672838205},"zoom":1.0660000000000003},"836":{"position":{"x":0,"y":0},"zoom":0.5740000000000001},"865":{"position":{"x":0,"y":0},"zoom":0.5740000000000001}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/lines/MAT/lineBasicBuilder1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/lines","/lines/MAT","/lines","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/","/perspectiveCamera1/events1","/perspectiveCamera1","/","/lines","/","/lines","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/lines","/","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/","/lines","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/lines","/","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":84,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"createExport":true,"compressJs":true,"createZip":false,"publishToIntegrations":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;mat/lineBasicBuilder;obj/copNetwork;obj/geo;obj/perspectiveCamera;post/antialiasing;post/null;rop/WebGLRenderer;sop/copy;sop/eventsNetwork;sop/line;sop/material;sop/materialsNetwork;sop/merge;sop/postProcessNetwork;sop/renderersNetwork;sop/transform
Used operations
Used modules
Used assemblers
GL_LINE
Used integrations
[]
Used assets
Nodes map
{"/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera1/postProcessNetwork1":"sop/postProcessNetwork","/perspectiveCamera1/postProcessNetwork1/antialiasing1":"post/antialiasing","/perspectiveCamera1/postProcessNetwork1/OUT":"post/null","/perspectiveCamera1/renderersNetwork1":"sop/renderersNetwork","/perspectiveCamera1/renderersNetwork1/WebGLRenderer1":"rop/WebGLRenderer","/COP":"obj/copNetwork","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/COP/envMap":"cop/envMap","/lines":"obj/geo","/lines/line1":"sop/line","/lines/copy1":"sop/copy","/lines/material1":"sop/material","/lines/MAT":"sop/materialsNetwork","/lines/MAT/lineBasicBuilder1":"mat/lineBasicBuilder","/lines/merge1":"sop/merge","/lines/transform1":"sop/transform"}
Js version
Editor version
Engine version
Name
*
Code
{"properties":{"frame":26425,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera1","versions":{"polygonjs":"1.1.264"}},"root":{"type":"root","nodes":{"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls"}}},"postProcessNetwork1":{"type":"postProcessNetwork","nodes":{"antialiasing1":{"type":"antialiasing"},"OUT":{"type":"null","inputs":["antialiasing1"],"flags":{"display":true}}},"params":{"sampling":4},"selection":["antialiasing1"]},"renderersNetwork1":{"type":"renderersNetwork","nodes":{"WebGLRenderer1":{"type":"WebGLRenderer","params":{"alpha":0,"premultipliedAlpha":0,"antialias":0,"stencil":0,"depth":0,"toneMapping":0,"outputEncoding":3000,"physicallyCorrectLights":0,"sortObjects":0,"tshadowMap":0}}}}},"params":{"t":[-5.3,2.4,0],"controls":"./events1/cameraOrbitControls1","setRenderer":1,"renderer":"renderersNetwork1/WebGLRenderer1","doPostProcess":1,"postProcessNode":"postProcessNetwork1"},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"imageEnv":{"type":"imageEXR","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/piz_compressed.exr"}},"imageUv":{"type":"image","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/uv.jpg","tflipY":true}},"envMap":{"type":"envMap","inputs":["imageEnv"]}}},"lines":{"type":"geo","nodes":{"line1":{"type":"line","params":{"length":50,"pointsCount":500,"origin":[0,0,"-0.5*ch(\"length\")"],"direction":[0,0,1]}},"copy1":{"type":"copy","params":{"count":20,"t":[1,0,0]},"inputs":["line1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasicBuilder1"},"inputs":["transform1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasicBuilder1":{"type":"lineBasicBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[{"index":0,"node":"add1","output":"sum"},{"index":1,"node":"mix1","output":"mix"}]},"noise1":{"type":"noise","params":{"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false}},"position":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"freq":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false}},"offset":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"maxInputsCount":4,"inputs":[{"index":0,"node":"floatToVec3_2","output":"vec3"},{"index":1,"node":"globals1","output":"position"},{"index":2,"node":"floatToVec3_1","output":"vec3"},{"index":3,"node":"floatToVec3_3","output":"vec3"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec3"},{"name":"freq","type":"vec3"},{"name":"offset","type":"vec3"}],"out":[{"name":"noise","type":"vec3"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"globals1","output":"position"},{"index":1,"node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"constant1":{"type":"constant","params":{"float":0.06},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"},{"index":1,"node":"constant1","output":"val"},{"index":2,"node":"constant1","output":"val"}]},"constant2":{"type":"constant","params":{"float":1.6},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant2","output":"val"},{"index":1,"node":"constant2","output":"val"},{"index":2,"node":"constant2","output":"val"}]},"globals2":{"type":"globals"},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":0.11},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"globals2","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"floatToVec3_3":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[null,{"index":1,"node":"multAdd1","output":"val"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"add1","output":"sum"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true},"raw_input":1.5},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":7.5},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[null,null,{"index":2,"node":"vec3ToFloat1","output":"x"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"param1":{"type":"param","params":{"name":"baseColor","type":4,"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param2":{"type":"param","params":{"name":"bgColor","type":4,"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"param1","output":"val"},{"index":1,"node":"param2","output":"val"},{"index":2,"node":"smoothstep1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}}},"params":{"linewidth":3.5,"baseColor":{"type":"color","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":[0.8313725490196079,0.7294117647058823,0.7294117647058823],"overriden_options":{"callback":"{}"}},"bgColor":{"type":"color","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["ch(\"/bgColorr\")","ch(\"/bgColorg\")","ch(\"/bgColorb\")"],"overriden_options":{"callback":"{}"}}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-main","type":"LineBasicMaterial","name":"/lines/MAT/lineBasicBuilder1","color":16777215,"depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"linewidth":3.5},"onBeforeCompileDataJSON":{"vertexShader":"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\t#include <morphcolor_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}","fragmentShader":"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]},"customMaterials":{"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDistanceMaterial","type":"ShaderMaterial","name":"customDistanceMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0},"referencePosition":{"type":"v3","value":[0,0,0]},"nearDistance":{"value":1},"farDistance":{"value":1000}},"defines":{"USE_SIZEATTENUATION":1,"DEPTH_PACKING":3201},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}},"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDepthMaterial","type":"ShaderMaterial","name":"customDepthMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0}},"defines":{"DEPTH_PACKING":3201},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/lines/MAT/lineBasicBuilder1-customDepthDOFMaterial","type":"ShaderMaterial","name":"customDepthDOFMaterial","depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"glslVersion":null,"uniforms":{"diffuse":{"type":"c","value":16777215},"opacity":{"value":1},"map":{"value":null},"uvTransform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"uv2Transform":{"type":"m3","value":[1,0,0,0,1,0,0,0,1]},"alphaMap":{"value":null},"alphaTest":{"value":0},"displacementMap":{"value":null},"displacementScale":{"value":1},"displacementBias":{"value":0}},"defines":{"DEPTH_PACKING":3200},"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","lights":false},"onBeforeCompileDataJSON":{"vertexShader":"\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n// vHighPrecisionZW is added to match CustomMeshDepth.frag\n// which is itself taken from threejs\nvarying vec2 vHighPrecisionZW;\n\n\nvoid main() {\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tvec3 transformed = v_POLY_add1_sum;vec4 mvPosition = vec4( transformed, 1.0 ); gl_Position = projectionMatrix * modelViewMatrix * mvPosition;\n\n\n\n\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include <color_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n// removed:\n//\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\n\n\tvHighPrecisionZW = gl_Position.zw;\n}\n","fragmentShader":"\n// INSERT DEFINES\n\n\n\n// /lines/MAT/lineBasicBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_408 (in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /lines/MAT/lineBasicBuilder1/globals2\nuniform float time;\n\n// /lines/MAT/lineBasicBuilder1/param1\nuniform vec3 v_POLY_param_baseColor;\n\n// /lines/MAT/lineBasicBuilder1/param2\nuniform vec3 v_POLY_param_bgColor;\n\n// /lines/MAT/lineBasicBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\t// INSERT BODY\n\n\n\n\t// /lines/MAT/lineBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 1.6;\n\t\n\t// /lines/MAT/lineBasicBuilder1/constant1\n\tfloat v_POLY_constant1_val = 0.06;\n\t\n\t// /lines/MAT/lineBasicBuilder1/globals2\n\tfloat v_POLY_globals2_time = time;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param1\n\tvec3 v_POLY_param1_val = v_POLY_param_baseColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/param2\n\tvec3 v_POLY_param2_val = v_POLY_param_bgColor;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(v_POLY_constant2_val, v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_constant1_val, v_POLY_constant1_val, v_POLY_constant1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.11*(v_POLY_globals2_time + 0.0)) + 0.0;\n\t\n\t// /lines/MAT/lineBasicBuilder1/floatToVec3_3\n\tvec3 v_POLY_floatToVec3_3_vec3 = vec3(0.0, v_POLY_multAdd1_val, 0.0);\n\t\n\t// /lines/MAT/lineBasicBuilder1/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_408((v_POLY_globals1_position*v_POLY_floatToVec3_1_vec3)+(v_POLY_floatToVec3_3_vec3+vec3(2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /lines/MAT/lineBasicBuilder1/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_globals1_position + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /lines/MAT/lineBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_add1_sum.x;\n\t\n\t// /lines/MAT/lineBasicBuilder1/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(1.5, 7.5, v_POLY_vec3ToFloat1_x);\n\t\n\t// /lines/MAT/lineBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_param1_val, v_POLY_param2_val, v_POLY_smoothstep1_val);\n\t\n\t// /lines/MAT/lineBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\n\n\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","timeDependent":true,"resolutionDependent":false,"paramConfigs":[{"type":"color","name":"baseColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_baseColor"},{"type":"color","name":"bgColor","defaultValue":[0,0,0],"uniformName":"v_POLY_param_bgColor"}]}}}}}}},"merge1":{"type":"merge","params":{"compact":1},"inputs":["copy1"]},"transform1":{"type":"transform","params":{"t":["-$CEX","-$CEY","-$CEZ"]},"inputs":["merge1"]}},"flags":{"display":true}}},"params":{"bgColor":{"raw_input":[0.10588235294117647,0.11372549019607843,0.11372549019607843],"overriden_options":{"conversion":"no conversion"}},"mainCameraPath":"/perspectiveCamera1"}},"ui":{"nodes":{"perspectiveCamera1":{"pos":[-200,100],"nodes":{"events1":{"pos":[-200,-50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}},"postProcessNetwork1":{"pos":[-200,150],"nodes":{"antialiasing1":{"pos":[0,100]},"OUT":{"pos":[0,200]}}},"renderersNetwork1":{"pos":[-200,50],"nodes":{"WebGLRenderer1":{"pos":[-100,50]}}}}},"COP":{"pos":[-200,200],"nodes":{"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]},"envMap":{"pos":[50,200]}}},"lines":{"pos":[-50,-150],"nodes":{"line1":{"pos":[0,-400]},"copy1":{"pos":[0,-300]},"material1":{"pos":[0,50]},"MAT":{"pos":[-200,50],"nodes":{"lineBasicBuilder1":{"pos":[0,-100],"nodes":{"globals1":{"pos":[-700,-100]},"output1":{"pos":[1000,-100]},"noise1":{"pos":[-200,0]},"add1":{"pos":[0,-100]},"constant1":{"pos":[-550,200]},"floatToVec3_1":{"pos":[-450,200]},"constant2":{"pos":[-600,100]},"floatToVec3_2":{"pos":[-500,100]},"globals2":{"pos":[-550,400]},"multAdd1":{"pos":[-400,400]},"floatToVec3_3":{"pos":[-300,400]},"vec3ToFloat1":{"pos":[150,-350]},"smoothstep1":{"pos":[350,-300]},"param1":{"pos":[500,100]},"param2":{"pos":[500,250]},"mix1":{"pos":[700,0]}}}}},"merge1":{"pos":[0,-200]},"transform1":{"pos":[0,-50]}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera1","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":null,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-244.53424778370766,"y":50.72686512248811},"zoom":0.4740000000000001},"history":{"2":{"position":{"x":-98.5226480836237,"y":9.3588850174216},"zoom":0.5740000000000001},"3":{"position":{"x":-48,"y":-22},"zoom":0.5},"6":{"position":{"x":11.339999999999996,"y":-96.49999999999999},"zoom":0.6172839506172841},"9":{"position":{"x":-32,"y":-88},"zoom":0.5},"33":{"position":{"x":-35.27874564459929,"y":170.03484320557487},"zoom":0.5740000000000001},"34":{"position":{"x":-1.7770597738287393,"y":150.76736672051697},"zoom":0.6190000000000001},"60":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"76":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"77":{"position":{"x":200,"y":-50},"zoom":0.5740000000000001},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"161":{"position":{"x":-299.65156794425087,"y":113.93728222996515},"zoom":0.5740000000000001},"203":{"position":{"x":-244.53424778370766,"y":50.72686512248811},"zoom":0.4740000000000001},"236":{"position":{"x":-150,"y":-50},"zoom":0.5740000000000001},"451":{"position":{"x":-69.68641114982577,"y":27.874564459930312},"zoom":0.5740000000000001},"456":{"position":{"x":0,"y":-150},"zoom":0.5740000000000001},"468":{"position":{"x":0,"y":0},"zoom":0.5740000000000001},"529":{"position":{"x":-490.581714376675,"y":166.08136672838205},"zoom":1.0660000000000003},"836":{"position":{"x":0,"y":0},"zoom":0.5740000000000001},"865":{"position":{"x":0,"y":0},"zoom":0.5740000000000001}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/lines/MAT/lineBasicBuilder1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/lines","/lines/MAT","/lines","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/","/perspectiveCamera1/events1","/perspectiveCamera1","/","/lines","/","/lines","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/lines","/","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/perspectiveCamera1/postProcessNetwork1","/perspectiveCamera1","/","/perspectiveCamera1","/","/lines","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/lines","/","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1","/lines/MAT","/lines","/lines/MAT","/lines/MAT/lineBasicBuilder1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":84,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"createExport":true,"compressJs":true,"createZip":false,"publishToIntegrations":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;mat/lineBasicBuilder;obj/copNetwork;obj/geo;obj/perspectiveCamera;post/antialiasing;post/null;rop/WebGLRenderer;sop/copy;sop/eventsNetwork;sop/line;sop/material;sop/materialsNetwork;sop/merge;sop/postProcessNetwork;sop/renderersNetwork;sop/transform
Used operations
Used modules
Used assemblers
GL_LINE
Used integrations
[]
Used assets
Nodes map
{"/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera1/postProcessNetwork1":"sop/postProcessNetwork","/perspectiveCamera1/postProcessNetwork1/antialiasing1":"post/antialiasing","/perspectiveCamera1/postProcessNetwork1/OUT":"post/null","/perspectiveCamera1/renderersNetwork1":"sop/renderersNetwork","/perspectiveCamera1/renderersNetwork1/WebGLRenderer1":"rop/WebGLRenderer","/COP":"obj/copNetwork","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/COP/envMap":"cop/envMap","/lines":"obj/geo","/lines/line1":"sop/line","/lines/copy1":"sop/copy","/lines/material1":"sop/material","/lines/MAT":"sop/materialsNetwork","/lines/MAT/lineBasicBuilder1":"mat/lineBasicBuilder","/lines/merge1":"sop/merge","/lines/transform1":"sop/transform"}
Js version
Editor version
Engine version
Logout
0%
There was a problem displaying your scene:
view scene source