You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Text.load() - wraps FontLoader in a promise. returns a Promise which is resolved with a THREE.Font.
font parameter in Text can accept both: THREE.Font or Promise that resolves it. P.s.: It can be implemented simply in API by just keeping async way and wrapping THREE.Font in Promise.resolve(font) if such is passed
Version:
v2.x.x
v1.x.x
Issue type:
Bug
Proposal/Enhancement
Question
Discussion
Tested on:
Desktop
Chrome
Chrome Canary
Chrome dev-channel
Firefox
Opera
Microsoft IE
Microsoft Edge
Android
Chrome
Firefox
Opera
IOS
Chrome
Firefox
Opera
The text was updated successfully, but these errors were encountered:
This is fine for now. However in some frameworks, as pointed by Hirako, loading external json files can cause issue, like Ionic, it can be solved with customized webpack config file.
So maybe, the better way is to leave the loading file/data part to the framework it self that works with WHS.js, this means, the new text API or other similar API should accept a data object as input parameter as well as the existing file-loading scheme.
For example, in Ionic/Angular, the loading becomes subscription to an http request observable, and then whis.js just take the loaded data.
Concept:
Text.load()
- wrapsFontLoader
in a promise. returns a Promise which is resolved with aTHREE.Font
.font
parameter in Text can accept both:THREE.Font
or Promise that resolves it.P.s.: It can be implemented simply in API by just keeping async way and wrapping
THREE.Font
inPromise.resolve(font)
if such is passedVersion:
Issue type:
Tested on:
Desktop
Android
IOS
The text was updated successfully, but these errors were encountered: