This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #664 from tryshowtime/feature/show2-289-media
Media
- Loading branch information
Showing
21 changed files
with
672 additions
and
93 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
assets: ["./assets/fonts/"], | ||
assets: ["./assets/"], | ||
}; |
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 +1,13 @@ | ||
import * as React from "react"; | ||
import Svg, { SvgProps, Path } from "react-native-svg"; | ||
|
||
function SvgShare(props: SvgProps) { | ||
return ( | ||
<Svg width="24" height="24" viewBox="0 0 24 24" fill="none" {...props}> | ||
<Path | ||
d="M12.1014 1.71846C12.0726 1.62 11.9275 1.62 11.8987 1.71846C10.4677 6.61088 6.61091 10.4677 1.71848 11.8987C1.62002 11.9275 1.62002 12.0725 1.71848 12.1013C6.61092 13.5323 10.4677 17.3891 11.8987 22.2815C11.9275 22.38 12.0726 22.38 12.1014 22.2815C13.5324 17.3891 17.3891 13.5324 22.2815 12.1013C22.38 12.0725 22.38 11.9275 22.2815 11.8987C17.3891 10.4677 13.5323 6.61088 12.1014 1.71846Z" | ||
fill={props.color} | ||
/> | ||
</Svg> | ||
); | ||
} | ||
const SvgShowtime = (props: SvgProps) => ( | ||
<Svg width={24} height={24} viewBox="0 0 80 80" fill="none" {...props}> | ||
<Path | ||
d="M75.71 41.838c1.617-.692 1.617-2.984 0-3.676l-10.842-4.647a35 35 0 0 1-18.383-18.383L41.838 4.289c-.692-1.616-2.984-1.616-3.676 0l-4.647 10.843a35 35 0 0 1-18.383 18.383L4.289 38.162c-1.616.692-1.616 2.984 0 3.676l10.843 4.647a35 35 0 0 1 18.383 18.383l4.647 10.843c.692 1.616 2.984 1.616 3.676 0l4.647-10.843a35 35 0 0 1 18.383-18.383l10.843-4.647Z" | ||
fill={props.color} | ||
/> | ||
</Svg> | ||
); | ||
|
||
export default SvgShare; | ||
export default SvgShowtime; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React, { Suspense } from "react"; | ||
|
||
// import { Canvas, useFrame } from "./react-three-fiber"; | ||
import { useGLTF } from "./use-gltf"; | ||
import { Image } from "design-system/image"; | ||
|
||
type Props = { | ||
url: string; | ||
fallbackUrl: string; | ||
blurhash: string; | ||
count: number; | ||
}; | ||
|
||
function Model({ url }: { url: string }) { | ||
const { scene } = useGLTF(url); | ||
// useFrame(() => (scene.rotation.y += 0.01)); | ||
|
||
return <primitive object={scene} />; | ||
} | ||
|
||
// TODO: implement touch events à la `OrbitControls` | ||
// Event (prop) Description Implementation | ||
// onPointerOver called when mouse hover starts onHoverIn | ||
// onPointerOut called when mouse hover ends onHoverOut | ||
// onClick called when press triggers onPress | ||
// onPointerDown called when press starts onPressIn | ||
// onPointerUp called when press ends onPressOut | ||
// onPointerMove called when press moves onPressMove | ||
|
||
function ModelViewer({ url, fallbackUrl, blurhash, count }: Props) { | ||
return ( | ||
<Image | ||
source={{ | ||
uri: fallbackUrl, | ||
}} | ||
tw={count > 1 ? "w-[50vw] h-[50vw]" : "w-[100vw] h-[100vw]"} | ||
blurhash={blurhash} | ||
resizeMode="cover" | ||
/> | ||
); | ||
|
||
// return ( | ||
// <Canvas gl={{ physicallyCorrectLights: true }}> | ||
// <Suspense fallback={null}> | ||
// <Model url={url} /> | ||
// </Suspense> | ||
// </Canvas> | ||
// ); | ||
} | ||
|
||
export { ModelViewer as Model }; |
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 @@ | ||
export { Canvas, useLoader, useFrame } from "@react-three/fiber/native"; |
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 @@ | ||
export { Canvas, useLoader, useFrame } from "@react-three/fiber"; |
Oops, something went wrong.