Skip to content

Commit

Permalink
last minute changes!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Isabel Lee committed Dec 14, 2023
1 parent 3a76f79 commit 210a572
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 79 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ function App() {
<div
className="scrollPrompt"
style={{
top: `1070vh`,
top: `1030vh`,
}}
>
Scroll down to see Ayman's Cart in 360° <span id="scrollArrow"></span>
Expand Down
122 changes: 44 additions & 78 deletions src/FoodCart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,32 +180,29 @@ function FoodCart(props) {
"camera-2"
);

for (let i = 0; i < drinkCoolerDoorLeftRef.current.children.length; i++) {
const children = drinkCoolerDoorLeftRef.current.children[i];
for (let j = 0; j < children.children.length; j++) {
const child = children.children[j];
AnimationTimeline.to(
child.material,
{ opacity: 0, duration: AnimationTimings.Camera2 },
"camera-2"
);
AnimationTimeline.to(
child.material,
{ opacity: 0.4, duration: AnimationTimings.Camera2 },
"camera-2"
);
AnimationTimeline.to(
child.material,
{ opacity: 0, duration: AnimationTimings.Camera2 },
"camera-2"
);
AnimationTimeline.to(
child.material,
{ opacity: 0.4, duration: AnimationTimings.Camera2 },
"camera-2"
);
}
}
//console.log(drinkCoolerDoorLeftRef.current.children[0]);
//console.log(drinkCoolerDoorRightRef.current);
AnimationTimeline.to(
drinkCoolerDoorLeftRef.current.children[0].children[0].material,
{ opacity: 0, duration: AnimationTimings.Camera2 },
"camera-2"
);
AnimationTimeline.to(
drinkCoolerDoorLeftHighlightRef.current.children[0].children[0].material,
{ opacity: 1, duration: AnimationTimings.Camera2 },
"camera-2"
);

AnimationTimeline.to(
drinkCoolerDoorRightRef.current.children[0].children[1].material,
{ opacity: 0, duration: AnimationTimings.Camera2 },
"camera-2"
);
AnimationTimeline.to(
drinkCoolerDoorRightHighlightRef.current.children[0].children[1].material,
{ opacity: 1, duration: AnimationTimings.Camera2 },
"camera-2"
);

for (
var i = 0;
Expand Down Expand Up @@ -236,45 +233,28 @@ function FoodCart(props) {
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);
for (var i = 0; i < drinkCoolerDoorLeftRef.current.children.length; i++) {
const children = drinkCoolerDoorLeftRef.current.children[i].children;
for (let j = 0; j < children.length; j++) {
const child = children[j];
AnimationTimeline.to(
child.material,
{ opacity: 1, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
child.material,
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
child.material,
{ opacity: 1, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
child.material,
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);
}
}
for (var i = 0; i < ledPanelRef.current.children[0].children.length; i++) {
AnimationTimeline.to(
ledPanelRef.current.children[0].children[i].material,
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
ledPanelHighlightRef.current.children[0].children[i].material,
{ opacity: 1, duration: AnimationTimings.Camera4 },
"camera-4"
);
}
AnimationTimeline.to(
drinkCoolerDoorLeftRef.current.children[0].children[0].material,
{ opacity: 1, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
drinkCoolerDoorLeftHighlightRef.current.children[0].children[0].material,
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);

AnimationTimeline.to(
drinkCoolerDoorRightRef.current.children[0].children[1].material,
{ opacity: 1, duration: AnimationTimings.Camera4 },
"camera-4"
);
AnimationTimeline.to(
drinkCoolerDoorRightHighlightRef.current.children[0].children[1].material,
{ opacity: 0, duration: AnimationTimings.Camera4 },
"camera-4"
);

AnimationTimeline.to(
cartBodyRef.current.position,
{
Expand Down Expand Up @@ -506,20 +486,6 @@ function FoodCart(props) {
ref={drinkCoolerBodyHighlightRef}
></primitive>

<primitive
object={drinkCoolerDoor}
position={position}
rotation={rotation}
scale={scale}
ref={drinkCoolerDoorRef}
></primitive>
<primitive
object={drinkCoolerDoorHighlight}
position={position}
rotation={rotation}
scale={scale}
ref={drinkCoolerDoorHighlightRef}
></primitive>
<primitive
object={drinkCoolerDoorLeft}
position={position}
Expand Down

0 comments on commit 210a572

Please sign in to comment.