7.1.0
Migration Guide Beta
A scene written using 7.0.5 will need some minor adjustments when migrated to 7.1.0 Below are the changes that need to be considered:
- Component ids are now a string, instead of a number. Also when defining a component, the order of parameters has been reversed. Now the ID goes first, then the schema.
// OLD export const PainterComponent = engine.defineComponent( { myField: Schemas.Number }, 1234 ) // NEW export const PainterComponent = engine.defineComponent( 'PainterComponent', { myField: Schemas.Number } )
- UI alignment properties have changed types, they're no longer enums, instead special string types.
💡 Tip: In Visual Studio Code, on each property press Ctrl + Space bar to see a dropdown of suggestions with the allowed values. - The
PointerHoverFeedback
component was renamed toPointerEvents
- The
Billboard
component has changed properties. It now only has oneBillboardMode
property, that takes an enum that sets several different modes. getRealmData()
is deprecated. UsegetRealm()
instead.isPreview()
is deprecated.getRealm()
now returns an additionalpreview
boolean property to use instead.getParcel()
is deprecated. UsegetSceneInfo()
instead.- The
albedoColor
in a PBRMaterial
component changed from typeColor3
to typeColor4
, to support transparent colors. - In
package.json
, thescripts
section must be changed to the following:"scripts": { "start": "sdk-commands start", "build": "sdk-commands build", "upgrade-sdk": "npm install --save-dev @dcl/sdk@latest", "upgrade-sdk:next": "npm install --save-dev @dcl/sdk@next" },
- Loading of texture images from external sources requires adding domain to an allowlist on the scene's scene.json file.
- When running a preview of an SDK7 scene via the command line, use
npm run start
andnpm run build
. Don't usedcl start
ordcl build
. The Decentraland Editor is encouraged as the defacto way to run scene previews. - The orientation of Textures is now flipped on plane and cube primitives. This results in a more intuitive result, as the default orientation of a plane now exhibits an image facing the right way. It is also consistent with how video textures are oriented.
- Fixed bug with rotating platforms, they now move players that are standing on them.
New features
Additionally, the following new features are now available:
- VideoTexture is now implemented for playing streamed videos
- New Schema types
Schemas.Vector3
andSchemas.Quaternion
. These are useful for defining custom components that store these common data types. - New
Entity
type has been added, it helps with type checking for operations that expect or return an entity - New
onMouseDown
andonMouseUp
properties for UI pointer events - New
Dropdown
UI element - New
Input
UI element - New
Label
UI element - New
texture
andtextureType
properties inuiBackground
let you set images on a UI element. - New
textureSlices
property lets you perform 9-Slice stretching of UI textures, to preserve proportions on the corners and margins. - Basic materials on the
Material
component have a newdiffuseColor
property to apply a plain color to a shade-less material. - The
PointerLock
component allows you to know if the player currently has the cursor locked
What's Changed
- feat add async fn for transports by @gonpombo8 in #352
- test: golden files runtime checks by @menduz in #358
- fix: pb types by @leanmendoza in #359
- chore: update protocol, add new restricted actions by @menduz in #361
- fix: exitCode=1 on failed compilation by @menduz in #364
- fix: Schemas.String was not working on sandboxed environment by @menduz in #367
- UiInput - UiDropdown - UiBackground - PointerEvents by @gonpombo8 in #357
- spike: documentation by @menduz in #365
- refactor: entity as number with versions by @leanmendoza in #360
- add key type for custom components by @gonpombo8 in #369
- Add initial CLI implementation for sdk by @nicoecheza in #366
- make an observable ECS by @menduz in #370
- add memory snapshots by @menduz in #373
- feat: crdt with gset by @leanmendoza in #362
- optimize bytebuffer to not allocate much memory by @menduz in #372
- fix: restore all 3 billboard modes by @menduz in #375
- lower opcodes resolution by @menduz in #377
- fix: Material
albedoColor
asColor4
by @pbosio in #376 - Add 'init' command by @nicoecheza in #378
- Update @dcl/protocol version by @nicoecheza in #380
- add non exposed list for kernel-rpc api by @gonpombo8 in #374
- feat: auto calculate component numbers and hide them in common cases by @menduz in #384
- Remove Enums from react ecs by @gonpombo8 in #386
- add devcontainer by @menduz in #387
- try to fix dependencies by @menduz in #388
- chore: use components approach by @menduz in #390
- Add CLI 'start' command by @nicoecheza in #389
- feat: call
crdtGetState
fromEngineApi
service on start by @pbosio in #381 - chore: move on to use @dcl/explorer by @leanmendoza in #395
- Add @dcl/inspector by @nicoecheza in #393
- Update npm inspector name to '@dcl/inspector' by @nicoecheza in #400
- feat api reference by @gonpombo8 in #391
- chore(deps): bump @dcl/schemas from 5.14.0 to 6.6.0 in /packages/@dcl/sdk by @dependabot in #399
- chore: update README by @eordano in #401
- feat: video player by @kuruk-mm in #363
- Update "init" command to move files out of folder after unzipping by @nicoecheza in #405
- fix: add albedo color to basic material by @0xD-Fabio in #406
- add Scene API by @gonpombo8 in #404
- update protocol package by @gonpombo8 in #408
- fix commands by @menduz in #407
- hotfix: hang "start" command until a SIGTERM is received by @menduz in #409
- feat: retrieve commands from multiple entities by @leanmendoza in #403
- feat: move crdt protocol to adr 117 rev. v2 by @leanmendoza in #385
- chore: bump @dcl/explorer by @leanmendoza in #411
- fix: Change basic material property from albedoColor to diffuseColor by @0xD-Fabio in #410
- add ci step to run e2e cli tests by @menduz in #413
- Add files-watcher for 'start' command by @nicoecheza in #398
- feat: change enum schema to force the final serialized schema by @leanmendoza in #415
- feat: add two-way CRDT snapshot tests by @menduz in #417
- refactor: remove @dcl/crdt & unify CRDT logic inside components by @menduz in #418
- fix UI default values for optioanls by @gonpombo8 in #419
- feat: append CRDT command by @menduz in #420
- feat: add support to schema description to inverse schema creation by @leanmendoza in #422
- fix: unresolved version in publish by @menduz in #425
- fix: revert isTriggered
entity
param to optional by @leanmendoza in #427 - Fix MessageBus by @gonpombo8 in #426
- fix: revert to getInputCommand without mandatory entity by @leanmendoza in #428
- Add entity tree to inspector by @nicoecheza in #421
- chore: minimize dependency count by @menduz in #429
- feat: export static & remove unused code & @dcl/sdk-commands own package by @menduz in #432
- chore: lint by @cazala in #434
- chore: esbuild by @cazala in #436
- add analytics to sdk-commands by @gonpombo8 in #433
- add packageversion for analytics old dashboards by @gonpombo8 in #438
- Add 'deploy' command by @nicoecheza in #435
- Add tracking analytics to 'deploy' command by @nicoecheza in #439
- bump @dcl/explorer package by @gonpombo8 in #440
New Contributors
- @nicoecheza made their first contribution in #366
- @eordano made their first contribution in #401
- @0xD-Fabio made their first contribution in #406
Full Changelog: 7.0.5...7.0.6