forked from PranavBarthwal/cosmoXplore
-
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.
Merge branch 'PranavBarthwal:main' into main
- Loading branch information
Showing
29 changed files
with
313 additions
and
55 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Notify on Issue Close | ||
|
||
on: | ||
issues: | ||
types: [closed] | ||
|
||
jobs: | ||
notify-on-close: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Notify Issue Creator | ||
uses: actions/github-script@v5 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const { issue } = context.payload.issue; | ||
const { login } = issue.user.login; | ||
const { number } = issue.number; | ||
const message = `Hello @${login}! Your issue #${number} has been closed. Thank you for your contribution!`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: number, | ||
body: message | ||
}); |
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 |
---|---|---|
|
@@ -12,6 +12,8 @@ | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | ||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" /> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha384-k6RqeWeci5ZR/Lv4MR0sA0FfDOMTnhhFUM4JT6FG0HkqS2f5nQpAI8PwvE4j1cAJ" crossorigin="anonymous"> | ||
|
||
</head> | ||
|
||
<body> | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
File renamed without changes.
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, { useRef, memo, useState, useEffect } from 'react' | ||
import { OrbitControls, useGLTF } from '@react-three/drei' | ||
import { Canvas, useFrame } from '@react-three/fiber' | ||
import Styles from './Earth.module.css' | ||
|
||
|
||
function Scene(props) { | ||
const { nodes, materials } = useGLTF('/Earth_1_12756.glb') | ||
|
||
const ref = useRef() | ||
|
||
|
||
useFrame(() => { | ||
ref.current.rotation.y -= 0.001 | ||
ref.current.rotation.z -= 0.001 | ||
}) | ||
|
||
|
||
|
||
return ( | ||
<group {...props} dispose={null} ref={ref}> | ||
<mesh | ||
castShadow | ||
receiveShadow | ||
geometry={nodes.Cube001.geometry} | ||
material={materials['Default OBJ']} | ||
/> | ||
</group> | ||
) | ||
} | ||
|
||
const Earth = memo(function Earth(props) { | ||
|
||
return ( | ||
<Canvas id={Styles.canvas} > | ||
<OrbitControls enableZoom={false} enablePan={false} /> | ||
<ambientLight intensity={7} /> | ||
<pointLight position={[0, 10, 0]} intensity={100} /> | ||
<pointLight position={[0, -10, 0]} intensity={100} /> | ||
<pointLight position={[10, -7, 0]} intensity={100} /> | ||
<pointLight position={[-10, -7, 0]} intensity={100} /> | ||
<Scene props={props} scale={0.006} /> | ||
</Canvas> | ||
) | ||
|
||
}) | ||
|
||
useGLTF.preload('/Earth_1_12756.glb') | ||
|
||
export default Earth |
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,17 @@ | ||
#canvas { | ||
filter: drop-shadow(0 0 100px rgba(40, 102, 110, 0.589)); | ||
width: 500px; | ||
} | ||
|
||
#canvas canvas { | ||
height: 500px; | ||
width: 500px; | ||
} | ||
|
||
|
||
@media (max-width:500px) { | ||
#canvas canvas { | ||
height: 400px; | ||
width: 400px; | ||
} | ||
} |
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,43 @@ | ||
import React, { memo, useMemo, useRef } from 'react' | ||
import { OrbitControls, useGLTF } from '@react-three/drei' | ||
import { Canvas, useFrame } from '@react-three/fiber' | ||
import Styles from './Mars.module.css' | ||
|
||
function Scene(props) { | ||
const { nodes, materials } = useGLTF('/Mars_1_6792.glb') | ||
|
||
const ref = useRef() | ||
|
||
useFrame(() => { | ||
ref.current.rotation.y -= 0.001 | ||
ref.current.rotation.z -= 0.001 | ||
}) | ||
|
||
return ( | ||
<group {...props} dispose={null} ref={ref}> | ||
|
||
<mesh | ||
castShadow | ||
receiveShadow | ||
geometry={nodes.Cube008.geometry} | ||
material={materials['Default OBJ.005']} | ||
/> | ||
</group> | ||
) | ||
} | ||
|
||
const Mars = memo(function Mars(props) { | ||
return ( | ||
<Canvas style={{ height: '400px', width: '400px' }} id={Styles.canvas} > | ||
<OrbitControls enableZoom={false} enablePan={false} maxPolarAngle={1} minPolarAngle={1} /> | ||
<ambientLight intensity={1} /> | ||
<pointLight position={[10, 10, 10]} /> | ||
<Scene props={props} scale={0.006} /> | ||
</Canvas> | ||
) | ||
|
||
}) | ||
|
||
useGLTF.preload('/Mars_1_6792.glb') | ||
|
||
export default Mars |
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,3 @@ | ||
#canvas { | ||
filter: drop-shadow(0 0 50px rgba(255, 72, 0, 0.349)); | ||
} |
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,44 @@ | ||
|
||
import React, { useRef, memo, useState, useEffect } from 'react' | ||
import { OrbitControls, useGLTF } from '@react-three/drei' | ||
import { Canvas, useFrame } from '@react-three/fiber' | ||
import Styles from './Neptune.module.css' | ||
|
||
function Scene(props) { | ||
const { nodes, materials } = useGLTF('/Neptune_1_49528.glb') | ||
|
||
const ref = useRef() | ||
|
||
useFrame(() => { | ||
ref.current.rotation.y -= 0.001 | ||
ref.current.rotation.z -= 0.001 | ||
}) | ||
|
||
return ( | ||
<group {...props} dispose={null} ref={ref}> | ||
<mesh | ||
castShadow | ||
receiveShadow | ||
geometry={nodes.Neptune.geometry} | ||
material={materials['Default OBJ.001']} | ||
rotation={[Math.PI / 2, 0, 0]} | ||
/> | ||
</group> | ||
) | ||
} | ||
|
||
const Earth = memo(function Earth(props) { | ||
|
||
return ( | ||
<Canvas id={Styles.canvas} > | ||
<OrbitControls enableZoom={false} enablePan={false} /> | ||
<ambientLight intensity={5} color={'rgb(0, 153, 255)'} /> | ||
<Scene props={props} scale={0.006} /> | ||
</Canvas> | ||
) | ||
|
||
}) | ||
|
||
useGLTF.preload('/Neptune_1_49528.glb') | ||
|
||
export default Earth |
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,4 @@ | ||
#canvas canvas { | ||
height: 300px; | ||
width: 300px; | ||
} |
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.