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.

850 B
Raw Blame
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
 * @file    entityLayout.generated.ts
 * @brief   The packed Entity split, from `Entity::Layout` in core/Types.hpp
 * @details Generated by EHT - DO NOT EDIT
 *
 * A handle crosses as a bare u32, so a split this disagrees with decodes to
 * another entity rather than failing. It is in the ABI layout hash for that
 * reason: a WASM binary and an SDK bundle built from different splits refuse
 * each other at `connect()`.
 *
 * No imports on purpose — `types.ts` re-exports these, and everything else
 * reaches them there.
 */

/** Low bits of a handle: the registry slot. */
export const ENTITY_INDEX_BITS = 22;

/** High bits: bumped when a slot is recycled, so a stale handle compares unequal. */
export const ENTITY_GEN_BITS = 10;