This is a simple implementation of tic-tac-toe
game using three.js in React
application.
Player 1
is human while Player 2
is computer. Currently, Player 2
just pick move randomly.
Basically, this is just a coding exercise to get familiar with using three.js
in React
.
I will be using the following modules to help implement three.js
in React
:
-
@react-three/fiber, a
React renderer
forthree.js
. -
@react-three/drei, collection of helpers for
@react-three/fiber
. -
@react-spring/three, a spring-physics animation library.
The tic-tac-toe game logic is based from the React
tutorial.
This is a work in progress...
Clone the repository and install the dependencies
$ git clone https://github.com/supershaneski/react-three-tictactoe.git myproject
$ cd myproject
$ npm install
$ npm run dev
Open your browser to http://localhost:5173/
to load the application page.