THREE.JS Wrappers for creating geometries with video textures

Hi all,

I have written some wrappers for THREE.JS for one line functions to create geometries and apply video textures. I need to be pointed in the right direction for a pull request, and how QA follows up, and when if at all it ends up in an addon, or if it passes muster, in the core. I wrote a bunch of these damn wrapper functions because I am sort of lazy… Please advise when not busy. TY.

I don’t think this is something that will be added to core… they try to keep core pretty slimmed down… It’s a constant war against gravity to keep core small… but it sounds like a useful addon. :slight_smile: Do you have it in a github repo somewhere + a demo?

GITHUB. Give me a few days to get a vps happening, and I’ll send a demo link.

1 Like

Ok. You might want to consider making a demo using jsfiddle or codepen or glitch. This encourages people to try it out and helps make it easy to use.
Also you can host a demo directly from github by going to the “github pages” setting and enabling it… then github will serve your project directory automatically on a URL and automatically update it when you push new commits. It’s like 3 clicks.

For instance here on a library I maintain: GitHub - manthrax/THREE-CSGMesh: Conversion of a CSG library for use with modern THREE.js
The demos are just hosted directly by github pages. No external server required.

a youtube describing the process: https://www.youtube.com/watch?v=I-yT2Err6PE

1 Like

As manthrax said that doesn’tt sound like something that’ll end up in the core lib (or even in the addons). How about making a pull request at drei/vanilla?

1 Like

There’s probably no need to merge that into core. Three.js already supports video textures out of the box via THREE.VideoTexture, so wrappers for that are really just convenience helpers rather than new functionality.

For reference, video textures are already documented here:

And examples of it in action can be seen in projects like:
https://theneoverse.web.app/#threeviewer&&load=4?gtr/
https://theneoverse.web.app/#threeviewer&&load=0

Core tends to stay minimal and low level by design. Thin abstraction layers usually don’t get merged unless they introduce new capability. If your wrappers just simplify geometry creation and applying video textures, they’re probably better kept as a personal utility module, shared as a separate helper library, or published as a small npm package.

If you’re still considering a PR, it’s usually best to open a discussion first and clearly explain what gap this fills beyond what Three.js already provides.

2 Likes