Skip to content

Commit

Permalink
created timeline and track class
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-lorenz committed Jun 25, 2021
1 parent e77c335 commit 410bfae
Show file tree
Hide file tree
Showing 38 changed files with 226 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ addTargetMorph: aMorph
newTarget subproperties at: 'size' put: (self createSizePropertyFrom: aMorph).
self propertyList add: newTarget.
self propertyTreeMorph update: self propertyTreeMorph getChildrenSelector.
self addTimeline.
^ newTarget.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
buildComponents
buildTimeline: aBuilder
^ aBuilder pluggablePanelSpec new

self timeline: (AnimationsEditorTimeline newWith: self).

^ aBuilder pluggableScrollPaneSpec new
model: self;
morph: self timeline;
frame: (LayoutFrame new
topFraction: 0.67;
bottomFraction: 0.93;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
defaults
defaultPropertyPanelPosition
^ 2.
^ 1.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ selectedTreeNode: aNode

aNode canRenderUI
ifTrue: [self insertMorph: (aNode buildUIWith: self toolBuilder)
Into: self propertyEditorPanel].
Into: self propertyEditorPanel.
self switchTimelineToMorphWith: aNode.
].
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eventHandling
switchTimelineToMorphWith: aSubProperty
| morphProperty |

morphProperty := self propertyList detect: [:property | property targetMorph = aSubProperty targetMorph] ifNone: [].
self timeline switchTimelineTo: morphProperty.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
timeline: anObject

timeline := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
timeline

^ timeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
treeSpec: anObject

treeSpec := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
treeSpec

^ treeSpec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"addRotationFrameAt:with:" : "MH 6/5/2021 08:48",
"addSelectedMorphFor:" : "DM 8/5/2020 21:11",
"addSizeFrameAt:with:" : "MH 6/5/2021 08:48",
"addTargetMorph:" : "LW 6/5/2021 15:12",
"addTimeline" : "DM 8/7/2020 21:26",
"addTargetMorph:" : "CL 6/25/2021 14:59",
"buildAddKeyframeButtonWith:" : "CL 5/30/2021 14:04",
"buildAddMorphButtonWith:" : "CL 5/9/2021 14:08",
"buildButtonBarWith:" : "CL 5/30/2021 14:03",
Expand All @@ -26,7 +25,7 @@
"buildPropertiesTreeWith:" : "DM 7/8/2020 14:27",
"buildResetButtonWith:" : "CL 5/9/2021 14:08",
"buildSaveButtonWith:" : "CL 5/9/2021 14:09",
"buildTimeline:" : "DM 8/4/2020 16:12",
"buildTimeline:" : "CL 6/25/2021 14:21",
"buildWith:" : "FH 5/9/2021 13:57",
"collectAllEmptyPanels" : "DM 8/5/2020 21:02",
"collectInformationBar" : "DM 8/5/2020 21:02",
Expand All @@ -41,7 +40,7 @@
"createStartInformation:" : "NB 5/27/2021 12:37",
"createStructure:with:" : "NB 5/13/2021 10:25",
"defaultEmptyPanels" : "DM 8/7/2020 17:37",
"defaultPropertyPanelPosition" : "DM 8/6/2020 10:38",
"defaultPropertyPanelPosition" : "CL 6/25/2021 14:27",
"dictionaryToJson:" : "NB 5/12/2021 09:37",
"editorTitle" : "LH 8/4/2020 10:31",
"editorTitle:" : "DM 8/3/2020 15:40",
Expand All @@ -56,7 +55,7 @@
"informationBarText" : "DM 6/22/2020 01:26",
"informationBarText:" : "MH 6/2/2021 17:40",
"initialize" : "DM 6/22/2020 01:26",
"initializePropertyEditorPanel" : "DM 8/6/2020 10:38",
"initializePropertyEditorPanel" : "CL 6/25/2021 14:27",
"insertMorph:Into:" : "JIZ 6/3/2020 16:56",
"loadFrames:with:" : "NB 6/25/2021 11:33",
"loadJson:" : "LW 5/15/2021 14:30",
Expand Down Expand Up @@ -88,11 +87,16 @@
"seedProperties" : "DM 8/5/2020 19:54",
"selectMorphByHand" : "DM 8/5/2020 20:07",
"selectedTreeNode" : "JIZ 5/27/2020 15:31",
"selectedTreeNode:" : "DM 8/5/2020 21:06",
"selectedTreeNode:" : "CL 6/25/2021 14:57",
"switchTimelineToMorphWith:" : "CL 6/25/2021 15:01",
"timeline" : "CL 6/25/2021 13:51",
"timeline:" : "CL 6/25/2021 13:51",
"timelines" : "DM 8/6/2020 10:31",
"timelines:" : "DM 8/6/2020 10:53",
"toolBuilder" : "JIZ 6/3/2020 17:00",
"toolBuilder:" : "JIZ 6/3/2020 16:59",
"treeSpec" : "CL 6/25/2021 13:51",
"treeSpec:" : "CL 6/25/2021 13:51",
"updateInformationText:" : "MH 6/2/2021 17:59",
"windowReference" : "DM 8/4/2020 13:19",
"windowReference:" : "DM 8/4/2020 13:19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"informationBar",
"editorTitle",
"windowReference",
"timelines",
"timeline",
"propertyStartEnd" ],
"name" : "AnimationsEditor",
"pools" : [
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
as yet unclassified
newWith: anAnimationsEditor

^ self
basicNew
animationsEditor: anAnimationsEditor;
initialize;
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
as yet unclassified
addTrackFor: aProperty withPosition: aNumber
| track |

track := AnimationsEditorTrack on: self withProperty: aProperty withPosition: (0 @ aNumber) withExtent: (self width @ self trackHeight).
self addMorph: track.



Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
animationsEditor: anObject

animationsEditor := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
animationsEditor

^ animationsEditor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
initialize

super initialize.
self extent: 550@100.
self color: Color white.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
property: anObject

property := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
property

^ property
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessing
switchTimelineTo: aProperty
| positionY |

self property: aProperty.
positionY := 0.
aProperty subproperties do: [:subproperty |
self addTrackFor: subproperty withPosition: positionY.
positionY := positionY + self trackHeight].
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
trackHeight

^ self height / self property subproperties size.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
tracks: anOrderedCollection

tracks := anOrderedCollection.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
accessing
tracks
tracks
ifNil: [self tracks: OrderedCollection new].

^ tracks.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"class" : {
"newWith:" : "CL 6/25/2021 15:28" },
"instance" : {
"addTrackFor:withPosition:" : "CL 6/25/2021 16:18",
"animationsEditor" : "CL 6/25/2021 14:24",
"animationsEditor:" : "CL 6/25/2021 14:24",
"initialize" : "CL 6/25/2021 15:31",
"property" : "CL 6/25/2021 15:49",
"property:" : "CL 6/25/2021 15:49",
"switchTimelineTo:" : "CL 6/25/2021 16:35",
"trackHeight" : "CL 6/25/2021 15:50",
"tracks" : "CL 6/25/2021 15:17",
"tracks:" : "CL 6/25/2021 15:17" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"category" : "AnimationsEditor-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"animationsEditor",
"tracks",
"property" ],
"name" : "AnimationsEditorTimeline",
"pools" : [
],
"super" : "RectangleMorph",
"type" : "normal" }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
as yet unclassified
on: anAnimationsEditorTimeline withProperty: aProperty withPosition: aPoint withExtent: anotherPoint

^ self basicNew
timeline: anAnimationsEditorTimeline;
property: aProperty;
initialize;
position: aPoint;
extent: anotherPoint;
initializeTrack;
yourself.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
accessing
initialize

super initialize.
self color: Color white.




Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
accessing
initializeTrack
| text panel |

text := StringMorph new
contents: self property title;
yourself.
text center: ((text width/2)+10 @ (self center y)).
self addMorph: text.

panel := RectangleMorph new.
panel
position: 75 @ self position y;
extent: self width - 75 @ self height.
self addMorph: panel.




Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
keyframeMorphs: anObject

keyframeMorphs := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
keyframeMorphs

^ keyframeMorphs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
property: anObject

property := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
property

^ property
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
timeline: anObject

timeline := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
timeline

^ timeline
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"class" : {
"on:withProperty:withPosition:withExtent:" : "CL 6/25/2021 16:21" },
"instance" : {
"initialize" : "CL 6/25/2021 16:22",
"initializeTrack" : "CL 6/25/2021 16:34",
"keyframeMorphs" : "CL 6/25/2021 15:36",
"keyframeMorphs:" : "CL 6/25/2021 15:36",
"property" : "CL 6/25/2021 15:36",
"property:" : "CL 6/25/2021 15:36",
"timeline" : "CL 6/25/2021 15:36",
"timeline:" : "CL 6/25/2021 15:36" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"category" : "AnimationsEditor-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"timeline",
"keyframeMorphs",
"property" ],
"name" : "AnimationsEditorTrack",
"pools" : [
],
"super" : "RectangleMorph",
"type" : "normal" }

0 comments on commit 410bfae

Please sign in to comment.