Coffeescript 创建的图层即使在为其指定内容后也是空的

Coffeescript 创建的图层即使在为其指定内容后也是空的,coffeescript,prototype,framerjs,Coffeescript,Prototype,Framerjs,我只是尝试在本教程之后制作一个快速原型: 我使用自己的设计,问题如下: 当我为发布的视频创建一个新的层time 8:13,并尝试使用属性image将我导入的一个层设置为这个新层的内容时,我没有得到任何结果 如果我把这个新层带到屏幕上,我只能看到透明的黑色背景,根据教程,它应该有我通过图像属性指定给它的层 下面是我的代码示例: sketch = Framer.Importer.load("imported/Untitled@2x") explore_layer = new Layer

我只是尝试在本教程之后制作一个快速原型:

我使用自己的设计,问题如下:

当我为发布的视频创建一个新的层
time 8:13
,并尝试使用属性
image
将我导入的一个层设置为这个新层的内容时,我没有得到任何结果

如果我把这个新层带到屏幕上,我只能看到透明的黑色背景,根据教程,它应该有我通过图像属性指定给它的层

下面是我的代码示例:

sketch = Framer.Importer.load("imported/Untitled@2x")

explore_layer = new Layer
    width: 750
    height: 1334
    image: sketch.explore.explore_group
    x: screen.width


sketch.Tab_3.on Events.Click, ->
    explore_layer.animate
        properties:
            x: 0
            y: 0
        curve: "spring(400, 35, 0)" 
这也是我的图层截图


Framer将始终导入选定草图页面中的组,并且该页面上的所有组将转换为直接在草图对象上可用的层。 另外:现在将图层的图像设置为图层对象本身,而不是草图图层的图像

因此,要使其发挥作用,您需要做几件事:

  • 将要在草图中的同一页上使用的所有元素放置在草图中
  • 导入后,直接从草图对象访问这些元素(因此
    sketch.explore\u group
    而不是
    sketch.explore.explore\u group
  • 使用草图层的图像,或在原型中使用草图层本身
  • 下面是一个这样的例子:

    sketch = Framer.Importer.load("imported/Untitled@2x")
    
    explore_layer = new Layer
        width: 750
        height: 1334
        image: sketch.explore_group.image
        x: screen.width
    
    
    sketch.Tab_3.on Events.Click, ->
        explore_layer.animate
            properties:
                x: 0
                y: 0
            curve: "spring(400, 35, 0)" 
    
    甚至更短,并带有:

    sketch = Framer.Importer.load("imported/Untitled@2x")
    
    sketch.explore_group.x = screen.width
    
    sketch.Tab_3.on Events.Click, ->
        sketch.explore_group.animate
            x: 0
            y: 0
            options:
                curve: Spring(tension:400, friction:35)