Package com.ardor3d.util.resource

Examples of com.ardor3d.util.resource.URLResourceSource


                        closest.bmFont = (BMFont) binaryImporter.load(url);
                    } else {
                        // Not found, load from .fnt
                        resource = closest.source + ".fnt";
                        url = ResourceLocatorTool.getClassPathResource(BMFontProvider.class, resource);
                        closest.bmFont = new BMFont(new URLResourceSource(url), false);
                    }
                } catch (final IOException e) {
                    BMFontProvider.logger.severe("Unable to load font: " + closest.source);
                    return null;
                }
View Full Code Here


        final SimpleBloomEffect bloomEffect = new SimpleBloomEffect();
        effectManager.addEffect(bloomEffect);

        // Add a sepia tone post effect
        final Texture sepiaTexture = TextureManager.load(
                new URLResourceSource(ResourceLocatorTool.getClassPathResource(ColorReplaceEffect.class,
                        "com/ardor3d/extension/effect/sepiatone.png")), Texture.MinificationFilter.Trilinear, true);
        final ColorReplaceEffect sepiaEffect = new ColorReplaceEffect(sepiaTexture);
        effectManager.addEffect(sepiaEffect);

        // Finally, add a step to draw the result to the framebuffer
View Full Code Here

        loadSceneButton.setLayoutData(new AnchorLayoutData(Alignment.TOP_LEFT, basePanel, Alignment.TOP_LEFT, 5, -5));
        loadSceneButton.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent event) {
                final File file = daeFiles.get(fileIndex);
                try {
                    loadColladaModel(new URLResourceSource(file.toURI().toURL()));
                    t1.setText(file.getName());
                } catch (final MalformedURLException e) {
                    e.printStackTrace();
                }
                fileIndex = (fileIndex + 1) % daeFiles.size();
View Full Code Here

            }
        });

        // Load our layer and states from script
        try {
            final ResourceSource layersFile = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                    AnimationCopyExample.class, "com/ardor3d/example/pipeline/AnimationCopyExample.js"));
            JSLayerImporter.addLayers(layersFile, manager, input);
        } catch (final Exception e) {
            e.printStackTrace();
        }
View Full Code Here

        return t3;
    }

    private void importDogDae() {

        final ResourceSource rts = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                AnimationBlinnPhongExample.class,
                "com/ardor3d/example/media/models/collada/juanita/dog_Apr18_normals.dds"));
        final Texture t = TextureManager.load(rts, Texture.MinificationFilter.NearestNeighborNearestMipMap, true);
        final ResourceSource specularRS = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                AnimationBlinnPhongExample.class,
                "com/ardor3d/example/media/models/collada/juanita/dog_Apr18_specular.dds"));
        final Texture specular = TextureManager.load(specularRS,
                Texture.MinificationFilter.NearestNeighborNearestMipMap, false);
View Full Code Here

            }
        });

        // Load our layer and states from script
        try {
            final ResourceSource layersFile = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                    AnimationDemoExample.class, "com/ardor3d/example/pipeline/AnimationDemoExample.js"));
            JSLayerImporter.addLayers(layersFile, manager, input);
        } catch (final Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            }
        });

        // Load our layer and states from script
        try {
            final ResourceSource layersFile = new URLResourceSource(ResourceLocatorTool.getClassPathResource(
                    AnimationStateExample.class, "com/ardor3d/example/pipeline/AnimationCopyExample.js"));
            JSLayerImporter.addLayers(layersFile, manager, input);
        } catch (final Exception e) {
            e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of com.ardor3d.util.resource.URLResourceSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.