本文整理汇总了Java中javafx.scene.effect.Bloom类的典型用法代码示例。如果您正苦于以下问题:Java Bloom类的具体用法?Java Bloom怎么用?Java Bloom使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Bloom类属于javafx.scene.effect包,在下文中一共展示了Bloom类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: newLaser
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Spawns("Laser")
public Entity newLaser(SpawnData data) {
Entity owner = data.get("owner");
Entity bullet = Entities.builder()
.type(BULLET)
.at(owner.getCenter().add(-4.5, -20))
.bbox(new HitBox(BoundingShape.box(9, 20)))
.with(new CollidableComponent(true), new OwnerComponent(owner.getType()))
.with(new OffscreenCleanControl(), new BulletControl(850))
.build();
Texture t = texture("laser2.png");
t.relocate(-2, -20);
EntityView view = new EntityView();
view.addNode(t);
view.setEffect(new Bloom(0.5));
bullet.setView(view);
return bullet;
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:24,代码来源:SpaceInvadersFactory.java
示例2: drawNode
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public Node drawNode() {
Group group = new Group();
final Canvas canvas = new Canvas(110, 110);
GraphicsContext gc = canvas.getGraphicsContext2D();
gc.setEffect(new Bloom() {
{
setThreshold(threshold);
}
});
gc.setFill(Color.BLUE);
gc.setFont(new Font(36));
gc.fillText("Bloom", 5, 30);
group.getChildren().add(canvas);
return group;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:21,代码来源:CanvasEffects2App.java
示例3: configureHeader
import javafx.scene.effect.Bloom; //导入依赖的package包/类
/**
* Configures the header of the application.
*/
private void configureHeader() {
ImageView iconImage = new ImageView(new Image(getClass().getResourceAsStream("/images/app-icon.png")));
iconImage.setFitHeight(80);
iconImage.setFitWidth(80);
Text header = new Text("Gradient Builder");
header.getStyleClass().add("app-header-text");
HBox hb = new HBox();
hb.setAlignment(Pos.CENTER_LEFT);
hb.setSpacing(15);
hb.setPadding(new Insets(10));
hb.getChildren().addAll(iconImage, header);
Bloom bloom = new Bloom();
bloom.setThreshold(0.3);
header.setEffect(bloom);
StackPane background = new StackPane();
background.getStyleClass().add("app-header");
background.getChildren().addAll(hb);
background.setPrefHeight(100);
root.setTop(background);
}
开发者ID:SaiPradeepDandem,项目名称:javafx8-gradient-builder,代码行数:29,代码来源:GradientBuilderApp.java
示例4: initialise
import javafx.scene.effect.Bloom; //导入依赖的package包/类
public void initialise()
{
circle1.setEffect(new Bloom());
circle2.setEffect(new Glow());
circle3.setEffect(new GaussianBlur());
}
开发者ID:jtkb,项目名称:flexfx,代码行数:7,代码来源:AnimatedNodeController.java
示例5: onAdded
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public void onAdded(Entity entity) {
velocity = entity.getControl(ProjectileControl.class).getVelocity();
view.getView().setEffect(new Bloom());
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:7,代码来源:BulletControl.java
示例6: onAdded
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public void onAdded(Entity entity) {
seeker.getView().setEffect(new Bloom(0.5));
adjustVelocity(0.016);
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:6,代码来源:SeekerControl.java
示例7: onAdded
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public void onAdded(Entity entity) {
runner.getView().setEffect(new Bloom(0.5));
bullets = FXGL.getApp().getGameWorld().getGroup(GeoWarsType.BULLET);
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:7,代码来源:RunnerControl.java
示例8: onAdded
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public void onAdded(Entity entity) {
player.getView().setEffect(new Bloom());
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:5,代码来源:PlayerControl.java
示例9: onAdded
import javafx.scene.effect.Bloom; //导入依赖的package包/类
@Override
public void onAdded(Entity entity) {
wanderer.getView().setEffect(new Bloom(0.5));
}
开发者ID:AlmasB,项目名称:FXGLGames,代码行数:5,代码来源:WandererControl.java
示例10: getThemeButton
import javafx.scene.effect.Bloom; //导入依赖的package包/类
private VBox getThemeButton(final String theme)
{
VBox button =new VBox();
if(theme.equals(ObdqProperties.defaultTheme))
{
button.setId("themeIconSelected");
}
else
{
button.setId("themeIcon");
button.setOnMouseClicked(new EventHandler<MouseEvent>()
{
@Override
public void handle(MouseEvent event)
{
SettingsUtils.changeStyle(theme,true);
}
});
}
ImageView themeButtonImage = new ImageView();
themeButtonImage.setId("themeIconImage");
Image image = new Image("file:///"+ObdqProperties.workingDirectoryPath+"/themes/"+theme+"/themeIcon.png");
themeButtonImage.setImage(image);
//Mask Shape
Rectangle mask = new Rectangle();
mask.setWidth(75);
mask.setHeight(75);
mask.setArcWidth(20);
mask.setArcHeight(20);
themeButtonImage.setClip(mask);
Bloom bloom = new Bloom();
bloom.setThreshold(0.7);
DropShadow dropShadow2 = new DropShadow();
dropShadow2.setOffsetX(6.0);
dropShadow2.setOffsetY(4.0);
themeButtonImage.setEffect(dropShadow2);
Label name=new Label(theme);
// name.setContentDisplay(ContentDisplay.CENTER);
name.setId("themeIconLable");
name.setEffect(bloom);
button.getChildren().addAll(themeButtonImage,name);
button.setAlignment(Pos.CENTER);
return button;
}
开发者ID:obdq,项目名称:obdq,代码行数:48,代码来源:SettingsPage.java
注:本文中的javafx.scene.effect.Bloom类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论