This is a comprehensive reference guide for creating high-quality web animations. Use this as a knowledge base for implementing animations in web applications. All principles, timing values, and easing functions provided here are production-tested and ready to use.
| #!/usr/bin/dotnet fsi | |
| open System | |
| open System.Collections.Generic | |
| open System.Globalization | |
| open System.IO | |
| open System.Net.Http | |
| open System.Numerics | |
| open System.Text |
This is an example on how to use WPF and F# to do some simple physics using Verlet Integration.
The program creates a system of particles and constraints. Particles have inertia and is affected by gravity but their motion is also contrained by the constraints.
I tried to annotate the source code to help guide a developer familiar with languages like C#. If you have suggestions for how to improve it please leave a comment below.
| (* | |
| An immutable R-Tree implementation in F#. | |
| Based on: https://github.com/swimos/swim-rust/tree/main/swim_utilities/swim_rtree (licensed on Apache 2.0) | |
| Author: Bartosz Sypytkowski <b.sypytkowski at gmail.com> | |
| *) | |
| namespace Demos.RTree |
| open SharedMemory | |
| open MBrace.FsPickler | |
| module Rpc = | |
| type RpcContext<'command, 'message> = | |
| { name: string; buffer: RpcBuffer; post: 'command -> Async<'message>} with | |
| interface IDisposable with | |
| member this.Dispose() = this.buffer.Dispose() | |
| let createHost name (handler : 'command -> Async<'message>) = |
| // You need to add missing types manually to IExport in Three.fs if you need. | |
| // https://twitter.com/OnurGumusDev/status/1548282140806115330 | |
| module rec Dat | |
| open Browser.Types | |
| open Fable.Core | |
| open System |
| namespace GhFsharpTest | |
| open Grasshopper.Kernel | |
| open Grasshopper.Kernel.Types | |
| type Priority() = | |
| inherit GH_AssemblyPriority() | |
| override u.PriorityLoad() = | |
| GH_LoadingInstruction.Proceed |
Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)
The following steps are mostly taken from this guide and it's only necessary to do them once:
- Create an account in Azure (or use an existing one)
- Create a resource group (or use an existing one)
| (* | |
| Simulation of the Lorentz attractor, using Fable. | |
| If you want to see this code in action, just copy this code into the Fable REPL: | |
| https://fable.io/repl/ | |
| *) | |
| module App | |
| open Elmish | |
| open Elmish.React |