Skip to main content

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 two 3D assets side-by-side with synchronized orbit, pan, and zoom. "
        "Rotate one view and all others follow."
    )
    gr.Markdown(
        "### Two synchronized viewports. Upload `.ply` or `.glb` files manually into each pane."
    )
    Sync3DCompare(
        label="Two-Viewport 3D Comparison",
        value=[],
        render_mode="points",
        sync_camera=True,
        point_size_mode="auto",
        point_size=1.0,
        height=540,
        max_views=2,
    )


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

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_mode
"auto"| "manual"
value = "auto" None
point_size
float
value = 1.0 None
max_point_size
float
value = 10.0 None
default_zoom
float
value = 1.0 None
min_zoom
float
value = 0.5 None
max_zoom
float
value = 16.0 None
height
int
value = 500 None
max_views
int
value = 4 None
num_views
int| None
value = None 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

Metadata

Release files for gradio-sync3dcompare 0.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gradio-sync3dcompare 0.0.22
File Size Uploaded
gradio_sync3dcompare-0.0.22.tar.gz 32.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gradio-sync3dcompare 0.0.22
File Interpreter ABI Platform
gradio_sync3dcompare-0.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 32.6 MB

Release files / gradio_sync3dcompare-0.0.22.tar.gz

Download URL gradio_sync3dcompare-0.0.22.tar.gz
Size 32.3 MB
Tags Source
SHA-256 checksum
How to use checksums
f3007cfbe55a6fac98d05dc570dd7eb399fe31a6aab89b80d228e3c1f6489a7c
BLAKE2b-256 checksum
How to use checksums
71542495e4460ea926e0f1b9a1bbaa24201e2532a54781f0d38f69943b764130
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / gradio_sync3dcompare-0.0.22-py3-none-any.whl

Download URL gradio_sync3dcompare-0.0.22-py3-none-any.whl
Size 310.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92dee336d511483f618c075e323f302396373df9d587c99147232f004bab53af
BLAKE2b-256 checksum
How to use checksums
0e9536c769cc4aed4d1a0fb8a7f9c44ae5a0f696cef4f874677668665bb43d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.0.22 This release

2 release files

0.0.21

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page