ES6 Web GL library for simple WebGL work. Much of this 1.0 version has been adapted from and inspired by Three.js and OGL.
See the documentation for details.
To test unpublished changes to wtc-gl or @wethegit/react-wtc-gl in a consuming project, use yalc rather than npm link/yarn link - the consumer's bundler otherwise resolves the linked package's peer dependencies (e.g. react) relative to this repo's node_modules, which can pull in a second copy of React and cause "Invalid hook call" errors.
- Install yalc globally (one-time):
npm install -g yalc - Build and publish the package(s) you're working on:
pnpm --filter wtc-gl run build (cd packages/wtc-gl && yalc publish) pnpm --filter @wethegit/react-wtc-gl run build (cd packages/react && yalc publish)
- In the consuming project, link them and reinstall:
This rewrites the consumer's
yalc add wtc-gl @wethegit/react-wtc-gl yarn install # or npm/pnpm installpackage.jsonto point atfile:.yalc/...and adds a.yalc/folder plusyalc.lock. - While iterating, run
pnpm run watchinpackages/wtc-glorpackages/reactto rebuilddiston save, then push the update to every linked consumer:cd packages/wtc-gl && yalc push
- When you're done, remove the link and restore the registry version in the consumer:
yalc remove wtc-gl @wethegit/react-wtc-gl yarn install