Middleware required for development and supported versions
node >= v22.x
git clone git@github.com:Next2D/player.git
cd player
npm install
npm start
npm test
npm run lint
各 class の method は usecase もしくは service で実装しています。但し、service から service をコールするのは禁止しています。method が簡素な場合は、service を直接コールし、複雑な場合や、複数の service を呼び出したい場合は usecase を実装しています。ロジックは usecase もしくは service に責務を置き、 method の役割は、 private や protected など、class 変数への値のセットまでとしています。
The method of each class is implemented by usecase or service. However, calling service from service is prohibited. If the method is simple, call service directly. If the method is complex or you want to call multiple service, implement usecase. The logic places the responsibility on the usecase or service, and the role of the method is limited to setting values in class variables, such as private or protected.
class => method => service
class => method => usecase => service
packages ディレクトリの依存関係で注意する点は以下の通りです。
@next2d/coreは他のpackagesからの参照を禁止しています。@next2d/events,@next2d/cache,@next2d/filters,@next2d/geom,@next2d/texture-packer,@next2d/render-queueは疎結合で設計されている為、他のpackagesのimportを禁止しています。@next2d/rendererはOffscreenCanvasがworkerで処理されるため、@next2d/webgl,@next2d/webgpuのみimportを許可しています。
The dependencies to note in the packages directory are as follows
@next2d/coredoes not allow references from otherpackages.@next2d/events,@next2d/cache,@next2d/filters,@next2d/geom,@next2d/texture-packerand@next2d/render-queueare designed to be loosely coupled, soimportof otherpackagesis prohibited.@next2d/rendererallowsimportonly for@next2d/webgl,@next2d/webgpu, because OffscreenCanvas is processed by the worker.
This project is licensed under the MIT License - see the LICENSE file for details.