Skip to content

jason-d-walter/stingray-html5

Repository files navigation

Autodesk® Stingray / HTML5 plugin

Render HTML5 views in Stingray. The engine plugin uses CEF to render HTML5 content to texture buffers. Once the texture buffers are generated, the render resource is assigned to the view's material html5_texture slot.

image

Features

  • Script the engine application entirely using JavaScript (see plugin/sample_project/app.html5/app.js).
  • Expose Stingray API to JavaScript.
  • Render 2D web views fullscreen to an engine window.
  • Render 3D web views on level object meshes.
  • Compile .html5 folder as accessible HTML content at runtime using the stingray:// scheme.

Install prerequisites

Build

./make.rb

Install plugin

  1. Start editor

  2. Open plugin manager (Alt+Shift+P) and select plugin/html5.plugin.

    image

  3. Create new HTML Sample project (e.g. from the HTML5 Sample under the Templates tab in the project manager)

    image

Run sample project

Once the sample project is the selected project in your tool chain configuration you can compile and run it using:

$SR_BIN_DIR: The binary directory where Stingray is installed.

stingray_win64_dev.exe --toolchain "$SR_BIN_DIR" --plugin-dir "./plugin/binaries/engine/win64/dev"

Compile and run project

stingray_win64_dev.exe --source-dir "./plugin/sample_project" --data-dir "./build/sample_project_data/win32" --map-source-dir core "$SR_BIN_DIR" --map-source-dir html5_resources "./plugin" --plugin-dir "./plugin/binaries/engine/win64/dev" --compile --continue --silent-mode

If everything worked well, you should see the engine booting up and displaying some web views.

Debug the editor engine instance

  1. Start the editor engine with the following options:

    stingray_win64_dev.exe --data-dir "G:\stingray-html5\build\sample_project_data\win32" --viewport-provider --disable-default-window --editor-ini "core/editor_slave/stingray_editor/settings" --no-raw-input

  2. Then start the Stingray editor. The editor will attach to the instance you started manually if the command line matches. It is important that you specify the same command line arguments than the editor would launch this instance. You can use a tool like Process Explorer to look for these options.

Screenshots

3D web views

image

image

Stingray Editor

image

Videos

https://youtu.be/yC7pq5Y_K_Q