# Javafx Media Webview 3d

> Use JavaFX Media, WebView/WebEngine core setup, and 3D scene-graph primitives safely.

- Skill: `johannesrabauer/javafx-media-webview-3d` (Agent Skill)
- Install (CLI): `npx skillmds@latest add johannesrabauer/javafx-media-webview-3d`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johannesrabauer/javafx-media-webview-3d/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: JohannesRabauer (https://skillmd.com/u/johannesrabauer)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/johannesrabauer/javafx-media-webview-3d

---


# JavaFX Media, WebView, and 3D

Use this skill for the core setup of JavaFX media playback, `WebView` / `WebEngine`, and 3D scene
graph primitives. Use `javafx-web-maps-embedded-integration` when the requirement is specifically
about JavaScript bridges, maps, or browser-delivered JavaFX.

## Example

```java
import javafx.scene.Group;
import javafx.scene.SceneAntialiasing;
import javafx.scene.SubScene;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Box;
import javafx.scene.web.WebView;

public class MediaWeb3DView extends BorderPane {

    public MediaWeb3DView() {
        var webView = new WebView();
        webView.getEngine().load("https://openjfx.io");

        var cube = new Box(120, 120, 120);
        cube.setTranslateX(180);
        cube.setTranslateY(160);

        var subScene = new SubScene(new Group(cube), 360, 320, true, SceneAntialiasing.BALANCED);
        subScene.setFill(Color.web("#202020"));

        setLeft(webView);
        setCenter(subScene);
    }
}
```

## Setup notes

- Add JavaFX modules deliberately: `javafx.media`, `javafx.web`, and `javafx.graphics` 3D support
  only when the feature set needs them.
- Keep core `WebView` usage simple here: loading content, sizing it correctly, and managing lifecycle.
- Treat 3D as scene-graph work with its own camera, lighting, and picking decisions.

## Gotchas

- Media codecs and native platform packaging requirements vary by target environment.
- `WebView` loading is asynchronous; do not assume content is immediately ready.
- 3D scene graph usage has different performance and input constraints than standard 2D controls.

