Spark X2.6 Turns One Prompt into a Working ESP32 Lab, a Fixed Volcano Bug, and a CSS Rubik's Cube
Title: Really Amazing, Domestic Model Token Freedom! Author: Silent Wang Er
Hey everyone, it's Er Ge here.
A few days ago, I gave a talk at a university and asked many students. They all said top models are too expensive and they can't afford them. They want more cyber eggs.
So, just in time for the 1024 Developer Festival, iFlytek released the brand new Spark X2.6 (Spark-X2.6) model. I immediately ran a series of hands-on tests to see whether domestic models can actually deliver.
The model's capability is indeed top-notch. Below is a case I completed with Spark-X2.6, which is quite impressive.
If a screenshot can't convey the power, let's look at the screen recording.
Isn't that nice? Don't you suddenly feel that domestic models are actually capable?
You should know that Spark X2.6 is trained entirely on domestic compute, uses a Mixture of Experts (MoE) architecture, has a total of 293B parameters, activates 30B parameters per token processed, and extends the context window to 1M. From the benchmark scores in the image below, it's definitely top-tier, and it focuses on long-horizon complex tasks, code development, and Agent execution.
01. ESP32 Mini Piano Lab
ESP32 has become super popular recently, so I had Spark-X2.6 replicate a mini piano lab.
Many developers learning embedded systems or creating hardware teaching materials struggle because they don't have a development board on hand, or because two-dimensional wiring diagrams are too abstract. This time I asked Spark-X2.6 to build an "ESP32 Mini Piano Interactive Lab" with four interactive courses, using React, TypeScript, and Three.js, without any external 3D model files, purely coded from scratch. The complete prompt is below; you can copy it into your preferred Agent tool to reproduce.
Please create a runnable Chinese "ESP32 Mini Piano Interactive Lab" web app, using Vite, React, TypeScript, Three.js (React Three Fiber and Drei). Start a local server and verify.
1. Visual and Layout: Off-white engineering drafting paper background with fine light-brown grid, deep navy blue outlines and text, fresh orange primary buttons. Left narrow icon navigation, top ESP32 LAB brand bar, center about 65% for large 3D lab, right about 35% for three-step experiment guide (01 Understand the Circuit / 02 Play Keys One by One / 03 Listen to a Melody), tabs for Overview/Pinout/Examples/Specs, Arduino code and live serial monitor, bottom horizontal cards for four interactive courses.
2. Pure programmatic 3D hardware modeling (no external 3D assets): Orthographic camera isometric top-down view, back-left is deep blue ESP32-WROOM-32 dev board (with USB connector, metal RF shield, PCB antenna, chip, silkscreen, EN/BOOT buttons, and two rows of gold pin headers); back-right is a white breadboard with 240-hole array and red/blue power rails, and a black passive buzzer (GPIO18); foreground eight pastel capacitive touch keys (Do Re Mi Fa Sol La Si Do, corresponding to GPIO 4, 2, 15, 13, 14, 27, 33, 32), wired to the dev board with eight colored curved TubeGeometry jumper wires.
3. Audio and Playing Interaction: Support mouse click on keys or keyboard A S D F G H J K to trigger corresponding key press, glow, jumper and pin highlight. Use Web Audio API to synthesize real-time standard scale from 261.63Hz to 523.25Hz, with short attack and release envelopes to eliminate pops; support one-click "Auto Play" of "Twinkle Twinkle Little Star", with sound, keys, jumper highlights and serial log synced in real-time; support SVG circuit schematic popup toggle and linkage. Follow classic ESP32-WROOM-32 hardware behavior: when finger touches, capacitive reading drops below threshold and triggers sound.
4. Four interactive courses fully implemented at bottom:
- Understanding the Dev Board (ESP32 hardware tour): zoom in on the board, provide 7 interactive 3D hotspots: USB connector, ESP32 module, PCB antenna, GPIO pin header, EN reset button, BOOT button, power LED. These sync with orange highlight frames on the board and detailed hardware explanations on the right.
- LED Blink (adjustable blink · GPIO2): control the onboard blue LED and external breadboard LED to blink in sync, support dynamic adjustment of on/off interval, real-time sync with 3D emissive materials and Arduino code.
- Mini Piano (touch keys · 8 notes): eight capacitive touch keys that produce sound and auto-play "Twinkle Twinkle Little Star".
- Ambient Light (RGB color mixing · PWM dimming): common-cathode RGB LED model with three 330Ω current-limiting resistors (GPIO25/26/27), support preset and custom color palette, 0–100% peak brightness slider, breathing cycle adjustment and constant/breathing mode switch, real-time generation of PWM example code conforming to Espressif Arduino-ESP32 3.x LEDC interface specification.
This case was a big one, and I ran it for a long time, so allow me to introduce it properly.
First, look at the "Mini Piano" main lab and the three-step course guide interface.
Now switch to the "Understanding the Dev Board" course showing seven 3D hardware hotspots highlighted, and the "Ambient Light" course's RGB breathing color mixing experiment.
This case showcases Spark-X2.6's multi-file engineering architecture capability, 3D spatial modeling skills, and embedded systems expertise.
The entire project used no external textures or pre-made .glb models. From the 240 holes on the breadboard, the ESP32 metal shield and PCB antenna, to the eight colored curved jumper wires, everything was modeled and drawn in real time by Spark-X2.6 with code.
What's even more impressive is its hardware expertise. It not only correctly distinguishes the physical property of the classic ESP32-WROOM-32 capacitive touch sensor where the reading drops when a finger contacts it, but also provides ledcAttach code conforming to Espressif's latest Arduino-ESP32 3.x specification in the RGB ambient light course, integrating 3D visuals, Web Audio synthesis, and embedded teaching into a highly polished interactive product.
02. Volcanic Eruption
Beyond building new projects from scratch, a tougher test for large models in daily development is taking over existing code, locating physical rendering bugs, and polishing rough prototypes into gems.
In the "Volcanic Eruption" case, the original project had a tricky physics bug: lava particles ejected from the crater would all hover in mid-air above the crater mouth and never flow down the slope.
I asked Spark-X2.6 to find the root cause of the physical collision and simultaneously upgrade the visuals into a real-time 3D lab with basalt mountain and glowing lava flows.
The prompt is as follows.
Please audit and upgrade a 3D volcanic eruption particle project. Locate the physics collision bug that makes lava particles hover in mid-air, and build a high-completion Three.js real-time 3D "VOLCANIC DYNAMICS" single-file webpage:
1. Physics collision root cause fix and comparison: The original code hardcoded the ground collision height to the crater height constant (y = 90), causing particles to hover at the crater height after falling back. Fix it to dynamically compute the conical terrain height terrainHeight(x, z) based on the particle's current horizontal coordinates (x, z), and when touching the slope, project the velocity vector along the mountain normal as a tangential projection, so lava flows down the conical slope under gravity without penetrating the terrain. Keep a one-click toggle between "Before Fix (defect baseline)" and "After Fix (flowing along slope)".
2. Real-time 3D volcano visuals (zero external model textures): Use Cartesian triangular mesh and isotropic fractal noise to generate a layered dark basalt mountain, irregular 3D crater, and glowing lava lake; add cool/warm primary and secondary lighting, distant mountain background, semi-transparent rising ash and flying sparks, support OrbitControls mouse drag rotation, wheel zoom, and view reset.
3. Glowing lava trails: Along the historical motion trajectory of real physics particles, generate volumetric glowing lava tube segments with dark red outer, bright orange-yellow core, and short aerial ejection trails; 78% of particles overflow from the crater edge, 22% are high-altitude ejections, naturally fading as they cool.
4. Lab console and real-time telemetry panel: top floating buttons for "Pause/Resume", "Erupt Again", "Reset Camera", and "Before/After Fix" mode toggle; right frosted-glass telemetry panel showing current mode, active particle count, slope-flowing particle count, anomalous hovering count, minimum height, max spread radius, and real-time FPS.
This case fully demonstrates Spark-X2.6's cross-file code diagnosis and 3D graphics programming capability, supported by the 1M ultra-long context window.
Faced with the "lava hovering in mid-air" phenomenon, it immediately spotted the logical flaw in the original code that hardcoded the crater height as the ground height. It switched to computing the slope height in real time from the particle's current horizontal coordinates, then corrected the falling velocity using the slope's inclination. A few key lines fixed the lava to flow down the mountainside.
What's even more striking is its 3D rendering performance. The basalt mountain generated purely from mathematical functions has crisp edges, the churning lava lake paired with the inner-bright outer-dark volumetric lava flows, all under cool/warm lighting, looks great. The "slope flow" and "hovering anomaly" real-time metrics in the right data panel make the before/after comparison clear at a glance.
03. 3D Rubik's Cube
After a heavy Three.js project, let's test whether Spark-X2.6 can hold its ground if it's not allowed to use any third-party 3D engine, only native HTML, CSS, and JavaScript.
Once you require zero external dependencies and a single-file delivery of a 3x3 Rubik's cube, the model has to compute 3D perspective matrices, write per-orientation lighting and a rotation state machine.
You can copy the following prompt into your preferred Agent tool to reproduce it.
Using pure CSS 3D Transform, build a high-completion interactive 3x3 Rubik's Cube Lab (CUBE / LAB), saved as a single index.html file. Requirements:
1. Spatial and physical quality: A standard 3x3 cube consisting of 27 individual cube blocks, 54 rounded colored stickers. Black inner blocks with gaps, bevel highlights, dynamic shading based on 3D orientation, and soft ground shadows. No images or external resources.
2. Matrix rotation and animation: Maintain integer 3D coordinates (x, y, z) and a 3x3 orientation matrix for each of the 27 small cubes. Correctly handle the Y-axis conversion between math coordinates and CSS screen coordinates (white up U, yellow down D, green front F, blue back B, orange left L, red right R). Every 90° layer turn uses isomorphic rotate3d + matrix3d transition animation, ensuring 9 cubes rotate smoothly along the same axis in an arc without tearing.
3. Multi-dimensional interaction and mis-touch prevention: Support mouse/touch drag to rotate the whole view (compute cumulative displacement relative to press point; lock to view drag only after exceeding 6px to eliminate slow-drag mis-touch layer turns); support clicking cube faces, clicking the six right-side buttons (Up U / Down D / Left L / Right R / Front F / Back B) and keyboard arrow keys for layer turns; hold Shift for reverse rotation; R key or button triggers a 20-step random scramble, Spacebar interrupts the current queue and instantly restores.
4. Lab console UI: Left 65% is the 3D cube stage with bottom key hints, right 35% is an independent control panel showing restore status badge, move count, scramble/restore main buttons, six face rotation buttons, and recent rotation history.
Take a look at the finished product interface rendered by Spark-X2.6.
This case highlights Spark-X2.6's 3D spatial matrix operations and interaction detail handling.
Many models writing a pure CSS cube simply accumulate rotateX/Y/Z angles on small blocks, which quickly falls apart due to local coordinate system drift after a few turns.
Spark-X2.6 maintains an integer coordinate and a 3x3 orthogonal orientation matrix for each of the 27 small blocks. Each turn updates the position vector and orientation matrix using the same rotation matrix, then converts to CSS matrix3d(...) and writes it back.
It also carefully handles the cumulative displacement threshold after mouse press, so slow view dragging never accidentally triggers a layer turn. The bevel highlights on the 54 rounded stickers and the soft ground shadow give a nearly physical toy-like quality.
04. Simple Flight Simulator
After a hardware lab, a pure CSS cube, and a 3D volcano lab, let's look at a "Simple Flight Simulator" that tests aerodynamics and 3D large-scene rendering together.
I've also included the prompt for reproduction.
As a 3D game and flight dynamics expert, write an interactive HTML program for a simple flight simulator. Physics core: based on simplified six-degree-of-freedom aircraft dynamics; lift is related to speed and angle of attack, drag grows with the square of speed, thrust is controlled by throttle, gravity is constant; the player controls pitch, roll, and yaw through joystick, and attitude changes affect lift direction, thus changing the trajectory, while maintaining basic flight stability. Visualization uses Three.js: third-person camera follows the aircraft, terrain is procedural with height variations (including distant mountains, grass, lakes, and an airport runway), sky gradient with height and orientation, sun, clouds, and fog; the aircraft model is built from procedural geometry combining a streamlined fuselage, transparent cockpit, symmetric main wings, tail, and rotating propeller. Integrate keyboard/mouse controls (W/S pitch, A/D roll, Q/E yaw, throttle slider) and multi-view switching. Left frosted-glass HUD panel shows airspeed, altitude, artificial horizon attitude, compass heading, and flight data in real time. All code is integrated into a single self-contained HTML file, using Three.js from CDN, no external model textures, ensure smooth operation in Chrome.
Here's the generated flight simulator in action and its running animation.
Of course, the initial version was rough; I spent quite a while debugging.
This case confirms Spark-X2.6's ability to translate physics and mechanics formulas into engineering code.
It handles three things at once in a single HTML file. First, it assembles a fixed-wing aircraft with red-and-white livery, transparent cockpit, and rotating propeller using basic geometric shapes, along with undulating terrain featuring an airport runway. Then it puts lift, drag, thrust, gravity, and attitude calculations into the physics loop, making the aircraft stable from accelerating takeoff to cruising.
Finally, it adds a set of frosted-glass Chinese aviation instruments: a 270-degree dial airspeed indicator, altimeter, artificial horizon, and compass heading that update in real time with throttle and attitude.
Ending
After these hands-on tests, Spark-X2.6 surprised me quite a bit.
A MoE model trained entirely on domestic compute, plus a 1M ultra-long context window. Whether it's building an ESP32 mini piano lab with Web Audio real-time synthesis, hand-crafting a pure CSS 3D Rubik's cube, or fixing the physics collision bug in a volcanic eruption, it handles it solidly. I've attached the prompts for each case in the body of the article. Copy them into your preferred Agent tool and you can reproduce them.
See you next time.
Top 1 from juejin.cn, machine-translated. The original thread is authoritative.
Ever since DeepSeek open-sourced its reasoning model, all sorts of domestic models have started to pop up, haven't they? Right?