mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
parent
9a7dbc2aca
commit
eaae4b6408
260 changed files with 5328 additions and 5474 deletions
|
@ -123,25 +123,25 @@ MaterialEditor::MaterialEditor() {
|
|||
viewport->set_transparent_background(true);
|
||||
viewport->set_msaa(Viewport::MSAA_4X);
|
||||
|
||||
camera = memnew(Camera);
|
||||
camera = memnew(Camera3D);
|
||||
camera->set_transform(Transform(Basis(), Vector3(0, 0, 3)));
|
||||
camera->set_perspective(45, 0.1, 10);
|
||||
camera->make_current();
|
||||
viewport->add_child(camera);
|
||||
|
||||
light1 = memnew(DirectionalLight);
|
||||
light1 = memnew(DirectionalLight3D);
|
||||
light1->set_transform(Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0)));
|
||||
viewport->add_child(light1);
|
||||
|
||||
light2 = memnew(DirectionalLight);
|
||||
light2 = memnew(DirectionalLight3D);
|
||||
light2->set_transform(Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1)));
|
||||
light2->set_color(Color(0.7, 0.7, 0.7));
|
||||
viewport->add_child(light2);
|
||||
|
||||
sphere_instance = memnew(MeshInstance);
|
||||
sphere_instance = memnew(MeshInstance3D);
|
||||
viewport->add_child(sphere_instance);
|
||||
|
||||
box_instance = memnew(MeshInstance);
|
||||
box_instance = memnew(MeshInstance3D);
|
||||
viewport->add_child(box_instance);
|
||||
|
||||
Transform box_xform;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue