main :: IO ()
main =
  do win <- W.makeWindow "Line Plot" (640, 640)
     canvas <- W.initGLFW win

     line <- lineInit $ lineSpec
             { lineSpecVertices = lineVerts
             , lineSpecColors   = L.V3 0.2 0.5 1
             }
     mesh <- meshInit $ meshSpec
             { meshSpecData   = Vertexes meshVerts
             , meshSpecColors = ConstantMeshColor (L.V3 0.2 1 0.1)
             }
     mesh2 <- meshInit $ meshSpec
              { meshSpecData   = Faces meshFaceVerts meshFaceIndices
              , meshSpecColors = ConstantMeshColor (L.V3 1 0.2 0.1)
              }
     mesh3 <- meshInit $ meshSpec
              { meshSpecData   = Vertexes meshVerts ,
                meshSpecColors = VectorMeshColor meshVertColors
              }

     let items = groupNode
                 [ line
                 , mesh
                 , transNode (translation (L.V3 2 2 0)) mesh2
                 , transNode (translation (L.V3 (-1) 1 0)) mesh
                 , transNode (translation (L.V3 (-2) 3 0)) mesh3
                 ]
         cam = panZoomCamera { panZoomCenter = L.V2 1 2
                             , panZoomWidth  = 10
                             , panZoomHeight = 7 }

     network <- compile $ sceneWithCamera canvas (pure items) cam
     actuate network

     W.mainLoop canvas
main :: IO ()
main =
  do win <- W.makeWindow "Line Plot" (640, 640)
     canvas <- W.initGLFW win

     line <- lineInit $ lineSpec
             { lineSpecVertices = lineVerts
             , lineSpecColors   = L.V3 0.2 0.5 1
             }
     mesh <- meshInit $ meshSpec
             { meshSpecData   = Vertexes meshVerts
             , meshSpecColors = ConstantMeshColor (L.V3 0.2 1 0.1)
             }
     mesh2 <- meshInit $ meshSpec
              { meshSpecData   = Faces meshFaceVerts meshFaceIndices
              , meshSpecColors = ConstantMeshColor (L.V3 1 0.2 0.1)
              }
     mesh3 <- meshInit $ meshSpec
              { meshSpecData   = Vertexes meshVerts ,
                meshSpecColors = VectorMeshColor meshVertColors
              }

     let items = groupNode
                 [ line
                 , mesh
                 , transNode (translation (L.V3 2 2 0)) mesh2
                 , transNode (translation (L.V3 (-1) 1 0)) mesh
                 , transNode (translation (L.V3 (-2) 3 0)) mesh3
                 ]
         cam = panZoomCamera { panZoomCenter = L.V2 1 2
                             , panZoomWidth  = 10
                             , panZoomHeight = 7 }

     network <- compile $ sceneWithCamera canvas (pure items) cam
     actuate network

     W.mainLoop canvas
main =
  do win <- W.makeWindow "Line Plot" (640, 640)
     canvas <- W.initGLFW win

     line <- lineInit $ lineSpec
             { lineSpecVertices = lineVerts
             , lineSpecColors   = L.V3 0.2 0.5 1
             }
     mesh <- meshInit $ meshSpec
             { meshSpecData   = Vertexes meshVerts
             , meshSpecColors = ConstantMeshColor (L.V3 0.2 1 0.1)
             }
     mesh2 <- meshInit $ meshSpec
              { meshSpecData   = Faces meshFaceVerts meshFaceIndices
              , meshSpecColors = ConstantMeshColor (L.V3 1 0.2 0.1)
              }
     mesh3 <- meshInit $ meshSpec
              { meshSpecData   = Vertexes meshVerts ,
                meshSpecColors = VectorMeshColor meshVertColors
              }

     let items = groupNode
                 [ line
                 , mesh
                 , transNode (translation (L.V3 2 2 0)) mesh2
                 , transNode (translation (L.V3 (-1) 1 0)) mesh
                 , transNode (translation (L.V3 (-2) 3 0)) mesh3
                 ]
         cam = panZoomCamera { panZoomCenter = L.V2 1 2
                             , panZoomWidth  = 10
                             , panZoomHeight = 7 }

     network <- compile $ sceneWithCamera canvas (pure items) cam
     actuate network

     W.mainLoop canvas