提交 87bb2404 编写于 作者: M Mr.doob

r120

上级 9d5e8359
此差异已折叠。
此差异已折叠。
此差异已折叠。
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
تقوم AnimationActions بجدولة أداء الرسوم المتحركة المخزنة في [page:AnimationClip AnimationClips].
<br /><br />
ملاحظة: يمكن ربط معظم أساليب AnimationAction.<br /><br />
للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:AnimationMixer mixer], [param:AnimationClip clip], [param:Object3D localRoot] )</h3>
<p>
[page:AnimationMixer mixer] هو *AnimationMixer* الذي يتحكم فيه هذا الإجراء.<br />
[page:AnimationClip clip] هو *AnimationClip* الذي يحتفظ ببيانات الرسوم المتحركة لهذا الإجراء.<br />
[page:Object3D localRoot] هو الكائن الجذر الذي يتم تنفيذ هذا الإجراء عليه.<br /><br />
ملاحظة: بدلاً من استدعاء هذا المُنشئ مباشرةً ، يجب إنشاء AnimationAction برقم [page:AnimationMixer.clipAction] نظرًا لأن هذه الطريقة توفر التخزين المؤقت للحصول على أداء أفضل.
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:Boolean clampWhenFinished]</h3>
<p>
إذا تم ضبط *clampWhenFinished* على true ، فسيتم تلقائيًا إيقاف [page:.paused paused] للرسوم المتحركة مؤقتًا في إطارها الأخير.<br /><br />
إذا تم ضبط *clampWhenFinished* على false ، فسيتم تحويل [page:.enabled enabled] تلقائيًا إلى false عند انتهاء آخر حلقة من الإجراء ، بحيث لا يكون لهذا الإجراء أي تأثير آخر.<br /><br />
القيمة الافتراضية هو خطأ (false).<br /><br />
ملاحظة: *clampWhenFinished* ليس له أي تأثير إذا تم مقاطعة الإجراء (يكون له تأثير فقط إذا انتهت الحلقة الأخيرة بالفعل).
</p>
<h3>[property:Boolean enabled]</h3>
<p>
يؤدي تعيين *enabled* إلى *false* إلى تعطيل هذا الإجراء ، بحيث لا يكون له أي تأثير. الافتراضي هو *true*.<br /><br />
عند إعادة تمكين الإجراء ، يستمر الرسم المتحرك من وقته الحالي [page:.time time] (الإعداد *enabled* إلى *false* لا يعيد تعيين الإجراء).<br /><br />
ملاحظة: لا يؤدي إعداد *enabled* إلى *true* إلى إعادة تشغيل الرسوم المتحركة تلقائيًا. سيؤدي ضبط *enabled* إلى *true* إلى إعادة تشغيل الرسوم المتحركة فورًا فقط إذا تم استيفاء الشرط التالي:
[page:.paused paused] تحتوي قيمة *false* ، لم يتم إلغاء تنشيط هذا الإجراء في هذه الأثناء (بتنفيذ أمر [page:.stop stop] أو [page:.reset reset]) ، وليس [page:.weight weight] أو [page:.timeScale timeScale] يساوي 0.
</p>
<h3>[property:Number loop]</h3>
<p>
وضع التكرار (يمكن تغييره بـ [page:.setLoop setLoop]). الافتراضي هو [page:Animation THREE.LoopRepeat] (مع عدد لا نهائي من [page:.repetitions repetitions])<br /><br />
يجب أن يكون أحد هذه الثوابت:<br /><br />
[page:Animation THREE.LoopOnce] - تشغيل المقطع مرة واحدة ،<br />
[page:Animation THREE.LoopRepeat] - تشغيل المقطع مع العدد المختار من *التكرارات* ،
في كل مرة تقفز من نهاية المقطع مباشرة إلى بدايته ،<br />
[page:Animation THREE.LoopPingPong] - تشغيل المقطع مع العدد المختار من *التكرارات* ، بدلاً من التشغيل للأمام والخلف.
</p>
<h3>[property:Boolean paused]</h3>
<p>
يؤدي تعيين *paused* إلى *true* إلى إيقاف تنفيذ الإجراء مؤقتًا عن طريق تعيين مقياس الوقت الفعال على 0. الافتراضي هو *false*.<br /><br />
</p>
<h3>[property:Number repetitions]</h3>
<p>
عدد التكرارات التي تم إجراؤها [page:AnimationClip] على مدار هذا الإجراء. يمكن تعيينه عبر [page:.setLoop setLoop]. الافتراضي هو *Infinity*.<br /><br />
ضبط هذا الرقم ليس له أي تأثير ، إذا تم ضبط [page:.loop loop mode] على [page:Animation THREE.LoopOnce].
</p>
<h3>[property:Number time]</h3>
<p>
the local time of this action (in seconds, starting with 0).<br /><br />
يتم تثبيت القيمة أو لفها إلى 0 ... مدة المقطع (وفقًا لحالة الحلقة).
يمكن تغير قيمتها بالنسبة إلى وقت لخالط الحركات الرئيسي عن طريق تغيير [page:.timeScale timeScale] (باستخدام [page:.setEffectiveTimeScale setEffectiveTimeScale] أو [page:.setDuration setDuration]).<br />
</p>
<h3>[property:Number timeScale]</h3>
<p>
Sعامل التحجيم للوقت [page:.time time]. تؤدي القيمة 0 إلى توقف الرسوم المتحركة مؤقتًا. تؤدي القيم السالبة إلى تشغيل الرسوم المتحركة بشكل عكسي. الافتراضي هو 1.<br /><br />
الخصائص / الطرق المتعلقة *timeScale* (على التوالي *time*) هم:
[page:.getEffectiveTimeScale getEffectiveTimeScale],
[page:.halt halt],
[page:.paused paused],
[page:.setDuration setDuration],
[page:.setEffectiveTimeScale setEffectiveTimeScale],
[page:.stopWarping stopWarping],
[page:.syncWith syncWith],
[page:.warp warp].
</p>
<h3>[property:Number weight]</h3>
<p>
درجة تأثير هذا الإجراء (في المجال القائم بين [0 ، 1]). يمكن استخدام القيم بين 0 (بدون تأثير) و 1 (تأثير كامل) للمزج بين عدة إجراءات. الافتراضي هو 1. <br /><br />
الخصائص / الطرق المتعلقة *weight* هي:
[page:.crossFadeFrom crossFadeFrom],
[page:.crossFadeTo crossFadeTo],
[page:.enabled enabled],
[page:.fadeIn fadeIn],
[page:.fadeOut fadeOut],
[page:.getEffectiveWeight getEffectiveWeight],
[page:.setEffectiveWeight setEffectiveWeight],
[page:.stopFading stopFading].
</p>
<h3>[property:Boolean zeroSlopeAtEnd]</h3>
<p>
يتيح تشغيل السلس بدون مقاطع منفصلة للبداية والحلقة والنهاية. الافتراضي هو *true*.
</p>
<h3>[property:Boolean zeroSlopeAtStart]</h3>
<p>
يتيح تشغيل السلس بدون مقاطع منفصلة للبداية والحلقة والنهاية. الافتراضي هو *true*.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:AnimationAction crossFadeFrom]( [param:AnimationAction fadeOutAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )</h3>
<p>
يؤدي هذا الإجراء إلى تلاشي [page:.fadeIn fade in] ، مما يؤدي إلى تلاشي إجراء آخر في نفس الوقت ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة.<br /><br />
إذا كانت warpBoolean تحمل قيمة true ، فسيتم تطبيق [page:.warp warping] إضافيًا (تغييرات تدريجية في المقاييس الزمنية).<br /><br />
ملاحظة: كما هو الحال مع *fadeIn*/*fadeOut* ، يبدأ / ينتهي التلاشي بوزن 1.
</p>
<h3>[method:AnimationAction crossFadeTo]( [param:AnimationAction fadeInAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )</h3>
<p>
يؤدي هذا الإجراء إلى تلاشي [page:.fadeOut fade out] ، يتلاشى في إجراء آخر في وقت واحد ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.<br /><br />
إذا كانت warpBoolean صحيحة ، فسيتم تطبيق [page:.warp warping] إضافيًا (تغييرات تدريجية في المقاييس الزمنية).<br /><br />
ملاحظة: كما هو الحال مع *fadeIn*/*fadeOut* ، يبدأ / ينتهي التلاشي بوزن 1.
</p>
<h3>[method:AnimationAction fadeIn]( [param:Number durationInSeconds] )</h3>
<p>
يزيد [page:.weight weight] هذا الإجراء تدريجياً من 0 إلى 1 ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
</p>
<h3>[method:AnimationAction fadeOut]( [param:Number durationInSeconds] )</h3>
<p>
يقلل [page:.weight weight] هذا الإجراء تدريجيًا من 1 إلى 0 ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
</p>
<h3>[method:Number getEffectiveTimeScale]()</h3>
<p>
تُرجع مقياس الوقت الفعال (مع الأخذ في الاعتبار حالات التواء و قيمة [page:.paused paused] الحالية).
</p>
<h3>[method:number getEffectiveWeight]()</h3>
<p>
تُرجع الوزن الفعال (مع الأخذ في الاعتبار حالات التلاشي الحالية و [page:.enabled enabled]).
</p>
<h3>[method:AnimationClip getClip]()</h3>
<p>
تُرجع المقطع الذي يحتوي على بيانات الرسوم المتحركة لهذا الإجراء.
</p>
<h3>[method:AnimationMixer getMixer]()</h3>
<p>
تُرجع الخالط المسؤول عن تشغيل هذا الإجراء.
</p>
<h3>[method:Object3D getRoot]()</h3>
<p>
تُرجع الكائن الجذر الذي تم تنفيذ هذا الإجراء عليه.
</p>
<h3>[method:AnimationAction halt]( [param:Number durationInSeconds] )</h3>
<p>
تعمل على إبطاء سرعة هذه الرسوم المتحركة إلى 0 من خلال إنقاص [page:.timeScale timeScale] تدريجيًا (بدءًا من قيمتها الحالية) ، خلال الفترة الزمنية المنقضية. يمكن تقييد هذه الطريقة ضمن سلسلة.
</p>
<h3>[method:Boolean isRunning]()</h3>
<p>
تُرجع true إذا كان الإجراء [page:.time time] قيد التشغيل حاليًا.<br /><br />
بالإضافة إلى تفعيله في الخالط (انظر [page:.isScheduled isScheduled]) ، يجب استيفاء الشروط التالية:
<br/>
[page:.paused paused] يساوي false ،<br/> [page:.enabled enabled] يساوي true ،
<br/>
[page:.timeScale timeScale] يختلف عن 0 ، ولا توجد جدولة لبدء متأخر ([page:.startAt startAt]).<br /><br />
ملاحظة: لا يعني كون *isRunning* تحمل قيمة *true* أنه يمكن رؤية الرسوم المتحركة بالفعل. هذا هو الحال فقط ، إذا تم تعيين [page:.weight weight] بشكل إضافي على قيمة غير صفرية.
</p>
<h3>[method:Boolean isScheduled]()</h3>
<p>
تُرجع قيمة *true* ، إذا تم تنشيط هذا الإجراء في الخالط.<br /><br />
ملاحظة: هذا لا يعني بالضرورة أن الرسوم المتحركة تعمل بالفعل (قارن الشروط الإضافية لـ [page:.isRunning isRunning]).
</p>
<h3>[method:AnimationAction play]()</h3>
<p>
يعلم الخالط بضرورة البدء في تنشيط الحدث (action). يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
ملاحظة: لا يعني تنشيط هذا الإجراء بالضرورة أن الرسوم المتحركة تبدأ على الفور: إذا كان الإجراء قد انتهى بالفعل من قبل (من خلال الوصول إلى نهاية الحلقة الأخيرة) ، أو إذا تم تعيين وقت لبدء متأخر (عبر [page:.startAt startAt]) ،
يجب تنفيذ [page:.reset reset] أولاً. يمكن لبعض الإعدادات الأخرى ([page:.paused paused]=true, [page:.enabled enabled]=false,
[page:.weight weight]=0, [page:.timeScale timeScale]=0) منع تشغيل الرسوم المتحركة أيضًا.
</p>
<h3>[method:AnimationAction reset]()</h3>
<p>
يتم إعادة الحدث إلى وضع البداية. يمكن تقييد هذه الطريقة ضمن سلسلة.<br /><br />
تقوم هذه الطريقة بتعيين [page:.paused paused] إلى false ، و [page:.enabled enabled] إلى true ، ومن [page:.time time] إلى 0 ، وتقطع أي تزييف مجدول ، وتزيل عدد الحلقات الداخلية وجدولة البدء المتأخر.<br /><br />
ملاحظة: يتم استدعاء. *reset* دائمًا بواسطة [page:.stop stop] ، ولكن *reset* لا يتصل بـ *stop* نفسه.
هذا يعني: إذا كنت تريد كلاهما ، reset وstop ، لا تتصل بـ *reset* بل إتصل بـ *stop* بدلا من ذلك.
</p>
<h3>[method:AnimationAction setDuration]( [param:Number durationInSeconds] )</h3>
<p>
يضبط المدة لحلقة واحدة من هذا الإجراء (بضبط [page:.timeScale timeScale] وإيقاف أي إلتفاف مجدول). يمكن تقييد هذه الطريقة ضمن سلسلة.
</p>
<h3>[method:AnimationAction setEffectiveTimeScale]( [param:Number timeScale] )</h3>
<p>
يضبط [page:.timeScale timeScale] ويوقف أي إلتفاف مجدول. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
إذا كانت القيمة [page:.paused paused] تحمل false ، فسيتم أيضًا تعيين المقياس الزمني الفعال (خاصية داخلية) على هذه القيمة ؛
وإلا فسيتم تعيين النطاق الزمني الفعال (الذي يؤثر بشكل مباشر على الرسم المتحرك في هذه اللحظة) على 0.<br /><br />
ملاحظة: *paused* لن يتم تحويله إلى *true* تلقائيًا ، إذا تم ضبط *timeScale* على 0 بهذه الطريقة.
</p>
<h3>[method:AnimationAction setEffectiveWeight]( [param:Number weight] )</h3>
<p>
تضبط [page:.weight weight] وتوقف أي تضاؤل مجدول. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
إذا كانت قيمة [page:.enabled enabled] هي true ، فسيتم أيضًا تعيين الوزن الفعال (خاصية داخلية) على هذه القيمة ؛
وإلا فسيتم تعيين الوزن الفعال (الذي يؤثر بشكل مباشر على الرسم المتحرك في هذه اللحظة) على 0.<br /><br />
ملاحظة: لن يتم تحويل *enabled* إلى false تلقائيًا ، إذا تم ضبط *weight* على 0 بهذه الطريقة.
</p>
<h3>[method:AnimationAction setLoop]( [param:Number loopMode], [param:Number repetitions] )</h3>
<p>
يعين [page:.loop loop mode] وعدد [page:.repetitions repetitions]. يمكن تقييد هذه الطريقة ضمن سلسلة
</p>
<h3>[method:AnimationAction startAt]( [param:Number startTimeInSeconds] )</h3>
<p>
يحدد وقت البداية المتأخرة (عادةً ما يتم تمريره كـ [page:AnimationMixer.time] + deltaTimeInSeconds). يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
ملاحظة: ستبدأ الرسوم المتحركة فقط في الوقت المحدد ، إذا تم ربط *startAt* بـ [page:.play play] ،
أو إذا تم بالفعل تنشيط الإجراء في الخالط (عن طريق استدعاء سابق لـ. *play* ، دون إيقافه أو إعادة تعيينه في هذه الأثناء).
</p>
<h3>[method:AnimationAction stop]()</h3>
<p>
يخبر الخالط بإلغاء تنشيط هذا الإجراء. يمكن تقييد هذه الطريقة ضمن سلسلة. <br /><br />
سيتم إيقاف الإجراء على الفور وإعادة تعيين [page:.reset reset] بالكامل.<br /><br />
ملاحظة: يمكنك إيقاف جميع الإجراءات النشطة على نفس الخالط دفعة واحدة عبر [page:AnimationMixer.stopAllAction mixer.stopAllAction].
</p>
<h3>[method:AnimationAction stopFading]()</h3>
<p>
يوقف أي [page:.fadeIn fading] مجدولًا يتم تطبيقه على هذا الحدث. يمكن تقييد هذه الطريقة ضمن سلسلة.
</p>
<h3>[method:AnimationAction stopWarping]()</h3>
<p>
يوقف أي [page:.warp warping] مجدولًا يتم تطبيقه على هذا الحدث. يمكن تقييد هذه الوظيفة ضمن سلسلة.
</p>
<h3>[method:AnimationAction syncWith]( [param:AnimationAction otherAction] )</h3>
<p>
يزامن هذا الإجراء مع الإجراء الآخر الذي تم تمريره. يمكن تقييد هذه الوظيفة ضمن سلسلة. <br /><br />
تتم المزامنة عن طريق تعيين قيم [page:.time time] و [page:.timeScale timeScale] لهذا الإجراء على القيم المقابلة للإجراء الآخر (إيقاف أي التواء مجدول).<br /><br />
ملاحظة: لن يتم الكشف عن التغييرات المستقبلية في *time* و *timeScale* للإجراء الآخر.
</p>
<h3>[method:AnimationAction warp]( [param:Number startTimeScale], [param:Number endTimeScale], [param:Number durationInSeconds] )</h3>
<p>
يغير سرعة التشغيل ، خلال الفترة الزمنية المنقضية ، عن طريق تعديل [page:.timeScale timeScale] تدريجيًا من *startTimeScale* إلى *endTimeScale*.يمكن تقييد هذه الوظيفة ضمن سلسلة.
</p>
<h2>الأحداث (Events)</h2>
<p class="desc">
هناك حدثان يشيران عند انتهاء حلقة واحدة من الإجراء على التوالي. يمكنك الرد عليهم من خلال:
</p>
<code>
mixer.addEventListener( 'loop', function( e ) { …} ); // properties of e: type, action and loopDelta
mixer.addEventListener( 'finished', function( e ) { …} ); // properties of e: type, action and direction
</code>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
AnimationClip عبارة عن مجموعة قابلة لإعادة الاستخدام من مسارات الإطارات الرئيسية التي تمثل رسمًا متحركًا.<br /><br />
للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Number duration], [param:Array tracks] )</h3>
<p>
[page:String name] - اسم لهذا المقطع.<br />
[page:Number duration] - مدة هذا المقطع (بالثواني). إذا تم تمرير قيمة سالبة ، فسيتم حساب المدة من *tracks* التي تم تمريرها.<br />
[page:Array tracks] - مجموعة (جدول) من [page:KeyframeTrack KeyframeTracks].<br /><br />
ملاحظة: بدلاً من إنشاء AnimationClip مباشرةً مع المُنشئ ، يمكنك استخدام إحدى طرقه الثابتة لإنشاء AnimationClips: من JSON ([page:.parse parse]) ، من تسلسلات الهدف التحويلية ([page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence] ،
[page:.CreateClipsFromMorphTargetSequences CreateClipsFromMorphTargetSequences]) أو من التسلسلات الهرمية للرسوم المتحركة ([page:.parseAnimation parseAnimation]) - إذا كان النموذج الخاص بك لا يحتوي بالفعل على AnimationClips في مجموعة الرسوم المتحركة الخاصة بهندسة.
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:Number duration]</h3>
<p>
مدة هذا المقطع (بالثواني). يمكن حساب ذلك من مجموعة [page:.tracks tracks] عبر [page:.resetDuration resetDuration].
</p>
<h3>[property:String name]</h3>
<p>
اسم لهذا المقطع. يمكن البحث عن مقطع معين طريق بإستعمال [page:.findByName findByName].
</p>
<h3>[property:Array tracks]</h3>
<p>
جدول يحتوي على [page:KeyframeTrack] لكل خاصية يتم تحريكها بواسطة هذا المقطع.
</p>
<h3>[property:String uuid]</h3>
<p>
[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] لهذا المقطع. يتم تعيينه تلقائيًا ولا يجب تحريره.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:AnimationClip clone]()</h3>
<p>
إرجاع نسخة من هذا المقطع.
</p>
<h3>[method:this optimize]()</h3>
<p>
يحسن من أداء كل مسار عن طريق إزالة المفاتيح المتسلسلة المتكررة (الشائعة في تسلسلات هدف التحويل - morph target sequences).
</p>
<h3>[method:this resetDuration]()</h3>
<p>
يضبط [page:.duration duration] للمقطع على أطول مدة [page:KeyframeTrack] ممكنة.
</p>
<h3>[method:this trim]()</h3>
<p>
اقتطاع كل المسارات حسب مدة المقطع.
</p>
<h3>[method:Boolean validate]()</h3>
<p>
يقوم بتأدية الحد الأدنى من التحقق من الصحة على كل مسار في المقطع. إرجاع *true* إذا كانت جميع المسارات صالحة.
</p>
<h2>الوظائف الساكنة (Static Methods)</h2>
<h3>[method:Array CreateClipsFromMorphTargetSequences]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
<p>
تُرجع مصفوفة من AnimationClips الجديدة التي تم إنشاؤها من [page:Geometry.morphTargets morph target sequences] من الشكل الهندسي ، في محاولة لفرز أسماء الأهداف التحويلية إلى أنماط قائمة على مجموعة الرسوم المتحركة مثل "Walk_001 ، Walk_002 ، Run_001 ، Run_002 ...".
</p>
<h3>[method:AnimationClip CreateFromMorphTargetSequence]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )</h3>
<p>
يُرجع مقطع رسوم متحركة جديدًا من [page:Geometry.morphTargets morph targets array] تم تمريره لشكل هندسي ، مع أخذ اسم وعدد الإطارات في الثانية.<br /><br />
ملاحظة: قيمة fps مطلوبة و ضرورية ، ولكن يمكن إعادة ضبظ سرعة الرسوم المتحركة في *AnimationAction* عبر [page:AnimationAction.setDuration animationAction.setDuration].
</p>
<h3>[method:AnimationClip findByName]( [param:Object objectOrClipArray], [param:String name] )</h3>
<p>
يبحث عن AnimationClip بالاسم ، مع الأخذ كقيمة إما مصفوفة من AnimationClips ، أو شبكة أو شكل هندسي يحتوي على جدول مسمى "animations".
</p>
<h3>[method:AnimationClip parse]( [param:Object json] )</h3>
<p>
يترجم تمثيل JSON لمقطع ويعيد AnimationClip.
</p>
<h3>[method:AnimationClip parseAnimation]( [param:Object animation], [param:Array bones] )</h3>
<p>
يوزع تنسيق animation.hierarchy ويعيد AnimationClip.
</p>
<h3>[method:Object toJSON]( [param:AnimationClip clip] )</h3>
<p>
يأخذ AnimationClip ويعيد كائن JSON.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
AnimationMixer هو مشغل للرسوم المتحركة على كائن معين في المشهد. عندما يتم تحريك كائنات متعددة في المشهد بشكل مستقل ، يمكن استخدام AnimationMixer واحد لكل كائن.<br /><br />
للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:Object3D rootObject] )</h3>
<p>
[page:Object3D rootObject] - الكائن الذي سيتم تشغيل رسومه المتحركة بواسطة هذا الخالط.<br />
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:Number time]</h3>
<p>
وقت الخالط الكامل (بالثواني ؛ بدءًا من 0 عند إنشاء الخالط).
</p>
<h3>[property:Number timeScale]</h3>
<p>
عامل تحجيم لـ [page:.time mixer time].<br /><br />
ملاحظة: يأدي ضبط مقياس وقت الخلاط على 0 والعودة لاحقًا إلى 1 إلى إمكانية إيقاف / إلغاء إيقاف مؤقت لجميع الإجراءات التي يتحكم فيها هذا الخالط.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
<p>
إرجاع [page:AnimationAction] للمقطع الذي تم تمريره ، اختيارياً باستخدام كائن جذر مختلف عن الجذر الافتراضي لجهاز المزج. يمكن أن تكون القيمة الأولى إما كائن [page:AnimationClip] أو اسم AnimationClip.<br /><br />
إذا لم يكن هناك إجراء يلائم المقطع ومعلمات الجذر ، فسيتم إنشاؤه بهذه الطريقة. استدعاء هذه الطريقة عدة مرات مع نفس المقطع ومعلمات الجذر يؤدي دائمًا إلى إرجاع نفس مثيل المقطع.
</p>
<h3>[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
<p>
إرجاع [page:AnimationAction] موجود للمقطع الذي تم تمريره ، اختيارياً باستخدام كائن جذر مختلف عن الجذر الافتراضي لجهاز الخالط.<br /><br />
يمكن أن تكون القيمة الأولى إما كائن [page:AnimationClip] أو اسم AnimationClip.
</p>
<h3>[method:Object3D getRoot]()</h3>
<p>
إرجاع جذركائن الخالط.
</p>
<h3>[method:AnimationMixer stopAllAction]()</h3>
<p>
يقوم بإلغاء تنشيط كافة الإجراءات المجدولة مسبقًا على هذا الخالط.
</p>
<h3>[method:AnimationMixer update]([param:Number deltaTimeInSeconds]) </h3>
<p>
يعمل على تقدم وقت الخالط العالمي وتحديث الرسوم المتحركة.<br /><br />
يتم ذلك عادةً في حلقة العرض ، حيث يتم تمرير [page:Clock.getDelta clock.getDelta] مقياسًا بواسطة جهاز الخلاط [page:.timeScale timeScale]).
</p>
<h3>[method:AnimationMixer setTime]([param:Number timeInSeconds]) </h3>
<p>
يضبط الخالط العام على وقت محدد ويقوم بتحديث الرسوم المتحركة وفقًا لذلك.<br /><br />
يكون هذا مفيدًا عندما تحتاج إلى الانتقال إلى وقت محدد في رسم متحرك. سيتم قياس القيمة المدخلة حسب مقياس الوقت لجهاز الخالط [page:.timeScale timeScale].
</p>
<h3>[method:null uncacheClip]([param:AnimationClip clip])</h3>
<p>
إلغاء تخصيص كل موارد الذاكرة لمقطع.
</p>
<h3>[method:null uncacheRoot]([param:Object3D root]) </h3>
<p>
إلغاء تخصيص كافة موارد الذاكرة لكائن جذر.
</p>
<h3>[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])</h3>
<p>
إلغاء تخصيص كل موارد الذاكرة لإجراء ما.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">مجموعة من الكائنات التي تتلقى حالة حركة مشتركة.<br /><br />
للحصول على نظرة عامة حول العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
</p>
<h2>الإستعمال:</h2>
<p class="desc">
تظيف كائنات يمكن تمريرها عبر المنشئ كـ'جذر' أو عبر وظيفة [page:AnimationMixer.clipAction clipAction] الخاصة بـ [page:AnimationMixer AnimationMixer] أو بدلا من دلك عبر تمرير هدا الكائن الأخير كـ'جذر'.<br /><br />
لاحظ أن كائنات هذه الفئة تظهر ككائن واحد للخالط ، لذا يجب التحكم في ذاكرة التخزين المؤقت للكائنات الفردية على المجموعة.
</p>
<h2>التقييدات (Limitations)</h2>
<p class="desc">
يجب أن تكون الخصائص المتحركة متوافقة مع جميع الكائنات في المجموعة.<br /><br />
يمكن التحكم في خاصية واحدة إما من خلال مجموعة مستهدفة أو بشكل مباشر ، ولكن ليس كلاهما.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
<p>
[page:object obj] - عدد عشوائي من الشبكات التي تشترك في نفس حالة الحركة.
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:object stats]</h3>
<p>
كائن يحتوي على بعض المعلومات حول *AnimationObjectGroup* (العدد الإجمالي ، العدد المستخدم ، عدد الروابط لكل كائن)
</p>
<h3>[property:String uuid]</h3>
<p>
[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] الخاص بهذا *AnimationObjectGroup*. يتم تعيينه تلقائيًا ولا يجب تحريره.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:null add]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
<p>
يضيف عددًا عشوائيًا من الكائنات إلى *AnimationObjectGroup*.
</p>
<h3>[method:null remove]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
<p>
يزيل عددًا عشوائيًا من الكائنات من *AnimationObjectGroup*.
</p>
<h3>[method:null uncache]( [param:object obj1], [param:object obj2], [param:object obj3], ... )</h3>
<p>
إلغاء تخصيص كافة موارد الذاكرة للكائنات التي تم تمريرها من *AnimationObjectGroup*.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
كائن مع وظائف مختلفة للمساعدة في الرسوم المتحركة ، ويستخدم داخليًا.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:Array arraySlice]( array, from, to )</h3>
<p>
نفسه عمل Array.prototype.slice ، ولكنه يعمل أيضًا على المصفوفات المكتوبة.
</p>
<h3>[method:Array convertArray]( array, type, forceClone )</h3>
<p>
يحول مصفوفة إلى نوع معين.
</p>
<h3>[method:Array flattenJSON]( jsonKeys, times, values, valuePropertyName )</h3>
<p>
تستخدم لتحليل تنسيقات AOS keyframe.
</p>
<h3>[method:Array getKeyframeOrder]( times )</h3>
<p>
تُرجع مصفوفة يمكن من خلالها فرز الأوقات والقيم.
</p>
<h3>[method:Boolean isTypedArray]( object )</h3>
<p>
ترجاع *true* إذا كان الكائن مصفوفة مكتوبة (typed array.).
</p>
<h3>[method:Array sortedArray]( values, stride, order )</h3>
<p>
يفرز المصفوفة التي تم إرجاعها مسبقًا بناءا [page:AnimationUtils.getKeyframeOrder getKeyframeOrder].
</p>
<h3>[method:AnimationClip subclip]( [param:AnimationClip clip], [param:String name], [param:Number startFrame], [param:Number endFrame], [param:Number fps] )</h3>
<p>
ينشئ مقطعًا جديدًا ، يحتوي فقط على جزء من المقطع الأصلي بين الإطارات المحددة.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
إن [link:https://en.wikipedia.org/wiki/Key_frame keyframes] عبارة عن سلسلة زمنية من الإطارات الرئيسية ، والتي تتكون من قوائم بالأوقات والقيم ذات الصلة ، والتي تُستخدم لتحريك خاصية معينة لكائن.
</p>
<p>
للحصول على نظرة عامة على العناصر المختلفة لنظام الرسوم المتحركة three.js ، راجع ملف
مقالة "نظام الحركات" في قسم "الخطوات التالية" من الدليل.
</p>
<p>
على النقيض من التسلسل الهرمي للرسوم المتحركة لتنسيق نموذج [link:https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3 JSON model format] ، فإن *KeyframeTrack* لا يخزن إطارات المفاتيح الفردية الخاصة به ككائنات في مصفوفة "keys" (مع الاحتفاظ بالأوقات والقيم لكل إطار معًا في مكان واحد).
</p>
<p>
بدلاً من ذلك ، هناك دائمًا صفيفتان في *KeyframeTrack*: تقوم المصفوفة [page:.times times] بتخزين قيم الوقت لجميع الإطارات الرئيسية لهذا المسار بترتيب تسلسلي ، وتحتوي المصفوفة [page:.values values] على القيم المتغيرة المقابلة للخاصية المتحركة.
</p>
<p>
لا يمكن أن تكون القيمة المفردة ، التي تنتمي إلى نقطة زمنية معينة ، رقمًا بسيطًا فحسب ، بل يمكن (على سبيل المثال) أن تكون *vector* (إذا كان الموضع متحركًا) أو رباعي (إذا كان الدوران متحركًا). لهذا السبب ، قد تكون مصفوفة القيم (وهي مصفوفة مسطحة أيضًا) ثلاثة أو أربعة أضعاف طول مصفوفة الأوقات.
</p>
<p>
بالمقابلة مع الأنواع المختلفة الممكنة للقيم المتحركة ، توجد عدة فئات فرعية من *KeyframeTrack* ، ترث معظم الخصائص والطرق:
</p>
<ul>
<li>[page:BooleanKeyframeTrack]</li>
<li>[page:ColorKeyframeTrack]</li>
<li>[page:NumberKeyframeTrack]</li>
<li>[page:QuaternionKeyframeTrack]</li>
<li>[page:StringKeyframeTrack]</li>
<li>[page:VectorKeyframeTrack]</li>
</ul>
<p>
يمكن العثور على بعض الأمثلة حول كيفية إنشاء [page:AnimationClip AnimationClips] يدويًا بأنواع مختلفة من KeyframeTracks في ملف [link:https://threejs.org/examples/jsm/animation/AnimationClipCreator.js AnimationClipCreator].
</p>
<p>
نظرًا لأن القيم الصريحة محددة فقط لنقاط الوقت المنفصلة المخزنة في مصفوفة الأوقات ، يجب استيفاء جميع القيم الموجودة بينهما.
</p>
<p>
يعد اسم المسار مهمًا لربط هذا المسار بخاصية معينة للعقدة المتحركة (تم إجراؤه بواسطة [page:PropertyBinding]).
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values], [param:Constant interpolation] )</h3>
<p>
[page:String name] - معرّف *KeyframeTrack*.<br />
[page:Array times] - مصفوفة من مرات الإطار الرئيسي ، يتم تحويلها داخليًا إلى ملف
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array].<br />
[page:Array values] - مصفوفة بالقيم المتعلقة بمصفوفة الأوقات ، يتم تحويلها داخليًا إلى
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array].<br />
[page:Constant interpolation] - نوع الاستيفاء المطلوب استخدامه. أنظر
[page:Animation Animation Constants] للقيم الممكنة. القيمة الافتراضية هي [page:Animation InterpolateLinear].
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:String name]</h3>
<p>
يمكن أن يشير اسم المسار إلى [page:Geometry.morphTargets morph targets] أو [page:SkinnedMesh bones] أو ربما إلى قيم أخرى داخل كائن متحرك. راجع [page:PropertyBinding.parseTrackName] للتعرف على أشكال السلاسل التي يمكن تحليلها لربط الخاصية:
</p>
<p>
يمكن أن يحدد الاسم العقدة إما باستخدام اسمها أو uuid الخاص بها (على الرغم من أنها تحتاج إلى أن تكون في الشجرة الفرعية لعقدة الرسم البياني للمشهد التي تم تمريرها إلى جهاز المزج). أو ، إذا كان اسم المسار يبدأ بنقطة ، فإن المسار ينطبق على عقدة الجذر التي تم تمريرها إلى الخالط.
</p>
<p>
عادة ، بعد العقدة ، سيتم تحديد خاصية مباشرة. ولكن يمكنك أيضًا تحديد خاصية فرعية ، مثل. rotation[x] ، إذا كنت تريد فقط قيادة المكون X للدوران عبر مسار عائم.
</p>
<p>
يمكنك أيضًا تحديد العظام أو المواد المتعددة باستخدام اسم كائن ، على سبيل المثال: .bones[R_hand].scale; القناة الحمراء للون المنتشر للمادة الرابعة في مصفوفة المواد - كمثال آخر - يمكن الوصول إليها من خلال .bones[R_hand].scale;.
</p>
<p>
ستعمل خاصية PropertyBinding أيضًا على حل أسماء أهداف التحويل ، على سبيل المثال: .morphTargetInfluences[run].
</p>
<p>
ملاحظة: ليس بالضرورة أن يكون اسم المسار فريدًا. يمكن أن تقود مسارات متعددة نفس الممتلكات. يجب أن تستند النتيجة إلى مزيج مرجح بين المسارات المتعددة وفقًا لأوزان الإجراءات الخاصة بكل منها.
</p>
<h3>[property:Float32Array times]</h3>
<p>
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array] تم تحويله من مصفوفة الأوقات التي تم تمريرها في المنشئ.
</p>
<h3>[property:Float32Array values]</h3>
<p>
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array] تم تمحوله من صفيف القيم الذي تم تمريره في المنشئ.
</p>
<h3>[property:Constant DefaultInterpolation]</h3>
<p>
نوع الاستيفاء (interpolation) الافتراضي: [page:Animation InterpolateLinear].
</p>
<h3>[property:Constant TimeBufferType ]</h3>
<p>
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array],
نوع المخزن المؤقت المستخدم داخليا للأوقات.
</p>
<h3>[property:Constant ValueBufferType ]</h3>
<p>
[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array],
نوع المخزن المؤقت المستخدم داخليًا للقيم.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:KeyframeTrack clone]()</h3>
<p>
ترجع نسخة من هذا المسار.
</p>
<h3>[method:null createInterpolant]()</h3>
<p>
ينشئ [page:LinearInterpolant LinearInterpolant] أو [page:CubicInterpolant CubicInterpolant] أو [page:DiscreteInterpolant DiscreteInterpolant] ، اعتمادًا على قيمة معلمة الاستيفاء التي تم تمريرها في الباني.
</p>
<h3>[method:null getInterpolation]()</h3>
<p>
إرجاع نوع الاستيفاء (interpolation).
</p>
<h3>[method:Number getValueSize]()</h3>
<p>
ترجع حجم كل قيمة (طول صفيف القيم [page:.values values] مقسومًا على طول صفيف الأوقات [page:.times times]).
</p>
<h3>[method:DiscreteInterpolant InterpolantFactoryMethodDiscrete]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )</h3>
<p>
ينشئ [page:DiscreteInterpolant DiscreteInterpolant] جديدًا من [page:KeyframeTrack.times times] و [page:KeyframeTrack.times values]. يمكن تمرير Float32Array الذي سيحصل على النتائج. وإلا فسيتم إنشاء مصفوفة جديدة بالحجم المناسب تلقائيًا.
</p>
<h3>[method:null InterpolantFactoryMethodLinear]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )</h3>
<p>
ينشئ [page:LinearInterpolant LinearInterpolant] جديدًا من page:KeyframeTrack.times times] و [page:KeyframeTrack.times values]. يمكن تمرير Float32Array الذي سيتلقى النتائج. وإلا فسيتم إنشاء مصفوفة جديدة بالحجم المناسب تلقائيًا.
</p>
<h3>[method:null InterpolantFactoryMethodSmooth]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )</h3>
<p>
قم بإنشاء [page:CubicInterpolant CubicInterpolant] جديد من [page:KeyframeTrack.times times] و [page:KeyframeTrack.times values]. يمكن تمرير Float32Array الذي سيحصل على النتائج. وإلا فسيتم إنشاء مصفوفة جديدة بالحجم المناسب تلقائيًا.
</p>
<h3>[method:this optimize]()</h3>
<p>
يزيل المفاتيح المتسلسلة المكافئة الشائعة في تسلسلات الهدف التحويلية.
</p>
<h3>[method:this scale]()</h3>
<p>
يغير قياس جميع مرات الإطار الرئيسي بعامل.<br /><br />
ملاحظة: هذا مفيد ، على سبيل المثال ، للتحويلات إلى معدل معين من الإطارات في الثانية (كما يتم داخليًا بواسطة [page:AnimationClip.CreateFromMorphTargetSequence animationClip.CreateFromMorphTargetSequence]).
</p>
<h3>[method:this setInterpolation]( [param:Constant interpolationType] )</h3>
<p>
يحدد نوع الاستيفاء. انظر [page:Animation Animation Constants] للاختيارات.
</p>
<h3>[method:this shift]( [param:Number timeOffsetInSeconds] )</h3>
<p>
ينقل جميع الإطارات الرئيسية إما للأمام أو للخلف في الوقت المناسب.
</p>
<h3>[method:this trim]( [param:Number startTimeInSeconds], [param:Number endTimeInSeconds] )</h3>
<p>
يزيل الإطارات الرئيسية قبل *startTime* وبعد *endTime* ، بدون تغيير أي قيم في النطاق [*startTime*, *endTime*].
</p>
<h3>[method:Boolean validate]()</h3>
<p>
يؤدي الحد الأدنى من التحقق من الصحة على المسارات. يرجع *true* إذا كان صحيحا.
</p>
<p>
تقوم هذه الطريقة بتسجيل الأخطاء في وحدة التحكم ، إذا كان المسار فارغًا ، أو إذا كان [page:.valueSize value size] غير صالح ، أو إذا كان عنصر في المصفوفة [page:.times times] أو [page:.values values] ليس رقمًا صالحًا أو إذا كانت العناصر الموجودة في المصفوفة *times* خارج الترتيب.
</p>
<h2>الوظائف الساكنة (Static Methods)</h2>
<h3>[method:KeyframeTrack parse]( [param:JSON json] )</h3>
<p>
يحلل كائن JSON ويعيد مسار إطار رئيسي جديد من النوع الصحيح.
</p>
<h3>[method:JSON toJSON]( [param:KeyframeTrack track] )</h3>
<p>
يحول المسار إلى JSON.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
هذا يشير إلى الممتلكات الموجودة في الرسم البياني للمشهد ؛ تستخدم داخليا.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:Object3D rootNode], path, parsedPath )</h3>
<p>
-- [page:Object3D rootNode]:
-- path
-- parsedPath (optional)
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:Number path]</h3>
<p>
</p>
<h3>[property:Number parsedPath]</h3>
<p>
</p>
<h3>[property:Number node]</h3>
<p>
</p>
<h3>[property:Number rootNode]</h3>
<p>
</p>
<h3>[property:Object BindingType]</h3>
<p>
</p>
<h3>[property:Object Versioning]</h3>
<p>
</p>
<h3>[property:Array GetterByBindingType]</h3>
<p>
</p>
<h3>[property:Array SetterByBindingTypeAndVersioning]</h3>
<p>
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:null getValue]( [param:Array targetArray], [param:Number offset] )</h3>
<p>
</p>
<h3>[method:null setValue]( [param:Array sourceArray], [param:Number offset] )</h3>
<p>
</p>
<h3>[method:null bind]( )</h3>
<p>
إنشاء زوج getter / setter لخاصية في الرسم البياني للمشهد. تستخدم داخليا من قبل
[page:PropertyBinding.getValue getValue] و [page:PropertyBinding.setValue setValue].
</p>
<h3>[method:null unbind]( )</h3>
<p>
تقوم بفك ربط زوج getter / setter لخاصية في الرسم البياني للمشهد.
</p>
<h3>[method:Constructor Composite]( targetGroup, path, optionalParsedPath )</h3>
<p>
قم بإنشاء مركب جديد PropertyBinding.
</p>
<h3>[method:Constructor create]( root, path, parsedPath )</h3>
<p>
تقوم بإنشاء رابط خاصية مركب جديد (إذا كان الجذر هو [page:AnimationObjectGroup) أو PropertyBinding.
</p>
<h3>[method:Constructor parseTrackName]( trackName )</h3>
<p>
يطابق الـ strings في الأشكال التالية:<br />
-- nodeName.property<br />
-- nodeName.property[accessor]<br />
-- nodeName.material.property[accessor]<br />
-- uuid.property[accessor]<br />
-- uuid.objectName[objectIndex].propertyName[propertyIndex]<br />
-- parentName/nodeName.property<br />
-- parentName/parentName/nodeName.property[index]<br />
-- .bone[Armature.DEF_cog].position<br />
-- scene:helium_balloon_model:helium_balloon_model.position
</p>
<h3>[method:Constructor findNode]( root, nodeName )</h3>
<p>
تبحث عن عقدة في شجرة العقدة أو [page:Skeleton Skeleton].
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
خاصية الرسم البياني للمشهد المخزنة التي تسمح بالتراكم الموزون ؛ تستخدم داخليا.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:PropertyBinding binding], [param:String typeName], [param:Number valueSize] )</h3>
<p>
-- binding <br />
-- typeName <br />
-- valueSize <br />
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:PropertyBinding binding]</h3>
<p>
</p>
<h3>[property:TypedArray buffer]</h3>
<p>
حاجز (buffer) بحجم [page:PropertyMixer valueSize] * 4. <br /><br />
هذا لديه التخطيط: [ incoming | accu0 | accu1 | orig ]<br /><br />
يمكن Interpolators استخدام .buffer كـ .result ثم تنتقل البيانات إلى "incoming". <br/>
يتم استخدام 'accu0' و 'accu1' مع ​​الإطارات المتداخلة للنتيجة التراكمية ويتم مقارنتها لاكتشاف التغييرات. يقوم "orig" بتخزين الحالة الأصلية للممتلكات.
</p>
<h3>[property:Number cumulativeWeight]</h3>
<p>
الافتراضي هو *0*.
</p>
<h3>[property:Number valueSize]</h3>
<p>
</p>
<h3>[property:Number referenceCount]</h3>
<p>
الافتراضي هو *0*.
</p>
<h3>[property:Number useCount]</h3>
<p>
الافتراضي هو *0*.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:null accumulate]( [param:Number accuIndex], [param:Number weight] )</h3>
<p>
تجميع البيانات في [page:PropertyMixer.buffer buffer][accuIndex] منطقة 'incoming' في 'accu[i]'.<br />
إذا كان الوزن *0* فهذا لا يفعل شيئًا.
</p>
<h3>[method:null apply]( [param:Number accuIndex] )</h3>
<p>
تطبيق حالة [page:PropertyMixer.buffer buffer] 'accu[i]' على الربط عند اختلاف الاتهام.
</p>
<h3>[method:null saveOriginalState]( )</h3>
<p>
تذكر حالة الملكية المقيدة وتنسخها إلى كلا المتهمين.
</p>
<h3>[method:null restoreOriginalState]( )</h3>
<p>
تقوم بتطبيق الحالة التي تم التقاطها مسبقًا عبر 'saveOriginalState' إلى binding.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيمة الخاصة بـ*boolean keyframe*.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] - (ضرورية) المعرف الخاص بـ*KeyframeTrack*.<br />
[page:Array times] - (ضرورية) جدول يتضمن مجموعة من الـ*keyframe times*.<br />
[page:Array values] - القيم الخاصة بـ *keyframes* في وقت محدد لها.<br />
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:Constant DefaultInterpolation]</h3>
<p>
الـ*interpolation* الإفتراضي للإستعمال، [page:Animation InterpolateDiscrete].
</p>
<h3>[property:Array ValueBufferType]</h3>
<p>
جدول عادي (ليس *Float32Array* في هذه الحالة، ما عدى *ValueBufferType* الخاص بـ [page:KeyframeTrack]).
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'bool'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[method:null InterpolantFactoryMethodLinear ]()</h3>
<p>
قيمة هذه الوضيفة هي 'undefined'، حيث أنه لا يوجد سبب لإستعمالها على الخصائص المتفردة.
</p>
<h3>[method:null InterpolantFactoryMethodSmooth ]()</h3>
<p>
قيمة هذه الوضيفة هي 'undefined'، حيث أنه لا يوجد سبب لإستعمالها على الخصائص المتفردة.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيم التابعة لـ*keyframe* التي تمثل تغيرات لون ما.<br /><br />
التنفيذ الأساسي لهذه الفئة الفرعية فلا يوجد أي شيء خاص حتى الآن. ومع ذلك ، هذا هو المكان المناسب لوضع معلمات مساحة اللون.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] - (ضرورية) المعرف الخاص بـ*KeyframeTrack*.<br />
[page:Array times] - (ضرورية) جدول الأوقات الخاصة بـ*keyframe*.<br />
[page:Array values] - القيم الخاصة بالـ*keyframes* في وقت محدد.<br />
[page:Constant interpolation] - نوع الـ*interpolation* الذي يجب إستعماله. أنظر
[page:Animation Animation Constants] للقيم الممكنة. الإفتراضي هو
[page:Animation InterpolateLinear].
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'color'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيمة الرقمية الخاصة بـ*keyframe* ما.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] - (ضرورية) المعرف الخاص بالـ*KeyframeTrack*.<br />
[page:Array times] - (ضرورية) جدول الأوقات الخاصة بـ*keyframe*.<br />
[page:Array values] - القيم الخاصة بالـ*keyframes* في وقت محدد.<br />
[page:Constant interpolation] - نوع الـ*interpolation* الذي يجب إستعماله. أنظر
[page:Animation Animation Constants] من أجل القيم المتاحة. الإفتراضي هو
[page:Animation InterpolateLinear].
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'number'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيمة الرقمية الخاصة بـإطار رباعي *quaternion keyframe*.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] (ضرورية) المعرف الخاص بالـ*KeyframeTrack*.<br />
[page:Array times] - (ضرورية) جدول الأوقات الخاصة بـ*keyframe*.<br />
[page:Array values] - القيم الخاصة بالـ*keyframes* في وقت محدد.<br />
[page:Constant interpolation] - نوع الـ*interpolation* الذي يجب إستعماله. أنظر
[page:Animation Animation Constants] من أجل القيم المتاحة. الإفتراضي هو
[page:Animation InterpolateLinear].
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:Constant DefaultInterpolation]</h3>
<p>
نوع الـ*interpolation* الافتراضي المراد استخدامه ،
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'quaternion'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[method:null InterpolantFactoryMethodLinear]()</h3>
<p>
إرجاع قيمة من نوع [page:QuaternionLinearInterpolant QuaternionLinearInterpolant] بناءا على
[page:KeyframeTrack.values values], [page:KeyframeTrack.times times] و
[page:KeyframeTrack.valueSize valueSize] التابعين لـ*keyframes*.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيم الخاصة بـ*string keyframe*.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] - (ضرورية) معرّف KeyframeTrack.<br />
[page:Array times] - (ضرورية) جدول الأوقات الخاصة بـ*keyframe*.<br />
[page:Array values] - القيم الخاصة بالـ*keyframes* في وقت محدد.<br />
[page:Constant interpolation] - نوع الـ*interpolation* الذي يجب إستعماله. أنظر
[page:Animation Animation Constants] من أجل القيم المتاحة. الإفتراضي هو
[page:Animation InterpolateDiscrete].
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:Constant DefaultInterpolation]</h3>
<p>
نوع الـ*interpolation* الافتراضي المراد استخدامه ، [page:Animation InterpolateDiscrete].
</p>
<h3>[property:Array ValueBufferType]</h3>
<p>
جدول (مصفوفة) عادي (ليس Float32Array في هذه الحالة، بخلاف *ValueBufferType* من [page:KeyframeTrack]).
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'string'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[method:null InterpolantFactoryMethodLinear]()</h3>
<p>
قيمة هذه الطريقة هنا 'undefined' ، لأنها لا معنى لها بالنسبة للخصائص المنفصلة.
</p>
<h3>[method:null InterpolantFactoryMethodSmooth]()</h3>
<p>
قيمة هذه الطريقة هنا 'undefined' ، لأنها لا معنى لها بالنسبة للخصائص المنفصلة.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:KeyframeTrack] &rarr;
<h1>[name]</h1>
<p class="desc">
تتبع للقيم الخاصة بـ*vector keyframe*.
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:String name], [param:Array times], [param:Array values] )</h3>
<p>
[page:String name] - (ضرورية) معرّف KeyframeTrack.<br />
[page:Array times] - (ضرورية) جدول الأوقات الخاصة بـ*keyframe*.<br />
[page:Array values] - القيم الخاصة بالـ*keyframes* في وقت محدد.<br />
[page:Constant interpolation] - نوع الـ*interpolation* الذي يجب إستعماله. أنظر
[page:Animation Animation Constants] من أجل القيم المتاحة. الإفتراضي هو
[page:Animation InterpolateLinear].
</p>
<h2>الخصائص (Properties)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h3>[property:String ValueTypeName]</h3>
<p>
String 'vector'.
</p>
<h2>الوظائف (Methods)</h2>
<p class="desc">
أنظر [page:KeyframeTrack] من أجل الخصائص الموروثة
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
[page:Object3D] &rarr;
<h1>[name]</h1>
<p class="desc">
يقوم بإنشاء كائن صوتي غير موضعي (عام).<br /><br />
يستخدم هذا [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
</p>
<h2>مثال التعليمة البرمجية</h2>
<code>
// create an AudioListener and add it to the camera
var listener = new THREE.AudioListener();
camera.add( listener );
// create a global audio source
var sound = new THREE.Audio( listener );
// load a sound and set it as the Audio object's buffer
var audioLoader = new THREE.AudioLoader();
audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
sound.setBuffer( buffer );
sound.setLoop( true );
sound.setVolume( 0.5 );
sound.play();
});
</code>
<h2>أمثلة (Examples)</h2>
<p>
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( [param:AudioListener listener] )</h3>
<p>
listener — (ضرورية) كائن [page:AudioListener AudioListener].
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:Boolean autoplay]</h3>
<p>ما إذا كان سيتم بدء التشغيل تلقائيًا. الافتراضي هو *false*.</p>
<h3>[property:AudioContext context]</h3>
<p>الـ[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] من [page:AudioListener listener] المعطاة في المنشئ.</p>
<h3>[property:Number detune]</h3>
<p>تعديل درجة الصوت ، مقاسة بالسنت. +/- 100 نصف نغمة. +/- 1200 هو *octave*. الافتراضي هو *0*.</p>
<h3>[property:Array filters]</h3>
<p>يمثل مجموعة من [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]. يمكن استخدامه لتطبيق مجموعة متنوعة من المرشحات ذات الترتيب المنخفض لإنشاء مؤثرات صوتية أكثر تعقيدًا. يتم ضبط المرشحات عبر [page:Audio.setFilter] أو [page:Audio.setFilters].</p>
<h3>[property:GainNode gain]</h3>
<p>[link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] تم إنشاؤه باستخدام [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().</p>
<h3>[property:Boolean hasPlaybackControl]</h3>
<p>ما إذا كان يمكن التحكم في التشغيل باستخدام طرق [page:Audio.play play]() و [page:Audio.pause pause]() وما إلى ذلك. الافتراضي هو *true*.</p>
<h3>[property:Boolean isPlaying]</h3>
<p>ما إذا كان الصوت قيد التشغيل حاليًا.</p>
<h3>[property:AudioListener listener]</h3>
<p>مرجع إلى كائن المستمع لهذا الصوت.</p>
<h3>[property:Number playbackRate]</h3>
<p>سرعة التشغيل. الافتراضي هو *1*.</p>
<h3>[property:Number offset]</h3>
<p>إزاحة للوقت الذي يجب أن يبدأ فيه التشغيل داخل المخزن المؤقت للصوت. مثل المعلمة *offset* لـ [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). القيمة الافتراضية هي *0*.</p>
<h3>[property:Number duration]</h3>
<p>يتجاوز مدة الصوت. مثل المعلمة *duration* لـ[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). الافتراضي هو *undefined* لتشغيل المخزن المؤقت بالكامل.</p>
<h3>[property:String source]</h3>
<p>[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode AudioBufferSourceNode] تم إنشاؤها باستخدام [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource AudioContext.createBufferSource]().</p>
<h3>[property:String sourceType]</h3>
<p>نوع مصدر الصوت. الافتراضي هو السلسلة 'empty'.</p>
<h3>[property:String type]</h3>
<p>سلسلة تشير إلى النوع ، مضبوطة على 'Audio'.</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:Audio connect]()</h3>
<p>
متصل بـ [page:Audio.source]. يستخدم هذا داخليًا عند التهيئة وعند ضبط / إزالة المرشحات.
</p>
<h3>[method:Audio disconnect]()</h3>
<p>
قطع الاتصال من [page:Audio.source]. يستخدم هذا داخليًا عند تعيين / إزالة المرشحات.
</p>
<h3>[method:BiquadFilterNode getFilter]()</h3>
<p>
إرجاع العنصر الأول من الجدول [page:Audio.filters filters].
</p>
<h3>[method:Array getFilters]()</h3>
<p>
تُرجع جدول (مصفوفة) [page:Audio.filters filters].
</p>
<h3>[method:Boolean getLoop]()</h3>
<p>
تقوم بإرجاع القيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] (ما إذا كان يجب تكرار التشغيل).
</p>
<h3>[method:GainNode getOutput]()</h3>
<p>
ترجع [page:Audio.gain gainNode].
</p>
<h3>[method:Float getPlaybackRate]()</h3>
<p>
ترجع القيمة الخاصة بـ[page:Audio.playbackRate playbackRate].
</p>
<h3>[method:Float getVolume]( value )</h3>
<p>
إعادة الحجم الحالي.
</p>
<h3>[method:Audio play]( delay )</h3>
<p>
إذا كانت [page:Audio.hasPlaybackControl hasPlaybackControl] تحمل قيمة *true* ، يبدأ التشغيل.
</p>
<h3>[method:Audio pause]()</h3>
<p>
إذا كانت [page:Audio.hasPlaybackControl hasPlaybackControl] تحمل قيمة *true* ، يقوم بإقاف التشغيل.
</p>
<h3>[method:null onEnded]()</h3>
<p>
يتم مناداته تلقائيًا عند انتهاء التشغيل.
</p>
<h3>[method:Audio setBuffer]( audioBuffer )</h3>
<p>
تقوم بإعداد [page:Audio.source source] إلى *audioBuffer* ، وتقوم بتعيين [page:Audio.sourceType sourceType] إلى 'buffer'.<br />
إذا كان [page:Audio.autoplay autoplay] ، يبدأ التشغيل أيضًا.
</p>
<h3>[method:Audio setFilter]( filter )</h3>
<p>
يطبق [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNode] واحدًا على الصوت.
</p>
<h3>[method:Audio setFilters]( [param:Array value] )</h3>
<p>
value - جداول (صفائف) المرشحات.<br />
يطبق جدول (مصفوفة) من [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes] على الصوت.
</p>
<h3>[method:Audio setLoop]( [param:Boolean value] )</h3>
<p>
يضبط [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] على *value* (ما إذا كان يجب تكرار التشغيل).
</p>
<h3>[method:Audio setLoopStart]( [param:Float value] )</h3>
<p>
يضبط [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopStart source.loopStart] على *value*.
</p>
<h3>[method:Audio setLoopEnd]( [param:Float value] )</h3>
<p>
يضبط [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loopEnd source.loopEnd] على *value*.
</p>
<h3>[method:Audio setMediaElementSource]( mediaElement )</h3>
<p>
يطبق الكائن المحدد من النوع [link:https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement HTMLMediaElement] كمصدر لهذا الصوت.<br />
يحدد أيضًا [page:Audio.hasPlaybackControl hasPlaybackControl] إلى false.
</p>
<h3>[method:Audio setMediaStreamSource]( mediaStream )</h3>
<p>
يطبق الكائن المحدد من النوع [link:https://developer.mozilla.org/en-US/docs/Web/API/MediaStream MediaStream] كمصدر لهذا الصوت.<br />
يحدد أيضًا [page:Audio.hasPlaybackControl hasPlaybackControl] إلى false.
</p>
<h3>[method:Audio setNodeSource]( audioNode )</h3>
<p>
يقوم بإعداد [page:Audio.source source] إلى audioBuffer ، ويقوم بتعيين [page:Audio.sourceType sourceType] على 'audioNode'.<br />
يضبط أيضًا [page:Audio.hasPlaybackControl hasPlaybackControl] إلى false.
</p>
<h3>[method:Audio setPlaybackRate]( [param:Float value] )</h3>
<p>
إذا تم تمكين [page:Audio.hasPlaybackControl hasPlaybackControl] ، فيتم ضبط [page:Audio.playbackRate playbackRate] على *value*.
</p>
<h3>[method:Audio setVolume]( [param:Float value] )</h3>
<p>
تضبط مستوى الصوت.
</p>
<h3>[method:Audio stop]()</h3>
<p>
إذا تم تمكين [page:Audio.hasPlaybackControl hasPlaybackControl] ، فسيتوقف عن التشغيل.
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
<!DOCTYPE html>
<html lang="ar">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body class="rtl">
<h1>[name]</h1>
<p class="desc">
يقوم بإنشاء كائن AudioAnalyser ، والذي يستخدم [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] لتحليل البيانات الصوتية.<br /><br />
هذا يستخدم [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
</p>
<h2>مثال التعليمة البرمجية</h2>
<code>
// create an AudioListener and add it to the camera
var listener = new THREE.AudioListener();
camera.add( listener );
// create an Audio source
var sound = new THREE.Audio( listener );
// load a sound and set it as the Audio object's buffer
var audioLoader = new THREE.AudioLoader();
audioLoader.load( 'sounds/ambient.ogg', function( buffer ) {
sound.setBuffer( buffer );
sound.setLoop(true);
sound.setVolume(0.5);
sound.play();
});
// create an AudioAnalyser, passing in the sound and desired fftSize
var analyser = new THREE.AudioAnalyser( sound, 32 );
// get the average frequency of the sound
var data = analyser.getAverageFrequency();
</code>
<h2>أمثلة (Examples)</h2>
<p>
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>
<h2>المنشئ (Constructor)</h2>
<h3>[name]( audio, [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize fftSize] )</h3>
<p>
يقوم بإنشاء [page:AudioAnalyser AudioAnalyser] جديد.
</p>
<h2>الخصائص (Properties)</h2>
<h3>[property:AnalyserNode analyser]</h3>
<p>[link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] يستخدم لتحليل الصوت.</p>
<h3>[property:Integer fftSize]</h3>
<p>
قدرة غير صفرية تصل إلى 2048 ، تمثل حجم FFT (Fast Fourier Transform) لاستخدامها لتحديد مجال التردد (frequency domain).
انظر [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize this page] للحصول على التفاصيل.
</p>
<h3>[property:Uint8Array data]</h3>
<p>
*Uint8Array* بالحجم المحدد بواسطة [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount analyser.frequencyBinCount] يستخدم للاحتفاظ ببيانات التحليل.
</p>
<h2>الوظائف (Methods)</h2>
<h3>[method:Uint8Array getFrequencyData]()</h3>
<p>
يستخدم طريقة [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData getByteFrequencyData] الخاصة بـ Web Audio. انظر تلك الصفحة.
</p>
<h3>[method:Number getAverageFrequency]()</h3>
<p>
تقوم بإرجاع متوسط ​​الترددات المعادة بطريقة [page:AudioAnalyser.getFrequencyData getFrequencyData].
</p>
<h2>المصدر (Source)</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
......@@ -30,12 +30,12 @@
scene.add( car );
// Update the render target cube
car.setVisible( false );
car.visible = false;
cubeCamera.position.copy( car.position );
cubeCamera.update( renderer, scene );
// Render the scene
car.setVisible( true );
car.visible = true;
renderer.render( scene, camera );
</code>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<p class="desc">
This buffer attribute class does not construct a VBO. Instead, it uses
whatever VBO is passed in constructor and can later be altered via the
*buffer* property.<br /><br />
It is required to pass additional params alongside the VBO. Those are:
the GL context, the GL data type, the number of components per vertex,
the number of bytes per component, and the number of vertices.<br /><br />
The most common use case for this class is when some kind of GPGPU
calculation interferes or even produces the VBOs in question.
</p>
<h2>Constructor</h2>
<h3>[name]( [param:WebGLBuffer buffer], [param:GLenum type], [param:Integer itemSize], [param:Integer elementSize], [param:Integer count] )</h3>
<p>
*buffer* — Must be a <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a>.
<br />
*type* — One of <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Types</a>.
<br />
*itemSize* — The number of values of the array that should be associated with
a particular vertex. For instance, if this
attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
<br />
*elementSize* — 1, 2 or 4. The corresponding size (in bytes) for the given "type" param.
<ul>
<li>gl.FLOAT: 4</li>
<li>gl.UNSIGNED_SHORT: 2</li>
<li>gl.SHORT: 2</li>
<li>gl.UNSIGNED_INT: 4</li>
<li>gl.INT: 4</li>
<li>gl.BYTE: 1</li>
<li>gl.UNSIGNED_BYTE: 1</li>
</ul>
*count* — The expected number of vertices in VBO.
</p>
<h2>Properties</h2>
<h3>[property:WebGLBuffer buffer]</h3>
<p>
The current <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a> instance.
</p>
<h3>[property:Integer count]</h3>
<p>
The expected number of vertices in VBO.
</p>
<h3>[property:Integer itemSize]</h3>
<p>
How many values make up each item (vertex).
</p>
<h3>[property:Integer elementSize]</h3>
<p>
Stores the corresponding size in bytes for the current *type* property value.
</p>
<p>
See above (constructor) for a list of known type sizes.
</p>
<h3>[property:GLenum type]</h3>
<p>
A <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Type</a>
describing the underlying VBO contents.
</p>
<p>
Set this property together with *elementSize*. The recommended way is
using the *setType* method.
</p>
<h3>[property:Boolean isGLBufferAttribute]</h3>
<p>
Read-only. Always *true*.
</p>
<h2>Methods</h2>
<h3>[method:null setBuffer]( buffer ) </h3>
<p>Sets the *buffer* property.</p>
<h3>[method:null setType]( type, elementSize ) </h3>
<p>Sets the both *type* and *elementSize* properties.</p>
<h3>[method:null setItemSize]( itemSize ) </h3>
<p>Sets the *itemSize* property.</p>
<h3>[method:null setCount]( count ) </h3>
<p>Sets the *count* property.</p>
<h3>[property:Integer version]</h3>
<p>
A version number, incremented every time the needsUpdate property is set to true.
</p>
<h3>[property:Boolean needsUpdate]</h3>
<p>
Default is *false*. Setting this to true increments [page:GLBufferAttribute.version version].
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
......@@ -286,9 +286,9 @@
<h3>[method:Vector3 localToWorld]( [param:Vector3 vector] )</h3>
<p>
vector - A vector representing a position in local (object) space.<br /><br />
vector - A vector representing a position in this object's local space.<br /><br />
Converts the vector from local space to world space.
Converts the vector from this object's local space to world space.
</p>
<h3>[method:null lookAt]( [param:Vector3 vector] )<br />
......@@ -447,9 +447,9 @@
<h3>[method:Vector3 worldToLocal]( [param:Vector3 vector] )</h3>
<p>
vector - A world vector.<br /><br />
vector - A vector representing a position in world space.<br /><br />
Updates the vector from world space to local space.
Converts the vector from world space to this object's local space.
</p>
<h2>Source</h2>
......
......@@ -33,8 +33,6 @@
<h2>Examples</h2>
<p>
[example:webgl_geometries WebGL / geometries]<br/>
[example:webgl_geometry_normals WebGL / geometry / normals]<br/>
[example:webgl_shadowmesh WebGL / shadowmesh]
</p>
......
......@@ -211,7 +211,7 @@
<h3>[property:Boolean premultipliedAlpha]</h3>
<p>
Whether to premultiply the alpha (transparency) value.
See [Example:webgl_materials_physical_transparency WebGL / Materials / Physical / Transparency] for an example of the difference.
See [Example:webgl_materials_physical_transmission WebGL / Materials / Physical / Transmission] for an example of the difference.
Default is *false*.
</p>
......
......@@ -54,9 +54,6 @@
<li>
The loop variable has to be *i*.
</li>
<li>
The loop has to use a certain whitespace formatting.
</li>
</ul>
<code>
#pragma unroll_loop_start
......@@ -346,6 +343,12 @@ this.extensions = {
as a string directly or loaded via AJAX instead.
</p>
<h3>[property:String glslVersion]</h3>
<p>
Defines the GLSL version of custom shader code. Only relevant for WebGL 2 in order to define whether to specify
GLSL 3.0 or not. Valid values are *THREE.GLSL1* or *THREE.GLSL3*. Default is *null*.
</p>
<h3>[property:String index0AttributeName]</h3>
<p>
If set, this calls [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation gl.bindAttribLocation]
......@@ -378,19 +381,11 @@ this.extensions = {
When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
</p>
<h3>[property:WebGLProgram program]</h3>
<p>
The compiled shader program associated with this material, generated by [page:WebGLRenderer].
You should not need to access this property.
</p>
<h3>[property:Boolean flatShading]</h3>
<p>
Define whether the material is rendered with flat shading. Default is false.
</p>
<h3>[property:Boolean skinning]</h3>
<p>
Define whether the material uses skinning; true to pass skinning attributes to the shader. Default is false.
......
......@@ -42,7 +42,7 @@
[page:Number anisotropy] - default is *1*. See [page:Texture.anistropy]<br />
[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
Creates a new [name]
</p>
......
......@@ -41,7 +41,7 @@
[page:Number anisotropy] - default is *1*. See [page:Texture.anisotropy]<br />
[page:Constant encoding] - default is [page:Textures LinearEncoding]. <br />
[page:Boolean depthBuffer] - default is *true*. Set this to false if you don't need it. <br />
[page:Boolean stencilBuffer] - default is *true*. Set this to false if you don't need it.<br /><br />
[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
Creates a new [name]
</p>
......@@ -85,7 +85,7 @@
<h3>[property:boolean stencilBuffer]</h3>
<p>
Renders to the stencil buffer. Default is true.
Renders to the stencil buffer. Default is false.
</p>
<h3>[property:DepthTexture depthTexture]</h3>
......
......@@ -33,7 +33,8 @@
<h3>[property:Object background]</h3>
<p>
If not null, sets the background used when rendering the scene, and is always rendered first. Can be set to a [page:Color] which sets the clear color, a [page:Texture] covering the canvas, or a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget]. Default is null.
If not null, sets the background used when rendering the scene, and is always rendered first.
Can be set to a [page:Color] which sets the clear color, a [page:Texture] covering the canvas, a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget] or an equirectangular as a [page:Texture] . Default is null.
</p>
<h3>[property:Texture environment]</h3>
......@@ -52,11 +53,6 @@
<h2>Methods</h2>
<h3>[method:null dispose]()</h3>
<p>
Clears scene related data internally cached by [page:WebGLRenderer].
</p>
<h3>[method:Object toJSON]( [param:Object meta] )</h3>
<p>
meta -- object containing metadata such as textures or images for the scene.<br />
......
......@@ -13,8 +13,8 @@
<h1>[name]</h1>
<p class="desc">
Creates a texture for use as a Depth Texture. Require support for the
[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
This class can be used to automatically save the depth information of a rendering into a texture.
When using a WebGL 1 rendering context, [name] requires support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
</p>
<h2>Examples</h2>
......@@ -31,11 +31,11 @@
[page:Number height] -- height of the texture.<br />
[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType].
[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
See [page:Textures type constants] for other choices.<br />
[page:Constant mapping] --
See [page:Textures type constants] for details.<br />
See [page:Textures mapping mode constants] for details.<br />
[page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
See [page:Textures wrap mode constants] for other choices.<br />
......@@ -73,7 +73,7 @@
<h3>[page:Texture.type .type]</h3>
<p>
Default is [page:Textures THREE.UnsignedShortType].
Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
See [page:Textures format constants] for details.<br />
</p>
......
......@@ -75,15 +75,15 @@
<p>是否可以使用 [page:Audio.play play](),
[page:Audio.pause pause]()等方法控制播放. 默认为 *true*.</p>
<h3>[property:Number playbackRate]</h3>
<p>播放速率. 默认为 *1*.</p>
<h3>[property:Boolean isPlaying]</h3>
<p>是否正在播放</p>
<h3>[property:Boolean isPlaying]</h3>
<p>是否正在播放</p>
<h3>[property:AudioListener listener]</h3>
<h3>[property:AudioListener listener]</h3>
<p>A reference to the listener object of this audio.</p>
<h3>[property:Number playbackRate]</h3>
<p>播放速率. 默认为 *1*.</p>
<h3>[property:Number offset]</h3>
<p>音频开始播放的偏移时间. 和[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start]()的*offset*参数一样. 默认为 *0*.</p>
......
......@@ -12,8 +12,7 @@
<h1>立方相机([name])</h1>
<p class="desc">创建6个摄像机,并将它们所拍摄的场景渲染到[page:WebGLCubeRenderTarget]上。</p>
<p class="desc">创建6个渲染到[page:WebGLCubeRenderTarget]的摄像机。</p>
<h2>代码示例</h2>
......@@ -31,12 +30,12 @@
scene.add( car );
// Update the render target cube
car.setVisible( false );
car.visible = false;
cubeCamera.position.copy( car.position );
cubeCamera.update( renderer, scene );
// Render the scene
car.setVisible( true );
car.visible = true;
renderer.render( scene, camera );
</code>
......@@ -53,14 +52,13 @@
<h3>[name]( [param:Number near], [param:Number far], [param:WebGLCubeRenderTarget renderTarget] )</h3>
<p>
near -- 近剪切面的距离<br />
far -- 远剪切面的距离<br />
renderTarget -- The destination cube render target.
</p>
<p>
构造一个包含6个[page:PerspectiveCamera PerspectiveCameras](透视摄像机)的立方摄像机,并将其拍摄的场景渲染到一个[page:WebGLCubeRenderTarget]上。
构造一个包含6个[page:PerspectiveCamera PerspectiveCameras](透视摄像机)的立方摄像机,
并将其拍摄的场景渲染到一个[page:WebGLCubeRenderTarget]上。
</p>
......@@ -76,21 +74,19 @@
<p>共有方法请参见其基类[page:Object3D]。</p>
<h3>[method:null update]( [param:WebGLRenderer renderer], [param:Scene scene] )</h3>
<p>
renderer -- 当前的WebGL渲染器<br />
scene -- 当前的场景
</p>
<p>
这个方法用来更新[page:CubeCamera.renderTarget renderTarget](渲染目标对象)。
这个方法用来更新[page:CubeCamera.renderTarget renderTarget](渲染目标对象)。
</p>
<h3>[method:null clear]( [param:WebGLRenderer renderer], [param:Boolean color], [param:Boolean depth], [param:Boolean stencil] )</h3>
<p>
这个方法用来来清除[page:CubeCamera.renderTarget renderTarget]的颜色、深度和/或模板缓冲区。
颜色缓冲区设置为渲染器当前的“清除”色。参数默认值均为*true*。
这个方法用来来清除[page:CubeCamera.renderTarget renderTarget]的颜色、深度和/或模板缓冲区。
颜色缓冲区设置为渲染器当前的“清除”色。参数默认值均为*true*。
</p>
<h2>源代码</h2>
......
......@@ -18,7 +18,6 @@
在这种投影模式下,无论物体距离相机距离远或者近,在最终渲染的图片中物体的大小都保持不变。
<br /><br />
这对于渲染2D场景或者UI元素是非常有用的。
</p>
......@@ -75,7 +74,7 @@
<h3>[property:Float far]</h3>
<p>
摄像机视锥体远端面,其默认值为*2000*。<br /><br />
Must be greater than the current value of [page:.near near] plane.
该值必须大于[page:.near near] plane(摄像机视锥体近端面)的值。
</p>
......@@ -102,8 +101,7 @@
<p>这个值是由[page:OrthographicCamera.setViewOffset setViewOffset]来设置的,其默认值为*null*。</p>
<h3>[property:number zoom]</h3>
<p>
获取或者设置摄像机的缩放倍数,其默认值为*1*。</p>
<p>获取或者设置摄像机的缩放倍数,其默认值为*1*。</p>
<h2>方法</h2>
<p>共有方法请参见其基类[page:Camera]。</p>
......@@ -124,13 +122,12 @@
<h3>[method:null clearViewOffset]()</h3>
<p>
清除任何由.setViewOffset设置的偏移量。
清除任何由.setViewOffset设置的偏移量。
</p>
<h3>[method:null updateProjectionMatrix]()</h3>
<p>
更新摄像机投影矩阵。在任何参数被改变以后必须被调用。
更新摄像机投影矩阵。在任何参数被改变以后必须被调用。
</p>
<h3>[method:Object toJSON]([param:object meta])</h3>
......
......@@ -62,7 +62,7 @@
<p>
摄像机的远端面,默认值是*2000*。
<br /><br />
Must be greater than the current value of [page:.near near] plane.
该值必须大于[page:.near near] plane(摄像机视锥体近端面)的值。
</p>
<h3>[property:Float filmGauge]</h3>
......
......@@ -12,8 +12,8 @@
<h1>立体相机([name])</h1>
<p class="desc">
双透视摄像机(立体相机)常被用于创建[link:https://en.wikipedia.org/wiki/Anaglyph_3D 3D Anaglyph](3D立体影像)或者[link:https://en.wikipedia.org/wiki/parallax_barrier Parallax Barrier](视差效果)。
双透视摄像机(立体相机)常被用于创建[link:https://en.wikipedia.org/wiki/Anaglyph_3D 3D Anaglyph](3D立体影像)
或者[link:https://en.wikipedia.org/wiki/parallax_barrier Parallax Barrier](视差屏障)。
</p>
<h2>例子</h2>
......@@ -46,7 +46,7 @@
<h3>[method:null update]( [param:PerspectiveCamera camera] )</h3>
<p>
基于摄像机通过场景,更新立体摄像机。
基于摄像机通过场景,更新立体摄像机。
</p>
<h2>源代码</h2>
......
......@@ -46,6 +46,7 @@
THREE.LinearToneMapping
THREE.ReinhardToneMapping
THREE.CineonToneMapping
THREE.ACESFilmicToneMapping
</code>
<p>
这些常量定义了WebGLRenderer中[page:WebGLRenderer.toneMapping toneMapping]的属性。
......
......@@ -69,10 +69,10 @@
这些常量用于纹理的[page:Texture.magFilter magFilter]属性,它们定义了当被纹理化的像素映射到小于或者等于1纹理元素(texel)的区域时,将要使用的纹理放大函数。<br /><br />
[page:constant NearestFilter]返回与指定纹理坐标(在曼哈顿距离之内)最接近的纹理元素的值。<br /><br />
[page:constant LinearFilter]是默认值,返回距离指定的纹理坐标最近的四个纹理元素的加权平均值,
并且可以包含纹理的其他部分中,被包裹或者被重复的项目,具体取决于 [page:Texture.wrapS wrapS] 和 [page:Texture.wrapT wrapT] 的值,and on the exact mapping。
</p>
</p>
<h2>缩小滤镜(Minification Filters)</h2>
<code>
......@@ -132,28 +132,57 @@
<h2>格式</h2>
<code>
THREE.AlphaFormat
THREE.RedFormat
THREE.RedIntegerFormat
THREE.RGFormat
THREE.RGIntegerFormat
THREE.RGBFormat
THREE.RGBIntegerFormat
THREE.RGBAFormat
THREE.RGBAIntegerFormat
THREE.LuminanceFormat
THREE.LuminanceAlphaFormat
THREE.RGBEFormat
THREE.DepthFormat
THREE.DepthStencilFormat
</code>
</code>
<p>
这些常量用于纹理的[page:Texture.format format]属性,它们定义了shader(着色器)将如何读取的2D纹理或者*texels*(纹理元素)的元素。.<br /><br />
[page:constant AlphaFormat] 丢弃红、绿、蓝分量,仅读取Alpha分量。<br /><br />
[page:constant RedFormat] discards the green and blue components and reads just the red component.<br /><br />
[page:constant RedIntegerFormat] discards the green and blue components and reads just the red component.
The texels are read as integers instead of floating point.
(can only be used with a WebGL 2 rendering context).
<br /><br />
[page:constant RGFormat] discards the alpha, and blue components and reads the red, and green components.
(can only be used with a WebGL 2 rendering context).
<br /><br />
[page:constant RGIntegerFormat] discards the alpha, and blue components and reads the red, and green components.
The texels are read as integers instead of floating point.
(can only be used with a WebGL 2 rendering context).
<br /><br />
[page:constant RGBFormat] 丢弃Alpha分量,仅读取红、绿、蓝分量。<br /><br />
[page:constant RGBIntegerFormat] discards the alpha components and reads the red, green and blue components.
(can only be used with a WebGL 2 rendering context).
<br /><br />
[page:constant RGBAFormat] 是默认值,它将读取红、绿、蓝和Alpha分量。<br /><br />
[page:constant RGBAIntegerFormat] is the default and reads the red, green, blue and alpha components.
The texels are read as integers instead of floating point.
(can only be used with a WebGL 2 rendering context).
<br /><br />
[page:constant LuminanceFormat] 将每个元素作为单独的亮度分量来读取。
将其转换为范围限制在[0,1]区间的浮点数,然后通过将亮度值放入红、绿、蓝通道,并将1.0赋给Alpha通道,来组装成一个RGBA元素。<br /><br />
[page:constant LuminanceAlphaFormat] 将每个元素同时作为亮度分量和Alpha分量来读取。
和上面[page:constant LuminanceFormat]的处理过程是一致的,除了Alpha分量具有除了*1.0*以外的值。<br /><br />
......@@ -263,6 +292,259 @@
these require support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/ WEBGL_compressed_texture_astc] extension. <br /><br />
</p>
<h2>Internal Formats</h2>
<code>
'ALPHA'
'RGB'
'RGBA'
'LUMINANCE'
'LUMINANCE_ALPHA'
'RED_INTEGER'
'R8'
'R8_SNORM'
'R8I'
'R8UI'
'R16I'
'R16UI'
'R16F'
'R32I'
'R32UI'
'R32F'
'RG8'
'RG8_SNORM'
'RG8I'
'RG8UI'
'RG16I'
'RG16UI'
'RG16F'
'RG32I'
'RG32UI'
'RG32F'
'RGB565'
'RGB8'
'RGB8_SNORM'
'RGB8I'
'RGB8UI'
'RGB16I'
'RGB16UI'
'RGB16F'
'RGB32I'
'RGB32UI'
'RGB32F'
'RGB9_E5'
'SRGB8'
'R11F_G11F_B10F'
'RGBA4'
'RGBA8'
'RGBA8_SNORM'
'RGBA8I'
'RGBA8UI'
'RGBA16I'
'RGBA16UI'
'RGBA16F'
'RGBA32I'
'RGBA32UI'
'RGBA32F'
'RGB5_A1'
'RGB10_A2'
'RGB10_A2UI'
'SRGB8_ALPHA8'
'DEPTH_COMPONENT16'
'DEPTH_COMPONENT24'
'DEPTH_COMPONENT32F'
'DEPTH24_STENCIL8'
'DEPTH32F_STENCIL8'
</code>
<p>
Heads up: changing the internal format of a texture will only affect the
texture when using a WebGL 2 rendering context.<br /><br />
For use with a texture's [page:Texture.internalFormat internalFormat] property,
these define how elements of a texture, or *texels*, are stored on the GPU.<br /><br />
[page:constant R8] stores the red component on 8 bits.<br /><br />
[page:constant R8_SNORM] stores the red component on 8 bits. The component is stored as normalized. <br /><br />
[page:constant R8I] stores the red component on 8 bits. The component is stored as an integer. <br /><br />
[page:constant R8UI] stores the red component on 8 bits. The component is stored as an unsigned integer. <br /><br />
[page:constant R16I] stores the red component on 16 bits. The component is stored as an integer. <br /><br />
[page:constant R16UI] stores the red component on 16 bits. The component is stored as an unsigned integer. <br /><br />
[page:constant R16F] stores the red component on 16 bits. The component is stored as floating point. <br /><br />
[page:constant R32I] stores the red component on 32 bits. The component is stored as an integer. <br /><br />
[page:constant R32UI] stores the red component on 32 bits. The component is stored as an unsigned integer. <br /><br />
[page:constant R32F] stores the red component on 32 bits. The component is stored as floating point. <br /><br />
[page:constant RG8] stores the red and green components on 8 bits each.<br /><br />
[page:constant RG8_SNORM] stores the red and green components on 8 bits each.
Every component is stored as normalized.
<br /><br />
[page:constant RG8I] stores the red and green components on 8 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RG8UI] stores the red and green components on 8 bits each.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RG16I] stores the red and green components on 16 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RG16UI] stores the red and green components on 16 bits each.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RG16F] stores the red and green components on 16 bits each.
Every component is stored as floating point.
<br /><br />
[page:constant RG32I] stores the red and green components on 32 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RG32UI] stores the red and green components on 32 bits.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RG32F] stores the red and green components on 32 bits.
Every component is stored as floating point.
<br /><br />
[page:constant RGB8] stores the red, green, and blue components on 8 bits each.
[page:constant RGB8_SNORM] stores the red, green, and blue components on 8 bits each.
Every component is stored as normalized.
<br /><br />
[page:constant RGB8I] stores the red, green, and blue components on 8 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RGB8UI] stores the red, green, and blue components on 8 bits each.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGB16I] stores the red, green, and blue components on 16 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RGB16UI] stores the red, green, and blue components on 16 bits each.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGB16F] stores the red, green, and blue components on 16 bits each.
Every component is stored as floating point
<br /><br />
[page:constant RGB32I] stores the red, green, and blue components on 32 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RGB32UI] stores the red, green, and blue components on 32 bits each.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGB32F] stores the red, green, and blue components on 32 bits each.
Every component is stored as floating point
<br /><br />
[page:constant R11F_G11F_B10F] stores the red, green, and blue components respectively on 11 bits, 11 bits, and 10bits.
Every component is stored as floating point.
<br /><br />
[page:constant RGB565] stores the red, green, and blue components respectively on 5 bits, 6 bits, and 5 bits.<br /><br />
[page:constant RGB9_E5] stores the red, green, and blue components on 9 bits each.<br /><br />
[page:constant RGBA8] stores the red, green, blue, and alpha components on 8 bits each.<br /><br />
[page:constant RGBA8_SNORM] stores the red, green, blue, and alpha components on 8 bits.
Every component is stored as normalized.
<br /><br />
[page:constant RGBA8I] stores the red, green, blue, and alpha components on 8 bits each.
Every component is stored as an integer.
<br /><br />
[page:constant RGBA8UI] stores the red, green, blue, and alpha components on 8 bits.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGBA16I] stores the red, green, blue, and alpha components on 16 bits.
Every component is stored as an integer.
<br /><br />
[page:constant RGBA16UI] stores the red, green, blue, and alpha components on 16 bits.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGBA16F] stores the red, green, blue, and alpha components on 16 bits.
Every component is stored as floating point.
<br /><br />
[page:constant RGBA32I] stores the red, green, blue, and alpha components on 32 bits.
Every component is stored as an integer.
<br /><br />
[page:constant RGBA32UI] stores the red, green, blue, and alpha components on 32 bits.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant RGBA32F] stores the red, green, blue, and alpha components on 32 bits.
Every component is stored as floating point.
<br /><br />
[page:constant RGB5_A1] stores the red, green, blue, and alpha components respectively on 5 bits, 5 bits, 5 bits, and 1 bit.<br /><br />
[page:constant RGB10_A2] stores the red, green, blue, and alpha components respectively on 10 bits, 10 bits, 10 bits and 2 bits.<br /><br />
[page:constant RGB10_A2UI] stores the red, green, blue, and alpha components respectively on 10 bits, 10 bits, 10 bits and 2 bits.
Every component is stored as an unsigned integer.
<br /><br />
[page:constant SRGB8] stores the red, green, and blue components on 8 bits each.<br /><br />
[page:constant SRGB8_ALPHA8] stores the red, green, blue, and alpha components on 8 bits each.<br /><br />
[page:constant DEPTH_COMPONENT16] stores the depth component on 16bits.<br /><br />
[page:constant DEPTH_COMPONENT24] stores the depth component on 24bits.<br /><br />
[page:constant DEPTH_COMPONENT32F] stores the depth component on 32bits. The component is stored as floating point.<br /><br />
[page:constant DEPTH24_STENCIL8] stores the depth, and stencil components respectively on 24 bits and 8 bits.
The stencil component is stored as an unsigned integer.
<br /><br />
[page:constant DEPTH32F_STENCIL8] stores the depth, and stencil components respectively on 32 bits and 8 bits.
The depth component is stored as floating point, and the stencil component as an unsigned integer.
<br /><br />
Note that the texture must have the correct [page:Texture.type type] set,
as well as the correct [page:Texture.format format].
See [link:https://developer.mozilla.org/en/docs/Web/API/WebGLRenderingContext/texImage2D WebGLRenderingContext.texImage2D], and
[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/texImage3D WebGL2RenderingContext.texImage3D],
for more details regarding the possible combination of [page:Texture.format format], [page:Texture.internalFormat internalFormat],
and [page:Texture.type type].<br /><br />
For more in-depth information regarding internal formats, you can also refer directly
to the [link:https://www.khronos.org/registry/webgl/specs/latest/2.0/ WebGL2 Specification] and
to the [link:https://www.khronos.org/registry/OpenGL/specs/es/3.0/es_spec_3.0.pdf OpenGL ES 3.0 Specification].
</p>
<h2>编码</h2>
<code>
THREE.LinearEncoding
......
......@@ -97,6 +97,18 @@
<h2>方法</h2>
<h3>[method:this applyMatrix3]( [param:Matrix3 m] )</h3>
<p>Applies matrix [page:Matrix3 m] to every Vector3 element of this BufferAttribute.</p>
<h3>[method:this applyMatrix4]( [param:Matrix4 m] )</h3>
<p>Applies matrix [page:Matrix4 m] to every Vector3 element of this BufferAttribute.</p>
<h3>[method:this applyNormalMatrix]( [param:Matrix3 m] )</h3>
<p>Applies normal matrix [page:Matrix3 m] to every Vector3 element of this BufferAttribute.</p>
<h3>[method:this transformDirection]( [param:Matrix4 m] )</h3>
<p>Applies matrix [page:Matrix4 m] to every Vector3 element of this BufferAttribute, interpreting the elements as a direction vectors.</p>
<h3>[method:BufferAttribute clone]() </h3>
<p>返回该 BufferAttribute 的拷贝。</p>
......
......@@ -132,6 +132,13 @@
存储 [page:BufferAttribute] 的 Hashmap,存储了几何体 [page:Geometry.morphTargets morphTargets] 的细节信息。
</p>
<h3>[property:Boolean morphTargetsRelative]</h3>
<p>
Used to control the morph target behavior; when set to true, the morph target data is treated as relative offsets, rather than as absolute positions/normals.
Default is *false*.
</p>
<h3>[property:String name]</h3>
<p>
当前 bufferGeometry 实例的可选别名。默认值是空字符串。
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<base href="../../../" />
<script src="list.js"></script>
<script src="page.js"></script>
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<p class="desc">
This buffer attribute class does not construct a VBO. Instead, it uses
whatever VBO is passed in constructor and can later be altered via the
*buffer* property.<br /><br />
It is required to pass additional params alongside the VBO. Those are:
the GL context, the GL data type, the number of components per vertex,
the number of bytes per component, and the number of vertices.<br /><br />
The most common use case for this class is when some kind of GPGPU
calculation interferes or even produces the VBOs in question.
</p>
<h2>Constructor</h2>
<h3>[name]( [param:WebGLBuffer buffer], [param:GLenum type], [param:Integer itemSize], [param:Integer elementSize], [param:Integer count] )</h3>
<p>
*buffer* — Must be a <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a>.
<br />
*type* — One of <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Types</a>.
<br />
*itemSize* — The number of values of the array that should be associated with
a particular vertex. For instance, if this
attribute is storing a 3-component vector (such as a position, normal, or color), then itemSize should be 3.
<br />
*elementSize* — 1, 2 or 4. The corresponding size (in bytes) for the given "type" param.
<ul>
<li>gl.FLOAT: 4</li>
<li>gl.UNSIGNED_SHORT: 2</li>
<li>gl.SHORT: 2</li>
<li>gl.UNSIGNED_INT: 4</li>
<li>gl.INT: 4</li>
<li>gl.BYTE: 1</li>
<li>gl.UNSIGNED_BYTE: 1</li>
</ul>
*count* — The expected number of vertices in VBO.
</p>
<h2>Properties</h2>
<h3>[property:WebGLBuffer buffer]</h3>
<p>
The current <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a> instance.
</p>
<h3>[property:Integer count]</h3>
<p>
The expected number of vertices in VBO.
</p>
<h3>[property:Integer itemSize]</h3>
<p>
How many values make up each item (vertex).
</p>
<h3>[property:Integer elementSize]</h3>
<p>
Stores the corresponding size in bytes for the current *type* property value.
</p>
<p>
See above (constructor) for a list of known type sizes.
</p>
<h3>[property:GLenum type]</h3>
<p>
A <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Data_types" target="_blank">WebGL Data Type</a>
describing the underlying VBO contents.
</p>
<p>
Set this property together with *elementSize*. The recommended way is
using the *setType* method.
</p>
<h3>[property:Boolean isGLBufferAttribute]</h3>
<p>
Read-only. Always *true*.
</p>
<h2>Methods</h2>
<h3>[method:null setBuffer]( buffer ) </h3>
<p>Sets the *buffer* property.</p>
<h3>[method:null setType]( type, elementSize ) </h3>
<p>Sets the both *type* and *elementSize* properties.</p>
<h3>[method:null setItemSize]( itemSize ) </h3>
<p>Sets the *itemSize* property.</p>
<h3>[method:null setCount]( count ) </h3>
<p>Sets the *count* property.</p>
<h3>[property:Integer version]</h3>
<p>
A version number, incremented every time the needsUpdate property is set to true.
</p>
<h3>[property:Boolean needsUpdate]</h3>
<p>
Default is *false*. Setting this to true increments [page:GLBufferAttribute.version version].
</p>
<h2>Source</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
......@@ -69,11 +69,6 @@
版本号,每次 needsUpdate 属性设置为 true 时,版本号增加。
</p>
<h3>[property:Integer isInterleavedBuffer]</h3>
<p>
默认值为 *true*。
</p>
<h3>[property:Integer needsUpdate]</h3>
<p>
默认值为 *false*。该值被设置为 true 时,会导致 [page:InterleavedBuffer.version version] 增加。
......
......@@ -66,6 +66,9 @@
<h2>方法</h2>
<h3>[method:this applyMatrix4]( [param:Matrix4 m] )</h3>
<p>Applies matrix [page:Matrix4 m] to every Vector3 element of this InterleavedBufferAttribute.</p>
<h3>[method:Number getX]( [param:Integer index] ) </h3>
<p>返回给定索引矢量的第一个元素 (X 值)。</p>
......
......@@ -224,7 +224,7 @@
<p>
id —— 标识该对象实例的唯一数字。<br /><br />
搜索该对象的子级,返回第一个带有匹配id的子对象。<br />
从该对象开始,搜索一个对象及其子级,返回第一个带有匹配id的子对象。<br />
请注意,id是按照时间顺序来分配的:1、2、3、……,每增加一个新的对象就自增1。
</p>
......@@ -232,7 +232,7 @@
<p>
name —— 用于来匹配子物体中Object3D.name属性的字符串。<br /><br />
搜索该对象的子级,返回第一个带有匹配name的子对象。<br />
从该对象开始,搜索一个对象及其子级,返回第一个带有匹配name的子对象。<br />
请注意,大多数的对象中name默认是一个空字符串,要使用这个方法,你将需要手动地设置name属性。
</p>
......@@ -240,7 +240,7 @@
<p>
name —— 将要用于查找的属性的名称。<br />
value —— 给定的属性的值。 <br /><br />
搜索该对象的子级,返回第一个给定的属性中包含有匹配的值的子对象。
从该对象开始,搜索一个对象及其子级,返回第一个给定的属性中包含有匹配的值的子对象。
</p>
<h3>[method:Vector3 getWorldPosition]( [param:Vector3 target] )</h3>
......@@ -270,8 +270,9 @@
<h3>[method:Vector3 localToWorld]( [param:Vector3 vector] )</h3>
<p>
vector - 一个表示局部(物体)空间中位置的向量。 <br /><br />
将局部空间向量转换为世界空间向量。
vector - 一个表示在该物体局部空间中位置的向量。<br /><br />
将该向量从物体的局部空间转换到世界空间。
</p>
<h3>[method:null lookAt]( [param:Vector3 vector] )<br />
......@@ -422,8 +423,9 @@
<h3>[method:Vector3 worldToLocal]( [param:Vector3 vector] )</h3>
<p>
vector - 一个世界向量.<br /><br />
将世界空间中的向量转换为局部空间向量。
vector - 一个表示在世界空间中位置的向量。<br /><br />
将该向量从世界空间转换到物体的局部空间。
</p>
<h2>源代码</h2>
......
......@@ -121,7 +121,8 @@
<h3>[property:Object params]</h3>
<p>
具有以下属性的对象:<code>
具有以下属性的对象:
<code>
{
Mesh: {},
Line: { threshold: 1 },
......
......@@ -102,7 +102,7 @@
<h3>[method:Object computeFrenetFrames]( [param:Integer segments], [param:Boolean closed] )</h3>
<p>
Generates the Frenet Frames. Used in geometries like [page:TubeGeometry] or [page:ExtrudeGeometry].
Generates the Frenet Frames. Requires a curve definition in 3D space. Used in geometries like [page:TubeGeometry] or [page:ExtrudeGeometry].
</p>
<h3>[method:Curve clone]()</h3>
......
......@@ -11,7 +11,7 @@
<h1>插值([name])</h1>
<p class="desc">
[name] contains spline and Bézier functions internally used by concrete curve classes.
[name] 包含了由具体的曲线类在内部使用的样条曲线和贝塞尔曲线函数。
</p>
<h2>方法</h2>
......
......@@ -12,7 +12,7 @@
<h1>弧线([name])</h1>
<p class="desc">[page:EllipseCurve]的别名</p>
<p class="desc">[page:EllipseCurve]的别名</p>
<h2>属性</h2>
<p>共有属性请参见其基类[page:EllipseCurve]。</p>
......
......@@ -67,7 +67,7 @@
<p>可能的值为*centripetal*、*chordal*和*catmullrom*。</p>
<h3>[property:float tension]</h3>
<p>当[page:.type]为*catmullrom*时,定义catmullrom的张力。</p>
<p>当[page:.curveType]为*catmullrom*时,定义catmullrom的张力。</p>
<h2>方法</h2>
......
......@@ -10,7 +10,7 @@
<body>
[page:Curve] &rarr;
<h1>二维二次贝塞尔曲线([name])</h1>
<h1>二维二次贝塞尔曲线([name]</h1>
<p class="desc">
创建一条平滑的二维
......
......@@ -79,7 +79,7 @@
<li>bevelSize — float。斜角与原始形状轮廓之间的延伸距离,默认值为bevelThickness-2。</li>
<li>bevelOffset — float. Distance from the shape outline that the bevel starts. Default is 0.</li>
<li>bevelSegments — int。斜角的分段层数,默认值为3。</li>
<li>extrudePath — THREE.Curve对象。一条沿着被挤出形状的三维样条线。</li>
<li>extrudePath — THREE.Curve对象。一条沿着被挤出形状的三维样条线。Bevels not supported for path extrusion.</li>
<li>UVGenerator — Object。提供了UV生成器函数的对象。</li>
</ul>
......
......@@ -78,7 +78,7 @@
<li>bevelSize — float。斜角与原始形状轮廓之间的延伸距离,默认值为bevelThickness-2。</li>
<li>bevelOffset — float. Distance from the shape outline that the bevel starts. Default is 0.</li>
<li>bevelSegments — int。斜角的分段层数,默认值为3。</li>
<li>extrudePath — THREE.Curve对象。一条沿着被挤出形状的三维样条线。</li>
<li>extrudePath — THREE.Curve对象。一条沿着被挤出形状的三维样条线。Bevels not supported for path extrusion.</li>
<li>UVGenerator — Object。提供了UV生成器函数的对象。</li>
</ul>
......
......@@ -68,7 +68,7 @@
<h3>[name]([param:Curve path], [param:Integer tubularSegments], [param:Float radius], [param:Integer radialSegments], [param:Boolean closed])</h3>
<p>
path — [page:Curve] - 一个由基类[page:Curve]继承而来的路径。<br />
path — [page:Curve] - 一个由基类[page:Curve]继承而来的3D路径。<br />
tubularSegments — [page:Integer] - 组成这一管道的分段数,默认值为64。<br />
radius — [page:Float] - 管道的半径,默认值为1。<br />
radialSegments — [page:Integer] - 管道横截面的分段数目,默认值为8。<br />
......
......@@ -68,7 +68,7 @@
<h3>[name]([param:Curve path], [param:Integer tubularSegments], [param:Float radius], [param:Integer radialSegments], [param:Boolean closed])</h3>
<p>
path — [page:Curve] - 一个由基类[page:Curve]继承而来的路径。<br />
path — [page:Curve] - 一个由基类[page:Curve]继承而来的3D路径。<br />
tubularSegments — [page:Integer] - 组成这一管道的分段数,默认值为64。<br />
radius — [page:Float] - 管道的半径,默认值为1。<br />
radialSegments — [page:Integer] - 管道横截面的分段数目,默认值为8。<br />
......
......@@ -33,8 +33,6 @@
<h2>例子</h2>
<p>
[example:webgl_geometries WebGL / geometries]<br/>
[example:webgl_geometry_normals WebGL / geometry / normals]<br/>
[example:webgl_shadowmesh WebGL / shadowmesh]
</p>
......@@ -48,7 +46,7 @@
[page:Number length] -- 箭头的长度. 默认为 *1*.<br />
[page:Number hex] -- 定义的16进制颜色值. 默认为 0xffff00.<br />
[page:Number headLength] -- 箭头头部(锥体)的长度. 默认为箭头长度的0.2倍(0.2 * length).<br />
[page:Number headWidth] -- The width of the head of the arrow. Default is 0.2 * headLength.
[page:Number headWidth] -- The width of the head of the arrow. Default is 0.2 * headLength.<br />
</p>
<h2>属性</h2>
......
......@@ -10,33 +10,33 @@
<body>
[page:Object3D] &rarr; [page:Light] &rarr; [page:LightProbe]
<h1>[name]</h1>
<h1>环境光探针([name])</h1>
<p class="desc">
Light probes are an alternative way of adding light to a 3D scene. AmbientLightProbe is the light estimation data
of a single ambient light in the scene. For more information about light probes, go to [page:LightProbe].
光照探针是一种在3D场景中添加光源的另一种方法。 AmbientLightProbe 是场景中单个环境光的光照估算数据。
有关光照探针的更多信息,请转到 [page:LightProbe] 。
</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:Color color], [param:Float intensity] )</h3>
<p>
[page:Color color] - (optional) An instance of Color, string representing a color or a number representing a color.<br />
[page:Float intensity] - (optional) Numeric value of the light probe's intensity. Default is 1.<br /><br />
[page:Color color] - (可选)一个表示颜色的 Color 的实例、字符串或数字。<br />
[page:Float intensity] - (可选)光照探针强度的数值。默认值为1。<br /><br />
Creates a new [name].
创建一个新的[name]。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<p>
See the base [page:LightProbe LightProbe] class for common properties.
</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>
See the base [page:LightProbe LightProbe] class for common methods.
</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -10,34 +10,34 @@
<body>
[page:Object3D] &rarr; [page:Light] &rarr; [page:LightProbe]
<h1>[name]</h1>
<h1>半球光探针[name]</h1>
<p class="desc">
Light probes are an alternative way of adding light to a 3D scene. HemisphereLightProbe is the light estimation data
of a single hemisphere light in the scene. For more information about light probes, go to [page:LightProbe].
光照探针是一种在3D场景中添加光源的另一种方法。 HemisphereLightProbe 是场景中单个半球光的光照估算数据。
有关光照探针的更多信息,请转到 [page:LightProbe] 。
</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:Color skyColor], [param:Color groundColor], [param:Float intensity] )</h3>
<p>
[page:Color skyColor] - (optional) An instance of Color, string representing a color or a number representing a color.<br />
[page:Color groundColor] - (optional) An instance of Color, string representing a color or a number representing a color.<br />
[page:Float intensity] - (optional) Numeric value of the light probe's intensity. Default is 1.<br /><br />
[page:Color skyColor] - (可选)一个表示颜色的 Color 的实例、字符串或数字。<br />
[page:Color groundColor] - (可选)一个表示颜色的 Color 的实例、字符串或数字。<br />
[page:Float intensity] - (可选)光照探针强度的数值。默认值为1。<br /><br />
Creates a new [name].
创建一个新的 [name]。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<p>
See the base [page:LightProbe LightProbe] class for common properties.
</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>
See the base [page:LightProbe LightProbe] class for common methods.
</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -10,58 +10,58 @@
<body>
[page:Object3D] &rarr; [page:Light] &rarr;
<h1>[name]</h1>
<h1>光照探针[name]</h1>
<p class="desc">
Light probes are an alternative way of adding light to a 3D scene. Unlike classical light sources (e.g. directional,
point or spot lights), light probes do not emit light. Instead they store information about light passing through
3D space. During rendering, the light that hits a 3D object is approximated by using the data from the light probe.
光照探针是一种在3D场景中添加光源的另一种方法。与经典光源(平行光、点光、聚光)不同,
光照探针不发光。相反,光照探针存储着有关穿过3D空间的光线的信息。
渲染过程中,通过使用来自光照探针的数据,来逼近打到3D物体上的光线。
</p>
<p class="desc">
Light probes are usually created from (radiance) environment maps. The class [page:LightProbeGenerator] can
be used to create light probes from instances of [page:CubeTexture] or [page:WebGLCubeRenderTarget].
However, light estimation data could also be provided in other forms e.g. by WebXR. This enables the rendering
of augmented reality content that reacts to real world lighting.
光照探针通常从(辐射)环境贴图中创建。 [page:LightProbeGenerator] 类可以根据 [page:CubeTexture] 或
[page:WebGLCubeRenderTarget] 的实例来创建光照探针。
但是,光照估算数据同样可以以其他形式提供,例如,通过WebXR。
这将能够渲染可对真实世界的光照做出反应的增强现实内容。
</p>
<p class="desc">
The current probe implementation in three.js supports so-called diffuse light probes. This type of light probe
is functionally equivalent to an irradiance environment map.
three.js中,当前的探针实现支持所谓的漫反射光照探针。
这种类型的光照探针功能上等效于辐照环境贴图。
</p>
<h2>Examples</h2>
<h2>例子</h2>
<p>
[example:webgl_lightprobe WebGL / light probe ]<br />
[example:webgl_lightprobe_cubecamera WebGL / light probe / cube camera ]
</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:SphericalHarmonics3 sh], [param:Float intensity] )</h3>
<p>
[page:SphericalHarmonics3 sh] - (optional) An instance of [page:SphericalHarmonics3].<br />
[page:Float intensity] - (optional) Numeric value of the light probe's intensity. Default is 1.<br /><br />
[page:SphericalHarmonics3 sh] - (可选)一个[page:SphericalHarmonics3]的实例。<br />
[page:Float intensity] - (可选)光照探针强度的数值。默认值为1。<br /><br />
Creates a new [name].
创建一个新的 [name] 。
</p>
<h2>Properties</h2>
<h2>属性</h2>
<p>
See the base [page:Light Light] class for common properties. The [page:Light.color color] property is currently
not evaluated and thus has no effect.
See the base [page:Light Light] class for common properties.
[page:Light.color color] 属性当前未做评估,因此不生效。
</p>
<h3>[property:SphericalHarmonics3 sh]</h3>
<p>
A light probe uses spherical harmonics to encode lighting information.
光照探针使用球面谐波(spherical harmonic)来编码光照信息。
</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>
See the base [page:Light Light] class for common methods.
</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -76,7 +76,7 @@
表示以"流明(光通量单位)"为单位的光功率。 缺省值 - *4Math.PI*。 <br /><br />
该值与 [page:.intensity intensity] 直接关联
<code>
<code>
power = intensity * 4&pi;
</code>
修改该值也会导致光强度的改变。
......@@ -86,8 +86,8 @@
<p>
[page:PointLightShadow]用与计算此光照的阴影。<br /><br />
此对象的摄像机被设置为 [page:PerspectiveCamera.fov fov] 为90度,[page:PerspectiveCamera.aspect aspect]为1
,近裁剪面 [page:PerspectiveCamera.near near] 为0,远裁剪面[page:PerspectiveCamera.far far]
此对象的摄像机被设置为 [page:PerspectiveCamera.fov fov] 为90度,[page:PerspectiveCamera.aspect aspect]为1
近裁剪面 [page:PerspectiveCamera.near near] 为0,远裁剪面[page:PerspectiveCamera.far far]
为500的透视摄像机 [page:PerspectiveCamera]。
</p>
......
......@@ -40,7 +40,6 @@ scene.background = new THREE.CubeTextureLoader()
[example:webgl_materials_cubemap_balls_reflection materials / cubemap / balls / reflection]<br />
[example:webgl_materials_cubemap_balls_refraction materials / cubemap / balls / refraction]<br />
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic]<br />
[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2]<br />
[example:webgl_materials_cubemap_refraction materials / cubemap / refraction]
</p>
......
......@@ -69,9 +69,6 @@
请参考 [page:.setMimeType]。默认为 *undefined*。
</p>
<h3>[property:object requestHeader]</h3>
<p>[link:https://developer.mozilla.org/en-US/docs/Glossary/Request_header request header] 在HTTP 请求中使用。 请参考 [page:.setRequestHeader]。 默认为 *undefined*.</p>
<h3>[property:String responseType]</h3>
<p>请求的响应类型。 请参考 [page:.setResponseType]. 默认为 *undefined*.</p>
......
......@@ -18,10 +18,10 @@
<h3>[name]( [param:LoadingManager manager] )</h3>
<p>
[page:LoadingManager manager] — The [page:LoadingManager loadingManager] for the loader to use. Default is [page:LoadingManager THREE.DefaultLoadingManager].
[page:LoadingManager manager] — 加载器将要使用的 [page:LoadingManager loadingManager]。默认为 [page:LoadingManager THREE.DefaultLoadingManager]。
</p>
<p>
Creates a new [name].
创建一个新的[name]。
</p>
......@@ -29,67 +29,79 @@
<h3>[property:string crossOrigin]</h3>
<p>
The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
Default is *anonymous*.
crossOrigin 字符串用于实现 CORS ,以从允许 CORS 的其他域加载url。
默认为*anonymous*。
</p>
<h3>[property:LoadingManager manager]</h3>
<p>
The [page:LoadingManager loadingManager] the loader is using. Default is [page:DefaultLoadingManager].
加载器要使用的 [page:LoadingManager loadingManager] 。默认为 [page:DefaultLoadingManager] 。
</p>
<h3>[property:String path]</h3>
<p>
The base path from which the asset will be loaded.
Default is the empty string.
将从中加载资产的基本路径。
默认为空字符串。
</p>
<h3>[property:String resourcePath]</h3>
<p>
The base path from which additional resources like textures will be loaded.
Default is the empty string.
将从中加载额外资源(例如纹理贴图)的基本路径。
默认为空字符串。
</p>
<h3>[property:object requestHeader]</h3>
<p>
[link:https://developer.mozilla.org/en-US/docs/Glossary/Request_header request header] 在 HTTP 请求中使用。 请参考 [page:.setRequestHeader]。 默认为 *undefined*。
</p>
<h2>方法</h2>
<h3>[method:void load]()</h3>
<p>
This method needs to be implement by all concrete loaders. It holds the logic for loading the asset from the backend.
该方法需要被所有具体的加载器来实现。它包含了从后端加载资产的逻辑。
</p>
<h3>[method:Promise loadAsync]( [param:String url], [param:Function onProgress] )</h3>
<p>
[page:String url] — A string containing the path/URL of the file to be loaded.<br />
[page:Function onProgress] — (optional) A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, that contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
[page:String url] — 一个字符串,包含要加载的文件的路径/URL。<br />
[page:Function onProgress] — (可选)加载过程中将会被调用的函数。参数将是一个XMLHttpRequest实例,其包含了 .[page:Integer total] (总)字节数和 .[page:Integer loaded] (已加载)字节数。<br />
</p>
<p>
This method is equivalent to [page:.load], but returns a [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise Promise].
该函数等效于[page:.load],但返回的是一个 [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise Promise]。
</p>
<p>
[page:Function onLoad] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve Promise.resolve] and [page:Function onError] is handled by [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject Promise.reject].
[page:Function onLoad] 由 [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve Promise.resolve] 处理,而 [page:Function onError] 则由 [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/reject Promise.reject] 处理。
</p>
<h3>[method:void parse]()</h3>
<p>
This method needs to be implement by all concrete loaders. It holds the logic for parsing the asset into three.js entities.
该方法需要被所有具体的加载器来实现。它包含了解析资产到 three.js 实体的逻辑。
</p>
<h3>[method:Loader setCrossOrigin]( [param:String crossOrigin] )</h3>
<p>
[page:String crossOrigin] — The crossOrigin string to implement CORS for loading the url from a different domain that allows CORS.
[page:String crossOrigin] — crossOrigin字符串用于实现CORS,以从允许CORS的其它域加载url。
</p>
<h3>[method:Loader setPath]( [param:String path] )</h3>
<p>
[page:String path] — Set the base path for the asset.
[page:String path] — 设置资产的基本路径。
</p>
<h3>[method:Loader setResourcePath]( [param:String resourcePath] )</h3>
<p>
[page:String resourcePath] — Set the base path for dependent resources like textures.
[page:String resourcePath] — 设置独立资源(如纹理贴图)的基本路径。
</p>
<h3>[method:Loader setRequestHeader]( [param:Object requestHeader] )</h3>
<p>
[page:object requestHeader] - key: 要设置header的名称。 value:要设置header的值。<br /><br />
设置在 HTTP 请求中使用的 [link:https://developer.mozilla.org/en-US/docs/Glossary/Request_header request header](请求头)。
</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -11,8 +11,7 @@
<h1>[name]</h1>
<p class="desc">
其功能时处理并跟踪已加载和待处理的数据。如果未手动设置加强管理器,则会为加载器创建和使用默认全局实例加载器管理器
其功能是处理并跟踪已加载和待处理的数据。如果未手动设置加强管理器,则会为加载器创建和使用默认全局实例加载器管理器
- 请参阅 [page:DefaultLoadingManager].<br /><br />
一般来说,默认的加载管理器已足够使用了,但有时候也需要设置单独的加载器 - 例如,如果你想为对象和纹理显示单独的加载条。
......@@ -120,38 +119,38 @@
<h3>[property:Function onStart]</h3>
<p>
换上咋加载开始时,被调用.
有如下参数:<br />
函数在加载开始时被调用。
有如下参数<br />
[page:String url] — 被加载的项的url。<br />
[page:Integer itemsLoaded] — 目前已加载项的个数。<br />
[page:Iteger itemsTotal] — 总共所需要加载项的个数。<br /><br />
此方法默认时未定义
该函数默认为undefined
</p>
<h3>[property:Function onLoad]</h3>
<p>
所有的项加载完成后将调用此函数。默认情况下,此方法时未定义的,除非在构造函数中进行传递
所有的项目加载完成后将调用此函数。默认情况下,该函数是未定义的,除非在构造函数中传入
</p>
<h3>[property:Function onProgress]</h3>
<p>
此方法加载每一个项,加载完成时进行调用。
有如下参数:<br />
有如下参数<br />
[page:String url] — 被加载的项的url。<br />
[page:Integer itemsLoaded] — 目前已加载项的个数。<br />
[page:Iteger itemsTotal] — 总共所需要加载项的个数。<br /><br />
默认情况下,此方法时未定义的,除非在构造函数中进行传递
默认情况下,该函数为undefined,除非在构造函数中传入
</p>
<h3>[property:Function onError]</h3>
<p>
此方法将在任意项加载错误时,进行调用。
有如下参数:<br />
[page:String url] — 所加载出错误的项的url<br /><br />
有如下参数<br />
[page:String url] — 加载发生错误的项目的url<br /><br />
默认情况下,此方法时未定义的,除非在构造函数中进行传递
默认情况下,该函数为undefined,除非在构造函数中传入
</p>
......
......@@ -105,7 +105,8 @@
<h3>[property:Boolean stencilWrite]</h3>
<p>
Whether stencil operations are performed against the stencil buffer. In order to perform writes or comparisons against the stencil buffer this value must be *true*. Default is *false*.</p>
Whether stencil operations are performed against the stencil buffer. In order to perform writes or comparisons against the stencil buffer this value must be *true*. Default is *false*.
</p>
<h3>[property:Integer stencilWriteMask]</h3>
<p>
......@@ -181,7 +182,7 @@ Which stencil operation to perform when the comparison function returns true and
</p>
<h3>[property:Boolean premultipliedAlpha]</h3>
<p> 是否预乘alpha(透明度)值。有关差异的示例,请参阅[Example:webgl_materials_physical_transparency WebGL / Materials / Physical / Transparency]。
<p> 是否预乘alpha(透明度)值。有关差异的示例,请参阅[Example:webgl_materials_physical_transmission WebGL / Materials / Physical / Transmission]。
默认值为*false*。
</p>
......@@ -286,6 +287,36 @@ Defines whether vertex coloring is used. Default is *false*.
Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
</p>
<h3>[method:String customProgramCacheKey]()</h3>
<p>
In case onBeforeCompile is used, this callback can be used to identify values of settings used in onBeforeCompile, so three.js can reuse a cached shader or recompile the shader for this material as needed.
</p>
<p>
For example, if onBeforeCompile contains a conditional statement like:<br />
<code>if ( black ) {
shader.fragmentShader = shader.fragmentShader.replace('gl_FragColor = vec4(1)', 'gl_FragColor = vec4(0)')
}
</code>
then customProgramCacheKey should be set like this:<br />
<code>material.customProgramCacheKey = function() {
return black ? '1' : '0';
}
</code>
</p>
<p>
Unlike properties, the callback is not supported by [page:Material.clone .clone](), [page:Material.copy .copy]() and [page:Material.toJSON .toJSON]().
</p>
<h3>[method:null setValues]( [param:object values] )</h3>
<p> values -- 具有参数的容器。
根据*values*设置属性。<br/>
......
......@@ -57,7 +57,7 @@
</p>
<h3>[property:Texture aoMap]</h3>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]属性</p>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UV。</p>
<h3>[property:Float aoMapIntensity]</h3>
<p>环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
......@@ -75,7 +75,7 @@
<p>环境贴图。默认值为null。</p>
<h3>[property:Texture lightMap]</h3>
<p>光照贴图。默认值为null。lightMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]纹理属性</p>
<p>光照贴图。默认值为null。lightMap需要第二组UV。</p>
<h3>[property:Float lightMapIntensity]</h3>
<p>烘焙光的强度。默认值为1。</p>
......@@ -94,6 +94,8 @@
<h3>[property:Float refractionRatio]</h3>
<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
折射率不应超过1。默认值为*0.98*。
</p>
......
......@@ -63,7 +63,7 @@
</p>
<h3>[property:Texture aoMap]</h3>
<p> 该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]纹理属性</p>
<p> 该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UV。</p>
<h3>[property:Float aoMapIntensity]</h3>
<p> 环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
......@@ -94,7 +94,7 @@
<p> 环境贴图。默认值为null。</p>
<h3>[property:Texture lightMap]</h3>
<p>光照贴图。默认值为null。lightMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]纹理属性</p>
<p>光照贴图。默认值为null。lightMap需要第二组UV。</p>
<h3>[property:Float lightMapIntensity]</h3>
<p>烘焙光的强度。默认值为1。</p>
......@@ -115,6 +115,8 @@
<h3>[property:Float refractionRatio]</h3>
<p>空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
折射率不应超过1。默认值为*0.98*。
</p>
......
......@@ -96,6 +96,8 @@
<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
should be negated to compensate for the different handedness.
</p>
<h3>[property:Integer normalMapType]</h3>
......
......@@ -75,6 +75,8 @@
<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
should be negated to compensate for the different handedness.
</p>
<h3>[property:Integer normalMapType]</h3>
......
......@@ -61,7 +61,7 @@
</p>
<h3>[property:Texture aoMap]</h3>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]属性</p>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UV。</p>
<h3>[property:Float aoMapIntensity]</h3>
<p>环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
......@@ -115,7 +115,7 @@
<h3>[property:Texture lightMap]</h3>
<p>光照贴图。默认值为null。lightMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]纹理属性</p>
<p>光照贴图。默认值为null。lightMap需要第二组UV。</p>
<h3>[property:Float lightMapIntensity]</h3>
<p>烘焙光的强度。默认值为1。</p>
......@@ -132,6 +132,8 @@
<h3>[property:Texture normalMap]</h3>
<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
should be negated to compensate for the different handedness.
</p>
<h3>[property:Integer normalMapType]</h3>
......@@ -151,6 +153,8 @@
<h3>[property:Float refractionRatio]</h3>
<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
折射率不应超过1。默认值为*0.98*。
</p>
......
......@@ -82,7 +82,7 @@
</p>
<h3>[property:Texture aoMap]</h3>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]属性</p>
<p>该纹理的红色通道用作环境遮挡贴图。默认值为null。aoMap需要第二组UV。</p>
<h3>[property:Float aoMapIntensity]</h3>
<p>环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
......@@ -140,7 +140,7 @@
请确保将minFilter设置为其中一个MipMap选项,并且未强制禁用mip贴图。</p>
<p>
注意:MeshStandardMaterial 仅支持[link:https://threejs.org/docs/#api/textures/CubeTexture cube environment maps]。
如果要使用equirectangular贴图,则需要使用 [page:WebGLCubeRenderTarget.fromEquirectangularTexture WebGLCubeRenderTarget.fromEquirectangularTexture]().
如果要使用equirectangular贴图,则需要使用 [page:WebGLCubeRenderTarget.fromEquirectangularTexture WebGLCubeRenderTarget.fromEquirectangularTexture]()。
详细信息请参阅此示例[link:https://threejs.org/examples/webgl_materials_envmaps_exr.html example]。
</p>
......@@ -149,7 +149,7 @@
<h3>[property:Texture lightMap]</h3>
<p>光照贴图。默认值为null。lightMap需要第二组UVs,因此将忽略[page:Texture repeat]和[page:Texture offset]纹理属性</p>
<p>光照贴图。默认值为null。lightMap需要第二组UV。</p>
<h3>[property:Float lightMapIntensity]</h3>
<p>烘焙光的强度。默认值为1。</p>
......@@ -174,6 +174,8 @@
<h3>[property:Texture normalMap]</h3>
<p>用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
In case the material has a normal map authored using the left handed convention, the y component of normalScale
should be negated to compensate for the different handedness.
</p>
<h3>[property:Integer normalMapType]</h3>
......@@ -188,6 +190,8 @@
<h3>[property:Float refractionRatio]</h3>
<p> 空气的折射率(IOR)(约为1)除以材质的折射率。它与环境映射模式[page:Textures THREE.CubeRefractionMapping]
和[page:Textures THREE.EquirectangularRefractionMapping]一起使用。
The index of refraction (IOR) of air (approximately 1) divided by the index of refraction of the material.
It is used with environment mapping mode [page:Textures THREE.CubeRefractionMapping].
折射率不应超过1。默认值为*0.98*。
</p>
......@@ -202,11 +206,13 @@
<p>材质是否使用蒙皮。默认值为false。</p>
<h3>[property:Boolean vertexTangents]</h3>
<p> Defines whether precomputed vertex tangents, which must be provided in a vec4 "tangent" attribute,
are used. When disabled, tangents are derived automatically. Using precomputed tangents will give
more accurate normal map details in some cases, such as with mirrored UVs. Default is false.
<p>
Defines whether precomputed vertex tangents, which must be provided in a vec4 "tangent" attribute,
are used. When disabled, tangents are derived automatically. Using precomputed tangents will give
more accurate normal map details in some cases, such as with mirrored UVs. Default is false.
</p>
<h3>[property:Boolean wireframe]</h3>
<p>将几何体渲染为线框。默认值为*false*(即渲染为平面多边形)。</p>
......
......@@ -64,8 +64,7 @@
<h3>[property:Texture aoMap]</h3>
<p>The red channel of this texture is used as the ambient occlusion map. Default is null.
The aoMap requires a second set of UVs, and consequently will ignore the [page:Texture repeat]
and [page:Texture offset] Texture properties.</p>
The aoMap requires a second set of UVs.</p>
<h3>[property:Float aoMapIntensity]</h3>
<p>Intensity of the ambient occlusion effect. Default is 1. Zero is no occlusion effect.</p>
......@@ -127,9 +126,7 @@
[page:Textures THREE.NearestFilter] when using this type of texture. Default is *null*.</p>
<h3>[property:Texture lightMap]</h3>
<p>The light map. Default is null. The lightMap requires a second set of UVs,
and consequently will ignore the [page:Texture repeat] and [page:Texture offset]
Texture properties.</p>
<p>The light map. Default is null. The lightMap requires a second set of UVs.</p>
<h3>[property:Float lightMapIntensity]</h3>
<p>Intensity of the baked light. Default is 1.</p>
......@@ -150,6 +147,8 @@
<p>
The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
the way the color is lit. Normal maps do not change the actual shape of the surface, only the lighting.
In case the material has a normal map authored using the left handed convention, the y component of normalScale
should be negated to compensate for the different handedness.
</p>
<h3>[property:Integer normalMapType]</h3>
......
......@@ -87,7 +87,8 @@
<p>材质是否使用morphTargets。默认值为false。</p>
<h3>[property:Number size]</h3>
<p>设置点的大小。默认值为1.0。</p>
<p>设置点的大小。默认值为1.0。<br/>
Will be capped if it exceeds the hardware dependent parameter [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParameter gl.ALIASED_POINT_SIZE_RANGE].</p>
<h3>[property:Boolean sizeAttenuation]</h3>
<p>指定点的大小是否因相机深度而衰减。(仅限透视摄像头。)默认为true。 </p>
......
......@@ -43,9 +43,6 @@
<li>
循环变量必须是*i*。
</li>
<li>
循环必须使用某种空格格式。
</li>
</ul>
<code>
#pragma unroll_loop_start
......@@ -310,6 +307,12 @@ this.extensions = {
它也可以作为一个字符串直接传递或者通过AJAX加载。
</p>
<h3>[property:String glslVersion]</h3>
<p>
Defines the GLSL version of custom shader code. Only relevant for WebGL 2 in order to define whether to specify
GLSL 3.0 or not. Valid values are *THREE.GLSL1* or *THREE.GLSL3*. Default is *null*.
</p>
<h3>[property:String index0AttributeName]</h3>
<p> 如果设置,则调用[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation gl.bindAttribLocation]
将通用顶点索引绑定到属性变量。默认值未定义。
......@@ -333,10 +336,6 @@ this.extensions = {
<p> When set to true, morph normal attributes are available in the vertex shader. Default is *false*.
</p>
<h3>[property:WebGLProgram program]</h3>
<p> 与此材质相关联的编译后的shader程序,由[page:WebGLRenderer]生成。您应该不需要访问此属性。
</p>
<h3>[property:Boolean flatShading]</h3>
<p> 定义材质是否使用平面着色进行渲染。默认值为false。
</p>
......
......@@ -41,7 +41,7 @@
<h3>[name]( [param:Object parameters] )</h3>
<p> [page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。
材质的任何属性都可以从此处传入(包括从[page:Material]]继承的任何属性)。<br /><br />
材质的任何属性都可以从此处传入(包括从[page:Material]继承的任何属性)。<br /><br />
</p>
......
......@@ -11,7 +11,7 @@
<h1>[name]</h1>
<p class="desc">
表示二维空间中的一个包围盒
表示二维空间中的一个轴对齐包围盒(axis-aligned bounding box,AABB)
</p>
......@@ -151,10 +151,11 @@
<h3>[method:Box2 set]( [param:Vector2 min], [param:Vector2 max] )</h3>
<p>
[page:Vector2 min] - (必须 ) 表示该盒子的下边界(x, y)。 <br>
[page:Vector2 min] - (必须) 表示该盒子的下边界(x, y)。 <br>
[page:Vector2 max] - (必须) 表示该盒子的上边界(x, y)。 <br /><br />
设置这个盒子的上下(x, y)的界限。
设置这个盒子的上下(x, y)的界限。<br>
Please note that this method only copies the values from the given objects.
</p>
<h3>[method:Box2 setFromCenterAndSize]( [param:Vector2 center], [param:Vector2 size] )</h3>
......
......@@ -11,7 +11,7 @@
<h1>[name]</h1>
<p class="desc">
在3D空间中表示一个盒子或立方体。其主要用于表示物体在世界坐标中的边界框
表示二维空间中的一个轴对齐包围盒(axis-aligned bounding box,AABB)
</p>
<h2>代码示例</h2>
......@@ -66,7 +66,7 @@
<h2>方法(Methods)</h2>
<h3>[method:Box3 applyMatrix4]( [param:Matrix4 matrix] )</h3>
<h3>[method:this applyMatrix4]( [param:Matrix4 matrix] )</h3>
<p>
[page:Matrix4 matrix] - 要应用的 [page:Matrix4] <br /><br />
......@@ -97,7 +97,7 @@
当传入的值 [page:Vector3 point] 在包围盒内部或者边界都会返回true。
</p>
<h3>[method:Box3 copy]( [param:Box3 box] )</h3>
<h3>[method:this copy]( [param:Box3 box] )</h3>
<p>
[page:Box3 box] - 需要复制的包围盒 [page:Box3] 。<br /><br />
......@@ -119,29 +119,30 @@
返回true如果传入的值与当前的对象 [page:Box3 box] 有相同的上下边界。
</p>
<h3>[method:Box3 expandByObject]( [param:Object3D object] )</h3>
<h3>[method:this expandByObject]( [param:Object3D object] )</h3>
<p>
[page:Object3D object] - 包裹在包围盒中的3d对象 [page:Object3D]。<br /><br />
扩展此包围盒的边界,使得对象及其子对象在包围盒内,包括对象和子对象的世界坐标的变换。
The function may result in a larger box than strictly necessary.
</p>
<h3>[method:Box3 expandByPoint]( [param:Vector3 point] )</h3>
<h3>[method:this expandByPoint]( [param:Vector3 point] )</h3>
<p>
[page:Vector3 point] - 需要在包围盒中的点 [page:Vector3]。<br /><br />
扩展这个包围盒的边界使得该点([page:Vector3 point])在包围盒内。
</p>
<h3>[method:Box3 expandByScalar]( [param:float scalar] )</h3>
<h3>[method:this expandByScalar]( [param:float scalar] )</h3>
<p>
[page:float scalar] - 扩展包围盒的比例。<br /><br />
按 [page:float scalar] 的值展开盒子的每个维度。如果是负数,盒子的尺寸会缩小。
</p>
<h3>[method:Box3 expandByVector]( [param:Vector3 vector] )</h3>
<h3>[method:this expandByVector]( [param:Vector3 vector] )</h3>
<p>
[page:Vector3 vector] - 扩展包围盒的数值 [page:Vector3] 。<br /><br />
......@@ -181,12 +182,12 @@
返回包围盒的宽度,高度,和深度。
</p>
<h3>[method:Box3 intersect]( [param:Box3 box] )</h3>
<h3>[method:this intersect]( [param:Box3 box] )</h3>
<p>
[page:Box3 box] - 与包围盒的交集<br /><br />
返回此包围盒和 [page:Box3 box] 的交集,将此框的上界设置为两个框的max的较小部分,
将此包围盒的下界设置为两个包围盒的min的较大部分。
计算此包围盒和 [page:Box3 box] 的交集,将此框的上界设置为两个框的max的较小部分,
将此包围盒的下界设置为两个包围盒的min的较大部分。If there's no overlap, makes this box empty.
</p>
<h3>[method:Boolean intersectsBox]( [param:Box3 box] )</h3>
......@@ -223,32 +224,33 @@
注意,下界和上界相等的方框仍然包含一个点,即两个边界共享的那个点。
</p>
<h3>[method:Box3 makeEmpty]()</h3>
<h3>[method:this makeEmpty]()</h3>
<p>清空包围盒。</p>
<h3>[method:Box3 set]( [param:Vector3 min], [param:Vector3 max] )</h3>
<h3>[method:this set]( [param:Vector3 min], [param:Vector3 max] )</h3>
<p>
[page:Vector3 min] - [page:Vector3] 表示下边界每个纬度(x,y,z)的值。<br />
[page:Vector3 max] - [page:Vector3] 表示上边界每个纬度(x,y,z)的值。<br /><br />
设置包围盒上下边界每个纬度(x,y,z)的值。
设置包围盒上下边界每个纬度(x,y,z)的值。<br>
Please note that this method only copies the values from the given objects.
</p>
<h3>[method:Box3 setFromArray]( [param:Array array] ) [param:Box3 this]</h3>
<h3>[method:this setFromArray]( [param:Array array] ) [param:Box3 this]</h3>
<p>
array -- 数组当中的所有的点都将被包围盒包裹。<br /><br />
设置包围盒的上下边界使得数组 *array* 中的所有点的点都被包含在内。
</p>
<h3>[method:Box3 setFromBufferAttribute]( [param:BufferAttribute attribute] ) [param:Box3 this]</h3>
<h3>[method:this setFromBufferAttribute]( [param:BufferAttribute attribute] ) [param:Box3 this]</h3>
<p>
[page:BufferAttribute attribute] - 位置的缓冲数据,包含在返回的包围盒内。<br /><br />
设置此包围盒的上边界和下边界,以包含 [page:BufferAttribute attribute] 中的所有位置数据。
</p>
<h3>[method:Box3 setFromCenterAndSize]( [param:Vector3 center], [param:Vector3 size] ) [param:Box3 this]</h3>
<h3>[method:this setFromCenterAndSize]( [param:Vector3 center], [param:Vector3 size] ) [param:Box3 this]</h3>
<p>
[page:Vector3 center], - 包围盒所要设置的中心位置。 <br>
[page:Vector3 size] - 包围盒所要设置的x、y和z尺寸(宽/高/长)。<br /><br />
......@@ -256,22 +258,23 @@
将当前包围盒的中心点设置为 [page:Vector3 center] ,并将此包围盒的宽度,高度和深度设置为大小指定 [page:Vector3 size] 的值。
</p>
<h3>[method:Box3 setFromObject]( [param:Object3D object] )</h3>
<h3>[method:this setFromObject]( [param:Object3D object] )</h3>
<p>
[page:Object3D object] - 用来计算包围盒的3D对象 [page:Object3D]。<br /><br />
计算和世界轴对齐的一个对象 [page:Object3D] (含其子对象)的包围盒,计算对象和子对象的世界坐标变换。
The function may result in a larger box than strictly necessary.
</p>
<h3>[method:Box3 setFromPoints]( [param:Array points] )</h3>
<h3>[method:this setFromPoints]( [param:Array points] )</h3>
<p>
[page:Array points] - 计算出的包围盒将包含数组中所有的点 [page:Vector3 Vector3s]<br /><br />
设置此包围盒的上边界和下边界,以包含数组 [page:Array points] 中的所有点。
</p>
<h3>[method:Box3 translate]( [param:Vector3 offset] )</h3>
<h3>[method:this translate]( [param:Vector3 offset] )</h3>
<p>
[page:Vector3 offset] - 偏移方向和距离。<br /><br />
......@@ -279,9 +282,9 @@
偏移量为 [page:Vector3 offset] 大小。
</p>
<h3>[method:Box3 union]( [param:Box3 box] )</h3>
<h3>[method:this union]( [param:Box3 box] )</h3>
<p>
[page:Box3 box] - 要结合在一起的包围盒<br /><br />
[page:Box3 box] - 将被用于与该盒子计算并集的盒子<br /><br />
在 [page:Box3 box] 参数的上边界和已有box对象的上边界之间取较大者,而对两者的下边界取较小者,这样获得一个新的较大的联合盒子。
</p>
......
......@@ -88,7 +88,7 @@
<h3>[method:this set]( [param:Plane p0], [param:Plane p1], [param:Plane p2], [param:Plane p3], [param:Plane p4], [param:Plane p5] )</h3>
<p>
Sets the frustum from the passed planes. No plane order is implied.<br>
从传入的平面设置当前视锥体。没有隐式的顺序。<br>
Note that this method only copies the values from the given objects.
</p>
......
......@@ -116,7 +116,7 @@ m.elements = [ 11, 21, 31, 41,
<h3>[method:this compose]( [param:Vector3 position], [param:Quaternion quaternion], [param:Vector3 scale] )</h3>
<p>
设置将该对象由位置[page:Vector3 position],四元数[page:Quaternion quaternion] 和 缩放[page:Vector3 scale]
设置将该对象位置 [page:Vector3 position],四元数[page:Quaternion quaternion] 和 缩放[page:Vector3 scale] 组合变换的矩阵。
</p>
<h3>[method:this copy]( [param:Matrix4 m] )</h3>
......
......@@ -123,7 +123,7 @@
[page:Vector3 normal] - 单位长度的向量表示平面的法向量。<br />
[page:Float constant] - 原点到平面有符号距离。默认值为 *0*。<br /><br />
设置平面 [page:.normal normal] 的法线和常量 [page:.constant constant] 属性值。
设置平面 [page:.normal normal] 的法线和常量 [page:.constant constant] 属性值 by copying the values from the given normal
</p>
<h3>[method:Plane setComponents]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
......
......@@ -8,11 +8,11 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<h1>四元数([name])</h1>
<p class="desc">
Implementation of a [link:http://en.wikipedia.org/wiki/Quaternion quaternion].<br/>
Quaternions are used in three.js to represent [link:https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation rotations].
该类实现了 [link:http://en.wikipedia.org/wiki/Quaternion quaternion] 。<br/>
四元数在three.js中用于表示 [link:https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation rotation] (旋转)。
</p>
<h2>代码示例</h2>
......@@ -26,19 +26,19 @@
</code>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
<p>
[page:Float x] - x coordinate<br />
[page:Float y] - y coordinate<br />
[page:Float z] - z coordinate<br />
[page:Float w] - w coordinate
[page:Float x] - x 坐标<br />
[page:Float y] - y 坐标<br />
[page:Float z] - z 坐标<br />
[page:Float w] - w 坐标
</p>
<h2>Properties</h2>
<h2>属性</h2>
<h3>[property:Float x]</h3>
......@@ -49,91 +49,87 @@
<h3>[property:Float w]</h3>
<h2>Methods</h2>
<h2>方法</h2>
<h3>[method:Float angleTo]( [param:Quaternion q] )</h3>
<p>
Returns the angle between this quaternion and quaternion [page:Quaternion q] in radians.
以弧度返回该四元数与四元数 [page:Quaternion q] 之间的夹角。
</p>
<h3>[method:Quaternion clone]()</h3>
<p>
Creates a new Quaternion with identical [page:.x x], [page:.y y],
[page:.z z] and [page:.w w] properties to this one.
创建一个与该四元数具有相同[page:.x x]、[page:.y y]、[page:.z z]和[page:.w w]
属性的四元数。
</p>
<h3>[method:Quaternion conjugate]()</h3>
<p>
Returns the rotational conjugate of this quaternion. The conjugate of a quaternion
represents the same rotation in the opposite direction about the rotational axis.
返回该四元数的旋转共轭。
四元数的共轭表示的是,围绕旋转轴在相反方向上的相同旋转。
</p>
<h3>[method:Quaternion copy]( [param:Quaternion q] )</h3>
<p>
Copies the [page:.x x], [page:.y y], [page:.z z] and [page:.w w] properties
of [page:Quaternion q] into this quaternion.
复制四元数 [page:Quaternion q] 的 [page:.x x]、[page:.y y]、[page:.z z] 和 [page:.w w]
属性到该四元数中。
</p>
<h3>[method:Boolean equals]( [param:Quaternion v] )</h3>
<p>
[page:Quaternion v] - Quaternion that this quaternion will be compared to.<br /><br />
[page:Quaternion v] - 用于进行比较的四元数。<br /><br />
Compares the [page:.x x], [page:.y y], [page:.z z] and [page:.w w] properties of
[page:Quaternion v] to the equivalent properties of this quaternion to determine if they
represent the same rotation.
将四元数 [page:Quaternion v] 的 [page:.x x]、 [page:.y y]、 [page:.z z] 和 [page:.w w] 的属性
与当前四元数的对应属性相比较,以确定它们是否表示相同的旋转。
</p>
<h3>[method:Float dot]( [param:Quaternion v] )</h3>
<p>
Calculates the [link:https://en.wikipedia.org/wiki/Dot_product dot product] of
quaternions [page:Quaternion v] and this one.
计算四元数 [page:Quaternion v] 与当前四元数的[link:https://en.wikipedia.org/wiki/Dot_product dot product](点积)。
</p>
<h3>[method:Quaternion fromArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
[page:Array array] - array of format (x, y, z, w) used to construct the quaternion.<br />
[page:Integer offset] - (optional) an offset into the array.<br /><br />
[page:Array array] - 用于构造四元数的形如(x, y, z, w)的数组。<br />
[page:Integer offset] - (可选)数组的偏移量。(译者注:使用数组中从第offset元素算起的四个元素)<br /><br />
Sets this quaternion's [page:.x x], [page:.y y], [page:.z z] and [page:.w w] properties
from an array.
从一个数组来设置四元数的 [page:.x x]、 [page:.y y]、[page:.z z] 和 [page:.w w] 的属性。
</p>
<h3>[method:Quaternion identity]()</h3>
<p>
Sets this quaternion to the identity quaternion; that is, to the quaternion that represents "no rotation".
设置该四元数为 identity 四元数,即表示“不旋转”的四元数。
</p>
<h3>[method:Quaternion inverse]()</h3>
<p>
Inverts this quaternion - calculates the [page:.conjugate conjugate]. The quaternion is assumed to have unit length.
翻转该四元数 —— 计算 [page:.conjugate conjugate] 。假定该四元数具有单位长度。
</p>
<h3>[method:Float length]()</h3>
<p>Computes the [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) of this quaternion, considered as a 4 dimensional vector.</p>
<p>计算四元数的 [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(欧几里得长度,直线长度),视为一个四维向量。</p>
<h3>[method:Float lengthSq]()</h3>
<p>
Computes the squared [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(straight-line length) of this quaternion, considered as a 4 dimensional
vector. This can be useful if you are comparing the lengths of two quaternions,
as this is a slightly more efficient calculation than [page:.length length]().
计算四元数 [link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean length]
(欧几里得长度,直线长度)的平方,视为一个四维向量。
如果要比较两个四元数的长度,这可能会十分有用,
因为这比 [page:.length length]() 的效率稍高一些。
</p>
<h3>[method:Quaternion normalize]()</h3>
<p>
[link:https://en.wikipedia.org/wiki/Normalized_vector Normalizes] this quaternion - that is,
calculated the quaternion that performs the same rotation as this one, but has [page:.length length]
equal to *1*.
[link:https://en.wikipedia.org/wiki/Normalized_vector Normalizes](归一化)四元数 ——
即计算与该四元数具有相同旋转、但长度为*1*的四元数。
</p>
<h3>[method:Quaternion multiply]( [param:Quaternion q] )</h3>
<p>Multiplies this quaternion by [page:Quaternion q].</p>
<p>将该四元数与[page:Quaternion q]相乘。</p>
<h3>[method:Quaternion multiplyQuaternions]( [param:Quaternion a], [param:Quaternion b] )</h3>
<p>
Sets this quaternion to [page:Quaternion a] x [page:Quaternion b].<br />
Adapted from the method outlined [link:http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm here].
将该四元数设为 [page:Quaternion a] x [page:Quaternion b] 。<br />
改编自 [link:http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm here] 所概述的方法。
</p>
<h3>[method:Quaternion premultiply]( [param:Quaternion q] )</h3>
......@@ -165,22 +161,22 @@
</p>
<h3>[method:Quaternion set]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
<p>Sets [page:.x x], [page:.y y], [page:.z z], [page:.w w] properties of this quaternion.</p>
<p>设置该四元数的 [page:.x x]、[page:.y y]、[page:.z z]和[page:.w w]属性。</p>
<h3>[method:Quaternion setFromAxisAngle]( [param:Vector3 axis], [param:Float angle] )</h3>
<p>
Sets this quaternion from rotation specified by [page:Vector3 axis] and [page:Float angle].<br />
Adapted from the method [link:http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm here].<br />
*Axis* is assumed to be normalized, *angle* is in radians.
从由 [page:Vector3 axis](轴) 和 [page:Float angle](角度)所给定的旋转来设置该四元数。<br />
改编自 [link:http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm here] 所述的方法。<br />
假定*Axis*已被归一化,*angle*以弧度来表示。
</p>
<h3>[method:Quaternion setFromEuler]( [param:Euler euler] )</h3>
<p>Sets this quaternion from the rotation specified by [page:Euler] angle.</p>
<p>从由 [page:Euler] 角所给定的旋转来设置该四元数。</p>
<h3>[method:Quaternion setFromRotationMatrix]( [param:Matrix4 m] )</h3>
<p>
Sets this quaternion from rotation component of [page:Matrix4 m].<br />
Adapted from the method [link:http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm here].
从[page:Matrix4 m]的旋转分量中来设置该四元数。<br />
改编自 [link:http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm here] 所概述的方法。
</p>
<h3>[method:Quaternion setFromUnitVectors]( [param:Vector3 vFrom], [param:Vector3 vTo] )</h3>
......@@ -193,30 +189,30 @@
<h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
[page:Array array] - An optional array to store the quaternion. If not specified, a new array will be created.<br/>
[page:Integer offset] - (optional) if specified, the result will be copied
into this [page:Array].<br /><br />
[page:Array array] - (可选)存储该四元数的数组。若未指定该参数,则将创建一个新数组。<br/>
[page:Integer offset] - (可选)若指定了该值,结果将会被拷贝到该
[page:Array]。<br /><br />
Returns the numerical elements of this quaternion in an array of format [x, y, z, w].
在形如[x, y, z, w]的数组中,返回四元数中的数字元素。
</p>
<h3>[method:this fromBufferAttribute]( [param:BufferAttribute attribute], [param:Integer index] )</h3>
<p>
[page:BufferAttribute attribute] - the source attribute.<br />
[page:Integer index] - index in the attribute.<br /><br />
[page:BufferAttribute attribute] - 源 attribute。<br />
[page:Integer index] - attribute 中的索引。<br /><br />
Sets [page:.x x], [page:.y y], [page:.z z], [page:.w w] properties of this quaternion from the [page:BufferAttribute attribute].
从 [page:BufferAttribute attribute] 中设置该四元数的[page:.x x]、 [page:.y y]、 [page:.z z]、 [page:.w w]属性。
</p>
<h2>Static Methods</h2>
<h2>静态方法</h2>
<p>
Static methods (as opposed to instance methods) are designed to be called directly from the class,
rather than from a specific instance. So to use the static version of, call it like so:
静态方法(相对于实例方法)被设计用来直接从类进行调用,而非从特定的实例上进行调用。
要使用静态版本,需要按照如下方式来调用:
<code>
THREE.Quaternion.slerp( qStart, qEnd, qTarget, t );
</code>
By contrast, to call the 'normal' or instanced slerp method, you would do the following:
作为对比,要调用“正常”或实例的 slerp 方法,则进行如下操作:
<code>
//instantiate a quaternion with default values
var q = new THREE.Quaternion();
......@@ -264,7 +260,7 @@ q.slerp( qb, t )
<!-- Note: Do not add non-static methods to the bottom of this page. Put them above the <h2>Static Methods</h2> -->
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -194,7 +194,7 @@
该向量必须经过标准化(使用[page:Vector3.normalize]),这样才能使方法正常运行。
<br /><br />
将传入的参数赋值给射线的[page:.origin origin]和[page:.direction direction]。
Sets this ray's [page:.origin origin] and [page:.direction direction] properties by copying the values from the given objects.
</p>
......
......@@ -16,7 +16,7 @@
<h3>[name]( [param:Vector3 center], [param:Float radius] )</h3>
<p>
[page:Vector3 center] - 球心的位置,默认值是一个位于(0, 0, 0)的[page:Vector3]。<br />
[page:Float radius] - 球的半径,默认值是0<br /><br />
[page:Float radius] - 球的半径,默认值是-1<br /><br />
创建一个新的[name]。
......@@ -117,7 +117,8 @@
[page:Vector3 center] - 球心位置。<br />
[page:Float radius] - 球的半径。<br /><br />
设置球的[page:.center center]和[page:.radius radius]属性。
设置球的[page:.center center]和[page:.radius radius]属性。<br>
Please note that this method only copies the values from the given center.
</p>
<h3>[method:Sphere setFromPoints]( [param:Array points], [param:Vector3 optionalCenter] )</h3>
......
......@@ -20,8 +20,8 @@
<p>
[page:Float radius] - 半径值,或者说从该点到原点的
[link:https://en.wikipedia.org/wiki/Euclidean_distance Euclidean distance](欧几里得距离,即直线距离)。默认值为*1.0*。<br />
[page:Float phi] - polar angle from the y (up) axis. Default is *0*.<br />
[page:Float theta] - equator angle around the y (up) axis. Default is *0*.<br /><br />
[page:Float phi] - polar angle in radians from the y (up) axis. Default is *0*.<br />
[page:Float theta] - equator angle in radians around the y (up) axis. Default is *0*.<br /><br />
The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z.
</p>
......
......@@ -120,7 +120,8 @@
<h3>[method:Triangle set]( [param:Vector3 a], [param:Vector3 b], [param:Vector3 c] ) [param:Triangle this]</h3>
<p>
将三角形的[page:.a a]、[page:.b b]和[page:.c c]属性设置为所传入的[page:vector3 vector3]。
将三角形的[page:.a a]、[page:.b b]和[page:.c c]属性设置为所传入的[page:vector3 vector3]。<br>
Please note that this method only copies the values from the given objects.
</p>
<h3>[method:Triangle setFromPointsAndIndices]( [param:Array points], [param:Integer i0], [param:Integer i1], [param:Integer i2] ) [param:Triangle this]</h3>
......
......@@ -105,6 +105,9 @@
将该向量乘以四阶矩阵m(第四个维度隐式地为1),and divides by perspective.
</p>
<h3>[method:this applyNormalMatrix]( [param:Matrix3 m] )</h3>
<p>Multiplies this vector by normal matrix [page:Matrix3 m] and normalizes the result.</p>
<h3>[method:this applyQuaternion]( [param:Quaternion quaternion] )</h3>
<p>
将[page:Quaternion]变换应用到该向量。
......@@ -311,7 +314,7 @@
normal from this vector.
</p>
<h3>[method:this projectOnVector]( [param:Vector3] )</h3>
<h3>[method:this projectOnVector]( [param:Vector3 v] )</h3>
<p>投影([link:https://en.wikipedia.org/wiki/Vector_projection Projects])该向量到向量[page:Vector3 v]上。</p>
<h3>[method:this reflect]( [param:Vector3 normal] )</h3>
......@@ -357,6 +360,11 @@
设置该向量的[page:.x x]值、[page:.y y]值和[page:.z z]值。
</p>
<h3>[method:this setFromMatrix3Column]( [param:Matrix3 matrix], [param:Integer index] )</h3>
<p>
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] components from [page:Integer index] column of [page:Matrix3 matrix].
</p>
<h3>[method:this setFromMatrixPosition]( [param:Matrix4 m] )</h3>
<p>
从变换矩阵([link:https://en.wikipedia.org/wiki/Transformation_matrix transformation matrix])[page:Matrix4 m]中,
......
......@@ -10,18 +10,17 @@
<body>
[page:Mesh] &rarr;
<h1>[name]</h1>
<h1>实例化网格([name])</h1>
<p class="desc">
A special version of [page:Mesh] with instanced rendering support. Use [name] if you have to render a large number of
objects with the same geometry and material but with different world transformations. The usage of [name] will help you
to reduce the number of draw calls and thus improve the overall rendering performance in your application.
一种具有实例化渲染支持的特殊版本的[page:Mesh]。你可以使用 [name] 来渲染大量具有相同几何体与材质、但具有不同世界变换的物体。
使用 [name] 将帮助你减少 draw call 的数量,从而提升你应用程序的整体渲染性能。
</p>
<p>
The current implementation requires that materials are not shared between [name] and other 3D objects.
当前的实现需要[name]和其它3D物体间不共享材质。
</p>
<h2>Examples</h2>
<h2>示例</h2>
<p>
[example:webgl_instancing_dynamic WebGL / instancing / dynamic]<br />
......@@ -31,60 +30,59 @@
[example:webgl_instancing_raycast WebGL / instancing / raycast]
</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:BufferGeometry geometry], [param:Material material], [param:Integer count] )</h3>
<p>
[page:Geometry geometry] - an instance of [page:BufferGeometry].<br />
[page:Material material] - an instance of [page:Material]. Default is a new [page:MeshBasicMaterial].<br />
[page:Integer count] - the number of instances.<br />
[page:Geometry geometry] - 一个 [page:BufferGeometry] 的实例。<br />
[page:Material material] - 一个 [page:Material] 的实例。默认为一个新的 [page:MeshBasicMaterial] 。<br />
[page:Integer count] - 实例的数量<br />
</p>
<h2>Properties</h2>
<h2>属性</h2>
<p>See the base [page:Mesh] class for common properties.</p>
<h3>[property:Integer count]</h3>
<p>
The number of instances. The *count* value passed into the constructor represents the maximum number of
instances of this mesh. You can change the number of instances at runtime to an integer value
in the range [0, count].
实例的数量。被传入到构造函数中的*count*表示mesh实例数量的最大值。
你可以在运行时改变这个数值到 [0, count] 区间的一个整数。
</p>
<p>
If you need more instances than the original count value, you have to create a new [name].
如果你需要比原先的数量更多的实例数量,你需要创建一个新的[name]。
</p>
<h3>[property:BufferAttribute instanceMatrix]</h3>
<p>
Represents the local transformation of all instances.
You have to set its [page:BufferAttribute.needsUpdate needsUpdate] flag to true if you modify instanced data via [page:.setMatrixAt]().
表示所有实例的本地变换。
如果你要通过 [page:.setMatrixAt]() 来修改实例数据,你必须将它的 [page:BufferAttribute.needsUpdate needsUpdate] 标识为 true 。
</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>See the base [page:Mesh] class for common methods.</p>
<h3>[method:null getMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</h3>
<p>
[page:Integer index]: The index of an instance. Values have to be in the range [0, count].
[page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
</p>
<p>
[page:Matrix4 matrix]: This 4x4 matrix will be set to the local transformation matrix of the defined instance.
[page:Matrix4 matrix]: 该4x4矩阵将会被设为已定义实例的本地变换矩阵。
</p>
<p>
Get the local transformation matrix of the defined instance.
获得已定义实例的本地变换矩阵。
</p>
<h3>[method:null setMatrixAt]( [param:Integer index], [param:Matrix4 matrix] )</h3>
<p>
[page:Integer index]: The index of an instance. Values have to be in the range [0, count].
[page:Integer index]: 实例的索引。值必须在 [0, count] 区间。
</p>
<p>
[page:Matrix4 matrix]: A 4x4 matrix representing the local transformation of a single instance.
[page:Matrix4 matrix]: 一个4x4矩阵,表示单个实例本地变换。
</p>
<p>
Sets the given local transformation matrix to the defined instance.
设置给定的本地变换矩阵到已定义的实例。
</p>
<h2>Source</h2>
<h2>源代码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -85,6 +85,10 @@
返回一个LOD对象及其所关联的在特定距离中的物体。
</p>
<h3>[method:integer getCurrentLevel]()</h3>
<p>
Get the currently active LOD level. As index of the levels array.
</p>
<h3>[method:Object3D getObjectForDistance]( [param:Float distance] )</h3>
<p>
......
......@@ -14,7 +14,7 @@
<p class="desc">
表示基于以三角形为[link:https://en.wikipedia.org/wiki/Polygon_mesh polygon mesh](多边形网格)的物体的类。
同时也作为其他类的基类,例如[page:SkinnedMesh]。
同时也作为其他类的基类,例如[page:SkinnedMesh]。
</p>
......@@ -49,7 +49,7 @@
<h3>[property:Material material]</h3>
<p>
由[page:Material]基类或者一个包含材质的数组派生而来的材质实例,定义了物体的外观。默认值是一个具有随机颜色的[page:MeshBasicMaterial]。
由[page:Material]基类或者一个包含材质的数组派生而来的材质实例,定义了物体的外观。默认值是一个[page:MeshBasicMaterial]。
</p>
<h3>[property:Array morphTargetInfluences]</h3>
......
......@@ -27,7 +27,7 @@
<p>
[page:Geometry geometry] —— (可选)是一个[page:Geometry]或者[page:BufferGeometry]的实例,默认值是一个新的[page:BufferGeometry]。
<br />
[page:Material material] —— (可选) 是一个对象,默认值是一个具有随机颜色的新的[page:PointsMaterial]。
[page:Material material] —— (可选) 是一个对象,默认值是一个[page:PointsMaterial]。
</p>
......@@ -42,7 +42,7 @@
<h3>[property:Material material]</h3>
<p>
[page:Material]的实例。定义了物体的外观。默认值是一个具有随机颜色的[page:PointsMaterial]。
[page:Material]的实例。定义了物体的外观。默认值是一个的[page:PointsMaterial]。
</p>
<h3>[property:Array morphTargetInfluences]</h3>
......
......@@ -13,33 +13,33 @@
<h1>[name]</h1>
<p class="desc">
Since r118 [page:WebGLRenderer] automatically uses a WebGL 2 rendering context. When upgrading an existing project to
=> r118, applications might break because of two reasons:
自r118起,[page:WebGLRenderer]会自动使用 WebGL 2 渲染上下文。当升级一个已存在的项目到 => r118 ,
应用程序可能会因为下列两种原因而损坏:
<ul>
<li>Custom shader code needs to be GLSL 3.0 conform.</li>
<li>自定义着色器代码必须符合GLSL 3.0。</li>
<li>WebGL 1 extension checks have to be changed.</li>
</ul>
If you can't afford the time to upgrade your code but still want to use the latest version, you can use [name]. This
version of the renderer will enforce a WebGL 1 rendering context.
如果你不能够花时间来升级你的代码,但仍然想要使用最新版本,那你就可以使用[name]。
这一版本的渲染器会强制使用 WebGL 1 渲染上下文。
</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( [param:Object parameters] )</h3>
<p>
Creates a new [name].
</p>
<h2>Properties</h2>
<h2>属性</h2>
<p>See the base [page:WebGLRenderer] class for common properties.</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>See the base [page:WebGLRenderer] class for common methods.</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -39,7 +39,7 @@
[page:Number anisotropy] - 默认是 *1*. 参见[page:Texture.anistropy]<br />
[page:Constant encoding] - 默认是[page:Textures LinearEncoding]. <br />
[page:Boolean depthBuffer] - 默认是*true*.如果不需要就设为false <br />
[page:Boolean stencilBuffer] - 默认是*true*.如果不需要就设为false<br /><br />
[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
创建一个新[name]
</p>
......
......@@ -34,10 +34,10 @@
[page:Constant minFilter] - 默认是[page:Textures LinearFilter]. <br />
[page:Constant format] - 默认是[page:Textures RGBAFormat]. <br />
[page:Constant type] - 默认是[page:Textures UnsignedByteType]. <br />
[page:Number anisotropy] - 默认是*1*. 参见[page:Texture.anistropy]<br />
[page:Number anisotropy] - 默认是*1*. 参见[page:Texture.anisotropy]<br />
[page:Constant encoding] - 默认是[page:Textures LinearEncoding]. <br />
[page:Boolean depthBuffer] - 默认是*true*. 如果不需要就设为false <br />
[page:Boolean stencilBuffer] - 默认是*true*. 如果不需要就设为false <br /><br />
[page:Boolean stencilBuffer] - default is *false*. Set this to true if you need it.<br /><br />
创建一个新[name]
</p>
......@@ -81,7 +81,7 @@
<h3>[property:boolean stencilBuffer]</h3>
<p>
渲染到模板缓冲区。默认true.
Renders to the stencil buffer. Default is false.
</p>
<h3>[property:DepthTexture depthTexture]</h3>
......
......@@ -363,7 +363,7 @@
<h3>[method:null render]( [param:Object3D scene], [param:Camera camera] )</h3>
<p>
用相机([page:Camera camera])渲染一个场景([page:Scene scene])<br />
用相机([page:Camera camera])渲染一个场景([page:Scene scene])或是其它类型的[page:Object3D object]。<br />
渲染一般是在canvas上完成的,或者是[page:WebGLRenderTarget renderTarget](如果有指定)<br />
......@@ -376,10 +376,10 @@
<p>使用相机和指定材质渲染缓冲几何组。</p>
<h3>[method:null renderBufferImmediate]( [param:Object3D object], [param:WebGLProgram program] )</h3>
<p>object - 一个[page:Object3D]实例<br />
program - 一个[page:WebGLProgram]实例<br />
<p>object - an instance of [page:Object3D]<br />
program - an instance of [page:WebGLProgram]<br />
渲染即使缓冲,由renderObjectImmediate对象调用
Renders an instance of [page:ImmediateRenderObject],由renderObjectImmediate对象调用。
</p>
<h3>[method:null setAnimationLoop]( [param:Function callback] )</h3>
......
......@@ -10,7 +10,9 @@
<body>
<h1>[name]</h1>
<p class="desc">Uniform工具. 支持uniform变量的合并和克隆</p>
<p class="desc">
Provides utility functions for managing uniforms.
</p>
<h2>方法</h2>
......
......@@ -12,7 +12,7 @@
<h1>场景([name])</h1>
<p class="desc">
场景允许你在什么地方、摆放什么东西来交给three.js来渲染,这是你放置物体、灯光和摄像机的地方。</p>
场景能够让你在什么地方、摆放什么东西来交给three.js来渲染,这是你放置物体、灯光和摄像机的地方。</p>
<h2>构造器</h2>
......@@ -34,14 +34,15 @@
<h3>[property:Object background]</h3>
<p>
若不为空,在渲染场景的时候将设置背景,且背景总是首先被渲染的。
可以设置一个用于的“clear”的[page:Color](颜色)、一个覆盖canvas的[page:Texture](纹理),或是一个[page:CubeTexture]。默认值为null。
若不为空,在渲染场景的时候将设置背景,且背景总是首先被渲染的。
可以设置一个用于的“clear”的[page:Color](颜色)、一个覆盖canvas的[page:Texture](纹理),
或是 a cubemap as a [page:CubeTexture] or [page:WebGLCubeRenderTarget] or an equirectangular as a [page:Texture]。默认值为null。
</p>
<h3>[property:Texture environment]</h3>
<p>
If not null, this texture is set as the environment map for all physical materials in the scene.
However, it's not possible to overwrite an existing texture assigned to [page:MeshStandardMaterial.envmap]. Default is null.
若该值不为null,则该纹理贴图将会被设为场景中所有物理材质的环境贴图。
然而,该属性不能够覆盖已存在的、已分配给 [page:MeshStandardMaterial.envMap] 的贴图。默认为null。
</p>
<h3>[property:Fog fog]</h3>
......@@ -55,11 +56,6 @@
<h2>方法</h2>
<h3>[method:null dispose]()</h3>
<p>
清除[page:WebGLRenderer]内部所缓存的场景相关的数据。
</p>
<h3>[method:JSON toJSON]</h3>
<p>
meta -- 包含有元数据的对象,例如场景中的的纹理或图片。
......
......@@ -42,12 +42,15 @@
<h2>属性</h2>
<h3>请参阅[page:Texture]页面。</h3>
<p>
See the base [page:Texture Texture] class for common properties.
</p>
<h2>方法</h2>
<h3>请参阅[page:Texture]页面。</h3>
<p>
See the base [page:Texture Texture] class for common methods.
</p>
<h2>源代码</h2>
......
......@@ -12,18 +12,18 @@
<h1>[name]</h1>
<p class="desc">Creates a texture directly from raw data, width and height.</p>
<p class="desc">从原始数据(raw data)、宽(width)、高(height)来直接创建一个纹理贴图。</p>
<h2>Constructor</h2>
<h2>构造函数</h2>
<h3>[name]( data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy )</h3>
<p>
The data argument must be an [link:https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView ArrayBufferView].
Further parameters correspond to the properties inherited from [page:Texture], where both magFilter and minFilter default to THREE.NearestFilter. The properties flipY and generateMipmaps are intially set to false.
data 参数必须是一个 [link:https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView ArrayBufferView] 。
其他参数对应于继承自 [page:Texture] 的属性,其中 magFilter 与 minFilter 默认为 THREE.NearestFilter。属性 flipY 和 generateMipmaps 初始设为 false。
</p>
<p>
The interpretation of the data depends on type and format:
数据的解释取决于type与format:
If the type is THREE.UnsignedByteType, a Uint8Array will be useful for addressing the texel data.
If the format is THREE.RGBAFormat, data needs four values for one texel; Red, Green, Blue and Alpha (typically the opacity). Similarly, THREE.RGBFormat specifies a format where only three values are used for each texel.<br />
......@@ -59,17 +59,24 @@
var texture = new THREE.DataTexture( data, width, height, THREE.RGBFormat );
</code>
<h2>Properties</h2>
<h2>属性</h2>
<p>
See the base [page:Texture Texture] class for common properties.
</p>
<h3>[property:Image image]</h3>
<p>
Overridden with a record type holding data, width and height.
</p>
<h2>Methods</h2>
<h2>方法</h2>
<p>
See the base [page:Texture Texture] class for common methods.
</p>
<h2>Source</h2>
<h2>源码</h2>
<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -39,6 +39,14 @@
共有属性请参见其基类[page:Texture Texture]。
</p>
<h3>[property:number wrapR]</h3>
<p>
This defines how the texture is wrapped in the depth direction.<br />
The default is [page:Textures THREE.ClampToEdgeWrapping], where the edge is clamped to the outer edge texels.
The other two choices are [page:Textures THREE.RepeatWrapping] and [page:Textures THREE.MirroredRepeatWrapping].
See the [page:Textures texture constants] page for details.
</p>
<h2>方法</h2>
<p>
......
......@@ -13,7 +13,8 @@
<h1>深度纹理([name])</h1>
<p class="desc">
创建一个作为深度纹理贴图来使用的纹理。需要支持[link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture]扩展。
This class can be used to automatically save the depth information of a rendering into a texture.
When using a WebGL 1 rendering context, [name] requires support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
</p>
<h2>例子</h2>
......@@ -29,11 +30,11 @@
[page:Number height] -- 纹理的高度。<br />
[page:Constant type] -- 默认值是[page:Textures THREE.UnsignedShortType]。
[page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
请参阅[page:Textures type constants](类型常量)来了解其他选项。<br />
[page:Constant mapping] --
请参阅[page:Textures mapping constants](映射模式常量)来了解其他选项。<br />
请参阅[page:Textures mapping mode constants](映射模式常量)来了解其他选项。<br />
[page:Constant wrapS] -- 默认值是[page:Textures THREE.ClampToEdgeWrapping].
请参阅[page:Textures wrap mode constants](包裹模式常量)来了解其他选项。<br />
......@@ -71,7 +72,7 @@
<h3>[page:Texture.type .type]</h3>
<p>
默认值是[page:Textures THREE.UnsignedShortType]。
Default is [page:Textures THREE.UnsignedShortType] when unsing [page:Textures DepthFormat] and [page:Textures THREE.UnsignedInt248Type] when using [page:Textures DepthStencilFormat].
请参阅[page:Textures format constants]来了解详细信息。<br />
</p>
......
......@@ -117,6 +117,17 @@
请参阅[page:Textures texture constants]页面来了解其它格式。
</p>
<h3>[property:String internalFormat]</h3>
<p>
The default value is obtained using a combination of [page:Texture.format .format] and
[page:Texture.type .type].<br />
The GPU format allows the developer to specify how the data is going to be
stored on the GPU.<br /><br />
See the [page:Textures texture constants] page for details regarding all supported internal formats.
</p>
<h3>[property:number type]</h3>
<p>
这个值必须与[page:Texture.format .format]相对应。默认值为[page:Textures THREE.UnsignedByteType],
......@@ -178,7 +189,7 @@
<h3>[property:boolean premultiplyAlpha]</h3>
<p>
If set to *true*, the alpha channel, if present, is multiplied into the color channels when the texture is uploaded to the GPU. Defaut is *false*.<br /><br />
If set to *true*, the alpha channel, if present, is multiplied into the color channels when the texture is uploaded to the GPU. Default is *false*.<br /><br />
Note that this property has no effect for [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap].
You need to configure on bitmap creation instead. See [page:ImageBitmapLoader].
......
......@@ -31,6 +31,13 @@
</p>
</p>
<h2>Events</h2>
<h3>change</h3>
<p>
Fires when the camera has been transformed by the controls.
</p>
<h2>Properties</h2>
<h3>[property:Number alphaOffset]</h3>
......
......@@ -35,6 +35,13 @@
</p>
</p>
<h2>Events</h2>
<h3>change</h3>
<p>
Fires when the camera has been transformed by the controls.
</p>
<h2>Properties</h2>
<h3>[property:Boolean autoForward]</h3>
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册