PreserveColorBuffer

You can see the following effect after preserving color buffer for renderer object.

renderer->SetPreserveColorBuffer(true);
renderer->ResetCamera();
renderWindow->Render();
renderWindowInteractor->Start();

Download 3D Model With WASM From Web Pabge

    vSPNew( writer, vtkXMLPolyDataWriter );
    writer->SetInputData( newArchPd );
    writer->SetFileName( "newArchPd.vtp" );
    writer->Write();


    char *jsStr = "const shot =  Module.FS.readFile( \"newArchPd.vtp\" ); \
    const link = document.createElement('a'); \
    link.style.display = 'none'; \
    document.body.appendChild(link); \
    const blob = new Blob([shot]); \
    link.href = URL.createObjectURL(blob); \
    link.download = 'newArchPd.vtp'; \
    link.click(); \
    document.body.removeChild(link);";
    emscripten_run_script( jsStr );

The browser will download the VTP file automatically when your web page run to the above logic.

Categories: VTKWeb

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Video Converter
: You can use the tool to convert videos between a few of formats.

X
A prohibited operation
0
Would love your thoughts, please comment.x
()
x