Option 2: Standalone Plugin

This document provides a guide for using the Standalone Plugin to integrate Polygon Streaming into a PlayCanvas project that does not target publication to VIVERSE.


PlayCanvas Standalone Plugin

For PlayCanvas projects that are not targeting publication to VIVERSE, this PlayCanvas standalone plugin is the first option for integrating Polygon Streaming into those projects. Because these projects will not be published to VIVERSE, we've created a standalone version of the plugin that does not utilize the PlayCanvas VIVERSE Chrome browser extension.

For using Polygon Streaming Standalone in PlayCanvas, the Basis Library needs to be imported inside your PlayCanvas project. To import the library go to: Settings -> Rendering -> and click the IMPORT BASIS button.

1

Install the plugin

Download the latest version of the PlayCanvas standalone plugin here. Import the polygon-streaming.js script into the Assets window of the PlayCanvas project.

2

Create the StreamController

A. Create a new entity and name it StreamController. This entity will control the streaming models inside the project.

B. Add the StreamController script to the StreamController entity. You can check detailed information on these parameters here.

C. Add the Camera entity from the project to the Camera field.

3

Create the StreamableModel

A. Create a new entity and name it StreamableModel.

B. Add the StreamableModel script to the StreamableModel entity. This will create the component to stream the model inside the scene.

C. Paste the URL address of your streaming model into the Path or url to model field.

4

Test the model

Launch the project in the PlayCanvas editor to test the streaming model.

Component Attributes

See here for a description of the attributes used in the Stream Controller and Streamable Model components.

Last updated

Was this helpful?