Commit Graph

94 Commits

Author SHA1 Message Date
CrushedPixel
da9ce46613 Change ReplayHandler and KeyframesModifyEvent to use AdvancedPositionKeyframeList instead of KeyframeList<AdvancedPosition> 2015-09-10 19:31:07 +02:00
CrushedPixel
d839204855 Removed the "Prepare Replay" setting (+1 squashed commit)
Squashed commits:
[74a16a9] Created EntityPositionTracker, which parses the whole Replay when initially loading it and remembers every Entity's Position at any timestamp.
The EntityPositionTracker can be disabled using a Replay Setting.
2015-09-10 19:27:01 +02:00
CrushedPixel
2f522c68fe Instead of using AdvancedPosition objects with a value for spectatedEntityID, use SpectatorData objects for Spectator Keyframes. This allows us to add more options to Spectator Keyframes. 2015-09-04 17:38:10 +02:00
johni0702
04df2ba3a0 Reset spectated entity when leaving replay 2015-09-02 16:44:56 +02:00
johni0702
6b6f6732d5 Add basic replay restriction system (no restrictions yet) 2015-08-30 15:54:48 +02:00
johni0702
a3d3c2dddc Fix spectating being quit on world change / respawn 2015-08-19 12:22:55 +02:00
johni0702
d687748629 The camera entity is now thePlayer 2015-08-19 12:22:55 +02:00
johni0702
8e76d5677e Fix players staying invisible even though replay has ended 2015-08-16 21:04:51 +02:00
CrushedPixel
f2752f2790 Custom Objects are now being saved with Path Presets instead of globally 2015-08-16 18:30:17 +02:00
CrushedPixel
7bc3574515 When setting the last camera position before a time jump, a boolean has to be passed indicating whether that position should be enforced or ignored if it's out of a reasonable distance from the player's position.
This is used by the GuiMarkerTimeline to ensure that jumping to Marker Keyframes actually results in the Marker Keyframe's Position.

The actual code handling Position jumping after Time jumping was moved to the ReplayHandler and is now also called when jumping using the "Please wait" Screen.
2015-07-30 11:29:45 +02:00
CrushedPixel
5427616ceb Reworked ReplayProcess to get rid of own Interpolation instances (as these can be handled by the KeyframeLists)
Camera Paths are now started from the current cursor position, using Ctrl-click the path always starts from the beginning
2015-07-25 14:11:06 +02:00
CrushedPixel
ff65ced4a8 Since ReplayHandler#addKeyframe selects the Keyframe, deselect it after loading a Path Preset 2015-07-23 13:21:26 +02:00
CrushedPixel
e80d71db93 Clearing Keyframes resets the Timeline Cursor Position 2015-07-23 12:34:44 +02:00
CrushedPixel
9d025cfae0 Synchronizing the Replay Timeline now respects the Speed Slider's value as a stretch factor. Shift key ignores that stretch value. 2015-07-21 23:58:56 +02:00
CrushedPixel
f5a9723646 Added getLinearInterpolator() and getCubicInterpolator() methods to KeyframeValue interface to allow for specific Interpolators instead of the Generic Interpolators
Created InterpolationUtils class with a method to fix the Euler Rotation Break problem
Create AdvancedPositionSplineInterpolation and AdvancedPositionLinearInterpolation which always use the shortest possible paths between the Euler Rotation values of the Camera's Yaw and Roll
Remove Position Keyframe filtering when adding the Keyframe. This is now done by the AdvancedPositionInterpolation classes
2015-07-21 03:49:20 +02:00
CrushedPixel
be77bb5a7b Added recalculate() method to KeyframeList to recalc the underlying Interpolation
Recalculate Keyframe Lists in ReplayHandler upon firing a KeyframesModifyEvent
2015-07-20 02:32:20 +02:00
CrushedPixel
e9c87b5c8c Set selected Keyframe to null upon joining a Replay 2015-07-20 01:18:06 +02:00
johni0702
6422558028 General warning cleanup 2015-07-19 16:21:56 +02:00
johni0702
d7b8339f22 Fix infinite loop in exception handling 2015-07-18 16:37:11 +02:00
johni0702
71952e94dd Fix getCameraEntity not being thread safe (concurrent event registration) even though called from multiple threads 2015-07-17 11:48:55 +02:00
CrushedPixel
a55173ffc7 Marker Keyframes are initially selected after creating them and get properly deselected when removing them 2015-07-17 02:30:23 +02:00
CrushedPixel
0614b5e750 Prevent "Synchronize Timelines" feature from exceeding the Keyframe Timeline length 2015-07-17 02:25:51 +02:00
CrushedPixel
154f3e3c04 Do not show Clear Keyframe Callback if no Keyframes present 2015-07-17 01:25:13 +02:00
CrushedPixel
a19317ecdd CameraEntity now registers itself. It doesn't need external code doing its job! 2015-07-16 17:45:52 +02:00
CrushedPixel
830087de36 ReplayHandler#spectateCamera() creates a new CameraEntity if the current instance is null 2015-07-16 14:59:37 +02:00
CrushedPixel
d057553223 Added "inclusive" parameter to getPreviousKeyframe() and getNextKeyframe() in KeyframeList to define whether the next/previous keyframe may have the same timestamp as the realTime parameter
Fixed a bug in KeyframeList#getPositionOnPath where a non-inclusive getPreviousKeyframe call resulted in an incorrect position value
2015-07-14 13:48:48 +02:00
CrushedPixel
a58e06703c Using the DELETE Key, selected Keyframes can now be removed
Added StaticKeybindings to provide non-changeable KeyBindings
2015-07-13 22:27:14 +02:00
CrushedPixel
0f024a9de9 Cleaned up ReplayHandler by unifying selectedKeyframe and selectedMarkerKeyframe into selectedKeyframe, thus only being able to select one Keyframe at once 2015-07-13 22:08:41 +02:00
johni0702
d29cc85dc8 Fix NPE when loading a replay without marker keyframes 2015-07-13 12:21:18 +02:00
CrushedPixel
39558701bf Reworked GuiEditKeyframe to use ComposedElements
Made GuiArrowButton a subclass of GuiAdvancedButton
Added consistency to ReplayHandler by renaming getMarkers() to getMarkerKeyframes() and removing redundant methods which can be accessed via KeyframeList class
2015-07-13 02:03:19 +02:00
CrushedPixel
66c595eb04 Marker Keyframes are now being saved in a KeyframeList in the ReplayHandler
Made MarkerKeyframes names editable in GuiEditKeyframe
Shows "Unnamed Marker" if Marker name is empty
2015-07-13 01:21:48 +02:00
CrushedPixel
f55f169d01 Removed MarkerKeyframe and replaced it with generic type of Keyframe using the new Marker POJO 2015-07-13 00:17:29 +02:00
CrushedPixel
e9a73cb028 use List interface instead of ArrayList implementation in several places 2015-07-12 20:55:13 +02:00
CrushedPixel
45f64faa77 Created CustomObjectRepository which can be serialized by Gson, storing all CustomImageObjects created
CustomObjectRepository is now being saved to and loaded from the ReplayFile
The CustomObjectRenderer uses the GuiObjectManager's timeline cursor position as interpolation timestamp for the CustomImageObjects which are drawn if a GuiObjectManager is open (instant preview)
KeyframeList's add() method now removes Keyframes with the same timestamp before adding the new Keyframe
Transformations class now holds default values to prevent NullPointerExceptions in methods calling getTransformationForTimestamp()
Added Javadoc to Transformation POJO
Created NumberValueChangeListener which can be applied to GuiNumberInput objects
Made step size customizable in GuiDraggingNumberInput
Changing a ReplayImageAssets image now notifies the CustomImageObjects linked to that asset
Modified RoundUtils to provide a round() method which uses the DecimalFormat class instead of Math.round which is unstable
2015-07-12 16:21:11 +02:00
CrushedPixel
ef39c7466d Renamed the commonly used Position POJO into AdvancedPosition, as it also hold pitch, yaw and roll
Made GuiDropdown only accept instances of GuiEntryListEntry to avoid unneccessary toString() methods returning the name
Added GuiEntryListValueEntry which holds a Value and a Name to be displayed
Continued work on GuiObjectManager
2015-07-10 04:27:15 +02:00
CrushedPixel
609c731dc0 Got rid of the OpenEmbeddedChannel, an artifact of the ReplayMod's very beginning. Rest in Peace, old friend. 2015-07-09 16:30:42 +02:00
CrushedPixel
16b74d9824 Included Path Interpolation methods in KeyframeList and uses it in PathPreviewRenderer
Created newInstance() method in KeyframeValue interface
2015-07-08 23:55:48 +02:00
CrushedPixel
901b175efe Created GuiMarkerTimeline to display Markers again
Created helper methods in ReplayHandler to provide information about MarkerKeyframes
2015-07-08 04:46:44 +02:00
CrushedPixel
5100b63964 Warning, GIGANTIC COMMIT!
Replaced Keyframe subclasses with Generic Types of Keyframe and replaced all instanceof calls
Replaced implementations of Linear and Spline interpolation to interpolate any Object that extends KeyframeValue and contains at least one public double Field. I'll need this for Keyframe interpolation in CustomImageObject Transformations
Made MarkerKeyframe *no* subclass of Keyframe to avoid conflicts with PositionKeyframe in instanceof checks for Keyframe#getValue
Created KeyframeList which extends ArrayList to provide some helping functions which DRY up the ReplayHandler
Split up ReplayHandler's keyframeList into timeKeyframeList and positionKeyframeList
2015-07-08 04:13:24 +02:00
CrushedPixel
89cc6938f8 Reworked AssetRepository to link every Asset to a UUID
UUIDs are now being stored in the Replay File and loaded
2015-07-07 20:14:40 +02:00
CrushedPixel
e22b37babe Created ReplayAsset interface and AssetRepository class which can contain such ReplayAssets. ReplayAssets allow users to add custom Files (so far only images, might be extended by .obj files) to the Replay which will later be used for CustomImageObjects.
Created GuiReplayManager to allow users to manage their assets.
Created BoundingUtils class to provide a simple method to fit an image into given bounds. This implementation fixes https://trello.com/c/WTnicWkJ/
2015-07-07 18:45:48 +02:00
CrushedPixel
948803571d GuiAssetAdder now allows to add/remove/edit Assets in a Replay. These Assets are not being saved yet. 2015-07-06 16:39:40 +02:00
CrushedPixel
013d5963ff Created CustomObjectRenderer to allow for BufferedImages to be rendered at a given Position. This supports Zoom and Rotation on all 3 axes. 2015-07-06 00:28:57 +02:00
CrushedPixel
9a30bd70d9 Only rewrites Marker Keyframes in Replay File if they actually changed | https://trello.com/c/tIRxc2lg/ 2015-07-03 13:04:39 +02:00
CrushedPixel
0bb335f692 Added Callback before clearing Keyframes | https://trello.com/c/ZzOk0ju1/ 2015-07-03 12:12:33 +02:00
CrushedPixel
d5007692de Opens "Please wait" GUI Screen if Replay needs to be edited by ReplayFileAppender
Added ReplayExitEvent
2015-07-02 13:24:50 +02:00
johni0702
a058497727 Fix all warnings
Add and make use of Lombok
Remove Mojang API
Remove ZipFileUtils
Remove StreamTools in favor of Apache IOUtils
Keyframe should be abstract all derivatives final
Replace clone in Keyframe with copy
Move some constants from GuiReplaySetttings to GuiConstants
2015-06-29 21:45:37 +02:00
CrushedPixel
645edbb20e Prevent ArrayIndexOutOfBoundsException when loading a newly created Camera Path by loading it from the dirty version | https://trello.com/c/WPikP6ig/ 2015-06-29 16:04:20 +02:00
johni0702
40818bd8b5 Open OOM gui screen instead of crash report on OOM 2015-06-29 09:52:46 +02:00
CrushedPixel
3df1bdcfc8 Added PathPreviewRenderer to draw a Preview of the current Camera Path into the World
Added KeyframesModifyEvent to be dispatched whenever the ReplayHandler's Keyframe List is changed
Refactored Event package
Reworked Settings GUI
2015-06-15 14:41:20 +02:00