@dcl/sdk 7.0.0-2649664321.commit-63b4b53 → 7.0.0-2677443638.commit-397d9fc
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/dist/ecs7/index.d.ts +54 -0
- package/dist/ecs7/index.js +586 -152
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/dist/ecs7/proto-definitions/AvatarAttach.proto +9 -0
- package/dist/ecs7/proto-definitions/AvatarModifierArea.proto +15 -0
- package/dist/ecs7/proto-definitions/AvatarShape.proto +20 -0
- package/dist/ecs7/proto-definitions/Billboard.proto +10 -0
- package/dist/ecs7/proto-definitions/CameraModeArea.proto +14 -0
- package/package.json +5 -5
- package/src/cli/mock-catalyst/index.js +13 -8
- package/src/setupProxy.js +2 -0
- package/types/ecs7/index.d.ts +54 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
import "common/id.proto";
|
4
|
+
option (ecs_component_id) = 1070;
|
5
|
+
import "common/Vector3.proto";
|
6
|
+
|
7
|
+
message PBAvatarModifierArea {
|
8
|
+
Vector3 area = 1;
|
9
|
+
repeated string exclude_ids = 2;
|
10
|
+
repeated Modifier modifiers = 3;
|
11
|
+
enum Modifier {
|
12
|
+
HIDE_AVATARS = 0;
|
13
|
+
DISABLE_PASSPORTS = 1;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
import "common/id.proto";
|
4
|
+
option (ecs_component_id) = 1080;
|
5
|
+
import "common/Color3.proto";
|
6
|
+
|
7
|
+
message PBAvatarShape {
|
8
|
+
string id = 1;
|
9
|
+
string name = 2;
|
10
|
+
string body_shape = 3;
|
11
|
+
Color3 skin_color = 4;
|
12
|
+
Color3 hair_color = 5;
|
13
|
+
Color3 eye_color = 6;
|
14
|
+
repeated string wearables = 7;
|
15
|
+
string expression_trigger_id = 8;
|
16
|
+
int64 expression_trigger_timestamp = 9;
|
17
|
+
string sticker_trigger_id = 10;
|
18
|
+
int64 sticker_trigger_timestamp = 11;
|
19
|
+
bool talking = 12;
|
20
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
syntax = "proto3";
|
2
|
+
|
3
|
+
import "common/id.proto";
|
4
|
+
option (ecs_component_id) = 1071;
|
5
|
+
import "common/Vector3.proto";
|
6
|
+
|
7
|
+
message PBCameraModeArea {
|
8
|
+
Vector3 area = 1;
|
9
|
+
CameraMode mode = 2;
|
10
|
+
enum CameraMode {
|
11
|
+
FIRST_PERSON = 0;
|
12
|
+
THIRD_PERSON = 1;
|
13
|
+
}
|
14
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dcl/sdk",
|
3
|
-
"version": "7.0.0-
|
3
|
+
"version": "7.0.0-2677443638.commit-397d9fc",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/src/index.js",
|
6
6
|
"typings": "dist/index.d.ts",
|
@@ -27,9 +27,9 @@
|
|
27
27
|
"src/cli/**/*.js"
|
28
28
|
],
|
29
29
|
"dependencies": {
|
30
|
-
"@dcl/amd": "6.11.4-
|
31
|
-
"@dcl/build-ecs": "6.11.4-
|
32
|
-
"@dcl/kernel": "
|
30
|
+
"@dcl/amd": "6.11.4-2677443638.commit-397d9fc",
|
31
|
+
"@dcl/build-ecs": "6.11.4-2677443638.commit-397d9fc",
|
32
|
+
"@dcl/kernel": "1.0.0-2638443584.commit-696a74b",
|
33
33
|
"@dcl/posix": "^1.0.4",
|
34
34
|
"@dcl/schemas": "4.8.0",
|
35
35
|
"@dcl/unity-renderer": "^1.0.40531-20220621125654.commit-472137e",
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"ignore": "^5.1.8"
|
39
39
|
},
|
40
40
|
"minCliVersion": "3.10.2",
|
41
|
-
"commit": "
|
41
|
+
"commit": "397d9fc853cb635b624ac0ac6012a1fb3698b6be"
|
42
42
|
}
|
@@ -153,18 +153,23 @@ var serveFolders = function (app, baseFolders) {
|
|
153
153
|
});
|
154
154
|
}
|
155
155
|
});
|
156
|
-
|
157
|
-
if (!
|
158
|
-
|
159
|
-
return;
|
156
|
+
function pointerRequestHandler(pointers) {
|
157
|
+
if (!pointers) {
|
158
|
+
return [];
|
160
159
|
}
|
161
|
-
var requestedPointers = new Set(
|
162
|
-
? [
|
163
|
-
:
|
160
|
+
var requestedPointers = new Set(pointers && typeof pointers === 'string'
|
161
|
+
? [pointers]
|
162
|
+
: pointers);
|
164
163
|
var resultEntities = (0, setupUtils_1.getSceneJson)({
|
165
164
|
baseFolders: baseFolders,
|
166
165
|
pointers: Array.from(requestedPointers)
|
167
166
|
});
|
168
|
-
|
167
|
+
return resultEntities;
|
168
|
+
}
|
169
|
+
app.get('/content/entities/scene', function (req, res) {
|
170
|
+
return res.json(pointerRequestHandler(req.query.pointer)).end();
|
171
|
+
});
|
172
|
+
app.post('/content/entities/active', function (req, res) {
|
173
|
+
return res.json(pointerRequestHandler(req.body.pointers)).end();
|
169
174
|
});
|
170
175
|
};
|
package/src/setupProxy.js
CHANGED
@@ -46,6 +46,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
46
46
|
};
|
47
47
|
var path = require("path");
|
48
48
|
var fs = require("fs");
|
49
|
+
var express = require("express");
|
49
50
|
var setupUtils_1 = require("./cli/setupUtils");
|
50
51
|
var mock_catalyst_1 = require("./cli/mock-catalyst");
|
51
52
|
var wearables_1 = require("./cli/wearables");
|
@@ -99,6 +100,7 @@ var setupProxy = function (dcl, app) {
|
|
99
100
|
baseWearableFolders = wearables;
|
100
101
|
}
|
101
102
|
}
|
103
|
+
app.use(express.json());
|
102
104
|
try {
|
103
105
|
(0, mock_catalyst_1.mockCatalyst)(app, __spreadArray(__spreadArray([], baseSceneFolders, true), baseWearableFolders, true));
|
104
106
|
}
|
package/types/ecs7/index.d.ts
CHANGED
@@ -198,7 +198,12 @@ declare function defineSdkComponents(engine: Pick<IEngine, 'defineComponent'>):
|
|
198
198
|
Animator: ComponentDefinition<EcsType<PBAnimator>>;
|
199
199
|
AudioSource: ComponentDefinition<EcsType<PBAudioSource>>;
|
200
200
|
AudioStream: ComponentDefinition<EcsType<PBAudioStream>>;
|
201
|
+
AvatarAttach: ComponentDefinition<EcsType<PBAvatarAttach>>;
|
202
|
+
AvatarModifierArea: ComponentDefinition<EcsType<PBAvatarModifierArea>>;
|
203
|
+
AvatarShape: ComponentDefinition<EcsType<PBAvatarShape>>;
|
204
|
+
Billboard: ComponentDefinition<EcsType<PBBillboard>>;
|
201
205
|
BoxShape: ComponentDefinition<EcsType<PBBoxShape>>;
|
206
|
+
CameraModeArea: ComponentDefinition<EcsType<PBCameraModeArea>>;
|
202
207
|
CylinderShape: ComponentDefinition<EcsType<PBCylinderShape>>;
|
203
208
|
GLTFShape: ComponentDefinition<EcsType<PBGLTFShape>>;
|
204
209
|
NFTShape: ComponentDefinition<EcsType<PBNFTShape>>;
|
@@ -1148,6 +1153,44 @@ declare interface PBAudioStream {
|
|
1148
1153
|
url: string;
|
1149
1154
|
}
|
1150
1155
|
|
1156
|
+
declare interface PBAvatarAttach {
|
1157
|
+
avatarId: string;
|
1158
|
+
anchorPointId: number;
|
1159
|
+
}
|
1160
|
+
|
1161
|
+
declare interface PBAvatarModifierArea {
|
1162
|
+
area: Vector3_2 | undefined;
|
1163
|
+
excludeIds: string[];
|
1164
|
+
modifiers: PBAvatarModifierArea_Modifier[];
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
declare enum PBAvatarModifierArea_Modifier {
|
1168
|
+
HIDE_AVATARS = 0,
|
1169
|
+
DISABLE_PASSPORTS = 1,
|
1170
|
+
UNRECOGNIZED = -1
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
declare interface PBAvatarShape {
|
1174
|
+
id: string;
|
1175
|
+
name: string;
|
1176
|
+
bodyShape: string;
|
1177
|
+
skinColor: Color3 | undefined;
|
1178
|
+
hairColor: Color3 | undefined;
|
1179
|
+
eyeColor: Color3 | undefined;
|
1180
|
+
wearables: string[];
|
1181
|
+
expressionTriggerId: string;
|
1182
|
+
expressionTriggerTimestamp: number;
|
1183
|
+
stickerTriggerId: string;
|
1184
|
+
stickerTriggerTimestamp: number;
|
1185
|
+
talking: boolean;
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
declare interface PBBillboard {
|
1189
|
+
x: boolean;
|
1190
|
+
y: boolean;
|
1191
|
+
z: boolean;
|
1192
|
+
}
|
1193
|
+
|
1151
1194
|
declare interface PBBoxShape {
|
1152
1195
|
withCollisions: boolean;
|
1153
1196
|
isPointerBlocker: boolean;
|
@@ -1155,6 +1198,17 @@ declare interface PBBoxShape {
|
|
1155
1198
|
uvs: number[];
|
1156
1199
|
}
|
1157
1200
|
|
1201
|
+
declare interface PBCameraModeArea {
|
1202
|
+
area: Vector3_2 | undefined;
|
1203
|
+
mode: PBCameraModeArea_CameraMode;
|
1204
|
+
}
|
1205
|
+
|
1206
|
+
declare enum PBCameraModeArea_CameraMode {
|
1207
|
+
FIRST_PERSON = 0,
|
1208
|
+
THIRD_PERSON = 1,
|
1209
|
+
UNRECOGNIZED = -1
|
1210
|
+
}
|
1211
|
+
|
1158
1212
|
declare interface PBCylinderShape {
|
1159
1213
|
withCollisions: boolean;
|
1160
1214
|
isPointerBlocker: boolean;
|