5.7.4 • Published 3 years ago

dragonbones.js v5.7.4

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

dragonBones

npm version npm downloads

官方库 需要几处改动才能用得顺手,所以有了这个修改版。

Install

npm i dragonbones.js

Usage

const
  factory = dragonBones.PixiFactory.factory,
  {resources} = loader

factory.parseDragonBonesData(resources['orad_ske.json'].data)
factory.parseTextureAtlasData(
  resources['orad_tex.json'].data,
  resources['orad_tex.png'].texture
)

const anime = factory.buildArmatureDisplay('root')
// 事件帧
anime.armature.eventDispatcher.addDBEventListener('frameEvent', async ({name}) => {
  if (name !== 'meet:end') return
  anime.animation.play('love')
  await delay(3)
  anime.animation.play('snatch')
})
anime.animation.play('meet')
anime.position.set(screen.width >> 1, screen.height + 200 >> 1)
stage.addChild(anime)
5.7.4

3 years ago

5.7.3

3 years ago

5.7.2

3 years ago

5.7.1

5 years ago

5.7.0

5 years ago