-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d922a15
commit ec53e0b
Showing
7 changed files
with
60 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ name: 'Create Release' | |
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
branches: | ||
- release | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
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,12 +1,9 @@ | ||
import { SplashScreen } from "@/views/splashscreen"; | ||
import { createLazyFileRoute } from "@tanstack/react-router"; | ||
import { observer } from "mobx-react"; | ||
|
||
export const Route = createLazyFileRoute("/")({ | ||
component: observer(() => { | ||
return ( | ||
<> | ||
<div>Select a connection!</div> | ||
</> | ||
); | ||
return <SplashScreen />; | ||
}), | ||
}); |
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,50 @@ | ||
import { Canvas, useFrame } from "@react-three/fiber"; | ||
import { observer } from "mobx-react"; | ||
import { useRef, useState } from "react"; | ||
import type { Group } from "three"; | ||
|
||
function Box() { | ||
// This reference gives us direct access to the THREE.Mesh object | ||
const ref = useRef<Group>(); | ||
// Hold state for hovered and clicked events | ||
const [hovered, hover] = useState(false); | ||
const [clicked, click] = useState(false); | ||
// Subscribe this component to the render-loop, rotate the mesh every frame | ||
useFrame((state, delta) => { | ||
ref.current!.rotation.x += delta * state.pointer.x * 10; | ||
ref.current!.rotation.z += delta * state.pointer.y * 10; | ||
}); | ||
// Return the view, these are regular Threejs elements expressed in JSX | ||
const plateSize = 0.5; | ||
const gap = plateSize + 0.1; | ||
return ( | ||
<group ref={ref as any}> | ||
<mesh position={[0, gap, 0]}> | ||
<cylinderGeometry args={[1, 1, plateSize]} /> | ||
<meshStandardMaterial color="lime" /> | ||
</mesh> | ||
<mesh position={[0, 0, 0]}> | ||
<cylinderGeometry args={[1, 1, plateSize]} /> | ||
<meshStandardMaterial color="green" /> | ||
</mesh> | ||
<mesh position={[0, -gap, 0]}> | ||
<cylinderGeometry args={[1, 1, plateSize]} /> | ||
<meshStandardMaterial color="rgb(70, 31, 4)" /> | ||
</mesh> | ||
</group> | ||
); | ||
} | ||
|
||
export const SplashScreen = observer(() => { | ||
return ( | ||
<div className="h-full"> | ||
<Canvas> | ||
<ambientLight intensity={Math.PI / 2} /> | ||
<spotLight position={[10, 10, 10]} angle={0.15} penumbra={1} decay={0} intensity={Math.PI} /> | ||
<pointLight position={[-10, -10, -10]} decay={0} intensity={Math.PI} /> | ||
|
||
<Box /> | ||
</Canvas> | ||
</div> | ||
); | ||
}); |