rhodonite 0.4.2 → 0.5.2
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/VERSION-FILE +2 -2
- package/dist/esm/effekseer/EffekseerComponent.d.ts +52 -45
- package/dist/esm/effekseer/main.d.ts +6 -6
- package/dist/esm/foundation/cameras/AbstractCameraController.d.ts +14 -14
- package/dist/esm/foundation/cameras/ICameraController.d.ts +9 -9
- package/dist/esm/foundation/cameras/OrbitCameraController.d.ts +128 -123
- package/dist/esm/foundation/cameras/WalkThroughCameraController.d.ts +75 -75
- package/dist/esm/foundation/components/AnimationComponent.d.ts +81 -94
- package/dist/esm/foundation/components/BlendShapeComponent.d.ts +14 -14
- package/dist/esm/foundation/components/CameraComponent.d.ts +116 -116
- package/dist/esm/foundation/components/CameraControllerComponent.d.ts +16 -16
- package/dist/esm/foundation/components/LightComponent.d.ts +28 -28
- package/dist/esm/foundation/components/MeshComponent.d.ts +50 -50
- package/dist/esm/foundation/components/MeshRendererComponent.d.ts +57 -57
- package/dist/esm/foundation/components/PhysicsComponent.d.ts +12 -12
- package/dist/esm/foundation/components/SceneGraphComponent.d.ts +114 -81
- package/dist/esm/foundation/components/SkeletalComponent.d.ts +50 -50
- package/dist/esm/foundation/components/TransformComponent.d.ts +91 -91
- package/dist/esm/foundation/components/WellKnownComponentTIDs.d.ts +16 -16
- package/dist/esm/foundation/core/Component.d.ts +216 -216
- package/dist/esm/foundation/core/ComponentRepository.d.ts +59 -59
- package/dist/esm/foundation/core/Config.d.ts +20 -19
- package/dist/esm/foundation/core/Entity.d.ts +84 -84
- package/dist/esm/foundation/core/EntityRepository.d.ts +62 -62
- package/dist/esm/foundation/core/GlobalDataRepository.d.ts +32 -31
- package/dist/esm/foundation/core/MemoryManager.d.ts +29 -29
- package/dist/esm/foundation/core/RnObject.d.ts +96 -96
- package/dist/esm/foundation/definitions/AlphaMode.d.ts +15 -15
- package/dist/esm/foundation/definitions/AnimationAttribute.d.ts +13 -13
- package/dist/esm/foundation/definitions/AnimationInterpolation.d.ts +12 -12
- package/dist/esm/foundation/definitions/BasisCompressionType.d.ts +26 -26
- package/dist/esm/foundation/definitions/BoneDataType.d.ts +13 -13
- package/dist/esm/foundation/definitions/BufferUse.d.ts +13 -13
- package/dist/esm/foundation/definitions/CameraControllerType.d.ts +11 -11
- package/dist/esm/foundation/definitions/CameraType.d.ts +12 -12
- package/dist/esm/foundation/definitions/ComponentType.d.ts +32 -32
- package/dist/esm/foundation/definitions/CompositionType.d.ts +39 -38
- package/dist/esm/foundation/definitions/CompressionTextureType.d.ts +48 -48
- package/dist/esm/foundation/definitions/FileType.d.ts +17 -17
- package/dist/esm/foundation/definitions/GpuState.d.ts +10 -10
- package/dist/esm/foundation/definitions/HdriFormat.d.ts +10 -10
- package/dist/esm/foundation/definitions/LightType.d.ts +13 -13
- package/dist/esm/foundation/definitions/PixelFormat.d.ts +10 -10
- package/dist/esm/foundation/definitions/PrimitiveMode.d.ts +15 -15
- package/dist/esm/foundation/definitions/ProcessApproach.d.ts +19 -19
- package/dist/esm/foundation/definitions/ProcessStage.d.ts +18 -18
- package/dist/esm/foundation/definitions/RenderBufferTarget.d.ts +27 -27
- package/dist/esm/foundation/definitions/ShaderNode.d.ts +11 -11
- package/dist/esm/foundation/definitions/ShaderSemantics.d.ts +119 -119
- package/dist/esm/foundation/definitions/ShaderType.d.ts +13 -13
- package/dist/esm/foundation/definitions/ShaderVariableType.d.ts +11 -11
- package/dist/esm/foundation/definitions/ShaderVariableUpdateInterval.d.ts +12 -12
- package/dist/esm/foundation/definitions/ShadingModel.d.ts +12 -12
- package/dist/esm/foundation/definitions/ShadowMap.d.ts +11 -11
- package/dist/esm/foundation/definitions/TextureParameter.d.ts +37 -37
- package/dist/esm/foundation/definitions/VertexAttribute.d.ts +38 -38
- package/dist/esm/foundation/definitions/visibility.d.ts +12 -12
- package/dist/esm/foundation/enhanced_js_objects/Array.d.ts +15 -15
- package/dist/esm/foundation/exporter/Gltf2Exporter.d.ts +27 -22
- package/dist/esm/foundation/geometry/Frustum.d.ts +37 -37
- package/dist/esm/foundation/geometry/Mesh.d.ts +148 -124
- package/dist/esm/foundation/geometry/Plane.d.ts +30 -26
- package/dist/esm/foundation/geometry/Primitive.d.ts +78 -78
- package/dist/esm/foundation/geometry/Sphere.d.ts +12 -12
- package/dist/esm/foundation/gizmos/AABBGizmo.d.ts +29 -10
- package/dist/esm/foundation/gizmos/Gizmo.d.ts +39 -16
- package/dist/esm/foundation/gizmos/LocatorGizmo.d.ts +28 -0
- package/dist/esm/foundation/helpers/EntityHelper.d.ts +11 -11
- package/dist/esm/foundation/helpers/MaterialHelper.d.ts +173 -167
- package/dist/esm/foundation/helpers/MeshHelper.d.ts +4 -4
- package/dist/esm/foundation/helpers/RenderableHelper.d.ts +18 -18
- package/dist/esm/foundation/importer/AnimationAssigner.d.ts +16 -16
- package/dist/esm/foundation/importer/DrcPointCloudImporter.d.ts +69 -69
- package/dist/esm/foundation/importer/FormatDetector.d.ts +5 -5
- package/dist/esm/foundation/importer/Gltf1Importer.d.ts +45 -45
- package/dist/esm/foundation/importer/Gltf2Importer.d.ts +46 -46
- package/dist/esm/foundation/importer/GltfImporter.d.ts +57 -57
- package/dist/esm/foundation/importer/ILoaderExtension.d.ts +11 -11
- package/dist/esm/foundation/importer/ModelConverter.d.ts +78 -78
- package/dist/esm/foundation/importer/RhodoniteImportExtension.d.ts +9 -9
- package/dist/esm/foundation/importer/VRMImporter.d.ts +15 -15
- package/dist/esm/foundation/materials/core/AbstractMaterialNode.d.ts +124 -124
- package/dist/esm/foundation/materials/core/AbstractShaderNode.d.ts +33 -33
- package/dist/esm/foundation/materials/core/Material.d.ts +181 -149
- package/dist/esm/foundation/materials/core/ShaderGraphResolver.d.ts +16 -16
- package/dist/esm/foundation/materials/core/ShaderityUtility.d.ts +30 -32
- package/dist/esm/foundation/materials/nodes/AddShaderNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/AttributeNormalShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/AttributePositionShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/BlockBeginShaderNode.d.ts +9 -9
- package/dist/esm/foundation/materials/nodes/BlockEndShaderNode.d.ts +7 -7
- package/dist/esm/foundation/materials/nodes/ConstantVariableShaderNode.d.ts +7 -7
- package/dist/esm/foundation/materials/nodes/DotProductShaderNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/GreaterShaderNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/IfStatementShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/MultiplyShaderNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/NormalMatrixShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/NormalizeShaderNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/OutColorShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/OutPositionShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/ProjectionMatrixShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/ScalarToVector4ShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/TextureFetchMaterialNode.d.ts +6 -6
- package/dist/esm/foundation/materials/nodes/UniformDataShaderNode.d.ts +8 -8
- package/dist/esm/foundation/materials/nodes/VaryingInVariableShaderNode.d.ts +7 -7
- package/dist/esm/foundation/materials/nodes/VaryingOutVariableShaderNode.d.ts +7 -7
- package/dist/esm/foundation/materials/nodes/Vector3AndScalarToVector4ShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/ViewMatrixShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/WireframeMaterialNode.d.ts +4 -4
- package/dist/esm/foundation/materials/nodes/WorldMatrixShaderNode.d.ts +4 -4
- package/dist/esm/foundation/materials/singles/ClassicShadingSingleMaterialNode.d.ts +16 -16
- package/dist/esm/foundation/materials/singles/ColorGradingUsingLUTsSingleMaterialNode.d.ts +16 -16
- package/dist/esm/foundation/materials/singles/CustomSingleMaterialNode.d.ts +30 -31
- package/dist/esm/foundation/materials/singles/DepthEncodeSingleMaterialNode.d.ts +20 -20
- package/dist/esm/foundation/materials/singles/DetectHighLuminanceSingleMaterialNode.d.ts +16 -16
- package/dist/esm/foundation/materials/singles/EntityUIDOutputSingleMaterialNode.d.ts +11 -11
- package/dist/esm/foundation/materials/singles/EnvConstantSingleMaterialNode.d.ts +14 -14
- package/dist/esm/foundation/materials/singles/FXAA3QualitySingleMaterialNode.d.ts +11 -11
- package/dist/esm/foundation/materials/singles/FurnaceTestSingleMaterialNode.d.ts +17 -17
- package/dist/esm/foundation/materials/singles/GammaCorrectionSingleMaterialNode.d.ts +11 -11
- package/dist/esm/foundation/materials/singles/GaussianBlurForEncodedDepthSingleMaterialNode.d.ts +27 -27
- package/dist/esm/foundation/materials/singles/GaussianBlurSingleMaterialNode.d.ts +27 -27
- package/dist/esm/foundation/materials/singles/MToonSingleMaterialNode.d.ts +52 -52
- package/dist/esm/foundation/materials/singles/MatCapSingleMaterialNode.d.ts +14 -14
- package/dist/esm/foundation/materials/singles/PbrExtendedShadingSingleMaterialNode.d.ts +29 -29
- package/dist/esm/foundation/materials/singles/PbrShadingSingleMaterialNode.d.ts +36 -36
- package/dist/esm/foundation/materials/singles/ShaderitySingleMaterialNode.d.ts +17 -0
- package/dist/esm/foundation/materials/singles/ShadowMapDecodeClassicSingleMaterialNode.d.ts +41 -41
- package/dist/esm/foundation/materials/singles/SkinPbrShadingSingleMaterialNode.d.ts +26 -26
- package/dist/esm/foundation/materials/singles/SynthesizeHDRSingleMaterialNode.d.ts +39 -39
- package/dist/esm/foundation/materials/singles/VarianceShadowMapDecodeClassicSingleMaterialNode.d.ts +52 -52
- package/dist/esm/foundation/math/AABB.d.ts +34 -34
- package/dist/esm/foundation/math/AbstractMathNumber.d.ts +6 -6
- package/dist/esm/foundation/math/AbstractMatrix.d.ts +14 -14
- package/dist/esm/foundation/math/AbstractQuaternion.d.ts +25 -25
- package/dist/esm/foundation/math/AbstractVector.d.ts +21 -21
- package/dist/esm/foundation/math/ColorRgb.d.ts +26 -27
- package/dist/esm/foundation/math/ColorRgba.d.ts +25 -25
- package/dist/esm/foundation/math/IColor.d.ts +64 -64
- package/dist/esm/foundation/math/IMathNumber.d.ts +3 -3
- package/dist/esm/foundation/math/IMatrix.d.ts +226 -226
- package/dist/esm/foundation/math/IQuaternion.d.ts +64 -64
- package/dist/esm/foundation/math/IVector.d.ts +209 -209
- package/dist/esm/foundation/math/IdentityMatrix33.d.ts +40 -40
- package/dist/esm/foundation/math/IdentityMatrix44.d.ts +45 -45
- package/dist/esm/foundation/math/ImageUtil.d.ts +19 -19
- package/dist/esm/foundation/math/LogQuaternion.d.ts +12 -12
- package/dist/esm/foundation/math/MathClassUtil.d.ts +37 -37
- package/dist/esm/foundation/math/MathUtil.d.ts +55 -55
- package/dist/esm/foundation/math/Matrix22.d.ts +69 -69
- package/dist/esm/foundation/math/Matrix33.d.ts +86 -86
- package/dist/esm/foundation/math/Matrix44.d.ts +122 -122
- package/dist/esm/foundation/math/MutableColorRgb.d.ts +32 -33
- package/dist/esm/foundation/math/MutableColorRgba.d.ts +33 -33
- package/dist/esm/foundation/math/MutableMatrix22.d.ts +80 -80
- package/dist/esm/foundation/math/MutableMatrix33.d.ts +110 -110
- package/dist/esm/foundation/math/MutableMatrix44.d.ts +149 -149
- package/dist/esm/foundation/math/MutableQuaternion.d.ts +48 -48
- package/dist/esm/foundation/math/MutableScalar.d.ts +34 -34
- package/dist/esm/foundation/math/MutableVector2.d.ts +80 -75
- package/dist/esm/foundation/math/MutableVector3.d.ts +98 -94
- package/dist/esm/foundation/math/MutableVector4.d.ts +87 -85
- package/dist/esm/foundation/math/Quaternion.d.ts +53 -51
- package/dist/esm/foundation/math/Scalar.d.ts +40 -36
- package/dist/esm/foundation/math/Vector2.d.ts +140 -126
- package/dist/esm/foundation/math/Vector3.d.ts +166 -150
- package/dist/esm/foundation/math/Vector4.d.ts +146 -146
- package/dist/esm/foundation/math/VectorN.d.ts +5 -5
- package/dist/esm/foundation/math/raw/raw_extension.d.ts +59 -23
- package/dist/esm/foundation/memory/Accessor.d.ts +182 -182
- package/dist/esm/foundation/memory/Buffer.d.ts +37 -37
- package/dist/esm/foundation/memory/BufferView.d.ts +60 -60
- package/dist/esm/foundation/misc/Cache.d.ts +19 -0
- package/dist/esm/foundation/misc/DataUtil.d.ts +42 -38
- package/dist/esm/foundation/misc/EnumIO.d.ts +33 -33
- package/dist/esm/foundation/misc/Is.d.ts +26 -26
- package/dist/esm/foundation/misc/ManualCache.d.ts +30 -0
- package/dist/esm/foundation/misc/MiscUtil.d.ts +37 -30
- package/dist/esm/foundation/misc/Option.d.ts +72 -72
- package/dist/esm/foundation/misc/Result.d.ts +40 -40
- package/dist/esm/foundation/misc/RnPromise.d.ts +27 -27
- package/dist/esm/foundation/misc/Time.d.ts +16 -16
- package/dist/esm/foundation/physics/PhysicsStrategy.d.ts +2 -2
- package/dist/esm/foundation/physics/SphereCollider.d.ts +5 -5
- package/dist/esm/foundation/physics/VRMColliderGroup.d.ts +6 -6
- package/dist/esm/foundation/physics/VRMSpringBoneGroup.d.ts +14 -14
- package/dist/esm/foundation/physics/VRMSpringBonePhysicsStrategy.d.ts +39 -39
- package/dist/esm/foundation/renderer/CGAPIResourceRepository.d.ts +5 -5
- package/dist/esm/foundation/renderer/Expression.d.ts +21 -21
- package/dist/esm/foundation/renderer/FrameBuffer.d.ts +32 -32
- package/dist/esm/foundation/renderer/RenderPass.d.ts +113 -115
- package/dist/esm/foundation/system/EventPubSub.d.ts +19 -19
- package/dist/esm/foundation/system/ModuleManager.d.ts +10 -10
- package/dist/esm/foundation/system/System.d.ts +23 -23
- package/dist/esm/foundation/system/SystemState.d.ts +4 -4
- package/dist/esm/foundation/textures/AbstractTexture.d.ts +60 -60
- package/dist/esm/foundation/textures/CubeTexture.d.ts +33 -33
- package/dist/esm/foundation/textures/IRenderable.d.ts +10 -10
- package/dist/esm/foundation/textures/RenderBuffer.d.ts +23 -23
- package/dist/esm/foundation/textures/RenderTargetTexture.d.ts +39 -39
- package/dist/esm/foundation/textures/Texture.d.ts +90 -90
- package/dist/esm/foundation/textures/TextureDataFloat.d.ts +20 -18
- package/dist/esm/foundation/textures/VideoTexture.d.ts +63 -63
- package/dist/esm/index.d.ts +927 -917
- package/dist/esm/index.js +44596 -41597
- package/dist/esm/pbr/main.d.ts +5 -5
- package/dist/esm/sparkgear/SparkGearComponent.d.ts +54 -54
- package/dist/esm/sparkgear/main.d.ts +6 -6
- package/dist/esm/types/BasisTexture.d.ts +23 -23
- package/dist/esm/types/CommonTypes.d.ts +33 -29
- package/dist/esm/types/KTX2Texture.d.ts +67 -67
- package/dist/esm/types/RnM2.d.ts +329 -329
- package/dist/esm/types/TypeConverter.d.ts +1 -1
- package/dist/esm/types/TypeGenerators.d.ts +4 -4
- package/dist/esm/types/VRM.d.ts +160 -160
- package/dist/esm/types/glTF.d.ts +387 -385
- package/dist/esm/types/glTF1.d.ts +88 -88
- package/dist/esm/types/glTF2.d.ts +391 -338
- package/dist/esm/webgl/WebGLContextWrapper.d.ts +99 -99
- package/dist/esm/webgl/WebGLExtendedTypes.d.ts +14 -9
- package/dist/esm/webgl/WebGLExtension.d.ts +24 -24
- package/dist/esm/webgl/WebGLResourceRepository.d.ts +351 -221
- package/dist/esm/webgl/WebGLStrategy.d.ts +27 -22
- package/dist/esm/webgl/WebGLStrategyCommonMethod.d.ts +54 -30
- package/dist/esm/webgl/WebGLStrategyFastest.d.ts +54 -51
- package/dist/esm/webgl/WebGLStrategyUniform.d.ts +44 -40
- package/dist/esm/webgl/getRenderingStrategy.d.ts +4 -4
- package/dist/esm/webgl/main.d.ts +17 -17
- package/dist/esm/webgl/shaders/GLSLShader.d.ts +48 -48
- package/dist/esm/webgl/shaders/nodes/BlockBeginShader.d.ts +16 -16
- package/dist/esm/webgl/shaders/nodes/BlockEndShader.d.ts +16 -16
- package/dist/esm/webgl/shaders/nodes/ClassicShadingShader.d.ts +17 -17
- package/dist/esm/webgl/shaders/nodes/ConstantVariableShader.d.ts +18 -18
- package/dist/esm/webgl/shaders/nodes/EndShader.d.ts +17 -17
- package/dist/esm/webgl/shaders/nodes/IfStatementShader.d.ts +12 -12
- package/dist/esm/webgl/shaders/nodes/TextureFetchShader.d.ts +18 -18
- package/dist/esm/webgl/shaders/nodes/UniformDataShader.d.ts +20 -20
- package/dist/esm/webgl/shaders/nodes/VaryingVariableShader.d.ts +18 -18
- package/dist/esm/webgl/textureLoader/KTX2TextureLoader.d.ts +21 -21
- package/dist/esm/xr/WebVRSystem.d.ts +55 -55
- package/dist/esm/xr/WebXRInput.d.ts +18 -18
- package/dist/esm/xr/WebXRSystem.d.ts +136 -136
- package/dist/esm/xr/main.d.ts +8 -8
- package/package.json +5 -7
- package/dist/VERSION-FILE +0 -2
- package/dist/esm/foundation/components/MeshComponent.test.d.ts +0 -1
- package/dist/esm/foundation/components/SceneGraphComponent.test.d.ts +0 -1
- package/dist/esm/foundation/components/TransformComponent.test.d.ts +0 -1
- package/dist/esm/foundation/core/Entity.test.d.ts +0 -1
- package/dist/esm/foundation/core/EntityRepository.test.d.ts +0 -1
- package/dist/esm/foundation/core/RnObject.test.d.ts +0 -1
- package/dist/esm/foundation/definitions/ShaderVariableTyoe.d.ts +0 -11
- package/dist/esm/foundation/enhanced_js_objects/Array.test.d.ts +0 -5
- package/dist/esm/foundation/geometry/Mesh.test.d.ts +0 -1
- package/dist/esm/foundation/importer/VRizeGltfLoaderExtension.d.ts +0 -21
- package/dist/esm/foundation/materials/core/Material.test.d.ts +0 -1
- package/dist/esm/foundation/materials/core/ShaderityUtility.test.d.ts +0 -1
- package/dist/esm/foundation/materials/nodes/AddShaderNode.test.d.ts +0 -1
- package/dist/esm/foundation/materials/nodes/ConstantVariableShaderNode.test.d.ts +0 -1
- package/dist/esm/foundation/materials/nodes/ScalarToVector4ShaderNode.test.d.ts +0 -1
- package/dist/esm/foundation/materials/nodes/VaryingVariableShaderNode.test.d.ts +0 -1
- package/dist/esm/foundation/materials/singles/VRizeClassicShadingSingleMaterialNode.d.ts +0 -24
- package/dist/esm/foundation/materials/singles/VRizePbrShadingSingleMaterialNode.d.ts +0 -28
- package/dist/esm/foundation/math/AABB.test.d.ts +0 -1
- package/dist/esm/foundation/math/IdentityMatrix33.test.d.ts +0 -1
- package/dist/esm/foundation/math/IdentityMatrix44.test.d.ts +0 -1
- package/dist/esm/foundation/math/Matrix44.test.d.ts +0 -1
- package/dist/esm/foundation/math/MutableMatrix44..test.d.ts +0 -1
- package/dist/esm/foundation/math/MutableVector4.test.d.ts +0 -1
- package/dist/esm/foundation/math/Vector4.test.d.ts +0 -1
- package/dist/esm/foundation/memory/Accessor.test.d.ts +0 -1
- package/dist/esm/foundation/memory/Buffer.test.d.ts +0 -1
- package/dist/esm/foundation/memory/BufferView.test.d.ts +0 -1
- package/dist/esm/foundation/misc/Is.test.d.ts +0 -1
- package/dist/esm/foundation/misc/Option.test.d.ts +0 -1
- package/dist/esm/foundation/misc/Result.test.d.ts +0 -1
- package/dist/esm/foundation/misc/RnPromise.test.d.ts +0 -1
- package/dist/esm/foundation/renderer/RenderPass.test.d.ts +0 -1
- package/dist/esm/foundation/system/EventPubSub.test.d.ts +0 -1
- package/dist/esm/rhodonite-xr.d.ts +0 -8
- package/dist/esm/types/Option.d.ts +0 -68
- package/dist/esm/types/Option.test.d.ts +0 -1
- package/dist/esm/types/Result.d.ts +0 -32
- package/dist/esm/webgl/WebGLResourceRepository.test.d.ts +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class Cache<K, V> {
|
|
2
|
+
private __set;
|
|
3
|
+
private __weakMap;
|
|
4
|
+
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* set key and value
|
|
7
|
+
* @param key a key
|
|
8
|
+
* @param value a value
|
|
9
|
+
* @returns true: succeed to set value, false: not set (already exists)
|
|
10
|
+
*/
|
|
11
|
+
set(key: K, value: V): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* return the boolean value whether it have the key or not
|
|
14
|
+
* @param key
|
|
15
|
+
* @returns Whether it have the key or not.
|
|
16
|
+
*/
|
|
17
|
+
has(key: K): boolean;
|
|
18
|
+
size(): number;
|
|
19
|
+
}
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import { Byte, Size } from '../../types/CommonTypes';
|
|
2
|
-
import { GltfLoadOption } from '../../types/glTF';
|
|
3
|
-
export default class DataUtil {
|
|
4
|
-
static crc32table: string[];
|
|
5
|
-
static isNode(): boolean;
|
|
6
|
-
static btoa(str: string): string;
|
|
7
|
-
static atob(str: string): string;
|
|
8
|
-
static dataUriToArrayBuffer(dataUri: string): ArrayBuffer;
|
|
9
|
-
static arrayBufferToString(arrayBuffer: ArrayBuffer): string;
|
|
10
|
-
static uint8ArrayToString(uint8Array: Uint8Array): string;
|
|
11
|
-
static stringToBase64(str: string): string;
|
|
12
|
-
static base64ToArrayBuffer(base64: string): ArrayBufferLike;
|
|
13
|
-
static UInt8ArrayToDataURL(uint8array: Uint8Array, width: number, height: number): string;
|
|
14
|
-
static loadResourceAsync(resourceUri: string, isBinary: boolean, resolveCallback: Function, rejectCallback: Function): Promise<any>;
|
|
15
|
-
static toCRC32(str: string): number;
|
|
16
|
-
static accessBinaryAsImage(bufferViewIndex: number, json: any, buffer: ArrayBuffer | Uint8Array, mimeType: string): string;
|
|
17
|
-
static createBlobImageUriFromUint8Array(uint8Array: Uint8Array, mimeType: string): string;
|
|
18
|
-
static takeBufferViewAsUint8Array(json: any, bufferViewIndex: number, buffer: ArrayBuffer | Uint8Array): Uint8Array;
|
|
19
|
-
static accessArrayBufferAsImage(arrayBuffer: ArrayBuffer | Uint8Array, imageType: string): string;
|
|
20
|
-
static uint8ArrayToStringInner(uint8: Uint8Array): string;
|
|
21
|
-
static getImageType(imageType: string): string;
|
|
22
|
-
static getMimeTypeFromExtension(extension: string): string;
|
|
23
|
-
static getExtension(fileName: string): string;
|
|
24
|
-
static createUint8ArrayFromBufferViewInfo(json: any, bufferViewIndex: number, buffer: ArrayBuffer | Uint8Array): Uint8Array;
|
|
25
|
-
static createImageFromUri(uri: string, mimeType: string): Promise<HTMLImageElement>;
|
|
26
|
-
static createDefaultGltfOptions(): GltfLoadOption;
|
|
27
|
-
static fetchArrayBuffer(uri: string): Promise<ArrayBuffer>;
|
|
28
|
-
static getResizedCanvas(image: HTMLImageElement, maxSize: Size): [HTMLCanvasElement, Size, Size];
|
|
29
|
-
static detectTransparentPixelExistence(image: HTMLImageElement | HTMLCanvasElement | ImageData, threshold?: number): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* get a value nearest power of two.
|
|
32
|
-
*
|
|
33
|
-
* @param x texture size.
|
|
34
|
-
* @returns a value nearest power of two.
|
|
35
|
-
*/
|
|
36
|
-
static getNearestPowerOfTwo(x: number): number;
|
|
37
|
-
static calcPaddingBytes(originalByteLength: Byte, byteAlign: Byte): number;
|
|
38
|
-
|
|
1
|
+
import { Byte, Size } from '../../types/CommonTypes';
|
|
2
|
+
import { GltfLoadOption } from '../../types/glTF';
|
|
3
|
+
export default class DataUtil {
|
|
4
|
+
static crc32table: string[];
|
|
5
|
+
static isNode(): boolean;
|
|
6
|
+
static btoa(str: string): string;
|
|
7
|
+
static atob(str: string): string;
|
|
8
|
+
static dataUriToArrayBuffer(dataUri: string): ArrayBuffer;
|
|
9
|
+
static arrayBufferToString(arrayBuffer: ArrayBuffer): string;
|
|
10
|
+
static uint8ArrayToString(uint8Array: Uint8Array): string;
|
|
11
|
+
static stringToBase64(str: string): string;
|
|
12
|
+
static base64ToArrayBuffer(base64: string): ArrayBufferLike;
|
|
13
|
+
static UInt8ArrayToDataURL(uint8array: Uint8Array, width: number, height: number): string;
|
|
14
|
+
static loadResourceAsync(resourceUri: string, isBinary: boolean, resolveCallback: Function, rejectCallback: Function): Promise<any>;
|
|
15
|
+
static toCRC32(str: string): number;
|
|
16
|
+
static accessBinaryAsImage(bufferViewIndex: number, json: any, buffer: ArrayBuffer | Uint8Array, mimeType: string): string;
|
|
17
|
+
static createBlobImageUriFromUint8Array(uint8Array: Uint8Array, mimeType: string): string;
|
|
18
|
+
static takeBufferViewAsUint8Array(json: any, bufferViewIndex: number, buffer: ArrayBuffer | Uint8Array): Uint8Array;
|
|
19
|
+
static accessArrayBufferAsImage(arrayBuffer: ArrayBuffer | Uint8Array, imageType: string): string;
|
|
20
|
+
static uint8ArrayToStringInner(uint8: Uint8Array): string;
|
|
21
|
+
static getImageType(imageType: string): string;
|
|
22
|
+
static getMimeTypeFromExtension(extension: string): string;
|
|
23
|
+
static getExtension(fileName: string): string;
|
|
24
|
+
static createUint8ArrayFromBufferViewInfo(json: any, bufferViewIndex: number, buffer: ArrayBuffer | Uint8Array): Uint8Array;
|
|
25
|
+
static createImageFromUri(uri: string, mimeType: string): Promise<HTMLImageElement>;
|
|
26
|
+
static createDefaultGltfOptions(): GltfLoadOption;
|
|
27
|
+
static fetchArrayBuffer(uri: string): Promise<ArrayBuffer>;
|
|
28
|
+
static getResizedCanvas(image: HTMLImageElement, maxSize: Size): [HTMLCanvasElement, Size, Size];
|
|
29
|
+
static detectTransparentPixelExistence(image: HTMLImageElement | HTMLCanvasElement | ImageData, threshold?: number): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* get a value nearest power of two.
|
|
32
|
+
*
|
|
33
|
+
* @param x texture size.
|
|
34
|
+
* @returns a value nearest power of two.
|
|
35
|
+
*/
|
|
36
|
+
static getNearestPowerOfTwo(x: number): number;
|
|
37
|
+
static calcPaddingBytes(originalByteLength: Byte, byteAlign: Byte): number;
|
|
38
|
+
static normalizedInt8ArrayToFloat32Array(from: Int8Array | number[]): Float32Array;
|
|
39
|
+
static normalizedUint8ArrayToFloat32Array(from: Uint8Array | number[]): Float32Array;
|
|
40
|
+
static normalizedInt16ArrayToFloat32Array(from: Int16Array | number[]): Float32Array;
|
|
41
|
+
static normalizedUint16ArrayToFloat32Array(from: Uint16Array | number[]): Float32Array;
|
|
42
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export interface EnumIO {
|
|
2
|
-
readonly index: number;
|
|
3
|
-
readonly str: string;
|
|
4
|
-
readonly symbol: symbol;
|
|
5
|
-
toString(): string;
|
|
6
|
-
toJSON(): number;
|
|
7
|
-
}
|
|
8
|
-
export declare class EnumClass implements EnumIO {
|
|
9
|
-
readonly index: number;
|
|
10
|
-
readonly symbol: symbol;
|
|
11
|
-
readonly str: string;
|
|
12
|
-
private static __indices;
|
|
13
|
-
private static __strings;
|
|
14
|
-
constructor({ index, str, noCheckStrUnique, }: {
|
|
15
|
-
index: number;
|
|
16
|
-
str: string;
|
|
17
|
-
noCheckStrUnique?: boolean;
|
|
18
|
-
});
|
|
19
|
-
toString(): string;
|
|
20
|
-
toJSON(): number;
|
|
21
|
-
}
|
|
22
|
-
export declare function _from({ typeList, index, }: {
|
|
23
|
-
typeList: Array<EnumIO>;
|
|
24
|
-
index: number;
|
|
25
|
-
}): EnumIO | undefined;
|
|
26
|
-
export declare function _fromString({ typeList, str, }: {
|
|
27
|
-
typeList: Array<EnumIO>;
|
|
28
|
-
str: string;
|
|
29
|
-
}): EnumIO | undefined;
|
|
30
|
-
export declare function _fromStringCaseSensitively({ typeList, str, }: {
|
|
31
|
-
typeList: Array<EnumIO>;
|
|
32
|
-
str: string;
|
|
33
|
-
}): EnumIO | undefined;
|
|
1
|
+
export interface EnumIO {
|
|
2
|
+
readonly index: number;
|
|
3
|
+
readonly str: string;
|
|
4
|
+
readonly symbol: symbol;
|
|
5
|
+
toString(): string;
|
|
6
|
+
toJSON(): number;
|
|
7
|
+
}
|
|
8
|
+
export declare class EnumClass implements EnumIO {
|
|
9
|
+
readonly index: number;
|
|
10
|
+
readonly symbol: symbol;
|
|
11
|
+
readonly str: string;
|
|
12
|
+
private static __indices;
|
|
13
|
+
private static __strings;
|
|
14
|
+
constructor({ index, str, noCheckStrUnique, }: {
|
|
15
|
+
index: number;
|
|
16
|
+
str: string;
|
|
17
|
+
noCheckStrUnique?: boolean;
|
|
18
|
+
});
|
|
19
|
+
toString(): string;
|
|
20
|
+
toJSON(): number;
|
|
21
|
+
}
|
|
22
|
+
export declare function _from({ typeList, index, }: {
|
|
23
|
+
typeList: Array<EnumIO>;
|
|
24
|
+
index: number;
|
|
25
|
+
}): EnumIO | undefined;
|
|
26
|
+
export declare function _fromString({ typeList, str, }: {
|
|
27
|
+
typeList: Array<EnumIO>;
|
|
28
|
+
str: string;
|
|
29
|
+
}): EnumIO | undefined;
|
|
30
|
+
export declare function _fromStringCaseSensitively({ typeList, str, }: {
|
|
31
|
+
typeList: Array<EnumIO>;
|
|
32
|
+
str: string;
|
|
33
|
+
}): EnumIO | undefined;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
declare const IsImpl: {
|
|
2
|
-
defined(val: unknown, ...args: unknown[]): val is Object;
|
|
3
|
-
undefined(val: unknown, ...args: unknown[]): val is undefined;
|
|
4
|
-
null(val: unknown, ...args: unknown[]): val is null;
|
|
5
|
-
exist(val?: unknown, ...args: unknown[]): val is Object;
|
|
6
|
-
function(val: unknown, ...args: unknown[]): val is Function;
|
|
7
|
-
true(val: unknown, ...args: unknown[]): boolean;
|
|
8
|
-
false(val: unknown, ...args: unknown[]): boolean;
|
|
9
|
-
};
|
|
10
|
-
declare const IsNotImpl: {
|
|
11
|
-
defined(val: unknown, ...args: unknown[]): val is undefined;
|
|
12
|
-
undefined(val: unknown, ...args: unknown[]): val is Object;
|
|
13
|
-
null(val: unknown, ...args: unknown[]): val is Object;
|
|
14
|
-
exist(val?: unknown, ...args: unknown[]): val is null | undefined;
|
|
15
|
-
function(val: unknown, ...args: unknown[]): val is unknown;
|
|
16
|
-
true(val: unknown, ...args: unknown[]): boolean;
|
|
17
|
-
false(val: unknown, ...args: unknown[]): boolean;
|
|
18
|
-
};
|
|
19
|
-
declare type IsImplType = typeof IsImpl;
|
|
20
|
-
interface IsType extends IsImplType {
|
|
21
|
-
not: typeof IsNotImpl;
|
|
22
|
-
all: typeof IsImpl;
|
|
23
|
-
any: typeof IsImpl;
|
|
24
|
-
}
|
|
25
|
-
export declare const Is: IsType;
|
|
26
|
-
export {};
|
|
1
|
+
declare const IsImpl: {
|
|
2
|
+
defined(val: unknown, ...args: unknown[]): val is Object;
|
|
3
|
+
undefined(val: unknown, ...args: unknown[]): val is undefined;
|
|
4
|
+
null(val: unknown, ...args: unknown[]): val is null;
|
|
5
|
+
exist(val?: unknown, ...args: unknown[]): val is Object;
|
|
6
|
+
function(val: unknown, ...args: unknown[]): val is Function;
|
|
7
|
+
true(val: unknown, ...args: unknown[]): boolean;
|
|
8
|
+
false(val: unknown, ...args: unknown[]): boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const IsNotImpl: {
|
|
11
|
+
defined(val: unknown, ...args: unknown[]): val is undefined;
|
|
12
|
+
undefined(val: unknown, ...args: unknown[]): val is Object;
|
|
13
|
+
null(val: unknown, ...args: unknown[]): val is Object;
|
|
14
|
+
exist(val?: unknown, ...args: unknown[]): val is null | undefined;
|
|
15
|
+
function(val: unknown, ...args: unknown[]): val is unknown;
|
|
16
|
+
true(val: unknown, ...args: unknown[]): boolean;
|
|
17
|
+
false(val: unknown, ...args: unknown[]): boolean;
|
|
18
|
+
};
|
|
19
|
+
declare type IsImplType = typeof IsImpl;
|
|
20
|
+
interface IsType extends IsImplType {
|
|
21
|
+
not: typeof IsNotImpl;
|
|
22
|
+
all: typeof IsImpl;
|
|
23
|
+
any: typeof IsImpl;
|
|
24
|
+
}
|
|
25
|
+
export declare const Is: IsType;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare class ManualCache<K, V> {
|
|
2
|
+
private __map;
|
|
3
|
+
private __weakMap;
|
|
4
|
+
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* set key and value
|
|
7
|
+
* @param key the key for access
|
|
8
|
+
* @param value the value as a cache item
|
|
9
|
+
* @returns true: succeed to set value, false: not set (already exists)
|
|
10
|
+
*/
|
|
11
|
+
set(key: K, value: V): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* return the boolean value whether it have the key or not
|
|
14
|
+
* @param key the key for access
|
|
15
|
+
* @returns Whether it have the key or not.
|
|
16
|
+
*/
|
|
17
|
+
has(key: K): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* return the number of this cache items
|
|
20
|
+
* @returns the number of this cache items
|
|
21
|
+
*/
|
|
22
|
+
size(): number;
|
|
23
|
+
/**
|
|
24
|
+
* return the value in the cache by the key
|
|
25
|
+
* @param key the key for access
|
|
26
|
+
* @returns the value in the cache by the key
|
|
27
|
+
*/
|
|
28
|
+
get(key: K): V | undefined;
|
|
29
|
+
delete(key: K): boolean;
|
|
30
|
+
}
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import { Byte } from '../../types/CommonTypes';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
1
|
+
import { Byte } from '../../types/CommonTypes';
|
|
2
|
+
export declare const valueWithDefault: <T>({ value, defaultValue, }: {
|
|
3
|
+
value?: T | undefined;
|
|
4
|
+
defaultValue: T;
|
|
5
|
+
}) => T;
|
|
6
|
+
export declare const valueWithCompensation: <T>({ value, compensation, }: {
|
|
7
|
+
value?: T | undefined;
|
|
8
|
+
compensation: () => T;
|
|
9
|
+
}) => T;
|
|
10
|
+
export declare const nullishToEmptyArray: <T>(value?: T[] | null | undefined) => T[];
|
|
11
|
+
export declare const nullishToEmptyMap: <M, N>(value?: Map<M, N> | null | undefined) => Map<M, N>;
|
|
12
|
+
interface CompareResult {
|
|
13
|
+
result: boolean;
|
|
14
|
+
greater: number;
|
|
15
|
+
less: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const greaterThan: (it: number, than: number) => CompareResult;
|
|
18
|
+
export declare const lessThan: (it: number, than: number) => CompareResult;
|
|
19
|
+
export declare const addLineNumberToCode: (shaderString: string) => string;
|
|
20
|
+
export declare const MiscUtil: Readonly<{
|
|
21
|
+
isMobile: () => boolean;
|
|
22
|
+
isIOS: () => boolean;
|
|
23
|
+
isSafari: () => boolean;
|
|
24
|
+
preventDefaultForDesktopOnly: (e: Event) => void;
|
|
25
|
+
isObject: (o: any) => boolean;
|
|
26
|
+
fillTemplate: (templateString: string, templateVars: string) => any;
|
|
27
|
+
isNode: () => boolean;
|
|
28
|
+
concatArrayBuffers: (segments: ArrayBuffer[], sizes: Byte[], offsets: Byte[], finalSize?: number | undefined) => ArrayBufferLike;
|
|
29
|
+
concatArrayBuffers2: ({ finalSize, srcs, srcsOffset, srcsCopySize, }: {
|
|
30
|
+
finalSize: Byte;
|
|
31
|
+
srcs: ArrayBuffer[];
|
|
32
|
+
srcsOffset: Byte[];
|
|
33
|
+
srcsCopySize: Byte[];
|
|
34
|
+
}) => ArrayBufferLike;
|
|
35
|
+
addLineNumberToCode: (shaderString: string) => string;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
export interface IOption<T> {
|
|
2
|
-
then<U>(f: (value: T) => IOption<U>): IOption<U>;
|
|
3
|
-
then(f: (value: T) => None): None;
|
|
4
|
-
getOrDefault(altValue: T): T;
|
|
5
|
-
getOrElse(f: (...vals: any) => T): T;
|
|
6
|
-
getOrError(): T;
|
|
7
|
-
}
|
|
8
|
-
export declare class Option<T> implements IOption<T> {
|
|
9
|
-
private value?;
|
|
10
|
-
set(val: T): void;
|
|
11
|
-
/**
|
|
12
|
-
* This method is essentially same to the Some::and_then() in Rust language
|
|
13
|
-
* @param f
|
|
14
|
-
*/
|
|
15
|
-
then<U>(f: (value: T) => None): None;
|
|
16
|
-
then<U>(f: (value: T) => Some<U>): Some<U>;
|
|
17
|
-
/**
|
|
18
|
-
* @param altValue
|
|
19
|
-
* @returns
|
|
20
|
-
*/
|
|
21
|
-
getOrDefault(altValue: T): T;
|
|
22
|
-
/**
|
|
23
|
-
* @param altValue
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
getOrElse(f: (...vals: any) => T): T;
|
|
27
|
-
/**
|
|
28
|
-
* @returns
|
|
29
|
-
*/
|
|
30
|
-
getOrError(): T;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* a class indicating that the included value exists.
|
|
34
|
-
*/
|
|
35
|
-
export declare class Some<T> implements IOption<T> {
|
|
36
|
-
private value;
|
|
37
|
-
constructor(value: T);
|
|
38
|
-
/**
|
|
39
|
-
* This method is essentially same to the Some::and_then() in Rust language
|
|
40
|
-
* @param f
|
|
41
|
-
*/
|
|
42
|
-
then<U>(f: (value: T) => None): None;
|
|
43
|
-
then<U>(f: (value: T) => Some<U>): Some<U>;
|
|
44
|
-
/**
|
|
45
|
-
* @deprecated use the 'get' method instead
|
|
46
|
-
* @param altValue
|
|
47
|
-
* @returns
|
|
48
|
-
*/
|
|
49
|
-
getOrDefault(altValue: T): T;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated use the 'get' method instead
|
|
52
|
-
* @param altValue
|
|
53
|
-
* @returns
|
|
54
|
-
*/
|
|
55
|
-
getOrElse(f: (value: T) => T): T;
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated use the 'get' method instead
|
|
58
|
-
* @param altValue
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
getOrError(): T;
|
|
62
|
-
get(): T;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* a class indicating no existence.
|
|
66
|
-
*/
|
|
67
|
-
export declare class None implements IOption<never> {
|
|
68
|
-
then(): None;
|
|
69
|
-
getOrDefault<T>(value: T): T;
|
|
70
|
-
getOrElse(f: (...vals: any) => never): never;
|
|
71
|
-
getOrError(): never;
|
|
72
|
-
}
|
|
1
|
+
export interface IOption<T> {
|
|
2
|
+
then<U>(f: (value: T) => IOption<U>): IOption<U>;
|
|
3
|
+
then(f: (value: T) => None): None;
|
|
4
|
+
getOrDefault(altValue: T): T;
|
|
5
|
+
getOrElse(f: (...vals: any) => T): T;
|
|
6
|
+
getOrError(): T;
|
|
7
|
+
}
|
|
8
|
+
export declare class Option<T> implements IOption<T> {
|
|
9
|
+
private value?;
|
|
10
|
+
set(val: T): void;
|
|
11
|
+
/**
|
|
12
|
+
* This method is essentially same to the Some::and_then() in Rust language
|
|
13
|
+
* @param f
|
|
14
|
+
*/
|
|
15
|
+
then<U>(f: (value: T) => None): None;
|
|
16
|
+
then<U>(f: (value: T) => Some<U>): Some<U>;
|
|
17
|
+
/**
|
|
18
|
+
* @param altValue
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
getOrDefault(altValue: T): T;
|
|
22
|
+
/**
|
|
23
|
+
* @param altValue
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
getOrElse(f: (...vals: any) => T): T;
|
|
27
|
+
/**
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
getOrError(): T;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* a class indicating that the included value exists.
|
|
34
|
+
*/
|
|
35
|
+
export declare class Some<T> implements IOption<T> {
|
|
36
|
+
private value;
|
|
37
|
+
constructor(value: T);
|
|
38
|
+
/**
|
|
39
|
+
* This method is essentially same to the Some::and_then() in Rust language
|
|
40
|
+
* @param f
|
|
41
|
+
*/
|
|
42
|
+
then<U>(f: (value: T) => None): None;
|
|
43
|
+
then<U>(f: (value: T) => Some<U>): Some<U>;
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated use the 'get' method instead
|
|
46
|
+
* @param altValue
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
getOrDefault(altValue: T): T;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated use the 'get' method instead
|
|
52
|
+
* @param altValue
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getOrElse(f: (value: T) => T): T;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated use the 'get' method instead
|
|
58
|
+
* @param altValue
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
getOrError(): T;
|
|
62
|
+
get(): T;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* a class indicating no existence.
|
|
66
|
+
*/
|
|
67
|
+
export declare class None implements IOption<never> {
|
|
68
|
+
then(): None;
|
|
69
|
+
getOrDefault<T>(value: T): T;
|
|
70
|
+
getOrElse(f: (...vals: any) => never): never;
|
|
71
|
+
getOrError(): never;
|
|
72
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An interface to handle the results in a unified manner,
|
|
3
|
-
* regardless of whether they are successful or not.
|
|
4
|
-
*/
|
|
5
|
-
export interface IResult<T, E> {
|
|
6
|
-
match<U, F>(thenFn: (value: T) => IResult<U, F>, catchFn: (value: E) => E): void;
|
|
7
|
-
then<U, F>(f: (value: T) => IResult<U, F>): IResult<U, F>;
|
|
8
|
-
catch(f: (value: E) => E): E;
|
|
9
|
-
getBoolean(): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare abstract class Result<T, E> {
|
|
12
|
-
protected val: T | E;
|
|
13
|
-
constructor(val: T | E);
|
|
14
|
-
match<U, F>(thenFn: (value: T) => IResult<U, F>, catchFn: (value: E) => E): IResult<U, F> | E;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* a class indicating that the result is Ok (Succeeded).
|
|
18
|
-
*/
|
|
19
|
-
export declare class Ok<T> extends Result<T, never> implements IResult<T, never> {
|
|
20
|
-
/**
|
|
21
|
-
* This method is essentially same to the Ok::and_then() in Rust language
|
|
22
|
-
* @param f
|
|
23
|
-
*/
|
|
24
|
-
then<U, F>(f: (value: T) => IResult<U, F>): IResult<U, F>;
|
|
25
|
-
catch(f: (value: never) => never): never;
|
|
26
|
-
true(): true;
|
|
27
|
-
getBoolean(): true;
|
|
28
|
-
get(): T;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* a class indicating that the result is Error (Failed).
|
|
32
|
-
*/
|
|
33
|
-
export declare class Err<E> extends Result<never, E> implements IResult<never, E> {
|
|
34
|
-
then<U, F>(f: (value: never) => IResult<U, F>): IResult<U, F>;
|
|
35
|
-
catch(f: (value: E) => E): E;
|
|
36
|
-
false(): false;
|
|
37
|
-
getBoolean(): false;
|
|
38
|
-
get(): E;
|
|
39
|
-
}
|
|
40
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* An interface to handle the results in a unified manner,
|
|
3
|
+
* regardless of whether they are successful or not.
|
|
4
|
+
*/
|
|
5
|
+
export interface IResult<T, E> {
|
|
6
|
+
match<U, F>(thenFn: (value: T) => IResult<U, F>, catchFn: (value: E) => E): void;
|
|
7
|
+
then<U, F>(f: (value: T) => IResult<U, F>): IResult<U, F>;
|
|
8
|
+
catch(f: (value: E) => E): E;
|
|
9
|
+
getBoolean(): boolean;
|
|
10
|
+
}
|
|
11
|
+
declare abstract class Result<T, E> {
|
|
12
|
+
protected val: T | E;
|
|
13
|
+
constructor(val: T | E);
|
|
14
|
+
match<U, F>(thenFn: (value: T) => IResult<U, F>, catchFn: (value: E) => E): IResult<U, F> | E;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* a class indicating that the result is Ok (Succeeded).
|
|
18
|
+
*/
|
|
19
|
+
export declare class Ok<T> extends Result<T, never> implements IResult<T, never> {
|
|
20
|
+
/**
|
|
21
|
+
* This method is essentially same to the Ok::and_then() in Rust language
|
|
22
|
+
* @param f
|
|
23
|
+
*/
|
|
24
|
+
then<U, F>(f: (value: T) => IResult<U, F>): IResult<U, F>;
|
|
25
|
+
catch(f: (value: never) => never): never;
|
|
26
|
+
true(): true;
|
|
27
|
+
getBoolean(): true;
|
|
28
|
+
get(): T;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* a class indicating that the result is Error (Failed).
|
|
32
|
+
*/
|
|
33
|
+
export declare class Err<E> extends Result<never, E> implements IResult<never, E> {
|
|
34
|
+
then<U, F>(f: (value: never) => IResult<U, F>): IResult<U, F>;
|
|
35
|
+
catch(f: (value: E) => E): E;
|
|
36
|
+
false(): false;
|
|
37
|
+
getBoolean(): false;
|
|
38
|
+
get(): E;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
declare type ResolveArg<T> = T | PromiseLike<T | undefined> | undefined;
|
|
2
|
-
declare type PromiseFn<T> = (resolve: (value: ResolveArg<T>) => void, reject: (reason?: any) => void) => void;
|
|
3
|
-
declare type OnFinallyFn = (() => void) | null | undefined;
|
|
4
|
-
export declare type CallbackObj = {
|
|
5
|
-
promiseAllNum: number;
|
|
6
|
-
resolvedNum: number;
|
|
7
|
-
rejectedNum: number;
|
|
8
|
-
pendingNum: number;
|
|
9
|
-
processedPromises: any[];
|
|
10
|
-
};
|
|
11
|
-
export default class RnPromise<T> {
|
|
12
|
-
private __promise;
|
|
13
|
-
private __callback?;
|
|
14
|
-
name: string;
|
|
15
|
-
private __callbackObj;
|
|
16
|
-
constructor(promise: Promise<T>, callback?: Function);
|
|
17
|
-
constructor(fn: PromiseFn<T>, callback?: Function);
|
|
18
|
-
static resolve<T>(arg: any): RnPromise<any>;
|
|
19
|
-
static all(args: any[]): RnPromise<any[]>;
|
|
20
|
-
static allWithProgressCallback(promises: any[], callback: Function): RnPromise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>;
|
|
21
|
-
static race(args: any[]): RnPromise<any>;
|
|
22
|
-
then(onFulfilled?: any, onRejected?: any): RnPromise<void>;
|
|
23
|
-
catch(onRejected?: any): RnPromise<T | undefined>;
|
|
24
|
-
finally(onFinally?: OnFinallyFn): void;
|
|
25
|
-
static reject(e: Error): RnPromise<never>;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
1
|
+
declare type ResolveArg<T> = T | PromiseLike<T | undefined> | undefined;
|
|
2
|
+
declare type PromiseFn<T> = (resolve: (value: ResolveArg<T>) => void, reject: (reason?: any) => void) => void;
|
|
3
|
+
declare type OnFinallyFn = (() => void) | null | undefined;
|
|
4
|
+
export declare type CallbackObj = {
|
|
5
|
+
promiseAllNum: number;
|
|
6
|
+
resolvedNum: number;
|
|
7
|
+
rejectedNum: number;
|
|
8
|
+
pendingNum: number;
|
|
9
|
+
processedPromises: any[];
|
|
10
|
+
};
|
|
11
|
+
export default class RnPromise<T> {
|
|
12
|
+
private __promise;
|
|
13
|
+
private __callback?;
|
|
14
|
+
name: string;
|
|
15
|
+
private __callbackObj;
|
|
16
|
+
constructor(promise: Promise<T>, callback?: Function);
|
|
17
|
+
constructor(fn: PromiseFn<T>, callback?: Function);
|
|
18
|
+
static resolve<T>(arg: any): RnPromise<any>;
|
|
19
|
+
static all(args: any[]): RnPromise<any[]>;
|
|
20
|
+
static allWithProgressCallback(promises: any[], callback: Function): RnPromise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>;
|
|
21
|
+
static race(args: any[]): RnPromise<any>;
|
|
22
|
+
then(onFulfilled?: any, onRejected?: any): RnPromise<void>;
|
|
23
|
+
catch(onRejected?: any): RnPromise<T | undefined>;
|
|
24
|
+
finally(onFinally?: OnFinallyFn): void;
|
|
25
|
+
static reject(e: Error): RnPromise<never>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export default class Time {
|
|
2
|
-
private static __currentProcessBeginTime;
|
|
3
|
-
private static __lastProcessEndTime;
|
|
4
|
-
private static __lastTickTimeInterval;
|
|
5
|
-
private static __systemStartTime;
|
|
6
|
-
/**
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
static _processBegin(): void;
|
|
10
|
-
/**
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
static _processEnd(): void;
|
|
14
|
-
static get timeFromSystemStart(): number;
|
|
15
|
-
static get lastTickTimeInterval(): number;
|
|
16
|
-
}
|
|
1
|
+
export default class Time {
|
|
2
|
+
private static __currentProcessBeginTime;
|
|
3
|
+
private static __lastProcessEndTime;
|
|
4
|
+
private static __lastTickTimeInterval;
|
|
5
|
+
private static __systemStartTime;
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
static _processBegin(): void;
|
|
10
|
+
/**
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
static _processEnd(): void;
|
|
14
|
+
static get timeFromSystemStart(): number;
|
|
15
|
+
static get lastTickTimeInterval(): number;
|
|
16
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default interface PhysicsStrategy {
|
|
2
|
-
}
|
|
1
|
+
export default interface PhysicsStrategy {
|
|
2
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Vector3 from '../math/Vector3';
|
|
2
|
-
export default class SphereCollider {
|
|
3
|
-
position: Vector3;
|
|
4
|
-
radius: number;
|
|
5
|
-
}
|
|
1
|
+
import Vector3 from '../math/Vector3';
|
|
2
|
+
export default class SphereCollider {
|
|
3
|
+
position: Vector3;
|
|
4
|
+
radius: number;
|
|
5
|
+
}
|