Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunnelbliick committed May 6, 2024
1 parent 196c30b commit 6300e3d
Showing 1 changed file with 41 additions and 39 deletions.
80 changes: 41 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,45 +36,47 @@ Creating a dynamic storyboard in notOSU! involves setting up layers, a playfield
### Example Configuration:

```csharp
var receptors = GetLayer("r");
var notes = GetLayer("n");

// General values
var starttime = 0; // the starttime where the playfield is initialized
var endtime = 257044; // the endtime where the playfield is nolonger beeing rendered
var duration = endtime - starttime; // the length the playfield is kept alive
// Playfield Scale
var width = 250f; // widht of the playfield / invert to flip
var height = 600f; // height of the playfield / invert to flip -600 = downscroll | 600 = upscropll
var receptorWallOffset = 50f; // how big the boundary box for the receptor is 50 means it will be pushed away 50 units from the wall
// Note initilization Values
var sliderAccuracy = 30; // The Segment length for sliderbodies since they are rendered in slices 30 is default
var isColored = false; // This property is used if you want to color the notes by urself for effects. It does not swap if the snap coloring is used.
// Drawinstance Values
var updatesPerSecond = 50; // The amount of steps the rendring engine does to render out note and receptor positions
var scrollSpeed = 900f; // The speed at which the Notes scroll
var fadeTime = 150; // The time notes will fade in
Playfield field = new Playfield();
field.initilizePlayField(receptors, notes, starttime, endtime, width, height, receptorWallOffset, Beatmap.OverallDifficulty);
field.initializeNotes(Beatmap.HitObjects.ToList(), Beatmap.GetTimingPointAt(starttime).Bpm, Beatmap.GetTimingPointAt(starttime).Offset, isColored, sliderAccuracy);

DrawInstance draw = new DrawInstance(field, starttime, scrollSpeed, updatesPerSecond, OsbEasing.None, true, fadeTime, fadeTime);
draw.drawViaEquation(duration, NoteFunction, true);

}

// NoteFunction is used to manipulate the pathway and a bunch of other things the note should do on their way to the receptor
// Please be warry that this is beeing run async so you need to keep thread safety in mind when working on complex Functions.
// You can use the progress to determin how far the note is in its cycle 0 = just start | 1 = ontop of receptor / finished
// Special flags for hold bodies exist
public Vector2 NoteFunction(EquationParameters p)
{
return p.position;
}
// Generate function in a storybrew script
public override void Generate() {

var receptors = GetLayer("r");
var notes = GetLayer("n");

// General values
var starttime = 0; // the starttime where the playfield is initialized
var endtime = 257044; // the endtime where the playfield is nolonger beeing rendered
var duration = endtime - starttime; // the length the playfield is kept alive
// Playfield Scale
var width = 250f; // widht of the playfield / invert to flip
var height = 600f; // height of the playfield / invert to flip -600 = downscroll | 600 = upscropll
var receptorWallOffset = 50f; // how big the boundary box for the receptor is 50 means it will be pushed away 50 units from the wall
// Note initilization Values
var sliderAccuracy = 30; // The Segment length for sliderbodies since they are rendered in slices 30 is default
var isColored = false; // This property is used if you want to color the notes by urself for effects. It does not swap if the snap coloring is used.
// Drawinstance Values
var updatesPerSecond = 50; // The amount of steps the rendring engine does to render out note and receptor positions
var scrollSpeed = 900f; // The speed at which the Notes scroll
var fadeTime = 150; // The time notes will fade in
Playfield field = new Playfield();
field.initilizePlayField(receptors, notes, starttime, endtime, width, height, receptorWallOffset, Beatmap.OverallDifficulty);
field.initializeNotes(Beatmap.HitObjects.ToList(), Beatmap.GetTimingPointAt(starttime).Bpm, Beatmap.GetTimingPointAt(starttime).Offset, isColored, sliderAccuracy);

DrawInstance draw = new DrawInstance(field, starttime, scrollSpeed, updatesPerSecond, OsbEasing.None, true, fadeTime, fadeTime);
draw.drawViaEquation(duration, NoteFunction, true);
}

// NoteFunction is used to manipulate the pathway and a bunch of other things the note should do on their way to the receptor
// Please be warry that this is beeing run async so you need to keep thread safety in mind when working on complex Functions.
// You can use the progress to determin how far the note is in its cycle 0 = just start | 1 = ontop of receptor / finished
// Special flags for hold bodies exist
public Vector2 NoteFunction(EquationParameters p)
{
return p.position;
}
```

Follow these instructions to effectively set up your notOSU! Playfield and Notes for storyboard creation.
Expand Down

0 comments on commit 6300e3d

Please sign in to comment.