illutions 0.32.0 → 0.33.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/CHANGELOG.md +232 -209
- package/dist/main.d.ts +139 -128
- package/dist/main.min.cjs +1 -1
- package/dist/main.min.js +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -59,17 +59,15 @@ export declare interface AnimEvent {
|
|
|
59
59
|
fct: string;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
/** @event Fired when a numeric
|
|
63
|
-
export declare interface
|
|
64
|
-
type: '
|
|
65
|
-
/** The name of the
|
|
66
|
-
|
|
62
|
+
/** @event Fired when a material color or numeric property animation starts, completes, or is canceled. */
|
|
63
|
+
export declare interface AnimMaterialEvent {
|
|
64
|
+
type: 'Anim_Material_Complete' | 'Anim_Material_Start' | 'Anim_Material_Cancel';
|
|
65
|
+
/** The name of the material whose animation changed state. */
|
|
66
|
+
materialName: string;
|
|
67
67
|
/** The name of the calling method. */
|
|
68
68
|
fct: string;
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/** The target value used for the fade operation. */
|
|
72
|
-
value: any;
|
|
69
|
+
/** Snapshot of all animated properties; colors are represented as hex strings. */
|
|
70
|
+
values: Record<string, number | string>;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
/**
|
|
@@ -151,11 +149,11 @@ declare class Audio_2 {
|
|
|
151
149
|
* Loads an audio file and plays it automatically when loading is complete.
|
|
152
150
|
* Use this method when no separate `Audio_Loaded` handling is required.
|
|
153
151
|
* @param params - The sound options.
|
|
154
|
-
* @param params.
|
|
152
|
+
* @param params.time - Fade-in duration for this start in seconds. Defaults to 0 (no fade).
|
|
155
153
|
* @param params.ease - GSAP easing for the fade-in. Defaults to linear ('none').
|
|
156
154
|
*/
|
|
157
|
-
loadAndPlay({
|
|
158
|
-
|
|
155
|
+
loadAndPlay({ time, ease, ...params }: {
|
|
156
|
+
time?: number;
|
|
159
157
|
ease?: string;
|
|
160
158
|
} & SoundParams): void;
|
|
161
159
|
/**
|
|
@@ -164,24 +162,24 @@ declare class Audio_2 {
|
|
|
164
162
|
* This method does not wait for an audio file that is still loading.
|
|
165
163
|
* @param params - Sound selection.
|
|
166
164
|
* @param params.name - Loaded sound name.
|
|
167
|
-
* @param params.
|
|
165
|
+
* @param params.time - Fade-in duration in seconds. Defaults to 0 (no fade).
|
|
168
166
|
* @param params.ease - GSAP easing for the fade-in. Defaults to linear ('none').
|
|
169
167
|
*/
|
|
170
|
-
play({ name,
|
|
168
|
+
play({ name, time, ease }: {
|
|
171
169
|
name: string;
|
|
172
|
-
|
|
170
|
+
time?: number;
|
|
173
171
|
ease?: string;
|
|
174
172
|
}): void;
|
|
175
173
|
/**
|
|
176
174
|
* Pauses a playing sound and keeps its position for the next play().
|
|
177
175
|
* @param params - Sound selection and optional fade-out settings.
|
|
178
176
|
* @param params.name - Sound name.
|
|
179
|
-
* @param params.
|
|
177
|
+
* @param params.time - Fade-out duration in seconds. Defaults to 0 (no fade).
|
|
180
178
|
* @param params.ease - GSAP easing for the fade-out. Defaults to linear ('none').
|
|
181
179
|
*/
|
|
182
|
-
pause({ name,
|
|
180
|
+
pause({ name, time, ease }: {
|
|
183
181
|
name: string;
|
|
184
|
-
|
|
182
|
+
time?: number;
|
|
185
183
|
ease?: string;
|
|
186
184
|
}): void;
|
|
187
185
|
/**
|
|
@@ -217,12 +215,12 @@ declare class Audio_2 {
|
|
|
217
215
|
* Stops a playing or paused sound and resets its position, optionally fading out.
|
|
218
216
|
* @param params - Sound selection.
|
|
219
217
|
* @param params.name - Sound name.
|
|
220
|
-
* @param params.
|
|
218
|
+
* @param params.time - Fade-out duration in seconds. Defaults to 0 (no fade).
|
|
221
219
|
* @param params.ease - GSAP easing for the fade-out. Defaults to linear ('none').
|
|
222
220
|
*/
|
|
223
|
-
stop({ name,
|
|
221
|
+
stop({ name, time, ease }: {
|
|
224
222
|
name: string;
|
|
225
|
-
|
|
223
|
+
time?: number;
|
|
226
224
|
ease?: string;
|
|
227
225
|
}): void;
|
|
228
226
|
/**
|
|
@@ -787,7 +785,7 @@ export declare class Events {
|
|
|
787
785
|
/**
|
|
788
786
|
* Controls what happens after the final animation loop.
|
|
789
787
|
* - `'hold'`: Keeps the action enabled and holds its final pose.
|
|
790
|
-
* - `'fadeOut'`: Fades out over `
|
|
788
|
+
* - `'fadeOut'`: Fades out over `fadeTimeFinish` seconds, or stops immediately when the duration is `0`.
|
|
791
789
|
*/
|
|
792
790
|
export declare type FinishMode = 'hold' | 'fadeOut';
|
|
793
791
|
|
|
@@ -1243,30 +1241,21 @@ export declare class Mesh3D extends Obj3D {
|
|
|
1243
1241
|
reflectivesSSR: THREE_TYPE.Object3D[];
|
|
1244
1242
|
private model;
|
|
1245
1243
|
/**
|
|
1246
|
-
* Animates
|
|
1247
|
-
* @param params -
|
|
1248
|
-
* @param params.
|
|
1249
|
-
* @param params.
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
}): void;
|
|
1257
|
-
/**
|
|
1258
|
-
* Animates the first numeric material property passed for this mesh.
|
|
1259
|
-
* @param params - Animation parameters and the target numeric material property.
|
|
1260
|
-
* @param params.startValue - Starting value. Defaults to the current material value.
|
|
1261
|
-
* @param params.infinite - Whether the animation repeats indefinitely. Default: **false**
|
|
1262
|
-
* @param params.duration - Animation duration in seconds. Default: **0**
|
|
1263
|
-
* @param params.ease - GSAP easing function name. Default: **'power1.inOut'**
|
|
1264
|
-
* @param params.needsUpdate - Requests one material recompilation when the animation starts. Default: **false**
|
|
1244
|
+
* Animates all assigned materials of this mesh, optionally including descendant meshes.
|
|
1245
|
+
* @param params - Numeric and color targets with shared animation settings.
|
|
1246
|
+
* @param params.recursive - Includes descendant meshes. Default: **false**
|
|
1247
|
+
* @param params.infinite - Repeats each animation indefinitely. Default: **false**
|
|
1248
|
+
* @param params.time - Duration in seconds. Default: **0**
|
|
1249
|
+
* @param params.ease - GSAP easing function. Default: **'power1.inOut'**
|
|
1250
|
+
* @param params.needsUpdate - Recompiles materials when animation starts. Default: **false**
|
|
1251
|
+
*
|
|
1252
|
+
* @remarks
|
|
1253
|
+
* Tweens and animation events are managed per material.
|
|
1265
1254
|
*/
|
|
1266
|
-
|
|
1267
|
-
|
|
1255
|
+
animMaterialsTo(params: {
|
|
1256
|
+
recursive?: boolean;
|
|
1268
1257
|
infinite?: boolean;
|
|
1269
|
-
|
|
1258
|
+
time?: number;
|
|
1270
1259
|
ease?: string;
|
|
1271
1260
|
needsUpdate?: boolean;
|
|
1272
1261
|
[key: string]: any;
|
|
@@ -1299,7 +1288,7 @@ export declare class Mesh3D extends Obj3D {
|
|
|
1299
1288
|
* @param properties.recursive - Includes all descendant meshes when true. Default: **false**
|
|
1300
1289
|
* @param properties.needsUpdate - Requests material recompilation after applying the properties. Default: **false**
|
|
1301
1290
|
*/
|
|
1302
|
-
|
|
1291
|
+
setMaterialsProps({ recursive, needsUpdate, ...properties }: {
|
|
1303
1292
|
recursive?: boolean;
|
|
1304
1293
|
needsUpdate?: boolean;
|
|
1305
1294
|
[key: string]: any;
|
|
@@ -2065,84 +2054,91 @@ export declare class Scene {
|
|
|
2065
2054
|
private readonly cam3D;
|
|
2066
2055
|
private readonly events;
|
|
2067
2056
|
private readonly objs3D;
|
|
2068
|
-
private readonly
|
|
2057
|
+
private readonly tweensObj;
|
|
2058
|
+
private readonly tweensMtrl;
|
|
2059
|
+
private readonly mtrls;
|
|
2060
|
+
/** The underlying Three.js scene. */
|
|
2061
|
+
readonly obj: THREE_TYPE.Scene;
|
|
2069
2062
|
private ambientLight;
|
|
2070
2063
|
private hemisphereLight;
|
|
2071
|
-
/**
|
|
2072
|
-
* The underlying Three.js scene.
|
|
2073
|
-
*/
|
|
2074
|
-
readonly obj: THREE_TYPE.Scene;
|
|
2075
2064
|
/**
|
|
2076
2065
|
* Moves the camera along a curved path, optionally turning it toward a new target.
|
|
2077
2066
|
* @param params - Camera movement settings.
|
|
2078
2067
|
* @param params.camTarget - Destination position or object.
|
|
2079
2068
|
* @param params.aimTarget - Position or object to look at while moving.
|
|
2080
2069
|
* @param params.radiusOut - Outward curve radius. Default: **1**
|
|
2081
|
-
* @param params.
|
|
2070
|
+
* @param params.time - Duration in seconds. Default: **2**
|
|
2082
2071
|
* @param params.ease - GSAP easing function. Default: **'power1.inOut'**
|
|
2083
2072
|
*
|
|
2084
2073
|
* @remarks
|
|
2085
2074
|
* Emits {@link AnimEvent} when the animation starts and completes.
|
|
2086
2075
|
*/
|
|
2087
|
-
animCamCurveTo({ camTarget, aimTarget, radiusOut,
|
|
2076
|
+
animCamCurveTo({ camTarget, aimTarget, radiusOut, time, ease }: {
|
|
2088
2077
|
camTarget: THREE_TYPE.Vector3 | string | Obj3D;
|
|
2089
2078
|
aimTarget?: THREE_TYPE.Vector3 | string | Obj3D;
|
|
2090
2079
|
radiusOut?: number;
|
|
2091
|
-
|
|
2080
|
+
time?: number;
|
|
2092
2081
|
ease?: string;
|
|
2093
2082
|
}): void;
|
|
2094
2083
|
/**
|
|
2095
2084
|
* Moves a perspective camera to frame an object while looking at it. Only the object's own geometry is used; child objects are excluded.
|
|
2096
2085
|
* @param params - Camera movement settings.
|
|
2097
2086
|
* @param params.target - Object or scene object name to frame.
|
|
2098
|
-
* @param params.
|
|
2087
|
+
* @param params.time - Duration in seconds. Default: **1**
|
|
2099
2088
|
* @param params.ease - GSAP easing function. Default: **'power2.inOut'**
|
|
2100
2089
|
* @param params.dist - Multiplier for the calculated camera distance. Default: **1.25**
|
|
2101
2090
|
*
|
|
2102
2091
|
* @remarks
|
|
2103
2092
|
* Emits {@link AnimEvent} when the animation starts and completes.
|
|
2104
2093
|
*/
|
|
2105
|
-
animCamTo({ target,
|
|
2094
|
+
animCamTo({ target, time, ease, dist }: {
|
|
2106
2095
|
target: string | Obj3D;
|
|
2107
|
-
|
|
2096
|
+
time?: number;
|
|
2108
2097
|
ease?: string;
|
|
2109
2098
|
dist?: number;
|
|
2110
2099
|
}): void;
|
|
2111
2100
|
/**
|
|
2112
|
-
* Animates
|
|
2113
|
-
* @param params - Target
|
|
2114
|
-
* @param params.
|
|
2115
|
-
* @param params.
|
|
2101
|
+
* Animates numeric and color properties of a named material from their current values.
|
|
2102
|
+
* @param params - Target values and shared animation settings.
|
|
2103
|
+
* @param params.name - Material name.
|
|
2104
|
+
* @param params.infinite - Repeats the animation indefinitely. Default: **false**
|
|
2105
|
+
* @param params.time - Duration in seconds. Default: **0**
|
|
2116
2106
|
* @param params.ease - GSAP easing function. Default: **'power1.inOut'**
|
|
2107
|
+
* @param params.needsUpdate - Recompiles the material when animation starts. Default: **false**
|
|
2117
2108
|
*
|
|
2118
2109
|
* @remarks
|
|
2119
|
-
* Colors may be strings, numbers, or `THREE.Color` values.
|
|
2110
|
+
* Colors may be strings, numbers, or `THREE.Color` values. All properties share one tween.
|
|
2111
|
+
* Unknown materials, unknown easing functions, and empty property lists leave a running animation unchanged.
|
|
2112
|
+
* Property names and target values are the caller's responsibility. Only numeric and color properties are animated.
|
|
2113
|
+
* A new call cancels the entire previous animation of the same material.
|
|
2114
|
+
* Emits {@link AnimMaterialEvent} once on start, completion, or cancellation with all current values.
|
|
2120
2115
|
*/
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2116
|
+
animMaterialTo({ name, infinite, time, ease, needsUpdate, ...props }: {
|
|
2117
|
+
name: string;
|
|
2118
|
+
infinite?: boolean;
|
|
2119
|
+
time?: number;
|
|
2124
2120
|
ease?: string;
|
|
2125
|
-
|
|
2126
|
-
[key: string]:
|
|
2121
|
+
needsUpdate?: boolean;
|
|
2122
|
+
[key: string]: any;
|
|
2127
2123
|
}): void;
|
|
2128
2124
|
/**
|
|
2129
|
-
* Animates
|
|
2130
|
-
* @param params - Target
|
|
2131
|
-
* @param params.
|
|
2132
|
-
* @param params.
|
|
2133
|
-
* @param params.infinite - Repeats
|
|
2134
|
-
* @param params.
|
|
2125
|
+
* Animates all assigned materials of an object, optionally including descendant meshes.
|
|
2126
|
+
* @param params - Target material values and shared animation settings.
|
|
2127
|
+
* @param params.obj - Scene object name or `Mesh3D` component.
|
|
2128
|
+
* @param params.recursive - Includes descendant meshes. Default: **false**
|
|
2129
|
+
* @param params.infinite - Repeats each animation indefinitely. Default: **false**
|
|
2130
|
+
* @param params.time - Duration in seconds. Default: **0**
|
|
2135
2131
|
* @param params.ease - GSAP easing function. Default: **'power1.inOut'**
|
|
2136
|
-
* @param params.needsUpdate - Recompiles
|
|
2132
|
+
* @param params.needsUpdate - Recompiles materials when animation starts. Default: **false**
|
|
2137
2133
|
*
|
|
2138
2134
|
* @remarks
|
|
2139
|
-
*
|
|
2135
|
+
* Each shared material is animated once. Tweens and {@link AnimMaterialEvent} are managed per material.
|
|
2140
2136
|
*/
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2137
|
+
animMaterialsTo({ obj, recursive, ...params }: {
|
|
2138
|
+
obj: string | Mesh3D;
|
|
2139
|
+
recursive?: boolean;
|
|
2144
2140
|
infinite?: boolean;
|
|
2145
|
-
|
|
2141
|
+
time?: number;
|
|
2146
2142
|
ease?: string;
|
|
2147
2143
|
needsUpdate?: boolean;
|
|
2148
2144
|
[key: string]: any;
|
|
@@ -2154,7 +2150,7 @@ export declare class Scene {
|
|
|
2154
2150
|
* @param params.pos - Target local position; omitted axes remain unchanged.
|
|
2155
2151
|
* @param params.rot - Target local Euler angles in degrees, using the object's Euler order.
|
|
2156
2152
|
* @param params.scale - Target local scale; omitted axes remain unchanged.
|
|
2157
|
-
* @param params.
|
|
2153
|
+
* @param params.time - Duration in seconds. Default: **1**. A value of 0 applies the values immediately.
|
|
2158
2154
|
* @param params.ease - GSAP easing function. Default: **'power2.inOut'**
|
|
2159
2155
|
*
|
|
2160
2156
|
* @remarks
|
|
@@ -2164,7 +2160,7 @@ export declare class Scene {
|
|
|
2164
2160
|
* A new call cancels the entire previous transformation of the same object.
|
|
2165
2161
|
* Emits {@link AnimEvent}: `Anim_Start`, `Anim_Complete`, or `Anim_Cancel` when replaced.
|
|
2166
2162
|
*/
|
|
2167
|
-
animTransformTo({ obj, pos, rot, scale,
|
|
2163
|
+
animTransformTo({ obj, pos, rot, scale, time, ease }: {
|
|
2168
2164
|
obj: string | Obj3D;
|
|
2169
2165
|
pos?: {
|
|
2170
2166
|
x?: number;
|
|
@@ -2181,9 +2177,10 @@ export declare class Scene {
|
|
|
2181
2177
|
y?: number;
|
|
2182
2178
|
z?: number;
|
|
2183
2179
|
};
|
|
2184
|
-
|
|
2180
|
+
time?: number;
|
|
2185
2181
|
ease?: string;
|
|
2186
2182
|
}): void;
|
|
2183
|
+
private getMtrls;
|
|
2187
2184
|
private getObjectName;
|
|
2188
2185
|
/**
|
|
2189
2186
|
* Plays a named animation clip with blending, looping, and speed control.
|
|
@@ -2191,44 +2188,44 @@ export declare class Scene {
|
|
|
2191
2188
|
* @param params - Parameters for controlling the animation playback.
|
|
2192
2189
|
* @param params.layer - The freely named layer used to group animation actions.
|
|
2193
2190
|
* @param params.clip - The name of the animation clip to play.
|
|
2194
|
-
* @param params.
|
|
2195
|
-
* @param params.
|
|
2196
|
-
* @param params.
|
|
2197
|
-
* @param params.
|
|
2198
|
-
* @param params.
|
|
2199
|
-
* @param params.
|
|
2191
|
+
* @param params.modeBlend - How the action is blended with other active actions. Default: **'normal'**
|
|
2192
|
+
* @param params.modeFinish - Whether the final pose is held or faded out after the final loop. Default: **'hold'**
|
|
2193
|
+
* @param params.modeLoop - Number of plays or `'infinite'` for endless looping. Default: **1**
|
|
2194
|
+
* @param params.modeStop - Which previous actions of the same layer are stopped before playback. Default: **'all'**
|
|
2195
|
+
* @param params.fadeTime - Duration in seconds for fading affected previous actions out and the new action in. Default: **0**
|
|
2196
|
+
* @param params.fadeTimeFinish - Duration in seconds for `modeFinish: 'fadeOut'`. Default: **0**
|
|
2200
2197
|
* @param params.reverse - If `true`, plays the clip in reverse. Default: **false**
|
|
2201
2198
|
* @param params.reset - If `true`, resets the clip before a new playback. Default: **false**
|
|
2202
|
-
* @param params.
|
|
2203
|
-
* @param params.
|
|
2204
|
-
* @param params.
|
|
2205
|
-
* @param params.
|
|
2199
|
+
* @param params.speedStart - Initial playback speed for speed interpolation. Default: **0**
|
|
2200
|
+
* @param params.speedEnd - Target playback speed. Default: **1**
|
|
2201
|
+
* @param params.speedTime - Duration in seconds for speed interpolation. Default: **0**
|
|
2202
|
+
* @param params.speedEase - GSAP easing function name. Default: **'power1.inOut'**
|
|
2206
2203
|
*
|
|
2207
2204
|
* @remarks
|
|
2208
2205
|
* Playing an active or fading-in action again updates its speed without restarting it. Finished or stopped actions restart; fading-out actions resume from their current time and weight.
|
|
2209
2206
|
*
|
|
2210
|
-
* `
|
|
2207
|
+
* `modeFinish` and `fadeTimeFinish` have no effect when `modeLoop` is `'infinite'`.
|
|
2211
2208
|
*
|
|
2212
2209
|
* **Events**
|
|
2213
2210
|
*
|
|
2214
2211
|
* {@link ClipEvent}
|
|
2215
2212
|
*/
|
|
2216
|
-
playClip({ layer, clip: clipName,
|
|
2213
|
+
playClip({ layer, clip: clipName, modeBlend, modeFinish, modeLoop, modeStop, fadeTime, fadeTimeFinish, reverse, reset, speedStart, speedEnd, speedTime, speedEase }: {
|
|
2217
2214
|
layer: string;
|
|
2218
2215
|
clip: string;
|
|
2219
2216
|
singleAction?: boolean;
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2217
|
+
modeBlend?: BlendMode;
|
|
2218
|
+
modeFinish?: FinishMode;
|
|
2219
|
+
modeLoop?: LoopMode;
|
|
2220
|
+
modeStop?: StopMode;
|
|
2221
|
+
fadeTime?: number;
|
|
2222
|
+
fadeTimeFinish?: number;
|
|
2226
2223
|
reverse?: boolean;
|
|
2227
2224
|
reset?: boolean;
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2225
|
+
speedStart?: number;
|
|
2226
|
+
speedEnd?: number;
|
|
2227
|
+
speedTime?: number;
|
|
2228
|
+
speedEase?: string;
|
|
2232
2229
|
}): void;
|
|
2233
2230
|
/**
|
|
2234
2231
|
* Plays a named camera animation clip with blending, looping, and speed control.
|
|
@@ -2236,16 +2233,16 @@ export declare class Scene {
|
|
|
2236
2233
|
* @param params - Parameters for controlling the camera animation playback.
|
|
2237
2234
|
* @param params.layer - The freely named layer used to group camera animation actions.
|
|
2238
2235
|
* @param params.clip - The name of the camera animation clip to play.
|
|
2239
|
-
* @param params.
|
|
2240
|
-
* @param params.
|
|
2241
|
-
* @param params.
|
|
2242
|
-
* @param params.
|
|
2236
|
+
* @param params.modeBlend - How the action is blended with other active actions. Default: **'normal'**
|
|
2237
|
+
* @param params.modeLoop - Number of plays or `'infinite'` for endless looping. Default: **1**
|
|
2238
|
+
* @param params.modeStop - Which previous actions of the same layer are stopped before playback. Default: **'all'**
|
|
2239
|
+
* @param params.fadeTime - Duration in seconds for fading affected previous actions out and the new action in. Default: **0**
|
|
2243
2240
|
* @param params.reverse - If `true`, plays the clip in reverse. Default: **false**
|
|
2244
2241
|
* @param params.reset - If `true`, resets the clip before a new playback. Default: **false**
|
|
2245
|
-
* @param params.
|
|
2246
|
-
* @param params.
|
|
2247
|
-
* @param params.
|
|
2248
|
-
* @param params.
|
|
2242
|
+
* @param params.speedStart - Initial playback speed for speed interpolation. Default: **0**
|
|
2243
|
+
* @param params.speedEnd - Target playback speed. Default: **1**
|
|
2244
|
+
* @param params.speedTime - Duration in seconds for speed interpolation. Default: **0**
|
|
2245
|
+
* @param params.speedEase - GSAP easing function name. Default: **'power1.inOut'**
|
|
2249
2246
|
*
|
|
2250
2247
|
* @remarks
|
|
2251
2248
|
* Playing an active or fading-in action again updates its speed without restarting it. Finished or stopped actions restart; fading-out actions resume from their current time and weight.
|
|
@@ -2254,19 +2251,19 @@ export declare class Scene {
|
|
|
2254
2251
|
*
|
|
2255
2252
|
* {@link ClipEvent}
|
|
2256
2253
|
*/
|
|
2257
|
-
playClipCam({ layer, clip: clipName,
|
|
2254
|
+
playClipCam({ layer, clip: clipName, modeBlend, modeLoop, modeStop, fadeTime, reverse, reset, speedStart, speedEnd, speedTime, speedEase }: {
|
|
2258
2255
|
layer: string;
|
|
2259
2256
|
clip: string;
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2257
|
+
modeBlend?: BlendMode;
|
|
2258
|
+
modeLoop?: LoopMode;
|
|
2259
|
+
modeStop?: StopMode;
|
|
2260
|
+
fadeTime?: number;
|
|
2264
2261
|
reverse?: boolean;
|
|
2265
2262
|
reset?: boolean;
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2263
|
+
speedStart?: number;
|
|
2264
|
+
speedEnd?: number;
|
|
2265
|
+
speedTime?: number;
|
|
2266
|
+
speedEase?: string;
|
|
2270
2267
|
}): void;
|
|
2271
2268
|
/**
|
|
2272
2269
|
* Removes the built-in ambient light and releases its resources.
|
|
@@ -2315,16 +2312,30 @@ export declare class Scene {
|
|
|
2315
2312
|
intensity?: number;
|
|
2316
2313
|
}): void;
|
|
2317
2314
|
/**
|
|
2318
|
-
* Updates
|
|
2315
|
+
* Updates properties of a named material. Shared materials also affect other objects that use them.
|
|
2316
|
+
* @param params - Target material values, such as `color`, `roughness`, or `map`.
|
|
2317
|
+
* @param params.name - Material name.
|
|
2318
|
+
* @param params.needsUpdate - Recompiles the material after applying the values. Default: **false**
|
|
2319
|
+
*
|
|
2320
|
+
* @remarks
|
|
2321
|
+
* Texture paths for `map` and `emissiveMap` load asynchronously. Property names and values are the caller's responsibility.
|
|
2322
|
+
*/
|
|
2323
|
+
setMaterialProps({ name, needsUpdate, ...props }: {
|
|
2324
|
+
name: string;
|
|
2325
|
+
needsUpdate?: boolean;
|
|
2326
|
+
[key: string]: any;
|
|
2327
|
+
}): void;
|
|
2328
|
+
/**
|
|
2329
|
+
* Updates all assigned materials of an object, optionally including descendant meshes.
|
|
2319
2330
|
* @param params - Target material values, such as `color`, `roughness`, or `map`.
|
|
2320
2331
|
* @param params.obj - Scene object name or `Mesh3D` component.
|
|
2321
2332
|
* @param params.recursive - Includes descendant meshes. Default: **false**
|
|
2322
2333
|
* @param params.needsUpdate - Recompiles materials after applying the values. Default: **false**
|
|
2323
2334
|
*
|
|
2324
2335
|
* @remarks
|
|
2325
|
-
* Texture paths for `map` and `emissiveMap` load asynchronously.
|
|
2336
|
+
* Each shared material is updated once. Texture paths for `map` and `emissiveMap` load asynchronously.
|
|
2326
2337
|
*/
|
|
2327
|
-
|
|
2338
|
+
setMaterialsProps({ obj, recursive, ...props }: {
|
|
2328
2339
|
obj: string | Mesh3D;
|
|
2329
2340
|
recursive?: boolean;
|
|
2330
2341
|
needsUpdate?: boolean;
|
|
@@ -2334,16 +2345,16 @@ export declare class Scene {
|
|
|
2334
2345
|
* Stops a named animation clip, optionally slowing it to a halt first.
|
|
2335
2346
|
* @param params - Stop settings.
|
|
2336
2347
|
* @param params.clipName - Animation clip name.
|
|
2337
|
-
* @param params.
|
|
2338
|
-
* @param params.
|
|
2348
|
+
* @param params.speedTime - Slowdown duration in seconds. Default: **0**
|
|
2349
|
+
* @param params.speedEase - GSAP easing function for the slowdown. Default: **'power1.inOut'**
|
|
2339
2350
|
*
|
|
2340
2351
|
* @remarks
|
|
2341
2352
|
* A slowdown emits `Clip_Speed_Start` and `Clip_Speed_Complete`, followed by `Clip_Cancel`. A duration of `0` cancels immediately. See {@link ClipEvent}.
|
|
2342
2353
|
*/
|
|
2343
|
-
|
|
2354
|
+
stopClip({ clipName, speedTime, speedEase }: {
|
|
2344
2355
|
clipName: string;
|
|
2345
|
-
|
|
2346
|
-
|
|
2356
|
+
speedTime?: number;
|
|
2357
|
+
speedEase?: string;
|
|
2347
2358
|
}): void;
|
|
2348
2359
|
}
|
|
2349
2360
|
|