类javafx.scene.effect.Bloom源码实例Demo

下面列出了怎么用javafx.scene.effect.Bloom的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: FXGLGames   文件: SpaceInvadersFactory.java
@Spawns("Laser")
public Entity newLaser(SpawnData data) {
    Entity owner = data.get("owner");

    Texture t = texture("laser2.png");
    t.relocate(-2, -20);
    t.setEffect(new Bloom(0.5));

    return entityBuilder()
            .type(BULLET)
            .at(owner.getCenter().add(-4.5, -20))
            .bbox(new HitBox(BoundingShape.box(9, 20)))
            .view(t)
            .with(new CollidableComponent(true), new OwnerComponent(owner.getType()))
            .with(new OffscreenCleanComponent(), new BulletComponent(850))
            .build();
}
 
源代码2 项目: gef   文件: MouseDragSnippet.java
protected void onMousePress(MouseEvent event) {
	pressed = (Node) event.getTarget();
	System.out.println("press " + pressed);
	startMousePosition = new Point2D(event.getSceneX(), event.getSceneY());
	startLayoutPosition = new Point2D(pressed.getLayoutX(),
			pressed.getLayoutY());

	// add effect
	pressed.setEffect(new Bloom(0));
	IAnchor ifxAnchor = anchors.get(pressed);
	if (ifxAnchor != null) {
		Set<AnchorKey> keys = ifxAnchor.positionsUnmodifiableProperty()
				.keySet();
		for (AnchorKey key : keys) {
			key.getAnchored().setEffect(null);
		}
	}
}
 
源代码3 项目: FXGLGames   文件: SpaceInvadersFactory.java
@Spawns("Laser")
public Entity newLaser(SpawnData data) {
    Entity owner = data.get("owner");

    Texture t = texture("laser2.png");
    t.relocate(-2, -20);
    t.setEffect(new Bloom(0.5));

    return entityBuilder()
            .type(BULLET)
            .at(owner.getCenter().add(-4.5, -20))
            .bbox(new HitBox(BoundingShape.box(9, 20)))
            .view(t)
            .with(new CollidableComponent(true), new OwnerComponent(owner.getType()))
            .with(new OffscreenCleanComponent(), new BulletComponent(850))
            .build();
}
 
源代码4 项目: FXGLGames   文件: CoinHighlightViewComponent.java
public CoinHighlightViewComponent() {
    super(5, 5);

    Rectangle rect = new Rectangle(30, 30, Color.color(0.8, 0, 0, 0.9));
    rect.setArcWidth(15);
    rect.setArcHeight(15);
    rect.setEffect(new Bloom(0.9));

    getViewRoot().getChildren().add(rect);
}
 
源代码5 项目: FXGLGames   文件: CoinHighlightViewComponent.java
public CoinHighlightViewComponent() {
    super(5, 5);

    Rectangle rect = new Rectangle(30, 30, Color.color(0.8, 0, 0, 0.9));
    rect.setArcWidth(15);
    rect.setArcHeight(15);
    rect.setEffect(new Bloom(0.9));

    getViewRoot().getChildren().add(rect);
}
 
 类所在包
 类方法
 同包方法