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
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import Component from '../core/Component';
|
|
2
|
-
export declare const GetComponentFromEntities: unique symbol;
|
|
3
|
-
declare function getComponentFromEntities<T extends typeof Component>(this: EnhancedArrayMethods, ComponentClass: T): InstanceType<T>[];
|
|
4
|
-
export interface ArrayAsRn<T> {
|
|
5
|
-
Rn: EnhancedArrayMethods & IEnhancedArrayMethods;
|
|
6
|
-
}
|
|
7
|
-
export interface IEnhancedArrayMethods {
|
|
8
|
-
getComponentFromEntities: typeof getComponentFromEntities;
|
|
9
|
-
}
|
|
10
|
-
declare class EnhancedArrayMethods {
|
|
11
|
-
__raw: unknown[];
|
|
12
|
-
constructor(__raw: unknown[]);
|
|
13
|
-
}
|
|
14
|
-
export declare const enhanceArray: () => void;
|
|
15
|
-
export {};
|
|
1
|
+
import Component from '../core/Component';
|
|
2
|
+
export declare const GetComponentFromEntities: unique symbol;
|
|
3
|
+
declare function getComponentFromEntities<T extends typeof Component>(this: EnhancedArrayMethods, ComponentClass: T): InstanceType<T>[];
|
|
4
|
+
export interface ArrayAsRn<T> {
|
|
5
|
+
Rn: EnhancedArrayMethods & IEnhancedArrayMethods;
|
|
6
|
+
}
|
|
7
|
+
export interface IEnhancedArrayMethods {
|
|
8
|
+
getComponentFromEntities: typeof getComponentFromEntities;
|
|
9
|
+
}
|
|
10
|
+
declare class EnhancedArrayMethods {
|
|
11
|
+
__raw: unknown[];
|
|
12
|
+
constructor(__raw: unknown[]);
|
|
13
|
+
}
|
|
14
|
+
export declare const enhanceArray: () => void;
|
|
15
|
+
export {};
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import Entity from '../core/Entity';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import Entity from '../core/Entity';
|
|
2
|
+
import { glTF2 } from '../../types/glTF';
|
|
3
|
+
interface Gltf2ExporterArguments {
|
|
4
|
+
entities: Entity[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The glTF2 format Exporter class.
|
|
8
|
+
*/
|
|
9
|
+
export default class Gltf2Exporter {
|
|
10
|
+
private static __instance;
|
|
11
|
+
private static __entityRepository;
|
|
12
|
+
private constructor();
|
|
13
|
+
static getInstance(): Gltf2Exporter;
|
|
14
|
+
/**
|
|
15
|
+
* Exports All scene data in the rhodonite system as glTF2 format.
|
|
16
|
+
* @param filename
|
|
17
|
+
*/
|
|
18
|
+
export(filename: string, option?: Gltf2ExporterArguments): void;
|
|
19
|
+
private __createWriteBinary;
|
|
20
|
+
countMeshes(json: glTF2, entities: Entity[]): void;
|
|
21
|
+
createMeshes(json: glTF2, entities: Entity[]): void;
|
|
22
|
+
createMaterials(json: glTF2, entities: Entity[]): void;
|
|
23
|
+
createNodes(json: any, entities: Entity[]): void;
|
|
24
|
+
createMeshBinaryMetaData(json: any, entities: Entity[]): void;
|
|
25
|
+
download(json: glTF2, filename: string, arraybuffer: ArrayBuffer): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import Vector4 from '../math/Vector4';
|
|
2
|
-
import Matrix44 from '../math/Matrix44';
|
|
3
|
-
import MutableVector4 from '../math/MutableVector4';
|
|
4
|
-
import Vector3 from '../math/Vector3';
|
|
5
|
-
import SceneGraphComponent from '../components/SceneGraphComponent';
|
|
6
|
-
/**
|
|
7
|
-
* The view frustum class.
|
|
8
|
-
*/
|
|
9
|
-
export default class Frustum {
|
|
10
|
-
top: MutableVector4;
|
|
11
|
-
bottom: MutableVector4;
|
|
12
|
-
right: MutableVector4;
|
|
13
|
-
left: MutableVector4;
|
|
14
|
-
zNear: MutableVector4;
|
|
15
|
-
zFar: MutableVector4;
|
|
16
|
-
private __updated;
|
|
17
|
-
private __vp;
|
|
18
|
-
constructor();
|
|
19
|
-
/**
|
|
20
|
-
* Updates this view frustum data from the view and projection matrices.
|
|
21
|
-
* @param viewMatrix The view matrix.
|
|
22
|
-
* @param projectionMatrix The projection matrix.
|
|
23
|
-
*/
|
|
24
|
-
update(viewMatrix: Matrix44, projectionMatrix: Matrix44): void;
|
|
25
|
-
/**
|
|
26
|
-
* Do clipping test (Inside / outside / neutral) of the plane of the view frustum.
|
|
27
|
-
* @param plane The plane of the view frustum.
|
|
28
|
-
* @param point The point to test.
|
|
29
|
-
* @param bias The bias value.
|
|
30
|
-
*/
|
|
31
|
-
clipping(plane: Vector4, point: Vector3, bias: number): import("../misc/EnumIO").EnumIO;
|
|
32
|
-
/**
|
|
33
|
-
* Do culling test (Inside / outside / neutral) of the entity against to the view frustum.
|
|
34
|
-
* @param sg The SceneGraphComponent object of the entity.
|
|
35
|
-
*/
|
|
36
|
-
culling(sg: SceneGraphComponent): import("../misc/EnumIO").EnumIO;
|
|
37
|
-
}
|
|
1
|
+
import Vector4 from '../math/Vector4';
|
|
2
|
+
import Matrix44 from '../math/Matrix44';
|
|
3
|
+
import MutableVector4 from '../math/MutableVector4';
|
|
4
|
+
import Vector3 from '../math/Vector3';
|
|
5
|
+
import SceneGraphComponent from '../components/SceneGraphComponent';
|
|
6
|
+
/**
|
|
7
|
+
* The view frustum class.
|
|
8
|
+
*/
|
|
9
|
+
export default class Frustum {
|
|
10
|
+
top: MutableVector4;
|
|
11
|
+
bottom: MutableVector4;
|
|
12
|
+
right: MutableVector4;
|
|
13
|
+
left: MutableVector4;
|
|
14
|
+
zNear: MutableVector4;
|
|
15
|
+
zFar: MutableVector4;
|
|
16
|
+
private __updated;
|
|
17
|
+
private __vp;
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Updates this view frustum data from the view and projection matrices.
|
|
21
|
+
* @param viewMatrix The view matrix.
|
|
22
|
+
* @param projectionMatrix The projection matrix.
|
|
23
|
+
*/
|
|
24
|
+
update(viewMatrix: Matrix44, projectionMatrix: Matrix44): void;
|
|
25
|
+
/**
|
|
26
|
+
* Do clipping test (Inside / outside / neutral) of the plane of the view frustum.
|
|
27
|
+
* @param plane The plane of the view frustum.
|
|
28
|
+
* @param point The point to test.
|
|
29
|
+
* @param bias The bias value.
|
|
30
|
+
*/
|
|
31
|
+
clipping(plane: Vector4, point: Vector3, bias: number): import("../misc/EnumIO").EnumIO;
|
|
32
|
+
/**
|
|
33
|
+
* Do culling test (Inside / outside / neutral) of the entity against to the view frustum.
|
|
34
|
+
* @param sg The SceneGraphComponent object of the entity.
|
|
35
|
+
*/
|
|
36
|
+
culling(sg: SceneGraphComponent): import("../misc/EnumIO").EnumIO;
|
|
37
|
+
}
|
|
@@ -1,124 +1,148 @@
|
|
|
1
|
-
import Primitive from './Primitive';
|
|
2
|
-
import Vector3 from '../math/Vector3';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
private static
|
|
43
|
-
private static
|
|
44
|
-
private static
|
|
45
|
-
private static
|
|
46
|
-
private static
|
|
47
|
-
private static
|
|
48
|
-
private static
|
|
49
|
-
private static
|
|
50
|
-
private static
|
|
51
|
-
private static
|
|
52
|
-
private static
|
|
53
|
-
private static
|
|
54
|
-
private static
|
|
55
|
-
private static
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
*
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
import Primitive from './Primitive';
|
|
2
|
+
import Vector3 from '../math/Vector3';
|
|
3
|
+
import AABB from '../math/AABB';
|
|
4
|
+
import { Index, CGAPIResourceHandle } from '../../types/CommonTypes';
|
|
5
|
+
import { IVector3 } from '../math/IVector';
|
|
6
|
+
/**
|
|
7
|
+
* The Mesh class.
|
|
8
|
+
* This mesh object has primitives (geometries) or a reference of 'original mesh'.
|
|
9
|
+
* If the latter, this mesh object is an 'instanced mesh', which has no primitives.
|
|
10
|
+
* Instanced meshes refer original mesh's primitives when drawing.
|
|
11
|
+
*/
|
|
12
|
+
export default class Mesh {
|
|
13
|
+
private readonly __meshUID;
|
|
14
|
+
static readonly invalidateMeshUID = -1;
|
|
15
|
+
static __mesh_uid_count: number;
|
|
16
|
+
private __instanceIdx;
|
|
17
|
+
private __primitives;
|
|
18
|
+
private __opaquePrimitives;
|
|
19
|
+
private __transparentPrimitives;
|
|
20
|
+
private __morphPrimitives;
|
|
21
|
+
private __instanceOf?;
|
|
22
|
+
weights: number[];
|
|
23
|
+
private __localAABB;
|
|
24
|
+
private __vaoUids;
|
|
25
|
+
private __variationVBOUid;
|
|
26
|
+
private __instances;
|
|
27
|
+
_attachedEntityUID: number;
|
|
28
|
+
private __instancesDirty;
|
|
29
|
+
private static __originalMeshes;
|
|
30
|
+
/**
|
|
31
|
+
* Specification of when calculate the tangent of a vertex to apply Normal texture (for pbr/MToon shader)
|
|
32
|
+
* 0: Not calculate tangent (not apply normal texture)
|
|
33
|
+
* 1: (default) Use original tangent in a vertex, if a vertex has tangent attribute. If a vertex does not have it, calculate a tangent in a shader.
|
|
34
|
+
* 2: Use original tangent in a vertex, if a vertex has tangent attribute. If a vertex does not have it, precalculate a tangent in the javascript.
|
|
35
|
+
* 3: Calculate all tangent in a shader.
|
|
36
|
+
* 4: Precalculate all tangent in the javascript
|
|
37
|
+
*/
|
|
38
|
+
tangentCalculationMode: Index;
|
|
39
|
+
isPreComputeForRayCastPickingEnable: boolean;
|
|
40
|
+
private __hasFaceNormal;
|
|
41
|
+
private static __tmpVec3_0;
|
|
42
|
+
private static __tmpVec3_1;
|
|
43
|
+
private static __tmpVec3_2;
|
|
44
|
+
private static __tmpVec3_3;
|
|
45
|
+
private static __tmpVec3_4;
|
|
46
|
+
private static __tmpVec3_5;
|
|
47
|
+
private static __tmpVec3_6;
|
|
48
|
+
private static __tmpVec3_7;
|
|
49
|
+
private static __tmpVec3_8;
|
|
50
|
+
private static __tmpVec3_9;
|
|
51
|
+
private static __tmpVec3_10;
|
|
52
|
+
private static __tmpVec3_11;
|
|
53
|
+
private static __tmpReturnVec3_0;
|
|
54
|
+
private static __tmpReturnVec3_1;
|
|
55
|
+
private static __tmpReturnVec3_2;
|
|
56
|
+
/**
|
|
57
|
+
* Constructor
|
|
58
|
+
*/
|
|
59
|
+
constructor();
|
|
60
|
+
getVaoUids(index: Index): CGAPIResourceHandle;
|
|
61
|
+
/**
|
|
62
|
+
* Adds primitive.
|
|
63
|
+
* @param primitive The primitive object.
|
|
64
|
+
*/
|
|
65
|
+
addPrimitive(primitive: Primitive): void;
|
|
66
|
+
private __setPrimitives;
|
|
67
|
+
/**
|
|
68
|
+
* Sets mesh.
|
|
69
|
+
* @param mesh The mesh.
|
|
70
|
+
*/
|
|
71
|
+
setOriginalMesh(mesh: Mesh): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Gets true if these primitives are all 'Blend' type
|
|
74
|
+
*/
|
|
75
|
+
isAllBlend(): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Gets true if some primitives are 'Blend' type
|
|
78
|
+
*/
|
|
79
|
+
isBlendPartially(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Gets true if these primitives are all 'Opaque' type
|
|
82
|
+
*/
|
|
83
|
+
isOpaque(): boolean;
|
|
84
|
+
isFirstOpaquePrimitiveAt(index: Index): boolean;
|
|
85
|
+
isFirstTransparentPrimitiveAt(index: Index): boolean;
|
|
86
|
+
getPrimitiveAt(i: number): Primitive;
|
|
87
|
+
getPrimitiveNumber(): number;
|
|
88
|
+
isInstanceMesh(): boolean;
|
|
89
|
+
isOriginalMesh(): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
* @returns true: updated, false: not changed (not dirty)
|
|
93
|
+
*/
|
|
94
|
+
updateVariationVBO(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* @private
|
|
97
|
+
* @returns true: updated, false: not changed (not dirty)
|
|
98
|
+
*/
|
|
99
|
+
deleteVariationVBO(): boolean;
|
|
100
|
+
updateVAO(): void;
|
|
101
|
+
deleteVAO(): void;
|
|
102
|
+
castRay(srcPointInLocal: IVector3, directionInLocal: IVector3, dotThreshold?: number): {
|
|
103
|
+
t: number;
|
|
104
|
+
intersectedPosition: Vector3 | undefined;
|
|
105
|
+
};
|
|
106
|
+
get primitives(): Primitive[];
|
|
107
|
+
get meshUID(): number;
|
|
108
|
+
get instanceCountIncludeOriginal(): number;
|
|
109
|
+
/**
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
get _variationVBOUid(): CGAPIResourceHandle;
|
|
113
|
+
/**
|
|
114
|
+
* Gets AABB in local space.
|
|
115
|
+
*/
|
|
116
|
+
get AABB(): AABB;
|
|
117
|
+
get instanceIndex(): number;
|
|
118
|
+
/**
|
|
119
|
+
* @private
|
|
120
|
+
* Adds the other mesh to this mesh as instanced meshes.
|
|
121
|
+
* @param mesh The other mesh.
|
|
122
|
+
*/
|
|
123
|
+
_addMeshToInstanceArray(mesh: Mesh): void;
|
|
124
|
+
/**
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
_calcArenbergInverseMatrices(): void;
|
|
128
|
+
private __calcMorphPrimitives;
|
|
129
|
+
/**
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
_calcTangents(): void;
|
|
133
|
+
/**
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
private __calcTangentFor3Vertices;
|
|
137
|
+
private __calcTangentPerVertex;
|
|
138
|
+
private __usePreCalculatedTangent;
|
|
139
|
+
/**
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
_calcBaryCentricCoord(): void;
|
|
143
|
+
/**
|
|
144
|
+
* @private
|
|
145
|
+
*/
|
|
146
|
+
_calcFaceNormalsIfNonNormal(): void;
|
|
147
|
+
private __calcFaceNormalFor3Vertices;
|
|
148
|
+
}
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import Primitive from './Primitive';
|
|
2
|
-
import Material from '../materials/core/Material';
|
|
3
|
-
import { Size } from '../../types/CommonTypes';
|
|
4
|
-
export declare type
|
|
5
|
-
width: Size;
|
|
6
|
-
height: Size;
|
|
7
|
-
uSpan: Size;
|
|
8
|
-
vSpan: Size;
|
|
9
|
-
isUVRepeat: boolean;
|
|
10
|
-
flipTextureCoordinateY?: boolean;
|
|
11
|
-
material?: Material;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import Primitive from './Primitive';
|
|
2
|
+
import Material from '../materials/core/Material';
|
|
3
|
+
import { Size } from '../../types/CommonTypes';
|
|
4
|
+
export declare type PlaneDescriptor = {
|
|
5
|
+
width: Size;
|
|
6
|
+
height: Size;
|
|
7
|
+
uSpan: Size;
|
|
8
|
+
vSpan: Size;
|
|
9
|
+
isUVRepeat: boolean;
|
|
10
|
+
flipTextureCoordinateY?: boolean;
|
|
11
|
+
material?: Material;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Plane class
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export default class Plane extends Primitive {
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Generates a plane object
|
|
21
|
+
* @param width the length of U(X)-axis direction
|
|
22
|
+
* @param height the length of V(Y)-axis direction
|
|
23
|
+
* @param uSpan number of spans in U(X)-axis direction
|
|
24
|
+
* @param vSpan number of spans in V(Y)-axis direction
|
|
25
|
+
* @param isUVRepeat draw uSpan times vSpan number of textures
|
|
26
|
+
* @param flipTextureCoordinateY draw textures by flipping on the V(Y)-axis
|
|
27
|
+
* @param material attach a rhodonite material to this plane(the default material is the classicUberMaterial)
|
|
28
|
+
*/
|
|
29
|
+
generate(desc: PlaneDescriptor): void;
|
|
30
|
+
}
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { PrimitiveModeEnum } from '../definitions/PrimitiveMode';
|
|
2
|
-
import { VertexAttributeEnum } from '../definitions/VertexAttribute';
|
|
3
|
-
import Accessor from '../memory/Accessor';
|
|
4
|
-
import RnObject from '../core/RnObject';
|
|
5
|
-
import { ComponentTypeEnum } from '../definitions/ComponentType';
|
|
6
|
-
import { CompositionTypeEnum } from '../definitions/CompositionType';
|
|
7
|
-
import AABB from '../math/AABB';
|
|
8
|
-
import Material from '../materials/core/Material';
|
|
9
|
-
import { VertexHandles } from '../../webgl/WebGLResourceRepository';
|
|
10
|
-
import { PrimitiveUID, TypedArray, Index } from '../../types/CommonTypes';
|
|
11
|
-
import { IVector3 } from '../math/IVector';
|
|
12
|
-
export declare type Attributes = Map<VertexAttributeEnum, Accessor>;
|
|
13
|
-
export default class Primitive extends RnObject {
|
|
14
|
-
private __mode;
|
|
15
|
-
private __material;
|
|
16
|
-
_prevMaterial: Material;
|
|
17
|
-
private __attributes;
|
|
18
|
-
private __indices?;
|
|
19
|
-
private static __primitiveCount;
|
|
20
|
-
private __primitiveUid;
|
|
21
|
-
private static __headerAccessor?;
|
|
22
|
-
private __aabb;
|
|
23
|
-
private __targets;
|
|
24
|
-
private __vertexHandles?;
|
|
25
|
-
private __inverseArenbergMatrix;
|
|
26
|
-
private __arenberg3rdPosition;
|
|
27
|
-
private static __tmpVec3_0;
|
|
28
|
-
constructor();
|
|
29
|
-
set material(mat: Material);
|
|
30
|
-
get material(): Material;
|
|
31
|
-
_backupMaterial(): void;
|
|
32
|
-
_restoreMaterial(): void;
|
|
33
|
-
setData(attributes: Attributes, mode: PrimitiveModeEnum, material?: Material, indicesAccessor?: Accessor): void;
|
|
34
|
-
static get maxPrimitiveCount(): number;
|
|
35
|
-
static get headerAccessor(): Accessor | undefined;
|
|
36
|
-
static createPrimitive({ indices, attributeCompositionTypes, attributeSemantics, attributes, material, primitiveMode, }: {
|
|
37
|
-
indices?: TypedArray;
|
|
38
|
-
attributeCompositionTypes: Array<CompositionTypeEnum>;
|
|
39
|
-
attributeSemantics: Array<VertexAttributeEnum>;
|
|
40
|
-
attributes: Array<TypedArray>;
|
|
41
|
-
primitiveMode: PrimitiveModeEnum;
|
|
42
|
-
material?: Material;
|
|
43
|
-
}): Primitive;
|
|
44
|
-
get indicesAccessor(): Accessor | undefined;
|
|
45
|
-
getVertexCountAsIndicesBased(): number;
|
|
46
|
-
getVertexCountAsVerticesBased(): number;
|
|
47
|
-
getTriangleCountAsIndicesBased(): number;
|
|
48
|
-
getTriangleCountAsVerticesBased(): number;
|
|
49
|
-
hasIndices(): boolean;
|
|
50
|
-
get attributeAccessors(): Array<Accessor>;
|
|
51
|
-
getAttribute(semantic: VertexAttributeEnum): Accessor | undefined;
|
|
52
|
-
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
53
|
-
get attributeEntries(): IterableIterator<[VertexAttributeEnum, Accessor]>;
|
|
54
|
-
get attributeCompositionTypes(): Array<CompositionTypeEnum>;
|
|
55
|
-
get attributeComponentTypes(): Array<ComponentTypeEnum>;
|
|
56
|
-
get primitiveMode(): PrimitiveModeEnum;
|
|
57
|
-
get primitiveUid(): PrimitiveUID;
|
|
58
|
-
get isPositionAccessorUpdated(): boolean;
|
|
59
|
-
get AABB(): AABB;
|
|
60
|
-
setVertexAttribute(accessor: Accessor, vertexSemantics: VertexAttributeEnum): void;
|
|
61
|
-
removeIndices(): void;
|
|
62
|
-
setIndices(accessor: Accessor): void;
|
|
63
|
-
setTargets(targets: Array<Attributes>): void;
|
|
64
|
-
get targets(): Array<Attributes>;
|
|
65
|
-
isBlend(): boolean;
|
|
66
|
-
isOpaque(): boolean;
|
|
67
|
-
create3DAPIVertexData(): boolean;
|
|
68
|
-
update3DAPIVertexData(): boolean;
|
|
69
|
-
delete3DAPIVertexData(): boolean;
|
|
70
|
-
get vertexHandles(): VertexHandles | undefined;
|
|
71
|
-
castRay(origVec3: IVector3, dirVec3: IVector3, isFrontFacePickable: boolean, isBackFacePickable: boolean, dotThreshold: number, hasFaceNormal: boolean): {
|
|
72
|
-
currentShortestIntersectedPosVec3: any;
|
|
73
|
-
currentShortestT: number;
|
|
74
|
-
};
|
|
75
|
-
private __castRayInner;
|
|
76
|
-
_calcArenbergInverseMatrices(): void;
|
|
77
|
-
_calcArenbergMatrixFor3Vertices(i: Index, pos0IndexBase: Index, pos1IndexBase: Index, pos2IndexBase: Index): void;
|
|
78
|
-
}
|
|
1
|
+
import { PrimitiveModeEnum } from '../definitions/PrimitiveMode';
|
|
2
|
+
import { VertexAttributeEnum } from '../definitions/VertexAttribute';
|
|
3
|
+
import Accessor from '../memory/Accessor';
|
|
4
|
+
import RnObject from '../core/RnObject';
|
|
5
|
+
import { ComponentTypeEnum } from '../definitions/ComponentType';
|
|
6
|
+
import { CompositionTypeEnum } from '../definitions/CompositionType';
|
|
7
|
+
import AABB from '../math/AABB';
|
|
8
|
+
import Material from '../materials/core/Material';
|
|
9
|
+
import { VertexHandles } from '../../webgl/WebGLResourceRepository';
|
|
10
|
+
import { PrimitiveUID, TypedArray, Index } from '../../types/CommonTypes';
|
|
11
|
+
import { IVector3 } from '../math/IVector';
|
|
12
|
+
export declare type Attributes = Map<VertexAttributeEnum, Accessor>;
|
|
13
|
+
export default class Primitive extends RnObject {
|
|
14
|
+
private __mode;
|
|
15
|
+
private __material;
|
|
16
|
+
_prevMaterial: Material;
|
|
17
|
+
private __attributes;
|
|
18
|
+
private __indices?;
|
|
19
|
+
private static __primitiveCount;
|
|
20
|
+
private __primitiveUid;
|
|
21
|
+
private static __headerAccessor?;
|
|
22
|
+
private __aabb;
|
|
23
|
+
private __targets;
|
|
24
|
+
private __vertexHandles?;
|
|
25
|
+
private __inverseArenbergMatrix;
|
|
26
|
+
private __arenberg3rdPosition;
|
|
27
|
+
private static __tmpVec3_0;
|
|
28
|
+
constructor();
|
|
29
|
+
set material(mat: Material);
|
|
30
|
+
get material(): Material;
|
|
31
|
+
_backupMaterial(): void;
|
|
32
|
+
_restoreMaterial(): void;
|
|
33
|
+
setData(attributes: Attributes, mode: PrimitiveModeEnum, material?: Material, indicesAccessor?: Accessor): void;
|
|
34
|
+
static get maxPrimitiveCount(): number;
|
|
35
|
+
static get headerAccessor(): Accessor | undefined;
|
|
36
|
+
static createPrimitive({ indices, attributeCompositionTypes, attributeSemantics, attributes, material, primitiveMode, }: {
|
|
37
|
+
indices?: TypedArray;
|
|
38
|
+
attributeCompositionTypes: Array<CompositionTypeEnum>;
|
|
39
|
+
attributeSemantics: Array<VertexAttributeEnum>;
|
|
40
|
+
attributes: Array<TypedArray>;
|
|
41
|
+
primitiveMode: PrimitiveModeEnum;
|
|
42
|
+
material?: Material;
|
|
43
|
+
}): Primitive;
|
|
44
|
+
get indicesAccessor(): Accessor | undefined;
|
|
45
|
+
getVertexCountAsIndicesBased(): number;
|
|
46
|
+
getVertexCountAsVerticesBased(): number;
|
|
47
|
+
getTriangleCountAsIndicesBased(): number;
|
|
48
|
+
getTriangleCountAsVerticesBased(): number;
|
|
49
|
+
hasIndices(): boolean;
|
|
50
|
+
get attributeAccessors(): Array<Accessor>;
|
|
51
|
+
getAttribute(semantic: VertexAttributeEnum): Accessor | undefined;
|
|
52
|
+
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
53
|
+
get attributeEntries(): IterableIterator<[VertexAttributeEnum, Accessor]>;
|
|
54
|
+
get attributeCompositionTypes(): Array<CompositionTypeEnum>;
|
|
55
|
+
get attributeComponentTypes(): Array<ComponentTypeEnum>;
|
|
56
|
+
get primitiveMode(): PrimitiveModeEnum;
|
|
57
|
+
get primitiveUid(): PrimitiveUID;
|
|
58
|
+
get isPositionAccessorUpdated(): boolean;
|
|
59
|
+
get AABB(): AABB;
|
|
60
|
+
setVertexAttribute(accessor: Accessor, vertexSemantics: VertexAttributeEnum): void;
|
|
61
|
+
removeIndices(): void;
|
|
62
|
+
setIndices(accessor: Accessor): void;
|
|
63
|
+
setTargets(targets: Array<Attributes>): void;
|
|
64
|
+
get targets(): Array<Attributes>;
|
|
65
|
+
isBlend(): boolean;
|
|
66
|
+
isOpaque(): boolean;
|
|
67
|
+
create3DAPIVertexData(): boolean;
|
|
68
|
+
update3DAPIVertexData(): boolean;
|
|
69
|
+
delete3DAPIVertexData(): boolean;
|
|
70
|
+
get vertexHandles(): VertexHandles | undefined;
|
|
71
|
+
castRay(origVec3: IVector3, dirVec3: IVector3, isFrontFacePickable: boolean, isBackFacePickable: boolean, dotThreshold: number, hasFaceNormal: boolean): {
|
|
72
|
+
currentShortestIntersectedPosVec3: any;
|
|
73
|
+
currentShortestT: number;
|
|
74
|
+
};
|
|
75
|
+
private __castRayInner;
|
|
76
|
+
_calcArenbergInverseMatrices(): void;
|
|
77
|
+
_calcArenbergMatrixFor3Vertices(i: Index, pos0IndexBase: Index, pos1IndexBase: Index, pos2IndexBase: Index): void;
|
|
78
|
+
}
|