Class SceneBuilder
java.lang.Object
com.simibubi.create.foundation.ponder.SceneBuilder
Enqueue instructions to the schedule via this object's methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionAdditional tools for debugging ponder and bypassing the facadeSpecial effects to embellish and communicate withPonder's toolkit for showing information on top of the scene world, such as highlighted bounding boxes, texts, icons and keybindings.Random other instructions that might come in handyInstructions for manipulating the schematic and its currently visible areas. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstruction(PonderInstruction instruction) Adds an instruction to the scene.voidaddInstruction(Consumer<PonderScene> callback) Adds a simple instruction to the scene.voidAdds a Key Frame at the end of the last delay() instruction for the users to skip tovoidAdds a Key Frame a couple ticks after the last delay() instruction for the users to skip tovoidconfigureBasePlate(int xOffset, int zOffset, int basePlateSize) Communicates to the ponder UI which parts of the schematic make up the base horizontally.voididle(int ticks) Before running the upcoming instructions, wait for a duration to let previous actions play out.voididleSeconds(int seconds) Before running the upcoming instructions, wait for a duration to let previous actions play out.voidOnce the scene reaches this instruction in the timeline, mark it as "finished".voidrotateCameraY(float degrees) Pans the scene's camera view around the vertical axis by the given amountvoidscaleSceneView(float factor) Use this in case you are not happy with the scale of the scene relative to the overlayvoidsetSceneOffsetY(float yOffset) Use this in case you are not happy with the vertical alignment of the scene relative to the overlayvoidFade the layer of blocks into the scene ponder assumes to be the base plate of the schematic's structure.voidAssign a unique translation key, as well as the standard english translation for this scene's title using this method, anywhere inside the program function.
-
Field Details
-
overlay
Ponder's toolkit for showing information on top of the scene world, such as highlighted bounding boxes, texts, icons and keybindings. -
world
Instructions for manipulating the schematic and its currently visible areas. Allows to show, hide and modify blocks as the scene plays out. -
debug
Additional tools for debugging ponder and bypassing the facade -
effects
Special effects to embellish and communicate with -
special
Random other instructions that might come in handy
-
-
Constructor Details
-
SceneBuilder
-
-
Method Details
-
title
Assign a unique translation key, as well as the standard english translation for this scene's title using this method, anywhere inside the program function.- Parameters:
sceneId-title-
-
configureBasePlate
public void configureBasePlate(int xOffset, int zOffset, int basePlateSize) Communicates to the ponder UI which parts of the schematic make up the base horizontally. Use of this is encouraged whenever there are components outside the the base plate.
As a result, showBasePlate() will only show the configured size, and the scene's scaling inside the UI will be consistent with its base size.- Parameters:
xOffset- Block spaces between the base plate and the schematic boundary on the Western side.zOffset- Block spaces between the base plate and the schematic boundary on the Northern side.basePlateSize- Length in blocks of the base plate itself. Ponder assumes it to be square
-
scaleSceneView
public void scaleSceneView(float factor) Use this in case you are not happy with the scale of the scene relative to the overlay- Parameters:
factor- >1 will make the scene appear larger, smaller otherwise
-
setSceneOffsetY
public void setSceneOffsetY(float yOffset) Use this in case you are not happy with the vertical alignment of the scene relative to the overlay- Parameters:
yOffset- >0 moves the scene up, down otherwise
-
showBasePlate
public void showBasePlate()Fade the layer of blocks into the scene ponder assumes to be the base plate of the schematic's structure. Makes for a nice opener -
addInstruction
Adds an instruction to the scene. It is recommended to only use this method if another method in this class or its subclasses does not already allow adding a certain instruction. -
addInstruction
Adds a simple instruction to the scene. It is recommended to only use this method if another method in this class or its subclasses does not already allow adding a certain instruction. -
idle
public void idle(int ticks) Before running the upcoming instructions, wait for a duration to let previous actions play out.
Idle does not stall any animations, only schedules a time gap between instructions.- Parameters:
ticks- Duration to wait for
-
idleSeconds
public void idleSeconds(int seconds) Before running the upcoming instructions, wait for a duration to let previous actions play out.
Idle does not stall any animations, only schedules a time gap between instructions.- Parameters:
seconds- Duration to wait for
-
markAsFinished
public void markAsFinished()Once the scene reaches this instruction in the timeline, mark it as "finished". This happens automatically when the end of a storyboard is reached, but can be desirable to do earlier, in order to bypass the wait for any residual text windows to time out.
So far this event only affects the "next scene" button in the UI to flash. -
rotateCameraY
public void rotateCameraY(float degrees) Pans the scene's camera view around the vertical axis by the given amount- Parameters:
degrees-
-
addKeyframe
public void addKeyframe()Adds a Key Frame at the end of the last delay() instruction for the users to skip to -
addLazyKeyframe
public void addLazyKeyframe()Adds a Key Frame a couple ticks after the last delay() instruction for the users to skip to
-