Rody Davis
Welcome to my site
This is built with Lit-Element, Parcel and Web Components!
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Responses</title> | |
</head> | |
<body> | |
<input type="file" id="file-upload" /> | |
<script type="module"> |
import { html, LitElement, property, query } from 'lit-element'; | |
export abstract class Lit2DCanvas extends LitElement { | |
@query('#base') canvas!: HTMLCanvasElement; | |
@property({ type: Number }) width: number | undefined; | |
@property({ type: Number }) height: number | undefined; | |
canvasWidth = 400; | |
canvasHeight = 400; | |
render() { |
// Copyright 2019 The Chromium 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:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
enum SplitMode { normal, leftExpand, rightExpand } |
// build the base geometry for each building | |
var geometry = new THREE.CubeGeometry( 1, 1, 1 ); | |
// translate the geometry to place the pivot point at the bottom instead of the center | |
geometry.applyMatrix( new THREE.Matrix4().makeTranslation( 0, 0.5, 0 ) ); | |
// get rid of the bottom face - it is never seen | |
geometry.faces.splice( 3, 1 ); | |
geometry.faceVertexUvs[0].splice( 3, 1 ); | |
// change UVs for the top face | |
// - it is the roof so it wont use the same texture as the side of the building | |
// - set the UVs to the single coordinate 0,0. so the roof will be the same color |
import 'package:bloc/bloc.dart'; | |
import 'package:freezed_annotation/freezed_annotation.dart'; | |
part 'counter_bloc.freezed.dart'; | |
class CounterBloc extends Bloc<CounterEvent, CounterState> { | |
CounterBloc() : super(CounterState.value(0)); | |
@override | |
Stream<CounterState> mapEventToState(CounterEvent event) async* { |
import 'dart:convert'; | |
import 'package:analyzer/dart/analysis/utilities.dart'; | |
// import 'package:analyzer/dart/ast/syntactic_entity.dart'; | |
import 'package:analyzer/dart/ast/ast.dart'; | |
import 'package:analyzer/src/dart/ast/ast.dart'; | |
const kTestFlutterData = ''' | |
import 'package:flutter/material.dart'; |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
import 'package:flutter/material.dart'; | |
class AnimatedIndexedStack extends StatelessWidget { | |
const AnimatedIndexedStack({ | |
Key key, | |
@required this.index, | |
@required this.children, | |
@required this.duration, | |
}) : super(key: key); |
enum MyEnum { | |
simple, | |
special, | |
complex, | |
} | |
extension MyEnumUtils on MyEnum { | |
String get description { | |
switch (this) { | |
case MyEnum.simple: |