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

dxf-viewer

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dxf-viewer - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

src/index.d.ts

47

package.json
{
"name": "dxf-viewer",
"version": "1.0.15",
"description": "JavaScript DXF file viewer",
"main": "src/index.js",
"author": "Artyom Lebedev<artyom.lebedev@gmail.com>",
"license": "Mozilla Public License 2.0",
"repository": "https://github.com/vagran/dxf-viewer",
"keywords": [
"dxf",
"viewer",
"javascript",
"webgl",
"html5",
"cad"
],
"dependencies": {
"three": "^0.137.5",
"loglevel": "^1.8.0",
"opentype.js": "^1.3.4"
}
"name": "dxf-viewer",
"version": "1.0.16",
"description": "JavaScript DXF file viewer",
"main": "src/index.js",
"author": "Artyom Lebedev<artyom.lebedev@gmail.com>",
"license": "Mozilla Public License 2.0",
"repository": "https://github.com/vagran/dxf-viewer",
"keywords": [
"dxf",
"viewer",
"javascript",
"webgl",
"html5",
"cad"
],
"files": [
"src",
"README.md",
"LICENSE",
"CONTRIBUTORS"
],
"dependencies": {
"@types/three": "^0.144.0",
"three": "^0.146.0",
"loglevel": "^1.8.0",
"opentype.js": "^1.3.4"
}
}
# DXF viewer
*If you just need to view your DXF, [click here](https://vagran.github.io/dxf-viewer-example/).*
This package provides DXF 2D viewer component written in JavaScript. It renders drawings using WebGL

@@ -13,6 +15,5 @@ (via [three.js](https://threejs.org) library). It was carefully crafted with performance in mind,

This is community version of the viewer. It is initially published in the
[corporate repository](https://github.com/ugcs/ugcs-dxf-viewer) and is used in production in
[Atlas](https://atlas.ugcs.com) project. There it will be mostly maintained for project-specific
needs. The community version will receive all generic features and bug fixes.
*The viewer was initially published in the
[corporate repository](https://github.com/ugcs/ugcs-dxf-viewer) (mostly dead now) and is used in
production in [Atlas](https://atlas.ugcs.com) project.*

@@ -19,0 +20,0 @@ ## Install

@@ -155,2 +155,6 @@ import * as three from "three"

async Load({url, fonts = null, progressCbk = null, workerFactory = null}) {
if (url === null || url === undefined) {
throw new Error("`url` parameter is not specified")
}
this._EnsureRenderer()

@@ -539,5 +543,5 @@

const fullInstanceTransform = instanceType === InstanceType.FULL ?
`
`
pos.xy = mat2(instanceTransform0[0], instanceTransform1[0],
instanceTransform0[1], instanceTransform1[1]) * pos.xy +
instanceTransform0[1], instanceTransform1[1]) * pos.xy +
vec2(instanceTransform0[2], instanceTransform1[2]);

@@ -551,3 +555,3 @@ ` : ""

const pointInstanceTransform = instanceType === InstanceType.POINT ?
`
`
pos.xy += instanceTransform;

@@ -561,3 +565,3 @@ ` : ""

vertex: `
precision highp float;

@@ -571,3 +575,3 @@ precision highp int;

${pointSizeUniform}
void main() {

@@ -582,3 +586,3 @@ vec4 pos = vec4(position, 0.0, 1.0);

fragment: `
precision highp float;

@@ -588,3 +592,3 @@ precision highp int;

out vec4 fragColor;
void main() {

@@ -667,4 +671,2 @@ fragColor = vec4(color, 1.0);

pointSize: 2,
/** Target angle for each segment of tessellated arc. */
arcTessellationAngle: 6 / 180 * Math.PI,
/** Scene generation options. */

@@ -671,0 +673,0 @@ sceneOptions: DxfScene.DefaultOptions,

@@ -58,3 +58,3 @@ import {DxfFetcher} from "./DxfFetcher"

if (msg.signature !== MSG_SIGNATURE) {
console.log(`Message with bad signature: ${msg}`)
console.log("Message with bad signature", msg)
return

@@ -101,3 +101,3 @@ }

if (msg.signature !== MSG_SIGNATURE) {
console.log(`Message with bad signature: ${msg}`)
console.log("Message with bad signature", msg)
return

@@ -104,0 +104,0 @@ }

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