Skip to content

Instantly share code, notes, and snippets.

@jose-almir
Last active May 4, 2021 17:53
Show Gist options
  • Save jose-almir/20201ad806476a8095e39b4e5b8456e9 to your computer and use it in GitHub Desktop.
Save jose-almir/20201ad806476a8095e39b4e5b8456e9 to your computer and use it in GitHub Desktop.
Wave (Sample 01)
import 'dart:math';
import 'dart:typed_data';
import 'package:flutter/material.dart';
const amp = 20.0;
const freq = 1 / 150;
final mirrorX = Float64List.fromList([
1, 0, 0, 0,
0, -1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
]);
enum WavePosition { bottom, top }
double sine(double t, double A, double freq) => A * sin(2 * pi * freq * t);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment