Skip to content

Commit

Permalink
Enter commit log message here
Browse files Browse the repository at this point in the history
  • Loading branch information
fhradilak committed May 13, 2021
1 parent c13c329 commit 1790057
Show file tree
Hide file tree
Showing 23 changed files with 75 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
as yet unclassified
addMorphFromSpec: aDictionary
| morph |
| morph morphProperty |
morph := (self createMorphFromString: (aDictionary at: 'type')) openInWorld.
(aDictionary at: 'properties')
do: [:each | (self propertiesDictionary at: (each at: 'name') asSymbol)
value: morph
value: (each at: 'value')].
self addTargetMorph: morph.
self loadStartProperties: (aDictionary at: 'properties') with: morph.
morphProperty := self addTargetMorph: morph.
self loadFramesFromJSON: (aDictionary at: 'frames') with: morphProperty.




Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ addTargetMorph: aMorph
newTarget targetMorph: aMorph.
newTarget title: '', (self propertyList size ), ' - ', aMorph className.

newTarget subproperties add: (self createRotationPropertyFrom: aMorph).
newTarget subproperties add: (self createColorPropertyFrom: aMorph).
newTarget subproperties add: (self createPositionPropertyFrom: aMorph).
newTarget subproperties add: (self createSizePropertyFrom: aMorph).
newTarget subproperties at: 'rotation' put: (self createRotationPropertyFrom: aMorph).
newTarget subproperties at: 'color' put: (self createColorPropertyFrom: aMorph).
newTarget subproperties at: 'position' put: (self createPositionPropertyFrom: aMorph).
newTarget subproperties at: 'size' put: (self createSizePropertyFrom: aMorph).
self propertyList add: newTarget.
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector.
self addTimeline.
self addTimeline.
^ newTarget.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ createRotationPropertyFrom: aMorph
| rotationTarget |
rotationTarget := (AnimationsEditorPropertyRotation new).
rotationTarget targetMorph: aMorph.
rotationTarget targetRotation: aMorph rotationDegrees.
^ rotationTarget.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
as yet unclassified
loadFramesFromJSON: anArray with: anAnimationEditorProperty

"| aMorph |
anArray
do: [:each | (self propertiesDictionary at: (each at: 'name') asSymbol)
value: aMorph
value: (each at: 'value')].
"


Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
buildComponents
loadJSON: aText
| data morphs |
| data |

data:= STON fromString: aText.

self propertyStartEnd startTime: (self propertyStartEnd startTime min: (data at: 'start')).
self propertyStartEnd endTime: (self propertyStartEnd endTime max: (data at: 'end')).
self loadStartEnd: data.

morphs:= data at: 'morphs'.
morphs do:[:each | self addMorphFromSpec: each ].

self loadMorphs: (data at: 'morphs').
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
buildComponents
loadMorphs: anArray

anArray do: [:each | self addMorphFromSpec: each].
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
buildComponents
loadStartEnd: aDictionary
self propertyStartEnd startTime: (self propertyStartEnd startTime min: (aDictionary at: 'start')).
self propertyStartEnd endTime: (self propertyStartEnd endTime max: (aDictionary at: 'end')).
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
as yet unclassified
loadStartProperties: anArray with: aMorph

anArray
do: [:each | (self propertiesDictionary at: (each at: 'name') asSymbol)
value: aMorph
value: (each at: 'value')].


Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"class" : {
"open" : "DM 8/4/2020 13:18" },
"instance" : {
"addMorphFromSpec:" : "FH 5/9/2021 16:30",
"addMorphFromSpec:" : "FH 5/13/2021 11:03",
"addSelectedMorphFor:" : "DM 8/5/2020 21:11",
"addTargetMorph:" : "DM 8/7/2020 21:26",
"addTargetMorph:" : "FH 5/13/2021 11:26",
"addTimeline" : "DM 8/7/2020 21:26",
"buildAddMorphButtonWith:" : "FH 5/9/2021 13:19",
"buildButtonBarWith:" : "FH 5/9/2021 13:20",
Expand All @@ -25,7 +25,7 @@
"createColorPropertyFrom:" : "DM 8/7/2020 10:48",
"createMorphFromString:" : "FH 5/9/2021 15:31",
"createPositionPropertyFrom:" : "DM 8/6/2020 10:09",
"createRotationPropertyFrom:" : "DM 7/8/2020 14:29",
"createRotationPropertyFrom:" : "FH 5/13/2021 10:16",
"createSizePropertyFrom:" : "DM 7/8/2020 14:29",
"defaultEmptyPanels" : "DM 8/7/2020 17:37",
"defaultPropertyPanelPosition" : "DM 8/6/2020 10:38",
Expand All @@ -42,7 +42,11 @@
"initialize" : "DM 6/22/2020 01:26",
"initializePropertyEditorPanel" : "DM 8/6/2020 10:38",
"insertMorph:Into:" : "JIZ 6/3/2020 16:56",
"loadJSON:" : "FH 5/9/2021 16:28",
"loadFramesFromJSON:with:" : "FH 5/13/2021 12:02",
"loadJSON:" : "FH 5/13/2021 10:44",
"loadMorphs:" : "FH 5/13/2021 10:48",
"loadStartEnd:" : "FH 5/13/2021 10:40",
"loadStartProperties:with:" : "FH 5/13/2021 11:04",
"mainWindow" : "JIZ 6/3/2020 17:04",
"mainWindow:" : "JIZ 6/3/2020 17:04",
"morphTypes" : "FH 5/9/2021 16:11",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defaults
defaultSubproperties
^ (OrderedCollection new).
^ (Dictionary new).
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
animation
resetTargetMorph

self targetMorph position: (self copyOfTargetMorph) position.
self targetMorph color: (self copyOfTargetMorph) color.
self targetMorph extent: (self copyOfTargetMorph) extent.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
animation
resetTargetMorphForAllProperties
self subproperties collect: [ :each | each resetTargetMorph ].
self subproperties valuesDo: [ :each | each resetTargetMorph ].
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"copyOfTargetMorph:" : "DM 7/8/2020 13:45",
"createAnimationFor:" : "DM 8/6/2020 11:05",
"createAnimationFor:withDuration:" : "DM 8/6/2020 11:01",
"defaultSubproperties" : "DM 8/6/2020 10:59",
"defaultSubproperties" : "FH 5/13/2021 11:24",
"defaultTargetDuration" : "DM 8/6/2020 10:39",
"hasSubproperties" : "DM 8/6/2020 11:02",
"playAnimationWithDuration:" : "DM 8/6/2020 10:29",
"resetTargetMorph" : "DM 8/6/2020 10:33",
"resetTargetMorphForAllProperties" : "DM 8/5/2020 21:08",
"resetTargetMorph" : "FH 5/13/2021 12:03",
"resetTargetMorphForAllProperties" : "FH 5/13/2021 12:02",
"subproperties" : "DM 8/6/2020 10:58",
"subproperties:" : "DM 5/20/2020 14:04",
"targetDuration" : "DM 8/6/2020 10:39",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
accessing
contents
^ self item subproperties sorted collect: [ :each |

^ self item subproperties sorted asOrderedCollection collect: [ :each |
self class
with: each
model: self model].
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
},
"instance" : {
"asString" : "DM 5/14/2020 15:02",
"contents" : "DM 8/6/2020 11:04",
"contents" : "FH 5/13/2021 12:22",
"hasContents" : "DM 5/20/2020 14:05",
"icon" : "DM 5/14/2020 14:00",
"setItem:model:parent:" : "DM 5/14/2020 15:11" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ testHasSubProperties

propertyItem := AnimationsEditorProperty new.
subpropertyItem := AnimationsEditorProperty new.
propertyItem subproperties add: subpropertyItem.
propertyItem subproperties at: 'property' put: subpropertyItem.

self assert: (propertyItem hasSubproperties = true).
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"instance" : {
"testComparators" : "DM 8/4/2020 13:46",
"testEmptySubProperties" : "DM 8/4/2020 13:47",
"testHasSubProperties" : "DM 8/4/2020 13:47",
"testHasSubProperties" : "FH 5/13/2021 12:23",
"testInstanceCreation" : "DM 8/4/2020 13:47",
"testSetTitle" : "DM 8/4/2020 13:46" } }
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ testContents
| propertyWrapper propertyItem subpropertyItem |

propertyItem := AnimationsEditorProperty new.
subpropertyItem := AnimationsEditorProperty new.
subpropertyItem := AnimationsEditorPropertyPosition new.
propertyWrapper := AnimationsEditorPropertyWrapper new.

propertyItem subproperties add: subpropertyItem.
propertyItem subproperties at: 'property' put: subpropertyItem.
propertyWrapper setItem: propertyItem.
self assert: (propertyWrapper contents size = 0) not.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ testHasContents
subpropertyItem := AnimationsEditorProperty new.
propertyWrapper := AnimationsEditorPropertyWrapper new.

propertyItem subproperties add: subpropertyItem.
propertyItem subproperties at: 'property' put: subpropertyItem.
propertyWrapper setItem: propertyItem.

self assert: (propertyWrapper hasContents = true).
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
},
"instance" : {
"testAsString" : "DM 8/4/2020 13:48",
"testContents" : "DM 8/4/2020 13:48",
"testHasContents" : "DM 8/4/2020 13:49",
"testContents" : "FH 5/13/2021 12:09",
"testHasContents" : "FH 5/13/2021 12:09",
"testHasEmptyContents" : "DM 8/4/2020 13:48",
"testInstanceCreation" : "DM 8/4/2020 13:48" } }
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ testPlayAnimations
animationsEditorInstance addTargetMorph: morph.

self flag: #todo.
positionProperty := ((animationsEditorInstance propertyList at: 2) subproperties at: 3).
positionProperty := ((animationsEditorInstance propertyList at: 2) subproperties at: 'position').
positionProperty positionX: 555.
positionProperty positionY: 555.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ testTreeSpecWithOneMorphPosition
morph := Morph new.
morph openInWorld.
animationsEditorInstance addTargetMorph: morph.
positionProperty := ((animationsEditorInstance propertyList at: 2) subproperties at: 1).
positionProperty := ((animationsEditorInstance propertyList at: 2) subproperties at: 'rotation').
animationsEditorInstance selectedTreeNode: positionProperty.

animationsEditorInstance windowReference abandon.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"testEmptyPanelsSetter" : "DM 8/7/2020 17:37",
"testGetDeepestMorph" : "DM 8/4/2020 13:26",
"testInstanceCreation" : "DM 8/4/2020 13:26",
"testPlayAnimations" : "DM 8/7/2020 19:05",
"testPlayAnimations" : "FH 5/13/2021 12:05",
"testSelectMorphByHand" : "DM 8/7/2020 18:59",
"testToolBuilderGetter" : "DM 8/7/2020 17:53",
"testToolBuilderSetter" : "DM 8/7/2020 17:53",
"testTreeSpecProperty" : "DM 8/7/2020 18:59",
"testTreeSpecPropertyStartEnd" : "DM 8/7/2020 18:59",
"testTreeSpecWithNoMorph" : "DM 8/7/2020 18:59",
"testTreeSpecWithOneMorph" : "DM 8/7/2020 18:59",
"testTreeSpecWithOneMorphPosition" : "DM 8/4/2020 13:31" } }
"testTreeSpecWithOneMorphPosition" : "FH 5/13/2021 12:05" } }

0 comments on commit 1790057

Please sign in to comment.