Forum Replies Created
-
AuthorPosts
-
johngrigniCustomer
Also, when I send a changeTexture() call from runCode() with different URL values, it loads the correct textures but doesn’t apply UVs to them. Is there something for specifying the UV to load the textures in the material (in the Blender file the mesh just has the one default named ‘UVMap’)?
johngrigniCustomerPerhaps I am too much of a noob, because it’s not working at all.
In the .js file for my project, the second to last function is prepareExternalInterface(app) and the comment says to register functions in app.ExternalInterface to call them from puzzles, and sites an example where myJSFunction is defined as a simple console.log. So is registering the same as defining?
So do I need to define the function there, or under function runCode() or both places? I’m very confused.
No matter what I do I’m getting an error: “TypeError: appInstance.ExternalInterface.changeTextures is not a function. (In ‘appInstance.ExternalInterface.changeTextures(objName, diffuseURL, normalURL)’, ‘appInstance.ExternalInterface.changeTextures’ is undefined)”johngrigniCustomerI keep getting an error:
TypeError: v3dApp.ExternalInterface.changeTexture is not a function. (In ‘v3dApp.ExternalInterface.changeTexture(objName, difffuseURL, normalURL)’, ‘v3dApp.ExternalInterface.changeTexture’ is undefined)I put the script into the Ati.js file after the comment in the runCode function.
I’m attaching a screenshot of my test file to see if I’ve messed up the puzzles to call the function.
johngrigniCustomerThank you for your timely reply!
So, how do I make that work for 100+ textures? Do I make the ‘./new_image.png’ into a variable that gets fed into the function, and have preview icons that basically set the variable and then call the function?
Since I’m working with two different maps (diffuse and normal), do I need to add that as a variable as well, or make it two different functions?
johngrigniCustomerThe problem is the client has over 100 textures they want to use, and loading that many invisible objects at the start is prohibitive.
So if it is coding only, where does the code go? I can see an example, does this get appended to the html file, or a separate JavaScript file, or in the Blender file itself?
-
AuthorPosts