Newer
Older
matsugaoka / web / three.js-master / editor / examples / particles.app.json
@大石桃菜 大石桃菜 on 29 Aug 2019 3 KB add 360 degree image sample
{
	"metadata": {
		"type": "App"
	},
	"project": {
		"shadows": true,
		"vr": false
	},
	"camera": {
		"metadata": {
			"version": 4.5,
			"type": "Object",
			"generator": "Object3D.toJSON"
		},
		"object": {
			"uuid": "056199EB-6985-481B-97CC-A57FB7C87809",
			"type": "PerspectiveCamera",
			"name": "Camera",
			"layers": 1,
			"matrix": [0.707107,0,-0.707107,0,-0.235702,0.942809,-0.235702,0,0.666667,0.333333,0.666667,0,4.182,2.091,4.182,1],
			"fov": 50,
			"zoom": 1,
			"near": 0.1,
			"far": 100000,
			"focus": 10,
			"aspect": 0.666193,
			"filmGauge": 35,
			"filmOffset": 0
		}
	},
	"scene": {
		"metadata": {
			"version": 4.5,
			"type": "Object",
			"generator": "Object3D.toJSON"
		},
		"geometries": [
			{
				"uuid": "C3C0CE7D-10B8-43FC-8F74-011CC6E57800",
				"type": "PlaneBufferGeometry",
				"width": 100,
				"height": 100,
				"widthSegments": 1,
				"heightSegments": 1
			}],
		"materials": [
			{
				"uuid": "3A9449D2-62DB-4BB4-ABBD-6F3F9D46DE1A",
				"type": "MeshStandardMaterial",
				"color": 5465019,
				"roughness": 1,
				"metalness": 0,
				"emissive": 0,
				"depthFunc": 3,
				"depthTest": true,
				"depthWrite": true
			},
			{
				"uuid": "F5361474-F5F1-412F-8D99-3699B868092D",
				"type": "SpriteMaterial",
				"color": 16777215,
				"transparent": true,
				"depthFunc": 3,
				"depthTest": true,
				"depthWrite": true
			}],
		"object": {
			"uuid": "3741222A-BD8F-401C-A5D2-5A907E891896",
			"type": "Scene",
			"name": "Scene",
			"layers": 1,
			"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],
			"children": [
				{
					"uuid": "05B57416-1BE5-4A96-BB05-9D9CD112D52B",
					"type": "Mesh",
					"name": "Ground",
					"layers": 1,
					"matrix": [1,0,0,0,0,0.000796,-1,0,0,1,0.000796,0,0,-0.5,0,1],
					"geometry": "C3C0CE7D-10B8-43FC-8F74-011CC6E57800",
					"material": "3A9449D2-62DB-4BB4-ABBD-6F3F9D46DE1A"
				},
				{
					"uuid": "0A3CB873-07E6-4EEB-830B-68192504111B",
					"type": "Sprite",
					"name": "Particle",
					"layers": 1,
					"matrix": [0.04,0,0,0,0,0.04,0,0,0,0,0.04,0,0,0,0,1],
					"material": "F5361474-F5F1-412F-8D99-3699B868092D"
				},
				{
					"uuid": "40E5CDA4-0E39-4265-9293-3E9EC3207F61",
					"type": "PointLight",
					"name": "PointLight",
					"layers": 1,
					"matrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,1.183,0,1],
					"color": 16777215,
					"intensity": 1,
					"distance": 0,
					"decay": 1,
					"shadow": {
						"camera": {
							"uuid": "B6D3493E-E5C9-4D65-9E26-BB788D127BE1",
							"type": "PerspectiveCamera",
							"layers": 1,
							"fov": 90,
							"zoom": 1,
							"near": 0.5,
							"far": 500,
							"focus": 10,
							"aspect": 1,
							"filmGauge": 35,
							"filmOffset": 0
						}
					}
				}],
			"background": 2171689,
			"fog": {
				"type": "Fog",
				"color": 2171688,
				"near": 1,
				"far": 50
			}
		}
	},
	"scripts": {
		"3741222A-BD8F-401C-A5D2-5A907E891896": [
			{
				"name": "Fountain",
				"source": "var original = this.getObjectByName( 'Particle' );\n\nvar particles = [];\n\nfor ( var i = 0; i < 100; i ++ ) {\n\n\tvar particle = original.clone();\n\tparticle.userData.velocity = new THREE.Vector3();\n\tthis.add( particle );\n\n\tparticles.push( particle );\n\n}\n\nfunction update( event ) {\n\t\n\tvar particle = particles.shift();\n\tparticles.push( particle );\n\t\t\n\tvar velocity = particle.userData.velocity;\n\tvelocity.x = Math.random() * 0.1 - 0.05;\n\tvelocity.y = Math.random() * 0.1 + 0.1;\n\tvelocity.z = Math.random() * 0.1 - 0.05;\n\n\tfor ( var i = 0; i < particles.length; i ++ ) {\n\n\t\tvar particle = particles[ i ];\n\n\t\tvar velocity = particle.userData.velocity;\n\n\t\tvelocity.y -= 0.0098;\n\n\t\tparticle.position.add( velocity );\n\n\t\tif ( particle.position.y < 0 ) {\n\n\t\t\tparticle.position.y = 0;\n\n\t\t\tvelocity.y = - velocity.y;\n\t\t\tvelocity.multiplyScalar( 0.6 );\n\n\t\t}\n\n\t}\n\n}"
			}]
	}
}