three-low-poly 0.9.13 → 0.9.14
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 +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +140 -17
- package/dist/index.es.js +1532 -1365
- 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
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { BoxGeometry } from 'three';
|
|
2
2
|
import { BufferGeometry } from 'three';
|
|
3
|
+
import { Camera } from 'three';
|
|
3
4
|
import { Color } from 'three';
|
|
4
5
|
import { DataTexture } from 'three';
|
|
5
6
|
import { Group } from 'three';
|
|
6
7
|
import { InstancedMesh } from 'three';
|
|
7
8
|
import { Material } from 'three';
|
|
8
9
|
import { Mesh } from 'three';
|
|
10
|
+
import { PerspectiveCamera } from 'three';
|
|
9
11
|
import { ShaderMaterial } from 'three';
|
|
10
12
|
import { Shape } from 'three';
|
|
11
13
|
import { SphereGeometry } from 'three';
|
|
@@ -212,23 +214,31 @@ export declare class Bottle extends Group {
|
|
|
212
214
|
constructor();
|
|
213
215
|
}
|
|
214
216
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
private
|
|
221
|
-
|
|
222
|
-
constructor();
|
|
217
|
+
export declare class BubblingEffect extends InstancedMesh {
|
|
218
|
+
private bubblePositions;
|
|
219
|
+
private velocities;
|
|
220
|
+
private width;
|
|
221
|
+
private height;
|
|
222
|
+
private depth;
|
|
223
|
+
constructor(options?: BubblingEffectOptions);
|
|
223
224
|
/**
|
|
224
|
-
* Updates
|
|
225
|
-
* to the bottom if they reach the top.
|
|
225
|
+
* Updates the position of a specific bubble instance in the InstancedMesh.
|
|
226
226
|
*/
|
|
227
|
-
private
|
|
227
|
+
private updateInstanceMatrix;
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
229
|
+
* Updates bubble positions, moving them upward and resetting them
|
|
230
|
+
* to the bottom if they reach the top.
|
|
230
231
|
*/
|
|
231
|
-
|
|
232
|
+
update(): void;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export declare interface BubblingEffectOptions {
|
|
236
|
+
geometry?: BufferGeometry;
|
|
237
|
+
material?: Material;
|
|
238
|
+
count?: number;
|
|
239
|
+
height?: number;
|
|
240
|
+
width?: number;
|
|
241
|
+
depth?: number;
|
|
232
242
|
}
|
|
233
243
|
|
|
234
244
|
export declare class BunsenBurner extends Group {
|
|
@@ -614,6 +624,18 @@ export declare const Direction: {
|
|
|
614
624
|
*/
|
|
615
625
|
export declare const displacementBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, strength: number, direction?: Vector3, falloffFn?: (distance: number, radius: number) => number) => void;
|
|
616
626
|
|
|
627
|
+
/**
|
|
628
|
+
* Dolly backward
|
|
629
|
+
*
|
|
630
|
+
* Example:
|
|
631
|
+
* ```
|
|
632
|
+
* dollyAnimation(camera, 5, 3000, () => {
|
|
633
|
+
* console.log("Dolly animation complete");
|
|
634
|
+
* });
|
|
635
|
+
* ```
|
|
636
|
+
*/
|
|
637
|
+
export declare function dollyAnimation(camera: Camera, distance: number, duration: number, onComplete?: () => void): void;
|
|
638
|
+
|
|
617
639
|
/**
|
|
618
640
|
* Easing functions for interpolating values over time.
|
|
619
641
|
*/
|
|
@@ -653,6 +675,10 @@ export declare class ElectricPanel extends Group {
|
|
|
653
675
|
constructor();
|
|
654
676
|
}
|
|
655
677
|
|
|
678
|
+
export declare class EllipticLeafGeometry extends BufferGeometry {
|
|
679
|
+
constructor(size?: number);
|
|
680
|
+
}
|
|
681
|
+
|
|
656
682
|
export declare class ErlenmeyerFlask extends Mesh {
|
|
657
683
|
constructor({ flaskRadius, //
|
|
658
684
|
neckRadius, height, neckHeight, radialSegments, }?: {
|
|
@@ -733,6 +759,27 @@ export declare class Flask extends Group {
|
|
|
733
759
|
*/
|
|
734
760
|
export declare const flattenBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, targetHeight: number, strength: number, direction?: Vector3, falloffFn?: (distance: number, radius: number) => number) => void;
|
|
735
761
|
|
|
762
|
+
/**
|
|
763
|
+
* The camera flies through a sequence of points, ideal for showcasing specific elements in the scene.
|
|
764
|
+
*
|
|
765
|
+
* Example:
|
|
766
|
+
* ```
|
|
767
|
+
* flythroughAnimation(
|
|
768
|
+
* camera,
|
|
769
|
+
* [
|
|
770
|
+
* new THREE.Vector3(0, 5, 5),
|
|
771
|
+
* new THREE.Vector3(0, 5, -25.5),
|
|
772
|
+
* new THREE.Vector3(-20.5, 5, 0),
|
|
773
|
+
* ],
|
|
774
|
+
* 6000,
|
|
775
|
+
* () => {
|
|
776
|
+
* console.log("Flythrough animation complete");
|
|
777
|
+
* }
|
|
778
|
+
* );
|
|
779
|
+
* ```
|
|
780
|
+
*/
|
|
781
|
+
export declare function flythroughAnimation(camera: Camera, waypoints: Vector3[], duration: number, onComplete?: () => void): void;
|
|
782
|
+
|
|
736
783
|
export declare const gaussian: (t: number) => number;
|
|
737
784
|
|
|
738
785
|
export declare class Gear extends Mesh {
|
|
@@ -795,6 +842,25 @@ export declare class Lantern extends Group {
|
|
|
795
842
|
constructor(height?: number, baseWidth?: number);
|
|
796
843
|
}
|
|
797
844
|
|
|
845
|
+
export declare class LeafEffect extends InstancedMesh {
|
|
846
|
+
private dummyMatrix;
|
|
847
|
+
private velocities;
|
|
848
|
+
private width;
|
|
849
|
+
private height;
|
|
850
|
+
private depth;
|
|
851
|
+
constructor(options?: LeafEffectOptions);
|
|
852
|
+
update(): void;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export declare interface LeafEffectOptions {
|
|
856
|
+
geometry?: BufferGeometry;
|
|
857
|
+
material?: Material;
|
|
858
|
+
count?: number;
|
|
859
|
+
width?: number;
|
|
860
|
+
height?: number;
|
|
861
|
+
depth?: number;
|
|
862
|
+
}
|
|
863
|
+
|
|
798
864
|
export declare class LeverPanel extends Group {
|
|
799
865
|
constructor();
|
|
800
866
|
}
|
|
@@ -987,6 +1053,18 @@ declare interface ObeliskHeadstoneOptions {
|
|
|
987
1053
|
totalHeight?: number;
|
|
988
1054
|
}
|
|
989
1055
|
|
|
1056
|
+
/**
|
|
1057
|
+
* Orbit around a target
|
|
1058
|
+
*
|
|
1059
|
+
* Example:
|
|
1060
|
+
* ```
|
|
1061
|
+
* orbitAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 5000, () => {
|
|
1062
|
+
* console.log("Orbit animation complete");
|
|
1063
|
+
* });
|
|
1064
|
+
* ```
|
|
1065
|
+
*/
|
|
1066
|
+
export declare function orbitAnimation(camera: Camera, target: Vector3, radius: number, duration: number, onComplete?: () => void): void;
|
|
1067
|
+
|
|
990
1068
|
export declare const parabolicCurve: (t: number, a?: number, b?: number, c?: number) => number;
|
|
991
1069
|
|
|
992
1070
|
export declare const ParametricCurve: {
|
|
@@ -1010,6 +1088,18 @@ export declare const ParametricCurveUtils: {
|
|
|
1010
1088
|
createSigmoidCurvePoints: (start: Vector2, end: Vector2, a: number, segments?: number) => Vector2[];
|
|
1011
1089
|
};
|
|
1012
1090
|
|
|
1091
|
+
/**
|
|
1092
|
+
* The camera swings back and forth like a pendulum.
|
|
1093
|
+
*
|
|
1094
|
+
* Example:
|
|
1095
|
+
* ```
|
|
1096
|
+
* pendulumAnimation(camera, new THREE.Vector3(0, 5, 5), 0.5, 9000, 3, () => {
|
|
1097
|
+
* console.log("Pendulum animation complete");
|
|
1098
|
+
* });
|
|
1099
|
+
* ```
|
|
1100
|
+
*/
|
|
1101
|
+
export declare function pendulumAnimation(camera: Camera, center: Vector3, radius: number, duration: number, oscillations: number, onComplete?: () => void): void;
|
|
1102
|
+
|
|
1013
1103
|
export declare const quadraticCurve: (t: number, p0: number, p1: number, p2: number) => number;
|
|
1014
1104
|
|
|
1015
1105
|
export declare const quadraticEaseIn: (t: number) => number;
|
|
@@ -1110,10 +1200,6 @@ declare interface RowOfBooksOptions<T extends Material = Material> {
|
|
|
1110
1200
|
|
|
1111
1201
|
export declare const sigmoidCurve: (t: number, a?: number) => number;
|
|
1112
1202
|
|
|
1113
|
-
export declare class SimpleLeafGeometry extends BufferGeometry {
|
|
1114
|
-
constructor(size?: number);
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
1203
|
export declare const sineEaseIn: (t: number) => number;
|
|
1118
1204
|
|
|
1119
1205
|
export declare const sineEaseInOut: (t: number) => number;
|
|
@@ -1145,6 +1231,18 @@ export declare const sphericalToCartesian: (radius: number, theta: number, phi:
|
|
|
1145
1231
|
*/
|
|
1146
1232
|
export declare const spikeBrush: <T extends BufferGeometry>(geometry: T, position: Vector3, radius: number, strength: number, inward?: boolean, falloffFn?: (distance: number, radius: number) => number) => void;
|
|
1147
1233
|
|
|
1234
|
+
/**
|
|
1235
|
+
* The camera spirals upward, perfect for revealing a large scene or structure.
|
|
1236
|
+
*
|
|
1237
|
+
* Example:
|
|
1238
|
+
* ```
|
|
1239
|
+
* spiralAscensionAnimation(camera, new THREE.Vector3(0, 0, 0), 10, 300, 7, 12000, () => {
|
|
1240
|
+
* console.log("Spiral ascension animation complete");
|
|
1241
|
+
* });
|
|
1242
|
+
* ```
|
|
1243
|
+
*/
|
|
1244
|
+
export declare function spiralAscensionAnimation(camera: Camera, center: Vector3, radius: number, height: number, revolutions: number, duration: number, onComplete?: () => void): void;
|
|
1245
|
+
|
|
1148
1246
|
export declare class SpiralStaircaseGeometry extends BufferGeometry {
|
|
1149
1247
|
constructor(stepWidth?: number, stepDepth?: number, stepHeight?: number, numSteps?: number, radius?: number, angleIncrement?: number);
|
|
1150
1248
|
}
|
|
@@ -1296,6 +1394,18 @@ export declare class WineBottleGeometry extends BufferGeometry {
|
|
|
1296
1394
|
});
|
|
1297
1395
|
}
|
|
1298
1396
|
|
|
1397
|
+
/**
|
|
1398
|
+
* Add a slight random wobble for intensity or realism (e.g., during an explosion).
|
|
1399
|
+
*
|
|
1400
|
+
* Example:
|
|
1401
|
+
* ```
|
|
1402
|
+
* wobbleAnimation(camera, 0.5, 1000, () => {
|
|
1403
|
+
* console.log("Wobble animation complete");
|
|
1404
|
+
* });
|
|
1405
|
+
* ```
|
|
1406
|
+
*/
|
|
1407
|
+
export declare function wobbleAnimation(camera: Camera, intensity: number, duration: number, onComplete?: () => void): void;
|
|
1408
|
+
|
|
1299
1409
|
export declare class WroughtIronBar extends Mesh {
|
|
1300
1410
|
constructor({ barHeight, //
|
|
1301
1411
|
barRadius, spikeHeight, spikeRadius, spikeScaleZ, radialSegments, }?: {
|
|
@@ -1357,4 +1467,17 @@ export declare class WroughtIronFenceGeometry extends BufferGeometry {
|
|
|
1357
1467
|
});
|
|
1358
1468
|
}
|
|
1359
1469
|
|
|
1470
|
+
/**
|
|
1471
|
+
* The camera smoothly zooms in toward a target, focusing attention on a specific point,
|
|
1472
|
+
* and resets to its original FOV after completion.
|
|
1473
|
+
*
|
|
1474
|
+
* Example:
|
|
1475
|
+
* ```
|
|
1476
|
+
* zoomInAnimation(camera, new THREE.Vector3(0, 0, 0), 120, 75, 2000, () => {
|
|
1477
|
+
* console.log("Zoom in animation complete");
|
|
1478
|
+
* });
|
|
1479
|
+
* ```
|
|
1480
|
+
*/
|
|
1481
|
+
export declare function zoomInAnimation(camera: PerspectiveCamera, target: Vector3, startFov: number, endFov: number, duration: number, onComplete?: () => void): void;
|
|
1482
|
+
|
|
1360
1483
|
export { }
|