Style + some fix

This commit is contained in:
Yann Esposito 2012-06-13 18:01:23 +02:00
parent e62e23d01c
commit 505a5dd323
3 changed files with 28 additions and 18 deletions

View file

@ -47,21 +47,21 @@ It means, the user input will transform the world state.
> -- Centralize all user input interaction
> inputActionMap :: InputMap World
> inputActionMap = inputMapFromList [
> (Press 'k' , rotate xdir 5)
> (Press 'k' , rotate xdir 5)
> ,(Press 'i' , rotate xdir (-5))
> ,(Press 'j' , rotate ydir 5)
> ,(Press 'j' , rotate ydir 5)
> ,(Press 'l' , rotate ydir (-5))
> ,(Press 'o' , rotate zdir 5)
> ,(Press 'o' , rotate zdir 5)
> ,(Press 'u' , rotate zdir (-5))
> ,(Press 'f' , translate xdir 0.1)
> ,(Press 'f' , translate xdir 0.1)
> ,(Press 's' , translate xdir (-0.1))
> ,(Press 'e' , translate ydir 0.1)
> ,(Press 'e' , translate ydir 0.1)
> ,(Press 'd' , translate ydir (-0.1))
> ,(Press 'z' , translate zdir 0.1)
> ,(Press 'z' , translate zdir 0.1)
> ,(Press 'r' , translate zdir (-0.1))
> ,(Press '+' , zoom 1.1)
> ,(Press '+' , zoom 1.1)
> ,(Press '-' , zoom (1/1.1))
> ,(Press 'h' , resize 1.2)
> ,(Press 'h' , resize 1.2)
> ,(Press 'g' , resize (1/1.2))
> ]

View file

@ -1,17 +1,23 @@
## Optimization
All feel good from the architecture point of vue.
More precisely, the separation between rendering and world behavior is clear.
But this is extremely slow now.
Because we compute the Mandelbulb for each frame now.
From the architecture stand point all is clear.
If you read the code, you'll see I didn't made everything perfect, for example, I didn't coded nicely the lights.
But I believe it is a good first step and it will be easy to go further.
The separation between rendering and world behavior is clear.
Unfortunately the program of the preceding session is extremely slow.
We compute the Mandelbulb for each frame now.
Before we had
Constant Function -> Constant List of Triangles -> Display
<code class="no-highlight">
Constant Function -> Constant List of Triangles -> Display
</code>
Now we have
World -> Function -> List of Objects -> Atoms -> Display
<code class="no-highlight">
World -> Function -> List of Objects -> Atoms -> Display
</code>
And the World state could change.
Then it is no more straightforward for the compiler to understand

12
prev
View file

@ -16,7 +16,11 @@ print -- "Create article"
print -- "Copy source codes"
ycp() {
print -- $*
local precedent=""
for e in $*;do
[[ $precedent != "" ]] && print -- "\t$precedent"
precedent=$e
done
cp $*
}
latestArticleDir=$(ls -l $webroot/latest.ymd | perl -pi -e 's#.*/##; s#.md$##')
@ -25,10 +29,10 @@ for langue in en fr; do
[[ ! -d $dst ]] && mkdir -p $dst
ycp *.lhs(N) $dst
for dir in ??_*(N/); do
mkdir $dst/$dir
ycp $dir/*.{lhs,hs} $dst/$dir
[[ ! -d $dst/$dir ]] && mkdir $dst/$dir
ycp $dir/*.{lhs,hs}(.N) $dst/$dir
done
done
print -- "\nRecompile"
cd $webroot
./tasks/recompile