Skip to content

Commit

Permalink
fix: update three-mesh-bvh
Browse files Browse the repository at this point in the history
aims to resolve pmndrs#450
  • Loading branch information
joshuaellis committed Jun 22, 2021
1 parent 98cf373 commit a2a72d6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions custom.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'three-mesh-bvh'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"lodash.pick": "^4.4.0",
"react-merge-refs": "^1.0.0",
"stats.js": "^0.17.0",
"three-mesh-bvh": "^0.4.0",
"three-mesh-bvh": "^0.4.1",
"three-stdlib": "^2.2.0",
"troika-three-text": "^0.42.0",
"use-asset": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/core/useSimplification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function useSimplification(simplePercent: number) {

React.useEffect(() => {
if (original.current && ref.current) {
let geometry = original.current
const geometry = original.current

const count = Math.floor(geometry.attributes.position.count * simplePercent) // number of vertices to remove
ref.current.geometry = modifier.current!.modify(geometry, count)
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"resolveJsonModule": true,
"noImplicitAny": false,
"noImplicitThis": false,
"baseUrl": "./src",
"baseUrl": "./src"
},
"include": ["./src"],
"include": ["./src", "custom.d.ts"],
"exclude": ["./node_modules/**/*"]
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11058,10 +11058,10 @@ [email protected], text-table@^0.2.0:
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=

three-mesh-bvh@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.4.0.tgz#5b0c53925986e85e64ead2bce65933dee8bc936b"
integrity sha512-76tvmdM+fMlRQIg2yxBDPuQ035fqE0PrnJ+Sn5ZU33lujgRwlFtDUkZzjvdFv51bfVBVaDnUTBoV5o/P0tflJA==
three-mesh-bvh@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.4.1.tgz#ba0bf1dac7cbd41f2132c8446545c8ad9fbeb892"
integrity sha512-1ALlGVjArZpi0SdqZhjwFA3DZHgBF/Uo4LnL8G7PczI7rpOoBK87CaBL073DVrrbIE4OONJvpq/PEzluKoRHbg==

three-stdlib@^2.2.0:
version "2.2.0"
Expand Down

0 comments on commit a2a72d6

Please sign in to comment.