本文整理匯總了Python中pandac.PandaModules.SmoothMover.setAcceptClockSkew方法的典型用法代碼示例。如果您正苦於以下問題:Python SmoothMover.setAcceptClockSkew方法的具體用法?Python SmoothMover.setAcceptClockSkew怎麽用?Python SmoothMover.setAcceptClockSkew使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pandac.PandaModules.SmoothMover
的用法示例。
在下文中一共展示了SmoothMover.setAcceptClockSkew方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: ProgressiveLoader
# 需要導入模塊: from pandac.PandaModules import SmoothMover [as 別名]
# 或者: from pandac.PandaModules.SmoothMover import setAcceptClockSkew [as 別名]
#.........這裏部分代碼省略.........
self.camLens.setNear(8.0)
self.render.setAntialias(p3d.AntialiasAttrib.MAuto)
self.showstats = showstats
if showstats:
self.num_metadata_loaded = 0
self.num_models_loaded = 0
self.num_texture_updates = 0
self.num_mesh_refinements = 0
self.total_texture_updates = 0
self.total_mesh_refinements = 0
self.txtMetadataLoaded = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.05),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtUniqueLoaded = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.11),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtTextureUpdates = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.17),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.txtMeshRefinements = gui.OnscreenText.OnscreenText(text='', style=1, pos=(0.01, -0.23),
parent=self.a2dTopLeft, align=p3d.TextNode.ALeft,
scale=0.05, fg=(0.1, 0.1, 0.1, 1), shadow=(0.9, 0.9, 0.9, 1))
self.update_stats()
self.globalClock = p3d.ClockObject.getGlobalClock()
self.smooth_mover = SmoothMover()
self.smooth_mover.setPredictionMode(SmoothMover.PMOn)
self.smooth_mover.setSmoothMode(SmoothMover.SMOn)
self.smooth_mover.setMaxPositionAge(10.0)
self.smooth_mover.setAcceptClockSkew(False)
self.smooth_mover.setDelay(0)
self.pandastate = katasked.panda.PandaState(self.cam,
self.unique_nodepaths,
self.nodepaths,
self.smooth_mover,
self.globalClock,
self.obj_bounds)
if self.capturefile is not None:
self.capturedata = json.load(self.capturefile)
self.duration = self.capturedata['duration']
self.positions = self.capturedata['positions']
self.rotations = self.capturedata['rotations']
self.curve_creator = motioncap.CreateNurbsCurve()
for pos, rot in zip(self.positions, self.rotations):
self.curve_creator.addPoint(pos, rot)
self.mopath = self.curve_creator.getMotionPath()
self.interval = MopathInterval.MopathInterval(self.mopath, self.cam, duration=self.duration, name="Camera Replay")
else:
controls.KeyboardMovement()
controls.MouseCamera()
self.update_camera_predictor_task = self.taskMgr.doMethodLater(0.1, self.update_camera_predictor, 'update_camera_predictor')
self.update_priority_task = self.taskMgr.doMethodLater(0.5, self.check_pool, 'check_pool')
self.load_waiting_task = self.taskMgr.doMethodLater(0.1, self.load_waiting, 'load_waiting')
def run(self):
if self.screenshot_dir is not None:
self.start_time = None