hytopia 0.11.4 → 0.11.6
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.blocktextureregistry.generate.md +13 -0
- package/docs/server.blocktextureregistry.md +2 -2
- package/docs/server.modelregistry.hasmodel.md +56 -0
- package/docs/server.modelregistry.md +15 -20
- package/docs/server.modelregistry.optimize.md +1 -1
- package/package.json +1 -1
- package/server.api.json +53 -35
- package/server.d.ts +10 -5
- package/server.mjs +70 -70
- package/docs/server.blocktextureregistry.generateeverystart.md +0 -13
- package/docs/server.modelregistry.optimizeeverystart.md +0 -13
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BlockTextureRegistry](./server.blocktextureregistry.md) > [generate](./server.blocktextureregistry.generate.md)
|
|
4
|
+
|
|
5
|
+
## BlockTextureRegistry.generate property
|
|
6
|
+
|
|
7
|
+
Whether to generate the atlas if needed. Defaults to `true` in development, `false` in production.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
generate: boolean;
|
|
13
|
+
```
|
|
@@ -53,7 +53,7 @@ Description
|
|
|
53
53
|
</th></tr></thead>
|
|
54
54
|
<tbody><tr><td>
|
|
55
55
|
|
|
56
|
-
[
|
|
56
|
+
[generate](./server.blocktextureregistry.generate.md)
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
</td><td>
|
|
@@ -66,7 +66,7 @@ boolean
|
|
|
66
66
|
|
|
67
67
|
</td><td>
|
|
68
68
|
|
|
69
|
-
Whether to
|
|
69
|
+
Whether to generate the atlas if needed. Defaults to `true` in development, `false` in production.
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
</td></tr>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ModelRegistry](./server.modelregistry.md) > [hasModel](./server.modelregistry.hasmodel.md)
|
|
4
|
+
|
|
5
|
+
## ModelRegistry.hasModel() method
|
|
6
|
+
|
|
7
|
+
Checks if a model is registered in the model registry.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
hasModel(modelUri: string): boolean;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Parameter
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Type
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
modelUri
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The URI of the model to check.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
boolean
|
|
54
|
+
|
|
55
|
+
Whether the model is registered.
|
|
56
|
+
|
|
@@ -89,26 +89,7 @@ boolean
|
|
|
89
89
|
|
|
90
90
|
</td><td>
|
|
91
91
|
|
|
92
|
-
Whether to
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
</td></tr>
|
|
96
|
-
<tr><td>
|
|
97
|
-
|
|
98
|
-
[optimizeEveryStart](./server.modelregistry.optimizeeverystart.md)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
</td><td>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
</td><td>
|
|
105
|
-
|
|
106
|
-
boolean
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</td><td>
|
|
110
|
-
|
|
111
|
-
Whether to always run model optimization on server start.
|
|
92
|
+
Whether to generate optimized models if needed. Defaults to `true` in development, `false` in production.
|
|
112
93
|
|
|
113
94
|
|
|
114
95
|
</td></tr>
|
|
@@ -229,6 +210,20 @@ Retrieves the trimesh of a model.
|
|
|
229
210
|
Retrieves the X-axis width of a model for a scale of 1.
|
|
230
211
|
|
|
231
212
|
|
|
213
|
+
</td></tr>
|
|
214
|
+
<tr><td>
|
|
215
|
+
|
|
216
|
+
[hasModel(modelUri)](./server.modelregistry.hasmodel.md)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</td><td>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
</td><td>
|
|
223
|
+
|
|
224
|
+
Checks if a model is registered in the model registry.
|
|
225
|
+
|
|
226
|
+
|
|
232
227
|
</td></tr>
|
|
233
228
|
<tr><td>
|
|
234
229
|
|
package/package.json
CHANGED
package/server.api.json
CHANGED
|
@@ -4913,12 +4913,12 @@
|
|
|
4913
4913
|
"members": [
|
|
4914
4914
|
{
|
|
4915
4915
|
"kind": "Property",
|
|
4916
|
-
"canonicalReference": "server!BlockTextureRegistry#
|
|
4917
|
-
"docComment": "/**\n * Whether to
|
|
4916
|
+
"canonicalReference": "server!BlockTextureRegistry#generate:member",
|
|
4917
|
+
"docComment": "/**\n * Whether to generate the atlas if needed. Defaults to `true` in development, `false` in production.\n */\n",
|
|
4918
4918
|
"excerptTokens": [
|
|
4919
4919
|
{
|
|
4920
4920
|
"kind": "Content",
|
|
4921
|
-
"text": "
|
|
4921
|
+
"text": "generate: "
|
|
4922
4922
|
},
|
|
4923
4923
|
{
|
|
4924
4924
|
"kind": "Content",
|
|
@@ -4932,7 +4932,7 @@
|
|
|
4932
4932
|
"isReadonly": false,
|
|
4933
4933
|
"isOptional": false,
|
|
4934
4934
|
"releaseTag": "Public",
|
|
4935
|
-
"name": "
|
|
4935
|
+
"name": "generate",
|
|
4936
4936
|
"propertyTypeTokenRange": {
|
|
4937
4937
|
"startIndex": 1,
|
|
4938
4938
|
"endIndex": 2
|
|
@@ -28718,6 +28718,54 @@
|
|
|
28718
28718
|
"isAbstract": false,
|
|
28719
28719
|
"name": "getWidth"
|
|
28720
28720
|
},
|
|
28721
|
+
{
|
|
28722
|
+
"kind": "Method",
|
|
28723
|
+
"canonicalReference": "server!ModelRegistry#hasModel:member(1)",
|
|
28724
|
+
"docComment": "/**\n * Checks if a model is registered in the model registry.\n *\n * @param modelUri - The URI of the model to check.\n *\n * @returns Whether the model is registered.\n */\n",
|
|
28725
|
+
"excerptTokens": [
|
|
28726
|
+
{
|
|
28727
|
+
"kind": "Content",
|
|
28728
|
+
"text": "hasModel(modelUri: "
|
|
28729
|
+
},
|
|
28730
|
+
{
|
|
28731
|
+
"kind": "Content",
|
|
28732
|
+
"text": "string"
|
|
28733
|
+
},
|
|
28734
|
+
{
|
|
28735
|
+
"kind": "Content",
|
|
28736
|
+
"text": "): "
|
|
28737
|
+
},
|
|
28738
|
+
{
|
|
28739
|
+
"kind": "Content",
|
|
28740
|
+
"text": "boolean"
|
|
28741
|
+
},
|
|
28742
|
+
{
|
|
28743
|
+
"kind": "Content",
|
|
28744
|
+
"text": ";"
|
|
28745
|
+
}
|
|
28746
|
+
],
|
|
28747
|
+
"isStatic": false,
|
|
28748
|
+
"returnTypeTokenRange": {
|
|
28749
|
+
"startIndex": 3,
|
|
28750
|
+
"endIndex": 4
|
|
28751
|
+
},
|
|
28752
|
+
"releaseTag": "Public",
|
|
28753
|
+
"isProtected": false,
|
|
28754
|
+
"overloadIndex": 1,
|
|
28755
|
+
"parameters": [
|
|
28756
|
+
{
|
|
28757
|
+
"parameterName": "modelUri",
|
|
28758
|
+
"parameterTypeTokenRange": {
|
|
28759
|
+
"startIndex": 1,
|
|
28760
|
+
"endIndex": 2
|
|
28761
|
+
},
|
|
28762
|
+
"isOptional": false
|
|
28763
|
+
}
|
|
28764
|
+
],
|
|
28765
|
+
"isOptional": false,
|
|
28766
|
+
"isAbstract": false,
|
|
28767
|
+
"name": "hasModel"
|
|
28768
|
+
},
|
|
28721
28769
|
{
|
|
28722
28770
|
"kind": "Property",
|
|
28723
28771
|
"canonicalReference": "server!ModelRegistry.instance:member",
|
|
@@ -28816,7 +28864,7 @@
|
|
|
28816
28864
|
{
|
|
28817
28865
|
"kind": "Property",
|
|
28818
28866
|
"canonicalReference": "server!ModelRegistry#optimize:member",
|
|
28819
|
-
"docComment": "/**\n * Whether to
|
|
28867
|
+
"docComment": "/**\n * Whether to generate optimized models if needed. Defaults to `true` in development, `false` in production.\n */\n",
|
|
28820
28868
|
"excerptTokens": [
|
|
28821
28869
|
{
|
|
28822
28870
|
"kind": "Content",
|
|
@@ -28842,36 +28890,6 @@
|
|
|
28842
28890
|
"isStatic": false,
|
|
28843
28891
|
"isProtected": false,
|
|
28844
28892
|
"isAbstract": false
|
|
28845
|
-
},
|
|
28846
|
-
{
|
|
28847
|
-
"kind": "Property",
|
|
28848
|
-
"canonicalReference": "server!ModelRegistry#optimizeEveryStart:member",
|
|
28849
|
-
"docComment": "/**\n * Whether to always run model optimization on server start.\n */\n",
|
|
28850
|
-
"excerptTokens": [
|
|
28851
|
-
{
|
|
28852
|
-
"kind": "Content",
|
|
28853
|
-
"text": "optimizeEveryStart: "
|
|
28854
|
-
},
|
|
28855
|
-
{
|
|
28856
|
-
"kind": "Content",
|
|
28857
|
-
"text": "boolean"
|
|
28858
|
-
},
|
|
28859
|
-
{
|
|
28860
|
-
"kind": "Content",
|
|
28861
|
-
"text": ";"
|
|
28862
|
-
}
|
|
28863
|
-
],
|
|
28864
|
-
"isReadonly": false,
|
|
28865
|
-
"isOptional": false,
|
|
28866
|
-
"releaseTag": "Public",
|
|
28867
|
-
"name": "optimizeEveryStart",
|
|
28868
|
-
"propertyTypeTokenRange": {
|
|
28869
|
-
"startIndex": 1,
|
|
28870
|
-
"endIndex": 2
|
|
28871
|
-
},
|
|
28872
|
-
"isStatic": false,
|
|
28873
|
-
"isProtected": false,
|
|
28874
|
-
"isAbstract": false
|
|
28875
28893
|
}
|
|
28876
28894
|
],
|
|
28877
28895
|
"implementsTokenRanges": []
|
package/server.d.ts
CHANGED
|
@@ -597,8 +597,8 @@ export declare type BlockTextureMetadata = {
|
|
|
597
597
|
export declare class BlockTextureRegistry {
|
|
598
598
|
/** The global BlockTextureRegistry instance as a singleton. */
|
|
599
599
|
static readonly instance: BlockTextureRegistry;
|
|
600
|
-
/** Whether to
|
|
601
|
-
|
|
600
|
+
/** Whether to generate the atlas if needed. Defaults to `true` in development, `false` in production. */
|
|
601
|
+
generate: boolean;
|
|
602
602
|
|
|
603
603
|
|
|
604
604
|
/**
|
|
@@ -3532,10 +3532,8 @@ export declare interface ModelEntityOptions extends BaseEntityOptions {
|
|
|
3532
3532
|
export declare class ModelRegistry {
|
|
3533
3533
|
/** The global ModelRegistry instance as a singleton. */
|
|
3534
3534
|
static readonly instance: ModelRegistry;
|
|
3535
|
-
/** Whether to
|
|
3535
|
+
/** Whether to generate optimized models if needed. Defaults to `true` in development, `false` in production. */
|
|
3536
3536
|
optimize: boolean;
|
|
3537
|
-
/** Whether to always run model optimization on server start. */
|
|
3538
|
-
optimizeEveryStart: boolean;
|
|
3539
3537
|
|
|
3540
3538
|
|
|
3541
3539
|
|
|
@@ -3592,6 +3590,13 @@ export declare class ModelRegistry {
|
|
|
3592
3590
|
* @returns The width of the model.
|
|
3593
3591
|
*/
|
|
3594
3592
|
getWidth(modelUri: string): number;
|
|
3593
|
+
/**
|
|
3594
|
+
* Checks if a model is registered in the model registry.
|
|
3595
|
+
*
|
|
3596
|
+
* @param modelUri - The URI of the model to check.
|
|
3597
|
+
* @returns Whether the model is registered.
|
|
3598
|
+
*/
|
|
3599
|
+
hasModel(modelUri: string): boolean;
|
|
3595
3600
|
/**
|
|
3596
3601
|
* Checks if a model has a node with the given name.
|
|
3597
3602
|
*
|