Skip to content

Commit

Permalink
fix: render globe (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
torn4dom4n authored Sep 21, 2023
1 parent 7d4fb39 commit 5b01fdb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions components/Cobe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Cobe = () => {

useEffect(() => {
let phi = 0
let width = 600
let width = 0

const onResize = () => {
if (canvasRef.current) {
Expand All @@ -24,7 +24,7 @@ const Cobe = () => {
width: width * 2,
height: width * 2,
phi: 0,
theta: -0.1,
theta: 0.2,
dark: 1,
diffuse: 1.2,
mapSamples: 16000,
Expand All @@ -36,8 +36,6 @@ const Cobe = () => {
onRender: (state) => {
state.phi = phi
phi += 0.005
state.width = width * 2
state.height = width * 2
},
})

Expand All @@ -56,7 +54,7 @@ const Cobe = () => {
return (
<canvas
ref={canvasRef}
style={{ width: '100%', height: '100%', aspectRatio: 1 }}
style={{ width: 400, height: 400, aspectRatio: 1 }}
/>
)
}
Expand Down

0 comments on commit 5b01fdb

Please sign in to comment.