CoolFace
Apppublic

chencws/Stable-text-to-motion

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
0likes
duck.py14 linesDownload Raw Back to examples
1from pyrender import Mesh, Scene, Viewer2from io import BytesIO3import numpy as np4import trimesh5import requests6 7duck_source = "https://github.com/KhronosGroup/glTF-Sample-Models/raw/master/2.0/Duck/glTF-Binary/Duck.glb"8 9duck = trimesh.load(BytesIO(requests.get(duck_source).content), file_type='glb')10duckmesh = Mesh.from_trimesh(list(duck.geometry.values())[0])11scene = Scene(ambient_light=np.array([1.0, 1.0, 1.0, 1.0]))12scene.add(duckmesh)13Viewer(scene)14