Basics of OKO components
OKO Web Client 2.24.1 - CSP 4.19.0 | OKO iOS Version 1.8.0 Build 5.42.0.0 running CSP 4.18.0 | Version 1.0.0 (117785) - CSP 4.18.0 - UE 5.1
What is an OKO component?
The OKO platform allows you to craft engaging cross-reality experiences, accessible through a range of different platforms and devices. To achieve this, you build up an experience using "entities" and multiplayer "components". While entities do a lot behind the scenes, in your space they will have no visual appearance, just transform properties that you can use to define a position, rotation, and scale. The real power comes from the components that you add to them. We use components to compose the visual appearance of our space and the interactive elements within it.
Let's say that you wanted to add a model of a dinosaur to your space, then you would create an entity, add a Static Model Component, and then reference your dinosaur mesh. Let's say you wanted the dinosaur model to be animated, then instead of the Static Model Component, you would create an entity with an Animated Model Component and reference a skeletal dinosaur mesh with animation.
But what if you wanted the dinosaur to be interactive and to only play its roar animation when a user got close to it? Well, you would create an entity with an Animated Model Component and a Script Component, and you could use the script to define this behavior. That example could also be achieved with a Collision Component set to act as a trigger, and then when the player entered the trigger volume a trigger event could be used to play the animation via the script.
Hopefully, this last example makes it clear that components are a powerful way to compose complex behavior and that often many different approaches can be used to create the same effect. We encourage you to dive in and have a go!
Different types of components
Component name | Description |
---|---|
Animated Model | Enables users to add 3D animated skeletal meshes to a space. Files are stored in glb format by the Magnopus Cloud Services. Component allows for replication of playback state. |
Audio | Allows users to define spatial audio sources for their spaces using mp3 audio files. Component allows for replication of playback state. |
Button | Allows users to add a button to a space. An onClick event is raised by the button and scripts can register to respond to this. |
Collider / Trigger | Enables users to define collision objects for an entity. Colliders can be converted to triggers and events will then be raised when a user interacts with them. These events can be responded to via scripts. |
E-Commerce | Enables users to purchase physical products from within OKO spaces via an integration with Shopify. |
External Link | Enables users to attach a clickable link to an entity, with the specified text directing the user to the recorded URL. |
Fiducial Marker | Allows users to anchor their spaces to the physical world by defining a 2D image to use as a fiducial marker. |
Fog | Allows users to define an area of depth fog within a space, with options to control the type (linear or exponential) as well as the color and density. |
Gaussian Splats | Allows users to add a Gaussian Splat entity to a space. |
Image | Allows users to add jpg or png images to their space. |
Light | Enables users to attach point, spot, or a directional light to an entity, with control over intensity, color, and radius. |
Portal | Allows users to define a portal which can be used to link spaces and allow users to travel from one to another. |
Reflection Probe | Enables users to define reflections in a scene by assigning an HDR capture. |
Script | Script components are used to define custom interactions that will be executed on all engines and platforms. This means that a user exploring your space in a Unity iOS app will experience the same thing when pressing a button as another user on a web client, or in an Unreal Windows or Android application. Scripts allow users to respond to events raised by components, get the property state of components, as well as update them. |
Spline | Allows users to create and edit splines, along which objects can be animated via scripts. |
Static Model | Enables users to add 3D meshes to a space. Files are stored in glb format by the Magnopus Cloud Services. |
Text | Allows users to add text to a space. |
Video | Allows users to add videos to their space. These can be created using mp4 files uploaded to the Magnopus Cloud Services, or by specifying the URL of a video stream. |
Video Stream | Allows users to add a video stream into their space. |
Component support by client type
This table outlines platform support for each of the components listed above.
Key
๐ข Supported
๐ก Coming soon
โ Not supported
No | Component | UEEE (Editor Extensions) | Unreal OKO Blueprints | Unity | Web |
1 | Audio | ๐ข | ๐ข | ๐ข | ๐ข |
2 | Static Model | ๐ข | ๐ข | ๐ข | ๐ข |
3 | Animated Model | ๐ข | ๐ข | ๐ข | ๐ข |
4 | Avatar | ๐ข | ๐ข | ๐ข | ๐ข |
5 | Light | ๐ข | ๐ข | ๐ข | ๐ข |
6 | Button | ๐ข | ๐ข | ๐ข | ๐ข |
7 | External Link | ๐ข | ๐ข | ๐ข | ๐ข |
8 | Fog | ๐ข | ๐ข | โ | ๐ข |
9 | Portal | โ | โ | โ | ๐ข |
10 | Image | ๐ข | ๐ข | ๐ข | ๐ข |
11 | Collider / Trigger | ๐ข | ๐ข | ๐ข | ๐ข |
12 | Video | ๐ข | ๐ข | ๐ข | ๐ข |
14 | Script | ๐ข | ๐ก | ๐ข | ๐ข |
15 | Spline | โ | โ | โ | ๐ข |
16 | Reflection Probe | ๐ข | ๐ข | ๐ข | ๐ข |
17 | Fiducial Marker | โ | โ | ๐ข | ๐ข |
18 | E-Commerce | โ | โ | โ | ๐ข |
Thatโs it for the basics!