Skip to content

Instantly share code, notes, and snippets.

View roipeker's full-sized avatar
🏠
Working from home

Roi Peker roipeker

🏠
Working from home
View GitHub Profile
@roipeker
roipeker / lerper.dart
Last active March 20, 2023 01:31
linear interpolation utils (+ easings)
/// Copyright 2022 roipeker
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
@roipeker
roipeker / particles.dart
Last active February 25, 2023 22:29
Simple particles system in Graphx.
/// Author: roipeker 2023.
///
/// Particles in GraphX
///
/// video example:
/// https://giphy.com/gifs/VXZ0GvQSRh49AUYX9b
///
Future<void> addParticles() async {
@roipeker
roipeker / logo_drawer.dart
Last active December 3, 2022 10:03
GraphX splashscreen sample
/// copyright roipeker 2020
///
/// web demo:
/// https://roi-graphx-splash.surge.sh
///
/// source code (gists):
/// https://gist.github.com/roipeker/37374272d15539aa60c2bdc39001a035
///
@roipeker
roipeker / BezierEase.as
Created April 21, 2018 13:40
Cubic Bezier Easing for any AS3 Tween engine (Starling / Greensock)
// =================================================================================================
//
// Created by Rodrigo Lopez [roipeker™] on 21/04/2018.
//
// =================================================================================================
// ** Cubic Bezier Easing **
// based on https://github.com/gre/bezier-easing/
//
// Compatible with Greensock and Starling tween engine.
@roipeker
roipeker / responsive_graphx_example.dart
Last active October 2, 2022 23:09
responsive concept for graphx.
void main() {
runApp(
MaterialApp(
home: GameWrapper(),
debugShowCheckedModeBanner: false,
),
);
}
@roipeker
roipeker / main.dart
Last active September 30, 2022 03:05
Graphx puzzle grid demo. Image mapping, useful for jigsaw puzzles.
import 'package:flutter/material.dart';
import 'package:graphx/graphx.dart';
/// Live demo:
/// https://graphx-puzzle-ref.surge.sh/
/// Remember, add graphx to your pubspec!
/// You can get the image used in the demo here
/// https://graphx-puzzle-ref.surge.sh/assets/assets/ath.jpg
@roipeker
roipeker / storage_service.dart
Created January 20, 2021 19:12
GetX StorageService with GetStorage
/// roipeker 2021
/// part of a bigger template.
import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import '../services.dart';
class StorageService extends GetxService implements BaseService {
@roipeker
roipeker / main.dart
Created June 29, 2022 11:23
sample for nir orientation
/// in puspec dependency: native_device_orientation: ^1.1.4
// sample for nir.
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:native_device_orientation/native_device_orientation.dart';
@roipeker
roipeker / submit_button.dart
Created January 15, 2021 20:43
GraphX: submit + preloader button animation.
/// idea from: https://dribbble.com/shots/5215990-Submit-button-loading-animation
/// demo: https://graphx-submit-loading-btn.surge.sh/
import 'package:flutter/material.dart';
import 'package:graphx/graphx.dart';
class SubmitButton extends Sprite {
@override
void addedToStage() {
stage.color = 0xfffffffff;
@roipeker
roipeker / figma.dart
Last active June 12, 2022 19:19
illustration error lamp robot
// use a CustomPaint and pass the Canvas.
// sample https://ibb.co/TH35KcB
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
void drawFigma(Canvas canvas){
Path path;