-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Whoops.
- Loading branch information
Showing
7 changed files
with
159 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
extends Node | ||
|
||
|
||
export var box: PackedScene | ||
export var count := 1000 | ||
export var spawn := Vector3(0, 1, 0) | ||
|
||
|
||
func _ready(): | ||
var list := [] | ||
for _i in 1000: | ||
var b: RigidBody = box; | ||
for e in list: | ||
b.add_collision_exception_with(e) | ||
b.translation = spawn | ||
add_child(b) | ||
list.push(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://benchmark/environment.tscn" type="PackedScene" id=1] | ||
[ext_resource path="res://benchmark/exclusion/exclude_all.gd" type="Script" id=2] | ||
|
||
[node name="Exclude all" type="Node"] | ||
script = ExtResource( 2 ) | ||
|
||
[node name="Environment" parent="." instance=ExtResource( 1 )] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
extends Node | ||
|
||
|
||
export var box: PackedScene | ||
export var count_x := 50 | ||
export var count_y := 50 | ||
export var start := Vector3(-45, 10, -45) | ||
export var end := Vector3(45, 10, 45) | ||
export var colors := [ | ||
Color.white, | ||
Color.red, | ||
Color.green, | ||
Color.blue, | ||
Color.cyan, | ||
Color.pink, | ||
] | ||
|
||
func _ready(): | ||
var d := (end - start) / Vector3(count_x, 1.0, count_y) | ||
var i := 0 | ||
for x in count_x: | ||
for y in count_y: | ||
var p := start + d * Vector3(x, 0.0, y) | ||
var b: Spatial = box.instance() | ||
b.translation = p | ||
b.can_sleep = false | ||
b.get_node("Mesh").color = colors[i % len(colors)] | ||
add_child(b) | ||
i += 1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[gd_scene load_steps=3 format=2] | ||
|
||
[ext_resource path="res://benchmark/boxes/box_godot.tscn" type="PackedScene" id=1] | ||
|
||
[sub_resource type="BoxShape" id=1] | ||
|
||
[node name="Slider" type="Node"] | ||
|
||
[node name="Camera" type="Camera" parent="."] | ||
transform = Transform( 1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 2, 8 ) | ||
|
||
[node name="StaticBody" type="RigidBody" parent="."] | ||
axis_lock_linear_x = true | ||
axis_lock_linear_y = true | ||
axis_lock_linear_z = true | ||
axis_lock_angular_x = true | ||
axis_lock_angular_y = true | ||
axis_lock_angular_z = true | ||
|
||
[node name="CollisionShape" type="CollisionShape" parent="StaticBody"] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 0 ) | ||
shape = SubResource( 1 ) | ||
|
||
[node name="SliderJoint" type="SliderJoint" parent="."] | ||
transform = Transform( 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 0, 0, 1, 0, 0, 0 ) | ||
nodes/node_a = NodePath("../StaticBody") | ||
nodes/node_b = NodePath("../Box") | ||
linear_limit/lower_distance = -6.0 | ||
|
||
[node name="Box" parent="." instance=ExtResource( 1 )] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 ) | ||
mass = 1000.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[gd_scene load_steps=2 format=2] | ||
|
||
[ext_resource path="res://benchmark/bodies/box.tscn" type="PackedScene" id=1] | ||
|
||
[node name="Node" type="Node"] | ||
|
||
[node name="Camera" type="Camera" parent="."] | ||
transform = Transform( 1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0, 5, 14 ) | ||
|
||
[node name="Lock translation" parent="." instance=ExtResource( 1 )] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -3, 0, 0 ) | ||
axis_lock_linear_x = true | ||
axis_lock_linear_y = true | ||
axis_lock_linear_z = true | ||
|
||
[node name="Lock translation + rotation" parent="." instance=ExtResource( 1 )] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 3, 0, 0 ) | ||
axis_lock_linear_x = true | ||
axis_lock_linear_y = true | ||
axis_lock_linear_z = true | ||
axis_lock_angular_x = true | ||
axis_lock_angular_y = true | ||
axis_lock_angular_z = true | ||
|
||
[node name="Lock none" parent="." instance=ExtResource( 1 )] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 2.18644, 1.24856, 0 ) | ||
|
||
[node name="Lock rotation Z" parent="." instance=ExtResource( 1 )] | ||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -2.20791, 1.27471, 0 ) | ||
axis_lock_angular_z = true |