GithubHelp home page GithubHelp logo

flake's People

Contributors

cpreh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

flake's Issues

Add "features" to test base

Description

"Features" are things that are toggle-able, like "display snow flakes" or "display velocity" arrows. A feature should be toggleable via json (so it's starting state can be set) and (optionally) by a key.

Implementation

The test base should receive a json identifier on construction. Also, a "feature map" is given, mapping a feature name to feature data. This data includes:

  • Name
  • Optional key code
  • Boolean value (state)

A key callback is registered to map the key codes to "toggle the boolean and issue a notification".

Improve cursor splatter

  • Splatting should be done each frame, using an additive mode
  • Left and right mouse should be splattable independently

Implement marching cubes snow

Principle

We have to determine which voxels are "active" and ready to receive collisions. Those are voxels adjacent to a boundary.

More precisely, we now have two bits of information for boundaries (obstacles): Their snow density and their "activity". Initially, only obstacles have the active bit set. The snow density is zero everywhere. That way, the marching cubes algorithm doesn't produce any snow polygons, which is what we want.

At each time step, we update the grid's activity bits. A grid point counts as active if...

  • it is either active itself
  • or has a neighbor (Moore or Von Neumann, haven't decided) that is an obstacle (or has snow density above 1, see below)

We also update the obstacle bits at each time step. An obstacle is either already an obstacle or has a snow density above 1. This way, accumulated snow changes the wind velocity field. If we don't want that, we have to adapt the algorithm (see the above change).

Snow flakes fly around and change the snow density value by colliding with active cells. If that occurs, the snow density is increased by a constant amount.

Marching Cubes

Until I find a better way, the snow density is transferred to RAM at certain points in time and is triangulated using marching cubes.

Problems

  • Transfer to RAM is slow (pinned memory, asynchronous transfers to the rescue?)
  • Snow isn't avalancing (could be implemented though)

Improve the ortho view camera grabbing

The cursor should be set to exclusive while grabbing. Also, an indicator where the grabbing started whould be nice (maybe a dotted line connecting the starting point and the current position?).

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.