Scrawl-canvas v8.13.0 #86
KaliedaRik
announced in
Releases
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Breaking changes:
Text rendering
Phrase
entity has been deprecated and removed from the library. Two new entitys replace it:Label
andEnhancedLabel
. See the new functionality section below for details about these new entitys.Cell rendering
New functionality:
With the introduction of the EnhancedLabel entity, we have also take the opportunity to add the ability for SC artefacts to pivot themselves to individual text units within the EL entity. This is achieved by pivoting to the EL and indicating the desired text unit by supplying its index number in a new
pivotIndex
(also for line/quadratic/bezier entitys:startControlPivotIndex
,controlPivotIndex
,endControlPivotIndex
,endPivotIndex
)Improvements:
Library
We have added new convenience functions for finding/retrieving existing objects from the library. These include:
scrawl.findArtefact('name')
scrawl.findAsset('name')
scrawl.findCanvas('name')
scrawl.findElement('name')
scrawl.findEntity('name')
scrawl.findFilter('name')
scrawl.findGroup('name')
scrawl.findPattern('name')
scrawl.findStack('name')
scrawl.findStyles('name')
scrawl.findTween('name')
New font checking functions:
scrawl.checkFontIsLoaded('name')
scrawl.getFontMetadata('name')
scrawl.purgeFontMetadata()
scrawl.recalculateFonts()
New shorthand convenience function
scrawl.purge('namespace')
- this maps toscrawl.library.purge('namespace')
.Canvas
hold
HTML elements within the canvas shadow DOM; it no longer pollutes the wider DOM by attaching (some of) these elements to the end of the DOM document.canvas.getBase()
to retrieve the base Cellcanvas.getBaseHere()
to retrieve the base Cell'shere
objectholds
is required, they will be marked withARIA-busy="true"
attributes while the resorting progresses.compile
step by default.Render objects
animation.renderOnce()
function to trigger a Display cycle render of an animation that is not currently runninganimation.updateHook(hookName, function)
function to dynamically update hook functionsPattern
useAsAsset
flag.get
strings can be used on a Pattern object to retrieve data about the Pattern's matrix:matrixA
,matrixB
,matrixC
,matrixD
,matrixE
,matrixF
,stretchX
,stretchY
,skewX
,skewY
,shiftX
,shiftY
.Miscellaneous
noise.set({ colors: [...]})
.rd.get('generation')
.binary
filter has been removed from the code base.group.getArtefactNames()
- returns an array of name Strings for all the artefacts in the Group object.direction
,fontKerning
,textRendering
,letterSpacing
,wordSpacing
,fontStretch
,fontVariantCaps
.Bugfixes:
setRelativeDimensionsUsingBase
- this is by defaultfalse
, but if users find their canvases breaking in mysterious ways they should consider setting the attribute totrue
when creating a new non-base Cell.This discussion was created from the release Scrawl-canvas v8.13.0.
Beta Was this translation helpful? Give feedback.
All reactions