lecodes-sdk 0.20.0 → 1.0.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.
- package/dist/global.d.ts +48 -5
- package/dist/inject.js +361 -260
- package/dist/types/audio/Bus.d.ts +45 -0
- package/dist/types/audio/Sound.d.ts +28 -0
- package/dist/types/audio/Voice.d.ts +27 -0
- package/dist/types/audio/audio.d.ts +83 -0
- package/dist/types/audio/support.d.ts +1 -0
- package/dist/types/canvas/Canvas.d.ts +2 -0
- package/dist/types/gl/DecalSet.d.ts +148 -0
- package/dist/types/gl/Geometry.d.ts +17 -0
- package/dist/types/gl/Light.d.ts +7 -0
- package/dist/types/gl/Lightmap.d.ts +9 -0
- package/dist/types/gl/Material.d.ts +90 -2
- package/dist/types/gl/Mesh.d.ts +18 -1
- package/dist/types/gl/Model.d.ts +34 -0
- package/dist/types/gl/Particles.d.ts +13 -0
- package/dist/types/gl/Scene.d.ts +23 -0
- package/dist/types/gl/Texture.d.ts +29 -1
- package/dist/types/gl/animation/AnimationClip.d.ts +25 -12
- package/dist/types/gl/animation/DynamicBone.d.ts +173 -0
- package/dist/types/gl/{IK.d.ts → animation/IK.d.ts} +4 -4
- package/dist/types/gl/{Locomotion.d.ts → animation/Locomotion.d.ts} +6 -6
- package/dist/types/gl/animation/core.d.ts +15 -10
- package/dist/types/gl/audio/AudioSource.d.ts +60 -0
- package/dist/types/gl/audio/AudioZone.d.ts +32 -0
- package/dist/types/gl/audio/SceneAudio.d.ts +11 -0
- package/dist/types/gl/{NavAgent.d.ts → nav/NavAgent.d.ts} +4 -4
- package/dist/types/gl/{NavMesh.d.ts → nav/NavMesh.d.ts} +4 -4
- package/dist/types/gl/{CharacterController.d.ts → physics/CharacterController.d.ts} +5 -5
- package/dist/types/gl/{Physics.d.ts → physics/Physics.d.ts} +6 -5
- package/dist/types/gl/{Ragdoll.d.ts → physics/Ragdoll.d.ts} +4 -4
- package/dist/types/gl/{Shape.d.ts → physics/Shape.d.ts} +3 -3
- package/dist/types/gl/{Trigger.d.ts → physics/Trigger.d.ts} +2 -2
- package/dist/types/gl/state.d.ts +0 -1
- package/dist/types/gl/{Terrain.d.ts → terrain/Terrain.d.ts} +6 -6
- package/dist/types/gl/{terrainMesh.d.ts → terrain/terrainMesh.d.ts} +1 -1
- package/dist/types/gl/vehicle/Vehicle.d.ts +300 -0
- package/dist/types/gl/vehicle/Wheel.d.ts +147 -0
- package/dist/types/inject.d.ts +33 -21
- package/dist/types/runtime/files.d.ts +24 -1
- package/dist/types/runtime/input.d.ts +11 -0
- package/dist/types/scene/defineScene.d.ts +10 -3
- package/dist/types/ui/UIImage.d.ts +15 -5
- package/dist/types.json +1 -1
- package/package.json +1 -1
- package/prompts/README.md +142 -142
- package/prompts/dist/2d-game.md +408 -197
- package/prompts/dist/3d-app.md +491 -166
- package/prompts/dist/ar-app.md +373 -163
- package/prompts/dist/design.md +83 -87
- package/prompts/dist/ui-app.md +325 -136
- package/src/audio/Bus.ts +102 -0
- package/src/audio/Sound.ts +96 -0
- package/src/audio/Voice.ts +102 -0
- package/src/audio/audio.ts +161 -0
- package/src/audio/support.ts +6 -0
- package/src/bridges.d.ts +279 -32
- package/src/canvas/Canvas.ts +21 -0
- package/src/compile/__tests__/compile.test.ts +11 -0
- package/src/compile/compileProject.ts +30 -15
- package/src/compile/header.ts +6 -3
- package/src/compile/index.ts +4 -0
- package/src/compile/sceneEditor.ts +42 -1
- package/src/core/Aspect.ts +33 -8
- package/src/g2/Scene2D.ts +7 -0
- package/src/gl/CameraPlace.ts +52 -52
- package/src/gl/DecalSet.ts +360 -0
- package/src/gl/Geometry.ts +348 -279
- package/src/gl/Light.ts +16 -0
- package/src/gl/Lightmap.ts +35 -7
- package/src/gl/Material.ts +173 -4
- package/src/gl/Mesh.ts +120 -83
- package/src/gl/Model.ts +33 -1
- package/src/gl/Node.ts +1 -1
- package/src/gl/Particles.ts +21 -3
- package/src/gl/Scene.ts +41 -7
- package/src/gl/Texture.ts +43 -3
- package/src/gl/animation/AnimationClip.ts +43 -20
- package/src/gl/animation/Animator.ts +4 -3
- package/src/gl/animation/DynamicBone.ts +459 -0
- package/src/gl/{IK.ts → animation/IK.ts} +4 -4
- package/src/gl/{Locomotion.ts → animation/Locomotion.ts} +7 -7
- package/src/gl/animation/core.ts +20 -15
- package/src/gl/audio/AudioSource.ts +113 -0
- package/src/gl/audio/AudioZone.ts +75 -0
- package/src/gl/audio/SceneAudio.ts +26 -0
- package/src/gl/{NavAgent.ts → nav/NavAgent.ts} +5 -5
- package/src/gl/{NavMesh.ts → nav/NavMesh.ts} +8 -8
- package/src/gl/{CharacterController.ts → physics/CharacterController.ts} +5 -5
- package/src/gl/{Physics.ts → physics/Physics.ts} +12 -5
- package/src/gl/{Ragdoll.ts → physics/Ragdoll.ts} +272 -270
- package/src/gl/{Shape.ts → physics/Shape.ts} +3 -3
- package/src/gl/{Trigger.ts → physics/Trigger.ts} +2 -2
- package/src/gl/{physicsEvents.ts → physics/physicsEvents.ts} +1 -1
- package/src/gl/scenarios.ts +291 -291
- package/src/gl/state.ts +1 -1
- package/src/gl/{Terrain.ts → terrain/Terrain.ts} +10 -10
- package/src/gl/{terrainMesh.ts → terrain/terrainMesh.ts} +1 -1
- package/src/gl/vehicle/Vehicle.ts +666 -0
- package/src/gl/vehicle/Wheel.ts +290 -0
- package/src/inject.ts +226 -212
- package/src/runtime/files.ts +32 -2
- package/src/runtime/input.ts +6 -1
- package/src/scene/defineScene.ts +26 -10
- package/src/scene/gizmos.ts +148 -148
- package/src/scene/level.ts +2 -2
- package/src/ui/UIImage.ts +21 -7
- package/dist/types/gl/Gearbox.d.ts +0 -86
- package/dist/types/gl/Vehicle.d.ts +0 -191
- package/dist/types/gl/Wheel.d.ts +0 -95
- package/src/gl/Gearbox.ts +0 -212
- package/src/gl/Vehicle.ts +0 -473
- package/src/gl/Wheel.ts +0 -240
- /package/dist/types/gl/{physicsEvents.d.ts → physics/physicsEvents.d.ts} +0 -0
package/dist/global.d.ts
CHANGED
|
@@ -11,8 +11,11 @@ declare global {
|
|
|
11
11
|
const Animator: typeof SDK.Animator
|
|
12
12
|
const Aspect: typeof SDK.Aspect
|
|
13
13
|
const AudioPlayer: typeof SDK.AudioPlayer
|
|
14
|
+
const AudioSource: typeof SDK.AudioSource
|
|
15
|
+
const AudioZone: typeof SDK.AudioZone
|
|
14
16
|
const Autotile2D: typeof SDK.Autotile2D
|
|
15
17
|
const Bitmap: typeof SDK.Bitmap
|
|
18
|
+
const Bus: typeof SDK.Bus
|
|
16
19
|
const Camera: typeof SDK.Camera
|
|
17
20
|
const Camera2D: typeof SDK.Camera2D
|
|
18
21
|
const CameraFollow: typeof SDK.CameraFollow
|
|
@@ -24,11 +27,14 @@ declare global {
|
|
|
24
27
|
const ClickEvent: typeof SDK.ClickEvent
|
|
25
28
|
const Color: typeof SDK.Color
|
|
26
29
|
const DateValue: typeof SDK.DateValue
|
|
30
|
+
const DecalSet: typeof SDK.DecalSet
|
|
31
|
+
const DecalTrail: typeof SDK.DecalTrail
|
|
32
|
+
const DynamicBone: typeof SDK.DynamicBone
|
|
33
|
+
const DynamicBoneCollider: typeof SDK.DynamicBoneCollider
|
|
27
34
|
const Feet: typeof SDK.Feet
|
|
28
35
|
const File: typeof SDK.File
|
|
29
36
|
const FollowPath: typeof SDK.FollowPath
|
|
30
37
|
const FormData: typeof SDK.FormData
|
|
31
|
-
const Gearbox: typeof SDK.Gearbox
|
|
32
38
|
const Geolocation: typeof SDK.Geolocation
|
|
33
39
|
const Geometry: typeof SDK.Geometry
|
|
34
40
|
const Gizmos: typeof SDK.Gizmos
|
|
@@ -76,6 +82,7 @@ declare global {
|
|
|
76
82
|
const Push: typeof SDK.Push
|
|
77
83
|
const QRScanner: typeof SDK.QRScanner
|
|
78
84
|
const Quat: typeof SDK.Quat
|
|
85
|
+
const REVERB_PRESETS: typeof SDK.REVERB_PRESETS
|
|
79
86
|
const Ragdoll: typeof SDK.Ragdoll
|
|
80
87
|
const Ray: typeof SDK.Ray
|
|
81
88
|
const Replicated: typeof SDK.Replicated
|
|
@@ -84,10 +91,12 @@ declare global {
|
|
|
84
91
|
const Scene: typeof SDK.Scene
|
|
85
92
|
const Scene2D: typeof SDK.Scene2D
|
|
86
93
|
const Scene2dHandle: typeof SDK.Scene2dHandle
|
|
94
|
+
const SceneAudio: typeof SDK.SceneAudio
|
|
87
95
|
const SceneHandle: typeof SDK.SceneHandle
|
|
88
96
|
const Service: typeof SDK.Service
|
|
89
97
|
const Shape: typeof SDK.Shape
|
|
90
98
|
const Shape2D: typeof SDK.Shape2D
|
|
99
|
+
const Sound: typeof SDK.Sound
|
|
91
100
|
const Spin: typeof SDK.Spin
|
|
92
101
|
const Sprite: typeof SDK.Sprite
|
|
93
102
|
const SpriteAnimation: typeof SDK.SpriteAnimation
|
|
@@ -101,6 +110,7 @@ declare global {
|
|
|
101
110
|
const Tilemap: typeof SDK.Tilemap
|
|
102
111
|
const Tileset: typeof SDK.Tileset
|
|
103
112
|
const Time: typeof SDK.Time
|
|
113
|
+
const Tire: typeof SDK.Tire
|
|
104
114
|
const TouchStartEvent: typeof SDK.TouchStartEvent
|
|
105
115
|
const Trail: typeof SDK.Trail
|
|
106
116
|
const Trigger: typeof SDK.Trigger
|
|
@@ -129,6 +139,7 @@ declare global {
|
|
|
129
139
|
const Vec3: typeof SDK.Vec3
|
|
130
140
|
const Vehicle: typeof SDK.Vehicle
|
|
131
141
|
const VideoPlayer: typeof SDK.VideoPlayer
|
|
142
|
+
const Voice: typeof SDK.Voice
|
|
132
143
|
const Warp: typeof SDK.Warp
|
|
133
144
|
const WebSocket: typeof SDK.WebSocket
|
|
134
145
|
const Wheel: typeof SDK.Wheel
|
|
@@ -154,6 +165,7 @@ declare global {
|
|
|
154
165
|
const animate: typeof SDK.animate
|
|
155
166
|
const animateMat4: typeof SDK.animateMat4
|
|
156
167
|
const app: typeof SDK.app
|
|
168
|
+
const audio: typeof SDK.audio
|
|
157
169
|
const cells: typeof SDK.cells
|
|
158
170
|
const clipboard: typeof SDK.clipboard
|
|
159
171
|
const colorCurve: typeof SDK.colorCurve
|
|
@@ -191,6 +203,7 @@ declare global {
|
|
|
191
203
|
const registerEditorTool: typeof SDK.registerEditorTool
|
|
192
204
|
const registerEditorWindow: typeof SDK.registerEditorWindow
|
|
193
205
|
const registerFont: typeof SDK.registerFont
|
|
206
|
+
const resolveTire: typeof SDK.resolveTire
|
|
194
207
|
const resumeAnimation: typeof SDK.resumeAnimation
|
|
195
208
|
const rot180: typeof SDK.rot180
|
|
196
209
|
const rot270: typeof SDK.rot270
|
|
@@ -213,13 +226,18 @@ declare global {
|
|
|
213
226
|
type AppState = SDK.AppState
|
|
214
227
|
type Aspect<K extends string, P = Node, E extends EventMap = {}> = SDK.Aspect<K, P, E>
|
|
215
228
|
type AspectEntry<A extends Aspect<any, any> = Aspect<any, any>> = SDK.AspectEntry<A>
|
|
229
|
+
type AudioCone = SDK.AudioCone
|
|
216
230
|
type AudioPlayer = SDK.AudioPlayer
|
|
231
|
+
type AudioSource = SDK.AudioSource
|
|
232
|
+
type AudioStats = SDK.AudioStats
|
|
233
|
+
type AudioZone = SDK.AudioZone
|
|
217
234
|
type AutoPaintRules = SDK.AutoPaintRules
|
|
218
235
|
type Autotile2D = SDK.Autotile2D
|
|
219
236
|
type Bitmap = SDK.Bitmap
|
|
220
237
|
type BlendMember = SDK.BlendMember
|
|
221
238
|
type BlendPosition = SDK.BlendPosition
|
|
222
239
|
type BlockEntry = SDK.BlockEntry
|
|
240
|
+
type Bus = SDK.Bus
|
|
223
241
|
type Camera = SDK.Camera
|
|
224
242
|
type Camera2D = SDK.Camera2D
|
|
225
243
|
type Camera2dNodeDef = SDK.Camera2dNodeDef
|
|
@@ -248,9 +266,22 @@ declare global {
|
|
|
248
266
|
type ConformOptions = SDK.ConformOptions
|
|
249
267
|
type DateInput = SDK.DateInput
|
|
250
268
|
type DateValue = SDK.DateValue
|
|
269
|
+
type DecalOptions = SDK.DecalOptions
|
|
270
|
+
type DecalPlacement = SDK.DecalPlacement
|
|
271
|
+
type DecalSet = SDK.DecalSet
|
|
272
|
+
type DecalSetOptions = SDK.DecalSetOptions
|
|
273
|
+
type DecalSpawnOptions = SDK.DecalSpawnOptions
|
|
274
|
+
type DecalTrail = SDK.DecalTrail
|
|
275
|
+
type DecalTrailOptions = SDK.DecalTrailOptions
|
|
251
276
|
type DifferentialMode = SDK.DifferentialMode
|
|
252
277
|
type Displacement = SDK.Displacement
|
|
253
278
|
type DriveLayout = SDK.DriveLayout
|
|
279
|
+
type DynamicBone = SDK.DynamicBone
|
|
280
|
+
type DynamicBoneCollider = SDK.DynamicBoneCollider
|
|
281
|
+
type DynamicBoneColliders = SDK.DynamicBoneColliders
|
|
282
|
+
type DynamicBoneCurve = SDK.DynamicBoneCurve
|
|
283
|
+
type DynamicBoneFloor = SDK.DynamicBoneFloor
|
|
284
|
+
type EchoParams = SDK.EchoParams
|
|
254
285
|
type EdgeSlot = SDK.EdgeSlot
|
|
255
286
|
type EditorApi = SDK.EditorApi
|
|
256
287
|
type EditorRayHit = SDK.EditorRayHit
|
|
@@ -272,7 +303,6 @@ declare global {
|
|
|
272
303
|
type Gait = SDK.Gait
|
|
273
304
|
type GamepadAxisName = SDK.GamepadAxisName
|
|
274
305
|
type GamepadState = SDK.GamepadState
|
|
275
|
-
type Gearbox = SDK.Gearbox
|
|
276
306
|
type GeoOptions = SDK.GeoOptions
|
|
277
307
|
type GeoPosition = SDK.GeoPosition
|
|
278
308
|
type GeoWatch = SDK.GeoWatch
|
|
@@ -385,7 +415,9 @@ declare global {
|
|
|
385
415
|
type Plane = SDK.Plane
|
|
386
416
|
type PlayAnimation = SDK.PlayAnimation
|
|
387
417
|
type PlayOptions = SDK.PlayOptions
|
|
418
|
+
type PlaySoundOptions = SDK.PlaySoundOptions
|
|
388
419
|
type Playback = SDK.Playback
|
|
420
|
+
type Point = SDK.Point
|
|
389
421
|
type PresentOptions = SDK.PresentOptions
|
|
390
422
|
type Presentable = SDK.Presentable
|
|
391
423
|
type PushEvent = SDK.PushEvent
|
|
@@ -399,7 +431,10 @@ declare global {
|
|
|
399
431
|
type RagdollPart = SDK.RagdollPart
|
|
400
432
|
type Ray = SDK.Ray
|
|
401
433
|
type Replicated = SDK.Replicated
|
|
434
|
+
type ReverbParams = SDK.ReverbParams
|
|
435
|
+
type ReverbPreset = SDK.ReverbPreset
|
|
402
436
|
type RibbonOptions = SDK.RibbonOptions
|
|
437
|
+
type Rolloff = SDK.Rolloff
|
|
403
438
|
type RpcError = SDK.RpcError
|
|
404
439
|
type Scene = SDK.Scene
|
|
405
440
|
type Scene2D = SDK.Scene2D
|
|
@@ -407,6 +442,7 @@ declare global {
|
|
|
407
442
|
type Scene2dEnv = SDK.Scene2dEnv
|
|
408
443
|
type Scene2dHandle<D extends Scene2dDef = Scene2dDef> = SDK.Scene2dHandle<D>
|
|
409
444
|
type Scene2dNodeDef = SDK.Scene2dNodeDef
|
|
445
|
+
type SceneAudio = SDK.SceneAudio
|
|
410
446
|
type SceneDef = SDK.SceneDef
|
|
411
447
|
type SceneHandle<D extends SceneDef = SceneDef> = SDK.SceneHandle<D>
|
|
412
448
|
type SceneInstance<D extends SceneDef> = SDK.SceneInstance<D>
|
|
@@ -418,6 +454,9 @@ declare global {
|
|
|
418
454
|
type Shape2D = SDK.Shape2D
|
|
419
455
|
type SheetSprite = SDK.SheetSprite
|
|
420
456
|
type Signal<T> = SDK.Signal<T>
|
|
457
|
+
type Sound = SDK.Sound
|
|
458
|
+
type SoundOptions = SDK.SoundOptions
|
|
459
|
+
type SpatialOptions = SDK.SpatialOptions
|
|
421
460
|
type Spin = SDK.Spin
|
|
422
461
|
type Sprite = SDK.Sprite
|
|
423
462
|
type SpriteAnimation = SDK.SpriteAnimation
|
|
@@ -432,6 +471,8 @@ declare global {
|
|
|
432
471
|
type StateMachineEvents = SDK.StateMachineEvents
|
|
433
472
|
type StatesDef<C> = SDK.StatesDef<C>
|
|
434
473
|
type SteeringConfig = SDK.SteeringConfig
|
|
474
|
+
type SteeringDriver = SDK.SteeringDriver
|
|
475
|
+
type SteeringFeedback = SDK.SteeringFeedback
|
|
435
476
|
type StepHandler = SDK.StepHandler
|
|
436
477
|
type StepWarpOptions = SDK.StepWarpOptions
|
|
437
478
|
type StopOptions = SDK.StopOptions
|
|
@@ -447,6 +488,7 @@ declare global {
|
|
|
447
488
|
type TerrainSnapshot = SDK.TerrainSnapshot
|
|
448
489
|
type Texture = SDK.Texture
|
|
449
490
|
type Texture2D = SDK.Texture2D
|
|
491
|
+
type TextureLoadOptions = SDK.TextureLoadOptions
|
|
450
492
|
type ThemeAccessors<T> = SDK.ThemeAccessors<T>
|
|
451
493
|
type ThemeValues = SDK.ThemeValues
|
|
452
494
|
type TileBlock = SDK.TileBlock
|
|
@@ -456,13 +498,14 @@ declare global {
|
|
|
456
498
|
type TilemapSourceDef = SDK.TilemapSourceDef
|
|
457
499
|
type Tileset = SDK.Tileset
|
|
458
500
|
type TilesetDef = SDK.TilesetDef
|
|
459
|
-
type
|
|
501
|
+
type Tire = SDK.Tire
|
|
460
502
|
type TouchStartEvent<T = any> = SDK.TouchStartEvent<T>
|
|
461
503
|
type Trail = SDK.Trail
|
|
462
504
|
type Transition = SDK.Transition
|
|
463
505
|
type TransitionName = SDK.TransitionName
|
|
464
506
|
type TransitionSpec = SDK.TransitionSpec
|
|
465
507
|
type TransitionTransform = SDK.TransitionTransform
|
|
508
|
+
type TrianglePick = SDK.TrianglePick
|
|
466
509
|
type Trigger = SDK.Trigger
|
|
467
510
|
type Trigger2D = SDK.Trigger2D
|
|
468
511
|
type UIBottomSheet = SDK.UIBottomSheet
|
|
@@ -510,13 +553,13 @@ declare global {
|
|
|
510
553
|
type Vec3 = SDK.Vec3
|
|
511
554
|
type Vehicle = SDK.Vehicle
|
|
512
555
|
type VideoPlayer = SDK.VideoPlayer
|
|
556
|
+
type Voice = SDK.Voice
|
|
557
|
+
type VoiceEvents = SDK.VoiceEvents
|
|
513
558
|
type Warp = SDK.Warp
|
|
514
559
|
type WarpOptions = SDK.WarpOptions
|
|
515
560
|
type WebSocket = SDK.WebSocket
|
|
516
561
|
type Wheel = SDK.Wheel
|
|
517
562
|
type WheelSuspension = SDK.WheelSuspension
|
|
518
|
-
type WheelTire = SDK.WheelTire
|
|
519
|
-
type WheelVisual = SDK.WheelVisual
|
|
520
563
|
type With<N, A extends Aspect<any, any, any>> = SDK.With<N, A>
|
|
521
564
|
type __GizmoBuffer = SDK.__GizmoBuffer
|
|
522
565
|
// ---- server globals (available in *.server.ts; using them in client code is a build error) ----
|