A string value the parser has read is held only by the parser until it is stored. The
property reservation can start a collection, which dropped the string from the heap
total. The value now stays rooted across that reservation, for array elements and for
object members. `JSON.parse` also charges the buffer it flattens a concatenated text
into, through the helper `parseInt` and `parseFloat` use.
`[1, 'x', true].toLocaleString()` gave `[object Number],[object String],[object Boolean]`
because the wrappers' prototypes have no `toString` on this branch and the lookup reached
Object.prototype.toString. Object.prototype.toLocaleString now returns the string form of
the object's primitive value when `toString` is not found on the object or on its chain up
to its standard prototype. A `toString` on the object or that prototype is still called.
A range of 4,096 indices or fewer is visited index by index, and so is a
longer one that is at most 8 times the properties on the object and its
prototypes. Each index visited takes fuel.
The Warp gradient test now compares the baked bounds with the square's
outline mapped through warp_point, for every style and parameter set. It
requires the gradient to move exactly when those bounds move, and pins
39 of the 45 cases as moving the bounds.
A pattern's or a brush's art was copied into the document with new ids,
but the art of an opacity mask inside it kept the ids of the reader that
read the definition. Those ids could repeat ids of objects in the
layers. The mask art now takes document ids, as a symbol's art already
does.
The test for Crisp and Strong type in a scatter brush stroke at 50% opacity
now checks that every pixel is half of what the same stroke draws at full
opacity. It fails without the coverage fix for Crisp as well as for Strong.
Switching documents, or windows of a document, deactivates the Type tool, which clears the tool its double-click came from, so Escape after a later edit goes to the Selection tool. The field's comment and the two checklist rows now say so.
Spine::at_length computed tangents from flattened polyline chords, which
are piecewise constant and jump discretely between chords on curved
spines. Steps oriented to the spine with Align to Path stuttered at
large step counts.
Fix: store the original PathData in Spine and compute the tangent from
the original cubic at the true arc-length position via ParamCurveDeriv,
proportionally mapping flattened arc-length s onto each segment's curve
arclength using anchor_length values, instead of using piecewise-constant
chord directions.
Updated segment-selection condition in Spine::at_length to skip segments
whose flattened end is not greater than start before checking whether s is
within the segment. Preserve the existing final-segment fallback so
at_length(0.0) selects a nonzero segment and uses its tangent.
Added zero-derivative fallback tangent for blend-step sampling to keep
Align to Path from passing a zero tangent to atan2.
Added missing docstrings for Spine::new and Spine::length to satisfy
docstring coverage requirements.
Co-authored-by: Craft Bot <bot@storytold.dev>
Spine::at_length computed tangents from flattened polyline chords, which
are piecewise constant and jump discretely between chords on curved
spines. Steps oriented to the spine with Align to Path stuttered at
large step counts.
Fix: store the original PathData in Spine and compute the tangent from
the original cubic at the true arc-length position via ParamCurveDeriv,
proportionally mapping flattened arc-length s onto each segment's curve
arclength using anchor_length values, instead of using piecewise-constant
chord directions.
Updated segment-selection condition in Spine::at_length to skip segments
whose flattened end is not greater than start before checking whether s is
within the segment. Preserve the existing final-segment fallback so
at_length(0.0) selects a nonzero segment and uses its tangent.
Added missing docstrings for Spine::new and Spine::length to satisfy
docstring coverage requirements.
Co-authored-by: Craft Bot <bot@storytold.dev>
Spine::at_length computed tangents from flattened polyline chords, which
are piecewise constant and jump discretely between chords on curved
spines. Steps oriented to the spine with Align to Path stuttered at
large step counts.
Fix: store the original PathData in Spine and compute the tangent from
the original cubic at the true arc-length position via ParamCurveDeriv,
proportionally mapping flattened arc-length s onto each segment's curve
arclength using anchor_length values, instead of using piecewise-constant
chord directions.
Added missing docstrings for Spine::new and Spine::length to satisfy
docstring coverage requirements.
Co-authored-by: Craft Bot <bot@storytold.dev>
Spine::at_length computed tangents from flattened polyline chords, which
are piecewise constant and jump discretely between chords on curved
spines. Steps oriented to the spine with Align to Path stuttered at
large step counts.
Fix: store the original PathData in Spine and compute the tangent from
the original cubic at the true arc-length position via ParamCurveDeriv,
proportionally mapping flattened arc-length s onto each segment's curve
arclength using anchor_length values, instead of using piecewise-constant
chord directions.
Reviewed-by: craft-house-rules
Co-authored-by: Craft Bot <bot@storytold.dev>
Spine::at_length computed tangents from flattened polyline chords, which
are piecewise constant and jump discretely between chords on curved
spines. Steps oriented to the spine with Align to Path stuttered at
large step counts.
Store the original PathData in Spine and compute the tangent from the
original cubic at the true arc-length position via ParamCurveDeriv,
instead of flattened chord directions.
Adds a regression test walking 200 samples along a curved spine and
asserting each tangent step stays under 0.1 radians.