-
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.
- Loading branch information
Showing
23 changed files
with
144 additions
and
10 deletions.
There are no files selected for viewing
10 changes: 6 additions & 4 deletions
10
packages/AnimationsEditor-Core.package/AnimationsEditorMovingLine.class/instance/step.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,11 +1,13 @@ | ||
as yet unclassified | ||
step | ||
|duration offset| | ||
|duration offset endPositionX| | ||
endPositionX := self timeline width - (self endMargin). | ||
"duration := (self timeline endTime - self timeline startTime)/100. --> richtige Zeit" | ||
((self position x) > (self convertFrameToPosition: (self timeline endTime))) ifTrue: [self abandon] | ||
(self position x >= endPositionX) ifTrue: [self position: endPositionX @ (self position y)"self abandon"] | ||
ifFalse: | ||
[duration := (self timeline endTime - self timeline startTime)/100. | ||
[ | ||
|
||
duration := (self timeline endTime - self timeline startTime)/100. | ||
offset := (self timeline width - (self startMargin) - (self endMargin)) / duration. | ||
self position: self position + (offset@0).] | ||
|
||
|
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
Empty file.
3 changes: 3 additions & 0 deletions
3
...Editor-Tests.package/AnimationsEditorMovingLineTest.class/instance/addedKeyframeMorph..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 @@ | ||
accessing | ||
addedKeyframeMorph: anObject | ||
addedKeyframeMorph := anObject |
3 changes: 3 additions & 0 deletions
3
...sEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/addedKeyframeMorph.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 @@ | ||
accessing | ||
addedKeyframeMorph | ||
^ addedKeyframeMorph |
3 changes: 3 additions & 0 deletions
3
...imationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/movingLine..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 @@ | ||
accessing | ||
movingLine: anObject | ||
movingLine := anObject |
3 changes: 3 additions & 0 deletions
3
...nimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/movingLine.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 @@ | ||
accessing | ||
movingLine | ||
^ movingLine |
13 changes: 13 additions & 0 deletions
13
...ges/AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/setUp.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,13 @@ | ||
as yet unclassified | ||
setUp | ||
|
||
| morph | | ||
|
||
super setUp. | ||
self animationsEditorInstance: AnimationsEditor open. | ||
morph := Morph new openInWorld. | ||
self animationsEditorInstance addTargetMorph: morph. | ||
self timeline: self animationsEditorInstance timeline. | ||
self animationsEditorInstance selectedTreeNode: self propertyPosition. | ||
self positionTrack: (self timeline submorphs at: 5). | ||
self movingLine: self timeline movingLine. |
16 changes: 16 additions & 0 deletions
16
...ts.package/AnimationsEditorMovingLineTest.class/instance/testMovingLineInRightPosition.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,16 @@ | ||
as yet unclassified | ||
testMovingLineInRightPosition | ||
| positionProperty | | ||
positionProperty := (self animationsEditorInstance propertyList at: 2) subproperties at: 'position'. | ||
self animationsEditorInstance selectedTreeNode: positionProperty. | ||
positionProperty | ||
positionX: 555; | ||
positionY: 555; | ||
frame: 1000; | ||
addKeyframe. | ||
|
||
self animationsEditorInstance playAnimations. | ||
self wait: 500. | ||
self movingLine stopStepping. | ||
|
||
self assert: (self movingLine position x) = 90. |
3 changes: 3 additions & 0 deletions
3
...s/AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/timeEnd.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 @@ | ||
as yet unclassified | ||
timeEnd | ||
^1000. |
3 changes: 3 additions & 0 deletions
3
...AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/timeline..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 @@ | ||
accessing | ||
timeline: anObject | ||
timeline := anObject |
3 changes: 3 additions & 0 deletions
3
.../AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/timeline.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 @@ | ||
accessing | ||
timeline | ||
^ timeline |
6 changes: 6 additions & 0 deletions
6
...ges/AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/instance/wait..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,6 @@ | ||
as yet unclassified | ||
wait: milliseconds | ||
"Wait some time in terms of the main world cycle. Split up waiting time into slices of 5 virtual milliseconds to get close to the real behavior." | ||
|
||
self waitNow: 0. | ||
milliseconds // 5 timesRepeat: [self waitNow: 5]. |
14 changes: 14 additions & 0 deletions
14
...AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/methodProperties.json
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,14 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"addedKeyframeMorph" : "ob 5/27/2022 16:53", | ||
"addedKeyframeMorph:" : "ob 5/27/2022 16:53", | ||
"movingLine" : "ob 5/27/2022 16:44", | ||
"movingLine:" : "ob 5/27/2022 16:44", | ||
"setUp" : "ob 5/27/2022 16:47", | ||
"testMovingLineInRightPosition" : "ob 5/27/2022 16:52", | ||
"timeEnd" : "ob 5/27/2022 16:28", | ||
"timeline" : "ob 5/27/2022 16:53", | ||
"timeline:" : "ob 5/27/2022 16:53", | ||
"wait:" : "ob 5/27/2022 16:40" } } |
18 changes: 18 additions & 0 deletions
18
packages/AnimationsEditor-Tests.package/AnimationsEditorMovingLineTest.class/properties.json
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,18 @@ | ||
{ | ||
"category" : "AnimationsEditor-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"movingLine", | ||
"animationsEditorInstance", | ||
"timeline", | ||
"positionTrack", | ||
"addedKeyframeMorph" ], | ||
"name" : "AnimationsEditorMovingLineTest", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"type" : "normal" } |
3 changes: 3 additions & 0 deletions
3
...AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/movingLine..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 @@ | ||
accessing | ||
movingLine: anObject | ||
movingLine := anObject |
3 changes: 3 additions & 0 deletions
3
.../AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/movingLine.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 @@ | ||
accessing | ||
movingLine | ||
^ movingLine |
6 changes: 4 additions & 2 deletions
6
packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/setUp.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,11 +1,13 @@ | ||
testing | ||
setUp | ||
| morph | | ||
| morph referenceTime | | ||
|
||
super setUp. | ||
referenceTime := WorldState lastCycleTime. | ||
self animationsEditorInstance: AnimationsEditor open. | ||
morph := Morph new openInWorld. | ||
self animationsEditorInstance addTargetMorph: morph. | ||
self timeline: self animationsEditorInstance timeline. | ||
self animationsEditorInstance selectedTreeNode: self propertyPosition. | ||
self positionTrack: (self timeline submorphs at: 5). | ||
self positionTrack: (self timeline submorphs at: 5). | ||
|
19 changes: 19 additions & 0 deletions
19
...ests.package/AnimationsEditorTimelineTest.class/instance/testMovingLineInRightPosition.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,19 @@ | ||
testing | ||
testMovingLineInRightPosition | ||
| positionProperty delay| | ||
positionProperty := (self animationsEditorInstance propertyList at: 2) subproperties at: 'position'. | ||
self animationsEditorInstance selectedTreeNode: positionProperty. | ||
positionProperty | ||
positionX: 555; | ||
positionY: 555; | ||
frame: 1000; | ||
addKeyframe. | ||
|
||
self animationsEditorInstance playAnimations. | ||
self movingLine: self timeline movingLine. | ||
"delay := Delay forMilliseconds: 500." | ||
Delay forMilliseconds: 500. | ||
self movingLine: self timeline movingLine. | ||
self movingLine stopStepping. | ||
|
||
self assert: (self movingLine position x) = ((self timeline width - 150)/2+125). |
6 changes: 6 additions & 0 deletions
6
packages/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/wait..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,6 @@ | ||
calculation | ||
wait: milliseconds | ||
"Wait some time in terms of the main world cycle. Split up waiting time into slices of 5 virtual milliseconds to get close to the real behavior." | ||
|
||
self waitNow: 0. | ||
milliseconds // 5 timesRepeat: [self waitNow: 5]. |
5 changes: 5 additions & 0 deletions
5
...es/AnimationsEditor-Tests.package/AnimationsEditorTimelineTest.class/instance/waitNow..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,5 @@ | ||
calculation | ||
waitNow: milliseconds | ||
|referenceTime| | ||
referenceTime := referenceTime + milliseconds. | ||
AnimAnimationRegistry value updateAnimations: referenceTime. |
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