three-low-poly 0.9.17 → 0.9.19
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/index.cjs.js +8 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +341 -116
- package/dist/index.es.js +1492 -1309
- package/dist/index.es.js.map +1 -1
- package/dist/index.iife.js +10 -10
- package/dist/index.iife.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { MeshLambertMaterial } from 'three';
|
|
|
12
12
|
import { MeshPhongMaterial } from 'three';
|
|
13
13
|
import { MeshPhysicalMaterial } from 'three';
|
|
14
14
|
import { MeshStandardMaterial } from 'three';
|
|
15
|
+
import { ParametricGeometry } from 'three-stdlib';
|
|
15
16
|
import { PerspectiveCamera } from 'three';
|
|
16
17
|
import { ShaderMaterial } from 'three';
|
|
17
18
|
import { Shape } from 'three';
|
|
@@ -45,6 +46,48 @@ export declare function addWaterDisplacement<T extends Material>(material: T, {
|
|
|
45
46
|
waveAmplitude?: number | undefined;
|
|
46
47
|
}): void;
|
|
47
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Generates spherical curve profile points, for use with geometry.
|
|
51
|
+
* Enables connective geometry via holes at the top and bottom of the sphere.
|
|
52
|
+
*
|
|
53
|
+
* Example usage:
|
|
54
|
+
*
|
|
55
|
+
* Tube that connect with a sphere on the bottom:
|
|
56
|
+
* ```
|
|
57
|
+
* const points: Vector2[] = [
|
|
58
|
+
* new Vector2(1, 0),
|
|
59
|
+
* ...appendSphericalCurve(
|
|
60
|
+
* 2, // Radius x
|
|
61
|
+
* 2, // Radius y
|
|
62
|
+
* 5, // Start y
|
|
63
|
+
* 0, // Hole top radius
|
|
64
|
+
* 1, // Hole bottom radius
|
|
65
|
+
* 32, // Segments
|
|
66
|
+
* ),
|
|
67
|
+
* ];
|
|
68
|
+
*
|
|
69
|
+
* const latheGeometry = new LatheGeometry(points, 32);
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* Tube that connect with a sphere on the top:
|
|
73
|
+
* ```
|
|
74
|
+
* const points: Vector2[] = [
|
|
75
|
+
* ...appendSphericalCurve(
|
|
76
|
+
* 2, // Radius x
|
|
77
|
+
* 2, // Radius y
|
|
78
|
+
* 1, // Start y
|
|
79
|
+
* 1, // Hole top radius
|
|
80
|
+
* 0, // Hole bottom radius
|
|
81
|
+
* 32, // Segments
|
|
82
|
+
* ),
|
|
83
|
+
* new Vector2(1, 5),
|
|
84
|
+
* ];
|
|
85
|
+
*
|
|
86
|
+
* const latheGeometry = new LatheGeometry(points, 32);
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare function appendSphericalCurve(sphereRadiusX: number, sphereRadiusY: number, sphereStartY: number, holeTopRadius?: number, holeBottomRadius?: number, segments?: number): Vector2[];
|
|
90
|
+
|
|
48
91
|
/**
|
|
49
92
|
* Atmospheric scattering shader.
|
|
50
93
|
*
|
|
@@ -439,14 +482,132 @@ export declare function calculateXFromSlopeIntercept(x1: number, y1: number, x2:
|
|
|
439
482
|
*/
|
|
440
483
|
export declare function calculateYFromSlopeIntercept(x1: number, y1: number, x2: number, y2: number, x: number): number;
|
|
441
484
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
485
|
+
/**
|
|
486
|
+
* Dolly backward
|
|
487
|
+
*
|
|
488
|
+
* Example:
|
|
489
|
+
* ```
|
|
490
|
+
* dollyAnimation(camera, 5, 3000, () => {
|
|
491
|
+
* console.log("Dolly animation complete");
|
|
492
|
+
* });
|
|
493
|
+
* ```
|
|
494
|
+
*/
|
|
495
|
+
export declare function cameraDollyAnimation(camera: Camera, distance: number, duration: number, onComplete?: () => void): void;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The camera flies through a sequence of points, ideal for showcasing specific elements in the scene.
|
|
499
|
+
*
|
|
500
|
+
* Example:
|
|
501
|
+
* ```
|
|
502
|
+
* flythroughAnimation(
|
|
503
|
+
* camera,
|
|
504
|
+
* [
|
|
505
|
+
* new THREE.Vector3(0, 5, 5),
|
|
506
|
+
* new THREE.Vector3(0, 5, -25.5),
|
|
507
|
+
* new THREE.Vector3(-20.5, 5, 0),
|
|
508
|
+
* ],
|
|
509
|
+
* 6000,
|
|
510
|
+
* () => {
|
|
511
|
+
* console.log("Flythrough animation complete");
|
|
512
|
+
* }
|
|
513
|
+
* );
|
|
514
|
+
* ```
|
|
515
|
+
*/
|
|
516
|
+
export declare function cameraFlythroughAnimation(camera: Camera, waypoints: Vector3[], duration: number, onComplete?: () => void): void;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Orbit around a target
|
|
520
|
+
*
|
|
521
|
+
* Example:
|
|
522
|
+
* ```
|
|
523
|
+
* orbitAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 5000, () => {
|
|
524
|
+
* console.log("Orbit animation complete");
|
|
525
|
+
* });
|
|
526
|
+
* ```
|
|
527
|
+
*/
|
|
528
|
+
export declare function cameraOrbitAnimation(camera: Camera, target: Vector3, radius: number, duration: number, onComplete?: () => void): void;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The camera swings back and forth like a pendulum.
|
|
532
|
+
*
|
|
533
|
+
* Example:
|
|
534
|
+
* ```
|
|
535
|
+
* pendulumAnimation(camera, new THREE.Vector3(0, 5, 5), 0.5, 9000, 3, () => {
|
|
536
|
+
* console.log("Pendulum animation complete");
|
|
537
|
+
* });
|
|
538
|
+
* ```
|
|
539
|
+
*/
|
|
540
|
+
export declare function cameraPendulumAnimation(camera: Camera, center: Vector3, radius: number, duration: number, oscillations: number, onComplete?: () => void): void;
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* The camera spirals upward, perfect for revealing a large scene or structure.
|
|
544
|
+
*
|
|
545
|
+
* Example:
|
|
546
|
+
* ```
|
|
547
|
+
* spiralAscensionAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 300, 7, 12000, () => {
|
|
548
|
+
* console.log("Spiral ascension animation complete");
|
|
549
|
+
* });
|
|
550
|
+
* ```
|
|
551
|
+
*/
|
|
552
|
+
export declare function cameraSpiralAscensionAnimation(camera: Camera, center: Vector3, radius: number, height: number, revolutions: number, duration: number, onComplete?: () => void): void;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Add a slight random wobble for intensity or realism (e.g., during an explosion).
|
|
556
|
+
*
|
|
557
|
+
* Example:
|
|
558
|
+
* ```
|
|
559
|
+
* wobbleAnimation(camera, 0.5, 1000, () => {
|
|
560
|
+
* console.log("Wobble animation complete");
|
|
561
|
+
* });
|
|
562
|
+
* ```
|
|
563
|
+
*/
|
|
564
|
+
export declare function cameraWobbleAnimation(camera: Camera, intensity: number, duration: number, onComplete?: () => void): void;
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* The camera smoothly zooms in toward a target, focusing attention on a specific point,
|
|
568
|
+
* and resets to its original FOV after completion.
|
|
569
|
+
*
|
|
570
|
+
* Example:
|
|
571
|
+
* ```
|
|
572
|
+
* zoomInAnimation(camera, new THREE.Vector3(0, 0, 0), 120, 75, 2000, () => {
|
|
573
|
+
* console.log("Zoom in animation complete");
|
|
574
|
+
* });
|
|
575
|
+
* ```
|
|
576
|
+
*/
|
|
577
|
+
export declare function cameraZoomInAnimation(camera: PerspectiveCamera, target: Vector3, startFov: number, endFov: number, duration: number, onComplete?: () => void): void;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Material indices
|
|
581
|
+
* 0: Stick
|
|
582
|
+
* 1: Flame
|
|
583
|
+
*/
|
|
584
|
+
export declare class Candle extends Mesh<CandleGeometry, MeshStandardMaterial[]> {
|
|
585
|
+
constructor({ radiusTop, //
|
|
586
|
+
radiusBottom, height, flameHeight, flameRadius, segments, }?: {
|
|
587
|
+
radiusTop?: number | undefined;
|
|
588
|
+
radiusBottom?: number | undefined;
|
|
589
|
+
height?: number | undefined;
|
|
590
|
+
flameHeight?: number | undefined;
|
|
591
|
+
flameRadius?: number | undefined;
|
|
592
|
+
segments?: number | undefined;
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Group indices
|
|
598
|
+
* 0: Stick
|
|
599
|
+
* 1: Flame
|
|
600
|
+
*/
|
|
601
|
+
export declare class CandleGeometry extends BufferGeometry {
|
|
602
|
+
constructor({ radiusTop, //
|
|
603
|
+
radiusBottom, height, flameHeight, flameRadius, segments, }?: {
|
|
604
|
+
radiusTop?: number | undefined;
|
|
605
|
+
radiusBottom?: number | undefined;
|
|
606
|
+
height?: number | undefined;
|
|
607
|
+
flameHeight?: number | undefined;
|
|
608
|
+
flameRadius?: number | undefined;
|
|
609
|
+
segments?: number | undefined;
|
|
610
|
+
});
|
|
450
611
|
}
|
|
451
612
|
|
|
452
613
|
/**
|
|
@@ -487,12 +648,22 @@ export declare function centerInstancedMesh<T extends InstancedMesh>(mesh: T): v
|
|
|
487
648
|
export declare function centerMesh<T extends Mesh>(mesh: T): void;
|
|
488
649
|
|
|
489
650
|
/**
|
|
490
|
-
* Centers
|
|
651
|
+
* Centers a Mesh at the specified target position.
|
|
652
|
+
*/
|
|
653
|
+
export declare function centerMeshAtTarget<T extends Mesh>(mesh: T, target?: Vector3): void;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Centers the geometry of the Mesh at the local origin (0, 0, 0) by modifying the geometry vertices.
|
|
491
657
|
* This method moves the geometry itself so that its center is at the local origin,
|
|
492
658
|
* without affecting the position, rotation, or scale of the mesh.
|
|
493
659
|
*/
|
|
494
660
|
export declare function centerMeshGeometry<T extends Mesh>(mesh: T): void;
|
|
495
661
|
|
|
662
|
+
/**
|
|
663
|
+
* Centers the geometry of a Mesh at the specified target position.
|
|
664
|
+
*/
|
|
665
|
+
export declare function centerMeshGeometryAtTarget<T extends Mesh>(mesh: T, target?: Vector3): void;
|
|
666
|
+
|
|
496
667
|
/**
|
|
497
668
|
* Create a checkerboard texture
|
|
498
669
|
*
|
|
@@ -964,18 +1135,6 @@ export declare const Direction: {
|
|
|
964
1135
|
*/
|
|
965
1136
|
export declare const displacementBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, strength: number, direction?: Vector3, falloffFn?: (distance: number, radius: number) => number) => void;
|
|
966
1137
|
|
|
967
|
-
/**
|
|
968
|
-
* Dolly backward
|
|
969
|
-
*
|
|
970
|
-
* Example:
|
|
971
|
-
* ```
|
|
972
|
-
* dollyAnimation(camera, 5, 3000, () => {
|
|
973
|
-
* console.log("Dolly animation complete");
|
|
974
|
-
* });
|
|
975
|
-
* ```
|
|
976
|
-
*/
|
|
977
|
-
export declare function dollyAnimation(camera: Camera, distance: number, duration: number, onComplete?: () => void): void;
|
|
978
|
-
|
|
979
1138
|
/**
|
|
980
1139
|
* Easing functions for interpolating values over time.
|
|
981
1140
|
*/
|
|
@@ -1020,18 +1179,26 @@ export declare class EllipticLeafGeometry extends BufferGeometry {
|
|
|
1020
1179
|
}
|
|
1021
1180
|
|
|
1022
1181
|
/**
|
|
1023
|
-
* Emissive pulse
|
|
1182
|
+
* Emissive pulse animation, producing a flickering light effect for materials that have emissive properties.
|
|
1024
1183
|
* The emissive intensity of the material will oscillate between `minIntensity` and `maxIntensity`.
|
|
1025
1184
|
*
|
|
1026
|
-
* Use with materials that have emissive properties.
|
|
1027
|
-
*
|
|
1028
1185
|
* Oscillation time = 2π / speed
|
|
1029
1186
|
* - Low speed values (e.g., 0.5) will result in a slow pulse
|
|
1030
1187
|
* - High speed values (e.g., 10) will result in a rapid flicker
|
|
1031
1188
|
*
|
|
1032
1189
|
* Requires `update()` frame handler with `clock.getElapsedTime()` for animation.
|
|
1190
|
+
*
|
|
1191
|
+
* Example usage:
|
|
1192
|
+
* ```
|
|
1193
|
+
* const pulseAnimation = new EmissivePulseAnimation();
|
|
1194
|
+
* const clock = new THREE.Clock();
|
|
1195
|
+
*
|
|
1196
|
+
* function animate() {
|
|
1197
|
+
* pulseAnimation.update(clock.getElapsedTime());
|
|
1198
|
+
* }
|
|
1199
|
+
* ```
|
|
1033
1200
|
*/
|
|
1034
|
-
export declare class
|
|
1201
|
+
export declare class EmissivePulseAnimation {
|
|
1035
1202
|
speed: number;
|
|
1036
1203
|
maxIntensity: number;
|
|
1037
1204
|
minIntensity: number;
|
|
@@ -1118,8 +1285,22 @@ export declare function findClosestColor(inputColor: number, dataset: number[]):
|
|
|
1118
1285
|
|
|
1119
1286
|
export declare function findClosestColorChannelWise(inputColor: number, dataset: number[]): number | null;
|
|
1120
1287
|
|
|
1121
|
-
export declare class
|
|
1122
|
-
constructor(
|
|
1288
|
+
export declare class Flame extends Mesh<FlameGeometry, MeshStandardMaterial> {
|
|
1289
|
+
constructor({ height, radius, segmentsU, segmentsV }?: {
|
|
1290
|
+
height?: number | undefined;
|
|
1291
|
+
radius?: number | undefined;
|
|
1292
|
+
segmentsU?: number | undefined;
|
|
1293
|
+
segmentsV?: number | undefined;
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
export declare class FlameGeometry extends ParametricGeometry {
|
|
1298
|
+
constructor({ height, radius, segmentsU, segmentsV }?: {
|
|
1299
|
+
height?: number | undefined;
|
|
1300
|
+
radius?: number | undefined;
|
|
1301
|
+
segmentsU?: number | undefined;
|
|
1302
|
+
segmentsV?: number | undefined;
|
|
1303
|
+
});
|
|
1123
1304
|
}
|
|
1124
1305
|
|
|
1125
1306
|
/**
|
|
@@ -1135,27 +1316,6 @@ export declare class FlorenceFlaskGeometry extends BufferGeometry {
|
|
|
1135
1316
|
constructor();
|
|
1136
1317
|
}
|
|
1137
1318
|
|
|
1138
|
-
/**
|
|
1139
|
-
* The camera flies through a sequence of points, ideal for showcasing specific elements in the scene.
|
|
1140
|
-
*
|
|
1141
|
-
* Example:
|
|
1142
|
-
* ```
|
|
1143
|
-
* flythroughAnimation(
|
|
1144
|
-
* camera,
|
|
1145
|
-
* [
|
|
1146
|
-
* new THREE.Vector3(0, 5, 5),
|
|
1147
|
-
* new THREE.Vector3(0, 5, -25.5),
|
|
1148
|
-
* new THREE.Vector3(-20.5, 5, 0),
|
|
1149
|
-
* ],
|
|
1150
|
-
* 6000,
|
|
1151
|
-
* () => {
|
|
1152
|
-
* console.log("Flythrough animation complete");
|
|
1153
|
-
* }
|
|
1154
|
-
* );
|
|
1155
|
-
* ```
|
|
1156
|
-
*/
|
|
1157
|
-
export declare function flythroughAnimation(camera: Camera, waypoints: Vector3[], duration: number, onComplete?: () => void): void;
|
|
1158
|
-
|
|
1159
1319
|
export declare const gaussian: (t: number) => number;
|
|
1160
1320
|
|
|
1161
1321
|
export declare class Gear extends Mesh {
|
|
@@ -1192,7 +1352,7 @@ export declare function hexToHsl(hex: number): [number, number, number];
|
|
|
1192
1352
|
*/
|
|
1193
1353
|
export declare function hexToRgb(hex: number): [number, number, number];
|
|
1194
1354
|
|
|
1195
|
-
export declare class Hill extends Mesh {
|
|
1355
|
+
export declare class Hill extends Mesh<HillGeometry, MeshStandardMaterial> {
|
|
1196
1356
|
constructor({ radius, //
|
|
1197
1357
|
height, widthSegments, heightSegments, phiStart, phiLength, }?: {
|
|
1198
1358
|
radius?: number | undefined;
|
|
@@ -1246,6 +1406,24 @@ export declare function interpolateCurve(curveFunction: (t: number) => number, s
|
|
|
1246
1406
|
|
|
1247
1407
|
export declare const inverse: (t: number) => number;
|
|
1248
1408
|
|
|
1409
|
+
/**
|
|
1410
|
+
* Material indices
|
|
1411
|
+
* 0. Jar
|
|
1412
|
+
* 1. Cork
|
|
1413
|
+
*/
|
|
1414
|
+
export declare class Jar extends Mesh<JarGeometry, MeshStandardMaterial[]> {
|
|
1415
|
+
constructor();
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* Group indices
|
|
1420
|
+
* 0. Jar
|
|
1421
|
+
* 1. Cork
|
|
1422
|
+
*/
|
|
1423
|
+
export declare class JarGeometry extends BufferGeometry {
|
|
1424
|
+
constructor();
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1249
1427
|
export declare class Lantern extends Group {
|
|
1250
1428
|
constructor(height?: number, baseWidth?: number);
|
|
1251
1429
|
}
|
|
@@ -1274,7 +1452,66 @@ export declare class LeverPanel extends Group {
|
|
|
1274
1452
|
}
|
|
1275
1453
|
|
|
1276
1454
|
/**
|
|
1277
|
-
*
|
|
1455
|
+
* Create a light flicker animation that will randomly change the intensity and position of a light.
|
|
1456
|
+
* Effect resembles a flickering flame of candlelight.
|
|
1457
|
+
*
|
|
1458
|
+
* Example usage:
|
|
1459
|
+
* ```
|
|
1460
|
+
* // Create a candle
|
|
1461
|
+
* const candle = new Candle({
|
|
1462
|
+
* height: 1,
|
|
1463
|
+
* flameHeight: 0.25,
|
|
1464
|
+
* });
|
|
1465
|
+
* scene.add(candle);
|
|
1466
|
+
*
|
|
1467
|
+
* // Create a point light
|
|
1468
|
+
* const candleLight = new THREE.PointLight(0xffa500, 1, 5);
|
|
1469
|
+
* scene.add(candleLight);
|
|
1470
|
+
*
|
|
1471
|
+
* // Apply the animator to the light
|
|
1472
|
+
* const lightAnimation = new LightFlickerAnimation({
|
|
1473
|
+
* light: candleLight,
|
|
1474
|
+
* maxIntensity: 2.2,
|
|
1475
|
+
* x: candle.position.x,
|
|
1476
|
+
* y: candle.position.y + 1 + 0.125, // height + half flame height
|
|
1477
|
+
* z: candle.position.z,
|
|
1478
|
+
* });
|
|
1479
|
+
* animations.push(lightAnimation);
|
|
1480
|
+
*
|
|
1481
|
+
* // Update the light animation in the render loop
|
|
1482
|
+
* renderer.setAnimationLoop(() => {
|
|
1483
|
+
* lightAnimation.update();
|
|
1484
|
+
* });
|
|
1485
|
+
* ```
|
|
1486
|
+
*/
|
|
1487
|
+
export declare class LightFlickerAnimation {
|
|
1488
|
+
private light?;
|
|
1489
|
+
minIntensity: number;
|
|
1490
|
+
maxIntensity: number;
|
|
1491
|
+
x: number;
|
|
1492
|
+
y: number;
|
|
1493
|
+
z: number;
|
|
1494
|
+
jitterX: number;
|
|
1495
|
+
jitterY: number;
|
|
1496
|
+
jitterZ: number;
|
|
1497
|
+
constructor({ light, minIntensity, maxIntensity, x, y, z, jitterX, jitterY, jitterZ, }?: Partial<LightFlickerAnimationOptions>);
|
|
1498
|
+
update(): void;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
export declare interface LightFlickerAnimationOptions {
|
|
1502
|
+
light?: Light;
|
|
1503
|
+
minIntensity: number;
|
|
1504
|
+
maxIntensity: number;
|
|
1505
|
+
x: number;
|
|
1506
|
+
y: number;
|
|
1507
|
+
z: number;
|
|
1508
|
+
jitterX: number;
|
|
1509
|
+
jitterY: number;
|
|
1510
|
+
jitterZ: number;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* A lightning animation that can be used to simulate a lightning storm.
|
|
1278
1515
|
* This effect is applied to a light source.
|
|
1279
1516
|
*
|
|
1280
1517
|
* Example usage:
|
|
@@ -1283,12 +1520,14 @@ export declare class LeverPanel extends Group {
|
|
|
1283
1520
|
* scene.add(lightning);
|
|
1284
1521
|
* lightning.position.set(5, 10, -5);
|
|
1285
1522
|
*
|
|
1523
|
+
* const lightningAnimation = new LightningAnimation();
|
|
1524
|
+
*
|
|
1286
1525
|
* setRandomInterval(() => {
|
|
1287
1526
|
* lightningEffect.triggerLightning();
|
|
1288
1527
|
* }, 250, 1250);
|
|
1289
1528
|
* ```
|
|
1290
1529
|
*/
|
|
1291
|
-
export declare class
|
|
1530
|
+
export declare class LightningAnimation {
|
|
1292
1531
|
private light?;
|
|
1293
1532
|
minIntensity: number;
|
|
1294
1533
|
maxIntensity: number;
|
|
@@ -1401,7 +1640,21 @@ export declare class MortarGeometry extends BufferGeometry {
|
|
|
1401
1640
|
constructor();
|
|
1402
1641
|
}
|
|
1403
1642
|
|
|
1404
|
-
|
|
1643
|
+
/**
|
|
1644
|
+
* Material indices:
|
|
1645
|
+
* 0. Rocks
|
|
1646
|
+
* 1. Moss
|
|
1647
|
+
*/
|
|
1648
|
+
export declare class MossyRocks extends Mesh<MossyRocksGeometry, MeshStandardMaterial[]> {
|
|
1649
|
+
constructor();
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Group indices:
|
|
1654
|
+
* 0. Rocks
|
|
1655
|
+
* 1. Moss
|
|
1656
|
+
*/
|
|
1657
|
+
export declare class MossyRocksGeometry extends BufferGeometry {
|
|
1405
1658
|
constructor();
|
|
1406
1659
|
}
|
|
1407
1660
|
|
|
@@ -1422,7 +1675,7 @@ export declare class MossyRocks extends Group {
|
|
|
1422
1675
|
* }
|
|
1423
1676
|
* ```
|
|
1424
1677
|
*/
|
|
1425
|
-
export declare class Mound extends Mesh {
|
|
1678
|
+
export declare class Mound extends Mesh<MoundGeometry, MeshStandardMaterial> {
|
|
1426
1679
|
constructor({ radius, //
|
|
1427
1680
|
widthSegments, heightSegments, phiStart, phiLength, thetaLength, }?: {
|
|
1428
1681
|
radius?: number | undefined;
|
|
@@ -1562,18 +1815,6 @@ declare interface ObeliskHeadstoneOptions {
|
|
|
1562
1815
|
totalHeight?: number;
|
|
1563
1816
|
}
|
|
1564
1817
|
|
|
1565
|
-
/**
|
|
1566
|
-
* Orbit around a target
|
|
1567
|
-
*
|
|
1568
|
-
* Example:
|
|
1569
|
-
* ```
|
|
1570
|
-
* orbitAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 5000, () => {
|
|
1571
|
-
* console.log("Orbit animation complete");
|
|
1572
|
-
* });
|
|
1573
|
-
* ```
|
|
1574
|
-
*/
|
|
1575
|
-
export declare function orbitAnimation(camera: Camera, target: Vector3, radius: number, duration: number, onComplete?: () => void): void;
|
|
1576
|
-
|
|
1577
1818
|
/**
|
|
1578
1819
|
* Prefab for a panel.
|
|
1579
1820
|
* Designed to be used as a control panel for switches, lights, levels, dials, and gauges.
|
|
@@ -1636,18 +1877,6 @@ export declare const ParametricCurveUtils: {
|
|
|
1636
1877
|
*/
|
|
1637
1878
|
export declare function parseHexCode(hex: string): [number, number, number];
|
|
1638
1879
|
|
|
1639
|
-
/**
|
|
1640
|
-
* The camera swings back and forth like a pendulum.
|
|
1641
|
-
*
|
|
1642
|
-
* Example:
|
|
1643
|
-
* ```
|
|
1644
|
-
* pendulumAnimation(camera, new THREE.Vector3(0, 5, 5), 0.5, 9000, 3, () => {
|
|
1645
|
-
* console.log("Pendulum animation complete");
|
|
1646
|
-
* });
|
|
1647
|
-
* ```
|
|
1648
|
-
*/
|
|
1649
|
-
export declare function pendulumAnimation(camera: Camera, center: Vector3, radius: number, duration: number, oscillations: number, onComplete?: () => void): void;
|
|
1650
|
-
|
|
1651
1880
|
/**
|
|
1652
1881
|
* Planar UV Mapping
|
|
1653
1882
|
* Projects UVs onto the geometry from a single direction (like shining a projector onto a surface).
|
|
@@ -1772,7 +2001,11 @@ export declare class RockGeometry extends BufferGeometry {
|
|
|
1772
2001
|
constructor(radius?: number, widthSegments?: number, heightSegments?: number);
|
|
1773
2002
|
}
|
|
1774
2003
|
|
|
1775
|
-
export declare class Rocks extends
|
|
2004
|
+
export declare class Rocks extends Mesh<RocksGeometry, MeshStandardMaterial> {
|
|
2005
|
+
constructor();
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
export declare class RocksGeometry extends BufferGeometry {
|
|
1776
2009
|
constructor();
|
|
1777
2010
|
}
|
|
1778
2011
|
|
|
@@ -1892,18 +2125,6 @@ export declare function sphericalUVMapping(vertices: [number, number, number][])
|
|
|
1892
2125
|
*/
|
|
1893
2126
|
export declare const spikeBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, strength: number, inward?: boolean, falloffFn?: (distance: number, radius: number) => number) => void;
|
|
1894
2127
|
|
|
1895
|
-
/**
|
|
1896
|
-
* The camera spirals upward, perfect for revealing a large scene or structure.
|
|
1897
|
-
*
|
|
1898
|
-
* Example:
|
|
1899
|
-
* ```
|
|
1900
|
-
* spiralAscensionAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 300, 7, 12000, () => {
|
|
1901
|
-
* console.log("Spiral ascension animation complete");
|
|
1902
|
-
* });
|
|
1903
|
-
* ```
|
|
1904
|
-
*/
|
|
1905
|
-
export declare function spiralAscensionAnimation(camera: Camera, center: Vector3, radius: number, height: number, revolutions: number, duration: number, onComplete?: () => void): void;
|
|
1906
|
-
|
|
1907
2128
|
export declare class SpiralStaircaseGeometry extends BufferGeometry {
|
|
1908
2129
|
constructor(stepWidth?: number, stepDepth?: number, stepHeight?: number, numSteps?: number, radius?: number, angleIncrement?: number);
|
|
1909
2130
|
}
|
|
@@ -1971,7 +2192,21 @@ export declare class StoneFencePostGeometry extends BufferGeometry {
|
|
|
1971
2192
|
});
|
|
1972
2193
|
}
|
|
1973
2194
|
|
|
1974
|
-
|
|
2195
|
+
/**
|
|
2196
|
+
* Material indices
|
|
2197
|
+
* 0: Base
|
|
2198
|
+
* 1: Coil
|
|
2199
|
+
*/
|
|
2200
|
+
export declare class TeslaCoil extends Mesh<TeslaCoilGeometry, MeshStandardMaterial[]> {
|
|
2201
|
+
constructor();
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
/**
|
|
2205
|
+
* Group indices
|
|
2206
|
+
* 0: Base
|
|
2207
|
+
* 1: Coil
|
|
2208
|
+
*/
|
|
2209
|
+
export declare class TeslaCoilGeometry extends BufferGeometry {
|
|
1975
2210
|
constructor();
|
|
1976
2211
|
}
|
|
1977
2212
|
|
|
@@ -1987,6 +2222,21 @@ export declare class TestTubeRack extends Group {
|
|
|
1987
2222
|
constructor(count?: number, colors?: number[]);
|
|
1988
2223
|
}
|
|
1989
2224
|
|
|
2225
|
+
/**
|
|
2226
|
+
* Calculate the thetaLength to achieve a specific hole radius in a sphere.
|
|
2227
|
+
* thetaLength = asin(w / (2 * R))
|
|
2228
|
+
*
|
|
2229
|
+
* Returns the thetaLength in radians.
|
|
2230
|
+
*
|
|
2231
|
+
* Example usage:
|
|
2232
|
+
* ```
|
|
2233
|
+
* const sphereRadius = 5; // Radius of the sphere
|
|
2234
|
+
* const holeRadius = 1; // Desired radius of the hole at the top
|
|
2235
|
+
* const thetaLength = thetaLengthForRadius(sphereRadius, holeRadius);
|
|
2236
|
+
* ```
|
|
2237
|
+
*/
|
|
2238
|
+
export declare const thetaLengthForRadius: (sphereRadius: number, holeRadius: number) => number;
|
|
2239
|
+
|
|
1990
2240
|
/**
|
|
1991
2241
|
* Material indices:
|
|
1992
2242
|
* 0. Trunk
|
|
@@ -2076,18 +2326,6 @@ export declare class WineBottleGeometry extends BufferGeometry {
|
|
|
2076
2326
|
});
|
|
2077
2327
|
}
|
|
2078
2328
|
|
|
2079
|
-
/**
|
|
2080
|
-
* Add a slight random wobble for intensity or realism (e.g., during an explosion).
|
|
2081
|
-
*
|
|
2082
|
-
* Example:
|
|
2083
|
-
* ```
|
|
2084
|
-
* wobbleAnimation(camera, 0.5, 1000, () => {
|
|
2085
|
-
* console.log("Wobble animation complete");
|
|
2086
|
-
* });
|
|
2087
|
-
* ```
|
|
2088
|
-
*/
|
|
2089
|
-
export declare function wobbleAnimation(camera: Camera, intensity: number, duration: number, onComplete?: () => void): void;
|
|
2090
|
-
|
|
2091
2329
|
export declare class WroughtIronBar extends Mesh<WroughtIronBarGeometry, MeshStandardMaterial> {
|
|
2092
2330
|
constructor({ barHeight, //
|
|
2093
2331
|
barRadius, spikeHeight, spikeRadius, spikeScaleZ, radialSegments, }?: {
|
|
@@ -2149,17 +2387,4 @@ export declare class WroughtIronFenceGeometry extends BufferGeometry {
|
|
|
2149
2387
|
});
|
|
2150
2388
|
}
|
|
2151
2389
|
|
|
2152
|
-
/**
|
|
2153
|
-
* The camera smoothly zooms in toward a target, focusing attention on a specific point,
|
|
2154
|
-
* and resets to its original FOV after completion.
|
|
2155
|
-
*
|
|
2156
|
-
* Example:
|
|
2157
|
-
* ```
|
|
2158
|
-
* zoomInAnimation(camera, new THREE.Vector3(0, 0, 0), 120, 75, 2000, () => {
|
|
2159
|
-
* console.log("Zoom in animation complete");
|
|
2160
|
-
* });
|
|
2161
|
-
* ```
|
|
2162
|
-
*/
|
|
2163
|
-
export declare function zoomInAnimation(camera: PerspectiveCamera, target: Vector3, startFov: number, endFov: number, duration: number, onComplete?: () => void): void;
|
|
2164
|
-
|
|
2165
2390
|
export { }
|