@rtsdk/topia 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/dist/index.cjs +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,8 +10,22 @@ A Topia provided API Key can be included with every object initialization as a p
|
|
|
10
10
|
|
|
11
11
|
### Want to build interactive assets? This is how you can get started:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Getting a Key Pair:
|
|
14
|
+
|
|
15
|
+
- Navigate directly to your [integrations page](https://topia.io/t/dashboard/integrations) or follow the steps below from within a world.
|
|
16
|
+
- Click on your image (or circle) at the top left of the left hand navbar.
|
|
17
|
+
- Click Edit Profile. This will bring you to a separate dashboard.
|
|
18
|
+
- Click Integrations on the left nav
|
|
19
|
+
- Click the “Add Key Pair” button. This is going to be your public / private key pair for your app.
|
|
20
|
+
|
|
21
|
+
Adding a Key Pair to an asset:
|
|
22
|
+
|
|
23
|
+
Make an asset “interactive” by adding your PUBLIC key to the integrations page of the asset editor.
|
|
24
|
+
|
|
25
|
+
- Go back to your world. Make sure you are in “Edit Mode” by toggling on Edit on the left nav bar
|
|
26
|
+
- Hover over any asset. Click the pencil icon that should show up on hover and select “Edit”
|
|
27
|
+
- Go to the Integrations tab
|
|
28
|
+
- At the bottom, you'll see a section that says “Add player session credentials to asset interactions”. Toggle that on. Now webhooks that fire from this asset and iframes that open from this asset will include the following values:
|
|
15
29
|
- assetId
|
|
16
30
|
- interactivePublicKey
|
|
17
31
|
- interactiveNonce
|
package/dist/index.cjs
CHANGED
|
@@ -40049,9 +40049,9 @@ class DroppedAsset extends Asset {
|
|
|
40049
40049
|
* await droppedAsset.updatePosition(100,200);
|
|
40050
40050
|
* ```
|
|
40051
40051
|
*/
|
|
40052
|
-
updatePosition(x, y) {
|
|
40052
|
+
updatePosition(x, y, yOrderAdjust) {
|
|
40053
40053
|
try {
|
|
40054
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { x, y }, "set-position");
|
|
40054
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { x, y, yOrderAdjust }, "set-position");
|
|
40055
40055
|
}
|
|
40056
40056
|
catch (error) {
|
|
40057
40057
|
throw this.errorHandler({ error });
|
|
@@ -41393,14 +41393,16 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41393
41393
|
return droppedAsset;
|
|
41394
41394
|
});
|
|
41395
41395
|
}
|
|
41396
|
-
drop(asset, { interactivePublicKey, position: { x, y }, uniqueName, urlSlug, }) {
|
|
41396
|
+
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41397
41397
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41398
41398
|
try {
|
|
41399
41399
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41400
41400
|
assetId: asset.id,
|
|
41401
41401
|
interactivePublicKey,
|
|
41402
41402
|
position: { x, y },
|
|
41403
|
+
sceneDropId,
|
|
41403
41404
|
uniqueName,
|
|
41405
|
+
yOrderAdjust,
|
|
41404
41406
|
}, asset.requestOptions);
|
|
41405
41407
|
const { id } = response.data;
|
|
41406
41408
|
return new DroppedAsset(this.topia, id, urlSlug, { credentials: asset.credentials });
|
package/dist/index.d.ts
CHANGED
|
@@ -270,7 +270,7 @@ declare class DroppedAsset extends Asset implements DroppedAssetInterface {
|
|
|
270
270
|
* await droppedAsset.updatePosition(100,200);
|
|
271
271
|
* ```
|
|
272
272
|
*/
|
|
273
|
-
updatePosition(x: number, y: number): Promise<void | ResponseType>;
|
|
273
|
+
updatePosition(x: number, y: number, yOrderAdjust: number): Promise<void | ResponseType>;
|
|
274
274
|
/**
|
|
275
275
|
* @summary
|
|
276
276
|
* Updates private zone options for a dropped asset.
|
|
@@ -999,7 +999,7 @@ interface DroppedAssetInterface extends AssetInterface {
|
|
|
999
999
|
updateMediaType({ audioRadius, audioSliderVolume, isVideo, mediaLink, mediaName, mediaType, portalName, syncUserMedia, }: UpdateMediaTypeInterface): Promise<void | ResponseType>;
|
|
1000
1000
|
updateMuteZone(isMutezone: boolean): Promise<void | ResponseType>;
|
|
1001
1001
|
updateWebhookZone(isWebhookZoneEnabled: boolean): Promise<void | ResponseType>;
|
|
1002
|
-
updatePosition(x: number, y: number): Promise<void | ResponseType>;
|
|
1002
|
+
updatePosition(x: number, y: number, yOrderAdjust: number): Promise<void | ResponseType>;
|
|
1003
1003
|
updatePrivateZone({ isPrivateZone, isPrivateZoneChatDisabled, privateZoneUserCap, }: UpdatePrivateZoneInterface): Promise<void | ResponseType>;
|
|
1004
1004
|
updateScale(assetScale: number): Promise<void | ResponseType>;
|
|
1005
1005
|
updateUploadedMediaSelected(mediaId: string): Promise<void | ResponseType>;
|
|
@@ -1485,14 +1485,16 @@ declare class DroppedAssetFactory extends SDKController {
|
|
|
1485
1485
|
constructor(topia: Topia);
|
|
1486
1486
|
create(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): DroppedAsset;
|
|
1487
1487
|
get(id: string, urlSlug: string, options?: DroppedAssetOptionalInterface): Promise<DroppedAsset>;
|
|
1488
|
-
drop(asset: Asset, { interactivePublicKey, position: { x, y }, uniqueName, urlSlug, }: {
|
|
1488
|
+
drop(asset: Asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }: {
|
|
1489
1489
|
interactivePublicKey?: string;
|
|
1490
1490
|
position: {
|
|
1491
1491
|
x: number;
|
|
1492
1492
|
y: number;
|
|
1493
1493
|
};
|
|
1494
|
+
sceneDropId?: string;
|
|
1494
1495
|
uniqueName?: string;
|
|
1495
1496
|
urlSlug: string;
|
|
1497
|
+
yOrderAdjust?: number;
|
|
1496
1498
|
}): Promise<DroppedAsset>;
|
|
1497
1499
|
}
|
|
1498
1500
|
|
package/dist/index.js
CHANGED
|
@@ -40047,9 +40047,9 @@ class DroppedAsset extends Asset {
|
|
|
40047
40047
|
* await droppedAsset.updatePosition(100,200);
|
|
40048
40048
|
* ```
|
|
40049
40049
|
*/
|
|
40050
|
-
updatePosition(x, y) {
|
|
40050
|
+
updatePosition(x, y, yOrderAdjust) {
|
|
40051
40051
|
try {
|
|
40052
|
-
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { x, y }, "set-position");
|
|
40052
|
+
return __classPrivateFieldGet(this, _DroppedAsset_updateDroppedAsset, "f").call(this, { x, y, yOrderAdjust }, "set-position");
|
|
40053
40053
|
}
|
|
40054
40054
|
catch (error) {
|
|
40055
40055
|
throw this.errorHandler({ error });
|
|
@@ -41391,14 +41391,16 @@ class DroppedAssetFactory extends SDKController {
|
|
|
41391
41391
|
return droppedAsset;
|
|
41392
41392
|
});
|
|
41393
41393
|
}
|
|
41394
|
-
drop(asset, { interactivePublicKey, position: { x, y }, uniqueName, urlSlug, }) {
|
|
41394
|
+
drop(asset, { interactivePublicKey, position: { x, y }, sceneDropId, uniqueName, urlSlug, yOrderAdjust, }) {
|
|
41395
41395
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41396
41396
|
try {
|
|
41397
41397
|
const response = yield this.topiaPublicApi().post(`/world/${urlSlug}/assets`, {
|
|
41398
41398
|
assetId: asset.id,
|
|
41399
41399
|
interactivePublicKey,
|
|
41400
41400
|
position: { x, y },
|
|
41401
|
+
sceneDropId,
|
|
41401
41402
|
uniqueName,
|
|
41403
|
+
yOrderAdjust,
|
|
41402
41404
|
}, asset.requestOptions);
|
|
41403
41405
|
const { id } = response.data;
|
|
41404
41406
|
return new DroppedAsset(this.topia, id, urlSlug, { credentials: asset.credentials });
|
package/package.json
CHANGED