{"library":"panda3d-gltf","title":"Panda3D glTF Utilities","description":"`panda3d-gltf` provides utilities to load glTF (GL Transmission Format) 3D models into the Panda3D engine. It handles parsing glTF files and converting their data (meshes, materials, textures, animations, scenes) into Panda3D's native scene graph format, simplifying the process of integrating glTF assets. The current version is 1.3.0, with releases occurring as needed for fixes and feature enhancements, rather than on a fixed schedule.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install panda3d-gltf"],"cli":null},"imports":["from panda3d_gltf import gltf_loader","from panda3d_gltf.gltf_loader import GLTFLoader","from panda3d_gltf.converter import Converter"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from direct.showbase.ShowBase import ShowBase\nfrom panda3d_gltf import gltf_loader\n\nclass MyApp(ShowBase):\n    def __init__(self):\n        ShowBase.__init__(self)\n\n        self.disableMouse() # Disable default camera control\n        self.cam.setPos(0, -10, 0)\n        self.cam.lookAt(0, 0, 0)\n        self.setBackgroundColor(0.1, 0.1, 0.1)\n\n        # --- User provided glTF model is required ---\n        # Replace 'path/to/your_model.gltf' with an actual glTF file path.\n        # For a runnable example, ensure this file exists or use a known sample.\n        # Example: a simple 'box.gltf' in a 'models' directory.\n        model_path = 'models/box.gltf' \n        \n        try:\n            model = gltf_loader.load_gltf(model_path)\n            if model:\n                model.reparent_to(self.render)\n                model.setPos(0, 0, 0) # Adjust position as needed\n                model.setScale(1)    # Adjust scale as needed\n                print(f\"Successfully loaded {model_path}\")\n            else:\n                print(f\"Failed to load {model_path}. Model object is None.\")\n        except Exception as e:\n            print(f\"Error loading glTF model from {model_path}: {e}\")\n            print(\"Please ensure the glTF file exists and is valid.\")\n\napp = MyApp()\napp.run()","lang":"python","description":"This quickstart demonstrates how to initialize a basic Panda3D application and load a glTF model using `panda3d-gltf`. It sets up a camera and a dark background for visibility. Users must replace `'models/box.gltf'` with the actual path to their glTF file. It also includes basic error handling for file loading issues.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}