Game Development Reference
In-Depth Information
The javafx.scene.input subpackage includes classes that are used to get input from
the JavaFX application's user. This input is processed using the event handling capab-
ilities, which you will be examining in great detail over the course of this topic and
which you have already experienced in your JavaFX application, in Chapter 3 (see Fig-
ure 3-2 , ll. 22 to 24).
The javafx.scene.layout subpackage contains classes that are used to create UI
design layouts and that can be used for your screen layout designs as well. These lay-
out classes include classes that control and manage backgrounds; add and style bor-
ders; and provide UI pane management, such as StackPane , TilePane , GridPane ,
FlowPane , and AnchorPane . These UI classes offer automatic screen layout al-
gorithms for the UI controls in JavaFX. The Background class (and subclasses) fur-
nishes screen background utilities, and the Border class (and its subclasses) supplies
screen border utilities, which can be used for spicing up the graphics design for your
UI screens.
The javafx.scene.media subpackage holds classes that are used for the playback of
audio or video media, including the Media , MediaPlayer , and MediaView classes.
The Media class (or object, actually) references and contains the media (audio or
video) asset, MediaPlayer plays that asset, and MediaView (in the case of video) dis-
plays the asset. This subpackage also has a Track superclass and AudioTrack ,
VideoTrack , and SubtitleTrack subclasses as well as the AudioClip, AudioEqualizer,
and EquilizerBand classes, which provide advanced audio (equalizer) controls and
short-form audio clips, or snippets of audio that are perfect for use in games. You will
be using the AudioClip class later in the topic (see Chapter 15 ).
The javafx.scene.paint subpackage contains a Stop class and the Paint superclass
and its Color , ImagePattern , LinearGradient , and RadialGradient subclasses as
well as the Material superclass and its PhongMaterial subclass. Those of you who are
familiar with 3D content production will recognize this Phong shader algorithm, which
will allow different surface looks (plastic, rubber, and so on) to be simulated. The Ma-
terial and PhongMaterial classes need 3D capabilities to be present on the playback
hardware to function successfully, just like the SceneAntialiasing, PerspectiveCamera,
and LightBase class (and subclasses). The Paint class creates your Paint object, the Co-
lor class colors this object (fills it with a color), the LinearGradient and RadialGradient
classes fill the Paint object with color gradients, and the Stop class lets you define
where gradient colors start and stop inside the gradients. Finally, there is an ImagePat-
tern class, which can fill a Paint object with a tileable image pattern (this can be quite
useful for games).
The javafx.scene.shape subpackage provides classes for 2D geometry (commonly
referred to as shapes ) as well as for 3D geometry (commonly referred to as meshes) . A
Search WWH ::




Custom Search