@dcl/playground-assets 7.1.4-4491693391.commit-569ecab → 7.1.4-4495128859.commit-9f954df
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/alpha.d.ts +337 -58
- package/dist/beta.d.ts +337 -58
- package/dist/index.bundled.d.ts +337 -58
- package/dist/index.js +161 -108
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/playground/sdk/dcl-sdk.package.json +14 -14
- package/dist/playground/snippets/raycast-hit-many.ts +7 -4
- package/dist/playground/snippets/raycast-hit.ts +9 -4
- package/dist/playground-assets.d.ts +337 -58
- package/etc/playground-assets.api.json +591 -152
- package/etc/playground-assets.api.md +48 -64
- package/package.json +17 -17
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/sdk",
|
|
3
|
-
"version": "7.1.4-4491693391.commit-569ecab",
|
|
4
3
|
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"typings": "./index.d.ts",
|
|
7
|
-
"types": "./index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "tsc -p tsconfig.json",
|
|
10
|
-
"start": "npm run build && tsc -p tsconfig.json --watch"
|
|
11
|
-
},
|
|
12
|
-
"keywords": [],
|
|
13
|
-
"tsdoc": {
|
|
14
|
-
"tsdocFlavor": "AEDoc"
|
|
15
|
-
},
|
|
4
|
+
"version": "7.1.4-4495128859.commit-9f954df",
|
|
16
5
|
"author": "Decentraland",
|
|
17
|
-
"license": "Apache-2.0",
|
|
18
6
|
"dependencies": {
|
|
19
7
|
"@dcl/ecs": "file:../ecs",
|
|
20
8
|
"@dcl/ecs-math": "2.0.1-20221129185242.commit-40495c1",
|
|
@@ -23,12 +11,24 @@
|
|
|
23
11
|
"@dcl/react-ecs": "file:../react-ecs",
|
|
24
12
|
"@dcl/sdk-commands": "file:../sdk-commands"
|
|
25
13
|
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"main": "./index.js",
|
|
26
17
|
"minCliVersion": "3.14.1",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc -p tsconfig.json",
|
|
20
|
+
"start": "npm run build && tsc -p tsconfig.json --watch"
|
|
21
|
+
},
|
|
22
|
+
"tsdoc": {
|
|
23
|
+
"tsdocFlavor": "AEDoc"
|
|
24
|
+
},
|
|
27
25
|
"typedoc": {
|
|
28
26
|
"entryPoint": "./src/index.ts",
|
|
29
27
|
"readmeFile": "./README.md",
|
|
30
28
|
"displayName": "SDK",
|
|
31
29
|
"tsconfig": "./tsconfig.json"
|
|
32
30
|
},
|
|
33
|
-
"
|
|
31
|
+
"types": "./index.d.ts",
|
|
32
|
+
"typings": "./index.d.ts",
|
|
33
|
+
"commit": "9f954df0bf811ad6c2f4af1e1ae86426ab05e950"
|
|
34
34
|
}
|
|
@@ -35,8 +35,10 @@ pointerEventsSystem.onPointerDown(
|
|
|
35
35
|
cubeEntity,
|
|
36
36
|
() => {
|
|
37
37
|
Raycast.createOrReplace(raycastEntity, {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
direction: {
|
|
39
|
+
$case: 'localDirection',
|
|
40
|
+
localDirection: Vector3.Forward()
|
|
41
|
+
},
|
|
40
42
|
maxDistance: 16,
|
|
41
43
|
queryType: RaycastQueryType.RQT_QUERY_ALL
|
|
42
44
|
})
|
|
@@ -51,8 +53,9 @@ pointerEventsSystem.onPointerDown(
|
|
|
51
53
|
let lastRaycastTimestamp = -1
|
|
52
54
|
engine.addSystem(() => {
|
|
53
55
|
for (const [_entity, result] of engine.getEntitiesWith(RaycastResult)) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
const timestamp = result.timestamp ?? 0
|
|
57
|
+
if (result.hits?.length === 0 || timestamp <= lastRaycastTimestamp) continue
|
|
58
|
+
lastRaycastTimestamp = timestamp
|
|
56
59
|
|
|
57
60
|
if (result.hits[0] && result.hits[0].position) {
|
|
58
61
|
createCube(result.hits[0].position.x, result.hits[0].position.y, result.hits[0].position.z, 0.3)
|
|
@@ -34,8 +34,12 @@ pointerEventsSystem.onPointerDown(
|
|
|
34
34
|
cubeEntity,
|
|
35
35
|
() => {
|
|
36
36
|
Raycast.createOrReplace(raycastEntity, {
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
continuous: true,
|
|
38
|
+
timestamp: 0,
|
|
39
|
+
direction: {
|
|
40
|
+
$case: 'localDirection',
|
|
41
|
+
localDirection: Vector3.Forward()
|
|
42
|
+
},
|
|
39
43
|
maxDistance: 16,
|
|
40
44
|
queryType: RaycastQueryType.RQT_HIT_FIRST
|
|
41
45
|
})
|
|
@@ -50,8 +54,9 @@ pointerEventsSystem.onPointerDown(
|
|
|
50
54
|
let lastRaycastTimestamp = -1
|
|
51
55
|
engine.addSystem(() => {
|
|
52
56
|
for (const [_entity, result] of engine.getEntitiesWith(RaycastResult)) {
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
const timestamp = result.timestamp ?? 0
|
|
58
|
+
if (result.hits?.length === 0 || timestamp <= lastRaycastTimestamp) continue
|
|
59
|
+
lastRaycastTimestamp = timestamp
|
|
55
60
|
|
|
56
61
|
if (result.hits[0] && result.hits[0].position) {
|
|
57
62
|
createCube(result.hits[0].position.x, result.hits[0].position.y, result.hits[0].position.z, 0.3)
|