nytimes / aframe-loader-3dtiles-component

A-Frame component using 3D-Tiles
Other
190 stars 26 forks source link

update to aframe 1.5.0 and three.js r160 #38

Open Algorush opened 9 months ago

Algorush commented 9 months ago

I'm updating component to the latests aframe and three.js versions. I wanted to ask for advice. The latest versions of the WorkerPool and KTX2Loader libraries only support the jsm format. If I set type=module when calling these scripts from the examples, then an access error to three occurs, apparently in one of the libraries. If I insert import map into the example files like this then it works good:

    <script type="importmap">
      {
        "imports": {
          "three": "https://unpkg.com/three@0.160.0/build/three.module.js"
        }
      }
    </script>

Only now the textures from the examples are always at a low level of detail. Although I tried increasing the values:

 maximumMemoryUsage: 400,
 memoryCacheOverflow : 128
Avnerus commented 9 months ago

Hi! Thank you for working on this update. I think KTX2Loader and DracoLoader should be available in the three module pulled by the latest aframe? Also I think it should be possible to reuse the loaders in aframe's gltf-loader system, which would improve performance. But about your low-detail problem, could you share the branch you are working on? You could already open the PR with your branch. Thank you!

Algorush commented 8 months ago

Hi! I dont have write permission to create branch and PR, could you please give it to me? Thanks

Algorush commented 8 months ago

Also I think it should be possible to reuse the loaders in aframe's gltf-loader system, which would improve performance.

Did you mean gltf-model system? By the way, I didn't notice where these loaded libraries are used in component: KTX2Loader, DracoLoader. If I don't load them, the component works the same. And also, in the three-loader-3dtiles library, there is already import KTX2 and DracoLoader

Algorush commented 8 months ago

Here is my PR with updating changes: https://github.com/3DStreet/aframe-loader-3dtiles-component/pull/1 I would appreciate it if you would take a look at it. Now the example with google 3d tiles works well from this branch. But if I use a component on the local server that we work with in 3DStreet, then I cannot connect to the Google Tiles API due to error 403, cors

kfarr commented 8 months ago

closed by #39