Giter Site home page Giter Site logo

atom-jscad's Introduction

atom-jscad

Solid 3D CAD models inside Atom (JSCAD).

Screenshot

Package available here.

Install

Released version can be installed from Atom's Packages > Settings View > Install package/theme

To install development version, go to the atom packages location (~/.atom/packages/), then

  • git clone https://github.com/apla/atom-jscad
  • cd atom-jscad

Other projects

This is a base of this package. Project is very outdated, some changes backported from .org version, some features added, some things rewritten.

Allows online editing of jscad files, but now in a heavy rewrite stage. Now processing and rendering is almost the same (excluding multiple objects returned from main). Best strategy for atom-jscad is use OpenJSCAD.Processor and OpenJSCAD.Viewer from this project.

WIP

  • Add option to use touchpad scroll on Mac for panning
  • Add watch for minimum suggestion length in autocomplete-plus configuration
  • Human-centric scad => jscad conversion
  • Use processor class from .org
    • Allow to include any supported file
    • Jump to the error source in included file
  • EPIC merge joostn and Spiritdude histories

CHANGELOG

v1.2.0

  • Watch includes for changes and reload

v1.1.0

  • Added completion for some openscad-like helpers

v1.0.0

  • Every type of error should be reported to user from now
  • Written own include function, similar to the .org version
  • Fixed infinite loop on previewing second pane
  • Added full featured sample with descriptions
  • Package migration

License

This is licensed under the MIT license.

atom-jscad's People

Contributors

apla avatar matiasinsaurralde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

atom-jscad's Issues

Failed to activate the atom-jscad package

[Enter steps to reproduce:]

Not sure, just opened Atom with an old project in foreground. I don't update or use Atom a ton so maybe some stale plugins?

Atom: 1.47.0 x64
Electron: 5.0.13
OS: Mac OS X 10.15.5
Thrown From: atom-jscad package 1.2.1

Stack Trace

Failed to activate the atom-jscad package

At webFrame.registerURLSchemeAsBypassingCSP is not a function

TypeError: webFrame.registerURLSchemeAsBypassingCSP is not a function
    at /packages/atom-jscad/lib/atom-scad-preview-view.js:28:10)
    at /packages/atom-jscad/lib/atom-scad-preview-view.js:295:3)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:147450)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:150998)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:146766)
    at /packages/atom-jscad/lib/atom-scad-preview.js:16:27)
    at /packages/atom-jscad/lib/atom-scad-preview.js:304:3)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:147450)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:150998)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:14:16)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:695414)
    at Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3205936)
    at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3193920)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3193698
    at Package.measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3191308)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3193558
    at new Promise (<anonymous>)
    at Package.activate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3193501)
    at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382738)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382354
    at Config.transactAsync (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:332002)
    at PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382304)

Commands

Non-Core Packages

atom-beautify 0.33.4 
atom-jscad 1.2.1 
color-picker 2.3.0 
minimap 4.29.9 

Failed to activate the atom-scad-preview package

Opening a project and building (either with menu item or cmd+Y) results in an error
'Cannot find module 'loophole'

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: atom-scad-preview package, v0.3.0

Stack Trace

Failed to activate the atom-scad-preview package

At Cannot find module 'loophole'

Error: Cannot find module 'loophole'
    at Module._resolveFilename (module.js:338:15)
    at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:6:14)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:4:27)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:715:27)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:173:16)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:795:25
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:20)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:01.0 atom-scad-preview:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "mcduino",
      "build-tools",
      "r-exec",
      "language-matlab-octave",
      "git-time-machine",
      "highlight-column",
      "imdone-atom",
      "g-code"
    ],
    "projectHome": "/Users/johnpateman/Documents/Code/",
    "themes": [
      "one-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
Repl, v0.5.0
atom-scad-preview, v0.3.0
auto-update-packages, v1.0.1
autocomplete-clang, v0.9.3
build, v0.64.0
build-make, v0.10.0
build-xcodebuild, v0.2.0
busy, v0.5.0
file-icons, v1.7.15
highlight-selected, v0.11.2
ink, v0.4.4
julia-client, v0.4.7
language-arduino, v0.4.1
language-gherkin, v1.0.4
language-ini, v1.16.0
language-julia, v0.6.0
language-linuxcnc-gcode, v0.1.0
language-mathematica, v0.2.1
language-openscad, v0.4.3
language-r, v0.4.1
latex-completions, v0.3.1
linter, v1.11.14
linter-gcc, v0.6.14
linter-lintr, v1.0.4
linter-matlab, v1.1.0
minimap, v4.24.6
platformio-ide, v1.2.2
platformio-ide-terminal, v2.1.0
project-manager, v2.9.7
tool-bar, v0.4.0
uber-juno, v0.1.1

# Dev
No dev packages

Displays pane but does not render object

Have installed 0.4.0 (Atom 1.8.0).

have tried with

cube([10,10,10]);

and

function main() {
return CSG.roundedCube({radius: 10, roundradius: 1})
}

(plus a few more complex real models but I thought , when it didn't work I would try it with something very simple).

Render pane appears and for the faintest fraction of a second "Processing, please wait" (I think - it is too brief to be sure) but the pane remains empty with just the background - no grid or object. No error condition reported though.

Uncaught TypeError: Not a string or buffer

[Enter steps to reproduce below:]

  1. ...New file in Atom
  2. ...cube([10,10,10]);
    Run atom-scad-preview
    get an error with crypto.js:70

Atom Version: 1.8.0
System: Mac OS X 10.11.5
Thrown From: atom-scad-preview package, v0.1.0

Stack Trace

Uncaught TypeError: Not a string or buffer

At crypto.js:70

TypeError: Not a string or buffer
    at TypeError (native)
    at Hash.update (crypto.js:70:16)
    at new AtomScadPreviewView (/Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:19:52)
    at /Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:55:14
    at Workspace.module.exports.Workspace.openURIInPane (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:489:22)
    at Workspace.module.exports.Workspace.open (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:424:19)
    at Object.module.exports.AtomScadPreview.toggle (/Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:86:22)
    at atom-workspace.subscriptions.add.atom.commands.add.atom-scad-preview:toggle (/Users/johnpateman/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:28:24)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:1100:28)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/application-delegate.js:327:25)
    at emitTwo (events.js:87:13)
    at EventEmitter.emit (events.js:172:7)

Commands

     -2:39.2.0 application:show-settings (a.inline-block)
     -1:32.6.0 grammar-selector:show (atom-text-editor.editor)
     -1:29.4.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:21.6.0 atom-scad-preview:toggle (a.inline-block)
     -0:18.5.0 application:new-file (atom-pane.pane.active)
     -0:15.5.0 core:paste (atom-text-editor.editor.is-focused)
     -0:12.2.0 grammar-selector:show (atom-text-editor.editor.is-focused)
     -0:09.5.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:01.8.0 atom-scad-preview:toggle (a.inline-block)

Config

{
  "core": {
    "disabledPackages": [
      "mcduino",
      "build-tools",
      "r-exec",
      "language-matlab-octave",
      "git-time-machine",
      "highlight-column",
      "imdone-atom",
      "g-code"
    ],
    "projectHome": "/Users/johnpateman/Documents/Code/",
    "themes": [
      "one-dark-ui",
      "atom-dark-syntax"
    ]
  }
}

Installed Packages

# User
Repl, v0.5.0
atom-beautify, v0.29.8
atom-scad-preview, v0.1.0
auto-update-packages, v1.0.1
autocomplete-clang, v0.9.3
build, v0.64.0
build-make, v0.10.0
build-xcodebuild, v0.2.0
busy, v0.5.0
file-icons, v1.7.14
highlight-selected, v0.11.2
ink, v0.4.4
julia-client, v0.4.7
language-arduino, v0.4.1
language-gherkin, v1.0.4
language-ini, v1.16.0
language-julia, v0.6.0
language-linuxcnc-gcode, v0.1.0
language-mathematica, v0.2.0
language-openscad, v0.4.3
language-r, v0.4.1
latex-completions, v0.3.1
linter, v1.11.10
linter-gcc, v0.6.14
linter-lintr, v1.0.4
linter-matlab, v1.1.0
minimap, v4.24.6
platformio-ide, v1.2.2
platformio-ide-terminal, v2.0.10
project-manager, v2.9.7
tool-bar, v0.4.0
uber-juno, v0.1.1

# Dev
No dev packages

external file changes do not cause reload

Hey guys, great work on the plugin. Tried it again after a few months, and it's working well. One issue I have is with the workflow that I use.

I use a lot of jscad libraries, and have a gulp project and yeoman generator to set up jscad projects. Due to issues with the normal jscad include loaders, I bundle my libraries and source into one file inside a ./dist/ directory. See jscad-utils for the main library I use, and leafblower for a small sample project.

I run a gulp task to watch the code files (and any linked libraries) for changes, to regenerate the ./dist/leafblower.jscad' combined file. The atom-scad-previewdoesn't seem to see the file changes if this file is modified outside atom. If I open and then save the./dist/leafblower.jscad` file, it will reload the viewer.

I've written a couple of atom plugins, so I'd be willing to help :-) Any pointer as to where to look in the code, I've just started digging through it.

Uncaught [object DOMException] when including relative path on Windows

I'm getting this error when I include a file in the same directory as the main with: include('polygons.jscad')

The console's output:

C:\Users\hunagzso\AppData\Local\atom.atom\packages\atom-jscad\lib\atom-scad-preview-view.js:139 adding subscription Object {path: "/Users/hunagzso/Google Drive/3D Print New/Spigot/polygons.jscad", filename: "polygons.jscad"}

95b91bf9-ba87-4144-b0cd-83e90453cede:45
/Users/hunagzso/Google Drive/3D Print New/Spigot/polygons.jscad(/Users/hunagzso/Google Drive/3D Print New/Spigot/, polygons.jscad)

/Users/hunagzso/Google%20Drive/3D%20Print%20New/Spigot/polygons.jscad:1
GET file:///Users/hunagzso/Google%20Drive/3D%20Print%20New/Spigot/polygons.jscad net::ERR_FILE_NOT_FOUND

Seems like it doesn't specify the drive letter at very beginning for the GET. If I provide the full absolute path including the drive letter, the include works.

I'm using Atom 1.17.0 on Windows 10.

Failed to load the atom-jscad package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.48.0 x64
Electron: 5.0.13
OS: Mac OS X 10.15.5
Thrown From: atom-jscad package 1.2.1

Stack Trace

Failed to load the atom-jscad package

At webFrame.registerURLSchemeAsBypassingCSP is not a function

TypeError: webFrame.registerURLSchemeAsBypassingCSP is not a function
    at /packages/atom-jscad/lib/atom-scad-preview-view.js:28:10)
    at /packages/atom-jscad/lib/atom-scad-preview-view.js:295:3)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:147503)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:151051)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:146819)
    at /packages/atom-jscad/lib/atom-scad-preview.js:16:27)
    at /packages/atom-jscad/lib/atom-scad-preview.js:304:3)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:147503)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:151051)
    at Module.load (internal/modules/cjs/loader.js:701:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:633:12)
    at Function.Module._load (internal/modules/cjs/loader.js:625:3)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:14:16)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:695414)
    at Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3204187)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3190727
    at Package.measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3189559)
    at Package.load (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:3190300)
    at PackageManager.loadAvailablePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:381522)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:379945
    at Config.transact (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:332010)
    at PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:379883)
    at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:716025
    at async Promise.all (index 0)
    at AtomEnvironment.startEditorWindow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:1:718064)

Commands

Non-Core Packages

atom-jscad 1.2.1 

Atom refuses to create a worker

I get the following error when trying to render a preview:

Uncaught DOMException: Failed to construct 'Worker': Access to the script at 'blob:file:///4d8122a1-4c76-4188-8671-774ba8975a55' is denied by the document's Content Security Policy.
at Function.OpenJsCad.parseJsCadScriptASync [as __old] (file:///home/holger/.atom/packages/atom-jscad/standalone/openjscad.js:259:16)
at Function.parseJsCadScriptASync (/home/holger/.atom/packages/atom-jscad/standalone/overrides.js:86:34)
at OpenJsCad.Processor.rebuildSolid (file:///home/holger/.atom/packages/atom-jscad/standalone/openjscad.js:857:33)
at OpenJsCad.Processor.setJsCad (file:///home/holger/.atom/packages/atom-jscad/standalone/openjscad.js:777:12)
at AtomScadPreviewView.module.exports.AtomScadPreviewView.render (/home/holger/.atom/packages/atom-jscad/lib/atom-scad-preview-view.js:147:20)
at AtomScadPreviewView.dependencyLoaded (/home/holger/.atom/packages/atom-jscad/lib/atom-scad-preview-view.js:216:14)

SecurityError when previewing under Mac OS 10.11

Max OS 10.11.4
Atom 1.7.4
atom-scad-preview 0.0.3 (from package installer)


When I try to preview some scad code, I get the following error message popup:

SecurityError: Failed to construct 'Worker': Access to the script at 'blob:file%3A///a4e2f29b-bd8f-4f1b-9a5d-1834982fd51a' is denied by the document's Content Security Policy.
111

(file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/openjscad.js line 512)

The code I am trying to prevew in this example is:

cube([10,10,10]);

..but it happens on any code regardless.

Just in case you need it, here is a stack trace from the developer panel:

index.js:52 Window load time: 604ms
/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:983 ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:89 AtomScadPreview was toggled!
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/three.min.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/orbitcontrols.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/projector.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/canvasrenderer.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/jquery-2.1.3.min.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/csg.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/threecsg.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/openjscad.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/formats.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview-view.js:27 file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/main.js
/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:95 container => AtomScadPreviewView {pathname: "/Users/my_user_name/tmp/rolly.scad", fileIdentifier: "d8da61eeb08cc5aa9be1061eef2266a8", element: div.atom-scad-preview, lastOpened: 1464710406910}element: div.atom-scad-previewfileIdentifier: "d8da61eeb08cc5aa9be1061eef2266a8"lastOpened: 1464710406910pathname: "/Users/my_user_name/tmp/rolly.scad"render: ()__proto__: AtomScadPreviewView
three.min.js:513 THREE.WebGLRenderer 70
openjscad.js:477 baselibraries ["file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/csg.js", "file:///Users/my_user_name/.atom/packages/atom-scad-preview/standalone/openjscad.js"]
openjscad.js:512 Refused to create a child context containing 'blob:file%3A///a4e2f29b-bd8f-4f1b-9a5d-1834982fd51a' because it violates the following Content Security Policy directive: "default-src *". Note that 'child-src' was not explicitly set, so 'default-src' is used as a fallback.
OpenJsCad.parseJsCadScriptASync @ openjscad.js:512OpenJsCad.Processor.rebuildSolid @ openjscad.js:1083OpenJsCad.Processor.setJsCad @ openjscad.js:1012(anonymous function) @ main.js:14
openjscad.js:512 Uncaught SecurityError: Failed to construct 'Worker': Access to the script at 'blob:file%3A///a4e2f29b-bd8f-4f1b-9a5d-1834982fd51a' is denied by the document's Content Security Policy.OpenJsCad.parseJsCadScriptASync @ openjscad.js:512OpenJsCad.Processor.rebuildSolid @ openjscad.js:1083OpenJsCad.Processor.setJsCad @ openjscad.js:1012(anonymous function) @ main.js:14
/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:622 Error serializing package 'atom-scad-preview' TypeError: Cannot read property 'serialize' of null
    at Object.module.exports.AtomScadPreview.serialize (/Users/my_user_name/.atom/packages/atom-scad-preview/lib/atom-scad-preview.js:85:57)
    at Package.module.exports.Package.serialize (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:619:100)
    at PackageManager.module.exports.PackageManager.serializePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:596:63)
    at PackageManager.module.exports.PackageManager.serialize (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:589:14)
    at AtomEnvironment.module.exports.AtomEnvironment.serialize (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:771:38)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:984:27module.exports.Package.serialize @ /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:622module.exports.PackageManager.serializePackage @ /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:596module.exports.PackageManager.serialize @ /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:589module.exports.AtomEnvironment.serialize @ /Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:771(anonymous function) @ /Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:984

Only first element of array is shown

The code below:

function main() {
    return [
         cube({size: 3, center: true}),
         sphere({r:2, center: false})]  
}

Should display both a cube and a sphere, however in Atom it shows only the cube.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.