Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

three-bmfont-text

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

three-bmfont-text - npm Package Compare versions

Comparing version 2.3.0 to 3.0.0

18

index.js
var createLayout = require('layout-bmfont-text')
var inherits = require('inherits')
var createIndices = require('quad-indices')
var buffer = require('three-buffer-vertex-data')
var assign = require('object-assign')

@@ -25,3 +23,3 @@ var vertices = require('./lib/vertices')

// calls to update()
this._opt = assign({}, opt)
this._opt = Object.assign({}, opt)

@@ -40,3 +38,3 @@ // also do an initial setup...

// use constructor defaults
opt = assign({}, this._opt, opt)
opt = Object.assign({}, this._opt, opt)

@@ -71,3 +69,3 @@ if (!opt.font) {

var uvs = vertices.uvs(glyphs, texWidth, texHeight, flipY)
var indices = createIndices({
var indices = createIndices([], {
clockwise: true,

@@ -79,5 +77,5 @@ type: 'uint16',

// update vertex data
buffer.index(this, indices, 1, 'uint16')
buffer.attr(this, 'position', positions, 2)
buffer.attr(this, 'uv', uvs, 2)
this.setIndex(indices)
this.setAttribute('position', new THREE.BufferAttribute(positions, 2))
this.setAttribute('uv', new THREE.BufferAttribute(uvs, 2))

@@ -89,5 +87,5 @@ // update multipage data

} else if (opt.multipage) {
// enable multipage rendering
var pages = vertices.pages(glyphs)
// enable multipage rendering
buffer.attr(this, 'page', pages, 1)
this.setAttribute('page', new THREE.BufferAttribute(pages, 1))
}

@@ -94,0 +92,0 @@ }

{
"name": "three-bmfont-text",
"version": "2.3.0",
"version": "3.0.0",
"description": "renders BMFont files in ThreeJS with word-wrapping",

@@ -21,3 +21,3 @@ "main": "index.js",

"layout-bmfont-text": "^1.2.0",
"nice-color-palettes": "^1.0.1",
"nice-color-palettes": "^3.0.0",
"object-assign": "^4.0.1",

@@ -28,15 +28,15 @@ "quad-indices": "^2.0.1",

"devDependencies": {
"bluebird": "^2.9.14",
"browserify": "^12.0.1",
"budo": "^7.0.2",
"bluebird": "^3.7.2",
"browserify": "^16.5.1",
"budo": "^11.6.3",
"glsl-aastep": "^1.0.1",
"glsl-noise": "0.0.0",
"glslify": "^4.0.0",
"glslify": "^7.0.0",
"load-bmfont": "^1.0.0",
"standard": "^5.4.1",
"standard": "^14.3.4",
"sun-tzu-quotes": "^1.0.0",
"three": "^0.70.0",
"three": "^0.118.3",
"three-orbit-viewer": "^69.2.9",
"three-vignette-background": "^1.0.2",
"uglify-js": "^2.4.17"
"uglify-js": "^3.10.0"
},

@@ -43,0 +43,0 @@ "scripts": {

@@ -11,3 +11,3 @@ # three-bmfont-text

Works on Three r69-73, r79, and possibly more.
The latest `3.x` version works on Three r109 and beyond. For legacy support (e.g. Three r69-73, r79-108), please use version `three-bmfont-text@2.3.0`.

@@ -165,2 +165,6 @@ Below is an example that uses [load-bmfont](https://www.npmjs.com/package/load-bmfont) to parse BMFont files on the fly with XHR:

- `3.0.0`
- Fixed `BufferAttribute` problems in new ThreeJS
- `2.0.1`

@@ -167,0 +171,0 @@ - Added `shaders/msdf.js` and docs around MSDF usage

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc