-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
TypeError: url.match is not a function on WHS.Text #288
Comments
@tomriddle1234 hey, yep. I need to update docs. See the Text defaults changed. |
@sasha240100 thanks, 👍 |
However this is still not working, could you plz tell what's wrong?
|
@tomriddle1234 I guess documentation for
So your code should look something like this: const text = new WHS.Text({
text: 'hello world'
// loader: new THREE.FontLoader(), <- you don't need this. (only for custom font loaders)
parameters: {
size: 12,
height: 50,
curveSegments: 12,
font: '/path/to/font.typeface.js', // <- this should be a path
bevelEnabled: false,
bevelThickness: 10,
bevelSize: 8
},
material: new THREE.MeshBasicMaterial({
color: 0xffffff
}),
position: {
x: -40,
y: 20,
z: 0
}
});
text.addTo(app); Please, check if that works. If not - contact in chat (@ alex2401) for help in realtime. |
The initial issue was to do with the loader (webpack bundling). |
Using Text in whs 2.1.2 gives Run Time Error. Require clearer example on using Text function, better to add some UTF8 character example, other than just English font.
Code:
no matter where to put the gentilis_bold.typeface.js file, the above code always gives run time error,
Uncaught (in promise):TypeError: url.match is not a function load @.../vendor.js ...
Stack trace to polyfile.js, something like:
http://localhost:8102/build/polyfill.js:3:13190
Environment:
Ionic 3.5.0
Angular 4.1.3
Node 7.1.0
Version:
Issue type:
Tested on:
Desktop
The text was updated successfully, but these errors were encountered: