Documentation
Changes, licenses and more
Incompatible Changes

Incompatible Changes

For complete changes, please refer to the CHANGELOG (opens in a new tab)

0.3.0

  • NarraLeaf-React now requires React 19 (opens in a new tab) or later
  • Image Config has changed:
    • the type of config.src should be a tag definition or a string
    • In tag-based image config, config.src as a resolver function is moved to config.src.resolve
    • Image can't be marked as wearable anymore, use image.wear or image.asWearableOf instead
  • These methods of Image has been changed:
    • setAppearance, setTags, setSrc -> char
    • applyTransform -> transform
    • wear is a new alias for addWearable
    • asWearableOf is a new alias for bindWearable
    • init, setPosition, dispose, copy are removed
    • IImageTransition is removed, use ImageTransition instead
  • These methods of Text has been changed:
    • applyTransform -> transform
    • applyTransition is removed, applying transitions are still in planning
    • ITextTransition is removed, use TextTransition instead
  • These methods of Transform has been changed:
    • overwrite is removed
    • Transformer API is completely deprecated
  • These methods/properties of Scene has been changed:
    • activate, deactivate are removed, the game will manage the scene's lifecycle automatically
    • applyTransform is removed, use scene.background.transform instead
    • inherit is removed
    • requestImagePreload -> preloadImage
  • These methods of Sound has been changed:
    • use copy to create a new sound instance
    • play, stop and setVolume method can receive a duration parameter
    • fade is removed, use setVolume instead
  • In displayable elements, the transform states are separated from the element states
  • These changes are made to Sound config
  • Scene's config now can't specify the invertY and invertX properties, use story config origin instead
  • Top, Center, Bottom, HBox, and VBox are deprecated, use PageRouter API instead
  • ITransitions are all deprecated, use Transition API instead
    • FontSizeTransition -> FontSize
    • BaseImageTransition -> ImageTransition
    • BaseTextTransition -> TextTransition

0.2.2

  • SceneConfig invertY is now true by default

0.2.0

  • Image constructor signature has changed. Now the first argument must be a config object.

0.1.2

  • game.config.player.width and game.config.player.height cannot be string anymore