Pixel exterior tiles in three.js: NearestFilter + Meadowkeep Exterior LITE sheet

I’m the creator. Copy-paste pattern for loading a 16×16 outdoor sheet into three.js without blur — useful before you wire a full tilemap helper.

Pack file used below (from Meadowkeep Exterior LITE zip sheet/):

  • meadowkeep_exterior_lite_sheet_1x.png — 512×96 RGBA, 32 columns × 6 rows of 16×16 cells (149 tiles: 147 static + 2 animated cells)

Snippet (r152+ style; put the PNG next to your HTML, or change the path):

import * as THREE from 'three';

const TILE = 16;
const COLS = 32; // sheet is 512 wide → 32 columns

function pixelTexture(url) {
  const loader = new THREE.TextureLoader();
  const tex = loader.load(url);
  tex.magFilter = THREE.NearestFilter;
  tex.minFilter = THREE.NearestFilter;
  tex.generateMipmaps = false;
  tex.colorSpace = THREE.SRGBColorSpace;
  return tex;
}

function tileUVs(index) {
  const col = index % COLS;
  const row = Math.floor(index / COLS);
  const u0 = col / COLS;
  const u1 = (col + 1) / COLS;
  // PNG row 0 is top; three.js v=0 is bottom
  const rows = 6;
  const v1 = 1 - row / rows;
  const v0 = 1 - (row + 1) / rows;
  return { u0, v0, u1, v1 };
}

const tex = pixelTexture('./meadowkeep_exterior_lite_sheet_1x.png');
// Example: draw tile index 0 on a PlaneGeometry via vertex UVs from tileUVs(0).

Free LITE (149 tiles + 4 ambient OGG; Godot 4 + Tiled files in the zip too):

Full pack is 584 tiles (549 static + 35 animated) with 9 autotile blobs including stone retaining wall, dirt / stone paths, tall grass, sand, water shore, and three roof sets.

Art is generated by code written with AI assistance. AI tool: Grok Bot coding assistant (used only to write the generation code; current version as of Oct 2026).
Sounds are generated by code written with AI assistance. AI tool: Grok Bot coding assistant (used only to write the generation code; current version as of Oct 2026).

Questions on NearestFilter / UV row flip welcome.