Did you ever test any of the previous projects on the latest r73 release?
All kind of errors, nothing works!
Why did you release something like that?
Author: Fantashit
8 thoughts on “r73 : nothing works !?!”
FontUtils and TextGeometry utils have also been removed from core.
Why don’t you remove everything from the core?
A core with ZERO bytes does not need to be downloaded at all.
We don’t guarantee backwards compatibility between versions.
That’s a bad move Ricardo.
As I said from the very beginning:
The backward compatibility is a MUST in any serious project.
Otherwise less and less people will be interested in that project.
cheers
Why don’t you remove everything from the core?
A core with ZERO bytes does not need to be downloaded at all.
I gather you’re an emotional guy. However, you stay around so I also gather that at the end of the day you find the project useful 😉
The backward compatibility is a MUST in any serious project.
Maybe this is not as serious of a project as you think it is? I’m not Adobe you know?
Otherwise less and less people will be interested in that project.
People losing interest is not something I worry about. Instead, I focus on creating a beautiful API that abstract the annoyances of computer graphics and, at the same time, I want the library to fit in 100kb gzipped. It’s impossible to forever include all the features that people add.
If anyone is interested, this is how I loaded font without async request, using NPM three@0.74.0 module and webpack: https://gist.github.com/pjanik/49c03c02c66341a26904
If you’re using any other build tool, the key thing is to load font file as a string. Maybe this funny parsing could be extracted to some helper method in the future?
On a side note, it’s cool that r74 includes /examples dir (r73 didn’t), please continue to do that. 😉 Finally, I can use only three package, no externals script files anymore (I’m also using examples/js/controls/OrbitControls). It would be even more cool if examples were published using UMD format, so I could directly require OrbitControls without shimming global THREE dependency (not a big deal, as most of the build tools can handle it, but still).
It would have been super useful to have a very basic example without all the keystroke recording switching fonts, weights and bevels. Not that those aren’t also great to have, but a simple basic one in your examples would have saved me a ton of time.
Doing a release involves quite a few steps. Sometimes my patience/dedication runs out… 😕
Anyone can update the migration page. I would love to get some help there.
I recently run into this problem using an older version of three.js.
But after reading through the comments and insults you received, instead of asking for help, I just wanted to thank you for maintaining three.js.
You’re a super dedicated and patient guy! 👍
The update from r72 to r84 was a bunch of work (~3 hours for one project).
Helpful:
For the font issue: see source code of http://necromanthus.com/Test/html5/koolmoves.html (you do not load the font in HTML anymore, but instead in JS, assign a var and this goes into the parameters. Watch out to only assign the font AFTER it has been loaded)
see the error messages in the dev console, they help a lot, because they even tell you what to do (good work @mrdoob )
<!-- OLD <script src="../../threejs/geometries/TextGeometry.js"></script> -->
<!-- <script src="../../threejs/helvetiker_regular.typeface.js"></script> -->
Run your threejs scene, you probably get:
Uncaught TypeError: c.generateShapes is not a function
This happens because the renderer starts without having the font loaded. So let’s first load the font and then call the renderer at startup:
var text3dparams;
var font_helvetiker;
var fontload = new THREE.FontLoader();
fontload.load( '/threejs/fonts/helvetiker_regular.typeface.json', function ( font ) {
font_helvetiker = font;
initStageText();
// startup
render();
});
As I set the text new during runtime, I need to define the stage objects on global scape, e.g.:
var text3d_r;
var text3d_s;
var text3d_h;
var material1;
var material_s;
var material2;
Example of the start function:
function initStageText()
{
// 3D TEXT LABELS
text3dparams = {
font: font_helvetiker, // font, important to change, before was "helvetiker", now the font directly!
size: 0.3, // size of the text
height: 0.05, // thickness to extrude text
curveSegments: 2, // number of points on the curves
weight: 'normal', // font weight (normal, bold)
style: 'normal', // font style (normal, italics)
}
// label radius
material1 = new THREE.MeshBasicMaterial({color: 0x009900});
var text3dgeom_r = new THREE.TextGeometry('r = '+cone_radius, text3dparams);
text3d_r = new THREE.Mesh(text3dgeom_r, material1);
text3d_r.position.y = cone_height+0.1;
text3d_r.position.z = cone_radius/2-0.35;
text3d_r.rotation.y = -Math.PI/2;
scene.add(text3d_r);
}
I also got the error THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead. To solve this, I removed:
gridHelper.setColors( new THREE.Color(gridcolor), new THREE.Color(gridcolor) );
and added (gridstep was 1 before, then needed to set the value to 20 to get the same grid):
var gridHelper = new THREE.GridHelper(gridplaneSize/2, gridstep, gridcolor, gridcolor);
Then I need to take care of the threejs changes (shown as warning in the Chrome console):
6.1 THREE.MeshBasicMaterial: 'ambient' is not a property of this material. Solved by removing ambient:color, from new THREE.MeshBasicMaterial();
6.2 Lights changes, just replace as stated in the warnings:
THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.
THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.
THREE.Light: .shadowCameraNear is now .shadow.camera.near.
THREE.Light: .shadowCameraFar is now .shadow.camera.far.
THREE.Light: .shadowCameraFov is now .shadow.camera.fov.
THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper(
THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.
6.3 THREE.Light: .shadowDarkness has been removed. – remove it.
I also changed the renderer setup:
// OLD
var renderer = Detector.webgl ? new THREE.WebGLRenderer({ antialias: true }) : new THREE.CanvasRenderer({ antialias: true });
// NEW
var renderer;
if(Detector.webgl)
{
renderer = new THREE.WebGLRenderer({ antialias: true });
}
else
{
renderer = new THREE.CanvasRenderer({ antialias: true });
}
I also needed to add a white background color to the scene setup:
var scene = new THREE.Scene();
scene.background = new THREE.Color( 0xffffff );
Now my application runs as with the old threejs version. Good luck for your project too!
Why don’t you remove everything from the core?
A core with ZERO bytes does not need to be downloaded at all.
That’s a bad move Ricardo.
As I said from the very beginning:
The backward compatibility is a MUST in any serious project.
Otherwise less and less people will be interested in that project.
cheers
I gather you’re an emotional guy. However, you stay around so I also gather that at the end of the day you find the project useful😉
Maybe this is not as serious of a project as you think it is? I’m not Adobe you know?
People losing interest is not something I worry about. Instead, I focus on creating a beautiful API that abstract the annoyances of computer graphics and, at the same time, I want the library to fit in 100kb gzipped. It’s impossible to forever include all the features that people add.
@pjanik
Yeah, sorry about that, the
TextGeometry
API changed again. It’s back in core though!Please use http://threejs.org/examples/webgl_shadowmap.html as reference.
If anyone is interested, this is how I loaded font without async request, using NPM
three@0.74.0
module and webpack: https://gist.github.com/pjanik/49c03c02c66341a26904If you’re using any other build tool, the key thing is to load font file as a string. Maybe this funny parsing could be extracted to some helper method in the future?
On a side note, it’s cool that r74 includes😉 Finally, I can use only
/examples
dir (r73 didn’t), please continue to do that.three
package, no externals script files anymore (I’m also usingexamples/js/controls/OrbitControls
). It would be even more cool if examples were published using UMD format, so I could directly require OrbitControls without shimming global THREE dependency (not a big deal, as most of the build tools can handle it, but still).Thanks!
The documentation needs to get updated as the API changed, this no longer applies: http://threejs.org/docs/index.html#Reference/Extras.Geometries/TextGeometry
It would have been super useful to have a very basic example without all the keystroke recording switching fonts, weights and bevels. Not that those aren’t also great to have, but a simple basic one in your examples would have saved me a ton of time.
This example could have helped a lot: http://threejs.org/docs/scenes/geometry-browser.html#TextGeometry, but when you look at the source, it only ends up drawing a torus as it pulls in external resources to actually do the work.
I put together this simple example on JSFiddle for anyone that finds this thread.
https://jsfiddle.net/287rumst/1/
I recently run into this problem using an older version of three.js.
But after reading through the comments and insults you received, instead of asking for help, I just wanted to thank you for maintaining three.js.
You’re a super dedicated and patient guy!👍
The update from r72 to r84 was a bunch of work (~3 hours for one project).
Helpful:
My happy result: https://www.matheretter.de/geoservant/en/
In detail what I needed to do from v72 to v84:
Remove from your html file:
Run your threejs scene, you probably get:
This happens because the renderer starts without having the font loaded. So let’s first load the font and then call the renderer at startup:
As I set the text new during runtime, I need to define the stage objects on global scape, e.g.:
Example of the start function:
I also got the error
THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.
To solve this, I removed:and added (gridstep was 1 before, then needed to set the value to 20 to get the same grid):
6.1
THREE.MeshBasicMaterial: 'ambient' is not a property of this material.
Solved by removingambient:color,
fromnew THREE.MeshBasicMaterial();
6.2 Lights changes, just replace as stated in the warnings:
6.3
THREE.Light: .shadowDarkness has been removed.
– remove it.I also changed the renderer setup:
I also needed to add a white background color to the scene setup:
Now my application runs as with the old threejs version. Good luck for your project too!