Three.js: Deprecate BinaryLoader

Created on 21 Mar 2018  ยท  10Comments  ยท  Source: mrdoob/three.js

This was discussed before but i'd like to make a separate issue so it's easier to track the progress. BinaryLoader is still used in three examples. However, there are already some PRs by @looeee

  • [x] webgl_materials_cubemap โ†’ #14843
  • [x] webgl_materials_cars โ†’ #14843
  • [x] webgl_effects_parallaxbarrier โ†’ #13084

There is also a dependency to BinaryLoader in examples/js/Car.js.

Looking at the PRs, i wonder if it's not more expedient to just focus on the removal of BinaryLoader and don't perform any Car.js related refactoring or simplification. I would see these changes in different PRs. In this way, i think we can easier make progress.

What do you guys think?

Loaders

Most helpful comment

Are you suggesting that we combine these two example into one that uses the car controls and allows changing the car's materials? If so I'll make a combined PR, perhaps with a better car model if I can find one.

Yes, that sounds good! In this way, there is a single example that demonstrates the Car.js related features. Besides, changing webgl_materials_cubemap_dynamic becomes easy.

All 10 comments

don't perform any Car.js related refactoring or simplification

That was my original intention, however it turned out that Car.js is quite strictly tied in to the Binary format model being used, which means that just replacing the model with one in a different format doesn't work.

It makes sense to me that if we have something as specific as car controls in the repo, then it should be possible to use it with any generic car model, consisting of a body, 4 wheels and an optional steering wheel. I haven't tested my update with that many models, but it's at least a step in the right direction.

You could try exporting the current model using the GLTFExporter and make minimal changes that way, but then we still have a not very useful car controls file tied to a specifically designed model. However since I seem to have hit a dead end here, if you have more success with that approach then I won't complain ๐Ÿ˜›

Um, let's start with: webgl_effects_parallaxbarrier

I would just copy webgl_effects_anaglyph and replace AnaglyphEffect with ParallaxBarrierEffect. In this way, both effects are easier to compare...

@looeee Would you like to perform the change (in #13084) or should I make a fresh PR?

If you don't mind waiting a day or so I can do it, otherwise feel free to make a fresh PR ๐Ÿ‘

Let's reuse your existing PR ๐Ÿ˜Š

@looeee Okay, the first example webgl_effects_parallaxbarrier is done. Next, I suggest to remove webgl_materials_cubemap_dynamic and rename webgl_materials_cubemap_dynamic2 to webgl_materials_cubemap_dynamic. I would use Car.js in webgl_materials_cars instead.

I would use Car.js in webgl_materials_cars instead

The issue with this is that car.js is very strongly tied in with BinaryLoader. In #13314 I refactored it to use a glTF model, and in #13337 I refactored webgl_materials_cars to use a glTF model instead of binary format, however neither of those PRs was accepted.

Here are the updated live examples from those two PRs:

webgl_materials_cars
misc_controls_car

Are you suggesting that we combine these two example into one that uses the car controls and allows changing the car's materials? If so I'll make a combined PR, perhaps with a better car model if I can find one.

Are you suggesting that we combine these two example into one that uses the car controls and allows changing the car's materials? If so I'll make a combined PR, perhaps with a better car model if I can find one.

Yes, that sounds good! In this way, there is a single example that demonstrates the Car.js related features. Besides, changing webgl_materials_cubemap_dynamic becomes easy.

OK, give me a couple of days and I'll get onto it ๐Ÿ˜„

@looeee Thanks for your PRs ๐Ÿ˜!

Was this page helpful?
0 / 5 - 0 ratings