Beschreibung
Miris streams 3D assets to the browser. This plugin puts them in your WordPress site: pick assets from your Miris account, arrange them in a scene, set up the camera, and publish.
Blocks
- Miris Scene holds the scene. It sets the camera and its size, using WordPress’s own aspect ratio and minimum height controls.
- Miris Stream streams one asset. Search your account’s assets by name, then position, rotate and scale it.
- Miris Group moves, rotates and scales the streams inside it together.
The editor shows a live preview of the scene. Move the camera there, then click Use current view in the block toolbar to save that view.
Shortcodes
For the classic editor, page builders and anywhere else shortcodes work:
[miris_scene aspect_ratio="16/9"]
[miris_camera controls position="0 1.5 6"]
[miris_stream uuid="ASSET_ID"]
[miris_stream uuid="ASSET_ID" position="3 0 0" rotation="0 90deg 0" scale="1.5"]
[miris_group position="-3 0 0"]
[miris_stream uuid="ASSET_ID"]
[/miris_group]
[/miris_scene]
[miris_scene]takesaspect_ratio(default16/9), ormin_height(a CSS length such as400pxor60vh), andclass.[miris_camera]is optional.controlslets visitors move the camera.positionandrotationset the starting view; leave them out to use the asset’s default view. Without a[miris_camera], controls are on.[miris_stream]takes the asset’suuid, plusposition,rotationandscale.scalecan be one number for all three axes.[miris_group]takesposition,rotationandscale. Groups can’t contain other groups.
Positions and scales are three numbers, x y z. Rotations are three angles in radians, as in the Miris web SDK, or with a CSS angle unit: deg, grad, rad or turn.
People who can edit a page see a list of any mistakes in its shortcodes, such as an invalid asset ID. Visitors only see the parts that are valid.
Requirements
- A Miris account and API key.
- A browser with WebGPU, such as current versions of Chrome and Edge.
- A site served over HTTPS. Browsers only allow WebGPU on secure pages, so scenes don’t display on plain-http sites. The plugin warns you in Site Health, on Settings Miris and in the Scene block.
External services
This plugin relies on Miris, a 3D streaming service run by Miris, Inc., and so connects to Miris’s servers.
Miris API (app.miris.com)
- When you save an API key in Settings Miris, your site’s server sends the API key to the Miris API to find or create the „WordPress“ viewer key.
- When you search for assets in the block editor, your site’s server sends the viewer key and the search text to the Miris API. Asset thumbnails are then loaded by your browser from Miris’s content servers.
- When a page with a scene is viewed, the visitor’s browser sends the viewer key and the scene’s asset IDs to the Miris API, and downloads the assets from Miris’s content servers. As with any web request, Miris receives the visitor’s IP address and browser details.
Miris web components (cdn.miris.com)
- Scenes are played by the Miris web components, a script and WebAssembly files that the plugin loads from Miris’s CDN instead of bundling. Visitors‘ browsers download them when a page has a scene, and editors‘ browsers when the block editor opens. Miris receives the visitor’s IP address and browser details.
Miris terms of use and privacy policy.
Source code
The block editor scripts in build are compiled with @wordpress/scripts from the source in the plugin’s src folder.
The scene player, the Miris web components, isn’t part of the plugin; it’s loaded from Miris’s CDN as described under External services. It’s published as @miris-inc/components on npm. Developers can load another copy with the miris_components_url filter.
Blöcke
Dieses Plugin unterstützt 3 Blöcke.
- Miris Group Moves, rotates and scales the streams inside it together.
- Miris Stream Streams a Miris asset in a scene.
- Miris Scene Stream Miris 3D assets.
Installation
- Install and activate the plugin.
- Go to Settings Miris and paste your Miris API key. The plugin creates a viewer key named „WordPress“ on your Miris account for showing scenes to visitors.
- Add a Miris Scene block to a post or page, then pick an asset for its stream in the Streams panel.
FAQ
-
Why don’t scenes show up?
-
Check that your site address starts with https (Settings General), and that you’re using a browser with WebGPU. Tools Site Health reports whether the site is set up for scenes.
-
Is my API key shown to visitors?
-
No. The API key stays on your server; Settings Miris only shows its first six characters. Pages show the viewer key, which only allows streaming assets.
-
What happens to the viewer key if I change the API key?
-
If the new API key’s account can still use the stored viewer key, the plugin keeps it. Otherwise it creates a new „WordPress“ viewer key on that account. The old key isn’t revoked; you can revoke it in the Miris portal.
-
Can I use the plugin on a site without the block editor?
-
Yes. Use the shortcodes.
Rezensionen
There are no reviews for this plugin.
Mitwirkende & Entwickler
„Miris“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:
MitwirkendeÜbersetze „Miris“ in deine Sprache.
Interessiert an der Entwicklung?
Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.
Änderungsprotokoll
0.1.0
- Settings Miris for the API key and the „WordPress“ viewer key.
- Miris Scene, Miris Stream and Miris Group blocks, with a live editor preview and an asset picker.
[miris_scene],[miris_camera],[miris_stream]and[miris_group]shortcodes.- HTTPS warnings in Site Health, Settings Miris and the Scene block.
- Loads the Miris web components from Miris’s CDN.
