Skip to content

Conversation

jb0gie
Copy link

@jb0gie jb0gie commented Aug 24, 2025

Description:

Summary

  • Added WebView node type for displaying web content in Hyperfy worlds
  • Supports both world space (3D positioned) and screen space (HUD/overlay) rendering
  • Enables embedding of web content like videos, dashboards, and interactive panels

Features

  • World Space WebViews: Position web content in 3D space (TVs, monitors, info panels)
  • Screen Space WebViews: Fixed HUD elements and overlays
  • Full iframe support: Display any web content that supports iframe embedding
  • Configurable dimensions: Set width/height for content resolution
  • Interactive: Supports click-through interaction when appropriate

Implementation Details

  • New WebView node type added to core nodes
  • Supports standard node transformations (position, rotation, scale)
  • Screen space uses viewport coordinates (0-1 range)
  • World space uses size parameter for scaling
  • Comprehensive documentation added

Use Cases

  • Video screens and TVs in virtual spaces
  • Information dashboards and panels
  • HUD elements for game interfaces
  • Interactive web-based tools within worlds
  • Live data displays and monitoring

Test Plan

  • Create world space WebView with YouTube embed
  • Create screen space WebView as HUD element
  • Test positioning and scaling in both spaces
  • Verify iframe content loads correctly
  • Test interaction with WebView content
  • Ensure proper cleanup on node removal

Known Issues

  • Z-indexing/Depth layering: There are currently issues with z-index ordering and depth layering when multiple WebViews overlap or when WebViews interact with
    other UI elements. This needs to be addressed in a follow-up PR.

Documentation

  • Added comprehensive documentation in docs/scripting/nodes/types/WebView.md
  • Includes usage examples for both world and screen space
  • Property descriptions and configuration options

Files Changed

  • src/core/nodes/WebView.js - WebView node implementation
  • src/core/nodes/index.js - Export WebView from nodes
  • docs/scripting/nodes/types/WebView.md - Documentation

@jb0gie
Copy link
Author

jb0gie commented Aug 24, 2025

webviewPR1.mp4
webviewPR2.mp4

@ashconnell
Copy link
Contributor

oh this is a bit weird haha, i think you have it overlaying the iframe on top of everything, but we probably want to use a cutout so that other 3d objects can go in front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants