
PANTHERA 런타임 - 다목적 애니메이션 소프트웨어 인 Panthera 2.0 편집기 와 함께 생성 된 애니메이션을 Defold Projects에 통합하도록 설계된 Defold Library. 이 런타임 라이브러리는 Panthera 애니메이션을 가져오고 재생하는 프로세스를 단순화하여 Defold 게임 및 응용 프로그램의 시각적 품질과 상호 작용을 향상시킵니다.
Panthera 2.0 편집기 안내서를 읽으면 Defold Engine을 사용하여 개발 된 혁신적인 도구 인 Panthera 2.0 편집기에 대해 알아보십시오.
game.project 파일을 열고 프로젝트 섹션의 종속성 필드에 다음 줄을 추가하십시오.
트위너를 훼손했습니다
https://github.com/Insality/defold-tweener/archive/refs/tags/3.zip
Panthera 런타임
https://github.com/Insality/panthera/archive/refs/tags/runtime.4.zip
그런 다음 Project ▸ Fetch Libraries 선택하여 라이브러리 종속성을 업데이트하십시오. 프로젝트를 열 때마다 자동으로 발생하므로 프로젝트를 다시 열지 않고 의존성이 변경되는 경우에만이 작업을 수행해야합니다.
참고 : 라이브러리 크기는 플랫폼 당 빌드 보고서에 따라 계산됩니다.
| 플랫폼 | 라이브러리 크기 |
|---|---|
| html5 | 12.42 KB |
| 데스크탑 / 모바일 | 21.35 KB |
참고 : Hot Reloading은 개발 환경에서만 사용하도록 설계되었습니다. Hot Reloading은 JSON 파일의 애니메이션에만 작동합니다. 애니메이션에 LUA 테이블을 사용하는 경우 핫 재 장전이 작동하지 않습니다.
Panthera 런타임은보다 효율적인 개발 워크 플로우를 위해 애니메이션의 핫 재 장전을 지원합니다. 이 기능을 사용하면 정의 게임을 다시 시작하지 않고 애니메이션을 자동으로 다시로드하여 애니메이션 자산에 대한 빠른 반복을 용이하게합니다.
애니메이션의 핫 재 장전을 활성화하려면 game.project 파일에 다음 설정을 포함시킵니다.
[panthera]
hotreload_animations = 1구성 세부 사항 :
1 로 설정하십시오. 이 기능은 디버그 모드에서만 활성화됩니다.DEFOLD에서 Hot Reload 구현 :
핫 재 장전을 활용하려면 게임 창이 초점을 맞출 때 panthera.reload_animation() 을 트리거하는 Defold 스크립트에서 창 이벤트 리스너를 설정하십시오. 이렇게하면 개발 중에 애니메이션이 자동으로 새로 고침됩니다.
local panthera = require ( " panthera.panthera " )
-- Reload animation when window is focused, only for debug and on desktop
window . set_listener ( function ( _ , event )
if event == window . WINDOW_EVENT_FOCUS_GAINED then
panthera . reload_animation ()
end
end ) panthera . create_gui ( animation_path_or_data , [ template ], [ nodes ])
panthera . create_go ( animation_path_or_data , [ collection_name ], [ objects ])
panthera . create ( animation_path_or_data , adapter , get_node )
panthera . clone_state ( animation_state )
panthera . play ( animation_state , animation_id , [ options ])
panthera . stop ( animation_state )
panthera . set_time ( animation_state , animation_id , time )
panthera . get_time ( animation_state )
panthera . get_duration ( animation_state , animation_id )
panthera . is_playing ( animation_state )
panthera . get_latest_animation_id ( animation_state )
panthera . set_logger ([ logger_instance ])
panthera . reload_animation ([ animation_path ])API 참조 파일을 읽고 모듈의 전체 API 문서를보십시오.
이러한 간결한 예제와 함께 Panthera 애니메이션을 훼손합니다.
Go 어댑터를 사용하여 애니메이션 파일을로드하고 재생하십시오.
local panthera = require ( " panthera.panthera " )
local animation = require ( " path.to.panthera_animation " )
function init ( self )
self . animation = panthera . create_go ( animation )
panthera . play ( self . animation , " run " , { is_loop = true })
end이 예제는 게임이 시작될 때 루핑 실행 애니메이션을 게임 객체에 적용합니다.
GUI 어댑터를 사용하여 애니메이션 파일을로드하고 재생하십시오.
local panthera = require ( " panthera.panthera " )
local animation = require ( " path.to.panthera_animation " )
function init ( self )
self . animation = panthera . create_gui ( animation )
panthera . play ( self . animation , " fade_in " )
end이 예제는 게임이 시작될 때 페이드 인 애니메이션을 GUI 노드에 적용합니다.
애니메이션이 현재 재생 중인지 확인하고 현재 애니메이션 ID를 검색하십시오.
local panthera = require ( " panthera.panthera " )
function init ( self )
-- You can use JSON instead of Lua tables, but it should be accessible with sys.load_resource()
self . animation = panthera . create_gui ( " /animations/animation.json " )
local is_playing = panthera . is_playing ( self . animation )
local animation_id = panthera . get_latest_animation_id ( self . animation )
if is_playing then
print ( " The animation is currently playing: " , animation_id )
else
print ( " The animation is not playing " )
end
endPanthera 2.0 애니메이션을 Defoll Game Objects (GOS)와 통합 할 때 어떤 속성을 애니메이션 할 수 있는지 알아야합니다.
기본적으로 Sprite 구성 요소는 tint 속성을 사용하고 레이블 구성 요소는 color 속성을 사용합니다. Panthera는 color 속성을 사용하려고합니다. color 특성을 활성화하려면 Sprite 구성 요소의 재료를 /panthera/materials/sprite.material 에 설정하거나 color 속성이있는 다른 재료를 사용해야합니다.
애니메이션 블렌딩 가이드를 읽고 동일한 엔티티에서 여러 애니메이션을 동시에 혼합하는 방법을 배우고 게임의 시각적 충실도와 역학을 향상시키는 복잡한 계층 애니메이션을 만듭니다.
Panthera 런타임은 게임 객체 및 GUI에 대한 기본 어댑터를 제공하지만 프로젝트의 요구에 따라 어댑터를 사용자 정의해야 할 수도 있습니다. 어댑터 사용자 정의를 읽고 완화 유형을 매핑하고 사용자 지정 이벤트를 처리하며 Panthera 런타임과 함께 사용자 정의 어댑터를 사용하는 방법을 알아보십시오.
Panthera 런타임은 MIT 라이센스에 따라 라이센스가 부여됩니다. 자세한 내용은 라이센스 파일을 참조하십시오.
모든 문제, 질문 또는 제안에 대해서는 문제를 만듭니다.
Changelog를 읽고 Panthera 런타임의 최신 업데이트 및 기능에 대해 알아보십시오.
귀하의 지원은 저와 계속해서 프로젝트를 만들고 유지 하도록 동기를 부여합니다. 내 프로젝트가 도움이되고 가치있는 경우 지원을 고려하십시오.