-
Notifications
You must be signed in to change notification settings - Fork 36
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 #141 from musehq/dev
v2.7.0
- Loading branch information
Showing
17 changed files
with
339 additions
and
219 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
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
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,8 +1,8 @@ | ||
export default function Lights() { | ||
return ( | ||
<group name="lights"> | ||
<ambientLight intensity={0.5} /> | ||
<pointLight intensity={0.5} /> | ||
<ambientLight intensity={Math.PI * 0.5} /> | ||
<pointLight intensity={Math.PI * 0.5} /> | ||
</group> | ||
); | ||
} |
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,66 @@ | ||
import { a, useSpring } from "@react-spring/three"; | ||
import { Text } from "@react-three/drei"; | ||
import { Floating, Key } from "../../../ideas"; | ||
import { useEnvironment } from "../../../layers"; | ||
|
||
const FONT_FILE = | ||
"https://d27rt3a60hh1lx.cloudfront.net/fonts/Quicksand_Bold.otf"; | ||
|
||
type InstructionProps = { | ||
open: boolean; | ||
setOpen: (open: boolean) => void; | ||
}; | ||
|
||
export default function Instruction(props: InstructionProps) { | ||
const { open, setOpen } = props; | ||
|
||
const { device } = useEnvironment(); | ||
|
||
const CLOSED_SCALE = device.mobile ? 0.5 : 0.5; | ||
|
||
const { scale } = useSpring({ scale: open ? 0 : CLOSED_SCALE }); | ||
|
||
const FONT_SIZE = 0.055; | ||
|
||
const DESKTOP_TEXT = `Press to ${open ? "close" : "open"}`; | ||
const MOBILE_TEXT = "tap to open"; | ||
|
||
return ( | ||
<a.group | ||
scale={scale} | ||
position-x={device.mobile ? -0.05 : -0.45} | ||
position-y={device.mobile ? -0.2 : 0.1} | ||
position-z={0.25} | ||
rotation-x={0.1} | ||
rotation-y={-0.4} | ||
> | ||
<Floating height={FONT_SIZE * 0.1} speed={device.mobile ? 8 : 0}> | ||
<Text | ||
color="white" | ||
fontSize={FONT_SIZE} | ||
maxWidth={100} | ||
textAlign="center" | ||
outlineColor="black" | ||
outlineWidth={FONT_SIZE * 0.1} | ||
font={FONT_FILE} | ||
position-y={-0.02} | ||
> | ||
{device.mobile ? MOBILE_TEXT : DESKTOP_TEXT} | ||
</Text> | ||
</Floating> | ||
{device.desktop && ( | ||
<Floating height={FONT_SIZE * 0.1} speed={8}> | ||
<Key | ||
keyCode="C" | ||
keyPress={["c", "C"]} | ||
scale={0.1} | ||
position-x={-0.035} | ||
position-z={0.1} | ||
rotation-x={-0.3} | ||
onPress={() => setOpen(!open)} | ||
/> | ||
</Floating> | ||
)} | ||
</a.group> | ||
); | ||
} |
Oops, something went wrong.
2e12ab7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
spacesvr – ./
spacesvr-git-master-muse-hq.vercel.app
spacesvr.vercel.app
www.spacesvr.io
spacesvr.io
spacesvr-muse-hq.vercel.app