🦚 Peacock Unified

🏗️ App Invariants

Layer 2 — application architecture · 1,820 documents

IDDocumentSource
app_invariants__1d20857c59083886INVARIANT: The Plane's vertex data generation via `GenerateGridVerts` must be performed immediately after any grid size or tiling configuration change. SHADOW: Failing to regenerate vertices upon…—
app_invariants__45dab904f619df8cINVARIANT: The Plane's UV coordinates must be updated in sync with its frame or grid configuration to ensure correct texture mapping. SHADOW: Mismatched UV coordinates cause textures to appear…—
app_invariants__bd0e925af2d64a5fINVARIANT: The `viewPosition.z` must be updated dynamically based on the `Plane.height` and the field of view to maintain correct perspective rendering. SHADOW: An incorrect `viewPosition.z` value…—
app_invariants__f77735ac329afc05INVARIANT: The PointLight's internal `_radius` property must be synchronized with its `width` and `height` properties whenever the radius is modified. SHADOW: Discrepancies between `_radius` and the…—
app_invariants__c036f74a68dcdd0bINVARIANT: PointLight Game Objects must be batched together on the display list for optimal rendering performance. SHADOW: Scattering PointLights throughout the display list incurs significant…—
app_invariants__202f47e58f46752cINVARIANT: RenderTextures must maintain a stable relationship between their internal canvas, the DynamicTexture, and the Image Game Object. SHADOW: Breaking this relationship during resize,…—
app_invariants__ae710ed67f54bd41INVARIANT: Any dynamically generated texture data (e.g., from `saveTexture`) must be properly managed and cleaned up upon `RenderTexture` destruction to prevent memory leaks. SHADOW: Failure to…—
app_invariants__c3f32688fb31ab7cINVARIANT: The Rope's vertex, UV, color, and alpha arrays must be correctly sized and synchronized with the number of points provided. SHADOW: Mismatched array sizes or incorrect data…—
app_invariants__094b9296f764d6e4INVARIANT: Any modification to the `points` array directly must be immediately followed by a `setDirty` call to ensure vertex recalculation before the next render. SHADOW: Skipping `setDirty` after…—
app_invariants__fb7bc14ab8446ad8INVARIANT: The Rope's `updateVertices` method must be called whenever the `dirty` flag is true to ensure the vertex buffer is synchronized with the current geometry. SHADOW: If `updateVertices` is…—
app_invariants__83e912c5ce7b4ce4INVARIANT: A Shader Game Object must have a valid `program` and `shader` instance before attempting to load or flush rendering data. SHADOW: Rendering without a valid shader program or shader…—
app_invariants__7b759927566993b8INVARIANT: Uniforms defined in the Shader's `uniforms` object must be correctly initialized with `uniformLocation` properties before `syncUniforms` is called. SHADOW: Missing `uniformLocation` will…—
app_invariants__0c09be25222a0252INVARIANT: The `load` and `flush` methods must be called in sequence during the rendering pipeline to ensure proper shader execution and buffer updates. SHADOW: Incorrect ordering or omission of…—
app_invariants__2453f7201d8c82b5INVARIANT: If rendering to a texture (`setRenderToTexture`), the projection matrix must be updated to match the target texture dimensions. SHADOW: An outdated projection matrix will cause the…—
app_invariants__f589e24faffdace3INVARIANT: Shape Game Objects must have their `pathData` and `pathIndexes` updated whenever their underlying geometry (`geom`) or drawing parameters (`isFilled`, `isStroked`, `closePath`)…—
app_invariants__ac32a15b439601f0INVARIANT: The `radius` property of a rounded Rectangle must not exceed half of the smallest dimension (width or height) to maintain geometric validity. SHADOW: Exceeding this limit will result in…—
app_invariants__a7ee7df96fdd99beINVARIANT: The `pathData` for a rounded Rectangle must be regenerated whenever the `width`, `height`, `radius`, or `isRounded` properties change. SHADOW: Failure to regenerate path data will result…—
app_invariants__330686ffc48bbfc5INVARIANT: The `ROPE_PIPELINE` must be explicitly set or implicitly inherited by a Rope Game Object. SHADOW: Without a bound pipeline, the Rope cannot be rendered, leading to silent failure or…—
app_invariants__ba2a14f648fdda83INVARIANT: The Text object's internal canvas dimensions must always match the calculated `width` and `height` values, adjusted by resolution. SHADOW: Discrepancies cause rendering to be clipped,…—
app_invariants__c3ede28fe8cef920INVARIANT: The `updateText` method must be called whenever the text content, style, padding, or resolution changes to ensure the internal canvas and texture are synchronized. SHADOW: Failing to call…—
app_invariants__18b0a76ab2944a4dINVARIANT: For RTL text rendering, the internal canvas must be added to the DOM (even if hidden) to enable browser-level BiDi text layout. SHADOW: Without DOM presence, `context.direction = 'rtl'`…—
app_invariants__06d334d33b79e900INVARIANT: The `letterSpacing` property requires a fallback to character-by-character rendering, significantly impacting performance. SHADOW: Using `letterSpacing` bypasses efficient batch…—
app_invariants__bb2e25f2e905acbcINVARIANT: The Sprite's `anims` component must be correctly initialized to manage animation playback. SHADOW: An uninitialized or improperly managed `anims` component prevents animation playback,…—
app_invariants__882f291a99f44e99INVARIANT: When an animation frame changes, the Sprite's texture crop and vertices must be updated accordingly to reflect the new frame's geometry. SHADOW: Failure to update crop and vertices leads…—
app_invariants__18903b3d1752e98cINVARIANT: Power-of-Two (POT) Coercion for Seamless Texture Wrapping SHADOW: WebGL hardware requires textures to be Power-of-Two dimensions to utilize the GL_REPEAT wrap mode efficiently. If an NPOT…—
app_invariants__615ab59531697261INVARIANT: Buffer allocation must be offloaded to a managed pool to prevent GC-triggered frame drops. SHADOW: TileSprites and Video Snapshots require temporary HTMLCanvasElements for internal…—
app_invariants__f63386661bf8c081INVARIANT: Autoplay Media Unlocking via Interaction State Machine SHADOW: Modern browser security policies (MEI) forbid programmatic audio/video start without explicit user intent. The system…—
app_invariants__e368175855f4272dINVARIANT: Zero-Dimension Fragment Culling SHADOW: Rendering pipelines (WebGL/Canvas) must immediately abort if width or height equals zero. This prevents the GPU from processing degenerate matrices…—
app_invariants__4b01db93885ff109INVARIANT: Coordinate System Decoupling in Mesh Transformation SHADOW: The system enforces a strict boundary between local vertex coordinates (x, y, z) and projected/translated render coordinates…—
app_invariants__4b3c0d49f1aa95b1INVARIANT: Epsilon-Gated Intersection Checks SHADOW: Geometric intersection algorithms (like CircleToRectangle) must account for floating-point drift using hard-coded epsilon values (e.g.,…—
app_invariants__059a5e6083b98846INVARIANT: The WebGL resource lifecycle is strictly decoupled from the global environment via abstraction wrappers. SHADOW: WebGL resources (buffers, textures, programs) are vulnerable to context…—
app_invariants__4b7fd0f97189e750INVARIANT: Uniform and Attribute locations must never be cached across potential context loss events. SHADOW: WebGL location handles are context-specific. Storing these references in long-lived…—
app_invariants__31b7bad1922182a9INVARIANT: Framebuffer attachment validation is a mandatory barrier to render success. SHADOW: Framebuffers are unstable configurations. The system forces a check of the framebuffer status…—
app_invariants__4c07c7d445acc1eeINVARIANT: Texture source immutability is enforced through defensive texture binding/unbinding during updates. SHADOW: When updating a texture from a canvas or video source, the renderer must not…—
app_invariants__3664b12a2c6886afINVARIANT: Texture source mutations must trigger explicit synchronization or lifecycle refresh SHADOW: Canvas-backed textures rely on host memory state that is opaque to the GPU. Changing…—
app_invariants__242583a6ed728be3INVARIANT: Resource batching must be bounded by beginDraw/endDraw lifecycle SHADOW: Rendering pipelines are optimized for batch operations. Opening a draw cycle without a corresponding close forces…—
app_invariants__8ea3630ef778bee5INVARIANT: DynamicTexture re-initialization must perform atomic reset of all buffer pointers SHADOW: Internal pixel buffers (Uint8Array/Uint32Array) are views into specific memory addresses.…—
app_invariants__6e463c1ec7b2b222INVARIANT: Deferred List Mutation during Iteration SHADOW: Modifications to active timer or tween collections must be buffered in 'pending' arrays while an update loop is processing. Direct mutation…—
app_invariants__0855d3ff50019b34INVARIANT: Lag-Smoothing Delta Clamping SHADOW: If the system clock delta exceeds a threshold (maxLag), the step must be artificially capped to a predefined skip value. This prevents huge jumps in…—
app_invariants__942504564989e5faINVARIANT: Zero-Delay Recursion Prohibition SHADOW: Timer events with a delay of 0 and a repeat count > 0 must be rejected. Allowing zero-delay repeating events creates a synchronous infinite loop…—
app_invariants__c1d3a34114f34568INVARIANT: Coordinate Transformation Integrity SHADOW: World-to-tile coordinate mapping must inversely apply Camera Scroll, Camera Zoom, Layer Scale, and Scroll Factors. Any omission in this chain…—
app_invariants__066e06342af94ce7INVARIANT: Conditional Face Recalculation SHADOW: Calculation of 'interesting faces' for culling and collision must only execute if the new tile's collision state is logically different from the…—
app_invariants__39058e67d6cbd28dINVARIANT: Manual Index Shifting for GC Suppression SHADOW: High-frequency array element removal must utilize manual index shifting (decrementing length) rather than high-level API methods that…—
app_invariants__c1bebfd3406bb714INVARIANT: Final Property Non-Configurability Enforcement SHADOW: The internal class factory must validate property descriptors against a 'final' registry. Overriding a property marked as…—
app_invariants__fe517bae07222d31INVARIANT: The Phaser Loader plugin `spine()` method must be used for loading Spine JSON and Atlas files. SHADOW: Failure to adhere to the Spine loading contract will result in failed asset…—
app_invariants__7443634a08121d78INVARIANT: The `Phaser.GameObjects.GameObjectFactory` and `Phaser.GameObjects.GameObjectCreator` are the designated entry points for instantiating Spine Game Objects. SHADOW: Bypassing the factory…—
app_invariants__cafc655e665348beINVARIANT: The `SpinePlugin` provides the core bridge between Phaser's rendering and animation systems and the underlying Spine runtime. SHADOW: Directly manipulating Spine runtime objects or…—
app_invariants__8eb681dbbddf4bc3INVARIANT: All physics bodies must be added to a `Matter.World` composite to be simulated. SHADOW: Bodies not registered with the simulation world will never be updated, resulting in static,…—
app_invariants__a02d9fb1c2f3d57bINVARIANT: Physics body properties like mass, inertia, and axes are automatically calculated during creation based on vertices and density, and should be managed via dedicated setters. SHADOW:…—
app_invariants__f47fd1617f977381INVARIANT: The `collisionFilter` property dictates collision rules between bodies, using `group`, `category`, and `mask` to control interactions. SHADOW: Incorrectly configured collision filters…—