How helloworld/3draw works
Project Type and Purpose
• 3Draw is a real-time interactive 3D modeling application created during a hackathon. It uses a smartphone’s gyroscope to send orientation data to a computer, which then renders the data in 3D using Three.js. The project leverages Meteor for real-time bidirectional communication (via web-sockets) and integrates frameworks like Bootstrap for UI styling.
Analyzing the File Structure
• Top-Level Files/Directories:
• The ".meteor" directory and packages files indicate that Meteor is being used as the backbone for server-side handling and real-time web-socket connections.
• The "client" directory contains key frontend resources (HTML, CSS, JavaScript) for rendering the 3D model and handling user interactions. Files like "3d.js", "client.js", "GridHelper.js", and "TrackballControls.js" indicate the use of Three.js and supporting tools to create and manipulate 3D objects.
• The existence of a "model.js" outside the client directory might be used to define data models or the algorithm for 3D line creation.
• The "old_code" directory suggests previous iterations or legacy code that may have informed the current design but is likely not part of the production system.
• Architectural Clues:
• Integration of web-sockets (through Meteor) implies real-time bidirectional communication between the phone’s browser and the computer’s display interface.
• The separation between "client" assets and backend packages (in ".meteor" and "packages") suggests a typical Meteor application where the server and client share code, but the frontend logic and rendering are clearly delineated.
Final Advice
• Don’t hesitate to include legacy/old code as a side note if it illustrates evolution or additional functionality—mark them clearly as “legacy” if necessary.