3D Extension: Difference between revisions

Content deleted Content added
Yea this extension beats even cloudlink by blocks LOL
No edit summary
 
(13 intermediate revisions by 6 users not shown)
Line 1:
{{Stub}}{{WIP|extension}}{{Extension|extension_img=3dextension.png|extension_desc=Use the magic of 3D to spice up your project.}}
{{WIP|extension}}
{{Stub}}{{Extension|extension_img=3dextension.png|extension_desc=Use the magic of 3D to spice up your project.}}The '''3D Extension''' allows you to create 3D projects with 3D models or simple shapes and lighting. The extension is not visible from the "Add Extension" in the normal editor but can be found in [https://studio.penguinmod.com/editor.html?livetests Live Tests]. There is a physics extension for the 3D extension called [[3D Physics]], as well as a virtual reality extension called [[3D Virtual Reality]].
 
== Units ==
Units are a scale of measurement in the 3d space. However, units are not pixels, instead, think of 1 unit being the same as 100 pixels, though pixels do not exist in the 3d space. Most blocks that use position and scaling will use units. This doesn't apply to object and camera rotations however.
 
== Setting up a 3d Project ==
[[File:3dExample.png|thumb]]
Some people struggle with creating a 3d project. The image to the right shows the basics for setting up your 3d space. Of course, you can set the fov (field of view) and the background color to whatever you'd like, but this is the recommended.
 
It will soon allow the use of VR.
[[File:3D example.png|thumb|479x479px|An example of the 3D extension being used in [https://studio.penguinmod.site/#15314302][https://studio.penguinmod.com/#15314302 superepic3dproject] by know0your0true0color<ref>https://studio.penguinmod.com/editor.html?livetests</ref>]]
==Blocks==
[[File:3D example.png|thumb|479x479px|An example of the 3D extension being used in [https://studio.penguinmod.site/#15314302][https://studio.penguinmod.com/#15314302 superepic3dproject] by know0your0true0color<ref>https://studio.penguinmod.com/editor.html?livetests</ref>]]This is a list of all blocks in the extension.
{{Incomplete list}}
{| class="wikitable"
*[[create 3D scene]]
|+
*[[remove 3D scene]]
!Image
*[[set scene camera to perspective camera with fov: ()]]
!Name
*[[set scene camera to perspective camera with fov: () aspect ratio: ()]]
|-
*[[set scene camera to perspective camera with fov: () aspect ratio: () and only render objects within () and () units of the camera]]
|[[File:create3dscene.png|150px]]
*[[set scene camera to orthographic camera]]
|[[create 3D scene]]
*[[set scene camera to orthographic camera with left plane: () right plane: () top plane: () bottom plane: ()]]
|-
*[[set scene camera to orthographic camera with left plane: () right plane: () top plane: () bottom plane: () and only render objects within () and () units of the camera]]
|[[File:remove3dscene.png|150px]]
*[[render]]
*|[[moveremove 3D scene layer to ()]]
|-
*[[set background color to ()]]
|[[File:3d perspective1.png|150px]]
*[[set background transparency to ()|set background transparency to ()%]]
|[[set scene camera to perspective camera with fov: ()]]
*[[show 3D scene]]
|-
*[[hide 3D scene]]
|[[File:3d perspective2.png|150px]]
*[[is 3D scene visible?]]
*|[[moveset scene camera byto perspective camera with fov: () aspect ratio: ()]]
|-
*[[set camera position to x: () y: () z: ()]]
|[[File:3d perspective3.png|150px]]
*[[change camera position by x: () y: () z: ()]]
|[[set scene camera to perspective camera with fov: () aspect ratio: () and only render objects within () and () units of the camera]]
*[[set camera rotation to x: () y: () z: ()]]
|-
*[[change camera rotation by x: () y: () z: ()]]
|[[File:3d_orthographic1.png|150px]]
*[[set camera zoom to ()|set camera zoom to ()%]]
*|[[set scene camera ()to orthographic camera]]
|-
*[[camera () position]]
|[[File:3d_orthographic2.png|150px]]
*[[camera () rotation]]
|[[set scene camera to orthographic camera with left plane: () right plane: () top plane: () bottom plane: ()]]
*[[camera aspect ratio]]
|-
*[[camera zoom]]
|[[File:3d_orthographic3.png|150px]]
*[[camera fov]]
|[[set scene camera to orthographic camera with left plane: () right plane: () top plane: () bottom plane: () and only render objects within () and () units of the camera]]
*[[is scene camera a perspective camera?]]
|-
*[[is scene camera an orthographic camera?]]
|[[File:3drender.png|150px]]
*[[object named () exists?]]
*|[[existing ()render]]
|-
*[[create cube named () at x: () y: () z: ()]]
|[[File:move3dlayer.png|150px]]
*[[create sphere named () at x: () y: () z: ()]]
|[[move 3D scene layer to ()]]
*[[create mesh named () with () data: () at x: () y: () z: ()]]
|-
*[[create () light named () at x: () y: () z: ()]]
|[[File:set3dbackground.png|150px]]
*[[move object named () by ()]]
*|[[moveset objectbackground named ()color to x: () y: () z: ()]]
|-
*[[set rotation of object to x: () y: () z: ()]]
|[[File:set3dbackgroundtrans.png|150px]]
*[[set size of object named () to x: () y: () z: ()|set size of object named () to x: ()% y: ()% z: ()%]]
|[[set background transparency to ()%]]
*[[point object named () towards object named ()]]
|-
*[[point object named () towards x: () y: ()]]
|[[File:show3d.png|150px]]
*[[() position of object named ()]]
|[[show 3D scene]]
*[[() rotation of object named ()]]
|-
*[[() size of object named ()]]
|[[File:hide3d.png|150px]]
*[[object () touching object ()]]
*|[[removehide object3D named ()scene]]
|-
*[[recolor object named () to ()]]
|[[File:3dvisible.png|150px]]
*[[turn () shading on object named ()]]
|[[is 3D scene visible?]]
*[[turn () wireframe view on object named ()]]
|-
*[[first object in raycast from x: () y: () z: () with direction x: () y: () z: ()]]
|
*[[raycast result from x: () y: () z: () with direction x: () y: () z: ()]]
|[[move camera by ()]]
*[[first object from raycast in camera center]]
|-
*[[raycast result starting from the camera center]]
|
|[[set camera position to x: () y: () z: ()]]
|-
|
|[[change camera position by x: () y: () z: ()]]
|-
|
|[[set camera rotation to x: () y: () z: ()]]
|-
|
|[[change camera rotation by x: () y: () z: ()]]
|-
|
|[[set camera zoom to ()%]]
|-
|
|[[camera ()]]
|-
|
|[[camera () position]]
|-
|
|[[camera () rotation]]
|-
|
|[[camera aspect ratio]]
|-
|
|[[camera zoom]]
|-
|
|[[camera fov]]
|-
|
|[[is scene camera a perspective camera?]]
|-
|
|[[is scene camera an orthographic camera?]]
|-
|
|[[object named () exists?]]
|-
|
|[[existing ()]]
|-
|
|[[create cube named () at x: () y: () z: ()]]
|-
|
|[[create sphere named () at x: () y: () z: ()]]
|-
|
|[[create mesh named () with () data: () at x: () y: () z: ()]]
|-
|
|[[create () light named () at x: () y: () z: ()]]
|-
|
|[[move object named () by ()]]
|-
|
|[[move object named () to x: () y: () z: ()]]
|-
|
|[[set rotation of object to x: () y: () z: ()]]
|-
|
|[[set size of object named () to x: ()% y: ()% z: ()%]]
|-
|
|[[point object named () towards object named ()]]
|-
|
|[[point object named () towards x: () y: ()]]
|-
|
|[[() position of object named ()]]
|-
|
|[[() rotation of object named ()]]
|-
|
|[[() size of object named ()]]
|-
|
|[[object () touching object ()]]
|-
|
|[[remove object named ()]]
|-
|
|[[recolor object named () to ()]]
|-
|
|[[turn () shading on object named ()]]
|-
|
|[[turn () wireframe view on object named ()]]
|-
|
|[[first object in raycast from x: () y: () z: () with direction x: () y: () z: ()]]
|-
|
|[[raycast result from x: () y: () z: () with direction x: () y: () z: ()]]
|-
|
|[[first object from raycast in camera center]]
|-
|
|[[raycast result starting from the camera center]]
|}
 
==References==
<references />