Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Content

May include stylesheets, mouse events, key events, javafx container Panes, or javafx Nodes. 

...

Code Block
GroovyFX.start({ primaryStage ->  
    def sg = new SceneGraphBuilder(primaryStage);
    
    sg.stage(
        title: "CircleT3D (Groovy)",
        visible: true,
        resizable: true
    ) {
         scene(fill: lightgreen, camera: new PerspectiveCamera(), width: 400, height:300) {
             stylesheets( urls: "file://mystyle.css" )
             onKeyReleasedonMousePressed( onEvent: { event -> println "scene key" + event.textmouse press"})
             onKeyReleased( onEvent: { event -> println "scene key" + event.text}) 
            
             circle(centerX: 200, centerY: 150, radius: 75, fill: blue,
                rotate: 30, rotationAxis: Rotate.Y_AXIS)
         }
    }
})