Json:block:particle: Difference between revisions

From Vintage Story Wiki
(Created page with "Will be there soon.")
 
No edit summary
Line 1: Line 1:
Will be there soon.
The firepit is a good example of how to use those particles ...
 
<syntaxhighlight lang="json">
particlePropertiesByType: {
"firepit-extinct": [
{
hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
opacityEvolve: { transform: "quadratic", factor: -16 },
gravityEffect: { avg: 0, var: 0 },
posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
quantity: { avg: 0.02 },
size: { avg: 0.3, var: 0.05 },
sizeEvolve: { transform: "linear", factor: 1.5 },
particleModel: "Quad"
}
],
"firepit-lit": [
{
hsvaColor: [{ avg: 30, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
gravityEffect: { avg: 0, var: 0 },
posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
velocity: [ { avg: 0.0, var: 0.05 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.05 }],
quantity: { avg: 0.1 },
size: { avg: 0.25, var: 0 },
glowLevel: 64,
sizeEvolve: { transform: "quadratic", factor: -0.5 },
selfPropelled: true
},
{
hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
opacityEvolve: { transform: "linear", factor: -255 },
gravityEffect: { avg: 0, var: 0 },
posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
quantity: { avg: 0.12 },
size: { avg: 0.3, var: 0.05 },
sizeEvolve: { transform: "linear", factor: 1.5 },
particleModel: "Quad",
lifeLength: { avg: 5 }
}
]
},
</syntaxhighlight>
 
There is also a complete tutorial about [[Simple Particles|particles]].

Revision as of 10:58, 9 November 2017

The firepit is a good example of how to use those particles ...

	particlePropertiesByType: {
		"firepit-extinct": [
			{
				hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
				opacityEvolve: { transform: "quadratic", factor: -16 },
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
				quantity: { avg: 0.02 },
				size: { avg: 0.3, var: 0.05 },
				sizeEvolve: { transform: "linear", factor: 1.5 },
				particleModel: "Quad"
			}
		],
		"firepit-lit": [
			{
				hsvaColor: [{ avg: 30, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0.0, var: 0.05 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.05 }],
				quantity: { avg: 0.1 },
				size: { avg: 0.25, var: 0 },
				glowLevel: 64,
				sizeEvolve: { transform: "quadratic", factor: -0.5 },
				selfPropelled: true
			},
			{
				hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
				opacityEvolve: { transform: "linear", factor: -255 },
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
				quantity: { avg: 0.12 },
				size: { avg: 0.3, var: 0.05 },
				sizeEvolve: { transform: "linear", factor: 1.5 },
				particleModel: "Quad",
				lifeLength: { avg: 5 } 
			}
		]
	},

There is also a complete tutorial about particles.