/** * HOLO VM Opcode Definitions * * 8 opcode families (~60 opcodes) for spatial scene execution. * Each opcode is 1 byte. Operands are variable-length. * * Family ranges: * 0x01–0x0F Entity Operations * 0x10–0x1F Spatial Operations * 0x20–0x2F Physics Operations * 0x30–0x3F Rendering Hints * 0x40–0x4F Trait Operations * 0x50–0x5F I/O & Networking * 0x60–0x6F Control Flow * 0x70–0x7F Agent Bridge */ export declare enum HoloOpCode { /** Create entity with archetype. Operands: [entity_type: u16, name_idx: u32] */ SPAWN = 1, /** Remove entity from world. Operands: [entity_id: u32] */ DESPAWN = 2, /** Deep-copy entity. Operands: [entity_id: u32] → pushes new entity_id */ CLONE = 3, /** Attach/update component. Operands: [entity_id: u32, comp_type: u16, ...data] */ SET_COMPONENT = 4, /** Read component data. Operands: [entity_id: u32, comp_type: u16] → pushes data */ GET_COMPONENT = 5, /** Detach component. Operands: [entity_id: u32, comp_type: u16] */ REMOVE_COMPONENT = 6, /** Set parent in scene graph. Operands: [child_id: u32, parent_id: u32] */ SET_PARENT = 7, /** ECS archetype query. Operands: [archetype_mask: u32] → pushes entity list */ QUERY = 8, /** Set world transform. Operands: [entity_id: u32, x,y,z: f32, qx,qy,qz,qw: f32, sx,sy,sz: f32] */ TRANSFORM = 16, /** Relative move. Operands: [entity_id: u32, dx,dy,dz: f32] */ TRANSLATE = 17, /** Set rotation (quaternion). Operands: [entity_id: u32, qx,qy,qz,qw: f32] */ ROTATE = 18, /** Orient toward target. Operands: [entity_id: u32, tx,ty,tz: f32] */ LOOK_AT = 19, /** Ray spatial query. Operands: [ox,oy,oz: f32, dx,dy,dz: f32, max: f32] → pushes hits */ RAYCAST = 20, /** AABB spatial query. Operands: [minx,miny,minz: f32, maxx,maxy,maxz: f32] → pushes entities */ QUERY_BOX = 21, /** Sphere spatial query. Operands: [cx,cy,cz: f32, radius: f32] → pushes entities */ QUERY_SPHERE = 22, /** Navigation pathfinding. Operands: [fromx,y,z: f32, tox,y,z: f32, flags: u16] → pushes path */ FIND_PATH = 23, /** Zone lookup. Operands: [x,y,z: f32] → pushes zone_id */ GET_ZONE = 24, /** Attach physics body. Operands: [entity_id: u32, mass: f32, body_type: u8] */ ADD_RIGIDBODY = 32, /** Apply force vector. Operands: [entity_id: u32, fx,fy,fz: f32] */ APPLY_FORCE = 33, /** Apply instant impulse. Operands: [entity_id: u32, ix,iy,iz: f32] */ APPLY_IMPULSE = 34, /** Set linear velocity. Operands: [entity_id: u32, vx,vy,vz: f32] */ SET_VELOCITY = 35, /** Attach collision shape. Operands: [entity_id: u32, shape_type: u8, ...params] */ ADD_COLLIDER = 36, /** Create physics joint. Operands: [entity_a: u32, entity_b: u32, joint_type: u8] */ ADD_JOINT = 37, /** Set world gravity. Operands: [gx,gy,gz: f32] */ SET_GRAVITY = 38, /** Advance physics simulation. Operands: [dt: f32] */ PHYSICS_STEP = 39, /** Set geometry type. Operands: [entity_id: u32, geo_type: u8, ...params] */ SET_GEOMETRY = 48, /** Set PBR material. Operands: [entity_id: u32, ...material_desc] */ SET_MATERIAL = 49, /** Show/hide entity. Operands: [entity_id: u32, visible: u8] */ SET_VISIBLE = 50, /** LOD thresholds. Operands: [entity_id: u32, ...lod_config] */ SET_LOD = 51, /** Light component. Operands: [entity_id: u32, light_type: u8, ...params] */ SET_LIGHT = 52, /** Animation playback. Operands: [entity_id: u32, anim_id: u32, ...params] */ SET_ANIMATION = 53, /** Gaussian splat asset. Operands: [entity_id: u32, gs_ref: u32] */ SET_GAUSSIAN_SPLAT = 54, /** GPU particle system. Operands: [entity_id: u32, ...ps_config] */ SET_PARTICLE_SYSTEM = 55, /** Attach trait. Operands: [entity_id: u32, trait_id: u32] */ APPLY_TRAIT = 64, /** Detach trait. Operands: [entity_id: u32, trait_id: u32] */ REMOVE_TRAIT = 65, /** Flatten composed traits. Operands: [entity_id: u32] → pushes resolved traits */ RESOLVE_TRAITS = 66, /** Fire event. Operands: [event_type: u16, ...payload] */ EMIT_EVENT = 67, /** Register handler. Operands: [event_type: u16, handler_offset: u32] */ ON_EVENT = 68, /** Evaluate condition. Operands: [condition_idx: u32] → pushes boolean */ EVAL_CONDITION = 69, /** Async asset load. Operands: [asset_uri_idx: u32, asset_type: u8] → pushes handle */ LOAD_ASSET = 80, /** Spatial audio playback. Operands: [sound_id: u32, x,y,z: f32, ...params] */ PLAY_AUDIO = 81, /** Mark for network sync. Operands: [entity_id: u32, sync_tier: u8] */ NET_SYNC = 82, /** Send network message. Operands: [channel: u16, ...payload] */ NET_SEND = 83, /** Read incoming messages. Operands: [channel: u16] → pushes messages */ NET_RECV = 84, /** Read VR/XR input. Operands: [input_type: u8] → pushes input data */ XR_INPUT = 85, /** VR haptic feedback. Operands: [hand: u8, amplitude: f32, duration: f32] */ HAPTIC = 86, /** No operation */ NOP = 96, /** Unconditional jump. Operands: [offset: i32] */ JUMP = 97, /** Conditional jump. Operands: [offset: i32] — pops stack, jumps if truthy */ JUMP_IF = 98, /** Call subroutine. Operands: [func_idx: u32] */ CALL = 99, /** Return from subroutine */ RETURN = 100, /** Push literal to stack. Operands: [type: u8, ...value] */ PUSH = 101, /** Discard stack top */ POP = 102, /** Store stack top to register. Operands: [register_idx: u16] */ STORE = 103, /** Push register value to stack. Operands: [register_idx: u16] */ LOAD = 104, /** Halt execution */ HALT = 105, /** Suspend until next tick */ YIELD = 106, /** Schedule delayed handler. Operands: [delay_ms: u32, handler_offset: u32] */ TIMER = 107, /** Add top two stack values */ ADD = 108, /** Subtract: stack[-2] - stack[-1] */ SUB = 109, /** Multiply top two */ MUL = 110, /** Divide: stack[-2] / stack[-1] */ DIV = 111, /** Request action from uAAL VM. Operands: [agent_id: u32, action_idx: u32] */ AGENT_INVOKE = 112, /** Read agent state field. Operands: [agent_id: u32, field_idx: u32] → pushes value */ AGENT_READ = 113, /** Listen for agent decisions. Operands: [agent_id: u32, event_type: u16] */ AGENT_SUBSCRIBE = 114, /** Trigger NPC dialog. Operands: [npc_id: u32, dialog_tree_id: u32] */ DIALOG_SHOW = 115, /** Update quest state. Operands: [quest_id: u32, state: u8] */ QUEST_UPDATE = 116, /** Equal: pushes stack[-2] == stack[-1] */ CMP_EQ = 128, /** Less than: pushes stack[-2] < stack[-1] */ CMP_LT = 129, /** Greater than: pushes stack[-2] > stack[-1] */ CMP_GT = 130, /** Logical NOT: pushes !stack[-1] */ NOT = 131 } export declare enum ComponentType { Transform = 1, Geometry = 2, Material = 3, RigidBody = 4, Collider = 5, Light = 6, Animation = 7, Audio = 8, Network = 9, Trait = 10, ParticleSystem = 11, GaussianSplat = 12, LOD = 13, Custom = 255 } export declare enum GeometryType { Cube = 1, Sphere = 2, Cylinder = 3, Plane = 4, Cone = 5, Torus = 6, Capsule = 7, Mesh = 8, Text3D = 9, Portal = 10, Terrain = 11, Skybox = 12, Billboard = 13, Line = 14 } export declare enum BodyType { Static = 0, Dynamic = 1, Kinematic = 2 } export declare enum ColliderShape { Box = 1, Sphere = 2, Capsule = 3, Cylinder = 4, ConvexHull = 5, TriMesh = 6 } export declare enum LightType { Directional = 1, Point = 2, Spot = 3, Ambient = 4, Area = 5 } export declare enum SyncTier { /** Server-authoritative, 60Hz, reliable ordered */ Physics = 0, /** Client-predicted, 20Hz, unreliable */ Movement = 1, /** CRDT-based, 1-5Hz, eventual consistency */ AIAgent = 2, /** Last-write-wins, <1Hz, fire-and-forget */ Cosmetic = 3 } export declare enum ValueType { Null = 0, Bool = 1, I32 = 2, F32 = 3, F64 = 4, String = 5, Vec3 = 6, Quat = 7, EntityRef = 8, Array = 9 } export interface OpCodeMeta { name: string; family: string; operandCount: number; description: string; pops: number; pushes: number; } /** * Get the family name for an opcode */ export declare function getOpcodeFamily(opcode: HoloOpCode): string; /** * Get the mnemonic name for an opcode */ export declare function getOpcodeName(opcode: HoloOpCode): string; /** * Check if an opcode is a jump/branch instruction */ export declare function isControlFlow(opcode: HoloOpCode): boolean; //# sourceMappingURL=opcodes.d.ts.map