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

@ -16,8 +16,21 @@ $ yarn dev
$ yarn build $ yarn build
``` ```
## planet
- deploy : [https://card.syui.ai/planet?g=sun](https://card.syui.ai/planet?g=sun)
- ref : [https://git.syui.ai/ai/star/galaxy-react](https://git.syui.ai/ai/star/galaxy-react)
```
$ cd planet
$ npm i
$ npm run start
```
## min-react ## min-react
three-vrm v3 + vrm(unity + vrm v1.0) + anim(vrma)
``` ```
$ cd min-react $ cd min-react
$ npm i $ npm i
@ -33,3 +46,5 @@ $ cd min-ts
$ yarn install $ yarn install
$ yarn dev $ yarn dev
``` ```

View File

@ -62,7 +62,7 @@ interface ModelGlbProps {
scale?: number 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) const { scene } = useGLTF(url)
scene.scale.setScalar(scale); scene.scale.setScalar(scale);
scene.position.set(...position); scene.position.set(...position);
@ -155,7 +155,7 @@ export function Galaxy(props: JSX.IntrinsicElements['group']) {
<group {...props} dispose={null} ref={ref}> <group {...props} dispose={null} ref={ref}>
<VRMModel url={model_custom} url_anim={anim_custom} position={position_custom} scale={1} rotation={rotation_custom} /> <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 === '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 <pointLight
position={[0, 0, 0]} position={[0, 0, 0]}