Skip to content

Instantly share code, notes, and snippets.

View bhouston's full-sized avatar

Ben Houston bhouston

View GitHub Profile
@bhouston
bhouston / three.js-pr-outcomes.md
Created November 26, 2026 02:15
Three.js PR outcomes and reviewer activity — bhouston

Three.js PR outcomes and reviewer activity

bhouston · mrdoob/three.js · October 10–November 25, 2026 (Toronto)

The primary outcome is whether the change landed in Three.js. I found 40/66 (61%) verified upstream successes among PRs opened in the window. That includes 35 changes that landed through your PRs and five original PRs whose main outcome landed through four replacement PRs by Mugen87 and sunag. Your direct GitHub merge rate was 36/66 (55%), including the cube-array change that was reverted. Across all 74 reviewed PRs, the verified upstream outcome rate was 45/74 (61%).

Bug fixes were the strongest category for direct merges. Merged so far were 19 of 22 bug fixes (86%) and 5 of 20 feature or API proposals (25%). A first public response took a median 3.2 hours for bugs and 6.7 hours for features. Among PRs that merged, the medians were 13.6 hours and 4.5 days. Among the PRs that merged, the median time from first response to merge was 1.5 hours for fixes and 2.4 days for features.

**A rele

@bhouston
bhouston / three.js-pr-review-guidelines.md
Last active November 26, 2026 02:17
Three.js PR self-review guide — bhouston

Three.js PR self-review guide

For bhouston · Review window October 10–November 25, 2026 (Toronto)

Use this as the primary checklist before opening a PR against mrdoob/three.js. Start here to decide whether to submit, where a TSL abstraction belongs, and what evidence a maintainer needs to reproduce the result. Three.js contributing guide

When to consult the earlier review notes

Open the earlier notes when the diff touches loader behavior or error handling, TSL backend capability checks and fallbacks, unit test organization, or example and Inspector conventions. Look up the relevant precedent and check it against the closest comparable code on current dev. Treat those notes as examples from past reviews. For instance, when adding a runtime check, use the current guide’s error-handling checklist and the surrounding API’s failure convention. [Earlier Mugen87 review notes](https://gist.github.com/bhouston/1b66f04b2838229a36844cd6

@bhouston
bhouston / gist:6f31097da4517ea48c57b55250a82022
Last active December 1, 2026 15:57
Best structure for threeJS PRs descriptions.
It is important to realize that ThreeJS maintainers are over worked. Each sentence we add to a PR needs to contain clear value that will lead to the PR being accepted. Each time we ramble about details in order to be "comprehensive" and "clear" we are hurting the chances of the PR being accepted - long rambling detailed PRs will not even get rejected, just ignored. The whole PR should be about showing excellence/expertise - we did things the proper way, the correct way, the efficient way, the standard way - confidence - we are making ThreeJS better, we are fixing real bugs - and we are light about it, we are not overly wordy or self-important or wasting anyone's time/energy.
Use the GitHub CLI (`gh`) for GitHub operations, including opening and editing PRs, attaching evidence, and checking CI. Pass saved Markdown to `gh pr create` or `gh pr edit` with `--body-file`.
Here are the sections I prefer.
## Motivation
You need to start with the hook. I call it the "Motivation" section and I use a "## Motivat
@bhouston
bhouston / gist:1b66f04b2838229a36844cd66ea31c7e
Created October 9, 2026 13:10
Mugen87's review preferences for ThreeJS
# Summary: Mugen87's review preferences
Grouped by theme, most frequent first. Each rule cites the PRs where it came up.
## 1. Don't add defensive validation or throws
This is his most repeated request.
@bhouston
bhouston / no-prisma-includes.js
Created September 17, 2025 01:38
ESLint rule to catch the use of Prisma's "include" queries
/**
* ESLint rule to prevent the use of Prisma's `include` queries
* This rule helps prevent accidental exposure of sensitive data by encouraging
* explicit field selection using `select` instead of `include`
*/
export default {
meta: {
type: 'problem',
docs: {
@bhouston
bhouston / imageServing.ts
Created December 13, 2023 14:09
old lv api image serving code.
const fileUrl = new URL(`/api/files/${fileId}/content`, API_URL);
const url = new URL('/api/images', API_URL);
url.pathname += `/webp`;
url.pathname += `/${params.width ?? 0}`;
url.pathname += 'x';
url.pathname += `${params.height ?? 0}`;
url.pathname += `/filters:format(${params.extension ?? 'png'})`;
url.pathname += `/${fileUrl}`;
@bhouston
bhouston / downloadImage.ts
Last active December 12, 2023 18:42
Save remote image to disk
import axios from 'axios';
import fs from 'fs';
import path from 'path';
async function downloadImageAsAxiosStream(url: string, filename: string) {
// Fetch the image
const response = await axios({
url,
method: 'GET',
responseType: 'stream'
@bhouston
bhouston / threads-webgl.js
Created July 6, 2023 13:04
Meta Threads.net ThreeJS WebGL Code
__d(
'useThrottledImpl',
['cr:1708227'],
function (a, b, c, d, e, f, g) {
'use strict';
g['default'] = b('cr:1708227');
},
98
);
__d(
@bhouston
bhouston / Dockerfile-npm
Last active June 1, 2023 12:55
Yarn vs NPM speed test.
FROM node:16-alpine
WORKDIR /usr/src/app
# install dependencies
COPY package*.json ./
COPY packages/shared/package*.json ./packages/shared/
COPY packages/collector/package*.json ./packages/collector/
COPY packages/frontend/package*.json ./packages/frontend/
RUN npm ci
@bhouston
bhouston / TRAAPass.js
Created May 25, 2023 01:48
Temporal Reproduction Anti-Alising for Three.js
THREE.TRAAPass = function(scene, camera, resolution) {
THREE.Pass.call(this);
this.scene = scene;
this.camera = camera;
// old velcotiy material.
function getSuperSampleTRAAMaterial() {
return new THREE.ShaderMaterial({
defines: {