diff --git a/All.tscn b/All.tscn index 6e65603..0cf89fe 100644 --- a/All.tscn +++ b/All.tscn @@ -1,9 +1,6 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=10 format=2] -[ext_resource path="res://MainScenes/Control.tscn" type="PackedScene" id=1] -[ext_resource path="res://MainScenes/Spatial.tscn" type="PackedScene" id=2] -[ext_resource path="res://MainScenes/Node2D.tscn" type="PackedScene" id=3] -[ext_resource path="res://MainScenes/Other.tscn" type="PackedScene" id=4] +[ext_resource path="res://Nodes/Nodes.tscn" type="PackedScene" id=1] [ext_resource path="res://AIO/Operators/Operators.tscn" type="PackedScene" id=5] [ext_resource path="res://Physics/2D/Physics2D.tscn" type="PackedScene" id=6] [ext_resource path="res://Rendering/Lights3D/Lights3D.tscn" type="PackedScene" id=7] @@ -15,16 +12,6 @@ [node name="All" type="Node"] -[node name="MainScenes" type="Node" parent="."] - -[node name="Spatial" parent="MainScenes" instance=ExtResource( 2 )] - -[node name="Node2D" parent="MainScenes" instance=ExtResource( 3 )] - -[node name="Other" parent="MainScenes" instance=ExtResource( 4 )] - -[node name="Control" parent="MainScenes" instance=ExtResource( 1 )] - [node name="Physics" type="Node" parent="."] [node name="Physics2D" parent="Physics" instance=ExtResource( 6 )] @@ -46,3 +33,5 @@ [node name="ALL" parent="AIO" instance=ExtResource( 11 )] [node name="Node2D" parent="AIO" instance=ExtResource( 5 )] + +[node name="MainScenes" parent="." instance=ExtResource( 1 )] diff --git a/Autoload/Autoload.gd b/Autoload/Autoload.gd index f5a4a97..28c910b 100644 --- a/Autoload/Autoload.gd +++ b/Autoload/Autoload.gd @@ -14,7 +14,7 @@ var time_for_each_step : int = -1 # Each scene runs alone const alone_steps : Array = [ - "res://MainScenes/MainScenes.tscn", + "res://Nodes/Nodes.tscn", "res://Physics/2D/Physics2D.tscn", "res://Physics/3D/Physics3D.tscn", "res://Rendering/Lights2D/Lights2D.tscn", diff --git a/MainScenes/Control.gd b/MainScenes/Control.gd deleted file mode 100644 index eeeb194..0000000 --- a/MainScenes/Control.gd +++ /dev/null @@ -1,80 +0,0 @@ -extends GridContainer - -var TIME_TO_DELETE : float = 1.0 -var time_to_delete : float = TIME_TO_DELETE - -func _populate() -> void: - for _i in range(4): - add_child(Control.new()) - add_child(Popup.new()) - add_child(WindowDialog.new()) - add_child(AcceptDialog.new()) - add_child(ConfirmationDialog.new()) - add_child(FileDialog.new()) - add_child(PopupDialog.new()) - add_child(PopupMenu.new()) - add_child(PopupPanel.new()) - add_child(Button.new()) - add_child(CheckBox.new()) - add_child(CheckButton.new()) - add_child(ColorPickerButton.new()) - add_child(MenuButton.new()) - add_child(OptionButton.new()) - add_child(ToolButton.new()) - add_child(LinkButton.new()) - add_child(TextureButton.new()) - add_child(Container.new()) - add_child(ColorPicker.new()) - add_child(VBoxContainer.new()) - add_child(HBoxContainer.new()) - add_child(CenterContainer.new()) - add_child(ScrollContainer.new()) - add_child(GraphNode.new()) - add_child(GridContainer.new()) - add_child(HSplitContainer.new()) - add_child(VSplitContainer.new()) - add_child(MarginContainer.new()) - add_child(PanelContainer.new()) - add_child(TabContainer.new()) - add_child(ViewportContainer.new()) - add_child(ColorRect.new()) - add_child(HScrollBar.new()) - add_child(VScrollBar.new()) - add_child(HSlider.new()) - add_child(VSlider.new()) - add_child(ProgressBar.new()) - add_child(SpinBox.new()) - add_child(TextureProgress.new()) - add_child(GraphEdit.new()) - add_child(HSeparator.new()) - add_child(VSeparator.new()) - add_child(ItemList.new()) - add_child(Label.new()) - add_child(LineEdit.new()) - add_child(NinePatchRect.new()) - add_child(Panel.new()) - add_child(ReferenceRect.new()) - add_child(RichTextLabel.new()) - add_child(Tabs.new()) - add_child(TextEdit.new()) - add_child(TextureRect.new()) - add_child(Tree.new()) - add_child(VideoPlayer.new()) - -func _ready() -> void: - _populate() - -func _process(delta: float) -> void: - for i in get_children(): - if i is Control: - i._set_size(Vector2(200 * randf() - 100, 200 * randf() - 100)) - - time_to_delete -= delta - if time_to_delete < 0: - time_to_delete += TIME_TO_DELETE - - for i in get_children(): - i.queue_free() - - _populate() - diff --git a/MainScenes/Control.tscn b/MainScenes/Control.tscn deleted file mode 100644 index b6c526e..0000000 --- a/MainScenes/Control.tscn +++ /dev/null @@ -1,12 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://MainScenes/Control.gd" type="Script" id=1] - -[node name="GridContainer" type="GridContainer"] -anchor_right = 1.0 -anchor_bottom = 1.0 -columns = 5 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/MainScenes/MainScenes.tscn b/MainScenes/MainScenes.tscn deleted file mode 100644 index 81e1bd5..0000000 --- a/MainScenes/MainScenes.tscn +++ /dev/null @@ -1,16 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://MainScenes/Spatial.tscn" type="PackedScene" id=1] -[ext_resource path="res://MainScenes/Other.tscn" type="PackedScene" id=2] -[ext_resource path="res://MainScenes/Control.tscn" type="PackedScene" id=3] -[ext_resource path="res://MainScenes/Node2D.tscn" type="PackedScene" id=4] - -[node name="MainScenes" type="Node"] - -[node name="GridContainer" parent="." instance=ExtResource( 3 )] - -[node name="Node2D" parent="." instance=ExtResource( 4 )] - -[node name="Node" parent="." instance=ExtResource( 2 )] - -[node name="Spatial" parent="." instance=ExtResource( 1 )] diff --git a/MainScenes/Node2D.gd b/MainScenes/Node2D.gd deleted file mode 100644 index 99d0feb..0000000 --- a/MainScenes/Node2D.gd +++ /dev/null @@ -1,64 +0,0 @@ -extends Node2D - -var TIME_TO_DELETE : float = 1.0 -var time_to_delete : float = TIME_TO_DELETE - -func _populate() -> void: - for _i in range(4): - add_child(Node2D.new()) - add_child(AnimatedSprite.new()) - add_child(Area2D.new()) - add_child(KinematicBody2D.new()) - add_child(RigidBody2D.new()) - add_child(StaticBody2D.new()) - add_child(AudioStreamPlayer2D.new()) - add_child(BackBufferCopy.new()) - add_child(Bone2D.new()) - add_child(CPUParticles2D.new()) - add_child(Camera2D.new()) - add_child(CanvasModulate.new()) - add_child(CollisionPolygon2D.new()) - add_child(CollisionShape2D.new()) - add_child(DampedSpringJoint2D.new()) - add_child(GrooveJoint2D.new()) - add_child(PinJoint2D.new()) - add_child(Light2D.new()) - add_child(LightOccluder2D.new()) - add_child(Line2D.new()) - add_child(MeshInstance2D.new()) - add_child(MultiMeshInstance2D.new()) - add_child(Navigation2D.new()) - add_child(NavigationPolygonInstance.new()) - add_child(ParallaxLayer.new()) - add_child(Particles2D.new()) - add_child(Path2D.new()) - add_child(PathFollow2D.new()) - add_child(Polygon2D.new()) - add_child(Position2D.new()) - add_child(RayCast2D.new()) - add_child(RemoteTransform2D.new()) - add_child(Skeleton2D.new()) - add_child(Sprite.new()) - add_child(TileMap.new()) - add_child(TouchScreenButton.new()) - add_child(VisibilityNotifier2D.new()) - add_child(VisibilityEnabler2D.new()) - add_child(YSort.new()) - -func _ready() -> void: - _populate() - -func _process(delta: float) -> void: - for i in get_children(): - if i is Node2D: - i.set_position(Vector2(1000 * randf() - 500, 1000 * randf() - 500)) - - time_to_delete -= delta - if time_to_delete < 0: - time_to_delete += TIME_TO_DELETE - - for i in get_children(): - i.queue_free() - - _populate() - diff --git a/MainScenes/Node2D.tscn b/MainScenes/Node2D.tscn deleted file mode 100644 index baaa1d3..0000000 --- a/MainScenes/Node2D.tscn +++ /dev/null @@ -1,8 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://MainScenes/Node2D.gd" type="Script" id=1] - -[node name="Node2D" type="Node2D"] -script = ExtResource( 1 ) - -[node name="Camera2D" type="Camera2D" parent="."] diff --git a/MainScenes/Other.gd b/MainScenes/Other.gd deleted file mode 100644 index d0a42b1..0000000 --- a/MainScenes/Other.gd +++ /dev/null @@ -1,33 +0,0 @@ -extends Node - -var TIME_TO_DELETE : float = 1.0 -var time_to_delete : float = TIME_TO_DELETE - -func _populate() -> void: - for _i in range(4): - add_child(AnimationPlayer.new()) - add_child(AnimationTree.new()) - add_child(AnimationTreePlayer.new()) - add_child(AudioStreamPlayer.new()) - add_child(CanvasLayer.new()) - add_child(ParallaxBackground.new()) - add_child(HTTPRequest.new()) - add_child(ResourcePreloader.new()) - add_child(Skeleton2D.new()) - add_child(Timer.new()) - add_child(Tween.new()) - add_child(Viewport.new()) - add_child(WorldEnvironment.new()) - -func _ready() -> void: - _populate() - -func _process(delta: float) -> void: - time_to_delete -= delta - if time_to_delete < 0: - time_to_delete += TIME_TO_DELETE - - for i in get_children(): - i.queue_free() - - _populate() diff --git a/MainScenes/Other.tscn b/MainScenes/Other.tscn deleted file mode 100644 index 570ca21..0000000 --- a/MainScenes/Other.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://MainScenes/Other.gd" type="Script" id=1] - -[node name="Node" type="Node"] -script = ExtResource( 1 ) diff --git a/MainScenes/Spatial.gd b/MainScenes/Spatial.gd deleted file mode 100644 index d448168..0000000 --- a/MainScenes/Spatial.gd +++ /dev/null @@ -1,84 +0,0 @@ -extends Spatial - -var TIME_TO_DELETE : float = 1.0 -var time_to_delete : float = TIME_TO_DELETE - -func _populate() -> void: - for _i in range(4): - add_child(Spatial.new()) - add_child(ARVRAnchor.new()) - add_child(Camera.new()) - add_child(ARVRCamera.new()) - add_child(ClippedCamera.new()) - add_child(InterpolatedCamera.new()) - add_child(ARVRController.new()) - add_child(ARVROrigin.new()) - add_child(AnimatedSprite3D.new()) - add_child(Sprite3D.new()) - add_child(CPUParticles.new()) - add_child(CSGBox.new()) - add_child(CSGCylinder.new()) - add_child(CSGMesh.new()) - add_child(CSGPolygon.new()) - add_child(CSGSphere.new()) - add_child(CSGTorus.new()) - add_child(CSGCombiner.new()) - add_child(ImmediateGeometry.new()) - add_child(MeshInstance.new()) - add_child(SoftBody.new()) - add_child(MultiMeshInstance.new()) - add_child(Particles.new()) - add_child(BakedLightmap.new()) - add_child(DirectionalLight.new()) - add_child(OmniLight.new()) - add_child(SpotLight.new()) - add_child(GIProbe.new()) - add_child(ReflectionProbe.new()) - add_child(Area.new()) - add_child(KinematicBody.new()) - add_child(PhysicalBone.new()) - add_child(RigidBody.new()) - add_child(VehicleBody.new()) - add_child(StaticBody.new()) - add_child(AudioStreamPlayer3D.new()) - add_child(BoneAttachment.new()) - add_child(CollisionPolygon.new()) - add_child(CollisionShape.new()) - add_child(ConeTwistJoint.new()) - add_child(Generic6DOFJoint.new()) - add_child(HingeJoint.new()) - add_child(PinJoint.new()) - add_child(SliderJoint.new()) - add_child(GridMap.new()) - add_child(Listener.new()) - add_child(Navigation.new()) - add_child(NavigationMeshInstance.new()) - add_child(Path.new()) - add_child(PathFollow.new()) - add_child(Position3D.new()) - add_child(ProximityGroup.new()) - add_child(RayCast.new()) - add_child(RemoteTransform.new()) - add_child(Skeleton.new()) - add_child(SpringArm.new()) - add_child(VehicleWheel.new()) - add_child(VisibilityNotifier.new()) - add_child(VisibilityEnabler.new()) - -func _ready() -> void: - _populate() - -func _process(delta: float) -> void: - for i in get_children(): - if i.get_name() != "Camera": - i.set_scale(Vector3(delta + 1, delta + 1, delta + 1)) - i.set_translation(Vector3(10 * randf(), 10 * randf(), 10 * randf())) - - time_to_delete -= delta - if time_to_delete < 0: - time_to_delete += TIME_TO_DELETE - - for i in get_children(): - i.queue_free() - - _populate() diff --git a/MainScenes/Spatial.tscn b/MainScenes/Spatial.tscn deleted file mode 100644 index f08b360..0000000 --- a/MainScenes/Spatial.tscn +++ /dev/null @@ -1,9 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://MainScenes/Spatial.gd" type="Script" id=1] - -[node name="Spatial" type="Spatial"] -script = ExtResource( 1 ) - -[node name="Camera" type="Camera" parent="."] -transform = Transform( 1, 0, 0, 0, 0.690617, 0.72322, 0, -0.72322, 0.690617, 0, 3.77374, 5.42622 ) diff --git a/Nodes/Nodes.gd b/Nodes/Nodes.gd new file mode 100644 index 0000000..bf356cf --- /dev/null +++ b/Nodes/Nodes.gd @@ -0,0 +1,54 @@ +extends Node + +var TIME_TO_DELETE : float = 1.0 +var time_to_delete : float = TIME_TO_DELETE + +var disabled_classes : Array = [] + +func _populate() -> void: + for _i in range(2): # Number of created + for name_of_class in ClassDB.get_class_list(): + if name_of_class in disabled_classes: + continue + if !ClassDB.can_instance(name_of_class): + continue + + + if ClassDB.is_parent_class(name_of_class,"Control"): + add_child(ClassDB.instance(name_of_class)) + continue + if ClassDB.is_parent_class(name_of_class,"Spatial"): + add_child(ClassDB.instance(name_of_class)) + continue + if ClassDB.is_parent_class(name_of_class,"Node2D"): + add_child(ClassDB.instance(name_of_class)) + continue + if ClassDB.is_parent_class(name_of_class,"Node"): + add_child(ClassDB.instance(name_of_class)) + continue + + +# Populate at start +func _ready() -> void: + _populate() + +# Move nodes a little and delete and readd them later +func _process(delta: float) -> void: + for i in get_children(): + if i is Control: + i._set_size(Vector2(200 * randf() - 100, 200 * randf() - 100)) + if i is Node2D: + i.set_position(Vector2(1000 * randf() - 500, 1000 * randf() - 500)) + if i is Spatial: + if i.get_name() != "Camera": + i.set_scale(Vector3(delta + 1, delta + 1, delta + 1)) + i.set_translation(Vector3(10 * randf(), 10 * randf(), 10 * randf())) + + time_to_delete -= delta + if time_to_delete < 0: + time_to_delete += TIME_TO_DELETE + + for i in get_children(): + i.queue_free() + + _populate() diff --git a/Nodes/Nodes.tscn b/Nodes/Nodes.tscn new file mode 100644 index 0000000..ba99213 --- /dev/null +++ b/Nodes/Nodes.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Nodes/Nodes.gd" type="Script" id=1] + +[node name="Nodes" type="Node"] +script = ExtResource( 1 )