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,12 +1,12 @@
|
|
|
1
|
-
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
-
import GLSLShader from '../GLSLShader';
|
|
3
|
-
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
-
export declare type AttributeNames = Array<string>;
|
|
5
|
-
export default class IfStatementShader extends GLSLShader {
|
|
6
|
-
constructor();
|
|
7
|
-
get vertexShaderDefinitions(): string;
|
|
8
|
-
get pixelShaderDefinitions(): string;
|
|
9
|
-
get attributeNames(): AttributeNames;
|
|
10
|
-
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
11
|
-
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
12
|
-
}
|
|
1
|
+
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
+
import GLSLShader from '../GLSLShader';
|
|
3
|
+
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
+
export declare type AttributeNames = Array<string>;
|
|
5
|
+
export default class IfStatementShader extends GLSLShader {
|
|
6
|
+
constructor();
|
|
7
|
+
get vertexShaderDefinitions(): string;
|
|
8
|
+
get pixelShaderDefinitions(): string;
|
|
9
|
+
get attributeNames(): AttributeNames;
|
|
10
|
+
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
11
|
+
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
12
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
-
import GLSLShader from '../GLSLShader';
|
|
3
|
-
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
-
import { MaterialNodeUID } from '../../../types/CommonTypes';
|
|
5
|
-
export declare type AttributeNames = Array<string>;
|
|
6
|
-
export default class TextureFetchShader extends GLSLShader {
|
|
7
|
-
static __instance: TextureFetchShader;
|
|
8
|
-
private __materialNodeUid;
|
|
9
|
-
constructor();
|
|
10
|
-
set materialNodeUid(materialNodeUid: MaterialNodeUID);
|
|
11
|
-
get vertexShaderDefinitions(): string;
|
|
12
|
-
get pixelShaderDefinitions(): string;
|
|
13
|
-
vertexShaderBody: string;
|
|
14
|
-
getPixelShaderBody(): string;
|
|
15
|
-
get attributeNames(): AttributeNames;
|
|
16
|
-
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
17
|
-
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
18
|
-
}
|
|
1
|
+
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
+
import GLSLShader from '../GLSLShader';
|
|
3
|
+
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
+
import { MaterialNodeUID } from '../../../types/CommonTypes';
|
|
5
|
+
export declare type AttributeNames = Array<string>;
|
|
6
|
+
export default class TextureFetchShader extends GLSLShader {
|
|
7
|
+
static __instance: TextureFetchShader;
|
|
8
|
+
private __materialNodeUid;
|
|
9
|
+
constructor();
|
|
10
|
+
set materialNodeUid(materialNodeUid: MaterialNodeUID);
|
|
11
|
+
get vertexShaderDefinitions(): string;
|
|
12
|
+
get pixelShaderDefinitions(): string;
|
|
13
|
+
vertexShaderBody: string;
|
|
14
|
+
getPixelShaderBody(): string;
|
|
15
|
+
get attributeNames(): AttributeNames;
|
|
16
|
+
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
17
|
+
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
18
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
-
import GLSLShader from '../GLSLShader';
|
|
3
|
-
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
-
import { ComponentTypeEnum } from '../../../foundation/definitions/ComponentType';
|
|
5
|
-
export declare type AttributeNames = Array<string>;
|
|
6
|
-
export default class UniformDataShader extends GLSLShader {
|
|
7
|
-
private __functionName;
|
|
8
|
-
private __compositionType;
|
|
9
|
-
private __componentType;
|
|
10
|
-
private __variableName;
|
|
11
|
-
private __valueStr;
|
|
12
|
-
constructor(__functionName: string, __compositionType: CompositionTypeEnum, __componentType: ComponentTypeEnum);
|
|
13
|
-
setVariableName(name: any): void;
|
|
14
|
-
setDefaultValue(value: any): void;
|
|
15
|
-
get vertexShaderDefinitions(): string;
|
|
16
|
-
get pixelShaderDefinitions(): string;
|
|
17
|
-
get attributeNames(): AttributeNames;
|
|
18
|
-
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
19
|
-
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
20
|
-
}
|
|
1
|
+
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
+
import GLSLShader from '../GLSLShader';
|
|
3
|
+
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
+
import { ComponentTypeEnum } from '../../../foundation/definitions/ComponentType';
|
|
5
|
+
export declare type AttributeNames = Array<string>;
|
|
6
|
+
export default class UniformDataShader extends GLSLShader {
|
|
7
|
+
private __functionName;
|
|
8
|
+
private __compositionType;
|
|
9
|
+
private __componentType;
|
|
10
|
+
private __variableName;
|
|
11
|
+
private __valueStr;
|
|
12
|
+
constructor(__functionName: string, __compositionType: CompositionTypeEnum, __componentType: ComponentTypeEnum);
|
|
13
|
+
setVariableName(name: any): void;
|
|
14
|
+
setDefaultValue(value: any): void;
|
|
15
|
+
get vertexShaderDefinitions(): string;
|
|
16
|
+
get pixelShaderDefinitions(): string;
|
|
17
|
+
get attributeNames(): AttributeNames;
|
|
18
|
+
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
19
|
+
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
20
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
-
import GLSLShader from '../GLSLShader';
|
|
3
|
-
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
-
import { ComponentTypeEnum } from '../../../foundation/definitions/ComponentType';
|
|
5
|
-
export declare type AttributeNames = Array<string>;
|
|
6
|
-
export default class VaryingVariableShader extends GLSLShader {
|
|
7
|
-
private __functionName;
|
|
8
|
-
private __compositionType;
|
|
9
|
-
private __componentType;
|
|
10
|
-
private __variableName;
|
|
11
|
-
constructor(__functionName: string, __compositionType: CompositionTypeEnum, __componentType: ComponentTypeEnum);
|
|
12
|
-
setVariableName(name: any): void;
|
|
13
|
-
get vertexShaderDefinitions(): string;
|
|
14
|
-
get pixelShaderDefinitions(): string;
|
|
15
|
-
get attributeNames(): AttributeNames;
|
|
16
|
-
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
17
|
-
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
18
|
-
}
|
|
1
|
+
import { VertexAttributeEnum } from '../../../foundation/definitions/VertexAttribute';
|
|
2
|
+
import GLSLShader from '../GLSLShader';
|
|
3
|
+
import { CompositionTypeEnum } from '../../../foundation/definitions/CompositionType';
|
|
4
|
+
import { ComponentTypeEnum } from '../../../foundation/definitions/ComponentType';
|
|
5
|
+
export declare type AttributeNames = Array<string>;
|
|
6
|
+
export default class VaryingVariableShader extends GLSLShader {
|
|
7
|
+
private __functionName;
|
|
8
|
+
private __compositionType;
|
|
9
|
+
private __componentType;
|
|
10
|
+
private __variableName;
|
|
11
|
+
constructor(__functionName: string, __compositionType: CompositionTypeEnum, __componentType: ComponentTypeEnum);
|
|
12
|
+
setVariableName(name: any): void;
|
|
13
|
+
get vertexShaderDefinitions(): string;
|
|
14
|
+
get pixelShaderDefinitions(): string;
|
|
15
|
+
get attributeNames(): AttributeNames;
|
|
16
|
+
get attributeSemantics(): Array<VertexAttributeEnum>;
|
|
17
|
+
get attributeCompositions(): Array<CompositionTypeEnum>;
|
|
18
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { TextureData } from '../WebGLResourceRepository';
|
|
2
|
-
export default class KTX2TextureLoader {
|
|
3
|
-
private static __instance;
|
|
4
|
-
private static __mscTranscoderModule;
|
|
5
|
-
private static __zstdDecoder;
|
|
6
|
-
private __mscTranscoderPromise;
|
|
7
|
-
constructor();
|
|
8
|
-
static getInstance(): KTX2TextureLoader;
|
|
9
|
-
transcode(uint8Array: Uint8Array): Promise<{
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
compressionTextureType: import("../../foundation/misc/EnumIO").EnumIO;
|
|
13
|
-
mipmapData: TextureData[];
|
|
14
|
-
needGammaCorrection: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
private __loadMSCTranscoder;
|
|
17
|
-
private __getDeviceDependentParameters;
|
|
18
|
-
private __parse;
|
|
19
|
-
private __transcodeData;
|
|
20
|
-
private __hasAlpha;
|
|
21
|
-
}
|
|
1
|
+
import { TextureData } from '../WebGLResourceRepository';
|
|
2
|
+
export default class KTX2TextureLoader {
|
|
3
|
+
private static __instance;
|
|
4
|
+
private static __mscTranscoderModule;
|
|
5
|
+
private static __zstdDecoder;
|
|
6
|
+
private __mscTranscoderPromise;
|
|
7
|
+
constructor();
|
|
8
|
+
static getInstance(): KTX2TextureLoader;
|
|
9
|
+
transcode(uint8Array: Uint8Array): Promise<{
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
compressionTextureType: import("../../foundation/misc/EnumIO").EnumIO;
|
|
13
|
+
mipmapData: TextureData[];
|
|
14
|
+
needGammaCorrection: boolean;
|
|
15
|
+
}>;
|
|
16
|
+
private __loadMSCTranscoder;
|
|
17
|
+
private __getDeviceDependentParameters;
|
|
18
|
+
private __parse;
|
|
19
|
+
private __transcodeData;
|
|
20
|
+
private __hasAlpha;
|
|
21
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import Vector3 from '../foundation/math/Vector3';
|
|
2
|
-
import MutableMatrix44 from '../foundation/math/MutableMatrix44';
|
|
3
|
-
import { Index } from '../types/CommonTypes';
|
|
4
|
-
import Vector4 from '../foundation/math/Vector4';
|
|
5
|
-
export default class WebVRSystem {
|
|
6
|
-
private static __instance;
|
|
7
|
-
private __isWebVRMode;
|
|
8
|
-
private __webvrFrameData?;
|
|
9
|
-
private __webvrDisplay?;
|
|
10
|
-
private __requestedToEnterWebVR;
|
|
11
|
-
private __isReadyForWebVR;
|
|
12
|
-
private __vrDisplay?;
|
|
13
|
-
private __defaultUserSittingPositionInVR;
|
|
14
|
-
private __invertSittingToStandingTransform;
|
|
15
|
-
private __minRenderWidthFromUser;
|
|
16
|
-
private __minRenderHeightFromUser;
|
|
17
|
-
private __canvasWidthBackup;
|
|
18
|
-
private __canvasHeightBackup;
|
|
19
|
-
private __canvasWidthForVR;
|
|
20
|
-
private __canvasHeightForVR;
|
|
21
|
-
private __leftViewMatrix;
|
|
22
|
-
private __rightViewMatrix;
|
|
23
|
-
private __leftCameraEntity;
|
|
24
|
-
private __rightCameraEntity;
|
|
25
|
-
private constructor();
|
|
26
|
-
static getInstance(): WebVRSystem;
|
|
27
|
-
getFrameData(): void;
|
|
28
|
-
enterWebVR(initialUserSittingPositionIfStageParametersDoNotExist?: Vector3, minRenderWidth?: number, minRenderHeight?: number): Promise<void>;
|
|
29
|
-
readyForWebVR(requestButtonDom: HTMLElement): Promise<void>;
|
|
30
|
-
exitWebVR(): Promise<void>;
|
|
31
|
-
disableWebVR(): Promise<void>;
|
|
32
|
-
get isWebVRMode(): boolean;
|
|
33
|
-
get isReadyForWebVR(): boolean;
|
|
34
|
-
webVrSubmitFrame(): void;
|
|
35
|
-
get webVrFrameData(): VRFrameData | undefined;
|
|
36
|
-
get leftViewMatrix(): MutableMatrix44;
|
|
37
|
-
get rightViewMatrix(): MutableMatrix44;
|
|
38
|
-
get leftProjectionMatrix(): MutableMatrix44;
|
|
39
|
-
get rightProjectionMatrix(): MutableMatrix44;
|
|
40
|
-
getLeftViewport(originalViewport: Vector4): Vector4;
|
|
41
|
-
getRightViewport(originalViewport: Vector4): Vector4;
|
|
42
|
-
getViewMatrixAt(index: Index): MutableMatrix44;
|
|
43
|
-
getProjectMatrixAt(index: Index): MutableMatrix44;
|
|
44
|
-
getViewportAt(viewport: Vector4, index: Index): Vector4;
|
|
45
|
-
getCameraWorldPosition(): Vector3;
|
|
46
|
-
get vrDisplay(): VRDisplay | undefined;
|
|
47
|
-
setValuesToGlobalDataRepository(): void;
|
|
48
|
-
getCameraComponentSIDAt(index: Index): number;
|
|
49
|
-
get requestedToEnterWebVR(): boolean;
|
|
50
|
-
_setIsWebVRMode(): void;
|
|
51
|
-
getCanvasWidthForVr(): number;
|
|
52
|
-
getCanvasHeightForVr(): number;
|
|
53
|
-
preRender(): void;
|
|
54
|
-
postRender(): void;
|
|
55
|
-
}
|
|
1
|
+
import Vector3 from '../foundation/math/Vector3';
|
|
2
|
+
import MutableMatrix44 from '../foundation/math/MutableMatrix44';
|
|
3
|
+
import { Index } from '../types/CommonTypes';
|
|
4
|
+
import Vector4 from '../foundation/math/Vector4';
|
|
5
|
+
export default class WebVRSystem {
|
|
6
|
+
private static __instance;
|
|
7
|
+
private __isWebVRMode;
|
|
8
|
+
private __webvrFrameData?;
|
|
9
|
+
private __webvrDisplay?;
|
|
10
|
+
private __requestedToEnterWebVR;
|
|
11
|
+
private __isReadyForWebVR;
|
|
12
|
+
private __vrDisplay?;
|
|
13
|
+
private __defaultUserSittingPositionInVR;
|
|
14
|
+
private __invertSittingToStandingTransform;
|
|
15
|
+
private __minRenderWidthFromUser;
|
|
16
|
+
private __minRenderHeightFromUser;
|
|
17
|
+
private __canvasWidthBackup;
|
|
18
|
+
private __canvasHeightBackup;
|
|
19
|
+
private __canvasWidthForVR;
|
|
20
|
+
private __canvasHeightForVR;
|
|
21
|
+
private __leftViewMatrix;
|
|
22
|
+
private __rightViewMatrix;
|
|
23
|
+
private __leftCameraEntity;
|
|
24
|
+
private __rightCameraEntity;
|
|
25
|
+
private constructor();
|
|
26
|
+
static getInstance(): WebVRSystem;
|
|
27
|
+
getFrameData(): void;
|
|
28
|
+
enterWebVR(initialUserSittingPositionIfStageParametersDoNotExist?: Vector3, minRenderWidth?: number, minRenderHeight?: number): Promise<void>;
|
|
29
|
+
readyForWebVR(requestButtonDom: HTMLElement): Promise<void>;
|
|
30
|
+
exitWebVR(): Promise<void>;
|
|
31
|
+
disableWebVR(): Promise<void>;
|
|
32
|
+
get isWebVRMode(): boolean;
|
|
33
|
+
get isReadyForWebVR(): boolean;
|
|
34
|
+
webVrSubmitFrame(): void;
|
|
35
|
+
get webVrFrameData(): VRFrameData | undefined;
|
|
36
|
+
get leftViewMatrix(): MutableMatrix44;
|
|
37
|
+
get rightViewMatrix(): MutableMatrix44;
|
|
38
|
+
get leftProjectionMatrix(): MutableMatrix44;
|
|
39
|
+
get rightProjectionMatrix(): MutableMatrix44;
|
|
40
|
+
getLeftViewport(originalViewport: Vector4): Vector4;
|
|
41
|
+
getRightViewport(originalViewport: Vector4): Vector4;
|
|
42
|
+
getViewMatrixAt(index: Index): MutableMatrix44;
|
|
43
|
+
getProjectMatrixAt(index: Index): MutableMatrix44;
|
|
44
|
+
getViewportAt(viewport: Vector4, index: Index): Vector4;
|
|
45
|
+
getCameraWorldPosition(): Vector3;
|
|
46
|
+
get vrDisplay(): VRDisplay | undefined;
|
|
47
|
+
setValuesToGlobalDataRepository(): void;
|
|
48
|
+
getCameraComponentSIDAt(index: Index): number;
|
|
49
|
+
get requestedToEnterWebVR(): boolean;
|
|
50
|
+
_setIsWebVRMode(): void;
|
|
51
|
+
getCanvasWidthForVr(): number;
|
|
52
|
+
getCanvasHeightForVr(): number;
|
|
53
|
+
preRender(): void;
|
|
54
|
+
postRender(): void;
|
|
55
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { MotionController } from 'webxr-input-profiles/packages/motion-controllers/src/motionController';
|
|
2
|
-
import { XRFrame, XRInputSource } from 'webxr';
|
|
3
|
-
import Entity from '../foundation/core/Entity';
|
|
4
|
-
import { IMutableVector3 } from '../foundation/math/IVector';
|
|
5
|
-
import { IMutableQuaternion } from '../foundation/math/IQuaternion';
|
|
6
|
-
import MutableVector3 from '../foundation/math/MutableVector3';
|
|
7
|
-
import MutableScalar from '../foundation/math/MutableScalar';
|
|
8
|
-
declare type WebXRSystemViewerData = {
|
|
9
|
-
viewerTranslate: IMutableVector3;
|
|
10
|
-
viewerScale: MutableVector3;
|
|
11
|
-
viewerOrientation: IMutableQuaternion;
|
|
12
|
-
viewerAzimuthAngle: MutableScalar;
|
|
13
|
-
};
|
|
14
|
-
export declare function createMotionController(xrInputSource: XRInputSource, basePath: string, profilePriorities: string[]): Promise<Entity | undefined>;
|
|
15
|
-
export declare function updateGamePad(timestamp: number, xrFrame: XRFrame, viewerData: WebXRSystemViewerData): void;
|
|
16
|
-
export declare function updateMotionControllerModel(entity: Entity, motionController: MotionController): void;
|
|
17
|
-
export declare function getMotionController(xrInputSource: XRInputSource): MotionController | undefined;
|
|
18
|
-
export {};
|
|
1
|
+
import { MotionController } from 'webxr-input-profiles/packages/motion-controllers/src/motionController';
|
|
2
|
+
import { XRFrame, XRInputSource } from 'webxr';
|
|
3
|
+
import Entity from '../foundation/core/Entity';
|
|
4
|
+
import { IMutableVector3 } from '../foundation/math/IVector';
|
|
5
|
+
import { IMutableQuaternion } from '../foundation/math/IQuaternion';
|
|
6
|
+
import MutableVector3 from '../foundation/math/MutableVector3';
|
|
7
|
+
import MutableScalar from '../foundation/math/MutableScalar';
|
|
8
|
+
declare type WebXRSystemViewerData = {
|
|
9
|
+
viewerTranslate: IMutableVector3;
|
|
10
|
+
viewerScale: MutableVector3;
|
|
11
|
+
viewerOrientation: IMutableQuaternion;
|
|
12
|
+
viewerAzimuthAngle: MutableScalar;
|
|
13
|
+
};
|
|
14
|
+
export declare function createMotionController(xrInputSource: XRInputSource, basePath: string, profilePriorities: string[]): Promise<Entity | undefined>;
|
|
15
|
+
export declare function updateGamePad(timestamp: number, xrFrame: XRFrame, viewerData: WebXRSystemViewerData): void;
|
|
16
|
+
export declare function updateMotionControllerModel(entity: Entity, motionController: MotionController): void;
|
|
17
|
+
export declare function getMotionController(xrInputSource: XRInputSource): MotionController | undefined;
|
|
18
|
+
export {};
|
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
import Vector3 from '../foundation/math/Vector3';
|
|
2
|
-
import MutableMatrix44 from '../foundation/math/MutableMatrix44';
|
|
3
|
-
import { Index } from '../types/CommonTypes';
|
|
4
|
-
import Vector4 from '../foundation/math/Vector4';
|
|
5
|
-
import Entity from '../foundation/core/Entity';
|
|
6
|
-
import type { XRSession, XRFrame } from 'webxr';
|
|
7
|
-
export default class WebXRSystem {
|
|
8
|
-
private static __instance;
|
|
9
|
-
private __xrSession?;
|
|
10
|
-
private __xrReferenceSpace?;
|
|
11
|
-
private __webglLayer?;
|
|
12
|
-
private __glw?;
|
|
13
|
-
private __xrViewerPose?;
|
|
14
|
-
private __isWebXRMode;
|
|
15
|
-
private __spaceType;
|
|
16
|
-
private __requestedToEnterWebXR;
|
|
17
|
-
private __isReadyForWebXR;
|
|
18
|
-
private __defaultPositionInLocalSpaceMode;
|
|
19
|
-
private __canvasWidthForVR;
|
|
20
|
-
private __canvasHeightForVR;
|
|
21
|
-
private __viewerEntity;
|
|
22
|
-
private __leftCameraEntity;
|
|
23
|
-
private __rightCameraEntity;
|
|
24
|
-
private __basePath?;
|
|
25
|
-
private __controllerEntities;
|
|
26
|
-
private __xrInputSources;
|
|
27
|
-
private __viewerTranslate;
|
|
28
|
-
private __viewerAzimuthAngle;
|
|
29
|
-
private __viewerOrientation;
|
|
30
|
-
private __viewerScale;
|
|
31
|
-
private constructor();
|
|
32
|
-
/**
|
|
33
|
-
* Ready for WebXR
|
|
34
|
-
*
|
|
35
|
-
* @param requestButtonDom
|
|
36
|
-
* @returns true: prepared properly, false: failed to prepare
|
|
37
|
-
*/
|
|
38
|
-
readyForWebXR(requestButtonDom: HTMLElement, basePath: string): Promise<never[]>;
|
|
39
|
-
/**
|
|
40
|
-
* Enter to WebXR (VR mode)
|
|
41
|
-
* @param initialUserPosition the initial user position in world space
|
|
42
|
-
* @param callbackOnXrSessionEnd the callback function for XrSession ending
|
|
43
|
-
* @returns boolean value about succeeded or not
|
|
44
|
-
*/
|
|
45
|
-
enterWebXR({ initialUserPosition, callbackOnXrSessionEnd, profilePriorities }: {
|
|
46
|
-
initialUserPosition?: Vector3;
|
|
47
|
-
callbackOnXrSessionEnd: Function;
|
|
48
|
-
profilePriorities: string[];
|
|
49
|
-
}): Promise<true | Entity[] | undefined>;
|
|
50
|
-
/**
|
|
51
|
-
* exit from WebXR
|
|
52
|
-
*/
|
|
53
|
-
exitWebXR(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Disable WebXR (Close the XrSession)
|
|
56
|
-
*/
|
|
57
|
-
disableWebXR(): Promise<void>;
|
|
58
|
-
getCanvasWidthForVr(): number;
|
|
59
|
-
getCanvasHeightForVr(): number;
|
|
60
|
-
getControllerEntities(): Entity[];
|
|
61
|
-
get leftViewMatrix(): import("../foundation/math/Matrix44").default;
|
|
62
|
-
get rightViewMatrix(): import("../foundation/math/Matrix44").default;
|
|
63
|
-
get leftProjectionMatrix(): MutableMatrix44;
|
|
64
|
-
get rightProjectionMatrix(): MutableMatrix44;
|
|
65
|
-
get framebuffer(): WebGLFramebuffer | undefined;
|
|
66
|
-
get requestedToEnterWebXR(): boolean;
|
|
67
|
-
get xrSession(): XRSession | undefined;
|
|
68
|
-
get requestedToEnterWebVR(): boolean;
|
|
69
|
-
get isWebXRMode(): boolean;
|
|
70
|
-
get isReadyForWebXR(): boolean;
|
|
71
|
-
static getInstance(): WebXRSystem;
|
|
72
|
-
/**
|
|
73
|
-
* Getter of the view matrix of right eye
|
|
74
|
-
* @param index (0: left, 1: right)
|
|
75
|
-
* @private
|
|
76
|
-
* @returns The view matrix vector of right eye
|
|
77
|
-
*/
|
|
78
|
-
_getViewMatrixAt(index: Index): import("../foundation/math/Matrix44").default;
|
|
79
|
-
/**
|
|
80
|
-
* Getter of the project matrix of right eye
|
|
81
|
-
* @param index (0: left, 1: right)
|
|
82
|
-
* @private
|
|
83
|
-
* @returns The project matrix of right eye
|
|
84
|
-
*/
|
|
85
|
-
_getProjectMatrixAt(index: Index): MutableMatrix44;
|
|
86
|
-
/**
|
|
87
|
-
* Getter of the viewport vector
|
|
88
|
-
* @param index (0: left, 1: right)
|
|
89
|
-
* @private
|
|
90
|
-
* @returns the viewport vector
|
|
91
|
-
*/
|
|
92
|
-
_getViewportAt(index: Index): Vector4;
|
|
93
|
-
/**
|
|
94
|
-
* Getter of the viewport vector of left eye
|
|
95
|
-
* @private
|
|
96
|
-
* @returns The viewport vector of left eye
|
|
97
|
-
*/
|
|
98
|
-
_getLeftViewport(): Vector4;
|
|
99
|
-
/**
|
|
100
|
-
* Getter of the viewport vector of right eye
|
|
101
|
-
* @private
|
|
102
|
-
* @returns The viewport vector of right eye
|
|
103
|
-
*/
|
|
104
|
-
_getRightViewport(): Vector4;
|
|
105
|
-
_setValuesToGlobalDataRepository(): void;
|
|
106
|
-
/**
|
|
107
|
-
* Getter of the position of the VR camera in world space
|
|
108
|
-
* @private
|
|
109
|
-
* @param displayIdx (0: left, 1: right)
|
|
110
|
-
* @returns The position of the VR camera in world space
|
|
111
|
-
*/
|
|
112
|
-
_getCameraWorldPositionAt(displayIdx: Index): Vector3;
|
|
113
|
-
/**
|
|
114
|
-
* Getter of the CameraComponent SID of left/right eye
|
|
115
|
-
* @private
|
|
116
|
-
* @param index (0: left, 1: right)
|
|
117
|
-
* @returns the SID of the CameraComponent of left/right eye
|
|
118
|
-
*/
|
|
119
|
-
_getCameraComponentSIDAt(index: Index): number;
|
|
120
|
-
/**
|
|
121
|
-
* Pre process for rendering
|
|
122
|
-
* @private
|
|
123
|
-
* @param xrFrame XRFrame object
|
|
124
|
-
*/
|
|
125
|
-
_preRender(time: number, xrFrame: XRFrame): void;
|
|
126
|
-
/**
|
|
127
|
-
* Post process for rendering
|
|
128
|
-
* @private
|
|
129
|
-
*/
|
|
130
|
-
_postRender(): void;
|
|
131
|
-
private __onInputSourcesChange;
|
|
132
|
-
private __setCameraInfoFromXRViews;
|
|
133
|
-
private __setupWebGLLayer;
|
|
134
|
-
private __updateView;
|
|
135
|
-
private __updateInputSources;
|
|
136
|
-
}
|
|
1
|
+
import Vector3 from '../foundation/math/Vector3';
|
|
2
|
+
import MutableMatrix44 from '../foundation/math/MutableMatrix44';
|
|
3
|
+
import { Index } from '../types/CommonTypes';
|
|
4
|
+
import Vector4 from '../foundation/math/Vector4';
|
|
5
|
+
import Entity from '../foundation/core/Entity';
|
|
6
|
+
import type { XRSession, XRFrame } from 'webxr';
|
|
7
|
+
export default class WebXRSystem {
|
|
8
|
+
private static __instance;
|
|
9
|
+
private __xrSession?;
|
|
10
|
+
private __xrReferenceSpace?;
|
|
11
|
+
private __webglLayer?;
|
|
12
|
+
private __glw?;
|
|
13
|
+
private __xrViewerPose?;
|
|
14
|
+
private __isWebXRMode;
|
|
15
|
+
private __spaceType;
|
|
16
|
+
private __requestedToEnterWebXR;
|
|
17
|
+
private __isReadyForWebXR;
|
|
18
|
+
private __defaultPositionInLocalSpaceMode;
|
|
19
|
+
private __canvasWidthForVR;
|
|
20
|
+
private __canvasHeightForVR;
|
|
21
|
+
private __viewerEntity;
|
|
22
|
+
private __leftCameraEntity;
|
|
23
|
+
private __rightCameraEntity;
|
|
24
|
+
private __basePath?;
|
|
25
|
+
private __controllerEntities;
|
|
26
|
+
private __xrInputSources;
|
|
27
|
+
private __viewerTranslate;
|
|
28
|
+
private __viewerAzimuthAngle;
|
|
29
|
+
private __viewerOrientation;
|
|
30
|
+
private __viewerScale;
|
|
31
|
+
private constructor();
|
|
32
|
+
/**
|
|
33
|
+
* Ready for WebXR
|
|
34
|
+
*
|
|
35
|
+
* @param requestButtonDom
|
|
36
|
+
* @returns true: prepared properly, false: failed to prepare
|
|
37
|
+
*/
|
|
38
|
+
readyForWebXR(requestButtonDom: HTMLElement, basePath: string): Promise<never[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Enter to WebXR (VR mode)
|
|
41
|
+
* @param initialUserPosition the initial user position in world space
|
|
42
|
+
* @param callbackOnXrSessionEnd the callback function for XrSession ending
|
|
43
|
+
* @returns boolean value about succeeded or not
|
|
44
|
+
*/
|
|
45
|
+
enterWebXR({ initialUserPosition, callbackOnXrSessionEnd, profilePriorities }: {
|
|
46
|
+
initialUserPosition?: Vector3;
|
|
47
|
+
callbackOnXrSessionEnd: Function;
|
|
48
|
+
profilePriorities: string[];
|
|
49
|
+
}): Promise<true | Entity[] | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* exit from WebXR
|
|
52
|
+
*/
|
|
53
|
+
exitWebXR(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Disable WebXR (Close the XrSession)
|
|
56
|
+
*/
|
|
57
|
+
disableWebXR(): Promise<void>;
|
|
58
|
+
getCanvasWidthForVr(): number;
|
|
59
|
+
getCanvasHeightForVr(): number;
|
|
60
|
+
getControllerEntities(): Entity[];
|
|
61
|
+
get leftViewMatrix(): import("../foundation/math/Matrix44").default;
|
|
62
|
+
get rightViewMatrix(): import("../foundation/math/Matrix44").default;
|
|
63
|
+
get leftProjectionMatrix(): MutableMatrix44;
|
|
64
|
+
get rightProjectionMatrix(): MutableMatrix44;
|
|
65
|
+
get framebuffer(): WebGLFramebuffer | undefined;
|
|
66
|
+
get requestedToEnterWebXR(): boolean;
|
|
67
|
+
get xrSession(): XRSession | undefined;
|
|
68
|
+
get requestedToEnterWebVR(): boolean;
|
|
69
|
+
get isWebXRMode(): boolean;
|
|
70
|
+
get isReadyForWebXR(): boolean;
|
|
71
|
+
static getInstance(): WebXRSystem;
|
|
72
|
+
/**
|
|
73
|
+
* Getter of the view matrix of right eye
|
|
74
|
+
* @param index (0: left, 1: right)
|
|
75
|
+
* @private
|
|
76
|
+
* @returns The view matrix vector of right eye
|
|
77
|
+
*/
|
|
78
|
+
_getViewMatrixAt(index: Index): import("../foundation/math/Matrix44").default;
|
|
79
|
+
/**
|
|
80
|
+
* Getter of the project matrix of right eye
|
|
81
|
+
* @param index (0: left, 1: right)
|
|
82
|
+
* @private
|
|
83
|
+
* @returns The project matrix of right eye
|
|
84
|
+
*/
|
|
85
|
+
_getProjectMatrixAt(index: Index): MutableMatrix44;
|
|
86
|
+
/**
|
|
87
|
+
* Getter of the viewport vector
|
|
88
|
+
* @param index (0: left, 1: right)
|
|
89
|
+
* @private
|
|
90
|
+
* @returns the viewport vector
|
|
91
|
+
*/
|
|
92
|
+
_getViewportAt(index: Index): Vector4;
|
|
93
|
+
/**
|
|
94
|
+
* Getter of the viewport vector of left eye
|
|
95
|
+
* @private
|
|
96
|
+
* @returns The viewport vector of left eye
|
|
97
|
+
*/
|
|
98
|
+
_getLeftViewport(): Vector4;
|
|
99
|
+
/**
|
|
100
|
+
* Getter of the viewport vector of right eye
|
|
101
|
+
* @private
|
|
102
|
+
* @returns The viewport vector of right eye
|
|
103
|
+
*/
|
|
104
|
+
_getRightViewport(): Vector4;
|
|
105
|
+
_setValuesToGlobalDataRepository(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Getter of the position of the VR camera in world space
|
|
108
|
+
* @private
|
|
109
|
+
* @param displayIdx (0: left, 1: right)
|
|
110
|
+
* @returns The position of the VR camera in world space
|
|
111
|
+
*/
|
|
112
|
+
_getCameraWorldPositionAt(displayIdx: Index): Vector3;
|
|
113
|
+
/**
|
|
114
|
+
* Getter of the CameraComponent SID of left/right eye
|
|
115
|
+
* @private
|
|
116
|
+
* @param index (0: left, 1: right)
|
|
117
|
+
* @returns the SID of the CameraComponent of left/right eye
|
|
118
|
+
*/
|
|
119
|
+
_getCameraComponentSIDAt(index: Index): number;
|
|
120
|
+
/**
|
|
121
|
+
* Pre process for rendering
|
|
122
|
+
* @private
|
|
123
|
+
* @param xrFrame XRFrame object
|
|
124
|
+
*/
|
|
125
|
+
_preRender(time: number, xrFrame: XRFrame): void;
|
|
126
|
+
/**
|
|
127
|
+
* Post process for rendering
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
_postRender(): void;
|
|
131
|
+
private __onInputSourcesChange;
|
|
132
|
+
private __setCameraInfoFromXRViews;
|
|
133
|
+
private __setupWebGLLayer;
|
|
134
|
+
private __updateView;
|
|
135
|
+
private __updateInputSources;
|
|
136
|
+
}
|
package/dist/esm/xr/main.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import WebVRSystem from './WebVRSystem';
|
|
2
|
-
import WebXRSystem from './WebXRSystem';
|
|
3
|
-
declare const XR: Readonly<{
|
|
4
|
-
WebVRSystem: typeof WebVRSystem;
|
|
5
|
-
WebXRSystem: typeof WebXRSystem;
|
|
6
|
-
}>;
|
|
7
|
-
export default XR;
|
|
8
|
-
export declare type RnXR = typeof XR;
|
|
1
|
+
import WebVRSystem from './WebVRSystem';
|
|
2
|
+
import WebXRSystem from './WebXRSystem';
|
|
3
|
+
declare const XR: Readonly<{
|
|
4
|
+
WebVRSystem: typeof WebVRSystem;
|
|
5
|
+
WebXRSystem: typeof WebXRSystem;
|
|
6
|
+
}>;
|
|
7
|
+
export default XR;
|
|
8
|
+
export declare type RnXR = typeof XR;
|