Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Libraries/CustomComponents/Navigator/NavigatorSceneConfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ var FadeToTheLeft = {
},
};

var FadeToTheRight = {
...FadeToTheLeft,
transformTranslate: {
from: {x: 0, y: 0, z: 0},
to: {x: Math.round(SCREEN_WIDTH * 0.3), y: 0, z: 0},
},
translateX: {
from: 0,
to: Math.round(SCREEN_WIDTH * 0.3),
}
};

var FadeIn = {
opacity: {
from: 0,
Expand Down Expand Up @@ -187,6 +199,27 @@ var FromTheRight = {
},
};

var FromTheLeft = {
...FromTheRight,
transformTranslate: {
from: {x: -SCREEN_WIDTH, y: 0, z: 0},
to: {x: 0, y: 0, z: 0},
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PixelRatio.get(),
},
translateX: {
from: -SCREEN_WIDTH,
to: 0,
min: 0,
max: 1,
type: 'linear',
extrapolate: true,
round: PixelRatio.get(),
},
};

var ToTheBack = {
// Rotate *requires* you to break out each individual component of
Expand Down Expand Up @@ -374,6 +407,13 @@ var NavigatorSceneConfigs = {
...BaseConfig,
// We will want to customize this soon
},
FloatFromLeft: {
...BaseConfig,
animationInterpolators: {
into: buildStyleInterpolator(FromTheLeft),
out: buildStyleInterpolator(FadeToTheRight),
},
},
FloatFromBottom: {
...BaseConfig,
gestures: {
Expand Down