This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma glslify: range = require('glsl-range'); | |
void main () { | |
// Your incoming value | |
float x = 25.0; | |
// Map value to 0..1 domain | |
// (no need if x is already in 0..1 range) | |
float min = 10.0; | |
float max = 100.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:typed_data'; | |
import 'package:meta/meta.dart'; | |
/// Image formats supported by Flutter. | |
enum ImageFormat { | |
/// A Portable Network Graphics format image. | |
png, | |
/// A JPEG format image. | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JsonParserIsolate { | |
final String input; | |
JsonParserIsolate(this.input); | |
Future parseJson({Function(String)? onError}) async { | |
final completer = Completer(); | |
var port = ReceivePort(); | |
var errorPort = ReceivePort(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// BSD 3-Clause License | |
// | |
// Copyright (c) 2021, Mike Rydstrom (Rydmike) | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// 1. Redistributions of source code must retain the above copyright notice, | |
// this list of conditions and the following disclaimer. |