У меня есть код в котором я скачиваю файл
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My first three.js app</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
<script src="three.js"></script>
<script src="OBJLoader2.js"></script>
<script src="OrbitControls.js"></script>
<button id="export_scene">Export Scene1</button>
<div>
<label><input id="option_trs" name="trs" type="checkbox"/>TRS</label>
<label><input id="option_visible" name="visible" type="checkbox" checked="checked"/>Only Visible</label>
<label><input id="option_drawrange" name="visible" type="checkbox" checked="checked"/>Truncate drawRange</label><br/>
<label><input id="option_binary" name="visible" type="checkbox">Binary (<code>.glb</code>)</label>
<label><input id="option_maxsize" name="maxSize" type="number" value="4096" min="2" max="8192" step="1"> Max texture size</label>
</div>
<script type="module">
</script>
<script type="module">
import * as THREE from './three.module.js';
import { GLTFExporter } from './GLTFExporter.js';
import { OBJLoader } from './OBJLoader.js';
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
const renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var DiLight = new THREE.DirectionalLight(0xFDFCEB, 0.5)
scene.add(DiLight);
const geometry = new THREE.BoxGeometry();
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const cube = new THREE.Mesh( geometry, material );
scene.add( cube );
let waltHead;
const loader = new OBJLoader();
loader.load( 'models/WaltHead.obj', function ( obj ) {
waltHead = obj;
waltHead.scale.multiplyScalar( 0.2 );
waltHead.position.set( 0, 0, 0 );
scene.add( waltHead );
} );
camera.position.z = 5;
function exportGLTF( input ) {
const gltfExporter = new GLTFExporter();
const options = {
trs: document.getElementById( 'option_trs' ).checked,
onlyVisible: document.getElementById( 'option_visible' ).checked,
truncateDrawRange: document.getElementById( 'option_drawrange' ).checked,
binary: document.getElementById( 'option_binary' ).checked,
maxTextureSize: Number( document.getElementById( 'option_maxsize' ).value ) || Infinity // To prevent NaN value
};
gltfExporter.parse( input, function ( result ) {
if ( result instanceof ArrayBuffer ) {
saveArrayBuffer( result, 'scene.glb' );
} else {
const output = JSON.stringify( result, null, 2 );
console.log( output );
saveString( output, 'scene.gltf' );
}
}, options );
}
document.getElementById( 'export_scene' ).addEventListener( 'click', function () {
exportGLTF( scene );
} );
const link = document.createElement( 'a' );
link.style.display = 'none';
document.body.appendChild( link ); // Firefox workaround, see #6594
function save( blob, filename ) {
link.href = URL.createObjectURL( blob );
console.log(link.href)
link.download = filename;
link.click();
// URL.revokeObjectURL( url ); breaks Firefox...
}
function saveString( text, filename ) {
save( new Blob( [ text ], { type: 'text/plain' } ), filename );
}
const animate = function () {
requestAnimationFrame( animate );
renderer.render( scene, camera );
};
animate();
</script>
</body>
</html>
import eel
eel.init('web')
eel.start("test.html", size=(700,700))
Но он скачивается в место по умолчанию
Могу ли я в ell или three изменить этот путь например
сохранить возле python файла?