whatisgithub

What is locuslucis?

zalo/locuslucis — explained in plain English

Analysis updated 2026-07-15 · repo last pushed 2023-07-11

3GLSLAudience · developerComplexity · 3/5DormantSetup · easy

In one sentence

An interactive browser-based experiment testing three different methods for simulating realistic 2D light bouncing and shadow casting, built with three.js for visualization.

Mindmap

mindmap
  root((repo))
    What it does
      Simulates 2D light bouncing
      Tests three lighting methods
      Casts realistic shadows
    Tech stack
      three.js
      GLSL shaders
      esbuild bundler
      Runs in browser
    Use cases
      Top-down game lighting
      Visual effects reference
      Graphics learning
    Audience
      Frontend developers
      Game designers
      Visual artists
    Approach
      Angle-based visibility
      Sweep line precompute
      Per-pixel ray casting
    Status
      Experimental playground
      Not production library
      Live demos available
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Reference realistic 2D lighting effects for a top-down browser-based game.

USE CASE 2

Learn how different light simulation algorithms compare by experimenting with live demos.

USE CASE 3

Build visually immersive 2D scenes with natural shadow casting around obstacles.

What is it built with?

three.jsGLSLJavaScriptesbuild

How does it compare?

zalo/locusluciselisaliman/ghostty-shaderss0xdk/ghostty-blackhole
Stars3151,341
LanguageGLSLGLSLGLSL
Last pushed2023-07-112026-06-11
MaintenanceDormantMaintained
Setup difficultyeasyeasymoderate
Complexity3/51/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Runs directly in modern browsers like Chrome or Edge with no setup, esbuild is only needed if you want to modify the code.

No license information is provided in the repository, so usage rights are unclear.

So what is it?

LocusLucis is an experimental project exploring how to simulate realistic light bouncing in a 2D space, aiming to find the fastest possible method. Imagine shining a virtual flashlight into a room and watching the light spread naturally, illuminating surfaces and casting shadows based on where it hits. The project tests three different approaches to this 2D light simulation. One method uses mathematical angles to calculate what's directly visible and lit. Another sweeps lines around a scene to precompute visibility before rendering. The third shoots virtual light rays out from every pixel to determine what gets illuminated. All three rely on a popular 3D rendering tool called three.js to display the results in your browser. Frontend developers, game designers, and visual artists might find this useful as a reference for creating realistic lighting effects in 2D scenes or browser-based experiences. If you're building a top-down game and want light to behave naturally around obstacles, or you're just curious about how graphics programmers approach realistic illumination, these interactive experiments offer a hands-on look. The project serves as a personal testing ground for different lighting algorithms rather than a production-ready library. It runs directly in modern browsers like Chrome or Edge without needing complex setup, though developers can bundle the code using a tool called esbuild if they want to modify it. The README doesn't go into detail about performance comparisons or which method ultimately proved fastest, leaving that to hands-on experimentation with the live demos.

Copy-paste prompts

Prompt 1
Help me understand the three 2D lighting approaches in LocusLucis, angle-based visibility, sweep line precomputation, and per-pixel ray casting, and when each method works best.
Prompt 2
I want to adapt the LocusLucis per-pixel ray casting approach into my own three.js top-down game. Walk me through how the shader shoots rays from each pixel and determines illumination.
Prompt 3
Using three.js and GLSL, help me build a 2D scene where a moving light source casts realistic shadows around rectangular obstacles, inspired by the LocusLucis project.
Prompt 4
Compare the performance tradeoffs of angle-based visibility vs sweep line precomputation for 2D lighting in a browser scene with many obstacles.

Frequently asked questions

What is locuslucis?

An interactive browser-based experiment testing three different methods for simulating realistic 2D light bouncing and shadow casting, built with three.js for visualization.

What language is locuslucis written in?

Mainly GLSL. The stack also includes three.js, GLSL, JavaScript.

Is locuslucis actively maintained?

Dormant — no commits in 2+ years (last push 2023-07-11).

What license does locuslucis use?

No license information is provided in the repository, so usage rights are unclear.

How hard is locuslucis to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is locuslucis for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.