efsoftworks / freight-planner-client-app

Step into the future of logistics with Freight Planner, a cutting-edge solution designed to revolutionize container optimization. Trusted by intergalactic forwarders, manufacturers, and spacefaring airlines, our platform harnesses the power of advanced AI algorithms to create hyper-efficient load plans
GNU Affero General Public License v3.0
0 stars 1 forks source link

Camera Controller Utility #8

Closed farunurisonmez closed 7 months ago

farunurisonmez commented 7 months ago

Camera Controller Utility

Summary

This task involves creating a utility function to enable user interaction with the camera within the Three.js scene.

Description

The objective of this task is to implement a utility function named cameraController that allows users to interact with the camera within the Three.js scene. The function will handle user clicks on specific elements, such as cube faces, to change the camera position dynamically. By providing intuitive controls and smooth camera movements, this utility function enhances the user experience and enables dynamic exploration of the scene.

To-Do

  1. Implement the cameraController Function:
    • Create a utility function named cameraController in the sceneUtils.js file.
    • Define event listeners to capture user clicks on specific elements within the scene, such as cube faces.
    • Retrieve the desired camera position based on the clicked element's attributes.
    • Use the GreenSock Animation Platform (GSAP) to animate the camera movement to the new position.
    • Define different camera positions for various cube faces to provide a dynamic viewing experience.

Testing

  1. Verify Functionality:
    • Import the cameraController function into the main application file.
    • Ensure that the function is successfully executed within the application.
    • Test user interaction by clicking on different elements to change the camera position.
    • Verify that the camera movement is smooth and responsive to user input.
    • Test the interaction with other objects in the scene to ensure that the camera behaves as expected.

Notes


farunurisonmez commented 7 months ago

The Camera Controller Utility #8 task has been completed. I've created a utility function named cameraController in the sceneUtils.js file to enable user interaction with the camera within the Three.js scene. This function handles user clicks on specific elements, particularly cube faces, to dynamically change the camera position. By utilizing the GreenSock Animation Platform (GSAP), I ensured smooth transitions to the new camera position, and I defined different camera positions for various cube faces to offer a dynamic viewing experience. To validate the functionality, I imported the cameraController function into the main application file and tested user interaction by clicking on different elements to change the camera position. I confirmed that the camera movement is responsive and smooth, and I tested the interaction with other scene objects to ensure expected camera behavior. With these validations, I successfully completed the task.