Skip to content

Wpf model viewer which display gltf or glb file based on webview2.

License

Notifications You must be signed in to change notification settings

weianweigan/ModelViewerWPF

Repository files navigation

ModelViewerWPF

NuGet Version NuGet Downloads

ModelViewerWPF is a WPF control that uses WebView2 to display 3D models within a WPF application. This control is based on the model-viewer and supports *.gltf and *.glb formats.

Features

  • Display 3D models using WebView2
  • Supports GLB/GLTF 3D model formats

window

Installation

You can install ModelViewerWPF via the NuGet Package Manager:

Install-Package ModelViewerWPF

Simple Usage

<Window
    x:Class="YourNamespace.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:modelviewer="clr-namespace:ModelViewerWPF;assembly=ModelViewerWPF"
    Title="MainWindow"
    Width="800"
    Height="450">
    <Grid>
        <modelviewer:ModelViewer
            Margin="4"
            ModelSource="Assets/Models/Horse.glb" />
    </Grid>
</Window>

Generate glb files based on manidfold-csharp

window

About

Wpf model viewer which display gltf or glb file based on webview2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published