@babylonjs/smart-filters 0.7.7-alpha → 0.7.9-alpha
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/dist/{blocks → blockFoundation}/aggregateBlock.d.ts +1 -1
- package/dist/blockFoundation/aggregateBlock.d.ts.map +1 -0
- package/dist/{blocks → blockFoundation}/aggregateBlock.js +1 -1
- package/dist/blockFoundation/aggregateBlock.js.map +1 -0
- package/dist/{blocks → blockFoundation}/baseBlock.d.ts +2 -2
- package/dist/blockFoundation/baseBlock.d.ts.map +1 -0
- package/dist/blockFoundation/baseBlock.js.map +1 -0
- package/dist/blockFoundation/customAggregateBlock.d.ts.map +1 -0
- package/dist/blockFoundation/customAggregateBlock.js.map +1 -0
- package/dist/{blocks → blockFoundation}/customShaderBlock.d.ts +2 -2
- package/dist/blockFoundation/customShaderBlock.d.ts.map +1 -0
- package/dist/blockFoundation/customShaderBlock.js.map +1 -0
- package/dist/blockFoundation/disableableShaderBlock.d.ts.map +1 -0
- package/dist/blockFoundation/disableableShaderBlock.js.map +1 -0
- package/dist/blockFoundation/index.d.ts +10 -0
- package/dist/blockFoundation/index.d.ts.map +1 -0
- package/dist/blockFoundation/index.js +10 -0
- package/dist/blockFoundation/index.js.map +1 -0
- package/dist/{blocks → blockFoundation}/inputBlock.d.ts +1 -1
- package/dist/blockFoundation/inputBlock.d.ts.map +1 -0
- package/dist/blockFoundation/inputBlock.deserializer.d.ts.map +1 -0
- package/dist/blockFoundation/inputBlock.deserializer.js.map +1 -0
- package/dist/{blocks → blockFoundation}/inputBlock.js +1 -1
- package/dist/blockFoundation/inputBlock.js.map +1 -0
- package/dist/blockFoundation/inputBlock.serialization.types.d.ts.map +1 -0
- package/dist/blockFoundation/inputBlock.serialization.types.js.map +1 -0
- package/dist/blockFoundation/inputBlock.serializer.d.ts.map +1 -0
- package/dist/blockFoundation/inputBlock.serializer.js.map +1 -0
- package/dist/blockFoundation/outputBlock.d.ts.map +1 -0
- package/dist/blockFoundation/outputBlock.js.map +1 -0
- package/dist/blockFoundation/outputBlock.shader.d.ts.map +1 -0
- package/dist/blockFoundation/outputBlock.shader.js.map +1 -0
- package/dist/blockFoundation/shaderBlock.d.ts.map +1 -0
- package/dist/blockFoundation/shaderBlock.js.map +1 -0
- package/dist/blockFoundation/textureOptions.d.ts.map +1 -0
- package/dist/blockFoundation/textureOptions.js.map +1 -0
- package/dist/blockRegistration/IBlockRegistration.d.ts +36 -0
- package/dist/blockRegistration/IBlockRegistration.d.ts.map +1 -0
- package/dist/blockRegistration/IBlockRegistration.js +2 -0
- package/dist/blockRegistration/IBlockRegistration.js.map +1 -0
- package/dist/blockRegistration/blockSerializers.d.ts +13 -0
- package/dist/blockRegistration/blockSerializers.d.ts.map +1 -0
- package/dist/blockRegistration/blockSerializers.js +35 -0
- package/dist/blockRegistration/blockSerializers.js.map +1 -0
- package/dist/blockRegistration/builtInBlockRegistrations.d.ts +13 -0
- package/dist/blockRegistration/builtInBlockRegistrations.d.ts.map +1 -0
- package/dist/blockRegistration/builtInBlockRegistrations.js +266 -0
- package/dist/blockRegistration/builtInBlockRegistrations.js.map +1 -0
- package/dist/blockRegistration/index.d.ts +3 -0
- package/dist/blockRegistration/index.d.ts.map +1 -0
- package/dist/blockRegistration/index.js +3 -0
- package/dist/blockRegistration/index.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts +56 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js +66 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts +13 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js +36 -0
- package/dist/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.d.ts +56 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts +29 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js +16 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.deserializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.js +100 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts +8 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js +28 -0
- package/dist/blocks/babylon/demo/effects/blurBlock.serializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts +118 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts +25 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js +15 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.deserializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.js +219 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts +6 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js +25 -0
- package/dist/blocks/babylon/demo/effects/compositionBlock.serializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts +63 -0
- package/dist/blocks/babylon/demo/effects/contrastBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/contrastBlock.js +122 -0
- package/dist/blocks/babylon/demo/effects/contrastBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts +63 -0
- package/dist/blocks/babylon/demo/effects/desaturateBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/desaturateBlock.js +107 -0
- package/dist/blocks/babylon/demo/effects/desaturateBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts +79 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts +33 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js +17 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js +171 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts +6 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js +27 -0
- package/dist/blocks/babylon/demo/effects/directionalBlurBlock.serializer.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts +63 -0
- package/dist/blocks/babylon/demo/effects/exposureBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/exposureBlock.js +95 -0
- package/dist/blocks/babylon/demo/effects/exposureBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts +75 -0
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.js +121 -0
- package/dist/blocks/babylon/demo/effects/greenScreenBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/index.d.ts +15 -0
- package/dist/blocks/babylon/demo/effects/index.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/index.js +15 -0
- package/dist/blocks/babylon/demo/effects/index.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts +63 -0
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js +159 -0
- package/dist/blocks/babylon/demo/effects/kaleidoscopeBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.d.ts +62 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.js +75 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts +14 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.js +37 -0
- package/dist/blocks/babylon/demo/effects/maskBlock.shader.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts +62 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.js +77 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts +15 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js +44 -0
- package/dist/blocks/babylon/demo/effects/pixelateBlock.shader.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts +63 -0
- package/dist/blocks/babylon/demo/effects/posterizeBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/posterizeBlock.js +108 -0
- package/dist/blocks/babylon/demo/effects/posterizeBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts +81 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.js +103 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts +18 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js +57 -0
- package/dist/blocks/babylon/demo/effects/spritesheetBlock.shader.js.map +1 -0
- package/dist/blocks/babylon/demo/effects/tintBlock.d.ts +7 -0
- package/dist/blocks/babylon/demo/effects/tintBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/effects/tintBlock.js +51 -0
- package/dist/blocks/babylon/demo/effects/tintBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/transitions/index.d.ts +2 -0
- package/dist/blocks/babylon/demo/transitions/index.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/transitions/index.js +2 -0
- package/dist/blocks/babylon/demo/transitions/index.js.map +1 -0
- package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts +69 -0
- package/dist/blocks/babylon/demo/transitions/wipeBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/transitions/wipeBlock.js +110 -0
- package/dist/blocks/babylon/demo/transitions/wipeBlock.js.map +1 -0
- package/dist/blocks/babylon/demo/utilities/index.d.ts +2 -0
- package/dist/blocks/babylon/demo/utilities/index.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/utilities/index.js +2 -0
- package/dist/blocks/babylon/demo/utilities/index.js.map +1 -0
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts +58 -0
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.d.ts.map +1 -0
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js +87 -0
- package/dist/blocks/babylon/demo/utilities/premultiplyAlphaBlock.js.map +1 -0
- package/dist/blocks/blockNamespaces.d.ts +5 -0
- package/dist/blocks/blockNamespaces.d.ts.map +1 -0
- package/dist/blocks/blockNamespaces.js +5 -0
- package/dist/blocks/blockNamespaces.js.map +1 -0
- package/dist/blocks/blockTypes.d.ts +22 -0
- package/dist/blocks/blockTypes.d.ts.map +1 -0
- package/dist/blocks/blockTypes.js +22 -0
- package/dist/blocks/blockTypes.js.map +1 -0
- package/dist/blocks/index.d.ts +6 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +6 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/command/index.d.ts +4 -0
- package/dist/command/index.d.ts.map +1 -0
- package/dist/command/index.js +4 -0
- package/dist/command/index.js.map +1 -0
- package/dist/connection/connectionPoint.d.ts +1 -1
- package/dist/connection/connectionPoint.d.ts.map +1 -1
- package/dist/connection/connectionPointWithDefault.d.ts +1 -1
- package/dist/connection/connectionPointWithDefault.d.ts.map +1 -1
- package/dist/connection/index.d.ts +7 -0
- package/dist/connection/index.d.ts.map +1 -0
- package/dist/connection/index.js +7 -0
- package/dist/connection/index.js.map +1 -0
- package/dist/editorUtils/index.d.ts +2 -0
- package/dist/editorUtils/index.d.ts.map +1 -0
- package/dist/editorUtils/index.js +2 -0
- package/dist/editorUtils/index.js.map +1 -0
- package/dist/index.d.ts +10 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -30
- package/dist/index.js.map +1 -1
- package/dist/optimization/index.d.ts +2 -0
- package/dist/optimization/index.d.ts.map +1 -0
- package/dist/optimization/index.js +2 -0
- package/dist/optimization/index.js.map +1 -0
- package/dist/optimization/optimizedShaderBlock.d.ts +1 -1
- package/dist/optimization/optimizedShaderBlock.d.ts.map +1 -1
- package/dist/optimization/optimizedShaderBlock.js +1 -1
- package/dist/optimization/optimizedShaderBlock.js.map +1 -1
- package/dist/optimization/smartFilterOptimizer.js +4 -4
- package/dist/optimization/smartFilterOptimizer.js.map +1 -1
- package/dist/runtime/index.d.ts +7 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +7 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/renderTargetGenerator.js +1 -1
- package/dist/runtime/renderTargetGenerator.js.map +1 -1
- package/dist/runtime/shaderRuntime.d.ts +2 -2
- package/dist/runtime/shaderRuntime.d.ts.map +1 -1
- package/dist/serialization/index.d.ts +1 -0
- package/dist/serialization/index.d.ts.map +1 -1
- package/dist/serialization/index.js +1 -0
- package/dist/serialization/index.js.map +1 -1
- package/dist/serialization/smartFilterDeserializer.d.ts +1 -1
- package/dist/serialization/smartFilterDeserializer.d.ts.map +1 -1
- package/dist/serialization/smartFilterDeserializer.js +3 -3
- package/dist/serialization/smartFilterDeserializer.js.map +1 -1
- package/dist/serialization/smartFilterSerializer.js +4 -4
- package/dist/serialization/smartFilterSerializer.js.map +1 -1
- package/dist/serialization/v1/smartFilterSerialization.types.d.ts +1 -1
- package/dist/serialization/v1/smartFilterSerialization.types.d.ts.map +1 -1
- package/dist/smartFilter.d.ts +2 -2
- package/dist/smartFilter.d.ts.map +1 -1
- package/dist/smartFilter.js +3 -3
- package/dist/smartFilter.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/renderTargetUtils.d.ts +2 -2
- package/dist/utils/renderTargetUtils.d.ts.map +1 -1
- package/dist/utils/textureUtils.d.ts +1 -1
- package/dist/utils/textureUtils.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -6
- package/src/{blocks → blockFoundation}/aggregateBlock.ts +1 -1
- package/src/{blocks → blockFoundation}/baseBlock.ts +2 -2
- package/src/{blocks → blockFoundation}/customShaderBlock.ts +3 -3
- package/src/blockFoundation/index.ts +9 -0
- package/src/{blocks → blockFoundation}/inputBlock.serializer.ts +1 -1
- package/src/{blocks → blockFoundation}/inputBlock.ts +1 -1
- package/src/blockRegistration/IBlockRegistration.ts +45 -0
- package/src/blockRegistration/blockSerializers.ts +52 -0
- package/src/blockRegistration/builtInBlockRegistrations.ts +390 -0
- package/src/blockRegistration/index.ts +2 -0
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.fragment.glsl +10 -0
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.shader.ts +38 -0
- package/src/blocks/babylon/demo/effects/blackAndWhiteBlock.ts +80 -0
- package/src/blocks/babylon/demo/effects/blurBlock.deserializer.ts +38 -0
- package/src/blocks/babylon/demo/effects/blurBlock.serializer.ts +32 -0
- package/src/blocks/babylon/demo/effects/blurBlock.ts +119 -0
- package/src/blocks/babylon/demo/effects/compositionBlock.deserializer.ts +32 -0
- package/src/blocks/babylon/demo/effects/compositionBlock.serializer.ts +29 -0
- package/src/blocks/babylon/demo/effects/compositionBlock.ts +293 -0
- package/src/blocks/babylon/demo/effects/contrastBlock.ts +152 -0
- package/src/blocks/babylon/demo/effects/desaturateBlock.ts +137 -0
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts +47 -0
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.serializer.ts +31 -0
- package/src/blocks/babylon/demo/effects/directionalBlurBlock.ts +193 -0
- package/src/blocks/babylon/demo/effects/exposureBlock.ts +120 -0
- package/src/blocks/babylon/demo/effects/greenScreenBlock.ts +152 -0
- package/src/blocks/babylon/demo/effects/index.ts +14 -0
- package/src/blocks/babylon/demo/effects/kaleidoscopeBlock.ts +186 -0
- package/src/blocks/babylon/demo/effects/maskBlock.fragment.glsl +10 -0
- package/src/blocks/babylon/demo/effects/maskBlock.shader.ts +39 -0
- package/src/blocks/babylon/demo/effects/maskBlock.ts +94 -0
- package/src/blocks/babylon/demo/effects/pixelateBlock.fragment.glsl +18 -0
- package/src/blocks/babylon/demo/effects/pixelateBlock.shader.ts +46 -0
- package/src/blocks/babylon/demo/effects/pixelateBlock.ts +101 -0
- package/src/blocks/babylon/demo/effects/posterizeBlock.ts +139 -0
- package/src/blocks/babylon/demo/effects/spritesheetBlock.fragment.glsl +26 -0
- package/src/blocks/babylon/demo/effects/spritesheetBlock.shader.ts +59 -0
- package/src/blocks/babylon/demo/effects/spritesheetBlock.ts +135 -0
- package/src/blocks/babylon/demo/effects/tintBlock.ts +52 -0
- package/src/blocks/babylon/demo/transitions/index.ts +1 -0
- package/src/blocks/babylon/demo/transitions/wipeBlock.ts +138 -0
- package/src/blocks/babylon/demo/utilities/index.ts +1 -0
- package/src/blocks/babylon/demo/utilities/premultiplyAlphaBlock.ts +106 -0
- package/src/blocks/blockNamespaces.ts +4 -0
- package/src/blocks/blockTypes.ts +21 -0
- package/src/blocks/index.ts +5 -0
- package/src/command/index.ts +3 -0
- package/src/connection/connectionPoint.ts +1 -1
- package/src/connection/connectionPointWithDefault.ts +1 -1
- package/src/connection/index.ts +9 -0
- package/src/editorUtils/index.ts +1 -0
- package/src/index.ts +11 -39
- package/src/optimization/index.ts +1 -0
- package/src/optimization/optimizedShaderBlock.ts +1 -1
- package/src/optimization/smartFilterOptimizer.ts +6 -6
- package/src/runtime/index.ts +6 -0
- package/src/runtime/renderTargetGenerator.ts +3 -3
- package/src/runtime/shaderRuntime.ts +2 -2
- package/src/serialization/index.ts +1 -0
- package/src/serialization/smartFilterDeserializer.ts +4 -4
- package/src/serialization/smartFilterSerializer.ts +5 -5
- package/src/serialization/v1/defaultBlockSerializer.ts +1 -1
- package/src/serialization/v1/smartFilterSerialization.types.ts +1 -1
- package/src/smartFilter.ts +4 -4
- package/src/utils/index.ts +2 -0
- package/src/utils/renderTargetUtils.ts +2 -2
- package/src/utils/textureUtils.ts +1 -1
- package/src/version.ts +1 -1
- package/dist/blocks/aggregateBlock.d.ts.map +0 -1
- package/dist/blocks/aggregateBlock.js.map +0 -1
- package/dist/blocks/baseBlock.d.ts.map +0 -1
- package/dist/blocks/baseBlock.js.map +0 -1
- package/dist/blocks/customAggregateBlock.d.ts.map +0 -1
- package/dist/blocks/customAggregateBlock.js.map +0 -1
- package/dist/blocks/customShaderBlock.d.ts.map +0 -1
- package/dist/blocks/customShaderBlock.js.map +0 -1
- package/dist/blocks/disableableShaderBlock.d.ts.map +0 -1
- package/dist/blocks/disableableShaderBlock.js.map +0 -1
- package/dist/blocks/inputBlock.d.ts.map +0 -1
- package/dist/blocks/inputBlock.deserializer.d.ts.map +0 -1
- package/dist/blocks/inputBlock.deserializer.js.map +0 -1
- package/dist/blocks/inputBlock.js.map +0 -1
- package/dist/blocks/inputBlock.serialization.types.d.ts.map +0 -1
- package/dist/blocks/inputBlock.serialization.types.js.map +0 -1
- package/dist/blocks/inputBlock.serializer.d.ts.map +0 -1
- package/dist/blocks/inputBlock.serializer.js.map +0 -1
- package/dist/blocks/outputBlock.d.ts.map +0 -1
- package/dist/blocks/outputBlock.js.map +0 -1
- package/dist/blocks/outputBlock.shader.d.ts.map +0 -1
- package/dist/blocks/outputBlock.shader.js.map +0 -1
- package/dist/blocks/shaderBlock.d.ts.map +0 -1
- package/dist/blocks/shaderBlock.js.map +0 -1
- package/dist/blocks/textureOptions.d.ts.map +0 -1
- package/dist/blocks/textureOptions.js.map +0 -1
- /package/dist/{blocks → blockFoundation}/baseBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/customAggregateBlock.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/customAggregateBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/customShaderBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/disableableShaderBlock.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/disableableShaderBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.deserializer.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.deserializer.js +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.serialization.types.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.serialization.types.js +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.serializer.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/inputBlock.serializer.js +0 -0
- /package/dist/{blocks → blockFoundation}/outputBlock.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/outputBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/outputBlock.shader.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/outputBlock.shader.js +0 -0
- /package/dist/{blocks → blockFoundation}/shaderBlock.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/shaderBlock.js +0 -0
- /package/dist/{blocks → blockFoundation}/textureOptions.d.ts +0 -0
- /package/dist/{blocks → blockFoundation}/textureOptions.js +0 -0
- /package/src/{blocks → blockFoundation}/customAggregateBlock.ts +0 -0
- /package/src/{blocks → blockFoundation}/disableableShaderBlock.ts +0 -0
- /package/src/{blocks → blockFoundation}/inputBlock.deserializer.ts +0 -0
- /package/src/{blocks → blockFoundation}/inputBlock.serialization.types.ts +0 -0
- /package/src/{blocks → blockFoundation}/outputBlock.fragment.glsl +0 -0
- /package/src/{blocks → blockFoundation}/outputBlock.shader.ts +0 -0
- /package/src/{blocks → blockFoundation}/outputBlock.ts +0 -0
- /package/src/{blocks → blockFoundation}/shaderBlock.ts +0 -0
- /package/src/{blocks → blockFoundation}/textureOptions.ts +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Effect } from "@babylonjs/core/Materials/effect";
|
|
2
|
+
import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
|
|
3
|
+
import { DisableableShaderBlock, type IDisableableBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
|
|
4
|
+
import type { RuntimeData } from "../../../../connection/connectionPoint.js";
|
|
5
|
+
import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
|
|
6
|
+
import type { SmartFilter } from "../../../../smartFilter.js";
|
|
7
|
+
import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
|
|
8
|
+
/**
|
|
9
|
+
* The shader bindings for the Contrast block.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ContrastShaderBinding extends DisableableShaderBinding {
|
|
12
|
+
private readonly _inputTexture;
|
|
13
|
+
private readonly _intensity;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new shader binding instance for the Contrast block.
|
|
16
|
+
* @param parentBlock - The parent block
|
|
17
|
+
* @param inputTexture - The input texture
|
|
18
|
+
* @param intensity - The intensity of the effect
|
|
19
|
+
*/
|
|
20
|
+
constructor(parentBlock: IDisableableBlock, inputTexture: RuntimeData<ConnectionPointType.Texture>, intensity: RuntimeData<ConnectionPointType.Float>);
|
|
21
|
+
/**
|
|
22
|
+
* Binds all the required data to the shader when rendering.
|
|
23
|
+
* @param effect - defines the effect to bind the data to
|
|
24
|
+
*/
|
|
25
|
+
bind(effect: Effect): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A simple block to change the contrast of a texture.
|
|
29
|
+
*/
|
|
30
|
+
export declare class ContrastBlock extends DisableableShaderBlock {
|
|
31
|
+
/**
|
|
32
|
+
* The class name of the block.
|
|
33
|
+
*/
|
|
34
|
+
static ClassName: string;
|
|
35
|
+
/**
|
|
36
|
+
* The namespace of the block.
|
|
37
|
+
*/
|
|
38
|
+
static Namespace: string;
|
|
39
|
+
/**
|
|
40
|
+
* The input texture connection point.
|
|
41
|
+
*/
|
|
42
|
+
readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
|
|
43
|
+
/**
|
|
44
|
+
* The intensity connection point.
|
|
45
|
+
*/
|
|
46
|
+
readonly intensity: import("../../../../connection/connectionPointWithDefault.js").ConnectionPointWithDefault<ConnectionPointType.Float>;
|
|
47
|
+
/**
|
|
48
|
+
* The shader program (vertex and fragment code) to use to render the block
|
|
49
|
+
*/
|
|
50
|
+
static ShaderCode: ShaderProgram;
|
|
51
|
+
/**
|
|
52
|
+
* Instantiates a new Block.
|
|
53
|
+
* @param smartFilter - The smart filter this block belongs to
|
|
54
|
+
* @param name - The friendly name of the block
|
|
55
|
+
*/
|
|
56
|
+
constructor(smartFilter: SmartFilter, name: string);
|
|
57
|
+
/**
|
|
58
|
+
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
59
|
+
* @returns The class instance that binds the data to the effect
|
|
60
|
+
*/
|
|
61
|
+
getShaderBinding(): DisableableShaderBinding;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=contrastBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrastBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/contrastBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,KAAK,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AA0D1E;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,wBAAwB;IAC/D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyC;IAEpE;;;;;OAKG;gBAEC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC;IAOrD;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAK7C;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACrD;;OAEG;IACH,OAAuB,SAAS,SAAqB;IAErD;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IACH,SAAgB,SAAS,uHAIvB;IAEF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAMtD"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
|
|
2
|
+
import { DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
|
|
3
|
+
import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
|
|
4
|
+
import { createStrongRef } from "../../../../runtime/strongRef.js";
|
|
5
|
+
import { contrastBlockType } from "../../../blockTypes.js";
|
|
6
|
+
import { babylonDemoEffectsNamespace } from "../../../blockNamespaces.js";
|
|
7
|
+
const shaderProgram = {
|
|
8
|
+
fragment: {
|
|
9
|
+
uniform: `
|
|
10
|
+
uniform sampler2D _input_;
|
|
11
|
+
uniform float _intensity_;
|
|
12
|
+
`,
|
|
13
|
+
const: `
|
|
14
|
+
const float contrastIntensity = 0.44;
|
|
15
|
+
`,
|
|
16
|
+
mainFunctionName: "_contrast_",
|
|
17
|
+
mainInputTexture: "_input_",
|
|
18
|
+
functions: [
|
|
19
|
+
{
|
|
20
|
+
name: "_contrast_",
|
|
21
|
+
code: `
|
|
22
|
+
vec4 _contrast_(vec2 vUV) {
|
|
23
|
+
vec4 color = texture2D(_input_, vUV);
|
|
24
|
+
|
|
25
|
+
float contrastLMin = mix(-2., 0., _intensity_ * 2.0);
|
|
26
|
+
float contrastLMax = mix(3., 1., _intensity_ * 2.0);
|
|
27
|
+
|
|
28
|
+
vec3 contrastMin = _remap_(color.rgb, contrastLMin, contrastLMax, 0., 1.);
|
|
29
|
+
|
|
30
|
+
float intensityMapped = _remap_(_intensity_, 0.5, 1., 0., 1.0);
|
|
31
|
+
float contrastHMin = mix(0., 0.45, intensityMapped);
|
|
32
|
+
float contrastHMax = mix(1., 0.5, intensityMapped);
|
|
33
|
+
|
|
34
|
+
vec3 contrastMax = _remap_(color.rgb, contrastHMin, contrastHMax, 0., 1.);
|
|
35
|
+
|
|
36
|
+
return vec4(mix(contrastMin, contrastMax, step(_intensity_, 0.5)), color.a);
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "_remap_",
|
|
42
|
+
code: `
|
|
43
|
+
float _remap_(float i, float smin, float smax, float dmin, float dmax) {
|
|
44
|
+
return dmin + (i - smin) * (dmax - dmin) / (smax - smin);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
vec3 _remap_(vec3 i, float smin, float smax, float dmin, float dmax) {
|
|
48
|
+
return dmin + (i - smin) * (dmax - dmin) / (smax - smin);
|
|
49
|
+
}
|
|
50
|
+
`,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The shader bindings for the Contrast block.
|
|
57
|
+
*/
|
|
58
|
+
export class ContrastShaderBinding extends DisableableShaderBinding {
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new shader binding instance for the Contrast block.
|
|
61
|
+
* @param parentBlock - The parent block
|
|
62
|
+
* @param inputTexture - The input texture
|
|
63
|
+
* @param intensity - The intensity of the effect
|
|
64
|
+
*/
|
|
65
|
+
constructor(parentBlock, inputTexture, intensity) {
|
|
66
|
+
super(parentBlock);
|
|
67
|
+
this._inputTexture = inputTexture;
|
|
68
|
+
this._intensity = intensity;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Binds all the required data to the shader when rendering.
|
|
72
|
+
* @param effect - defines the effect to bind the data to
|
|
73
|
+
*/
|
|
74
|
+
bind(effect) {
|
|
75
|
+
super.bind(effect);
|
|
76
|
+
effect.setTexture(this.getRemappedName("input"), this._inputTexture.value);
|
|
77
|
+
effect.setFloat(this.getRemappedName("intensity"), this._intensity.value);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A simple block to change the contrast of a texture.
|
|
82
|
+
*/
|
|
83
|
+
export class ContrastBlock extends DisableableShaderBlock {
|
|
84
|
+
/**
|
|
85
|
+
* Instantiates a new Block.
|
|
86
|
+
* @param smartFilter - The smart filter this block belongs to
|
|
87
|
+
* @param name - The friendly name of the block
|
|
88
|
+
*/
|
|
89
|
+
constructor(smartFilter, name) {
|
|
90
|
+
super(smartFilter, name);
|
|
91
|
+
/**
|
|
92
|
+
* The input texture connection point.
|
|
93
|
+
*/
|
|
94
|
+
this.input = this._registerInput("input", ConnectionPointType.Texture);
|
|
95
|
+
/**
|
|
96
|
+
* The intensity connection point.
|
|
97
|
+
*/
|
|
98
|
+
this.intensity = this._registerOptionalInput("intensity", ConnectionPointType.Float, createStrongRef(0.5));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
102
|
+
* @returns The class instance that binds the data to the effect
|
|
103
|
+
*/
|
|
104
|
+
getShaderBinding() {
|
|
105
|
+
const input = this._confirmRuntimeDataSupplied(this.input);
|
|
106
|
+
const intensity = this.intensity.runtimeData;
|
|
107
|
+
return new ContrastShaderBinding(this, input, intensity);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The class name of the block.
|
|
112
|
+
*/
|
|
113
|
+
ContrastBlock.ClassName = contrastBlockType;
|
|
114
|
+
/**
|
|
115
|
+
* The namespace of the block.
|
|
116
|
+
*/
|
|
117
|
+
ContrastBlock.Namespace = babylonDemoEffectsNamespace;
|
|
118
|
+
/**
|
|
119
|
+
* The shader program (vertex and fragment code) to use to render the block
|
|
120
|
+
*/
|
|
121
|
+
ContrastBlock.ShaderCode = shaderProgram;
|
|
122
|
+
//# sourceMappingURL=contrastBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contrastBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/contrastBlock.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAA0B,MAAM,uDAAuD,CAAC;AAEvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,OAAO,EAAE;;;aAGJ;QAEL,KAAK,EAAE;;aAEF;QAEL,gBAAgB,EAAE,YAAY;QAE9B,gBAAgB,EAAE,SAAS;QAE3B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE;;;;;;;;;;;;;;;;;aAiBT;aACA;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE;;;;;;;;aAQT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,wBAAwB;IAI/D;;;;;OAKG;IACH,YACI,WAA8B,EAC9B,YAAsD,EACtD,SAAiD;QAEjD,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAED;;;OAGG;IACa,IAAI,CAAC,MAAc;QAC/B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,sBAAsB;IA8BrD;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAzB7B;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAElF;;WAEG;QACa,cAAS,GAAG,IAAI,CAAC,sBAAsB,CACnD,WAAW,EACX,mBAAmB,CAAC,KAAK,EACzB,eAAe,CAAC,GAAG,CAAC,CACvB,CAAC;IAcF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAE7C,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC;;AA/CD;;GAEG;AACoB,uBAAS,GAAG,iBAAiB,AAApB,CAAqB;AAErD;;GAEG;AACoB,uBAAS,GAAG,2BAA2B,AAA9B,CAA+B;AAgB/D;;GAEG;AACoB,wBAAU,GAAG,aAAa,AAAhB,CAAiB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Effect } from "@babylonjs/core/Materials/effect";
|
|
2
|
+
import { type RuntimeData } from "../../../../connection/connectionPoint.js";
|
|
3
|
+
import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
|
|
4
|
+
import { type IDisableableBlock, DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
|
|
5
|
+
import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
|
|
6
|
+
import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
|
|
7
|
+
import type { SmartFilter } from "../../../../smartFilter.js";
|
|
8
|
+
/**
|
|
9
|
+
* The shader bindings for the Desaturate block.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DesaturateShaderBinding extends DisableableShaderBinding {
|
|
12
|
+
private readonly _inputTexture;
|
|
13
|
+
private readonly _intensity;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a new shader binding instance for the Desaturate block.
|
|
16
|
+
* @param parentBlock - The parent block
|
|
17
|
+
* @param inputTexture - The input texture
|
|
18
|
+
* @param intensity - The intensity of the desaturation
|
|
19
|
+
*/
|
|
20
|
+
constructor(parentBlock: IDisableableBlock, inputTexture: RuntimeData<ConnectionPointType.Texture>, intensity: RuntimeData<ConnectionPointType.Float>);
|
|
21
|
+
/**
|
|
22
|
+
* Binds all the required data to the shader when rendering.
|
|
23
|
+
* @param effect - defines the effect to bind the data to
|
|
24
|
+
*/
|
|
25
|
+
bind(effect: Effect): void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A simple block to desaturate the input texture.
|
|
29
|
+
*/
|
|
30
|
+
export declare class DesaturateBlock extends DisableableShaderBlock {
|
|
31
|
+
/**
|
|
32
|
+
* The class name of the block.
|
|
33
|
+
*/
|
|
34
|
+
static ClassName: string;
|
|
35
|
+
/**
|
|
36
|
+
* The namespace of the block.
|
|
37
|
+
*/
|
|
38
|
+
static Namespace: string;
|
|
39
|
+
/**
|
|
40
|
+
* The input texture connection point.
|
|
41
|
+
*/
|
|
42
|
+
readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
|
|
43
|
+
/**
|
|
44
|
+
* The intensity connection point.
|
|
45
|
+
*/
|
|
46
|
+
readonly intensity: import("../../../../connection/connectionPointWithDefault.js").ConnectionPointWithDefault<ConnectionPointType.Float>;
|
|
47
|
+
/**
|
|
48
|
+
* The shader program (vertex and fragment code) to use to render the block
|
|
49
|
+
*/
|
|
50
|
+
static ShaderCode: ShaderProgram;
|
|
51
|
+
/**
|
|
52
|
+
* Instantiates a new Block.
|
|
53
|
+
* @param smartFilter - The smart filter this block belongs to
|
|
54
|
+
* @param name - The friendly name of the block
|
|
55
|
+
*/
|
|
56
|
+
constructor(smartFilter: SmartFilter, name: string);
|
|
57
|
+
/**
|
|
58
|
+
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
59
|
+
* @returns The class instance that binds the data to the effect
|
|
60
|
+
*/
|
|
61
|
+
getShaderBinding(): DisableableShaderBinding;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=desaturateBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desaturateBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/desaturateBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,KAAK,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AA2C9D;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,wBAAwB;IACjE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyC;IAEpE;;;;;OAKG;gBAEC,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,SAAS,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC;IAOrD;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAK7C;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,sBAAsB;IACvD;;OAEG;IACH,OAAuB,SAAS,SAAuB;IAEvD;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IACH,SAAgB,SAAS,uHAIvB;IAEF;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACI,gBAAgB,IAAI,wBAAwB;CAMtD"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {} from "../../../../connection/connectionPoint.js";
|
|
2
|
+
import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
|
|
3
|
+
import { DisableableShaderBlock } from "../../../../blockFoundation/disableableShaderBlock.js";
|
|
4
|
+
import { DisableableShaderBinding } from "../../../../runtime/shaderRuntime.js";
|
|
5
|
+
import { createStrongRef } from "../../../../runtime/strongRef.js";
|
|
6
|
+
import { desaturateBlockType } from "../../../blockTypes.js";
|
|
7
|
+
import { babylonDemoEffectsNamespace } from "../../../blockNamespaces.js";
|
|
8
|
+
const shaderProgram = {
|
|
9
|
+
fragment: {
|
|
10
|
+
uniform: `
|
|
11
|
+
uniform sampler2D _input_;
|
|
12
|
+
uniform float _intensity_;
|
|
13
|
+
`,
|
|
14
|
+
const: `
|
|
15
|
+
const float _aspect_ = 1.72;
|
|
16
|
+
`,
|
|
17
|
+
mainFunctionName: "_desaturate_",
|
|
18
|
+
mainInputTexture: "_input_",
|
|
19
|
+
functions: [
|
|
20
|
+
{
|
|
21
|
+
name: "_desaturate_",
|
|
22
|
+
code: `
|
|
23
|
+
vec4 _desaturate_(vec2 vUV)
|
|
24
|
+
{
|
|
25
|
+
float saturationStrength = 1. - _intensity_;
|
|
26
|
+
|
|
27
|
+
vec4 color = texture2D(_input_, vUV);
|
|
28
|
+
|
|
29
|
+
float tempMin = min(min(color.x, color.y), color.z);
|
|
30
|
+
float tempMax = max(max(color.x, color.y), color.z);
|
|
31
|
+
float tempMerge = 0.5 * (tempMin + tempMax);
|
|
32
|
+
|
|
33
|
+
return vec4(mix(color.rgb, vec3(tempMerge, tempMerge, tempMerge), saturationStrength), color.a);
|
|
34
|
+
}
|
|
35
|
+
`,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The shader bindings for the Desaturate block.
|
|
42
|
+
*/
|
|
43
|
+
export class DesaturateShaderBinding extends DisableableShaderBinding {
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new shader binding instance for the Desaturate block.
|
|
46
|
+
* @param parentBlock - The parent block
|
|
47
|
+
* @param inputTexture - The input texture
|
|
48
|
+
* @param intensity - The intensity of the desaturation
|
|
49
|
+
*/
|
|
50
|
+
constructor(parentBlock, inputTexture, intensity) {
|
|
51
|
+
super(parentBlock);
|
|
52
|
+
this._inputTexture = inputTexture;
|
|
53
|
+
this._intensity = intensity;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Binds all the required data to the shader when rendering.
|
|
57
|
+
* @param effect - defines the effect to bind the data to
|
|
58
|
+
*/
|
|
59
|
+
bind(effect) {
|
|
60
|
+
super.bind(effect);
|
|
61
|
+
effect.setTexture(this.getRemappedName("input"), this._inputTexture.value);
|
|
62
|
+
effect.setFloat(this.getRemappedName("intensity"), this._intensity.value);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A simple block to desaturate the input texture.
|
|
67
|
+
*/
|
|
68
|
+
export class DesaturateBlock extends DisableableShaderBlock {
|
|
69
|
+
/**
|
|
70
|
+
* Instantiates a new Block.
|
|
71
|
+
* @param smartFilter - The smart filter this block belongs to
|
|
72
|
+
* @param name - The friendly name of the block
|
|
73
|
+
*/
|
|
74
|
+
constructor(smartFilter, name) {
|
|
75
|
+
super(smartFilter, name);
|
|
76
|
+
/**
|
|
77
|
+
* The input texture connection point.
|
|
78
|
+
*/
|
|
79
|
+
this.input = this._registerInput("input", ConnectionPointType.Texture);
|
|
80
|
+
/**
|
|
81
|
+
* The intensity connection point.
|
|
82
|
+
*/
|
|
83
|
+
this.intensity = this._registerOptionalInput("intensity", ConnectionPointType.Float, createStrongRef(0.3));
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
87
|
+
* @returns The class instance that binds the data to the effect
|
|
88
|
+
*/
|
|
89
|
+
getShaderBinding() {
|
|
90
|
+
const input = this._confirmRuntimeDataSupplied(this.input);
|
|
91
|
+
const intensity = this.intensity.runtimeData;
|
|
92
|
+
return new DesaturateShaderBinding(this, input, intensity);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The class name of the block.
|
|
97
|
+
*/
|
|
98
|
+
DesaturateBlock.ClassName = desaturateBlockType;
|
|
99
|
+
/**
|
|
100
|
+
* The namespace of the block.
|
|
101
|
+
*/
|
|
102
|
+
DesaturateBlock.Namespace = babylonDemoEffectsNamespace;
|
|
103
|
+
/**
|
|
104
|
+
* The shader program (vertex and fragment code) to use to render the block
|
|
105
|
+
*/
|
|
106
|
+
DesaturateBlock.ShaderCode = shaderProgram;
|
|
107
|
+
//# sourceMappingURL=desaturateBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desaturateBlock.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/desaturateBlock.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoB,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAA0B,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AACvH,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,aAAa,GAAkB;IACjC,QAAQ,EAAE;QACN,OAAO,EAAE;;;aAGJ;QAEL,KAAK,EAAE;;aAEF;QAEL,gBAAgB,EAAE,cAAc;QAEhC,gBAAgB,EAAE,SAAS;QAE3B,SAAS,EAAE;YACP;gBACI,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE;;;;;;;;;;;;;aAaT;aACA;SACJ;KACJ;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,wBAAwB;IAIjE;;;;;OAKG;IACH,YACI,WAA8B,EAC9B,YAAsD,EACtD,SAAiD;QAEjD,KAAK,CAAC,WAAW,CAAC,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAED;;;OAGG;IACa,IAAI,CAAC,MAAc;QAC/B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,sBAAsB;IA8BvD;;;;OAIG;IACH,YAAY,WAAwB,EAAE,IAAY;QAC9C,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAzB7B;;WAEG;QACa,UAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAElF;;WAEG;QACa,cAAS,GAAG,IAAI,CAAC,sBAAsB,CACnD,WAAW,EACX,mBAAmB,CAAC,KAAK,EACzB,eAAe,CAAC,GAAG,CAAC,CACvB,CAAC;IAcF,CAAC;IAED;;;OAGG;IACI,gBAAgB;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QAE7C,OAAO,IAAI,uBAAuB,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;;AA/CD;;GAEG;AACoB,yBAAS,GAAG,mBAAmB,AAAtB,CAAuB;AAEvD;;GAEG;AACoB,yBAAS,GAAG,2BAA2B,AAA9B,CAA+B;AAgB/D;;GAEG;AACoB,0BAAU,GAAG,aAAa,AAAhB,CAAiB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { Effect } from "@babylonjs/core/Materials/effect";
|
|
2
|
+
import { type RuntimeData } from "../../../../connection/connectionPoint.js";
|
|
3
|
+
import { ConnectionPointType } from "../../../../connection/connectionPointType.js";
|
|
4
|
+
import { ShaderBinding } from "../../../../runtime/shaderRuntime.js";
|
|
5
|
+
import type { ShaderProgram } from "../../../../utils/shaderCodeUtils.js";
|
|
6
|
+
import type { SmartFilter } from "../../../../smartFilter.js";
|
|
7
|
+
import { ShaderBlock } from "../../../../blockFoundation/shaderBlock.js";
|
|
8
|
+
/**
|
|
9
|
+
* The shader bindings for the DirectionalBlur block.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DirectionalBlurShaderBinding extends ShaderBinding {
|
|
12
|
+
private readonly _inputTexture;
|
|
13
|
+
private readonly _blurHorizontalWidth;
|
|
14
|
+
private readonly _blurVerticalWidth;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new shader binding instance for the DirectionalBlur block.
|
|
17
|
+
* @param inputTexture - The input texture
|
|
18
|
+
* @param blurHorizontalWidth - The horizontal blur width
|
|
19
|
+
* @param blurVerticalWidth - The vertical blur width
|
|
20
|
+
*/
|
|
21
|
+
constructor(inputTexture: RuntimeData<ConnectionPointType.Texture>, blurHorizontalWidth: number, blurVerticalWidth: number);
|
|
22
|
+
/**
|
|
23
|
+
* Binds all the required data to the shader when rendering.
|
|
24
|
+
* @param effect - defines the effect to bind the data to
|
|
25
|
+
*/
|
|
26
|
+
bind(effect: Effect): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A block performing a directional "gaussian" blur.
|
|
30
|
+
*
|
|
31
|
+
* It is aggregated as part of the @see BlurBlock.
|
|
32
|
+
*/
|
|
33
|
+
export declare class DirectionalBlurBlock extends ShaderBlock {
|
|
34
|
+
/**
|
|
35
|
+
* The class name of the block.
|
|
36
|
+
*/
|
|
37
|
+
static ClassName: string;
|
|
38
|
+
/**
|
|
39
|
+
* The namespace of the block.
|
|
40
|
+
*/
|
|
41
|
+
static Namespace: string;
|
|
42
|
+
/**
|
|
43
|
+
* The input texture connection point.
|
|
44
|
+
*/
|
|
45
|
+
readonly input: import("../../../../connection/connectionPoint.js").ConnectionPoint<ConnectionPointType.Texture>;
|
|
46
|
+
/**
|
|
47
|
+
* Defines how smaller we should make the target compared to the screen size.
|
|
48
|
+
*/
|
|
49
|
+
blurTextureRatio: number;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the horizontal strength of the blur.
|
|
52
|
+
*/
|
|
53
|
+
blurHorizontalWidth: number;
|
|
54
|
+
/**
|
|
55
|
+
* Defines the vertical strength of the blur.
|
|
56
|
+
*/
|
|
57
|
+
blurVerticalWidth: number;
|
|
58
|
+
/**
|
|
59
|
+
* The shader program (vertex and fragment code) to use to render the block
|
|
60
|
+
*/
|
|
61
|
+
static ShaderCode: ShaderProgram;
|
|
62
|
+
/**
|
|
63
|
+
* Instantiates a new Block.
|
|
64
|
+
* @param smartFilter - The smart filter this block belongs to
|
|
65
|
+
* @param name - The friendly name of the block
|
|
66
|
+
*/
|
|
67
|
+
constructor(smartFilter: SmartFilter, name: string);
|
|
68
|
+
/**
|
|
69
|
+
* Prepares the block for runtime.
|
|
70
|
+
* This is called by the smart filter just before creating the smart filter runtime.
|
|
71
|
+
*/
|
|
72
|
+
prepareForRuntime(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Get the class instance that binds all the required data to the shader (effect) when rendering.
|
|
75
|
+
* @returns The class instance that binds the data to the effect
|
|
76
|
+
*/
|
|
77
|
+
getShaderBinding(): ShaderBinding;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=directionalBlurBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directionalBlurBlock.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE/D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAuDzE;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,aAAa;IAC3D,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAE5C;;;;;OAKG;gBAEC,YAAY,EAAE,WAAW,CAAC,mBAAmB,CAAC,OAAO,CAAC,EACtD,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,MAAM;IAQ7B;;;OAGG;IACa,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;CAe7C;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACjD;;OAEG;IACH,OAAuB,SAAS,SAA4B;IAE5D;;OAEG;IACH,OAAuB,SAAS,SAA+B;IAE/D;;OAEG;IACH,SAAgB,KAAK,mGAA6D;IAElF;;OAEG;IAMI,gBAAgB,SAAO;IAE9B;;OAEG;IAMI,mBAAmB,SAAK;IAE/B;;OAEG;IAMI,iBAAiB,SAAK;IAE7B;;OAEG;IACH,OAAuB,UAAU,gBAAiB;IAElD;;;;OAIG;gBACS,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIlD;;;OAGG;IACa,iBAAiB,IAAI,IAAI;IAMzC;;;OAGG;IACI,gBAAgB,IAAI,aAAa;CAK3C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ISerializedBlockV1 } from "../../../../serialization/index.js";
|
|
2
|
+
import type { SmartFilter } from "../../../../smartFilter.js";
|
|
3
|
+
import { DirectionalBlurBlock } from "./directionalBlurBlock.js";
|
|
4
|
+
/**
|
|
5
|
+
* The definition of the extra data serialized for directional blur blocks.
|
|
6
|
+
*/
|
|
7
|
+
export interface ISerializedDirectionalBlurBlockV1 extends ISerializedBlockV1 {
|
|
8
|
+
/**
|
|
9
|
+
* The extra data of the block.
|
|
10
|
+
*/
|
|
11
|
+
data: {
|
|
12
|
+
/**
|
|
13
|
+
* The horizontal width of the blur.
|
|
14
|
+
*/
|
|
15
|
+
blurHorizontalWidth: number;
|
|
16
|
+
/**
|
|
17
|
+
* The vertical width of the blur.
|
|
18
|
+
*/
|
|
19
|
+
blurVerticalWidth: number;
|
|
20
|
+
/**
|
|
21
|
+
* The blur texture ratio.
|
|
22
|
+
*/
|
|
23
|
+
blurTextureRatio: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* V1 Directional Blur Deserializer.
|
|
28
|
+
* @param smartFilter - The SmartFilter to deserialize the block into
|
|
29
|
+
* @param serializedBlock - The serialized block data
|
|
30
|
+
* @returns A deserialized DirectionalBlurBlock
|
|
31
|
+
*/
|
|
32
|
+
export declare function directionalBlurDeserializer(smartFilter: SmartFilter, serializedBlock: ISerializedDirectionalBlurBlockV1): DirectionalBlurBlock;
|
|
33
|
+
//# sourceMappingURL=directionalBlurBlock.deserializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directionalBlurBlock.deserializer.d.ts","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,iCAAkC,SAAQ,kBAAkB;IACzE;;OAEG;IACH,IAAI,EAAE;QACF;;WAEG;QACH,mBAAmB,EAAE,MAAM,CAAC;QAE5B;;WAEG;QACH,iBAAiB,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,gBAAgB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACL;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACvC,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,iCAAiC,wBASrD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DirectionalBlurBlock } from "./directionalBlurBlock.js";
|
|
2
|
+
/**
|
|
3
|
+
* V1 Directional Blur Deserializer.
|
|
4
|
+
* @param smartFilter - The SmartFilter to deserialize the block into
|
|
5
|
+
* @param serializedBlock - The serialized block data
|
|
6
|
+
* @returns A deserialized DirectionalBlurBlock
|
|
7
|
+
*/
|
|
8
|
+
export function directionalBlurDeserializer(smartFilter, serializedBlock) {
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
const block = new DirectionalBlurBlock(smartFilter, serializedBlock.name);
|
|
11
|
+
// If data is missing, use the default value set by the block
|
|
12
|
+
block.blurHorizontalWidth = (_a = serializedBlock.data.blurHorizontalWidth) !== null && _a !== void 0 ? _a : block.blurHorizontalWidth;
|
|
13
|
+
block.blurVerticalWidth = (_b = serializedBlock.data.blurVerticalWidth) !== null && _b !== void 0 ? _b : block.blurVerticalWidth;
|
|
14
|
+
block.blurTextureRatio = (_c = serializedBlock.data.blurTextureRatio) !== null && _c !== void 0 ? _c : block.blurTextureRatio;
|
|
15
|
+
return block;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=directionalBlurBlock.deserializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directionalBlurBlock.deserializer.js","sourceRoot":"","sources":["../../../../../src/blocks/babylon/demo/effects/directionalBlurBlock.deserializer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AA2BjE;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CACvC,WAAwB,EACxB,eAAkD;;IAElD,MAAM,KAAK,GAAG,IAAI,oBAAoB,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAE1E,6DAA6D;IAC7D,KAAK,CAAC,mBAAmB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,mBAAmB,mCAAI,KAAK,CAAC,mBAAmB,CAAC;IAClG,KAAK,CAAC,iBAAiB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,iBAAiB,mCAAI,KAAK,CAAC,iBAAiB,CAAC;IAC5F,KAAK,CAAC,gBAAgB,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,gBAAgB,mCAAI,KAAK,CAAC,gBAAgB,CAAC;IACzF,OAAO,KAAK,CAAC;AACjB,CAAC"}
|