Alex Walker
Doing cruel and strange things to CSS since 2001
@alexmwalker
"Layouts are groups
of independently, reconfigurable components"
Sometimes
the layout
IS the story.
Moving the image changes the message
James looks to the future
James ignores us...
James Cameron's Twitter
(At least, not without a lot of modelling power)
<div class="stage">
<div class="model_group">
<div class="model_back"></div>
<div class="model_front"></div>
</div>
</div>
4 x DIVS
:before
:before
:after
DIV
:before
:after
DIV
http://codepen.io/alexmwalker/pen/BNmPmw
CSS property:
.stage {
perspective: 800px;
}
What does that number actually mean?
(Almost 2D - flat)
Shapes begin to show a 3rd dimension
Shapes are stretched and warped
in all three directions
#1: Rule of Thumb
http://codepen.io/alexmwalker/pen/qdmrNL?editors=110
CSS property:
(or your preferred preprocessor)
$modelheight: 200px;
$modelwidth:($modelheight*0.70);
$modelspine: ($modelheight*0.085);
$modelshadow: ($modelheight/16);
$perspective: $modelheight*4;
Layering CSS gradients to mimic lights
We need reflections and shadows
The trick is to offset each surface
so the physics made sense.
ADVANTAGES
(Or where is too far?)
http://codepen.io/alexmwalker/pen/PqPzBV?editors=110
CONCLUSION:
Use Canvas, D3, WebGL etc
Complex angles give unpredictable results
Jim Savage - MadebyJam
http://codepen.io/madebyjam/pen/bNERqq?editors=110
Keith Clark
By Alex Walker