npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

anthima

v1.1.1

Published

تطبيق أنظمة الألعاب بلغة جافاسكربت

Downloads

22

Readme

JavaScript (JS)

تطبيق إحترافي لأنظمة الألعاب بلغة جافاسكربت بأسلوب سهل الإستخدام، يمكن تحميل جميل الملفات من مستودع الكود المصدري على GitHub ثم استيراد الكود من الملف JavaScript-main/src/exports.js

المستقيم

نظرة عامة

هذه الأداة مصممة لتسهيل عملية تطوير الألعاب من خلال توفير أدوات ووسائل لحساب وتحريك النقاط على مستقيمات محددة. تهدف الأداة إلى تبسيط العمليات الرياضية المعقدة التي يحتاجها مطورو الألعاب لإنشاء حركات ونقاط دقيقة في ألعابهم.

حالات الاستخدام

التحقق من نقاط داخل المستقيم

يمكن استخدام هذه الأداة للتحقق مما إذا كانت نقطة معينة تقع داخل نطاق مستقيم محدد، مما يساعد على التحكم في حركات الشخصيات أو العناصر في اللعبة.

تحريك النقاط

توفر الأداة دوال لتحريك النقاط على طول المستقيم، سواء كان التحرك للأمام أو للخلف، وتحديد الاتجاه الصحيح للحركة بناءً على خصائص المستقيم.

إنشاء مستقيمات ونقاط

يمكن استخدام الأداة لإنشاء مستقيمات بنقاط محددة بناءً على خيارات مختلفة مثل المسافة، عدد النقاط، والتباعد بين النقاط، مما يساعد في تخطيط مسارات الحركة بدقة.

أمثلة الاستخدام

التحقق من وجود نقطة داخل المستقيم

import { Line } from 'anthima'

const line = Line.create.one({ end: 10 });
const pointInLine = inside(line, 5);
// pointInLine = true

const pointInLine = inside(line, 15);
// pointInLine = false

تحريك النقطة على طول المستقيم

import { Line } from 'anthima'

const line = Line.create.one({ end: 10 });
const newCurrent = ride(line, 3, 2);
// newCurrent = 5

const newCurrent = ride(line, 3, 2, true);
// newCurrent = 1

إنشاء مستقيم مع نقاط محددة

import { Line } from 'anthima'

const line = Line.create.one({ end: -10 });
// line = { neg: true, count: 2, dis: 10, spacing: 10, end: -10, points: [0, -10] }

const line = Line.create.one({ end: -10, count: 3 });
// line = { neg: true, count: 3, dis: 10, spacing: 5, end: -10, points: [0, -5, -10] }

حساب نسبة النقطة على المستقيم

import { Line } from 'anthima'

const line = Line.create.one({ end: 10 });
const t = Line.time.to(line, 5);
// t = 0.5

const t = Line.time.to.clamp(line, 15);
// t = 1

هذه الأداة تقدم لمطوري الألعاب وسيلة قوية ومرنة لإدارة النقاط والحركات في ألعابهم، مما يسهم في تحسين تجربة اللعب ودقة الحركات والعناصر داخل اللعبة.