Phil 4.28.14

8:00 – 5:00 SR

  • DB backups
  • Lenny’s making progress in as our new security guy
  • Need to fix the appropriation year calculations in the fake data generator. Done
  • Need to build a YUI template and store it off as a complete project. Done, but I spent a while running in circles trying to get resize to work on the YUI panel. It turns out that you have to enable resize on the node the panel points at. So the code kind of looks like this:
 // If we want to make the panel resize, we have to manipulate the srcNode.
 // This must be done before the Panel is created
 var n = Y.one("#topNode");
 n.plug(Y.Plugin.Resize);

 var panel = new Y.Panel({
     srcNode : n,
     x :200,
     y :100,
     headerContent : 'A Panel containing a widget',
     plugins : [Y.Plugin.Drag]
 });
 panel.render();
  • This also requires that the style for the div have the position: relative property set. Here’s how it’s done in this example:
.topNode{
     position: relative;
     width:800px;
     height:640px;
     background: #bcbcbc;
     overflow: hidden;
}
  • I then spent a while seeing if typescript could be integrated, but it and YUI are really two very different patterns.
  • Working on the WebGL container
    • Set for 2D/3D
    • use defaults (ambient/directional light, perspectives, etc)
    • Show/hide stage
    • Add models. Looking at the code, the cube is currently added as a mesh to a scene. Need to look into how to break that apart. Going to start with the “interaction-simple.html” code from the webgl book and try adding the cube in as a model first.