素材弹出框组件src\components\library\library.jsx,组件使用时传入的数据格式解析如下

[
    {
        'name': 'Abby',
        'md5': 'afab2d2141e9811bd89e385e9628cb5f.svg',
        'type': 'sprite', // 素材类型
        'tags': [// 素材标签,即素材的子类型
            'people',
            'person',
            'drawing'
        ],
        'info': [960, 720, 2], // 原图规格,以及原图和展示图片的比例
        'json': {// 包含内容
            'objName': 'Abby',
            'sounds': [// 声音
                {
                    'soundName': 'pop',
                    'soundID': -1,
                    'md5': '83a9787d4cb6f3b7632b4ddfebf74367.wav',
                    'sampleCount': 258,
                    'rate': 11025,
                    'format': ''
                }
            ],
            'costumes': [// 造型
                {
                    'costumeName': 'abby-a',
                    'baseLayerID': -1,
                    'baseLayerMD5': 'afab2d2141e9811bd89e385e9628cb5f.svg',
                    'bitmapResolution': 1,
                    'rotationCenterX': 31,
                    'rotationCenterY': 100
                }
                // ......
            ],
            'currentCostumeIndex': 0, // 添加到舞台时初始化展示的造型
            'scratchX': -20,
            'scratchY': -38,
            'scale': 1,
            'direction': 90,
            'rotationStyle': 'normal',
            'isDraggable': false,
            'visible': true,
            'spriteInfo': {}
        }
    }
]
View Code

相关文章:

  • 2022-01-04
  • 2021-05-12
  • 2021-11-27
  • 2021-06-06
  • 2022-03-10
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-12
  • 2021-07-17
  • 2022-01-07
  • 2022-12-23
  • 2021-05-03
  • 2022-12-23
  • 2021-12-03
相关资源
相似解决方案