Browse Source

Editor: Updated Camera example.

Mr.doob 10 years ago
parent
commit
4dc5e9855a
1 changed files with 63 additions and 49 deletions
  1. 63 49
      editor/examples/camera.app.json

+ 63 - 49
editor/examples/camera.app.json

@@ -6,14 +6,14 @@
 			"generator": "ObjectExporter"
 		},
 		"object": {
-			"uuid": "F0D8434F-4603-415B-8024-792FE97B9600",
+			"uuid": "C7FB195B-270E-47B4-95C9-1754652A9D11",
 			"type": "PerspectiveCamera",
 			"name": "Camera",
 			"fov": 50,
 			"aspect": 1.2252042007001167,
 			"near": 0.1,
 			"far": 100000,
-			"matrix": [0.9700406789779663,-5.500052080442686e-10,-0.24294254183769226,0,-0.04822639003396034,0.9800989627838135,-0.19256223738193512,0,0.23810774087905884,0.19850945472717285,0.950735867023468,0,159.0158233642578,132.5708465576172,634.9312744140625,1]
+			"matrix": [0.9700406789779663,-2.851828329042405e-9,-0.24294254183769226,0,-0.04822639003396034,0.9800989627838135,-0.1925622522830963,0,0.23810774087905884,0.19850945472717285,0.950735867023468,0,154.7735595703125,129.03408813476562,617.992431640625,1]
 		}
 	},
 	"scene": {
@@ -23,6 +23,14 @@
 			"generator": "ObjectExporter"
 		},
 		"geometries": [
+			{
+				"uuid": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
+				"type": "PlaneGeometry",
+				"width": 1000,
+				"height": 1000,
+				"widthSegments": 1,
+				"heightSegments": 1
+			},
 			{
 				"uuid": "D8E200D3-27BC-49F8-A5C5-7384206E70FE",
 				"type": "BoxGeometry",
@@ -43,14 +51,6 @@
 				"heightSegments": 1,
 				"openEnded": false
 			},
-			{
-				"uuid": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
-				"type": "PlaneGeometry",
-				"width": 1000,
-				"height": 1000,
-				"widthSegments": 1,
-				"heightSegments": 1
-			},
 			{
 				"uuid": "4DECFAB5-6FD1-4D84-9A29-565807B074EA",
 				"type": "IcosahedronGeometry",
@@ -59,25 +59,25 @@
 			}],
 		"materials": [
 			{
-				"uuid": "B5943856-E404-45D9-A427-4774202C2CD0",
+				"uuid": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
 				"type": "MeshPhongMaterial",
-				"color": 37119,
+				"color": 16777215,
 				"emissive": 0,
 				"specular": 1118481,
 				"shininess": 30
 			},
 			{
-				"uuid": "3F872310-2067-4BE4-9250-5B3F4E43797E",
+				"uuid": "B5943856-E404-45D9-A427-4774202C2CD0",
 				"type": "MeshPhongMaterial",
-				"color": 15859456,
+				"color": 37119,
 				"emissive": 0,
 				"specular": 1118481,
 				"shininess": 30
 			},
 			{
-				"uuid": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
+				"uuid": "3F872310-2067-4BE4-9250-5B3F4E43797E",
 				"type": "MeshPhongMaterial",
-				"color": 16777215,
+				"color": 15859456,
 				"emissive": 0,
 				"specular": 1118481,
 				"shininess": 30
@@ -97,19 +97,34 @@
 			"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
 			"children": [
 				{
-					"uuid": "60B69C58-4201-43FD-815E-AD2EDFBBD0CE",
-					"type": "PerspectiveCamera",
-					"name": "PerspectiveCamera 1",
-					"fov": 50,
-					"aspect": 1,
-					"near": 100,
-					"far": 10000,
-					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,100,400,1]
+					"uuid": "B7CBBC6F-EC26-49B5-8D0D-67D9C535924B",
+					"type": "Group",
+					"name": "Dummy",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,100,400,1],
+					"children": [
+						{
+							"uuid": "60B69C58-4201-43FD-815E-AD2EDFBBD0CE",
+							"type": "PerspectiveCamera",
+							"name": "PerspectiveCamera",
+							"fov": 50,
+							"aspect": 1,
+							"near": 100,
+							"far": 10000,
+							"matrix": [-1,0,-1.2246468525851679e-16,0,0,1,0,0,1.2246468525851679e-16,0,-1,0,0,0,0,1]
+						}]
+				},
+				{
+					"uuid": "A460C230-DC88-4A8F-A3FB-AA0FE735F3ED",
+					"type": "Mesh",
+					"name": "Plane",
+					"geometry": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
+					"material": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
+					"matrix": [1,0,0,0,0,0.040785226970911026,-0.9991679191589355,0,0,0.9991679191589355,0.040785226970911026,0,0,-50,0,1]
 				},
 				{
 					"uuid": "26DAAD69-725D-43B7-AF9D-990A99DEF8C5",
 					"type": "Mesh",
-					"name": "Box 1",
+					"name": "Box",
 					"geometry": "D8E200D3-27BC-49F8-A5C5-7384206E70FE",
 					"material": "B5943856-E404-45D9-A427-4774202C2CD0",
 					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
@@ -117,27 +132,18 @@
 				{
 					"uuid": "AAAFF2D6-4725-4AFC-A9FE-26419B11011F",
 					"type": "Mesh",
-					"name": "Cylinder 3",
+					"name": "Cylinder",
 					"geometry": "25BA32DB-8B02-4ABA-A77C-69868C464A1A",
 					"material": "3F872310-2067-4BE4-9250-5B3F4E43797E",
 					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,-130,-15,0,1]
 				},
 				{
-					"uuid": "A460C230-DC88-4A8F-A3FB-AA0FE735F3ED",
+					"uuid": "B855E267-A266-4098-ACD6-6A1FDE7B88BA",
 					"type": "Mesh",
-					"name": "Plane 4",
-					"geometry": "51BB3E54-D2DF-4576-9953-FB8E940588B5",
-					"material": "4AE8130E-B6A8-47BC-ACCF-060973C74044",
-					"matrix": [1,0,0,0,0,0.040785059332847595,-0.9991679191589355,0,0,0.9991679191589355,0.040785059332847595,0,0,-50,0,1]
-				},
-				{
-					"uuid": "3412781E-27CC-43C3-A5DB-54C0C8E42ED6",
-					"type": "PointLight",
-					"name": "PointLight 2",
-					"color": 12773063,
-					"intensity": 1,
-					"distance": 0,
-					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,88.12999725341797,8.3100004196167,125.44999694824219,1]
+					"name": "Icosahedron",
+					"geometry": "4DECFAB5-6FD1-4D84-9A29-565807B074EA",
+					"material": "E1826901-7922-4584-A25D-6D487E2C9BBD",
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,130,-10,0,1]
 				},
 				{
 					"uuid": "E2939A7B-5E40-438A-8C1B-32126FBC6892",
@@ -146,23 +152,31 @@
 					"color": 9474221,
 					"intensity": 0.75,
 					"distance": 0,
+					"decay": 1,
 					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,-93.86000061035156,127.12999725341797,-114.30000305175781,1]
 				},
 				{
-					"uuid": "B855E267-A266-4098-ACD6-6A1FDE7B88BA",
-					"type": "Mesh",
-					"name": "Icosahedron 1",
-					"geometry": "4DECFAB5-6FD1-4D84-9A29-565807B074EA",
-					"material": "E1826901-7922-4584-A25D-6D487E2C9BBD",
-					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,130,-10,0,1]
+					"uuid": "3412781E-27CC-43C3-A5DB-54C0C8E42ED6",
+					"type": "PointLight",
+					"name": "PointLight 2",
+					"color": 12773063,
+					"intensity": 1,
+					"distance": 0,
+					"decay": 1,
+					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,88.12999725341797,8.3100004196167,125.44999694824219,1]
 				}]
 		}
 	},
 	"scripts": {
 		"60B69C58-4201-43FD-815E-AD2EDFBBD0CE": [
 			{
-				"name": "Camera Orbit",
-				"source": "player.setCamera( this );\n\nfunction update( event ) {\n\n\tvar time = event.time * 0.001;\n\n\tthis.position.x = Math.sin( time ) * 400;\n\tthis.position.z = Math.cos( time ) * 400;\n\tthis.lookAt( scene.position );\n\n}"
+				"name": "Player Camera",
+				"source": "player.setCamera( this );"
+			}],
+		"B7CBBC6F-EC26-49B5-8D0D-67D9C535924B": [
+			{
+				"name": "Orbit",
+				"source": "function update( event ) {\n\n\tvar time = event.time * 0.001;\n\n\tthis.position.x = Math.sin( time ) * 400;\n\tthis.position.z = Math.cos( time ) * 400;\n\tthis.lookAt( scene.position );\n\n}"
 			}]
 	}
-}
+}