reze-engine 0.8.4 → 0.9.1
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/README.md +91 -21
- package/dist/camera.d.ts +2 -0
- package/dist/camera.d.ts.map +1 -1
- package/dist/camera.js +14 -7
- package/dist/engine.d.ts +30 -15
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +319 -422
- package/dist/model.d.ts +0 -3
- package/dist/model.d.ts.map +1 -1
- package/dist/pmx-loader.d.ts.map +1 -1
- package/dist/pmx-loader.js +2 -19
- package/package.json +2 -2
- package/src/camera.ts +15 -7
- package/src/engine.ts +365 -463
- package/src/model.ts +0 -3
- package/src/pmx-loader.ts +2 -23
package/src/model.ts
CHANGED
|
@@ -36,9 +36,6 @@ export interface Material {
|
|
|
36
36
|
edgeColor: [number, number, number, number]
|
|
37
37
|
edgeSize: number
|
|
38
38
|
vertexCount: number
|
|
39
|
-
isEye?: boolean // New: marks eye materials
|
|
40
|
-
isFace?: boolean // New: marks face/skin materials
|
|
41
|
-
isHair?: boolean // New: marks hair materials
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
export interface Bone {
|
package/src/pmx-loader.ts
CHANGED
|
@@ -261,8 +261,8 @@ export class PmxLoader {
|
|
|
261
261
|
this.getFloat32(),
|
|
262
262
|
this.getFloat32(),
|
|
263
263
|
]
|
|
264
|
-
// edgeSize float
|
|
265
|
-
const edgeSize = this.getFloat32()
|
|
264
|
+
// edgeSize float (outline width in PMX units; engine scales by camera distance for stable screen thickness)
|
|
265
|
+
const edgeSize = this.getFloat32()
|
|
266
266
|
|
|
267
267
|
const textureIndex = this.getNonVertexIndex(this.textureIndexSize)
|
|
268
268
|
const sphereTextureIndex = this.getNonVertexIndex(this.textureIndexSize)
|
|
@@ -294,27 +294,6 @@ export class PmxLoader {
|
|
|
294
294
|
vertexCount,
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
// Classify materials based on name
|
|
298
|
-
const materialName = name.toLowerCase()
|
|
299
|
-
|
|
300
|
-
// Classify eye materials
|
|
301
|
-
mat.isEye =
|
|
302
|
-
materialName.includes("目") || // Japanese "eye"
|
|
303
|
-
materialName.includes("瞳") || // Japanese "pupil"
|
|
304
|
-
materialName.includes("eye") ||
|
|
305
|
-
materialName.includes("pupil") ||
|
|
306
|
-
materialName.includes("iris") ||
|
|
307
|
-
materialName.includes("目白") ||
|
|
308
|
-
materialName.includes("眼") ||
|
|
309
|
-
materialName.includes("睛") ||
|
|
310
|
-
materialName.includes("眉")
|
|
311
|
-
|
|
312
|
-
// Classify face materials
|
|
313
|
-
mat.isFace = materialName.includes("face") || materialName.includes("脸")
|
|
314
|
-
|
|
315
|
-
// Classify hair materials
|
|
316
|
-
mat.isHair = materialName.includes("hair_f") || materialName.includes("头发")
|
|
317
|
-
|
|
318
297
|
this.materials.push(mat)
|
|
319
298
|
}
|
|
320
299
|
} catch (error) {
|