Composable Game Input

Overview

Version Downloads Bundle Size

CONTROL FREAK

tl;dr

Add it to your project:

yarn add @hmans/controlfreak

Write a module that composes and exports your game controller, eg controller.ts:

import {
  compositeKeyboardVector,
  Controller,
  gamepadAxisVector,
  normalizeVector,
  VectorControl
} from "@hmans/controlfreak"

export const controller = new Controller()

controller
  .addControl("move", VectorControl)
  .addStep(compositeKeyboardVector("w", "s", "a", "d"))
  .addStep(gamepadAxisVector(0, 1))
  .addStep(clampVector(1))

controller
  .addControl("fire", BooleanControl)
  .addStep(whenKeyPressed(" "))
  .addStep(whenButtonPressed(0))

controller
  .addControl("aim", VectorControl)
  .addStep(compositeKeyboardVector("up", "down", "left", "right"))
  .addStep(gamepadAxisVector(2, 3))
  .addStep(normalizeVector)

Then use it in your game loop:

import { controller } from "./controller"

/* Very likely within some sort of loop...: */
controller.update()
console.log(controller.controls.move.value)
Comments
  • Bump @react-three/drei from 9.4.2 to 9.47.1

    Bump @react-three/drei from 9.4.2 to 9.47.1

    Bumps @react-three/drei from 9.4.2 to 9.47.1.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.47.1

    9.47.1 (2022-12-17)

    Bug Fixes

    • grid rotation affecting fog in a bad way (937c0c9)

    v9.47.0

    9.47.0 (2022-12-17)

    Features

    v9.46.7

    9.46.7 (2022-12-15)

    Bug Fixes

    • stop all AnimationActions on unmount/mixer change (#1176) (16f1caf)
    • MeshRefractionMaterial: vNormal should be normalized (#1184) (57d95f1)

    v9.46.6

    9.46.6 (2022-12-15)

    Bug Fixes

    • Text: downstream tree-shaking & *BufferGeometry deprecation (#1145) (c20af06)

    v9.46.5

    9.46.5 (2022-12-13)

    Bug Fixes

    v9.46.4

    9.46.4 (2022-12-08)

    Bug Fixes

    • update meshline & three-stdlib (064fc6e)

    v9.46.3

    ... (truncated)

    Commits
    • 937c0c9 fix: grid rotation affecting fog in a bad way
    • 70e0403 Update Grid.tsx
    • 416a1c6 Update Grid.tsx
    • d8c2d84 feat: grid (#1186)
    • 16f1caf fix: stop all AnimationActions on unmount/mixer change (#1176)
    • 57d95f1 fix(MeshRefractionMaterial): vNormal should be normalized (#1184)
    • c20af06 fix(Text): downstream tree-shaking & *BufferGeometry deprecation (#1145)
    • a1098f8 fix: update meshline
    • 064fc6e fix: update meshline & three-stdlib
    • 5f6aef7 fix: remove TransformControls events from cleanup (#1171)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.46.4

    Bump @react-three/drei from 9.4.2 to 9.46.4

    Bumps @react-three/drei from 9.4.2 to 9.46.4.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.46.4

    9.46.4 (2022-12-08)

    Bug Fixes

    • update meshline & three-stdlib (064fc6e)

    v9.46.3

    9.46.3 (2022-12-07)

    Bug Fixes

    • remove TransformControls events from cleanup (#1171) (5f6aef7)

    v9.46.2

    9.46.2 (2022-12-04)

    Bug Fixes

    v9.46.1

    9.46.1 (2022-12-03)

    Bug Fixes

    v9.46.0

    9.46.0 (2022-11-30)

    Features

    v9.45.1

    9.45.1 (2022-11-29)

    Bug Fixes

    v9.45.0

    9.45.0 (2022-11-27)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.46.2

    Bump @react-three/drei from 9.4.2 to 9.46.2

    Bumps @react-three/drei from 9.4.2 to 9.46.2.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.46.2

    9.46.2 (2022-12-04)

    Bug Fixes

    v9.46.1

    9.46.1 (2022-12-03)

    Bug Fixes

    v9.46.0

    9.46.0 (2022-11-30)

    Features

    v9.45.1

    9.45.1 (2022-11-29)

    Bug Fixes

    v9.45.0

    9.45.0 (2022-11-27)

    Features

    v9.44.1

    9.44.1 (2022-11-27)

    Bug Fixes

    • remove whitespace from hud (3618102)

    v9.44.0

    9.44.0 (2022-11-27)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.45.0

    Bump @react-three/drei from 9.4.2 to 9.45.0

    Bumps @react-three/drei from 9.4.2 to 9.45.0.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.45.0

    9.45.0 (2022-11-27)

    Features

    v9.44.1

    9.44.1 (2022-11-27)

    Bug Fixes

    • remove whitespace from hud (3618102)

    v9.44.0

    9.44.0 (2022-11-27)

    Features

    v9.43.3

    9.43.3 (2022-11-23)

    Bug Fixes

    v9.43.2

    9.43.2 (2022-11-22)

    Bug Fixes

    • change usetrailtexture to array notation (f0184fd)

    v9.43.1

    9.43.1 (2022-11-22)

    Bug Fixes

    • revert trailtexture constructor (a71356f)
    • trailtexture spread props (5fc8a5e)

    v9.43.0

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.42.2

    Bump @react-three/drei from 9.4.2 to 9.42.2

    Bumps @react-three/drei from 9.4.2 to 9.42.2.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.42.2

    9.42.2 (2022-11-21)

    Bug Fixes

    v9.42.1

    9.42.1 (2022-11-21)

    Bug Fixes

    • stage can configure envmap (2d2d2e8)

    v9.42.0

    9.42.0 (2022-11-21)

    Bug Fixes

    • View component supports non-full screen use cases (#981) (35c3600)

    Features

    v9.41.3

    9.41.3 (2022-11-20)

    Bug Fixes

    • stage offset should be centered (38a231e)

    v9.41.2

    9.41.2 (2022-11-20)

    Bug Fixes

    • stage backward compat, storybook (a6a2663)

    v9.41.1

    9.41.1 (2022-11-20)

    Bug Fixes

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.40.0

    Bump @react-three/drei from 9.4.2 to 9.40.0

    Bumps @react-three/drei from 9.4.2 to 9.40.0.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.40.0

    9.40.0 (2022-10-30)

    Features

    v9.39.0

    9.39.0 (2022-10-29)

    Bug Fixes

    Features

    v9.38.2

    9.38.2 (2022-10-29)

    Bug Fixes

    • change TransformControlsProps mode & space to union type (#1116) (9033468)

    v9.38.1

    9.38.1 (2022-10-28)

    Bug Fixes

    v9.38.0

    9.38.0 (2022-10-28)

    Features

    v9.37.1

    9.37.1 (2022-10-24)

    Bug Fixes

    ... (truncated)

    Commits
    • 74dbf4c feat: add types to keyboard controls (#1118)
    • 294bce1 fix: don't import from three/examples (#1087)
    • 7cae732 docs: correct spelling of <torusKnotGeometry /> in README (#1112)
    • 179b28b fixed typo in ScrollControls readme (#1115)
    • d60c941 feat: add types to keyboard controls (#1117)
    • 9033468 fix: change TransformControlsProps mode & space to union type (#1116)
    • fd90f05 fix: accshadow bg bug
    • 860b192 feat: environment blur
    • e76310f fix: ortho & persp cam need optional envMap, fix text3d segments missing in u...
    • b46d9a1 feat: allow ortho and pers cams to film into fbos
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/fiber from 8.0.11 to 8.9.0

    Bump @react-three/fiber from 8.0.11 to 8.9.0

    Bumps @react-three/fiber from 8.0.11 to 8.9.0.

    Release notes

    Sourced from @​react-three/fiber's releases.

    v8.9.0

    What's Changed

    Re-release of #2481 from v8.7.0, it just didn't get exported.

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.11...v8.9.0

    v8.8.11

    What's Changed

    New Contributors

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.10...v8.8.11

    v8.8.10

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.9...v8.8.10

    v8.8.9

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.8...v8.8.9

    v8.8.8

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.7...v8.8.8

    v8.8.7

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.6...v8.8.7

    v8.8.6

    ... (truncated)

    Commits
    • 2c15e62 RELEASING: Releasing 1 package(s)
    • a458b4d docs(changeset): fix(loop): export flush methods and types
    • 0f5095f fix(loop): export flush methods and types (#2580)
    • ca98ce9 RELEASING: Releasing 1 package(s)
    • 2068f0c docs(changeset): fix: events pointerlock, useLoader extension types
    • 84f567c fix(useLoader): make better use of generics for extensions (#2598)
    • bc1f957 fix(events): sort by distance on undefined roots
    • 51ec316 fix: pointer events and pointer capture (#2600)
    • 87644eb docs(links): Add Threejs Journey link to recommended documentation (#2592)
    • 17ff08f chore(docs): add Vercel prism example
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.37.1

    Bump @react-three/drei from 9.4.2 to 9.37.1

    Bumps @react-three/drei from 9.4.2 to 9.37.1.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.37.1

    9.37.1 (2022-10-24)

    Bug Fixes

    • ortho & persp cam need optional envMap, fix text3d segments missing in usememo deps (e76310f)

    v9.37.0

    9.37.0 (2022-10-23)

    Features

    • allow ortho and pers cams to film into fbos (b46d9a1)

    v9.36.0

    9.36.0 (2022-10-17)

    Features

    v9.35.1

    9.35.1 (2022-10-16)

    Bug Fixes

    • center should be able to disable specific axes (bc78f69)

    v9.35.0

    9.35.0 (2022-10-16)

    Features

    • add enabled prop to PresentationControls (#1096) (c046d08)

    v9.34.4

    9.34.4 (2022-10-13)

    Bug Fixes

    • TransformControls: prefer refcallbacks for handlers (#1095) (d0b21a6)

    v9.34.3

    9.34.3 (2022-10-07)

    ... (truncated)

    Commits
    • e76310f fix: ortho & persp cam need optional envMap, fix text3d segments missing in u...
    • b46d9a1 feat: allow ortho and pers cams to film into fbos
    • 566b703 docs: correct <Mask/>'s children type in README (#1103)
    • 7b7d486 feat: add Svg component (#1091)
    • bc78f69 fix: center should be able to disable specific axes
    • c046d08 feat: add enabled prop to PresentationControls (#1096)
    • cced45e docs: correct spelling of ratio (#1101)
    • bd1c26b chore(deps): bump to x.3
    • 3cfae0c chore(deps): upgrade stdlib (#1100)
    • 4c88f3b chore(docs): typo in README "width" and "foward" (#1097)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.36.0

    Bump @react-three/drei from 9.4.2 to 9.36.0

    Bumps @react-three/drei from 9.4.2 to 9.36.0.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.36.0

    9.36.0 (2022-10-17)

    Features

    v9.35.1

    9.35.1 (2022-10-16)

    Bug Fixes

    • center should be able to disable specific axes (bc78f69)

    v9.35.0

    9.35.0 (2022-10-16)

    Features

    • add enabled prop to PresentationControls (#1096) (c046d08)

    v9.34.4

    9.34.4 (2022-10-13)

    Bug Fixes

    • TransformControls: prefer refcallbacks for handlers (#1095) (d0b21a6)

    v9.34.3

    9.34.3 (2022-10-07)

    Bug Fixes

    v9.34.2

    9.34.2 (2022-10-07)

    Bug Fixes

    v9.34.1

    9.34.1 (2022-10-06)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/fiber from 8.0.11 to 8.8.10

    Bump @react-three/fiber from 8.0.11 to 8.8.10

    Bumps @react-three/fiber from 8.0.11 to 8.8.10.

    Release notes

    Sourced from @​react-three/fiber's releases.

    v8.8.10

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.9...v8.8.10

    v8.8.9

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.8...v8.8.9

    v8.8.8

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.7...v8.8.8

    v8.8.7

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.6...v8.8.7

    v8.8.6

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.5...v8.8.6

    v8.8.5

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.4...v8.8.5

    v8.8.4

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.2...v8.8.4

    v8.8.3

    ... (truncated)

    Commits
    • 4be4421 RELEASING: Releasing 1 package(s)
    • 00c2471 docs(changeset): fix: invalidate pierced props
    • 5d32bc4 chore: upgrade lockfile
    • accff84 fix: invalidate pierced props (#2549)
    • 68abd48 RELEASING: Releasing 1 package(s)
    • 4254400 docs(changeset): fix(createPortal): use correct JSX type
    • 236cc65 fix(createPortal): use correct JSX type (#2550)
    • 4069fe9 RELEASING: Releasing 1 package(s)
    • fcb183e docs(changeset): fix: call onUpdate for attached children prop update
    • bcea072 fix: call onUpdate for attached children prop update (#2548)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/fiber from 8.0.11 to 8.8.9

    Bump @react-three/fiber from 8.0.11 to 8.8.9

    Bumps @react-three/fiber from 8.0.11 to 8.8.9.

    Release notes

    Sourced from @​react-three/fiber's releases.

    v8.8.9

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.8...v8.8.9

    v8.8.8

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.7...v8.8.8

    v8.8.7

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.6...v8.8.7

    v8.8.6

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.5...v8.8.6

    v8.8.5

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.4...v8.8.5

    v8.8.4

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.2...v8.8.4

    v8.8.3

    What's Changed

    • fix: events should fall back to rootstate by @​drcmda in c40f8e49606585b300936db389edbc8c295d1c2a

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.2...v8.8.3

    v8.8.2

    What's Changed

    ... (truncated)

    Commits
    • 68abd48 RELEASING: Releasing 1 package(s)
    • 4254400 docs(changeset): fix(createPortal): use correct JSX type
    • 236cc65 fix(createPortal): use correct JSX type (#2550)
    • 4069fe9 RELEASING: Releasing 1 package(s)
    • fcb183e docs(changeset): fix: call onUpdate for attached children prop update
    • bcea072 fix: call onUpdate for attached children prop update (#2548)
    • 953758d RELEASING: Releasing 1 package(s)
    • bedb16e docs(changeset): fix: prefer named functions, for loops in hot paths
    • 0823585 fix: prefer named functions, for loops in hot paths (#2541)
    • 970f885 RELEASING: Releasing 1 package(s)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Bump @react-three/drei from 9.4.2 to 9.48.1

    Bump @react-three/drei from 9.4.2 to 9.48.1

    Bumps @react-three/drei from 9.4.2 to 9.48.1.

    Release notes

    Sourced from @​react-three/drei's releases.

    v9.48.1

    9.48.1 (2022-12-22)

    Bug Fixes

    v9.48.0

    9.48.0 (2022-12-22)

    Features

    • gltf convenience component (b67bcd6)

    v9.47.1

    9.47.1 (2022-12-17)

    Bug Fixes

    • grid rotation affecting fog in a bad way (937c0c9)

    v9.47.0

    9.47.0 (2022-12-17)

    Features

    v9.46.7

    9.46.7 (2022-12-15)

    Bug Fixes

    • stop all AnimationActions on unmount/mixer change (#1176) (16f1caf)
    • MeshRefractionMaterial: vNormal should be normalized (#1184) (57d95f1)

    v9.46.6

    9.46.6 (2022-12-15)

    Bug Fixes

    • Text: downstream tree-shaking & *BufferGeometry deprecation (#1145) (c20af06)

    v9.46.5

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump @react-three/fiber from 8.0.11 to 8.9.1

    Bump @react-three/fiber from 8.0.11 to 8.9.1

    Bumps @react-three/fiber from 8.0.11 to 8.9.1.

    Release notes

    Sourced from @​react-three/fiber's releases.

    v8.9.1

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.9.0...v8.9.1

    v8.9.0

    What's Changed

    Re-release of #2481 from v8.7.0, it just didn't get exported.

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.11...v8.9.0

    v8.8.11

    What's Changed

    New Contributors

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.10...v8.8.11

    v8.8.10

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.9...v8.8.10

    v8.8.9

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.8...v8.8.9

    v8.8.8

    What's Changed

    Full Changelog: https://github.com/pmndrs/react-three-fiber/compare/v8.8.7...v8.8.8

    v8.8.7

    ... (truncated)

    Commits
    • 684f0cb RELEASING: Releasing 1 package(s)
    • 0cf1179 docs(changeset): fix(events): type spread event props
    • 5debaf2 fix(events): type spread event props (#2608)
    • 2c15e62 RELEASING: Releasing 1 package(s)
    • a458b4d docs(changeset): fix(loop): export flush methods and types
    • 0f5095f fix(loop): export flush methods and types (#2580)
    • ca98ce9 RELEASING: Releasing 1 package(s)
    • 2068f0c docs(changeset): fix: events pointerlock, useLoader extension types
    • 84f567c fix(useLoader): make better use of generics for extensions (#2598)
    • bc1f957 fix(events): sort by distance on undefined roots
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump tslib from 2.3.1 to 2.4.1

    Bump tslib from 2.3.1 to 2.4.1

    Bumps tslib from 2.3.1 to 2.4.1.

    Release notes

    Sourced from tslib's releases.

    tslib 2.4.1

    This release contains fixes for early returns and throws invoked on generators.

    tslib 2.4.0

    This release includes the __classPrivateFieldIn helper as well as an update to __createBinding to reduce indirection between multiple re-exports.

    Commits
    • 8acd4b3 Bump version to 2.4.1.
    • 5f7365e Remove extra line in generator.md
    • b1d38ee Fix early call to return/throw on generator (#186)
    • 4e27e9f Merge pull request #181 from microsoft/users/GitHubPolicyService/201dd6b7-4ca...
    • 7af3973 Microsoft mandatory file
    • 5bfaf87 Merge pull request #172 from microsoft/add-test-vite
    • a7129c7 Update bower.json
    • 5b7da89 Update package.json
    • f541748 Drop node@10 from test matrix, add node@16
    • 8860d61 Add a test for vite
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Multiple input devices cause issues with Keyboard input

    Multiple input devices cause issues with Keyboard input

    Great library! been stress testing it recently and noticed some issues. might be my setup since I'm in React-land, but thought it'd be good to point out since it's reproducible.

    I have an issue where the device keeps competing with gamepad, and when I use a key on keyboard, it doesn’t get picked up until the device is recognized — then I press key again to see input. I also see the gamepad as a “new device” right after my keyboard each time I press a key.

    This only happens after using a gamepad. If start with keyboard, I have no issues. But once there’s 2 input, the keyboard input becomes “lagged” (aka requiring 1 key press to activate again). Every single time though — so I press, it finds device, press again, key works, press again, it has to find device again… Hard refreshing page fixes this until gamepad is used again.

    You can see an example of the logs here in this screenshot: Screenshot of keyboard and gamepad device found logs in Chrome's devtools - sorry if picbun loses this

    Or try running the example here - I'm using a PlayStation DualShock 4 and a standard keyboard: https://codesandbox.io/s/github/whoisryosuke/r3f-experiments/tree/f391624b2a9e1f24e7a78b6751c6e95efb63b5a4

    The code is here on Github for reference (so you don't have to CSB everytime): https://github.com/whoisryosuke/r3f-experiments/tree/f391624b2a9e1f24e7a78b6751c6e95efb63b5a4

    Input stuff happens here: Controller init + input mapping React component for input (aka update()) Using the input for moving the "player"

    opened by whoisryosuke 1
  • Bump react and @types/react

    Bump react and @types/react

    Bumps react and @types/react. These dependencies needed to be updated together. Updates react from 18.0.0 to 18.1.0

    Release notes

    Sourced from react's releases.

    18.1.0 (April 26, 2022)

    React DOM

    React DOM Server

    • Fix escaping for the bootstrapScriptContent contents. (@​gnoff in #24385)
    • Significantly improve performance of renderToPipeableStream. (@​gnoff in #24291)

    ESLint Plugin: React Hooks

    Use Subscription

    • Replace the implementation with the use-sync-external-store shim. (@​gaearon in #24289)
    Changelog

    Sourced from react's changelog.

    18.1.0 (April 26, 2022)

    React DOM

    React DOM Server

    • Fix escaping for the bootstrapScriptContent contents. (@​gnoff in #24385)
    • Significantly improve performance of renderToPipeableStream. (@​gnoff in #24291)

    ESLint Plugin: React Hooks

    Use Subscription

    • Replace the implementation with the use-sync-external-store shim. (@​gaearon in #24289)
    Commits

    Updates @types/react from 18.0.5 to 18.0.12

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
Releases(@hmans/[email protected])
  • @hmans/[email protected](Apr 16, 2022)

    Minor Changes

    • 1daae22: The ControlFreak repository is now a monorepo, giving us some much-needed breathing room for a small demo app and the usual goodness of preconstruct dev. :D

    • c8df83d: Breaking Change: Controllers now provide addDevice and removeDevice functions, and devices need to be explicitly instantiated and added to controllers:

      export const controller = new Controller()
      
      const keyboard = new KeyboardDevice()
      const gamepad = new GamepadDevice()
      
      controller.addDevice(keyboard)
      controller.addDevice(gamepad)
      
    • 1c1d119: The Keyboard device's isPressed function now optionally accepts an array of keys to check. This allows step implementations for keyboard controls to support more than a single key per axis/input. For example:

      controller
        .addControl("move", VectorControl)
        .addStep(
          keyboard.compositeVector(
            ["KeyW", "ArrowUp"],
            ["KeyS", "ArrowDown"],
            ["KeyA", "ArrowLeft"],
            ["KeyD", "ArrowRight"]
          )
        )
      
      controller
        .addControl("fire", BooleanControl)
        .addStep(keyboard.whenKeyPressed(["Space", "Enter"]))
      
    • 7b5e0ca: Breaking Change: all keyboard input now uses key codes, not key names. Please refer to this list of supported values.

    • d2cfa41: Finally, we have changesets and a changelog!

    • c8df83d: Breaking Change: All of the device-specific steps have been moved into instance methods on devices themselves, and a processors object has been introduced to group processor-style steps:

      const keyboard = new KeyboardDevice()
      const gamepad = new GamepadDevice()
      
      controller.addDevice(keyboard)
      controller.addDevice(gamepad)
      
      controller
        .addControl("move", VectorControl)
        .addStep(keyboard.compositeVector("KeyW", "KeyS", "KeyA", "KeyD"))
        .addStep(gamepad.axisVector(0, 1))
        .addStep(processors.clampVector(1))
      
    • c8df83d: This library now uses @hmans/signal for signals instead of its own implementation.

    Patch Changes

    • 0d81906: The Vector type has been changed to an IVector2 interface, and some basic vector math functions have been implemented within this package. They are designed to be compatible with instances of the Vector2 class exported by Three.js (ie. x and y properties, and mutating values to not create new objects.)

    • c8df83d: Controllers now provide an onDeviceChange signal that emits whenever the currently active device changes. This can be used to, for example, display input method-specific UI.

      controller.onDeviceChange.add((d) => console.log("new device:", d))
      
    • e15ed5d: New processor: deadzone. Applies a deadzone to a VectorControl.

      controller
        .addControl("move", VectorControl)
        .addStep(gamepad.axisVector(0, 1))
        .addStep(processors.clampVector(1))
        .addStep(processors.deadzone(0.15))
      
    Source code(tar.gz)
    Source code(zip)
Owner
Hendrik Mans
THE WIZARD MUST BE STOPPED.
Hendrik Mans
WordleGameCB - a game inspired by the Wordle word game developed by Josh Wardle

Technologies WordleGameCB WordleGameCB is a game inspired by the Wordle word game developed by Josh Wardle. This application was developed with the ai

@Encoding 4 Feb 20, 2022
A lightweight 3D game engine for the web.

A lightweight 3D game engine for the web. Built with three.js and cannon-es.

null 667 Dec 31, 2022
🏎 Open source racing game developed by everyone willing

?? Open source racing game developed by everyone willing

Poimandres 2k Dec 26, 2022
LittleJS Logo LittleJS - The Tiny JavaScript Game Engine That Can

The Tiny JavaScript Game Engine That Can! ??

Frank Force 2.4k Dec 31, 2022
Golf it! is a game designed to let you show off your code-fu by solving problems

Golf it! Golf it! is a game designed to let you show off your code-fu by solving problems in the least number of characters ✨ Explore the docs » View

Ashikka Gupta 5 Aug 18, 2022
🎮 Excalibur is a free game engine written in TypeScript for making 2D games in HTML5 canvas

?? An easy to use 2D HTML5 game engine written in TypeScript

Excalibur.js 1.3k Dec 30, 2022
Pig is a simple two player dice game.

Pig game Pig is a simple two player dice game. Play here: formidablae.github.io/pig_game or formaidablae-pig-game.netlify.app Each turn, a player repe

null 10 Oct 5, 2022
Quizpetitive - A quiz game to learn new knowledge and terms in the field of project management.

Quizpetitive A quiz game to learn new knowledge and terms in the field of project management. The key element to the success of this project was the c

LMF 1 May 16, 2022
Bitburner Game

Bitburner Bitburner is a programming-based incremental game that revolves around hacking and cyberpunk themes. The game can be played at https://danie

null 2.6k Dec 30, 2022
A clone of the popular Wordle game.

Wordle Clone How to play locally: yarn install

null 2 Jan 9, 2022
A clone of the popular game Wordle made using React, Typescript, and Tailwind

Wordle Clone Go play the real Wordle here Read the story behind it here Try a demo of this clone project here Inspiration: This game is an open source

Hannah Park 2.4k Jan 8, 2023
🎩 2048 game is cloned with ReactJS, CSS3.

2048-react This is a clone of 2048 implemented using React. It's running live here. The game logic is implemented in ./src/components/mainBoard.jsx. I

Arham 7 Jul 31, 2022
A tiny game to practice AoE building shortcuts.

Aegis A tiny game to practice Age of Empires IV building shortcuts. Using ⚛️ Create-React-App and ?? Zustand. License With the exception of all visual

Alexander Widua 30 Jan 1, 2023
Provides 5 keywords with which to narrow down your wordle game. I ruin nice things.

Widdle?? I hate fun so I wrote a script that ruins Wordle. This script can be used to find a Widdle, a set of five words that cover nearly all letters

Tess Myers 3 Mar 12, 2022
WORDLEBOARD prototype: Show your Wordle game on a Vestaboard as you play.

WORDLEBOARD prototype Show your Wordle game on a Vestaboard as you play. Copyright (c) 2022, Scott Schiller. MIT license. Made with love and fun in mi

Scott Schiller 7 Dec 20, 2022
Snake game using pure HTML, CSS and JavaScript with GameBoy look and feel using Nano editor

Snake game using pure HTML, CSS and JavaScript with GameBoy look and feel using Nano editor. 100% commented code in Portuguese

Gabriel Martins 2 Jul 2, 2022
EarthDefender is a simple personal project JS game

EarthDefender is a simple personal project JS game, the goal of it is to stop the meteors from hitting Earth.

Svetoslav Zhekov 2 Jan 25, 2022
A Wordle-like game where you have to guess the unsigned 8-bit binary number

Bytle A Wordle-like game where you have to guess the unsigned 8-bit binary number! Game coded in 2h 14m 50.570s, but it's not like I'm counting how lo

James Livesey 16 Jun 30, 2022
Raid menu for the online game gartic.io

Gartic.io Raid Tools Raid menu for the online game gartic.io Written by Eld3rly Installation

Alexey 10 Sep 8, 2022