We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

johngrigni

Forum Replies Created

Viewing 5 posts - 151 through 155 (of 155 total)
  • Author
    Posts
  • in reply to: Replacing textures rather than materials #3272
    johngrigni
    Customer

    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’)?

    in reply to: Replacing textures rather than materials #3271
    johngrigni
    Customer

    Perhaps 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)”

    in reply to: Replacing textures rather than materials #3263
    johngrigni
    Customer

    I 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.

    in reply to: Replacing textures rather than materials #3224
    johngrigni
    Customer

    Thank 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?

    in reply to: Replacing textures rather than materials #3219
    johngrigni
    Customer

    The 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?

Viewing 5 posts - 151 through 155 (of 155 total)