lecodes-sdk 1.0.0 → 1.2.0

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 (94) hide show
  1. package/dist/global.d.ts +18 -4
  2. package/dist/inject.js +260 -361
  3. package/dist/types/animate/tween/Animation.d.ts +69 -0
  4. package/dist/types/animate/tween/Timeline.d.ts +55 -0
  5. package/dist/types/animate/tween/animateValue.d.ts +27 -0
  6. package/dist/types/animate/tween/easing.d.ts +29 -0
  7. package/dist/types/animate/tween/spec.d.ts +178 -0
  8. package/dist/types/g2/Node2D.d.ts +16 -0
  9. package/dist/types/g2/Sprite.d.ts +11 -1
  10. package/dist/types/gl/Camera.d.ts +15 -1
  11. package/dist/types/gl/Foliage.d.ts +47 -0
  12. package/dist/types/gl/Geometry.d.ts +24 -0
  13. package/dist/types/gl/Light.d.ts +28 -7
  14. package/dist/types/gl/Lightmap.d.ts +90 -60
  15. package/dist/types/gl/Material.d.ts +28 -20
  16. package/dist/types/gl/Model.d.ts +7 -5
  17. package/dist/types/gl/Node.d.ts +18 -0
  18. package/dist/types/gl/Particles.d.ts +55 -1
  19. package/dist/types/gl/Scene.d.ts +20 -0
  20. package/dist/types/gl/animation/AnimationClip.d.ts +19 -0
  21. package/dist/types/gl/animation/Animator.d.ts +27 -0
  22. package/dist/types/gl/animation/DynamicBone.d.ts +19 -8
  23. package/dist/types/gl/animation/IK.d.ts +86 -30
  24. package/dist/types/gl/animation/Locomotion.d.ts +52 -3
  25. package/dist/types/gl/animation/Warp.d.ts +2 -1
  26. package/dist/types/gl/animation/core.d.ts +35 -4
  27. package/dist/types/gl/physics/Ragdoll.d.ts +87 -12
  28. package/dist/types/gl/terrain/Terrain.d.ts +12 -2
  29. package/dist/types/inject.d.ts +8 -2
  30. package/dist/types/runtime/input.d.ts +7 -0
  31. package/dist/types/scene/defineScene.d.ts +44 -32
  32. package/dist/types/ui/UIButton.d.ts +3 -1
  33. package/dist/types/ui/UIInput.d.ts +5 -1
  34. package/dist/types/ui/UINode.d.ts +24 -24
  35. package/dist/types.json +1 -1
  36. package/package.json +1 -1
  37. package/prompts/README.md +142 -142
  38. package/prompts/core-design.md +27 -4
  39. package/prompts/core.md +35 -6
  40. package/prompts/dist/2d-game.md +197 -408
  41. package/prompts/dist/3d-app.md +166 -491
  42. package/prompts/dist/ar-app.md +163 -373
  43. package/prompts/dist/design.md +87 -83
  44. package/prompts/dist/ui-app.md +136 -325
  45. package/prompts/select.ts +19 -4
  46. package/src/animate/tween/Animation.ts +378 -0
  47. package/src/animate/tween/Timeline.ts +175 -0
  48. package/src/animate/tween/animateValue.ts +100 -0
  49. package/src/animate/tween/easing.ts +172 -0
  50. package/src/animate/tween/spec.ts +479 -0
  51. package/src/audio/audio.ts +161 -161
  52. package/src/bridges.d.ts +235 -65
  53. package/src/compile/__tests__/assetMacro.test.ts +26 -0
  54. package/src/compile/__tests__/detectEntry.test.ts +19 -0
  55. package/src/compile/__tests__/serverSplit.test.ts +27 -0
  56. package/src/compile/bundler.ts +34 -4
  57. package/src/compile/compileProject.ts +31 -1
  58. package/src/compile/detectEntry.ts +8 -3
  59. package/src/compile/index.ts +2 -0
  60. package/src/compile/serverSplit.ts +9 -3
  61. package/src/g2/Node2D.ts +38 -0
  62. package/src/g2/Sprite.ts +20 -1
  63. package/src/gl/Camera.ts +34 -1
  64. package/src/gl/CameraPlace.ts +52 -52
  65. package/src/gl/Foliage.ts +102 -0
  66. package/src/gl/Geometry.ts +393 -348
  67. package/src/gl/Light.ts +49 -16
  68. package/src/gl/Lightmap.ts +439 -275
  69. package/src/gl/Material.ts +59 -47
  70. package/src/gl/Mesh.ts +120 -120
  71. package/src/gl/Model.ts +23 -12
  72. package/src/gl/Node.ts +39 -0
  73. package/src/gl/Particles.ts +80 -2
  74. package/src/gl/Scene.ts +34 -1
  75. package/src/gl/animation/AnimationClip.ts +52 -0
  76. package/src/gl/animation/Animator.ts +42 -2
  77. package/src/gl/animation/DynamicBone.ts +35 -12
  78. package/src/gl/animation/IK.ts +173 -152
  79. package/src/gl/animation/Locomotion.ts +72 -8
  80. package/src/gl/animation/Playback.ts +5 -4
  81. package/src/gl/animation/Warp.ts +5 -2
  82. package/src/gl/animation/core.ts +65 -4
  83. package/src/gl/physics/Ragdoll.ts +451 -272
  84. package/src/gl/scenarios.ts +291 -291
  85. package/src/gl/terrain/Terrain.ts +33 -2
  86. package/src/inject.ts +236 -226
  87. package/src/runtime/input.ts +11 -0
  88. package/src/scene/defineScene.ts +72 -62
  89. package/src/scene/gizmos.ts +148 -148
  90. package/src/ui/UIButton.ts +2 -2
  91. package/src/ui/UIInput.ts +3 -3
  92. package/src/ui/UINode.ts +61 -36
  93. package/dist/types/animate/animate.d.ts +0 -20
  94. package/src/animate/animate.ts +0 -238
package/dist/global.d.ts CHANGED
@@ -33,6 +33,7 @@ declare global {
33
33
  const DynamicBoneCollider: typeof SDK.DynamicBoneCollider
34
34
  const Feet: typeof SDK.Feet
35
35
  const File: typeof SDK.File
36
+ const Foliage: typeof SDK.Foliage
36
37
  const FollowPath: typeof SDK.FollowPath
37
38
  const FormData: typeof SDK.FormData
38
39
  const Geolocation: typeof SDK.Geolocation
@@ -110,6 +111,7 @@ declare global {
110
111
  const Tilemap: typeof SDK.Tilemap
111
112
  const Tileset: typeof SDK.Tileset
112
113
  const Time: typeof SDK.Time
114
+ const Timeline: typeof SDK.Timeline
113
115
  const Tire: typeof SDK.Tire
114
116
  const TouchStartEvent: typeof SDK.TouchStartEvent
115
117
  const Trail: typeof SDK.Trail
@@ -163,7 +165,6 @@ declare global {
163
165
  const __uiMap: typeof SDK.__uiMap
164
166
  const __withGizmoScope: typeof SDK.__withGizmoScope
165
167
  const animate: typeof SDK.animate
166
- const animateMat4: typeof SDK.animateMat4
167
168
  const app: typeof SDK.app
168
169
  const audio: typeof SDK.audio
169
170
  const cells: typeof SDK.cells
@@ -196,7 +197,6 @@ declare global {
196
197
  const openFilePicker: typeof SDK.openFilePicker
197
198
  const openURL: typeof SDK.openURL
198
199
  const packTile: typeof SDK.packTile
199
- const pauseAnimation: typeof SDK.pauseAnimation
200
200
  const rawCell: typeof SDK.rawCell
201
201
  const rawIndex: typeof SDK.rawIndex
202
202
  const ref: typeof SDK.ref
@@ -204,13 +204,11 @@ declare global {
204
204
  const registerEditorWindow: typeof SDK.registerEditorWindow
205
205
  const registerFont: typeof SDK.registerFont
206
206
  const resolveTire: typeof SDK.resolveTire
207
- const resumeAnimation: typeof SDK.resumeAnimation
208
207
  const rot180: typeof SDK.rot180
209
208
  const rot270: typeof SDK.rot270
210
209
  const rot90: typeof SDK.rot90
211
210
  const share: typeof SDK.share
212
211
  const signal: typeof SDK.signal
213
- const stopAnimation: typeof SDK.stopAnimation
214
212
  const theme: typeof SDK.theme
215
213
  const tileFlip: typeof SDK.tileFlip
216
214
  const tileIndex: typeof SDK.tileIndex
@@ -221,6 +219,10 @@ declare global {
221
219
  type ARScene<T extends ARMode = "default"> = SDK.ARScene<T>
222
220
  type ActiveClip = SDK.ActiveClip
223
221
  type AeroConfig = SDK.AeroConfig
222
+ type AnimateOptions<T extends AnimateValue> = SDK.AnimateOptions<T>
223
+ type AnimateOut<T> = SDK.AnimateOut<T>
224
+ type AnimateValue = SDK.AnimateValue
225
+ type Animation = SDK.Animation
224
226
  type AnimationClip = SDK.AnimationClip
225
227
  type Animator = SDK.Animator
226
228
  type AppState = SDK.AppState
@@ -281,6 +283,7 @@ declare global {
281
283
  type DynamicBoneColliders = SDK.DynamicBoneColliders
282
284
  type DynamicBoneCurve = SDK.DynamicBoneCurve
283
285
  type DynamicBoneFloor = SDK.DynamicBoneFloor
286
+ type EasingInput = SDK.EasingInput
284
287
  type EchoParams = SDK.EchoParams
285
288
  type EdgeSlot = SDK.EdgeSlot
286
289
  type EditorApi = SDK.EditorApi
@@ -297,6 +300,8 @@ declare global {
297
300
  type FileData = SDK.FileData
298
301
  type FillBlock = SDK.FillBlock
299
302
  type FitOptions = SDK.FitOptions
303
+ type FoliageOptions = SDK.FoliageOptions
304
+ type FoliageWind = SDK.FoliageWind
300
305
  type FollowPath = SDK.FollowPath
301
306
  type FootState = SDK.FootState
302
307
  type FormData = SDK.FormData
@@ -427,7 +432,11 @@ declare global {
427
432
  type QRScanner = SDK.QRScanner
428
433
  type Quat = SDK.Quat
429
434
  type Ragdoll = SDK.Ragdoll
435
+ type RagdollActivateOptions = SDK.RagdollActivateOptions
436
+ type RagdollDeactivateOptions = SDK.RagdollDeactivateOptions
437
+ type RagdollFacing = SDK.RagdollFacing
430
438
  type RagdollHinge = SDK.RagdollHinge
439
+ type RagdollHitOptions = SDK.RagdollHitOptions
431
440
  type RagdollPart = SDK.RagdollPart
432
441
  type Ray = SDK.Ray
433
442
  type Replicated = SDK.Replicated
@@ -498,6 +507,10 @@ declare global {
498
507
  type TilemapSourceDef = SDK.TilemapSourceDef
499
508
  type Tileset = SDK.Tileset
500
509
  type TilesetDef = SDK.TilesetDef
510
+ type Timeline = SDK.Timeline
511
+ type TimelineAddOptions = SDK.TimelineAddOptions
512
+ type TimelineOptions = SDK.TimelineOptions
513
+ type TimelinePosition = SDK.TimelinePosition
501
514
  type Tire = SDK.Tire
502
515
  type TouchStartEvent<T = any> = SDK.TouchStartEvent<T>
503
516
  type Trail = SDK.Trail
@@ -508,6 +521,7 @@ declare global {
508
521
  type TrianglePick = SDK.TrianglePick
509
522
  type Trigger = SDK.Trigger
510
523
  type Trigger2D = SDK.Trigger2D
524
+ type TweenMeta = SDK.TweenMeta
511
525
  type UIBottomSheet = SDK.UIBottomSheet
512
526
  type UIBottomSheetStyle = SDK.UIBottomSheetStyle
513
527
  type UIBox = SDK.UIBox