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

troika-3d-text

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

troika-3d-text - npm Package Compare versions

Comparing version 0.48.0-unicode.2 to 0.48.0-unicode.3

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [0.48.0-unicode.3](https://github.com/protectwise/troika/compare/v0.48.0-unicode.2...v0.48.0-unicode.3) (2023-07-10)
### Features
* add fontWeight and fontStyle params for fallback font resolution ([b79806a](https://github.com/protectwise/troika/commit/b79806a813be866369cebf6b54033274311d62f3))
# [0.48.0-unicode.2](https://github.com/protectwise/troika/compare/v0.48.0-unicode.1...v0.48.0-unicode.2) (2023-07-10)

@@ -8,0 +19,0 @@

2

dist/troika-3d-text.esm.js

@@ -205,2 +205,4 @@ import { getSelectionRects, getCaretAtPoint, Text } from 'troika-three-text';

'fontSize',
'fontWeight',
'fontStyle',
'letterSpacing',

@@ -207,0 +209,0 @@ 'lineHeight',

@@ -205,2 +205,4 @@ (function (global, factory) {

'fontSize',
'fontWeight',
'fontStyle',
'letterSpacing',

@@ -207,0 +209,0 @@ 'lineHeight',

2

dist/troika-3d-text.umd.min.js

@@ -8,3 +8,3 @@ 'use strict';(function(b,e){"object"===typeof exports&&"undefined"!==typeof module?e(exports,require("troika-three-text"),require("troika-3d"),require("three"),require("troika-three-utils")):"function"===typeof define&&define.amd?define(["exports","troika-three-text","troika-3d","three","troika-three-utils"],e):(b="undefined"!==typeof globalThis?globalThis:b||self,e(b.troika_3d_text={},b.troika_three_text,b.troika_3d,b.THREE,b.troika_three_utils))})(this,function(b,e,k,d,t){let l=new d.Vector4,m=

v)).intersectPlane(w.setComponents(0,0,1,0),x))&&(c=e.getCaretAtPoint(c,f.x,f.y))&&b(this.selectionStart,c.charIndex);a.preventDefault()}},h=b=>{a.removeEventListener("drag",f);a.removeEventListener("dragend",h)};a.addEventListener("dragstart",c);a.addEventListener("mousedown",c);this._cleanupEvents=()=>{h();a.removeEventListener("dragstart",c);a.removeEventListener("mousedown",c)}}afterUpdate(){this.data=e.getSelectionRects(this.textRenderInfo,this.selectionStart,this.selectionEnd);super.afterUpdate()}set clipRect(a){this._clipRect=
a&&Array.isArray(a)&&4===a.length?a:q}get clipRect(){return this._clipRect}destructor(){this._cleanupEvents();super.destructor()}}let z="text anchorX anchorY font fontSize letterSpacing lineHeight maxWidth overflowWrap direction textAlign textIndent whiteSpace material color colorRanges fillOpacity outlineOpacity outlineColor outlineWidth outlineOffsetX outlineOffsetY outlineBlur strokeColor strokeWidth strokeOpacity curveRadius depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize gpuAccelerateSDF debugSDF".split(" ");
a&&Array.isArray(a)&&4===a.length?a:q}get clipRect(){return this._clipRect}destructor(){this._cleanupEvents();super.destructor()}}let z="text anchorX anchorY font fontSize fontWeight fontStyle letterSpacing lineHeight maxWidth overflowWrap direction textAlign textIndent whiteSpace material color colorRanges fillOpacity outlineOpacity outlineColor outlineWidth outlineOffsetX outlineOffsetY outlineBlur strokeColor strokeWidth strokeOpacity curveRadius depthOffset clipRect orientation glyphGeometryDetail sdfGlyphSize gpuAccelerateSDF debugSDF".split(" ");
class A extends k.Object3DFacade{constructor(a){let b=new e.Text;b.geometry.boundingSphere.version=0;super(a,b);this.selectable=!1;this.selectionStart=this.selectionEnd=-1;this.onSyncComplete=this.onSyncStart=null;this.gpuAccelerateSDF=!0;b.addEventListener("syncstart",a=>{this.notifyWorld("text3DSyncStart");if(this.onSyncStart)this.onSyncStart()});b.addEventListener("synccomplete",a=>{if(!this.isDestroying&&(b.geometry.boundingSphere.version++,this.afterUpdate(),this.notifyWorld("text3DSyncComplete"),

@@ -11,0 +11,0 @@ this.requestRender(),this.onSyncComplete))this.onSyncComplete()})}get textRenderInfo(){return this.threeObject.textRenderInfo}afterUpdate(){let a=this.threeObject;z.forEach(b=>{a[b]=this[b]});a.sync();super.afterUpdate();this.text!==this._prevText&&(this.selectionStart=this.selectionEnd=-1,this._prevText=this.text);this._updateSelection()}_updateSelection(){let {selectable:a,selectionStart:b,selectionEnd:d}=this,c=this._selectionFacade;a!==this._selectable&&((this._selectable=a)?c=this._selectionFacade=

{
"name": "troika-3d-text",
"version": "0.48.0-unicode.2",
"version": "0.48.0-unicode.3",
"description": "SDF text for the Troika 3D scene management framework",

@@ -18,3 +18,3 @@ "author": "Jason Johnston <jason.johnston@protectwise.com>",

"troika-3d": "^0.47.2",
"troika-three-text": "^0.48.0-unicode.2",
"troika-three-text": "^0.48.0-unicode.3",
"troika-three-utils": "^0.47.2"

@@ -25,3 +25,3 @@ },

},
"gitHead": "3a45f2b0a5e7952db9e82798f5e00ee07c0012d1"
"gitHead": "674bd8fc557342d970115791d3091e18c8706c77"
}

@@ -12,2 +12,4 @@ import { Object3DFacade } from 'troika-3d'

'fontSize',
'fontWeight',
'fontStyle',
'letterSpacing',

@@ -14,0 +16,0 @@ 'lineHeight',

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