Skip to main content

Synchronized side-by-side 3D comparison viewer for Gradio — supports PLY and GLB files with shared camera control.

Project description

gradio_sync3dcompare

PyPI - Version Static Badge

Synchronized side-by-side 3D comparison viewer for Gradio — supports PLY and GLB files with shared camera control.

Installation

pip install gradio_sync3dcompare

Usage

import gradio as gr
from gradio_sync3dcompare import Sync3DCompare

with gr.Blocks(title="Sync3DCompare Demo") as demo:
    gr.Markdown("# Sync3DCompare — Synchronized 3D Comparison Viewer")
    gr.Markdown(
        "Compare 3D reconstruction outputs side-by-side with synchronized orbit, pan, and zoom. "
        "Rotate one view and all others follow."
    )
    Sync3DCompare(
        label="Upload & Compare",
        render_mode="points",
        sync_camera=True,
        point_size=2.0,
        height=500,
    )

if __name__ == "__main__":
    demo.launch()

Sync3DCompare

Initialization

name type default description
value
list[dict]| None
value = None None
label
str| None
value = "3D Comparison" None
render_mode
"points"| "native"
value = "points" None
sync_camera
bool
value = True None
point_size
float
value = 2.0 None
height
int
value = 500 None
max_views
int
value = 4 None
interactive
bool
value = True None
visible
bool
value = True None
elem_id
str| None
value = None None
elem_classes
list[str]| str| None
value = None None
render
bool
value = True None

Events

name description
change

User function

The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).

  • When used as an Input, the component only impacts the input signature of the user function.
  • When used as an output, the component only impacts the return signature of the user function.

The code snippet below is accurate in cases where the component is used as both an input and an output.

  • As input: Should return, the output data received by the component from the user's function in the backend.
def predict(
    value: Unknown
) -> list[dict]| None:
    return value

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradio_sync3dcompare-0.0.4.tar.gz (698.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradio_sync3dcompare-0.0.4-py3-none-any.whl (305.8 kB view details)

Uploaded Python 3

File details

Details for the file gradio_sync3dcompare-0.0.4.tar.gz.

File metadata

  • Download URL: gradio_sync3dcompare-0.0.4.tar.gz
  • Upload date:
  • Size: 698.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for gradio_sync3dcompare-0.0.4.tar.gz
Algorithm Hash digest
SHA256 ab941195862d4be6eb2a199fe8555dfa422fb11fb7436874ee9dbc5867c0ecd7
MD5 54da742b90b9d81adb2d453c4fc7afb1
BLAKE2b-256 f4b992bce84a7ac3a1b6d6b2b29beef8ce9325d5e11afd8732be5f28262d49bc

See more details on using hashes here.

File details

Details for the file gradio_sync3dcompare-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for gradio_sync3dcompare-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ccd1dd764091c53da87101770d0215e3b863afa412e2ab8a8cbd7b5aac4a4dbc
MD5 12566d5952feb0bcecc4cf1450dd76c5
BLAKE2b-256 70c6d3a3a2ef80f843f6d400f273839d46c52b3b5702798319bf1586ab521917

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page