Runtime error with callback function

Why sence dont work on first line in function?

You already invoke bef when using it within load(). Try this code:

loader.load( 'path/to/asset.gltf', bef );
1 Like

Hello thank you its work, i need to change position of model gltf by jquery, how i can do that?

Sorry, it’s not clear what you mean by that. How is jQuery related to changing the position of a 3D object?

Sharing screenshots of code is no good style. Please use the formatting tools of the forum to share code listings. You can do this by starting and ending a code listing with three ``` signs.

In any event, if you want to transform 3D objects in event listeners, it’s important to store a reference to your model to make it accessible. You can then do stuff like:

button.addEventListener( 'click', function ( event ) {

    if ( model !== undefined ) mode.position.x += 1;

} );
1 Like