heights = '0123456789abcdef'

map = [
  '  110000',
  '00110225',
  '00000346',
  ' 0000320',
  ' 000000 ',
  '   0    ',
  '    0   ',
  '00000110',
  '00001110',
  '        ',
]

terrain = (map, heights, scale = 1) => {
  getHeight = char => scale * heights.indexOf(char)

  let geometries = []

  map.map((row, i) =>
    row.split('').map((height, j) => {
      if (i < map.length - 1 && j < row.length - 1) {
        geometries.push(_(
          [1, 1, 1],
          t(j, 0, i),
          $ty({
            nx_py_nz: getHeight(height),
            px_py_nz: getHeight(row[j + 1]),
            nx_py_pz: getHeight(map[i + 1][j]),
            px_py_pz: getHeight(map[i + 1][j + 1]),
          }),
        ));
      }
    }),
  )

  return geometries
}

return [
  ...terrain(map, heights)
    .map(color({
      py: '#0af',
      ny: '#000',
    })),
]

@@ -210,19 +210,44 @@
 le =
+ new THREE.Vector3(1, 1,
  1)
+)
  =%3E %7B%0A  
 getH
@@ -242,20 +242,21 @@
  =%3E %7B%0A  
-getH
+let h
 eight = 
@@ -268,16 +268,18 @@
 =%3E scale
+.y
  * heigh
@@ -364,22 +364,20 @@
 ').map((
-height
+char
 , j) =%3E 
@@ -473,38 +473,64 @@
     
-%5B1, 1, 1%5D,%0A          t(j, 0, i
+scale.toArray(),%0A          t(j * scale.x, 0, i * scale.z
 ),%0A 
@@ -570,24 +570,19 @@
 nz: 
-getH
+h
 eight(
-height
+char
 ),%0A 
@@ -602,20 +602,17 @@
 _py_nz: 
-getH
+h
 eight(ro
@@ -636,36 +636,33 @@
       nx_py_pz: 
-getH
+h
 eight(map%5Bi + 1%5D
@@ -693,12 +693,9 @@
 pz: 
-getH
+h
 eigh

Use Vector3 to control terrain scale.