How aderinsola22/enable3dfootball works
This repository implements a browser-based 3D soccer match simulation. The workflow starts when the page loads, boots the physics-enabled MatchScene, and creates the match world and teams; player and goalkeeper behavior then combines user control, ball interactions, and state-machine logic, while field-boundary events handle scoring and offside logic checks play. Animation assets support player actions. The graph emphasizes these gameplay stages and the scene’s orchestration role. Evidence is limited to the README (empty), source index, and shown excerpts; unsampled connections are omitted.
Main entry points: MatchScene.js Match Scene · Team.js Teams · Keeper.js Goalkeeper · Ball.js Ball
Components 16
Runtime and Match
- Game Entry
src/main.js - Match Scene
src/core/MatchScene.js
Match World
- Field
src/objects/Field.js - Ball
src/objects/Ball.js - Goal Posts
src/objects/Post.js - Match Flags
src/objects/Flag.js - Action Animations
animations/Player_Actions
Teams and Control
- Teams
src/objects/Team.js - Outfield Players
src/objects/Player.js - Goalkeeper
src/objects/Keeper.js - Player Director
src/objects/Director.js
Player Behavior
- Field Player States
src/statemachine/OutFieldStates.js - Keeper States
src/statemachine/KeeperStates.js - Shared States
src/statemachine/SharedStates.js
Match Rules
- Offside Checker
src/objects/Offside.js
Other components
- Browser
Connections 18
- Browser → Game Entry: loads page
src/main.js - Game Entry → Match Scene: starts scene
src/main.js - Match Scene → Field: creates field
src/core/MatchScene.js - Match Scene → Ball: creates ball
src/core/MatchScene.js - Match Scene → Goal Posts: creates posts
src/core/MatchScene.js - Match Scene → Match Flags: creates flags
src/core/MatchScene.js - Match Scene → Teams: creates teams
src/core/MatchScene.js - Match Scene → Player Director: creates director
src/core/MatchScene.js - Match Scene → Offside Checker: creates checkers
src/core/MatchScene.js - Teams → Outfield Players: creates players
src/objects/Team.js - Teams → Goalkeeper: creates keeper
src/objects/Team.js - Outfield Players → Field Player States: uses states
src/objects/Player.js - Goalkeeper → Keeper States: uses states
src/objects/Keeper.js - Field Player States → Shared States: imports states
src/statemachine/OutFieldStates.js - Keeper States → Shared States: imports states
src/statemachine/KeeperStates.js - Goalkeeper → Action Animations: loads animations
src/objects/Keeper.js - Field → Ball: handles collisions
src/objects/Field.js - Offside Checker → Ball: checks possession
src/objects/Offside.js