2024-01-25から1日間の記事一覧

react-native-reanimatedライブラリを利用する⑧

図形を heavyに 揺れ動かす(withSpring) App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, { useSharedValue, useAnimatedStyle, withSpring} from 'react-native-r…

react-native-reanimatedライブラリを利用する⑦

withSpringを使用する App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, { useSharedValue, useAnimatedStyle, withSpring} from 'react-native-reanimated'; export…

react-native-reanimatedライブラリを学ぶ⑥

withTimingを使って、円の拡大に『時間』をつける まずは、withTimingをつけるだけ。 App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, { useSharedValue, useAnimat…

react-native-reanimatedライブラリを学ぶ⑤

円を表示し、拡大する App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, { useSharedValue, useAnimatedProps, useAnimatedStyle, withTiming} from 'react-native-r…

react-native-reanimatedライブラリを学ぶ④

円を表示する react-native-svgライブラリを合わせて使用します。 App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View } from 'react-native'; import Animated, { useSharedValue } from 'react-native-reanimated'; im…

react-native-reanimatedライブラリを学ぶ③

図形を徐々に拡大 App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, {useSharedValue} from 'react-native-reanimated'; export default function App() { const wid…

react-native-reanimatedライブラリを学ぶ②

図形が移動するアニメーションを付けます。 App.js import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View, Button } from 'react-native'; import Animated, { useSharedValue, useAnimatedStyle, withSpring} from 'react-native…