Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v74 findings #8297

Closed
verteAzur opened this issue Mar 5, 2016 · 7 comments
Closed

v74 findings #8297

verteAzur opened this issue Mar 5, 2016 · 7 comments

Comments

@verteAzur
Copy link
Contributor

Hello, I have migraded our app/engine to use the latest THREE.js r74. To summarize, there is NO problematic changes that could potentially break code while upgrading from the previous r73 version to r74. Here are the migration findings:

enableScissorTest is replaced by setScissorTest
This is a property name swapping upgrade that will not break code logic nor functions.

THREE.ClosedSplineCurve3 has been deprecated. Please use THREE.CatmullRomCurve3:
You just need to replace the class name to get it working. This upgrade might break your code if you were using the "ClosedSplineCurve3" object in animation path . The new object (CatmullRomCurve3) behaves a little differently then its predecessor (if used with getpoint). The new object now expects a positive integer and if you were passing an unsigned float value (in your animation path), the code will need to be updated to use a positive integer.

THREE.Light: .shadowDarkness has been removed:
You need to remove that property. It is not supported in v74.

three.min.js:773 THREE.Light: .shadowBias is now .shadow.bias.
three.min.js:773 THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.
three.min.js:774 THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.
three.min.js:772 THREE.Light: .shadowCameraNear is now .shadow.camera.near.
three.min.js:772 THREE.Light: .shadowCameraFar is now .shadow.camera.far.
three.min.js:771 THREE.Light: .shadowCameraFov is now .shadow.camera.fov.

For the previous 6 warnings, you need to update your code to reflect the new property and your code will work as before.

Uncaught TypeError: string.replace is not a function
replaceLightNums @ three.js:29607
WebGLProgram @ three.js:29897
acquireProgram @ three.js:30288
initMaterial @ three.js:26448
setProgram @ three.js:26601
renderBufferDirect @ three.js:25702
renderObjects @ three.js:26382
render @ three.js:26166

If you encounter that error, it is because there is a syntax issue within a custom shader. Your shader will need to be updated/fixed in order to clear that error.

Blender skinning model export to Three.js with LocRotScale attributes #8073
Please note, I have reopened the issue as it has now became an essential function to properly animate certain objects.

@ashconnell
Copy link
Contributor

Thanks for these. The release notes will hopefully be done soon :)

@Jaredmmx
Copy link

It's important to document changes between versions but it would also be very nice to suggest some workarounds. Like I used:

THREE.Light: .shadowDarkness LIKE: directionalLight.shadowDarkness = 0.15;

Now that it's been removed... Could you give me an example of how to achieve the same results?

The same happens with THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead

Ok, but how do I get the same results as with this code?

var material = new THREE.MeshPhongMaterial({ color: 0xFFAA00, specular: 0x555555, shininess: 40, metal: true, reflectivity: 1, refractionRatio: 0.98, shading: THREE.SmoothShading, vertexColors: THREE.NoColors, side: THREE.DoubleSide });

Thank your for your help and your great job

@ashconnell
Copy link
Contributor

@mrdoob what if all PR's were required to add info to the changelog? That way when you release its already done?

@mrdoob
Copy link
Owner

mrdoob commented Mar 18, 2016

@mrdoob what if all PR's were required to add info to the changelog? That way when you release its already done?

https://twitter.com/mrdoob/status/710595431621861376

@mrdoob
Copy link
Owner

mrdoob commented Mar 20, 2016

Added these changes to the Migrations page.
https://github.com/mrdoob/three.js/wiki/Migration

@mrdoob mrdoob closed this as completed Mar 20, 2016
@makc
Copy link
Contributor

makc commented Apr 2, 2016

how do I get the same results

@mrdoob

Added these changes to the Migrations page

no you did not :( migration page says

Removed MeshPhongMaterial's metal.

this is what console already says, and it is pretty much useless statement.

@mrdoob
Copy link
Owner

mrdoob commented Apr 2, 2016

Sorry, I don't know if there is a way to emulate the output of removed MeshPhongMaterial's metal. But if achieving "metal" is what you're after, you should use MeshStandardMaterial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants