Learning three.js 07 :: Instancing & Multiple Models

Veröffentlicht am: 23 August 2016
auf dem Kanal: xSaucecode
14,681
93

I solve the issues in loading models from an array, and clone models instead of loading the same one twice. Source linked below.

This video builds on the code produced in video 6.

Loading models from a list can cause weird behaviour because the loading process is asynchronous. The "key" variable will change while the object is loading, so when it finishes loading it puts the geometry data into a different key than when it started loading. We stop this by wrapping the contents of the for loop in a floating function which keeps the key from changing.

I used this SO question to help.
https://stackoverflow.com/questions/2...

Models sourced from http://kenney.nl/ - A quality source of free to use models and textures.

source code - https://github.com/saucecode/threejs-...
github repo - https://github.com/saucecode/threejs-...

As I upload this I am in my last week of classes before a 2 week break. I should have the next video up before Sunday (2016-08-23). Next video will be the revered FPS gun view.

Send sonnets, your music playlists, and/or comments to cahill.julian@gmail.com

https://rawr.nz/


Auf dieser Seite können Sie das Online-Video Learning three.js 07 :: Instancing & Multiple Models mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer xSaucecode 23 August 2016 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 14,681 Mal angesehen und es wurde von 93 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!