This commit is contained in:
quantulr
2023-12-25 10:44:13 +08:00
parent 18fd617a01
commit 784fe1d051
2 changed files with 4 additions and 6 deletions

View File

@ -1,6 +1,5 @@
import useModelStore, { DecalSticker } from "@/store/useModelStore";
import { Decal, useTexture } from "@react-three/drei";
import { Euler } from "three";
/**
* logo 和文字标签
@ -17,7 +16,7 @@ const Sticker = ({ decal }: { decal: DecalSticker }) => {
// }, 10)
return (
<Decal
debug={true}
// debug={true}
position={decal.postion}
scale={decal.scale}
onPointerDown={(ev) => {
@ -48,8 +47,8 @@ const Sticker = ({ decal }: { decal: DecalSticker }) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
rotation={Math.PI}
// rotation={new Euler(Math.PI / 2, 0, 0)}
// rotation={[Math.PI * 1, Math.PI * 1, Math.PI * 1]}
// rotation={new Euler(Math.PI / 2, 0, 0)}
// rotation={[Math.PI * 1, Math.PI * 1, Math.PI * 1]}
>
<meshPhysicalMaterial
transparent

View File

@ -135,14 +135,13 @@ export const Stickers = () => {
};
const ThreeScene = () => {
// const hdr = useTexture("/venice_sunset_1k.hdr")
return (
<Canvas>
<ambientLight></ambientLight>
<pointLight position={[10, 10, 10]}></pointLight>
<perspectiveCamera />
<CapModel />
<axesHelper />
{/* <axesHelper /> */}
<Environment files={"/venice_sunset_1k.hdr"} background={false} />
</Canvas>
);