|
11 | 11 | <script type="importmap"> |
12 | 12 | { |
13 | 13 | "imports": { |
14 | | - "three": "https://cdn.jsdelivr.net/npm/three@0.169.0/build/three.module.min.js", |
15 | | - "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.169.0/examples/jsm/", |
| 14 | + "three": "https://cdn.jsdelivr.net/npm/three@0.170.0/build/three.module.min.js", |
| 15 | + "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/", |
16 | 16 | "meshoptimizer_decoder": "https://cdn.jsdelivr.net/npm/[email protected]/meshopt_decoder.module.min.js" |
17 | 17 | } |
18 | 18 | } |
|
59 | 59 | gltf_VideoTextureExtension = GLTFVideoTextureExtension; |
60 | 60 |
|
61 | 61 | ktx2_loader = new KTX2Loader(); |
62 | | - ktx2_loader.setTranscoderPath( "https://cdn.jsdelivr.net/npm/three@0.169.0/examples/jsm/libs/basis/" ); |
| 62 | + ktx2_loader.setTranscoderPath( "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/libs/basis/" ); |
63 | 63 |
|
64 | 64 | manager.addHandler( /\.ktx2$/i, ktx2_loader ); |
65 | 65 |
|
66 | 66 | draco_loader = new DRACOLoader(); |
67 | | - draco_loader.setDecoderPath( "https://cdn.jsdelivr.net/npm/three@0.169.0/examples/jsm/libs/draco/" ); |
| 67 | + draco_loader.setDecoderPath( "https://cdn.jsdelivr.net/npm/three@0.170.0/examples/jsm/libs/draco/" ); |
68 | 68 | draco_loader.setDecoderConfig( { type: 'js' } ); |
69 | 69 | draco_loader.preload(); |
70 | 70 |
|
|
212 | 212 |
|
213 | 213 | <!-- mouse_wheel variable is used throughout as a trigger for rendering --> |
214 | 214 |
|
215 | | - <title>ASSIMP Viewer (r169)</title> |
| 215 | + <title>ASSIMP Viewer (r170)</title> |
216 | 216 | </head> |
217 | 217 | <body id="body" onload="reset_all(); document_ready(); disabled_changed();" onresize="resize();"> |
218 | 218 | <div id="fixed_menu" class="fixed-menu"> |
|
598 | 598 | assimp_files.push( i ); |
599 | 599 | }; |
600 | 600 |
|
| 601 | + if (local_bin_files.length > 0) { |
| 602 | + local_bin_files.forEach( file_index => { |
| 603 | + let url = URL.createObjectURL( local_files[ file_index ] ); |
| 604 | + URL.revokeObjectURL( local_files[ file_index ] ); |
| 605 | + |
| 606 | + resource_path += local_files[ file_index ].name + ',' + url + ','; |
| 607 | + }); |
| 608 | + } |
| 609 | + |
| 610 | + if (local_files_indexes.length > 0) { |
| 611 | + local_files_indexes.forEach( file_index => { |
| 612 | + let url = URL.createObjectURL( local_files[ file_index ] ); |
| 613 | + URL.revokeObjectURL( local_files[ file_index ] ); |
| 614 | + |
| 615 | + resource_path += local_files[ file_index ].name + ',' + url + ','; |
| 616 | + }); |
| 617 | + } |
| 618 | + |
601 | 619 | if (selected_gltf_file === null && selected_draco_file === null) { |
602 | 620 | load_with_assimp( local_files, false ); |
603 | 621 | } else { |
|
729 | 747 | } |
730 | 748 |
|
731 | 749 | async function load_components( from_url = false ) { |
732 | | - if (local_bin_files.length > 0) { |
733 | | - local_bin_files.forEach( file_index => { |
734 | | - resource_path += local_files[ file_index ].name + ',' + URL.createObjectURL( local_files[ file_index ] ) + ','; |
735 | | - URL.revokeObjectURL( local_files[ file_index ] ); |
736 | | - }); |
737 | | - } |
738 | | - |
739 | | - if (local_files_indexes.length > 0) { |
740 | | - local_files_indexes.forEach( file_index => { |
741 | | - resource_path += local_files[ file_index ].name + ',' + URL.createObjectURL( local_files[ file_index ] ) + ','; |
742 | | - URL.revokeObjectURL( local_files[ file_index ] ); |
743 | | - }); |
744 | | - } |
745 | | - |
746 | 750 | if (renderer === undefined) { |
747 | 751 | renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } ); |
748 | 752 | renderer.setPixelRatio( window.devicePixelRatio ); |
|
0 commit comments