Skip to content

Commit

Permalink
Two working tests, one almost working
Browse files Browse the repository at this point in the history
  • Loading branch information
Ol-Ba committed May 29, 2022
1 parent 63ee3e9 commit c440e42
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"lineWidth" : "SG 5/23/2022 18:47",
"movingLine" : "SG 5/23/2022 18:48",
"movingLine:" : "SG 5/23/2022 18:48",
"step" : "ob 5/27/2022 15:41",
"step" : "ob 5/29/2022 17:26",
"stepTime" : "SG 5/23/2022 18:37" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
endMargin

^25.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
calculation
moveMovingLine: aLine
|duration offset endPositionX|
endPositionX := self timeline width - 25.
"duration := (self timeline endTime - self timeline startTime)/100. --> richtige Zeit"
(aLine x >= endPositionX) ifTrue: [aLine position: endPositionX @ (aLine position y)"self abandon"]
ifFalse:
[

duration := (self timeline endTime - self timeline startTime)/100.
offset := (self timeline width - 105- 25) / duration.
aLine position: aLine position + (offset@0).]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
startMargin

^105.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
testing
testMovingLineInRightPosition
| positionProperty delay|
| positionProperty d|
positionProperty := (self animationsEditorInstance propertyList at: 2) subproperties at: 'position'.
self animationsEditorInstance selectedTreeNode: positionProperty.
positionProperty
Expand All @@ -9,11 +9,23 @@ positionProperty := (self animationsEditorInstance propertyList at: 2) subproper
frame: 1000;
addKeyframe.

self animationsEditorInstance playAnimations.
self movingLine: self timeline movingLine.
"self animationsEditorInstance playAnimations."
"self timeline createMovingLine."
d:= Morph new extent: 3@100;
color: Color black;
position: 105@25.
1000 timesRepeat: [self moveMovingLine: d].
Transcript show: d position x.
d comeToFront.
"delay := Delay forMilliseconds: 500."
Delay forMilliseconds: 500.
self movingLine: self timeline movingLine.
self movingLine stopStepping.
"Delay forMilliseconds: 500. "

"self movingLine stopStepping. "

self assert: (d position) = ((self timeline width - 25)@ self timeline trackHeight).




self assert: (self movingLine position x) = ((self timeline width - 150)/2+125).


Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
testing
testMovingLineInitializedInRightPosition

self timeline createMovingLine.
self movingLine: self timeline movingLine.
self assert: (self movingLine position ) = (self movingLine startMargin @ self timeline trackHeight).






Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
testing
testMovingLineStoppedAtEndMargin
|movingLine|
movingLine:= Morph new extent: 3@100;
color: Color black;
position: self startMargin @self timeline trackHeight.
1000 timesRepeat: [self moveMovingLine: movingLine].
self assert: (movingLine position) = ((self timeline width - self endMargin)@ self timeline trackHeight).






Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"calculateKeyframeCenterOn:" : "NB 8/1/2021 14:07",
"createKeyframeWith:on:" : "NB 8/1/2021 14:21",
"endFrame" : "MH 8/1/2021 18:42",
"endMargin" : "ob 5/29/2022 17:48",
"frameNumber100" : "NB 8/1/2021 14:52",
"keyframeHeightOn:" : "NB 8/1/2021 14:07",
"keyframeWidthOn:" : "NB 8/1/2021 14:07",
"middleOfAnimationTime" : "NB 8/1/2021 16:09",
"moveMovingLine:" : "ob 5/29/2022 17:43",
"movingLine" : "ob 5/27/2022 16:57",
"movingLine:" : "ob 5/27/2022 16:57",
"paddingDistance" : "NB 8/1/2021 16:04",
Expand All @@ -21,10 +23,13 @@
"secondLastOn:" : "NB 8/1/2021 12:16",
"setUp" : "ob 5/27/2022 17:02",
"startFrame" : "MH 8/1/2021 18:42",
"startMargin" : "ob 5/29/2022 17:46",
"tearDown" : "NB 8/1/2021 12:38",
"testAddKeyframeToRightPosition" : "NB 8/1/2021 15:22",
"testDistanceBetweenKeyframes" : "mjs 8/1/2021 16:45",
"testMovingLineInRightPosition" : "ob 5/27/2022 17:16",
"testMovingLineInRightPosition" : "ob 5/29/2022 17:40",
"testMovingLineInitializedInRightPosition" : "ob 5/29/2022 17:34",
"testMovingLineStoppedAtEndMargin" : "ob 5/29/2022 17:48",
"timeline" : "MH 8/1/2021 18:43",
"timeline:" : "MH 8/1/2021 18:43",
"wait:" : "ob 5/27/2022 16:59",
Expand Down

0 comments on commit c440e42

Please sign in to comment.