トップ «前の日記(2009-11-25) 最新 次の日記(2009-11-27)» 編集

日々の破片

著作一覧

2009-11-26

_ FX

なんか作ってみた。
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.animation.Timeline;
import javafx.animation.KeyFrame;
import javafx.scene.shape.Line;
import javafx.scene.paint.Color;
import javafx.animation.Interpolator;
import javafx.scene.shape.Circle;
import javafx.scene.paint.RadialGradient;
import javafx.scene.paint.Stop;
/**
 * @author arton
 */
 var x = 0.0;
 var y = 0.0;
 
Timeline {
         repeatCount: Timeline.INDEFINITE
         keyFrames : [
                 KeyFrame {
                         time : 10s
                         canSkip : true
                         values : [
                             x => 300.0 tween Interpolator.LINEAR,
                             y => function() {
                                     var rx = x - 150.0;
                                     return rx * rx * 0.2
                                          - 0.5 * rx + 70;
                             }()
                         ]
                 }
         ]
}.play();
Stage {
    title: "Timeline"
    width: 300
    height: 300
    scene: Scene {
        fill: RadialGradient {
            centerX: 50, centerY: 10
            radius: 300
            proportional: false
            stops: [
                Stop {
                    offset: 0.0
                    color: Color.web("#3B8DED")
                },
                Stop {
                    offset: 1.0
                    color: Color.web("#044EA4")
                }
            ]
        }
        content: [
                Line {
                        startX: 0, startY: 140
                        endX: 290, endY: 140
                        strokeWidth: 1
                        stroke: Color.BLACK
                }
                Line {
                        startX: 140, startY: 0
                        endX: 140, endY: 300
                        strokeWidth: 1
                        stroke: Color.BLACK
                }
                Circle {
                        centerX: bind x, centerY: bind y
                        radius: 4
                        fill: Color.YELLOW
                }
         ]
    }
}

2003|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|

ジェズイットを見習え