@3dverse/livelink.core 1.1.11 → 1.1.12
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/_prebuild/engine_types/SceneSettingsRecord.d.ts +18 -12
- package/dist/_prebuild/engine_types/assets.d.ts +0 -4
- package/dist/_prebuild/engine_types/components.d.ts +3 -3
- package/dist/_prebuild/engine_types/sceneSettings.d.ts +46 -46
- package/dist/_prebuild/messages/editor/SceneSettingsUpdatedEvent.d.ts +1 -0
- package/dist/_prebuild/messages/editor/index.d.ts +1 -0
- package/dist/library.cjs +1 -1
- package/dist/library.mjs +1 -1
- package/dist/sources/CoreEvents.d.ts +2 -1
- package/dist/sources/LivelinkCore.d.ts +2 -2
- package/dist/sources/core.d.ts +2 -0
- package/dist/sources/internal/EditorEvents.d.ts +11 -5
- package/package.json +1 -1
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
* This file has been generated automatically from ftl-schemas
|
|
4
4
|
*/
|
|
5
5
|
import * as SceneSettings from "./sceneSettings";
|
|
6
|
+
/**
|
|
7
|
+
* @category Engine Schemas
|
|
8
|
+
*/
|
|
9
|
+
export type SceneSettingsManifest = {
|
|
10
|
+
[K in SceneSettingType]?: Partial<SceneSettingsRecord[K]>;
|
|
11
|
+
};
|
|
6
12
|
/**
|
|
7
13
|
* @category Engine Schemas
|
|
8
14
|
*/
|
|
@@ -14,49 +20,49 @@ export type SceneSettingsRecord = {
|
|
|
14
20
|
/**
|
|
15
21
|
* Settings for debug lines
|
|
16
22
|
*/
|
|
17
|
-
debug_lines
|
|
23
|
+
debug_lines: SceneSettings.DebugLines;
|
|
18
24
|
/**
|
|
19
25
|
* Default camera component of the scene, used to create default cameras.
|
|
20
26
|
*/
|
|
21
|
-
default_camera_component
|
|
27
|
+
default_camera_component: SceneSettings.DefaultCameraComponent;
|
|
22
28
|
/**
|
|
23
29
|
* Default camera global transform of the scene, used to create default cameras.
|
|
24
30
|
*/
|
|
25
|
-
default_camera_transform
|
|
31
|
+
default_camera_transform: SceneSettings.DefaultCameraTransform;
|
|
26
32
|
/**
|
|
27
33
|
* Settings for the display
|
|
28
34
|
*/
|
|
29
|
-
display
|
|
35
|
+
display: SceneSettings.Display;
|
|
30
36
|
/**
|
|
31
37
|
* Settings for the environment
|
|
32
38
|
*/
|
|
33
|
-
environment
|
|
39
|
+
environment: SceneSettings.Environment;
|
|
34
40
|
/**
|
|
35
41
|
* Miscellaneous settings
|
|
36
42
|
*/
|
|
37
|
-
misc
|
|
43
|
+
misc: SceneSettings.Misc;
|
|
38
44
|
/**
|
|
39
45
|
* Settings for the physics engine.
|
|
40
46
|
*/
|
|
41
|
-
physics
|
|
47
|
+
physics: SceneSettings.Physics;
|
|
42
48
|
/**
|
|
43
49
|
* Renderer settings
|
|
44
50
|
*/
|
|
45
|
-
renderer
|
|
51
|
+
renderer: SceneSettings.Renderer;
|
|
46
52
|
/**
|
|
47
53
|
* Settings to apply whenever simulation is active
|
|
48
54
|
*/
|
|
49
|
-
simulation
|
|
55
|
+
simulation: SceneSettings.Simulation;
|
|
50
56
|
/**
|
|
51
57
|
* Sound settings
|
|
52
58
|
*/
|
|
53
|
-
sound
|
|
59
|
+
sound: SceneSettings.Sound;
|
|
54
60
|
/**
|
|
55
61
|
* Settings for the scene streaming
|
|
56
62
|
*/
|
|
57
|
-
streaming
|
|
63
|
+
streaming: SceneSettings.Streaming;
|
|
58
64
|
/**
|
|
59
65
|
* Settings for voxel rendering
|
|
60
66
|
*/
|
|
61
|
-
voxel
|
|
67
|
+
voxel: SceneSettings.Voxel;
|
|
62
68
|
};
|
|
@@ -383,11 +383,11 @@ export type Environment = {
|
|
|
383
383
|
*/
|
|
384
384
|
export type Joint = {
|
|
385
385
|
/**
|
|
386
|
-
* An entity that is a rigid body.
|
|
386
|
+
* An entity that is a rigid body. The constrainee is dependent on the constrainer entity.
|
|
387
387
|
*/
|
|
388
388
|
constrainee: EntityRef;
|
|
389
389
|
/**
|
|
390
|
-
* An entity that is a rigid or static body, or simply null.
|
|
390
|
+
* An entity that is a rigid or static body, or simply null. If null, the constrainee is dependent upon world origin.
|
|
391
391
|
*/
|
|
392
392
|
constrainer: EntityRef;
|
|
393
393
|
/**
|
|
@@ -622,7 +622,7 @@ export type PerspectiveLens = {
|
|
|
622
622
|
*/
|
|
623
623
|
nearPlane: Float;
|
|
624
624
|
/**
|
|
625
|
-
* Distance from the viewer to the far clipping plane.
|
|
625
|
+
* Distance from the viewer to the far clipping plane. 0 for infinite far plane.
|
|
626
626
|
* @defaultValue 0
|
|
627
627
|
*/
|
|
628
628
|
farPlane: Float;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* This file has been generated automatically from ftl-schemas
|
|
4
4
|
*/
|
|
5
5
|
import type { Assets } from "../../sources/core";
|
|
6
|
-
import type { Vec3, UInt32, Float, Int32, Quat, AssetRef, EntityRef } from "../../sources/types";
|
|
6
|
+
import type { Vec3, UInt32, Float, Int32, Quat, AssetRef, EntityRef, RenderGraphDataObject } from "../../sources/types";
|
|
7
7
|
/**
|
|
8
8
|
* Settings for debug lines
|
|
9
9
|
*/
|
|
@@ -12,62 +12,62 @@ export type DebugLines = {
|
|
|
12
12
|
* Whether to draw debug lines
|
|
13
13
|
* @defaultValue false
|
|
14
14
|
*/
|
|
15
|
-
drawDebugLines
|
|
15
|
+
drawDebugLines: boolean;
|
|
16
16
|
/**
|
|
17
17
|
* Whether to draw geometry of physics bodies
|
|
18
18
|
* @defaultValue true
|
|
19
19
|
*/
|
|
20
|
-
drawPhysicsBodies
|
|
20
|
+
drawPhysicsBodies: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* Whether to draw physics body axes
|
|
23
23
|
* @defaultValue true
|
|
24
24
|
*/
|
|
25
|
-
drawPhysicsBodyAxes
|
|
25
|
+
drawPhysicsBodyAxes: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Whether to draw the center of mass of physics bodies
|
|
28
28
|
* @defaultValue false
|
|
29
29
|
*/
|
|
30
|
-
drawCenterOfMass
|
|
30
|
+
drawCenterOfMass: boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Whether to draw contacts between physics bodies
|
|
33
33
|
* @defaultValue false
|
|
34
34
|
*/
|
|
35
|
-
drawContacts
|
|
35
|
+
drawContacts: boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Whether to draw joint-related debug lines
|
|
38
38
|
* @defaultValue false
|
|
39
39
|
*/
|
|
40
|
-
drawJoints
|
|
40
|
+
drawJoints: boolean;
|
|
41
41
|
/**
|
|
42
42
|
* Whether to draw the skeletons of rigged characters
|
|
43
43
|
* @defaultValue false
|
|
44
44
|
*/
|
|
45
|
-
drawSkeletons
|
|
45
|
+
drawSkeletons: boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Whether to draw certain IK parameters like the forward and up vector of an IK Aim node, or the pole vector of an IK Two Bone node
|
|
48
48
|
* @defaultValue false
|
|
49
49
|
*/
|
|
50
|
-
drawIK
|
|
50
|
+
drawIK: boolean;
|
|
51
51
|
/**
|
|
52
52
|
* Whether to draw the bouding boxes of entities
|
|
53
53
|
* @defaultValue false
|
|
54
54
|
*/
|
|
55
|
-
drawBoundingBoxes
|
|
55
|
+
drawBoundingBoxes: boolean;
|
|
56
56
|
/**
|
|
57
57
|
* Whether to draw camera frustums
|
|
58
58
|
* @defaultValue false
|
|
59
59
|
*/
|
|
60
|
-
drawCameraFrustums
|
|
60
|
+
drawCameraFrustums: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* Whether to draw light-related debug lines
|
|
63
63
|
* @defaultValue false
|
|
64
64
|
*/
|
|
65
|
-
drawLights
|
|
65
|
+
drawLights: boolean;
|
|
66
66
|
/**
|
|
67
67
|
* Whether to draw reflection probes
|
|
68
68
|
* @defaultValue false
|
|
69
69
|
*/
|
|
70
|
-
drawReflectionProbes
|
|
70
|
+
drawReflectionProbes: boolean;
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
73
|
* Default camera component of the scene, used to create default cameras.
|
|
@@ -76,17 +76,17 @@ export type DefaultCameraComponent = {
|
|
|
76
76
|
/**
|
|
77
77
|
* Specifies which render graph this camera should use.
|
|
78
78
|
*/
|
|
79
|
-
renderGraphRef
|
|
79
|
+
renderGraphRef: AssetRef<Assets.RenderGraph>;
|
|
80
80
|
/**
|
|
81
81
|
* Input values as described in the referenced render graph in their original JSON format.
|
|
82
82
|
* @defaultValue [object Object]
|
|
83
83
|
*/
|
|
84
|
-
dataJSON
|
|
84
|
+
dataJSON: RenderGraphDataObject;
|
|
85
85
|
/**
|
|
86
86
|
* Index of the render target to blit.
|
|
87
87
|
* @defaultValue -1
|
|
88
88
|
*/
|
|
89
|
-
renderTargetIndex
|
|
89
|
+
renderTargetIndex: Int32;
|
|
90
90
|
};
|
|
91
91
|
/**
|
|
92
92
|
* Default camera global transform of the scene, used to create default cameras.
|
|
@@ -94,14 +94,14 @@ export type DefaultCameraComponent = {
|
|
|
94
94
|
export type DefaultCameraTransform = {
|
|
95
95
|
/**
|
|
96
96
|
* x, y, z position of the camera
|
|
97
|
-
* @defaultValue 0,
|
|
97
|
+
* @defaultValue 0,1,5
|
|
98
98
|
*/
|
|
99
|
-
position
|
|
99
|
+
position: Vec3;
|
|
100
100
|
/**
|
|
101
101
|
* Orientation of the camera expressed as a quaternion
|
|
102
102
|
* @defaultValue 0,0,0,1
|
|
103
103
|
*/
|
|
104
|
-
orientation
|
|
104
|
+
orientation: Quat;
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
107
107
|
* Settings for the display
|
|
@@ -111,22 +111,22 @@ export type Display = {
|
|
|
111
111
|
* Maximum number of Frames Per Second the renderer is allowed to produce
|
|
112
112
|
* @defaultValue 30
|
|
113
113
|
*/
|
|
114
|
-
maxFPS
|
|
114
|
+
maxFPS: UInt32;
|
|
115
115
|
/**
|
|
116
116
|
* Maximum resolution of loaded textures
|
|
117
117
|
* @defaultValue 4294967295
|
|
118
118
|
*/
|
|
119
|
-
maxTextureSize
|
|
119
|
+
maxTextureSize: UInt32;
|
|
120
120
|
/**
|
|
121
121
|
* Draw frame without input events
|
|
122
122
|
* @defaultValue false
|
|
123
123
|
*/
|
|
124
|
-
forceRedraw
|
|
124
|
+
forceRedraw: boolean;
|
|
125
125
|
/**
|
|
126
126
|
* When 'Force Redraw' is off, this setting controls the number of frames the renderer will draw before going back to idle
|
|
127
127
|
* @defaultValue 90
|
|
128
128
|
*/
|
|
129
|
-
framePersistence
|
|
129
|
+
framePersistence: UInt32;
|
|
130
130
|
};
|
|
131
131
|
/**
|
|
132
132
|
* Settings for the environment
|
|
@@ -136,17 +136,17 @@ export type Environment = {
|
|
|
136
136
|
* Solid color used to clear the screen before drawing.
|
|
137
137
|
* @defaultValue 0,0,0
|
|
138
138
|
*/
|
|
139
|
-
clearColor
|
|
139
|
+
clearColor: Vec3;
|
|
140
140
|
/**
|
|
141
141
|
* Color of the spherical gradient at the top of the sphere.
|
|
142
142
|
* @defaultValue 1,1,1
|
|
143
143
|
*/
|
|
144
|
-
ambientColorTop
|
|
144
|
+
ambientColorTop: Vec3;
|
|
145
145
|
/**
|
|
146
146
|
* Color of the spherical gradient at the bottom of the sphere.
|
|
147
147
|
* @defaultValue 1,1,1
|
|
148
148
|
*/
|
|
149
|
-
ambientColorBottom
|
|
149
|
+
ambientColorBottom: Vec3;
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
152
152
|
* Miscellaneous settings
|
|
@@ -156,11 +156,11 @@ export type Misc = {
|
|
|
156
156
|
* The maximum number of time a linker can reference itself.
|
|
157
157
|
* @defaultValue 2
|
|
158
158
|
*/
|
|
159
|
-
maxLinkersRecursionCount
|
|
159
|
+
maxLinkersRecursionCount: UInt32;
|
|
160
160
|
/**
|
|
161
161
|
* Plugins to load at startup
|
|
162
162
|
*/
|
|
163
|
-
plugins
|
|
163
|
+
plugins: Array<string>;
|
|
164
164
|
};
|
|
165
165
|
/**
|
|
166
166
|
* Settings for the physics engine.
|
|
@@ -170,37 +170,37 @@ export type Physics = {
|
|
|
170
170
|
* The engine that is powering the physics of the scene.
|
|
171
171
|
* @defaultValue physx
|
|
172
172
|
*/
|
|
173
|
-
engine
|
|
173
|
+
engine: string;
|
|
174
174
|
/**
|
|
175
175
|
* Global gravity applied throughout the scene.
|
|
176
176
|
* @defaultValue 0,-9.8,0
|
|
177
177
|
*/
|
|
178
|
-
gravity
|
|
178
|
+
gravity: Vec3;
|
|
179
179
|
/**
|
|
180
180
|
* A frame-rate-independent interval that dictates when physics calculations are performed.
|
|
181
181
|
* @defaultValue 0.01666
|
|
182
182
|
*/
|
|
183
|
-
timestepInS
|
|
183
|
+
timestepInS: Float;
|
|
184
184
|
/**
|
|
185
185
|
* The epsilon used to mark whether the transform of an entity has changed and so whether to notify the physics engine.
|
|
186
186
|
* @defaultValue 0.000001
|
|
187
187
|
*/
|
|
188
|
-
epsilon
|
|
188
|
+
epsilon: Float;
|
|
189
189
|
/**
|
|
190
190
|
* The approximate size of objects in the simulation. This is used to estimate certain length-related tolerances.
|
|
191
191
|
* @defaultValue 1
|
|
192
192
|
*/
|
|
193
|
-
toleranceLength
|
|
193
|
+
toleranceLength: Float;
|
|
194
194
|
/**
|
|
195
195
|
* The typical magnitude of velocities of objects in simulation. This is used to estimate whether a contact should be treated as bouncing or resting based on its impact velocity, and a kinetic energy threshold below which the simulation may put objects to sleep. For normal physical environments, a good choice is the approximate speed of an object falling under gravity for one second.
|
|
196
196
|
* @defaultValue 10
|
|
197
197
|
*/
|
|
198
|
-
toleranceSpeed
|
|
198
|
+
toleranceSpeed: Float;
|
|
199
199
|
/**
|
|
200
200
|
* The bigger LMD Max is, the greater the area that is searched for future contacts, and so the greater time taken per iteration. Note that XDE resolves contacts pre-collision, not once collision has taken place, like the majority of physics engines. Displacement of any object per iteration should not exceed LMD Max.
|
|
201
201
|
* @defaultValue 1
|
|
202
202
|
*/
|
|
203
|
-
lmdMax
|
|
203
|
+
lmdMax: Float;
|
|
204
204
|
};
|
|
205
205
|
/**
|
|
206
206
|
* Renderer settings
|
|
@@ -210,27 +210,27 @@ export type Renderer = {
|
|
|
210
210
|
* Enable occlusion culling.
|
|
211
211
|
* @defaultValue false
|
|
212
212
|
*/
|
|
213
|
-
cpuOcclusionCulling
|
|
213
|
+
cpuOcclusionCulling: boolean;
|
|
214
214
|
/**
|
|
215
215
|
* Toggle frustum culling
|
|
216
216
|
* @defaultValue true
|
|
217
217
|
*/
|
|
218
|
-
enableFrustumCulling
|
|
218
|
+
enableFrustumCulling: boolean;
|
|
219
219
|
/**
|
|
220
220
|
* Toggle texture streaming
|
|
221
221
|
* @defaultValue false
|
|
222
222
|
*/
|
|
223
|
-
enableTextureStreaming
|
|
223
|
+
enableTextureStreaming: boolean;
|
|
224
224
|
/**
|
|
225
225
|
* Enables geometry culling.
|
|
226
226
|
* @defaultValue true
|
|
227
227
|
*/
|
|
228
|
-
enableGeometryCulling
|
|
228
|
+
enableGeometryCulling: boolean;
|
|
229
229
|
/**
|
|
230
230
|
* Enables ray tracing.
|
|
231
231
|
* @defaultValue false
|
|
232
232
|
*/
|
|
233
|
-
enableRayTracing
|
|
233
|
+
enableRayTracing: boolean;
|
|
234
234
|
};
|
|
235
235
|
/**
|
|
236
236
|
* Settings to apply whenever simulation is active
|
|
@@ -239,11 +239,11 @@ export type Simulation = {
|
|
|
239
239
|
/**
|
|
240
240
|
* Camera used when starting the simulation
|
|
241
241
|
*/
|
|
242
|
-
mainCamera
|
|
242
|
+
mainCamera: EntityRef;
|
|
243
243
|
/**
|
|
244
244
|
* Scripts which the client will be automatically attached
|
|
245
245
|
*/
|
|
246
|
-
clientScripts
|
|
246
|
+
clientScripts: Array<EntityRef>;
|
|
247
247
|
};
|
|
248
248
|
/**
|
|
249
249
|
* Sound settings
|
|
@@ -253,7 +253,7 @@ export type Sound = {
|
|
|
253
253
|
* Enable 3dverse sound.
|
|
254
254
|
* @defaultValue false
|
|
255
255
|
*/
|
|
256
|
-
enabled
|
|
256
|
+
enabled: boolean;
|
|
257
257
|
};
|
|
258
258
|
/**
|
|
259
259
|
* Settings for the scene streaming
|
|
@@ -263,12 +263,12 @@ export type Streaming = {
|
|
|
263
263
|
* Scenes that enter this radius around the camera get loaded.
|
|
264
264
|
* @defaultValue 0
|
|
265
265
|
*/
|
|
266
|
-
streamingLoadingRadius
|
|
266
|
+
streamingLoadingRadius: Float;
|
|
267
267
|
/**
|
|
268
268
|
* Scenes that exit this radius around the camera get unloaded.
|
|
269
269
|
* @defaultValue 0
|
|
270
270
|
*/
|
|
271
|
-
streamingUnloadingRadius
|
|
271
|
+
streamingUnloadingRadius: Float;
|
|
272
272
|
};
|
|
273
273
|
/**
|
|
274
274
|
* Settings for voxel rendering
|
|
@@ -278,5 +278,5 @@ export type Voxel = {
|
|
|
278
278
|
* Maximum number of color samples used to compute the color LUT.
|
|
279
279
|
* @defaultValue 512
|
|
280
280
|
*/
|
|
281
|
-
maxNumberAlbedoValues
|
|
281
|
+
maxNumberAlbedoValues: UInt32;
|
|
282
282
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/library.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},L=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c(e))!l.call(o,i)&&i!==r&&d(o,i,{get:()=>e[i],enumerable:!(t=p(e,i))||t.enumerable});return o};var m=o=>L(d({},"__esModule",{value:!0}),o);var I={};u(I,{DynamicLoader:()=>s});module.exports=m(I);var g=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class o{static#e=null;static#o=null;static get Core(){if(!o.#e)throw new Error("Livelink core not initialized");return o.#e}static load(e="prod"){return o.#o||(o.#o=o.#r(e)),o.#o}static async#r(e){let r=await o.#i(e),{LivelinkCore:t}=await r();o.#e=t;let i={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${t.VERSION} %c ${t.COMMIT_SHA} %c${e}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${i[e]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(e){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(e!=="prod"?`core.${e}.mjs`:"core.mjs");if(!g)return new Function("return import('"+r+"')");let i=await(await fetch(r)).text(),a=await new Function("return import('node:vm')")();return a.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new a.SourceTextModule(i,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(i)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.
|
|
1
|
+
"use strict";var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var u=(o,e)=>{for(var r in e)d(o,r,{get:e[r],enumerable:!0})},L=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of c(e))!l.call(o,i)&&i!==r&&d(o,i,{get:()=>e[i],enumerable:!(t=p(e,i))||t.enumerable});return o};var m=o=>L(d({},"__esModule",{value:!0}),o);var I={};u(I,{DynamicLoader:()=>s});module.exports=m(I);var g=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class o{static#e=null;static#o=null;static get Core(){if(!o.#e)throw new Error("Livelink core not initialized");return o.#e}static load(e="prod"){return o.#o||(o.#o=o.#r(e)),o.#o}static async#r(e){let r=await o.#i(e),{LivelinkCore:t}=await r();o.#e=t;let i={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${t.VERSION} %c ${t.COMMIT_SHA} %c${e}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${i[e]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(e){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(e!=="prod"?`core.${e}.mjs`:"core.mjs");if(!g)return new Function("return import('"+r+"')");let i=await(await fetch(r)).text(),a=await new Function("return import('node:vm')")();return a.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new a.SourceTextModule(i,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(i)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.12");
|
|
2
2
|
//# sourceMappingURL=library.cjs.map
|
package/dist/library.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var a=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class e{static#e=null;static#o=null;static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static load(o="prod"){return e.#o||(e.#o=e.#r(o)),e.#o}static async#r(o){let r=await e.#i(o),{LivelinkCore:i}=await r();e.#e=i;let t={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${i.VERSION} %c ${i.COMMIT_SHA} %c${o}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${t[o]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(o){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(o!=="prod"?`core.${o}.mjs`:"core.mjs");if(!a)return new Function("return import('"+r+"')");let t=await(await fetch(r)).text(),d=await new Function("return import('node:vm')")();return d.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new d.SourceTextModule(t,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(t)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.
|
|
1
|
+
var a=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,s=class e{static#e=null;static#o=null;static get Core(){if(!e.#e)throw new Error("Livelink core not initialized");return e.#e}static load(o="prod"){return e.#o||(e.#o=e.#r(o)),e.#o}static async#r(o){let r=await e.#i(o),{LivelinkCore:i}=await r();e.#e=i;let t={prod:"#FFC700",dev:"#36D399",debug:"#FB4949"};console.info(`%c Livelink Core initialized \u{1F680} %c ${i.VERSION} %c ${i.COMMIT_SHA} %c${o}`,"background: #080A12; color: #FFC700; font-weight: bold; padding: 8px; padding-right: 164px; border-radius: 16px; margin: 16px 0 16px 0","background: #9EA6D6; color: #0A1018; font-weight: bold; padding: 1px; padding-right: 0px; margin-left: -160px; border-radius: 16px 0 0 16px;","background: #6973A8; color: #0A1018; font-weight: bold; padding: 1px; padding-left: 0; border-radius: 0 16px 16px 0;",`background: ${t[o]}; color: #000; font-weight: bold; padding: 6px 16px; border: 4px solid #080A12; border-radius: 16px; margin-left: 16px`)}static async#i(o){let r="https://cdn.3dverse.com/livelink/core/1.0/"+(o!=="prod"?`core.${o}.mjs`:"core.mjs");if(!a)return new Function("return import('"+r+"')");let t=await(await fetch(r)).text(),d=await new Function("return import('node:vm')")();return d.SourceTextModule?(console.info("Using experimental VM SourceTextModule to load Livelink core"),async()=>{let n=new d.SourceTextModule(t,{identifier:r});return await n.link(()=>{}),await n.evaluate(),n.namespace}):new Function("return import('data:text/javascript;base64,"+btoa(t)+"')")}constructor(){}};typeof window<"u"&&(window.__LIVELINK__||(window.__LIVELINK__={}),Object.prototype.hasOwnProperty.call(window.__LIVELINK__,"@3dverse/livelink.core")?console.warn("\u26A0\uFE0F WARNING \u26A0\uFE0F Multiple instances of Livelink Core being imported."):window.__LIVELINK__["@3dverse/livelink.core"]="1.1.12");export{s as DynamicLoader};
|
|
2
2
|
//# sourceMappingURL=library.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./internal/GatewayEvents";
|
|
2
2
|
export * from "./internal/EditorEvents";
|
|
3
3
|
import type { AssetLoadingStatusEvent, AudioReceivedEvent, ClientConnectedEvent, ClientsDisconnectedEvent, FrameReceivedEvent, ScriptEventTriggeredEvent } from "./internal/GatewayEvents";
|
|
4
|
-
import type { EntitiesCreatedEvent, EntitiesDeletedEvent, EntitiesUpdatedEvent, EntityVisibilityChangedEvent, LoadingCompletedEvent } from "./internal/EditorEvents";
|
|
4
|
+
import type { EntitiesCreatedEvent, EntitiesDeletedEvent, EntitiesUpdatedEvent, EntityVisibilityChangedEvent, LoadingCompletedEvent, SceneSettingsUpdatedEvent } from "./internal/EditorEvents";
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
@@ -44,4 +44,5 @@ export type CoreEvents = {
|
|
|
44
44
|
"on-entities-updated": EntitiesUpdatedEvent;
|
|
45
45
|
"on-entities-deleted": EntitiesDeletedEvent;
|
|
46
46
|
"on-entity-visibility-changed": EntityVisibilityChangedEvent;
|
|
47
|
+
"on-scene-settings-updated": SceneSettingsUpdatedEvent;
|
|
47
48
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { GatewayMessages } from "../_prebuild/messages";
|
|
2
2
|
import { ComponentName, ComponentType, EntityCore, ComponentsManifest } from "../_prebuild/engine_types/ComponentsRecord";
|
|
3
|
-
import { RTID, UUID, Vec2i } from "./types";
|
|
3
|
+
import type { RTID, UUID, Vec2i } from "./types";
|
|
4
4
|
import { ActivityWatcher } from "./ActivityWatcher";
|
|
5
5
|
import { SessionInterface } from "./SessionInterface";
|
|
6
6
|
import { TypedEventTarget } from "./TypedEventTarget";
|
|
7
7
|
import { CoreEvents } from "./CoreEvents";
|
|
8
|
-
import { EntityResponse, FindEntityOptions, FindEntityQuery, UpdateEntityCommand } from "./EntityUtils";
|
|
8
|
+
import type { EntityResponse, FindEntityOptions, FindEntityQuery, UpdateEntityCommand } from "./EntityUtils";
|
|
9
9
|
/**
|
|
10
10
|
* The LivelinkCore is the main entry point to the Livelink API.
|
|
11
11
|
*
|
package/dist/sources/core.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "../_prebuild/messages/editor";
|
|
|
7
7
|
export * from "../_prebuild/messages/gateway";
|
|
8
8
|
export * from "../_prebuild/engine_types/ComponentsRecord";
|
|
9
9
|
export * from "../_prebuild/engine_types/ComponentsHashes";
|
|
10
|
+
export * from "../_prebuild/engine_types/SceneSettingsRecord";
|
|
10
11
|
/**
|
|
11
12
|
* @category Core
|
|
12
13
|
*/
|
|
@@ -25,6 +26,7 @@ export * as Assets from "../_prebuild/engine_types/assets";
|
|
|
25
26
|
*
|
|
26
27
|
* @category Engine Schemas
|
|
27
28
|
*/
|
|
29
|
+
export * as SceneSettings from "../_prebuild/engine_types/sceneSettings";
|
|
28
30
|
/**
|
|
29
31
|
* All the components that can be attached to an entity.
|
|
30
32
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentName, ComponentsRecord, EntityCore } from "../../_prebuild/engine_types/ComponentsRecord";
|
|
2
|
-
import
|
|
2
|
+
import { SceneSettingsManifest } from "../../_prebuild/engine_types/SceneSettingsRecord";
|
|
3
3
|
import type { RTID, UUID } from "../types";
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -55,10 +55,6 @@ export declare class LoadingCompletedEvent extends Event {
|
|
|
55
55
|
* An array of entities that are present in the scene at the root level.
|
|
56
56
|
*/
|
|
57
57
|
readonly root_entities: Array<EntityCore>;
|
|
58
|
-
/**
|
|
59
|
-
* The settings of the scene.
|
|
60
|
-
*/
|
|
61
|
-
readonly scene_settings: SceneSettingsRecord;
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
64
60
|
*
|
|
@@ -108,3 +104,13 @@ export declare class EntityVisibilityChangedEvent extends EditionEvent {
|
|
|
108
104
|
*/
|
|
109
105
|
readonly is_visible: boolean;
|
|
110
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
export declare class SceneSettingsUpdatedEvent extends EditionEvent {
|
|
111
|
+
/**
|
|
112
|
+
* The updated scene settings that has been applied.
|
|
113
|
+
* Contains only the settings that were changed.
|
|
114
|
+
*/
|
|
115
|
+
readonly updated_settings: SceneSettingsManifest;
|
|
116
|
+
}
|