reze-engine 0.54.16 → 0.55.0
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/dist/engine.d.ts +210 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +1063 -11
- package/dist/graph/presets/pool_floor.d.ts +3 -0
- package/dist/graph/presets/pool_floor.d.ts.map +1 -0
- package/dist/graph/presets/pool_floor.js +42 -0
- package/dist/graph/presets/water.d.ts +3 -0
- package/dist/graph/presets/water.d.ts.map +1 -0
- package/dist/graph/presets/water.js +31 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -0
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js +10 -0
- package/dist/overlay.d.ts +200 -0
- package/dist/overlay.d.ts.map +1 -0
- package/dist/overlay.js +806 -0
- package/dist/physics/autofit.d.ts +147 -0
- package/dist/physics/autofit.d.ts.map +1 -0
- package/dist/physics/autofit.js +501 -0
- package/dist/pmx-document.d.ts +218 -0
- package/dist/pmx-document.d.ts.map +1 -0
- package/dist/pmx-document.js +685 -0
- package/dist/shaders/passes/field-blit.d.ts +26 -0
- package/dist/shaders/passes/field-blit.d.ts.map +1 -0
- package/dist/shaders/passes/field-blit.js +65 -0
- package/dist/shaders/passes/ground-noise.d.ts +7 -0
- package/dist/shaders/passes/ground-noise.d.ts.map +1 -0
- package/dist/shaders/passes/ground-noise.js +88 -0
- package/dist/shaders/passes/overlay.d.ts +3 -0
- package/dist/shaders/passes/overlay.d.ts.map +1 -0
- package/dist/shaders/passes/overlay.js +164 -0
- package/dist/shaders/passes/sim.d.ts +34 -0
- package/dist/shaders/passes/sim.d.ts.map +1 -0
- package/dist/shaders/passes/sim.js +169 -0
- package/dist/shaders/passes/wireframe.d.ts +2 -0
- package/dist/shaders/passes/wireframe.d.ts.map +1 -0
- package/dist/shaders/passes/wireframe.js +107 -0
- package/dist/shaders/score-api.d.ts +10 -0
- package/dist/shaders/score-api.d.ts.map +1 -0
- package/dist/shaders/score-api.js +114 -0
- package/package.json +1 -1
- package/src/engine.ts +1147 -13
- package/src/index.ts +50 -0
- package/src/model.ts +9 -0
- package/src/overlay.ts +1000 -0
- package/src/pmx-document.ts +882 -0
- package/src/shaders/passes/overlay.ts +166 -0
- package/src/shaders/passes/wireframe.ts +108 -0
package/src/index.ts
CHANGED
|
@@ -130,6 +130,56 @@ export {
|
|
|
130
130
|
export { VMDLoader, DEFAULT_CAMERA_INTERPOLATION, type CameraKeyframe, type IkFrame } from "./vmd-loader"
|
|
131
131
|
export { VMDWriter, type VmdTrackSelection } from "./vmd-writer"
|
|
132
132
|
export { PmxLoader } from "./pmx-loader"
|
|
133
|
+
// The PMX file as data, losslessly — separate from Model, which drops everything
|
|
134
|
+
// it does not draw. An editor writes from this; a viewer never touches it.
|
|
135
|
+
export {
|
|
136
|
+
readPmxDocument,
|
|
137
|
+
writePmxDocument,
|
|
138
|
+
type PmxDocument,
|
|
139
|
+
type PmxGlobals,
|
|
140
|
+
type PmxEncoding,
|
|
141
|
+
type PmxVertex,
|
|
142
|
+
type PmxWeightType,
|
|
143
|
+
type PmxMaterial,
|
|
144
|
+
type PmxBone,
|
|
145
|
+
type PmxIkLink,
|
|
146
|
+
type PmxMorph,
|
|
147
|
+
type PmxMorphOffset,
|
|
148
|
+
type PmxDisplayFrame,
|
|
149
|
+
type PmxRigidbody,
|
|
150
|
+
type PmxJoint,
|
|
151
|
+
} from "./pmx-document"
|
|
133
152
|
export { CameraAnimation, type CameraPose } from "./camera-animation"
|
|
134
153
|
export { RezePhysics } from "./physics"
|
|
135
154
|
export type { WindOptions } from "./physics/world"
|
|
155
|
+
export { RigidbodyShape, RigidbodyType, type Rigidbody, type Joint } from "./physics/types"
|
|
156
|
+
// Editor overlays. The three builders are pure and exported alongside the
|
|
157
|
+
// engine methods that call them, so a host can produce the same list itself —
|
|
158
|
+
// to show it as data, diff two poses, or hit-test it on the CPU.
|
|
159
|
+
export {
|
|
160
|
+
boneOverlay,
|
|
161
|
+
boneMarkerPositions,
|
|
162
|
+
rigidbodyOverlay,
|
|
163
|
+
jointOverlay,
|
|
164
|
+
buildOverlayShapes,
|
|
165
|
+
lineBetween,
|
|
166
|
+
writeOverlayInstance,
|
|
167
|
+
OVERLAY_SHAPES,
|
|
168
|
+
OVERLAY_INSTANCE_FLOATS,
|
|
169
|
+
OVERLAY_VERTEX_FLOATS,
|
|
170
|
+
DEFAULT_BONE_PALETTE,
|
|
171
|
+
DEFAULT_RIGIDBODY_PALETTE,
|
|
172
|
+
DEFAULT_JOINT_PALETTE,
|
|
173
|
+
DEFAULT_VERTEX_COLOR,
|
|
174
|
+
OVERLAY_STYLE,
|
|
175
|
+
type OverlayPrimitive,
|
|
176
|
+
type OverlayShape,
|
|
177
|
+
type OverlayGeometry,
|
|
178
|
+
type BoneOverlayOptions,
|
|
179
|
+
type BoneClass,
|
|
180
|
+
type RigidbodyOverlayOptions,
|
|
181
|
+
type RigidbodyClass,
|
|
182
|
+
type JointOverlayOptions,
|
|
183
|
+
type RGBA,
|
|
184
|
+
type Vec3Tuple,
|
|
185
|
+
} from "./overlay"
|
package/src/model.ts
CHANGED
|
@@ -607,6 +607,15 @@ export class Model {
|
|
|
607
607
|
}
|
|
608
608
|
this.deformOrder = order
|
|
609
609
|
|
|
610
|
+
// The loader leaves `children` empty and says the skeleton build fills it.
|
|
611
|
+
// Nothing did, so every bone read as a leaf — which is what a bone overlay
|
|
612
|
+
// asks first, and why one drew 147 disconnected stubs instead of a rig.
|
|
613
|
+
for (let i = 0; i < n; i++) bones[i].children.length = 0
|
|
614
|
+
for (let i = 0; i < n; i++) {
|
|
615
|
+
const p = bones[i].parentIndex
|
|
616
|
+
if (p >= 0 && p < n) bones[p].children.push(i)
|
|
617
|
+
}
|
|
618
|
+
|
|
610
619
|
// Accumulate bind-pose world positions in the same parent-before-child order and
|
|
611
620
|
// with the same add order as the old recursive computeBindPoseWorldPosition, so the
|
|
612
621
|
// downstream arithmetic stays bit-identical.
|