MCPcopy Index your code
hub / github.com/LWJGL/lwjgl3-www

github.com/LWJGL/lwjgl3-www @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
765 symbols 1,558 edges 289 files 7 documented · 1% updated 30d ago★ 1078 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

lwjgl3-www docker

lwjgl.org - Home of Lightweight Java Game Library

The website for LWJGL is build with React. It is a single-page application with client-side routing. It installs a Service Worker in order to work offline.

Notable features:

  • Client-side routing
  • Service Worker (works offline)
  • Tiny production build (entire codebase + content weights less than 300KB gzipped)
  • Code splitting at route & component level
  • Scroll restoration
  • Route preloading
  • Proximity based route preloading (see /download page)
  • Build Customizer with smart download queue & client-side ZIP generator
  • Custom webpack manifest parsing + code minification
  • CSS-in-JS with Stitches
  • Client is written in Typescript

Warning:

There is currently no server-side rendering because of hosting constraints.

Dependencies

Static assets are loaded from LWJGL's CDN (AWS CloudFront).

Build status icons are loaded directly from travis-ci.org and appveyor.com.

Three.js is loaded from jsDelivr.

Prerequisites

Development

Install all required npm packages and build styles:

#corepack enable
pnpm i
node --run build:styles

Start the server in dev mode:

node --run start

CLI flags

The following flags are used for testing production builds locally. NODE_ENV environment variable must be set to "production".

--test # Enables production test mode (e.g. disables HSTS)
--nocache # Disables Pug view caching
--pretty # Pretty prints HTML
--s3proxy # Proxies S3 images

Environment variables

NODE_ENV="production" # default: development
PORT="8080" # default: 80
HOST="127.0.0.1" # default: 0.0.0.0

Codebase Diagram

Visualization of the codebase

Production

To deploy LWJGL in production please read the separate guide: DEPLOYMENT.md.

Testing production builds

git pull
pnpm i
node --run release

You can run the production build locally:

node --run dev:test-production

Debugging production output

The following debugging tips may come in handy:

  • Disable minification by uncommenting minimize: false in webpack.config.js
  • Prevent Terser from dropping console.log or debugger by changing terserOptions in terser-config.json
  • Set PROFILING=1 env variable to load React profiling builds
  • Output named module & chunk ids in webpack.config.js
  • Analyze build output with npx webpack-bundle-analyzer public/js/build.manifest.json -h 0.0.0.0 (for full breakdown, change to all: true when writing build.manifest.json in build-production.js)

Other LWJGL subdomains:

  • The website for LWJGL 2 can be found here. A static copy of the old LWJGL website is now hosted directly from S3
  • The blog is powered by Ghost.
  • The forum is SMF.
  • The wiki for LWJGL 2 was MediaWiki. A static copy of the old LWJGL wiki is now hosted directly from S3.

Extension points exported contracts — how you extend this code

CSSModule (Interface)
(no doc)
client/types/global.d.ts
StackProps (Interface)
(no doc)
client/components/layout/FlexStack.tsx
NaturalShadowOptions (Interface)
(no doc)
client/theme/filter-shadow.ts
ScrollPosition (Interface)
(no doc)
client/routes/PageView.tsx
Window (Interface)
(no doc)
client/services/ga.ts
Orientation (Interface)
(no doc)
client/hooks/useDeviceOrientation.ts
Props (Interface)
(no doc)
scripts/aws/cdk/src/Route53Hosts.ts
DeepReadonlyArray (Interface)
(no doc)
client/types/utils.d.ts

Core symbols most depended-on inside this repo

register
called by 39
client/theme/icons/sheet.ts
get
called by 21
client/services/Resource.ts
setState
called by 16
client/services/createStore.ts
add
called by 13
client/services/EventFeed.ts
generateProfile
called by 12
client/routes/customize/lib/maven.ts
createStore
called by 12
client/services/createStore.ts
useLocation
called by 11
client/components/router/index.tsx
redirect
called by 11
scripts/aws/cloudfront-viewer-request/index.js

Shape

Function 545
Interface 119
Method 51
Class 33
Enum 17

Languages

TypeScript99%
Java1%

Modules by API surface

client/routes/customize/reducer.ts65 symbols
client/components/router/index.tsx56 symbols
client/routes/customize/types.ts26 symbols
client/services/easing.ts25 symbols
client/theme/color.ts22 symbols
client/hooks/useMediaControls.ts19 symbols
assets/palette/contrast-colors/utils.js17 symbols
assets/palette/contrast-colors/theme.js15 symbols
client/components/forms/Button.tsx14 symbols
client/theme/easing.ts13 symbols
client/services/Resource.ts11 symbols
client/routes/PageView.tsx11 symbols

For agents

$ claude mcp add lwjgl3-www \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page