Skip to content

Instantly share code, notes, and snippets.

View tomaspietravallo's full-sized avatar

Tomás Pietravallo tomaspietravallo

View GitHub Profile
import Scene from 'Scene';
import FaceTracking from 'FaceTracking';
import Animation from 'Animation';
/*
Model structure:
- Model
- skeleton (null)
- Armatures (null objs)
- Petal & pollen (meshes)
@tomaspietravallo
tomaspietravallo / ReactiveToVanilla.ts
Created July 5, 2021 21:35
Type for objects composed of Scalar/String/Boolean signals, that get snapshot'ed to their vanilla counterparts
type ReactiveToVanilla<Obj> = {
[Property in keyof Obj]:
Obj[Property] extends ScalarSignal ? number :
Obj[Property] extends StringSignal ? string :
Obj[Property] extends BoolSignal ? boolean
: any
};
@tomaspietravallo
tomaspietravallo / how-to-publish-to-npm.md
Created August 16, 2021 02:15 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "https:/yourblog.com"

npm adduser

Keybase proof

I hereby claim:

  • I am tomaspietravallo on github.
  • I am tomaspietravallo (https://keybase.io/tomaspietravallo) on keybase.
  • I have a public key whose fingerprint is E257 F3B4 FCB2 03EB A048 BF81 AA0E 9A42 DF7F 5E40

To claim this, I am signing this object:

// sparkar-volts@3.0.0-beta.3
import { Pool, } from './volts';
// Pool aka 'a pool of dynamically instanced objects'
// A Pool of 'block0' objects, to be spawned under the Focal Distance
const pool = new Pool('block0', 'Focal Distance', {});
// spawn 400 objects, 5 at a time
// (more at a time -> slower)
pool.populate(400, 5);
@tomaspietravallo
tomaspietravallo / comment.txt
Last active December 31, 2023 22:57
This script will automatically alias "spark" to the Meta Spark Studio CLI corresponding to the latest build found under MacOS's Applications folder
Works as long as the apps are saved with names that follow the pattern
- Meta Spark Studio vXXX.XX
- Meta Spark Studio XXX.XX
Example: Meta Spark Studio v170