Hello! I am really new to Panda3d.I was following documentation and created simple scene:
here is main.py code(currently using latest 1.11.0 dev build)
from direct.showbase.ShowBase import ShowBase
from math import pi, sin, cos
from direct.task import Task
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.scene = self.loader.loadModel("models/environment")
self.scene.reparentTo(self.render)
self.scene.setScale(0.25, 0.25, 0.25)
self.scene.setPos(-8, 42, 0)
self.taskMgr.add(self.spinCameraTask, "SpinCameraTask")
def spinCameraTask(self, task):
angleDegrees = task.time * 6.0
angleRadians = angleDegrees * (pi / 180.0)
self.camera.setPos(20 * sin(angleRadians), -20 * cos(angleRadians), 3)
self.camera.setHpr(angleDegrees, 0, 0)
return Task.cont
app = MyApp()
app.run()
also i have setted up setup.py and requirements.txt for android builds:
Setup.py
from setuptools import setup
# Set renderer to pandagles2 (shaders) with pandagles (FFP) as fallback
PRC_DATA = '''
load-display pandagles2
aux-display pandagles
notify-level info
gl-debug true
'''
setup(
name='Test',
version='1.0.0',
options={
'build_apps': {
# Uniquely identifies the app
'application_id': 'com.uedev.test',
# Update this for every version uploaded to the Play Store
'android_version_code': 1,
'gui_apps': {
'test': 'main.py',
},
'plugins': [
# Note use of pandagles2/pandagles instead of pandagl
'pandagles2',
'pandagles',
'p3openal_audio',
],
'include_patterns': [
'**/*.png',
'**/*.jpg',
'**/*.egg',
],
'platforms': [
'android',
],
'extra_prc_data': PRC_DATA,
'icons': {'*': 'logo.png'},
},
},
# Choosing a classifier in the Games category makes it marked a "Game"
classifiers=['Topic :: Games/Entertainment'],
)
after i put this command in terminal to build aab
python3 setup.py bdist_apps
I am getting an error
AssertionError: Extension .egg occurs in both file_handlers and bam_model_extensions!
Is there any fix? Thanks!