forked from rictic/code_swarm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved defaults, added per-user default option system
When looking for an option, it looks down a stack of properties files, looking first at the project.config file given on the command line, then defaults/user.config if it exists, then defaults/code_swarm.config defaults/code_swarm.config is now the single point of truth for default values, rather than spreading them around the source code
- Loading branch information
Showing
8 changed files
with
298 additions
and
427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ dist | |
frames | ||
*.pyc | ||
*.proof | ||
image_cache | ||
image_cache | ||
defaults/user.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,15 @@ | ||
# This is a sample configuration file for code_swarm | ||
|
||
# Frame width | ||
Width=1024 | ||
|
||
# Frame height | ||
Height=640 | ||
|
||
|
||
# Particle sprite file | ||
ParticleSpriteFile=src/particle.png | ||
|
||
# Optional Method instead of MillisecondsPerFrame | ||
FramesPerDay=6 | ||
|
||
# Background in R,G,B | ||
Background=0,0,0 | ||
|
||
|
||
# Save each frame to an image? | ||
TakeSnapshots=false | ||
|
||
# Where to save each frame | ||
SnapshotLocation=code_swarm_frames/#####.png | ||
|
||
# Draw names (combinatory) : | ||
# Draw sharp names? | ||
DrawNamesSharp=true | ||
# And draw a glow around names? (Runs slower) | ||
DrawNamesHalos=false | ||
|
||
# Draw files (combinatory) : | ||
# Draw sharp files | ||
DrawFilesSharp=true | ||
# Draw fuzzy files | ||
DrawFilesFuzzy=true | ||
# Draw jelly files | ||
DrawFilesJelly=false | ||
|
||
# Show the Legend at start | ||
ShowLegend=false | ||
|
||
# Show the History at start | ||
ShowHistory=true | ||
|
||
# Show the Date at start | ||
ShowDate=true | ||
|
||
# Show edges between authors and files, mostly for debug purpose | ||
ShowEdges=false | ||
|
||
# Turn on Debug counts. | ||
ShowDebug=false | ||
|
||
# Natural distance of files to people | ||
EdgeLength=25 | ||
|
||
# Life of an Edge | ||
EdgeLife=150 | ||
|
||
# Life of a File | ||
FileLife=150 | ||
|
||
# Life of a Person | ||
PersonLife=255 | ||
|
||
|
||
# Highlight percent. | ||
# This is the amount of time that the person or | ||
# file will be highlighted. | ||
HighlightPct=5 | ||
|
||
## Physics engine selection and configuration | ||
# Directory physics engine config files reside in. | ||
PhysicsEngineConfigDir=physics_engine | ||
|
||
## Physical engine selection and configuration | ||
# Force calculation algorithms (PhysicsEngineLegacy, PhysicsEngineSimple...) : | ||
PhysicsEngineSelection=PhysicsEngineOrderly | ||
|
||
#Is the input xml sorted by date? It's faster and uses much less memory if it is | ||
#Our freebase output should always be sorted by date | ||
IsInputSorted=true | ||
# - All of the given scripts for producing repository xml files produce sorted data | ||
# - Please file a bug if one doesn't | ||
|
||
|
||
# OpenGL is experimental. Use at your own risk. | ||
UseOpenGL=true | ||
|
||
# Leave blank to go without avatars | ||
# Set to NoAvatar to not use user images | ||
AvatarFetcher=FreebaseAvatarFetcher | ||
AvatarSize=40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# The global config file for code_swarm, defining the defaults. | ||
|
||
# Don't edit this file for personal preferences, copy user.config.sample | ||
# to defaults/user.config and edit that | ||
|
||
# Frame width | ||
Width=800 | ||
|
||
# Frame height | ||
Height=600 | ||
|
||
|
||
# Optional Method instead of MillisecondsPerFrame | ||
FramesPerDay=6 | ||
|
||
# Background in R,G,B | ||
Background=0,0,0 | ||
|
||
# Maximum number of background threads, used mostly for writing out snapshots | ||
# When taking snapshots this setting has a significant effect on memory use | ||
MaxThreads=8 | ||
|
||
# Save each frame to an image? | ||
TakeSnapshots=false | ||
|
||
# Where to save the frames | ||
SnapshotLocation=code_swarm_frames/#####.png | ||
|
||
## How to draw names (choose as many as you like) | ||
# Draw sharp names? | ||
DrawNamesSharp=true | ||
# And draw a glow around names? (kinda slow) | ||
DrawNamesHalos=false | ||
|
||
## How to draw files (choose as many as you like) | ||
# Draw sharp files? | ||
DrawFilesSharp=true | ||
# Draw fuzzy files? | ||
DrawFilesFuzzy=true | ||
# Draw jelly files? | ||
DrawFilesJelly=false | ||
|
||
# Show a legend of colors and their labels | ||
ShowLegend=true | ||
|
||
# Show a histogram of edits over time | ||
ShowHistory=true | ||
|
||
# Show the date | ||
ShowDate=true | ||
|
||
# Show edges between authors and files, mostly for debug purpose | ||
ShowEdges=false | ||
|
||
# Turn on debug info | ||
ShowDebug=false | ||
|
||
|
||
Font=SansSerif | ||
FontSize=10 | ||
BoldFontSize=14 | ||
|
||
# Natural distance of files to people | ||
EdgeLength=25 | ||
|
||
# Initial life values | ||
EdgeLife=150 | ||
FileLife=150 | ||
PersonLife=255 | ||
|
||
# How much life is lost per frame | ||
EdgeDecrement=-2 | ||
FileDecrement=-2 | ||
PersonDecrement=-1 | ||
|
||
# Initial mass | ||
FileMass=1.0 | ||
PersonMass=100.0 | ||
|
||
# Controls how long a node a person or file is highlighted after | ||
# they're involved in an edit. | ||
HighlightPct=5 | ||
|
||
## Physics engine selection and configuration | ||
# Directory physics engine config files reside in. | ||
PhysicsEngineConfigDir=physics_engine | ||
|
||
## Physical engine selection and configuration | ||
# Force calculation algorithms (PhysicsEngineLegacy, PhysicsEngineSimple...) : | ||
PhysicsEngineSelection=PhysicsEngineOrderly | ||
|
||
#Don't assume the input is sorted | ||
IsInputSorted=false | ||
|
||
# Particle sprite file | ||
ParticleSpriteFile=src/particle.png | ||
|
||
# OpenGL has problems on some platforms. We're closer to having it work | ||
# automatically out of the box, but not close enough to enable it by default | ||
UseOpenGL=false | ||
|
||
# Default user avatar | ||
AvatarFetcher=GravatarFetcher | ||
|
||
#Size in pixels of the width and height of avatar images | ||
AvatarSize=40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Your personal preferences for code_swarm, applied to every visualization | ||
# you run, unless overridden by the individual visualization's config | ||
|
||
#DON'T EDIT THIS FILE IN PLACE, FIRST COPY IT TO defaults/user.config | ||
#CHANGES TO THIS FILE WON'T BE SEEN BY code_swarm, ONLY user.config | ||
|
||
#Some common options to customize: | ||
|
||
# It's much faster if we can use OpenGL, but it still doesn't work on some | ||
# platforms/configurations | ||
UseOpenGL=true | ||
|
||
# The size of the visualization window | ||
Width=1024 | ||
Height=640 | ||
|
||
|
||
#For more options, see defaults/code_swarm.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.