Skip to content

Commit cc4ecb8

Browse files
committed
Fixing typos
1 parent b89aab7 commit cc4ecb8

6 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/bullets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import gsap from "gsap";
1313
import { targets } from "./targets";
1414
import { useFrame } from "@react-three/fiber";
1515
import { useGLTF } from "@react-three/drei";
16-
import { useScoreStore } from "./score";
1716
import { useRef } from "react";
17+
import { useScoreStore } from "./score";
1818

1919
const bulletSpeed = 10;
2020
const forwardVector = new Vector3(0, 0, -1);

src/gun.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import {
1111
useXRControllerButtonEvent,
1212
useXRInputSourceStateContext,
1313
} from "@react-three/xr";
14-
import { useRef } from "react";
14+
1515
import { useBulletStore } from "./bullets";
16+
import { useRef } from "react";
1617

1718
export const Gun = () => {
1819
const state = useXRInputSourceStateContext("controller");

src/score.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { PositionalAudio, Text } from "@react-three/drei";
9-
import { useRef, useEffect } from "react";
9+
import { useEffect, useRef } from "react";
1010

1111
import { PositionalAudio as PAudio } from "three";
1212
import { create } from "zustand";

src/targets.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
import { useEffect, useMemo } from "react";
9+
810
import { Object3D } from "three";
9-
import { useMemo, useEffect } from "react";
1011
import { useGLTF } from "@react-three/drei";
1112

1213
export const targets = new Set<Object3D>();

tutorial/chapter4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ We’ll get the `bulletPrototype` in `Bullet`, allowing each bullet to inherit i
8080

8181
```tsx
8282
import { useGLTF } from "@react-three/drei";
83-
import { useRef } from "react"
83+
import { useRef } from "react";
8484

8585
type BulletProps = {
8686
bulletData: BulletData;
@@ -148,7 +148,7 @@ type TargetProps = {
148148

149149
export const Target = ({ targetIdx }: TargetProps) => {
150150
const { scene } = useGLTF("assets/target.glb");
151-
const target = useMemo(() => scene.clone(), [])
151+
const target = useMemo(() => scene.clone(), []);
152152

153153
useEffect(() => {
154154
target.position.set(

tutorial/chapter6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In `gun.tsx`, we’ll add a sound for when the player fires the blaster.
1313
```tsx
1414
import { PositionalAudio as PAudio } from "three";
1515
import { PositionalAudio } from "@react-three/drei";
16-
import { useRef } from "react"
16+
import { useRef } from "react";
1717

1818
export const Gun = () => {
1919
// ... existing code

0 commit comments

Comments
 (0)