-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Timeline length is now dependend on the duration of the animation
- Loading branch information
Noel Bastubee
committed
Jun 9, 2022
1 parent
a4cedb5
commit a20d07e
Showing
12 changed files
with
33 additions
and
30 deletions.
There are no files selected for viewing
16 changes: 6 additions & 10 deletions
16
...mationsEditor-Core.package/AnimationsEditorTimebar.class/instance/addIntermediateLines.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
updating | ||
addIntermediateLines | ||
| positionX intermediateStart intermediateEnd lineRepetition | | ||
|
||
intermediateStart := self timeline startTime + 1. | ||
intermediateEnd := self timeline endTime - 1. | ||
lineRepetition := 100. | ||
intermediateStart to: intermediateEnd | ||
do: [:frame | frame \\ lineRepetition = 0 | ||
ifTrue: [ | ||
positionX := self convertFrameToPosition: frame. | ||
self addLineFrom: positionX @ self height to: positionX @ (self height - self lineHeight)]]. | ||
| positionX frame | | ||
frame := self timeline startTime + self intermediateLineDistance. | ||
[self timeline endTime > frame] | ||
whileTrue: [positionX := self convertFrameToPosition: frame. | ||
self addLineFrom: positionX @ self height to: positionX @ (self height - self lineHeight). | ||
frame := frame + self intermediateLineDistance.]. |
3 changes: 3 additions & 0 deletions
3
...onsEditor-Core.package/AnimationsEditorTimebar.class/instance/intermediateLineDistance.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
constants | ||
intermediateLineDistance | ||
^100. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/update..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
updating | ||
update: aStartEndProperty | ||
self updateExtent. | ||
self startTime: aStartEndProperty startTime. | ||
self endTime: aStartEndProperty endTime. | ||
self endTime: aStartEndProperty endTime. | ||
self updateExtent. | ||
self createTracks. | ||
self addTimebar. |
10 changes: 9 additions & 1 deletion
10
...ges/AnimationsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateExtent.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
updating | ||
updateExtent | ||
self extent: self scrollPane extent - (self borderWidth * 2). | ||
| normalHeight fullWidth | | ||
|
||
normalHeight := self scrollPane height - self borderWidth. | ||
fullWidth := self endTime + self startMargin + self endMargin. | ||
self width: fullWidth. | ||
fullWidth > self scrollPane width | ||
ifTrue: [self height: normalHeight - self scrollPane scrollBarThickness.] | ||
ifFalse: [self height: normalHeight.]. | ||
|
4 changes: 2 additions & 2 deletions
4
...ionsEditor-Core.package/AnimationsEditorTimeline.class/instance/updateStartEndProperty.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
updating | ||
updateStartEndProperty | ||
| startEndProperty | | ||
| startEndProperty | | ||
|
||
startEndProperty := self animationsEditor propertyStartEnd. | ||
startEndProperty property: self property. | ||
startEndProperty property: self property. "<--- Ich vermute, dass diese Zeile nicht ausgeführt wird und dadurch den Defekt erzeugt." | ||
self property subproperties | ||
do:[:subproperty | subproperty addDependent: startEndProperty]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
...tor-Core.package/AnimationsEditorTimelineObject.class/instance/convertFrameToPosition..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
creation | ||
convertFrameToPosition: aFrame | ||
| position totalDuration framesPerPixel frameOffset | | ||
|
||
totalDuration := self timeline endTime - self timeline startTime. | ||
framesPerPixel := totalDuration / self lineSegmentWidth. | ||
frameOffset := aFrame / framesPerPixel. | ||
position := self startMargin + frameOffset. | ||
^ position. | ||
^self startMargin + aFrame. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters