forked from cgvr/DeltaVR
shape checker nice materials, generated object grabbable
This commit is contained in:
@@ -11,7 +11,6 @@ public class ImageGenerationBox : MonoBehaviour
|
||||
public VoiceTranscriptionBox voiceTranscriptionBox;
|
||||
public Image imageDisplay;
|
||||
public Texture2D LastTexture { get; private set; }
|
||||
public string promptSuffix = ", single object, front and side fully visible, realistic style, plain neutral background, clear details, soft studio lighting, true-to-scale";
|
||||
|
||||
private MeshRenderer meshRenderer;
|
||||
private bool isLoading;
|
||||
@@ -37,13 +36,11 @@ void Start()
|
||||
XROrigin playerOrigin = other.GetComponent<XROrigin>();
|
||||
if (controller != null || playerOrigin != null)
|
||||
{
|
||||
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
|
||||
string refinedPrompt = inputPrompt + promptSuffix;
|
||||
|
||||
isLoading = true;
|
||||
meshRenderer.material = loadingMaterial;
|
||||
|
||||
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(refinedPrompt);
|
||||
string inputPrompt = voiceTranscriptionBox.GetTextOutput();
|
||||
byte[] imageBytes = await InvokeAiClient.Instance.GenerateImage(inputPrompt);
|
||||
LastTexture = ModelGenerationUtils.CreateTexture(imageBytes);
|
||||
Sprite sprite = ModelGenerationUtils.CreateSprite(LastTexture);
|
||||
imageDisplay.sprite = sprite;
|
||||
|
||||
Reference in New Issue
Block a user