pyvista.Plotter.import_gltf

pyvista.Plotter.import_gltf#

Plotter.import_gltf(filename, set_camera=True)[ソース]#

glTFファイルをプロッターに取り込みます.

詳しくは, https://www.khronos.org/gltf/ をご覧ください.

パラメータ:
filenamestr | Path

glTFファイルへのパス.

set_camerabool, default: True

カメラの視野角を,three.jsのデフォルトの視点 ('xy') に合わせて設定します.

>>> import pyvista as pv
>>> from pyvista import examples
>>> helmet_file = examples.gltf.download_damaged_helmet()
>>> texture = examples.hdr.download_dikhololo_night()
>>> pl = pv.Plotter()
>>> pl.import_gltf(helmet_file)
>>> pl.set_environment_texture(cubemap)
>>> pl.camera.zoom(1.8)
>>> pl.show()

See glTFファイルの取り扱いについて for a full example using this method.