import * as THREE from "three"; export type Info = { name: string; description: string; }; export type Transform = { x?: number; y?: number; z?: number; position?: Vector3; rx?: number; ry?: number; rz?: number; rotation?: Vector3; sx?: number; sy?: number; sz?: number; scale?: Vector3; }; export interface Node { name?: string; tag?: "head" | "heldItemAnchor" | string; localPosition?: Vector3; localRotation?: Vector3; localScale?: Vector3; children?: Node[]; } export type GroupOperationType = "none" | "union" | "subtract" | "intersect" | "exclude" | "taper" | "mirror" | "place"; export type GroupPlacementDefinition = PlacementDefinition; export type PlaceGroupOperationParams = { placement: GroupPlacementDefinition; orientation?: "none" | "tangent" | "radial" | "fixed"; fixedYaw?: number; seed?: number; }; export type DeformAxis = "x" | "y" | "z"; export type DeformOp = { type: "taper"; params: { axis: DeformAxis; factor: number; }; }; export type SymmetryOp = { type: "mirror"; params: { axis: DeformAxis; planeOffset?: number; sourceSide?: "both" | "positive" | "negative"; }; }; export type GroupOperation = { type: "none"; params: Record; } | { type: "union"; params: Record; } | { type: "subtract"; params: Record; } | { type: "intersect"; params: Record; } | { type: "exclude"; params: Record; } | { type: "taper"; params: DeformOp["params"]; } | { type: "mirror"; params: SymmetryOp["params"]; } | { type: "place"; params: PlaceGroupOperationParams; }; export interface GroupNode extends Node { type: "group"; operation?: GroupOperation; children: Node[]; } export type Body = { type: "composite"; params: { parts: Node[]; hasInterior?: boolean; }; } | { type: "gltf"; params: { file: string; material?: MaterialDefinition; }; } | { type: "humanoid"; params: { height: number; headMaterial?: MaterialDefinition; bodyMaterial?: MaterialDefinition; armsMaterial?: MaterialDefinition; legsMaterial?: MaterialDefinition; feetMaterial?: MaterialDefinition; handsMaterial?: MaterialDefinition; }; }; export interface Primitive extends Node { geometry: { type: "none"; params?: { pivot?: Pivot; }; } | { type: "image"; params: { width: number; height: number; pivot?: Pivot; }; } | { type: "box"; params: { lengthX: number; lengthY: number; lengthZ: number; pivot?: Pivot; }; } | { type: "cylinder"; params: { radius: number; height: number; arc?: number; pivot?: Pivot; }; } | { type: "sphere"; params: { radius: number; pivot?: Pivot; }; } | { type: "hollowCylinder"; params: { outerRadius: number; innerRadius: number; height: number; arc?: number; pivot?: Pivot; }; } | { type: "cone"; params: { radius: number; height: number; arc?: number; pivot?: Pivot; }; } | { type: "pyramid"; params: { width: number; height: number; depth: number; pivot?: Pivot; }; } | { type: "hemisphere"; params: { radius: number; pivot?: Pivot; }; } | { type: "icosahedron"; params: { radius: number; pivot?: Pivot; }; } | { type: "capsule"; params: { radius: number; height: number; pivot?: Pivot; }; } | { type: "torus"; params: { majorRadius: number; minorRadius: number; arc?: number; pivot?: Pivot; }; } | { type: "roundedBox"; params: { lengthX: number; lengthY: number; lengthZ: number; radius: number; segments?: number; pivot?: Pivot; }; } | { type: "wedge"; params: { width: number; height: number; depth: number; pivot?: Pivot; }; } | { type: "lathe"; params: { profile: Shape2D; segments?: number; capped?: boolean; pivot?: Pivot; }; } | { type: "star"; params: { outerRadius: number; innerRadius: number; points: number; height: number; pivot?: Pivot; }; } | { type: "displacedPlane"; params: { lengthX: number; lengthZ: number; field: FieldDefinition; pivot?: Pivot; }; } | { type: "extrudedPolygon"; params: { shape: Shape2D; height: number; pivot?: Pivot; }; }; material?: MaterialDefinition; ignoreCollisions?: boolean; } export interface Light extends Node { light: { type: "point"; params: { intensity: number; range: number; color: THREE.Color | number | string; }; } | { type: "spot"; params: { intensity: number; range: number; beamAngle: number; color: THREE.Color | number | string; direction?: Vector3; }; }; } export type MaterialDefinition = { type: "none"; } | { type: "image"; params: { src: string; opacity?: number; doubleSided?: boolean; }; } | { type: "solid"; params?: { color?: THREE.Color | number | string; metalness?: number; roughness?: number; opacity?: number; emissive?: THREE.Color | number | string; emissiveIntensity?: number; flatShading?: boolean; }; } | { type: "wireframe"; params?: { color?: THREE.Color | number | string; opacity?: number; }; } | { type: "liquid"; params?: { baseColor?: THREE.Color | number | string; depthTint?: THREE.Color | number | string; depthScale?: number; opacity?: number; waveFreq?: number; waveAmp?: number; waveSpeed?: number; }; } | { type: "marble"; params?: { color?: THREE.Color | number | string; grainColor?: THREE.Color | number | string; grainSize?: number; seed?: number; }; } | { type: "wood"; params?: { color?: THREE.Color | number | string; grainColor?: THREE.Color | number | string; grainSize?: number; grainDirection?: Vector3; seed?: number; }; }; export type FieldDefinition = { type: "simplex"; params?: { amplitude?: number; frequency?: number; octaves?: number; seed?: number; }; } | { type: "composite"; params: { blend?: "add" | "multiply" | "max" | "min"; fields: FieldDefinition[]; }; }; export type MotionSource = { type: "static"; params?: {}; } | { type: "dynamicRigidBody"; params?: { mass?: number; gravityScale?: number; }; } | { type: "characterController"; params?: { speed?: number; jumpHeight?: number; canFly?: boolean; }; } | { type: "vehicleController"; params?: Record; }; export type Animation = { clips: AnimationClip[]; }; export type AnimationClip = { name: "default" | "move" | "air" | "use" | "takeDamage" | string; tracks: AnimationTrack[]; duration: number; }; export type AnimationTrack = { targetTag: string; keyframes: AnimationKeyframe[]; }; export type AnimationKeyframe = { time: number; position?: Vector3; rotation?: Vector3; scale?: Vector3; }; export type ParticleShape = { type: "point"; } | { type: "box"; size?: Vector3; } | { type: "sphere"; radius?: number; }; export type ParticleEmitter = { rate?: number; burst?: number; maxParticles?: number; lifetime?: number; duration?: number; speed?: number | { min: number; max: number; }; spread?: number; size?: number; opacity?: number; gravity?: number; color?: THREE.Color | number | string; direction?: Vector3; shape?: ParticleShape; localSpace?: boolean; }; export declare const EFFECT_TYPE_OPTIONS: readonly ["teleport", "kill", "getPickedUp", "addToInventory", "removeFromInventory", "incrementStock", "setMetric", "incrementMetric", "damage", "spawnEntityFrom", "spawnAtHit", "emitParticles", "mount", "discover", "popup", "emitEvent", "heal"]; export type EffectType = typeof EFFECT_TYPE_OPTIONS[number]; export declare const EFFECT_TARGET_OPTIONS: readonly ["self", "other", "user"]; export type EffectTarget = typeof EFFECT_TARGET_OPTIONS[number]; export declare const STORE_EFFECT_SUBJECT_OPTIONS: readonly ["target", "self", "other", "user", "owner"]; export type StoreEffectSubject = typeof STORE_EFFECT_SUBJECT_OPTIONS[number]; export type EffectBase = { type: "teleport"; params: { position: Vector3; }; } | // Teleports the target entity to a new position. { type: "kill"; params: {}; } | //remove the target entity. { type: "getPickedUp"; params: {}; } | // Adds the target entity to the actor entity's inventory. { type: "addToInventory"; params: { item: string | Record; count?: number; subject?: StoreEffectSubject; }; } | // Adds one or more entity definitions into inventory slots atomically. { type: "removeFromInventory"; params: { count?: number; archetype?: string; name?: string; subject?: StoreEffectSubject; }; } | // Removes matching inventory entries atomically by archetype and/or name. { type: "incrementStock"; params: { stock: string; delta?: number; subject?: StoreEffectSubject; }; } | // Increments/decrements a stock value and clamps to store min/max. { type: "setMetric"; params: { metric: string; value: number; subtype?: string; subpath?: string; subject?: StoreEffectSubject; }; } | // Sets a metric value, optionally within a subtype/subpath bucket. { type: "incrementMetric"; params: { metric: string; delta?: number; subtype?: string; subpath?: string; subject?: StoreEffectSubject; }; } | // Increments a metric value, optionally within a subtype/subpath bucket. { type: "damage"; params: { amount?: number; knockback?: number; }; } | // Applies damage to the target entity. { type: "heal"; params: { amount?: number; }; } | // Applies healing to the target entity. { type: "spawnEntityFrom"; params: { entity: string | Record; velocity?: number; }; } | //spawns another entity relative to the position of the target. if the target has a BodyPart tagged "head" the spawned entity will be positioned at the anchor's position and rotation. { type: "spawnAtHit"; params: { entity: string | Record; velocity?: number; }; } | // spawns an entity at the raycast hit position passed to the effect. { type: "emitParticles"; params: { emitter: ParticleEmitter; position?: Vector3; duration?: number; }; } | // spawns a particle emitter burst at the target or supplied position. { type: "mount"; params: { offset?: [number, number, number]; }; } | // Mounts the actor entity onto the target entity. When mounted, the actor entity will control the target's movement and actions. { type: "discover"; params: {}; } | // Marks the target entity as discovered by the actor, incrementing the actor's discovery metric for that entity. { type: "popup"; params: { text: string; }; } | // Displays a text modal to the player. { type: "emitEvent"; params: { name: string; payload?: Record; }; }; export type Effect = EffectBase & { target: EffectTarget; onSuccess?: Effect[]; onFailure?: Effect[]; }; export type EffectWithRange = Effect & { range: number; }; /** * @deprecated Legacy alias from pre-ActionDefinition control-flow modeling. * Prefer `ActionDefinition` from `modules/action.ts` for canonical action DSL. */ export type ActionEffect = EffectBase & { target: EffectTarget; range?: number; onSuccess?: ActionEffect[]; onFailure?: ActionEffect[]; }; export type Inventory = { size: number; items: string | Record[]; selectedItemIndex?: number; }; export type AI = { isAggressive: boolean; awarenessRange: number; }; export type Faction = { id: string; }; export type Player = { id: string; }; export type Health = { value: number; max?: number; }; export type Pivot = "center" | "bottom" | "top" | "left" | "right" | "front" | "back"; export type Vector3 = { x: number; y: number; z: number; } | [number, number, number]; export type Vector2 = { x: number; z: number; } | [number, number]; export type ShapePoint2D = { u: number; v: number; }; export type Shape2D = { type: "polyline"; params: { points: ShapePoint2D[]; closed?: boolean; }; } | { type: "polygon"; params: { points: ShapePoint2D[]; }; } | { type: "circle"; params: { radius: number; center?: ShapePoint2D; segments?: number; }; } | { type: "rectangle"; params: { width: number; height: number; center?: ShapePoint2D; }; }; export type PathPoint3D = { x: number; y: number; z: number; }; export type Path3D = { type: "polyline"; params: { points: PathPoint3D[]; closed?: boolean; }; } | { type: "line"; params: { start: PathPoint3D; end: PathPoint3D; segments?: number; }; } | { type: "circle"; params: { center?: PathPoint3D; radius: number; segments?: number; }; } | { type: "rectangle"; params: { center: PathPoint3D; width: number; depth: number; closed?: boolean; }; }; export type PlacementRange = { min: number; max: number; }; export type PlacementBounds = { x: [number, number]; z: [number, number]; y?: [number, number]; }; export type PlacementDefinition = { type: "random"; params: { bounds: PlacementBounds; count: number | PlacementRange; }; } | { type: "grid"; params: { bounds: PlacementBounds; spacing: number | { x: number; z: number; }; jitter?: number; }; } | { type: "points"; params: { positions: PathPoint3D[]; }; } | { type: "cluster"; params: { bounds: PlacementBounds; clusterCount: number | PlacementRange; perCluster: number | PlacementRange; clusterRadius: number | PlacementRange; clusterSeparation?: number; }; } | { type: "circle"; params: { center: PathPoint3D; radius: number; count: number; }; } | { type: "line"; params: { start: PathPoint3D; end: PathPoint3D; count: number; }; } | { type: "polyline"; params: { path: Path3D; spacing: number; offset?: number | PlacementRange; orientation?: "none" | "tangent" | "radial" | "fixed"; fixedYaw?: number; }; } | { type: "poisson"; params: { bounds: PlacementBounds; minDistance: number; maxAttempts?: number; }; } | { type: "spiral"; params: { center: PathPoint3D; startRadius: number; endRadius: number; turns: number; count: number; }; } | { type: string; params: Record; }; export type WorldMetadata = { title?: string; description?: string; tags?: string[]; brandColors?: string[]; dimensions: import('./worldSchema').DimensionDefinition[]; }; //# sourceMappingURL=schema.d.ts.map