Jump to content

Skybox textures - do they have to jpg?


neoRiley
 Share

Recommended Posts

I'm following the tutorial here: https://github.com/BabylonJS/Babylon.js/wiki/15-Environment

 

In the tutorial, it mentions "Skybox_px.png", but then the sample images are labeled as ".jpg".  When i run my code, the engine is assuming .jpg for the file extensions as I'm getting 404 errors saying that "Skybox_px.jgp" is missing.  Is there anyway to specify the extension to be used for the skybox images?

 

Thanks for your help,

 

John

Link to comment
Share on other sites

actually, ultimately, we should be able to send an array of images in the proper order so that we don't have to follow the px, py, pz, nx, ny, nz format.  Many of the skyboxes I own use front, back, left, right, up, down in their naming convention.  So passing an array in the proper would make it an open solution at that point.

 

Thoughts?

 

Thanks guys!

Link to comment
Share on other sites

Good idea, I've just changed the signature of new BABYLOn.CubeTexture to this one:

    
BABYLON.CubeTexture = function (rootUrl, scene, extensions) {        this._scene = scene;        this._scene.textures.push(this);                this.name = rootUrl;        this.url = rootUrl;        this.hasAlpha = false;        this.coordinatesMode = BABYLON.Texture.CUBIC_MODE;        this._texture = this._getFromCache(rootUrl);        if (!extensions) {            extensions = ["_px.jpg", "_py.jpg", "_pz.jpg", "_nx.jpg", "_ny.jpg", "_nz.jpg"];        }
Link to comment
Share on other sites

You can do so:

 

Babylon.js-master\Tools\BuildOurOwnBabylonJS\BuildOurOwnBabylonJS\executables\BuildOurOwnBabylonJS.bat

 

Then you will find the file here:

 

Babylon.js-master\Tools\BuildOurOwnBabylonJS\BuildOurOwnBabylonJS\ourOwnBabylon.js

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...