adding some sample models
This commit is contained in:
parent
9bf77bd637
commit
f4945bc19d
|
@ -12,6 +12,7 @@ export function CanvasComponent({setCanvasRef, gltfModel}) {
|
|||
return (
|
||||
<>
|
||||
<Canvas
|
||||
camera={{ fov: 40, position: [0, 0, 5]}}
|
||||
gl={{ alpha:true, preserveDrawingBuffer: true }}
|
||||
>
|
||||
<Scene gltfModel={gltfModel} setCanvasRef={setCanvasRef}/>
|
||||
|
@ -28,14 +29,14 @@ function Scene({ setCanvasRef, gltfModel }) {
|
|||
|
||||
// Set camera position closer to the object
|
||||
// camera.position.set(0, 0, 5); // x, y, z
|
||||
|
||||
|
||||
setCanvasRef(gl.domElement);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ambientLight />
|
||||
<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]} />
|
||||
</>
|
||||
);
|
||||
|
@ -50,7 +51,7 @@ function Model({ gltfModel, ...props }) {
|
|||
return (
|
||||
|
||||
<group
|
||||
scale={10}
|
||||
scale={1}
|
||||
>
|
||||
<primitive object={gltfModel.scene} />
|
||||
</group>
|
||||
|
@ -64,7 +65,7 @@ function Light({ brightness, color }) {
|
|||
height={3}
|
||||
color={color}
|
||||
intensity={brightness}
|
||||
position={[-2, 0, 5]}
|
||||
position={[7, 0, 3]}
|
||||
lookAt={[0, 0, 0]}
|
||||
penumbra={1}
|
||||
castShadow
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -78,7 +78,7 @@ export default function Studio(){
|
|||
"Content-Type": "application/json",
|
||||
},
|
||||
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",
|
||||
image: image,
|
||||
mask: mask,
|
||||
|
|
Loading…
Reference in New Issue