Skip to content

TypeError: url.match is not a function on WHS.Text #288

Closed
@tomriddle1234

Description

@tomriddle1234

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:

const text = new WHS.Text({
    geometry: {
      text: 'hello world',
      parameters: {
        font:'gentilis_bold.typeface.js',
        size: 20,
        height: 5,
        curveSegments: 6
      }
    },

    material: new THREE.MeshBasicMaterial({
      color: 0xffffff
    }),

    position: {
      x: -40,
      y: 20,
      z: 0
    }
  });
  text.addTo(app);

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:
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions