Is there a way to customize the directory that BABYLON.SceneLoader scans for textures?

Is there a way for me to specify the folder where BABYLON.SceneLoader should look for textures when loading a babylon blender file?

Here is an example:

    BABYLON.SceneLoader.Load("","public/js/corredor.babylon", this.engine, function (newScene) { /*...*/ }

In the code snippet above, the file corredor.babylon is loaded from the public/js/ folder. However, I would like to load the textures from the public/js/textures/ folder instead.

Thank you!

Answer №1

Unfortunately, Babylon.js currently does not have the capability to support this feature. Textures are loaded concurrently with the .babylon file.

If you believe this feature should be added, feel free to suggest it on babylonjs.uservoice.com

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for executing PhantomJS commands through a NodeJs server?

My current challenge involves setting up a Node Server and incorporating PhantomJS commands within the NodeJS server. An example command includes: phantomjs phantom-server.js http://example.com Although I found some information related to this issue on ...

Errors may occur when parameters are introduced in a function

Is there a way to change the text of certain paragraphs by clicking different buttons without having to rewrite the entire function every time for just two text elements? Here is the original code with no parameters: $('.ilBorgo').click(good); ...

Encountering a problem with Nginx and WordPress where the admin-ajax.php is causing an issue when returning an AJAX result, leading to an error of Un

Currently, the issue is that everything runs smoothly on my Apache server, but when I switch to Nginx, an error is triggered with Uncaught SyntaxError: Unexpected token < Below is the function extracted from Functions.php function searchranges() { ...

Failure to respond to dual part form by RemoveClass

Currently, I am utilizing jQuery to visually control a form. The issue arises when trying to remove classes from the first part of the form using removeClass. While this works initially, upon clicking the button to advance to the second part of the form, t ...

jqueryajax function returns a boolean value upon completion

Recently, I developed a container method to handle an ajax request: function postRating(formData) { $.ajax({ type: "POST", url: '/api/ratings', data: formData }) .done(function () { return true ...

The error message "TypeError: childrenFuncResult.filter is not a function" indicates that

Looking to implement access restrictions on certain resources in React-Admin using 'permissions'? Check out this helpful demo. <Admin dataProvider={dataProvider} authProvider={authProvider} > {permissions => ( <> ...

Modifying an onClick handler function within a react element located in a node module, which points to a function in a prop declared in the main Component file

I have successfully implemented the coreui CDataTable to display a table. return ( <CDataTable items={data} fields={fields} ... /> ) Everything is working smoothly, but I wanted to add an extra button in the header of the C ...

Incorporating a way to automatically initiate a GET request following a POST request in React can effortlessly display a new

In my App component, I display a list of items and have a ModalForm where users can add new items. However, after adding a new item, I currently have to reload the page in order to see it in the list. I am looking for a way to automatically trigger a GET ...

Error: Cannot access 'addEventListener' property of null in Chrome Extension due to TypeError

I've been working on developing a chrome extension that autofills input forms in web pages. However, I encountered an error that says "cannot read properties of null." This issue arises when I try to add an event listener to a button in my code. The f ...

Transforming a data array into JSON format with the help of a property mapping technique

I am attempting to transform a 2d array into a JSON object using a key map. The key map is defined as var keys = ['id', 'title', 'customer.id', 'customer.name', 'customer.phone.home', 'customer.phone.m ...

Refresh a dynamically loaded webpage following an update

Trying to grasp the concept of reloading a dynamic page loaded with AJAX after a record is updated. Here's the jquery script on the page: <script type="text/javascript> function showUser(str) { if (str == "") { $("#txtHint").empty() ...

"Can you share how to send an array of integers from a Jade URL to an Express.js route

I am currently working on creating an array of integers in JavaScript using the Jade template engine. My goal is to send this array to an Express.js route when a button is clicked. I have attempted the following code: Jade File: //Passing the ID to fu ...

Retrieve information by clicking on a hyperlink in JavaScript

Is it possible to extract content from a website that uses "onClick" instead of "href" in hyperlinks, resulting in the same URL regardless of the page being viewed? The specific content I'm attempting to retrieve is located under "Alimentação" > ...

The Jade template engine encountered a problem when attempting to include the <p> tag within a div element

Encountered an issue when trying to add a "p" tag inside the div. Here is my code: !!! html head title= title link(rel='stylesheet', href='/stylesheets/#{stylesheet}.css') link(rel='stylesheet', href='/styles ...

While creating a customer profile sample, I encountered an issue where I received an error message stating "POST http://localhost:3000/cusprofiles/add 400 (Bad Request)" when attempting to add data

I'm having trouble creating a customer profile for a vet clinic in my code. I'm unable to add and edit customer details, and I'm not sure where I've made a mistake. The only method that seems to be working is the GET method. Can someone ...

Having difficulty launching the sapper app in production mode

Having trouble starting my sapper project in production mode. When running npm run start, the following output appears on the console: niklas@Niklass-iMac project-name % npm run start > [email protected] start /Users/niklas/path/to/project > node _ ...

Arrange four Divs next to each other with flexbox styling

I've been struggling with aligning my cards side by side. They are a series of divs nested in lists under a <ul> Changing the positioning is not resolving the issue, and I'm hesitant to alter the display as it's crucial for responsive ...

How can I achieve a smooth transition effect for an image using JavaScript

Hey there! I'm currently working on a project where I have multiple buttons that, when hovered over, change the background-image of a specific div. However, instead of the images suddenly appearing on the screen, I would like them to fade in gradually ...

Declaring a variable outside of a function or object

It's been a challenge for me to assign a value to the variable result as it always stays undefined. if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } ...

What is the method for retrieving the non-strike price amount in selenium via xpath?

This is the link to the webpage I am attempting to automate: My goal is to extract the value of the non-strikethrough price (currently $ 20.00) using Selenium and an XPath locator. The following HTML snippet contains the element I am targeting: <div ...