Z22797

{
    "Z1K1": "Z2",
    "Z2K1": {
        "Z1K1": "Z6",
        "Z6K1": "Z22797"
    },
    "Z2K2": {
        "Z1K1": "Z14",
        "Z14K1": "Z22796",
        "Z14K3": {
            "Z1K1": "Z16",
            "Z16K1": "Z600",
            "Z16K2": "function Z22796( Z22796K1, Z22796K2, Z22796K3, Z22796K4 ) {\n\tvar inputX = Number(Z22796K1);\n\tvar inputY = Number(Z22796K2);\n\tvar inputZ = Number(Z22796K3);\n\tvar inputSeed = Number(Z22796K4);\n\tclass NoiseGenerator {\n\t\tconstructor(seed) {\n\t\t\tthis.seed = seed;\n\t\t\tthis.default_size = 35;\n\t\t\tthis.p = [];\n\t\t\tthis.permutation = [];\n\t\t\tthis.init();\n\t\t}\n\t\tinit() {\n\t\t\t// Initialize the permutation array.\n\t\t\tthis.p = [];\n\t\t\tthis.permutation = [ 151, 160, 137, 91, 90, 15, 131, 13, 201,\n\t\t\t\t\t95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99,\n\t\t\t\t\t37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26,\n\t\t\t\t\t197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88,\n\t\t\t\t\t237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74,\n\t\t\t\t\t165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83, 111,\n\t\t\t\t\t229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40,\n\t\t\t\t\t244, 102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76,\n\t\t\t\t\t132, 187, 208, 89, 18, 169, 200, 196, 135, 130, 116, 188, 159,\n\t\t\t\t\t86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250,\n\t\t\t\t\t124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207,\n\t\t\t\t\t206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170,\n\t\t\t\t\t213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155,\n\t\t\t\t\t167, 43, 172, 9, 129, 22, 39, 253, 19, 98, 108, 110, 79, 113,\n\t\t\t\t\t224, 232, 178, 185, 112, 104, 218, 246, 97, 228, 251, 34, 242,\n\t\t\t\t\t193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235,\n\t\t\t\t\t249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157, 184,\n\t\t\t\t\t84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236,\n\t\t\t\t\t205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66,\n\t\t\t\t\t215, 61, 156, 180 ];\n\t\n\t\t\t// Populate it\n\t\t\tfor (var i = 0; i \u003C 256; i++) {\n\t\t\t\tthis.p[256 + i] = this.p[i] = this.permutation[i];\n\t\t\t}\n\t\t}\n\t\n\t\tnoiseXYZS(x, y, z, size) {\n\t\t\tvar value = 0.0;\n\t\t\tvar initialSize = size;\n\t\t\twhile (size \u003E= 1) {\n\t\t\t\tvalue += this.smoothNoise((x / size), (y / size), (z / size)) * size;\n\t\t\t\tsize /= 2.0;\n\t\t\t}\n\t\t\treturn value / initialSize;\n\t\t}\n\t\n\t\tnoiseXYZ(x, y, z) {\n\t\t\treturn this.noiseXYZS(x, y, z, this.default_size);\n\t\t}\n\t\n\t\tsmoothNoise(x, y, z) {\n\t\t\t// Offset each coordinate by the seed value\n\t\t\tx += this.seed;\n\t\t\ty += this.seed;\n\t\t\tx += this.seed;\n\t\n\t\t\tvar X = Math.floor(x) \u0026 255; // FIND UNIT CUBE THAT\n\t\t\tvar Y = Math.floor(y) \u0026 255; // CONTAINS POINT.\n\t\t\tvar Z = Math.floor(z) \u0026 255;\n\t\n\t\t\tx -= Math.floor(x); // FIND RELATIVE X,Y,Z\n\t\t\ty -= Math.floor(y); // OF POINT IN CUBE.\n\t\t\tz -= Math.floor(z);\n\t\n\t\t\tvar u = this.fade(x); // COMPUTE FADE CURVES\n\t\t\tvar v = this.fade(y); // FOR EACH OF X,Y,Z.\n\t\t\tvar w = this.fade(z);\n\t\n\t\t\tvar A = this.p[X] + Y;\n\t\t\tvar AA = this.p[A] + Z;\n\t\t\tvar AB = this.p[A + 1] + Z; // HASH COORDINATES OF\n\t\t\tvar B = this.p[X + 1] + Y;\n\t\t\tvar BA = this.p[B] + Z;\n\t\t\tvar BB = this.p[B + 1] + Z; // THE 8 CUBE CORNERS,\n\t\n\t        var lerp = this.lerp, grad = this.grad, p = this.p;\n\t\t\treturn lerp(w, lerp(v, lerp(u, grad(p[AA], \t\tx, \t\ty, \t\tz\t\t), \t// AND ADD\n\t\t\t\t\t\t\t\t\t\t\tgrad(p[BA],\t\tx - 1, \ty, \t\tz\t\t)), // BLENDED\n\t\t\t\t\t\t\t\t\tlerp(u, grad(p[AB], \tx, \t\ty - 1, \tz\t\t), \t// RESULTS\n\t\t\t\t\t\t\t\t\t\t\tgrad(p[BB], \tx - 1, \ty - 1, \tz\t\t))),// FROM 8\n\t\t\t\t\t\t\tlerp(v, lerp(u, grad(p[AA + 1], x, \t\ty, \t\tz - 1\t), \t// CORNERS\n\t\t\t\t\t\t\t\t\t\t\tgrad(p[BA + 1], x - 1, \ty, \t\tz - 1\t)), // OF CUBE\n\t\t\t\t\t\t\t\t\tlerp(u, grad(p[AB + 1], x, \t\ty - 1,\tz - 1\t),\n\t\t\t\t\t\t\t\t\t\t\tgrad(p[BB + 1], x - 1, \ty - 1, \tz - 1\t))));\n\t\t}\n\t\n\t\tfade(t) {\n\t\t\treturn t * t * t * (t * (t * 6 - 15) + 10);\n\t\t}\n\t\n\t\tlerp(t, a, b) {\n\t\t\treturn a + t * (b - a);\n\t\t}\n\t\n\t\tgrad(hash, x, y, z) {\n\t\t\tvar h = hash \u0026 15; // CONVERT LO 4 BITS OF HASH CODE\n\t\t\tvar u = h \u003C 8 ? x : y, // INTO 12 GRADIENT DIRECTIONS.\n\t\t\t    v = h \u003C 4 ? y : h == 12 || h == 14 ? x : z;\n\t\t\treturn ((h \u0026 1) == 0 ? u : -u) + ((h \u0026 2) == 0 ? v : -v);\n\t\t}\n\t}\n\tvar gen = new NoiseGenerator(inputSeed);\n\treturn gen.noiseXYZ(inputX, inputY, inputZ);\n}"
        }
    },
    "Z2K3": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "js perlin noise"
            }
        ]
    },
    "Z2K4": {
        "Z1K1": "Z32",
        "Z32K1": [
            "Z31"
        ]
    },
    "Z2K5": {
        "Z1K1": "Z12",
        "Z12K1": [
            "Z11",
            {
                "Z1K1": "Z11",
                "Z11K1": "Z1002",
                "Z11K2": "Adapted from: https://gist.github.com/alksily/7a85a1898e65c936f861ee93516e397d"
            }
        ]
    }
}