Skip to content

Instantly share code, notes, and snippets.

View jonahwilliams's full-sized avatar

Jonah Williams jonahwilliams

  • San Mateo, CA
View GitHub Profile
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
#version 120
#ifdef GL_ARB_shading_language_420pack
#extension GL_ARB_shading_language_420pack : require
#endif
struct FragInfo
{
vec2 texture_size;
vec2 direction;
float texture_sampler_y_coord_scale;
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct BlendInfo
{
float dst_input_alpha;
float dst_y_coord_scale;
float src_y_coord_scale;
void main() {
print(Foo(
a1: 'a',
a2: 'b',
a3: 'b',
a4: 'b',
a5: 'b',
a6: 'b',
a7: 'b',
a8: 'b',
#version 100
precision mediump float;
precision highp int;
struct GradientInfo
{
highp vec2 center;
highp float radius;
highp float tile_mode;
highp float alpha;
#version 460 core
precision highp float;
layout(location = 0) uniform float width;
layout(location = 1) uniform float height;
layout(location = 2) uniform float animation;
layout(location = 3) uniform sampler2D source;
out vec4 fragColor;
[ERROR:flutter/fml/backtrace.cc(108)] Caught signal SIGABRT during program execution.
Frame 0: 00007FF782A4B348 Unknown
Frame 1: 00007FF782A4AFEC Unknown
Frame 2: 00007FF782A49EAC Unknown
Frame 3: 00007FF782A4956C Unknown
Frame 4: 00007FF782A07DE0 Unknown
Frame 5: 00007FF782A0144D Unknown
Frame 6: 00007FF782A02FAE Unknown
Frame 7: 00007FF782DD258C Unknown
Frame 8: 00007FF9080E7034 BaseThreadInitThunk
// automatically generated by the FlatBuffers compiler, do not modify
// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable
library impeller.fb;
import 'dart:typed_data' show Uint8List;
import 'package:flat_buffers/flat_buffers.dart' as fb;
class Stage {
@jonahwilliams
jonahwilliams / main.dart
Last active October 4, 2022 22:11
Smart-er image provider
class SmartFileProvider extends ImageProvider<SmartFileProvider> {
const SmartFileProvider({required this.file, this.scale = 1.0});
/// The file to decode into an image.
final File file;
/// The scale to place in the [ImageInfo] object of the image.
final double scale;
static const int _kMaxFileSize = 2147483647; /* exercise left for the reader */
@jonahwilliams
jonahwilliams / main.dart
Created October 4, 2022 19:44
Animated Sampler
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';