Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

86.1 KB
Raw Blame
/**
 * @file    component.generated.ts
 * @brief   Auto-generated component metadata
 * @details Generated by EHT - DO NOT EDIT
 */

import type { AssetFieldType } from '../scene/scene';
import type { FieldMeta } from './component';
import type { Color, Entity, Quat, Vec2, Vec3, Vec4 } from '../types';
import type { AlignContent, AlignItems, AlignSelf, BillboardMode, BodyType, CanvasScaleMode, ClearFlags, Dimension, EmitterShape, FlexDirection, FlexWrap, ForceFieldType, JustifyContent, LightType, MaskMode, Padding, ParticleColliderShape, ParticleCollisionFallback, ParticleCollisionMode, ParticleEasing, ParticleRenderMode, ProjectionType, ReflectionAxis, ReflectionQuality, ReflectionUpdate, ScrollMovement, ShapeType, SimulationSpace, SpringBoneShape, SpriteDrawMode, SpriteMaskInteraction, SubEmitterTrigger, TextAlign, TilemapOrientation, TilemapStaggerAxis, TilemapStaggerIndex, UIDisplay, UIFillMethod, UIFillOrigin, UIPointerEvents, UIPositionType, UIVisualFit, UIVisualType } from '../wasm/wasm.generated';

/**
 * Single-source-of-truth hash of the C++/TS boundary ABI (component
 * schema + pointer layouts). The WASM module exposes the same digest via
 * getAbiLayoutHash(); BuiltinBridge.connect() compares them and refuses to
 * run on mismatch, because mismatched offsets read the wrong heap bytes.
 */
export const ABI_LAYOUT_HASH = '19dcbf4878f79091';

/**
 * One asset-valued field of a component: which field, and what kind of
 * asset it holds. Declaring it is what gives the field dependency
 * tracking, cook inclusion, `@uuid:` refs and hot-update.
 *
 * @public
 */
export interface AssetFieldMeta {
    field: string;
    type: AssetFieldType;
}

/**
 * A skeleton/atlas field PAIR, which has to be declared together: the two
 * files are one asset, and loading either alone yields nothing to draw.
 *
 * @public
 */
export interface SkeletalFieldMeta {
    skeletonField: string;
    atlasField: string;
    /** Which runtime the pair belongs to — `spine`, `dragonbones`. */
    runtime: string;
}

export interface ComponentMetaEntry {
    defaults: Record<string, unknown>;
    /**
     * Creation-time overrides authored at the C++ ES_PROPERTY site via
     * `editor_default=` — where the authoring default deliberately differs
     * from the C++ ctor value in `defaults`. Component registration merges
     * these over `defaults`; `defaults` alone is the runtime ctor truth.
     */
    editorDefaults?: Record<string, unknown>;
    /**
     * The bool field that gates this component's part in the entity's
     * visibility, authored `renderable=<field>` at the C++ ES_COMPONENT
     * site. Absent = nothing of this component is hidden by hiding its
     * entity. ONE answer for both realms: the runtime folds visibility
     * onto these fields, and the editor's eye reaches exactly them.
     */
    renderableField?: string;
    /**
     * Runtime-only state that must never persist, authored `transient` at
     * the C++ ES_COMPONENT site — scene serialization omits it.
     */
    transient?: boolean;
    assetFields: AssetFieldMeta[];
    skeletal?: SkeletalFieldMeta;
    entityFields: string[];
    /**
     * Fields whose value is a LIST, which has no place in the zero-copy
     * component buffer a native host writes through — its storage is a
     * pointer. Each crosses as its own generated
     * `es_<Component>_<field>_get/_set` pair. Entity lists predate this
     * and keep the hand-written pair the registry wires them by.
     */
    listFields?: string[];
    /**
     * List fields whose elements are NUMBERS, which the web boundary
     * marshals as a registered embind vector rather than a JS array.
     * Apart from `entityFields`: that list also re-aims references when
     * a prefab is instantiated, and a weight is a value, not a reference.
     */
    numberListFields?: string[];
    colorFields: string[];
    animatableFields: string[];
    /**
     * Fields authored `replicated` at the C++ ES_PROPERTY site — the
     * single source of truth for what the network replication layer
     * syncs (RC11). Whole-field granularity; absent = nothing replicates.
     */
    replicatedFields?: string[];
    /** Fields authored `skip_serialize` — runtime-only state scene serialization omits. */
    skipSerializeFields?: string[];
    /**
     * Fields authored `readonly` — engine-COMPUTED outputs (e.g. Transform's
     * world-space fields), never authoring inputs. The editor must not project
     * them back into the World: writing their (stale/zero) model value clobbers
     * the value the engine composes each frame.
     */
    readonlyFields?: string[];
    fields?: Record<string, FieldMeta>;
}

export const COMPONENT_META: Record<string, ComponentMetaEntry> = {
    Billboard: {
        defaults: {
            mode: 0,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            mode: { enum: [{ label: 'ViewPlane', value: 0 }, { label: 'Upright', value: 1 }], tooltip: "View plane lies flat in the view, like a particle. Upright turns about world up only, so it stays standing as the camera looks down." },
            enabled: { tooltip: "Off: the mesh keeps the entity's own rotation." },
        },
    },
    BitmapText: {
        defaults: {
            text: '',
            color: { r: 1, g: 1, b: 1, a: 1 },
            fontSize: 1,
            align: 0,
            spacing: 0,
            parallax: { x: 1, y: 1 },
            layer: 0,
            font: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'font', type: 'font' as AssetFieldType }],
        entityFields: [],
        colorFields: ['color'],
        animatableFields: ['color.r', 'color.g', 'color.b', 'color.a'],
        fields: {
            fontSize: { min: 1 },
            align: { enum: [{ label: 'Left', value: 0 }, { label: 'Center', value: 1 }, { label: 'Right', value: 2 }] },
            parallax: { tooltip: "Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).", advanced: true },
            layer: { step: 1 },
        },
    },
    BoxCollider2D: {
        defaults: {
            halfExtents: { x: 0.5, y: 0.5 },
            offset: { x: 0, y: 0 },
            density: 1,
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
            categoryBits: 1,
            maskBits: 65535,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    BoxCollider3D: {
        defaults: {
            halfExtents: { x: 50, y: 50, z: 50 },
            center: { x: 0, y: 0, z: 0 },
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            friction: { min: 0 },
            restitution: { min: 0, max: 1 },
        },
    },
    Camera: {
        defaults: {
            projectionType: 0,
            fov: 60,
            orthoSize: 5,
            nearPlane: 0.1,
            farPlane: 1000,
            aspectRatio: 0,
            isActive: false,
            priority: 0,
            viewport: { x: 0, y: 0, z: 1, w: 1 },
            clearFlags: 3,
            pixelPerfect: false,
            cullingMask: 4294967295,
            renderTarget: 0,
        },
        editorDefaults: {
            projectionType: 1,
            orthoSize: 540,
            aspectRatio: 1.77,
            isActive: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: ['orthoSize'],
        fields: {
            projectionType: { enum: [{ label: 'Perspective', value: 0 }, { label: 'Orthographic', value: 1 }], tooltip: "Orthographic (2D) or Perspective projection." },
            fov: { min: 1, max: 179, unit: "°", shownWhen: { field: "projectionType", values: [0] } },
            orthoSize: { min: 0, tooltip: "Half the visible height in world units (Orthographic).", shownWhen: { field: "projectionType", values: [1] } },
            nearPlane: { min: 0, advanced: true },
            farPlane: { min: 0, advanced: true },
            aspectRatio: { advanced: true },
            priority: { step: 1, advanced: true },
            clearFlags: { tooltip: "Which buffers to clear before rendering this camera." },
            pixelPerfect: { tooltip: "Snap the camera to the pixel grid for crisp pixel-art (Orthographic).", advanced: true, shownWhen: { field: "projectionType", values: [1] } },
            cullingMask: { tooltip: "Which sorting layers this camera renders.", bitmask: { source: "sortingLayers" } },
            renderTarget: { tooltip: "Render into a RenderTexture instead of the screen (0 = screen). Set at run time.", advanced: true },
        },
    },
    Canvas: {
        defaults: {
            designResolution: { x: 1920, y: 1080 },
            pixelsPerUnit: 100,
            scaleMode: 1,
            matchWidthOrHeight: 0.5,
            backgroundColor: { r: 0, g: 0, b: 0, a: 1 },
            layer: 0,
        },
        assetFields: [],
        entityFields: [],
        colorFields: ['backgroundColor'],
        animatableFields: [],
        fields: {
            pixelsPerUnit: { min: 1, tooltip: "World pixels per physics meter (Box2D + tile collider scale)." },
            scaleMode: { enum: [{ label: 'FixedWidth', value: 0 }, { label: 'FixedHeight', value: 1 }, { label: 'Expand', value: 2 }, { label: 'Shrink', value: 3 }, { label: 'Match', value: 4 }], tooltip: "How the canvas adapts the design resolution to the screen." },
            matchWidthOrHeight: { min: 0, max: 1, slider: true, tooltip: "0 matches width, 1 matches height (Match mode only)." },
            layer: { step: 1, tooltip: "Sorting layer this UI belongs to — cameras cull by it.", enumSource: "sortingLayers" },
        },
    },
    CapsuleCollider2D: {
        defaults: {
            radius: 0.25,
            halfHeight: 0.5,
            offset: { x: 0, y: 0 },
            density: 1,
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
            categoryBits: 1,
            maskBits: 65535,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    CapsuleCollider3D: {
        defaults: {
            radius: 30,
            halfHeight: 50,
            center: { x: 0, y: 0, z: 0 },
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            radius: { min: 0 },
            halfHeight: { min: 0 },
            friction: { min: 0 },
            restitution: { min: 0, max: 1 },
        },
    },
    CharacterController3D: {
        defaults: {
            velocity: { x: 0, y: 0, z: 0 },
            radius: 30,
            halfHeight: 50,
            maxSlope: 0.87,
            stepHeight: 40,
            snapDown: 50,
            mass: 70,
            pushForce: 5000,
            enabled: true,
            layer: 0,
            isOnFloor: false,
            floorNormal: { x: 0, y: 0, z: 0 },
            realVelocity: { x: 0, y: 0, z: 0 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            radius: { min: 0 },
            halfHeight: { min: 0 },
            maxSlope: { min: 0, max: 1.5708, unit: "rad" },
            stepHeight: { min: 0, advanced: true },
            snapDown: { min: 0, advanced: true },
            mass: { min: 0, advanced: true },
            pushForce: { min: 0, advanced: true },
            layer: { min: 0, max: 15, advanced: true },
            isOnFloor: { advanced: true },
            floorNormal: { advanced: true },
            realVelocity: { advanced: true },
        },
    },
    Children: {
        defaults: {
            entities: [],
        },
        assetFields: [],
        entityFields: ['entities'],
        colorFields: [],
        animatableFields: [],
    },
    CircleCollider2D: {
        defaults: {
            radius: 0.5,
            offset: { x: 0, y: 0 },
            density: 1,
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
            categoryBits: 1,
            maskBits: 65535,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    ContentRect: {
        defaults: {
            size: { x: 100, y: 100 },
            pivot: { x: 0.5, y: 0.5 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            size: { min: 0, tooltip: "Width and height of the content in local units (before scale)." },
            pivot: { tooltip: "The point of the rectangle the entity sits on, as a fraction of its size (0.5,0.5 = centre). Rotation and scale turn about it.", normalizedOf: "size" },
        },
    },
    ConvexCollider3D: {
        defaults: {
            mesh: 0,
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
        },
        assetFields: [{ field: 'mesh', type: 'mesh' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            mesh: { tooltip: "Geometry (.esmesh) whose convex hull collides." },
            friction: { min: 0 },
            restitution: { min: 0, max: 1 },
        },
    },
    Draggable: {
        defaults: {
            enabled: true,
            dragThreshold: 5,
            lockX: false,
            lockY: false,
            constrainMin: false,
            constraintMin: { x: 0, y: 0 },
            constrainMax: false,
            constraintMax: { x: 0, y: 0 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            enabled: { tooltip: "Whether this entity can be dragged at all." },
            dragThreshold: { min: 0, unit: "px", tooltip: "Pointer travel before a press becomes a drag." },
            lockX: { tooltip: "Pin the X axis; the drag only moves in Y.", category: "Axis" },
            lockY: { tooltip: "Pin the Y axis; the drag only moves in X.", category: "Axis" },
            constrainMin: { tooltip: "Apply the lower bound below.", category: "Bounds" },
            constraintMin: { tooltip: "Lowest world position the drag may reach.", category: "Bounds" },
            constrainMax: { tooltip: "Apply the upper bound below.", category: "Bounds" },
            constraintMax: { tooltip: "Highest world position the drag may reach.", category: "Bounds" },
        },
    },
    DragonBonesAnimation: {
        defaults: {
            skeletonPath: '',
            atlasPath: '',
            armature: '',
            animation: '',
            timeScale: 1,
            loop: true,
            playing: true,
            fadeInTime: 0,
            flipX: false,
            flipY: false,
            color: { r: 1, g: 1, b: 1, a: 1 },
            layer: 0,
            skeletonScale: 1,
            material: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'material', type: 'material' as AssetFieldType }],
        skeletal: { skeletonField: 'skeletonPath', atlasField: 'atlasPath', runtime: 'dragonbones' },
        entityFields: [],
        colorFields: ['color'],
        animatableFields: [],
        fields: {
            armature: { enumSource: "dragonbonesArmatures" },
            animation: { enumSource: "dragonbonesAnimations" },
            timeScale: { min: 0 },
            fadeInTime: { min: 0, step: 0.05 },
            layer: { step: 1, enumSource: "sortingLayers" },
            skeletonScale: { min: 0 },
        },
    },
    FlexContainer: {
        defaults: {
            direction: 0,
            wrap: 0,
            justifyContent: 0,
            alignItems: 3,
            alignContent: 0,
            gap: { x: 0, y: 0 },
            padding: { left: 0, top: 0, right: 0, bottom: 0 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            direction: { enum: [{ label: 'Row', value: 0 }, { label: 'Column', value: 1 }, { label: 'RowReverse', value: 2 }, { label: 'ColumnReverse', value: 3 }] },
            wrap: { enum: [{ label: 'NoWrap', value: 0 }, { label: 'Wrap', value: 1 }] },
            justifyContent: { enum: [{ label: 'Start', value: 0 }, { label: 'Center', value: 1 }, { label: 'End', value: 2 }, { label: 'SpaceBetween', value: 3 }, { label: 'SpaceAround', value: 4 }, { label: 'SpaceEvenly', value: 5 }] },
            alignItems: { enum: [{ label: 'Start', value: 0 }, { label: 'Center', value: 1 }, { label: 'End', value: 2 }, { label: 'Stretch', value: 3 }] },
            alignContent: { enum: [{ label: 'Start', value: 0 }, { label: 'Center', value: 1 }, { label: 'End', value: 2 }, { label: 'Stretch', value: 3 }, { label: 'SpaceBetween', value: 4 }, { label: 'SpaceAround', value: 5 }] },
        },
    },
    GroupOpacity: {
        defaults: {
            opacity: 1,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            opacity: { min: 0, max: 1, step: 0.01, tooltip: "Opacity of this entity and everything under it, multiplied with the opacity of every group above it." },
        },
    },
    Impostor: {
        defaults: {
            screenSize: 0.06,
            frames: 8,
            resolution: 1024,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            screenSize: { min: 0, max: 1, tooltip: "Screen height fraction below which the card replaces the mesh." },
            frames: { min: 2, max: 16, step: 1, tooltip: "Pictures along each side of the atlas (frames x frames in all). More is smoother as the view goes round, and smaller each." },
            resolution: { min: 128, max: 4096, step: 128, tooltip: "The atlas's side in pixels; each picture is this divided by frames." },
            enabled: { tooltip: "Off: the mesh is always drawn as itself." },
        },
    },
    Interactable: {
        defaults: {
            enabled: true,
            blockRaycast: true,
            raycastTarget: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    LODGroup: {
        defaults: {
            lod1: 0,
            lod2: 0,
            lod3: 0,
            lod1Size: 0.5,
            lod2Size: 0.25,
            lod3Size: 0.1,
            cullSize: 0.02,
            hysteresis: 0.1,
            enabled: true,
        },
        assetFields: [{ field: 'lod1', type: 'mesh' as AssetFieldType }, { field: 'lod2', type: 'mesh' as AssetFieldType }, { field: 'lod3', type: 'mesh' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            lod1: { tooltip: "Geometry drawn below the LOD 1 screen size." },
            lod2: { tooltip: "Geometry drawn below the LOD 2 screen size." },
            lod3: { tooltip: "Geometry drawn below the LOD 3 screen size." },
            lod1Size: { min: 0, max: 1, tooltip: "Screen height fraction below which LOD 1 takes over." },
            lod2Size: { min: 0, max: 1, tooltip: "Screen height fraction below which LOD 2 takes over." },
            lod3Size: { min: 0, max: 1, tooltip: "Screen height fraction below which LOD 3 takes over." },
            cullSize: { min: 0, max: 1, tooltip: "Screen height fraction below which nothing is drawn (0 = never)." },
            hysteresis: { min: 0, max: 1, tooltip: "Extra fraction to grow past a threshold before the finer level returns.", advanced: true },
            enabled: { tooltip: "Off: the MeshRenderer's own mesh is always drawn." },
        },
    },
    Light: {
        defaults: {
            type: 0,
            color: { r: 1, g: 1, b: 1, a: 1 },
            intensity: 1,
            radius: 200,
            innerRadius: 0,
            falloff: 1,
            inverseSquare: false,
            shadowStrength: 1,
            layerMin: -128,
            layerMax: 127,
            cookie: 0,
            cookieSize: { x: 0, y: 0 },
            innerAngle: 30,
            outerAngle: 45,
            shadowSoftness: 0,
            sourceAngle: 0.53,
            shadowDistance: 0,
            meshShadows: false,
            shadowExtent: 0,
            followEnvironmentSun: false,
            aimFollowedSun: false,
            environment: 0,
            environmentRotation: 0,
            drawEnvironment: false,
            reflectionScale: 1,
            diffuseScale: 1,
            diffuseTint: { r: 1, g: 1, b: 1, a: 1 },
            reflectionSaturation: 1,
            bakedTint: { r: 1, g: 1, b: 1, a: 1 },
            hemisphere: false,
            groundColor: { r: 0.35, g: 0.3, b: 0.25, a: 1 },
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'cookie', type: 'texture' as AssetFieldType }, { field: 'environment', type: 'environment' as AssetFieldType }],
        entityFields: [],
        colorFields: ['color', 'diffuseTint', 'bakedTint', 'groundColor'],
        animatableFields: ['color.r', 'color.g', 'color.b', 'color.a', 'intensity', 'radius', 'innerRadius', 'falloff', 'shadowStrength', 'cookieSize.x', 'cookieSize.y', 'innerAngle', 'outerAngle', 'shadowSoftness', 'sourceAngle', 'shadowDistance', 'diffuseScale', 'diffuseTint.r', 'diffuseTint.g', 'diffuseTint.b', 'diffuseTint.a', 'groundColor.r', 'groundColor.g', 'groundColor.b', 'groundColor.a'],
        fields: {
            type: { enum: [{ label: 'Point', value: 0 }, { label: 'Directional', value: 1 }, { label: 'Ambient', value: 2 }, { label: 'Spot', value: 3 }], tooltip: "Point, Directional, Ambient, or Spot." },
            intensity: { min: 0, tooltip: "Brightness multiplier of the light." },
            radius: { min: 0, tooltip: "Falloff reach in world units (Point / Spot).", shownWhen: { field: "type", values: [0, 3] } },
            innerRadius: { min: 0, tooltip: "Radius held at full strength before the falloff starts.", shownWhen: { field: "type", values: [0, 3] } },
            falloff: { min: 0, max: 8, tooltip: "Falloff shape: 1 = linear, higher pools near the light, lower reaches further.", shownWhen: { field: "type", values: [0, 3] } },
            inverseSquare: { tooltip: "Fall off as 1/distance² in metres (a real lamp): intensity is the light 1 m away, radius only where it ends.", shownWhen: { field: "type", values: [0, 3] } },
            shadowStrength: { min: 0, max: 1, slider: true, tooltip: "How much of this light its shadows remove (1 = all of it).", shownWhen: { field: "type", values: [0, 1, 3] } },
            layerMin: { min: -128, max: 127, step: 1, tooltip: "The lowest sprite layer this light reaches (default: every layer).", shownWhen: { field: "type", values: [0, 1, 3] } },
            layerMax: { min: -128, max: 127, step: 1, tooltip: "The highest sprite layer this light reaches (default: every layer).", shownWhen: { field: "type", values: [0, 1, 3] } },
            cookie: { tooltip: "A texture whose alpha shapes this light (a cookie).", shownWhen: { field: "type", values: [0, 3] } },
            cookieSize: { min: 0, tooltip: "Cookie size in world units; 0 = the light's own reach.", shownWhen: { field: "type", values: [0, 3] } },
            innerAngle: { min: 0, max: 180, unit: "°", advanced: true, shownWhen: { field: "type", values: [3] } },
            outerAngle: { min: 0, max: 180, unit: "°", advanced: true, shownWhen: { field: "type", values: [3] } },
            shadowSoftness: { min: 0, tooltip: "Shadow softness (light-source size); 0 = hard edge.", shownWhen: { field: "type", values: [0, 1, 3] } },
            sourceAngle: { min: 0, max: 90, unit: "°", tooltip: "Angular size of a Directional light's source (the sun is 0.53); 0 = hard edge.", advanced: true, shownWhen: { field: "type", values: [1] } },
            shadowDistance: { min: 0, tooltip: "Directional shadow distance; 0 = no directional shadow.", advanced: true, shownWhen: { field: "type", values: [1] } },
            meshShadows: { tooltip: "Cast a shadow map over 3D meshes (Directional, Spot, Point).", shownWhen: { field: "type", values: [0, 1, 3] } },
            shadowExtent: { min: 0, tooltip: "Shadow map coverage radius; 0 = fit the view.", advanced: true, shownWhen: { field: "type", values: [1] } },
            followEnvironmentSun: { tooltip: "Take direction and strength from the environment's sun, and light the sky without it.", shownWhen: { field: "type", values: [1] } },
            aimFollowedSun: { tooltip: "With Follow Environment Sun: aim by this light's Transform, not by the panorama.", advanced: true, shownWhen: { field: "type", values: [1] } },
            environment: { tooltip: "Baked environment (.esenv) this Ambient light casts.", shownWhen: { field: "type", values: [2] } },
            environmentRotation: { unit: "deg", tooltip: "Turn the environment about the up axis, in degrees.", shownWhen: { field: "type", values: [2] } },
            drawEnvironment: { tooltip: "Draw this environment as the sky behind the scene.", shownWhen: { field: "type", values: [2] } },
            reflectionScale: { min: 0, tooltip: "Scale what baked reflection probes show (1 = as baked).", advanced: true, shownWhen: { field: "type", values: [2] } },
            diffuseScale: { min: 0, tooltip: "Scale the light the environment gives surfaces, not what they reflect of it (1 = as the sky gives it).", shownWhen: { field: "type", values: [2] } },
            diffuseTint: { tooltip: "Tint the light the environment gives surfaces, not what they reflect of it (white = as the sky gives it).", shownWhen: { field: "type", values: [2] } },
            reflectionSaturation: { min: 0, max: 1, tooltip: "How much colour baked reflection probes keep (0 = grey).", advanced: true, shownWhen: { field: "type", values: [2] } },
            bakedTint: { tooltip: "Multiply baked indirect light (lightmaps, probe volumes) by this colour (1 = as baked).", advanced: true, shownWhen: { field: "type", values: [2] } },
            hemisphere: { tooltip: "Light from above in Color, from below in Ground Color, blended by which way a surface faces.", shownWhen: { field: "type", values: [2] } },
            groundColor: { tooltip: "The ambient colour a surface facing straight down receives (Hemisphere).", shownWhen: { field: "type", values: [2] } },
        },
    },
    LightProbeVolume: {
        defaults: {
            probes: 0,
            capture: false,
            captureInterval: 0,
            halfExtents: { x: 100, y: 100, z: 100 },
            spacing: 100,
            enabled: true,
        },
        assetFields: [{ field: 'probes', type: 'probeVolume' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            probes: { tooltip: "Baked probe grid (.esprobes) filling this box." },
            capture: { tooltip: "Fill this box at run time from a capture at its centre (the room as lit now), not from a bake." },
            captureInterval: { min: 0, tooltip: "Seconds between captures (0 = once). Each one adds a bounce.", shownWhen: { field: "capture", values: [1] } },
            halfExtents: { min: 0, tooltip: "Half the box this volume covers, from the entity's position." },
            spacing: { min: 1, tooltip: "World units between probes the next bake lays down." },
        },
    },
    MeshCollider3D: {
        defaults: {
            mesh: 0,
            friction: 0.3,
            restitution: 0,
            layer: 0,
            enabled: true,
        },
        assetFields: [{ field: 'mesh', type: 'mesh' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            mesh: { tooltip: "Geometry (.esmesh) to collide against." },
            friction: { min: 0 },
            restitution: { min: 0, max: 1 },
            layer: { min: 0, max: 15, advanced: true },
        },
    },
    MeshInstances: {
        defaults: {
            lod1Mesh: 0,
            lodDistance: 0,
            minDistance: 0,
            drawDistance: 0,
            shadowDistance: 0,
        },
        assetFields: [{ field: 'lod1Mesh', type: 'mesh' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            lod1Mesh: { tooltip: "The cheaper mesh used past the LOD distance. Needs the same channels as the mesh." },
            lodDistance: { tooltip: "Distance (metres) past which the cheaper mesh is used. 0 = never." },
            minDistance: { tooltip: "Distance (metres) nearer than which an instance is not drawn. 0 = from the eye." },
            drawDistance: { tooltip: "Distance (metres) past which an instance is not drawn. 0 = unlimited." },
            shadowDistance: { tooltip: "Distance (metres) past which an instance casts no shadow. 0 = as far as it is drawn." },
        },
    },
    MeshLightmap: {
        defaults: {
            lightmap: 0,
            scaleOffset: { x: 1, y: 1, z: 0, w: 0 },
        },
        assetFields: [{ field: 'lightmap', type: 'texture' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            lightmap: { tooltip: "Baked lightmap atlas. Needs a mesh with a second UV set." },
            scaleOffset: { tooltip: "Atlas rectangle: xy scales the second UV set, zw offsets it.", advanced: true },
        },
    },
    MeshMorph: {
        defaults: {
            weights: [],
        },
        assetFields: [],
        entityFields: [],
        listFields: ['weights'],
        numberListFields: ['weights'],
        colorFields: [],
        animatableFields: ['weights'],
        fields: {
            weights: { tooltip: "Weight per morph target of the mesh, in the order the mesh carries them.", labelSource: "meshMorphTargets" },
        },
    },
    MeshRenderer: {
        defaults: {
            texture: 0,
            normalMap: 0,
            color: { r: 1, g: 1, b: 1, a: 1 },
            layer: 0,
            opaque: false,
            cullBackfaces: false,
            lit: false,
            castShadows: true,
            parallax: { x: 1, y: 1 },
            material: 0,
            enabled: true,
            mesh: 0,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'texture', type: 'texture' as AssetFieldType }, { field: 'normalMap', type: 'texture' as AssetFieldType }, { field: 'material', type: 'material' as AssetFieldType }, { field: 'mesh', type: 'mesh' as AssetFieldType }],
        entityFields: [],
        colorFields: ['color'],
        animatableFields: ['color.r', 'color.g', 'color.b', 'color.a'],
        fields: {
            normalMap: { tooltip: "Normal map (tangent space). Needs a mesh with normals." },
            color: { tooltip: "Tint multiplied into the vertex colors (white = unchanged)." },
            layer: { step: 1, tooltip: "Sorting layer — controls draw order across renderables.", enumSource: "sortingLayers" },
            opaque: { tooltip: "Opaque: no blending; writes and tests depth, so meshes occlude each other." },
            cullBackfaces: { tooltip: "Cull back faces: triangles facing away from the camera are skipped." },
            lit: { tooltip: "Receive 2D lights: Light entities light this mesh (flat normal). A custom material overrides this." },
            castShadows: { tooltip: "Cast shadows: whether this mesh blocks the light. Water and other surfaces light passes through say no." },
            parallax: { tooltip: "Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).", advanced: true },
            material: { advanced: true },
        },
    },
    MeshSkin: {
        defaults: {
            joints: [],
        },
        assetFields: [],
        entityFields: ['joints'],
        colorFields: [],
        animatableFields: [],
        fields: {
            joints: { tooltip: "Joint entities, in the order the mesh's bind matrices are in." },
        },
    },
    Occluder: {
        defaults: {
            halfExtents: { x: 50, y: 50, z: 50 },
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            halfExtents: { min: 0, tooltip: "Half the solid box, in world units, from the entity's position." },
            enabled: { tooltip: "Off: this box hides nothing." },
        },
    },
    Parent: {
        defaults: {
            entity: 0,
        },
        assetFields: [],
        entityFields: ['entity'],
        colorFields: [],
        animatableFields: [],
    },
    ParticleCollider: {
        defaults: {
            shape: 0,
            radius: 50,
            halfHeight: 50,
            halfExtents: { x: 50, y: 50, z: 50 },
            inverted: false,
            mask: 65535,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            shape: { enum: [{ label: 'Sphere', value: 0 }, { label: 'Box', value: 1 }, { label: 'Capsule', value: 2 }], category: "Shape" },
            radius: { min: 0, category: "Shape" },
            halfHeight: { min: 0, category: "Shape" },
            halfExtents: { category: "Shape" },
            inverted: { category: "Shape" },
            mask: { min: 0, max: 65535, step: 1, category: "Shape", bitmask: { source: "collisionLayers" } },
        },
    },
    ParticleEmitter: {
        defaults: {
            rate: 10,
            burstCount: 0,
            burstInterval: 1,
            duration: 5,
            simulationSpeed: 1,
            startDelay: 0,
            looping: true,
            playOnStart: true,
            maxParticles: 1000,
            gpuSimulation: false,
            lifetimeMin: 5,
            lifetimeMax: 5,
            shape: 3,
            shapeRadius: 100,
            shapeSize: { x: 100, y: 100, z: 0 },
            shapeAngle: 25,
            speedMin: 500,
            speedMax: 500,
            angleSpreadMin: 0,
            angleSpreadMax: 360,
            startSizeMin: 100,
            startSizeMax: 100,
            endSizeMin: 100,
            endSizeMax: 100,
            sizeEasing: 0,
            startColor: { r: 1, g: 1, b: 1, a: 1 },
            endColor: { r: 1, g: 1, b: 1, a: 0 },
            colorEasing: 0,
            rotationMin: 0,
            rotationMax: 0,
            angularVelocityMin: 0,
            angularVelocityMax: 0,
            gravity: { x: 0, y: 0, z: 0 },
            damping: 0,
            addedVelocityMin: { x: 0, y: 0, z: 0 },
            addedVelocityMax: { x: 0, y: 0, z: 0 },
            speedLimit: 0,
            limitDampen: 1,
            noiseStrength: 0,
            noiseFrequency: 0.01,
            noiseScrollSpeed: 0,
            noiseOctaves: 1,
            texture: 0,
            spriteColumns: 1,
            spriteRows: 1,
            spriteFPS: 10,
            spriteLoop: true,
            blendMode: 1,
            layer: 0,
            material: 0,
            simulationSpace: 0,
            renderMode: 0,
            velocityScale: 0,
            lengthScale: 1,
            enabled: true,
            subEmitterTrigger: 0,
            subEmitterChance: 1,
            subEmitterInheritVelocity: 0,
            subEmitter: 0,
            trailEnabled: false,
            trailWidth: 8,
            trailPoints: 6,
            trailMinDistance: 6,
            collisionEnabled: false,
            collisionFloor: 0,
            collisionMode: 0,
            collisionMask: 65535,
            collisionQueryBudget: 128,
            collisionMaxDistance: 0,
            collisionFallback: 0,
            collisionEvents: false,
            collisionEventBudget: 32,
            collisionThickness: 30,
            collisionBounce: 0.5,
            collisionFriction: 0.1,
            collisionLifetimeLoss: 0,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'texture', type: 'texture' as AssetFieldType }, { field: 'material', type: 'material' as AssetFieldType }],
        entityFields: ['subEmitter'],
        colorFields: ['startColor', 'endColor'],
        animatableFields: [],
        fields: {
            rate: { min: 0, category: "Emission" },
            burstCount: { min: 0, step: 1, category: "Emission" },
            burstInterval: { min: 0, category: "Emission" },
            duration: { min: 0, category: "Emission" },
            simulationSpeed: { min: 0, tooltip: "How fast this emitter's own time runs: 2 plays it twice as fast, 0.5 at half, 0 holds it. Scales emission, lifetimes and motion alike.", category: "Emission" },
            startDelay: { min: 0, tooltip: "Seconds after the emitter starts playing before it emits anything. The duration counts from the end of the delay.", category: "Emission" },
            looping: { category: "Emission" },
            playOnStart: { category: "Emission" },
            maxParticles: { min: 1, step: 1, category: "Emission" },
            gpuSimulation: { tooltip: "Simulate on the GPU (WebGPU compute). Falls back to a capped CPU simulation elsewhere. Sub-emitters, trails and physics collision are CPU-only.", category: "Emission" },
            lifetimeMin: { min: 0, category: "Lifetime" },
            lifetimeMax: { min: 0, category: "Lifetime" },
            shape: { enum: [{ label: 'Point', value: 0 }, { label: 'Circle', value: 1 }, { label: 'Box', value: 2 }, { label: 'Cone', value: 3 }, { label: 'Sphere', value: 4 }, { label: 'Hemisphere', value: 5 }], category: "Shape" },
            shapeRadius: { min: 0, category: "Shape", shownWhen: { field: "shape", values: [1, 3, 4, 5] } },
            shapeSize: { category: "Shape", shownWhen: { field: "shape", values: [2] } },
            shapeAngle: { unit: "°", category: "Shape", shownWhen: { field: "shape", values: [3] } },
            speedMin: { category: "Velocity" },
            speedMax: { category: "Velocity" },
            angleSpreadMin: { unit: "°", category: "Velocity", shownWhen: { field: "shape", values: [0, 2] } },
            angleSpreadMax: { unit: "°", category: "Velocity", shownWhen: { field: "shape", values: [0, 2] } },
            startSizeMin: { min: 0, category: "Size" },
            startSizeMax: { min: 0, category: "Size" },
            endSizeMin: { min: 0, category: "Size" },
            endSizeMax: { min: 0, category: "Size" },
            sizeEasing: { enum: [{ label: 'Linear', value: 0 }, { label: 'EaseIn', value: 1 }, { label: 'EaseOut', value: 2 }, { label: 'EaseInOut', value: 3 }], category: "Size" },
            startColor: { category: "Color" },
            endColor: { category: "Color" },
            colorEasing: { enum: [{ label: 'Linear', value: 0 }, { label: 'EaseIn', value: 1 }, { label: 'EaseOut', value: 2 }, { label: 'EaseInOut', value: 3 }], category: "Color" },
            rotationMin: { unit: "°", category: "Rotation" },
            rotationMax: { unit: "°", category: "Rotation" },
            angularVelocityMin: { category: "Rotation" },
            angularVelocityMax: { category: "Rotation" },
            gravity: { category: "Velocity" },
            damping: { min: 0, category: "Velocity" },
            addedVelocityMin: { tooltip: "A velocity each particle carries on top of its own, chosen between the two ends when it is born. Gravity, damping, noise and the speed limit do not act on it. Run by the CPU simulation.", category: "Velocity" },
            addedVelocityMax: { category: "Velocity" },
            speedLimit: { min: 0, tooltip: "The fastest a particle may move under its own velocity; 0 is no limit. A faster particle is pulled back toward the limit. Run by the CPU simulation.", category: "Velocity" },
            limitDampen: { min: 0, max: 1, tooltip: "How much of the excess over the limit is removed per 1/60 s: 1 clamps at once, a small value brakes gently.", category: "Velocity" },
            noiseStrength: { min: 0, category: "Noise" },
            noiseFrequency: { min: 0, category: "Noise" },
            noiseScrollSpeed: { category: "Noise" },
            noiseOctaves: { min: 1, max: 8, step: 1, category: "Noise" },
            texture: { category: "Texture" },
            spriteColumns: { min: 1, step: 1, category: "Texture" },
            spriteRows: { min: 1, step: 1, category: "Texture" },
            spriteFPS: { min: 0, category: "Texture" },
            spriteLoop: { category: "Texture" },
            blendMode: { category: "Rendering" },
            layer: { step: 1, category: "Rendering", enumSource: "sortingLayers" },
            material: { category: "Rendering" },
            simulationSpace: { enum: [{ label: 'World', value: 0 }, { label: 'Local', value: 1 }], category: "Rendering" },
            renderMode: { enum: [{ label: 'Billboard', value: 0 }, { label: 'Stretched', value: 1 }], tooltip: "Billboard faces the view. Stretched lays the quad's long axis (its Y) along the particle's velocity and lengthens it with speed. Drawn by the CPU simulation; a GPU-simulated emitter draws as Billboard.", category: "Rendering" },
            velocityScale: { min: 0, tooltip: "Stretched: how much of the particle's speed is added to the quad's length, in world units per unit of speed.", category: "Rendering", shownWhen: { field: "renderMode", values: [1] } },
            lengthScale: { min: 0, tooltip: "Stretched: the quad's own length is its size times this.", category: "Rendering", shownWhen: { field: "renderMode", values: [1] } },
            subEmitterTrigger: { enum: [{ label: 'Death', value: 0 }, { label: 'Birth', value: 1 }, { label: 'Collision', value: 2 }], category: "SubEmitter" },
            subEmitterChance: { min: 0, max: 1, category: "SubEmitter" },
            subEmitterInheritVelocity: { min: 0, max: 1, category: "SubEmitter" },
            subEmitter: { category: "SubEmitter" },
            trailEnabled: { category: "Trail" },
            trailWidth: { min: 0, category: "Trail", shownWhen: { field: "trailEnabled", values: [1] } },
            trailPoints: { min: 2, max: 12, step: 1, category: "Trail", shownWhen: { field: "trailEnabled", values: [1] } },
            trailMinDistance: { min: 0, category: "Trail", shownWhen: { field: "trailEnabled", values: [1] } },
            collisionEnabled: { category: "Collision" },
            collisionFloor: { category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionMode: { enum: [{ label: 'Floor', value: 0 }, { label: 'Physics2D', value: 1 }, { label: 'Physics3D', value: 2 }, { label: 'Depth', value: 3 }, { label: 'Sdf', value: 4 }], category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionMask: { min: 0, max: 65535, step: 1, category: "Collision", bitmask: { source: "collisionLayers" }, shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionQueryBudget: { min: 0, max: 4096, step: 1, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionMaxDistance: { min: 0, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionFallback: { enum: [{ label: 'Floor', value: 0 }, { label: 'Skip', value: 1 }], category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionEvents: { category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionEventBudget: { min: 0, max: 1024, step: 1, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionThickness: { min: 0, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionBounce: { min: 0, max: 1, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionFriction: { min: 0, max: 1, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
            collisionLifetimeLoss: { min: 0, max: 1, category: "Collision", shownWhen: { field: "collisionEnabled", values: [1] } },
        },
    },
    ParticleForceField: {
        defaults: {
            type: 0,
            strength: 200,
            radius: 0,
            direction: { x: 1, y: 0, z: 0 },
            falloff: true,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            type: { enum: [{ label: 'Directional', value: 0 }, { label: 'Point', value: 1 }, { label: 'Vortex', value: 2 }, { label: 'Drag', value: 3 }], category: "Field" },
            strength: { category: "Field" },
            radius: { min: 0, category: "Field" },
            direction: { category: "Field" },
            falloff: { category: "Field" },
        },
    },
    PlanarReflection: {
        defaults: {
            axis: 1,
            clipOffset: 0.02,
            cullingMask: 4294967295,
            quality: 0,
            resolutionScale: 0.5,
            maxSize: 1024,
            update: 0,
            updatesPerSecond: 30,
            revision: 0,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            axis: { enum: [{ label: 'X', value: 0 }, { label: 'Y', value: 1 }, { label: 'Z', value: 2 }], tooltip: "Local normal axis, transformed with the entity. Y for a floor, Z for a mirror.", category: "Capture" },
            clipOffset: { min: 0, step: 0.005, tooltip: "Clip offset in world units; excludes geometry behind the reflecting plane.", category: "Capture" },
            cullingMask: { tooltip: "Sorting-layer bits captured by the reflection. The receiving surface and screen UI are excluded.", category: "Capture", bitmask: { source: "sortingLayers" } },
            quality: { enum: [{ label: 'Project', value: 0 }, { label: 'Custom', value: 1 }], category: "Quality" },
            resolutionScale: { min: 0.125, max: 1, step: 0.125, category: "Quality", shownWhen: { field: "quality", values: [1] } },
            maxSize: { min: 64, max: 4096, step: 64, category: "Quality", shownWhen: { field: "quality", values: [1] } },
            update: { enum: [{ label: 'EveryFrame', value: 0 }, { label: 'FixedRate', value: 1 }, { label: 'OnDemand', value: 2 }], tooltip: "Only the reflection capture; never limits the main scene frame rate.", category: "Quality", shownWhen: { field: "quality", values: [1] } },
            updatesPerSecond: { min: 1, max: 120, category: "Quality", shownWhen: { field: "update", values: [1] } },
            revision: { advanced: true },
        },
    },
    ReflectionProbe: {
        defaults: {
            reflection: 0,
            halfExtents: { x: 200, y: 200, z: 200 },
            slot: 0,
            enabled: true,
        },
        assetFields: [{ field: 'reflection', type: 'environment' as AssetFieldType }],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            reflection: { tooltip: "The scene's baked reflections (the baker writes this)." },
            halfExtents: { min: 0, tooltip: "Half the box this probe answers inside, from the entity's position." },
            slot: { min: 0, tooltip: "Which column of the atlas this probe occupies (the baker writes this).", advanced: true },
            enabled: { tooltip: "Off: what stands inside this box reflects the sky again." },
        },
    },
    RigidBody2D: {
        defaults: {
            bodyType: 2,
            gravityScale: 1,
            linearDamping: 0,
            angularDamping: 0,
            fixedRotation: false,
            bullet: false,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            bodyType: { enum: [{ label: 'Static', value: 0 }, { label: 'Kinematic', value: 1 }, { label: 'Dynamic', value: 2 }] },
        },
    },
    RigidBody3D: {
        defaults: {
            bodyType: 2,
            gravityScale: 1,
            linearDamping: 0.05,
            angularDamping: 0.05,
            mass: 0,
            fixedRotation: false,
            layer: 0,
            continuousCollision: false,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            bodyType: { enum: [{ label: 'Static', value: 0 }, { label: 'Kinematic', value: 1 }, { label: 'Dynamic', value: 2 }] },
            gravityScale: { min: 0 },
            linearDamping: { min: 0 },
            angularDamping: { min: 0 },
            mass: { min: 0, tooltip: "Kilograms. 0 = from its shape at the density of water (a ball of 10 cm radius is 4.2 kg)." },
            layer: { min: 0, max: 15, advanced: true },
            continuousCollision: { advanced: true },
        },
    },
    SegmentCollider2D: {
        defaults: {
            point1: { x: -0.5, y: 0 },
            point2: { x: 0.5, y: 0 },
            density: 1,
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
            categoryBits: 1,
            maskBits: 65535,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    ShadowCaster2D: {
        defaults: {
            size: { x: 32, y: 32 },
            path: [],
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [],
        entityFields: [],
        listFields: ['path'],
        colorFields: [],
        animatableFields: ['size.x', 'size.y'],
        fields: {
            size: { min: 0, tooltip: "Occluder box size in world units (centred on the entity, turning with it). Unused when the caster has an outline." },
        },
    },
    ShapeRenderer: {
        defaults: {
            shapeType: 0,
            color: { r: 1, g: 1, b: 1, a: 1 },
            size: { x: 100, y: 100 },
            cornerRadius: 0,
            layer: 0,
            parallax: { x: 1, y: 1 },
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [],
        entityFields: [],
        colorFields: ['color'],
        animatableFields: [],
        fields: {
            shapeType: { enum: [{ label: 'Circle', value: 0 }, { label: 'Capsule', value: 1 }, { label: 'RoundedRect', value: 2 }] },
            cornerRadius: { min: 0 },
            layer: { step: 1, enumSource: "sortingLayers" },
            parallax: { tooltip: "Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).", advanced: true },
        },
    },
    SortingGroup: {
        defaults: {
            layer: 0,
            order: 0,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            layer: { step: 1, tooltip: "Sorting layer for the entire group — members no longer state their own.", enumSource: "sortingLayers" },
            order: { min: -128, max: 127, step: 1, tooltip: "Draw order of the whole group inside its sorting layer — higher draws on top." },
        },
    },
    SphereCollider3D: {
        defaults: {
            radius: 50,
            center: { x: 0, y: 0, z: 0 },
            friction: 0.3,
            restitution: 0,
            isSensor: false,
            enabled: true,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            radius: { min: 0 },
            friction: { min: 0 },
            restitution: { min: 0, max: 1 },
        },
    },
    SpineAnimation: {
        defaults: {
            skeletonPath: '',
            atlasPath: '',
            skin: '',
            animation: '',
            timeScale: 1,
            loop: true,
            playing: true,
            flipX: false,
            flipY: false,
            color: { r: 1, g: 1, b: 1, a: 1 },
            layer: 0,
            skeletonScale: 1,
            material: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'material', type: 'material' as AssetFieldType }],
        skeletal: { skeletonField: 'skeletonPath', atlasField: 'atlasPath', runtime: 'spine' },
        entityFields: [],
        colorFields: ['color'],
        animatableFields: [],
        fields: {
            skin: { enumSource: "spineSkins" },
            animation: { enumSource: "spineAnimations" },
            timeScale: { min: 0 },
            layer: { step: 1, enumSource: "sortingLayers" },
            skeletonScale: { min: 0 },
        },
    },
    SpringBone: {
        defaults: {
            enabled: true,
            stiffness: 0.1,
            drag: 0.5,
            gravity: { x: 0, y: -980, z: 0 },
            wind: { x: 0, y: 0, z: 0 },
            windGust: 0,
            windFrequency: 0.5,
            endLength: 0,
            radius: 0,
            weight: 1,
            colliders: [],
        },
        assetFields: [],
        entityFields: ['colliders'],
        listFields: ['colliders'],
        colorFields: [],
        animatableFields: [],
        fields: {
            enabled: { tooltip: "Off leaves the chain exactly as the animation poses it." },
            stiffness: { min: 0, max: 1, step: 0.01, slider: true, tooltip: "How hard each bone is pulled back toward its animated pose. 0 hangs free, 1 follows the animation exactly.", category: "Motion" },
            drag: { min: 0, max: 1, step: 0.01, slider: true, tooltip: "How much of its speed a bone loses each frame. Higher settles sooner.", category: "Motion" },
            gravity: { tooltip: "Gravity on the chain, in world units a second squared (world y is up).", category: "Motion" },
            wind: { tooltip: "A steady wind on the chain, in world units a second squared. Zero is still air.", category: "Wind" },
            windGust: { min: 0, max: 1, step: 0.01, slider: true, tooltip: "How far gusts swing the wind's strength. 0 is a steady wind, 1 takes it from calm to twice its strength.", category: "Wind" },
            windFrequency: { min: 0, step: 0.05, tooltip: "Gusts a second.", category: "Wind" },
            endLength: { min: 0, step: 0.1, tooltip: "Length of the tip past each end bone, in world units. 0 leaves the end bones unsimulated.", category: "Chain" },
            radius: { min: 0, step: 0.1, tooltip: "Thickness of the strand, in world units, kept clear of the colliders.", category: "Chain" },
            weight: { min: 0, max: 1, step: 0.01, slider: true, tooltip: "How much of the simulation is used. 0 is the animation alone.", category: "Chain" },
            colliders: { tooltip: "Entities with a SpringBoneCollider that this chain is kept out of (the head, the shoulders).", category: "Collision" },
        },
    },
    SpringBoneCollider: {
        defaults: {
            shape: 0,
            radius: 10,
            height: 20,
            offset: { x: 0, y: 0, z: 0 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            shape: { enum: [{ label: 'Sphere', value: 0 }, { label: 'Capsule', value: 1 }], tooltip: "Sphere, or a capsule along the entity's own Y axis.", category: "Shape" },
            radius: { min: 0, step: 0.1, tooltip: "Radius in world units, before the entity's scale.", category: "Shape" },
            height: { min: 0, step: 0.1, tooltip: "A capsule's length between the centres of its end spheres, in world units before scale.", category: "Shape", shownWhen: { field: "shape", values: [1] } },
            offset: { tooltip: "Where the centre of the shape is, in the entity's own space.", category: "Shape" },
        },
    },
    Sprite: {
        defaults: {
            texture: 0,
            color: { r: 1, g: 1, b: 1, a: 1 },
            size: { x: 1, y: 1 },
            pivot: { x: 0.5, y: 0.5 },
            uvOffset: { x: 0, y: 0 },
            uvScale: { x: 1, y: 1 },
            layer: 0,
            order: 0,
            maskInteraction: 0,
            lit: false,
            flipX: false,
            flipY: false,
            drawMode: 0,
            tileSize: { x: 0, y: 0 },
            tileSpacing: { x: 0, y: 0 },
            parallax: { x: 1, y: 1 },
            material: 0,
            enabled: true,
        },
        editorDefaults: {
            size: { x: 100, y: 100 },
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'texture', type: 'texture' as AssetFieldType }, { field: 'material', type: 'material' as AssetFieldType }],
        entityFields: [],
        colorFields: ['color'],
        animatableFields: ['color.r', 'color.g', 'color.b', 'color.a', 'size.x', 'size.y'],
        fields: {
            color: { tooltip: "Tint multiplied into the texture (white = unchanged)." },
            pivot: { tooltip: "Anchor point the sprite rotates and scales about, as a fraction of its size (0.5,0.5 = centre). Values outside 0–1 sit off the sprite.", normalizedOf: "size" },
            uvOffset: { advanced: true },
            uvScale: { advanced: true },
            layer: { step: 1, tooltip: "Sorting layer — controls draw order across sprites.", enumSource: "sortingLayers" },
            order: { min: -128, max: 127, step: 1, tooltip: "Draw order inside the sorting layer — higher draws on top. Overrides the layer's Y-sort or depth ordering; leave 0 to keep it." },
            maskInteraction: { enum: [{ label: 'None', value: 0 }, { label: 'VisibleInside', value: 1 }, { label: 'VisibleOutside', value: 2 }], tooltip: "Whether a SpriteMask drawn before this sprite clips it, and which side survives." },
            lit: { tooltip: "Receive 2D lights: Light entities light this sprite (flat normal). A custom material overrides this." },
            drawMode: { enum: [{ label: 'Auto', value: 0 }, { label: 'Simple', value: 1 }, { label: 'Tiled', value: 2 }, { label: 'NineSlice', value: 3 }], tooltip: "Draw mode: Auto infers from tile size and the texture's 9-slice border; the others override it." },
            tileSize: { advanced: true },
            tileSpacing: { advanced: true },
            parallax: { tooltip: "Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).", advanced: true },
            material: { advanced: true },
        },
    },
    SpriteMask: {
        defaults: {
            alphaCutoff: 0,
            limitRange: false,
            rangeEndLayer: 0,
            rangeEndOrder: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            alphaCutoff: { min: 0, max: 1, slider: true, tooltip: "Cut to the sprite's shape instead of its box: fragments below this alpha do not mask." },
            limitRange: { tooltip: "Limit how far this mask reaches; off = every sprite drawn after it." },
            rangeEndLayer: { step: 1, tooltip: "Last sorting layer this mask reaches.", enumSource: "sortingLayers", shownWhen: { field: "limitRange", values: [1] } },
            rangeEndOrder: { min: -128, max: 127, step: 1, tooltip: "Last order inside that layer this mask reaches, inclusive.", shownWhen: { field: "limitRange", values: [1] } },
        },
    },
    TilemapLayer: {
        defaults: {
            cellSize: { x: 32, y: 32 },
            orientation: 0,
            hexSideLength: 0,
            staggerAxis: 0,
            staggerIndex: 0,
            originOffset: { x: 0, y: 0 },
            tileset: 0,
            tilesetColumns: 1,
            renderLayer: 0,
            tintColor: { r: 1, g: 1, b: 1, a: 1 },
            opacity: 1,
            parallaxFactor: { x: 1, y: 1 },
            visible: true,
            lit: false,
        },
        renderableField: 'visible',
        assetFields: [{ field: 'tileset', type: 'texture' as AssetFieldType }],
        entityFields: [],
        colorFields: ['tintColor'],
        animatableFields: ['tintColor.r', 'tintColor.g', 'tintColor.b', 'tintColor.a', 'opacity'],
        fields: {
            orientation: { enum: [{ label: 'Orthogonal', value: 0 }, { label: 'Isometric', value: 1 }, { label: 'Staggered', value: 2 }, { label: 'Hexagonal', value: 3 }], tooltip: "Grid layout: orthogonal, isometric, staggered, or hexagonal." },
            hexSideLength: { min: 0, step: 1, tooltip: "Hexagonal side length in px (0 = a regular pointy hex = tileHeight/2). Ignored unless orientation is Hexagonal.", shownWhen: { field: "orientation", values: [3] } },
            staggerAxis: { enum: [{ label: 'Y', value: 0 }, { label: 'X', value: 1 }], tooltip: "Stagger axis (staggered/hex): Y shifts rows, X shifts columns.", shownWhen: { field: "orientation", values: [2, 3] } },
            staggerIndex: { enum: [{ label: 'Odd', value: 0 }, { label: 'Even', value: 1 }], tooltip: "Which lines carry the half-cell shift (staggered/hex).", shownWhen: { field: "orientation", values: [2, 3] } },
            tilesetColumns: { min: 1, step: 1 },
            renderLayer: { step: 1, enumSource: "sortingLayers" },
            opacity: { min: 0, max: 1, slider: true, tooltip: "Layer transparency (0 = invisible, 1 = opaque)." },
            lit: { tooltip: "Receive 2D lights: Light entities light this layer's tiles (flat normal)." },
        },
    },
    TrailRenderer: {
        defaults: {
            time: 0.5,
            minVertexDistance: 5,
            emitting: true,
            startWidth: 20,
            endWidth: 0,
            startColor: { r: 1, g: 1, b: 1, a: 1 },
            endColor: { r: 1, g: 1, b: 1, a: 0 },
            texture: 0,
            blendMode: 0,
            layer: 0,
            material: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'texture', type: 'texture' as AssetFieldType }, { field: 'material', type: 'material' as AssetFieldType }],
        entityFields: [],
        colorFields: ['startColor', 'endColor'],
        animatableFields: ['startColor.r', 'startColor.g', 'startColor.b', 'startColor.a', 'endColor.r', 'endColor.g', 'endColor.b', 'endColor.a'],
        fields: {
            time: { min: 0, tooltip: "Seconds each trail point lives before it fades out of the tail.", category: "Trail" },
            minVertexDistance: { min: 0, tooltip: "Min world distance moved before a new trail point is recorded.", category: "Trail" },
            emitting: { tooltip: "Record new points. False = freeze and let the streak fade in place.", category: "Trail" },
            startWidth: { min: 0, tooltip: "Full ribbon width at the head (newest point).", category: "Width" },
            endWidth: { min: 0, tooltip: "Full ribbon width at the tail (oldest point).", category: "Width" },
            startColor: { tooltip: "Color at the head (newest point).", category: "Color" },
            endColor: { tooltip: "Color at the tail (oldest point) — usually alpha 0 to fade out.", category: "Color" },
            texture: { category: "Rendering" },
            blendMode: { tooltip: "Blend mode: 0 Normal, 1 Additive (glow), 2 Multiply, …", category: "Rendering" },
            layer: { step: 1, tooltip: "Sorting layer — controls draw order across renderables.", category: "Rendering", enumSource: "sortingLayers" },
            material: { category: "Rendering", advanced: true },
        },
    },
    Transform: {
        defaults: {
            position: { x: 0, y: 0, z: 0 },
            rotation: { w: 1, x: 0, y: 0, z: 0 },
            scale: { x: 1, y: 1, z: 1 },
            worldPosition: { x: 0, y: 0, z: 0 },
            worldRotation: { w: 1, x: 0, y: 0, z: 0 },
            worldScale: { x: 1, y: 1, z: 1 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: ['position.x', 'position.y', 'position.z', 'rotation.x', 'rotation.y', 'rotation.z', 'rotation.w', 'rotation.angle', 'scale.x', 'scale.y', 'scale.z'],
        replicatedFields: ['position', 'rotation', 'scale'],
        readonlyFields: ['worldPosition', 'worldRotation', 'worldScale'],
        fields: {
            position: { tooltip: "Local position in world units, relative to the parent." },
            rotation: { tooltip: "Local rotation in degrees, applied X then Y then Z. 2D content turns about Z alone." },
            scale: { tooltip: "Local scale per axis (1 = original size; negative flips)." },
        },
    },
    UIInteraction: {
        defaults: {
            hovered: false,
            pressed: false,
            justPressed: false,
            justReleased: false,
        },
        transient: true,
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
    },
    UIMask: {
        defaults: {
            enabled: true,
            mode: 0,
            alphaCutoff: 0,
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            mode: { enum: [{ label: 'Scissor', value: 0 }, { label: 'Stencil', value: 1 }] },
            alphaCutoff: { tooltip: "Stencil only: above 0, clip to the mask sprite's shape instead of its box." },
        },
    },
    UINode: {
        defaults: {
            position: 0,
            display: 0,
            opacity: 1,
            pointerEvents: 0,
            width: { value: 0, unit: 2 },
            height: { value: 0, unit: 2 },
            minWidth: { value: 0, unit: 2 },
            minHeight: { value: 0, unit: 2 },
            maxWidth: { value: 0, unit: 2 },
            maxHeight: { value: 0, unit: 2 },
            flexGrow: 0,
            flexShrink: 1,
            flexBasis: { value: 0, unit: 2 },
            alignSelf: 0,
            marginLeft: { value: 0, unit: 0 },
            marginTop: { value: 0, unit: 0 },
            marginRight: { value: 0, unit: 0 },
            marginBottom: { value: 0, unit: 0 },
            insetLeft: { value: 0, unit: 2 },
            insetTop: { value: 0, unit: 2 },
            insetRight: { value: 0, unit: 2 },
            insetBottom: { value: 0, unit: 2 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        fields: {
            position: { enum: [{ label: 'Relative', value: 0 }, { label: 'Absolute', value: 1 }] },
            display: { enum: [{ label: 'Flex', value: 0 }, { label: 'None', value: 1 }], tooltip: "None removes this node and its whole subtree from layout, rendering and input." },
            opacity: { min: 0, max: 1, tooltip: "Subtree opacity, multiplied down the tree. Fades this node and everything under it." },
            pointerEvents: { enum: [{ label: 'Auto', value: 0 }, { label: 'None', value: 1 }, { label: 'Receive', value: 2 }], tooltip: "None makes this node and its subtree transparent to the pointer — hits pass through to what is behind." },
            alignSelf: { enum: [{ label: 'Auto', value: 0 }, { label: 'Start', value: 1 }, { label: 'Center', value: 2 }, { label: 'End', value: 3 }, { label: 'Stretch', value: 4 }] },
        },
    },
    UIScroll: {
        defaults: {
            enabled: true,
            content: 0,
            horizontal: false,
            vertical: true,
            movement: 0,
            wheelSpeed: 1,
            dragScroll: true,
            decelerationRate: 0.135,
        },
        assetFields: [],
        entityFields: ['content'],
        colorFields: [],
        animatableFields: [],
        fields: {
            content: { tooltip: "The child that scrolls inside this node. Leave empty to use the first child." },
            movement: { enum: [{ label: 'Clamped', value: 0 }, { label: 'Elastic', value: 1 }], tooltip: "Clamped stops at the ends; Elastic overshoots and springs back." },
            wheelSpeed: { min: 0 },
            decelerationRate: { min: 0, max: 1, tooltip: "Fraction of flick velocity kept per second. 0 stops on release." },
        },
    },
    UIVisual: {
        defaults: {
            visualType: 0,
            texture: 0,
            color: { r: 1, g: 1, b: 1, a: 1 },
            fit: 0,
            uvOffset: { x: 0, y: 0 },
            uvScale: { x: 1, y: 1 },
            sliceBorder: { x: 0, y: 0, z: 0, w: 0 },
            tileSize: { x: 32, y: 32 },
            fillMethod: 0,
            fillOrigin: 0,
            fillAmount: 1,
            material: 0,
            enabled: true,
        },
        renderableField: 'enabled',
        assetFields: [{ field: 'texture', type: 'texture' as AssetFieldType }, { field: 'material', type: 'material' as AssetFieldType }],
        entityFields: [],
        colorFields: ['color'],
        animatableFields: ['color.r', 'color.g', 'color.b', 'color.a', 'fillAmount'],
        fields: {
            visualType: { enum: [{ label: 'None', value: 0 }, { label: 'SolidColor', value: 1 }, { label: 'Image', value: 2 }, { label: 'NineSlice', value: 3 }, { label: 'Tiled', value: 4 }, { label: 'Filled', value: 5 }] },
            fit: { enum: [{ label: 'Fill', value: 0 }, { label: 'Contain', value: 1 }, { label: 'Cover', value: 2 }], tooltip: "How the image fits its box: Fill stretches, Contain letterboxes it whole, Cover fills and crops." },
            fillMethod: { enum: [{ label: 'Horizontal', value: 0 }, { label: 'Vertical', value: 1 }, { label: 'Radial360', value: 2 }, { label: 'Radial90', value: 3 }, { label: 'Radial180', value: 4 }] },
            fillOrigin: { enum: [{ label: 'Left', value: 0 }, { label: 'Right', value: 1 }, { label: 'Bottom', value: 2 }, { label: 'Top', value: 3 }] },
        },
    },
    Velocity: {
        defaults: {
            linear: { x: 0, y: 0, z: 0 },
            angular: { x: 0, y: 0, z: 0 },
        },
        assetFields: [],
        entityFields: [],
        colorFields: [],
        animatableFields: [],
        replicatedFields: ['linear', 'angular'],
    },
};

// C++-backed builtin component data shapes — the ES_COMPONENT struct fields,
// generated so the TS field types cannot drift from the C++ structs. A consumer
// adds any TS-only authoring field (e.g. Camera.showFrustum) by extending these.

/**
 * The fields of the engine's `Billboard` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface BillboardData {
    mode: BillboardMode;
    enabled: boolean;
}

export interface BitmapTextData {
    text: string;
    color: Color;
    fontSize: number;
    align: TextAlign;
    spacing: number;
    parallax: Vec2;
    layer: number;
    font: number;
    enabled: boolean;
}

export interface BoxCollider2DData {
    halfExtents: Vec2;
    offset: Vec2;
    density: number;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
    categoryBits: number;
    maskBits: number;
}

export interface BoxCollider3DData {
    halfExtents: Vec3;
    center?: Vec3;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
}

export interface CameraData {
    projectionType: ProjectionType;
    fov: number;
    orthoSize: number;
    nearPlane: number;
    farPlane: number;
    aspectRatio: number;
    isActive: boolean;
    priority: number;
    viewport: Vec4;
    clearFlags: ClearFlags;
    pixelPerfect: boolean;
    cullingMask: number;
    renderTarget: number;
}

export interface CanvasData {
    designResolution: Vec2;
    pixelsPerUnit: number;
    scaleMode: CanvasScaleMode;
    matchWidthOrHeight: number;
    backgroundColor: Color;
    layer: number;
}

export interface CapsuleCollider2DData {
    radius: number;
    halfHeight: number;
    offset: Vec2;
    density: number;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
    categoryBits: number;
    maskBits: number;
}

export interface CapsuleCollider3DData {
    radius: number;
    halfHeight: number;
    center?: Vec3;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
}

export interface CharacterController3DData {
    velocity: Vec3;
    radius: number;
    halfHeight: number;
    maxSlope: number;
    stepHeight: number;
    snapDown: number;
    mass: number;
    pushForce: number;
    enabled: boolean;
    layer: number;
    isOnFloor: boolean;
    floorNormal: Vec3;
    realVelocity: Vec3;
}

/**
 * The fields of the engine's `Children` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @public
 */
export interface ChildrenData {
    entities: Entity[];
}

export interface CircleCollider2DData {
    radius: number;
    offset: Vec2;
    density: number;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
    categoryBits: number;
    maskBits: number;
}

/**
 * The fields of the engine's `ContentRect` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @experimental
 */
export interface ContentRectData {
    size: Vec2;
    pivot: Vec2;
}

export interface ConvexCollider3DData {
    mesh: number;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
}

export interface DraggableData {
    enabled: boolean;
    dragThreshold: number;
    lockX: boolean;
    lockY: boolean;
    constrainMin: boolean;
    constraintMin: Vec2;
    constrainMax: boolean;
    constraintMax: Vec2;
}

export interface DragonBonesAnimationData {
    skeletonPath: string;
    atlasPath: string;
    armature: string;
    animation: string;
    timeScale: number;
    loop: boolean;
    playing: boolean;
    fadeInTime: number;
    flipX: boolean;
    flipY: boolean;
    color: Color;
    layer: number;
    skeletonScale: number;
    material: number;
    enabled: boolean;
}

export interface FlexContainerData {
    direction: FlexDirection;
    wrap: FlexWrap;
    justifyContent: JustifyContent;
    alignItems: AlignItems;
    alignContent: AlignContent;
    gap: Vec2;
    padding: Padding;
}

/**
 * The fields of the engine's `GroupOpacity` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface GroupOpacityData {
    opacity: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `Impostor` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface ImpostorData {
    screenSize: number;
    frames: number;
    resolution: number;
    enabled: boolean;
}

export interface InteractableData {
    enabled: boolean;
    blockRaycast: boolean;
    raycastTarget: boolean;
}

/**
 * The fields of the engine's `LODGroup` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface LODGroupData {
    lod1: number;
    lod2: number;
    lod3: number;
    lod1Size: number;
    lod2Size: number;
    lod3Size: number;
    cullSize: number;
    hysteresis: number;
    enabled: boolean;
}

export interface LightData {
    type: LightType;
    color: Color;
    intensity: number;
    radius: number;
    innerRadius: number;
    falloff: number;
    inverseSquare: boolean;
    shadowStrength: number;
    layerMin?: number;
    layerMax?: number;
    cookie: number;
    cookieSize: Vec2;
    innerAngle: number;
    outerAngle: number;
    shadowSoftness: number;
    sourceAngle: number;
    shadowDistance: number;
    meshShadows: boolean;
    shadowExtent: number;
    followEnvironmentSun: boolean;
    aimFollowedSun: boolean;
    environment: number;
    environmentRotation: number;
    drawEnvironment: boolean;
    reflectionScale: number;
    diffuseScale: number;
    diffuseTint: Color;
    reflectionSaturation: number;
    bakedTint: Color;
    hemisphere: boolean;
    groundColor: Color;
    enabled: boolean;
}

export interface LightProbeVolumeData {
    probes: number;
    capture: boolean;
    captureInterval: number;
    halfExtents: Vec3;
    spacing: number;
    enabled: boolean;
}

export interface MeshCollider3DData {
    mesh: number;
    friction: number;
    restitution: number;
    layer: number;
    enabled: boolean;
}

export interface MeshInstancesData {
    lod1Mesh: number;
    lodDistance: number;
    minDistance: number;
    drawDistance: number;
    shadowDistance: number;
}

export interface MeshLightmapData {
    lightmap: number;
    scaleOffset: Vec4;
}

export interface MeshMorphData {
    weights: number[];
}

export interface MeshRendererData {
    texture: number;
    normalMap: number;
    color: Color;
    layer: number;
    opaque: boolean;
    cullBackfaces: boolean;
    lit: boolean;
    castShadows: boolean;
    parallax: Vec2;
    material: number;
    enabled: boolean;
    mesh: number;
}

export interface MeshSkinData {
    joints: Entity[];
}

/**
 * The fields of the engine's `Occluder` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface OccluderData {
    halfExtents: Vec3;
    enabled: boolean;
}

/**
 * The fields of the engine's `Parent` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @public
 */
export interface ParentData {
    entity: Entity;
}

/**
 * The fields of the engine's `ParticleCollider` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface ParticleColliderData {
    shape: ParticleColliderShape;
    radius: number;
    halfHeight: number;
    halfExtents: Vec3;
    inverted: boolean;
    mask: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `ParticleEmitter` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface ParticleEmitterData {
    rate: number;
    burstCount: number;
    burstInterval: number;
    duration: number;
    simulationSpeed: number;
    startDelay: number;
    looping: boolean;
    playOnStart: boolean;
    maxParticles: number;
    gpuSimulation: boolean;
    lifetimeMin: number;
    lifetimeMax: number;
    shape: EmitterShape;
    shapeRadius: number;
    shapeSize: Vec3;
    shapeAngle: number;
    speedMin: number;
    speedMax: number;
    angleSpreadMin: number;
    angleSpreadMax: number;
    startSizeMin: number;
    startSizeMax: number;
    endSizeMin: number;
    endSizeMax: number;
    sizeEasing: ParticleEasing;
    startColor: Color;
    endColor: Color;
    colorEasing: ParticleEasing;
    rotationMin: number;
    rotationMax: number;
    angularVelocityMin: number;
    angularVelocityMax: number;
    gravity: Vec3;
    damping: number;
    addedVelocityMin: Vec3;
    addedVelocityMax: Vec3;
    speedLimit: number;
    limitDampen: number;
    noiseStrength: number;
    noiseFrequency: number;
    noiseScrollSpeed: number;
    noiseOctaves: number;
    texture: number;
    spriteColumns: number;
    spriteRows: number;
    spriteFPS: number;
    spriteLoop: boolean;
    blendMode: number;
    layer: number;
    material: number;
    simulationSpace: SimulationSpace;
    renderMode: ParticleRenderMode;
    velocityScale: number;
    lengthScale: number;
    enabled: boolean;
    subEmitterTrigger: SubEmitterTrigger;
    subEmitterChance: number;
    subEmitterInheritVelocity: number;
    subEmitter: Entity;
    trailEnabled: boolean;
    trailWidth: number;
    trailPoints: number;
    trailMinDistance: number;
    collisionEnabled: boolean;
    collisionFloor: number;
    collisionMode: ParticleCollisionMode;
    collisionMask: number;
    collisionQueryBudget: number;
    collisionMaxDistance: number;
    collisionFallback: ParticleCollisionFallback;
    collisionEvents: boolean;
    collisionEventBudget: number;
    collisionThickness: number;
    collisionBounce: number;
    collisionFriction: number;
    collisionLifetimeLoss: number;
}

export interface ParticleForceFieldData {
    type: ForceFieldType;
    strength: number;
    radius: number;
    direction: Vec3;
    falloff: boolean;
    enabled: boolean;
}

/**
 * The fields of the engine's `PlanarReflection` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @experimental
 */
export interface PlanarReflectionData {
    axis: ReflectionAxis;
    clipOffset: number;
    cullingMask: number;
    quality: ReflectionQuality;
    resolutionScale: number;
    maxSize: number;
    update: ReflectionUpdate;
    updatesPerSecond: number;
    revision: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `ReflectionProbe` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface ReflectionProbeData {
    reflection: number;
    halfExtents: Vec3;
    slot: number;
    enabled: boolean;
}

export interface RigidBody2DData {
    bodyType: BodyType;
    gravityScale: number;
    linearDamping: number;
    angularDamping: number;
    fixedRotation: boolean;
    bullet: boolean;
    enabled: boolean;
}

export interface RigidBody3DData {
    bodyType: BodyType;
    gravityScale: number;
    linearDamping: number;
    angularDamping: number;
    mass: number;
    fixedRotation: boolean;
    layer: number;
    continuousCollision: boolean;
    enabled: boolean;
}

export interface SegmentCollider2DData {
    point1: Vec2;
    point2: Vec2;
    density: number;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
    categoryBits: number;
    maskBits: number;
}

export interface ShadowCaster2DData {
    size: Vec2;
    path: Vec2[];
    enabled: boolean;
}

export interface ShapeRendererData {
    shapeType: ShapeType;
    color: Color;
    size: Vec2;
    cornerRadius: number;
    layer: number;
    parallax: Vec2;
    enabled: boolean;
}

/**
 * The fields of the engine's `SortingGroup` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface SortingGroupData {
    layer: number;
    order: number;
    enabled: boolean;
}

export interface SphereCollider3DData {
    radius: number;
    center?: Vec3;
    friction: number;
    restitution: number;
    isSensor: boolean;
    enabled: boolean;
}

/**
 * The fields of the engine's `SpineAnimation` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface SpineAnimationData {
    skeletonPath: string;
    atlasPath: string;
    skin: string;
    animation: string;
    timeScale: number;
    loop: boolean;
    playing: boolean;
    flipX: boolean;
    flipY: boolean;
    color: Color;
    layer: number;
    skeletonScale: number;
    material: number;
    enabled: boolean;
}

export interface SpringBoneData {
    enabled: boolean;
    stiffness: number;
    drag: number;
    gravity: Vec3;
    wind: Vec3;
    windGust: number;
    windFrequency: number;
    endLength: number;
    radius: number;
    weight: number;
    colliders: Entity[];
}

export interface SpringBoneColliderData {
    shape: SpringBoneShape;
    radius: number;
    height: number;
    offset: Vec3;
}

/**
 * The fields of the engine's `Sprite` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @public
 */
export interface SpriteData {
    texture: number;
    color: Color;
    size: Vec2;
    pivot: Vec2;
    uvOffset: Vec2;
    uvScale: Vec2;
    layer: number;
    order?: number;
    maskInteraction?: SpriteMaskInteraction;
    lit: boolean;
    flipX: boolean;
    flipY: boolean;
    drawMode?: SpriteDrawMode;
    tileSize: Vec2;
    tileSpacing: Vec2;
    parallax: Vec2;
    material: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `SpriteMask` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface SpriteMaskData {
    alphaCutoff: number;
    limitRange: boolean;
    rangeEndLayer: number;
    rangeEndOrder: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `TilemapLayer` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface TilemapLayerData {
    cellSize: Vec2;
    orientation: TilemapOrientation;
    hexSideLength: number;
    staggerAxis: TilemapStaggerAxis;
    staggerIndex: TilemapStaggerIndex;
    originOffset: Vec2;
    tileset: number;
    tilesetColumns: number;
    renderLayer: number;
    tintColor: Color;
    opacity: number;
    parallaxFactor: Vec2;
    visible: boolean;
    lit?: boolean;
}

export interface TrailRendererData {
    time: number;
    minVertexDistance: number;
    emitting: boolean;
    startWidth: number;
    endWidth: number;
    startColor: Color;
    endColor: Color;
    texture: number;
    blendMode: number;
    layer: number;
    material: number;
    enabled: boolean;
}

/**
 * The fields of the engine's `Transform` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @public
 */
export interface TransformData {
    position: Vec3;
    rotation: Quat;
    scale: Vec3;
    worldPosition: Vec3;
    worldRotation: Quat;
    worldScale: Vec3;
}

export interface UIInteractionData {
    hovered: boolean;
    pressed: boolean;
    justPressed: boolean;
    justReleased: boolean;
}

export interface UIMaskData {
    enabled: boolean;
    mode: MaskMode;
    alphaCutoff: number;
}

export interface UINodeData {
    position: UIPositionType;
    display: UIDisplay;
    opacity: number;
    pointerEvents: UIPointerEvents;
    width: Dimension;
    height: Dimension;
    minWidth: Dimension;
    minHeight: Dimension;
    maxWidth: Dimension;
    maxHeight: Dimension;
    flexGrow: number;
    flexShrink: number;
    flexBasis: Dimension;
    alignSelf: AlignSelf;
    marginLeft: Dimension;
    marginTop: Dimension;
    marginRight: Dimension;
    marginBottom: Dimension;
    insetLeft: Dimension;
    insetTop: Dimension;
    insetRight: Dimension;
    insetBottom: Dimension;
}

export interface UIScrollData {
    enabled: boolean;
    content: Entity;
    horizontal: boolean;
    vertical: boolean;
    movement: ScrollMovement;
    wheelSpeed: number;
    dragScroll: boolean;
    decelerationRate: number;
}

/**
 * The fields of the engine's `UIVisual` component, generated from
 * the C++ struct so the two shapes cannot drift.
 *
 * @beta
 */
export interface UIVisualData {
    visualType: UIVisualType;
    texture: number;
    color: Color;
    fit: UIVisualFit;
    uvOffset: Vec2;
    uvScale: Vec2;
    sliceBorder: Vec4;
    tileSize: Vec2;
    fillMethod: UIFillMethod;
    fillOrigin: UIFillOrigin;
    fillAmount: number;
    material: number;
    enabled: boolean;
}

export interface VelocityData {
    linear: Vec3;
    angular: Vec3;
}