1
0
This commit is contained in:
2024-08-06 23:15:09 +09:00
parent e5b3ebd080
commit a1ef7f204f
2 changed files with 17 additions and 2 deletions

View File

@ -62,7 +62,7 @@ interface ModelGlbProps {
scale?: number
}
const GlbModel: React.FC<ModelGlbProps> = ({ url = "./models/solar_system_animation.glb", position = [0, 0, 0], scale = 1, rotation = [0, 0, 0] }) => {
const GlbModel: React.FC<ModelGlbProps> = ({ url = "./models/solar_system.glb", position = [0, 0, 0], scale = 1, rotation = [0, 0, 0] }) => {
const { scene } = useGLTF(url)
scene.scale.setScalar(scale);
scene.position.set(...position);
@ -155,7 +155,7 @@ export function Galaxy(props: JSX.IntrinsicElements['group']) {
<group {...props} dispose={null} ref={ref}>
<VRMModel url={model_custom} url_anim={anim_custom} position={position_custom} scale={1} rotation={rotation_custom} />
{g === 'sun' && <GlbModel url="./models/solar-system.glb" scale={10} />}
{g === 'galaxy' && <GlbModel url="./models/solar-system.glb" scale={1} position={[0,0.5,2]}/>}
{g === 'galaxy' && <GlbModel url="./models/solar-system.glb" scale={0.5} position={[0,0.5,2]}/>}
<pointLight
position={[0, 0, 0]}