Skip to content

Commit

Permalink
compute vert normals false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
drcmda committed Jan 23, 2023
1 parent 8f9226e commit 7a2f8a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Shape() {

#### Updating the operations and runtime usage

Call `update()` on the main geometry to re-create it. Keep in mind that although the base CSG implementation is fast, this is something you may want to avoid doing often or runtime, depending on the complexity of your geometry. By default it will compute vertex normals (to fix lighting issues), if you don't want that just call `update(false)`.
Call `update()` on the main geometry to re-create it. Keep in mind that although the base CSG implementation is fast, this is something you may want to avoid doing often or runtime, depending on the complexity of your geometry. If you want it to re-compute vertex normals (for instance to fix lighting issues), call `update(true)`.

The following would allow the user to move a cutter around with the mouse.

Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const Geometry = React.forwardRef(
const operations = React.useRef<THREE.Group>(null!)
const ev = React.useMemo(() => Object.assign(new Evaluator(), { useGroups }), [useGroups])

const update = React.useCallback((computeVertexNormals = true) => {
const update = React.useCallback((computeVertexNormals = false) => {
try {
const ops = operations.current.children.slice() as Brush[]
if (ops.length > 1) {
Expand Down

0 comments on commit 7a2f8a4

Please sign in to comment.