hytopia 0.3.28 → 0.3.30
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.
- package/docs/server.audio.cutoffdistance.md +13 -0
- package/docs/server.audio.md +36 -1
- package/docs/server.audio.referencedistance.md +1 -1
- package/docs/server.audio.setcutoffdistance.md +57 -0
- package/docs/server.audio.setreferencedistance.md +4 -0
- package/docs/server.audioevent.md +14 -0
- package/docs/server.audioeventpayloads._audio.set_cutoff_distance_.md +16 -0
- package/docs/server.audioeventpayloads.md +19 -0
- package/docs/server.audiooptions.cutoffdistance.md +13 -0
- package/docs/server.audiooptions.md +20 -1
- package/docs/server.audiooptions.referencedistance.md +1 -1
- package/docs/server.playerentity.md +2 -2
- package/examples/hygrounds/assets/icons/ranks/bronze-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/bronze-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/diamond-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/elite-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/gold-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/platinum-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-1.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-2.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-3.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-4.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/silver-5.png +0 -0
- package/examples/hygrounds/assets/icons/ranks/unranked.png +0 -0
- package/examples/hygrounds/assets/ui/index.html +305 -44
- package/examples/hygrounds/classes/ChestEntity.ts +1 -0
- package/examples/hygrounds/classes/GameManager.ts +17 -7
- package/examples/hygrounds/classes/GamePlayerEntity.ts +103 -3
- package/examples/hygrounds/classes/GunEntity.ts +3 -0
- package/examples/hygrounds/classes/ItemEntity.ts +1 -0
- package/examples/hygrounds/classes/MeleeWeaponEntity.ts +2 -0
- package/examples/hygrounds/classes/weapons/PistolEntity.ts +1 -1
- package/examples/hygrounds/classes/weapons/RocketLauncherEntity.ts +2 -1
- package/examples/hygrounds/dev/persistence/player-player-1.json +3 -0
- package/examples/hygrounds/dev/persistence/player-player-2.json +3 -0
- package/examples/hygrounds/dev/persistence/player-player-3.json +3 -0
- package/examples/hygrounds/gameConfig.ts +281 -21
- package/package.json +1 -1
- package/server.api.json +175 -4
- package/server.d.ts +36 -7
- package/server.js +117 -117
@@ -44,18 +44,18 @@ export const BLOCK_ID_MATERIALS: Record<string | number, number> = {
|
|
44
44
|
|
45
45
|
export const BUILD_BLOCK_ID = 37; // stone
|
46
46
|
|
47
|
-
export const CHEST_DROP_INTERVAL_MS = 15 * 1000; //
|
47
|
+
export const CHEST_DROP_INTERVAL_MS = 15 * 1000; // 15 seconds
|
48
48
|
|
49
49
|
export const CHEST_DROP_REGION_AABB = {
|
50
50
|
min: { x: -45, y: 100, z: -45 },
|
51
51
|
max: { x: 45, y: 100, z: 45 },
|
52
52
|
};
|
53
53
|
|
54
|
-
export const CHEST_SPAWNS_AT_START =
|
54
|
+
export const CHEST_SPAWNS_AT_START = 20;
|
55
55
|
|
56
56
|
export const CHEST_MAX_DROP_ITEMS = 2;
|
57
57
|
|
58
|
-
export const CHEST_OPEN_DESPAWN_MS =
|
58
|
+
export const CHEST_OPEN_DESPAWN_MS = 10 * 1000; // 10 seconds
|
59
59
|
|
60
60
|
export const CHEST_DROP_ITEMS = [
|
61
61
|
{
|
@@ -92,7 +92,7 @@ export const CHEST_DROP_ITEMS = [
|
|
92
92
|
},
|
93
93
|
{
|
94
94
|
itemId: 'pistol',
|
95
|
-
pickWeight:
|
95
|
+
pickWeight: 0.8,
|
96
96
|
},
|
97
97
|
{
|
98
98
|
itemId: 'revolver',
|
@@ -339,9 +339,9 @@ export const CHEST_SPAWNS = [
|
|
339
339
|
},
|
340
340
|
];
|
341
341
|
|
342
|
-
export const GAME_DURATION_MS =
|
342
|
+
export const GAME_DURATION_MS = 8 * 60 * 1000; // 8 minutes
|
343
343
|
|
344
|
-
export const ITEM_DESPAWN_TIME_MS =
|
344
|
+
export const ITEM_DESPAWN_TIME_MS = 25 * 1000; // 25 seconds
|
345
345
|
|
346
346
|
export const ITEM_SPAWNS = [
|
347
347
|
{ position: { x: -21.5, y: 2, z: -17 } },
|
@@ -364,66 +364,326 @@ export const ITEM_SPAWNS = [
|
|
364
364
|
export const ITEM_SPAWN_ITEMS = [
|
365
365
|
{
|
366
366
|
itemId: 'ak47',
|
367
|
-
pickWeight: 0.
|
367
|
+
pickWeight: 0.5,
|
368
368
|
},
|
369
369
|
{
|
370
370
|
itemId: 'auto-shotgun',
|
371
|
-
pickWeight: 0.
|
371
|
+
pickWeight: 0.5,
|
372
372
|
},
|
373
373
|
{
|
374
374
|
itemId: 'auto-sniper',
|
375
|
-
pickWeight: 0.
|
375
|
+
pickWeight: 0.5,
|
376
376
|
},
|
377
377
|
{
|
378
378
|
itemId: 'bolt-action-sniper',
|
379
|
-
pickWeight: 0.
|
379
|
+
pickWeight: 0.5,
|
380
380
|
},
|
381
381
|
{
|
382
382
|
itemId: 'gravity-potion',
|
383
|
-
pickWeight: 0.
|
383
|
+
pickWeight: 0.5,
|
384
384
|
},
|
385
385
|
{
|
386
386
|
itemId: 'light-machine-gun',
|
387
|
-
pickWeight: 0.
|
387
|
+
pickWeight: 0.5,
|
388
388
|
},
|
389
389
|
{
|
390
390
|
itemId: 'medpack',
|
391
|
-
pickWeight:
|
391
|
+
pickWeight: 0.5,
|
392
392
|
},
|
393
393
|
{
|
394
394
|
itemId: 'mining-drill',
|
395
|
-
pickWeight: 0.
|
395
|
+
pickWeight: 0.5,
|
396
396
|
},
|
397
397
|
{
|
398
398
|
itemId: 'pistol',
|
399
|
-
pickWeight:
|
399
|
+
pickWeight: 0.3,
|
400
400
|
},
|
401
401
|
{
|
402
402
|
itemId: 'revolver',
|
403
|
-
pickWeight: 0.
|
403
|
+
pickWeight: 0.5,
|
404
404
|
},
|
405
405
|
{
|
406
406
|
itemId: 'rocket-launcher',
|
407
|
-
pickWeight: 0.
|
407
|
+
pickWeight: 0.3,
|
408
408
|
},
|
409
409
|
{
|
410
410
|
itemId: 'shotgun',
|
411
|
-
pickWeight: 0.
|
411
|
+
pickWeight: 0.8,
|
412
412
|
},
|
413
413
|
{
|
414
414
|
itemId: 'shield-potion',
|
415
|
-
pickWeight:
|
415
|
+
pickWeight: 0.5,
|
416
416
|
},
|
417
417
|
{
|
418
418
|
itemId: 'submachine-gun',
|
419
|
-
pickWeight: 0.
|
419
|
+
pickWeight: 0.5,
|
420
420
|
},
|
421
421
|
];
|
422
422
|
|
423
|
-
export const ITEM_SPAWNS_AT_START =
|
423
|
+
export const ITEM_SPAWNS_AT_START = 12;
|
424
424
|
|
425
425
|
export const MINIMUM_PLAYERS_TO_START = 2;
|
426
426
|
|
427
|
+
export const RANK_ASSIST_EXP = 20;
|
428
|
+
export const RANK_SAVE_INTERVAL_EXP = 500; // Every increment of this, save the persisted data.
|
429
|
+
export const RANK_KILL_EXP = 100;
|
430
|
+
export const RANK_WIN_EXP = 1000;
|
431
|
+
export const RANKS = [
|
432
|
+
{
|
433
|
+
name: 'Unranked',
|
434
|
+
totalExp: 0,
|
435
|
+
iconUri: 'icons/ranks/unranked.png',
|
436
|
+
unlocks: [],
|
437
|
+
},
|
438
|
+
{
|
439
|
+
name: 'Bronze I',
|
440
|
+
totalExp: 500,
|
441
|
+
iconUri: 'icons/ranks/bronze-1.png',
|
442
|
+
unlocks: [
|
443
|
+
'Visible Rank & Medal - Your rank and medal will be visible to all players in game above your head.',
|
444
|
+
'Bronze I Rank',
|
445
|
+
]
|
446
|
+
},
|
447
|
+
{
|
448
|
+
name: 'Bronze II',
|
449
|
+
totalExp: 1000,
|
450
|
+
iconUri: 'icons/ranks/bronze-2.png',
|
451
|
+
unlocks: [
|
452
|
+
'Bronze II Rank',
|
453
|
+
]
|
454
|
+
},
|
455
|
+
{
|
456
|
+
name: 'Bronze III',
|
457
|
+
totalExp: 1500,
|
458
|
+
iconUri: 'icons/ranks/bronze-3.png',
|
459
|
+
unlocks: [
|
460
|
+
'Bronze III Rank',
|
461
|
+
]
|
462
|
+
},
|
463
|
+
{
|
464
|
+
name: 'Bronze IV',
|
465
|
+
totalExp: 2500,
|
466
|
+
iconUri: 'icons/ranks/bronze-4.png',
|
467
|
+
unlocks: [
|
468
|
+
'Bronze IV Rank',
|
469
|
+
]
|
470
|
+
},
|
471
|
+
{
|
472
|
+
name: 'Bronze V',
|
473
|
+
totalExp: 4000,
|
474
|
+
iconUri: 'icons/ranks/bronze-5.png',
|
475
|
+
unlocks: [
|
476
|
+
'Bronze V Rank',
|
477
|
+
]
|
478
|
+
},
|
479
|
+
{
|
480
|
+
name: 'Silver I',
|
481
|
+
totalExp: 6000,
|
482
|
+
iconUri: 'icons/ranks/silver-1.png',
|
483
|
+
unlocks: [
|
484
|
+
'Competitive Matches - Your performance in any match that includes other Silver rank or higher players will affect your competitive ranking based on your relative finishing position.',
|
485
|
+
'Silver I Rank',
|
486
|
+
]
|
487
|
+
},
|
488
|
+
{
|
489
|
+
name: 'Silver II',
|
490
|
+
totalExp: 9000,
|
491
|
+
iconUri: 'icons/ranks/silver-2.png',
|
492
|
+
unlocks: [
|
493
|
+
'Silver II Rank',
|
494
|
+
]
|
495
|
+
},
|
496
|
+
{
|
497
|
+
name: 'Silver III',
|
498
|
+
totalExp: 13000,
|
499
|
+
iconUri: 'icons/ranks/silver-3.png',
|
500
|
+
unlocks: [
|
501
|
+
'Silver III Rank',
|
502
|
+
]
|
503
|
+
},
|
504
|
+
{
|
505
|
+
name: 'Silver IV',
|
506
|
+
totalExp: 18000,
|
507
|
+
iconUri: 'icons/ranks/silver-4.png',
|
508
|
+
unlocks: [
|
509
|
+
'Silver IV Rank',
|
510
|
+
]
|
511
|
+
},
|
512
|
+
{
|
513
|
+
name: 'Silver V',
|
514
|
+
totalExp: 24000,
|
515
|
+
iconUri: 'icons/ranks/silver-5.png',
|
516
|
+
unlocks: [
|
517
|
+
'Silver V Rank',
|
518
|
+
]
|
519
|
+
},
|
520
|
+
{
|
521
|
+
name: 'Gold I',
|
522
|
+
totalExp: 32000,
|
523
|
+
iconUri: 'icons/ranks/gold-1.png',
|
524
|
+
unlocks: [
|
525
|
+
'Gold Flex - All weapons will be tinted gold when you hold them.',
|
526
|
+
'Gold I Rank',
|
527
|
+
]
|
528
|
+
},
|
529
|
+
{
|
530
|
+
name: 'Gold II',
|
531
|
+
totalExp: 42000,
|
532
|
+
iconUri: 'icons/ranks/gold-2.png',
|
533
|
+
unlocks: [
|
534
|
+
'Gold II Rank',
|
535
|
+
]
|
536
|
+
},
|
537
|
+
{
|
538
|
+
name: 'Gold III',
|
539
|
+
totalExp: 54000,
|
540
|
+
iconUri: 'icons/ranks/gold-3.png',
|
541
|
+
unlocks: [
|
542
|
+
'Gold III Rank',
|
543
|
+
]
|
544
|
+
},
|
545
|
+
{
|
546
|
+
name: 'Gold IV',
|
547
|
+
totalExp: 68000,
|
548
|
+
iconUri: 'icons/ranks/gold-4.png',
|
549
|
+
unlocks: [
|
550
|
+
'Gold IV Rank',
|
551
|
+
]
|
552
|
+
},
|
553
|
+
{
|
554
|
+
name: 'Gold V',
|
555
|
+
totalExp: 85000,
|
556
|
+
iconUri: 'icons/ranks/gold-5.png',
|
557
|
+
unlocks: [
|
558
|
+
'Gold V Rank',
|
559
|
+
]
|
560
|
+
},
|
561
|
+
{
|
562
|
+
name: 'Platinum I',
|
563
|
+
totalExp: 105000,
|
564
|
+
iconUri: 'icons/ranks/platinum-1.png',
|
565
|
+
unlocks: [
|
566
|
+
'Celestial Hammer - Your pickaxe is replaced with a magnificent celestial hammer.',
|
567
|
+
'Platinum I Rank',
|
568
|
+
]
|
569
|
+
},
|
570
|
+
{
|
571
|
+
name: 'Platinum II',
|
572
|
+
totalExp: 130000,
|
573
|
+
iconUri: 'icons/ranks/platinum-2.png',
|
574
|
+
unlocks: [
|
575
|
+
'Platinum II Rank',
|
576
|
+
]
|
577
|
+
},
|
578
|
+
{
|
579
|
+
name: 'Platinum III',
|
580
|
+
totalExp: 160000,
|
581
|
+
iconUri: 'icons/ranks/platinum-3.png',
|
582
|
+
unlocks: [
|
583
|
+
'Platinum III Rank',
|
584
|
+
]
|
585
|
+
},
|
586
|
+
{
|
587
|
+
name: 'Platinum IV',
|
588
|
+
totalExp: 195000,
|
589
|
+
iconUri: 'icons/ranks/platinum-4.png',
|
590
|
+
unlocks: [
|
591
|
+
'Platinum IV Rank',
|
592
|
+
]
|
593
|
+
},
|
594
|
+
{
|
595
|
+
name: 'Platinum V',
|
596
|
+
totalExp: 235000,
|
597
|
+
iconUri: 'icons/ranks/platinum-5.png',
|
598
|
+
unlocks: [
|
599
|
+
'Platinum V Rank',
|
600
|
+
]
|
601
|
+
},
|
602
|
+
{
|
603
|
+
name: 'Diamond I',
|
604
|
+
totalExp: 280000,
|
605
|
+
iconUri: 'icons/ranks/diamond-1.png',
|
606
|
+
unlocks: [
|
607
|
+
'Opulent Wings - Your character will be adorned with visual wings.',
|
608
|
+
'Diamond I Rank',
|
609
|
+
]
|
610
|
+
},
|
611
|
+
{
|
612
|
+
name: 'Diamond II',
|
613
|
+
totalExp: 330000,
|
614
|
+
iconUri: 'icons/ranks/diamond-2.png',
|
615
|
+
unlocks: [
|
616
|
+
'Diamond II Rank',
|
617
|
+
]
|
618
|
+
},
|
619
|
+
{
|
620
|
+
name: 'Diamond III',
|
621
|
+
totalExp: 385000,
|
622
|
+
iconUri: 'icons/ranks/diamond-3.png',
|
623
|
+
unlocks: [
|
624
|
+
'Diamond III Rank',
|
625
|
+
]
|
626
|
+
},
|
627
|
+
{
|
628
|
+
name: 'Diamond IV',
|
629
|
+
totalExp: 445000,
|
630
|
+
iconUri: 'icons/ranks/diamond-4.png',
|
631
|
+
unlocks: [
|
632
|
+
'Diamond IV Rank',
|
633
|
+
]
|
634
|
+
},
|
635
|
+
{
|
636
|
+
name: 'Diamond V',
|
637
|
+
totalExp: 510000,
|
638
|
+
iconUri: 'icons/ranks/diamond-5.png',
|
639
|
+
unlocks: [
|
640
|
+
'Diamond V Rank',
|
641
|
+
]
|
642
|
+
},
|
643
|
+
{
|
644
|
+
name: 'Elite I',
|
645
|
+
totalExp: 580000,
|
646
|
+
iconUri: 'icons/ranks/elite-1.png',
|
647
|
+
unlocks: [
|
648
|
+
'Elite Outfit - Your character will be adorned with a special elite outfit.',
|
649
|
+
'Elite I Rank',
|
650
|
+
]
|
651
|
+
},
|
652
|
+
{
|
653
|
+
name: 'Elite II',
|
654
|
+
totalExp: 655000,
|
655
|
+
iconUri: 'icons/ranks/elite-2.png',
|
656
|
+
unlocks: [
|
657
|
+
'Elite II Rank',
|
658
|
+
]
|
659
|
+
},
|
660
|
+
{
|
661
|
+
name: 'Elite III',
|
662
|
+
totalExp: 735000,
|
663
|
+
iconUri: 'icons/ranks/elite-3.png',
|
664
|
+
unlocks: [
|
665
|
+
'Elite III Rank',
|
666
|
+
]
|
667
|
+
},
|
668
|
+
{
|
669
|
+
name: 'Elite IV',
|
670
|
+
totalExp: 820000,
|
671
|
+
iconUri: 'icons/ranks/elite-4.png',
|
672
|
+
unlocks: [
|
673
|
+
'Elite IV Rank',
|
674
|
+
]
|
675
|
+
},
|
676
|
+
{
|
677
|
+
name: 'Elite V',
|
678
|
+
totalExp: 910000,
|
679
|
+
iconUri: 'icons/ranks/elite-5.png',
|
680
|
+
unlocks: [
|
681
|
+
'Highest Honor - Your character will receive something extremely special. You will need to reach this rank to find out what it is!',
|
682
|
+
'Elite V Rank',
|
683
|
+
]
|
684
|
+
},
|
685
|
+
]
|
686
|
+
|
427
687
|
export const SPAWN_REGION_AABB = {
|
428
688
|
min: { x: -45, y: 30, z: -45 },
|
429
689
|
max: { x: 45, y: 35, z: 45 },
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -275,6 +275,36 @@
|
|
275
275
|
"isProtected": false,
|
276
276
|
"isAbstract": false
|
277
277
|
},
|
278
|
+
{
|
279
|
+
"kind": "Property",
|
280
|
+
"canonicalReference": "server!Audio#cutoffDistance:member",
|
281
|
+
"docComment": "/**\n * The cutoff distance where the audio will be reduced to 0 volume.\n */\n",
|
282
|
+
"excerptTokens": [
|
283
|
+
{
|
284
|
+
"kind": "Content",
|
285
|
+
"text": "get cutoffDistance(): "
|
286
|
+
},
|
287
|
+
{
|
288
|
+
"kind": "Content",
|
289
|
+
"text": "number"
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"kind": "Content",
|
293
|
+
"text": ";"
|
294
|
+
}
|
295
|
+
],
|
296
|
+
"isReadonly": true,
|
297
|
+
"isOptional": false,
|
298
|
+
"releaseTag": "Public",
|
299
|
+
"name": "cutoffDistance",
|
300
|
+
"propertyTypeTokenRange": {
|
301
|
+
"startIndex": 1,
|
302
|
+
"endIndex": 2
|
303
|
+
},
|
304
|
+
"isStatic": false,
|
305
|
+
"isProtected": false,
|
306
|
+
"isAbstract": false
|
307
|
+
},
|
278
308
|
{
|
279
309
|
"kind": "Property",
|
280
310
|
"canonicalReference": "server!Audio#detune:member",
|
@@ -717,7 +747,7 @@
|
|
717
747
|
},
|
718
748
|
{
|
719
749
|
"kind": "Content",
|
720
|
-
"text": "number
|
750
|
+
"text": "number"
|
721
751
|
},
|
722
752
|
{
|
723
753
|
"kind": "Content",
|
@@ -785,6 +815,54 @@
|
|
785
815
|
"isAbstract": false,
|
786
816
|
"name": "setAttachedToEntity"
|
787
817
|
},
|
818
|
+
{
|
819
|
+
"kind": "Method",
|
820
|
+
"canonicalReference": "server!Audio#setCutoffDistance:member(1)",
|
821
|
+
"docComment": "/**\n * Sets the cutoff distance of the audio.\n *\n * @remarks\n *\n * The cutoff distance defines the maximum range at which the audio can be heard. Beyond this distance, the audio volume becomes zero. As the listener moves from the reference distance toward the cutoff distance, the volume decreases linearly, providing a natural spatial audio experience with smooth volume falloff based on distance.\n *\n * @param cutoffDistance - The cutoff distance.\n */\n",
|
822
|
+
"excerptTokens": [
|
823
|
+
{
|
824
|
+
"kind": "Content",
|
825
|
+
"text": "setCutoffDistance(cutoffDistance: "
|
826
|
+
},
|
827
|
+
{
|
828
|
+
"kind": "Content",
|
829
|
+
"text": "number"
|
830
|
+
},
|
831
|
+
{
|
832
|
+
"kind": "Content",
|
833
|
+
"text": "): "
|
834
|
+
},
|
835
|
+
{
|
836
|
+
"kind": "Content",
|
837
|
+
"text": "void"
|
838
|
+
},
|
839
|
+
{
|
840
|
+
"kind": "Content",
|
841
|
+
"text": ";"
|
842
|
+
}
|
843
|
+
],
|
844
|
+
"isStatic": false,
|
845
|
+
"returnTypeTokenRange": {
|
846
|
+
"startIndex": 3,
|
847
|
+
"endIndex": 4
|
848
|
+
},
|
849
|
+
"releaseTag": "Public",
|
850
|
+
"isProtected": false,
|
851
|
+
"overloadIndex": 1,
|
852
|
+
"parameters": [
|
853
|
+
{
|
854
|
+
"parameterName": "cutoffDistance",
|
855
|
+
"parameterTypeTokenRange": {
|
856
|
+
"startIndex": 1,
|
857
|
+
"endIndex": 2
|
858
|
+
},
|
859
|
+
"isOptional": false
|
860
|
+
}
|
861
|
+
],
|
862
|
+
"isOptional": false,
|
863
|
+
"isAbstract": false,
|
864
|
+
"name": "setCutoffDistance"
|
865
|
+
},
|
788
866
|
{
|
789
867
|
"kind": "Method",
|
790
868
|
"canonicalReference": "server!Audio#setDetune:member(1)",
|
@@ -981,7 +1059,7 @@
|
|
981
1059
|
{
|
982
1060
|
"kind": "Method",
|
983
1061
|
"canonicalReference": "server!Audio#setReferenceDistance:member(1)",
|
984
|
-
"docComment": "/**\n * Sets the reference distance of the audio.\n *\n * @param referenceDistance - The reference distance.\n */\n",
|
1062
|
+
"docComment": "/**\n * Sets the reference distance of the audio.\n *\n * @remarks\n *\n * The reference distance defines the range within which the audio plays at full volume. When a listener is within this distance from the audio source, they will hear the sound at its maximum volume. Beyond this distance, the volume decreases linearly until reaching the cutoff distance, where the sound becomes inaudible. This creates a natural spatial audio experience with smooth volume falloff based on distance.\n *\n * @param referenceDistance - The reference distance.\n */\n",
|
985
1063
|
"excerptTokens": [
|
986
1064
|
{
|
987
1065
|
"kind": "Content",
|
@@ -1310,6 +1388,27 @@
|
|
1310
1388
|
"releaseTag": "Public",
|
1311
1389
|
"name": "SET_ATTACHED_TO_ENTITY"
|
1312
1390
|
},
|
1391
|
+
{
|
1392
|
+
"kind": "EnumMember",
|
1393
|
+
"canonicalReference": "server!AudioEvent.SET_CUTOFF_DISTANCE:member",
|
1394
|
+
"docComment": "",
|
1395
|
+
"excerptTokens": [
|
1396
|
+
{
|
1397
|
+
"kind": "Content",
|
1398
|
+
"text": "SET_CUTOFF_DISTANCE = "
|
1399
|
+
},
|
1400
|
+
{
|
1401
|
+
"kind": "Content",
|
1402
|
+
"text": "\"AUDIO.SET_CUTOFF_DISTANCE\""
|
1403
|
+
}
|
1404
|
+
],
|
1405
|
+
"initializerTokenRange": {
|
1406
|
+
"startIndex": 1,
|
1407
|
+
"endIndex": 2
|
1408
|
+
},
|
1409
|
+
"releaseTag": "Public",
|
1410
|
+
"name": "SET_CUTOFF_DISTANCE"
|
1411
|
+
},
|
1313
1412
|
{
|
1314
1413
|
"kind": "EnumMember",
|
1315
1414
|
"canonicalReference": "server!AudioEvent.SET_DETUNE:member",
|
@@ -1642,6 +1741,51 @@
|
|
1642
1741
|
"endIndex": 8
|
1643
1742
|
}
|
1644
1743
|
},
|
1744
|
+
{
|
1745
|
+
"kind": "PropertySignature",
|
1746
|
+
"canonicalReference": "server!AudioEventPayloads#\"AUDIO.SET_CUTOFF_DISTANCE\":member",
|
1747
|
+
"docComment": "/**\n * Emitted when the audio's cutoff distance is set.\n */\n",
|
1748
|
+
"excerptTokens": [
|
1749
|
+
{
|
1750
|
+
"kind": "Content",
|
1751
|
+
"text": "["
|
1752
|
+
},
|
1753
|
+
{
|
1754
|
+
"kind": "Reference",
|
1755
|
+
"text": "AudioEvent.SET_CUTOFF_DISTANCE",
|
1756
|
+
"canonicalReference": "server!AudioEvent.SET_CUTOFF_DISTANCE:member"
|
1757
|
+
},
|
1758
|
+
{
|
1759
|
+
"kind": "Content",
|
1760
|
+
"text": "]: "
|
1761
|
+
},
|
1762
|
+
{
|
1763
|
+
"kind": "Content",
|
1764
|
+
"text": "{\n audio: "
|
1765
|
+
},
|
1766
|
+
{
|
1767
|
+
"kind": "Reference",
|
1768
|
+
"text": "Audio",
|
1769
|
+
"canonicalReference": "server!Audio:class"
|
1770
|
+
},
|
1771
|
+
{
|
1772
|
+
"kind": "Content",
|
1773
|
+
"text": ";\n cutoffDistance: number;\n }"
|
1774
|
+
},
|
1775
|
+
{
|
1776
|
+
"kind": "Content",
|
1777
|
+
"text": ";"
|
1778
|
+
}
|
1779
|
+
],
|
1780
|
+
"isReadonly": false,
|
1781
|
+
"isOptional": false,
|
1782
|
+
"releaseTag": "Public",
|
1783
|
+
"name": "\"AUDIO.SET_CUTOFF_DISTANCE\"",
|
1784
|
+
"propertyTypeTokenRange": {
|
1785
|
+
"startIndex": 3,
|
1786
|
+
"endIndex": 6
|
1787
|
+
}
|
1788
|
+
},
|
1645
1789
|
{
|
1646
1790
|
"kind": "PropertySignature",
|
1647
1791
|
"canonicalReference": "server!AudioEventPayloads#\"AUDIO.SET_DETUNE\":member",
|
@@ -2277,6 +2421,33 @@
|
|
2277
2421
|
"endIndex": 2
|
2278
2422
|
}
|
2279
2423
|
},
|
2424
|
+
{
|
2425
|
+
"kind": "PropertySignature",
|
2426
|
+
"canonicalReference": "server!AudioOptions#cutoffDistance:member",
|
2427
|
+
"docComment": "/**\n * The cutoff distance between the audio source and the listener where the audio will be reduced to 0 volume. Must be greater than reference distance. Defaults to reference distance + 10.\n */\n",
|
2428
|
+
"excerptTokens": [
|
2429
|
+
{
|
2430
|
+
"kind": "Content",
|
2431
|
+
"text": "cutoffDistance?: "
|
2432
|
+
},
|
2433
|
+
{
|
2434
|
+
"kind": "Content",
|
2435
|
+
"text": "number"
|
2436
|
+
},
|
2437
|
+
{
|
2438
|
+
"kind": "Content",
|
2439
|
+
"text": ";"
|
2440
|
+
}
|
2441
|
+
],
|
2442
|
+
"isReadonly": false,
|
2443
|
+
"isOptional": true,
|
2444
|
+
"releaseTag": "Public",
|
2445
|
+
"name": "cutoffDistance",
|
2446
|
+
"propertyTypeTokenRange": {
|
2447
|
+
"startIndex": 1,
|
2448
|
+
"endIndex": 2
|
2449
|
+
}
|
2450
|
+
},
|
2280
2451
|
{
|
2281
2452
|
"kind": "PropertySignature",
|
2282
2453
|
"canonicalReference": "server!AudioOptions#detune:member",
|
@@ -2470,7 +2641,7 @@
|
|
2470
2641
|
{
|
2471
2642
|
"kind": "PropertySignature",
|
2472
2643
|
"canonicalReference": "server!AudioOptions#referenceDistance:member",
|
2473
|
-
"docComment": "/**\n * The reference distance
|
2644
|
+
"docComment": "/**\n * The maximum reference distance between the audio source and the listener where the audio will still be max volume. Defaults to 10.\n */\n",
|
2474
2645
|
"excerptTokens": [
|
2475
2646
|
{
|
2476
2647
|
"kind": "Content",
|
@@ -27262,7 +27433,7 @@
|
|
27262
27433
|
{
|
27263
27434
|
"kind": "Class",
|
27264
27435
|
"canonicalReference": "server!PlayerEntity:class",
|
27265
|
-
"docComment": "/**\n * Represents an entity controlled by a player in a world.\n *\n * @remarks\n *\n * Player entities extend the {@link Entity} class. They can be created and assigned to a player when a player joins a world. PlayerEntity automatically handles mapping player inputs to the associated entity controller of the entity, calling the entity controller's onTickPlayerMovement method when player input has changed.\n *\n * @example\n * ```typescript\n * world.onPlayerJoin = player => {\n * const playerEntity = new PlayerEntity({\n * player,\n * name: 'Player',\n * modelUri: 'models/player
|
27436
|
+
"docComment": "/**\n * Represents an entity controlled by a player in a world.\n *\n * @remarks\n *\n * Player entities extend the {@link Entity} class. They can be created and assigned to a player when a player joins a world. PlayerEntity automatically handles mapping player inputs to the associated entity controller of the entity, calling the entity controller's onTickPlayerMovement method when player input has changed.\n *\n * @example\n * ```typescript\n * world.onPlayerJoin = player => {\n * const playerEntity = new PlayerEntity({\n * player,\n * name: 'Player',\n * modelUri: 'models/players/player.gltf',\n * modelLoopedAnimations: [ 'idle_lower', 'idle_upper' ],\n * modelScale: 0.5,\n * });\n *\n * playerEntity.spawn(world, { x: 10, y: 20, z: 15 });\n * };\n * ```\n *\n * @public\n */\n",
|
27266
27437
|
"excerptTokens": [
|
27267
27438
|
{
|
27268
27439
|
"kind": "Content",
|