language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | mrdoob | three.js | 4453bf03df58e32da37c810e56deefeafa6b30ff.json | prepare documentation for programmatic additions | docs/api/textures/Texture.html | @@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="utf-8">
+ <meta charset="utf-8" />
<script src="../../list.js"></script>
<script src="../../page.js"></script>
<link type="text/css" rel="stylesheet" href="../../page.css" /> | true |
Other | mrdoob | three.js | fcfac4ba5921a60bbb9d0d19dd9fd7551436d26d.json | update the contributing file for root usage | CONTRIBUTING.md | @@ -1,4 +1,4 @@
-# This board is for bug reports and feature requests only. If you need help, please use [stackoverflow](http://stackoverflow.com/questions/tagged/three.js).
+# The issues section is for bug reports and feature requests only. If you need help, please use [stackoverflow](http://stackoverflow.com/questio... | false |
Other | mrdoob | three.js | b51127000e8cd287b47d79f1af18a846a2e346b6.json | Add Maya ASCII JSON exporter | utils/exporters/maya/README.md | @@ -0,0 +1,24 @@
+# Three.js Maya Export
+
+Exports Maya models to Three.js' ASCII JSON format. Currently supports exporting the following:
+
+- Vertices
+- Faces
+- Normals
+- UV sets
+- Material indices
+- Vertex colors
+
+## Installation
+
+Copy the scripts and plug-ins folders to the appropriate maya ... | true |
Other | mrdoob | three.js | b51127000e8cd287b47d79f1af18a846a2e346b6.json | Add Maya ASCII JSON exporter | utils/exporters/maya/plug-ins/threeJsFileTranlator.py | @@ -0,0 +1,271 @@
+__author__ = 'Chris Lewis'
+__version__ = '0.1.0'
+__email__ = 'clewis1@c.ringling.edu'
+
+import sys
+import json
+
+import maya.cmds as mc
+from maya.OpenMaya import *
+from maya.OpenMayaMPx import *
+
+kPluginTranslatorTypeName = 'Three.js'
+kOptionScript = 'ThreeJsExportScript'
+kDef... | true |
Other | mrdoob | three.js | b51127000e8cd287b47d79f1af18a846a2e346b6.json | Add Maya ASCII JSON exporter | utils/exporters/maya/scripts/ThreeJsExportScript.mel | @@ -0,0 +1,37 @@
+// ThreeJsExportScript.mel
+// Author: Chris Lewis
+// Email: clewis1@c.ringling.edu
+
+global proc int ThreeJsExportScript(string $parent, string $action, string $settings, string $callback)
+{
+ if ($action == "post")
+ {
+ setParent $parent;
+ columnLayout -adj true;
+... | true |
Other | mrdoob | three.js | ed00cd63fac6a13c55ccdd40c7c55d6931c118de.json | make autoResize optional. Fixes #2969 | src/renderers/WebGLRenderer.js | @@ -293,15 +293,24 @@ THREE.WebGLRenderer = function ( parameters ) {
};
- this.setSize = function ( width, height ) {
+ this.setSize = function ( width, height, autoResize ) {
+
+ if ( autoResize === undefined ) {
+ autoResize = true;
+ }
_canvas.width = width * this.devicePixelRatio;
_canvas.height... | false |
Other | mrdoob | three.js | 4c35f20a438b255a42fa7581f60d6bb1e47c359b.json | add light documentation | docs/api/lights/Light.html | @@ -17,12 +17,20 @@ <h1>[name]</h1>
<h2>Constructor</h2>
<h3>[name]( [page:Integer hex] )</h3>
+ <div>
+ [page:Integer hex] β Numeric value of the RGB component of the color.
+ </div>
+ <div>
+ This creates a light with color.<br />
+ </div>
<h2>Properties</h2>
<h3>.[page:Color color]</h3>
-
+... | false |
Other | mrdoob | three.js | 6f30f4863b22065060515aeaf3caba843f7de233.json | update Raycaster documentation | docs/api/core/Raycaster.html | @@ -9,24 +9,77 @@
<body>
<h1>[name]</h1>
- <div class="desc">todo</div>
+ <div class="desc">
+ This class makes raycasting easier. Raycasting is used for picking and more.
+
+ </div>
<h2>Constructor</h2>
- <h3>[name]()</h3>
+ <h3>[name]( [page:Vector3 origin], [page:Vector3 direction], [page:Fl... | false |
Other | mrdoob | three.js | 4691b5f1b0460bfc5c0e26c28e8f7a8fa9acca05.json | Use process.hrtime() for Clock in node.js builds
As discussed in #2975. | utils/npm/header.js | @@ -1,3 +1,21 @@
var window = window || {};
var self = self || {};
+
+// High-resulution counter: emulate window.performance.now() for THREE.CLOCK
+if( window.performance === undefined ) {
+
+ window.performance = { };
+
+}
+
+if( window.performance.now === undefined ) {
+
+ window.performance.now = function () {
+... | false |
Other | mrdoob | three.js | e88ca555cb1c5397288cb78e2680116a30cc754b.json | update geometry documentation | docs/api/core/Geometry.html | @@ -9,7 +9,10 @@
<body>
<h1>[name]</h1>
- <div class="desc">Base class for geometries</div>
+ <div class="desc">
+ Base class for geometries.<br />
+ A geometry holds all data nessecary to describe a 3D model.
+ </div>
<h2>Example</h2>
@@ -44,42 +47,51 @@ <h3>.[page:String name]</h3>
<h3>.[page:... | false |
Other | mrdoob | three.js | 33c6134f6a5223e839296553ead9a7bf73713ef7.json | update clone Method to Face4 documentation | docs/api/core/Face4.html | @@ -92,7 +92,14 @@ <h3>.[page:Vector3 centroid]</h3>
Face centroid.
</div>
+ <h2>Methods</h2>
+ <h3>.clone()</h3>
+ <div>
+ Creates a new clone of the Face4 object.
+ </div>
+
+
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] | false |
Other | mrdoob | three.js | 2202a5feb80627cd2b729bb9d64d8da01277221b.json | update clone Method to Face3 documentation | docs/api/core/Face3.html | @@ -86,7 +86,14 @@ <h3>.[page:Vector3 centroid]</h3>
Face centroid.
</div>
+ <h2>Methods</h2>
+ <h3>.clone()</h3>
+ <div>
+ Creates a new clone of the Face3 object.
+ </div>
+
+
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] | false |
Other | mrdoob | three.js | 68fe0d9d8aba356ce641d099bfeee15c8167ebe8.json | update documentation for evendispatcher | docs/api/core/EventDispatcher.html | @@ -24,7 +24,9 @@ <h2>Example</h2>
};
var car = new Car();
-car.addEventListener( 'start', function ( event ) { alert( event.message ); } );
+car.addEventListener( 'start', function ( event ) {
+ alert( event.message );
+} );
car.start();
</code>
@@ -38,7 +40,7 @@ <h3>[name]()</h3>
<h2>Methods</... | false |
Other | mrdoob | three.js | e8c50b6794a3f61cb930b762b48346ecd836b2fd.json | add documentation for evendispatcher | docs/api/core/EventDispatcher.html | @@ -9,24 +9,59 @@
<body>
<h1>[name]</h1>
- <div class="desc">todo</div>
+ <div class="desc">JavaScript events for custom objects</div>
+
+ <h2>Example</h2>
+ <code>
+var Car = function () {
+
+ EventDispatcher.call( this );
+ this.start = function () {
+ this.dispatchEvent( { type: 'start', message: 'v... | false |
Other | mrdoob | three.js | f1dd1daf22c8640de503b70fe5be0594200e9422.json | add myself as author | src/renderers/WebGLRenderer2.js | @@ -3,6 +3,7 @@
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
* @author szimek / https://github.com/szimek/
+ * @author gero3 / https://github.com/gero3/
*/
THREE.WebGLRenderer2 = function ( parameters ) {
@@ -3294,4 +3295,4 @@ THREE.WebGLRenderer2 = function ( paramete... | false |
Other | mrdoob | three.js | dcd25863e4d083c1945fab6380bdf06543d7397e.json | Add isIntersectionSphere to sphere
Tets if two spheres intersect | src/math/Sphere.js | @@ -67,6 +67,12 @@ THREE.Sphere.prototype = {
},
+ isIntersectionSphere: function(sphere) {
+
+ return ( sphere.center.distanceToSquared( this.center ) <= ( this.radius * this.radius + sphere.radius * sphere.radius) );
+
+ },
+
clampPoint: function ( point, optionalTarget ) {
var deltaLengthSq = this.ce... | false |
Other | mrdoob | three.js | 5d6656506bdd25d01ab0e5b60591ff2a839b4db5.json | remove unused variable from Frustum.js | src/math/Frustum.js | @@ -189,6 +189,4 @@ THREE.Frustum.prototype = {
}
-};
-
-THREE.Frustum.__s0 = new THREE.Sphere();
\ No newline at end of file
+};
\ No newline at end of file | false |
Other | mrdoob | three.js | b358c94547ea3948841f433ee0a84879366ee56e.json | expand Frustum.contains() per @alteredq, @gero3 | src/math/Frustum.js | @@ -72,10 +72,25 @@ THREE.Frustum.prototype = {
contains: function ( object ) {
- var sphere = THREE.Frustum.__s0.copy( object.geometry.boundingSphere );
- sphere.transform( object.matrixWorld );
+ // this method is expanded inlined for performance reasons.
+ var matrix = object.matrixWorld;
+ var planes = t... | false |
Other | mrdoob | three.js | ddd0803d8ace4fb43e1950e7b60f26a7625b6631.json | Fix serialization error in Maya exporter | utils/exporters/maya/plug-ins/threeJsFileTranslator.py | @@ -24,7 +24,9 @@ def _iterencode(self, o, markers=None):
if '.' in s and len(s[s.index('.'):]) > FLOAT_PRECISION - 1:
s = '%.{0}f'.format(FLOAT_PRECISION) % o
while '.' in s and s[-1] == '0':
- s = s[-2]
+ s = s[:-1] # this actual... | false |
Other | mrdoob | three.js | bd7fda284d34cbb76ef120beed21ab55815e2089.json | add an improved version of the STLLoader | examples/js/loaders/STLLoader.js | @@ -8,7 +8,7 @@
* Supports both binary and ASCII encoded files, with automatic detection of type.
*
* Limitations: Binary decoding ignores header. There doesn't seem to be much of a use for it.
- * There is perhaps some question as to how valid it is to always assume little-endian-ness.
+ * There is perh... | false |
Other | mrdoob | three.js | 3c5986bf7996a00c91378337c6b528012e4955dd.json | incorporate Line3 into Plane. | src/math/Plane.js | @@ -115,12 +115,12 @@ THREE.extend( THREE.Plane.prototype, {
},
- isIntersectionLine: function ( startPoint, endPoint ) {
+ isIntersectionLine: function ( line ) {
// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.
- var startSign = this.distanceTo... | true |
Other | mrdoob | three.js | 3c5986bf7996a00c91378337c6b528012e4955dd.json | incorporate Line3 into Plane. | test/unit/math/Plane.js | @@ -131,24 +131,25 @@ test( "distanceToSphere", function() {
test( "isInterestionLine/intersectLine", function() {
var a = new THREE.Plane( new THREE.Vector3( 1, 0, 0 ), 0 );
- ok( a.isIntersectionLine( new THREE.Vector3( -10, 0, 0 ), new THREE.Vector3( 10, 0, 0 ) ), "Passed!" );
- ok( a.intersectLine( new THREE.V... | true |
Other | mrdoob | three.js | e08369e8151e50b2aae861c86a2bfdcf8073e8e9.json | fix bug in Line3.distance/distanceSq | src/math/Line3.js | @@ -43,13 +43,13 @@ THREE.extend( THREE.Line3.prototype, {
},
- distanceSq: function ( optionalTarget ) {
+ distanceSq: function () {
return this.start.distanceToSquared( this.end );
},
- distance: function ( optionalTarget ) {
+ distance: function () {
return this.start.distanceTo( this.end );
| false |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | src/math/Line3.js | @@ -0,0 +1,111 @@
+/**
+ * @author bhouston / http://exocortex.com
+ */
+
+THREE.Line3 = function ( start, end ) {
+
+ this.start = ( start !== undefined ) ? start : new THREE.Vector3();
+ this.end = ( end !== undefined ) ? end : new THREE.Vector3();
+
+};
+
+THREE.extend( THREE.Line3.prototype, {
+
+ set: function ( s... | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | test/unit/math/Line3.js | @@ -0,0 +1,63 @@
+/**
+ * @author bhouston / http://exocortex.com
+ */
+
+module( "Line3" );
+
+test( "constructor/equals", function() {
+ var a = new THREE.Line3();
+ ok( a.start.equals( zero3 ), "Passed!" );
+ ok( a.end.equals( zero3 ), "Passed!" );
+
+ a = new THREE.Line3( two3.clone(), one3.clone() );
+ ok( a.start... | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | test/unit/unittests_sources.html | @@ -17,6 +17,7 @@
<script src="../../src/math/Vector2.js"></script>
<script src="../../src/math/Vector3.js"></script>
<script src="../../src/math/Vector4.js"></script>
+ <script src="../../src/math/Line3.js"></script>
<script src="../../src/math/Box2.js"></script>
<script src="../../src/math/Box3.js"></... | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | test/unit/unittests_three-math.html | @@ -25,6 +25,7 @@
<script src="math/Vector2.js"></script>
<script src="math/Vector3.js"></script>
<script src="math/Vector4.js"></script>
+ <script src="math/Line3.js"></script>
<script src="math/Quaternion.js"></script>
<script src="math/Matrix3.js"></script>
<script src="math/Matrix4.js"></script> | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | test/unit/unittests_three.html | @@ -25,6 +25,7 @@
<script src="math/Vector2.js"></script>
<script src="math/Vector3.js"></script>
<script src="math/Vector4.js"></script>
+ <script src="math/Line3.js"></script>
<script src="math/Quaternion.js"></script>
<script src="math/Matrix3.js"></script>
<script src="math/Matrix4.js"></script> | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | test/unit/unittests_three.min.html | @@ -25,6 +25,7 @@
<script src="math/Vector2.js"></script>
<script src="math/Vector3.js"></script>
<script src="math/Vector4.js"></script>
+ <script src="math/Line3.js"></script>
<script src="math/Quaternion.js"></script>
<script src="math/Matrix3.js"></script>
<script src="math/Matrix4.js"></script> | true |
Other | mrdoob | three.js | 4d5177f777a48aaabbff28599e5f17e2028630bb.json | add initial Line3.js with unit tests. | utils/build/includes/math.json | @@ -5,6 +5,7 @@
"src/math/Vector2.js",
"src/math/Vector3.js",
"src/math/Vector4.js",
+ "src/math/Line3.js",
"src/math/Box2.js",
"src/math/Box3.js",
"src/math/Matrix3.js", | true |
Other | mrdoob | three.js | 82af7f0c9fc60e50d1c82c3eaf7bc6f5f9275076.json | add EMCASCript5 compatibility to THREE.extend.
Signed-off-by: Ben Houston <ben@exocortex.com> | src/Three.js | @@ -48,9 +48,27 @@ String.prototype.trim = String.prototype.trim || function () {
// based on https://github.com/documentcloud/underscore/blob/bf657be243a075b5e72acc8a83e6f12a564d8f55/underscore.js#L767
THREE.extend = function ( obj, source ) {
- for (var prop in source) {
+ // ECMAScript5 compatibility based on: h... | false |
Other | mrdoob | three.js | a685230753ffc8709f860af11824fb84829f2ee3.json | remove stray console.log() from Line3 unit test. | test/unit/math/Line3.js | @@ -55,7 +55,6 @@ test( "closestPointToPoint/closestPointToPointParameter", function() {
// nearby the ray
ok( a.closestPointToPointParameter( zero3.clone(), false ) == -1, "Passed!" );
var b2 = a.closestPointToPoint( zero3.clone(), false );
- console.log( b2 );
ok( b2.distanceTo( new THREE.Vector3( 1, 1, 0 ) )... | false |
Other | mrdoob | three.js | b9afd9865de494fce9638ef612aeab0306544a07.json | apply unit conversion to position as well | examples/js/loaders/ColladaLoader.js | @@ -847,6 +847,7 @@ THREE.ColladaLoader = function () {
obj.scale = props[ 2 ];
// unit conversion
+ obj.position.multiplyScalar(colladaUnit);
obj.scale.multiplyScalar(colladaUnit);
if ( options.centerGeometry && obj.geometry ) { | false |
Other | mrdoob | three.js | ce7425f2692abaa1a6b3a16828f7aa343657bef7.json | Remove redundant initialisation | src/extras/helpers/DirectionalLightHelper.js | @@ -72,11 +72,6 @@ THREE.DirectionalLightHelper = function ( light, sphereSize ) {
this.targetLine = new THREE.Line( lineGeometry, lineMaterial );
this.targetLine.properties.isGizmo = true;
- }
- else {
-
- this.targetSphere = null;
-
}
// | true |
Other | mrdoob | three.js | ce7425f2692abaa1a6b3a16828f7aa343657bef7.json | Remove redundant initialisation | src/extras/helpers/SpotLightHelper.js | @@ -91,11 +91,6 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
this.targetLine = new THREE.Line( lineGeometry, lineMaterial );
this.targetLine.properties.isGizmo = true;
- }
- else {
-
- this.targetSphere = null;
-
}
// | true |
Other | mrdoob | three.js | 62778396082a830f695cdd2ca17efbe14c8703f5.json | Fix bug in SpotLightHelper
Same as in DirectionalLightHelper | src/extras/helpers/SpotLightHelper.js | @@ -91,6 +91,11 @@ THREE.SpotLightHelper = function ( light, sphereSize ) {
this.targetLine = new THREE.Line( lineGeometry, lineMaterial );
this.targetLine.properties.isGizmo = true;
+ }
+ else {
+
+ this.targetSphere = null;
+
}
//
@@ -127,15 +132,20 @@ THREE.SpotLightHelper.prototype.update = function ... | false |
Other | mrdoob | three.js | 82dd6c5a237aab59e1261ec114a5e40c82f00cfc.json | Fix bug in DirectionalLightHelper
If light.target.properties.targetInverse is false, no targetLine and
targetSphere is created, we can't update their values on update()! | src/extras/helpers/DirectionalLightHelper.js | @@ -72,6 +72,11 @@ THREE.DirectionalLightHelper = function ( light, sphereSize ) {
this.targetLine = new THREE.Line( lineGeometry, lineMaterial );
this.targetLine.properties.isGizmo = true;
+ }
+ else {
+
+ this.targetSphere = null;
+
}
//
@@ -99,16 +104,21 @@ THREE.DirectionalLightHelper.prototype.updat... | false |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/WebGLRenderer2.js | @@ -35,10 +35,10 @@ THREE.WebGLRenderer2 = function ( parameters ) {
var renderer = new THREE.WebGLRenderer2.LowLevelRenderer(parameters);
- var meshRenderer = new THREE.WebGLRenderer2.MeshObjectRenderer(renderer, info);
- var particleRenderer = new THREE.WebGLRenderer2.ParticleObjectRenderer(renderer, info);
- v... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/webgl/objects/LineRenderer.js | @@ -1,13 +1,13 @@
-THREE.WebGLRenderer2.LineObjectRenderer = function(lowlevelrenderer, info){
+THREE.WebGLRenderer2.LineRenderer = function(lowlevelrenderer, info){
THREE.WebGLRenderer2.Object3DObjectRenderer.call( this, lowlevelrenderer, info );
};
-THREE.WebGLRenderer2.LineObjectRenderer.prototype = Objec... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/webgl/objects/MeshRenderer.js | @@ -1,13 +1,13 @@
-THREE.WebGLRenderer2.MeshObjectRenderer = function(lowlevelrenderer, info){
+THREE.WebGLRenderer2.MeshRenderer = function(lowlevelrenderer, info){
THREE.WebGLRenderer2.Object3DObjectRenderer.call( this, lowlevelrenderer, info );
};
-THREE.WebGLRenderer2.MeshObjectRenderer.prototype = Objec... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/webgl/objects/Object3DRenderer.js | @@ -1,19 +1,19 @@
-THREE.WebGLRenderer2.Object3DObjectRenderer = function(lowlevelrenderer, info){
+THREE.WebGLRenderer2.Object3DRenderer = function(lowlevelrenderer, info){
this.renderer = lowlevelrenderer;
this.info = info;
};
-THREE.WebGLRenderer2.Object3DObjectRenderer.prototype.getBufferMaterial = funct... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/webgl/objects/ParticleRenderer.js | @@ -1,12 +1,12 @@
-THREE.WebGLRenderer2.ParticleObjectRenderer = function(lowlevelrenderer, info){
+THREE.WebGLRenderer2.ParticleRenderer = function(lowlevelrenderer, info){
THREE.WebGLRenderer2.Object3DObjectRenderer.call( this, lowlevelrenderer, info );
};
-THREE.WebGLRenderer2.ParticleObjectRenderer.prototy... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | src/renderers/webgl/objects/RibbonRenderer.js | @@ -1,12 +1,12 @@
-THREE.WebGLRenderer2.RibbonObjectRenderer = function(lowlevelrenderer, info){
+THREE.WebGLRenderer2.RibbonRenderer = function(lowlevelrenderer, info){
THREE.WebGLRenderer2.Object3DObjectRenderer.call( this, lowlevelrenderer, info );
};
-THREE.WebGLRenderer2.RibbonObjectRenderer.protot... | true |
Other | mrdoob | three.js | b17b34186081daaf63072043dfabda179aa85e92.json | rename the object renderers again | utils/includes/common.json | @@ -74,16 +74,16 @@
"../src/scenes/Fog.js",
"../src/scenes/FogExp2.js",
"../src/renderers/CanvasRenderer.js",
- "../src/renderers/WebGLShaders.js",
"../src/renderers/WebGLRenderer.js",
+ "../src/renderers/WebGLShaders.js",
"../src/renderers/WebGLRenderer2.js",
"../src/renderers/webgl/LowLevelRenderer.js",
... | true |
Other | mrdoob | three.js | 911146dba1eb2e5e43eb838757ef27fe958407ca.json | add Plane.flip() plus unit test. | src/math/Plane.js | @@ -74,6 +74,15 @@ THREE.Plane.prototype = {
},
+ flip: function () {
+
+ this.constant *= -1;
+ this.normal.negate();
+
+ return this;
+
+ },
+
distanceToPoint: function ( point ) {
return this.normal.dot( point ) + this.constant; | true |
Other | mrdoob | three.js | 911146dba1eb2e5e43eb838757ef27fe958407ca.json | add Plane.flip() plus unit test. | test/unit/math/Plane.js | @@ -94,6 +94,18 @@ test( "normalize", function() {
ok( a.constant == 1, "Passed!" );
});
+test( "flip/distanceToPoint", function() {
+ var a = new THREE.Plane( new THREE.Vector3( 2, 0, 0 ), -2 );
+
+ a.normalize();
+ ok( a.distanceToPoint( new THREE.Vector3( 4, 0, 0 ) ) === 3, "Passed!" );
+ ok( a.distanceToPoint... | true |
Other | mrdoob | three.js | 367fb776a190e9957e82068fb65f5cd335abc1bf.json | remove unused variables from Raycaster. | src/core/Raycaster.js | @@ -34,8 +34,6 @@
};
- var v0 = new THREE.Vector3(), v1 = new THREE.Vector3(), v2 = new THREE.Vector3();
-
// http://www.blackpawn.com/texts/pointinpoly/default.html
var intersectObject = function ( object, raycaster, intersects ) { | false |
Other | mrdoob | three.js | e3ccd9682678d1423ad1bba4120593db644f6f9d.json | update lowlevel renderer | src/renderers/webgl/renderer.js | @@ -20,6 +20,9 @@ THREE.WebGLRenderer2.LowLevelRenderer = function(parameters){
_clearColor = parameters.clearColor !== undefined ? new THREE.Color( parameters.clearColor ) : new THREE.Color( 0x000000 ),
_clearAlpha = parameters.clearAlpha !== undefined ? parameters.clearAlpha : 0;
+ var _currentWidth = 0,
+ _c... | false |
Other | mrdoob | three.js | 3595365f6b45995aa442d1d3039c92e9a91dae5a.json | add Plane.intersectLine with unit tests. | src/math/Plane.js | @@ -112,6 +112,40 @@ THREE.Plane.prototype = {
},
+ intersectLine: function ( startPoint, endPoint, optionalTarget ) {
+
+ var result = optionalTarget || new THREE.Vector3();
+
+ var direction = THREE.Plane.__v1.sub( endPoint, startPoint );
+
+ var denominator = this.normal.dot( direction );
+
+ if ( denomina... | true |
Other | mrdoob | three.js | 3595365f6b45995aa442d1d3039c92e9a91dae5a.json | add Plane.intersectLine with unit tests. | test/unit/math/Plane.js | @@ -115,6 +115,31 @@ test( "distanceToSphere", function() {
ok( a.distanceToSphere( b ) === -1, "Passed!" );
});
+test( "isInterestionLine/intersectLine", function() {
+ var a = new THREE.Plane( new THREE.Vector3( 1, 0, 0 ), 0 );
+
+ ok( a.isIntersectionLine( new THREE.Vector3( -10, 0, 0 ), new THREE.Vector3( 10, ... | true |
Other | mrdoob | three.js | 4392f0ccfd03ed489eba7542e6529278d56321ec.json | update the clock documentation | docs/api/core/Clock.html | @@ -22,26 +22,45 @@ <h3>[name]( [page:Boolean autoStart] )</h3>
<h2>Properties</h2>
<h3>.[page:Boolean autoStart]</h3>
+ <div>
+ If set, starts the clock automatically when the first update is called.
+ </div>
<h3>.[page:Float startTime]</h3>
+ <div>
+ When the clock is running, It holds the starttime... | false |
Other | mrdoob | three.js | baa928e5814f9170346d14088e711a26d1376b68.json | add source for THREE.extend method. | src/Three.js | @@ -45,7 +45,7 @@ String.prototype.trim = String.prototype.trim || function () {
};
-
+// based on http://stackoverflow.com/a/12317051
THREE.extend = function ( target, other ) {
target = target || {};
@@ -65,7 +65,7 @@ THREE.extend = function ( target, other ) {
}
return target;
-
+
};
// http://p... | false |
Other | mrdoob | three.js | 2ff8f9eca1653688a72ff9ff97492463515d742f.json | update the docs for THREE.Camera | docs/api/cameras/Camera.html | @@ -1,43 +1,52 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <script src="../../list.js"></script>
- <script src="../../page.js"></script>
- <link type="text/css" rel="stylesheet" href="../../page.css" />
- </head>
- <body>
- [page:Object3D] →
-
- <h1>[name]</h1>
-
- <div class="... | false |
Other | mrdoob | three.js | 19d815f5898206549440f0186bf5758397d09a3d.json | Add missing LoadingMonitor in the source | build/three.js | @@ -8134,6 +8134,42 @@ THREE.JSONLoader.prototype.createModel = function ( json, callback, texturePath
callback( geometry );
};
+/**
+ * @author mrdoob / http://mrdoob.com/
+ */
+
+THREE.LoadingMonitor = function () {
+
+ THREE.EventTarget.call( this );
+
+ var scope = this;
+
+ var loaded = 0;
+ var total = 0;... | true |
Other | mrdoob | three.js | 19d815f5898206549440f0186bf5758397d09a3d.json | Add missing LoadingMonitor in the source | build/three.min.js | @@ -6,7 +6,7 @@ function(a){clearTimeout(a)}})();THREE.FrontSide=0;THREE.BackSide=1;THREE.Double
THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;THREE.SrcAlphaS... | true |
Other | mrdoob | three.js | 19d815f5898206549440f0186bf5758397d09a3d.json | Add missing LoadingMonitor in the source | utils/includes/common.json | @@ -35,6 +35,7 @@
"../src/loaders/BinaryLoader.js",
"../src/loaders/ImageLoader.js",
"../src/loaders/JSONLoader.js",
+ "../src/loaders/LoadingMonitor.js",
"../src/loaders/GeometryLoader.js",
"../src/loaders/SceneLoader.js",
"../src/loaders/TextureLoader.js", | true |
Other | mrdoob | three.js | 67fdeb97b935925df82b3a265ff4d383bf981337.json | avoid garbage collector as all costs per @gero3 | src/core/Box2.js | @@ -63,7 +63,7 @@ THREE.Box2.prototype = {
setFromCenterAndSize: function ( center, size ) {
- var halfSize = new THREE.Vector2().copy( size ).multiplyScalar( 0.5 );
+ var halfSize = THREE.Box2.__v1.copy( size ).multiplyScalar( 0.5 );
this.min.copy( center ).subSelf( halfSize );
this.max.copy( center ).ad... | true |
Other | mrdoob | three.js | 67fdeb97b935925df82b3a265ff4d383bf981337.json | avoid garbage collector as all costs per @gero3 | src/core/Box3.js | @@ -70,7 +70,7 @@ THREE.Box3.prototype = {
setFromCenterAndSize: function ( center, size ) {
- var halfSize = new THREE.Vector3().copy( size ).multiplyScalar( 0.5 );
+ var halfSize = THREE.Box3.__v1.copy( size ).multiplyScalar( 0.5 );
this.min.copy( center ).subSelf( halfSize );
this.max.copy( center ).ad... | true |
Other | mrdoob | three.js | b5786bbe06f2299a806f91aa5d66c3a25e21f5c2.json | add Box2 based on Box3 paradigm. | src/core/Box2.js | @@ -0,0 +1,220 @@
+/**
+ * @author bhouston / http://exocortex.com
+ */
+
+THREE.Box2 = function ( min, max ) {
+
+ if( ! min && ! max ) {
+ this.min = new THREE.Vector2();
+ this.max = new THREE.Vector2();
+ this.makeEmpty();
+ }
+ else {
+ this.min = min || new THREE.Vector2();
+ this.max = max || new THREE.V... | true |
Other | mrdoob | three.js | b5786bbe06f2299a806f91aa5d66c3a25e21f5c2.json | add Box2 based on Box3 paradigm. | utils/includes/common.json | @@ -5,6 +5,7 @@
"../src/core/Vector2.js",
"../src/core/Vector3.js",
"../src/core/Vector4.js",
+ "../src/core/Box2.js",
"../src/core/Box3.js",
"../src/core/Matrix3.js",
"../src/core/Matrix4.js", | true |
Other | mrdoob | three.js | b50a1a520ebd8950a0c3fdb92a015a927d0d69c9.json | remove unnecessary comments. | src/core/Box3.js | @@ -4,7 +4,6 @@
THREE.Box3 = function ( min, max ) {
- // TODO: Is this valid JavaScript to check if the parameters are specified?
if( ! min && ! max ) {
this.min = new THREE.Vector3();
this.max = new THREE.Vector3(); | true |
Other | mrdoob | three.js | b50a1a520ebd8950a0c3fdb92a015a927d0d69c9.json | remove unnecessary comments. | src/core/Plane.js | @@ -30,7 +30,6 @@ THREE.Plane.prototype = {
},
setFromNormalAndCoplanarPoint: function ( normal, point ) {
- // NOTE: This function doens't support optional parameters like the constructor.
this.normal = normal;
this.constant = - point.dot( normal );
@@ -39,7 +38,6 @@ THREE.Plane.prototype = {
},
s... | true |
Other | mrdoob | three.js | cb2b5cece276091dd253935e698621c3918a8913.json | adopt Sphere.js and Box3.js in Geometry.js. | src/core/Box3.js | @@ -19,7 +19,7 @@
THREE.Box3.fromPoints = function ( points ) {
var boundingBox = new THREE.Box3();
- for( var i = 0; i < points.length; i ++ ) {
+ for( var i = 0, numPoints = points.length; i < numPoints; i ++ ) {
boundingBox.extendByPoint( points[i] );
}
| true |
Other | mrdoob | three.js | cb2b5cece276091dd253935e698621c3918a8913.json | adopt Sphere.js and Box3.js in Geometry.js. | src/core/Geometry.js | @@ -4,6 +4,7 @@
* @author alteredq / http://alteredqualia.com/
* @author mikael emtinger / http://gomo.se/
* @author zz85 / http://www.lab4games.net/zz85/blog
+ * @author Ben Houston / ben@exocortex.com / http://github.com/bhouston
*/
THREE.Geometry = function () {
@@ -576,82 +577,12 @@ THREE.Geometry.protot... | true |
Other | mrdoob | three.js | cb2b5cece276091dd253935e698621c3918a8913.json | adopt Sphere.js and Box3.js in Geometry.js. | src/core/Sphere.js | @@ -15,6 +15,18 @@
};
+ THREE.Sphere.fromCenterAndPoints = function ( center, points ) {
+ var maxRadiusSq = 0;
+ var delta = new THREE.Vector3().copy( center );
+
+ for ( var i = 0, numPoints = points.length; i < numPoints; i ++ ) {
+ var radiusSq = center.distanceToSquared( points[i] );
+ maxRadiusSq ... | true |
Other | mrdoob | three.js | 4d7b88da36054cb37692be8dddeb03d977b8aeaa.json | use relative path to create the index
This seems to be working so, I'm going to leave it like this | CONTRIBUTING.md | @@ -2,10 +2,10 @@
## 1. Index
-1. [Index](https://github.com/gero3/three.js/blob/patch-6/CONTRIBUTING.md#2-Index)
-2. [Having a problem](https://github.com/gero3/three.js/blob/patch-6/CONTRIBUTING.md#2-having-a-problem)
- * [How to report](https://github.com/gero3/three.js/blob/patch-6/CONTRIBUTING.md#how-to... | false |
Other | mrdoob | three.js | db87a042bcb36203a04105f79b99204759026aca.json | add index to contributing | CONTRIBUTING.md | @@ -1,6 +1,13 @@
# CONTRIBUTING TO THREE.JS
-## Having a problem
+## 1. Index
+
+1. [Index](https://github.com/gero3/three.js/blob/patch-6/CONTRIBUTING.md#2-Index)
+2. [Having a problem](https://github.com/gero3/three.js/blob/patch-6/CONTRIBUTING.md#2-having-a-problem)
+ * [How to report](https://github.com/... | false |
Other | mrdoob | three.js | 6b3eaa0d354e8e09431c1c5aae8837dd57163811.json | Add deallocation to BufferGeometry. | build/three.js | @@ -6014,6 +6014,13 @@ THREE.BufferGeometry.prototype = {
this.hasTangents = true;
this.tangentsNeedUpdate = true;
+ },
+
+ deallocate: function () {
+
+ var index = THREE.GeometryLibrary.indexOf( this );
+ if ( index !== -1 ) THREE.GeometryLibrary.splice( index, 1 );
+
}
}; | true |
Other | mrdoob | three.js | 6b3eaa0d354e8e09431c1c5aae8837dd57163811.json | Add deallocation to BufferGeometry. | build/three.min.js | @@ -6,7 +6,7 @@ function(a){window.clearTimeout(a)}})();THREE.FrontSide=0;THREE.BackSide=1;THREE
THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;THREE.SrcAlphaS... | true |
Other | mrdoob | three.js | 6b3eaa0d354e8e09431c1c5aae8837dd57163811.json | Add deallocation to BufferGeometry. | src/core/BufferGeometry.js | @@ -476,6 +476,13 @@ THREE.BufferGeometry.prototype = {
this.hasTangents = true;
this.tangentsNeedUpdate = true;
+ },
+
+ deallocate: function () {
+
+ var index = THREE.GeometryLibrary.indexOf( this );
+ if ( index !== -1 ) THREE.GeometryLibrary.splice( index, 1 );
+
}
}; | true |
Other | mrdoob | three.js | 5816003656333fd317e5b978ee52e2ffbb7d7c26.json | Touch support to TrackballControls. | examples/js/controls/TrackballControls.js | @@ -392,11 +392,60 @@ THREE.TrackballControls = function ( object, domElement ) {
}
+ function touchstart( event ) {
+
+ if ( ! _this.enabled ) return;
+
+ event.preventDefault();
+
+ switch ( event.touches.length ) {
+
+ case 1:
+ _rotateStart = _rotateEnd = _this.getMouseProjectionOnBall( event.touches[... | false |
Other | mrdoob | three.js | e1179f0b9a01b9a019041fb2b6bce84f1f02f92a.json | Move texture images loading code to be static. | examples/js/loaders/MTLLoader.js | @@ -228,7 +228,7 @@ THREE.MTLLoader.MaterialCreator.prototype = {
break;
case 'map_kd':
// Diffuse texture map
- params['map'] = this.loadTexture( this.baseUrl + value );
+ params['map'] = THREE.MTLLoader.loadTexture( this.... | false |
Other | mrdoob | three.js | 8d40dba44b5d711185994162c6cf1c52e5a78baf.json | make clone of materials | src/materials/MeshFaceMaterial.js | @@ -11,7 +11,7 @@ THREE.MeshFaceMaterial = function ( materials ) {
THREE.MeshFaceMaterial.prototype.clone = function () {
var material = new THREE.MeshFaceMaterial();
- material.materials = this.materials;
+ material.materials = this.materials.slice(0);
return material;
}; | false |
Other | mrdoob | three.js | 8a960ad7fda5c87af940bb31b9c571c3cab92be0.json | add getDescendants to Object3D | src/core/Object3D.js | @@ -206,6 +206,23 @@ THREE.Object3D.prototype = {
return undefined;
},
+
+ getDescendants: function (returnValue) {
+ var children = this.children,l = children.length,child;
+
+ if (returnValue === undefined){
+ returnValue = [];
+ }
+
+ for (var i = 0; i < l ; i++){
+ child = children[i];
+ retu... | false |
Other | mrdoob | three.js | ce183b552aa2321013a59e81f7790416f2aa6ad9.json | Add a bit of documentation for the Projector class | docs/api/core/Projector.html | @@ -25,12 +25,31 @@ <h3>.unprojectVector( [page:Vector3 vector], [page:Camera camera] ) [page:Vector
<h3>.pickingRay( [page:Vector3 vector], [page:Camera camera] ) [page:Ray]</h3>
<div>
- Translates a 2D point from NDC to a [page:Ray] that can be used for picking.
+ Translates a 2D point from NDC (<em>Normali... | false |
Other | mrdoob | three.js | 0715dd3eb37f89cca4888d6aa9d80bc728fb1ca0.json | Add example for gpu-assisted picking | examples/webgl_gpu_picking.html | @@ -0,0 +1,241 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <title>three.js webgl - gpu picking</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
+ <style>
+ body {
+ font-family: Monospace;
+ background-color: ... | false |
Other | mrdoob | three.js | c9e88e32a7e6a8a03b2d5a619ee7cd61942aa772.json | make curve createGeometry 2D/3D friendly | src/extras/core/CurvePath.js | @@ -204,7 +204,7 @@ THREE.CurvePath.prototype.createGeometry = function( points ) {
for ( var i = 0; i < points.length; i ++ ) {
- geometry.vertices.push( new THREE.Vector3( points[ i ].x, points[ i ].y, points[ i ].z ) );
+ geometry.vertices.push( new THREE.Vector3( points[ i ].x, points[ i ].y, points[ i ].z ... | false |
Other | mrdoob | three.js | 7409249bc706a51b9c6319209e392c5dd7cf1dda.json | Add FirstPersonControls documentation draft | docs/api/extras/controls/FirstPersonControls.html | @@ -1,26 +1,130 @@
<h1>[name]</h1>
-<div class="desc">todo</div>
+<div class="desc">An extra add-on for creating and using mouse and keyboard controls akin to those found in <a href="http://en.wikipedia.org/wiki/First-person_shooter">First-Person Shooters</a> (hence the class name).</div>
+<div class="desc">Once a... | false |
Other | mrdoob | three.js | 58dd3acf92d2bd6693501df2b50f953e72cf1b38.json | fix the redeclaration and fix performance | src/renderers/WebGLRenderer.js | @@ -3255,7 +3255,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var gonnaUse = [];
for ( i = 0; i < il; i ++ ) {
- var candidateInfluence = influences[ i ]
+ candidateInfluence = influences[ i ]
if ( candidateInfluence > 0 ) {
... | false |
Other | mrdoob | three.js | 02a35148d44010b683a26a99561160269b71063a.json | fix the last fix | src/renderers/WebGLRenderer.js | @@ -3266,7 +3266,7 @@ THREE.WebGLRenderer = function ( parameters ) {
gonnaUse.length = material.numSupportedMorphTargets
} else if (gonnaUse.length > material.numSupportedMorphNormals){
gonnaUse.sort(sortNumerical);
- } else if (gonnaUse.length = 0){
+ } else if ... | false |
Other | mrdoob | three.js | d1261c9293d6b743d417c4e2da307f2c8685caee.json | fix the normals for morphs | src/renderers/WebGLRenderer.js | @@ -3296,6 +3296,9 @@ THREE.WebGLRenderer = function ( parameters ) {
object.__webglMorphTargetInfluences[ m ] = influences[ gonnaUse[m]];
} else {
_gl.vertexAttribPointer( attributes[ "morphTarget" + m ], 3, _gl.FLOAT, false, 0, 0 );
+ if ( material.mor... | false |
Other | mrdoob | three.js | 235f35a5e20d47f52be35489d3d95f099338a941.json | test face4s generation in parametricgeometry | src/extras/geometries/ParametricGeometry.js | @@ -12,7 +12,7 @@ THREE.ParametricGeometry = function ( slices, stacks, func ) {
var faces = this.faces;
var uvs = this.faceVertexUvs[ 0 ];
- var face3 = true;
+ var face3 = !true;
var i, il, j, p;
var u, v;
@@ -50,20 +50,30 @@ THREE.ParametricGeometry = function ( slices, stacks, func ) {
uvc = new THR... | false |
Other | mrdoob | three.js | 8874516ec257f1782adfb7276a557973ab0d928d.json | Allow non-indexed BufferGeometries
Allow non-indexed BufferGeometries to render the entire buffer in a single draw call rather than a draw call per 2^16-1 vetexes | src/renderers/WebGLRenderer.js | @@ -3266,102 +3266,185 @@ THREE.WebGLRenderer = function ( parameters ) {
if ( object instanceof THREE.Mesh ) {
- var offsets = geometry.offsets;
+ var index = geometry.attributes["index"];
+ if (index) {
+ // Indexed triangles
+ var offsets = geometry.offsets;
- // if there is ... | false |
Other | mrdoob | three.js | 71dbd0092f7ef58c30c6efd1db39fb324d600215.json | Add closure sourcemaps support to build.py
- add --sourcemaps flag to build.py
- see #2465
- node.js build script could support sourcemaps with uglifyjs2 | utils/build.py | @@ -15,6 +15,7 @@ def main(argv=None):
parser.add_argument('--externs', action='append', default=['externs/common.js'])
parser.add_argument('--minify', action='store_true', default=False)
parser.add_argument('--output', default='../build/three.js')
+ parser.add_argument('--sourcemaps', action='store_true', de... | false |
Other | mrdoob | three.js | 47010c1918c3ec5b0530d94b2b632390589d1e1f.json | add the update for real now | utils/build.js | @@ -114,6 +114,12 @@ function buildIncludes(files, filename){
output(text.join("\n"), filename + '.js');
}
+function getFileNames(){
+ "use strict";
+ var fileName = "utils/files.json";
+ var data = JSON.parse(fs.readFileSync(fileName,'utf8'));
+ return data;
+}
function parse_args(){
"use strict";
@@ -141,1... | false |
Other | mrdoob | three.js | bab765decdba67797e6a7de894dba25db16f2323.json | remove _FILES postfixes | utils/build.py | @@ -154,10 +154,10 @@ def main(argv=None):
files = getFileNames()
config = [
- ['Three', 'includes', '', files["COMMON_FILES"] + files["EXTRAS_FILES"], args.common],
- ['ThreeCanvas', 'includes_canvas', '', files["CANVAS_FILES"], args.canvas],
- ['ThreeWebGL', 'includes_webgl', '', files["WEBGL_FILES"], args.webg... | true |
Other | mrdoob | three.js | bab765decdba67797e6a7de894dba25db16f2323.json | remove _FILES postfixes | utils/files.json | @@ -1,5 +1,5 @@
{
- "COMMON_FILES" : [
+ "COMMON" : [
"Three.js",
"core/Clock.js",
"core/Color.js",
@@ -77,7 +77,7 @@
"renderers/renderables/RenderableLine.js"
],
- "EXTRAS_FILES" : [
+ "EXTRAS" : [
"extras/ColorUtils.js",
"extras/GeometryUtils.js",
"extras/ImageUtils.js",
@@ -132,7 +132,7 @@
... | true |
Other | mrdoob | three.js | 134125e7c46e65d5f0e5a37b429c2dc1d01b66a6.json | Add small description to Frustum docs. | docs/api/core/Frustum.html | @@ -9,7 +9,7 @@
<body>
<h1>[name]</h1>
- <div class="desc"></div>
+ <div class="desc"><a href="http://en.wikipedia.org/wiki/Frustum">Frustums</a> are used to determine what is inside the camera's field of view. They help speed up the rendering process.</div>
<h2>Constructor</h2> | false |
Other | mrdoob | three.js | 5ac0c5c19376eef3e956f7c580c0967c01bb221d.json | Fix references to animationCache in stop function. | src/extras/animation/KeyFrameAnimation.js | @@ -142,13 +142,14 @@ THREE.KeyFrameAnimation.prototype.stop = function() {
// reset JIT matrix and remove cache
- for ( var h = 0; h < this.hierarchy.length; h++ ) {
+ for ( var h = 0; h < this.data.hierarchy.length; h++ ) {
+
+ var obj = this.hierarchy[ h ];
+ var node = this.data.hierarchy[ h ]... | false |
Other | mrdoob | three.js | bf644ea5ff0f784c8991122692677c30cec39e1d.json | fix cancelRequestAnimationFrame polyfill | src/Three.js | @@ -23,7 +23,7 @@ if ( ! self.Int32Array ) {
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame']
- ... | false |
Other | mrdoob | three.js | 2f234a2ac8b2fbac49997050caf9adcd896ca35d.json | change child reference to object reference | src/core/Object3D.js | @@ -132,11 +132,11 @@ THREE.Object3D.prototype = {
remove: function ( object ) {
var scene = this;
- var childIndex = this.children.indexOf( child );
+ var childIndex = this.children.indexOf( object );
if ( childIndex !== - 1 ) {
- child.parent = undefined;
+ object.parent = undefined;
this.chil... | false |
Other | mrdoob | three.js | 914e1c4e959696545f44c3257e42576feff80d20.json | Remove Object3D child from scene too | src/core/Object3D.js | @@ -130,14 +130,29 @@ THREE.Object3D.prototype = {
},
remove: function ( object ) {
+ var scene = this;
- var childIndex = this.children.indexOf( object );
+ var childIndex = this.children.indexOf( child );
if ( childIndex !== - 1 ) {
- object.parent = undefined;
+ child.parent = undefined;
th... | false |
Other | mrdoob | three.js | 340f82394fb41ab1df5527ce7979c779ab459363.json | fix whitespace in Object3D.js | src/core/Object3D.js | @@ -130,30 +130,30 @@ THREE.Object3D.prototype = {
},
removeChild: function ( child ) {
- var scene = this;
+ var scene = this;
var childIndex = this.children.indexOf( child );
if ( childIndex !== - 1 ) {
- child.parent = undefined;
- this.children.splice( childIndex, 1 )... | false |
Other | mrdoob | three.js | 0825c1f612f9b77c6e6926ebb07aa839d92b9043.json | Add support for additional Euler rotation orders. | src/core/Matrix4.js | @@ -532,30 +532,116 @@ THREE.Matrix4.prototype = {
},
- setRotationFromEuler: function( v ) {
+ setRotationFromEuler: function( v, order ) {
var x = v.x, y = v.y, z = v.z,
a = Math.cos( x ), b = Math.sin( x ),
c = Math.cos( y ), d = Math.sin( y ),
- e = Math.cos( z ), f = Math.sin( z ),
- ad = a * d,... | true |
Other | mrdoob | three.js | 0825c1f612f9b77c6e6926ebb07aa839d92b9043.json | Add support for additional Euler rotation orders. | src/core/Object3D.js | @@ -13,6 +13,7 @@ THREE.Object3D = function() {
this.position = new THREE.Vector3();
this.rotation = new THREE.Vector3();
+ this.eulerOrder = 'XYZ';
this.scale = new THREE.Vector3( 1, 1, 1 );
this.dynamic = false; // when true it retains arrays so they can be updated with __dirty*
@@ -175,7 +176,7 @@ THREE.... | true |
Other | mrdoob | three.js | 83628d5e151c3424f9dd2268ef910f82dca7fb28.json | Fix python for Blender 2.58
modified: 2.58/scripts/addons/io_mesh_threejs/__init__.py | utils/exporters/blender/2.58/scripts/addons/io_mesh_threejs/__init__.py | @@ -45,7 +45,7 @@
import bpy
from bpy.props import *
-from io_utils import ExportHelper, ImportHelper
+from bpy_extras.io_utils import ExportHelper, ImportHelper
# ################################################################
# Custom properties | false |
Other | mrdoob | three.js | 4fbb9056069b42a1f5b0a204faf5b8fd34577024.json | Update subdivision example | examples/webgl_geometry_subdivison.html | @@ -72,8 +72,8 @@
materials.push( [ new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, wireframe: false } ) ] );
}
-
-
+
+
var geometriesParams = [
@@ -87,7 +87,7 @@
{type: 'LatheGeometry', args: [ [
new THREE.Vector3(0,0,0),
new THREE.Vector3(0,50,50),
- new ... | false |
Other | mrdoob | three.js | 39e993d50d77a54b692b9b72a8bdebbe42b61522.json | Include Trident.js in the EXTRAS_FILES Build array | utils/build.py | @@ -105,6 +105,7 @@
'extras/io/BinaryLoader.js',
'extras/io/SceneLoader.js',
'extras/objects/MarchingCubes.js',
+'extras/objects/Trident.js',
'extras/physics/Collisions.js',
'extras/physics/CollisionUtils.js'
] | false |
Other | mrdoob | three.js | 4fd6dce803944ad45c5615659539085a54480081.json | Fix LatheGeometry behavior | src/extras/geometries/LatheGeometry.js | @@ -20,7 +20,9 @@ THREE.LatheGeometry = function ( points, steps, angle ) {
}
- for ( var i = 0; i < _steps; i ++ ) {
+ var il = _steps + 1;
+
+ for ( var i = 0; i < il; i ++ ) {
for ( var j = 0; j < _newV.length; j ++ ) {
@@ -32,8 +34,8 @@ THREE.LatheGeometry = function ( points, steps, angle ) {
for (... | false |
Other | mrdoob | three.js | 01852d283b95a56e9c930c3db35fc06f346975f4.json | add some improvements to frustum | build/Three.js | @@ -1023,13 +1023,17 @@ THREE.Frustum.prototype.setFromMatrix = function ( m ) {
var i, plane,
planes = this.planes;
var me = m.elements;
-
- planes[ 0 ].set( me[3] - me[0], me[7] - me[4], me[11] - me[8], me[15] - me[12] );
- planes[ 1 ].set( me[3] + me[0], me[7] + me[4], me[11] + me[8], me[15] + me[12] );
- p... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.