Skip to content

Commit

Permalink
Add support for inverted matte layers (airbnb#1712)
Browse files Browse the repository at this point in the history
  • Loading branch information
calda authored and Igor Moroz committed May 22, 2024
1 parent 6907f58 commit 978ae1e
Show file tree
Hide file tree
Showing 38 changed files with 54 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import QuartzCore

extension CALayer {

// MARK: Internal

/// Sets up an `AnimationLayer` / `CALayer` hierarchy in this layer,
/// using the given list of layers.
@nonobjc
Expand Down Expand Up @@ -48,7 +51,7 @@ extension CALayer {
}

// Create an `AnimationLayer` for each `LayerModel`
for (layerModel, maskLayerModel) in try layersInZAxisOrder.pairedLayersAndMasks(context: context) {
for (layerModel, mask) in try layersInZAxisOrder.pairedLayersAndMasks(context: context) {
guard let layer = try layerModel.makeAnimationLayer(context: context) else {
continue
}
Expand All @@ -64,14 +67,14 @@ extension CALayer {

// Create the `mask` layer for this layer, if it has a `MatteType`
if
let maskLayerModel = maskLayerModel,
let maskLayer = try maskLayerModel.makeAnimationLayer(context: context)
let mask = mask,
let maskLayer = try maskLayer(for: mask.model, type: mask.matteType, context: context)
{
let maskParentTransformLayer = makeParentTransformLayer(
childLayerModel: maskLayerModel,
childLayerModel: mask.model,
childLayer: maskLayer,
name: { parentLayerModel in
"\(maskLayerModel.name) (mask of \(layerModel.name)) (parent, \(parentLayerModel.name))"
"\(mask.model.name) (mask of \(layerModel.name)) (parent, \(parentLayerModel.name))"
})

// Set up a parent container to host both the layer
Expand All @@ -96,15 +99,52 @@ extension CALayer {
}
}

// MARK: Fileprivate

/// Creates a mask `CALayer` from the given matte layer model, using the `MatteType`
/// from the layer that is being masked.
fileprivate func maskLayer(
for matteLayerModel: LayerModel,
type: MatteType,
context: LayerContext) throws
-> CALayer?
{
switch type {
case .add:
return try matteLayerModel.makeAnimationLayer(context: context)

case .invert:
guard let maskLayer = try matteLayerModel.makeAnimationLayer(context: context) else {
return nil
}

// We can invert the mask layer by having a large solid black layer with the
// given mask layer subtracted out using the `xor` blend mode. When applied to the
// layer being masked, this creates an inverted mask where only areas _outside_
// of the mask layer are visible.
// https://developer.apple.com/documentation/coregraphics/cgblendmode/xor
let base = BaseAnimationLayer()
base.backgroundColor = .rgb(0, 0, 0)
base.addSublayer(maskLayer)
maskLayer.compositingFilter = "xor"
return base

case .none, .unknown:
return nil
}
}

}

extension Collection where Element == LayerModel {
/// Pairs each `LayerModel` within this array with
/// a `LayerModel` to use as its mask, if applicable
/// based on the layer's `MatteType` configuration.
/// - Assumes the layers are sorted in z-axis order.
fileprivate func pairedLayersAndMasks(context: LayerContext) throws -> [(layer: LayerModel, mask: LayerModel?)] {
var layersAndMasks = [(layer: LayerModel, mask: LayerModel?)]()
fileprivate func pairedLayersAndMasks(context _: LayerContext) throws
-> [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)]
{
var layersAndMasks = [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)]()
var unprocessedLayers = reversed()

while let layer = unprocessedLayers.popLast() {
Expand All @@ -114,11 +154,7 @@ extension Collection where Element == LayerModel {
matteType != .none,
let maskLayer = unprocessedLayers.popLast()
{
try context.compatibilityAssert(
matteType == .add,
"The Core Animation rendering engine currently only supports `MatteMode.add`.")

layersAndMasks.append((layer: layer, mask: maskLayer))
layersAndMasks.append((layer: layer, mask: (model: maskLayer, matteType: matteType)))
}

else {
Expand Down
1 change: 1 addition & 0 deletions Tests/Samples/Issues/issue_1260.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v":"5.6.10","fr":60,"ip":0,"op":62,"w":150,"h":150,"nm":"发现","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"NULL ","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":-14,"ix":10},"p":{"a":0,"k":[75,75,0],"ix":2},"a":{"a":0,"k":[50,50,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.362,0.362,0.667],"y":[1,1,1]},"o":{"x":[0.155,0.155,0.333],"y":[0.55,0.55,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.338,0.338,0.667],"y":[1,1,1]},"o":{"x":[0.612,0.612,0.333],"y":[0,0,0]},"t":17,"s":[80,80,100]},{"i":{"x":[0.469,0.469,0.667],"y":[1,1,1]},"o":{"x":[0.481,0.481,0.333],"y":[0,0,0]},"t":28,"s":[110,110,100]},{"i":{"x":[0.321,0.321,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":36,"s":[95,95,100]},{"t":43,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Wave 3","parent":1,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[-81.562]},{"t":40,"s":[174.718]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[168.497]},{"t":40,"s":[75.34]}],"ix":4}},"a":{"a":0,"k":[51.062,93.247,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.159,-4.12],[10.75,0.5],[13.75,-0.25],[12,0],[13.5,-0.25],[9.75,0],[14,0],[16.5,0],[18.5,0.25],[16.25,0],[0,0],[0,0],[0,0]],"o":[[-2.25,8],[-9.992,-0.465],[-13.75,0.25],[-11.25,0],[-13.5,0.25],[-11.75,0],[-14,0],[-15.002,0],[-18.5,-0.25],[-18,0],[0,0],[0,0],[0,0]],"v":[[220.25,14],[193.25,22.5],[161,13.25],[133.25,24],[99.25,14.25],[66.5,26],[32,15.5],[-1.75,27.5],[-39,13.75],[-80.5,28],[-118.5,19.5],[-118.5,173.25],[219.5,173.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.552941176471,0.709803921569,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"black guide 2","parent":1,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.362],"y":[1]},"o":{"x":[0.155],"y":[-0.118]},"t":0,"s":[0]},{"i":{"x":[0.338],"y":[1]},"o":{"x":[0.612],"y":[0]},"t":17,"s":[224]},{"i":{"x":[0.469],"y":[1]},"o":{"x":[0.481],"y":[0]},"t":28,"s":[164]},{"i":{"x":[0.321],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":36,"s":[214]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":43,"s":[174]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":49,"s":[204]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":54,"s":[184]},{"t":58,"s":[180]}],"ix":10},"p":{"a":0,"k":[49.593,50.407,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[200,200,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0.221,0.302],[0.382,-0.28],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.379,-0.284],[-0.305,0.229],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.28,-0.382],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.284,0.379],[0.305,0.229],[0,0],[0,0],[0,0],[0,0],[0.221,-0.302]],"v":[[6.101,-5.917],[4.903,-6.101],[4.903,-6.101],[-0.514,-2.128],[-1.211,-1.618],[-1.8,-0.832],[-6.096,4.896],[-5.924,6.096],[-4.896,6.096],[0.714,1.888],[1.618,1.211],[2.325,0.247],[6.101,-4.903]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":8,"s":[{"i":[[0.202,0.122],[0.118,-0.014],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.274,-0.206],[-0.17,-0.106],[0,0],[-0.191,0.195],[0,0],[0,0]],"o":[[-0.287,-0.221],[0,0],[0,0],[0,0],[0,0],[0,0],[0.167,0.11],[0.221,0.166],[0,0],[0,0],[0.202,-0.206],[0,0],[-0.244,-0.168]],"v":[[0.776,-0.907],[0.069,-1.362],[-0.237,-1.302],[-0.509,-1.253],[-0.956,-0.548],[-1.416,0.14],[-1.297,0.702],[-0.626,1.163],[0.071,1.631],[0.644,1.52],[1.117,0.822],[1.575,0.135],[1.443,-0.445]],"c":true}]},{"t":17,"s":[{"i":[[0.221,0.302],[0.382,-0.28],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.379,-0.284],[-0.305,0.229],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.28,-0.382],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.284,0.379],[0.305,0.229],[0,0],[0,0],[0,0],[0,0],[0.221,-0.302]],"v":[[6.101,-5.917],[4.903,-6.101],[4.903,-6.101],[-0.514,-2.128],[-1.211,-1.618],[-1.8,-0.832],[-6.096,4.896],[-5.924,6.096],[-4.896,6.096],[0.714,1.888],[1.618,1.211],[2.325,0.247],[6.101,-4.903]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.129411764706,0.129411764706,0.149019607843,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Wave 2","parent":1,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[-81.562]},{"t":40,"s":[174.718]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[168.497]},{"t":40,"s":[75.34]}],"ix":4}},"a":{"a":0,"k":[51.062,93.247,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.159,-4.12],[10.75,0.5],[13.75,-0.25],[12,0],[13.5,-0.25],[9.75,0],[14,0],[16.5,0],[18.5,0.25],[16.25,0],[0,0],[0,0],[0,0]],"o":[[-2.25,8],[-9.992,-0.465],[-13.75,0.25],[-11.25,0],[-13.5,0.25],[-11.75,0],[-14,0],[-15.002,0],[-18.5,-0.25],[-18,0],[0,0],[0,0],[0,0]],"v":[[220.25,14],[193.25,22.5],[161,13.25],[133.25,24],[99.25,14.25],[66.5,26],[32,15.5],[-1.75,27.5],[-39,13.75],[-80.5,28],[-118.5,19.5],[-118.5,173.25],[219.5,173.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.552941176471,0.709803921569,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"white guide 2","parent":3,"tt":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[{"i":[[0.221,0.302],[0.382,-0.28],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.379,-0.284],[-0.305,0.229],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.28,-0.382],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.284,0.379],[0.305,0.229],[0,0],[0,0],[0,0],[0,0],[0.221,-0.302]],"v":[[6.101,-5.917],[4.903,-6.101],[4.903,-6.101],[-0.514,-2.128],[-1.211,-1.618],[-1.8,-0.832],[-6.096,4.896],[-5.924,6.096],[-4.896,6.096],[0.714,1.888],[1.618,1.211],[2.325,0.247],[6.101,-4.903]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":8,"s":[{"i":[[0.202,0.122],[0.118,-0.014],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.274,-0.206],[-0.17,-0.106],[0,0],[-0.191,0.195],[0,0],[0,0]],"o":[[-0.287,-0.221],[0,0],[0,0],[0,0],[0,0],[0,0],[0.167,0.11],[0.221,0.166],[0,0],[0,0],[0.202,-0.206],[0,0],[-0.244,-0.168]],"v":[[0.776,-0.907],[0.069,-1.362],[-0.237,-1.302],[-0.509,-1.253],[-0.956,-0.548],[-1.416,0.14],[-1.297,0.702],[-0.626,1.163],[0.071,1.631],[0.644,1.52],[1.117,0.822],[1.575,0.135],[1.443,-0.445]],"c":true}]},{"t":17,"s":[{"i":[[0.221,0.302],[0.382,-0.28],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.379,-0.284],[-0.305,0.229],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.28,-0.382],[0,0],[0,0],[0,0],[0,0],[0,0],[-0.284,0.379],[0.305,0.229],[0,0],[0,0],[0,0],[0,0],[0.221,-0.302]],"v":[[6.101,-5.917],[4.903,-6.101],[4.903,-6.101],[-0.514,-2.128],[-1.211,-1.618],[-1.8,-0.832],[-6.096,4.896],[-5.924,6.096],[-4.896,6.096],[0.714,1.888],[1.618,1.211],[2.325,0.247],[6.101,-4.903]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Wave","parent":1,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[-81.562]},{"t":40,"s":[174.718]}],"ix":3},"y":{"a":1,"k":[{"i":{"x":[0],"y":[1]},"o":{"x":[0.6],"y":[0]},"t":0,"s":[168.497]},{"t":40,"s":[75.34]}],"ix":4}},"a":{"a":0,"k":[51.062,93.247,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.159,-4.12],[10.75,0.5],[13.75,-0.25],[12,0],[13.5,-0.25],[9.75,0],[14,0],[16.5,0],[18.5,0.25],[16.25,0],[0,0],[0,0],[0,0]],"o":[[-2.25,8],[-9.992,-0.465],[-13.75,0.25],[-11.25,0],[-13.5,0.25],[-11.75,0],[-14,0],[-15.002,0],[-18.5,-0.25],[-18,0],[0,0],[0,0],[0,0]],"v":[[220.25,14],[193.25,22.5],[161,13.25],[133.25,24],[99.25,14.25],[66.5,26],[32,15.5],[-1.75,27.5],[-39,13.75],[-80.5,28],[-118.5,19.5],[-118.5,173.25],[219.5,173.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.552941176471,0.709803921569,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"white fill","parent":1,"tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50,50,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[68,68],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"black fill","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[50,50,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[200,200,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-11.046,0],[0,-11.046],[11.046,0],[0,11.046]],"o":[[11.046,0],[0,11.046],[-11.046,0],[0,-11.046]],"v":[[0,-20],[20,0],[0,20],[-20,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.129411764706,0.129411764706,0.149019607843,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
1 change: 1 addition & 0 deletions Tests/Samples/Issues/issue_1655.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"v":"5.9.0","fr":60,"ip":0,"op":420,"w":1284,"h":2778,"nm":"Comp 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.27],"y":[1]},"o":{"x":[0.73],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.27],"y":[1]},"o":{"x":[0.73],"y":[0]},"t":135,"s":[-141]},{"i":{"x":[0.27],"y":[1]},"o":{"x":[0.73],"y":[0]},"t":276,"s":[68]},{"t":419,"s":[-87]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.27,"y":1},"o":{"x":0.73,"y":0},"t":0,"s":[642,1389,0],"to":[26.833,0,0],"ti":[36.333,0,0]},{"i":{"x":0.27,"y":1},"o":{"x":0.73,"y":0},"t":135.072,"s":[803,1389,0],"to":[-36.333,0,0],"ti":[17.022,27.052,0]},{"i":{"x":0.27,"y":1},"o":{"x":0.73,"y":0},"t":275.658,"s":[424,1389,0],"to":[-17.022,-27.052,0],"ti":[162.986,485.89,0]},{"t":419,"s":[700.868,1226.69,0]}],"ix":2,"l":2},"a":{"a":0,"k":[-126.978,-77.37,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":61.898,"ix":6},"is":{"a":0,"k":0,"ix":8},"or":{"a":0,"k":123.796,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-126.978,-65.548],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Polystar 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 1","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[642,1389,0],"ix":2,"l":2},"a":{"a":0,"k":[-287.727,-176.356,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[440.11,440.11],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"fl","c":{"a":0,"k":[0.338500617532,0.160784298766,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-287.727,-176.356],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":420,"st":0,"bm":0}],"markers":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Supports Core Animation engine
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Supports Core Animation engine
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Does not support Core Animation engine. Encountered compatibility issues:
[root layer] The Core Animation rendering engine currently only supports `MatteMode.add`.
Supports Core Animation engine
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Does not support Core Animation engine. Encountered compatibility issues:
[root layer] The Core Animation rendering engine currently only supports `MatteMode.add`.
Supports Core Animation engine
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 978ae1e

Please sign in to comment.