anchor.diff:              updateModel model 
           ) |> ignore
    
  -        ctrl.Mouse.Up.Values.Subscribe(fun p ->     
  +        mouse.Up.Values.Subscribe(fun p ->     
               down <- false
  -            let ray = ctrl.Mouse.Position |> Mod.force |> Camera.pickRay (camera |> Mod.force)
  +            let ray = mouse.Position |> Mod.force |> Camera.pickRay (camera |> Mod.force)
               let model = updatePickMsg (NoPick(MouseEvent.Up p, ray)) model.Value
               updateModel model 
           ) |> ignore
   
  -        view
  -
  -    
  -    let inline createAppAdaptive2< ^model, ^mmodel, ^msg when ^model: (member ToMod : ^model -> ^mmodel) and  ^model: (member Apply : ^model -> unit)> (ctrl : IRenderControl) (camera : IMod<Camera>) (app : App< ^model, ^mmodel,^ msg, ISg< ^msg>>) =
  -        failwith ""
  +        Sg.adapter view
   
   
   module TranslateController =
   
       open ImmutableSceneGraph
  +    open Primitives
  +
       open Elmish3D
       open TranslateController
   
  
positive.code: 
          toSg { trafo = Trafo3d.Identity; color = C4b.White } scene
  
      let pick (r : Ray3d) (s : Scene<'msg>)  =
          let rec go (state : State) s = 
              match s with    
                  | Group xs -> xs |> Seq.toList |>  List.collect (go state)
                  | Transform(t,xs) -> xs |> Seq.toList |> List.collect (go { state with trafo = state.trafo * t })
                  | Colored(_,xs) -> xs |> Seq.toList |> List.collect (go state)
                  | Render(action,Sphere s) ->    
                      let s2 = state.trafo.Forward.TransformPos(s.Center)
                      let mutable ha = RayHit3d.MaxRange
                      if r.HitsSphere(s2,s.Radius,0.0,Double.PositiveInfinity, &ha) then
                          [ha.T, action]
                      else []
                  | Render(action,Cone(center,dir,height,radius)) | Render(action,Cylinder(center,dir,height,radius)) -> 
                      let cylinder = Cylinder3d(state.trafo.Forward.TransformPos center,state.trafo.Forward.TransformPos (center+dir*height),radius)
                      let mutable ha = RayHit3d.MaxRange
                      if r.Hits(cylinder,0.0,Double.MaxValue,&ha) then
                          [ha.T, action]
                      else []
                  | Render(action,Quad(q)) -> 
                      let transformed = Quad3d(q.Points |> Seq.map state.trafo.Forward.TransformPos)
                      let mutable ha = RayHit3d.MaxRange
                      if r.HitsPlane(Plane3d.ZPlane,0.0,Double.MaxValue,&ha) then [ha.T, action]
                      else []
          match s |> go { trafo = Trafo3d.Identity; color = C4b.White } with
              | [] -> []
              | xs -> 
  
negative.code: 
  module InteractionExperiments = 
  
      open AnotherSceneGraph
      open Elmish3DADaptive
  
      [<Demo>]
      let demo () =
  
          let cameraView = 
              CameraView.lookAt (V3d(6.0, 6.0, 6.0)) V3d.Zero V3d.OOI
                  |> Mod.constant
                  //|> DefaultCameraController.control win.Mouse win.Keyboard win.Time
  
          let frustum = 
              App.Size
                  |> Mod.map (fun s -> Frustum.perspective 60.0 0.1 100.0 (float s.X / float s.Y))
  
          let camera = Mod.map2 Camera.create cameraView frustum
  
          let unpersist : Elmish3DADaptive.Unpersist<TranslateController.Model,_> = { unpersist = (fun immut scope -> immut.ToMod(scope)); apply = (fun immut mut scope -> mut.Apply(immut,scope))}
          let adaptiveResult = Elmish3DADaptive.createAppAdaptive App.Keyboard App.Mouse camera unpersist TranslateController2.app
  
          let sg = 
              //Elmish3D.createApp win camera TranslateController.app
              //Elmish3D.createApp win camera SimpleDrawingApp.app
              //Elmish3D.createApp win camera PlaceTransformObjects.app
              adaptiveResult
              //view :> ISg
  
          let fullScene =
                sg 
                  |> Sg.andAlso (Sg.box' C4b.White Box3d.Unit |> Sg.translate 10000.0 10000.0 1000.0)
                  |> Sg.effect [
                      DefaultSurfaces.trafo |> toEffect       
                      DefaultSurfaces.vertexColor |> toEffect
                      DefaultSurfaces.simpleLighting |> toEffect 
                     ] 
                  |> Sg.viewTrafo (Mod.map CameraView.viewTrafo cameraView)
                  |> Sg.projTrafo (Mod.map Frustum.projTrafo frustum)
  
  
          App.Runtime.CompileRender(App.FramebufferSignature, fullScene)