@pinkaphant/kolmo 0.0.0-stage → 0.1.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 +44 -2
- package/bin/kolmo.mjs +150 -0
- package/dist/engine/index.d.ts +8 -0
- package/dist/engine/index.js +3 -0
- package/dist/engine/kolmoActor.d.ts +6 -0
- package/dist/engine/kolmoIsland.d.ts +17 -0
- package/dist/engine/kolmoLongDrive.d.ts +13 -0
- package/dist/engine/kolmoRigs.d.ts +13 -0
- package/dist/engine/kolmoStore.d.ts +74 -0
- package/dist/engine/kolmoSurface.d.ts +18 -0
- package/dist/engine/kolmoVehicle.d.ts +32 -0
- package/dist/engine/kolmoWorld.d.ts +51 -0
- package/dist/engine/longDriveKit.d.ts +19 -0
- package/dist/engine/mainlandMacroCell.d.ts +19 -0
- package/dist/engine-BeKvBM8d.js +1745 -0
- package/dist/importer/ChopShopPanel.d.ts +44 -0
- package/dist/importer/DomainWorkshopPanel.d.ts +17 -0
- package/dist/importer/GateHudBar.d.ts +29 -0
- package/dist/importer/GlbImportGate.d.ts +7 -0
- package/dist/importer/ImperativeVehicleRig.d.ts +9 -0
- package/dist/importer/ImporterPlinthUikitTags.d.ts +19 -0
- package/dist/importer/Step1CalibrationPlinth.d.ts +38 -0
- package/dist/importer/Step2UniversalPad.d.ts +18 -0
- package/dist/importer/VfxEmitterPool.d.ts +8 -0
- package/dist/importer/chopShopActions.d.ts +44 -0
- package/dist/importer/gateStore.d.ts +73 -0
- package/dist/importer/glbNormalizer.d.ts +22 -0
- package/dist/importer/importerWebMcp.d.ts +37 -0
- package/dist/importer/index.d.ts +17 -0
- package/dist/importer/index.js +3 -0
- package/dist/importer/khrCompiler.d.ts +23 -0
- package/dist/importer/launcherBake.d.ts +15 -0
- package/dist/importer/meshIslands.d.ts +59 -0
- package/dist/importer/surfaceCutter.d.ts +27 -0
- package/dist/importer/surfaceTopology.d.ts +40 -0
- package/dist/importer/universalGateBake.d.ts +41 -0
- package/dist/importer/usdToGlb.d.ts +11 -0
- package/dist/importer/useChopShopController.d.ts +94 -0
- package/dist/importer/vehiclePanelAnim.d.ts +25 -0
- package/dist/importer/wheelAxlePairing.d.ts +19 -0
- package/dist/importer-D9bdcGTh.js +5113 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +14 -0
- package/dist/junk/DestructibleTarget.d.ts +18 -0
- package/dist/junk/KolmoJunk.d.ts +14 -0
- package/dist/junk/ShardPieces.d.ts +10 -0
- package/dist/junk/TargetDecals.d.ts +18 -0
- package/dist/junk/bvhShatter.d.ts +7 -0
- package/dist/junk/bvhTriCollector.d.ts +20 -0
- package/dist/junk/index.d.ts +12 -0
- package/dist/junk/index.js +1 -0
- package/dist/junk/junkGeometry.d.ts +34 -0
- package/dist/junk/junkImportSanitize.d.ts +6 -0
- package/dist/junk/junkImporter.d.ts +25 -0
- package/dist/junk/junkLabelCanvas.d.ts +7 -0
- package/dist/junk/junkLabels.d.ts +31 -0
- package/dist/junk/junkTypes.d.ts +48 -0
- package/dist/junk/targetHelpers.d.ts +56 -0
- package/dist/junk/targetHitLogic.d.ts +30 -0
- package/dist/junk/useTargetAssets.d.ts +24 -0
- package/dist/junk-B4bC1zAl.js +1049 -0
- package/dist/kolmoSurface-DTnrFXH0.js +558 -0
- package/dist/schema/kolmoSchema.d.ts +69 -0
- package/dist/shaders/celestialBackdrop.d.ts +22 -0
- package/dist/shaders/index.d.ts +6 -0
- package/dist/shaders/index.js +1 -0
- package/dist/shaders/plumeAndSparkle.d.ts +14 -0
- package/dist/shaders/ps2GlslShared.d.ts +20 -0
- package/dist/shaders/ps2MaterialsTSL.d.ts +23 -0
- package/dist/shaders/ps2MaterialsWebGL.d.ts +15 -0
- package/dist/shaders/ps2RoadWebGL.d.ts +7 -0
- package/dist/shaders/ps2TerrainWebGL.d.ts +8 -0
- package/dist/shaders/ps2Textures.d.ts +22 -0
- package/dist/shaders/retroPalettes.d.ts +24 -0
- package/dist/shaders/retroShader.d.ts +69 -0
- package/dist/shaders-GS71Ek1A.js +1383 -0
- package/dist/world/frontage.d.ts +26 -0
- package/dist/world/index.d.ts +9 -0
- package/dist/world/index.js +3 -0
- package/dist/world/infiniteWorld2D.d.ts +24 -0
- package/dist/world/island.d.ts +29 -0
- package/dist/world/macroCellSchema.d.ts +72 -0
- package/dist/world/macroKnightAStar.d.ts +11 -0
- package/dist/world/random.d.ts +23 -0
- package/dist/world/road.d.ts +37 -0
- package/dist/world/roadRibbon.d.ts +44 -0
- package/dist/world/terrain.d.ts +62 -0
- package/dist/world/worldTypes.d.ts +39 -0
- package/dist/world-PRWPYrlx.js +947 -0
- package/dist/worldTypes-Z0KfdCd0.js +226 -0
- package/package.json +105 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./engine/index.js";
|
|
2
|
+
export { KolmoCanvas as Canvas, KolmoWorld as World, KolmoVehicle as Vehicle, KolmoActor as Actor, KolmoSurface as Surface, KolmoProp as Prop, KolmoIsland as Island, KolmoLongDrive as LongDrive, } from "./engine/index.js";
|
|
3
|
+
export * from "./shaders/index.js";
|
|
4
|
+
export { KolmoSkybox as Skybox, KolmoExoplanet as Exoplanet, KolmoEmitterRig as EmitterRig, } from "./shaders/index.js";
|
|
5
|
+
export * from "./schema/kolmoSchema.js";
|
|
6
|
+
export * from "./world/index.js";
|
|
7
|
+
export * from "./importer/index.js";
|
|
8
|
+
export * from "./junk/index.js";
|
|
9
|
+
export { KolmoJunk as Junk } from "./junk/index.js";
|
|
10
|
+
export type { KhrAssetBundle } from "@khr3/core";
|
|
11
|
+
export { DEFAULT_VAULT_URL, KOLMO_ASSETS_URL, VAULT_CARS, VAULT_CATALOG, VAULT_CITY, VAULT_WEAPONS, createAssetVault, inspectGlbBuffer, normalizeGlbBuffer, vaultAssetUrl, } from "@khr3/assets";
|
|
12
|
+
export { DOOR_HINGE_SPEC, Ex, ROOT3, buildFootprint, canPlace, instanceBatches, latticePose, planSettlement, poseEq, poseFromJSON, poseToFloat, poseToJSON, snapPose, socketFor, triangleCorners, vToFloat, worldSockets, } from "@khr3/c12";
|
|
13
|
+
export { COUPE_2DOOR, FLEET, SEDAN_4DOOR, VEHICLE_DOMAINS, VEHICLE_DOMAIN_SPECS, carUrl, findCar, fleetByDomain, planCar, } from "@khr3/vehicles";
|
|
14
|
+
export { CARBINE_556, LAUNCHER_RECIPES, PISTOL_9MM, SHOTGUN_12G, attachModule, createLauncherState, detachModule, findLauncherRecipe, planLauncher, stepLauncher, } from "@khr3/launchers";
|
|
15
|
+
export { BODY_MOVE_TUNE, BODY_SI, BODY_SOCKET_IDS, bodyEyeOffsetY, bodyRestCenterY, bodySpawnPosition, bodyStandingHeight, stepCameraSync, withExcludeCharacterRay, type BodySiConstants, type BodySocketId, } from "@khr3/body";
|
|
16
|
+
export { HeldItem, KhrBody, type HeldItemHandle, type HeldItemProps, type KhrBodyHandle, type KhrBodyProps, } from "@khr3/body/react";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { C as ee, D as te, E as e, S as t, T as n, _ as ne, a as r, b as i, c as a, d as o, f as re, g as ie, h as ae, i as oe, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, v as g, w as _, x as v, y } from "./engine-BeKvBM8d.js";
|
|
2
|
+
import { a as b, c as x, d as S, f as C, i as w, l as T, n as E, o as D, r as O, s as k, t as A, u as j } from "./worldTypes-Z0KfdCd0.js";
|
|
3
|
+
import { a as M, c as N, d as P, i as F, l as I, n as L, o as R, r as z, s as B, t as V, u as H } from "./kolmoSurface-DTnrFXH0.js";
|
|
4
|
+
import { A as U, B as W, C as G, D as K, E as q, F as se, I as ce, L as le, M as ue, N as de, O as fe, P as pe, R as me, S as he, T as ge, V as _e, _ as ve, a as ye, b as be, c as xe, d as Se, f as J, g as Y, h as Ce, i as we, j as Te, k as Ee, l as De, m as Oe, n as ke, o as Ae, p as X, r as je, s as Me, t as Ne, u as Pe, v as Fe, w as Ie, x as Le, y as Re, z as ze } from "./shaders-GS71Ek1A.js";
|
|
5
|
+
import { $ as Be, A as Ve, B as He, C as Ue, D as We, E as Ge, F as Ke, G as qe, H as Je, I as Ye, J as Xe, K as Ze, L as Qe, M as $e, N as et, O as tt, P as nt, Q as rt, R as it, S as at, T as ot, U as st, V as ct, W as lt, X as ut, Y as dt, Z as ft, _ as pt, a as mt, b as ht, c as gt, d as _t, et as vt, f as yt, g as bt, h as xt, i as St, j as Ct, k as wt, l as Tt, m as Et, n as Dt, nt as Ot, o as kt, p as At, q as Z, r as jt, s as Mt, t as Q, tt as Nt, u as Pt, v as Ft, w as It, x as Lt, y as Rt, z as zt } from "./importer-D9bdcGTh.js";
|
|
6
|
+
import { _ as Bt, a as Vt, b as Ht, c as Ut, d as Wt, f as Gt, g as Kt, h as qt, i as Jt, l as Yt, m as Xt, n as Zt, o as Qt, p as $t, r as en, s as tn, t as nn, u as rn, v as an, y as on } from "./world-PRWPYrlx.js";
|
|
7
|
+
import { C as sn, S as cn, _ as ln, a as un, b as dn, c as fn, d as pn, f as mn, g as hn, h as gn, i as _n, l as vn, m as yn, n as bn, o as xn, p as Sn, r as Cn, s as wn, t as $, u as Tn, v as En, w as Dn, x as On, y as kn } from "./junk-B4bC1zAl.js";
|
|
8
|
+
import { DOOR_HINGE_SPEC as An, Ex as jn, ROOT3 as Mn, buildFootprint as Nn, canPlace as Pn, instanceBatches as Fn, latticePose as In, planSettlement as Ln, poseEq as Rn, poseFromJSON as zn, poseToFloat as Bn, poseToJSON as Vn, snapPose as Hn, socketFor as Un, triangleCorners as Wn, vToFloat as Gn, worldSockets as Kn } from "@khr3/c12";
|
|
9
|
+
import { BODY_MOVE_TUNE as qn, BODY_SI as Jn, BODY_SOCKET_IDS as Yn, bodyEyeOffsetY as Xn, bodyRestCenterY as Zn, bodySpawnPosition as Qn, bodyStandingHeight as $n, stepCameraSync as er, withExcludeCharacterRay as tr } from "@khr3/body";
|
|
10
|
+
import { DEFAULT_VAULT_URL as nr, KOLMO_ASSETS_URL as rr, VAULT_CARS as ir, VAULT_CATALOG as ar, VAULT_CITY as or, VAULT_WEAPONS as sr, createAssetVault as cr, inspectGlbBuffer as lr, normalizeGlbBuffer as ur, vaultAssetUrl as dr } from "@khr3/assets";
|
|
11
|
+
import { CARBINE_556 as fr, LAUNCHER_RECIPES as pr, PISTOL_9MM as mr, SHOTGUN_12G as hr, attachModule as gr, createLauncherState as _r, detachModule as vr, findLauncherRecipe as yr, planLauncher as br, stepLauncher as xr } from "@khr3/launchers";
|
|
12
|
+
import { COUPE_2DOOR as Sr, FLEET as Cr, SEDAN_4DOOR as wr, VEHICLE_DOMAINS as Tr, VEHICLE_DOMAIN_SPECS as Er, carUrl as Dr, findCar as Or, fleetByDomain as kr, planCar as Ar } from "@khr3/vehicles";
|
|
13
|
+
import { HeldItem as jr, KhrBody as Mr } from "@khr3/body/react";
|
|
14
|
+
export { De as ATMO_FRAG, Pe as ATMO_VERT, a as Actor, a as KolmoActor, c as ActorTrait, qn as BODY_MOVE_TUNE, Jn as BODY_SI, Yn as BODY_SOCKET_IDS, gn as BOTTLE_HEIGHT, Qt as C12TileKind, gt as C12_TICK_M, tn as C12_TILE_M, hn as CAN_LOD_THRESHOLD_M, fr as CARBINE_556, lt as CHOP_ROLES, Sr as COUPE_2DOOR, o as Canvas, o as KolmoCanvas, et as ChopShopPanel, It as DAMP_ZETA, nr as DEFAULT_VAULT_URL, An as DOOR_HINGE_SPEC, bn as DestructibleTarget, wt as DomainWorkshopPanel, Y as EmitterRig, Y as KolmoEmitterRig, jn as Ex, J as Exoplanet, J as KolmoExoplanet, Cr as FLEET, Ut as FLOATING_ORIGIN_STEP_M, ot as FREQ_HZ, ae as FloatingBodyTrait, Le as GLSL_BAYER_RGB555, he as GLSL_RETRO_QUANTIZE, Ue as GateHudBar, Q as GlbImportGate, Q as ImporterWorkbench, jr as HeldItem, Mt as ImperativeVehicleRig, Vt as InfiniteLongDrivePlanner, ie as InteractableTrait, r as Island, r as KolmoIsland, $ as Junk, $ as KolmoJunk, Se as KEY_SUN_DIRECTION, rr as KOLMO_ASSETS_URL, N as KOLMO_EXTENSION_NAME, h as KOLMO_KEY_MAP, Mr as KhrBody, re as KolmoGravityContext, m as KolmoLongDrive, m as LongDrive, V as KolmoProp, V as Prop, X as KolmoSkybox, X as Skybox, L as KolmoSurface, L as Surface, s as KolmoVehicle, s as Vehicle, d as KolmoWorld, d as World, pr as LAUNCHER_RECIPES, Yt as MACRO_SIZE_M, de as PALETTE_CRUNCHY_16, pe as PALETTE_CRUNCHY_64, ve as PARTICLE_FRAG, Fe as PARTICLE_VERT, mr as PISTOL_9MM, Re as PLUME_FRAG, be as PLUME_VERT, G as PS1_SNAP_RESOLUTION, ne as PilotLink, se as RETRO_COLOR_MODES, Ie as RETRO_PRESETS, ge as RETRO_UNIFORMS, Oe as RING_MOONLET_COUNT, Mn as ROOT3, n as RetroViewportSync, e as RoomEnvRig, wr as SEDAN_4DOOR, hr as SHOTGUN_12G, b as SHOULDER_K, Ae as SPLAT_LAYER, A as SeededSimplex2D, te as ShadowSnapRig, mn as ShardPieces, oe as ShiftedFixedBody, E as SplitMix32, Ft as Step1CalibrationPlinth, kt as Step2UniversalPad, rn as TILES_PER_MACRO, ln as TIN_CAN_HEIGHT, En as TIN_CAN_RADIUS, Tn as TargetDecals, Tt as UNIFIED_ANCHOR_NAMES, ir as VAULT_CARS, ar as VAULT_CATALOG, or as VAULT_CITY, sr as VAULT_WEAPONS, Tr as VEHICLE_DOMAINS, Er as VEHICLE_DOMAIN_SPECS, g as VehicleTrait, mt as VfxEmitterPool, y as WorldSessionTrait, q as applyPs1Material, ce as applyRetroFilteringToMaterial, K as applyRetroMaterial, le as applyRetroTextureFiltering, fe as applySceneRetroMaterials, un as applySegmentsToImportedRoot, gr as attachModule, Ct as bakeArticulatedLauncherGlb, Dt as bakeUniversalGateGlb, O as bakeWorldSplatMaps, Xn as bodyEyeOffsetY, Zn as bodyRestCenterY, Qn as bodySpawnPosition, $n as bodyStandingHeight, nn as buildCarvedTerrainGeometry, Gt as buildDodecagonalCivicHub, Nn as buildFootprint, kn as buildGlassBottleGeometry, Zt as buildHighwayAsphaltTexture, ht as buildImporterWebMcpTools, $e as buildLauncherSceneFromPlan, me as buildPaletteLutData, F as buildPatchPreviewEmitters, en as buildRoadRibbonGeometry, Ke as buildSelectionOverlayGeometry, qe as buildSurfaceTopology, dn as buildTinCanGeometry, Pn as canPlace, Dr as carUrl, x as childSeed, Bt as closedRoadFromPoints, yn as collectValidTris, nt as compileKhrAssetGlb, Pt as computeC12Metrics, M as computeChopPartHinge, u as computeIslandSpawnPose, l as computeLongDriveBridgeheadSpawn, f as computeLongDriveMainlandSpawn, ze as computeRetroDpr, jt as convertUsdToGlb, On as countGeometryTriangles, cr as createAssetVault, I as createDefaultSignals, Ye as createFleet12GonWheelGroup, cn as createGlassBottleMaterial, _r as createLauncherState, Ne as createPS2RoadMaterialTSL, ye as createPS2RoadMaterialWebGL, ke as createPS2TerrainMaterialTSL, we as createPS2TerrainMaterialWebGL, Me as createPS2WorldTextures, sn as createTinCanMaterials, R as createVehiclePanelAnimator, H as decodeKolmoRig, _t as defaultTargetMeters, vr as detachModule, yt as detectSceneAnchors, fn as disposeImportedRoot, Ve as enforceRetroPersonMaterials, vn as ensureMeshAttributes, i as ensureWorldSession, dt as extractMeshIslands, T as fbm2, Or as findCar, yr as findLauncherRecipe, Qe as findMirrorIslandId, kr as fleetByDomain, Ze as floodFillByCrease, Kt as frontage, Ge as gateTelemetry, xe as generatePS2DetailSlices, pn as getBulletHoleTexture, p as getCachedIslandPlan, W as getColorQuantVector, Z as getIslandTopology, Lt as getNavigatorModelContext, _e as getPaletteLutTexture, Cn as getProceduralLabelTexture, Ee as getRetroPreset, U as getRetroShaderUniforms, an as growRoad, w as hashSeed, lr as inspectGlbBuffer, Fn as instanceBatches, We as isGateStep1Unlocked, St as isUsdFileName, At as khrBoxToRapierHalfExtents, v as kolmoActions, t as kolmoTelemetry, ee as kolmoWorld, In as latticePose, _n as loadCustomLabelTexture, xn as loadImportedGlbUrl, Xt as makeIslandHeightfn, Rt as makeStarterDomainScene, D as makeTerrain, on as maxGrade, Et as measureAssemblyCalibration, xt as measureNormalizedSceneCalibration, Be as measureSelection, Xe as mirrorTriangles, je as mountPS2WorldMeshes, j as mulberry32, B as normalToMinusZQuaternion, ur as normalizeGlbBuffer, ut as normalizeSceneToSi, wn as parseImportedGlbBuffer, it as peelIslandSelection, Ar as planCar, Jt as planDirtSpurs, qt as planIslandWorld, br as planLauncher, Ln as planSettlement, Ce as populateMoonletMatrices, Rn as poseEq, zn as poseFromJSON, Bn as poseToFloat, Vn as poseToJSON, zt as previewLoopPolyline, Wt as quantizeFloatingOrigin192, He as refineMeshAlongLoop, ct as remapIslandIds, Ht as roadFromPoints, $t as routeMacroKnightAStar, k as sampleHeightfield, S as seedFrom, Dn as selectCanLod, Je as selectFacesByClick, st as selectFacesByLoop, ft as separateVehicleMeshes, rt as sliceMeshTriangles, bt as snapMetersToC12, Hn as snapPose, Un as socketFor, Sn as splitObjectIntoShards, P as stampKolmoNodesIntoGlb, er as stepCameraSync, xr as stepLauncher, vt as suggestCarAxles, Nt as suggestMotorcycleWheels, Te as syncRetroUniforms, ue as syncRetroViewport, Ot as toggleIslandSelection, z as togglePropJoint, Wn as triangleCorners, _ as useActiveKolmoWorld, tt as useGateStore, at as useImporterWebMcp, Gn as vToFloat, C as valueNoise2, dr as vaultAssetUrl, tr as withExcludeCharacterRay, Kn as worldSockets, pt as wrapSingleMeshWithPaperShellProxy };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DecalRecord, DestructibleTargetSpec, ShardSpec } from "./junkTypes.js";
|
|
2
|
+
import type { BallisticHitEvent } from "./junkTypes.js";
|
|
3
|
+
import type { ImportedGlbAsset } from "./junkImporter.js";
|
|
4
|
+
import type { DestructibleTargetSnapshot } from "./targetHelpers.js";
|
|
5
|
+
export interface DestructibleTargetHandle {
|
|
6
|
+
applyHit: (hit: BallisticHitEvent) => void;
|
|
7
|
+
getSnapshot: () => DestructibleTargetSnapshot;
|
|
8
|
+
}
|
|
9
|
+
export interface DestructibleTargetProps {
|
|
10
|
+
spec: DestructibleTargetSpec;
|
|
11
|
+
active?: boolean;
|
|
12
|
+
importedAsset?: ImportedGlbAsset | null;
|
|
13
|
+
onHit?: (targetId: string, event: BallisticHitEvent, nextHp: number, decals: DecalRecord[]) => void;
|
|
14
|
+
onShatter?: (targetId: string, shards: ShardSpec[], event: BallisticHitEvent) => void;
|
|
15
|
+
onStateChange?: (snapshot: DestructibleTargetSnapshot) => void;
|
|
16
|
+
registerTarget?: (id: string, handle: DestructibleTargetHandle | null) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const DestructibleTarget: import("react").ForwardRefExoticComponent<DestructibleTargetProps & import("react").RefAttributes<DestructibleTargetHandle>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CanLodMode, JunkKind, ProceduralLabelId } from "./junkTypes.js";
|
|
3
|
+
export interface KolmoJunkProps {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly kind?: JunkKind;
|
|
6
|
+
readonly labelId?: ProceduralLabelId;
|
|
7
|
+
readonly position?: [number, number, number];
|
|
8
|
+
readonly hp?: number;
|
|
9
|
+
readonly fragile?: boolean;
|
|
10
|
+
readonly shatterPieceCount?: number;
|
|
11
|
+
readonly canLodMode?: CanLodMode;
|
|
12
|
+
readonly importedUrl?: string | null;
|
|
13
|
+
}
|
|
14
|
+
export declare function KolmoJunk({ id, kind, labelId, position, hp, fragile, shatterPieceCount, canLodMode, importedUrl, }: KolmoJunkProps): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { type SpawnedShardState } from "./targetHelpers.js";
|
|
3
|
+
export interface ShardPiecesProps {
|
|
4
|
+
shards: ReadonlyArray<SpawnedShardState>;
|
|
5
|
+
material: THREE.Material | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Renders independent dynamic Rapier RigidBodies for BVH shatter fragments.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ShardPieces({ shards, material }: ShardPiecesProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import type { DecalRecord } from "./junkTypes.js";
|
|
4
|
+
/**
|
|
5
|
+
* Generates and caches a crisp procedural bullet-hole CanvasTexture (SRGBColorSpace).
|
|
6
|
+
* Returns null safely in non-DOM SSR environments.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getBulletHoleTexture(): THREE.CanvasTexture | null;
|
|
9
|
+
export declare function disposeBulletHoleTexture(): void;
|
|
10
|
+
export interface TargetDecalsProps {
|
|
11
|
+
decals: ReadonlyArray<DecalRecord>;
|
|
12
|
+
lodKey?: string;
|
|
13
|
+
meshRefMap?: ReadonlyMap<string, RefObject<THREE.Mesh>>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders local-space bullet-hole decals on a target mesh (or via explicit meshRefMap for multi-mesh GLBs).
|
|
17
|
+
*/
|
|
18
|
+
export declare function TargetDecals({ decals, lodKey, meshRefMap, }: TargetDecalsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { ShardSpec } from "./junkTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* Splits any single- or multi-mesh Object3D into independent centroid-centered
|
|
5
|
+
* BVH shard geometries ready for Rapier dynamic RigidBodies + CuboidColliders.
|
|
6
|
+
*/
|
|
7
|
+
export declare function splitObjectIntoShards(rootObj: THREE.Object3D, targetPieces: number): ShardSpec[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export interface ShardTri {
|
|
3
|
+
p: [number, number, number, number, number, number, number, number, number];
|
|
4
|
+
n: [number, number, number, number, number, number, number, number, number];
|
|
5
|
+
uv: [number, number, number, number, number, number];
|
|
6
|
+
cx: number;
|
|
7
|
+
cy: number;
|
|
8
|
+
cz: number;
|
|
9
|
+
minX: number;
|
|
10
|
+
minY: number;
|
|
11
|
+
minZ: number;
|
|
12
|
+
maxX: number;
|
|
13
|
+
maxY: number;
|
|
14
|
+
maxZ: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Collects valid root-space triangles from destructible meshes inside rootObj,
|
|
18
|
+
* skipping decals, gizmos, ShaderMaterials, and non-finite/degenerate triangles.
|
|
19
|
+
*/
|
|
20
|
+
export declare function collectValidTris(rootObj: THREE.Object3D): ShardTri[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { DestructibleTarget, type DestructibleTargetHandle, type DestructibleTargetProps, } from "./DestructibleTarget.js";
|
|
2
|
+
export { KolmoJunk, type KolmoJunkProps } from "./KolmoJunk.js";
|
|
3
|
+
export { ShardPieces } from "./ShardPieces.js";
|
|
4
|
+
export { TargetDecals, getBulletHoleTexture } from "./TargetDecals.js";
|
|
5
|
+
export { splitObjectIntoShards } from "./bvhShatter.js";
|
|
6
|
+
export { collectValidTris, type ShardTri } from "./bvhTriCollector.js";
|
|
7
|
+
export { BOTTLE_HEIGHT, CAN_LOD_THRESHOLD_M, TIN_CAN_HEIGHT, TIN_CAN_RADIUS, buildGlassBottleGeometry, buildTinCanGeometry, countGeometryTriangles, createGlassBottleMaterial, createTinCanMaterials, selectCanLod, type ResolvedCanLod, } from "./junkGeometry.js";
|
|
8
|
+
export { disposeImportedRoot, ensureMeshAttributes } from "./junkImportSanitize.js";
|
|
9
|
+
export { applySegmentsToImportedRoot, loadImportedGlbUrl, parseImportedGlbBuffer, type ImportedGlbAsset, } from "./junkImporter.js";
|
|
10
|
+
export { getProceduralLabelTexture, loadCustomLabelTexture } from "./junkLabels.js";
|
|
11
|
+
export type { DestructibleTargetSnapshot, SpawnedShardState } from "./targetHelpers.js";
|
|
12
|
+
export type { BallisticHitEvent, CanLodMode, DecalRecord, DestructibleTargetSpec, ImportedJunkSegment, JunkKind, ProceduralLabelId, ShardSpec, } from "./junkTypes.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { h as BOTTLE_HEIGHT, g as CAN_LOD_THRESHOLD_M, n as DestructibleTarget, t as KolmoJunk, f as ShardPieces, _ as TIN_CAN_HEIGHT, v as TIN_CAN_RADIUS, u as TargetDecals, a as applySegmentsToImportedRoot, y as buildGlassBottleGeometry, b as buildTinCanGeometry, m as collectValidTris, x as countGeometryTriangles, S as createGlassBottleMaterial, C as createTinCanMaterials, c as disposeImportedRoot, l as ensureMeshAttributes, d as getBulletHoleTexture, r as getProceduralLabelTexture, i as loadCustomLabelTexture, o as loadImportedGlbUrl, s as parseImportedGlbBuffer, w as selectCanLod, p as splitObjectIntoShards } from "../junk-B4bC1zAl.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { CanLodMode } from "./junkTypes.js";
|
|
3
|
+
export declare const TIN_CAN_RADIUS = 0.085;
|
|
4
|
+
export declare const TIN_CAN_HEIGHT = 0.25;
|
|
5
|
+
export declare const BOTTLE_HEIGHT = 0.32;
|
|
6
|
+
export declare const CAN_LOD_THRESHOLD_M = 14;
|
|
7
|
+
export type ResolvedCanLod = '3-gon' | '12-gon';
|
|
8
|
+
/**
|
|
9
|
+
* Selects concrete tin-can geometry LOD from camera distance and mode.
|
|
10
|
+
*/
|
|
11
|
+
export declare function selectCanLod(distanceM: number, mode: CanLodMode): ResolvedCanLod;
|
|
12
|
+
/**
|
|
13
|
+
* Counts triangles for indexed or non-indexed BufferGeometry.
|
|
14
|
+
*/
|
|
15
|
+
export declare function countGeometryTriangles(geometry: THREE.BufferGeometry): number;
|
|
16
|
+
/**
|
|
17
|
+
* Builds procedural Tin Can geometry for '3-gon' (12 tris) or '12-gon' (72 tris).
|
|
18
|
+
* Uses thetaStart = Math.PI so the UV seam is at -Z and u = 0.5 faces +Z.
|
|
19
|
+
* Preserves multi-material groups: 0 = label sleeve, 1 = top cap, 2 = bottom cap.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildTinCanGeometry(lod: ResolvedCanLod): THREE.BufferGeometry;
|
|
22
|
+
/**
|
|
23
|
+
* Builds procedural clearish glass bottle LatheGeometry ordered bottom-to-top
|
|
24
|
+
* with phiStart = Math.PI and height-normalized uv.y so labels wrap cleanly.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildGlassBottleGeometry(): THREE.BufferGeometry;
|
|
27
|
+
/**
|
|
28
|
+
* Creates Dreamcast-compatible clearish glass material.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createGlassBottleMaterial(): THREE.MeshStandardMaterial;
|
|
31
|
+
/**
|
|
32
|
+
* Creates tin can multi-material array [label sleeve, top lid, bottom lid].
|
|
33
|
+
*/
|
|
34
|
+
export declare function createTinCanMaterials(labelTexture: THREE.Texture | null): [THREE.MeshStandardMaterial, THREE.MeshStandardMaterial, THREE.MeshStandardMaterial];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare function ensureMeshAttributes(mesh: THREE.Mesh, fileName: string): void;
|
|
3
|
+
/**
|
|
4
|
+
* Disposes all geometries, materials, and textures owned by an imported Object3D.
|
|
5
|
+
*/
|
|
6
|
+
export declare function disposeImportedRoot(root: THREE.Object3D): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { ImportedJunkSegment } from "./junkTypes.js";
|
|
3
|
+
export { disposeImportedRoot } from "./junkImportSanitize.js";
|
|
4
|
+
export interface ImportedGlbAsset {
|
|
5
|
+
root: THREE.Group;
|
|
6
|
+
fileName: string;
|
|
7
|
+
segments: ImportedJunkSegment[];
|
|
8
|
+
bboxSizeM: [number, number, number];
|
|
9
|
+
normalizedExtent: number;
|
|
10
|
+
halfExtents: [number, number, number];
|
|
11
|
+
dispose: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Applies segment destructibility and customName metadata onto an imported root's meshes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function applySegmentsToImportedRoot(root: THREE.Object3D, segments: ImportedJunkSegment[]): void;
|
|
17
|
+
/**
|
|
18
|
+
* Parses an ArrayBuffer containing a .glb/.gltf asset, normalizes scale/origin,
|
|
19
|
+
* guarantees normals/UVs, and enumerates ImportedJunkSegment descriptors.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseImportedGlbBuffer(buffer: ArrayBuffer, fileName?: string): Promise<ImportedGlbAsset>;
|
|
22
|
+
/**
|
|
23
|
+
* Fetches a .glb/.gltf URL (blob:, data:, or HTTP path) and parses it as an ImportedGlbAsset.
|
|
24
|
+
*/
|
|
25
|
+
export declare function loadImportedGlbUrl(url: string, fileName?: string): Promise<ImportedGlbAsset>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProceduralLabelId } from "./junkTypes.js";
|
|
2
|
+
export declare const LABEL_CANVAS_WIDTH = 512;
|
|
3
|
+
export declare const LABEL_CANVAS_HEIGHT = 256;
|
|
4
|
+
/**
|
|
5
|
+
* Draws one of the 4 built-in procedural labels onto a 2D canvas context.
|
|
6
|
+
*/
|
|
7
|
+
export declare function renderProceduralLabelCanvas(ctx: CanvasRenderingContext2D, labelId: Exclude<ProceduralLabelId, 'custom'>, width?: number, height?: number): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { ProceduralLabelId } from "./junkTypes.js";
|
|
3
|
+
export declare const BUILTIN_LABEL_IDS: ReadonlyArray<Exclude<ProceduralLabelId, 'custom'>>;
|
|
4
|
+
/**
|
|
5
|
+
* Generates or retrieves a cached deterministic CanvasTexture for built-in labels.
|
|
6
|
+
* Returns null safely in non-DOM SSR environments.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getProceduralLabelTexture(labelId: ProceduralLabelId, options?: {
|
|
9
|
+
cache?: boolean;
|
|
10
|
+
}): THREE.CanvasTexture | null;
|
|
11
|
+
/**
|
|
12
|
+
* Validates an uploaded image File before creating a custom label texture.
|
|
13
|
+
* Returns null if valid, or a descriptive error message if invalid.
|
|
14
|
+
*/
|
|
15
|
+
export declare function validateLabelImageFile(file: File): string | null;
|
|
16
|
+
export interface LoadedCustomLabel {
|
|
17
|
+
texture: THREE.Texture;
|
|
18
|
+
dispose: () => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Loads a custom albedo texture from a URL or DataURL with SRGBColorSpace and cleanup handle.
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadCustomLabelTexture(url: string): Promise<LoadedCustomLabel>;
|
|
24
|
+
/**
|
|
25
|
+
* Validates that an image URL decodes cleanly in the browser before applying it as a label.
|
|
26
|
+
*/
|
|
27
|
+
export declare function decodeLabelImageUrl(url: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Disposes all module-cached procedural label textures.
|
|
30
|
+
*/
|
|
31
|
+
export declare function disposeCachedLabelTextures(): void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
export type JunkKind = "tin-can" | "glass-bottle" | "imported-glb";
|
|
3
|
+
export type CanLodMode = "auto" | "3-gon" | "12-gon";
|
|
4
|
+
export type ProceduralLabelId = "target" | "goofy-emoji" | "tris-soda" | "garys-beans" | "custom";
|
|
5
|
+
export interface DecalRecord {
|
|
6
|
+
id: string;
|
|
7
|
+
/** Position in target mesh local space. */
|
|
8
|
+
position: [number, number, number];
|
|
9
|
+
/** Euler XYZ rotation aligned to surface normal in target mesh local space. */
|
|
10
|
+
rotation: [number, number, number];
|
|
11
|
+
scale: number;
|
|
12
|
+
}
|
|
13
|
+
export interface ShardSpec {
|
|
14
|
+
id: string;
|
|
15
|
+
geometry: THREE.BufferGeometry;
|
|
16
|
+
centroid: [number, number, number];
|
|
17
|
+
halfExtents: [number, number, number];
|
|
18
|
+
volumeFraction: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ImportedJunkSegment {
|
|
21
|
+
segmentId: string;
|
|
22
|
+
originalName: string;
|
|
23
|
+
customName: string;
|
|
24
|
+
destructible: boolean;
|
|
25
|
+
triCount: number;
|
|
26
|
+
bboxSizeM: [number, number, number];
|
|
27
|
+
}
|
|
28
|
+
export interface DestructibleTargetSpec {
|
|
29
|
+
id: string;
|
|
30
|
+
kind: JunkKind;
|
|
31
|
+
labelId: ProceduralLabelId;
|
|
32
|
+
customAlbedoUrl: string | null;
|
|
33
|
+
canLodMode: CanLodMode;
|
|
34
|
+
position: [number, number, number];
|
|
35
|
+
hp: number;
|
|
36
|
+
maxHp: number;
|
|
37
|
+
fragile: boolean;
|
|
38
|
+
shatterPieceCount: number;
|
|
39
|
+
importedUrl?: string | null;
|
|
40
|
+
segments?: ImportedJunkSegment[];
|
|
41
|
+
}
|
|
42
|
+
export interface BallisticHitEvent {
|
|
43
|
+
targetId: string;
|
|
44
|
+
point: [number, number, number];
|
|
45
|
+
normal: [number, number, number];
|
|
46
|
+
impulse: [number, number, number];
|
|
47
|
+
distance: number;
|
|
48
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { CanLodMode, JunkKind, ProceduralLabelId, ShardSpec } from "./junkTypes.js";
|
|
3
|
+
import type { BallisticHitEvent } from "./junkTypes.js";
|
|
4
|
+
import { type ResolvedCanLod } from "./junkGeometry.js";
|
|
5
|
+
export declare const SHARD_COLLIDER_INSET = 0.65;
|
|
6
|
+
export declare function getTargetDensity(kind: JunkKind): number;
|
|
7
|
+
export interface SpawnedShardState {
|
|
8
|
+
spec: ShardSpec;
|
|
9
|
+
worldPos: [number, number, number];
|
|
10
|
+
worldQuat: [number, number, number, number];
|
|
11
|
+
impulse: [number, number, number];
|
|
12
|
+
torque: [number, number, number];
|
|
13
|
+
linvel: [number, number, number];
|
|
14
|
+
angvel: [number, number, number];
|
|
15
|
+
density: number;
|
|
16
|
+
}
|
|
17
|
+
export interface DestructibleTargetSnapshot {
|
|
18
|
+
id: string;
|
|
19
|
+
kind: JunkKind;
|
|
20
|
+
lodMode: CanLodMode;
|
|
21
|
+
activeLod: ResolvedCanLod;
|
|
22
|
+
triCount: number;
|
|
23
|
+
labelId: ProceduralLabelId;
|
|
24
|
+
customLabelLoaded: boolean;
|
|
25
|
+
materialTransparent: boolean;
|
|
26
|
+
opacity: number;
|
|
27
|
+
hp: number;
|
|
28
|
+
maxHp: number;
|
|
29
|
+
alive: boolean;
|
|
30
|
+
decalCount: number;
|
|
31
|
+
activeShardCount: number;
|
|
32
|
+
position: [number, number, number];
|
|
33
|
+
linearVelocity: [number, number, number];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Computes target-mesh local-space position & Euler XYZ rotation for a <Decal>.
|
|
37
|
+
*/
|
|
38
|
+
export declare function computeLocalDecalTransform(mesh: THREE.Mesh, worldPoint: [number, number, number], worldNormal: [number, number, number]): {
|
|
39
|
+
position: [number, number, number];
|
|
40
|
+
rotation: [number, number, number];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Finds the nearest non-decal Mesh inside an Object3D to a world-space hit point.
|
|
44
|
+
*/
|
|
45
|
+
export declare function findClosestMeshInGroup(root: THREE.Object3D, worldPoint: [number, number, number]): THREE.Mesh | null;
|
|
46
|
+
/**
|
|
47
|
+
* Splits a target Object3D into BVH shards and computes world poses + impulses.
|
|
48
|
+
*/
|
|
49
|
+
export declare function buildShardStates(rootObj: THREE.Object3D, targetPieces: number, worldPos: THREE.Vector3, worldQuat: THREE.Quaternion, hit: BallisticHitEvent, kind?: JunkKind): {
|
|
50
|
+
states: SpawnedShardState[];
|
|
51
|
+
specs: ShardSpec[];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Creates a DoubleSide material for tumbling shatter shards matching target kind.
|
|
55
|
+
*/
|
|
56
|
+
export declare function createShardMaterial(kind: JunkKind, labelTexture: THREE.Texture | null, importedRoot?: THREE.Object3D | null): THREE.Material;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { RapierRigidBody } from '@react-three/rapier';
|
|
2
|
+
import type { RefObject } from 'react';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
import type { DecalRecord, DestructibleTargetSpec, ShardSpec } from "./junkTypes.js";
|
|
5
|
+
import type { BallisticHitEvent } from "./junkTypes.js";
|
|
6
|
+
import { type DestructibleTargetSnapshot, type SpawnedShardState } from "./targetHelpers.js";
|
|
7
|
+
import type { TargetAssetsState } from "./useTargetAssets.js";
|
|
8
|
+
export interface HitExecutionResult {
|
|
9
|
+
shattered: boolean;
|
|
10
|
+
nextHp: number;
|
|
11
|
+
shatterPos?: [number, number, number];
|
|
12
|
+
bodyPos?: [number, number, number];
|
|
13
|
+
shardStates?: SpawnedShardState[];
|
|
14
|
+
shardSpecs?: ShardSpec[];
|
|
15
|
+
shardMaterial?: THREE.Material;
|
|
16
|
+
newDecal?: DecalRecord;
|
|
17
|
+
newDecalMesh?: THREE.Mesh;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Applies physical knockback impulse and computes either a shatter state or a local decal.
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeTargetHit(spec: DestructibleTargetSpec, assets: TargetAssetsState, rb: RapierRigidBody | null, group: THREE.Group | null, primaryMesh: THREE.Mesh | null, currentHp: number, nextDecalId: string, hit: BallisticHitEvent): HitExecutionResult;
|
|
23
|
+
/**
|
|
24
|
+
* Formats a runtime telemetry snapshot for a DestructibleTarget.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildTargetSnapshot(spec: DestructibleTargetSpec, assets: TargetAssetsState, rb: RapierRigidBody | null, hp: number, alive: boolean, decalCount: number, shardCount: number, lastPosition?: [number, number, number]): DestructibleTargetSnapshot;
|
|
27
|
+
export declare function attachDecalMeshRef(map: Map<string, RefObject<THREE.Mesh>>, decalId: string, mesh?: THREE.Mesh): void;
|
|
28
|
+
export declare function appendDecalBounded(prev: ReadonlyArray<DecalRecord>, nextDecal: DecalRecord, meshRefs: Map<string, RefObject<THREE.Mesh>>, nextMesh?: THREE.Mesh, maxDecals?: number): DecalRecord[];
|
|
29
|
+
export declare function tagImportedMeshes(root: THREE.Object3D | null, targetId: string, applyHit: (hit: BallisticHitEvent) => void): void;
|
|
30
|
+
export declare function readTargetWorldPos(rb: RapierRigidBody | null, group: THREE.Group | null, out: THREE.Vector3): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import type { DestructibleTargetSpec } from "./junkTypes.js";
|
|
3
|
+
import { type ResolvedCanLod } from "./junkGeometry.js";
|
|
4
|
+
import { type ImportedGlbAsset } from "./junkImporter.js";
|
|
5
|
+
export interface TargetAssetsState {
|
|
6
|
+
effectiveLod: ResolvedCanLod;
|
|
7
|
+
setActiveLod: (lod: ResolvedCanLod) => void;
|
|
8
|
+
can3Geo: THREE.BufferGeometry | null;
|
|
9
|
+
can12Geo: THREE.BufferGeometry | null;
|
|
10
|
+
canMats: [THREE.MeshStandardMaterial, THREE.MeshStandardMaterial, THREE.MeshStandardMaterial] | null;
|
|
11
|
+
bottleGeo: THREE.BufferGeometry | null;
|
|
12
|
+
bottleMat: THREE.MeshStandardMaterial | null;
|
|
13
|
+
activeLabelTex: THREE.Texture | null;
|
|
14
|
+
customLabelLoaded: boolean;
|
|
15
|
+
importedRoot: THREE.Group | null;
|
|
16
|
+
importedHalfExtents: [number, number, number] | null;
|
|
17
|
+
importedKey: string;
|
|
18
|
+
triCount: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Manages procedural geometries, labels, custom textures, and imported GLB assets
|
|
22
|
+
* for a DestructibleTarget with deterministic GPU cleanup on unmount/change.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useTargetAssets(spec: DestructibleTargetSpec, importedAsset?: ImportedGlbAsset | null): TargetAssetsState;
|