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.
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 |
| //========================================== | |
| // Working fully self-contained getting-started example for Suave Web Server scripting | |
| // | |
| // Note you don't need to have _anything_ installed before starting with this script. Nothing | |
| // but F# Interactive and this script. | |
| // | |
| // This script fetches the Paket.exe component which is referenced later in the script. | |
| // Initially the #r "paket.exe" reference is shown as unresolved. Once it has been | |
| // downloaded by the user (by executing the first part of the script) the reference | |
| // shows as resolved and can be used. |