├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .husky └── pre-commit ├── .npmignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── assets ├── clips │ ├── acknowledge.fbx │ ├── agony.fbx │ ├── air squat.fbx │ ├── back squat.fbx │ ├── backflip.fbx │ ├── bashful.fbx │ ├── bboy brooklyn step.fbx │ ├── bboy finish.fbx │ ├── bboy flair.fbx │ ├── bboy footwork.fbx │ ├── bboy freeze combo.fbx │ ├── bboy handstand freeze.fbx │ ├── bboy handstand spin.fbx │ ├── bboy head spin.fbx │ ├── bboy indian step.fbx │ ├── bellydance.fbx │ ├── bicep curl.fbx │ ├── blow a kiss.fbx │ ├── boogaloo.fbx │ ├── bored.fbx │ ├── burpee.fbx │ ├── cabbage patch dance.fbx │ ├── capoeira.fbx │ ├── cartwheel.fbx │ ├── check phone.fbx │ ├── cheer.fbx │ ├── chicken dance.fbx │ ├── circle crunch.fbx │ ├── clap.fbx │ ├── climb rope.fbx │ ├── cocky.fbx │ ├── conjure magic.fbx │ ├── convulse.fbx │ ├── count.fbx │ ├── cpr.fbx │ ├── crawl.fbx │ ├── crazy.fbx │ ├── cry.fbx │ ├── cut throat.fbx │ ├── die.fbx │ ├── drink.fbx │ ├── drunk.fbx │ ├── ecstatic.fbx │ ├── electrocuted.fbx │ ├── fishing.fbx │ ├── float.fbx │ ├── fly.fbx │ ├── gesture.fbx │ ├── hurricane kick.fbx │ ├── jump.fbx │ ├── k-pop dance.fbx │ ├── kneel.fbx │ ├── look off.fbx │ ├── loser.fbx │ ├── maraschino.fbx │ ├── milk a cow.fbx │ ├── no.fbx │ ├── pain.fbx │ ├── plank.fbx │ ├── point.fbx │ ├── pray.fbx │ ├── push up.fbx │ ├── raise hand.fbx │ ├── rap.fbx │ ├── rumba dance.fbx │ ├── run look behind.fbx │ ├── run.fbx │ ├── salsa dance.fbx │ ├── salute.fbx │ ├── search pockets.fbx │ ├── seizure.fbx │ ├── shake fist.fbx │ ├── shrug.fbx │ ├── sing.fbx │ ├── situp.fbx │ ├── skateboard.fbx │ ├── sleep.fbx │ ├── smh.fbx │ ├── stretch neck.fbx │ ├── t-pose.fbx │ ├── teeter.fbx │ ├── tell secret.fbx │ ├── thankful.fbx │ ├── think.fbx │ ├── twerk.fbx │ ├── twist dance.fbx │ ├── typing.fbx │ ├── victory.fbx │ ├── walk and text.fbx │ ├── walk sad.fbx │ ├── walk swag.fbx │ ├── walk.fbx │ ├── yell.fbx │ └── ymca dance.fbx └── models │ ├── Manny_3.0.0.fbx │ └── manny_body_texture.jpg ├── dist ├── manny.d.ts └── manny.js ├── example ├── .gitignore ├── README.md ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.css │ ├── App.js │ ├── index.css │ ├── index.js │ └── logo.svg └── yarn.lock ├── package.json ├── rollup.config.mjs ├── src ├── constants.ts ├── fixtures │ └── animations.ts ├── hooks │ ├── index.ts │ ├── useAnimations.ts │ └── useManny.ts └── index.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | example/ 3 | node_modules/ 4 | assets/ -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | }, 5 | plugins: ["prettier"], 6 | extends: [ 7 | "plugin:@typescript-eslint/recommended", 8 | "prettier", 9 | "plugin:prettier/recommended", 10 | ], 11 | rules: { 12 | "prettier/prettier": [ 13 | "error", 14 | { 15 | singleQuote: true, 16 | "comma-dangle": ["error", "always-multiline"], 17 | }, 18 | { 19 | usePrettierrc: true, 20 | }, 21 | ], 22 | "import/extensions": [ 23 | "error", 24 | "ignorePackages", 25 | { 26 | js: "never", 27 | jsx: "never", 28 | ts: "never", 29 | tsx: "never", 30 | }, 31 | ], 32 | "@typescript-eslint/no-namespace": [ 33 | "error", 34 | { 35 | allowDeclarations: true, 36 | }, 37 | ], 38 | "import/prefer-default-export": "off", 39 | "import/no-dynamic-require": "off", 40 | "import/extensions": "off", 41 | "implicit-arrow-linebreak": "off", 42 | "function-paren-newline": "off", 43 | "operator-linebreak": "off", 44 | camelcase: "off", 45 | "max-classes-per-file": "off", 46 | "consistent-return": "off", 47 | "global-require": "off", 48 | "react/prop-types": "off", 49 | "lines-between-class-members": "off", 50 | "jsx-a11y/click-events-have-key-events": "off", 51 | "jsx-a11y/no-static-element-interactions": "off", 52 | "jsx-a11y/label-has-associated-control": "off", 53 | "react/jsx-one-expression-per-line": "off", 54 | "react/jsx-filename-extension": "off", 55 | "react/jsx-props-no-spreading": "off", 56 | "react/destructuring-assignment": "off", 57 | "react/no-access-state-in-setstate": "off", 58 | "react/button-has-type": "off", 59 | "react/no-unescaped-entities": "off", 60 | "react/react-in-jsx-scope": "off", 61 | "react/no-unknown-property": "off", 62 | "react/require-default-props": "off", 63 | "object-curly-newline": "off", 64 | "prefer-destructuring": "off", 65 | "dot-notation": "off", 66 | "max-len": "off", 67 | "no-plusplus": "off", 68 | "linebreak-style": "off", 69 | "no-underscore-dangle": "off", 70 | "class-methods-use-this": "off", 71 | quotes: "off", 72 | indent: "off", 73 | "no-shadow": "off", 74 | "arrow-parens": "off", 75 | "no-param-reassign": "off", 76 | "no-await-in-loop": "off", 77 | "quote-props": "off", 78 | "comma-dangle": "off", 79 | "prefer-template": "off", 80 | "no-console": "off", 81 | "no-alert": "off", 82 | }, 83 | settings: { 84 | "import/resolver": { 85 | node: { 86 | paths: ["./"], 87 | }, 88 | }, 89 | }, 90 | }; 91 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # Compiled binary addons (http://nodejs.org/api/addons.html) 20 | build/Release 21 | 22 | # Dependency directory 23 | # Commenting this out is preferred by some people, see 24 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- 25 | node_modules 26 | 27 | # Users Environment Variables 28 | .lock-wscript 29 | .DS_Store 30 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | yarn lint -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | assets/clips/ 2 | example/ 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | example/ 3 | node_modules/ 4 | assets/ 5 | .github -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "auto", 3 | "trailingComma": "es5", 4 | "singleQuote": true, 5 | "printWidth": 80, 6 | "useTabs": false, 7 | "tabWidth": 2, 8 | "semi": true, 9 | "bracketSpacing": true, 10 | "importOrder": [ 11 | "^react*", 12 | "", 13 | "components", 14 | "fixtures", 15 | "hooks", 16 | "utils", 17 | "views", 18 | "^@*$", 19 | "^[./]" 20 | ], 21 | "importOrderSeparation": false, 22 | "importOrderSortSpecifiers": true 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHATEVER YOU WANT BUT DON'T BE A FUCKING JERK PUBLIC LICENSE 2 | Version 1, NOVEMBER 2018 3 | 4 | LICENSE COPYRIGHT: 5 | Copyright (C) 2018 Manuel Palou manny@art404.com 6 | 7 | Everyone is permitted to copy and distribute verbatim or modified 8 | copies of this license document, and changing it is allowed as long 9 | as the name is changed. 10 | 11 | CONTENT COPYRIGHT: 12 | DO WHATEVER YOU WANT BUT DON'T BE A FUCKING JERK PUBLIC LICENSE 13 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 14 | 15 | 0. Do whatever you want, just so long as it isn't: 16 | A. An expression of hatred, hate speech, slander, libel, violence of any kind 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Manny 2 | 3 | Import the @mannynotfound model into your `@react-three/fiber` app. 4 | 5 | Live Demo: [https://mannys.game/download](https://mannys.game/download) 6 | 7 | ## Documentation 8 | 9 | For full documentation and examples, visit [mannys.game/docs/manny](https://mannys.game/docs/manny). 10 | 11 | ## Running Locally 12 | 13 | ```bash 14 | npm run dev 15 | ``` 16 | 17 | Go to `localhost:3000` to see the local test application. 18 | -------------------------------------------------------------------------------- /assets/clips/acknowledge.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/acknowledge.fbx -------------------------------------------------------------------------------- /assets/clips/agony.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/agony.fbx -------------------------------------------------------------------------------- /assets/clips/air squat.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/air squat.fbx -------------------------------------------------------------------------------- /assets/clips/back squat.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/back squat.fbx -------------------------------------------------------------------------------- /assets/clips/backflip.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/backflip.fbx -------------------------------------------------------------------------------- /assets/clips/bashful.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bashful.fbx -------------------------------------------------------------------------------- /assets/clips/bboy brooklyn step.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy brooklyn step.fbx -------------------------------------------------------------------------------- /assets/clips/bboy finish.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy finish.fbx -------------------------------------------------------------------------------- /assets/clips/bboy flair.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy flair.fbx -------------------------------------------------------------------------------- /assets/clips/bboy footwork.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy footwork.fbx -------------------------------------------------------------------------------- /assets/clips/bboy freeze combo.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy freeze combo.fbx -------------------------------------------------------------------------------- /assets/clips/bboy handstand freeze.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy handstand freeze.fbx -------------------------------------------------------------------------------- /assets/clips/bboy handstand spin.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy handstand spin.fbx -------------------------------------------------------------------------------- /assets/clips/bboy head spin.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy head spin.fbx -------------------------------------------------------------------------------- /assets/clips/bboy indian step.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bboy indian step.fbx -------------------------------------------------------------------------------- /assets/clips/bellydance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bellydance.fbx -------------------------------------------------------------------------------- /assets/clips/bicep curl.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bicep curl.fbx -------------------------------------------------------------------------------- /assets/clips/blow a kiss.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/blow a kiss.fbx -------------------------------------------------------------------------------- /assets/clips/boogaloo.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/boogaloo.fbx -------------------------------------------------------------------------------- /assets/clips/bored.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/bored.fbx -------------------------------------------------------------------------------- /assets/clips/burpee.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/burpee.fbx -------------------------------------------------------------------------------- /assets/clips/cabbage patch dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cabbage patch dance.fbx -------------------------------------------------------------------------------- /assets/clips/capoeira.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/capoeira.fbx -------------------------------------------------------------------------------- /assets/clips/cartwheel.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cartwheel.fbx -------------------------------------------------------------------------------- /assets/clips/check phone.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/check phone.fbx -------------------------------------------------------------------------------- /assets/clips/cheer.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cheer.fbx -------------------------------------------------------------------------------- /assets/clips/chicken dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/chicken dance.fbx -------------------------------------------------------------------------------- /assets/clips/circle crunch.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/circle crunch.fbx -------------------------------------------------------------------------------- /assets/clips/clap.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/clap.fbx -------------------------------------------------------------------------------- /assets/clips/climb rope.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/climb rope.fbx -------------------------------------------------------------------------------- /assets/clips/cocky.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cocky.fbx -------------------------------------------------------------------------------- /assets/clips/conjure magic.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/conjure magic.fbx -------------------------------------------------------------------------------- /assets/clips/convulse.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/convulse.fbx -------------------------------------------------------------------------------- /assets/clips/count.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/count.fbx -------------------------------------------------------------------------------- /assets/clips/cpr.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cpr.fbx -------------------------------------------------------------------------------- /assets/clips/crawl.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/crawl.fbx -------------------------------------------------------------------------------- /assets/clips/crazy.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/crazy.fbx -------------------------------------------------------------------------------- /assets/clips/cry.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cry.fbx -------------------------------------------------------------------------------- /assets/clips/cut throat.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/cut throat.fbx -------------------------------------------------------------------------------- /assets/clips/die.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/die.fbx -------------------------------------------------------------------------------- /assets/clips/drink.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/drink.fbx -------------------------------------------------------------------------------- /assets/clips/drunk.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/drunk.fbx -------------------------------------------------------------------------------- /assets/clips/ecstatic.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/ecstatic.fbx -------------------------------------------------------------------------------- /assets/clips/electrocuted.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/electrocuted.fbx -------------------------------------------------------------------------------- /assets/clips/fishing.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/fishing.fbx -------------------------------------------------------------------------------- /assets/clips/float.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/float.fbx -------------------------------------------------------------------------------- /assets/clips/fly.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/fly.fbx -------------------------------------------------------------------------------- /assets/clips/gesture.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/gesture.fbx -------------------------------------------------------------------------------- /assets/clips/hurricane kick.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/hurricane kick.fbx -------------------------------------------------------------------------------- /assets/clips/jump.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/jump.fbx -------------------------------------------------------------------------------- /assets/clips/k-pop dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/k-pop dance.fbx -------------------------------------------------------------------------------- /assets/clips/kneel.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/kneel.fbx -------------------------------------------------------------------------------- /assets/clips/look off.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/look off.fbx -------------------------------------------------------------------------------- /assets/clips/loser.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/loser.fbx -------------------------------------------------------------------------------- /assets/clips/maraschino.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/maraschino.fbx -------------------------------------------------------------------------------- /assets/clips/milk a cow.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/milk a cow.fbx -------------------------------------------------------------------------------- /assets/clips/no.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/no.fbx -------------------------------------------------------------------------------- /assets/clips/pain.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/pain.fbx -------------------------------------------------------------------------------- /assets/clips/plank.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/plank.fbx -------------------------------------------------------------------------------- /assets/clips/point.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/point.fbx -------------------------------------------------------------------------------- /assets/clips/pray.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/pray.fbx -------------------------------------------------------------------------------- /assets/clips/push up.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/push up.fbx -------------------------------------------------------------------------------- /assets/clips/raise hand.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/raise hand.fbx -------------------------------------------------------------------------------- /assets/clips/rap.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/rap.fbx -------------------------------------------------------------------------------- /assets/clips/rumba dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/rumba dance.fbx -------------------------------------------------------------------------------- /assets/clips/run look behind.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/run look behind.fbx -------------------------------------------------------------------------------- /assets/clips/run.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/run.fbx -------------------------------------------------------------------------------- /assets/clips/salsa dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/salsa dance.fbx -------------------------------------------------------------------------------- /assets/clips/salute.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/salute.fbx -------------------------------------------------------------------------------- /assets/clips/search pockets.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/search pockets.fbx -------------------------------------------------------------------------------- /assets/clips/seizure.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/seizure.fbx -------------------------------------------------------------------------------- /assets/clips/shake fist.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/shake fist.fbx -------------------------------------------------------------------------------- /assets/clips/shrug.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/shrug.fbx -------------------------------------------------------------------------------- /assets/clips/sing.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/sing.fbx -------------------------------------------------------------------------------- /assets/clips/situp.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/situp.fbx -------------------------------------------------------------------------------- /assets/clips/skateboard.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/skateboard.fbx -------------------------------------------------------------------------------- /assets/clips/sleep.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/sleep.fbx -------------------------------------------------------------------------------- /assets/clips/smh.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/smh.fbx -------------------------------------------------------------------------------- /assets/clips/stretch neck.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/stretch neck.fbx -------------------------------------------------------------------------------- /assets/clips/t-pose.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/t-pose.fbx -------------------------------------------------------------------------------- /assets/clips/teeter.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/teeter.fbx -------------------------------------------------------------------------------- /assets/clips/tell secret.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/tell secret.fbx -------------------------------------------------------------------------------- /assets/clips/thankful.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/thankful.fbx -------------------------------------------------------------------------------- /assets/clips/think.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/think.fbx -------------------------------------------------------------------------------- /assets/clips/twerk.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/twerk.fbx -------------------------------------------------------------------------------- /assets/clips/twist dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/twist dance.fbx -------------------------------------------------------------------------------- /assets/clips/typing.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/typing.fbx -------------------------------------------------------------------------------- /assets/clips/victory.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/victory.fbx -------------------------------------------------------------------------------- /assets/clips/walk and text.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/walk and text.fbx -------------------------------------------------------------------------------- /assets/clips/walk sad.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/walk sad.fbx -------------------------------------------------------------------------------- /assets/clips/walk swag.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/walk swag.fbx -------------------------------------------------------------------------------- /assets/clips/walk.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/walk.fbx -------------------------------------------------------------------------------- /assets/clips/yell.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/yell.fbx -------------------------------------------------------------------------------- /assets/clips/ymca dance.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/clips/ymca dance.fbx -------------------------------------------------------------------------------- /assets/models/Manny_3.0.0.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/models/Manny_3.0.0.fbx -------------------------------------------------------------------------------- /assets/models/manny_body_texture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/assets/models/manny_body_texture.jpg -------------------------------------------------------------------------------- /dist/manny.d.ts: -------------------------------------------------------------------------------- 1 | import { Object3D, AnimationAction, AnimationMixer } from 'three'; 2 | 3 | type DefaultAnimations = 'idle' | 'acknowledge' | 'agony' | 'backflip' | 'bashful' | 'bboy brooklyn step' | 'bboy freeze' | 'bboy flair' | 'bboy hand freeze' | 'bboy hand spin' | 'blowing kiss' | 'boogaloo' | 'bored' | 'burpee' | 'capoeira' | 'check phone' | 'cheer' | 'clap' | 'cocky' | 'convulse' | 'count' | 'cry' | 'cut throat' | 'dance bellydance' | 'dance gangam style' | 'dance chicken' | 'dance cabbage patch' | 'dance maraschino' | 'dance rumba' | 'dance salsa' | 'dance twerk' | 'dance twist' | 'dance ymca' | 'die' | 'drunk' | 'ecstatic' | 'electrocuted' | 'float' | 'fly' | 'hurricane kick' | 'jump' | 'kneel' | 'look off' | 'loser' | 'no' | 'pain' | 'plank' | 'point' | 'pray' | 'push up' | 'raise hand' | 'rap' | 'run' | 'salute' | 'seizure' | 'shake fist' | 'shrug' | 'sing' | 'sit up' | 'sleep' | 'smh' | 'stretch neck' | 't-pose' | 'teeter' | 'thankful' | 'think' | 'typing' | 'victory' | 'waving' | 'walk sad' | 'walk swag' | 'yell'; 4 | interface Animation { 5 | url: string; 6 | async?: boolean; 7 | } 8 | type AnimationLibrary = Record; 9 | type DefaultLibrary = Record; 10 | 11 | interface BaseProps { 12 | modelPath?: string; 13 | textureUrl?: string; 14 | } 15 | interface AnimationProps extends BaseProps { 16 | paused?: boolean; 17 | clamp?: boolean; 18 | } 19 | interface DefaultAnimationProps extends AnimationProps { 20 | animation: keyof DefaultLibrary; 21 | } 22 | interface Props extends AnimationProps { 23 | animation: Extract; 24 | library: T; 25 | } 26 | type MannyReturn = { 27 | manny: Object3D; 28 | actions: Record | undefined; 29 | mixer: AnimationMixer; 30 | }; 31 | declare function Manny(): MannyReturn; 32 | declare function Manny(args: BaseProps): MannyReturn; 33 | declare function Manny(args: DefaultAnimationProps): MannyReturn; 34 | declare function Manny(props: Props): MannyReturn; 35 | 36 | declare const animations: string[]; 37 | 38 | export { animations, Manny as default }; 39 | -------------------------------------------------------------------------------- /dist/manny.js: -------------------------------------------------------------------------------- 1 | import { useMemo, useState, useEffect } from 'react'; 2 | import { useFBX, useTexture } from '@react-three/drei'; 3 | import { sRGBEncoding, MeshPhongMaterial, Color, AnimationMixer } from 'three'; 4 | import { clone } from 'three/examples/jsm/utils/SkeletonUtils.js'; 5 | import { useFrame } from '@react-three/fiber'; 6 | import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader'; 7 | import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'; 8 | 9 | const HOST = "https://d2tm2f4d5v0kas.cloudfront.net"; 10 | const MANNY_MODEL = `${HOST}/Manny_3.0.0.fbx`; 11 | const MANNY_TEXTURE = `${HOST}/3.0/manny_body_texture.jpg`; 12 | const CLIPS_HOST = `${HOST}/clips`; 13 | 14 | const makeAnim = (fileName, async = true) => ({ 15 | url: `${CLIPS_HOST}/${fileName}.fbx`, 16 | async 17 | }); 18 | const DEFAULT_LIBRARY = { 19 | idle: makeAnim("idle_stand", false), 20 | waving: makeAnim("waving"), 21 | thankful: makeAnim("thankful"), 22 | bashful: makeAnim("bashful"), 23 | victory: makeAnim("victory"), 24 | acknowledge: makeAnim("acknowledge"), 25 | agony: makeAnim("agony"), 26 | backflip: makeAnim("backflip"), 27 | "bboy brooklyn step": makeAnim("bboy brooklyn step"), 28 | "bboy flair": makeAnim("bboy flair"), 29 | "bboy freeze": makeAnim("bboy finish"), 30 | "bboy hand freeze": makeAnim("bboy handstand freeze"), 31 | "bboy hand spin": makeAnim("bboy handstand spin"), 32 | "blowing kiss": makeAnim("blow a kiss"), 33 | boogaloo: makeAnim("boogaloo"), 34 | bored: makeAnim("bored"), 35 | burpee: makeAnim("burpee"), 36 | capoeira: makeAnim("capoeira"), 37 | "check phone": makeAnim("check phone"), 38 | cheer: makeAnim("cheer"), 39 | clap: makeAnim("clap"), 40 | cocky: makeAnim("cocky"), 41 | convulse: makeAnim("convulse"), 42 | count: makeAnim("count"), 43 | cry: makeAnim("cry"), 44 | "cut throat": makeAnim("cut throat"), 45 | "dance bellydance": makeAnim("bellydance"), 46 | "dance gangam style": makeAnim("k-pop dance"), 47 | "dance chicken": makeAnim("chicken dance"), 48 | "dance cabbage patch": makeAnim("cabbage patch dance"), 49 | "dance maraschino": makeAnim("maraschino"), 50 | "dance rumba": makeAnim("rumba dance"), 51 | "dance salsa": makeAnim("salsa dance"), 52 | "dance twerk": makeAnim("twerk"), 53 | "dance twist": makeAnim("twist dance"), 54 | "dance ymca": makeAnim("ymca dance"), 55 | die: makeAnim("die"), 56 | drunk: makeAnim("drunk"), 57 | ecstatic: makeAnim("ecstatic"), 58 | electrocuted: makeAnim("electrocuted"), 59 | float: makeAnim("float"), 60 | fly: makeAnim("fly"), 61 | "hurricane kick": makeAnim("hurricane kick"), 62 | jump: makeAnim("jump"), 63 | kneel: makeAnim("kneel"), 64 | "look off": makeAnim("look off"), 65 | loser: makeAnim("loser"), 66 | no: makeAnim("no"), 67 | pain: makeAnim("pain"), 68 | plank: makeAnim("plank"), 69 | point: makeAnim("point"), 70 | pray: makeAnim("pray"), 71 | "push up": makeAnim("push up"), 72 | "raise hand": makeAnim("raise hand"), 73 | rap: makeAnim("rap"), 74 | run: makeAnim("run"), 75 | salute: makeAnim("salute"), 76 | seizure: makeAnim("seizure"), 77 | "shake fist": makeAnim("shake fist"), 78 | shrug: makeAnim("shrug"), 79 | sing: makeAnim("sing"), 80 | "sit up": makeAnim("situp"), 81 | sleep: makeAnim("sleep"), 82 | smh: makeAnim("smh"), 83 | "stretch neck": makeAnim("stretch neck"), 84 | "t-pose": makeAnim("t-pose"), 85 | teeter: makeAnim("teeter"), 86 | think: makeAnim("think"), 87 | typing: makeAnim("typing"), 88 | "walk sad": makeAnim("walk sad"), 89 | "walk swag": makeAnim("walk swag"), 90 | yell: makeAnim("yell") 91 | }; 92 | 93 | function useManny(modelPath, textureUrl) { 94 | const fbx = useFBX(modelPath); 95 | const texture = useTexture(textureUrl); 96 | texture.encoding = sRGBEncoding; 97 | const manny = useMemo(() => { 98 | const fbxClone = clone(fbx); 99 | fbxClone.name = `manny-${textureUrl}`; 100 | const mannySkin = new MeshPhongMaterial({ 101 | map: texture, 102 | specular: new Color(0, 0, 0) 103 | }); 104 | fbxClone.traverse((child) => { 105 | if (child.isMesh) { 106 | child.material = mannySkin; 107 | } 108 | }); 109 | const eyes = fbxClone.getObjectByName("Eyes"); 110 | if (eyes !== void 0) 111 | eyes.frustumCulled = false; 112 | return fbxClone; 113 | }, [texture]); 114 | return manny; 115 | } 116 | 117 | function useAnimations(targetObj, animation, animationLibrary) { 118 | const library = { 119 | ...DEFAULT_LIBRARY, 120 | ...animationLibrary 121 | }; 122 | const [animCache, setAnimCache] = useState(); 123 | const mixer = useMemo(() => new AnimationMixer(targetObj), [targetObj]); 124 | const actions = useMemo(() => { 125 | if (animCache === void 0) { 126 | return void 0; 127 | } 128 | return Object.fromEntries( 129 | Object.entries(animCache).map(([name, clip]) => [ 130 | name, 131 | mixer.clipAction(clip) 132 | ]) 133 | ); 134 | }, [animCache]); 135 | useEffect(() => { 136 | Object.entries(library).forEach(([animName, { url, async }]) => { 137 | const alreadyLoaded = animCache?.[animName] !== void 0; 138 | const notReady = async === true && animation !== animName; 139 | if (alreadyLoaded || notReady) { 140 | return; 141 | } 142 | const loader = url.endsWith(".fbx") ? new FBXLoader() : new GLTFLoader(); 143 | loader.load(url, (animModel) => { 144 | const clips = animModel.animations; 145 | setAnimCache((prev) => ({ 146 | ...prev, 147 | [animName]: clips[0] 148 | })); 149 | }); 150 | }); 151 | }, [animation, library]); 152 | useFrame((_, delta) => { 153 | mixer.update(delta); 154 | }); 155 | return { 156 | actions, 157 | mixer 158 | }; 159 | } 160 | 161 | function Manny(props = {}) { 162 | const { 163 | modelPath = MANNY_MODEL, 164 | textureUrl = MANNY_TEXTURE, 165 | animation, 166 | clamp = false, 167 | paused = false, 168 | library 169 | } = props ?? {}; 170 | const mannyObj = useManny(modelPath, textureUrl); 171 | const { actions, mixer } = useAnimations(mannyObj, animation, library); 172 | const aKey = animation ?? ""; 173 | const activeAnim = actions?.[aKey]; 174 | useEffect(() => { 175 | if (activeAnim !== void 0) { 176 | activeAnim.reset().fadeIn(0.2).play(); 177 | } 178 | return () => { 179 | if (activeAnim !== void 0) { 180 | activeAnim.fadeOut(0.2); 181 | } 182 | }; 183 | }, [activeAnim]); 184 | useEffect(() => { 185 | if (activeAnim !== void 0) { 186 | activeAnim.paused = paused; 187 | } 188 | }, [activeAnim, paused]); 189 | useEffect(() => { 190 | if (activeAnim !== void 0) { 191 | const loop = clamp ? 2200 : 2201; 192 | const repetitions = clamp ? 0 : Infinity; 193 | activeAnim.setLoop(loop, repetitions); 194 | activeAnim.clampWhenFinished = clamp; 195 | } 196 | }, [activeAnim, clamp]); 197 | return { 198 | manny: mannyObj, 199 | actions, 200 | mixer 201 | }; 202 | } 203 | const animations = Object.keys(DEFAULT_LIBRARY); 204 | 205 | export { animations, Manny as default }; 206 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@react-three/drei": "8.7.3", 7 | "@react-three/fiber": "7.0.26", 8 | "manny": "file:../", 9 | "react": "^18.2.0", 10 | "react-dom": "^18.2.0", 11 | "react-scripts": "5.0.1", 12 | "react-select": "^5.7.2", 13 | "three": "^0.143.0", 14 | "web-vitals": "^2.1.4" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject", 21 | "//": "without this app wont share the same fiber context ¯\\_(ツ)_/¯", 22 | "postinstall": "rm -rf node_modules/manny/node_modules" 23 | }, 24 | "eslintConfig": { 25 | "extends": [ 26 | "react-app", 27 | "react-app/jest" 28 | ] 29 | }, 30 | "browserslist": { 31 | "production": [ 32 | ">0.2%", 33 | "not dead", 34 | "not op_mini all" 35 | ], 36 | "development": [ 37 | "last 1 chrome version", 38 | "last 1 firefox version", 39 | "last 1 safari version" 40 | ] 41 | }, 42 | "devDependencies": {} 43 | } 44 | -------------------------------------------------------------------------------- /example/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/example/public/favicon.ico -------------------------------------------------------------------------------- /example/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /example/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/example/public/logo192.png -------------------------------------------------------------------------------- /example/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mannynotfound/manny/60fc974e0e00927ea56c62640919aa00d56f39c9/example/public/logo512.png -------------------------------------------------------------------------------- /example/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /example/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /example/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | height: 100vh; 3 | width: 100%; 4 | } 5 | 6 | footer { 7 | position: fixed; 8 | bottom: 40px; 9 | left: 0; 10 | width: 100%; 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | } -------------------------------------------------------------------------------- /example/src/App.js: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | import React, { Suspense, useState } from "react"; 3 | import Select from 'react-select'; 4 | import { Canvas } from "@react-three/fiber"; 5 | import { OrbitControls } from "@react-three/drei"; 6 | import manny, { animations } from "manny"; 7 | 8 | function Manny({ animation }) { 9 | const mannyObj = manny({ 10 | animation, 11 | }); 12 | 13 | return ( 14 | 15 | 16 | 17 | ); 18 | } 19 | 20 | const animOptions = animations.map((anim) => ({ 21 | value: anim, 22 | label: anim, 23 | })); 24 | 25 | function App() { 26 | const [anim, setAnim] = useState({ 27 | label: 'idle', 28 | value: 'idle' 29 | }) 30 | return ( 31 |
32 | 41 | 42 | 43 | 44 | 50 | 55 | 61 | 62 |