javafx.scene.effect.Bloom Java Examples
The following examples show how to use
javafx.scene.effect.Bloom.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpaceInvadersFactory.java From FXGLGames with MIT License | 6 votes |
@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(); }
Example #2
Source File: MouseDragSnippet.java From gef with Eclipse Public License 2.0 | 6 votes |
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); } } }
Example #3
Source File: SpaceInvadersFactory.java From FXGLGames with MIT License | 6 votes |
@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(); }
Example #4
Source File: CoinHighlightViewComponent.java From FXGLGames with MIT License | 5 votes |
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); }
Example #5
Source File: CoinHighlightViewComponent.java From FXGLGames with MIT License | 5 votes |
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); }