v1.3.0 — Comprehensive Feature Expansion
Released: February 6, 2026 | GitHub Release | npm

The largest release in GameByte history: 10 new feature modules following the Laravel-inspired ServiceProvider + Facade + Contract pattern. Each module is tree-shakeable, mobile-optimized, and designed for AI-agent usage (1-3 lines of code to use any feature).
50+ new files | 15,000+ lines of production code | 5 new facades | 2,200+ lines of AI-agent docs
npm install @gamebyte/[email protected]
New Feature Modules

1. TickSystem — Component-Level Render Loop
Per-component render loop with priority ordering, replacing the scene-level-only update() pattern.
import { Tick } from '@gamebyte/framework';
// Simple subscription
Tick.subscribe(({ delta }) => player.move(delta));
// Priority ordering (lower = runs first)
Tick.subscribe(updatePhysics, -10); // high priority
Tick.subscribe(updateAnimation, 0); // default
Tick.subscribe(updateParticles, 10); // low priority
// One-shot callback
Tick.runOnce(({ elapsed }) => console.log('Time:', elapsed));
Key features:
- EMA-based FPS calculation (O(1) per frame, zero allocations)
forloop iteration overforEachfor 15-30% faster hot paths- Pre-allocated
TickStateobject mutated in-place (zero GC pressure) - Delta clamped to 100ms max (prevents frame spikes)
document.hiddenvisibility pause/resume- Fixed timestep option for deterministic physics
| Export | Type |
|---|---|
TickSystem | Class |
Tick | Facade |
TickServiceProvider | ServiceProvider |
ITickSystem, TickState, TickSubscriptionHandle | Types |
Service key: tick
2. ResourceTracker — Auto-Dispose Resource Lifecycle
Scoped resource lifecycle management with automatic disposal.
import { Resources } from '@gamebyte/framework';
const scope = Resources.createScope('level-1');
const geo = scope.track(new THREE.BoxGeometry(1, 1, 1));
const mat = scope.track(new THREE.MeshStandardMaterial());
// When done — both auto-disposed:
Resources.disposeScope('level-1');
Key features:
- Hierarchical scopes (child scopes dispose before parent)
- Pre-registered disposers for THREE.BufferGeometry, THREE.Material, THREE.Texture, PIXI.*
- Duck-type fallback for
.dispose()or.destroy()methods - Reference counting for shared resources
- Scene switch auto-disposes scene scope
| Export | Type |
|---|---|
ResourceTracker, ResourceScope, DisposableRegistry | Classes |
Resources | Facade |
ResourceServiceProvider | ServiceProvider |
IResourceTracker, IResourceScope | Types |
Service key: resources
3. RaycastEventSystem — 3D Pointer Events
DOM-like click/hover/drag events on THREE.Object3D with bubble propagation and stopPropagation().
import { RaycastEventSystem } from '@gamebyte/framework/three-toolkit';
const events = new RaycastEventSystem();
events.setScene(scene, camera, canvas);
events.on(cube, 'click', (e) => console.log('Hit at', e.point));
events.on(cube, 'pointerenter', () => cube.scale.setScalar(1.1));
events.on(cube, 'pointerleave', () => cube.scale.setScalar(1.0));
Supported events: click, dblclick, contextmenu, pointerdown, pointerup, pointermove, pointerenter, pointerleave, pointerover, pointerout
Key features:
- Layer-based filtering via
THREE.Layers(only interactive objects tested) firstHitOnlyoptimization for click events- Pointer move throttling: 20Hz mobile / 60Hz desktop
- Reused event object pool (zero GC in hot path)
- Bubble propagation through parent chain
- Fires synthetic leave events on
destroy()for cleanup
| Export | Type |
|---|---|
RaycastEventSystem | Class (three-toolkit) |
IRaycastEventSystem, PointerEvent3DType, PointerEvent3DData | Types |
4. PerformanceAdvisor — Adaptive Quality Tiers
Reactive quality tier adjustment with hysteresis, thermal protection, and exponential upgrade backoff.
import { PerformanceAdvisor } from '@gamebyte/framework';
const advisor = new PerformanceAdvisor();
advisor.enable({
targetFps: 55,
downgradeThreshold: 45,
upgradeThreshold: 58
});
advisor.onQualityChange((tier, dir) => console.log(tier.name, dir));
advisor.regress(); // manual quality drop
Default tiers: ultra-low → low → medium → high → ultra
Key features:
- Separate up/down thresholds with dead zone (prevents oscillation)
- Exponential backoff for upgrades (2s → 4s → 8s → 16s max)
- Thermal throttling detection (30+ second FPS degradation)
- Priority-ordered degradation: shadows → post-processing → DPR → draw distance
- Per-tier settings: DPR, shadow map size, post-processing, draw distance, particle multiplier
| Export | Type |
|---|---|
PerformanceAdvisor, QualityTierManager | Classes |
QualityTier, AdaptiveConfig | Types |
5. InstanceManager — GPU Instancing
Automatic GPU instancing that switches from regular meshes to THREE.InstancedMesh at 3+ copies.
import { InstanceManager } from '@gamebyte/framework/three-toolkit';
const im = new InstanceManager(scene);
for (let i = 0; i < 100; i++) {
const tree = im.createInstance('tree', treeModel);
tree.setPosition(Math.random() * 100, 0, Math.random() * 100);
}
// Auto-switches to InstancedMesh at 3+ copies
Key features:
- Below threshold (< 3): regular
THREE.Meshclone - At/above threshold:
THREE.InstancedMeshwith capacity = count × 1.5 - Per-instance transforms via
setMatrixAt()with reused Matrix4 - O(1) removal (swap-with-last pattern)
- Batch matrix updates with dirty flags
| Export | Type |
|---|---|
InstanceManager | Class (three-toolkit) |
IInstanceManager, IInstanceHandle | Types |
6. PostProcessingPipeline — Effect Merging
Post-processing pipeline using pmndrs/postprocessing for ~80% fewer render operations vs Three.js EffectComposer.
import { PostProcessing } from '@gamebyte/framework';
PostProcessing.add('bloom', { intensity: 0.5, threshold: 0.8 });
PostProcessing.add('vignette', { darkness: 0.3 });
PostProcessing.add('fxaa');
PostProcessing.get('bloom')?.setParams({ intensity: 1.0 });
Built-in effects: SSAO, Bloom, DOF, ChromaticAberration, Vignette, ToneMapping, FXAA
Key features:
- Automatic effect merging: compatible effects compiled into single shader pass
- Half-resolution for expensive effects (Bloom, SSAO at 50%)
- Lazy effect compilation (shaders compile on first enable)
- PerformanceAdvisor integration (auto-disable on low tiers)
- Mobile tier presets:
mobile-low(FXAA only) throughdesktop(full pipeline)
| Export | Type |
|---|---|
PostProcessingPipeline | Class |
PostProcessing | Facade |
PostProcessingServiceProvider | ServiceProvider |
IPostProcessingPipeline, IPostProcessingEffect | Types |
Service key: postprocessing
7. EnvironmentSystem — Skybox, Fog & Presets
Complete 3D environment management with presets, smooth transitions, HDRI loading, and fog.
import { Environment } from '@gamebyte/framework';
Environment.preset('sunset');
await Environment.transitionTo('night', 5.0); // 5s smooth lerp
await Environment.setHDRI('/hdris/studio.hdr');
Environment.setFog({ color: '#aaccee', near: 10, far: 100, type: 'linear' });
Built-in presets: day, sunset, night, overcast
Key features:
- Manages DirectionalLight (sun), HemisphereLight (ambient), Fog
transitionTo()uses TickSystem to lerp values over duration- Bakes sky to static cubemap after transition (0ms/frame when static)
- Resolution tiers: 128px (mobile) to 1024px (ultra)
| Export | Type |
|---|---|
EnvironmentSystem | Class |
Environment | Facade |
EnvironmentServiceProvider | ServiceProvider |
IEnvironmentSystem, EnvironmentConfig | Types |
Service key: environment (deferred)
8. PrefabSystem — JSON-Driven Entities
JSON-driven prefabs with template inheritance, ECS-lite components, and state serialization.
import { Prefabs } from '@gamebyte/framework';
Prefabs.register({
id: 'enemy', name: 'Enemy',
visual: { type: 'model', url: '/models/enemy.glb' },
tags: ['npc']
});
const enemy = await Prefabs.spawn('enemy', { position: [0, 0, 5] });
enemy.addComponent('health', { current: 100, max: 100 });
const npcs = Prefabs.getEntitiesByTag('npc');
Key features:
extendsfield for template inheritance (deep-merge parent → child)- Components with lifecycle hooks (
onAttach,onDetach,onUpdate,onDestroy) - Tag-based queries via indexed Map (O(1) lookups)
- Entity pooling with free-list (no GC on spawn/despawn)
serialize()/deserialize()for save/load
| Export | Type |
|---|---|
PrefabSystem | Class |
Prefabs | Facade |
PrefabServiceProvider | ServiceProvider |
IPrefabSystem, IEntity, PrefabConfig, ComponentLifecycle | Types |
Service key: prefabs (deferred)
9. SmartAssetPipeline — Priority Loading
Priority-based asset loading with memory budgets, LRU eviction, and abort-on-scene-switch.
import { SmartAssetPipeline } from '@gamebyte/framework';
const pipeline = new SmartAssetPipeline();
pipeline.registerManifest({
scenes: { level1: ['player', 'bg', 'music'] },
assets: {
player: { url: '/textures/player.png', type: 'texture', priority: 'critical' },
bg: { url: '/textures/bg.png', type: 'texture', priority: 'normal' },
music: { url: '/audio/bgm.mp3', type: 'audio', priority: 'low' }
}
});
pipeline.on('progress', (p) => loadingBar.setProgress(p));
await pipeline.loadScene('level1');
pipeline.setMemoryBudget(256); // 256MB max
Key features:
- Priority queue: critical assets load first
- Adaptive concurrency: 2-4 mobile, 4-8 desktop
- LRU eviction with access frequency weighting
- AbortController: cancels pending loads on scene switch
- Error resilience: continues if individual assets fail
| Export | Type |
|---|---|
SmartAssetPipeline | Class |
AssetPipelineServiceProvider | ServiceProvider |
IAssetPipeline, AssetManifest | Types |
Service key: asset.pipeline (deferred)
10. GameSoundPresets — Procedural Audio
15 built-in procedural game sounds with zero audio file dependencies.
import { GameSoundPresets } from '@gamebyte/framework';
const sounds = new GameSoundPresets();
sounds.play('explosion');
sounds.play('coin', { volume: 0.5, pitch: 1.2, variation: 0.3 });
Sound types (15): hit, pickup, explosion, laser, powerUp, death, click, jump, land, coin, error, success, whoosh, thrust, nearMiss
Key features:
- Fully procedural via Web Audio API oscillators + gain envelopes
- Lazy AudioContext initialization (browser autoplay policy)
variationparameter for random pitch/timing shifts- AudioNode pooling (max 8 concurrent, 4 on mobile)
- Custom sounds via
register(name, generator)
| Export | Type |
|---|---|
GameSoundPresets | Class |
GameSoundType, GameSoundConfig | Types |
Live Feature Demos
TickSystem & Game Loop in Action
GameSoundPresets - Procedural Audio
PostProcessing Pipeline
3D Features (InstanceManager, Environment)
Other Improvements
Responsive Resize Integration
resizeToContainer now auto-enables responsive scaling via ResponsiveScaleCalculator with container-based ResizeObserver. New responsive option in QuickGameConfig:
const game = createGame({
resizeToContainer: true,
responsive: { baseWidth: 720, baseHeight: 1280, minScale: 0.5, maxScale: 2.0 },
width: 720,
height: 1280
});
ModelLoader Deep-Clone Materials
Cached model clones now have independent materials. Modifying one clone's material no longer affects others. disposeModel() is now a public method.
DirectionalLight Shadow Fix
setShadowMapSize() now properly sets shadow.needsUpdate = true after disposing shadow map.
TypeScript 5.7+ Compatibility
Fixed ArrayBuffer/Float32Array type mismatches in AssetBundle.ts, GameByteAudioBus.ts, GameByteAudioEffectsProcessor.ts, and TextureLoader.ts.
CI/CD Hardening
- Removed
@rollup/rollup-linux-arm64-gnufrom devDependencies - Switched to
npm installfor platform-specific dependency handling - Added
continue-on-errorfor non-blocking security checks - Fixed deploy-docs workflow
Breaking Changes

Most users will not need to change any code. Both changes improve correctness and safety.
1. resizeToContainer now integrates with Responsive Mode
What changed: createGame({ resizeToContainer: true }) previously attached a raw ResizeObserver that directly set canvas.width/canvas.height. It now delegates to ResponsiveScaleCalculator which provides both resize and scale factor calculation.
Who is affected: Only users relying on the exact internal resize mechanism (e.g., patching ResizeObserver behavior or expecting canvas.width to be set synchronously in the same microtask).
Migration:
// Before (v1.2.x) — still works, no change needed:
const game = createGame({
resizeToContainer: true,
width: 720,
height: 1280
});
// New in v1.3.0 — optional custom responsive config:
const game = createGame({
resizeToContainer: true,
responsive: {
baseWidth: 720,
baseHeight: 1280,
minScale: 0.5,
maxScale: 2.0
},
width: 720,
height: 1280
});
2. Model clones are now independent (material deep-clone)
What changed: ModelLoader now deep-clones materials when returning cached models. Previously, clones shared material references — modifying one clone's material color would affect all clones.
Who is affected: Users who intentionally relied on shared materials across ModelLoader cached clones for synchronized material updates. This is unlikely but technically possible.
Migration:
const model = await loader.load('/model.glb');
// Materials are now independent — modify freely:
model.scene.traverse(child => {
if (child instanceof THREE.Mesh) {
child.material.color.set(0xff0000); // only affects this clone
}
});
If you need shared materials, assign them manually after loading:
const sharedMat = new THREE.MeshStandardMaterial({ color: 0xff0000 });
const model1 = await loader.load('/model.glb');
const model2 = await loader.load('/model.glb');
// Manually assign shared material:
[model1, model2].forEach(m => {
m.scene.traverse(child => {
if (child instanceof THREE.Mesh) child.material = sharedMat;
});
});
Performance Budgets
Every module is designed with strict mobile-first performance targets:
| Module | Mobile | Desktop |
|---|---|---|
| TickSystem | < 0.1ms/frame | < 0.05ms/frame |
| ResourceTracker | < 0.01ms/frame | Same |
| RaycastEvents | < 1ms/frame (20Hz) | < 0.5ms/frame (60Hz) |
| PerformanceAdvisor | < 0.05ms/frame | Same |
| InstanceManager | < 0.5ms/frame | < 0.3ms/frame |
| PostProcessing | 1-2 passes max | Up to 5 passes |
| Environment | 0ms/frame (static) | Sky shader optional |
| PrefabSystem | Spawn < 1ms | Same |
| AssetPipeline | 2-4 concurrent loads | 4-8 concurrent |
| AudioPresets | 4 concurrent sounds | 8 concurrent |
New Service Providers
All are auto-registered by createGame():
| Provider | Service Key | Initialization |
|---|---|---|
TickServiceProvider | tick | Immediate |
ResourceServiceProvider | resources | Immediate |
PostProcessingServiceProvider | postprocessing | Immediate |
EnvironmentServiceProvider | environment | Deferred |
PrefabServiceProvider | prefabs | Deferred |
AssetPipelineServiceProvider | asset.pipeline | Deferred |
Deferred providers only instantiate their service on first app.make() call — zero overhead if unused.
New Contracts
| File | Interfaces |
|---|---|
contracts/Tick.ts | ITickSystem, TickState, TickSubscriptionHandle, TickSubscribeOptions |
contracts/Resources.ts | IResourceTracker, IResourceScope, DisposerEntry |
contracts/PointerEvents3D.ts | IRaycastEventSystem, PointerEvent3DType, PointerEvent3DData, PointerEvent3DHandler |
contracts/Performance.ts | QualityTier, AdaptiveConfig (added) |
contracts/Instancing.ts | IInstanceManager, IInstanceHandle |
contracts/PostProcessing.ts | IPostProcessingPipeline, IPostProcessingEffect |
contracts/Environment.ts | IEnvironmentSystem, EnvironmentConfig |
contracts/Prefab.ts | IPrefabSystem, IEntity, PrefabConfig, PrimitiveConfig, ComponentLifecycle |
contracts/AssetPipeline.ts | IAssetPipeline, AssetManifest |
contracts/Audio.ts | GameSoundType, GameSoundConfig (added) |
contracts/Graphics.ts | Added destroy() JSDoc to IFilter, IMask, IFillGradient |
Dependency Graph
The 10 features were implemented in 3 phases based on dependencies:
Phase 1 (Foundation — no cross-dependencies):
TickSystem, ResourceTracker, RaycastEventSystem, GameSoundPresets
Phase 2 (Integration — builds on Phase 1):
PerformanceAdvisor → TickSystem
InstanceManager → ResourceTracker
EnvironmentSystem → ResourceTracker
Phase 3 (Composition — uses everything):
PostProcessingPipeline → PerformanceAdvisor
PrefabSystem → TickSystem + ResourceTracker + InstanceManager
SmartAssetPipeline → ResourceTracker
Full Commit List
36a0f70 feat: Add 10 comprehensive feature modules with SSOT/DRY compliance
2431c44 docs: Update llms.txt and llms-full.txt with 10 new feature modules
7f06f2f fix(core): Integrate resizeToContainer with responsive mode
8d8ca4d fix(ui): Fix settings button overflowing off-screen in GameTopBar
6e39f2e fix(ci): Use npm install instead of npm ci
5e05b5f fix(ci): Remove @rollup/rollup-linux-arm64-gnu from devDependencies
0bc67fa docs: Add 35 missing sections to llms-full.txt
25a3b47 docs: Comprehensive llms-full.txt rewrite with complete framework API
1c02716 fix(types): Fix TypeScript 5.7+ ArrayBuffer/Float32Array type mismatches
7b74cf1 fix(ci): Add continue-on-error for Snyk and Dependency Review
426538d chore: Bump version to 1.3.0