@series-inc/rundot-3d-engine 0.6.13 → 0.6.15
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/{chunk-QESAUQPW.js → chunk-5YJZ36HT.js} +55 -1
- package/dist/chunk-5YJZ36HT.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +65 -3
- package/dist/index.js.map +1 -1
- package/dist/systems/index.d.ts +33 -2
- package/dist/systems/index.js +17 -4
- package/dist/systems/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-QESAUQPW.js.map +0 -1
package/dist/systems/index.d.ts
CHANGED
|
@@ -322,7 +322,9 @@ declare class MeshColliderComponent extends Component {
|
|
|
322
322
|
private readonly isSensor?;
|
|
323
323
|
private readonly enableCollisionEvents?;
|
|
324
324
|
private readonly excludeChildren;
|
|
325
|
-
|
|
325
|
+
/** When set, compute collider only from this named group in the mesh. */
|
|
326
|
+
private readonly subMeshName;
|
|
327
|
+
constructor(meshName: string | null, colliderType?: MeshColliderType, bodyType?: RigidBodyType, isSensor?: boolean, enableCollisionEvents?: boolean, excludeChildren?: boolean, subMeshName?: string);
|
|
326
328
|
/** Iterate meshes, optionally only direct children */
|
|
327
329
|
private static forEachMesh;
|
|
328
330
|
/**
|
|
@@ -338,6 +340,8 @@ declare class MeshColliderComponent extends Component {
|
|
|
338
340
|
*/
|
|
339
341
|
private static computeBounds;
|
|
340
342
|
protected onCreate(): void;
|
|
343
|
+
/** Depth-first search for a named Group. */
|
|
344
|
+
private static findGroupByName;
|
|
341
345
|
private createCollider;
|
|
342
346
|
protected onCleanup(): void;
|
|
343
347
|
getRigidBody(): RigidBodyComponentThree | null;
|
|
@@ -3263,6 +3267,26 @@ interface StowKitLoadConfig {
|
|
|
3263
3267
|
onTimingStart?: (label: string) => void;
|
|
3264
3268
|
onTimingEnd?: (label: string) => void;
|
|
3265
3269
|
}
|
|
3270
|
+
interface PreloadAllOptions {
|
|
3271
|
+
meshes?: string[];
|
|
3272
|
+
skinnedMeshes?: {
|
|
3273
|
+
names: string[];
|
|
3274
|
+
scale?: number;
|
|
3275
|
+
};
|
|
3276
|
+
textures?: string[];
|
|
3277
|
+
audio?: string[];
|
|
3278
|
+
animations?: {
|
|
3279
|
+
name: string;
|
|
3280
|
+
meshName: string;
|
|
3281
|
+
}[];
|
|
3282
|
+
}
|
|
3283
|
+
interface PreloadAllResult {
|
|
3284
|
+
meshes: Map<string, THREE.Group>;
|
|
3285
|
+
skinnedMeshes: Map<string, THREE.Group>;
|
|
3286
|
+
textures: Map<string, THREE.Texture>;
|
|
3287
|
+
audio: Map<string, THREE.Audio>;
|
|
3288
|
+
animations: Map<string, THREE.AnimationClip>;
|
|
3289
|
+
}
|
|
3266
3290
|
/**
|
|
3267
3291
|
* StowKitSystem - Simple asset loading from build.json.
|
|
3268
3292
|
*
|
|
@@ -3347,6 +3371,13 @@ declare class StowKitSystem {
|
|
|
3347
3371
|
* Decoded audio is cached in IndexedDB — subsequent loads are near-instant.
|
|
3348
3372
|
*/
|
|
3349
3373
|
preloadAudio(audioNames: string[]): Promise<Map<string, THREE.Audio>>;
|
|
3374
|
+
/**
|
|
3375
|
+
* Preload multiple asset types concurrently.
|
|
3376
|
+
* All categories load in parallel via Promise.all, eliminating sequential blocking.
|
|
3377
|
+
*/
|
|
3378
|
+
preloadAll(options: PreloadAllOptions): Promise<PreloadAllResult>;
|
|
3379
|
+
private preloadTexturesInternal;
|
|
3380
|
+
private preloadAnimationsInternal;
|
|
3350
3381
|
/**
|
|
3351
3382
|
* Get a loaded pack by alias.
|
|
3352
3383
|
*/
|
|
@@ -3448,4 +3479,4 @@ declare class StowKitSystem {
|
|
|
3448
3479
|
dispose(): void;
|
|
3449
3480
|
}
|
|
3450
3481
|
|
|
3451
|
-
export { type AABB, type ActiveTransition, AmbientLightComponent, AnimationConsoleFilter, AnimationControllerComponent, AnimationCullingManager, type AnimationCurve, AnimationEvent, AnimationGraphComponent, AnimationLibrary, AnimationLibraryComponent, AnimationPerformance, AnimationVisualizerComponent, Animatrix, AnimatrixVisualizer, Audio2D, type AudioBank2D, type AudioBank3D, type AudioClip2DConfig, type AudioClip3DConfig, AudioSystem, type AudioSystemInstance, type BlendTreeConfig, BlendType, BoxColliderComponent, type BurstConfig, CharacterAnimationController, type ClipInfo, ComparisonOperator, ComponentJSON, CrossfadeToMusic, type CurveKeyframe, CurvePresets, type CurveableValue, DEFAULT_KEY_BINDINGS, DebugPanelThree, DirectionalLightComponent, DynamicNavSystem, Easing, type EmissionConfig, type EmitterAssets, type EmitterConfig, EmitterShape, type EmitterShapeKey, type FlipConfig, type Footprint, GetMasterVolume, GetMusicSystemState, Input, InputAction, InputManager, IsAudioMuted, IsMusicReady, Main2DAudioBank, Main3DAudioBank, MaterialUtils, MathUtil, MeshColliderComponent, MusicBank, type MusicBankType, MusicSystem, type MusicSystemState, NavAgent, NavigationGrid, type NoiseConfig, type NumRange, type Parameter, ParameterType, Particle, type ParticleSystem, ParticleSystemPrefabComponent, PathVisualizationThree, type PathfindingResult, PauseMusic, PhysicsSystem, PlayAudioOneShot2D, PlayAudioOneShot3D, PlayAudioRandom2D, PlayMusic, PopulateAudioBank2D, PopulateAudioBank3D, PopulateMusicBank, Prefab, PrefabCollection, PrefabCollectionJSON, PrefabComponent, PrefabComponentConstructor, PrefabInstance, type PrefabInstantiateOptions, PrefabJSON, PrefabLoader, PrefabNode, RandomAudio2D, type RenderMode, RenderingDebugger, ResumeMusic, RigidBodyComponentThree, RigidBodyType, SecondOrderDynamics, SecondOrderDynamics1D, SetAudioMuted, SetMasterVolume, SetMusicVolume, SharedAnimationManager, SphereColliderComponent, type SplineConfigThree, type SplineDebugConfig, SplineDebugManager, type SplineDebugOptionsThree, SplineDebugRendererThree, type SplinePointThree, type SplineSegmentThree, SplineThree, SplineTypeThree, StartMusicWithAutoplayHandling, StartPlaylist, StartPlaylistWithAutoplayHandling, StopMusic, StopPlaylist, type StowKitLoadConfig, StowKitSystem, ToggleMusic, type TransitionCondition, type TransitionConfig$1 as TransitionConfig, Tween, TweenSystem, type UIElement, UILoadingScreen, type UIProgressBar, UISystem, UIUtils, type UIWorldElement, type Waypoint, addKeyframe, cloneCurve, createCurveFromPoints, createKeyframe, createParticleEmitter, evaluateCurve, evaluateCurveableValue, range, removeKeyframe, updateKeyframe };
|
|
3482
|
+
export { type AABB, type ActiveTransition, AmbientLightComponent, AnimationConsoleFilter, AnimationControllerComponent, AnimationCullingManager, type AnimationCurve, AnimationEvent, AnimationGraphComponent, AnimationLibrary, AnimationLibraryComponent, AnimationPerformance, AnimationVisualizerComponent, Animatrix, AnimatrixVisualizer, Audio2D, type AudioBank2D, type AudioBank3D, type AudioClip2DConfig, type AudioClip3DConfig, AudioSystem, type AudioSystemInstance, type BlendTreeConfig, BlendType, BoxColliderComponent, type BurstConfig, CharacterAnimationController, type ClipInfo, ComparisonOperator, ComponentJSON, CrossfadeToMusic, type CurveKeyframe, CurvePresets, type CurveableValue, DEFAULT_KEY_BINDINGS, DebugPanelThree, DirectionalLightComponent, DynamicNavSystem, Easing, type EmissionConfig, type EmitterAssets, type EmitterConfig, EmitterShape, type EmitterShapeKey, type FlipConfig, type Footprint, GetMasterVolume, GetMusicSystemState, Input, InputAction, InputManager, IsAudioMuted, IsMusicReady, Main2DAudioBank, Main3DAudioBank, MaterialUtils, MathUtil, MeshColliderComponent, MusicBank, type MusicBankType, MusicSystem, type MusicSystemState, NavAgent, NavigationGrid, type NoiseConfig, type NumRange, type Parameter, ParameterType, Particle, type ParticleSystem, ParticleSystemPrefabComponent, PathVisualizationThree, type PathfindingResult, PauseMusic, PhysicsSystem, PlayAudioOneShot2D, PlayAudioOneShot3D, PlayAudioRandom2D, PlayMusic, PopulateAudioBank2D, PopulateAudioBank3D, PopulateMusicBank, Prefab, PrefabCollection, PrefabCollectionJSON, PrefabComponent, PrefabComponentConstructor, PrefabInstance, type PrefabInstantiateOptions, PrefabJSON, PrefabLoader, PrefabNode, type PreloadAllOptions, type PreloadAllResult, RandomAudio2D, type RenderMode, RenderingDebugger, ResumeMusic, RigidBodyComponentThree, RigidBodyType, SecondOrderDynamics, SecondOrderDynamics1D, SetAudioMuted, SetMasterVolume, SetMusicVolume, SharedAnimationManager, SphereColliderComponent, type SplineConfigThree, type SplineDebugConfig, SplineDebugManager, type SplineDebugOptionsThree, SplineDebugRendererThree, type SplinePointThree, type SplineSegmentThree, SplineThree, SplineTypeThree, StartMusicWithAutoplayHandling, StartPlaylist, StartPlaylistWithAutoplayHandling, StopMusic, StopPlaylist, type StowKitLoadConfig, StowKitSystem, ToggleMusic, type TransitionCondition, type TransitionConfig$1 as TransitionConfig, Tween, TweenSystem, type UIElement, UILoadingScreen, type UIProgressBar, UISystem, UIUtils, type UIWorldElement, type Waypoint, addKeyframe, cloneCurve, createCurveFromPoints, createKeyframe, createParticleEmitter, evaluateCurve, evaluateCurveableValue, range, removeKeyframe, updateKeyframe };
|
package/dist/systems/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
VenusGame,
|
|
59
59
|
createCollisionGroup,
|
|
60
60
|
isTransformComponent
|
|
61
|
-
} from "../chunk-
|
|
61
|
+
} from "../chunk-5YJZ36HT.js";
|
|
62
62
|
import {
|
|
63
63
|
__decorateClass,
|
|
64
64
|
__publicField
|
|
@@ -176,7 +176,7 @@ var MeshColliderComponent = class extends Component {
|
|
|
176
176
|
console.warn("MeshColliderComponent requires a stow_mesh component on the same node");
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
|
-
return new MeshColliderComponent(stowMeshComponent.mesh.assetId, colliderType, bodyType, isSensor, enableCollisionEvents, excludeChildren);
|
|
179
|
+
return new MeshColliderComponent(stowMeshComponent.mesh.assetId, colliderType, bodyType, isSensor, enableCollisionEvents, excludeChildren, stowMeshComponent.subMesh);
|
|
180
180
|
}
|
|
181
181
|
rigidBody = null;
|
|
182
182
|
meshName;
|
|
@@ -185,7 +185,9 @@ var MeshColliderComponent = class extends Component {
|
|
|
185
185
|
isSensor;
|
|
186
186
|
enableCollisionEvents;
|
|
187
187
|
excludeChildren;
|
|
188
|
-
|
|
188
|
+
/** When set, compute collider only from this named group in the mesh. */
|
|
189
|
+
subMeshName;
|
|
190
|
+
constructor(meshName, colliderType = "bounding_box", bodyType = "static" /* STATIC */, isSensor, enableCollisionEvents, excludeChildren = false, subMeshName) {
|
|
189
191
|
super();
|
|
190
192
|
this.meshName = meshName;
|
|
191
193
|
this.colliderType = colliderType;
|
|
@@ -193,6 +195,7 @@ var MeshColliderComponent = class extends Component {
|
|
|
193
195
|
this.isSensor = isSensor;
|
|
194
196
|
this.enableCollisionEvents = enableCollisionEvents;
|
|
195
197
|
this.excludeChildren = excludeChildren;
|
|
198
|
+
this.subMeshName = subMeshName;
|
|
196
199
|
}
|
|
197
200
|
/** Iterate meshes, optionally only direct children */
|
|
198
201
|
static forEachMesh(root, excludeChildren, fn) {
|
|
@@ -266,12 +269,22 @@ var MeshColliderComponent = class extends Component {
|
|
|
266
269
|
const stowkit = StowKitSystem.getInstance();
|
|
267
270
|
stowkit.getMesh(this.meshName).then((meshGroup) => {
|
|
268
271
|
if (!this.isAttached()) return;
|
|
269
|
-
this.
|
|
272
|
+
const target = this.subMeshName ? MeshColliderComponent.findGroupByName(meshGroup, this.subMeshName) ?? meshGroup : meshGroup;
|
|
273
|
+
this.createCollider(target);
|
|
270
274
|
});
|
|
271
275
|
} else {
|
|
272
276
|
this.createCollider(this.gameObject);
|
|
273
277
|
}
|
|
274
278
|
}
|
|
279
|
+
/** Depth-first search for a named Group. */
|
|
280
|
+
static findGroupByName(root, name) {
|
|
281
|
+
for (const child of root.children) {
|
|
282
|
+
if (child.type === "Group" && child.name === name) return child;
|
|
283
|
+
const found = MeshColliderComponent.findGroupByName(child, name);
|
|
284
|
+
if (found) return found;
|
|
285
|
+
}
|
|
286
|
+
return null;
|
|
287
|
+
}
|
|
275
288
|
createCollider(meshRoot) {
|
|
276
289
|
const scale = this.gameObject.scale.clone();
|
|
277
290
|
if (this.colliderType === "convex_hull") {
|