Json:block:particle: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
 
Line 1: Line 1:
The firepit is a good example of how to use those particles ...
The torch is a good example of how to use those particles ...


<syntaxhighlight lang="json">
<syntaxhighlight lang="json">
particlePropertiesByType: {
particleProperties: [
"firepit-extinct": [
{
{
hsvaColor: [{ avg: 20, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
gravityEffect: { avg: 0, var: 0 },
opacityEvolve: { transform: "quadratic", factor: -16 },
posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
gravityEffect: { avg: 0, var: 0 },
velocity: [ { avg: 0, var: 0.025 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.025 }],
posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
quantity: { avg: 0.015 },
velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
size: { avg: 0.5, var: 0 },
quantity: { avg: 0.02 },
sizeEvolve: { transform: "quadratic", factor: -0.7 },
size: { avg: 0.3, var: 0.05 },
lifeLength: { avg: 1.5 },
sizeEvolve: { transform: "linear", factor: 1.5 },
glowLevel: 64
particleModel: "Quad"
},
}
{
],
hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 40, var: 30 },  { avg: 220, var: 50 }],
"firepit-lit": [
opacityEvolve: { transform: "quadratic", factor: -16 },
{
gravityEffect: { avg: 0, var: 0 },
hsvaColor: [{ avg: 30, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
gravityEffect: { avg: 0, var: 0 },
velocity: [ { avg: 0, var: 0.025 }, { avg: 0.15, var: 0.1 }, { avg: 0, var: 0.025 }],
posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
quantity: { avg: 0.05 },
velocity: [ { avg: 0.0, var: 0.05 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.05 }],
size: { avg: 0.25, var: 0.05 },
quantity: { avg: 0.1 },
sizeEvolve: { transform: "linear", factor: 0.5 },
size: { avg: 0.25, var: 0 },
particleModel: "Quad"
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>
</syntaxhighlight>


There is also a complete tutorial about [[Simple Particles|particles]].
There is also a complete tutorial about [[Simple Particles|particles]], which should help you to find out what each property does.

Latest revision as of 10:59, 9 November 2017

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

	particleProperties: [
		{
			hsvaColor: [{ avg: 20, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
			gravityEffect: { avg: 0, var: 0 },
			posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
			velocity: [ { avg: 0, var: 0.025 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.025 }],
			quantity: { avg: 0.015 },
			size: { avg: 0.5, var: 0 },
			sizeEvolve: { transform: "quadratic", factor: -0.7 },
			lifeLength: { avg: 1.5 },
			glowLevel: 64
		},
		{
			hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 40, var: 30 },  { avg: 220, var: 50 }],
			opacityEvolve: { transform: "quadratic", factor: -16 },
			gravityEffect: { avg: 0, var: 0 },
			posOffset: [ { avg: 0, var: 0.1 }, { avg: 0, var: 0 }, { avg: 0, var: 0.1 }],
			velocity: [ { avg: 0, var: 0.025 }, { avg: 0.15, var: 0.1 }, { avg: 0, var: 0.025 }],
			quantity: { avg: 0.05 },
			size: { avg: 0.25, var: 0.05 },
			sizeEvolve: { transform: "linear", factor: 0.5 },
			particleModel: "Quad"
		}
	],

There is also a complete tutorial about particles, which should help you to find out what each property does.