GithubHelp home page GithubHelp logo

alexburner / dimension-trails Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 5.26 MB

Orbital motion through 01234D & time

Home Page: https://alexburner.github.io/dimension-trails/

HTML 2.02% TypeScript 97.59% CSS 0.39%

dimension-trails's Introduction

dimension trails

Orbital motion through 01234D & time

Static site — https://alexburner.github.io/dimension-trails

Playground — https://alexburner.github.io/dimensions

Development

install

Install npm dependencies

npm install

dev

Run dev server + watch (outputs to dev)

npm run dev
npm run clean # remove .cache/ dev/

tsc

Run TypeScript compiler + watch (no emit, types only)

npm run tsc

format

Run prettier and tslint --fix

npm run format # prettier + tslint
npm run prettier
npm run tslint

build

Run production build (outputs to docs)

npm run build

dimension-trails's People

Contributors

alexburner avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

dimension-trails's Issues

Use JSON.stringify/parse for worker messages

This is a faster method than the StructuredClone algorithm [ insert evidence here ]

However, TypedArrays don't play nicely with stringification [ insert evidence here ]

So, some sort of conversion would need to occur with the Vectors being exchanged between contexts. Or at least, appropriate types for this intermediary state, and proper handling on both ends.

  • the main thread converts Particle objects to Particle3 anyways, and indexes into the Vectors directly, so it is already (accidentally) compatible

  • the worker thread will need to convert incoming Particle objects in the 'init' message handler (luckily, this is not a hot path). Possibly a while loop, and break when an index is undefined?

const v = new Float32Array()
let i = 0
while(obj[i] !== undefined) v[i] = obj[i]
return v

Add new radialRandomVectorFromOther(length, otherVector)

New radialRandomVector() function that:

  • preserves negatives from other vector (since they get lost in the squares)
  • preserves magnitude (radius) of other vector
  • preserves existing values of other vector (so, kind of a radial random fill?)
  • handles mismatched dimension counts (main use case: lower → higher)

Also for the love of all that is good, is there a better name than radialRandomVectorFromOther()

This should improve consistency when generating initial particle sets from low to high dimensions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.