@babylonjs/core 7.53.1 → 7.53.3
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/AudioV2/abstractAudio/abstractSound.d.ts +1 -1
- package/AudioV2/abstractAudio/abstractSound.js +12 -12
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/components/spatialAudioAttacherComponent.d.ts +15 -8
- package/AudioV2/abstractAudio/components/spatialAudioAttacherComponent.js +23 -11
- package/AudioV2/abstractAudio/components/spatialAudioAttacherComponent.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.js +8 -0
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/staticSoundInstance.d.ts +2 -0
- package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.d.ts +4 -4
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js +3 -3
- package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.d.ts +23 -16
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js +3 -3
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudioListener.d.ts +13 -6
- package/AudioV2/abstractAudio/subProperties/abstractSpatialAudioListener.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/spatialAudio.d.ts +13 -8
- package/AudioV2/abstractAudio/subProperties/spatialAudio.js +18 -14
- package/AudioV2/abstractAudio/subProperties/spatialAudio.js.map +1 -1
- package/AudioV2/abstractAudio/subProperties/spatialAudioListener.d.ts +10 -6
- package/AudioV2/abstractAudio/subProperties/spatialAudioListener.js +7 -3
- package/AudioV2/abstractAudio/subProperties/spatialAudioListener.js.map +1 -1
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.d.ts +5 -5
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js +9 -9
- package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js.map +1 -1
- package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js +4 -4
- package/AudioV2/webAudio/subProperties/spatialWebAudioListener.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +4 -0
- package/AudioV2/webAudio/webAudioStaticSound.js +14 -0
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.d.ts +2 -2
- package/Culling/Helper/boundingInfoHelper.js +2 -2
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Engines/abstractEngine.js +2 -3
- package/Engines/abstractEngine.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +1 -1
- package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
- package/Lights/IES/iesLoader.d.ts +1 -1
- package/Lights/IES/iesLoader.js +1 -1
- package/Lights/IES/iesLoader.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.d.ts +2 -2
- package/Lights/Shadows/shadowGenerator.js +2 -2
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/spotLight.d.ts +1 -1
- package/Lights/spotLight.js +1 -1
- package/Lights/spotLight.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.d.ts +1 -1
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.js +1 -1
- package/Materials/Node/Blocks/Fragment/prePassOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.d.ts +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +2 -2
- package/Materials/PBR/pbrBaseMaterial.js +2 -2
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/Loaders/basisTextureLoader.d.ts +1 -0
- package/Materials/Textures/Loaders/basisTextureLoader.js +1 -0
- package/Materials/Textures/Loaders/basisTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/exrTextureLoader.d.ts +5 -4
- package/Materials/Textures/Loaders/exrTextureLoader.js +5 -4
- package/Materials/Textures/Loaders/exrTextureLoader.js.map +1 -1
- package/Materials/Textures/internalTexture.js +2 -2
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/material.js +1 -1
- package/Materials/material.js.map +1 -1
- package/Maths/math.scalar.d.ts +1 -0
- package/Maths/math.scalar.functions.d.ts +9 -0
- package/Maths/math.scalar.functions.js +11 -0
- package/Maths/math.scalar.functions.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.d.ts +96 -0
- package/Meshes/Node/Blocks/geometryEaseBlock.js +318 -0
- package/Meshes/Node/Blocks/geometryEaseBlock.js.map +1 -0
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/csg2.d.ts +3 -3
- package/Meshes/csg2.js +3 -3
- package/Meshes/csg2.js.map +1 -1
- package/Meshes/lattice.d.ts +2 -2
- package/Meshes/lattice.js +5 -4
- package/Meshes/lattice.js.map +1 -1
- package/Meshes/lattice.material.d.ts +2 -2
- package/Meshes/lattice.material.js +2 -2
- package/Meshes/lattice.material.js.map +1 -1
- package/Meshes/mesh.d.ts +2 -2
- package/Meshes/mesh.js +2 -2
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/subMesh.js +1 -1
- package/Meshes/subMesh.js.map +1 -1
- package/Misc/fileTools.d.ts +1 -1
- package/Misc/fileTools.js +1 -1
- package/Misc/fileTools.js.map +1 -1
- package/Physics/v2/characterController.d.ts +3 -2
- package/Physics/v2/characterController.js +12 -0
- package/Physics/v2/characterController.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +4 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +11 -16
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +6 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +7 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +3 -0
- package/scene.js +5 -0
- package/scene.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.scalar.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.scalar.functions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS,EAAE,UAAkB,YAAY;IAC9E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC;AACtC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,GAAW;IAChD,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;QACd,OAAO,GAAG,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,KAAa,EAAE,GAAW,EAAE,MAAc;IAC3D,OAAO,KAAK,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,KA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AAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACrC,CAAC","sourcesContent":["/**\r\n * Extract int value\r\n * @param value number value\r\n * @returns int value\r\n */\r\nexport function ExtractAsInt(value: number) {\r\n return parseInt(value.toString().replace(/\\W/g, \"\"));\r\n}\r\n\r\n/**\r\n * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\r\n * @param a number\r\n * @param b number\r\n * @param epsilon (default = 1.401298E-45)\r\n * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\r\n */\r\nexport function WithinEpsilon(a: number, b: number, epsilon: number = 1.401298e-45): boolean {\r\n return Math.abs(a - b) <= epsilon;\r\n}\r\n\r\n/**\r\n * Returns a random float number between and min and max values\r\n * @param min min value of random\r\n * @param max max value of random\r\n * @returns random value\r\n */\r\nexport function RandomRange(min: number, max: number): number {\r\n if (min === max) {\r\n return min;\r\n }\r\n return Math.random() * (max - min) + min;\r\n}\r\n\r\n/**\r\n * Creates a new scalar with values linearly interpolated of \"amount\" between the start scalar and the end scalar.\r\n * @param start start value\r\n * @param end target value\r\n * @param amount amount to lerp between\r\n * @returns the lerped value\r\n */\r\nexport function Lerp(start: number, end: number, amount: number): number {\r\n return start + (end - start) * amount;\r\n}\r\n\r\n/**\r\n * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.\r\n * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.\r\n * @param start start value\r\n * @param end target value\r\n * @param amount amount to lerp between\r\n * @returns the lerped value\r\n */\r\nexport function LerpAngle(start: number, end: number, amount: number): number {\r\n let num: number = Repeat(end - start, 360.0);\r\n if (num > 180.0) {\r\n num -= 360.0;\r\n }\r\n return start + num * Clamp(amount);\r\n}\r\n\r\n/**\r\n * Calculates the linear parameter t that produces the interpolant value within the range [a, b].\r\n * @param a start value\r\n * @param b target value\r\n * @param value value between a and b\r\n * @returns the inverseLerp value\r\n */\r\nexport function InverseLerp(a: number, b: number, value: number): number {\r\n let result: number = 0;\r\n if (a != b) {\r\n result = Clamp((value - a) / (b - a));\r\n } else {\r\n result = 0.0;\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns a new scalar located for \"amount\" (float) on the Hermite spline defined by the scalars \"value1\", \"value3\", \"tangent1\", \"tangent2\".\r\n * @see http://mathworld.wolfram.com/HermitePolynomial.html\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns hermite result\r\n */\r\nexport function Hermite(value1: number, tangent1: number, value2: number, tangent2: number, amount: number): number {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n return value1 * part1 + value2 * part2 + tangent1 * part3 + tangent2 * part4;\r\n}\r\n\r\n/**\r\n * Returns a new scalar which is the 1st derivative of the Hermite spline defined by the scalars \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\nexport function Hermite1stDerivative(value1: number, tangent1: number, value2: number, tangent2: number, time: number): number {\r\n const t2 = time * time;\r\n return (t2 - time) * 6 * value1 + (3 * t2 - 4 * time + 1) * tangent1 + (-t2 + time) * 6 * value2 + (3 * t2 - 2 * time) * tangent2;\r\n}\r\n\r\n/**\r\n * Returns the value itself if it's between min and max.\r\n * Returns min if the value is lower than min.\r\n * Returns max if the value is greater than max.\r\n * @param value the value to clmap\r\n * @param min the min value to clamp to (default: 0)\r\n * @param max the max value to clamp to (default: 1)\r\n * @returns the clamped value\r\n */\r\nexport function Clamp(value: number, min = 0, max = 1): number {\r\n return Math.min(max, Math.max(min, value));\r\n}\r\n\r\n/**\r\n * Returns the angle converted to equivalent value between -Math.PI and Math.PI radians.\r\n * @param angle The angle to normalize in radian.\r\n * @returns The converted angle.\r\n */\r\nexport function NormalizeRadians(angle: number): number {\r\n // More precise but slower version kept for reference.\r\n // angle = angle % Tools.TwoPi;\r\n // angle = (angle + Tools.TwoPi) % Tools.TwoPi;\r\n\r\n //if (angle > Math.PI) {\r\n //\tangle -= Tools.TwoPi;\r\n //}\r\n\r\n angle -= Math.PI * 2 * Math.floor((angle + Math.PI) / (Math.PI * 2));\r\n\r\n return angle;\r\n}\r\n\r\n/**\r\n * Returns a string : the upper case translation of the number i to hexadecimal.\r\n * @param i number\r\n * @returns the upper case translation of the number i to hexadecimal.\r\n */\r\nexport function ToHex(i: number): string {\r\n const str = i.toString(16);\r\n\r\n if (i <= 15) {\r\n return (\"0\" + str).toUpperCase();\r\n }\r\n\r\n return str.toUpperCase();\r\n}\r\n\r\n/**\r\n * the floor part of a log2 value.\r\n * @param value the value to compute log2 of\r\n * @returns the log2 of value.\r\n */\r\nexport function ILog2(value: number): number {\r\n if (Math.log2) {\r\n return Math.floor(Math.log2(value));\r\n }\r\n\r\n if (value < 0) {\r\n return NaN;\r\n } else if (value === 0) {\r\n return -Infinity;\r\n }\r\n\r\n let n = 0;\r\n if (value < 1) {\r\n while (value < 1) {\r\n n++;\r\n value = value * 2;\r\n }\r\n n = -n;\r\n } else if (value > 1) {\r\n while (value > 1) {\r\n n++;\r\n value = Math.floor(value / 2);\r\n }\r\n }\r\n\r\n return n;\r\n}\r\n\r\n/**\r\n * Loops the value, so that it is never larger than length and never smaller than 0.\r\n *\r\n * This is similar to the modulo operator but it works with floating point numbers.\r\n * For example, using 3.0 for t and 2.5 for length, the result would be 0.5.\r\n * With t = 5 and length = 2.5, the result would be 0.0.\r\n * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator\r\n * @param value the value\r\n * @param length the length\r\n * @returns the looped value\r\n */\r\nexport function Repeat(value: number, length: number): number {\r\n return value - Math.floor(value / length) * length;\r\n}\r\n\r\n/**\r\n * Normalize the value between 0.0 and 1.0 using min and max values\r\n * @param value value to normalize\r\n * @param min max to normalize between\r\n * @param max min to normalize between\r\n * @returns the normalized value\r\n */\r\nexport function Normalize(value: number, min: number, max: number): number {\r\n return (value - min) / (max - min);\r\n}\r\n\r\n/**\r\n * Denormalize the value from 0.0 and 1.0 using min and max values\r\n * @param normalized value to denormalize\r\n * @param min max to denormalize between\r\n * @param max min to denormalize between\r\n * @returns the denormalized value\r\n */\r\nexport function Denormalize(normalized: number, min: number, max: number): number {\r\n return normalized * (max - min) + min;\r\n}\r\n\r\n/**\r\n * Calculates the shortest difference between two given angles given in degrees.\r\n * @param current current angle in degrees\r\n * @param target target angle in degrees\r\n * @returns the delta\r\n */\r\nexport function DeltaAngle(current: number, target: number): number {\r\n let num: number = Repeat(target - current, 360.0);\r\n if (num > 180.0) {\r\n num -= 360.0;\r\n }\r\n return num;\r\n}\r\n\r\n/**\r\n * PingPongs the value t, so that it is never larger than length and never smaller than 0.\r\n * @param tx value\r\n * @param length length\r\n * @returns The returned value will move back and forth between 0 and length\r\n */\r\nexport function PingPong(tx: number, length: number): number {\r\n const t: number = Repeat(tx, length * 2.0);\r\n return length - Math.abs(t - length);\r\n}\r\n\r\n/**\r\n * Interpolates between min and max with smoothing at the limits.\r\n *\r\n * This function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up\r\n * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.\r\n * @param from from\r\n * @param to to\r\n * @param tx value\r\n * @returns the smooth stepped value\r\n */\r\nexport function SmoothStep(from: number, to: number, tx: number): number {\r\n let t: number = Clamp(tx);\r\n t = -2.0 * t * t * t + 3.0 * t * t;\r\n return to * t + from * (1.0 - t);\r\n}\r\n\r\n/**\r\n * Moves a value current towards target.\r\n *\r\n * This is essentially the same as Mathf.Lerp but instead the function will ensure that the speed never exceeds maxDelta.\r\n * Negative values of maxDelta pushes the value away from target.\r\n * @param current current value\r\n * @param target target value\r\n * @param maxDelta max distance to move\r\n * @returns resulting value\r\n */\r\nexport function MoveTowards(current: number, target: number, maxDelta: number): number {\r\n let result: number = 0;\r\n if (Math.abs(target - current) <= maxDelta) {\r\n result = target;\r\n } else {\r\n result = current + Math.sign(target - current) * maxDelta;\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.\r\n *\r\n * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta\r\n * are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.\r\n * @param current current value\r\n * @param target target value\r\n * @param maxDelta max distance to move\r\n * @returns resulting angle\r\n */\r\nexport function MoveTowardsAngle(current: number, target: number, maxDelta: number): number {\r\n const num: number = DeltaAngle(current, target);\r\n let result: number = 0;\r\n if (-maxDelta < num && num < maxDelta) {\r\n result = target;\r\n } else {\r\n target = current + num;\r\n result = MoveTowards(current, target, maxDelta);\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * This function returns percentage of a number in a given range.\r\n *\r\n * RangeToPercent(40,20,60) will return 0.5 (50%)\r\n * RangeToPercent(34,0,100) will return 0.34 (34%)\r\n * @param number to convert to percentage\r\n * @param min min range\r\n * @param max max range\r\n * @returns the percentage\r\n */\r\nexport function RangeToPercent(number: number, min: number, max: number): number {\r\n return (number - min) / (max - min);\r\n}\r\n\r\n/**\r\n * This function returns number that corresponds to the percentage in a given range.\r\n *\r\n * PercentToRange(0.34,0,100) will return 34.\r\n * @param percent to convert to number\r\n * @param min min range\r\n * @param max max range\r\n * @returns the number\r\n */\r\nexport function PercentToRange(percent: number, min: number, max: number): number {\r\n return (max - min) * percent + min;\r\n}\r\n\r\n/**\r\n * Returns the highest common factor of two integers.\r\n * @param a first parameter\r\n * @param b second parameter\r\n * @returns HCF of a and b\r\n */\r\nexport function HighestCommonFactor(a: number, b: number): number {\r\n const r: number = a % b;\r\n if (r === 0) {\r\n return b;\r\n }\r\n return HighestCommonFactor(b, r);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"math.scalar.functions.js","sourceRoot":"","sources":["../../../../dev/core/src/Maths/math.scalar.functions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa;IACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,CAAS,EAAE,CAAS,EAAE,UAAkB,YAAY;IAC9E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,OAAO,CAAC;AACtC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,GAAW,EAAE,GAAW,EAAE,UAAkB,YAAY;IAC9F,OAAO,GAAG,GAAG,GAAG,GAAG,OAAO,IAAI,GAAG,GAAG,GAAG,GAAG,OAAO,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,GAAW,EAAE,GAAW;IAChD,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;QACd,OAAO,GAAG,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAC7C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,IAAI,CAAC,KAAa,EAAE,GAAW,EAAE,MAAc;IAC3D,OAAO,KAAK,GAAG,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;AAC1C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,GAAW,EAAE,MAAc;IAChE,IAAI,GAAG,GAAW,MAAM,CAAC,GAAG,GAAG,KAAK,EAAE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value number value\r\n * @returns int value\r\n */\r\nexport function ExtractAsInt(value: number) {\r\n return parseInt(value.toString().replace(/\\W/g, \"\"));\r\n}\r\n\r\n/**\r\n * Boolean : true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\r\n * @param a number\r\n * @param b number\r\n * @param epsilon (default = 1.401298E-45)\r\n * @returns true if the absolute difference between a and b is lower than epsilon (default = 1.401298E-45)\r\n */\r\nexport function WithinEpsilon(a: number, b: number, epsilon: number = 1.401298e-45): boolean {\r\n return Math.abs(a - b) <= epsilon;\r\n}\r\n\r\n/**\r\n * Boolean : true if the number is outside a range\r\n * @param num number\r\n * @param min min value\r\n * @param max max value\r\n * @param epsilon (default = Number.EPSILON)\r\n * @returns true if the number is between min and max values\r\n */\r\nexport function OutsideRange(num: number, min: number, max: number, epsilon: number = 1.401298e-45): boolean {\r\n return num < min - epsilon || num > max + epsilon;\r\n}\r\n\r\n/**\r\n * Returns a random float number between and min and max values\r\n * @param min min value of random\r\n * @param max max value of random\r\n * @returns random value\r\n */\r\nexport function RandomRange(min: number, max: number): number {\r\n if (min === max) {\r\n return min;\r\n }\r\n return Math.random() * (max - min) + min;\r\n}\r\n\r\n/**\r\n * Creates a new scalar with values linearly interpolated of \"amount\" between the start scalar and the end scalar.\r\n * @param start start value\r\n * @param end target value\r\n * @param amount amount to lerp between\r\n * @returns the lerped value\r\n */\r\nexport function Lerp(start: number, end: number, amount: number): number {\r\n return start + (end - start) * amount;\r\n}\r\n\r\n/**\r\n * Same as Lerp but makes sure the values interpolate correctly when they wrap around 360 degrees.\r\n * The parameter t is clamped to the range [0, 1]. Variables a and b are assumed to be in degrees.\r\n * @param start start value\r\n * @param end target value\r\n * @param amount amount to lerp between\r\n * @returns the lerped value\r\n */\r\nexport function LerpAngle(start: number, end: number, amount: number): number {\r\n let num: number = Repeat(end - start, 360.0);\r\n if (num > 180.0) {\r\n num -= 360.0;\r\n }\r\n return start + num * Clamp(amount);\r\n}\r\n\r\n/**\r\n * Calculates the linear parameter t that produces the interpolant value within the range [a, b].\r\n * @param a start value\r\n * @param b target value\r\n * @param value value between a and b\r\n * @returns the inverseLerp value\r\n */\r\nexport function InverseLerp(a: number, b: number, value: number): number {\r\n let result: number = 0;\r\n if (a != b) {\r\n result = Clamp((value - a) / (b - a));\r\n } else {\r\n result = 0.0;\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns a new scalar located for \"amount\" (float) on the Hermite spline defined by the scalars \"value1\", \"value3\", \"tangent1\", \"tangent2\".\r\n * @see http://mathworld.wolfram.com/HermitePolynomial.html\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param amount defines the amount on the interpolation spline (between 0 and 1)\r\n * @returns hermite result\r\n */\r\nexport function Hermite(value1: number, tangent1: number, value2: number, tangent2: number, amount: number): number {\r\n const squared = amount * amount;\r\n const cubed = amount * squared;\r\n const part1 = 2.0 * cubed - 3.0 * squared + 1.0;\r\n const part2 = -2.0 * cubed + 3.0 * squared;\r\n const part3 = cubed - 2.0 * squared + amount;\r\n const part4 = cubed - squared;\r\n\r\n return value1 * part1 + value2 * part2 + tangent1 * part3 + tangent2 * part4;\r\n}\r\n\r\n/**\r\n * Returns a new scalar which is the 1st derivative of the Hermite spline defined by the scalars \"value1\", \"value2\", \"tangent1\", \"tangent2\".\r\n * @param value1 defines the first control point\r\n * @param tangent1 defines the first tangent\r\n * @param value2 defines the second control point\r\n * @param tangent2 defines the second tangent\r\n * @param time define where the derivative must be done\r\n * @returns 1st derivative\r\n */\r\nexport function Hermite1stDerivative(value1: number, tangent1: number, value2: number, tangent2: number, time: number): number {\r\n const t2 = time * time;\r\n return (t2 - time) * 6 * value1 + (3 * t2 - 4 * time + 1) * tangent1 + (-t2 + time) * 6 * value2 + (3 * t2 - 2 * time) * tangent2;\r\n}\r\n\r\n/**\r\n * Returns the value itself if it's between min and max.\r\n * Returns min if the value is lower than min.\r\n * Returns max if the value is greater than max.\r\n * @param value the value to clmap\r\n * @param min the min value to clamp to (default: 0)\r\n * @param max the max value to clamp to (default: 1)\r\n * @returns the clamped value\r\n */\r\nexport function Clamp(value: number, min = 0, max = 1): number {\r\n return Math.min(max, Math.max(min, value));\r\n}\r\n\r\n/**\r\n * Returns the angle converted to equivalent value between -Math.PI and Math.PI radians.\r\n * @param angle The angle to normalize in radian.\r\n * @returns The converted angle.\r\n */\r\nexport function NormalizeRadians(angle: number): number {\r\n // More precise but slower version kept for reference.\r\n // angle = angle % Tools.TwoPi;\r\n // angle = (angle + Tools.TwoPi) % Tools.TwoPi;\r\n\r\n //if (angle > Math.PI) {\r\n //\tangle -= Tools.TwoPi;\r\n //}\r\n\r\n angle -= Math.PI * 2 * Math.floor((angle + Math.PI) / (Math.PI * 2));\r\n\r\n return angle;\r\n}\r\n\r\n/**\r\n * Returns a string : the upper case translation of the number i to hexadecimal.\r\n * @param i number\r\n * @returns the upper case translation of the number i to hexadecimal.\r\n */\r\nexport function ToHex(i: number): string {\r\n const str = i.toString(16);\r\n\r\n if (i <= 15) {\r\n return (\"0\" + str).toUpperCase();\r\n }\r\n\r\n return str.toUpperCase();\r\n}\r\n\r\n/**\r\n * the floor part of a log2 value.\r\n * @param value the value to compute log2 of\r\n * @returns the log2 of value.\r\n */\r\nexport function ILog2(value: number): number {\r\n if (Math.log2) {\r\n return Math.floor(Math.log2(value));\r\n }\r\n\r\n if (value < 0) {\r\n return NaN;\r\n } else if (value === 0) {\r\n return -Infinity;\r\n }\r\n\r\n let n = 0;\r\n if (value < 1) {\r\n while (value < 1) {\r\n n++;\r\n value = value * 2;\r\n }\r\n n = -n;\r\n } else if (value > 1) {\r\n while (value > 1) {\r\n n++;\r\n value = Math.floor(value / 2);\r\n }\r\n }\r\n\r\n return n;\r\n}\r\n\r\n/**\r\n * Loops the value, so that it is never larger than length and never smaller than 0.\r\n *\r\n * This is similar to the modulo operator but it works with floating point numbers.\r\n * For example, using 3.0 for t and 2.5 for length, the result would be 0.5.\r\n * With t = 5 and length = 2.5, the result would be 0.0.\r\n * Note, however, that the behaviour is not defined for negative numbers as it is for the modulo operator\r\n * @param value the value\r\n * @param length the length\r\n * @returns the looped value\r\n */\r\nexport function Repeat(value: number, length: number): number {\r\n return value - Math.floor(value / length) * length;\r\n}\r\n\r\n/**\r\n * Normalize the value between 0.0 and 1.0 using min and max values\r\n * @param value value to normalize\r\n * @param min max to normalize between\r\n * @param max min to normalize between\r\n * @returns the normalized value\r\n */\r\nexport function Normalize(value: number, min: number, max: number): number {\r\n return (value - min) / (max - min);\r\n}\r\n\r\n/**\r\n * Denormalize the value from 0.0 and 1.0 using min and max values\r\n * @param normalized value to denormalize\r\n * @param min max to denormalize between\r\n * @param max min to denormalize between\r\n * @returns the denormalized value\r\n */\r\nexport function Denormalize(normalized: number, min: number, max: number): number {\r\n return normalized * (max - min) + min;\r\n}\r\n\r\n/**\r\n * Calculates the shortest difference between two given angles given in degrees.\r\n * @param current current angle in degrees\r\n * @param target target angle in degrees\r\n * @returns the delta\r\n */\r\nexport function DeltaAngle(current: number, target: number): number {\r\n let num: number = Repeat(target - current, 360.0);\r\n if (num > 180.0) {\r\n num -= 360.0;\r\n }\r\n return num;\r\n}\r\n\r\n/**\r\n * PingPongs the value t, so that it is never larger than length and never smaller than 0.\r\n * @param tx value\r\n * @param length length\r\n * @returns The returned value will move back and forth between 0 and length\r\n */\r\nexport function PingPong(tx: number, length: number): number {\r\n const t: number = Repeat(tx, length * 2.0);\r\n return length - Math.abs(t - length);\r\n}\r\n\r\n/**\r\n * Interpolates between min and max with smoothing at the limits.\r\n *\r\n * This function interpolates between min and max in a similar way to Lerp. However, the interpolation will gradually speed up\r\n * from the start and slow down toward the end. This is useful for creating natural-looking animation, fading and other transitions.\r\n * @param from from\r\n * @param to to\r\n * @param tx value\r\n * @returns the smooth stepped value\r\n */\r\nexport function SmoothStep(from: number, to: number, tx: number): number {\r\n let t: number = Clamp(tx);\r\n t = -2.0 * t * t * t + 3.0 * t * t;\r\n return to * t + from * (1.0 - t);\r\n}\r\n\r\n/**\r\n * Moves a value current towards target.\r\n *\r\n * This is essentially the same as Mathf.Lerp but instead the function will ensure that the speed never exceeds maxDelta.\r\n * Negative values of maxDelta pushes the value away from target.\r\n * @param current current value\r\n * @param target target value\r\n * @param maxDelta max distance to move\r\n * @returns resulting value\r\n */\r\nexport function MoveTowards(current: number, target: number, maxDelta: number): number {\r\n let result: number = 0;\r\n if (Math.abs(target - current) <= maxDelta) {\r\n result = target;\r\n } else {\r\n result = current + Math.sign(target - current) * maxDelta;\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Same as MoveTowards but makes sure the values interpolate correctly when they wrap around 360 degrees.\r\n *\r\n * Variables current and target are assumed to be in degrees. For optimization reasons, negative values of maxDelta\r\n * are not supported and may cause oscillation. To push current away from a target angle, add 180 to that angle instead.\r\n * @param current current value\r\n * @param target target value\r\n * @param maxDelta max distance to move\r\n * @returns resulting angle\r\n */\r\nexport function MoveTowardsAngle(current: number, target: number, maxDelta: number): number {\r\n const num: number = DeltaAngle(current, target);\r\n let result: number = 0;\r\n if (-maxDelta < num && num < maxDelta) {\r\n result = target;\r\n } else {\r\n target = current + num;\r\n result = MoveTowards(current, target, maxDelta);\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * This function returns percentage of a number in a given range.\r\n *\r\n * RangeToPercent(40,20,60) will return 0.5 (50%)\r\n * RangeToPercent(34,0,100) will return 0.34 (34%)\r\n * @param number to convert to percentage\r\n * @param min min range\r\n * @param max max range\r\n * @returns the percentage\r\n */\r\nexport function RangeToPercent(number: number, min: number, max: number): number {\r\n return (number - min) / (max - min);\r\n}\r\n\r\n/**\r\n * This function returns number that corresponds to the percentage in a given range.\r\n *\r\n * PercentToRange(0.34,0,100) will return 34.\r\n * @param percent to convert to number\r\n * @param min min range\r\n * @param max max range\r\n * @returns the number\r\n */\r\nexport function PercentToRange(percent: number, min: number, max: number): number {\r\n return (max - min) * percent + min;\r\n}\r\n\r\n/**\r\n * Returns the highest common factor of two integers.\r\n * @param a first parameter\r\n * @param b second parameter\r\n * @returns HCF of a and b\r\n */\r\nexport function HighestCommonFactor(a: number, b: number): number {\r\n const r: number = a % b;\r\n if (r === 0) {\r\n return b;\r\n }\r\n return HighestCommonFactor(b, r);\r\n}\r\n"]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { NodeGeometryBlock } from "../nodeGeometryBlock";
|
|
2
|
+
import type { NodeGeometryConnectionPoint } from "../nodeGeometryBlockConnectionPoint";
|
|
3
|
+
import type { NodeGeometryBuildState } from "../nodeGeometryBuildState";
|
|
4
|
+
/**
|
|
5
|
+
* Types of easing function supported by the Ease block
|
|
6
|
+
*/
|
|
7
|
+
export declare enum GeometryEaseBlockTypes {
|
|
8
|
+
/** EaseInSine */
|
|
9
|
+
EaseInSine = 0,
|
|
10
|
+
/** EaseOutSine */
|
|
11
|
+
EaseOutSine = 1,
|
|
12
|
+
/** EaseInOutSine */
|
|
13
|
+
EaseInOutSine = 2,
|
|
14
|
+
/** EaseInQuad */
|
|
15
|
+
EaseInQuad = 3,
|
|
16
|
+
/** EaseOutQuad */
|
|
17
|
+
EaseOutQuad = 4,
|
|
18
|
+
/** EaseInOutQuad */
|
|
19
|
+
EaseInOutQuad = 5,
|
|
20
|
+
/** EaseInCubic */
|
|
21
|
+
EaseInCubic = 6,
|
|
22
|
+
/** EaseOutCubic */
|
|
23
|
+
EaseOutCubic = 7,
|
|
24
|
+
/** EaseInOutCubic */
|
|
25
|
+
EaseInOutCubic = 8,
|
|
26
|
+
/** EaseInQuart */
|
|
27
|
+
EaseInQuart = 9,
|
|
28
|
+
/** EaseOutQuart */
|
|
29
|
+
EaseOutQuart = 10,
|
|
30
|
+
/** EaseInOutQuart */
|
|
31
|
+
EaseInOutQuart = 11,
|
|
32
|
+
/** EaseInQuint */
|
|
33
|
+
EaseInQuint = 12,
|
|
34
|
+
/** EaseOutQuint */
|
|
35
|
+
EaseOutQuint = 13,
|
|
36
|
+
/** EaseInOutQuint */
|
|
37
|
+
EaseInOutQuint = 14,
|
|
38
|
+
/** EaseInExpo */
|
|
39
|
+
EaseInExpo = 15,
|
|
40
|
+
/** EaseOutExpo */
|
|
41
|
+
EaseOutExpo = 16,
|
|
42
|
+
/** EaseInOutExpo */
|
|
43
|
+
EaseInOutExpo = 17,
|
|
44
|
+
/** EaseInCirc */
|
|
45
|
+
EaseInCirc = 18,
|
|
46
|
+
/** EaseOutCirc */
|
|
47
|
+
EaseOutCirc = 19,
|
|
48
|
+
/** EaseInOutCirc */
|
|
49
|
+
EaseInOutCirc = 20,
|
|
50
|
+
/** EaseInBack */
|
|
51
|
+
EaseInBack = 21,
|
|
52
|
+
/** EaseOutBack */
|
|
53
|
+
EaseOutBack = 22,
|
|
54
|
+
/** EaseInOutBack */
|
|
55
|
+
EaseInOutBack = 23,
|
|
56
|
+
/** EaseInElastic */
|
|
57
|
+
EaseInElastic = 24,
|
|
58
|
+
/** EaseOutElastic */
|
|
59
|
+
EaseOutElastic = 25,
|
|
60
|
+
/** EaseInOutElastic */
|
|
61
|
+
EaseInOutElastic = 26
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Block used to apply an easing function to floats
|
|
65
|
+
*/
|
|
66
|
+
export declare class GeometryEaseBlock extends NodeGeometryBlock {
|
|
67
|
+
private _easingFunction;
|
|
68
|
+
private _type;
|
|
69
|
+
/**
|
|
70
|
+
* Gets or sets the type of the easing functions applied by the block
|
|
71
|
+
*/
|
|
72
|
+
get type(): GeometryEaseBlockTypes;
|
|
73
|
+
set type(value: GeometryEaseBlockTypes);
|
|
74
|
+
/**
|
|
75
|
+
* Creates a new GeometryEaseBlock
|
|
76
|
+
* @param name defines the block name
|
|
77
|
+
*/
|
|
78
|
+
constructor(name: string);
|
|
79
|
+
/**
|
|
80
|
+
* Gets the current class name
|
|
81
|
+
* @returns the class name
|
|
82
|
+
*/
|
|
83
|
+
getClassName(): string;
|
|
84
|
+
/**
|
|
85
|
+
* Gets the input component
|
|
86
|
+
*/
|
|
87
|
+
get input(): NodeGeometryConnectionPoint;
|
|
88
|
+
/**
|
|
89
|
+
* Gets the output component
|
|
90
|
+
*/
|
|
91
|
+
get output(): NodeGeometryConnectionPoint;
|
|
92
|
+
protected _buildBlock(state: NodeGeometryBuildState): this | undefined;
|
|
93
|
+
serialize(): any;
|
|
94
|
+
_deserialize(serializationObject: any): void;
|
|
95
|
+
protected _dumpPropertiesCode(): string;
|
|
96
|
+
}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { __decorate } from "../../../tslib.es6.js";
|
|
2
|
+
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
3
|
+
import { NodeGeometryBlockConnectionPointTypes } from "../Enums/nodeGeometryConnectionPointTypes.js";
|
|
4
|
+
import { NodeGeometryBlock } from "../nodeGeometryBlock.js";
|
|
5
|
+
import { Vector2, Vector3, Vector4 } from "../../../Maths/math.vector.js";
|
|
6
|
+
import { editableInPropertyPage } from "../../../Decorators/nodeDecorator.js";
|
|
7
|
+
import { BackEase, CircleEase, CubicEase, ElasticEase, ExponentialEase, QuadraticEase, QuarticEase, QuinticEase, SineEase } from "../../../Animations/easing.js";
|
|
8
|
+
/**
|
|
9
|
+
* Types of easing function supported by the Ease block
|
|
10
|
+
*/
|
|
11
|
+
export var GeometryEaseBlockTypes;
|
|
12
|
+
(function (GeometryEaseBlockTypes) {
|
|
13
|
+
/** EaseInSine */
|
|
14
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInSine"] = 0] = "EaseInSine";
|
|
15
|
+
/** EaseOutSine */
|
|
16
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutSine"] = 1] = "EaseOutSine";
|
|
17
|
+
/** EaseInOutSine */
|
|
18
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutSine"] = 2] = "EaseInOutSine";
|
|
19
|
+
/** EaseInQuad */
|
|
20
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInQuad"] = 3] = "EaseInQuad";
|
|
21
|
+
/** EaseOutQuad */
|
|
22
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutQuad"] = 4] = "EaseOutQuad";
|
|
23
|
+
/** EaseInOutQuad */
|
|
24
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutQuad"] = 5] = "EaseInOutQuad";
|
|
25
|
+
/** EaseInCubic */
|
|
26
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInCubic"] = 6] = "EaseInCubic";
|
|
27
|
+
/** EaseOutCubic */
|
|
28
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutCubic"] = 7] = "EaseOutCubic";
|
|
29
|
+
/** EaseInOutCubic */
|
|
30
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutCubic"] = 8] = "EaseInOutCubic";
|
|
31
|
+
/** EaseInQuart */
|
|
32
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInQuart"] = 9] = "EaseInQuart";
|
|
33
|
+
/** EaseOutQuart */
|
|
34
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutQuart"] = 10] = "EaseOutQuart";
|
|
35
|
+
/** EaseInOutQuart */
|
|
36
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutQuart"] = 11] = "EaseInOutQuart";
|
|
37
|
+
/** EaseInQuint */
|
|
38
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInQuint"] = 12] = "EaseInQuint";
|
|
39
|
+
/** EaseOutQuint */
|
|
40
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutQuint"] = 13] = "EaseOutQuint";
|
|
41
|
+
/** EaseInOutQuint */
|
|
42
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutQuint"] = 14] = "EaseInOutQuint";
|
|
43
|
+
/** EaseInExpo */
|
|
44
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInExpo"] = 15] = "EaseInExpo";
|
|
45
|
+
/** EaseOutExpo */
|
|
46
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutExpo"] = 16] = "EaseOutExpo";
|
|
47
|
+
/** EaseInOutExpo */
|
|
48
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutExpo"] = 17] = "EaseInOutExpo";
|
|
49
|
+
/** EaseInCirc */
|
|
50
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInCirc"] = 18] = "EaseInCirc";
|
|
51
|
+
/** EaseOutCirc */
|
|
52
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutCirc"] = 19] = "EaseOutCirc";
|
|
53
|
+
/** EaseInOutCirc */
|
|
54
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutCirc"] = 20] = "EaseInOutCirc";
|
|
55
|
+
/** EaseInBack */
|
|
56
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInBack"] = 21] = "EaseInBack";
|
|
57
|
+
/** EaseOutBack */
|
|
58
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutBack"] = 22] = "EaseOutBack";
|
|
59
|
+
/** EaseInOutBack */
|
|
60
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutBack"] = 23] = "EaseInOutBack";
|
|
61
|
+
/** EaseInElastic */
|
|
62
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInElastic"] = 24] = "EaseInElastic";
|
|
63
|
+
/** EaseOutElastic */
|
|
64
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseOutElastic"] = 25] = "EaseOutElastic";
|
|
65
|
+
/** EaseInOutElastic */
|
|
66
|
+
GeometryEaseBlockTypes[GeometryEaseBlockTypes["EaseInOutElastic"] = 26] = "EaseInOutElastic";
|
|
67
|
+
})(GeometryEaseBlockTypes || (GeometryEaseBlockTypes = {}));
|
|
68
|
+
/**
|
|
69
|
+
* Block used to apply an easing function to floats
|
|
70
|
+
*/
|
|
71
|
+
export class GeometryEaseBlock extends NodeGeometryBlock {
|
|
72
|
+
/**
|
|
73
|
+
* Gets or sets the type of the easing functions applied by the block
|
|
74
|
+
*/
|
|
75
|
+
get type() {
|
|
76
|
+
return this._type;
|
|
77
|
+
}
|
|
78
|
+
set type(value) {
|
|
79
|
+
if (this._type === value) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
this._type = value;
|
|
83
|
+
switch (this._type) {
|
|
84
|
+
case GeometryEaseBlockTypes.EaseInSine:
|
|
85
|
+
this._easingFunction = new SineEase();
|
|
86
|
+
this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEIN);
|
|
87
|
+
break;
|
|
88
|
+
case GeometryEaseBlockTypes.EaseOutSine:
|
|
89
|
+
this._easingFunction = new SineEase();
|
|
90
|
+
this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEOUT);
|
|
91
|
+
break;
|
|
92
|
+
case GeometryEaseBlockTypes.EaseInOutSine:
|
|
93
|
+
this._easingFunction = new SineEase();
|
|
94
|
+
this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEINOUT);
|
|
95
|
+
break;
|
|
96
|
+
case GeometryEaseBlockTypes.EaseInQuad:
|
|
97
|
+
this._easingFunction = new QuadraticEase();
|
|
98
|
+
this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEIN);
|
|
99
|
+
break;
|
|
100
|
+
case GeometryEaseBlockTypes.EaseOutQuad:
|
|
101
|
+
this._easingFunction = new QuadraticEase();
|
|
102
|
+
this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEOUT);
|
|
103
|
+
break;
|
|
104
|
+
case GeometryEaseBlockTypes.EaseInOutQuad:
|
|
105
|
+
this._easingFunction = new QuadraticEase();
|
|
106
|
+
this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEINOUT);
|
|
107
|
+
break;
|
|
108
|
+
case GeometryEaseBlockTypes.EaseInCubic:
|
|
109
|
+
this._easingFunction = new CubicEase();
|
|
110
|
+
this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEIN);
|
|
111
|
+
break;
|
|
112
|
+
case GeometryEaseBlockTypes.EaseOutCubic:
|
|
113
|
+
this._easingFunction = new CubicEase();
|
|
114
|
+
this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEOUT);
|
|
115
|
+
break;
|
|
116
|
+
case GeometryEaseBlockTypes.EaseInOutCubic:
|
|
117
|
+
this._easingFunction = new CubicEase();
|
|
118
|
+
this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEINOUT);
|
|
119
|
+
break;
|
|
120
|
+
case GeometryEaseBlockTypes.EaseInQuart:
|
|
121
|
+
this._easingFunction = new QuarticEase();
|
|
122
|
+
this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEIN);
|
|
123
|
+
break;
|
|
124
|
+
case GeometryEaseBlockTypes.EaseOutQuart:
|
|
125
|
+
this._easingFunction = new QuarticEase();
|
|
126
|
+
this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEOUT);
|
|
127
|
+
break;
|
|
128
|
+
case GeometryEaseBlockTypes.EaseInOutQuart:
|
|
129
|
+
this._easingFunction = new QuarticEase();
|
|
130
|
+
this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEINOUT);
|
|
131
|
+
break;
|
|
132
|
+
case GeometryEaseBlockTypes.EaseInQuint:
|
|
133
|
+
this._easingFunction = new QuinticEase();
|
|
134
|
+
this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEIN);
|
|
135
|
+
break;
|
|
136
|
+
case GeometryEaseBlockTypes.EaseOutQuint:
|
|
137
|
+
this._easingFunction = new QuinticEase();
|
|
138
|
+
this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEOUT);
|
|
139
|
+
break;
|
|
140
|
+
case GeometryEaseBlockTypes.EaseInOutQuint:
|
|
141
|
+
this._easingFunction = new QuinticEase();
|
|
142
|
+
this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEINOUT);
|
|
143
|
+
break;
|
|
144
|
+
case GeometryEaseBlockTypes.EaseInExpo:
|
|
145
|
+
this._easingFunction = new ExponentialEase();
|
|
146
|
+
this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEIN);
|
|
147
|
+
break;
|
|
148
|
+
case GeometryEaseBlockTypes.EaseOutExpo:
|
|
149
|
+
this._easingFunction = new ExponentialEase();
|
|
150
|
+
this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEOUT);
|
|
151
|
+
break;
|
|
152
|
+
case GeometryEaseBlockTypes.EaseInOutExpo:
|
|
153
|
+
this._easingFunction = new ExponentialEase();
|
|
154
|
+
this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEINOUT);
|
|
155
|
+
break;
|
|
156
|
+
case GeometryEaseBlockTypes.EaseInCirc:
|
|
157
|
+
this._easingFunction = new CircleEase();
|
|
158
|
+
this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEIN);
|
|
159
|
+
break;
|
|
160
|
+
case GeometryEaseBlockTypes.EaseOutCirc:
|
|
161
|
+
this._easingFunction = new CircleEase();
|
|
162
|
+
this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEOUT);
|
|
163
|
+
break;
|
|
164
|
+
case GeometryEaseBlockTypes.EaseInOutCirc:
|
|
165
|
+
this._easingFunction = new CircleEase();
|
|
166
|
+
this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEINOUT);
|
|
167
|
+
break;
|
|
168
|
+
case GeometryEaseBlockTypes.EaseInBack:
|
|
169
|
+
this._easingFunction = new BackEase();
|
|
170
|
+
this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEIN);
|
|
171
|
+
break;
|
|
172
|
+
case GeometryEaseBlockTypes.EaseOutBack:
|
|
173
|
+
this._easingFunction = new BackEase();
|
|
174
|
+
this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEOUT);
|
|
175
|
+
break;
|
|
176
|
+
case GeometryEaseBlockTypes.EaseInOutBack:
|
|
177
|
+
this._easingFunction = new BackEase();
|
|
178
|
+
this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEINOUT);
|
|
179
|
+
break;
|
|
180
|
+
case GeometryEaseBlockTypes.EaseInElastic:
|
|
181
|
+
this._easingFunction = new ElasticEase();
|
|
182
|
+
this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEIN);
|
|
183
|
+
break;
|
|
184
|
+
case GeometryEaseBlockTypes.EaseOutElastic:
|
|
185
|
+
this._easingFunction = new ElasticEase();
|
|
186
|
+
this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEOUT);
|
|
187
|
+
break;
|
|
188
|
+
case GeometryEaseBlockTypes.EaseInOutElastic:
|
|
189
|
+
this._easingFunction = new ElasticEase();
|
|
190
|
+
this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEINOUT);
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Creates a new GeometryEaseBlock
|
|
196
|
+
* @param name defines the block name
|
|
197
|
+
*/
|
|
198
|
+
constructor(name) {
|
|
199
|
+
super(name);
|
|
200
|
+
this._easingFunction = new SineEase();
|
|
201
|
+
this._type = GeometryEaseBlockTypes.EaseInOutSine;
|
|
202
|
+
this.registerInput("input", NodeGeometryBlockConnectionPointTypes.AutoDetect);
|
|
203
|
+
this.registerOutput("output", NodeGeometryBlockConnectionPointTypes.BasedOnInput);
|
|
204
|
+
this._outputs[0]._typeConnectionSource = this._inputs[0];
|
|
205
|
+
this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);
|
|
206
|
+
this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);
|
|
207
|
+
this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Gets the current class name
|
|
211
|
+
* @returns the class name
|
|
212
|
+
*/
|
|
213
|
+
getClassName() {
|
|
214
|
+
return "GeometryEaseBlock";
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Gets the input component
|
|
218
|
+
*/
|
|
219
|
+
get input() {
|
|
220
|
+
return this._inputs[0];
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Gets the output component
|
|
224
|
+
*/
|
|
225
|
+
get output() {
|
|
226
|
+
return this._outputs[0];
|
|
227
|
+
}
|
|
228
|
+
_buildBlock(state) {
|
|
229
|
+
super._buildBlock(state);
|
|
230
|
+
if (!this._easingFunction) {
|
|
231
|
+
this.output._storedFunction = null;
|
|
232
|
+
this.output._storedValue = null;
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
switch (this.input.type) {
|
|
236
|
+
case NodeGeometryBlockConnectionPointTypes.Int:
|
|
237
|
+
case NodeGeometryBlockConnectionPointTypes.Float: {
|
|
238
|
+
this.output._storedFunction = (state) => {
|
|
239
|
+
const source = this.input.getConnectedValue(state);
|
|
240
|
+
return this._easingFunction.ease(source);
|
|
241
|
+
};
|
|
242
|
+
break;
|
|
243
|
+
}
|
|
244
|
+
case NodeGeometryBlockConnectionPointTypes.Vector2: {
|
|
245
|
+
this.output._storedFunction = (state) => {
|
|
246
|
+
const source = this.input.getConnectedValue(state);
|
|
247
|
+
return new Vector2(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y));
|
|
248
|
+
};
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
case NodeGeometryBlockConnectionPointTypes.Vector3: {
|
|
252
|
+
this.output._storedFunction = (state) => {
|
|
253
|
+
const source = this.input.getConnectedValue(state);
|
|
254
|
+
return new Vector3(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y), this._easingFunction.ease(source.z));
|
|
255
|
+
};
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
case NodeGeometryBlockConnectionPointTypes.Vector4: {
|
|
259
|
+
this.output._storedFunction = (state) => {
|
|
260
|
+
const source = this.input.getConnectedValue(state);
|
|
261
|
+
return new Vector4(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y), this._easingFunction.ease(source.z), this._easingFunction.ease(source.w));
|
|
262
|
+
};
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return this;
|
|
267
|
+
}
|
|
268
|
+
serialize() {
|
|
269
|
+
const serializationObject = super.serialize();
|
|
270
|
+
serializationObject.type = this.type;
|
|
271
|
+
return serializationObject;
|
|
272
|
+
}
|
|
273
|
+
_deserialize(serializationObject) {
|
|
274
|
+
super._deserialize(serializationObject);
|
|
275
|
+
this.type = serializationObject.type;
|
|
276
|
+
}
|
|
277
|
+
_dumpPropertiesCode() {
|
|
278
|
+
const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryEaseBlockTypes.${GeometryEaseBlockTypes[this.type]};\n`;
|
|
279
|
+
return codeString;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
__decorate([
|
|
283
|
+
editableInPropertyPage("Type", 4 /* PropertyTypeForEdition.List */, "ADVANCED", {
|
|
284
|
+
notifiers: { rebuild: true },
|
|
285
|
+
embedded: true,
|
|
286
|
+
options: [
|
|
287
|
+
{ label: "EaseInSine", value: GeometryEaseBlockTypes.EaseInSine },
|
|
288
|
+
{ label: "EaseOutSine", value: GeometryEaseBlockTypes.EaseOutSine },
|
|
289
|
+
{ label: "EaseInOutSine", value: GeometryEaseBlockTypes.EaseInOutSine },
|
|
290
|
+
{ label: "EaseInQuad", value: GeometryEaseBlockTypes.EaseInQuad },
|
|
291
|
+
{ label: "EaseOutQuad", value: GeometryEaseBlockTypes.EaseOutQuad },
|
|
292
|
+
{ label: "EaseInOutQuad", value: GeometryEaseBlockTypes.EaseInOutQuad },
|
|
293
|
+
{ label: "EaseInCubic", value: GeometryEaseBlockTypes.EaseInCubic },
|
|
294
|
+
{ label: "EaseOutCubic", value: GeometryEaseBlockTypes.EaseOutCubic },
|
|
295
|
+
{ label: "EaseInOutCubic", value: GeometryEaseBlockTypes.EaseInOutCubic },
|
|
296
|
+
{ label: "EaseInQuart", value: GeometryEaseBlockTypes.EaseInQuart },
|
|
297
|
+
{ label: "EaseOutQuart", value: GeometryEaseBlockTypes.EaseOutQuart },
|
|
298
|
+
{ label: "EaseInOutQuart", value: GeometryEaseBlockTypes.EaseInOutQuart },
|
|
299
|
+
{ label: "EaseInQuint", value: GeometryEaseBlockTypes.EaseInQuint },
|
|
300
|
+
{ label: "EaseOutQuint", value: GeometryEaseBlockTypes.EaseOutQuint },
|
|
301
|
+
{ label: "EaseInOutQuint", value: GeometryEaseBlockTypes.EaseInOutQuint },
|
|
302
|
+
{ label: "EaseInExpo", value: GeometryEaseBlockTypes.EaseInExpo },
|
|
303
|
+
{ label: "EaseOutExpo", value: GeometryEaseBlockTypes.EaseOutExpo },
|
|
304
|
+
{ label: "EaseInOutExpo", value: GeometryEaseBlockTypes.EaseInOutExpo },
|
|
305
|
+
{ label: "EaseInCirc", value: GeometryEaseBlockTypes.EaseInCirc },
|
|
306
|
+
{ label: "EaseOutCirc", value: GeometryEaseBlockTypes.EaseOutCirc },
|
|
307
|
+
{ label: "EaseInOutCirc", value: GeometryEaseBlockTypes.EaseInOutCirc },
|
|
308
|
+
{ label: "EaseInBack", value: GeometryEaseBlockTypes.EaseInBack },
|
|
309
|
+
{ label: "EaseOutBack", value: GeometryEaseBlockTypes.EaseOutBack },
|
|
310
|
+
{ label: "EaseInOutBack", value: GeometryEaseBlockTypes.EaseInOutBack },
|
|
311
|
+
{ label: "EaseInElastic", value: GeometryEaseBlockTypes.EaseInElastic },
|
|
312
|
+
{ label: "EaseOutElastic", value: GeometryEaseBlockTypes.EaseOutElastic },
|
|
313
|
+
{ label: "EaseInOutElastic", value: GeometryEaseBlockTypes.EaseInOutElastic },
|
|
314
|
+
],
|
|
315
|
+
})
|
|
316
|
+
], GeometryEaseBlock.prototype, "type", null);
|
|
317
|
+
RegisterClass("BABYLON.GeometryEaseBlock", GeometryEaseBlock);
|
|
318
|
+
//# sourceMappingURL=geometryEaseBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometryEaseBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryEaseBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAA0B,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,sCAA+B;AAE1J;;GAEG;AACH,MAAM,CAAN,IAAY,sBAuDX;AAvDD,WAAY,sBAAsB;IAC9B,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAAkB;IAClB,iFAAW,CAAA;IACX,oBAAoB;IACpB,qFAAa,CAAA;IACb,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAAkB;IAClB,iFAAW,CAAA;IACX,oBAAoB;IACpB,qFAAa,CAAA;IACb,kBAAkB;IAClB,iFAAW,CAAA;IACX,mBAAmB;IACnB,mFAAY,CAAA;IACZ,qBAAqB;IACrB,uFAAc,CAAA;IACd,kBAAkB;IAClB,iFAAW,CAAA;IACX,mBAAmB;IACnB,oFAAY,CAAA;IACZ,qBAAqB;IACrB,wFAAc,CAAA;IACd,kBAAkB;IAClB,kFAAW,CAAA;IACX,mBAAmB;IACnB,oFAAY,CAAA;IACZ,qBAAqB;IACrB,wFAAc,CAA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ACnE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,sBAAsB,CAAC,cAAc,EAAE;YACzE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,sBAAsB,CAAC,gBAAgB,EAAE;SAChF;KACJ,CAAC;6CAGD;AAmOL,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\nimport type { EasingFunction } from \"core/Animations/easing\";\r\nimport { BackEase, CircleEase, CubicEase, ElasticEase, ExponentialEase, QuadraticEase, QuarticEase, QuinticEase, SineEase } from \"core/Animations/easing\";\r\n\r\n/**\r\n * Types of easing function supported by the Ease block\r\n */\r\nexport enum GeometryEaseBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply an easing function to floats\r\n */\r\nexport class GeometryEaseBlock extends NodeGeometryBlock {\r\n private _easingFunction: EasingFunction = new SineEase();\r\n private _type = GeometryEaseBlockTypes.EaseInOutSine;\r\n /**\r\n * Gets or sets the type of the easing functions applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryEaseBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryEaseBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryEaseBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryEaseBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryEaseBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryEaseBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryEaseBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryEaseBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryEaseBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryEaseBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryEaseBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryEaseBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryEaseBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryEaseBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryEaseBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryEaseBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryEaseBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryEaseBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryEaseBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryEaseBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryEaseBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryEaseBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryEaseBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryEaseBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryEaseBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryEaseBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryEaseBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public get type() {\r\n return this._type;\r\n }\r\n\r\n public set type(value: GeometryEaseBlockTypes) {\r\n if (this._type === value) {\r\n return;\r\n }\r\n this._type = value;\r\n\r\n switch (this._type) {\r\n case GeometryEaseBlockTypes.EaseInSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new GeometryEaseBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryEaseBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (!this._easingFunction) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return this._easingFunction.ease(source);\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector2(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector3(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y), this._easingFunction.ease(source.z));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector4(\r\n this._easingFunction.ease(source.x),\r\n this._easingFunction.ease(source.y),\r\n this._easingFunction.ease(source.z),\r\n this._easingFunction.ease(source.w)\r\n );\r\n };\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.type;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryEaseBlockTypes.${GeometryEaseBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryEaseBlock\", GeometryEaseBlock);\r\n"]}
|
package/Meshes/Node/index.d.ts
CHANGED
|
@@ -82,5 +82,6 @@ export * from "./Blocks/geometryDotBlock";
|
|
|
82
82
|
export * from "./Blocks/geometryLengthBlock";
|
|
83
83
|
export * from "./Blocks/geometryRotate2dBlock";
|
|
84
84
|
export * from "./Blocks/geometryInterceptorBlock";
|
|
85
|
+
export * from "./Blocks/geometryEaseBlock";
|
|
85
86
|
export * from "./Blocks/Set/aggregatorBlock";
|
|
86
87
|
export * from "./Blocks/subdivideBlock";
|
package/Meshes/Node/index.js
CHANGED
|
@@ -82,6 +82,7 @@ export * from "./Blocks/geometryDotBlock.js";
|
|
|
82
82
|
export * from "./Blocks/geometryLengthBlock.js";
|
|
83
83
|
export * from "./Blocks/geometryRotate2dBlock.js";
|
|
84
84
|
export * from "./Blocks/geometryInterceptorBlock.js";
|
|
85
|
+
export * from "./Blocks/geometryEaseBlock.js";
|
|
85
86
|
export * from "./Blocks/Set/aggregatorBlock.js";
|
|
86
87
|
export * from "./Blocks/subdivideBlock.js";
|
|
87
88
|
//# sourceMappingURL=index.js.map
|
package/Meshes/Node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc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CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC","sourcesContent":["export * from \"./nodeGeometry\";\r\nexport * from \"./nodeGeometryBlock\";\r\nexport * from \"./nodeGeometryBlockConnectionPoint\";\r\nexport * from \"./nodeGeometryBuildState\";\r\nexport * from \"./Interfaces/nodeGeometryExecutionContext\";\r\nexport * from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nexport * from \"./Enums/nodeGeometryContextualSources\";\r\nexport * from \"./Blocks/geometryOptimizeBlock\";\r\nexport * from \"./Blocks/geometryOutputBlock\";\r\nexport * from \"./Blocks/geometryInputBlock\";\r\nexport * from \"./Blocks/Sources/planeBlock\";\r\nexport * from \"./Blocks/Sources/boxBlock\";\r\nexport * from \"./Blocks/Sources/meshBlock\";\r\nexport * from \"./Blocks/Sources/icoSphereBlock\";\r\nexport * from \"./Blocks/Sources/sphereBlock\";\r\nexport * from \"./Blocks/Sources/gridBlock\";\r\nexport * from \"./Blocks/Sources/torusBlock\";\r\nexport * from \"./Blocks/Sources/cylinderBlock\";\r\nexport * from \"./Blocks/Sources/capsuleBlock\";\r\nexport * from \"./Blocks/Sources/discBlock\";\r\nexport * from \"./Blocks/Sources/nullBlock\";\r\nexport * from \"./Blocks/Sources/pointListBlock\";\r\nexport * from \"./Blocks/Set/setPositionsBlock\";\r\nexport * from \"./Blocks/Set/setNormalsBlock\";\r\nexport * from \"./Blocks/Set/setUVsBlock\";\r\nexport * from \"./Blocks/Set/setColorsBlock\";\r\nexport * from \"./Blocks/Set/setTangentsBlock\";\r\nexport * from \"./Blocks/mathBlock\";\r\nexport * from \"./Blocks/mapRangeBlock\";\r\nexport * from \"./Blocks/conditionBlock\";\r\nexport * from \"./Blocks/randomBlock\";\r\nexport * from \"./Blocks/noiseBlock\";\r\nexport * from \"./Blocks/mergeGeometryBlock\";\r\nexport * from \"./Blocks/geometryCollectionBlock\";\r\nexport * from \"./Blocks/cleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryElbowBlock\";\r\nexport * from \"./Blocks/computeNormalsBlock\";\r\nexport * from \"./Blocks/vectorConverterBlock\";\r\nexport * from \"./Blocks/normalizeVectorBlock\";\r\nexport * from \"./Blocks/Set/setMaterialIDBlock\";\r\nexport * from \"./Blocks/Set/latticeBlock\";\r\nexport * from \"./Blocks/geometryTrigonometryBlock\";\r\nexport * from \"./Blocks/geometryTransformBlock\";\r\nexport * from \"./Blocks/Matrices/rotationXBlock\";\r\nexport * from \"./Blocks/Matrices/rotationYBlock\";\r\nexport * from \"./Blocks/Matrices/rotationZBlock\";\r\nexport * from \"./Blocks/Matrices/scalingBlock\";\r\nexport * from \"./Blocks/Matrices/alignBlock\";\r\nexport * from \"./Blocks/Matrices/translationBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVerticesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnFacesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVolumeBlock\";\r\nexport * from \"./Blocks/Instances/instantiateBlock\";\r\nexport * from \"./Blocks/Instances/instantiateLinearBlock\";\r\nexport * from \"./Blocks/Instances/instantiateRadialBlock\";\r\nexport * from \"./Blocks/intFloatConverterBlock\";\r\nexport * from \"./Blocks/debugBlock\";\r\nexport * from \"./Blocks/geometryInfoBlock\";\r\nexport * from \"./Blocks/mappingBlock\";\r\nexport * from \"./Blocks/matrixComposeBlock\";\r\nexport * from \"./Blocks/Teleport/teleportInBlock\";\r\nexport * from \"./Blocks/Teleport/teleportOutBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureFetchBlock\";\r\nexport * from \"./Blocks/boundingBlock\";\r\nexport * from \"./Blocks/booleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryArcTan2Block\";\r\nexport * from \"./Blocks/geometryLerpBlock\";\r\nexport * from \"./Blocks/geometryNLerpBlock\";\r\nexport * from \"./Blocks/geometryStepBlock\";\r\nexport * from \"./Blocks/geometrySmoothStepBlock\";\r\nexport * from \"./Blocks/geometryModBlock\";\r\nexport * from \"./Blocks/geometryPowBlock\";\r\nexport * from \"./Blocks/geometryClampBlock\";\r\nexport * from \"./Blocks/geometryCrossBlock\";\r\nexport * from \"./Blocks/geometryCurveBlock\";\r\nexport * from \"./Blocks/geometryDesaturateBlock\";\r\nexport * from \"./Blocks/geometryPosterizeBlock\";\r\nexport * from \"./Blocks/geometryReplaceColorBlock\";\r\nexport * from \"./Blocks/geometryDistanceBlock\";\r\nexport * from \"./Blocks/geometryDotBlock\";\r\nexport * from \"./Blocks/geometryLengthBlock\";\r\nexport * from \"./Blocks/geometryRotate2dBlock\";\r\nexport * from \"./Blocks/geometryInterceptorBlock\";\r\nexport * from \"./Blocks/Set/aggregatorBlock\";\r\nexport * from \"./Blocks/subdivideBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/Node/index.ts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ectionPoint\";\r\nexport * from \"./nodeGeometryBuildState\";\r\nexport * from \"./Interfaces/nodeGeometryExecutionContext\";\r\nexport * from \"./Enums/nodeGeometryConnectionPointTypes\";\r\nexport * from \"./Enums/nodeGeometryContextualSources\";\r\nexport * from \"./Blocks/geometryOptimizeBlock\";\r\nexport * from \"./Blocks/geometryOutputBlock\";\r\nexport * from \"./Blocks/geometryInputBlock\";\r\nexport * from \"./Blocks/Sources/planeBlock\";\r\nexport * from \"./Blocks/Sources/boxBlock\";\r\nexport * from \"./Blocks/Sources/meshBlock\";\r\nexport * from \"./Blocks/Sources/icoSphereBlock\";\r\nexport * from \"./Blocks/Sources/sphereBlock\";\r\nexport * from \"./Blocks/Sources/gridBlock\";\r\nexport * from \"./Blocks/Sources/torusBlock\";\r\nexport * from \"./Blocks/Sources/cylinderBlock\";\r\nexport * from \"./Blocks/Sources/capsuleBlock\";\r\nexport * from \"./Blocks/Sources/discBlock\";\r\nexport * from \"./Blocks/Sources/nullBlock\";\r\nexport * from \"./Blocks/Sources/pointListBlock\";\r\nexport * from \"./Blocks/Set/setPositionsBlock\";\r\nexport * from \"./Blocks/Set/setNormalsBlock\";\r\nexport * from \"./Blocks/Set/setUVsBlock\";\r\nexport * from \"./Blocks/Set/setColorsBlock\";\r\nexport * from \"./Blocks/Set/setTangentsBlock\";\r\nexport * from \"./Blocks/mathBlock\";\r\nexport * from \"./Blocks/mapRangeBlock\";\r\nexport * from \"./Blocks/conditionBlock\";\r\nexport * from \"./Blocks/randomBlock\";\r\nexport * from \"./Blocks/noiseBlock\";\r\nexport * from \"./Blocks/mergeGeometryBlock\";\r\nexport * from \"./Blocks/geometryCollectionBlock\";\r\nexport * from \"./Blocks/cleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryElbowBlock\";\r\nexport * from \"./Blocks/computeNormalsBlock\";\r\nexport * from \"./Blocks/vectorConverterBlock\";\r\nexport * from \"./Blocks/normalizeVectorBlock\";\r\nexport * from \"./Blocks/Set/setMaterialIDBlock\";\r\nexport * from \"./Blocks/Set/latticeBlock\";\r\nexport * from \"./Blocks/geometryTrigonometryBlock\";\r\nexport * from \"./Blocks/geometryTransformBlock\";\r\nexport * from \"./Blocks/Matrices/rotationXBlock\";\r\nexport * from \"./Blocks/Matrices/rotationYBlock\";\r\nexport * from \"./Blocks/Matrices/rotationZBlock\";\r\nexport * from \"./Blocks/Matrices/scalingBlock\";\r\nexport * from \"./Blocks/Matrices/alignBlock\";\r\nexport * from \"./Blocks/Matrices/translationBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVerticesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnFacesBlock\";\r\nexport * from \"./Blocks/Instances/instantiateOnVolumeBlock\";\r\nexport * from \"./Blocks/Instances/instantiateBlock\";\r\nexport * from \"./Blocks/Instances/instantiateLinearBlock\";\r\nexport * from \"./Blocks/Instances/instantiateRadialBlock\";\r\nexport * from \"./Blocks/intFloatConverterBlock\";\r\nexport * from \"./Blocks/debugBlock\";\r\nexport * from \"./Blocks/geometryInfoBlock\";\r\nexport * from \"./Blocks/mappingBlock\";\r\nexport * from \"./Blocks/matrixComposeBlock\";\r\nexport * from \"./Blocks/Teleport/teleportInBlock\";\r\nexport * from \"./Blocks/Teleport/teleportOutBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureBlock\";\r\nexport * from \"./Blocks/Textures/geometryTextureFetchBlock\";\r\nexport * from \"./Blocks/boundingBlock\";\r\nexport * from \"./Blocks/booleanGeometryBlock\";\r\nexport * from \"./Blocks/geometryArcTan2Block\";\r\nexport * from \"./Blocks/geometryLerpBlock\";\r\nexport * from \"./Blocks/geometryNLerpBlock\";\r\nexport * from \"./Blocks/geometryStepBlock\";\r\nexport * from \"./Blocks/geometrySmoothStepBlock\";\r\nexport * from \"./Blocks/geometryModBlock\";\r\nexport * from \"./Blocks/geometryPowBlock\";\r\nexport * from \"./Blocks/geometryClampBlock\";\r\nexport * from \"./Blocks/geometryCrossBlock\";\r\nexport * from \"./Blocks/geometryCurveBlock\";\r\nexport * from \"./Blocks/geometryDesaturateBlock\";\r\nexport * from \"./Blocks/geometryPosterizeBlock\";\r\nexport * from \"./Blocks/geometryReplaceColorBlock\";\r\nexport * from \"./Blocks/geometryDistanceBlock\";\r\nexport * from \"./Blocks/geometryDotBlock\";\r\nexport * from \"./Blocks/geometryLengthBlock\";\r\nexport * from \"./Blocks/geometryRotate2dBlock\";\r\nexport * from \"./Blocks/geometryInterceptorBlock\";\r\nexport * from \"./Blocks/geometryEaseBlock\";\r\nexport * from \"./Blocks/Set/aggregatorBlock\";\r\nexport * from \"./Blocks/subdivideBlock\";\r\n"]}
|
package/Meshes/csg2.d.ts
CHANGED
|
@@ -49,9 +49,9 @@ export interface IVertexDataRebuildOptions {
|
|
|
49
49
|
* Wrapper around the Manifold library
|
|
50
50
|
* https://manifoldcad.org/
|
|
51
51
|
* Use this class to perform fast boolean operations on meshes
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* @see [basic operations](https://playground.babylonjs.com/#IW43EB#15)
|
|
53
|
+
* @see [skull vs box](https://playground.babylonjs.com/#JUKXQD#6218)
|
|
54
|
+
* @see [skull vs vertex data](https://playground.babylonjs.com/#JUKXQD#6219)
|
|
55
55
|
*/
|
|
56
56
|
export declare class CSG2 implements IDisposable {
|
|
57
57
|
private _manifold;
|