If you are using a FlatList in React Native, there’s a chance you will want to use the scrollToIndex function to scroll to a certain item’s index. Unfortunately, this function is a lot easier to use with fixed item heights where it is easy to implement the required getItemLayout function. For lists where the row size is dynamic and not easy to compute, we need to respond to the failure case and recursively attempt to scroll to the location.
Continue reading “React Native FlatList scrollToIndex Function to Scroll to Item with Index with Fixed or Variable Unknown Row Size”Month: October 2020
Example of Using Three.js with Tween.js
This is a quick example of using Create.js’s Tween.js library with Three.js to perform 3D WebGL animations. This library is not to be confused with another one with the same name, although the APIs and concepts are similar. This example simply adds animation and uses Tween.js for the game loop but is otherwise the same as the basic three.js example.
Continue reading “Example of Using Three.js with Tween.js”