@needle-tools/gltf-progressive 3.3.3-next.ff6503a → 3.3.3
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/NEEDLE_progressive/README.md +106 -0
- package/package.json +3 -3
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# NEEDLE Progressive Extensions Schema
|
|
2
|
+
|
|
3
|
+
This document describes the NEEDLE progressive mesh and texture extensions.
|
|
4
|
+
|
|
5
|
+
## Base Types
|
|
6
|
+
|
|
7
|
+
### NEEDLE_progressive_model_LOD
|
|
8
|
+
|
|
9
|
+
Represents a single Level of Detail (LOD) file reference.
|
|
10
|
+
|
|
11
|
+
| Property | Type | Required | Description |
|
|
12
|
+
|----------|------|----------|-------------|
|
|
13
|
+
| `path` | `string` | Yes | Relative path to the LOD file |
|
|
14
|
+
| `hash` | `string` | No | Optional hash for file verification |
|
|
15
|
+
|
|
16
|
+
### NEEDLE_progressive_ext
|
|
17
|
+
|
|
18
|
+
Base extension format for progressive assets.
|
|
19
|
+
|
|
20
|
+
| Property | Type | Required | Description |
|
|
21
|
+
|----------|------|----------|-------------|
|
|
22
|
+
| `guid` | `string` | Yes | Unique identifier of the object (texture, mesh) the LODs belong to |
|
|
23
|
+
| `lods` | `Array<NEEDLE_progressive_model_LOD>` | Yes | Array of available LOD levels |
|
|
24
|
+
|
|
25
|
+
## Extension Types
|
|
26
|
+
|
|
27
|
+
### NEEDLE_ext_progressive_texture
|
|
28
|
+
|
|
29
|
+
Texture extension for progressive texture loading, inheriting from `NEEDLE_progressive_ext`.
|
|
30
|
+
|
|
31
|
+
| Property | Type | Required | Description |
|
|
32
|
+
|----------|------|----------|-------------|
|
|
33
|
+
| `guid` | `string` | Yes | Inherited from base type |
|
|
34
|
+
| `lods` | `Array<TextureLOD>` | Yes | Array of texture LOD levels with dimensions |
|
|
35
|
+
|
|
36
|
+
**TextureLOD Properties:**
|
|
37
|
+
| Property | Type | Required | Description |
|
|
38
|
+
|----------|------|----------|-------------|
|
|
39
|
+
| `path` | `string` | Yes | Relative path to the texture LOD file |
|
|
40
|
+
| `hash` | `string` | No | Optional hash for file verification |
|
|
41
|
+
| `width` | `number` | Yes | Texture width in pixels |
|
|
42
|
+
| `height` | `number` | Yes | Texture height in pixels |
|
|
43
|
+
|
|
44
|
+
### NEEDLE_ext_progressive_mesh
|
|
45
|
+
|
|
46
|
+
Mesh extension for progressive mesh loading, inheriting from `NEEDLE_progressive_ext`.
|
|
47
|
+
|
|
48
|
+
| Property | Type | Required | Description |
|
|
49
|
+
|----------|------|----------|-------------|
|
|
50
|
+
| `guid` | `string` | Yes | Inherited from base type |
|
|
51
|
+
| `lods` | `Array<MeshLOD>` | Yes | Array of mesh LOD levels with geometry data |
|
|
52
|
+
|
|
53
|
+
**MeshLOD Properties:**
|
|
54
|
+
| Property | Type | Required | Description |
|
|
55
|
+
|----------|------|----------|-------------|
|
|
56
|
+
| `path` | `string` | Yes | Relative path to the mesh LOD file |
|
|
57
|
+
| `hash` | `string` | No | Optional hash for file verification |
|
|
58
|
+
| `densities` | `number[]` | Yes | Density values per primitive |
|
|
59
|
+
| `indexCount` | `number` | No | Number of indices in LOD0 |
|
|
60
|
+
| `vertexCount` | `number` | No | Number of vertices in LOD0 |
|
|
61
|
+
|
|
62
|
+
## Usage Examples
|
|
63
|
+
|
|
64
|
+
### Texture Extension Example
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"guid": "texture-asset-123",
|
|
69
|
+
"lods": [
|
|
70
|
+
{
|
|
71
|
+
"path": "./textures/image_diffuse_1024.glb",
|
|
72
|
+
"hash": "abc123",
|
|
73
|
+
"width": 1024,
|
|
74
|
+
"height": 1024
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"path": "./textures/image_diffuse_512.glb",
|
|
78
|
+
"width": 512,
|
|
79
|
+
"height": 512
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Mesh Extension Example
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"guid": "mesh-asset-456",
|
|
90
|
+
"lods": [
|
|
91
|
+
{
|
|
92
|
+
"path": "./meshes/mesh_0_high_detail.glb",
|
|
93
|
+
"hash": "def456",
|
|
94
|
+
"indexCount": 15000,
|
|
95
|
+
"vertexCount": 8000,
|
|
96
|
+
"densities": [100000, 50000]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "./meshes/mesh_1_low_detail.glb",
|
|
100
|
+
"indexCount": 3000,
|
|
101
|
+
"vertexCount": 1500,
|
|
102
|
+
"densities": [100000, 50000]
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-progressive",
|
|
3
|
-
"version": "3.3.3
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "three.js support for loading glTF or GLB files that contain progressive loading data",
|
|
5
5
|
"homepage": "https://needle.tools",
|
|
6
6
|
"author": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/needle-tools/
|
|
13
|
+
"url": "git+https://github.com/needle-tools/gltf-progressive"
|
|
14
14
|
},
|
|
15
15
|
"readme": "README.md",
|
|
16
16
|
"keywords": [
|
|
@@ -73,4 +73,4 @@
|
|
|
73
73
|
"vite": "7"
|
|
74
74
|
},
|
|
75
75
|
"types": "./lib/index.d.ts"
|
|
76
|
-
}
|
|
76
|
+
}
|