Skip to content

Commit

Permalink
bump versions of demos (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
notgiven688 authored Aug 21, 2024
1 parent 9f11b7d commit 35434ea
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions docs/docs/01_quickstart/00-project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Next, create a new console application in this directory and add Raylib-cs and J

```sh
dotnet new console
dotnet add package Raylib-cs --version 5.0.0
dotnet add package Jitter2 --version 2.4.0
dotnet add package Raylib-cs --version 6.1.1
dotnet add package Jitter2 --version 2.4.1
```

You have completed the setup. If you now execute the following command:
Expand Down
28 changes: 14 additions & 14 deletions docs/docs/01_quickstart/01-render-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,42 +19,42 @@ static Texture2D GenCheckedTexture(int size, int checks, Color colorA, Color col
return textureMag;
}

// Set a hint for anti-aliasing
SetConfigFlags(ConfigFlags.FLAG_MSAA_4X_HINT);
// set a hint for anti-aliasing
SetConfigFlags(ConfigFlags.Msaa4xHint);

// Initialize a 1200x800 px window with a title
InitWindow(1200, 800, "BoxDrop Example");
// initialize a 1200x800 px window with a title
InitWindow(1200, 800, "BoxDrop example");

// Dynamically create a plane model
Texture2D texture = GenCheckedTexture(10, 1, Color.LIGHTGRAY, Color.GRAY);
// dynamically create a plane model
Texture2D texture = GenCheckedTexture(10, 1, Color.LightGray, Color.Gray);
Model planeModel = LoadModelFromMesh(GenMeshPlane(10, 10, 10, 10));
SetMaterialTexture(ref planeModel, 0, MaterialMapIndex.MATERIAL_MAP_DIFFUSE, ref texture);
SetMaterialTexture(ref planeModel, 0, MaterialMapIndex.Diffuse, ref texture);

// Create a camera
// create a camera
Camera3D camera = new ()
{
Position = new Vector3(-20.0f, 8.0f, 10.0f),
Target = new Vector3(0.0f, 4.0f, 0.0f),
Up = new Vector3(0.0f, 1.0f, 0.0f),
FovY = 45.0f,
Projection = CameraProjection.CAMERA_PERSPECTIVE
Projection = CameraProjection.Perspective
};

// Set a target of 100 fps
// 100 fps target
SetTargetFPS(100);

// Simple render loop
// simple render loop
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.BLUE);
ClearBackground(Color.Blue);

BeginMode3D(camera);

DrawModel(planeModel, Vector3.Zero, 1.0f, Color.WHITE);
DrawModel(planeModel, Vector3.Zero, 1.0f, Color.White);

EndMode3D();
DrawText($"{GetFPS()} fps", 10, 10, 20, Color.WHITE);
DrawText($"{GetFPS()} fps", 10, 10, 20, Color.White);

EndDrawing();
}
Expand Down
18 changes: 9 additions & 9 deletions docs/docs/01_quickstart/02-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ static Texture2D GenCheckedTexture(int size, int checks, Color colorA, Color col
const int NumberOfBoxes = 12;

// set a hint for anti-aliasing
SetConfigFlags(ConfigFlags.FLAG_MSAA_4X_HINT);
SetConfigFlags(ConfigFlags.Msaa4xHint);

// initialize a 1200x800 px window with a title
InitWindow(1200, 800, "BoxDrop example");

// dynamically create a plane model
Texture2D texture = GenCheckedTexture(10, 1, Color.LIGHTGRAY, Color.GRAY);
Texture2D texture = GenCheckedTexture(10, 1, Color.LightGray, Color.Gray);
Model planeModel = LoadModelFromMesh(GenMeshPlane(10, 10, 10, 10));
SetMaterialTexture(ref planeModel, 0, MaterialMapIndex.MATERIAL_MAP_DIFFUSE, ref texture);
SetMaterialTexture(ref planeModel, 0, MaterialMapIndex.Diffuse, ref texture);

// dynamically create a box model
texture = GenCheckedTexture(2, 1, Color.WHITE, Color.MAGENTA);
texture = GenCheckedTexture(2, 1, Color.White, Color.Magenta);
Mesh boxMesh = GenMeshCube(1, 1, 1);
Material boxMat = LoadMaterialDefault();
SetMaterialTexture(ref boxMat, MaterialMapIndex.MATERIAL_MAP_DIFFUSE, texture);
SetMaterialTexture(ref boxMat, MaterialMapIndex.Diffuse, texture);

// initialize the Jitter physics world
World world = new ();
Expand All @@ -80,7 +80,7 @@ Camera3D camera = new ()
Target = new Vector3(0.0f, 4.0f, 0.0f),
Up = new Vector3(0.0f, 1.0f, 0.0f),
FovY = 45.0f,
Projection = CameraProjection.CAMERA_PERSPECTIVE
Projection = CameraProjection.Perspective
};

// 100 fps target
Expand All @@ -90,11 +90,11 @@ SetTargetFPS(100);
while (!WindowShouldClose())
{
BeginDrawing();
ClearBackground(Color.BLUE);
ClearBackground(Color.Blue);

BeginMode3D(camera);

DrawModel(planeModel, Vector3.Zero, 1.0f, Color.WHITE);
DrawModel(planeModel, Vector3.Zero, 1.0f, Color.White);

world.Step(1.0f / 100.0f, true);

Expand All @@ -105,7 +105,7 @@ while (!WindowShouldClose())
}

EndMode3D();
DrawText($"{GetFPS()} fps", 10, 10, 20, Color.WHITE);
DrawText($"{GetFPS()} fps", 10, 10, 20, Color.White);

EndDrawing();
}
Expand Down
6 changes: 3 additions & 3 deletions other/GodotDemo/JitterGodot.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Godot.NET.Sdk/4.2.2">
<Project Sdk="Godot.NET.Sdk/4.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jitter2" Version="2.4.0" />
<PackageReference Include="Jitter2" Version="2.4.1" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion other/GodotDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Small demo to get started with Jitter2 in Godot.

Get Godot (.NET, Version >= 4.2.1) from https://godotengine.org/. Open Godot and select "project.godot".
Get Godot (.NET, Version >= 4.3) from https://godotengine.org/. Open Godot and select "project.godot".

<img src="./../../media/screenshots/jitter_screenshot5.png" alt="screenshot" width="800"/>
2 changes: 1 addition & 1 deletion other/GodotDemo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="JitterGodot"
run/main_scene="res://main_scene.tscn"
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
config/icon="res://icon.svg"

[display]
Expand Down
6 changes: 3 additions & 3 deletions other/GodotSoftBodies/JitterGodot.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Godot.NET.Sdk/4.2.2">
<Project Sdk="Godot.NET.Sdk/4.3.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jitter2" Version="2.4.0" />
<PackageReference Include="Jitter2" Version="2.4.1" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion other/GodotSoftBodies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Small demo to showing Jitter2 soft bodies in Godot.

Get Godot (.NET, Version >= 4.2.1) from https://godotengine.org/. Open Godot and select "project.godot".
Get Godot (.NET, Version >= 4.3) from https://godotengine.org/. Open Godot and select "project.godot".
2 changes: 1 addition & 1 deletion other/GodotSoftBodies/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="JitterGodot"
run/main_scene="res://main_scene.tscn"
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
config/icon="res://icon.svg"

[display]
Expand Down

0 comments on commit 35434ea

Please sign in to comment.