@babylonjs/core 6.43.0 → 6.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Animations/animatable.js +2 -2
- package/Animations/animatable.js.map +1 -1
- package/Animations/animationGroup.d.ts +4 -2
- package/Animations/animationGroup.js +22 -2
- package/Animations/animationGroup.js.map +1 -1
- package/Buffers/buffer.d.ts +22 -22
- package/Buffers/buffer.js +16 -15
- package/Buffers/buffer.js.map +1 -1
- package/Cameras/camera.d.ts +5 -5
- package/Cameras/camera.js +19 -19
- package/Cameras/camera.js.map +1 -1
- package/Culling/ray.d.ts +12 -1
- package/Culling/ray.js +20 -3
- package/Culling/ray.js.map +1 -1
- package/Debug/skeletonViewer.d.ts +2 -0
- package/Debug/skeletonViewer.js +111 -50
- package/Debug/skeletonViewer.js.map +1 -1
- package/Engines/ICanvas.d.ts +2 -1
- package/Engines/ICanvas.js.map +1 -1
- package/Engines/constants.d.ts +96 -0
- package/Engines/constants.js +96 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +14 -3
- package/Engines/engine.js +11 -0
- package/Engines/engine.js.map +1 -1
- package/Engines/nullEngine.d.ts +2 -0
- package/Engines/nullEngine.js +3 -0
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/thinEngine.d.ts +4 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Gizmos/gizmo.d.ts +14 -0
- package/Gizmos/gizmo.js +16 -0
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/gizmoManager.d.ts +12 -0
- package/Gizmos/gizmoManager.js +26 -0
- package/Gizmos/gizmoManager.js.map +1 -1
- package/Gizmos/positionGizmo.d.ts +16 -2
- package/Gizmos/positionGizmo.js +12 -2
- package/Gizmos/positionGizmo.js.map +1 -1
- package/Gizmos/rotationGizmo.d.ts +8 -0
- package/Gizmos/rotationGizmo.js +9 -0
- package/Gizmos/rotationGizmo.js.map +1 -1
- package/Gizmos/scaleGizmo.d.ts +15 -1
- package/Gizmos/scaleGizmo.js +11 -1
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Inputs/scene.inputManager.js +2 -2
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/effectLayer.js +4 -4
- package/Layers/effectLayer.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +5 -5
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +16 -16
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +8 -8
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.js +2 -2
- package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +6 -6
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +2 -2
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +7 -7
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/bonesBlock.js +3 -3
- package/Materials/Node/Blocks/Vertex/bonesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +3 -3
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +50 -0
- package/Materials/Node/nodeMaterial.js +53 -3
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.js +3 -3
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +41 -41
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.js +10 -10
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.js +6 -6
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.js +6 -6
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +7 -7
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
- package/Materials/Textures/dynamicTexture.js +1 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/texture.js +1 -1
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/index.d.ts +1 -0
- package/Materials/index.js +1 -0
- package/Materials/index.js.map +1 -1
- package/Materials/material.decalMapConfiguration.js +3 -3
- package/Materials/material.decalMapConfiguration.js.map +1 -1
- package/Materials/material.detailMapConfiguration.js +3 -3
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.js +2 -2
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.d.ts +1 -4
- package/Materials/materialHelper.functions.d.ts +275 -0
- package/Materials/materialHelper.functions.js +823 -0
- package/Materials/materialHelper.functions.js.map +1 -0
- package/Materials/materialHelper.js +64 -589
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/materialPluginBase.d.ts +1 -1
- package/Materials/materialPluginBase.js +1 -1
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/shaderMaterial.js +8 -8
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.js +33 -33
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/Compression/dracoCompression.d.ts +23 -2
- package/Meshes/Compression/dracoCompression.js +76 -236
- package/Meshes/Compression/dracoCompression.js.map +1 -1
- package/Meshes/Compression/dracoCompressionWorker.d.ts +44 -0
- package/Meshes/Compression/dracoCompressionWorker.js +189 -0
- package/Meshes/Compression/dracoCompressionWorker.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +3 -1
- package/Meshes/GreasedLine/greasedLineBaseMesh.js +4 -2
- package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
- package/Meshes/Node/Blocks/geometryDistanceBlock.d.ts +30 -0
- package/Meshes/Node/Blocks/geometryDistanceBlock.js +63 -0
- package/Meshes/Node/Blocks/geometryDistanceBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryDotBlock.d.ts +30 -0
- package/Meshes/Node/Blocks/geometryDotBlock.js +63 -0
- package/Meshes/Node/Blocks/geometryDotBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryLengthBlock.d.ts +26 -0
- package/Meshes/Node/Blocks/geometryLengthBlock.js +52 -0
- package/Meshes/Node/Blocks/geometryLengthBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryPosterizeBlock.d.ts +31 -0
- package/Meshes/Node/Blocks/geometryPosterizeBlock.js +63 -0
- package/Meshes/Node/Blocks/geometryPosterizeBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryReplaceColorBlock.d.ts +38 -0
- package/Meshes/Node/Blocks/geometryReplaceColorBlock.js +88 -0
- package/Meshes/Node/Blocks/geometryReplaceColorBlock.js.map +1 -0
- package/Meshes/Node/Blocks/geometryRotate2dBlock.d.ts +30 -0
- package/Meshes/Node/Blocks/geometryRotate2dBlock.js +59 -0
- package/Meshes/Node/Blocks/geometryRotate2dBlock.js.map +1 -0
- package/Meshes/Node/index.d.ts +6 -0
- package/Meshes/Node/index.js +6 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/trailMesh.js +1 -1
- package/Meshes/trailMesh.js.map +1 -1
- package/Misc/basis.d.ts +6 -1
- package/Misc/basis.js +11 -231
- package/Misc/basis.js.map +1 -1
- package/Misc/basisWorker.d.ts +13 -0
- package/Misc/basisWorker.js +249 -0
- package/Misc/basisWorker.js.map +1 -0
- package/Misc/khronosTextureContainer2.d.ts +25 -3
- package/Misc/khronosTextureContainer2.js +35 -106
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/khronosTextureContainer2Worker.d.ts +12 -0
- package/Misc/khronosTextureContainer2Worker.js +136 -0
- package/Misc/khronosTextureContainer2Worker.js.map +1 -0
- package/Navigation/Plugins/recastJSPlugin.d.ts +1 -1
- package/Navigation/Plugins/recastJSPlugin.js.map +1 -1
- package/Particles/gpuParticleSystem.js +3 -3
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particleSystem.js +7 -3
- package/Particles/particleSystem.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +8 -0
- package/Physics/v2/IPhysicsEnginePlugin.js +9 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.d.ts +7 -1
- package/Physics/v2/Plugins/havokPlugin.js +19 -1
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js +2 -2
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/Rendering/depthRenderer.js +4 -4
- package/Rendering/depthRenderer.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +5 -5
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/outlineRenderer.js +4 -4
- package/Rendering/outlineRenderer.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +48 -0
- package/XR/features/Layers/WebXRCompositionLayer.js +94 -0
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -0
- package/XR/features/Layers/WebXRProjectionLayer.d.ts +10 -0
- package/XR/features/Layers/WebXRProjectionLayer.js +51 -0
- package/XR/features/Layers/WebXRProjectionLayer.js.map +1 -0
- package/XR/features/WebXRControllerPointerSelection.js +4 -1
- package/XR/features/WebXRControllerPointerSelection.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.js +11 -10
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/XR/features/WebXRHandTracking.d.ts +7 -1
- package/XR/features/WebXRHandTracking.js +28 -26
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/XR/features/WebXRLayers.d.ts +44 -26
- package/XR/features/WebXRLayers.js +204 -153
- package/XR/features/WebXRLayers.js.map +1 -1
- package/XR/features/WebXRNearInteraction.js +16 -1
- package/XR/features/WebXRNearInteraction.js.map +1 -1
- package/XR/webXRCamera.js +10 -0
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXRDefaultExperience.d.ts +9 -0
- package/XR/webXRDefaultExperience.js +8 -0
- package/XR/webXRDefaultExperience.js.map +1 -1
- package/XR/webXRExperienceHelper.js +1 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRFeaturesManager.js +8 -2
- package/XR/webXRFeaturesManager.js.map +1 -1
- package/XR/webXRLayerWrapper.d.ts +12 -3
- package/XR/webXRLayerWrapper.js +18 -2
- package/XR/webXRLayerWrapper.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.js +0 -5
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +9 -1
- package/XR/webXRSessionManager.js +24 -5
- package/XR/webXRSessionManager.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +13 -5
- package/scene.js +4 -4
- package/scene.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeletonViewer.js","sourceRoot":"","sources":["../../../../dev/core/src/Debug/skeletonViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMrD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;A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U,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;QACD,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;IAChC,CAAC;IAED,mCAAmC;IAC5B,OAAO;QACV,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YAC1B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SAC1B;QAED,IAAI,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;SAC7B;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;;AA17BD,oEAAoE;AAC7C,4BAAa,GAAG,CAAC,AAAJ,CAAK;AACzC,sEAAsE;AAC/C,8BAAe,GAAG,CAAC,AAAJ,CAAK;AAC3C,+EAA+E;AACxD,uCAAwB,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["import { Vector3, Matrix, TmpVectors } from \"../Maths/math.vector\";\r\nimport { Color3, Color4 } from \"../Maths/math.color\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Bone } from \"../Bones/bone\";\r\nimport type { Skeleton } from \"../Bones/skeleton\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport { Mesh } from \"../Meshes/mesh\";\r\nimport type { LinesMesh } from \"../Meshes/linesMesh\";\r\nimport { CreateLineSystem } from \"../Meshes/Builders/linesBuilder\";\r\nimport { UtilityLayerRenderer } from \"../Rendering/utilityLayerRenderer\";\r\nimport { Material } from \"../Materials/material\";\r\nimport { ShaderMaterial } from \"../Materials/shaderMaterial\";\r\nimport { DynamicTexture } from \"../Materials/Textures/dynamicTexture\";\r\nimport { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { Effect } from \"../Materials/effect\";\r\n\r\nimport type { ISkeletonViewerOptions, IBoneWeightShaderOptions, ISkeletonMapShaderOptions, ISkeletonMapShaderColorMapKnot } from \"./ISkeletonViewer\";\r\nimport type { Observer } from \"../Misc/observable\";\r\n\r\nimport { CreateSphere } from \"../Meshes/Builders/sphereBuilder\";\r\nimport { ExtrudeShapeCustom } from \"../Meshes/Builders/shapeBuilder\";\r\nimport { TransformNode } from \"../Meshes/transformNode\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\n/**\r\n * Class used to render a debug view of a given skeleton\r\n * @see http://www.babylonjs-playground.com/#1BZJVJ#8\r\n */\r\nexport class SkeletonViewer {\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES */\r\n public static readonly DISPLAY_LINES = 0;\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES */\r\n public static readonly DISPLAY_SPHERES = 1;\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */\r\n public static readonly DISPLAY_SPHERE_AND_SPURS = 2;\r\n\r\n /** public static method to create a BoneWeight Shader\r\n * @param options The constructor options\r\n * @param scene The scene that the shader is scoped to\r\n * @returns The created ShaderMaterial\r\n * @see http://www.babylonjs-playground.com/#1BZJVJ#395\r\n */\r\n static CreateBoneWeightShader(options: IBoneWeightShaderOptions, scene: Scene): ShaderMaterial {\r\n const skeleton: Skeleton = options.skeleton;\r\n const colorBase: Color3 = options.colorBase ?? Color3.Black();\r\n const colorZero: Color3 = options.colorZero ?? Color3.Blue();\r\n const colorQuarter: Color3 = options.colorQuarter ?? Color3.Green();\r\n const colorHalf: Color3 = options.colorHalf ?? Color3.Yellow();\r\n const colorFull: Color3 = options.colorFull ?? Color3.Red();\r\n const targetBoneIndex: number = options.targetBoneIndex ?? 0;\r\n\r\n Effect.ShadersStore[\"boneWeights:\" + skeleton.name + \"VertexShader\"] = `precision highp float;\r\n\r\n attribute vec3 position;\r\n attribute vec2 uv;\r\n\r\n uniform mat4 view;\r\n uniform mat4 projection;\r\n uniform mat4 worldViewProjection;\r\n\r\n #include<bonesDeclaration>\r\n #if NUM_BONE_INFLUENCERS == 0\r\n attribute vec4 matricesIndices;\r\n attribute vec4 matricesWeights;\r\n #endif\r\n #include<bakedVertexAnimationDeclaration>\r\n\r\n #include<instancesDeclaration>\r\n\r\n varying vec3 vColor;\r\n\r\n uniform vec3 colorBase;\r\n uniform vec3 colorZero;\r\n uniform vec3 colorQuarter;\r\n uniform vec3 colorHalf;\r\n uniform vec3 colorFull;\r\n\r\n uniform float targetBoneIndex;\r\n\r\n void main() {\r\n vec3 positionUpdated = position;\r\n\r\n #include<instancesVertex>\r\n #include<bonesVertex>\r\n #include<bakedVertexAnimation>\r\n\r\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\r\n\r\n vec3 color = colorBase;\r\n float totalWeight = 0.;\r\n if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){\r\n totalWeight += matricesWeights[0];\r\n }\r\n if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){\r\n totalWeight += matricesWeights[1];\r\n }\r\n if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){\r\n totalWeight += matricesWeights[2];\r\n }\r\n if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){\r\n totalWeight += matricesWeights[3];\r\n }\r\n\r\n color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight));\r\n color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight));\r\n color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight));\r\n color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight));\r\n vColor = color;\r\n\r\n gl_Position = projection * view * worldPos;\r\n }`;\r\n Effect.ShadersStore[\"boneWeights:\" + skeleton.name + \"FragmentShader\"] = `\r\n precision highp float;\r\n varying vec3 vPosition;\r\n\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec4 color = vec4(vColor, 1.0);\r\n gl_FragColor = color;\r\n }\r\n `;\r\n const shader: ShaderMaterial = new ShaderMaterial(\r\n \"boneWeight:\" + skeleton.name,\r\n scene,\r\n {\r\n vertex: \"boneWeights:\" + skeleton.name,\r\n fragment: \"boneWeights:\" + skeleton.name,\r\n },\r\n {\r\n attributes: [\"position\", \"normal\", \"matricesIndices\", \"matricesWeights\"],\r\n uniforms: [\r\n \"world\",\r\n \"worldView\",\r\n \"worldViewProjection\",\r\n \"view\",\r\n \"projection\",\r\n \"viewProjection\",\r\n \"colorBase\",\r\n \"colorZero\",\r\n \"colorQuarter\",\r\n \"colorHalf\",\r\n \"colorFull\",\r\n \"targetBoneIndex\",\r\n ],\r\n }\r\n );\r\n\r\n shader.setColor3(\"colorBase\", colorBase);\r\n shader.setColor3(\"colorZero\", colorZero);\r\n shader.setColor3(\"colorQuarter\", colorQuarter);\r\n shader.setColor3(\"colorHalf\", colorHalf);\r\n shader.setColor3(\"colorFull\", colorFull);\r\n shader.setFloat(\"targetBoneIndex\", targetBoneIndex);\r\n\r\n shader.getClassName = (): string => {\r\n return \"BoneWeightShader\";\r\n };\r\n\r\n shader.transparencyMode = Material.MATERIAL_OPAQUE;\r\n\r\n return shader;\r\n }\r\n\r\n /** public static method to create a BoneWeight Shader\r\n * @param options The constructor options\r\n * @param scene The scene that the shader is scoped to\r\n * @returns The created ShaderMaterial\r\n */\r\n static CreateSkeletonMapShader(options: ISkeletonMapShaderOptions, scene: Scene) {\r\n const skeleton: Skeleton = options.skeleton;\r\n const colorMap: ISkeletonMapShaderColorMapKnot[] = options.colorMap ?? [\r\n {\r\n color: new Color3(1, 0.38, 0.18),\r\n location: 0,\r\n },\r\n {\r\n color: new Color3(0.59, 0.18, 1.0),\r\n location: 0.2,\r\n },\r\n {\r\n color: new Color3(0.59, 1, 0.18),\r\n location: 0.4,\r\n },\r\n {\r\n color: new Color3(1, 0.87, 0.17),\r\n location: 0.6,\r\n },\r\n {\r\n color: new Color3(1, 0.17, 0.42),\r\n location: 0.8,\r\n },\r\n {\r\n color: new Color3(0.17, 0.68, 1.0),\r\n location: 1.0,\r\n },\r\n ];\r\n\r\n const bufferWidth: number = skeleton.bones.length + 1;\r\n const colorMapBuffer: number[] = SkeletonViewer._CreateBoneMapColorBuffer(bufferWidth, colorMap, scene);\r\n const shader = new ShaderMaterial(\r\n \"boneWeights:\" + skeleton.name,\r\n scene,\r\n {\r\n vertexSource:\r\n `precision highp float;\r\n\r\n attribute vec3 position;\r\n attribute vec2 uv;\r\n\r\n uniform mat4 view;\r\n uniform mat4 projection;\r\n uniform mat4 worldViewProjection;\r\n uniform float colorMap[` +\r\n skeleton.bones.length * 4 +\r\n `];\r\n\r\n #include<bonesDeclaration>\r\n #if NUM_BONE_INFLUENCERS == 0\r\n attribute vec4 matricesIndices;\r\n attribute vec4 matricesWeights;\r\n #endif\r\n #include<bakedVertexAnimationDeclaration>\r\n #include<instancesDeclaration>\r\n\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec3 positionUpdated = position;\r\n\r\n #include<instancesVertex>\r\n #include<bonesVertex>\r\n #include<bakedVertexAnimation>\r\n\r\n vec3 color = vec3(0.);\r\n bool first = true;\r\n\r\n for (int i = 0; i < 4; i++) {\r\n int boneIdx = int(matricesIndices[i]);\r\n float boneWgt = matricesWeights[i];\r\n\r\n vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]);\r\n\r\n if (boneWgt > 0.) {\r\n if (first) {\r\n first = false;\r\n color = c;\r\n } else {\r\n color = mix(color, c, boneWgt);\r\n }\r\n }\r\n }\r\n\r\n vColor = color;\r\n\r\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\r\n\r\n gl_Position = projection * view * worldPos;\r\n }`,\r\n fragmentSource: `\r\n precision highp float;\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec4 color = vec4( vColor, 1.0 );\r\n gl_FragColor = color;\r\n }\r\n `,\r\n },\r\n {\r\n attributes: [\"position\", \"normal\", \"matricesIndices\", \"matricesWeights\"],\r\n uniforms: [\"world\", \"worldView\", \"worldViewProjection\", \"view\", \"projection\", \"viewProjection\", \"colorMap\"],\r\n }\r\n );\r\n\r\n shader.setFloats(\"colorMap\", colorMapBuffer);\r\n\r\n shader.getClassName = (): string => {\r\n return \"SkeletonMapShader\";\r\n };\r\n\r\n shader.transparencyMode = Material.MATERIAL_OPAQUE;\r\n\r\n return shader;\r\n }\r\n\r\n /** private static method to create a BoneWeight Shader\r\n * @param size The size of the buffer to create (usually the bone count)\r\n * @param colorMap The gradient data to generate\r\n * @param scene The scene that the shader is scoped to\r\n * @returns an Array of floats from the color gradient values\r\n */\r\n private static _CreateBoneMapColorBuffer(size: number, colorMap: ISkeletonMapShaderColorMapKnot[], scene: Scene) {\r\n const tempGrad = new DynamicTexture(\"temp\", { width: size, height: 1 }, scene, false);\r\n const ctx = tempGrad.getContext();\r\n const grad = ctx.createLinearGradient(0, 0, size, 0);\r\n\r\n colorMap.forEach((stop) => {\r\n grad.addColorStop(stop.location, stop.color.toHexString());\r\n });\r\n\r\n ctx.fillStyle = grad;\r\n ctx.fillRect(0, 0, size, 1);\r\n tempGrad.update();\r\n const buffer: number[] = [];\r\n const data: Uint8ClampedArray = ctx.getImageData(0, 0, size, 1).data;\r\n const rUnit = 1 / 255;\r\n for (let i = 0; i < data.length; i++) {\r\n buffer.push(data[i] * rUnit);\r\n }\r\n tempGrad.dispose();\r\n return buffer;\r\n }\r\n\r\n /** If SkeletonViewer scene scope. */\r\n private _scene: Scene;\r\n\r\n /** Gets or sets the color used to render the skeleton */\r\n public color: Color3 = Color3.White();\r\n\r\n /** Array of the points of the skeleton fo the line view. */\r\n private _debugLines = new Array<Array<Vector3>>();\r\n\r\n /** The SkeletonViewers Mesh. */\r\n private _debugMesh: Nullable<LinesMesh>;\r\n\r\n /** The local axes Meshes. */\r\n private _localAxes: Nullable<LinesMesh> = null;\r\n\r\n /** If SkeletonViewer is enabled. */\r\n private _isEnabled = true;\r\n\r\n /** If SkeletonViewer is ready. */\r\n private _ready: boolean;\r\n\r\n /** SkeletonViewer render observable. */\r\n private _obs: Nullable<Observer<Scene>> = null;\r\n\r\n /** The Utility Layer to render the gizmos in. */\r\n private _utilityLayer: Nullable<UtilityLayerRenderer>;\r\n\r\n private _boneIndices: Set<number>;\r\n\r\n /** Gets the Scene. */\r\n get scene(): Scene {\r\n return this._scene;\r\n }\r\n /** Gets the utilityLayer. */\r\n get utilityLayer(): Nullable<UtilityLayerRenderer> {\r\n return this._utilityLayer;\r\n }\r\n /** Checks Ready Status. */\r\n get isReady(): Boolean {\r\n return this._ready;\r\n }\r\n /** Sets Ready Status. */\r\n set ready(value: boolean) {\r\n this._ready = value;\r\n }\r\n /** Gets the debugMesh */\r\n get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh> {\r\n return this._debugMesh;\r\n }\r\n /** Sets the debugMesh */\r\n set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>) {\r\n this._debugMesh = value as any;\r\n }\r\n /** Gets the displayMode */\r\n get displayMode(): number {\r\n return this.options.displayMode || SkeletonViewer.DISPLAY_LINES;\r\n }\r\n /** Sets the displayMode */\r\n set displayMode(value: number) {\r\n if (value > SkeletonViewer.DISPLAY_SPHERE_AND_SPURS) {\r\n value = SkeletonViewer.DISPLAY_LINES;\r\n }\r\n this.options.displayMode = value;\r\n }\r\n /**\r\n * Creates a new SkeletonViewer\r\n * @param skeleton defines the skeleton to render\r\n * @param mesh defines the mesh attached to the skeleton\r\n * @param scene defines the hosting scene\r\n * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)\r\n * @param renderingGroupId defines the rendering group id to use with the viewer\r\n * @param options All of the extra constructor options for the SkeletonViewer\r\n */\r\n constructor(\r\n /** defines the skeleton to render */\r\n public skeleton: Skeleton,\r\n /** defines the mesh attached to the skeleton */\r\n public mesh: Nullable<AbstractMesh>,\r\n /** The Scene scope*/\r\n scene: Scene,\r\n /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default) */\r\n public autoUpdateBonesMatrices: boolean = true,\r\n /** defines the rendering group id to use with the viewer */\r\n public renderingGroupId: number = 3,\r\n /** is the options for the viewer */\r\n public options: Partial<ISkeletonViewerOptions> = {}\r\n ) {\r\n this._scene = scene;\r\n this._ready = false;\r\n\r\n //Defaults\r\n options.pauseAnimations = options.pauseAnimations ?? true;\r\n options.returnToRest = options.returnToRest ?? false;\r\n options.displayMode = options.displayMode ?? SkeletonViewer.DISPLAY_LINES;\r\n options.displayOptions = options.displayOptions ?? {};\r\n options.displayOptions.midStep = options.displayOptions.midStep ?? 0.235;\r\n options.displayOptions.midStepFactor = options.displayOptions.midStepFactor ?? 0.155;\r\n options.displayOptions.sphereBaseSize = options.displayOptions.sphereBaseSize ?? 0.15;\r\n options.displayOptions.sphereScaleUnit = options.displayOptions.sphereScaleUnit ?? 2;\r\n options.displayOptions.sphereFactor = options.displayOptions.sphereFactor ?? 0.865;\r\n options.displayOptions.spurFollowsChild = options.displayOptions.spurFollowsChild ?? false;\r\n options.displayOptions.showLocalAxes = options.displayOptions.showLocalAxes ?? false;\r\n options.displayOptions.localAxesSize = options.displayOptions.localAxesSize ?? 0.075;\r\n options.computeBonesUsingShaders = options.computeBonesUsingShaders ?? true;\r\n options.useAllBones = options.useAllBones ?? true;\r\n\r\n this._boneIndices = new Set();\r\n\r\n if (!options.useAllBones) {\r\n const initialMeshBoneIndices = mesh?.getVerticesData(VertexBuffer.MatricesIndicesKind);\r\n const initialMeshBoneWeights = mesh?.getVerticesData(VertexBuffer.MatricesWeightsKind);\r\n\r\n if (initialMeshBoneIndices && initialMeshBoneWeights) {\r\n for (let i = 0; i < initialMeshBoneIndices.length; ++i) {\r\n const index = initialMeshBoneIndices[i],\r\n weight = initialMeshBoneWeights[i];\r\n if (weight !== 0) {\r\n this._boneIndices.add(index);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* Create Utility Layer */\r\n this._utilityLayer = new UtilityLayerRenderer(this._scene, false);\r\n this._utilityLayer.pickUtilitySceneFirst = false;\r\n this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil = true;\r\n\r\n let displayMode = this.options.displayMode || 0;\r\n if (displayMode > SkeletonViewer.DISPLAY_SPHERE_AND_SPURS) {\r\n displayMode = SkeletonViewer.DISPLAY_LINES;\r\n }\r\n this.displayMode = displayMode;\r\n //Prep the Systems\r\n this.update();\r\n this._bindObs();\r\n }\r\n\r\n /** The Dynamic bindings for the update functions */\r\n private _bindObs(): void {\r\n switch (this.displayMode) {\r\n case SkeletonViewer.DISPLAY_LINES: {\r\n this._obs = this.scene.onBeforeRenderObservable.add(() => {\r\n this._displayLinesUpdate();\r\n });\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /** Update the viewer to sync with current skeleton state, only used to manually update. */\r\n public update(): void {\r\n switch (this.displayMode) {\r\n case SkeletonViewer.DISPLAY_LINES: {\r\n this._displayLinesUpdate();\r\n break;\r\n }\r\n case SkeletonViewer.DISPLAY_SPHERES: {\r\n this._buildSpheresAndSpurs(true);\r\n break;\r\n }\r\n case SkeletonViewer.DISPLAY_SPHERE_AND_SPURS: {\r\n this._buildSpheresAndSpurs(false);\r\n break;\r\n }\r\n }\r\n\r\n this._buildLocalAxes();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the viewer is enabled */\r\n public set isEnabled(value: boolean) {\r\n if (this.isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n\r\n if (this.debugMesh) {\r\n this.debugMesh.setEnabled(value);\r\n }\r\n\r\n if (value && !this._obs) {\r\n this._bindObs();\r\n } else if (!value && this._obs) {\r\n this.scene.onBeforeRenderObservable.remove(this._obs);\r\n this._obs = null;\r\n }\r\n }\r\n\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n private _getBonePosition(position: Vector3, bone: Bone, meshMat: Matrix, x = 0, y = 0, z = 0): void {\r\n const tmat = TmpVectors.Matrix[0];\r\n const parentBone = bone.getParent();\r\n tmat.copyFrom(bone.getLocalMatrix());\r\n\r\n if (x !== 0 || y !== 0 || z !== 0) {\r\n const tmat2 = TmpVectors.Matrix[1];\r\n Matrix.IdentityToRef(tmat2);\r\n tmat2.setTranslationFromFloats(x, y, z);\r\n tmat2.multiplyToRef(tmat, tmat);\r\n }\r\n\r\n if (parentBone) {\r\n tmat.multiplyToRef(parentBone.getAbsoluteMatrix(), tmat);\r\n }\r\n\r\n tmat.multiplyToRef(meshMat, tmat);\r\n\r\n position.x = tmat.m[12];\r\n position.y = tmat.m[13];\r\n position.z = tmat.m[14];\r\n }\r\n\r\n private _getLinesForBonesWithLength(bones: Bone[], mesh: Nullable<AbstractMesh>): void {\r\n const len = bones.length;\r\n\r\n let matrix;\r\n let meshPos;\r\n if (mesh) {\r\n matrix = mesh.getWorldMatrix();\r\n meshPos = mesh.position;\r\n } else {\r\n matrix = new Matrix();\r\n meshPos = bones[0].position;\r\n }\r\n let idx = 0;\r\n for (let i = 0; i < len; i++) {\r\n const bone = bones[i];\r\n let points = this._debugLines[idx];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n if (!points) {\r\n points = [Vector3.Zero(), Vector3.Zero()];\r\n this._debugLines[idx] = points;\r\n }\r\n this._getBonePosition(points[0], bone, matrix);\r\n this._getBonePosition(points[1], bone, matrix, 0, bone.length, 0);\r\n points[0].subtractInPlace(meshPos);\r\n points[1].subtractInPlace(meshPos);\r\n idx++;\r\n }\r\n }\r\n\r\n private _getLinesForBonesNoLength(bones: Bone[]): void {\r\n const len = bones.length;\r\n let boneNum = 0;\r\n\r\n const mesh = this.mesh;\r\n let transformNode;\r\n let meshPos;\r\n if (mesh) {\r\n transformNode = mesh;\r\n meshPos = mesh.position;\r\n } else {\r\n transformNode = new TransformNode(\"\");\r\n meshPos = bones[0].position;\r\n }\r\n for (let i = len - 1; i >= 0; i--) {\r\n const childBone = bones[i];\r\n const parentBone = childBone.getParent();\r\n if (!parentBone || (!this._boneIndices.has(childBone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n let points = this._debugLines[boneNum];\r\n if (!points) {\r\n points = [Vector3.Zero(), Vector3.Zero()];\r\n this._debugLines[boneNum] = points;\r\n }\r\n childBone.getAbsolutePositionToRef(transformNode, points[0]);\r\n parentBone.getAbsolutePositionToRef(transformNode, points[1]);\r\n points[0].subtractInPlace(meshPos);\r\n points[1].subtractInPlace(meshPos);\r\n boneNum++;\r\n }\r\n if (!mesh) {\r\n transformNode.dispose();\r\n }\r\n }\r\n\r\n /**\r\n * function to revert the mesh and scene back to the initial state.\r\n * @param animationState\r\n */\r\n private _revert(animationState: boolean): void {\r\n if (this.options.pauseAnimations) {\r\n this.scene.animationsEnabled = animationState;\r\n this.utilityLayer!.utilityLayerScene!.animationsEnabled = animationState;\r\n }\r\n }\r\n\r\n /**\r\n * function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy.\r\n * @param bone\r\n * @param matrix\r\n */\r\n private _getAbsoluteBindPoseToRef(bone: Nullable<Bone>, matrix: Matrix) {\r\n if (bone === null || bone._index === -1) {\r\n matrix.copyFrom(Matrix.Identity());\r\n return;\r\n }\r\n\r\n this._getAbsoluteBindPoseToRef(bone.getParent(), matrix);\r\n bone.getBindMatrix().multiplyToRef(matrix, matrix);\r\n return;\r\n }\r\n\r\n /**\r\n * function to build and bind sphere joint points and spur bone representations.\r\n * @param spheresOnly\r\n */\r\n private _buildSpheresAndSpurs(spheresOnly = true): void {\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n\r\n this._ready = false;\r\n const utilityLayerScene = this.utilityLayer?.utilityLayerScene!;\r\n const bones: Bone[] = this.skeleton.bones;\r\n const spheres: Array<[Mesh, Bone]> = [];\r\n const spurs: Mesh[] = [];\r\n\r\n const animationState = this.scene.animationsEnabled;\r\n\r\n try {\r\n if (this.options.pauseAnimations) {\r\n this.scene.animationsEnabled = false;\r\n utilityLayerScene.animationsEnabled = false;\r\n }\r\n\r\n if (this.options.returnToRest) {\r\n this.skeleton.returnToRest();\r\n }\r\n\r\n if (this.autoUpdateBonesMatrices) {\r\n this.skeleton.computeAbsoluteMatrices();\r\n }\r\n\r\n let longestBoneLength = Number.NEGATIVE_INFINITY;\r\n const displayOptions = this.options.displayOptions || {};\r\n\r\n for (let i = 0; i < bones.length; i++) {\r\n const bone = bones[i];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n\r\n const boneAbsoluteBindPoseTransform = new Matrix();\r\n this._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);\r\n\r\n const anchorPoint = new Vector3();\r\n\r\n boneAbsoluteBindPoseTransform.decompose(undefined, undefined, anchorPoint);\r\n\r\n bone.children.forEach((bc) => {\r\n const childAbsoluteBindPoseTransform: Matrix = new Matrix();\r\n bc.getLocalMatrix().multiplyToRef(boneAbsoluteBindPoseTransform, childAbsoluteBindPoseTransform);\r\n const childPoint = new Vector3();\r\n childAbsoluteBindPoseTransform.decompose(undefined, undefined, childPoint);\r\n const distanceFromParent = Vector3.Distance(anchorPoint, childPoint);\r\n if (distanceFromParent > longestBoneLength) {\r\n longestBoneLength = distanceFromParent;\r\n }\r\n if (spheresOnly) {\r\n return;\r\n }\r\n\r\n const dir = childPoint.clone().subtract(anchorPoint.clone());\r\n const h = dir.length();\r\n const up = dir.normalize().scale(h);\r\n\r\n const midStep = displayOptions.midStep || 0.165;\r\n const midStepFactor = displayOptions.midStepFactor || 0.215;\r\n\r\n const up0 = up.scale(midStep);\r\n\r\n const spur = ExtrudeShapeCustom(\r\n \"skeletonViewer\",\r\n {\r\n shape: [new Vector3(1, -1, 0), new Vector3(1, 1, 0), new Vector3(-1, 1, 0), new Vector3(-1, -1, 0), new Vector3(1, -1, 0)],\r\n path: [Vector3.Zero(), up0, up],\r\n scaleFunction: (i: number) => {\r\n switch (i) {\r\n case 0:\r\n case 2:\r\n return 0;\r\n case 1:\r\n return h * midStepFactor;\r\n }\r\n return 0;\r\n },\r\n sideOrientation: Mesh.DEFAULTSIDE,\r\n updatable: false,\r\n },\r\n utilityLayerScene\r\n );\r\n\r\n const numVertices = spur.getTotalVertices();\r\n const mwk: number[] = [],\r\n mik: number[] = [];\r\n\r\n for (let i = 0; i < numVertices; i++) {\r\n mwk.push(1, 0, 0, 0);\r\n\r\n // Select verts at end of spur (ie vert 10 to 14) and bind to child\r\n // bone if spurFollowsChild is enabled.\r\n if (displayOptions.spurFollowsChild && i > 9) {\r\n mik.push(bc.getIndex(), 0, 0, 0);\r\n } else {\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n }\r\n\r\n spur.position = anchorPoint.clone();\r\n\r\n spur.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n spur.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n spur.convertToFlatShadedMesh();\r\n\r\n spurs.push(spur);\r\n });\r\n\r\n const sphereBaseSize = displayOptions.sphereBaseSize || 0.2;\r\n\r\n const sphere = CreateSphere(\r\n \"skeletonViewer\",\r\n {\r\n segments: 6,\r\n diameter: sphereBaseSize,\r\n updatable: true,\r\n },\r\n utilityLayerScene\r\n );\r\n\r\n const numVertices = sphere.getTotalVertices();\r\n\r\n const mwk: number[] = [],\r\n mik: number[] = [];\r\n\r\n for (let i = 0; i < numVertices; i++) {\r\n mwk.push(1, 0, 0, 0);\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n\r\n sphere.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n sphere.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n\r\n sphere.position = anchorPoint.clone();\r\n spheres.push([sphere, bone]);\r\n }\r\n\r\n const sphereScaleUnit = displayOptions.sphereScaleUnit || 2;\r\n const sphereFactor = displayOptions.sphereFactor || 0.85;\r\n\r\n const meshes = [];\r\n for (let i = 0; i < spheres.length; i++) {\r\n const [sphere, bone] = spheres[i];\r\n const scale = 1 / (sphereScaleUnit / longestBoneLength);\r\n\r\n let _stepsOut = 0;\r\n let _b = bone;\r\n\r\n while (_b.getParent() && (_b.getParent() as Bone).getIndex() !== -1) {\r\n _stepsOut++;\r\n _b = _b.getParent() as Bone;\r\n }\r\n sphere.scaling.scaleInPlace(scale * Math.pow(sphereFactor, _stepsOut));\r\n meshes.push(sphere);\r\n }\r\n\r\n this.debugMesh = Mesh.MergeMeshes(meshes.concat(spurs), true, true);\r\n if (this.debugMesh) {\r\n this.debugMesh.renderingGroupId = this.renderingGroupId;\r\n this.debugMesh.skeleton = this.skeleton;\r\n this.debugMesh.parent = this.mesh;\r\n this.debugMesh.computeBonesUsingShaders = this.options.computeBonesUsingShaders ?? true;\r\n this.debugMesh.alwaysSelectAsActiveMesh = true;\r\n }\r\n\r\n const light = this.utilityLayer!._getSharedGizmoLight();\r\n light.intensity = 0.7;\r\n\r\n this._revert(animationState);\r\n this.ready = true;\r\n } catch (err) {\r\n Logger.Error(err);\r\n this._revert(animationState);\r\n this.dispose();\r\n }\r\n }\r\n\r\n private _buildLocalAxes(): void {\r\n if (this._localAxes) {\r\n this._localAxes.dispose();\r\n }\r\n\r\n this._localAxes = null;\r\n\r\n const displayOptions = this.options.displayOptions || {};\r\n\r\n if (!displayOptions.showLocalAxes) {\r\n return;\r\n }\r\n\r\n const targetScene = this._utilityLayer!.utilityLayerScene;\r\n const size = displayOptions.localAxesSize || 0.075;\r\n const lines = [];\r\n const colors = [];\r\n const red = new Color4(1, 0, 0, 1);\r\n const green = new Color4(0, 1, 0, 1);\r\n const blue = new Color4(0, 0, 1, 1);\r\n\r\n const mwk: number[] = [];\r\n const mik: number[] = [];\r\n const vertsPerBone = 6;\r\n\r\n for (const i in this.skeleton.bones) {\r\n const bone = this.skeleton.bones[i];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n\r\n const boneAbsoluteBindPoseTransform = new Matrix();\r\n const boneOrigin = new Vector3();\r\n\r\n this._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);\r\n boneAbsoluteBindPoseTransform.decompose(undefined, TmpVectors.Quaternion[0], boneOrigin);\r\n\r\n const m = new Matrix();\r\n TmpVectors.Quaternion[0].toRotationMatrix(m);\r\n\r\n const boneAxisX = Vector3.TransformCoordinates(new Vector3(0 + size, 0, 0), m);\r\n const boneAxisY = Vector3.TransformCoordinates(new Vector3(0, 0 + size, 0), m);\r\n const boneAxisZ = Vector3.TransformCoordinates(new Vector3(0, 0, 0 + size), m);\r\n\r\n const axisX = [boneOrigin, boneOrigin.add(boneAxisX)];\r\n const axisY = [boneOrigin, boneOrigin.add(boneAxisY)];\r\n const axisZ = [boneOrigin, boneOrigin.add(boneAxisZ)];\r\n\r\n const linePoints = [axisX, axisY, axisZ];\r\n const lineColors = [\r\n [red, red],\r\n [green, green],\r\n [blue, blue],\r\n ];\r\n\r\n lines.push(...linePoints);\r\n colors.push(...lineColors);\r\n\r\n for (let j = 0; j < vertsPerBone; j++) {\r\n mwk.push(1, 0, 0, 0);\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n }\r\n\r\n this._localAxes = CreateLineSystem(\"localAxes\", { lines: lines, colors: colors, updatable: true }, targetScene);\r\n this._localAxes.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n this._localAxes.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n this._localAxes.skeleton = this.skeleton;\r\n this._localAxes.renderingGroupId = this.renderingGroupId + 1;\r\n this._localAxes.parent = this.mesh;\r\n this._localAxes.computeBonesUsingShaders = this.options.computeBonesUsingShaders ?? true;\r\n }\r\n\r\n /** Update the viewer to sync with current skeleton state, only used for the line display. */\r\n private _displayLinesUpdate(): void {\r\n if (!this._utilityLayer) {\r\n return;\r\n }\r\n\r\n if (this.autoUpdateBonesMatrices) {\r\n this.skeleton.computeAbsoluteMatrices();\r\n }\r\n\r\n if (this.skeleton.bones[0].length === undefined) {\r\n this._getLinesForBonesNoLength(this.skeleton.bones);\r\n } else {\r\n this._getLinesForBonesWithLength(this.skeleton.bones, this.mesh);\r\n }\r\n\r\n const targetScene = this._utilityLayer.utilityLayerScene;\r\n\r\n if (targetScene) {\r\n if (!this._debugMesh) {\r\n this._debugMesh = CreateLineSystem(\"\", { lines: this._debugLines, updatable: true, instance: null }, targetScene);\r\n this._debugMesh.renderingGroupId = this.renderingGroupId;\r\n } else {\r\n CreateLineSystem(\"\", { lines: this._debugLines, updatable: true, instance: this._debugMesh }, targetScene);\r\n }\r\n if (this.mesh) {\r\n this._debugMesh.position.copyFrom(this.mesh.position);\r\n } else {\r\n this._debugMesh.position.copyFrom(this.skeleton.bones[0].position);\r\n }\r\n this._debugMesh.color = this.color;\r\n }\r\n }\r\n /** Changes the displayMode of the skeleton viewer\r\n * @param mode The displayMode numerical value\r\n */\r\n public changeDisplayMode(mode: number): void {\r\n const wasEnabled = this.isEnabled ? true : false;\r\n if (this.displayMode !== mode) {\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n this.displayMode = mode;\r\n\r\n this.update();\r\n this._bindObs();\r\n this.isEnabled = wasEnabled;\r\n }\r\n }\r\n\r\n /** Sets a display option of the skeleton viewer\r\n *\r\n * | Option | Type | Default | Description |\r\n * | ---------------- | ------- | ------- | ----------- |\r\n * | midStep | float | 0.235 | A percentage between a bone and its child that determines the widest part of a spur. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | midStepFactor | float | 0.15 | Mid step width expressed as a factor of the length. A value of 0.5 makes the spur width half of the spur length. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | sphereBaseSize | float | 2 | Sphere base size. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | sphereScaleUnit | float | 0.865 | Sphere scale factor used to scale spheres in relation to the longest bone. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | spurFollowsChild | boolean | false | Whether a spur should attach its far end to the child bone. |\r\n * | showLocalAxes | boolean | false | Displays local axes on all bones. |\r\n * | localAxesSize | float | 0.075 | Determines the length of each local axis. |\r\n *\r\n * @param option String of the option name\r\n * @param value The numerical option value\r\n */\r\n public changeDisplayOptions(option: string, value: number): void {\r\n const wasEnabled = this.isEnabled ? true : false;\r\n (this.options.displayOptions as any)[option] = value;\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n this.update();\r\n this._bindObs();\r\n this.isEnabled = wasEnabled;\r\n }\r\n\r\n /** Release associated resources */\r\n public dispose(): void {\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n }\r\n\r\n if (this._utilityLayer) {\r\n this._utilityLayer.dispose();\r\n this._utilityLayer = null;\r\n }\r\n\r\n this.ready = false;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"skeletonViewer.js","sourceRoot":"","sources":["../../../../dev/core/src/Debug/skeletonViewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMrD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAA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AC,AAAJ,CAAK;AACzC,sEAAsE;AAC/C,8BAAe,GAAG,CAAC,AAAJ,CAAK;AAC3C,+EAA+E;AACxD,uCAAwB,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["import { Vector3, Matrix, TmpVectors } from \"../Maths/math.vector\";\r\nimport { Color3, Color4 } from \"../Maths/math.color\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Bone } from \"../Bones/bone\";\r\nimport type { Skeleton } from \"../Bones/skeleton\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport { Mesh } from \"../Meshes/mesh\";\r\nimport type { LinesMesh } from \"../Meshes/linesMesh\";\r\nimport { CreateLineSystem } from \"../Meshes/Builders/linesBuilder\";\r\nimport { UtilityLayerRenderer } from \"../Rendering/utilityLayerRenderer\";\r\nimport { Material } from \"../Materials/material\";\r\nimport { ShaderMaterial } from \"../Materials/shaderMaterial\";\r\nimport { DynamicTexture } from \"../Materials/Textures/dynamicTexture\";\r\nimport { VertexBuffer } from \"../Buffers/buffer\";\r\nimport { Effect } from \"../Materials/effect\";\r\n\r\nimport type { ISkeletonViewerOptions, IBoneWeightShaderOptions, ISkeletonMapShaderOptions, ISkeletonMapShaderColorMapKnot, ISkeletonViewerDisplayOptions } from \"./ISkeletonViewer\";\r\nimport type { Observer } from \"../Misc/observable\";\r\n\r\nimport { CreateSphere } from \"../Meshes/Builders/sphereBuilder\";\r\nimport { ExtrudeShapeCustom } from \"../Meshes/Builders/shapeBuilder\";\r\nimport { TransformNode } from \"../Meshes/transformNode\";\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\n/**\r\n * Class used to render a debug view of a given skeleton\r\n * @see http://www.babylonjs-playground.com/#1BZJVJ#8\r\n */\r\nexport class SkeletonViewer {\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES */\r\n public static readonly DISPLAY_LINES = 0;\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES */\r\n public static readonly DISPLAY_SPHERES = 1;\r\n /** public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS */\r\n public static readonly DISPLAY_SPHERE_AND_SPURS = 2;\r\n\r\n /** public static method to create a BoneWeight Shader\r\n * @param options The constructor options\r\n * @param scene The scene that the shader is scoped to\r\n * @returns The created ShaderMaterial\r\n * @see http://www.babylonjs-playground.com/#1BZJVJ#395\r\n */\r\n static CreateBoneWeightShader(options: IBoneWeightShaderOptions, scene: Scene): ShaderMaterial {\r\n const skeleton: Skeleton = options.skeleton;\r\n const colorBase: Color3 = options.colorBase ?? Color3.Black();\r\n const colorZero: Color3 = options.colorZero ?? Color3.Blue();\r\n const colorQuarter: Color3 = options.colorQuarter ?? Color3.Green();\r\n const colorHalf: Color3 = options.colorHalf ?? Color3.Yellow();\r\n const colorFull: Color3 = options.colorFull ?? Color3.Red();\r\n const targetBoneIndex: number = options.targetBoneIndex ?? 0;\r\n\r\n Effect.ShadersStore[\"boneWeights:\" + skeleton.name + \"VertexShader\"] = `precision highp float;\r\n\r\n attribute vec3 position;\r\n attribute vec2 uv;\r\n\r\n uniform mat4 view;\r\n uniform mat4 projection;\r\n uniform mat4 worldViewProjection;\r\n\r\n #include<bonesDeclaration>\r\n #if NUM_BONE_INFLUENCERS == 0\r\n attribute vec4 matricesIndices;\r\n attribute vec4 matricesWeights;\r\n #endif\r\n #include<bakedVertexAnimationDeclaration>\r\n\r\n #include<instancesDeclaration>\r\n\r\n varying vec3 vColor;\r\n\r\n uniform vec3 colorBase;\r\n uniform vec3 colorZero;\r\n uniform vec3 colorQuarter;\r\n uniform vec3 colorHalf;\r\n uniform vec3 colorFull;\r\n\r\n uniform float targetBoneIndex;\r\n\r\n void main() {\r\n vec3 positionUpdated = position;\r\n\r\n #include<instancesVertex>\r\n #include<bonesVertex>\r\n #include<bakedVertexAnimation>\r\n\r\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\r\n\r\n vec3 color = colorBase;\r\n float totalWeight = 0.;\r\n if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){\r\n totalWeight += matricesWeights[0];\r\n }\r\n if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){\r\n totalWeight += matricesWeights[1];\r\n }\r\n if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){\r\n totalWeight += matricesWeights[2];\r\n }\r\n if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){\r\n totalWeight += matricesWeights[3];\r\n }\r\n\r\n color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight));\r\n color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight));\r\n color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight));\r\n color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight));\r\n vColor = color;\r\n\r\n gl_Position = projection * view * worldPos;\r\n }`;\r\n Effect.ShadersStore[\"boneWeights:\" + skeleton.name + \"FragmentShader\"] = `\r\n precision highp float;\r\n varying vec3 vPosition;\r\n\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec4 color = vec4(vColor, 1.0);\r\n gl_FragColor = color;\r\n }\r\n `;\r\n const shader: ShaderMaterial = new ShaderMaterial(\r\n \"boneWeight:\" + skeleton.name,\r\n scene,\r\n {\r\n vertex: \"boneWeights:\" + skeleton.name,\r\n fragment: \"boneWeights:\" + skeleton.name,\r\n },\r\n {\r\n attributes: [\"position\", \"normal\", \"matricesIndices\", \"matricesWeights\"],\r\n uniforms: [\r\n \"world\",\r\n \"worldView\",\r\n \"worldViewProjection\",\r\n \"view\",\r\n \"projection\",\r\n \"viewProjection\",\r\n \"colorBase\",\r\n \"colorZero\",\r\n \"colorQuarter\",\r\n \"colorHalf\",\r\n \"colorFull\",\r\n \"targetBoneIndex\",\r\n ],\r\n }\r\n );\r\n\r\n shader.setColor3(\"colorBase\", colorBase);\r\n shader.setColor3(\"colorZero\", colorZero);\r\n shader.setColor3(\"colorQuarter\", colorQuarter);\r\n shader.setColor3(\"colorHalf\", colorHalf);\r\n shader.setColor3(\"colorFull\", colorFull);\r\n shader.setFloat(\"targetBoneIndex\", targetBoneIndex);\r\n\r\n shader.getClassName = (): string => {\r\n return \"BoneWeightShader\";\r\n };\r\n\r\n shader.transparencyMode = Material.MATERIAL_OPAQUE;\r\n\r\n return shader;\r\n }\r\n\r\n /** public static method to create a BoneWeight Shader\r\n * @param options The constructor options\r\n * @param scene The scene that the shader is scoped to\r\n * @returns The created ShaderMaterial\r\n */\r\n static CreateSkeletonMapShader(options: ISkeletonMapShaderOptions, scene: Scene) {\r\n const skeleton: Skeleton = options.skeleton;\r\n const colorMap: ISkeletonMapShaderColorMapKnot[] = options.colorMap ?? [\r\n {\r\n color: new Color3(1, 0.38, 0.18),\r\n location: 0,\r\n },\r\n {\r\n color: new Color3(0.59, 0.18, 1.0),\r\n location: 0.2,\r\n },\r\n {\r\n color: new Color3(0.59, 1, 0.18),\r\n location: 0.4,\r\n },\r\n {\r\n color: new Color3(1, 0.87, 0.17),\r\n location: 0.6,\r\n },\r\n {\r\n color: new Color3(1, 0.17, 0.42),\r\n location: 0.8,\r\n },\r\n {\r\n color: new Color3(0.17, 0.68, 1.0),\r\n location: 1.0,\r\n },\r\n ];\r\n\r\n const bufferWidth: number = skeleton.bones.length + 1;\r\n const colorMapBuffer: number[] = SkeletonViewer._CreateBoneMapColorBuffer(bufferWidth, colorMap, scene);\r\n const shader = new ShaderMaterial(\r\n \"boneWeights:\" + skeleton.name,\r\n scene,\r\n {\r\n vertexSource:\r\n `precision highp float;\r\n\r\n attribute vec3 position;\r\n attribute vec2 uv;\r\n\r\n uniform mat4 view;\r\n uniform mat4 projection;\r\n uniform mat4 worldViewProjection;\r\n uniform float colorMap[` +\r\n skeleton.bones.length * 4 +\r\n `];\r\n\r\n #include<bonesDeclaration>\r\n #if NUM_BONE_INFLUENCERS == 0\r\n attribute vec4 matricesIndices;\r\n attribute vec4 matricesWeights;\r\n #endif\r\n #include<bakedVertexAnimationDeclaration>\r\n #include<instancesDeclaration>\r\n\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec3 positionUpdated = position;\r\n\r\n #include<instancesVertex>\r\n #include<bonesVertex>\r\n #include<bakedVertexAnimation>\r\n\r\n vec3 color = vec3(0.);\r\n bool first = true;\r\n\r\n for (int i = 0; i < 4; i++) {\r\n int boneIdx = int(matricesIndices[i]);\r\n float boneWgt = matricesWeights[i];\r\n\r\n vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]);\r\n\r\n if (boneWgt > 0.) {\r\n if (first) {\r\n first = false;\r\n color = c;\r\n } else {\r\n color = mix(color, c, boneWgt);\r\n }\r\n }\r\n }\r\n\r\n vColor = color;\r\n\r\n vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0);\r\n\r\n gl_Position = projection * view * worldPos;\r\n }`,\r\n fragmentSource: `\r\n precision highp float;\r\n varying vec3 vColor;\r\n\r\n void main() {\r\n vec4 color = vec4( vColor, 1.0 );\r\n gl_FragColor = color;\r\n }\r\n `,\r\n },\r\n {\r\n attributes: [\"position\", \"normal\", \"matricesIndices\", \"matricesWeights\"],\r\n uniforms: [\"world\", \"worldView\", \"worldViewProjection\", \"view\", \"projection\", \"viewProjection\", \"colorMap\"],\r\n }\r\n );\r\n\r\n shader.setFloats(\"colorMap\", colorMapBuffer);\r\n\r\n shader.getClassName = (): string => {\r\n return \"SkeletonMapShader\";\r\n };\r\n\r\n shader.transparencyMode = Material.MATERIAL_OPAQUE;\r\n\r\n return shader;\r\n }\r\n\r\n /** private static method to create a BoneWeight Shader\r\n * @param size The size of the buffer to create (usually the bone count)\r\n * @param colorMap The gradient data to generate\r\n * @param scene The scene that the shader is scoped to\r\n * @returns an Array of floats from the color gradient values\r\n */\r\n private static _CreateBoneMapColorBuffer(size: number, colorMap: ISkeletonMapShaderColorMapKnot[], scene: Scene) {\r\n const tempGrad = new DynamicTexture(\"temp\", { width: size, height: 1 }, scene, false);\r\n const ctx = tempGrad.getContext();\r\n const grad = ctx.createLinearGradient(0, 0, size, 0);\r\n\r\n colorMap.forEach((stop) => {\r\n grad.addColorStop(stop.location, stop.color.toHexString());\r\n });\r\n\r\n ctx.fillStyle = grad;\r\n ctx.fillRect(0, 0, size, 1);\r\n tempGrad.update();\r\n const buffer: number[] = [];\r\n const data: Uint8ClampedArray = ctx.getImageData(0, 0, size, 1).data;\r\n const rUnit = 1 / 255;\r\n for (let i = 0; i < data.length; i++) {\r\n buffer.push(data[i] * rUnit);\r\n }\r\n tempGrad.dispose();\r\n return buffer;\r\n }\r\n\r\n /** If SkeletonViewer scene scope. */\r\n private _scene: Scene;\r\n\r\n /** Gets or sets the color used to render the skeleton */\r\n public color: Color3 = Color3.White();\r\n\r\n /** Array of the points of the skeleton fo the line view. */\r\n private _debugLines = new Array<Array<Vector3>>();\r\n\r\n /** The SkeletonViewers Mesh. */\r\n private _debugMesh: Nullable<LinesMesh>;\r\n\r\n /** The local axes Meshes. */\r\n private _localAxes: Nullable<LinesMesh> = null;\r\n\r\n /** If SkeletonViewer is enabled. */\r\n private _isEnabled = true;\r\n\r\n /** If SkeletonViewer is ready. */\r\n private _ready: boolean;\r\n\r\n /** SkeletonViewer render observable. */\r\n private _obs: Nullable<Observer<Scene>> = null;\r\n\r\n /** The Utility Layer to render the gizmos in. */\r\n private _utilityLayer: Nullable<UtilityLayerRenderer>;\r\n\r\n private _boneIndices: Set<number>;\r\n\r\n /** Gets the Scene. */\r\n get scene(): Scene {\r\n return this._scene;\r\n }\r\n /** Gets the utilityLayer. */\r\n get utilityLayer(): Nullable<UtilityLayerRenderer> {\r\n return this._utilityLayer;\r\n }\r\n /** Checks Ready Status. */\r\n get isReady(): Boolean {\r\n return this._ready;\r\n }\r\n /** Sets Ready Status. */\r\n set ready(value: boolean) {\r\n this._ready = value;\r\n }\r\n /** Gets the debugMesh */\r\n get debugMesh(): Nullable<AbstractMesh> | Nullable<LinesMesh> {\r\n return this._debugMesh;\r\n }\r\n /** Sets the debugMesh */\r\n set debugMesh(value: Nullable<AbstractMesh> | Nullable<LinesMesh>) {\r\n this._debugMesh = value as any;\r\n }\r\n /** Gets the displayMode */\r\n get displayMode(): number {\r\n return this.options.displayMode || SkeletonViewer.DISPLAY_LINES;\r\n }\r\n /** Sets the displayMode */\r\n set displayMode(value: number) {\r\n if (value > SkeletonViewer.DISPLAY_SPHERE_AND_SPURS) {\r\n value = SkeletonViewer.DISPLAY_LINES;\r\n }\r\n this.options.displayMode = value;\r\n }\r\n /**\r\n * Creates a new SkeletonViewer\r\n * @param skeleton defines the skeleton to render\r\n * @param mesh defines the mesh attached to the skeleton\r\n * @param scene defines the hosting scene\r\n * @param autoUpdateBonesMatrices defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)\r\n * @param renderingGroupId defines the rendering group id to use with the viewer\r\n * @param options All of the extra constructor options for the SkeletonViewer\r\n */\r\n constructor(\r\n /** defines the skeleton to render */\r\n public skeleton: Skeleton,\r\n /** defines the mesh attached to the skeleton */\r\n public mesh: Nullable<AbstractMesh>,\r\n /** The Scene scope*/\r\n scene: Scene,\r\n /** defines a boolean indicating if bones matrices must be forced to update before rendering (true by default) */\r\n public autoUpdateBonesMatrices: boolean = true,\r\n /** defines the rendering group id to use with the viewer */\r\n public renderingGroupId: number = 3,\r\n /** is the options for the viewer */\r\n public options: Partial<ISkeletonViewerOptions> = {}\r\n ) {\r\n this._scene = scene;\r\n this._ready = false;\r\n\r\n //Defaults\r\n options.pauseAnimations = options.pauseAnimations ?? true;\r\n options.returnToRest = options.returnToRest ?? false;\r\n options.displayMode = options.displayMode ?? SkeletonViewer.DISPLAY_LINES;\r\n options.displayOptions = options.displayOptions ?? {};\r\n options.displayOptions.midStep = options.displayOptions.midStep ?? 0.235;\r\n options.displayOptions.midStepFactor = options.displayOptions.midStepFactor ?? 0.155;\r\n options.displayOptions.sphereBaseSize = options.displayOptions.sphereBaseSize ?? 0.15;\r\n options.displayOptions.sphereScaleUnit = options.displayOptions.sphereScaleUnit ?? 2;\r\n options.displayOptions.sphereFactor = options.displayOptions.sphereFactor ?? 0.865;\r\n options.displayOptions.spurFollowsChild = options.displayOptions.spurFollowsChild ?? false;\r\n options.displayOptions.showLocalAxes = options.displayOptions.showLocalAxes ?? false;\r\n options.displayOptions.localAxesSize = options.displayOptions.localAxesSize ?? 0.075;\r\n options.computeBonesUsingShaders = options.computeBonesUsingShaders ?? true;\r\n options.useAllBones = options.useAllBones ?? true;\r\n\r\n this._boneIndices = new Set();\r\n\r\n if (!options.useAllBones) {\r\n const initialMeshBoneIndices = mesh?.getVerticesData(VertexBuffer.MatricesIndicesKind);\r\n const initialMeshBoneWeights = mesh?.getVerticesData(VertexBuffer.MatricesWeightsKind);\r\n\r\n if (initialMeshBoneIndices && initialMeshBoneWeights) {\r\n for (let i = 0; i < initialMeshBoneIndices.length; ++i) {\r\n const index = initialMeshBoneIndices[i],\r\n weight = initialMeshBoneWeights[i];\r\n if (weight !== 0) {\r\n this._boneIndices.add(index);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /* Create Utility Layer */\r\n this._utilityLayer = new UtilityLayerRenderer(this._scene, false);\r\n this._utilityLayer.pickUtilitySceneFirst = false;\r\n this._utilityLayer.utilityLayerScene.autoClearDepthAndStencil = true;\r\n\r\n let displayMode = this.options.displayMode || 0;\r\n if (displayMode > SkeletonViewer.DISPLAY_SPHERE_AND_SPURS) {\r\n displayMode = SkeletonViewer.DISPLAY_LINES;\r\n }\r\n this.displayMode = displayMode;\r\n //Prep the Systems\r\n this.update();\r\n this._bindObs();\r\n }\r\n\r\n /** The Dynamic bindings for the update functions */\r\n private _bindObs(): void {\r\n switch (this.displayMode) {\r\n case SkeletonViewer.DISPLAY_LINES: {\r\n this._obs = this.scene.onBeforeRenderObservable.add(() => {\r\n this._displayLinesUpdate();\r\n });\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /** Update the viewer to sync with current skeleton state, only used to manually update. */\r\n public update(): void {\r\n switch (this.displayMode) {\r\n case SkeletonViewer.DISPLAY_LINES: {\r\n this._displayLinesUpdate();\r\n break;\r\n }\r\n case SkeletonViewer.DISPLAY_SPHERES: {\r\n this._buildSpheresAndSpurs(true);\r\n break;\r\n }\r\n case SkeletonViewer.DISPLAY_SPHERE_AND_SPURS: {\r\n this._buildSpheresAndSpurs(false);\r\n break;\r\n }\r\n }\r\n\r\n this._buildLocalAxes();\r\n }\r\n\r\n /** Gets or sets a boolean indicating if the viewer is enabled */\r\n public set isEnabled(value: boolean) {\r\n if (this.isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n\r\n if (this.debugMesh) {\r\n this.debugMesh.setEnabled(value);\r\n }\r\n\r\n if (value && !this._obs) {\r\n this._bindObs();\r\n } else if (!value && this._obs) {\r\n this.scene.onBeforeRenderObservable.remove(this._obs);\r\n this._obs = null;\r\n }\r\n }\r\n\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n\r\n private _getBonePosition(position: Vector3, bone: Bone, meshMat: Matrix, x = 0, y = 0, z = 0): void {\r\n const tmat = TmpVectors.Matrix[0];\r\n const parentBone = bone.getParent();\r\n tmat.copyFrom(bone.getLocalMatrix());\r\n\r\n if (x !== 0 || y !== 0 || z !== 0) {\r\n const tmat2 = TmpVectors.Matrix[1];\r\n Matrix.IdentityToRef(tmat2);\r\n tmat2.setTranslationFromFloats(x, y, z);\r\n tmat2.multiplyToRef(tmat, tmat);\r\n }\r\n\r\n if (parentBone) {\r\n tmat.multiplyToRef(parentBone.getAbsoluteMatrix(), tmat);\r\n }\r\n\r\n tmat.multiplyToRef(meshMat, tmat);\r\n\r\n position.x = tmat.m[12];\r\n position.y = tmat.m[13];\r\n position.z = tmat.m[14];\r\n }\r\n\r\n private _getLinesForBonesWithLength(bones: Bone[], mesh: Nullable<AbstractMesh>): void {\r\n const len = bones.length;\r\n\r\n let matrix;\r\n let meshPos;\r\n if (mesh) {\r\n matrix = mesh.getWorldMatrix();\r\n meshPos = mesh.position;\r\n } else {\r\n matrix = new Matrix();\r\n meshPos = bones[0].position;\r\n }\r\n let idx = 0;\r\n for (let i = 0; i < len; i++) {\r\n const bone = bones[i];\r\n let points = this._debugLines[idx];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n if (!points) {\r\n points = [Vector3.Zero(), Vector3.Zero()];\r\n this._debugLines[idx] = points;\r\n }\r\n this._getBonePosition(points[0], bone, matrix);\r\n this._getBonePosition(points[1], bone, matrix, 0, bone.length, 0);\r\n points[0].subtractInPlace(meshPos);\r\n points[1].subtractInPlace(meshPos);\r\n idx++;\r\n }\r\n }\r\n\r\n private _getLinesForBonesNoLength(bones: Bone[]): void {\r\n const len = bones.length;\r\n let boneNum = 0;\r\n\r\n const mesh = this.mesh;\r\n let transformNode;\r\n let meshPos;\r\n if (mesh) {\r\n transformNode = mesh;\r\n meshPos = mesh.position;\r\n } else {\r\n transformNode = new TransformNode(\"\");\r\n meshPos = bones[0].position;\r\n }\r\n for (let i = len - 1; i >= 0; i--) {\r\n const childBone = bones[i];\r\n const parentBone = childBone.getParent();\r\n if (!parentBone || (!this._boneIndices.has(childBone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n let points = this._debugLines[boneNum];\r\n if (!points) {\r\n points = [Vector3.Zero(), Vector3.Zero()];\r\n this._debugLines[boneNum] = points;\r\n }\r\n childBone.getAbsolutePositionToRef(transformNode, points[0]);\r\n parentBone.getAbsolutePositionToRef(transformNode, points[1]);\r\n points[0].subtractInPlace(meshPos);\r\n points[1].subtractInPlace(meshPos);\r\n boneNum++;\r\n }\r\n if (!mesh) {\r\n transformNode.dispose();\r\n }\r\n }\r\n\r\n /**\r\n * function to revert the mesh and scene back to the initial state.\r\n * @param animationState\r\n */\r\n private _revert(animationState: boolean): void {\r\n if (this.options.pauseAnimations) {\r\n this.scene.animationsEnabled = animationState;\r\n this.utilityLayer!.utilityLayerScene!.animationsEnabled = animationState;\r\n }\r\n }\r\n\r\n /**\r\n * function to get the absolute bind pose of a bone by accumulating transformations up the bone hierarchy.\r\n * @param bone\r\n * @param matrix\r\n */\r\n private _getAbsoluteBindPoseToRef(bone: Nullable<Bone>, matrix: Matrix) {\r\n if (bone === null || bone._index === -1) {\r\n matrix.copyFrom(Matrix.Identity());\r\n return;\r\n }\r\n\r\n this._getAbsoluteBindPoseToRef(bone.getParent(), matrix);\r\n bone.getBindMatrix().multiplyToRef(matrix, matrix);\r\n return;\r\n }\r\n\r\n private _createSpur(anchorPoint: Vector3, bone: Bone, childPoint: Vector3, childBone: Nullable<Bone>, displayOptions: ISkeletonViewerDisplayOptions, utilityLayerScene: Scene) {\r\n const dir = childPoint.subtract(anchorPoint);\r\n const h = dir.length();\r\n const up = dir.normalize().scale(h);\r\n\r\n const midStep = displayOptions.midStep || 0.165;\r\n const midStepFactor = displayOptions.midStepFactor || 0.215;\r\n\r\n const up0 = up.scale(midStep);\r\n\r\n const spur = ExtrudeShapeCustom(\r\n \"skeletonViewer\",\r\n {\r\n shape: [new Vector3(1, -1, 0), new Vector3(1, 1, 0), new Vector3(-1, 1, 0), new Vector3(-1, -1, 0), new Vector3(1, -1, 0)],\r\n path: [Vector3.Zero(), up0, up],\r\n scaleFunction: (i: number) => {\r\n switch (i) {\r\n case 0:\r\n case 2:\r\n return 0;\r\n case 1:\r\n return h * midStepFactor;\r\n }\r\n return 0;\r\n },\r\n sideOrientation: Mesh.DEFAULTSIDE,\r\n updatable: false,\r\n },\r\n utilityLayerScene\r\n );\r\n\r\n const numVertices = spur.getTotalVertices();\r\n const mwk: number[] = [],\r\n mik: number[] = [];\r\n\r\n for (let i = 0; i < numVertices; i++) {\r\n mwk.push(1, 0, 0, 0);\r\n\r\n // Select verts at end of spur (ie vert 10 to 14) and bind to child\r\n // bone if spurFollowsChild is enabled.\r\n if (childBone && displayOptions.spurFollowsChild && i > 9) {\r\n mik.push(childBone.getIndex(), 0, 0, 0);\r\n } else {\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n }\r\n\r\n spur.position = anchorPoint.clone();\r\n\r\n spur.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n spur.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n spur.convertToFlatShadedMesh();\r\n\r\n return spur;\r\n }\r\n\r\n private _getBoundingSphereForBone(boneIndex: number) {\r\n if (!this.mesh) {\r\n return null;\r\n }\r\n\r\n const positions = this.mesh.getVerticesData(VertexBuffer.PositionKind);\r\n const indices = this.mesh.getIndices();\r\n const boneWeights = this.mesh.getVerticesData(VertexBuffer.MatricesWeightsKind);\r\n const boneIndices = this.mesh.getVerticesData(VertexBuffer.MatricesIndicesKind);\r\n if (!positions || !indices || !boneWeights || !boneIndices) {\r\n return null;\r\n }\r\n\r\n const min = new Vector3(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE);\r\n const max = new Vector3(-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE);\r\n\r\n let found = 0;\r\n for (let i = 0; i < indices.length; ++i) {\r\n const vertexIndex = indices[i];\r\n\r\n for (let b = 0; b < 4; ++b) {\r\n const bIndex = boneIndices[vertexIndex * 4 + b];\r\n const bWeight = boneWeights[vertexIndex * 4 + b];\r\n\r\n if (bIndex === boneIndex && bWeight > 1e-5) {\r\n Vector3.FromArrayToRef(positions, vertexIndex * 3, TmpVectors.Vector3[0]);\r\n min.minimizeInPlace(TmpVectors.Vector3[0]);\r\n max.maximizeInPlace(TmpVectors.Vector3[0]);\r\n found++;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return found > 1\r\n ? {\r\n center: Vector3.Center(min, max),\r\n radius: Vector3.Distance(min, max) / 2,\r\n }\r\n : null;\r\n }\r\n\r\n /**\r\n * function to build and bind sphere joint points and spur bone representations.\r\n * @param spheresOnly\r\n */\r\n private _buildSpheresAndSpurs(spheresOnly = true): void {\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n\r\n this._ready = false;\r\n const utilityLayerScene = this.utilityLayer?.utilityLayerScene!;\r\n const bones: Bone[] = this.skeleton.bones;\r\n const spheres: Array<[Mesh, Bone]> = [];\r\n const spurs: Mesh[] = [];\r\n\r\n const animationState = this.scene.animationsEnabled;\r\n\r\n try {\r\n if (this.options.pauseAnimations) {\r\n this.scene.animationsEnabled = false;\r\n utilityLayerScene.animationsEnabled = false;\r\n }\r\n\r\n if (this.options.returnToRest) {\r\n this.skeleton.returnToRest();\r\n }\r\n\r\n if (this.autoUpdateBonesMatrices) {\r\n this.skeleton.computeAbsoluteMatrices();\r\n }\r\n\r\n let longestBoneLength = Number.NEGATIVE_INFINITY;\r\n const displayOptions = this.options.displayOptions || {};\r\n\r\n for (let i = 0; i < bones.length; i++) {\r\n const bone = bones[i];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n\r\n const boneAbsoluteBindPoseTransform = new Matrix();\r\n this._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);\r\n\r\n const anchorPoint = new Vector3();\r\n\r\n boneAbsoluteBindPoseTransform.decompose(undefined, undefined, anchorPoint);\r\n\r\n if (bone.children.length > 0) {\r\n bone.children.forEach((bc) => {\r\n const childAbsoluteBindPoseTransform: Matrix = new Matrix();\r\n bc.getLocalMatrix().multiplyToRef(boneAbsoluteBindPoseTransform, childAbsoluteBindPoseTransform);\r\n const childPoint = new Vector3();\r\n childAbsoluteBindPoseTransform.decompose(undefined, undefined, childPoint);\r\n const distanceFromParent = Vector3.Distance(anchorPoint, childPoint);\r\n if (distanceFromParent > longestBoneLength) {\r\n longestBoneLength = distanceFromParent;\r\n }\r\n if (spheresOnly) {\r\n return;\r\n }\r\n\r\n spurs.push(this._createSpur(anchorPoint, bone, childPoint, bc, displayOptions, utilityLayerScene));\r\n });\r\n } else {\r\n const boundingSphere = this._getBoundingSphereForBone(bone.getIndex());\r\n if (boundingSphere) {\r\n if (boundingSphere.radius > longestBoneLength) {\r\n longestBoneLength = boundingSphere.radius;\r\n }\r\n if (!spheresOnly) {\r\n let childPoint;\r\n const parentBone = bone.getParent();\r\n if (parentBone) {\r\n this._getAbsoluteBindPoseToRef(parentBone, boneAbsoluteBindPoseTransform);\r\n boneAbsoluteBindPoseTransform.decompose(undefined, undefined, TmpVectors.Vector3[0]);\r\n childPoint = anchorPoint.subtract(TmpVectors.Vector3[0]).normalize().scale(boundingSphere.radius).add(anchorPoint);\r\n } else {\r\n childPoint = boundingSphere.center.subtract(anchorPoint).normalize().scale(boundingSphere.radius).add(anchorPoint);\r\n }\r\n spurs.push(this._createSpur(anchorPoint, bone, childPoint, null, displayOptions, utilityLayerScene));\r\n }\r\n }\r\n }\r\n\r\n const sphereBaseSize = displayOptions.sphereBaseSize || 0.2;\r\n\r\n const sphere = CreateSphere(\r\n \"skeletonViewer\",\r\n {\r\n segments: 6,\r\n diameter: sphereBaseSize,\r\n updatable: true,\r\n },\r\n utilityLayerScene\r\n );\r\n\r\n const numVertices = sphere.getTotalVertices();\r\n\r\n const mwk: number[] = [],\r\n mik: number[] = [];\r\n\r\n for (let i = 0; i < numVertices; i++) {\r\n mwk.push(1, 0, 0, 0);\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n\r\n sphere.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n sphere.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n\r\n sphere.position = anchorPoint.clone();\r\n spheres.push([sphere, bone]);\r\n }\r\n\r\n const sphereScaleUnit = displayOptions.sphereScaleUnit || 2;\r\n const sphereFactor = displayOptions.sphereFactor || 0.85;\r\n\r\n const meshes = [];\r\n for (let i = 0; i < spheres.length; i++) {\r\n const [sphere, bone] = spheres[i];\r\n const scale = 1 / (sphereScaleUnit / longestBoneLength);\r\n\r\n let _stepsOut = 0;\r\n let _b = bone;\r\n\r\n while (_b.getParent() && (_b.getParent() as Bone).getIndex() !== -1) {\r\n _stepsOut++;\r\n _b = _b.getParent() as Bone;\r\n }\r\n sphere.scaling.scaleInPlace(scale * Math.pow(sphereFactor, _stepsOut));\r\n meshes.push(sphere);\r\n }\r\n\r\n this.debugMesh = Mesh.MergeMeshes(meshes.concat(spurs), true, true);\r\n if (this.debugMesh) {\r\n this.debugMesh.renderingGroupId = this.renderingGroupId;\r\n this.debugMesh.skeleton = this.skeleton;\r\n this.debugMesh.parent = this.mesh;\r\n this.debugMesh.computeBonesUsingShaders = this.options.computeBonesUsingShaders ?? true;\r\n this.debugMesh.alwaysSelectAsActiveMesh = true;\r\n }\r\n\r\n const light = this.utilityLayer!._getSharedGizmoLight();\r\n light.intensity = 0.7;\r\n\r\n this._revert(animationState);\r\n this.ready = true;\r\n } catch (err) {\r\n Logger.Error(err);\r\n this._revert(animationState);\r\n this.dispose();\r\n }\r\n }\r\n\r\n private _buildLocalAxes(): void {\r\n if (this._localAxes) {\r\n this._localAxes.dispose();\r\n }\r\n\r\n this._localAxes = null;\r\n\r\n const displayOptions = this.options.displayOptions || {};\r\n\r\n if (!displayOptions.showLocalAxes) {\r\n return;\r\n }\r\n\r\n const targetScene = this._utilityLayer!.utilityLayerScene;\r\n const size = displayOptions.localAxesSize || 0.075;\r\n const lines = [];\r\n const colors = [];\r\n const red = new Color4(1, 0, 0, 1);\r\n const green = new Color4(0, 1, 0, 1);\r\n const blue = new Color4(0, 0, 1, 1);\r\n\r\n const mwk: number[] = [];\r\n const mik: number[] = [];\r\n const vertsPerBone = 6;\r\n\r\n for (const i in this.skeleton.bones) {\r\n const bone = this.skeleton.bones[i];\r\n\r\n if (bone._index === -1 || (!this._boneIndices.has(bone.getIndex()) && !this.options.useAllBones)) {\r\n continue;\r\n }\r\n\r\n const boneAbsoluteBindPoseTransform = new Matrix();\r\n const boneOrigin = new Vector3();\r\n\r\n this._getAbsoluteBindPoseToRef(bone, boneAbsoluteBindPoseTransform);\r\n boneAbsoluteBindPoseTransform.decompose(undefined, TmpVectors.Quaternion[0], boneOrigin);\r\n\r\n const m = new Matrix();\r\n TmpVectors.Quaternion[0].toRotationMatrix(m);\r\n\r\n const boneAxisX = Vector3.TransformCoordinates(new Vector3(0 + size, 0, 0), m);\r\n const boneAxisY = Vector3.TransformCoordinates(new Vector3(0, 0 + size, 0), m);\r\n const boneAxisZ = Vector3.TransformCoordinates(new Vector3(0, 0, 0 + size), m);\r\n\r\n const axisX = [boneOrigin, boneOrigin.add(boneAxisX)];\r\n const axisY = [boneOrigin, boneOrigin.add(boneAxisY)];\r\n const axisZ = [boneOrigin, boneOrigin.add(boneAxisZ)];\r\n\r\n const linePoints = [axisX, axisY, axisZ];\r\n const lineColors = [\r\n [red, red],\r\n [green, green],\r\n [blue, blue],\r\n ];\r\n\r\n lines.push(...linePoints);\r\n colors.push(...lineColors);\r\n\r\n for (let j = 0; j < vertsPerBone; j++) {\r\n mwk.push(1, 0, 0, 0);\r\n mik.push(bone.getIndex(), 0, 0, 0);\r\n }\r\n }\r\n\r\n this._localAxes = CreateLineSystem(\"localAxes\", { lines: lines, colors: colors, updatable: true }, targetScene);\r\n this._localAxes.setVerticesData(VertexBuffer.MatricesWeightsKind, mwk, false);\r\n this._localAxes.setVerticesData(VertexBuffer.MatricesIndicesKind, mik, false);\r\n this._localAxes.skeleton = this.skeleton;\r\n this._localAxes.renderingGroupId = this.renderingGroupId + 1;\r\n this._localAxes.parent = this.mesh;\r\n this._localAxes.computeBonesUsingShaders = this.options.computeBonesUsingShaders ?? true;\r\n }\r\n\r\n /** Update the viewer to sync with current skeleton state, only used for the line display. */\r\n private _displayLinesUpdate(): void {\r\n if (!this._utilityLayer) {\r\n return;\r\n }\r\n\r\n if (this.autoUpdateBonesMatrices) {\r\n this.skeleton.computeAbsoluteMatrices();\r\n }\r\n\r\n if (this.skeleton.bones[0].length === undefined) {\r\n this._getLinesForBonesNoLength(this.skeleton.bones);\r\n } else {\r\n this._getLinesForBonesWithLength(this.skeleton.bones, this.mesh);\r\n }\r\n\r\n const targetScene = this._utilityLayer.utilityLayerScene;\r\n\r\n if (targetScene) {\r\n if (!this._debugMesh) {\r\n this._debugMesh = CreateLineSystem(\"\", { lines: this._debugLines, updatable: true, instance: null }, targetScene);\r\n this._debugMesh.renderingGroupId = this.renderingGroupId;\r\n } else {\r\n CreateLineSystem(\"\", { lines: this._debugLines, updatable: true, instance: this._debugMesh }, targetScene);\r\n }\r\n if (this.mesh) {\r\n this._debugMesh.position.copyFrom(this.mesh.position);\r\n } else {\r\n this._debugMesh.position.copyFrom(this.skeleton.bones[0].position);\r\n }\r\n this._debugMesh.color = this.color;\r\n }\r\n }\r\n /** Changes the displayMode of the skeleton viewer\r\n * @param mode The displayMode numerical value\r\n */\r\n public changeDisplayMode(mode: number): void {\r\n const wasEnabled = this.isEnabled ? true : false;\r\n if (this.displayMode !== mode) {\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n this.displayMode = mode;\r\n\r\n this.update();\r\n this._bindObs();\r\n this.isEnabled = wasEnabled;\r\n }\r\n }\r\n\r\n /** Sets a display option of the skeleton viewer\r\n *\r\n * | Option | Type | Default | Description |\r\n * | ---------------- | ------- | ------- | ----------- |\r\n * | midStep | float | 0.235 | A percentage between a bone and its child that determines the widest part of a spur. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | midStepFactor | float | 0.15 | Mid step width expressed as a factor of the length. A value of 0.5 makes the spur width half of the spur length. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | sphereBaseSize | float | 2 | Sphere base size. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | sphereScaleUnit | float | 0.865 | Sphere scale factor used to scale spheres in relation to the longest bone. Only used when `displayMode` is set to `DISPLAY_SPHERE_AND_SPURS`. |\r\n * | spurFollowsChild | boolean | false | Whether a spur should attach its far end to the child bone. |\r\n * | showLocalAxes | boolean | false | Displays local axes on all bones. |\r\n * | localAxesSize | float | 0.075 | Determines the length of each local axis. |\r\n *\r\n * @param option String of the option name\r\n * @param value The numerical option value\r\n */\r\n public changeDisplayOptions(option: string, value: number): void {\r\n const wasEnabled = this.isEnabled ? true : false;\r\n (this.options.displayOptions as any)[option] = value;\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n this.ready = false;\r\n }\r\n this.update();\r\n this._bindObs();\r\n this.isEnabled = wasEnabled;\r\n }\r\n\r\n /** Release associated resources */\r\n public dispose(): void {\r\n this.isEnabled = false;\r\n if (this._debugMesh) {\r\n this._debugMesh.dispose();\r\n this._debugMesh = null;\r\n }\r\n\r\n if (this._utilityLayer) {\r\n this._utilityLayer.dispose();\r\n this._utilityLayer = null;\r\n }\r\n\r\n this.ready = false;\r\n }\r\n}\r\n"]}
|
package/Engines/ICanvas.d.ts
CHANGED
|
@@ -25,8 +25,9 @@ export interface ICanvas {
|
|
|
25
25
|
toDataURL(mime: string): string;
|
|
26
26
|
/**
|
|
27
27
|
* Removes the canvas from the document.
|
|
28
|
+
* Offscreen canvases don't have the remove function, so we need to make it optional.
|
|
28
29
|
*/
|
|
29
|
-
remove(): void;
|
|
30
|
+
remove?(): void;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* Class used to abstract am image to use with the canvas and its context
|
package/Engines/ICanvas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n\r\n /**\r\n * Removes the canvas from the document.\r\n */\r\n remove(): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract a matrix\r\n */\r\nexport interface DOMMatrix {\r\n /**\r\n * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.\r\n */\r\n is2D: boolean;\r\n /**\r\n * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).\r\n */\r\n isIdentity: boolean;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n a: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n b: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n c: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n d: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n e: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n f: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m11: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m12: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m13: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m14: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m21: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m22: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m23: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m24: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m31: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m32: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m33: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m34: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m41: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m42: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m43: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m44: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n\r\n /**\r\n * Retrieves the current transformation matrix being applied to the context.\r\n */\r\n getTransform(): DOMMatrix;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"ICanvas.js","sourceRoot":"","sources":["../../../../dev/core/src/Engines/ICanvas.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Class used to abstract a canvas\r\n */\r\nexport interface ICanvas {\r\n /**\r\n * Canvas width.\r\n */\r\n width: number;\r\n\r\n /**\r\n * Canvas height.\r\n */\r\n height: number;\r\n\r\n /**\r\n * returns a drawing context on the canvas.\r\n * @param contextType context identifier.\r\n * @param contextAttributes context attributes.\r\n * @returns ICanvasRenderingContext object.\r\n */\r\n getContext(contextType: string, contextAttributes?: any): ICanvasRenderingContext;\r\n\r\n /**\r\n * returns a data URI containing a representation of the image in the format specified by the type parameter.\r\n * @param mime the image format.\r\n * @returns string containing the requested data URI.\r\n */\r\n toDataURL(mime: string): string;\r\n\r\n /**\r\n * Removes the canvas from the document.\r\n * Offscreen canvases don't have the remove function, so we need to make it optional.\r\n */\r\n remove?(): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract am image to use with the canvas and its context\r\n */\r\nexport interface IImage {\r\n /**\r\n * onload callback.\r\n */\r\n onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Error callback.\r\n */\r\n onerror: ((this: GlobalEventHandlers, ev: Event) => any) | null;\r\n\r\n /**\r\n * Image source.\r\n */\r\n src: string;\r\n\r\n /**\r\n * Image width.\r\n */\r\n readonly width: number;\r\n\r\n /**\r\n * Image height.\r\n */\r\n readonly height: number;\r\n\r\n /**\r\n * The original height of the image resource before sizing.\r\n */\r\n readonly naturalHeight: number;\r\n\r\n /**\r\n * The original width of the image resource before sizing.\r\n */\r\n readonly naturalWidth: number;\r\n\r\n /**\r\n * provides support for CORS, defining how the element handles crossorigin requests,\r\n * thereby enabling the configuration of the CORS requests for the element's fetched data.\r\n */\r\n crossOrigin: string | null;\r\n\r\n /**\r\n * provides support for referrer policy on xhr load request,\r\n * it is used to control the request header.\r\n */\r\n referrerPolicy: string;\r\n}\r\n\r\n/**\r\n * Class used to abstract a canvas gradient\r\n */\r\nexport interface ICanvasGradient {\r\n /**\r\n * adds a new color stop, defined by an offset and a color, to a given canvas gradient.\r\n * @param offset A number between 0 and 1, inclusive, representing the position of the color stop. 0 represents the start of the gradient and 1 represents the end.\r\n * @param color value representing the color of the stop.\r\n */\r\n addColorStop(offset: number, color: string): void;\r\n}\r\n\r\n/**\r\n * Class used to abstract a text measurement\r\n */\r\nexport interface ITextMetrics {\r\n /**\r\n * Text width.\r\n */\r\n readonly width: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the left side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxLeft: number;\r\n /**\r\n * distance (in pixels) parallel to the baseline from the alignment point given by the CanvasRenderingContext2D.textAlign\r\n * property to the right side of the bounding rectangle of the given text\r\n */\r\n readonly actualBoundingBoxRight: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract a matrix\r\n */\r\nexport interface DOMMatrix {\r\n /**\r\n * A Boolean flag whose value is true if the matrix was initialized as a 2D matrix. If false, the matrix is 3D.\r\n */\r\n is2D: boolean;\r\n /**\r\n * A Boolean whose value is true if the matrix is the identity matrix. The identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).\r\n */\r\n isIdentity: boolean;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n a: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n b: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n c: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n d: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n e: number;\r\n /**\r\n * The following double-precision floating-point values represent the components of a matrix which are required in order to perform 2D rotations and translations.\r\n */\r\n f: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m11: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m12: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m13: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m14: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m21: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m22: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m23: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m24: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m31: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m32: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m33: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m34: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m41: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m42: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m43: number;\r\n /**\r\n * The following are double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.\r\n */\r\n m44: number;\r\n}\r\n\r\n/**\r\n * Class used to abstract canvas rendering\r\n */\r\nexport interface ICanvasRenderingContext {\r\n /**\r\n * Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default).\r\n */\r\n lineJoin: string;\r\n\r\n /**\r\n * Miter limit ratio. Default 10.\r\n */\r\n miterLimit: number;\r\n\r\n /**\r\n * Font setting. Default value 10px sans-serif.\r\n */\r\n font: string;\r\n\r\n /**\r\n * Color or style to use for the lines around shapes. Default #000 (black).\r\n */\r\n strokeStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Color or style to use inside shapes. Default #000 (black).\r\n */\r\n fillStyle: string | ICanvasGradient;\r\n\r\n /**\r\n * Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).\r\n */\r\n globalAlpha: number;\r\n\r\n /**\r\n * Color of the shadow. Default: fully-transparent black.\r\n */\r\n shadowColor: string;\r\n\r\n /**\r\n * Specifies the blurring effect. Default: 0.\r\n */\r\n shadowBlur: number;\r\n\r\n /**\r\n * Horizontal distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetX: number;\r\n\r\n /**\r\n * Vertical distance the shadow will be offset. Default: 0.\r\n */\r\n shadowOffsetY: number;\r\n\r\n /**\r\n * Width of lines. Default 1.0.\r\n */\r\n lineWidth: number;\r\n\r\n /**\r\n * canvas is a read-only reference to ICanvas.\r\n */\r\n readonly canvas: ICanvas;\r\n\r\n /**\r\n * Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n clearRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Saves the current drawing style state using a stack so you can revert any change you make to it using restore().\r\n */\r\n save(): void;\r\n\r\n /**\r\n * Restores the drawing style state to the last element on the 'state stack' saved by save().\r\n */\r\n restore(): void;\r\n\r\n /**\r\n * Draws a filled rectangle at (x, y) position whose size is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n fillRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Adds a scaling transformation to the canvas units by x horizontally and by y vertically.\r\n * @param x Scaling factor in the horizontal direction. A negative value flips pixels across the vertical axis. A value of 1 results in no horizontal scaling.\r\n * @param y Scaling factor in the vertical direction. A negative value flips pixels across the horizontal axis. A value of 1 results in no vertical scaling.\r\n */\r\n scale(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a rotation to the transformation matrix. The angle argument represents a clockwise rotation angle and is expressed in radians.\r\n * @param angle The rotation angle, clockwise in radians. You can use degree * Math.PI / 180 to calculate a radian from a degree.\r\n */\r\n rotate(angle: number): void;\r\n\r\n /**\r\n * Adds a translation transformation by moving the canvas and its origin x horizontally and y vertically on the grid.\r\n * @param x Distance to move in the horizontal direction. Positive values are to the right, and negative to the left.\r\n * @param y Distance to move in the vertical direction. Positive values are down, and negative are up.\r\n */\r\n translate(x: number, y: number): void;\r\n\r\n /**\r\n * Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n strokeRect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.\r\n * @param x The x-axis coordinate of the rectangle's starting point.\r\n * @param y The y-axis coordinate of the rectangle's starting point.\r\n * @param width The rectangle's width. Positive values are to the right, and negative to the left.\r\n * @param height The rectangle's height. Positive values are down, and negative are up.\r\n */\r\n rect(x: number, y: number, width: number, height: number): void;\r\n\r\n /**\r\n * Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.\r\n */\r\n clip(): void;\r\n\r\n /**\r\n * Paints data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.\r\n * @param imageData An ImageData object containing the array of pixel values.\r\n * @param dx Horizontal position (x coordinate) at which to place the image data in the destination canvas.\r\n * @param dy Vertical position (y coordinate) at which to place the image data in the destination canvas.\r\n */\r\n putImageData(imageData: ImageData, dx: number, dy: number): void;\r\n\r\n /**\r\n * Adds a circular arc to the current path.\r\n * @param x The horizontal coordinate of the arc's center.\r\n * @param y The vertical coordinate of the arc's center.\r\n * @param radius The arc's radius. Must be positive.\r\n * @param startAngle The angle at which the arc starts in radians, measured from the positive x-axis.\r\n * @param endAngle The angle at which the arc ends in radians, measured from the positive x-axis.\r\n * @param anticlockwise An optional Boolean. If true, draws the arc counter-clockwise between the start and end angles. The default is false (clockwise).\r\n */\r\n arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;\r\n\r\n /**\r\n * Starts a new path by emptying the list of sub-paths. Call this method when you want to create a new path.\r\n */\r\n beginPath(): void;\r\n\r\n /**\r\n * Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start.\r\n * If the shape has already been closed or has only one point, this function does nothing.\r\n */\r\n closePath(): void;\r\n\r\n /**\r\n * Moves the starting point of a new sub-path to the (x, y) coordinates.\r\n * @param x The x-axis (horizontal) coordinate of the point.\r\n * @param y The y-axis (vertical) coordinate of the point.\r\n */\r\n moveTo(x: number, y: number): void;\r\n\r\n /**\r\n * Connects the last point in the current sub-path to the specified (x, y) coordinates with a straight line.\r\n * @param x The x-axis coordinate of the line's end point.\r\n * @param y The y-axis coordinate of the line's end point.\r\n */\r\n lineTo(x: number, y: number): void;\r\n\r\n /**\r\n * Adds a quadratic Bézier curve to the current path.\r\n * @param cpx The x-axis coordinate of the control point.\r\n * @param cpy The y-axis coordinate of the control point.\r\n * @param x The x-axis coordinate of the end point.\r\n * @param y The y-axis coordinate of the end point.\r\n */\r\n quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;\r\n\r\n /**\r\n * Returns a TextMetrics object.\r\n * @param text The text String to measure.\r\n * @returns ITextMetrics A ITextMetrics object.\r\n */\r\n measureText(text: string): ITextMetrics;\r\n\r\n /**\r\n * Strokes the current sub-paths with the current stroke style.\r\n */\r\n stroke(): void;\r\n\r\n /**\r\n * Fills the current sub-paths with the current fill style.\r\n */\r\n fill(): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param sx The x-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sy The y-axis coordinate of the top left corner of the sub-rectangle of the source image to draw into the destination context.\r\n * @param sWidth The width of the sub-rectangle of the source image to draw into the destination context. If not specified, the entire rectangle from the coordinates specified by sx and sy to the bottom-right corner of the image is used.\r\n * @param sHeight The height of the sub-rectangle of the source image to draw into the destination context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n\r\n drawImage(image: any, sx: number, sy: number, sWidth: number, sHeight: number, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dWidth The width to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in width when drawn.\r\n * @param dHeight The height to draw the image in the destination canvas. This allows scaling of the drawn image. If not specified, the image is not scaled in height when drawn.\r\n */\r\n drawImage(image: any, dx: number, dy: number, dWidth: number, dHeight: number): void;\r\n\r\n /**\r\n * Draws the specified image. This method is available in multiple formats, providing a great deal of flexibility in its use.\r\n * @param image An element to draw into the context.\r\n * @param dx The x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n * @param dy The y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.\r\n */\r\n drawImage(image: any, dx: number, dy: number): void;\r\n\r\n /**\r\n * Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.\r\n * @param sx The x-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sy The y-axis coordinate of the top-left corner of the rectangle from which the ImageData will be extracted.\r\n * @param sw The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param sh The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * @returns ImageData An ImageData object containing the image data for the rectangle of the canvas specified.\r\n */\r\n getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;\r\n\r\n /**\r\n * Sets the current line dash pattern.\r\n * @param segments An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units).\r\n */\r\n setLineDash(segments: Array<number>): void;\r\n\r\n /**\r\n * Draws (fills) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n fillText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Draws (strokes) a given text at the given (x, y) position.\r\n * @param text A String specifying the text string to render into the context. The text is rendered using the settings specified by font, textAlign, textBaseline, and direction.\r\n * @param x The x-axis coordinate of the point at which to begin drawing the text, in pixels.\r\n * @param y The y-axis coordinate of the baseline on which to begin drawing the text, in pixels.\r\n * @param maxWidth The maximum number of pixels wide the text may be once rendered. If not specified, there is no limit to the width of the text.\r\n */\r\n strokeText(text: string, x: number, y: number, maxWidth?: number): void;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start point.\r\n * @param y0 The y-axis coordinate of the start point.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the specified line.\r\n */\r\n createLinearGradient(x0: number, y0: number, x1: number, y1: number): ICanvasGradient;\r\n\r\n /**\r\n * Creates a linear gradient along the line given by the coordinates represented by the parameters.\r\n * @param x0 The x-axis coordinate of the start circle.\r\n * @param y0 The y-axis coordinate of the start circle.\r\n * @param r0 The radius of the start circle. Must be non-negative and finite.\r\n * @param x1 The x-axis coordinate of the end point.\r\n * @param y1 The y-axis coordinate of the end point.\r\n * @param r1 The radius of the end circle. Must be non-negative and finite.\r\n * @returns ICanvasGradient A linear ICanvasGradient initialized with the two specified circles.\r\n */\r\n createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): ICanvasGradient;\r\n\r\n /**\r\n * Resets the current transform to matrix composed with a, b, c, d, e, f.\r\n * @param a Horizontal scaling. A value of 1 results in no scaling.\r\n * @param b Vertical skewing.\r\n * @param c Horizontal skewing.\r\n * @param d Vertical scaling. A value of 1 results in no scaling.\r\n * @param e Horizontal translation (moving).\r\n * @param f Vertical translation (moving).\r\n */\r\n setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;\r\n\r\n /**\r\n * Retrieves the current transformation matrix being applied to the context.\r\n */\r\n getTransform(): DOMMatrix;\r\n}\r\n"]}
|
package/Engines/constants.d.ts
CHANGED
|
@@ -731,4 +731,100 @@ export declare class Constants {
|
|
|
731
731
|
static readonly GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA = 32772;
|
|
732
732
|
/** URL to the snippet server. Points to the public snippet server by default */
|
|
733
733
|
static SnippetUrl: string;
|
|
734
|
+
/** The fog is deactivated */
|
|
735
|
+
static FOGMODE_NONE: number;
|
|
736
|
+
/** The fog density is following an exponential function */
|
|
737
|
+
static FOGMODE_EXP: number;
|
|
738
|
+
/** The fog density is following an exponential function faster than FOGMODE_EXP */
|
|
739
|
+
static FOGMODE_EXP2: number;
|
|
740
|
+
/** The fog density is following a linear function. */
|
|
741
|
+
static FOGMODE_LINEAR: number;
|
|
742
|
+
/**
|
|
743
|
+
* The byte type.
|
|
744
|
+
*/
|
|
745
|
+
static BYTE: number;
|
|
746
|
+
/**
|
|
747
|
+
* The unsigned byte type.
|
|
748
|
+
*/
|
|
749
|
+
static UNSIGNED_BYTE: number;
|
|
750
|
+
/**
|
|
751
|
+
* The short type.
|
|
752
|
+
*/
|
|
753
|
+
static SHORT: number;
|
|
754
|
+
/**
|
|
755
|
+
* The unsigned short type.
|
|
756
|
+
*/
|
|
757
|
+
static UNSIGNED_SHORT: number;
|
|
758
|
+
/**
|
|
759
|
+
* The integer type.
|
|
760
|
+
*/
|
|
761
|
+
static INT: number;
|
|
762
|
+
/**
|
|
763
|
+
* The unsigned integer type.
|
|
764
|
+
*/
|
|
765
|
+
static UNSIGNED_INT: number;
|
|
766
|
+
/**
|
|
767
|
+
* The float type.
|
|
768
|
+
*/
|
|
769
|
+
static FLOAT: number;
|
|
770
|
+
/**
|
|
771
|
+
* Positions
|
|
772
|
+
*/
|
|
773
|
+
static PositionKind: string;
|
|
774
|
+
/**
|
|
775
|
+
* Normals
|
|
776
|
+
*/
|
|
777
|
+
static NormalKind: string;
|
|
778
|
+
/**
|
|
779
|
+
* Tangents
|
|
780
|
+
*/
|
|
781
|
+
static TangentKind: string;
|
|
782
|
+
/**
|
|
783
|
+
* Texture coordinates
|
|
784
|
+
*/
|
|
785
|
+
static UVKind: string;
|
|
786
|
+
/**
|
|
787
|
+
* Texture coordinates 2
|
|
788
|
+
*/
|
|
789
|
+
static UV2Kind: string;
|
|
790
|
+
/**
|
|
791
|
+
* Texture coordinates 3
|
|
792
|
+
*/
|
|
793
|
+
static UV3Kind: string;
|
|
794
|
+
/**
|
|
795
|
+
* Texture coordinates 4
|
|
796
|
+
*/
|
|
797
|
+
static UV4Kind: string;
|
|
798
|
+
/**
|
|
799
|
+
* Texture coordinates 5
|
|
800
|
+
*/
|
|
801
|
+
static UV5Kind: string;
|
|
802
|
+
/**
|
|
803
|
+
* Texture coordinates 6
|
|
804
|
+
*/
|
|
805
|
+
static UV6Kind: string;
|
|
806
|
+
/**
|
|
807
|
+
* Colors
|
|
808
|
+
*/
|
|
809
|
+
static ColorKind: string;
|
|
810
|
+
/**
|
|
811
|
+
* Instance Colors
|
|
812
|
+
*/
|
|
813
|
+
static ColorInstanceKind: string;
|
|
814
|
+
/**
|
|
815
|
+
* Matrix indices (for bones)
|
|
816
|
+
*/
|
|
817
|
+
static MatricesIndicesKind: string;
|
|
818
|
+
/**
|
|
819
|
+
* Matrix weights (for bones)
|
|
820
|
+
*/
|
|
821
|
+
static MatricesWeightsKind: string;
|
|
822
|
+
/**
|
|
823
|
+
* Additional matrix indices (for bones)
|
|
824
|
+
*/
|
|
825
|
+
static MatricesIndicesExtraKind: string;
|
|
826
|
+
/**
|
|
827
|
+
* Additional matrix weights (for bones)
|
|
828
|
+
*/
|
|
829
|
+
static MatricesWeightsExtraKind: string;
|
|
734
830
|
}
|