Code Writing: • Write JavaScript code using available functions
• Set 'return' for final output value
• Press Ctrl+Enter to apply your code

Available Variables: • x, y - world coordinates for current pixel
• Math library - all JavaScript Math functions
• v.originx, v.originz - origin coordinates
• v.worldx, v.worldz - world coordinates

Custom Functions: • q.noise(x, y) - Perlin noise (-1 to 1, remap to 0-1)
• loop(), random(), random_integer()
• hermite_blend() - smooth interpolation

Molang Functions: • math.abs() - absolute value
• math.sin(), math.cos(), math.tan() - trigonometry
• math.asin(), math.acos(), math.atan(), math.atan2() - inverse trig
• math.sqrt(), math.pow() - square root, power
• math.exp(), math.ln() - exponential, natural log
• math.ceil(), math.floor(), math.trunc(), math.round() - rounding
• math.min(), math.max() - minimum, maximum
• math.clamp() - clamp value between min/max
• math.lerp() - linear interpolation
• math.lerprotate() - lerp with rotation
• math.mod() - modulo operation
• math.random() - random 0-1
• math.random_integer() - random integer
• math.die_roll(), math.die_roll_integer() - dice rolls
• math.hermite_blend() - smooth hermite interpolation
• math.min_angle() - minimum angle between two angles
• math.pi - pi constant

Return Values: • Single value (0-1) for grayscale
• RGB object: {r: 0-1, g: 0-1, b: 0-1}
• Optional alpha: {r: 0-1, g: 0-1, b: 0-1, a: 0-255}

Example: let n = (q.noise(x * 0.01, y * 0.01) + 1) / 2;
return {r: n, g: n * 0.5, b: n * 0.2};

Navigation: • Mouse wheel to zoom in/out
• Click and drag to pan around
• Adjust World Size for detail level