Giter Club home page Giter Club logo

deepseavisual's Introduction

Deep Sea Visual

Music visualiser powered by p5.js.

Spawning and managing creatures

entityManager.spawnSkeleton(id, x, y, size, range, focus, type, threshold, colorMode, showEyes);
  • Size : the amount of bones in the creature.
  • Range : how far the creature jumps with each step.
  • Focus : the frequency the creature will react to.
  • Threshold : the minimum amplitude required for the creature to wander randomly (0 - 255).
  • Type : choose between four different defined colour types (0 - 3).
  • Colour Mode : pick whether the colours are calculated with HSB or RGB.
  • Toggle Eyes : boolean choosing whether the eyes render or not.

Editing values or behaviours of specific creatues

An entity can be searched for using the EntityManager object. For example, here's how to change a creatures colour mode:

entityManager.getEntityById('skeleton0').colorMode = HSB;

This can be used to change values of multiple creatures at once:

for (let i = entityManager.skeletons.length-1; i>=0; i--) {
  entityManager.getEntityById('skeleton' + i).colorMode = RGB;
}

Despawning a creature can also be done using the EntityManager object:

entityManager.getEntityById('skeleton0').delete();

Loading and selecting songs

Define variable with loadAsset function and add it to the songs array:

let song_name = loadAsset('audio', '.../path/to/song');
SONGS.push(song_name);

To select a song use the following command:

selectSong(song_name, start_time);

Global Variables

Change these with the console for different rendering modes:

let g_smoke = false;
let g_disable_joints = false;
let g_show_eyes = true;
let g_paint_mode = false;

deepseavisual's People

Contributors

willangus avatar

Watchers

James Cloos avatar  avatar

Forkers

dylbird

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.