repait ligh and orgin point
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -15,17 +15,48 @@ import { OrbitControls, useScroll } from "@react-three/drei";
|
|||||||
|
|
||||||
function SkeletonMesh() {
|
function SkeletonMesh() {
|
||||||
const mesh = useRef<Mesh>(null!);
|
const mesh = useRef<Mesh>(null!);
|
||||||
const head = useLoader(GLTFLoader, "/models/skeleton/head.gltf");
|
let head = useLoader(GLTFLoader, "/models/skeleton/head.gltf");
|
||||||
const eye = useLoader(GLTFLoader, "/models/skeleton/eye.gltf");
|
const eye = useLoader(GLTFLoader, "/models/skeleton/eye.gltf");
|
||||||
|
const eye2 = useLoader(GLTFLoader, "/models/skeleton/eye.gltf");
|
||||||
const body = useLoader(GLTFLoader, "/models/skeleton/body.gltf");
|
const body = useLoader(GLTFLoader, "/models/skeleton/body.gltf");
|
||||||
return (
|
return (
|
||||||
<group>
|
<group>
|
||||||
<mesh ref={mesh} scale={0.5} position={[-30, 1, 0]}>
|
<mesh
|
||||||
|
ref={mesh}
|
||||||
|
scale={0.1}
|
||||||
|
position={[-1, 0.72, -0.91]}
|
||||||
|
rotation={[
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
THREE.MathUtils.degToRad(70),
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
]}
|
||||||
|
>
|
||||||
<primitive object={eye.scene} />
|
<primitive object={eye.scene} />
|
||||||
</mesh>
|
</mesh>
|
||||||
<mesh ref={mesh} scale={0.09} position={[-6.5, 0.5, 0.3]}>
|
<mesh
|
||||||
|
ref={mesh}
|
||||||
|
scale={0.1}
|
||||||
|
position={[-2.3, 0.5, -1]}
|
||||||
|
rotation={[
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
THREE.MathUtils.degToRad(25),
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
]}
|
||||||
|
>
|
||||||
<primitive object={head.scene} />
|
<primitive object={head.scene} />
|
||||||
</mesh>
|
</mesh>
|
||||||
|
<mesh
|
||||||
|
ref={mesh}
|
||||||
|
scale={0.1}
|
||||||
|
position={[-2.03, 0.72, -0.91]}
|
||||||
|
rotation={[
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
THREE.MathUtils.degToRad(70),
|
||||||
|
THREE.MathUtils.degToRad(0),
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<primitive object={eye.scene} />
|
||||||
|
</mesh>
|
||||||
</group>
|
</group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -53,17 +84,21 @@ export default function Skeleton() {
|
|||||||
rotation: [0, THREE.MathUtils.degToRad(90), 0],
|
rotation: [0, THREE.MathUtils.degToRad(90), 0],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ambientLight intensity={3} />
|
{/* <OrbitControls /> */}
|
||||||
|
<pointLight intensity={4} />
|
||||||
<gridHelper args={[99, 99, "grey", "grey"]} />
|
<gridHelper args={[99, 99, "grey", "grey"]} />
|
||||||
<SkeletonMesh />
|
<SkeletonMesh />
|
||||||
{meshArray.map((el) => {
|
<group>
|
||||||
return (
|
<ambientLight />
|
||||||
<mesh position={[el.x, el.y, el.z]}>
|
{meshArray.map((el) => {
|
||||||
<sphereGeometry args={[0.2 * Math.random()]} />
|
return (
|
||||||
<meshPhysicalMaterial color="white" />
|
<mesh position={[el.x, el.y, el.z]}>
|
||||||
</mesh>
|
<sphereGeometry args={[0.2 * Math.random()]} />
|
||||||
);
|
<meshPhysicalMaterial color="white" />
|
||||||
})}
|
</mesh>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</group>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user