Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mrdoob/three.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf836bbb074da979bc5eb8f131440bb4341350c1
Choose a base ref
...
head repository: mrdoob/three.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 696d7836d1fc56c4702a475e6991c4adef7357f4
Choose a head ref

Commits on Aug 26, 2020

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Brooooooklyn LongYinan
    Copy the full SHA
    d4fcaad View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    Brooooooklyn LongYinan
    Copy the full SHA
    8f796fe View commit details
  3. Copy the full SHA
    b79ab8a View commit details
  4. Copy the full SHA
    228250f View commit details
  5. Copy the full SHA
    ab267bb View commit details
  6. Copy the full SHA
    aa5445c View commit details
  7. Copy the full SHA
    3f6ee69 View commit details

Commits on Aug 27, 2020

  1. Copy the full SHA
    e3fc91b View commit details
  2. Merge pull request #20201 from Mugen87/dev53

    Editor: Remove usage of glslprep from Script.js.
    mrdoob authored Aug 27, 2020
    Copy the full SHA
    d4a7b69 View commit details
  3. Merge pull request #20190 from hassanMuhamad/dev

    Docs(Ar): Reference - Completed "Audio" section
    mrdoob authored Aug 27, 2020
    Copy the full SHA
    1ca4658 View commit details
  4. Merge pull request #20189 from Mugen87/dev51

    Examples: Assign equirect env map directly to Scene.background.
    mrdoob authored Aug 27, 2020
    Copy the full SHA
    7bf355c View commit details
  5. Copy the full SHA
    ad7b747 View commit details

Commits on Aug 28, 2020

  1. Copy the full SHA
    60db2fd View commit details
  2. Merge pull request #20214 from Mugen87/dev53

    Editor: Do not enforce sRGB encoding for DataTexture.
    mrdoob authored Aug 28, 2020
    Copy the full SHA
    c6d62fa View commit details

Commits on Aug 29, 2020

  1. Copy the full SHA
    2e0041d View commit details
  2. Copy the full SHA
    9f2226e View commit details
  3. Examples: Fixed webgl_decals.

    mrdoob committed Aug 29, 2020
    Copy the full SHA
    2b477f0 View commit details

Commits on Aug 30, 2020

  1. Copy the full SHA
    f7455b8 View commit details
  2. Copy the full SHA
    9dca824 View commit details
  3. Copy the full SHA
    10c9e41 View commit details
  4. r120.1

    mrdoob committed Aug 30, 2020
    Copy the full SHA
    696d783 View commit details
43 changes: 43 additions & 0 deletions docs/api/ar/audio/AudioContext.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!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://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext].<br /><br />

تستخدم داخليا من قبل فئتي [page: AudioListener AudioListener] و [page:AudioLoader AudioLoader].<br /><br />

يستخدم هذا [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API].
</p>



<h2>الوظائف (Methods)</h2>

<h3>[method:AudioContext getContext]()</h3>
<p>
تقوم بإرجاع قيمة المتغير *context* في النطاق الخارجي ، إذا تم تحديده ، أو قم بتعيينه على [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] جديدًا.
</p>

<h3>[method:AudioContext setContext]( [param:AudioContext value] )</h3>
<p>
تضبط المتغير *context* في النطاق الخارجي على *value*.
</p>


<h2>المصدر (Source)</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
112 changes: 112 additions & 0 deletions docs/api/ar/audio/AudioListener.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!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">
يمثل هذا المكون [link:https://developer.mozilla.org/de/docs/Web/API/AudioListener listener] افتراضيًا من جميع المؤثرات الصوتية الموضعية وغير الموضعية في المشهد.<br />
عادةً ما يُنشئ تطبيق three.js مثيلاً واحدًا من هذا الكائن. إنها معلمة تفسير إلزامية لكيانات الصوت مثل [page:Audio Audio] و [page:PositionalAudio PositionalAudio].<br />
في معظم الحالات ، يكون الكائن المستمع هو كائن فرعي للكاميرا. لذا فإن التحول ثلاثي الأبعاد للكاميرا يمثل التحول ثلاثي الأبعاد للمستمع.
</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_timing webaudio / timing ]<br />
[example:webaudio_visualizer webaudio / visualizer ]
</p>

<h2>المنشئ (Constructor)</h2>


<h3>[name]( )</h3>
<p>
يقوم بإنشاء AudioListener جديد.
</p>


<h2>الخصائص (Properties)</h2>

<h3>[property:AudioContext context]</h3>
<p>الـ[link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] الخاصة بـ[page:AudioListener listener] المعطاة في المنشئ.</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:AudioNode filter]</h3>
<p>الافتراضي هو *null*.</p>

<h3>[property:Number timeDelta]</h3>
<p>قيمة دلتا الخاصة بالوقت للكيانات الصوتية. استخدم في سياق [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/linearRampToValueAtTime AudioParam.linearRampToValueAtTimeDefault](). الافتراضي هو *0*.</p>

<h2>الوظائف (Methods)</h2>


<h3>[method:GainNode getInput]()</h3>
<p>
ترجع قيمة [page:AudioListener.gain gainNode].
</p>

<h3>[method:AudioListener removeFilter]()</h3>
<p>
اضبط قيمة [page:AudioListener.filter filter] على *null*.
</p>

<h3>[method:AudioNode getFilter]()</h3>
<p>
ترجع قيمة الخاصة بـ[page:AudioListener.filter filter].
</p>

<h3>[method:AudioListener setFilter]( [param:AudioNode value] )</h3>
<p>
تقوم بتعيين خاصية [page:AudioListener.filter filter] إلى *value*.
</p>

<h3>[method:Float getMasterVolume]()</h3>
<p>
إعادة *volume*.
</p>

<h3>[method:AudioListener setMasterVolume]( [param:Number value] )</h3>
<p>
ضبط مستوى الصوت (volume).
</p>


<h2>المصدر (Source)</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
137 changes: 137 additions & 0 deletions docs/api/ar/audio/PositionalAudio.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!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; [page:Audio] &rarr;

<h1>[name]</h1>

<p class="desc">
تقوم بإنشاء كائن صوتي موضعي (positional).<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 the PositionalAudio object (passing in the listener)
var sound = new THREE.PositionalAudio( listener );

// load a sound and set it as the PositionalAudio object's buffer
var audioLoader = new THREE.AudioLoader();
audioLoader.load( 'sounds/song.ogg', function( buffer ) {
sound.setBuffer( buffer );
sound.setRefDistance( 20 );
sound.play();
});

// create an object for the sound to play from
var sphere = new THREE.SphereBufferGeometry( 20, 32, 16 );
var material = new THREE.MeshPhongMaterial( { color: 0xff2200 } );
var mesh = new THREE.Mesh( sphere, material );
scene.add( mesh );

// finally add the sound to the mesh
mesh.add( sound );
</code>

<h2>أمثلة (Examples)</h2>

<p>
[example:webaudio_orientation webaudio / orientation ]<br />
[example:webaudio_sandbox webaudio / sandbox ]<br />
[example:webaudio_timing webaudio / timing ]
</p>

<h2>المنشئ (Constructor)</h2>

<h3>[name]( [param:AudioListener listener] )</h3>
<p>
listener — (ضرورية) كائن [page:AudioListener AudioListener] .
</p>


<h2>الخصائص (Properties)</h2>

<p>
تراجع فئة [page:Audio Audio] من أجل الخصائص الموروثة.
</p>

<h3>[property:PannerNode panner]</h3>
<p> خاصية [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode PannerNode] التابعة لـ*PositionalAudio*.</p>


<h2>الوظائف (Methods)</h2>

<p>
راجع فئة [page:Audio Audio] من أجل الوظائف الموروثة.
</p>

<h3>[method:PannerNode getOutput]()</h3>
<p>
ترجع الـ[page:PositionalAudio.panner panner].
</p>

<h3>[method:Float getRefDistance]()</h3>
<p>
تُرجع القيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/refDistance panner.refDistance].
</p>

<h3>[method:PositionalAudio setRefDistance]( [param:Float value] )</h3>
<p>
يضبط قيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/refDistance panner.refDistance].
</p>

<h3>[method:Float getRolloffFactor]()</h3>
<p>
تُرجع القيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/rolloffFactor panner.rolloffFactor].
</p>

<h3>[method:PositionalAudio setRolloffFactor]( [param:Float value] )</h3>
<p>
يضبط قيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/rolloffFactor panner.rolloffFactor].
</p>

<h3>[method:String getDistanceModel]()</h3>
<p>
تُرجع القيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/distanceModel panner.distanceModel].
</p>

<h3>[method:PositionalAudio setDistanceModel]( [param:String value] )</h3>
<p>
يضبط قيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/distanceModel panner.distanceModel].
</p>

<h3>[method:Float getMaxDistance]()</h3>
<p>
تُرجع القيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/maxDistance panner.maxDistance].
</p>

<h3>[method:PositionalAudio setMaxDistance]( [param:Float value] )</h3>
<p>
يضبط قيمة [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/maxDistance panner.maxDistance].
</p>

<h3>[method:PositionalAudio setDirectionalCone]( [param:Float coneInnerAngle], [param:Float coneOuterAngle], [param:Float coneOuterGain] )</h3>
<p>
يمكن استخدام هذه الطريقة لتحويل الصوت متعدد الاتجاهات إلى [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode directional sound].
</p>

<h2>المصدر (Source)</h2>

<p>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</p>
</body>
</html>
5 changes: 4 additions & 1 deletion docs/list.js
Original file line number Diff line number Diff line change
@@ -519,7 +519,10 @@ var list = {

"Audio": {
"Audio": "api/ar/audio/Audio",
"AudioAnalyser": "api/ar/audio/AudioAnalyser"
"AudioAnalyser": "api/ar/audio/AudioAnalyser",
"AudioContext": "api/ar/audio/AudioContext",
"AudioListener": "api/ar/audio/AudioListener",
"PositionalAudio": "api/ar/audio/PositionalAudio"
}

}
32 changes: 3 additions & 29 deletions editor/js/Script.js
Original file line number Diff line number Diff line change
@@ -90,6 +90,7 @@ function Script( editor ) {
editor.execute( new SetScriptValueCommand( editor, currentObject, currentScript, 'source', value ) );

}

return;

}
@@ -105,13 +106,15 @@ function Script( editor ) {
editor.execute( cmd );

}

if ( JSON.stringify( currentObject.material.uniforms ) !== JSON.stringify( json.uniforms ) ) {

var cmd = new SetMaterialValueCommand( editor, currentObject, 'uniforms', json.uniforms );
cmd.updatable = false;
editor.execute( cmd );

}

if ( JSON.stringify( currentObject.material.attributes ) !== JSON.stringify( json.attributes ) ) {

var cmd = new SetMaterialValueCommand( editor, currentObject, 'attributes', json.attributes );
@@ -218,35 +221,6 @@ function Script( editor ) {

case 'glsl':

try {

var shaderType = currentScript === 'vertexShader' ?
glslprep.Shader.VERTEX : glslprep.Shader.FRAGMENT;

glslprep.parseGlsl( string, shaderType );

} catch ( error ) {

if ( error instanceof glslprep.SyntaxError ) {

errors.push( {

lineNumber: error.line,
message: "Syntax Error: " + error.message

} );

} else {

console.error( error.stack || error );

}

}

if ( errors.length !== 0 ) break;
if ( renderer instanceof THREE.WebGLRenderer === false ) break;

currentObject.material[ currentScript ] = string;
currentObject.material.needsUpdate = true;
signals.materialChanged.dispatch( currentObject.material );
2 changes: 1 addition & 1 deletion editor/js/Sidebar.Material.js
Original file line number Diff line number Diff line change
@@ -1186,7 +1186,7 @@ function SidebarMaterial( editor ) {

if ( texture !== null ) {

if ( texture.encoding !== THREE.sRGBEncoding ) {
if ( texture.isDataTexture !== true && texture.encoding !== THREE.sRGBEncoding ) {

texture.encoding = THREE.sRGBEncoding;
var object = currentObject;
2 changes: 1 addition & 1 deletion editor/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// r120
// r120.1

const assets = [
'./',
Loading