-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Migration
V.Korol edited this page Apr 18, 2016
·
136 revisions
##r74 → r75
- Changed
Vector3
'ssetFromMatrixColumn(index, m)
tosetFromMatrixColumn(m, index)
. - Removed
WebGLRenderTarget
'sshareDepthFrom
.
##r73 → r74
- Renamed
enableScissorTest
tosetScissorTest
. - Renamed
shadowBias
toshadow.bias
. - Renamed
shadowMapWidth
toshadow.mapSize.width
. - Renamed
shadowMapHeight
toshadow.mapSize.height
. - Renamed
shadowCameraNear
toshadow.camera.near
. - Renamed
shadowCameraFar
toshadow.camera.far
. - Renamed
shadowCameraFov
toshadow.camera.fov
. - Removed
shadowDarkness
. Add aTHREE.AmbientLight
to you scene instead. - Removed
ClosedSplineCurve3
. UseCatmullRomCurve3
withclosed
set totrue
. - Removed
MeshPhongMaterial
'smetal
. - Renamed
Box2
'sempty()
toisEmpty()
. - Renamed
Box3
'sempty()
toisEmpty()
.
##r72 → r73
- Removed
morphColors
fromGeometry
. - Removed
clampBottom
fromMath
. -
FontUtils
andTextGeometry
moved out of core. -
shadowDarkness
default value is now1
.
##r71 → r72
- Renamed
PointCloud
toPoints
. - Renamed
PointCloudMaterial
toPointsMaterial
. - Removed
computeTangents()
fromGeometry
andBufferGeometry
. - Moved all
shadowMap*
properties inWebGLRenderer
toshadowMap.*
. - Removed
BufferGeometry
'sdrawcall.index
. -
LineSegments( geometry, material )
should now be used instead ofLine( geometry, material, THREE.LinePieces )
.
##r70 → r71
- Removed
ambient
fromMaterial
. - Removed
recursive
parameter fromgetObjectBy*()
.
##r69 → r70
- Removed
sortParticles
fromPointCloud
. - Removed
renderDepth
fromObject3D
. -
UVMapping
,CubeReflectionMapping
,CubeRefractionMapping
,SphericalReflectionMapping
andSphericalRefractionMapping
are no longer functions.
##r68 → r69
-
WebGLRenderer
'sinitMaterial
was made private. -
ColladaLoader
now returns aScene
instead of anObject3D
.
##r67 → r68
-
Object3D
'sposition
,rotation
,quaternion
andscale
properties are now immutable. -
BufferGeometry
'saddAttribute
method now takes aBufferAttribute
instead of the various attribute types (e.g.,Int16Attribute
,Float32Attribute
).
##r66 → r67
- Removed
Face3
'scentroid
. - Removed
Geometry
'scomputeCentroids()
. - Moved
GeometryUtils
'smerge
toGeometry
.
##r65 → r66
- Renamed
CubeGeometry
toBoxGeometry
. - Removed
dynamic
property fromBufferGeometry
.
##r64 → r65
- Removed
physicallyBasedShading
property fromWebGLRenderer
.
##r62 → r63
-
WebGLRenderer
background to opaque (black) by default. Pass{alpha=true}
when creating WebGLRenderer for previous default behaviour.
##r61 → r62
-
Particle
removed. UseSprite
instead. -
ParticleMaterial
removed. UseParticleSystemMaterial
orSpriteMaterial
.
##r59 → r60
-
Face4
removed. Use 2Face3
to emulate it. -
OrbitControls
'szoomIn()
andzoomOut()
renamed todollyIn()
anddollyOut()
.
##r58 → r59
-
Object3D.rotation
is now of typeTHREE.Euler
. - Removed
Object3D.useQuaternion
. The library now uses quaternions by default. However, there is some magic in place to keepObject3D
'srotation
(Euler
) working. - Moved
Object3D.eulerOrder
toObject3D.rotation.order
. - Moved
Object3D.defaultEulerOrder
toEuler.DefaultOrder
. - Removed
setGeometry()
andsetMaterial()
fromMesh
. - Removed
Vector3.setEulerFromRotationMatrix()
, useEuler.setFromRotationMatrix()
instead. - Removed
Vector3.setEulerFromQuaternion()
, useEuler.setFromQuaternion()
instead.
##r57 → r58
- Removed
Matrix4
'stranslate()
,rotateX()
,rotateY()
,rotateZ()
,rotateByAxis()
andcrossVector()
. - Removed
setClearColorHex()
fromCanvasRenderer
andWebGLRenderer
. UsesetClearColor()
instead. - Renamed
Matrix4
'sextractPosition()
tocopyPosition()
. - Renamed
Matrix4
'ssetRotationFrom*()
tomakeRotationFrom*()
. - Renamed
Matrix4
'scompose()
tomakeFromPositionQuaternionScale()
. - Renamed
Object3D
'sgetChildByName()
togetObjectByName()
. - Removed
Object3D
'smatrixRotationWorld
property.
##r56 → r57
- For
BufferGeometry
-
geometry.verticesNeedUpdate
togeometry.attributes.position.needsUpdate
-
geometry.elementsNeedUpdate
togeometry.attributes.index.needsUpdate
-
geometry.normalsNeedUpdate
togeometry.attributes.normal.needsUpdate
-
geometry.uvsNeedUpdate
togeometry.attributes.uv.needsUpdate
-
geometry.colorsNeedUpdate
togeometry.attributes.color.needsUpdate
-
geometry.tangentsNeedUpdate
togeometry.attributes.tangent.needsUpdate
-
*
->geometry.attributes.custom.needsUpdate
-
- Removed
Matrix4
'srotateAxis
. UseVector3.transformDirection( matrix )
instead. - Removed
AsteriskGeometry
. - Removed
Color
'ssetHSV
. UseColorConverter.setHSV( color, h, s, v )
instead. - Renamed
JSONLoader
'screateModel()
toparse()
.
##r55 → r56
- Removed
getPosition()
andgetColumn*()
fromMatrix4
-
Color.setHSV()
andColor.getHSV()
replaced by.setHSL()
and.getHSL()
- Replaced
ColorUtils.adjustHSV()
with Color's.offsetHSL()
- Renamed
Box3/Line3/Plane/Ray/Sphere
's.transform()
toapplyMatrix4()
##r54 → r55
-
Matrix3.multiplyVector3()
changed toVector3.applyMatrix3()
-
Matrix4.multiplyVector3()
changed toVector3.applyMatrix4()
andVector3.applyProjection()
-
Matrix4.multiplyVector4()
changed toVector4.applyMatrix4()
-
Quaternion.multiplyVector3()
changed toVector3.applyQuaternion()
- Renamed
Color
methods:-
.lerpSelf()
to.lerp()
-
- Renamed
Vector2
,Vector3
andVector4
methods:-
.add()
to.addVectors()
-
.addSelf()
to.add()
-
.sub()
to.subVectors()
-
.subSelf()
to.sub()
-
.cross()
to.crossVectors()
-
.crossSelf()
to.cross()
-
.minSelf()
to.min()
-
.maxSelf()
to.max()
-
.clampSelf()
to.clamp()
-
.lerpSelf()
to.lerp()
-
- Renamed
Matrix4
methods:-
.multiply()
to.multiplyMatrices()
-
.multiplySelf()
to.multiply()
-
- Renamed
Quaternion
methods:-
.multiply()
to.multiplyQuaternions()
-
.multiplySelf()
to.multiply()
-
- Renamed
Frustum
methods:-
.contains()
to.intersectsObject()
-
- Moved
GeometryUtils.explode
toExplodeModifier
- Moved
GeometryUtils.tessellate
toTessellateModifier
- Moved
ShaderUtils.lib
toShaderLib
-
Matrix4.makeTranslation
andMatrix4.makeScale
now take three scalars instead ofVector3
.
##r53 → r54
-
Sprite
material properties are now inSpriteMaterial
, used like thisnew THREE.Sprite( new THREE.SpriteMaterial( { color: 0xff0000, map: texture, alphaTest: 0.5 } ) )
. - Renamed migrated sprite material properies:
Sprite.affectedByDistance
=>SpriteMaterial.sizeAttenuation
andSprite.mergeWith3D
=>SpriteMaterial.depthTest
- Renamed
renderer.shadowMapCullFrontFaces
=>renderer.shadowMapCullFace
(default valuetrue
=>THREE.CullFaceFront
, other optionfalse
=>THREE.CullFaceBack
). - Renamed
color.getContextStyle
tocolor.getStyle
. - Moved
Ray
casting methods toRaycaster
. -
Rectangle
replaced withBox2
. -
UV
replaced withVector2
. This means.u
and.v
are now.x
and.y
. -
Matrix4.makeTranslation
andMatrix4.makeScale
now takeVector3
instead of three scalars. - Moved
SubdivisionModifier
out of the build toexamples/js/modifiers
. - Renamed and moved
Renderer.deallocateObject()
=>Geometry.dispose()
andBufferGeometry.dispose()
. - Renamed and moved
Renderer.deallocateRenderTarget()
=>WebGLRenderTarget.dispose()
.
##r52 → r53
-
Sprite
's size is no longer automatically based on the image size, usesprite.scale.set( imageWidth, imageHeight, 1.0 )
to achieve the old behavior -
SceneLoader
and scene format now usewidthSegments
,heightSegments
,depthSegments
instead ofsegmentsWidth
,segmentsHeight
,segmentsDepth
for definitions of plane, cube and sphere geometries -
SceneLoader
and scene format now usematerial
property with single material id string instead ofmaterials
array for meshes -
MeshPhongMaterial
now usesperPixel = true
by default -
WebGLRenderer
constructor doesn't use anymoremaxLights
parameter: shaders will be generated with the exact number of lights in the scene (it's now up to the application layer to make sure shaders compile on a particular system) -
ColorUtils.rgbToHsv()
got moved intoColor.getHSV()
-
Geometry
no longer has amaterials
property.MeshFaceMaterials
usage is now like this:new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( [ material1, material2 ] ) )
. Meaning thatface.materialIndex
will map the array passed toMeshFaceMaterials
. - Loader callbacks which previously only had
geometry
parameter, are now also passed a second one:materials
:loader.load( 'file.js', function ( geometry, materials ) {} )
. -
GeometryUtils.clone()
is now a method inGeometry
.
##r51 → r52
-
ShaderExtras
have been split in a different files.CopyShader
,FXAAShader
,NormalShader
, etc - Replaced
SceneUtils.traverseHierarchy
withobject.traverse
. - Removed
SceneUtils.showHierarchy
. Useobject.traverse( function ( child ) { child.visible = false } )
instead. - Moved
*Controls
toexamples/js/controls
. - Split
SceneUtils.cloneObject
into*.clone()
##r50 → r51
-
CameraHelper
API changes: helper is not anymore child of camera, instead it uses reference to camera world matrix - texture uniform changes: texture units are now assigned automatically, texture object goes to
value
property instead oftexture
one{ type: "t", value: 0, texture: map }
=>{ type: "t", value: map }
-
normalScale
uniform in normal map shader is nowVector2
(to be able to invert separatelyx
andy
to deal with different tangent bases) -
CTMLoader.load
andCTMLoader.loadParts
now use single parameter object foruseWorker
anduseBuffers
:loader.load( url, callback, useWorker, useBuffers )
=>loader.load( url, callback, { useWorker: true, useBuffers: true } )
-
CTMLoader
now createsBufferGeometry
by default, setuseBuffers
parameter tofalse
if you needGeometry
- type for non-procedural geometries changed in the scene format:
ascii_mesh
=>ascii
,bin_mesh
=>binary
,embedded_mesh
=>embedded
-
UTF8Loader
(and compressor) were changed to a newer version, supporting more recent version of UTF8 format (r100+
); loader doesn't create anymore geometries but instead it returns hierarchy with potentially multiple meshes created per each material (or by splitting large model)
##r49 → r50
-
Vector3
's.getRotationFromMatrix( matrix, scale )
toVector3
's.setEulerFromRotationMatrix( matrix, order )
. -
Vector3
's.getEulerXYZFromQuaternion( quaternion )
and.getEulerYZXFromQuaternion( quaternion )
to.setEulerFromQuaternion( quaternion, order )
. -
DOMRenderer
andSVGRenderer
no longer included in common build. - texture coordinates aren't anymore flipped in the geometries, instead textures have
flipY
property (true by default); all models need to be re-exported / reconverted (tools have been updated as well).
workaround:uv.v = 1 - uv.v;
-
PlaneGeometry
changed back to vertical orientation (facing screen instead of laying on the ground).
workaround:mesh.rotation.x = - Math.PI / 2;
orgeometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
-
doubleSided
/flipSided
properties moved fromObject3D
toMaterial
'sside
property (THREE.FrontSide
,THREE.BackSide
andTHREE.DoubleSide
). -
objectMatrix
in shaders was renamed tomodelMatrix
. - JIT caching removed from
Animation
. -
geometry.dynamic
is nowtrue
by default. -
Three.js
build renamed tothree.min.js
.
##r48 → r49
- changed
PlaneGeometry
from vertical to horizontal orientation. - renamed
__dirtyXXX
attribute properties toxxxNeedUpdate
. - removed
Vertex
class, useVector3
instead.
##r47 → r48
- Removed
intersectScene
fromRay
. UseintersectObjects( array )
instead.
##r45 → r46
-
loader.load( { model: url, callback: callback } )
toloader.load( url, callback )
.