@hytopia.com/examples 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -51,6 +51,7 @@ export default class GameManager {
|
|
|
51
51
|
const hearthwildsRegion = new HearthwildsRegion();
|
|
52
52
|
this._regions.set(hearthwildsRegion.id, hearthwildsRegion);
|
|
53
53
|
GameClock.instance.addRegionClockCycle(hearthwildsRegion);
|
|
54
|
+
this._startRegion = hearthwildsRegion;
|
|
54
55
|
|
|
55
56
|
// Ratkin Nest
|
|
56
57
|
const ratkinNestRegion = new RatkinNestRegion();
|
|
@@ -66,7 +67,7 @@ export default class GameManager {
|
|
|
66
67
|
const stalkhavenPortRegion = new StalkhavenPortRegion();
|
|
67
68
|
this._regions.set(stalkhavenPortRegion.id, stalkhavenPortRegion);
|
|
68
69
|
GameClock.instance.addRegionClockCycle(stalkhavenPortRegion);
|
|
69
|
-
this._startRegion = stalkhavenPortRegion;
|
|
70
|
+
// this._startRegion = stalkhavenPortRegion;
|
|
70
71
|
|
|
71
72
|
// Weaver's Hollow
|
|
72
73
|
const weaversHollowRegion = new WeaversHollowRegion();
|
package/package.json
CHANGED
package/particles/index.ts
CHANGED
|
@@ -34,8 +34,8 @@ startServer(world => {
|
|
|
34
34
|
const dirtParticleEmitter = new ParticleEmitter({
|
|
35
35
|
textureUri: 'particles/dirt.png',
|
|
36
36
|
colorStart: { r: 194, g: 164, b: 132 },
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
sizeStart: 1,
|
|
38
|
+
sizeStartVariance: 1, // Variates the base size +/- this value
|
|
39
39
|
lifetime: 5, // How long the particles live for in seconds
|
|
40
40
|
lifetimeVariance: 3, // Variates the base lifetime +/- this value
|
|
41
41
|
position: { x: 0, y: 1, z: 0 }, // Position of the emitter
|
|
@@ -48,7 +48,7 @@ startServer(world => {
|
|
|
48
48
|
|
|
49
49
|
// Start/stop the emitter every 3 seconds
|
|
50
50
|
setInterval(() => {
|
|
51
|
-
if (dirtParticleEmitter.
|
|
51
|
+
if (dirtParticleEmitter.paused) {
|
|
52
52
|
dirtParticleEmitter.restart();
|
|
53
53
|
} else {
|
|
54
54
|
dirtParticleEmitter.stop();
|
|
@@ -64,8 +64,8 @@ startServer(world => {
|
|
|
64
64
|
colorEnd: { r: 255, g: 255, b: 255 }, // White base color
|
|
65
65
|
colorEndVariance: { r: 255, g: 255, b: 255 }, // rgb varies +/- 255
|
|
66
66
|
gravity: { x: 0, y: -3, z: 0 }, // Gravity of the particles, pull them down at a rate of 3 blocks per second
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
sizeStart: 1, // Base size of the particles
|
|
68
|
+
sizeStartVariance: 2, // Variates the base size +/- this value
|
|
69
69
|
lifetime: 5, // How long the particles live for in seconds
|
|
70
70
|
lifetimeVariance: 3, // Variates the base lifetime +/- this value
|
|
71
71
|
rate: 50, // How many particles to emit per second
|
|
@@ -91,8 +91,8 @@ startServer(world => {
|
|
|
91
91
|
opacityStart: 0.7, // Starting opacity of the particles
|
|
92
92
|
opacityStartVariance: 0.5, // Variates the base opacity +/- this value
|
|
93
93
|
opacityEnd: 0, // Ending opacity of the particles
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
sizeStart: 1, // Base size of the particles
|
|
95
|
+
sizeEnd: 50,
|
|
96
96
|
lifetime: 10, // How long the particles live for in seconds
|
|
97
97
|
lifetimeVariance: 5, // Variates the base lifetime +/- this value
|
|
98
98
|
rate: 40, // How many particles to emit per second
|
|
@@ -118,8 +118,8 @@ function attachPlayerParticles(playerEntity: DefaultPlayerEntity) {
|
|
|
118
118
|
opacityStartVariance: 0.5, // Variates the base opacity +/- this value
|
|
119
119
|
velocity: { x: 0, y: 1, z: 0 }, // Velocity of the particles
|
|
120
120
|
velocityVariance: { x: 1, y: 0.5, z: 1 }, // Variates the base velocity +/- this value
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
sizeStart: 0.1, // Base size of the particles
|
|
122
|
+
sizeStartVariance: 0.25, // Variates the base size +/- this value
|
|
123
123
|
lifetime: 4, // How long the particles live for in seconds
|
|
124
124
|
rate: 10, // How many particles to emit per second
|
|
125
125
|
maxParticles: 30, // Maximum number of visible particles at any given time
|