use of com.cas.sim.tis.app.event.MouseEventState in project TeachingInSimulation by ScOrPiOzzy.
the class JmeApplication method simpleInitApp.
@Override
public void simpleInitApp() {
super.simpleInitApp();
stateManager.attach(new MouseEventState());
stateManager.detach(stateManager.getState(FlyCamAppState.class));
renderer.setMainFrameBufferSrgb(true);
// String assetPath = SpringUtil.getBean(HTTPUtils.class).getFullPath("assets/");
// LOG.debug("注册资源路径:{}", assetPath); // http://192.168.x.x:port/***/assests/
// // 注册资源路径
// assetManager.registerLocator(assetPath, UrlLocator.class);
assetManager.registerLocator("assets", FileLocator.class);
cam.setFrustumPerspective(45, (float) cam.getWidth() / cam.getHeight(), 0.01f, 100f);
// // 创建天空盒
// // Spatial sky = SkyFactory.createSky(assetManager, "Model/Sky/noon_grass_2k.hdr", SkyFactory.EnvMapType.EquirectMap);
// Spatial sky = SkyFactory.createSky(assetManager, "Model/Sky/Path.hdr", SkyFactory.EnvMapType.EquirectMap);
// rootNode.attachChild(sky);
//
// 滤镜
// fpp.addFilter(new FXAAFilter());
// postProcessor.addFilter(new ToneMapFilter(Vector3f.UNIT_XYZ.mult(4.0f)));
// fpp.addFilter(new SSAOFilter(0.5f, 3, 0.2f, 0.2f));
}
Aggregations