fix
This commit is contained in:
15
README.md
15
README.md
@ -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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
@ -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]}
|
||||||
|
Reference in New Issue
Block a user