@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.
@@ -1,20 +1,8 @@
1
1
  {
2
2
  "name": "@dcl/sdk",
3
- "version": "7.1.4-4491693391.commit-569ecab",
4
3
  "description": "",
5
- "main": "./index.js",
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
- "commit": "569ecab7d901f0b4508fac4a189890039418f39d"
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
- origin: Vector3.create(8, 1, 0.1),
39
- direction: Vector3.create(0, 0, 1),
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
- if (result.hits?.length === 0 || result.timestamp <= lastRaycastTimestamp) continue
55
- lastRaycastTimestamp = result.timestamp
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
- origin: Vector3.create(8, 1, 0.1),
38
- direction: Vector3.create(0, 0, 1),
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
- if (result.hits?.length === 0 || result.timestamp <= lastRaycastTimestamp) continue
54
- lastRaycastTimestamp = result.timestamp
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)