当前位置: 首页>>代码示例>>Java>>正文


Java SkyFactory.createSky方法代码示例

本文整理汇总了Java中com.jme3.util.SkyFactory.createSky方法的典型用法代码示例。如果您正苦于以下问题:Java SkyFactory.createSky方法的具体用法?Java SkyFactory.createSky怎么用?Java SkyFactory.createSky使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.util.SkyFactory的用法示例。


在下文中一共展示了SkyFactory.createSky方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: simpleInitApp

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public void simpleInitApp() {
    
    Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");
    Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");
    Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");
    Texture south = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_south.jpg");
    Texture up = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_up.jpg");
    Texture down = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_down.jpg");
    
    
    /*
    Texture west = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_x.png");
    Texture east = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_x.png");
    Texture north = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_z.png");
    Texture south = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_z.png");
    Texture up = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_y.png");
    Texture down = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_y.png");
    */
    
    Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:23,代码来源:TestSkyLoadingLagoon.java

示例2: simpleInitApp

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public void simpleInitApp() {
    /*
    Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");
    Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");
    Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");
    Texture south = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_south.jpg");
    Texture up = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_up.jpg");
    Texture down = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_down.jpg");
    */

    Texture west = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_x.png");
    Texture east = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_x.png");
    Texture north = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_z.png");
    Texture south = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_z.png");
    Texture up = assetManager.loadTexture("Textures/Sky/Primitives/primitives_positive_y.png");
    Texture down = assetManager.loadTexture("Textures/Sky/Primitives/primitives_negative_y.png");
    
    Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:21,代码来源:TestSkyLoadingPrimitives.java

示例3: loadSkyBoxes

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
/**
 * Loads up the sky boxes into fields, ready to use
 * @param am
 *  The asset manager used to load the textures from
 */
private void loadSkyBoxes(AssetManager am){
    daySkyBox = SkyFactory.createSky(am,
            am.loadTexture("/Textures/skybox/day_right.jpg"),
            am.loadTexture("/Textures/skybox/day_left.jpg"),
            am.loadTexture("/Textures/skybox/day_back.jpg"),
            am.loadTexture("/Textures/skybox/day_front.jpg"),
            am.loadTexture("/Textures/skybox/day_top.jpg"),
            am.loadTexture("/Textures/skybox/day_top.jpg"));

    nightSkyBox = SkyFactory.createSky(am,
            am.loadTexture("/Textures/skybox/night_right.jpg"),
            am.loadTexture("/Textures/skybox/night_left.jpg"),
            am.loadTexture("/Textures/skybox/night_back.jpg"),
            am.loadTexture("/Textures/skybox/night_front.jpg"),
            am.loadTexture("/Textures/skybox/night_top.jpg"),
            am.loadTexture("/Textures/skybox/night_bottom.jpg"));

    daySkyBox.setShadowMode(ShadowMode.Off);
    nightSkyBox.setShadowMode(ShadowMode.Off);
}
 
开发者ID:GSam,项目名称:Game-Project,代码行数:26,代码来源:VisualEffectsManager.java

示例4: AdvancedPBRWithStudioSky3DEditorState

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public AdvancedPBRWithStudioSky3DEditorState(@NotNull final T fileEditor) {
    super(fileEditor);

    final AssetManager assetManager = EDITOR.getAssetManager();

    final Geometry sky = (Geometry) SkyFactory.createSky(assetManager, "graphics/textures/sky/studio.hdr",
            SkyFactory.EnvMapType.EquirectMap);

    final Node stateNode = getStateNode();
    stateNode.attachChild(sky);
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:12,代码来源:AdvancedPBRWithStudioSky3DEditorState.java

示例5: prepareScene

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
/**
 * Prepare a transfer processor to transfer preview result to a image view.
 *
 * @return the transfer processor.
 */
@JMEThread
private @NotNull FrameTransferSceneProcessor prepareScene() {

    final Editor editor = Editor.getInstance();
    final AssetManager assetManager = editor.getAssetManager();
    final Spatial sky = SkyFactory.createSky(assetManager, "graphics/textures/sky/studio.hdr",
                    SkyFactory.EnvMapType.EquirectMap);

    final DirectionalLight light = new DirectionalLight();
    light.setDirection(LIGHT_DIRECTION);

    final Node cameraNode = new Node("Camera node");
    final Node rootNode = editor.getPreviewNode();
    rootNode.addControl(this);
    rootNode.attachChild(sky);
    rootNode.addLight(light);
    rootNode.attachChild(cameraNode);
    rootNode.attachChild(modelNode);

    final Camera camera = editor.getPreviewCamera();
    final EditorCamera editorCamera = new EditorCamera(camera, cameraNode);
    editorCamera.setMaxDistance(10000);
    editorCamera.setMinDistance(0.01F);
    editorCamera.setSmoothMotion(false);
    editorCamera.setRotationSensitivity(1);
    editorCamera.setZoomSensitivity(0.2F);

    //TODO added supporting moving the camera

    processor = bind(editor, imageView, imageView, editor.getPreviewViewPort(), false);
    processor.setTransferMode(ON_CHANGES);
    processor.setEnabled(false);

    return processor;
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:41,代码来源:JMEFilePreviewManager.java

示例6: createSky

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
private void createSky() {
    Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");
    Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");
    Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");
    Texture south = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_south.jpg");
    Texture up = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_up.jpg");
    Texture down = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_down.jpg");

    Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:TerrainTestAdvanced.java

示例7: simpleInitApp

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public void simpleInitApp() {
    Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");
    Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");
    Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");
    Texture south = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_south.jpg");
    Texture up = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_up.jpg");
    Texture down = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_down.jpg");

    Spatial sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:12,代码来源:TestSkyLoading.java

示例8: doCreateSky

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
private Spatial doCreateSky(Node parent,
                            Texture west,
                            Texture east,
                            Texture north,
                            Texture south,
                            Texture top,
                            Texture bottom,
                            Vector3f normalScale)
{
    AssetManager manager = SceneApplication.getApplication().getAssetManager();
    Spatial sky = SkyFactory.createSky(manager, west, east, north, south, top, bottom, normalScale);
    parent.attachChild(sky);
    return sky;
}
 
开发者ID:jMonkeyEngine,项目名称:sdk,代码行数:15,代码来源:TerrainEditorController.java

示例9: loadModel

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
@Override
protected Spatial loadModel() {
    AssetManager am = LuoYing.getApp().getAssetManager();
    Texture w = am.loadTexture(baseDir != null ? baseDir + west : west);
    Texture e = am.loadTexture(baseDir != null ? baseDir + east : east);
    Texture n = am.loadTexture(baseDir != null ? baseDir + north : north);
    Texture s = am.loadTexture(baseDir != null ? baseDir + south : south);
    Texture u = am.loadTexture(baseDir != null ? baseDir + up : up);
    Texture d = am.loadTexture(baseDir != null ? baseDir + down : down);
    sky = SkyFactory.createSky(am, w, e, n, s, u, d);
    return sky;
}
 
开发者ID:huliqing,项目名称:LuoYing,代码行数:13,代码来源:SkyBoxEntity.java

示例10: createSky

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
private void createSky() {
    Texture west = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_west.jpg");
    Texture east = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_east.jpg");
    Texture north = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_north.jpg");
    Texture south = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_south.jpg");
    Texture up = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_up.jpg");
    Texture down = assetManager.loadTexture("Textures/Sky/Lagoon/lagoon_down.jpg");

    sky = SkyFactory.createSky(assetManager, west, east, north, south, up, down);
    rootNode.attachChild(sky);
}
 
开发者ID:shamanDevel,项目名称:ProceduralTerrain,代码行数:12,代码来源:TerrainHeighmapCreator.java

示例11: loadSky

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
private void loadSky() {
	AssetManager assetManager = HexScapeCore.getInstance().getHexScapeJme3Application().getAssetManager();
	
	Texture west = assetManager.loadTexture("left.png");
       Texture east = assetManager.loadTexture("right.png");
       Texture north = assetManager.loadTexture("front.png");
       Texture south = assetManager.loadTexture("back.png");
       Texture up = assetManager.loadTexture("top.png");
       Texture down = assetManager.loadTexture("bottom.png");

	spatial = SkyFactory.createSky(HexScapeCore.getInstance().getHexScapeJme3Application().getAssetManager(), west, east, north, south, up, down);
	spatial.setShadowMode(ShadowMode.Off);
}
 
开发者ID:lyrgard,项目名称:HexScape,代码行数:14,代码来源:Sky.java

示例12: SkyBox

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public SkyBox(AssetManager assetManager, Node rootNode)
{
    String path = "Textures/skybox/";
    
    skyBox = SkyFactory.createSky(assetManager,
                                  assetManager.loadTexture(path + "caveLeft.png"),
                                  assetManager.loadTexture(path + "caveRight.png"),
                                  assetManager.loadTexture(path + "caveFront.png"),
                                  assetManager.loadTexture(path + "caveBack.png"),
                                  assetManager.loadTexture(path + "caveTop.png"),
                                  assetManager.loadTexture(path + "caveDown.png"));      
    skyBox.setName("sky");
    
   rootNode.attachChild(skyBox); 
}
 
开发者ID:abnercoimbre,项目名称:tower-defense-cave,代码行数:16,代码来源:SkyBox.java

示例13: requestPreview

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public void requestPreview(String textureName, String displayName, int width, int height, JComponent picLabel, JLabel infoLabel) {
    TextureKey key = new TextureKey(textureName);
    picPreview = picLabel;
    assetManager.deleteFromCache(key);
    Texture t = assetManager.loadTexture(key);
    Spatial geom = quad;
    if (key.getTextureTypeHint() == Texture.Type.TwoDimensional) {
        material.setTexture("ColorMap", t);
        geom.setMaterial(material);
        if (infoLabel != null) {
            infoLabel.setText(" " + displayName + "    w : " + t.getImage().getWidth() + "    h : " + t.getImage().getHeight());
        }
    } else if (key.getTextureTypeHint() == Texture.Type.ThreeDimensional) {
        geom = quad3D;
        assetManager.deleteFromCache(key);
        key.setAsTexture3D(true);
        t = assetManager.loadTexture(key);
        material3D.setTexture("Texture", t);
        geom.setMaterial(material3D);
        if (infoLabel != null) {
            infoLabel.setText(" " + displayName + " (Texture3D)    w : " + t.getImage().getWidth() + "    h : " + t.getImage().getHeight() + "    d : " + t.getImage().getDepth());
        }
    } else if (key.getTextureTypeHint() == Texture.Type.CubeMap) {
        assetManager.deleteFromCache(key);
        geom = SkyFactory.createSky(assetManager, textureName, false);
        if (infoLabel != null) {
            infoLabel.setText(" " + displayName + " (CubeMap)    w : " + t.getImage().getWidth() + "    h : " + t.getImage().getHeight());
        }
    }

    PreviewRequest request = new PreviewRequest(this, geom, width, height);
    request.getCameraRequest().setLocation(new Vector3f(0, 0, 5.3f));
    request.getCameraRequest().setLookAt(new Vector3f(0, 0, 0), Vector3f.UNIT_Y.mult(-1));
    SceneApplication.getApplication().createPreview(request);
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:36,代码来源:DDSPreview.java

示例14: getSky

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
public Spatial getSky(AssetManager assetManager) {

        return SkyFactory.createSky(
                assetManager, assetManager.loadTexture("Textures/skydome.png"),
                new Vector3f(0.8f, 1f, 1f).normalize()/*Vector3f.UNIT_XYZ*/, true, 200050);
    }
 
开发者ID:ZoltanTheHun,项目名称:SkyHussars,代码行数:7,代码来源:Sky.java

示例15: simpleInitApp

import com.jme3.util.SkyFactory; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
    // put the camera in a bad position
    cam.setLocation(new Vector3f(-2.336393f, 11.91392f, -7.139601f));
    cam.setRotation(new Quaternion(0.23602544f, 0.11321983f, -0.027698677f, 0.96473104f));
    //cam.setFrustumFar(1000);


    Material mat = new Material(assetManager,"Common/MatDefs/Light/Lighting.j3md");
    mat.setFloat("Shininess", 15f);
    mat.setBoolean("UseMaterialColors", true);
    mat.setColor("Ambient", ColorRGBA.Yellow.mult(0.2f));
    mat.setColor("Diffuse", ColorRGBA.Yellow.mult(0.2f));
    mat.setColor("Specular", ColorRGBA.Yellow.mult(0.8f));




    Material matSoil = new Material(assetManager,"Common/MatDefs/Light/Lighting.j3md");
    matSoil.setFloat("Shininess", 15f);
    matSoil.setBoolean("UseMaterialColors", true);
    matSoil.setColor("Ambient", ColorRGBA.Gray);
    matSoil.setColor("Diffuse", ColorRGBA.Black);
    matSoil.setColor("Specular", ColorRGBA.Gray);
   


    teapot = assetManager.loadModel("Models/Teapot/Teapot.obj");
    teapot.setLocalTranslation(0,0,10);

    teapot.setMaterial(mat);
    teapot.setShadowMode(ShadowMode.CastAndReceive);
    teapot.setLocalScale(10.0f);
    rootNode.attachChild(teapot);

  

    Geometry soil=new Geometry("soil", new Box(new Vector3f(0, -13, 550), 800, 10, 700));
    soil.setMaterial(matSoil);
    soil.setShadowMode(ShadowMode.CastAndReceive);
    rootNode.attachChild(soil);

    DirectionalLight light=new DirectionalLight();
    light.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());
    light.setColor(ColorRGBA.White.mult(1.5f));
    rootNode.addLight(light);

    // load sky
    Spatial sky = SkyFactory.createSky(assetManager, "Textures/Sky/Bright/FullskiesBlueClear03.dds", false);
    sky.setCullHint(Spatial.CullHint.Never);
    rootNode.attachChild(sky);

    fpp=new FilterPostProcessor(assetManager);
    PosterizationFilter pf=new PosterizationFilter();
    
   

    viewPort.addProcessor(fpp);
    fpp.addFilter(pf);
    initInputs();

}
 
开发者ID:mleoking,项目名称:PhET,代码行数:63,代码来源:TestPosterization.java


注:本文中的com.jme3.util.SkyFactory.createSky方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。