hytopia 0.11.3 → 0.11.5
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/bin/scripts.js +11 -17
- package/docs/server.blocktextureregistry.generate.md +13 -0
- package/docs/server.blocktextureregistry.md +2 -2
- package/docs/server.modelregistry.md +1 -20
- package/docs/server.modelregistry.optimize.md +1 -1
- package/package.json +1 -1
- package/server.api.json +5 -35
- package/server.d.ts +3 -5
- package/server.mjs +64 -64
- package/docs/server.blocktextureregistry.generateeverystart.md +0 -13
- package/docs/server.modelregistry.optimizeeverystart.md +0 -13
package/bin/scripts.js
CHANGED
|
@@ -41,6 +41,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
41
41
|
'init-mcp': initMcp,
|
|
42
42
|
'package': packageProject,
|
|
43
43
|
'start': start,
|
|
44
|
+
'upgrade-assets-library': () => upgradeAssets(process.argv[3] || 'latest'),
|
|
44
45
|
'upgrade-cli': () => upgradeCli(process.argv[3] || 'latest'),
|
|
45
46
|
'upgrade-project': () => upgradeProject(process.argv[3] || 'latest'),
|
|
46
47
|
'version': displayVersion,
|
|
@@ -142,9 +143,6 @@ function init() {
|
|
|
142
143
|
// Update SDK to latest (sets package.json requirement)
|
|
143
144
|
upgradeProject();
|
|
144
145
|
|
|
145
|
-
// Copy assets into project, not overwriting existing files
|
|
146
|
-
copyAssets(destDir);
|
|
147
|
-
|
|
148
146
|
// Display success message
|
|
149
147
|
displayInitSuccessMessage();
|
|
150
148
|
|
|
@@ -210,18 +208,6 @@ function initFromBoilerplate(destDir) {
|
|
|
210
208
|
}
|
|
211
209
|
}
|
|
212
210
|
|
|
213
|
-
/**
|
|
214
|
-
* Copies assets to the project directory
|
|
215
|
-
*/
|
|
216
|
-
function copyAssets(destDir) {
|
|
217
|
-
const assetsSource = path.join(destDir, 'node_modules', '@hytopia.com', 'assets');
|
|
218
|
-
const assetsDest = path.join(destDir, 'assets');
|
|
219
|
-
|
|
220
|
-
if (!copyDirectoryContents(assetsSource, assetsDest, { recursive: true, force: false })) {
|
|
221
|
-
console.error('❌ Error: Could not copy assets from @hytopia.com/assets package');
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
211
|
/**
|
|
226
212
|
* Displays success message after project initialization
|
|
227
213
|
*/
|
|
@@ -579,6 +565,13 @@ async function fetchLatestVersion(signal) {
|
|
|
579
565
|
}
|
|
580
566
|
}
|
|
581
567
|
|
|
568
|
+
function upgradeAssetsLibrary(versionArg = 'latest') {
|
|
569
|
+
const version = versionArg.trim();
|
|
570
|
+
console.log(`🔄 Upgrading @hytopia.com/assets package to: ${version} ...`);
|
|
571
|
+
execSync(`npm install --force @hytopia.com/assets@${version}`, { stdio: 'inherit' });
|
|
572
|
+
console.log('✅ Upgrade complete.');
|
|
573
|
+
}
|
|
574
|
+
|
|
582
575
|
function upgradeCli(versionArg = 'latest') {
|
|
583
576
|
const version = versionArg.trim();
|
|
584
577
|
console.log(`🔄 Upgrading HYTOPIA CLI to: hytopia@${version} ...`);
|
|
@@ -613,8 +606,9 @@ function displayHelp() {
|
|
|
613
606
|
console.log(' init [--template NAME] Initialize a new project');
|
|
614
607
|
console.log(' init-mcp Setup MCP integrations');
|
|
615
608
|
console.log(' package Create a zip of the project for uploading to the HYTOPIA create portal.');
|
|
616
|
-
console.log(' upgrade-
|
|
617
|
-
console.log(' upgrade-
|
|
609
|
+
console.log(' upgrade-assets-library [VERSION] Upgrade the @hytopia.com/assets package (default: latest)');
|
|
610
|
+
console.log(' upgrade-cli [VERSION] Upgrade the HYTOPIA CLI (default: latest)');
|
|
611
|
+
console.log(' upgrade-project [VERSION] Upgrade project SDK dependency (default: latest)');
|
|
618
612
|
console.log('');
|
|
619
613
|
console.log('Examples:');
|
|
620
614
|
console.log(' hytopia init --template zombies-fps');
|
|
@@ -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>
|
|
@@ -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>
|
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
|
|
@@ -28816,7 +28816,7 @@
|
|
|
28816
28816
|
{
|
|
28817
28817
|
"kind": "Property",
|
|
28818
28818
|
"canonicalReference": "server!ModelRegistry#optimize:member",
|
|
28819
|
-
"docComment": "/**\n * Whether to
|
|
28819
|
+
"docComment": "/**\n * Whether to generate optimized models if needed. Defaults to `true` in development, `false` in production.\n */\n",
|
|
28820
28820
|
"excerptTokens": [
|
|
28821
28821
|
{
|
|
28822
28822
|
"kind": "Content",
|
|
@@ -28842,36 +28842,6 @@
|
|
|
28842
28842
|
"isStatic": false,
|
|
28843
28843
|
"isProtected": false,
|
|
28844
28844
|
"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
28845
|
}
|
|
28876
28846
|
],
|
|
28877
28847
|
"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
|
|