This is a WebGL version of jQuery Starfield, written in TypeScript (and without jQuery).
If you are interested in the "regular version" (which also doesn't need jQuery), look at the initial commit: b25c3dbcc
npm i -s starfield-webgl
-
<script type="module"> import {runStarfield} from "starfield-webgl"; // default options const options = { starDensity: 1.0, mouseScale: 1.0, seedMovement: true, fpsLimit: 30, // set to <= 0 to disable antialiasing: true, // onBeforeDraw?: () => void; // onAfterDraw?: () => void; }; (() => { runStarfield(options); })(); </script>
Below are notes regarding development.
- Node >= v12
- (Development only) Parcel (
npm i -g parcel
)
- Clone the repo
- Run
npm i
- Build:
npm run dev