get-mouse-color-gl

1.1.0 • Public • Published

get-mouse-color-gl

A module that let you pass in your mouse position and get the color of your position on WebGL using regl.

usage

npm install get-mouse-color-gl

readPixelAt(regl, mouseX, mouseY, objectArray) => Array

return an array for your mouse color in rgba value.

  • [regl] {object} - the Regl instance
  • [mouseX] {number} - x position of the mouse
  • [mouseY] {number} - y position of the mouse
  • [objectArray] {array} - the array of objects you want to render on your scene.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    5
  • 1.0.0
    3

Package Sidebar

Install

npm i get-mouse-color-gl

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • tiansijie