com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver Java Examples
The following examples show how to use
com.badlogic.gdx.assets.loaders.resolvers.InternalFileHandleResolver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GLTFDemo.java From gdx-gltf with Apache License 2.0 | 6 votes |
private void createDefaultMaps(){ if(alternateMaps != null){ diffuseCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/" + alternateMaps + "/diffuse/diffuse_", ".jpg", EnvironmentUtil.FACE_NAMES_NEG_POS); environmentCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/" + alternateMaps + "/environment/environment_", ".jpg", EnvironmentUtil.FACE_NAMES_NEG_POS); specularCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/" + alternateMaps + "/specular/specular_", "_", ".jpg", 10, EnvironmentUtil.FACE_NAMES_NEG_POS); }else{ diffuseCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/diffuse/diffuse_", "_0.jpg", EnvironmentUtil.FACE_NAMES_FULL); environmentCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/environment/environment_", "_0.png", EnvironmentUtil.FACE_NAMES_FULL); specularCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/specular/specular_", "_", ".jpg", 10, EnvironmentUtil.FACE_NAMES_FULL); } }
Example #2
Source File: AMScreen.java From cocos-ui-libgdx with Apache License 2.0 | 6 votes |
@Override public void show() { super.show(); layout = new GlyphLayout(); font = new NativeFont(new NativeFontPaint(25)); font.appendText("正在加载...0123456789%"); font.setColor(Color.BLACK); layout.setText(font, "正在加载...100%"); stage = new Stage(new StretchViewport(1280, 720)); assetManager = new AssetManager(); assetManager.setLogger(new Logger("log", Logger.DEBUG)); assetManager.setLoader(CocosScene.class, new CocosLoader(new InternalFileHandleResolver())); assetManager.load("mainscene/MenuScene.json", CocosScene.class); }
Example #3
Source File: GdxFileSystem.java From gdx-ai with Apache License 2.0 | 6 votes |
@Override public FileHandleResolver newResolver (FileType fileType) { switch (fileType) { case Absolute: return new AbsoluteFileHandleResolver(); case Classpath: return new ClasspathFileHandleResolver(); case External: return new ExternalFileHandleResolver(); case Internal: return new InternalFileHandleResolver(); case Local: return new LocalFileHandleResolver(); } return null; // Should never happen }
Example #4
Source File: GLTFExample.java From gdx-gltf with Apache License 2.0 | 5 votes |
@Override public void create() { // create scene sceneAsset = new GLTFLoader().load(Gdx.files.internal("models/BoomBox/glTF/BoomBox.gltf")); scene = new Scene(sceneAsset.scene); sceneManager = new SceneManager(); sceneManager.addScene(scene); // setup camera camera = new PerspectiveCamera(60f, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); float d = .02f; camera.near = d / 1000f; camera.far = d * 4; sceneManager.setCamera(camera); // setup IBL (image based lighting) environmentCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/environment/environment_", "_0.png", EnvironmentUtil.FACE_NAMES_FULL); diffuseCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/diffuse/diffuse_", "_0.jpg", EnvironmentUtil.FACE_NAMES_FULL); specularCubemap = EnvironmentUtil.createCubemap(new InternalFileHandleResolver(), "textures/specular/specular_", "_", ".jpg", 10, EnvironmentUtil.FACE_NAMES_FULL); brdfLUT = new Texture(Gdx.files.classpath("net/mgsx/gltf/shaders/brdfLUT.png")); sceneManager.setAmbientLight(1f); sceneManager.environment.set(new PBRTextureAttribute(PBRTextureAttribute.BRDFLUTTexture, brdfLUT)); sceneManager.environment.set(PBRCubemapAttribute.createSpecularEnv(specularCubemap)); sceneManager.environment.set(PBRCubemapAttribute.createDiffuseEnv(diffuseCubemap)); // setup skybox skybox = new SceneSkybox(environmentCubemap); sceneManager.setSkyBox(skybox); }
Example #5
Source File: ParticleUtils.java From Skyland with MIT License | 5 votes |
private void initManager() { particleManager = new AssetManager(); ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches()); ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver()); particleManager.setLoader(ParticleEffect.class, loader); particleManager.load(Particles.PARTICLE_CLOUD_PUFF, ParticleEffect.class, loadParam); particleManager.load(Particles.PARTICLE_CAVE_DUST, ParticleEffect.class, loadParam); particleManager.finishLoading(); }
Example #6
Source File: Assets.java From gdx-proto with Apache License 2.0 | 5 votes |
public static void loadParticleEffects(ParticleSystem particleSystem) { ParticleEffectLoader.ParticleEffectLoadParameter loadParam = new ParticleEffectLoader.ParticleEffectLoadParameter(particleSystem.getBatches()); ParticleEffectLoader loader = new ParticleEffectLoader(new InternalFileHandleResolver()); manager.setLoader(ParticleEffect.class, loader); manager.load("particle/bullet-hit.pfx", ParticleEffect.class, loadParam); manager.load("particle/blue-explosion.pfx", ParticleEffect.class, loadParam); manager.finishLoading(); }
Example #7
Source File: GLTFAssetLoader.java From gdx-gltf with Apache License 2.0 | 4 votes |
public GLTFAssetLoader() { this(new InternalFileHandleResolver()); }
Example #8
Source File: GLBAssetLoader.java From gdx-gltf with Apache License 2.0 | 4 votes |
public GLBAssetLoader() { this(new InternalFileHandleResolver()); }
Example #9
Source File: UAtlasTmxMapLoader.java From uracer-kotd with Apache License 2.0 | 4 votes |
public UAtlasTmxMapLoader () { super(new InternalFileHandleResolver()); }
Example #10
Source File: MyNavTmxMapLoader.java From Norii with Apache License 2.0 | 4 votes |
public MyNavTmxMapLoader(String navigationLayerName, String navigationProperty, String navigationClosedValue) { this(new InternalFileHandleResolver(), navigationLayerName, navigationProperty, navigationClosedValue); }
Example #11
Source File: EngineAssetManager.java From bladecoder-adventure-engine with Apache License 2.0 | 4 votes |
protected EngineAssetManager() { this(new InternalFileHandleResolver()); // getLogger().setLevel(Application.LOG_DEBUG); }
Example #12
Source File: NavTmxMapLoader.java From pathfinding with Apache License 2.0 | 4 votes |
public NavTmxMapLoader(String navigationLayerName, String navigationProperty, String navigationClosedValue) { this(new InternalFileHandleResolver(), navigationLayerName, navigationProperty, navigationClosedValue); }