adding some sample models

This commit is contained in:
neil 2023-10-12 17:22:22 -04:00
parent 9bf77bd637
commit f4945bc19d
6 changed files with 6 additions and 5 deletions

View File

@ -12,6 +12,7 @@ export function CanvasComponent({setCanvasRef, gltfModel}) {
return ( return (
<> <>
<Canvas <Canvas
camera={{ fov: 40, position: [0, 0, 5]}}
gl={{ alpha:true, preserveDrawingBuffer: true }} gl={{ alpha:true, preserveDrawingBuffer: true }}
> >
<Scene gltfModel={gltfModel} setCanvasRef={setCanvasRef}/> <Scene gltfModel={gltfModel} setCanvasRef={setCanvasRef}/>
@ -35,7 +36,7 @@ function Scene({ setCanvasRef, gltfModel }) {
<> <>
<ambientLight /> <ambientLight />
<pointLight position={[1, 1, 1]} /> <pointLight position={[1, 1, 1]} />
<Light brightness={100} color={"white"} /> // highlight-line <Light brightness={100} color={"white"}/> // highlight-line
<Model gltfModel={gltfModel} position={[0, 0, 0]} /> <Model gltfModel={gltfModel} position={[0, 0, 0]} />
</> </>
); );
@ -50,7 +51,7 @@ function Model({ gltfModel, ...props }) {
return ( return (
<group <group
scale={10} scale={1}
> >
<primitive object={gltfModel.scene} /> <primitive object={gltfModel.scene} />
</group> </group>
@ -64,7 +65,7 @@ function Light({ brightness, color }) {
height={3} height={3}
color={color} color={color}
intensity={brightness} intensity={brightness}
position={[-2, 0, 5]} position={[7, 0, 3]}
lookAt={[0, 0, 0]} lookAt={[0, 0, 0]}
penumbra={1} penumbra={1}
castShadow castShadow

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -78,7 +78,7 @@ export default function Studio(){
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
body: JSON.stringify({ body: JSON.stringify({
prompt: promptText + ", photorealistic, high resolution product photography", prompt: promptText + ", photorealistic, high resolution product photography, don't modify product",
negative_prompt: "blurry, painting, cartoon, abstract, ugly, deformed", negative_prompt: "blurry, painting, cartoon, abstract, ugly, deformed",
image: image, image: image,
mask: mask, mask: mask,