Top Related Projects
Central repository for tools, tutorials, resources, and documentation for robotics simulation in Unity.
Reinforcement Learning Environments for Omniverse Isaac Gym
A toolkit for developing and comparing reinforcement learning algorithms.
A modular high-level library to train embodied AI agents across a variety of tasks and environments.
Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
Quick Overview
Midscene is an open-source 3D scene editor designed for web applications. It provides a user-friendly interface for creating and manipulating 3D scenes directly in the browser, making it easier for developers and designers to work with 3D content without the need for complex desktop software.
Pros
- Browser-based, making it accessible across different platforms
- User-friendly interface for easy 3D scene creation and editing
- Integrates well with web technologies and frameworks
- Open-source, allowing for community contributions and customization
Cons
- May have performance limitations compared to desktop 3D editing software
- Potentially limited feature set compared to more established 3D editors
- Dependency on browser capabilities and WebGL support
- Learning curve for users new to 3D scene editing
Code Examples
// Initialize Midscene
const scene = new Midscene.Scene();
const renderer = new Midscene.Renderer(document.getElementById('canvas'));
// Add a 3D object to the scene
const cube = new Midscene.Cube();
scene.add(cube);
// Render the scene
renderer.render(scene);
// Add lighting to the scene
const light = new Midscene.PointLight();
light.position.set(0, 5, 10);
scene.add(light);
// Apply material to an object
const material = new Midscene.StandardMaterial({
color: '#ff0000',
metalness: 0.5,
roughness: 0.5
});
cube.material = material;
// Add user interaction
const controls = new Midscene.OrbitControls(renderer.camera, renderer.domElement);
// Animate the scene
function animate() {
requestAnimationFrame(animate);
cube.rotation.y += 0.01;
renderer.render(scene);
}
animate();
Getting Started
-
Include Midscene in your project:
<script src="https://cdn.jsdelivr.net/npm/midscene@latest/dist/midscene.min.js"></script> -
Create a canvas element in your HTML:
<canvas id="scene-canvas"></canvas> -
Initialize Midscene and create a basic scene:
const scene = new Midscene.Scene(); const renderer = new Midscene.Renderer(document.getElementById('scene-canvas')); const cube = new Midscene.Cube(); scene.add(cube); renderer.render(scene); -
Run your web application and see the 3D scene in action!
Competitor Comparisons
Central repository for tools, tutorials, resources, and documentation for robotics simulation in Unity.
Pros of Unity-Robotics-Hub
- Comprehensive robotics simulation environment with ROS integration
- Extensive documentation and tutorials for robotics development
- Active community support and regular updates
Cons of Unity-Robotics-Hub
- Steeper learning curve for non-Unity developers
- Limited to Unity engine, which may not be suitable for all robotics projects
- Requires more computational resources for complex simulations
Code Comparison
Unity-Robotics-Hub:
using Unity.Robotics.ROSTCPConnector;
using RosMessageTypes.Geometry;
public class RobotController : MonoBehaviour
{
ROSConnection ros;
public string topicName = "cmd_vel";
Midscene:
import { Scene, PerspectiveCamera, WebGLRenderer } from 'three';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
const scene = new Scene();
const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
The Unity-Robotics-Hub code snippet demonstrates ROS integration and robot control, while the Midscene code focuses on 3D scene setup using Three.js. Unity-Robotics-Hub is more specialized for robotics, whereas Midscene is a general-purpose 3D visualization tool.
Reinforcement Learning Environments for Omniverse Isaac Gym
Pros of OmniIsaacGymEnvs
- Provides a comprehensive suite of reinforcement learning environments for robotics simulation
- Leverages NVIDIA's Isaac Sim for high-fidelity physics and rendering
- Offers seamless integration with popular RL frameworks like OpenAI Gym
Cons of OmniIsaacGymEnvs
- Requires more computational resources due to its advanced physics simulation
- Has a steeper learning curve for users unfamiliar with Isaac Sim or robotics simulation
- Limited to robotics and physics-based simulations, unlike Midscene's focus on 3D scene understanding
Code Comparison
OmniIsaacGymEnvs:
from omniisaacgymenvs.utils.task_util import initialize_task
from omniisaacgymenvs.tasks.ant import AntTask
task = initialize_task(task_cfg, AntTask)
env = task.get_env()
Midscene:
import { Scene } from 'midscene';
const scene = new Scene();
scene.load('path/to/3d/model.glb');
The code snippets highlight the different focus areas: OmniIsaacGymEnvs initializes robotic simulation tasks, while Midscene loads and manipulates 3D scenes.
A toolkit for developing and comparing reinforcement learning algorithms.
Pros of gym
- Well-established and widely used in the reinforcement learning community
- Extensive documentation and tutorials available
- Supports a wide range of environments for various RL tasks
Cons of gym
- Primarily focused on reinforcement learning, limiting its use in other domains
- Can be complex for beginners to set up and use effectively
- Some environments may require additional dependencies
Code Comparison
gym:
import gym
env = gym.make('CartPole-v1')
observation = env.reset()
for _ in range(1000):
action = env.action_space.sample()
observation, reward, done, info = env.step(action)
midscene:
import { Scene } from 'midscene';
const scene = new Scene();
scene.add(new Cube());
scene.render();
scene.export('scene.gltf');
Key Differences
- gym is Python-based and focused on reinforcement learning environments
- midscene is JavaScript-based and designed for 3D scene creation and manipulation
- gym provides a standardized interface for RL algorithms
- midscene offers tools for creating and exporting 3D scenes
Use Cases
- gym: Ideal for researchers and developers working on reinforcement learning projects
- midscene: Suitable for web developers creating 3D scenes for visualization or game development
A modular high-level library to train embodied AI agents across a variety of tasks and environments.
Pros of Habitat-lab
- Comprehensive 3D simulation platform for embodied AI research
- Extensive documentation and tutorials for easy onboarding
- Large community support and active development
Cons of Habitat-lab
- Steeper learning curve due to complex architecture
- Higher computational requirements for running simulations
- Limited flexibility for custom environments outside its predefined scenarios
Code Comparison
Habitat-lab example:
import habitat
env = habitat.Env(
config=habitat.get_config("benchmark/nav/pointnav/pointnav_gibson.yaml")
)
observations = env.reset()
Midscene example:
from midscene import MidScene
scene = MidScene()
scene.load("path/to/scene.json")
Summary
Habitat-lab is a robust platform for embodied AI research with extensive features and community support, while Midscene appears to be a simpler tool for scene manipulation. Habitat-lab offers more comprehensive simulation capabilities but may require more resources and learning time. Midscene seems more lightweight and potentially easier to integrate for specific scene-related tasks.
Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
Pros of bullet3
- More mature and widely adopted physics engine with extensive documentation
- Supports a broader range of physics simulations, including soft body dynamics
- Offers better performance for large-scale simulations
Cons of bullet3
- Steeper learning curve due to its complexity and extensive feature set
- Larger codebase and potentially higher resource requirements
Code Comparison
bullet3:
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
btBroadphaseInterface* overlappingPairCache = new btDbvtBroadphase();
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
btDiscreteDynamicsWorld* dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, overlappingPairCache, solver, collisionConfiguration);
midscene:
import { Scene } from 'midscene';
const scene = new Scene();
scene.addObject(new Cube({ position: [0, 0, 0], size: [1, 1, 1] }));
scene.render();
Note: The code comparison highlights the difference in complexity and setup between the two libraries. bullet3 requires more detailed configuration for its physics simulation, while midscene offers a simpler, higher-level API for scene creation and rendering.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
See interfaces like a human. E2E testing in natural language.
Bring AI vision to E2E testing with a newly designed test framework for web, mobile, and desktop apps.
Website · English / ç®ä½ä¸æ
Write a test in natural language
Midscene.js brings AI vision to E2E testing. Describe UI steps and expected results in natural language, then use the visual GUI Agent to carry them out and verify what users see. Organize tests with Midscene Test, or integrate the Agent APIs into your existing testing framework.
YAML test cases with Midscene Test
After creating a Midscene Test project and configuring a model and the Web runtime, write a case like this. Replace the example URL with your app's address:
beforeEach:
- gotoUrl: https://your-shop.example
cases:
- name: Find headphones under $100
steps:
- aiAct: Search for headphones and filter the results to prices under $100
- aiWaitFor: The filtered search results are visible
- aiAssert: There are products in the search results, and each costs less than $100
JavaScript with Playwright
You can also use the Agent directly in your existing tests. Configure a model and open your app in a Playwright page, then describe the same steps in code:
import { PlaywrightAgent } from '@midscene/web/playwright';
const agent = new PlaywrightAgent(page);
await agent.aiAct('Search for headphones and filter the results to prices under $100');
await agent.aiWaitFor('The filtered search results are visible');
await agent.aiAssert('There are products in the search results, and each costs less than $100');
Open the generated HTML report to inspect screenshots, actions, and assertion results. Follow the guides for Midscene Test or Playwright for setup and complete examples.
ðï¸ Vision-driven, low-cost testing
Midscene models UI actions and assertions on how people use software: look at the screen, act on what you see, and check the visible result.
Locate and act from screenshots
Midscene locates elements by their appearance and position, then clicks, types, or scrolls to carry out your instructions. You can target icon-only buttons, custom controls, <canvas>, and elements inside cross-origin iframes without maintaining selectors or adding semantic annotations.
Verify what users see
Describe the expected appearance in natural language to check colors, selection highlights, layout, and visual feedback â including content drawn on <canvas> or displayed in native apps.
await agent.aiAssert('The selected plan has a blue border and a checkmark');
await agent.aiAssert('The error message is visible below the email field');
Choose models for your needs and budget
Screenshot-based UI actions avoid sending large DOM trees to the model. In the reported AppControlBench run, Midscene with Doubao Seed 2.1 Turbo passed 58 of 60 tasks with $0.59 in total model cost. The report provides per-task costs and comparisons across models.
Midscene supports Qwen3.x, Doubao-Seed-2.1, DeepSeek V4 Flash, GLM-4.6V, gemini-3.5-flash, and UI-TARS, including open-source options you can self-host. See Model Strategy to choose a model and Model Configuration to set it up.
ð One API, across platforms
Use the same Agent APIs to describe actions and assertions across platforms:
| Platform | Integration |
|---|---|
| Web | Playwright, Puppeteer, or desktop Chrome |
| Android | Devices and emulators through ADB |
| iOS | Devices and simulators through WebDriverAgent |
| HarmonyOS | HarmonyOS NEXT through HDC |
| Desktop | macOS, Windows, and Linux, with remote RDP support |
| Custom interfaces | Provide screenshots and action capabilities |
ð§© Midscene Test: YAML for cases, TypeScript for extensions
Midscene Test (@midscene/test, Beta) turns GUI automation into a maintainable E2E test project:
- Describe test cases in YAML. Combine UI actions, assertions, and business operations to express the flow and expected results.
- Reuse business capabilities through TypeScript Nodes. Wrap data preparation, API calls, and cleanup in nodes that different cases can share. A refund test can prepare an order through an API, request a refund through the UI, and verify the result in one workflow.
- Generate a Node Spec for developers and AI Agents. Export registered nodes and their parameter schemas as Markdown, so both can discover project capabilities and co-maintain test cases.
Start with Create and use test projects, then learn how to Develop custom Nodes.
ð§° Tools for writing and debugging tests
APIs that fit your existing stack
Use aiAct for autonomous flows, aiTap and aiInput for individual actions, aiAssert for assertions, and aiQuery for structured data extraction. Combine these Agent APIs with your existing code, fixtures, and assertions through Playwright, Puppeteer, or the JavaScript SDK.
Replay execution and refine instructions
Interactive HTML reports show screenshots, element locations, the AI decision process, and action and assertion results. Midscene Test also records the inputs, outputs, duration, and status of custom business operations, giving developers and AI Agents context to investigate failures. Use the Playground to try and refine instructions against your interface.
Let AI coding agents operate the UI
Midscene Skills lets AI coding agents operate applications, verify interfaces, and inspect execution results.
ð Benchmarks and showcases
| Benchmark | Pass@1 | Model used in the reported run |
|---|---|---|
| AndroidWorld | 93.1% | Gemini-3.5-Flash |
| MobileWorld | 78.6% | Gemini-3.6-Flash |
| AppControlBench | 96.7% | Doubao Seed 2.1 Turbo |
Each report includes the run configuration and task results; see AndroidWorld's report for its environment and validator adjustments.
Explore cross-platform showcases, from web form validation to mobile workflows and community-built in-vehicle testing.
ð Get started
- Write YAML test cases â create a Midscene Test project.
- Add visual capabilities to existing tests â integrate with Playwright or Puppeteer.
- Try it before writing tests â use the Chrome extension, or launch a Playground for mobile or desktop.
- Let your AI agent operate the UI â install Midscene Skills.
ð Resources
- Documentation: https://midscenejs.com
- Sample projects: midscene-example
- API reference: https://midscenejs.com/reference/#common
ð¤ Community
ð Awesome Midscene
Community projects that extend Midscene.js capabilities:
- midscene-ios - iOS Mirror automation support for Midscene
- midscene-pc - PC operation device for Windows, macOS, and Linux
- midscene-pc-docker - Docker image with Midscene-PC server pre-installed
- Midscene-Python - Python SDK for Midscene automation
- midscene-java by @Master-Frank - Java SDK for Midscene automation
- midscene-java by @alstafeev - Java SDK for Midscene automation
ð Credits
We would like to thank the following projects:
- Rsbuild and Rslib for the build tools.
- UI-TARS for the open-source agent model UI-TARS.
- Qwen-VL for the open-source multimodal model Qwen-VL.
- scrcpy and yume-chan for browser-based Android device control.
- appium-adb for its JavaScript bridge to ADB.
- appium-webdriveragent for controlling XCTest from JavaScript.
- YADB for improving text input performance.
- libnut-core for cross-platform native keyboard and mouse control.
- Puppeteer for browser automation and control.
- Playwright for browser automation, control, and testing.
ð Citation
If you use Midscene.js in your research or project, please cite:
@software{Midscene.js,
author = {Xiao Zhou, Tao Yu, YiBing Lin},
title = {Midscene.js: GUI Agent for E2E Testing.},
year = {2025},
publisher = {GitHub},
url = {https://github.com/web-infra-dev/midscene}
}
⨠Star History
ð License
Midscene.js is MIT licensed.
Top Related Projects
Central repository for tools, tutorials, resources, and documentation for robotics simulation in Unity.
Reinforcement Learning Environments for Omniverse Isaac Gym
A toolkit for developing and comparing reinforcement learning algorithms.
A modular high-level library to train embodied AI agents across a variety of tasks and environments.
Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
Convert
designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot