Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #124457

Re: Lexical Binding

From Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups comp.lang.javascript
Subject Re: Lexical Binding
Date 2026-07-25 22:56 +0000
Organization A noiseless patient Spider
Message-ID <1143evh$1rf0i$9@dont-email.me> (permalink)
References <113v1hu$frmp$1@dont-email.me>

Show all headers | View raw


On Fri, 24 Jul 2026 06:43:10 -0000 (UTC), I wrote:

> Put them together, to define a “shrink to bottom” effect:
>
>     window.effects = /* exported effects functions */
>         {
>             ...
>             "shrink_to_bottom" :
>                 def_transform_effect_common(def_transform_stretch_shrink(false, 1), true),
>             ...
>         }

Just to make the code-reuse factor clear, here are 6 different visual
effects, each defined with just one line of code:

    window.effects = /* exported effects functions */
        {
            ...
            "stretch_from_bottom" :
                def_transform_effect_common(def_transform_stretch_shrink(true, 1), false),
            "stretch_from_middle" :
                def_transform_effect_common(def_transform_stretch_shrink(true, 0.5), false),
            "stretch_from_top" :
                def_transform_effect_common(def_transform_stretch_shrink(true, 0), false),
            "shrink_to_bottom" :
                def_transform_effect_common(def_transform_stretch_shrink(false, 1), true),
            "shrink_to_middle" :
                def_transform_effect_common(def_transform_stretch_shrink(false, 0.5), true),
            "shrink_to_top" :
                def_transform_effect_common(def_transform_stretch_shrink(false, 0), true),
            ...
        }

Back to comp.lang.javascript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Lexical Binding Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-24 06:43 +0000
  Re: Lexical Binding Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-07-25 22:56 +0000

csiph-web