public static void addDefaultResourceLocators() { try { ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MATERIAL, new SimpleResourceLocator( ResourceLocatorTool.getClassPathResource(Terrain.class, "com/ardor3d/extension/terrain/material"))); ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_SHADER, new SimpleResourceLocator( ResourceLocatorTool.getClassPathResource(Terrain.class, "com/ardor3d/extension/terrain/shader"))); } catch (final URISyntaxException ex) { ex.printStackTrace(); } } }
public static void addDefaultResourceLocators() { try { ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MATERIAL, new SimpleResourceLocator(ResourceLocatorTool.getClassPathResource(EffectUtils.class, "com/ardor3d/extension/effect/material"))); ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_SHADER, new SimpleResourceLocator(ResourceLocatorTool.getClassPathResource(EffectUtils.class, "com/ardor3d/extension/effect/shader"))); } catch (final URISyntaxException ex) { ex.printStackTrace(); } } }
public static void addDefaultResourceLocators() { try { ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MATERIAL, new SimpleResourceLocator(ResourceLocatorTool.getClassPathResource(SkinnedMesh.class, "com/ardor3d/extension/animation/skeletal/material"))); ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_SHADER, new SimpleResourceLocator(ResourceLocatorTool.getClassPathResource(SkinnedMesh.class, "com/ardor3d/extension/animation/skeletal/shader"))); } catch (final URISyntaxException ex) { ex.printStackTrace(); } } }
if (addLocator) { loc = new RelativeResourceLocator(resource); ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_TEXTURE, loc); } else { loc = null;