Skip to content

Instantly share code, notes, and snippets.

@ksky
Created November 5, 2011 05:18
Show Gist options
  • Select an option

  • Save ksky/1341142 to your computer and use it in GitHub Desktop.

Select an option

Save ksky/1341142 to your computer and use it in GitHub Desktop.

Revisions

  1. ksky revised this gist Dec 18, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion introfx.groovy
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ GroovyFX.start {
    stage = sg.stage(title: "Profile", width: 640, height:380) {
    scene(fill: black) {
    imageView(x: 20, y: 40, rotationAxis: [0, 1.0, 0]) {
    image(json.image.url, width: 200, height: 200)
    image(json.image.url.replaceAll(/sz=50/, 'sz=200'))
    effect reflection(fraction: 0.25)
    transition =
    rotateTransition(1.s, from:0, to:360, tween: ease_out)
  2. ksky revised this gist Nov 13, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion introfx.groovy
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    import groovyx.javafx.*

    key = '*** YOUR Google+ API KEY HERE ***'
    key = '<YOUR Google+ API KEY HERE>'
    uid = 110611905999186598367 // user ID
    url = "https://www.googleapis.com/plus/v1/people/$uid?key=$key".toURL()
    json = new groovy.json.JsonSlurper().parseText(url.text)
  3. ksky revised this gist Nov 13, 2011. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions introfx.groovy
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    import groovyx.javafx.*

    key = '*** YOUR Google+ API KEY HERE ***'
    uid = 110611905999186598367
    uid = 110611905999186598367 // user ID
    url = "https://www.googleapis.com/plus/v1/people/$uid?key=$key".toURL()
    json = new groovy.json.JsonSlurper().parseText(url.text)

    GroovyFX.start {
    def sg = new SceneGraphBuilder()

    stage = sg.stage(title: "コードで自己紹介", width: 640, height:380) {
    stage = sg.stage(title: "Profile", width: 640, height:380) {
    scene(fill: black) {
    imageView(x: 20, y: 40, rotationAxis: [0, 1.0, 0]) {
    image(json.image.url, width: 200, height: 200)
  4. ksky renamed this gist Nov 5, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. ksky revised this gist Nov 5, 2011. 1 changed file with 14 additions and 14 deletions.
    28 changes: 14 additions & 14 deletions gistfile1.groovy
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    import groovyx.javafx.*

    key = 'AIzaSyCHlOGgV6fRQ2tCzwLg2SzxQLGv6HsbMZc'
    key = '*** YOUR Google+ API KEY HERE ***'
    uid = 110611905999186598367
    url = "https://www.googleapis.com/plus/v1/people/$uid?key=$key".toURL()
    json = new groovy.json.JsonSlurper().parseText(url.text)
    @@ -10,19 +10,19 @@ GroovyFX.start {

    stage = sg.stage(title: "コードで自己紹介", width: 640, height:380) {
    scene(fill: black) {
    imageView(x: 20, y: 40, rotationAxis: [0, 1.0, 0]) {
    image(json.image.url, width: 200, height: 200)
    effect reflection(fraction: 0.25)
    transition =
    rotateTransition(1.s, from:0, to:360, tween: ease_out)
    onMouseClicked { transition.play() }
    }
    text(x: 240, y: 60, text: json.displayName,
    fill: white, font: "32pt", textOrigin: "top") {
    effect bloom()
    }
    text(x: 240, y: 120, text: json.tagline,
    fill: white, font: "16pt", textOrigin: "top")
    imageView(x: 20, y: 40, rotationAxis: [0, 1.0, 0]) {
    image(json.image.url, width: 200, height: 200)
    effect reflection(fraction: 0.25)
    transition =
    rotateTransition(1.s, from:0, to:360, tween: ease_out)
    onMouseClicked { transition.play() }
    }
    text(x: 240, y: 60, text: json.displayName,
    fill: white, font: "32pt", textOrigin: "top") {
    effect bloom()
    }
    text(x: 240, y: 120, text: json.tagline,
    fill: white, font: "16pt", textOrigin: "top")
    }
    }
    stage.show()
  6. ksky created this gist Nov 5, 2011.
    30 changes: 30 additions & 0 deletions gistfile1.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    import groovyx.javafx.*

    key = 'AIzaSyCHlOGgV6fRQ2tCzwLg2SzxQLGv6HsbMZc'
    uid = 110611905999186598367
    url = "https://www.googleapis.com/plus/v1/people/$uid?key=$key".toURL()
    json = new groovy.json.JsonSlurper().parseText(url.text)

    GroovyFX.start {
    def sg = new SceneGraphBuilder()

    stage = sg.stage(title: "コードで自己紹介", width: 640, height:380) {
    scene(fill: black) {
    imageView(x: 20, y: 40, rotationAxis: [0, 1.0, 0]) {
    image(json.image.url, width: 200, height: 200)
    effect reflection(fraction: 0.25)
    transition =
    rotateTransition(1.s, from:0, to:360, tween: ease_out)
    onMouseClicked { transition.play() }
    }
    text(x: 240, y: 60, text: json.displayName,
    fill: white, font: "32pt", textOrigin: "top") {
    effect bloom()
    }
    text(x: 240, y: 120, text: json.tagline,
    fill: white, font: "16pt", textOrigin: "top")
    }
    }
    stage.show()
    transition.play()
    }