今日已更新 86 条资讯 | 累计 42497 条内容
关于我们

BeeEngine JS

Antonio 2026年09月13日 02:39 1 次阅读 来源:Dev.to

Building a Pure CSS 3D Interactive Tower (Zero WebGL Dependencies) I wanted to display the modular architecture of my open-source 2D game framework, BeeEngine JS , directly on its landing page—without the massive overhead of heavy 3D WebGL libraries. Instead of loading bulky 3D engines just for a visual widget (which adds unnecessary JavaScript payload and destroys the Total Blocking Time on mobile), I built a fully interactive 3D rotating tower using Pure CSS 3D Transforms driven entirely by the GPU compositor layer. 🚀 Key Highlights 100% Native CSS 3D: Built using perspective , rotateY() , translateZ() , and standard semantic HTML elements. GPU Accelerated: Layout transformations run off the main thread, keeping Total Blocking Time (TBT) at zero. Lightweight JS Interaction: Minimal Vanilla JS (ES6) handling touch and mouse drag events to smoothly control rotation without blocking normal clicks. SEO & Crawler Friendly: Unlike WebGL canvas elements, every card in this tower is a standard <a> link, fully discoverable by search engine crawlers. 🛠️ The Architecture Behind It The goal of BeeEngine JS is to provide an ultra-lightweight (27.9 kB) and razor-sharp environment for 2D web games. Forcing users to download hundreds of kilobytes of WebGL code just to see the features of a 2D framework felt like a complete technical contradiction. By offloading the 3D math ( rotateY calculation based on the number of cards) directly to the browser's CSS rendering engine, the main thread remains 100% free to handle game logic, asset loading, and smooth scrolling. 🔗 Live Demo Check out the interactive CodePen demo below: Check out this Pen I made!

本文内容来源于互联网,版权归原作者所有
查看原文