@minecraft/server-editor 0.1.0-beta.1.26.40-preview.26 → 0.1.0-beta.1.26.40-preview.29

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.
Files changed (2) hide show
  1. package/index.d.ts +429 -0
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1285,6 +1285,7 @@ export declare enum PropertyItemType {
1285
1285
  SubPane = 'editorUI:SubPane',
1286
1286
  TagContainer = 'editorUI:TagContainer',
1287
1287
  Text = 'editorUI:Text',
1288
+ TimelinePlayer = 'editorUI:TimelinePlayer',
1288
1289
  ToggleGroup = 'editorUI:ToggleGroup',
1289
1290
  Vector2 = 'editorUI:Vector2',
1290
1291
  Vector3 = 'editorUI:Vector3',
@@ -1419,6 +1420,14 @@ export enum ThemeSettingsColorKey {
1419
1420
  Warning = 'Warning',
1420
1421
  }
1421
1422
 
1423
+ /**
1424
+ * Playback state for Timeline Player property item.
1425
+ */
1426
+ export declare enum TimelinePlayerPlaybackState {
1427
+ Playing = 'playing',
1428
+ Stopped = 'stopped',
1429
+ }
1430
+
1422
1431
  export enum WidgetCollisionType {
1423
1432
  None = 0,
1424
1433
  Radius = 1,
@@ -1450,6 +1459,11 @@ export enum WidgetGizmoEventType {
1450
1459
  OriginReleased = 'OriginReleased',
1451
1460
  }
1452
1461
 
1462
+ export enum WidgetGizmoScaleMode {
1463
+ World = 0,
1464
+ Screen = 1,
1465
+ }
1466
+
1453
1467
  export enum WidgetGroupSelectionMode {
1454
1468
  Multiple = 'Multiple',
1455
1469
  None = 'None',
@@ -5325,6 +5339,24 @@ export class WidgetComponentGizmo extends WidgetComponentBase {
5325
5339
  *
5326
5340
  */
5327
5341
  normalizedOffsetOverride?: minecraftserver.Vector3;
5342
+ /**
5343
+ * @remarks
5344
+ * This property can't be edited in restricted-execution mode.
5345
+ *
5346
+ */
5347
+ scaleMode: WidgetGizmoScaleMode;
5348
+ /**
5349
+ * @remarks
5350
+ * This property can't be edited in restricted-execution mode.
5351
+ *
5352
+ */
5353
+ screenScale: number;
5354
+ /**
5355
+ * @remarks
5356
+ * This property can't be edited in restricted-execution mode.
5357
+ *
5358
+ */
5359
+ worldScale: number;
5328
5360
  /**
5329
5361
  * @remarks
5330
5362
  * This function can't be called in restricted-execution mode.
@@ -10311,6 +10343,14 @@ export interface IPropertyPane extends IPane {
10311
10343
  *
10312
10344
  */
10313
10345
  addText(value: IObservableProp<LocalizedString>, options?: ITextPropertyItemOptions): ITextPropertyItem;
10346
+ /**
10347
+ * @remarks
10348
+ * Adds a timeline player pane to the pane. The player owns its
10349
+ * own playhead and a collection of timeline entries that share
10350
+ * that playhead.
10351
+ *
10352
+ */
10353
+ addTimelinePlayer(options?: ITimelinePlayerOptions): ITimelinePlayer;
10314
10354
  /**
10315
10355
  * @remarks
10316
10356
  * Adds a toggle button group to the pane.
@@ -11046,6 +11086,278 @@ export interface ITextPropertyItemOptions extends IPropertyItemOptionsBase {
11046
11086
  tooltip?: BasicTooltipContent;
11047
11087
  }
11048
11088
 
11089
+ /**
11090
+ * A pane that hosts a single playhead and a collection of
11091
+ * timeline entries that share it
11092
+ */
11093
+ // @ts-ignore Class inheritance allowed for native defined classes
11094
+ export interface ITimelinePlayer extends IPropertyItemBase, IPane {
11095
+ /**
11096
+ * @remarks
11097
+ * Number of timeline entries owned by this player.
11098
+ *
11099
+ */
11100
+ readonly entryCount: number;
11101
+ /**
11102
+ * @remarks
11103
+ * Add a group to the dropdown.
11104
+ *
11105
+ * @param id
11106
+ * Unique identifier for the group.
11107
+ * @param name
11108
+ * Localized display name for the group.
11109
+ * @param tooltip
11110
+ * Optional localized tooltip shown when hovering over the
11111
+ * dropdown entry.
11112
+ */
11113
+ addGroup(id: string, name: LocalizedString, tooltip?: LocalizedString): void;
11114
+ /**
11115
+ * @remarks
11116
+ * Add a Vector3 timeline entry to the player.
11117
+ *
11118
+ * @param options
11119
+ * Per-entry options.
11120
+ */
11121
+ addVector3Timeline(options: IVector3TimelinePlayerEntryOptions): IVector3TimelinePlayerEntry;
11122
+ /**
11123
+ * @remarks
11124
+ * Get the total duration in seconds.
11125
+ *
11126
+ */
11127
+ getDuration(): number;
11128
+ /**
11129
+ * @remarks
11130
+ * Look up an entry by id.
11131
+ *
11132
+ * @param id
11133
+ * Entry identifier.
11134
+ */
11135
+ getEntryById(id: string): ITimelinePlayerEntry | undefined;
11136
+ /**
11137
+ * @remarks
11138
+ * Look up an entry by index.
11139
+ *
11140
+ * @param index
11141
+ * Entry index.
11142
+ */
11143
+ getEntryByIndex(index: number): ITimelinePlayerEntry | undefined;
11144
+ /**
11145
+ * @remarks
11146
+ * Get the current list of groups.
11147
+ *
11148
+ */
11149
+ getGroups(): ITimelinePlayerGroup[];
11150
+ /**
11151
+ * @remarks
11152
+ * Get the current playback state.
11153
+ *
11154
+ */
11155
+ getPlaybackState(): TimelinePlayerPlaybackState;
11156
+ /**
11157
+ * @remarks
11158
+ * Get the decimal precision used for keyframe time spacing.
11159
+ *
11160
+ */
11161
+ getPrecision(): number;
11162
+ /**
11163
+ * @remarks
11164
+ * Get the currently selected group identifier.
11165
+ *
11166
+ */
11167
+ getSelectedGroupId(): string;
11168
+ /**
11169
+ * @remarks
11170
+ * Get the playhead time in seconds.
11171
+ *
11172
+ */
11173
+ getTime(): number;
11174
+ /**
11175
+ * @remarks
11176
+ * Remove an entry by id.
11177
+ *
11178
+ * @param id
11179
+ * Entry identifier.
11180
+ */
11181
+ removeEntry(id: string): boolean;
11182
+ /**
11183
+ * @remarks
11184
+ * Remove a group from the dropdown.
11185
+ *
11186
+ * @param id
11187
+ * Identifier of the group to remove.
11188
+ */
11189
+ removeGroup(id: string): void;
11190
+ /**
11191
+ * @remarks
11192
+ * Rename a group in the dropdown.
11193
+ *
11194
+ * @param id
11195
+ * Identifier of the group to rename.
11196
+ * @param newName
11197
+ * New localized display name.
11198
+ */
11199
+ renameGroup(id: string, newName: LocalizedString): void;
11200
+ /**
11201
+ * @remarks
11202
+ * Set the total duration in seconds.
11203
+ *
11204
+ * @param duration
11205
+ * New duration in seconds.
11206
+ */
11207
+ setDuration(duration: number): void;
11208
+ /**
11209
+ * @remarks
11210
+ * Set the playback state.
11211
+ *
11212
+ * @param state
11213
+ * New playback state.
11214
+ */
11215
+ setPlaybackState(state: TimelinePlayerPlaybackState): void;
11216
+ /**
11217
+ * @remarks
11218
+ * Set the decimal precision used for keyframe time spacing.
11219
+ *
11220
+ * @param precision
11221
+ * Decimal precision.
11222
+ */
11223
+ setPrecision(precision: number): void;
11224
+ /**
11225
+ * @remarks
11226
+ * Set the selected group.
11227
+ *
11228
+ * @param id
11229
+ * Identifier of the group to select.
11230
+ */
11231
+ setSelectedGroupId(id: string): void;
11232
+ /**
11233
+ * @remarks
11234
+ * Set the playhead time.
11235
+ *
11236
+ * @param time
11237
+ * New playhead time in seconds.
11238
+ */
11239
+ setTime(time: number): void;
11240
+ }
11241
+
11242
+ /**
11243
+ * Common interface for all entries owned by a Timeline Player
11244
+ * pane
11245
+ */
11246
+ export interface ITimelinePlayerEntry {
11247
+ /**
11248
+ * @remarks
11249
+ * Unique identifier for the entry.
11250
+ *
11251
+ */
11252
+ readonly id: string;
11253
+ /**
11254
+ * @remarks
11255
+ * Identifier of the parent Timeline Player pane.
11256
+ *
11257
+ */
11258
+ readonly paneId: string;
11259
+ /**
11260
+ * @remarks
11261
+ * Display title shown next to the entry's graph.
11262
+ *
11263
+ */
11264
+ readonly title: LocalizedString | undefined;
11265
+ /**
11266
+ * @remarks
11267
+ * Updates title of the entry.
11268
+ *
11269
+ * @param title
11270
+ * New title.
11271
+ */
11272
+ setTitle(title: LocalizedString | undefined): void;
11273
+ }
11274
+
11275
+ /**
11276
+ * A group entry shown in a Timeline Player's group dropdown
11277
+ */
11278
+ export interface ITimelinePlayerGroup {
11279
+ /**
11280
+ * @remarks
11281
+ * Unique identifier for the group.
11282
+ *
11283
+ */
11284
+ id: string;
11285
+ /**
11286
+ * @remarks
11287
+ * Localized display name shown in the dropdown.
11288
+ *
11289
+ */
11290
+ name: LocalizedString;
11291
+ /**
11292
+ * @remarks
11293
+ * Optional localized tooltip shown when hovering over the
11294
+ * dropdown entry.
11295
+ *
11296
+ */
11297
+ tooltip?: LocalizedString;
11298
+ }
11299
+
11300
+ /**
11301
+ * Optional properties for a Timeline Player pane
11302
+ */
11303
+ // @ts-ignore Class inheritance allowed for native defined classes
11304
+ export interface ITimelinePlayerOptions extends IPropertyItemOptionsBase {
11305
+ /**
11306
+ * @remarks
11307
+ * Total duration in seconds.
11308
+ *
11309
+ */
11310
+ duration?: number;
11311
+ /**
11312
+ * @remarks
11313
+ * Group entries for the dropdown.
11314
+ *
11315
+ */
11316
+ groups?: ITimelinePlayerGroup[];
11317
+ /**
11318
+ * @remarks
11319
+ * Callback triggered when the group selection changes.
11320
+ *
11321
+ */
11322
+ onGroupChanged?: (groupId: string) => void;
11323
+ /**
11324
+ * @remarks
11325
+ * Callback triggered when the play/stop toggle is clicked.
11326
+ *
11327
+ */
11328
+ onPlayStopToggled?: () => void;
11329
+ /**
11330
+ * @remarks
11331
+ * Callback triggered when the redistribute button is clicked.
11332
+ *
11333
+ */
11334
+ onRedistributeClicked?: () => void;
11335
+ /**
11336
+ * @remarks
11337
+ * Callback triggered when the playhead time changes.
11338
+ *
11339
+ */
11340
+ onTimeChanged?: (current: number, prev: number) => void;
11341
+ /**
11342
+ * @remarks
11343
+ * Initial playback state.
11344
+ *
11345
+ */
11346
+ playbackState?: TimelinePlayerPlaybackState;
11347
+ /**
11348
+ * @remarks
11349
+ * Decimal precision for keyframe time values.
11350
+ *
11351
+ */
11352
+ precision?: number;
11353
+ /**
11354
+ * @remarks
11355
+ * Initially selected group identifier.
11356
+ *
11357
+ */
11358
+ selectedGroupId?: string;
11359
+ }
11360
+
11049
11361
  /**
11050
11362
  * A property item which supports toggle button properties
11051
11363
  */
@@ -11280,6 +11592,15 @@ export interface IVector2PropertyItemOptions extends IPropertyItemOptionsBase {
11280
11592
  tooltip?: BasicTooltipContent;
11281
11593
  }
11282
11594
 
11595
+ /**
11596
+ * A keyframe in a Vector3 Timeline Player entry
11597
+ */
11598
+ export interface IVector3Keyframe {
11599
+ id: string;
11600
+ time: number;
11601
+ value: minecraftserver.Vector3;
11602
+ }
11603
+
11283
11604
  /**
11284
11605
  * A property item which supports Vector3 properties
11285
11606
  */
@@ -11381,6 +11702,112 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
11381
11702
  tooltip?: BasicTooltipContent;
11382
11703
  }
11383
11704
 
11705
+ /**
11706
+ * A Vector3 timeline entry owned by a Timeline Player pane
11707
+ */
11708
+ // @ts-ignore Class inheritance allowed for native defined classes
11709
+ export interface IVector3TimelinePlayerEntry extends ITimelinePlayerEntry {
11710
+ /**
11711
+ * @remarks
11712
+ * Add a keyframe.
11713
+ *
11714
+ * @param keyframe
11715
+ * Keyframe to add.
11716
+ */
11717
+ addKeyframe(keyframe: IVector3Keyframe): void;
11718
+ /**
11719
+ * @remarks
11720
+ * Get the list of keyframes for this entry.
11721
+ *
11722
+ */
11723
+ getKeyframes(): IVector3Keyframe[];
11724
+ /**
11725
+ * @remarks
11726
+ * Get the currently selected keyframe identifier for this
11727
+ * entry, or undefined if no keyframe in this entry is
11728
+ * selected.
11729
+ *
11730
+ */
11731
+ getSelectedKeyframeId(): string | undefined;
11732
+ /**
11733
+ * @remarks
11734
+ * Remove a keyframe by its identifier.
11735
+ *
11736
+ * @param id
11737
+ * Identifier of the keyframe to remove.
11738
+ */
11739
+ removeKeyframe(id: string): void;
11740
+ /**
11741
+ * @remarks
11742
+ * Bulk replace all keyframes.
11743
+ *
11744
+ * @param keyframes
11745
+ * New set of keyframes.
11746
+ */
11747
+ setKeyframes(keyframes: IVector3Keyframe[]): void;
11748
+ /**
11749
+ * @remarks
11750
+ * Set the selected keyframe for this entry.
11751
+ *
11752
+ * @param keyframeId
11753
+ * Identifier of the keyframe to select, or undefined to
11754
+ * deselect.
11755
+ */
11756
+ setSelectedKeyframeId(keyframeId: string | undefined): void;
11757
+ /**
11758
+ * @remarks
11759
+ * Update an existing keyframe. Matched by the id field.
11760
+ *
11761
+ * @param keyframe
11762
+ * Keyframe with updated time/value.
11763
+ */
11764
+ updateKeyframe(keyframe: IVector3Keyframe): void;
11765
+ }
11766
+
11767
+ /**
11768
+ * Optional properties for a Vector3 timeline entry inside a
11769
+ * Timeline Player pane
11770
+ */
11771
+ export interface IVector3TimelinePlayerEntryOptions {
11772
+ /**
11773
+ * @remarks
11774
+ * Initial keyframe entries for this timeline.
11775
+ *
11776
+ */
11777
+ keyframes?: IVector3Keyframe[];
11778
+ /**
11779
+ * @remarks
11780
+ * Callback triggered when a keyframe is added.
11781
+ *
11782
+ */
11783
+ onKeyframeAdded?: (keyframe: IVector3Keyframe) => void;
11784
+ /**
11785
+ * @remarks
11786
+ * Callback triggered when a keyframe is moved or its value
11787
+ * changes.
11788
+ *
11789
+ */
11790
+ onKeyframeChanged?: (keyframe: IVector3Keyframe) => void;
11791
+ /**
11792
+ * @remarks
11793
+ * Callback triggered when a keyframe is removed.
11794
+ *
11795
+ */
11796
+ onKeyframeRemoved?: (keyframe: IVector3Keyframe) => void;
11797
+ /**
11798
+ * @remarks
11799
+ * Callback triggered when a keyframe is selected.
11800
+ *
11801
+ */
11802
+ onKeyframeSelected?: (keyframe: IVector3Keyframe) => void;
11803
+ /**
11804
+ * @remarks
11805
+ * Display title shown next to the entry's graph.
11806
+ *
11807
+ */
11808
+ title?: LocalizedString;
11809
+ }
11810
+
11384
11811
  /**
11385
11812
  * A property item which supports Vector3 Timeline properties
11386
11813
  */
@@ -11751,6 +12178,7 @@ export interface WidgetComponentBoundingBoxOptions extends WidgetComponentBaseOp
11751
12178
  normalizedOrigin?: minecraftserver.Vector3;
11752
12179
  outlineColor?: minecraftserver.RGBA;
11753
12180
  rotation?: minecraftserver.StructureRotation;
12181
+ scaleMode?: WidgetGizmoScaleMode;
11754
12182
  showWorldIntersections?: boolean;
11755
12183
  stateChangeEvent?: (arg0: WidgetComponentBoundingBoxStateChangeEventParameters) => void;
11756
12184
  visibleHull?: boolean;
@@ -11781,6 +12209,7 @@ export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions
11781
12209
  axes?: Axis;
11782
12210
  enablePlanes?: boolean;
11783
12211
  normalizedAutoOffset?: minecraftserver.Vector3;
12212
+ scaleMode?: WidgetGizmoScaleMode;
11784
12213
  stateChangeEvent?: (arg0: WidgetComponentGizmoStateChangeEventParameters) => void;
11785
12214
  }
11786
12215
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.26.40-preview.26",
3
+ "version": "0.1.0-beta.1.26.40-preview.29",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,8 +14,8 @@
14
14
  ],
15
15
  "peerDependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^2.10.0-beta.1.26.40-preview.26",
18
- "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.26"
17
+ "@minecraft/server": "^2.10.0-beta.1.26.40-preview.29",
18
+ "@minecraft/vanilla-data": ">=1.20.70 || 1.26.40-preview.29"
19
19
  },
20
20
  "license": "MIT"
21
21
  }