├── .env
├── .npmrc
├── .eslintignore
├── .gitignore
├── Notes.txt
├── index.html
├── netlify.toml
├── nginx.conf
├── src
├── App.jsx
├── App.scss
├── Main.jsx
├── Enums
│ ├── Languages.ts
│ └── LocalStorageKeys.ts
├── Pages
│ ├── NotFound.jsx
│ ├── GameContent.jsx
│ ├── Content
│ │ ├── AboutMe.jsx
│ │ ├── Contact.jsx
│ │ ├── Gallery.jsx
│ │ ├── Welcome.jsx
│ │ ├── Achievements.jsx
│ │ └── BlogArticles.jsx
│ └── index.js
├── Assets
│ ├── Icons
│ │ ├── react.svg
│ │ ├── vite.svg
│ │ └── StartJourney.png
│ └── Images
│ │ ├── cursor.png
│ │ ├── riding.png
│ │ ├── no-phone.png
│ │ ├── pointer.png
│ │ └── content
│ │ ├── about me.jpg
│ │ ├── blog 1.jpg
│ │ ├── blog 2.jpg
│ │ ├── blog 3.png
│ │ ├── fig 10.jpg
│ │ ├── fig 2.jpg
│ │ ├── fig 3.jpg
│ │ ├── fig 4.jpg
│ │ ├── fig 5.jpg
│ │ ├── fig 6.jpg
│ │ ├── fig 7.jpg
│ │ ├── fig 8.jpg
│ │ └── fig 9.jpg
├── Components
│ ├── Ui
│ │ ├── Menu.jsx
│ │ ├── Path.jsx
│ │ ├── Pillar.jsx
│ │ ├── CameraMove.jsx
│ │ ├── ImageSlider.jsx
│ │ ├── PageBody.jsx
│ │ ├── PageTitle.jsx
│ │ ├── ThreeDText.jsx
│ │ ├── CanvasElement.jsx
│ │ ├── GameMode
│ │ │ ├── DayMode.jsx
│ │ │ └── NightMode.jsx
│ │ ├── LoadingScreen.jsx
│ │ ├── SidebarControl.jsx
│ │ ├── StepperElement.jsx
│ │ ├── Buttons
│ │ │ ├── ButtonContain.jsx
│ │ │ ├── ButtonOutline.jsx
│ │ │ └── ButtonNavigation.jsx
│ │ ├── CustomOrbitControls.jsx
│ │ ├── Modals
│ │ │ └── ModalSettings.jsx
│ │ └── Models3D
│ │ │ ├── HorseModel.jsx
│ │ │ ├── Scene09Feb.jsx
│ │ │ ├── SceneModel.jsx
│ │ │ ├── SceneModel2.jsx
│ │ │ ├── HorseOptimize.jsx
│ │ │ ├── SceneOptimized.jsx
│ │ │ └── SceneOptimizedNew.jsx
│ ├── Core
│ │ ├── Button
│ │ │ └── index.jsx
│ │ ├── Modal
│ │ │ ├── index.jsx
│ │ │ └── index.scss
│ │ └── index.js
│ └── index.js
├── Constants
│ ├── RoutePaths.ts
│ ├── Translation.ts
│ ├── HorseRiderPath.ts
│ └── Achievements.js
├── Routes
│ ├── AllRoutes.jsx
│ └── Data
│ │ ├── General.jsx
│ │ └── GroupedRoutes.jsx
├── I18n
│ ├── Locales
│ │ ├── EN.js
│ │ └── PT.js
│ └── Index.js
├── Helpers
│ ├── index.js
│ ├── focusCamera.js
│ ├── generateCircleWaypoints.js
│ ├── focusCameraOnHorseRider.js
│ ├── getCameraPosition.js
│ ├── getHorseRiderPosition.js
│ └── playTransitionCameraPosition.js
└── Theme
│ └── Default.js
├── .prettierignore
├── public
├── Models
│ ├── Horse.glb
│ ├── Scene.glb
│ ├── Horse2.glb
│ ├── Horse3.glb
│ ├── Horse4.glb
│ ├── Scene09Feb.glb
│ ├── Scene2.glb
│ ├── HorseOptimize.glb
│ ├── SceneOptimized.glb
│ └── SceneOptimizedNew.glb
└── Sounds
│ └── music.mp3
├── .idea
├── .gitignore
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── vcs.xml
├── git_toolbox_blame.xml
├── prettier.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── modules.xml
└── Horse-Rider-React3Fiber.iml
├── README.md
├── jsconfig.json
├── .babelrc
├── .prettierrc
├── .editorconfig
├── .eslintrc.cjs
├── vite.config.js
└── package.json
/.env:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Notes.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/nginx.conf:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/App.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/App.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Main.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Horse.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Scene.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Sounds/music.mp3:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Enums/Languages.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/NotFound.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Horse2.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Horse3.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Horse4.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Scene09Feb.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/Scene2.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Icons/react.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Icons/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/cursor.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/riding.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Menu.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Path.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Pillar.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Constants/RoutePaths.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Constants/Translation.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/GameContent.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Routes/AllRoutes.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Routes/Data/General.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/HorseOptimize.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/SceneOptimized.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Icons/StartJourney.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/no-phone.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/pointer.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/CameraMove.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/ImageSlider.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/PageBody.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/PageTitle.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/ThreeDText.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Constants/HorseRiderPath.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Enums/LocalStorageKeys.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/AboutMe.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/Contact.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/Gallery.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/Welcome.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Routes/Data/GroupedRoutes.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/public/Models/SceneOptimizedNew.glb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/about me.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/blog 1.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/blog 2.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/blog 3.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 10.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 2.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 3.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 4.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 5.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 6.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 7.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 8.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Assets/Images/content/fig 9.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Core/Button/index.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Core/Modal/index.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Core/Modal/index.scss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/CanvasElement.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/GameMode/DayMode.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/LoadingScreen.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/SidebarControl.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/StepperElement.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/Achievements.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Pages/Content/BlogArticles.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Buttons/ButtonContain.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Buttons/ButtonOutline.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/CustomOrbitControls.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/GameMode/NightMode.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Modals/ModalSettings.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/HorseModel.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/Scene09Feb.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/SceneModel.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/SceneModel2.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Buttons/ButtonNavigation.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/HorseOptimize.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/SceneOptimized.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/Components/Ui/Models3D/SceneOptimizedNew.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/I18n/Locales/EN.js:
--------------------------------------------------------------------------------
1 | export default {
2 | translation: {},
3 | };
4 |
--------------------------------------------------------------------------------
/src/I18n/Locales/PT.js:
--------------------------------------------------------------------------------
1 | export default {
2 | translation: {},
3 | };
4 |
--------------------------------------------------------------------------------
/src/Helpers/index.js:
--------------------------------------------------------------------------------
1 | export { default as getCameraPosition } from '@/Helpers/getCameraPosition';
2 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Horse-Rider-React3Fiber
2 |
3 | 
4 |
--------------------------------------------------------------------------------
/src/Pages/index.js:
--------------------------------------------------------------------------------
1 | export { default as GameContent } from '@/Pages/GameContent';
2 | export { default as NotFound } from '@/Pages/NotFound';
3 |
--------------------------------------------------------------------------------
/src/Components/Core/index.js:
--------------------------------------------------------------------------------
1 | //Button
2 | export { default as Button } from '@/Components/Core/Button';
3 |
4 | //Modal
5 | export { default as Modal } from '@/Components/Core/Modal';
6 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/git_toolbox_blame.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/prettier.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": {
5 | "@/*": ["./src/*"]
6 | }
7 | },
8 | "exclude": ["node_modules", "dist"]
9 | }
10 |
--------------------------------------------------------------------------------
/src/Helpers/focusCamera.js:
--------------------------------------------------------------------------------
1 | const focusCamera = (camera, newPosition) => {
2 | // Set camera position and look at the model
3 | camera.position.set(...newPosition);
4 | camera.lookAt(newPosition);
5 | };
6 |
7 | export default focusCamera;
8 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env"],
3 | "plugins": [
4 | [
5 | "@babel/plugin-transform-react-jsx",
6 | {
7 | "pragma": "jsxPragma"
8 | }
9 | ]
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "singleQuote": true,
4 | "printWidth": 80,
5 | "tabWidth": 4,
6 | "useTabs": false,
7 | "trailingComma": "es5",
8 | "bracketSpacing": true,
9 | "bracketSameLine": false,
10 | "arrowParens": "avoid",
11 | "endOfLine": "auto"
12 | }
13 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/Horse-Rider-React3Fiber.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/I18n/Index.js:
--------------------------------------------------------------------------------
1 | import { initReactI18next } from 'react-i18next';
2 | import i18n from 'i18next';
3 | import { Translation } from '@/Constants/Translation';
4 | import EN from '@/I18n/Locales/EN';
5 | import PT from '@/I18n/Locales/PT';
6 |
7 | const resources = {
8 | EN: EN.default,
9 | PT: PT.default,
10 | // Add more languages here
11 | };
12 |
13 | i18n.use(initReactI18next).use(initReactI18next).init({
14 | lng: Translation.APP,
15 | resources,
16 | });
17 |
18 | export default i18n;
19 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # Top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | charset = utf-8
9 | indent_style = space
10 | indent_size = 4
11 | end_of_line = lf
12 | trim_trailing_whitespace = true
13 | insert_final_newline = true
14 |
15 | # Matches multiple files with brace expansion notation
16 | # Set default charset
17 | [*.{js,jsx,ts,tsx,css,scss,html,json}]
18 | charset = utf-8
19 |
20 | # 2 space indentation
21 | [*.md]
22 | indent_size = 2
23 | trim_trailing_whitespace = false
24 |
--------------------------------------------------------------------------------
/src/Helpers/generateCircleWaypoints.js:
--------------------------------------------------------------------------------
1 | import * as THREE from 'three';
2 |
3 | const generateCircleWaypoints = (radius, segments, center = [0, 0, 0]) => {
4 | const waypoints = [];
5 | for (let i = 0; i < segments; i++) {
6 | const angle = (i / segments) * Math.PI * 2;
7 | waypoints.push(
8 | new THREE.Vector3(
9 | Math.cos(angle) * radius + center[0], // x
10 | center[1], // y
11 | Math.sin(angle) * radius + center[2] // z
12 | )
13 | );
14 | }
15 | return waypoints;
16 | };
17 |
18 | export default generateCircleWaypoints;
19 |
--------------------------------------------------------------------------------
/src/Helpers/focusCameraOnHorseRider.js:
--------------------------------------------------------------------------------
1 | const focusCameraOnHorseRider = (camera, horseRiderRef) => {
2 | const offset = { x: -1, y: 2, z: -6 };
3 | if (horseRiderRef.current) {
4 | // Adjust the camera to follow the object
5 | camera.position.x = horseRiderRef.current.position.x + offset.x;
6 | camera.position.y = horseRiderRef.current.position.y + offset.y;
7 | camera.position.z = horseRiderRef.current.position.z + offset.z;
8 |
9 | // Optionally, make the camera look at the object
10 | camera.lookAt(horseRiderRef.current.position);
11 | }
12 | };
13 |
14 | export default focusCameraOnHorseRider;
15 |
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: { browser: true, es2020: true, node: true },
4 | extends: [
5 | 'eslint:recommended',
6 | 'plugin:react/recommended',
7 | 'plugin:react/jsx-runtime',
8 | 'plugin:react-hooks/recommended',
9 | 'plugin:prettier/recommended',
10 | 'plugin:@typescript-eslint/recommended',
11 | ],
12 | ignorePatterns: ['dist', '.eslintrc.cjs'],
13 | parser: '@typescript-eslint/parser',
14 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
15 | settings: { react: { version: '18.2' } },
16 | plugins: ['react-refresh'],
17 | rules: {
18 | 'react/react-in-jsx-scope': 'off',
19 | 'no-unused-vars': ['error', { varsIgnorePattern: 'React' }],
20 | 'react/prop-types': 'off',
21 | 'react/no-unknown-property': 'off',
22 | 'react-refresh/only-export-components': [
23 | 'warn',
24 | { allowConstantExport: true },
25 | ],
26 | camelcase: 'error', // Enforces camelCase
27 | 'react/jsx-pascal-case': ['error', { allowAllCaps: true, ignore: [] }], // Enforces PascalCase for components
28 | indent: ['error', 4], // Enforces 4-space tab indentation
29 | },
30 | };
31 |
--------------------------------------------------------------------------------
/src/Helpers/getCameraPosition.js:
--------------------------------------------------------------------------------
1 | const getCameraPosition = (camera, lastCameraPosition) => {
2 | // Only log when not in auto-rotate mode
3 | const currentPosition = {
4 | x: Math.round(camera.position.x),
5 | y: Math.round(camera.position.y),
6 | z: Math.round(camera.position.z),
7 | };
8 | // Check if the camera has moved significantly
9 | if (
10 | Math.abs(currentPosition.x - lastCameraPosition.current.x) >= 1 ||
11 | Math.abs(currentPosition.y - lastCameraPosition.current.y) >= 1 ||
12 | Math.abs(currentPosition.z - lastCameraPosition.current.z) >= 1
13 | ) {
14 | lastCameraPosition.current = currentPosition; // Update the last position
15 | // console.log('Camera Position: ', [
16 | // currentPosition.x,
17 | // currentPosition.y,
18 | // currentPosition.z,
19 | // ]);
20 | return [currentPosition.x, currentPosition.y, currentPosition.z];
21 | }
22 | // console.log('Camera Position: ', [
23 | // currentPosition.x,
24 | // currentPosition.y,
25 | // currentPosition.z,
26 | // ]);
27 | return [currentPosition.x, currentPosition.y, currentPosition.z];
28 | };
29 |
30 | export default getCameraPosition;
31 |
--------------------------------------------------------------------------------
/src/Helpers/getHorseRiderPosition.js:
--------------------------------------------------------------------------------
1 | export const getHorseRiderPosition = (
2 | horseRiderRef,
3 | lastHorseRiderPosition
4 | ) => {
5 | if (horseRiderRef.current) {
6 | const currentPosition = {
7 | x: Math.round(horseRiderRef.current.position.x),
8 | y: Math.round(horseRiderRef.current.position.y),
9 | z: Math.round(horseRiderRef.current.position.z),
10 | };
11 |
12 | if (
13 | Math.abs(currentPosition.x - lastHorseRiderPosition.current.x) >=
14 | 1 ||
15 | Math.abs(currentPosition.y - lastHorseRiderPosition.current.y) >=
16 | 1 ||
17 | Math.abs(currentPosition.z - lastHorseRiderPosition.current.z) >= 1
18 | ) {
19 | lastHorseRiderPosition.current = currentPosition; // Update the last position
20 | // console.log('HorseRider Position: ', [
21 | // currentPosition.x,
22 | // currentPosition.y,
23 | // currentPosition.z,
24 | // ]);
25 | return [currentPosition.x, currentPosition.y, currentPosition.z];
26 | }
27 | return [currentPosition.x, currentPosition.y, currentPosition.z];
28 | }
29 | };
30 |
31 | export default getHorseRiderPosition;
32 |
--------------------------------------------------------------------------------
/src/Helpers/playTransitionCameraPosition.js:
--------------------------------------------------------------------------------
1 | const playTransitionCameraPosition = (
2 | camera,
3 | initialPosition,
4 | finalPosition,
5 | updateRate
6 | ) => {
7 | let transitionProgress = 0;
8 | const step = () => {
9 | if (transitionProgress < 1) {
10 | transitionProgress += updateRate; // Increment progress
11 |
12 | // Interpolate the position using array indices
13 | const x =
14 | initialPosition[0] +
15 | (finalPosition[0] - initialPosition[0]) * transitionProgress;
16 | const y =
17 | initialPosition[1] +
18 | (finalPosition[1] - initialPosition[1]) * transitionProgress;
19 | const z =
20 | initialPosition[2] +
21 | (finalPosition[2] - initialPosition[2]) * transitionProgress;
22 |
23 | // Update the camera position
24 | camera.position.set(x, y, z);
25 |
26 | // Continue the animation
27 | if (transitionProgress < 1) {
28 | requestAnimationFrame(step);
29 | }
30 | } else {
31 | // Reset the progress for next transition
32 | transitionProgress = 0;
33 | }
34 | camera.lookAt(0, 0, 0); // Adjust this as needed for your target
35 | };
36 |
37 | requestAnimationFrame(step);
38 | };
39 |
40 | export default playTransitionCameraPosition;
41 |
--------------------------------------------------------------------------------
/src/Components/index.js:
--------------------------------------------------------------------------------
1 | // Game Mode
2 | export { default as NightMode } from '@/Components/Ui/GameMode/NightMode';
3 | export { default as DayMode } from '@/Components/Ui/GameMode/DayMode';
4 |
5 | // Modals
6 | export { default as ModalSettings } from '@/Components/Ui/Modals/ModalSettings';
7 |
8 | // Buttons
9 | export { default as ButtonContain } from '@/Components/Ui/Buttons/ButtonContain';
10 | export { default as ButtonNavigation } from '@/Components/Ui/Buttons/ButtonNavigation';
11 | export { default as ButtonOutline } from '@/Components/Ui/Buttons/ButtonOutline';
12 |
13 | // Models
14 | export { default as HorseModel } from '@/Components/Ui/Models3D/HorseModel';
15 | export { default as SceneOptimized } from '@/Components/Ui/Models3D/SceneOptimized';
16 | export { default as SceneOptimizedNew } from '@/Components/Ui/Models3D/SceneOptimizedNew';
17 |
18 | export { default as Path } from '@/Components/Ui/Path';
19 | export { default as Pillar } from '@/Components/Ui/Pillar';
20 | export { default as CustomOrbitControls } from '@/Components/Ui/CustomOrbitControls';
21 | export { default as SidebarControl } from '@/Components/Ui/SidebarControl';
22 | export { default as CanvasElement } from '@/Components/Ui/CanvasElement';
23 | export { default as PageTitle } from '@/Components/Ui/PageTitle';
24 | export { default as PageBody } from '@/Components/Ui/PageBody';
25 | export { default as ImageSlider } from '@/Components/Ui/ImageSlider';
26 | export { default as BlogCard } from '@/Components/Ui/BlogCard';
27 |
--------------------------------------------------------------------------------
/src/Theme/Default.js:
--------------------------------------------------------------------------------
1 | import { createTheme } from '@mui/material/styles';
2 |
3 | const theme = createTheme({
4 | breakpoints: {
5 | values: {
6 | xs: 450,
7 | sm: 900,
8 | smCustom: 1020,
9 | md: 1200,
10 | lg: 1536,
11 | xl: 1920,
12 | },
13 | },
14 |
15 | palette: {
16 | primary: {
17 | main: '#8d4a3c',
18 | contrastText: '#fff',
19 | },
20 | secondary: {
21 | main: '#60A626',
22 | contrastText: '#fff',
23 | },
24 | error: {
25 | main: '#D7413E',
26 | contrastText: '#fff',
27 | },
28 | success: {
29 | main: '#4caf50',
30 | contrastText: '#fff',
31 | },
32 | warning: {
33 | main: '#ff9800',
34 | contrastText: '#1C1B1F',
35 | },
36 | info: {
37 | main: '#2979FF',
38 | contrastText: '#fff',
39 | },
40 | white: {
41 | main: '#fff',
42 | contrastText: '#49454F',
43 | },
44 | grey: {
45 | 100: '#F9F9F9',
46 | 200: '#CAC4D0',
47 | 600: '#79747E',
48 | 700: '#49454F',
49 | 900: '#1C1B1F',
50 | },
51 | disabled: {
52 | main: '#CAC4D0',
53 | },
54 | colors: {
55 | branding: { primary: '#60A626' },
56 | },
57 | },
58 | });
59 |
60 | export default theme;
61 |
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | // vite.config.js
2 | import { defineConfig } from 'vite';
3 | import react from '@vitejs/plugin-react-swc';
4 | import svgr from 'vite-plugin-svgr';
5 |
6 | export default defineConfig({
7 | plugins: [react(), svgr()],
8 | resolve: {
9 | alias: {
10 | '@': '/src',
11 | },
12 | },
13 | css: {
14 | modules: true, // Enable CSS Modules
15 | },
16 | server: {
17 | // host: 'duarte-seabra.localtest.me',
18 | host: '0.0.0.0',
19 | },
20 | build: {
21 | chunkSizeWarningLimit: 1000, // Set the limit to a different value
22 | assetsInlineLimit: 4096, // Set the limit for inlining assets
23 | // terserOptions: {
24 | // compress: {
25 | // // eslint-disable-next-line camelcase
26 | // drop_console: true,
27 | // },
28 | // // You can add other Terser options here
29 | // },
30 | },
31 | optimizeDeps: {
32 | include: ['url-loader'],
33 | },
34 | rules: [
35 | {
36 | test: /\.scss$/,
37 | use: ['style-loader', 'css-loader', 'sass-loader'],
38 | },
39 | {
40 | test: /\.(png|jpe?g|gif)$/,
41 | use: [
42 | {
43 | loader: 'url-loader',
44 | options: {
45 | limit: 8192,
46 | name: '[name].[hash].[ext]',
47 | outputPath: 'images',
48 | publicPath: '/images',
49 | esModule: false,
50 | },
51 | },
52 | ],
53 | },
54 | ],
55 | });
56 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vite-project",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "start": "vite",
8 | "netlify-build": "npm install -g pnpm && pnpm install --no-lockfile && pnpm run build",
9 | "build": "vite build",
10 | "lint": "eslint . --ext .js,.jsx --report-unused-disable-directives --max-warnings 0",
11 | "preview": "vite preview",
12 | "format": "prettier --write .",
13 | "format:check": "prettier --check ."
14 | },
15 | "dependencies": {
16 | "@babel/core": "^7.23.3",
17 | "@emailjs/browser": "^4.1.0",
18 | "@emotion/react": "^11.11.1",
19 | "@emotion/styled": "^11.11.0",
20 | "@fontsource/roboto": "^5.0.8",
21 | "@hookform/resolvers": "^3.3.4",
22 | "@mui/icons-material": "^5.14.18",
23 | "@mui/joy": "5.0.0-beta.15",
24 | "@mui/lab": "5.0.0-alpha.153",
25 | "@mui/material": "^5.15.0",
26 | "@react-three/drei": "^9.88.17",
27 | "@react-three/fiber": "^8.15.11",
28 | "@react-three/postprocessing": "^2.15.11",
29 | "@types/three": "^0.158.3",
30 | "gsap": "^3.12.2",
31 | "i18next": "^23.7.6",
32 | "leva": "^0.9.35",
33 | "react": "^18.2.0",
34 | "react-dom": "^18.2.0",
35 | "react-google-recaptcha": "^3.1.0",
36 | "react-hook-form": "^7.50.0",
37 | "react-i18next": "^13.5.0",
38 | "react-router": "^6.20.0",
39 | "react-router-dom": "^6.20.0",
40 | "react-slick": "^0.30.1",
41 | "slick-carousel": "^1.8.1",
42 | "three": "^0.158.0",
43 | "vite-plugin-svgr": "^4.2.0",
44 | "yup": "^1.3.3"
45 | },
46 | "devDependencies": {
47 | "@types/react": "^18.2.37",
48 | "@types/react-dom": "^18.2.15",
49 | "@typescript-eslint/eslint-plugin": "^6.13.0",
50 | "@typescript-eslint/parser": "^6.13.0",
51 | "@vitejs/plugin-react": "^4.2.0",
52 | "@vitejs/plugin-react-swc": "^3.5.0",
53 | "@vitejs/plugin-vue": "^4.5.0",
54 | "eslint": "^8.53.0",
55 | "eslint-config-prettier": "^9.0.0",
56 | "eslint-plugin-prettier": "^5.0.1",
57 | "eslint-plugin-react": "^7.33.2",
58 | "eslint-plugin-react-hooks": "^4.6.0",
59 | "eslint-plugin-react-refresh": "^0.4.4",
60 | "pnpm": "^8.12.0",
61 | "prettier": "^3.1.0",
62 | "sass": "^1.69.5",
63 | "url-loader": "^4.1.1",
64 | "vite": "^5.0.0"
65 | },
66 | "packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
67 | }
68 |
--------------------------------------------------------------------------------
/src/Constants/Achievements.js:
--------------------------------------------------------------------------------
1 | export const AchievementsRows = [
2 | {
3 | id: 1,
4 | year: 2024,
5 | venue: 'Sharjah International Show Jumping Championship & Nations Cup / Dubai, UAE',
6 | horse: 'Dourados 2',
7 | individualRank: 3,
8 | teamRank: '',
9 | },
10 | {
11 | id: 2,
12 | year: 2023,
13 | venue: 'Continental/Regional Championships Milano, San Siro',
14 | horse: 'Dourados 2',
15 | individualRank: 53,
16 | teamRank: 14,
17 | },
18 | {
19 | id: 3,
20 | year: 2018,
21 | venue: 'FEI World Equestrian GamesTM Tryon NC',
22 | horse: 'Sig Winter Soldier',
23 | individualRank: 100,
24 | teamRank: 21,
25 | },
26 | {
27 | id: 4,
28 | year: 2018,
29 | venue: 'Continental/Regional Games Barcelona',
30 | horse: 'Sig Winter Soldier',
31 | individualRank: 1, // Assuming '1 (FEI Gold Medal)' means a special achievement
32 | teamRank: '', // 'FEI Gold Medal' doesn't directly map to a numeric rank, so marking as 'N/A'
33 | },
34 | {
35 | id: 5,
36 | year: 2018,
37 | venue: 'Continental/Regional Games Barcelona',
38 | horse: 'Sig Winter Soldier',
39 | individualRank: 7,
40 | teamRank: '', // Assuming this was intended as individual rank with no team rank provided
41 | },
42 | {
43 | id: 6,
44 | year: 2014,
45 | venue: "Young Horses World Championship Le Lion d'Angers",
46 | horse: 'Z',
47 | individualRank: 7,
48 | teamRank: '',
49 | },
50 | {
51 | id: 7,
52 | year: 2011,
53 | venue: "Young Horses World Championship Le Lion d'Angers",
54 | horse: 'Fernhill Pimms',
55 | individualRank: 36,
56 | teamRank: '',
57 | },
58 | {
59 | id: 8,
60 | year: 2011,
61 | venue: "Young Horses World Championship Le Lion d'Angers",
62 | horse: 'Castleview Red',
63 | individualRank: 'EL', // Assuming 'EL' is a code for elimination or similar
64 | teamRank: '',
65 | },
66 | {
67 | id: 9,
68 | year: 2010,
69 | venue: 'FEI World Equestrian GamesTM Lexington, KY (Horse Park)',
70 | horse: 'Fernhill Gloster Rebel',
71 | individualRank: 'WD', // Assuming 'WD' signifies withdrawal
72 | teamRank: '',
73 | },
74 | {
75 | id: 10,
76 | year: 2009,
77 | venue: "Young Horses World Championship Le Lion d'Angers",
78 | horse: 'Fernhill M2s',
79 | individualRank: 'EL',
80 | teamRank: '',
81 | },
82 | {
83 | id: 11,
84 | year: 2009,
85 | venue: 'Continental/Regional Championships Fontainebleau',
86 | horse: 'Brave Heart',
87 | individualRank: 28,
88 | teamRank: '',
89 | },
90 | {
91 | id: 12,
92 | year: 2008,
93 | venue: "Young Horses World Championship Le Lion d'Angers",
94 | horse: 'Fernhill Urco',
95 | individualRank: 14,
96 | teamRank: '',
97 | },
98 | {
99 | id: 13,
100 | year: 2008,
101 | venue: "Young Horses World Championship Le Lion d'Angers",
102 | horse: 'Fernhill Gloster Rebel',
103 | individualRank: 22,
104 | teamRank: '',
105 | },
106 | {
107 | id: 14,
108 | year: 2007,
109 | venue: "Young Horses World Championship Le Lion d'Angers",
110 | horse: 'Upper',
111 | individualRank: 'EL',
112 | teamRank: '',
113 | },
114 | {
115 | id: 15,
116 | year: 2006,
117 | venue: "Young Horses World Championship Le Lion d'Angers",
118 | horse: 'Tarzan Da Graciosa',
119 | individualRank: 22,
120 | teamRank: '',
121 | },
122 | {
123 | id: 16,
124 | year: 2005,
125 | venue: 'Continental/Regional Championships Blenheim',
126 | horse: 'Zebedee',
127 | individualRank: 'RET', // Assuming 'RET' signifies retirement
128 | teamRank: 10,
129 | },
130 | {
131 | id: 17,
132 | year: 2004,
133 | venue: "Continental/Regional Championships Barroca d'Alva",
134 | horse: 'No Limit',
135 | individualRank: 28,
136 | teamRank: 8,
137 | },
138 | {
139 | id: 18,
140 | year: 2003,
141 | venue: 'Youth Continental/Regional Championships Pardubice',
142 | horse: 'Joia Da Valada',
143 | individualRank: 22,
144 | teamRank: 11,
145 | },
146 | {
147 | id: 19,
148 | year: 2002,
149 | venue: 'Youth Continental/Regional Championships Waregem',
150 | horse: 'Joia Da Valada',
151 | individualRank: 39,
152 | teamRank: 11,
153 | },
154 | ];
155 |
--------------------------------------------------------------------------------