use of com.jme3.environment.EnvironmentCamera in project TeachingInSimulation by ScOrPiOzzy.
the class ElecCompState method initializeLocal.
@Override
protected void initializeLocal() {
// 认知模块的根节点
root = new Node(ROOT_NAME);
LOG.debug("创建元器件状态机的根节点{}", root.getName());
rootNode.attachChild(root);
setupLight();
stateManager.attach(chaserState = new MyCameraState());
// // PBR indirect lighting
// final EnvironmentCamera envCam = new EnvironmentCamera(256, new Vector3f(0, 3f, 0));
// stateManager.attach(envCam);
//
// stateManager.attach(new BreakPointState((a) -> {
// LightProbe probe = LightProbeFactory.makeProbe(stateManager.getState(EnvironmentCamera.class), rootNode, new JobProgressAdapter<LightProbe>() {
// @Override
// public void done(LightProbe result) {
// // 加载结束
// Platform.runLater(() -> SpringUtil.getBean(PageController.class).hideLoading());
// }
// });
// ((BoundingSphere) probe.getBounds()).setRadius(100);
// rootNode.addLight(probe);
// }));
// 加载结束
Platform.runLater(() -> SpringUtil.getBean(PageController.class).hideLoading());
}
Aggregations