Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions nootils/decor/fire.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Random} from '../internal/random.ts';

import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
// deno-lint-ignore-file
import { Wall } from "https://deno.land/x/remapper@2.1.0/src/mod.ts";
import { rand } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";

/**
* Spawns in walls that resemble a fire.
Expand All @@ -12,23 +12,22 @@ import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
* @param y The starting Y position of the fire.
* @param z The starting Z position of the fire.
* @author StormPacer
* @author IntoTheAbyss490(Updated Everything)
*/

export function Fire(startingBeat: number, duration: number, fireWallDuration: number, size: number, x: number, y: number, z: number) {
for (let i = 0; i < (duration * 6); i++) {

let wall = new Remapper.Wall(startingBeat + (i / 6), fireWallDuration, 1, 0, 0);
wall.customData = {
_interactable: false,
_scale: [size, size, size],
_animation: {
_dissolve: [[0, 0], [1, 0.1], [1, 0.7], [0, 1]],
_color: [[1, 0, 0, 0.5, 0], [0.996, 1, 0.239, 0.5, 1]],
_localRotation: [[Random(0, 180), Random(0, 180), Random(0, 180), 0], [Random(0, 180), Random(0, 180), Random(0, 180), 1]],
_definitePosition: [[x, y, z, 0, "easeOutCubic"], [(x + Random(-2, 2)), (y + Random(3, 5)), z, 1]]
}
};

wall.push(true);
let wall = new Wall(startingBeat + (i / 6), fireWallDuration, 1, 0, 0);
wall.interactable = false,
wall.scale = [size, size, size],
wall.animate.dissolve = [[0, 0], [1, 0.1], [1, 0.7], [0, 1]],
wall.animate.color = [[1, 0, 0, 0.5, 0], [0.996, 1, 0.239, 0.5, 1]],
wall.animate.localRotation = [[rand(0, 180), rand(0, 180), rand(0, 180), 0], [rand(0, 180), rand(0, 180), rand(0, 180), 1]],
wall.animate.definitePosition = [[x, y, z, 0, "easeOutCubic"], [(x + rand(-2, 2)), (y + rand(3, 5)), z, 1]]

wall.push();
}
}
};

//Fire(0, 100, 20, 0.25, 0, 0, 0)
35 changes: 17 additions & 18 deletions nootils/decor/floatingPillars.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Random} from '../internal/random.ts';

import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
// deno-lint-ignore-file
import { rand } from 'https://deno.land/x/remapper@3.1.2/src/mod.ts';
import { Wall } from 'https://deno.land/x/remapper@3.1.2/src/mod.ts';

/**
* Spawns in floating pillars on the desired positions and spacing.
Expand All @@ -18,9 +18,10 @@ import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
* @param B The blue value for the color of the pillars.
* @param A The alpha value for the color of the pillars.
* @author StormPacer
* @author IntoTheAbyss490(Updating Everything)
*/

export function FloatingPillars(startBeat: number, endBeat: number, amountPerRow: number, spacing: number, startX: number, height: number, width: number, startZ: number, track: string, R: number, G: number, B: number, A: number) {
export function FloatingPillars(startBeat: number, endBeat: number, amountPerRow: number, spacing: number, startX: number, height: number, width: number, startZ: number, track: string, R: number, G: number, B: number, A: number, min: number, max: number) {
let z = startZ
for (let i = 0; i <= amountPerRow; i++) {
if (z <= spacing * amountPerRow) {
Expand All @@ -30,21 +31,19 @@ export function FloatingPillars(startBeat: number, endBeat: number, amountPerRow
if (x <= spacing * amountPerRow) {
x += spacing

let wall = new Remapper.Wall(startBeat, endBeat - startBeat, 1, 0, 0);

wall.customData = {
_track: track,
_color: [R, G, B, A],
_interactable: false,
_scale: [width, height, width],
_animation: {
_definitePosition: [[x, Random(5, 30), z, 0, "easeInOutCubic"], [x, Random(5, 30), z, 0.2, "easeInOutCubic"], [x, Random(5, 30), z, 0.4, "easeInOutCubic"], [x, Random(5, 30), z, 0.6, "easeInOutCubic"], [x, Random(5, 30), z, 0.8, "easeInOutCubic"], [x, Random(5, 30), z, 1, "easeInOutCubic"]]
}
};
let wall = new Wall(startBeat, endBeat - startBeat, 1, 0, 0);

wall.push(true);
}
}
wall.track.value = track,
wall.color = [R, G, B, A],
wall.interactable = false,
wall.scale = [width, height, width],
wall.animate.localRotation = [[rand(0, 360), rand(0, 360), rand(0, 360), 0, "easeInOutCubic"], [rand(0, 360), rand(0, 360), rand(0, 360), 0.2, "easeInOutCubic"], [rand(0, 360), rand(0, 360), rand(0, 360), 0.4, "easeInOutCubic"], [rand(0, 360), rand(0, 360), rand(0, 360), 0.6, "easeInOutCubic"], [rand(0, 360), rand(0, 360), rand(0, 360), 0.8, "easeInOutCubic"], [rand(0, 360), rand(0, 360), rand(0, 360), 1, "easeInOutCubic"]],
wall.animate.definitePosition = [[x, rand(min, max, 0.1), z, 0, "easeInOutCubic"], [x, rand(min, max, 0.1), z, 0.2, "easeInOutCubic"], [x, rand(min, max, 0.1), z, 0.4, "easeInOutCubic"], [x, rand(min, max, 0.1), z, 0.6, "easeInOutCubic"], [x, rand(min, max, 0.1), z, 0.8, "easeInOutCubic"], [x, rand(min, max, 0.1), z, 1, "easeInOutCubic"]]
wall.push();
}
};
}
}
}

//FloatingPillars(0.125, 168, 12, 12, -65, 0.5, 0.5, -10, "pillarsTrack", 1, 1, 1, 10, 2, 35)
41 changes: 22 additions & 19 deletions nootils/decor/rain.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
import {Random} from '../internal/random.ts';

import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
// deno-lint-ignore-file
import { Wall } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";
import { rand } from "https://deno.land/x/remapper@3.1.2/src/mod.ts"

/**
* Spawns in walls that resemble rain.
* @param startingBeat The beat that the rain should start on.
* @param duration For how many beats the rain should last for.
* @param amount How many walls should be created per beat.
* @param R The red value for the color.
* @param G The green value for the color.
* @param B The blue value for the color.
* @param A The alpha value for the color.
* @author StormPacer
* @author IntoTheAbyss490(Updating Everything)
*/

export function Rain(startingBeat: number, duration: number, amount: number) {
export function Rain(startingBeat: number, duration: number, amount: number, R: number, G: number, B: number, A: number) {
for (let i = 0; i < (duration * amount); i++) {
let x = Random(-40, 40)
let z = Random(0, 50)

let wall = new Remapper.Wall(startingBeat + (i / amount), 0.5, 1, 0, 0);
let x = rand(-40, 40)
let z = rand(0, 50)

wall.customData = {
_color: [0.419, 0.513, 1, 0.1],
_interactable: false,
_scale: [0.1, 6, 0.1],
_animation: {
_dissolve: [[0, 0.1], [1, 0.2], [1, 0.9], [0, 1]],
_definitePosition: [[x, Random(200, 300), z, 0], [x, Random(-60, -40), z, 1]]
}
};
let wall = new Wall(startingBeat + (i / amount), 0.5, 1, 0, 0);

wall.push(true);
wall.color = [R, G, B, A],
wall.interactable = false,
wall.scale = [0.1, 6, 0.1],
wall.animate.dissolve = [[0, 0.1], [1, 0.2], [1, 0.9], [0, 1]],
wall.animate.definitePosition = [[x, rand(200, 300), z, 0], [x, rand(-60, -40), z, 1]]

wall.push();
}
}
};

//Rain(0, 100, 100,0.419, 0.513, 1, 0.1)
38 changes: 21 additions & 17 deletions nootils/decor/smoke.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Random} from '../internal/random.ts';
import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
// deno-lint-ignore-file
import { Wall } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";
import { rand } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";

/**
* Spawns in walls that resemble smoke
Expand All @@ -10,25 +11,28 @@ import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
* @param x The starting X position of the smoke.
* @param y The starting Y position of the smoke.
* @param z The starting Z position of the smoke.
* @param R The red value for the color.
* @param G The green value for the color.
* @param B The blue value for the color.
* @param A The alpha value for the color.
* @author StormPacer
* @author IntoTheAbyss490(Updating Everything)
*/

export function Smoke(startingBeat: number, duration: number, smokeWallDuration: number, size: number, x: number, y: number, z: number) {
export function Smoke(startingBeat: number, duration: number, smokeWallDuration: number, size: number, x: number, y: number, z: number, R: number, G: number, B: number, A: number) {
for (let i = 0; i < (duration * 6); i++) {

let wall = new Remapper.Wall(startingBeat + (i / 6), smokeWallDuration, 1, 0, 0);
let wall = new Wall(startingBeat + (i / 6), smokeWallDuration, 1, 0, 0);

wall.customData = {
_color: [0.1, 0.1, 0.1, 0.1],
_interactable: false,
_scale: [size, size, size],
_animation: {
_dissolve: [[0, 0], [1, 0.1], [1, 0.7], [0, 1]],
_localRotation: [[Random(0, 180), Random(0, 180), Random(0, 180), 0], [Random(0, 180), Random(0, 180), Random(0, 180), 1]],
_definitePosition: [[x, y, z, 0, "easeOutCubic"], [(x + Random(-3, 3)), (y + Random(4, 8)), z, 1]]
}
};

wall.push(true);
wall.color = [R, G, B, A],
wall.interactable = false,
wall.scale = [size, size, size],
wall.animate.dissolve = [[0, 0], [1, 0.1], [1, 0.7], [0, 1]],
wall.animate.localRotation = [[rand(0, 180), rand(0, 180), rand(0, 180), 0], [rand(0, 180), rand(0, 180), rand(0, 180), 1]],
wall.animate.definitePosition = [[x, y, z, 0, "easeOutCubic"], [(x + rand(-3, 3)), (y + rand(4, 8)), z, 1]]

wall.push();
}
}
};

//Smoke(0, 100, 20, 0.25, 0, 0, 0, 0.1, 0.1, 0.1, 0.1)
43 changes: 23 additions & 20 deletions nootils/decor/snow.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
import {Random} from "../internal/random.ts"

import * as Remapper from "https://deno.land/x/remapper@3.0.0/src/mod.ts"
// deno-lint-ignore-file
import { rand } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";
import { Wall } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";

/**
* Spawns in walls that resemble snow.
* @param startingBeat The beat that the snow should start on.
* @param duration For how many beats the snow should last for.
* @param amount How many walls should be created per beat.
* @param R The red value for the color.
* @param G The green value for the color.
* @param B The blue value for the color.
* @param A The alpha value for the color.
* @author StormPacer
* @author IntoTheAbyss490(Updating Everything)
*/

export function Snow(startingBeat: number, duration: number, amount: number) {
export function Snow(startingBeat: number, duration: number, amount: number, R: number, G: number, B: number, A: number) {
for (let i = 0; i < (duration * amount); i++) {
let x = Random(-40, 40)
let z = Random(0, 50)
let y = Random(60, 80)

let wall = new Remapper.Wall(startingBeat + (i / amount), 5, 1, 0, 0);
let x = rand(-40, 40)
let z = rand(0, 50)
let y = rand(60, 80)

wall.customData = {
_color: [1, 1, 1, 4],
_interactable: false,
_scale: [0.2, 0.2, 0.2],
_animation: {
_dissolve: [[0, 0.1], [1, 0.2], [1, 0.9], [0, 1]],
_definitePosition: [[x, (y = y - 15), z, 0], [(x + Random(-4, 4)), (y = y - 15), (z + Random(-5, 5)), 0.2], [(x + Random(-4, 4)), (y = y - 15), (z + Random(-5, 5)), 0.4], [(x + Random(-4, 4)), (y = y - 15), (z + Random(-5, 5)), 0.6], [(x + Random(-4, 4)), (y = y - 15), (z + Random(-5, 5)), 0.8], [(x + Random(-4, 4)), (y = y - 15), (z + Random(-5, 5)), 1]]
}
};
let wall = new Wall(startingBeat + (i / amount), 5, 1, 0, 0);

wall.push(true);
wall.color = [R, G, B, A],
wall.interactable = false,
wall.scale = [0.2, 0.2, 0.2],
wall.animate.dissolve = [[0, 0.1], [1, 0.2], [1, 0.9], [0, 1]],
wall.animate.definitePosition = [[x, (y = y - 15), z, 0], [(x + rand(-4, 4)), (y = y - 15), (z + rand(-5, 5)), 0.2], [(x + rand(-4, 4)), (y = y - 15), (z + rand(-5, 5)), 0.4], [(x + rand(-4, 4)), (y = y - 15), (z + rand(-5, 5)), 0.6], [(x + rand(-4, 4)), (y = y - 15), (z + rand(-5, 5)), 0.8], [(x + rand(-4, 4)), (y = y - 15), (z + rand(-5, 5)), 1]]

wall.push();
}
}
};

//Snow(0, 100, 100, 1, 1, 1, 4)
34 changes: 0 additions & 34 deletions nootils/decor/wallBorderSize.ts

This file was deleted.

31 changes: 17 additions & 14 deletions nootils/decor/water.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as Remapper from "https://deno.land/x/remapper@2.1.0/src/mod.ts"
// deno-lint-ignore-file
import { Wall } from "https://deno.land/x/remapper@3.1.2/src/mod.ts";

/**
* Spawns a wall that resembles water.
Expand All @@ -7,10 +8,15 @@ import * as Remapper from "https://deno.land/x/remapper@2.1.0/src/mod.ts"
* @param track What track the water should be assigned to.
* @param speed How fast the water should move, numbers between 0-5.
* @param y On which Y position the water should spawn.
* @param R The red value for the color.
* @param G The green value for the color.
* @param B The blue value for the color.
* @param A The alpha value for the color.
* @author StormPacer
* @author IntoTheAbyss490(Updating Everything)
*/

export function Water(startBeat: number, endBeat: number, track: string, speed: number, y: number) {
export function Water(startBeat: number, endBeat: number, track: string, speed: number, y: number, R: number, G: number, B: number, A: number) {
let z = 0
switch(speed) {
case 0:
Expand All @@ -27,18 +33,15 @@ export function Water(startBeat: number, endBeat: number, track: string, speed:
z = -1500
}

let wall = new Remapper.Wall(startBeat, endBeat, 1, 0, 0);

wall.customData = {
_track: track,
_color: [0, 1.5, 2, 10],
_fake: true,
_interactable: false,
_scale: [2000, 0.5, 2000],
_animation: {
_definitePosition: [[-1000, y, -1000, 0], [-1000, y, z, 1]]
}
};
let wall = new Wall(startBeat, endBeat, 1, 0, 0);

wall.track.value = track,
wall.color = [R, G, B, A],
wall.interactable = false,
wall.scale = [2000, 0.5, 2000],
wall.animate.definitePosition = [[-1000, y, -1000, 0], [-1000, y, z, 1]]

wall.push();
}

//Water(0, 100, "water", 0.25, 0, 0, 1.5, 2, 10)
8 changes: 3 additions & 5 deletions nootils/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
/*
Nootils - Made by StormPacer and cal117 and curated by the community.
Powered by Remapper

Updated by IntoTheAbyss490
*/

export * from './decor/wallBorderSize.ts'

export * from './decor/floatingPillars.ts'
export * from './decor/fire.ts'
export * from './decor/rain.ts'
export * from './decor/smoke.ts'
export * from './decor/snow.ts'
export * from './decor/water.ts'
export * from './stars.ts'

export * from './notes/ghosty.ts'
export * from './notes/notetrail.ts'
export * from './notes/floatingdebris.ts'

export * from './utils/giveTrack.ts'

export * from './shapes/triangle.ts'
export * from './shapes/square.ts'
Expand Down
4 changes: 0 additions & 4 deletions nootils/internal/random.ts

This file was deleted.

Loading