decentraland / decentraland/sdk-skills

lighting-environment skill: SkyboxTime fixedTime scale is wrong (3000/hr vs SDK's 3600/hr)

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
3
Forks
0
Avg merge
16h 2m
Merged PRs (30d)
12

Description

The `lighting-environment/SKILL.md` documents `SkyboxTime`'s `fixedTime` units as:

> Time values: 0 = midnight, 36000 = noon, 54000 = dusk, 72000 = midnight again.

This implies **3000 units per hour**. But the SDK's own generated protobuf type (`@dcl/ecs/dist/components/generated/pb/decentraland/sdk/components/skybox_time.gen.d.ts`) states:

> fixed time of day, represented as a number of seconds since the start of the day, where 0 is 00:00hs, 43200 is 12:00hs and 86400 is 24:00hs

i.e. real seconds-of-day, **3600 per hour**. Following the skill's landmarks, e.g. setting `"fixedTime": 54000` ("dusk") actually puts the scene at 15:00 (3pm), not dusk. Setting `51000` for 5pm with the skill's scale renders the scene at ~14:10.

The same skill section also applies to `scene.json` `skyboxConfig.fixedTime` (which uses the same scale), so the bug shows up in both code and JSON paths.

### Suggested fix

Replace the landmarks with values matching the SDK protobuf:

```
0 = 00:00 (midnight)
21600 = 06:00
43200 = 12:00 (noon)
64800 = 18:00 (dusk)
86400 = 24:00 (next midnight)
```

Reproduced with `@dcl/sdk@7.23.1`, `npx skills add decentraland/sdk-skills` into a fresh `sdk-commands init` scaffold.

This skill pack's README notes the source-of-truth is `decentraland/docs`, so the fix likely needs to land there and propagate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.