@types/three 0.157.1 → 0.158.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.
- three/README.md +1 -1
- three/examples/jsm/Addons.d.ts +290 -0
- three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
- three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
- three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
- three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
- three/examples/jsm/capabilities/WebGL.d.ts +9 -0
- three/examples/jsm/controls/OrbitControls.d.ts +304 -0
- three/examples/jsm/controls/TrackballControls.d.ts +58 -0
- three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
- three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
- three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
- three/examples/jsm/exporters/STLExporter.d.ts +21 -0
- three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
- three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
- three/examples/jsm/libs/fflate.module.d.ts +1 -0
- three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
- three/examples/jsm/libs/tween.module.d.ts +219 -0
- three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
- three/examples/jsm/lines/Line2.d.ts +11 -0
- three/examples/jsm/lines/LineGeometry.d.ts +10 -0
- three/examples/jsm/lines/LineMaterial.d.ts +31 -0
- three/examples/jsm/lines/LineSegments2.d.ts +14 -0
- three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
- three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
- three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
- three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
- three/examples/jsm/loaders/KTX2Loader.d.ts +17 -0
- three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
- three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
- three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
- three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
- three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
- three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
- three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
- three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
- three/examples/jsm/loaders/TGALoader.d.ts +7 -0
- three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
- three/examples/jsm/math/Capsule.d.ts +0 -1
- three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
- three/examples/jsm/nodes/Nodes.d.ts +149 -0
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
- three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
- three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
- three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
- three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
- three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
- three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
- three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
- three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
- three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
- three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
- three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
- three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
- three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
- three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
- three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
- three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
- three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
- three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
- three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
- three/examples/jsm/nodes/core/Node.d.ts +31 -0
- three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
- three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
- three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
- three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
- three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
- three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
- three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
- three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
- three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
- three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
- three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
- three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
- three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
- three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +78 -0
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
- three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
- three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
- three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
- three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
- three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
- three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
- three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
- three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
- three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
- three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
- three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
- three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
- three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
- three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
- three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
- three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
- three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
- three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
- three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
- three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
- three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
- three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
- three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
- three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
- three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
- three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
- three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
- three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
- three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
- three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
- three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
- three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
- three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
- three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
- three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
- three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
- three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
- three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
- three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/objects/Reflector.d.ts +29 -0
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
- three/examples/jsm/objects/Refractor.d.ts +2 -1
- three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
- three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
- three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
- three/examples/jsm/postprocessing/Pass.d.ts +31 -0
- three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
- three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
- three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
- three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
- three/examples/jsm/renderers/common/Backend.d.ts +15 -0
- three/examples/jsm/renderers/common/Info.d.ts +15 -0
- three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
- three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
- three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
- three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
- three/examples/jsm/shaders/BasicShader.d.ts +1 -0
- three/examples/jsm/shaders/BlendShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader.d.ts +1 -0
- three/examples/jsm/shaders/BokehShader2.d.ts +44 -0
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
- three/examples/jsm/shaders/FocusShader.d.ts +1 -0
- three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
- three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
- three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
- three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
- three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
- three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
- three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
- three/examples/jsm/shaders/OutputShader.d.ts +1 -0
- three/examples/jsm/shaders/SAOShader.d.ts +1 -0
- three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
- three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
- three/examples/jsm/shaders/SSRShader.d.ts +3 -0
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
- three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
- three/examples/jsm/shaders/VelocityShader.d.ts +14 -0
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
- three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
- three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
- three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
- three/examples/jsm/webxr/VRButton.d.ts +5 -0
- three/examples/jsm/webxr/XRButton.d.ts +6 -0
- three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
- three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
- three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
- three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
- three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
- three/package.json +3 -2
- three/src/cameras/CubeCamera.d.ts +1 -2
- three/src/constants.d.ts +21 -10
- three/src/core/Object3D.d.ts +4 -4
- three/src/core/Raycaster.d.ts +1 -0
- three/src/extras/Earcut.d.ts +15 -0
- three/src/extras/core/Curve.d.ts +1 -1
- three/src/geometries/CapsuleGeometry.d.ts +1 -1
- three/src/helpers/AxesHelper.d.ts +2 -2
- three/src/helpers/Box3Helper.d.ts +2 -2
- three/src/lights/Light.d.ts +1 -2
- three/src/materials/Material.d.ts +20 -2
- three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
- three/src/math/ColorManagement.d.ts +1 -1
- three/src/math/Matrix4.d.ts +2 -1
- three/src/objects/SkinnedMesh.d.ts +9 -8
- three/src/renderers/WebGLRenderer.d.ts +12 -2
- three/src/scenes/Scene.d.ts +2 -2
- three/src/textures/DepthTexture.d.ts +3 -3
- three/src/textures/Texture.d.ts +2 -2
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
type EasingFunction = (amount: number) => number;
|
|
2
|
+
interface EasingFunctionGroup {
|
|
3
|
+
In: EasingFunction;
|
|
4
|
+
Out: EasingFunction;
|
|
5
|
+
InOut: EasingFunction;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The Ease class provides a collection of easing functions for use with tween.js.
|
|
9
|
+
*/
|
|
10
|
+
declare const Easing: Readonly<{
|
|
11
|
+
Linear: Readonly<
|
|
12
|
+
EasingFunctionGroup & {
|
|
13
|
+
None: EasingFunction;
|
|
14
|
+
}
|
|
15
|
+
>;
|
|
16
|
+
Quadratic: Readonly<EasingFunctionGroup>;
|
|
17
|
+
Cubic: Readonly<EasingFunctionGroup>;
|
|
18
|
+
Quartic: Readonly<EasingFunctionGroup>;
|
|
19
|
+
Quintic: Readonly<EasingFunctionGroup>;
|
|
20
|
+
Sinusoidal: Readonly<EasingFunctionGroup>;
|
|
21
|
+
Exponential: Readonly<EasingFunctionGroup>;
|
|
22
|
+
Circular: Readonly<EasingFunctionGroup>;
|
|
23
|
+
Elastic: Readonly<EasingFunctionGroup>;
|
|
24
|
+
Back: Readonly<EasingFunctionGroup>;
|
|
25
|
+
Bounce: Readonly<EasingFunctionGroup>;
|
|
26
|
+
generatePow(power?: number): EasingFunctionGroup;
|
|
27
|
+
}>;
|
|
28
|
+
|
|
29
|
+
type InterpolationFunction = (v: number[], k: number) => number;
|
|
30
|
+
declare const Interpolation: {
|
|
31
|
+
Linear: (v: number[], k: number) => number;
|
|
32
|
+
Bezier: (v: number[], k: number) => number;
|
|
33
|
+
CatmullRom: (v: number[], k: number) => number;
|
|
34
|
+
Utils: {
|
|
35
|
+
Linear: (p0: number, p1: number, t: number) => number;
|
|
36
|
+
Bernstein: (n: number, i: number) => number;
|
|
37
|
+
Factorial: (n: number) => number;
|
|
38
|
+
CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Controlling groups of tweens
|
|
44
|
+
*
|
|
45
|
+
* Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.
|
|
46
|
+
* In these cases, you may want to create your own smaller groups of tween
|
|
47
|
+
*/
|
|
48
|
+
declare class Group {
|
|
49
|
+
private _tweens;
|
|
50
|
+
private _tweensAddedDuringUpdate;
|
|
51
|
+
getAll(): Array<Tween<UnknownProps>>;
|
|
52
|
+
removeAll(): void;
|
|
53
|
+
add(tween: Tween<UnknownProps>): void;
|
|
54
|
+
remove(tween: Tween<UnknownProps>): void;
|
|
55
|
+
update(time?: number, preserve?: boolean): boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Tween.js - Licensed under the MIT license
|
|
60
|
+
* https://github.com/tweenjs/tween.js
|
|
61
|
+
* ----------------------------------------------
|
|
62
|
+
*
|
|
63
|
+
* See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.
|
|
64
|
+
* Thank you all, you're awesome!
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
declare class Tween<T extends UnknownProps> {
|
|
68
|
+
private _object;
|
|
69
|
+
private _group;
|
|
70
|
+
private _isPaused;
|
|
71
|
+
private _pauseStart;
|
|
72
|
+
private _valuesStart;
|
|
73
|
+
private _valuesEnd;
|
|
74
|
+
private _valuesStartRepeat;
|
|
75
|
+
private _duration;
|
|
76
|
+
private _isDynamic;
|
|
77
|
+
private _initialRepeat;
|
|
78
|
+
private _repeat;
|
|
79
|
+
private _repeatDelayTime?;
|
|
80
|
+
private _yoyo;
|
|
81
|
+
private _isPlaying;
|
|
82
|
+
private _reversed;
|
|
83
|
+
private _delayTime;
|
|
84
|
+
private _startTime;
|
|
85
|
+
private _easingFunction;
|
|
86
|
+
private _interpolationFunction;
|
|
87
|
+
private _chainedTweens;
|
|
88
|
+
private _onStartCallback?;
|
|
89
|
+
private _onStartCallbackFired;
|
|
90
|
+
private _onEveryStartCallback?;
|
|
91
|
+
private _onEveryStartCallbackFired;
|
|
92
|
+
private _onUpdateCallback?;
|
|
93
|
+
private _onRepeatCallback?;
|
|
94
|
+
private _onCompleteCallback?;
|
|
95
|
+
private _onStopCallback?;
|
|
96
|
+
private _id;
|
|
97
|
+
private _isChainStopped;
|
|
98
|
+
private _propertiesAreSetUp;
|
|
99
|
+
constructor(_object: T, _group?: Group | false);
|
|
100
|
+
getId(): number;
|
|
101
|
+
isPlaying(): boolean;
|
|
102
|
+
isPaused(): boolean;
|
|
103
|
+
to(target: UnknownProps, duration?: number): this;
|
|
104
|
+
duration(duration?: number): this;
|
|
105
|
+
dynamic(dynamic?: boolean): this;
|
|
106
|
+
start(time?: number, overrideStartingValues?: boolean): this;
|
|
107
|
+
startFromCurrentValues(time?: number): this;
|
|
108
|
+
private _setupProperties;
|
|
109
|
+
stop(): this;
|
|
110
|
+
end(): this;
|
|
111
|
+
pause(time?: number): this;
|
|
112
|
+
resume(time?: number): this;
|
|
113
|
+
stopChainedTweens(): this;
|
|
114
|
+
group(group?: Group): this;
|
|
115
|
+
delay(amount?: number): this;
|
|
116
|
+
repeat(times?: number): this;
|
|
117
|
+
repeatDelay(amount?: number): this;
|
|
118
|
+
yoyo(yoyo?: boolean): this;
|
|
119
|
+
easing(easingFunction?: EasingFunction): this;
|
|
120
|
+
interpolation(interpolationFunction?: InterpolationFunction): this;
|
|
121
|
+
chain(...tweens: Array<Tween<any>>): this;
|
|
122
|
+
onStart(callback?: (object: T) => void): this;
|
|
123
|
+
onEveryStart(callback?: (object: T) => void): this;
|
|
124
|
+
onUpdate(callback?: (object: T, elapsed: number) => void): this;
|
|
125
|
+
onRepeat(callback?: (object: T) => void): this;
|
|
126
|
+
onComplete(callback?: (object: T) => void): this;
|
|
127
|
+
onStop(callback?: (object: T) => void): this;
|
|
128
|
+
private _goToEnd;
|
|
129
|
+
/**
|
|
130
|
+
* @returns true if the tween is still playing after the update, false
|
|
131
|
+
* otherwise (calling update on a paused tween still returns true because
|
|
132
|
+
* it is still playing, just paused).
|
|
133
|
+
*/
|
|
134
|
+
update(time?: number, autoStart?: boolean): boolean;
|
|
135
|
+
private _updateProperties;
|
|
136
|
+
private _handleRelativeValue;
|
|
137
|
+
private _swapEndStartRepeatValues;
|
|
138
|
+
}
|
|
139
|
+
type UnknownProps = Record<string, any>;
|
|
140
|
+
|
|
141
|
+
declare function now(): number;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Utils
|
|
145
|
+
*/
|
|
146
|
+
// tslint:disable-next-line:no-unnecessary-class
|
|
147
|
+
declare class Sequence {
|
|
148
|
+
private static _nextId;
|
|
149
|
+
static nextId(): number;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
declare const VERSION = '21.0.0';
|
|
153
|
+
|
|
154
|
+
declare const nextId: typeof Sequence.nextId;
|
|
155
|
+
declare function getAll(): Array<Tween<UnknownProps>>;
|
|
156
|
+
declare function removeAll(): void;
|
|
157
|
+
declare function add(tween: Tween<UnknownProps>): void;
|
|
158
|
+
declare function remove(tween: Tween<UnknownProps>): void;
|
|
159
|
+
declare function update(time?: number, preserve?: boolean): boolean;
|
|
160
|
+
|
|
161
|
+
declare const exports: {
|
|
162
|
+
Easing: Readonly<{
|
|
163
|
+
Linear: Readonly<
|
|
164
|
+
EasingFunctionGroup & {
|
|
165
|
+
None: EasingFunction;
|
|
166
|
+
}
|
|
167
|
+
>;
|
|
168
|
+
Quadratic: Readonly<EasingFunctionGroup>;
|
|
169
|
+
Cubic: Readonly<EasingFunctionGroup>;
|
|
170
|
+
Quartic: Readonly<EasingFunctionGroup>;
|
|
171
|
+
Quintic: Readonly<EasingFunctionGroup>;
|
|
172
|
+
Sinusoidal: Readonly<EasingFunctionGroup>;
|
|
173
|
+
Exponential: Readonly<EasingFunctionGroup>;
|
|
174
|
+
Circular: Readonly<EasingFunctionGroup>;
|
|
175
|
+
Elastic: Readonly<EasingFunctionGroup>;
|
|
176
|
+
Back: Readonly<EasingFunctionGroup>;
|
|
177
|
+
Bounce: Readonly<EasingFunctionGroup>;
|
|
178
|
+
generatePow(power?: number): EasingFunctionGroup;
|
|
179
|
+
}>;
|
|
180
|
+
Group: typeof Group;
|
|
181
|
+
Interpolation: {
|
|
182
|
+
Linear: (v: number[], k: number) => number;
|
|
183
|
+
Bezier: (v: number[], k: number) => number;
|
|
184
|
+
CatmullRom: (v: number[], k: number) => number;
|
|
185
|
+
Utils: {
|
|
186
|
+
Linear: (p0: number, p1: number, t: number) => number;
|
|
187
|
+
Bernstein: (n: number, i: number) => number;
|
|
188
|
+
Factorial: (n: number) => number;
|
|
189
|
+
CatmullRom: (p0: number, p1: number, p2: number, p3: number, t: number) => number;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
now: () => number;
|
|
193
|
+
Sequence: typeof Sequence;
|
|
194
|
+
nextId: typeof Sequence.nextId;
|
|
195
|
+
Tween: typeof Tween;
|
|
196
|
+
VERSION: string;
|
|
197
|
+
getAll: () => Array<Tween<UnknownProps>>;
|
|
198
|
+
removeAll: () => void;
|
|
199
|
+
add: (tween: Tween<UnknownProps>) => void;
|
|
200
|
+
remove: (tween: Tween<UnknownProps>) => void;
|
|
201
|
+
update: (time?: number, preserve?: boolean) => boolean;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export {
|
|
205
|
+
Easing,
|
|
206
|
+
Group,
|
|
207
|
+
Interpolation,
|
|
208
|
+
Sequence,
|
|
209
|
+
Tween,
|
|
210
|
+
VERSION,
|
|
211
|
+
add,
|
|
212
|
+
exports as default,
|
|
213
|
+
getAll,
|
|
214
|
+
nextId,
|
|
215
|
+
now,
|
|
216
|
+
remove,
|
|
217
|
+
removeAll,
|
|
218
|
+
update,
|
|
219
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LineGeometry } from './LineGeometry.js';
|
|
2
|
+
import { LineSegments2 } from './LineSegments2.js';
|
|
3
|
+
import { LineMaterial } from './LineMaterial.js';
|
|
4
|
+
|
|
5
|
+
export class Line2 extends LineSegments2 {
|
|
6
|
+
geometry: LineGeometry;
|
|
7
|
+
material: LineMaterial;
|
|
8
|
+
|
|
9
|
+
constructor(geometry?: LineGeometry, material?: LineMaterial);
|
|
10
|
+
readonly isLine2: true;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Line } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { LineSegmentsGeometry } from './LineSegmentsGeometry.js';
|
|
4
|
+
|
|
5
|
+
export class LineGeometry extends LineSegmentsGeometry {
|
|
6
|
+
constructor();
|
|
7
|
+
readonly isLineGeometry: true;
|
|
8
|
+
|
|
9
|
+
fromLine(line: Line): this;
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Color, MaterialParameters, ShaderMaterial, Vector2 } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface LineMaterialParameters extends MaterialParameters {
|
|
4
|
+
alphaToCoverage?: boolean | undefined;
|
|
5
|
+
color?: number | undefined;
|
|
6
|
+
dashed?: boolean | undefined;
|
|
7
|
+
dashScale?: number | undefined;
|
|
8
|
+
dashSize?: number | undefined;
|
|
9
|
+
dashOffset?: number | undefined;
|
|
10
|
+
gapSize?: number | undefined;
|
|
11
|
+
linewidth?: number | undefined;
|
|
12
|
+
resolution?: Vector2 | undefined;
|
|
13
|
+
wireframe?: boolean | undefined;
|
|
14
|
+
worldUnits?: boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class LineMaterial extends ShaderMaterial {
|
|
18
|
+
constructor(parameters?: LineMaterialParameters);
|
|
19
|
+
color: Color;
|
|
20
|
+
dashed: boolean;
|
|
21
|
+
dashScale: number;
|
|
22
|
+
dashSize: number;
|
|
23
|
+
dashOffset: number;
|
|
24
|
+
gapSize: number;
|
|
25
|
+
opacity: number;
|
|
26
|
+
readonly isLineMaterial: true;
|
|
27
|
+
linewidth: number;
|
|
28
|
+
resolution: Vector2;
|
|
29
|
+
alphaToCoverage: boolean;
|
|
30
|
+
worldUnits: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Mesh } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
import { LineMaterial } from './LineMaterial.js';
|
|
4
|
+
import { LineSegmentsGeometry } from './LineSegmentsGeometry.js';
|
|
5
|
+
|
|
6
|
+
export class LineSegments2 extends Mesh {
|
|
7
|
+
geometry: LineSegmentsGeometry;
|
|
8
|
+
material: LineMaterial;
|
|
9
|
+
|
|
10
|
+
constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial);
|
|
11
|
+
readonly isLineSegments2: true;
|
|
12
|
+
|
|
13
|
+
computeLineDistances(): this;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EdgesGeometry,
|
|
3
|
+
InstancedBufferGeometry,
|
|
4
|
+
LineSegments,
|
|
5
|
+
Matrix4,
|
|
6
|
+
Mesh,
|
|
7
|
+
WireframeGeometry,
|
|
8
|
+
} from '../../../src/Three.js';
|
|
9
|
+
|
|
10
|
+
export class LineSegmentsGeometry extends InstancedBufferGeometry {
|
|
11
|
+
constructor();
|
|
12
|
+
readonly isLineSegmentsGeometry: true;
|
|
13
|
+
|
|
14
|
+
applyMatrix4(matrix: Matrix4): this;
|
|
15
|
+
computeBoundingBox(): void;
|
|
16
|
+
computeBoundingSphere(): void;
|
|
17
|
+
fromEdgesGeometry(geometry: EdgesGeometry): this;
|
|
18
|
+
fromLineSegments(lineSegments: LineSegments): this;
|
|
19
|
+
fromMesh(mesh: Mesh): this;
|
|
20
|
+
fromWireframeGeometry(geometry: WireframeGeometry): this;
|
|
21
|
+
setColors(array: number[] | Float32Array): this;
|
|
22
|
+
setPositions(array: number[] | Float32Array): this;
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LoadingManager, CompressedTextureLoader, PixelFormat, CompressedPixelFormat } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface DDS {
|
|
4
|
+
mipmaps: object[];
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
format: PixelFormat | CompressedPixelFormat;
|
|
8
|
+
mipmapCount: number;
|
|
9
|
+
isCubemap: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class DDSLoader extends CompressedTextureLoader {
|
|
13
|
+
constructor(manager?: LoadingManager);
|
|
14
|
+
|
|
15
|
+
parse(buffer: ArrayBuffer, loadMipmaps: boolean): DDS;
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Loader, LoadingManager, BufferGeometry } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class DRACOLoader extends Loader<BufferGeometry> {
|
|
4
|
+
constructor(manager?: LoadingManager);
|
|
5
|
+
|
|
6
|
+
setDecoderPath(path: string): DRACOLoader;
|
|
7
|
+
setDecoderConfig(config: object): DRACOLoader;
|
|
8
|
+
setWorkerLimit(workerLimit: number): DRACOLoader;
|
|
9
|
+
|
|
10
|
+
load(
|
|
11
|
+
url: string,
|
|
12
|
+
onLoad?: (data: BufferGeometry) => void,
|
|
13
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
14
|
+
onError?: (err: unknown) => void,
|
|
15
|
+
): void;
|
|
16
|
+
|
|
17
|
+
preload(): DRACOLoader;
|
|
18
|
+
dispose(): DRACOLoader;
|
|
19
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AnimationClip,
|
|
3
|
+
BufferAttribute,
|
|
4
|
+
BufferGeometry,
|
|
5
|
+
Camera,
|
|
6
|
+
Group,
|
|
7
|
+
InterleavedBufferAttribute,
|
|
8
|
+
Loader,
|
|
9
|
+
LoadingManager,
|
|
10
|
+
Mesh,
|
|
11
|
+
MeshStandardMaterial,
|
|
12
|
+
Object3D,
|
|
13
|
+
Material,
|
|
14
|
+
SkinnedMesh,
|
|
15
|
+
Texture,
|
|
16
|
+
TextureLoader,
|
|
17
|
+
FileLoader,
|
|
18
|
+
ImageBitmapLoader,
|
|
19
|
+
Skeleton,
|
|
20
|
+
} from '../../../src/Three.js';
|
|
21
|
+
|
|
22
|
+
import { DRACOLoader } from './DRACOLoader.js';
|
|
23
|
+
import { KTX2Loader } from './KTX2Loader.js';
|
|
24
|
+
|
|
25
|
+
export interface GLTF {
|
|
26
|
+
animations: AnimationClip[];
|
|
27
|
+
scene: Group;
|
|
28
|
+
scenes: Group[];
|
|
29
|
+
cameras: Camera[];
|
|
30
|
+
asset: {
|
|
31
|
+
copyright?: string | undefined;
|
|
32
|
+
generator?: string | undefined;
|
|
33
|
+
version?: string | undefined;
|
|
34
|
+
minVersion?: string | undefined;
|
|
35
|
+
extensions?: any;
|
|
36
|
+
extras?: any;
|
|
37
|
+
};
|
|
38
|
+
parser: GLTFParser;
|
|
39
|
+
userData: any;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class GLTFLoader extends Loader<GLTF> {
|
|
43
|
+
constructor(manager?: LoadingManager);
|
|
44
|
+
dracoLoader: DRACOLoader | null;
|
|
45
|
+
|
|
46
|
+
setDRACOLoader(dracoLoader: DRACOLoader): GLTFLoader;
|
|
47
|
+
|
|
48
|
+
register(callback: (parser: GLTFParser) => GLTFLoaderPlugin): GLTFLoader;
|
|
49
|
+
unregister(callback: (parser: GLTFParser) => GLTFLoaderPlugin): GLTFLoader;
|
|
50
|
+
|
|
51
|
+
setKTX2Loader(ktx2Loader: KTX2Loader): GLTFLoader;
|
|
52
|
+
setMeshoptDecoder(meshoptDecoder: /* MeshoptDecoder */ any): GLTFLoader;
|
|
53
|
+
|
|
54
|
+
parse(
|
|
55
|
+
data: ArrayBuffer | string,
|
|
56
|
+
path: string,
|
|
57
|
+
onLoad: (gltf: GLTF) => void,
|
|
58
|
+
onError?: (event: ErrorEvent) => void,
|
|
59
|
+
): void;
|
|
60
|
+
|
|
61
|
+
parseAsync(data: ArrayBuffer | string, path: string): Promise<GLTF>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type GLTFReferenceType = 'materials' | 'nodes' | 'textures' | 'meshes';
|
|
65
|
+
|
|
66
|
+
export interface GLTFReference {
|
|
67
|
+
materials?: number;
|
|
68
|
+
nodes?: number;
|
|
69
|
+
textures?: number;
|
|
70
|
+
meshes?: number;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export class GLTFParser {
|
|
74
|
+
json: any;
|
|
75
|
+
|
|
76
|
+
options: {
|
|
77
|
+
path: string;
|
|
78
|
+
manager: LoadingManager;
|
|
79
|
+
ktx2Loader: KTX2Loader;
|
|
80
|
+
meshoptDecoder: /* MeshoptDecoder */ any;
|
|
81
|
+
crossOrigin: string;
|
|
82
|
+
requestHeader: { [header: string]: string };
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
fileLoader: FileLoader;
|
|
86
|
+
textureLoader: TextureLoader | ImageBitmapLoader;
|
|
87
|
+
plugins: { [name: string]: GLTFLoaderPlugin };
|
|
88
|
+
extensions: { [name: string]: any };
|
|
89
|
+
associations: Map<Object3D | Material | Texture, GLTFReference>;
|
|
90
|
+
|
|
91
|
+
setExtensions(extensions: { [name: string]: any }): void;
|
|
92
|
+
setPlugins(plugins: { [name: string]: GLTFLoaderPlugin }): void;
|
|
93
|
+
|
|
94
|
+
parse(onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void): void;
|
|
95
|
+
|
|
96
|
+
getDependency: (type: string, index: number) => Promise<any>;
|
|
97
|
+
getDependencies: (type: string) => Promise<any[]>;
|
|
98
|
+
loadBuffer: (bufferIndex: number) => Promise<ArrayBuffer>;
|
|
99
|
+
loadBufferView: (bufferViewIndex: number) => Promise<ArrayBuffer>;
|
|
100
|
+
loadAccessor: (accessorIndex: number) => Promise<BufferAttribute | InterleavedBufferAttribute>;
|
|
101
|
+
loadTexture: (textureIndex: number) => Promise<Texture>;
|
|
102
|
+
loadTextureImage: (textureIndex: number, sourceIndex: number, loader: Loader) => Promise<Texture>;
|
|
103
|
+
loadImageSource: (sourceIndex: number, loader: Loader) => Promise<Texture>;
|
|
104
|
+
assignTexture: (
|
|
105
|
+
materialParams: { [key: string]: any },
|
|
106
|
+
mapName: string,
|
|
107
|
+
mapDef: {
|
|
108
|
+
index: number;
|
|
109
|
+
texCoord?: number | undefined;
|
|
110
|
+
extensions?: any;
|
|
111
|
+
},
|
|
112
|
+
) => Promise<void>;
|
|
113
|
+
assignFinalMaterial: (object: Mesh) => void;
|
|
114
|
+
getMaterialType: () => typeof MeshStandardMaterial;
|
|
115
|
+
loadMaterial: (materialIndex: number) => Promise<Material>;
|
|
116
|
+
createUniqueName: (originalName: string) => string;
|
|
117
|
+
createNodeMesh: (nodeIndex: number) => Promise<Group | Mesh | SkinnedMesh>;
|
|
118
|
+
loadGeometries: (
|
|
119
|
+
/**
|
|
120
|
+
* GLTF.Primitive[]
|
|
121
|
+
* See: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/mesh.primitive.schema.json
|
|
122
|
+
*/
|
|
123
|
+
primitives: Array<{ [key: string]: any }>,
|
|
124
|
+
) => Promise<BufferGeometry[]>;
|
|
125
|
+
loadMesh: (meshIndex: number) => Promise<Group | Mesh | SkinnedMesh>;
|
|
126
|
+
loadCamera: (cameraIndex: number) => Promise<Camera>;
|
|
127
|
+
loadSkin: (skinIndex: number) => Promise<Skeleton>;
|
|
128
|
+
loadAnimation: (animationIndex: number) => Promise<AnimationClip>;
|
|
129
|
+
loadNode: (nodeIndex: number) => Promise<Object3D>;
|
|
130
|
+
loadScene: () => Promise<Group>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface GLTFLoaderPlugin {
|
|
134
|
+
beforeRoot?: (() => Promise<void> | null) | undefined;
|
|
135
|
+
afterRoot?: ((result: GLTF) => Promise<void> | null) | undefined;
|
|
136
|
+
loadNode?: ((nodeIndex: number) => Promise<Object3D> | null) | undefined;
|
|
137
|
+
loadMesh?: ((meshIndex: number) => Promise<Group | Mesh | SkinnedMesh> | null) | undefined;
|
|
138
|
+
loadBufferView?: ((bufferViewIndex: number) => Promise<ArrayBuffer> | null) | undefined;
|
|
139
|
+
loadMaterial?: ((materialIndex: number) => Promise<Material> | null) | undefined;
|
|
140
|
+
loadTexture?: ((textureIndex: number) => Promise<Texture> | null) | undefined;
|
|
141
|
+
getMaterialType?: ((materialIndex: number) => typeof Material | null) | undefined;
|
|
142
|
+
extendMaterialParams?:
|
|
143
|
+
| ((materialIndex: number, materialParams: { [key: string]: any }) => Promise<any> | null)
|
|
144
|
+
| undefined;
|
|
145
|
+
createNodeMesh?: ((nodeIndex: number) => Promise<Group | Mesh | SkinnedMesh> | null) | undefined;
|
|
146
|
+
createNodeAttachment?: ((nodeIndex: number) => Promise<Object3D> | null) | undefined;
|
|
147
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LoadingManager, CompressedTextureLoader, CompressedTexture, WebGLRenderer } from '../../../src/Three.js';
|
|
2
|
+
import WebGPURenderer from '../renderers/webgpu/WebGPURenderer.js';
|
|
3
|
+
|
|
4
|
+
export class KTX2Loader extends CompressedTextureLoader {
|
|
5
|
+
constructor(manager?: LoadingManager);
|
|
6
|
+
|
|
7
|
+
setTranscoderPath(path: string): KTX2Loader;
|
|
8
|
+
setWorkerLimit(limit: number): KTX2Loader;
|
|
9
|
+
detectSupport(renderer: WebGLRenderer | WebGPURenderer): KTX2Loader;
|
|
10
|
+
dispose(): KTX2Loader;
|
|
11
|
+
|
|
12
|
+
parse(
|
|
13
|
+
buffer: ArrayBuffer,
|
|
14
|
+
onLoad: (texture: CompressedTexture) => void,
|
|
15
|
+
onError?: (event: ErrorEvent) => void,
|
|
16
|
+
): KTX2Loader;
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Loader, LoadingManager, Group, Material } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export class LDrawLoader extends Loader<Group> {
|
|
4
|
+
materials: Material[];
|
|
5
|
+
materialsLibrary: Record<string, Material>;
|
|
6
|
+
fileMap: Record<string, string>;
|
|
7
|
+
smoothNormals: boolean;
|
|
8
|
+
|
|
9
|
+
constructor(manager?: LoadingManager);
|
|
10
|
+
|
|
11
|
+
preloadMaterials(url: string): Promise<void>;
|
|
12
|
+
setFileMap(fileMap: Record<string, string>): void;
|
|
13
|
+
setMaterials(materials: Material[]): void;
|
|
14
|
+
|
|
15
|
+
parse(text: string, path: string, onLoad: (data: Group) => void): void;
|
|
16
|
+
|
|
17
|
+
addMaterial(material: Material): void;
|
|
18
|
+
getMaterial(colourCode: string): Material | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Camera, AnimationClip, FileLoader, Loader, LoadingManager, SkinnedMesh } from '../../../src/Three.js';
|
|
2
|
+
|
|
3
|
+
export interface MMDLoaderAnimationObject {
|
|
4
|
+
animation: AnimationClip;
|
|
5
|
+
mesh: SkinnedMesh;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class MMDLoader extends Loader<SkinnedMesh> {
|
|
9
|
+
constructor(manager?: LoadingManager);
|
|
10
|
+
animationBuilder: object;
|
|
11
|
+
animationPath: string;
|
|
12
|
+
loader: FileLoader;
|
|
13
|
+
meshBuilder: object;
|
|
14
|
+
parser: object | null;
|
|
15
|
+
|
|
16
|
+
loadAnimation(
|
|
17
|
+
url: string,
|
|
18
|
+
object: SkinnedMesh | Camera,
|
|
19
|
+
onLoad: (object: SkinnedMesh | AnimationClip) => void,
|
|
20
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
21
|
+
onError?: (event: ErrorEvent) => void,
|
|
22
|
+
): void;
|
|
23
|
+
loadPMD(
|
|
24
|
+
url: string,
|
|
25
|
+
onLoad: (object: object) => void,
|
|
26
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
27
|
+
onError?: (event: ErrorEvent) => void,
|
|
28
|
+
): void;
|
|
29
|
+
loadPMX(
|
|
30
|
+
url: string,
|
|
31
|
+
onLoad: (object: object) => void,
|
|
32
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
33
|
+
onError?: (event: ErrorEvent) => void,
|
|
34
|
+
): void;
|
|
35
|
+
loadVMD(
|
|
36
|
+
url: string,
|
|
37
|
+
onLoad: (object: object) => void,
|
|
38
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
39
|
+
onError?: (event: ErrorEvent) => void,
|
|
40
|
+
): void;
|
|
41
|
+
loadVPD(
|
|
42
|
+
url: string,
|
|
43
|
+
isUnicode: boolean,
|
|
44
|
+
onLoad: (object: object) => void,
|
|
45
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
46
|
+
onError?: (event: ErrorEvent) => void,
|
|
47
|
+
): void;
|
|
48
|
+
loadWithAnimation(
|
|
49
|
+
url: string,
|
|
50
|
+
vmdUrl: string | string[],
|
|
51
|
+
onLoad: (object: MMDLoaderAnimationObject) => void,
|
|
52
|
+
onProgress?: (event: ProgressEvent) => void,
|
|
53
|
+
onError?: (event: ErrorEvent) => void,
|
|
54
|
+
): void;
|
|
55
|
+
setAnimationPath(animationPath: string): this;
|
|
56
|
+
}
|