@jscad/web 2.6.11 → 2.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -302
- package/dist/jscad-web.min.js +2372 -2399
- package/package.json +7 -7
- package/postInstall.js +1 -1
- package/remote.pl +1 -1
- package/src/index.js +7 -2
- package/src/most-gestures/gestures.test.js +2 -2
- package/src/ui/flow/viewer.js +2 -2
- package/src/ui/views/examples.js +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jscad/web",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.13",
|
|
4
4
|
"description": "Web Application for JSCAD",
|
|
5
5
|
"homepage": "https://openjscad.xyz/",
|
|
6
6
|
"repository": "https://github.com/jscad/OpenJSCAD.org",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "browserify src/index.js -o dist/jscad-web.min.js -g uglifyify --standalone jscadWeb",
|
|
11
11
|
"dev": "budo demo.js --port=8081 --css ./css/demo.css --live -- -b",
|
|
12
|
-
"postinstall": "node postInstall.js
|
|
12
|
+
"postinstall": "node postInstall.js",
|
|
13
13
|
"test": "ava 'src/**/*.test.js' --verbose --timeout 2m",
|
|
14
14
|
"version": "npm run build && git add dist"
|
|
15
15
|
},
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@jscad/array-utils": "2.1.4",
|
|
39
|
-
"@jscad/core": "2.6.
|
|
39
|
+
"@jscad/core": "2.6.15",
|
|
40
40
|
"@jscad/examples": "2.4.2",
|
|
41
|
-
"@jscad/io": "2.4.
|
|
42
|
-
"@jscad/modeling": "2.
|
|
43
|
-
"@jscad/regl-renderer": "2.6.
|
|
41
|
+
"@jscad/io": "2.4.14",
|
|
42
|
+
"@jscad/modeling": "2.13.0",
|
|
43
|
+
"@jscad/regl-renderer": "2.6.15",
|
|
44
44
|
"@most/create": "2.0.1",
|
|
45
45
|
"brace": "0.11.1",
|
|
46
46
|
"codemirror": "5.65.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"url": "https://opencollective.com/openjscad",
|
|
68
68
|
"logo": "https://opencollective.com/openjscad/logo.txt"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "602bb2a3a2c2c7c21315e2801804dd1ec0cbd3f8"
|
|
71
71
|
}
|
package/postInstall.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// this copies the examples folder from the @jscad/examples repository locally
|
|
2
2
|
const path = require('path')
|
|
3
|
-
const examplesSrc = path.resolve('
|
|
3
|
+
const examplesSrc = path.resolve('../examples')
|
|
4
4
|
const copydir = require('copy-dir')
|
|
5
5
|
const fs = require('fs')
|
|
6
6
|
const DocBlock = require('docblock')
|
package/remote.pl
CHANGED
package/src/index.js
CHANGED
|
@@ -110,8 +110,13 @@ const makeJscad = async (targetElement, options) => {
|
|
|
110
110
|
// increase the count of jscad instances in this page
|
|
111
111
|
instances += 1
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
setTimeout(() => { document.getElementById('toggleAxes').click() },
|
|
113
|
+
// See ui/flow/viewer.js for the initial states
|
|
114
|
+
//setTimeout(() => { document.getElementById('toggleAxes').click() }, 100)
|
|
115
|
+
//setTimeout(() => { document.getElementById('toggleGrid').click() }, 200)
|
|
116
|
+
//setTimeout(() => { document.getElementById('toggleAutoZoom').click() }, 200)
|
|
117
|
+
|
|
118
|
+
// click on an example for the initial view
|
|
119
|
+
setTimeout(() => { document.getElementById('example1-1').click() }, 200)
|
|
115
120
|
|
|
116
121
|
// we return a function to allow setting/modifying params
|
|
117
122
|
const mainParams = callbackToObservable()
|
|
@@ -272,7 +272,7 @@ test.cb('zooms (from mousewheel event) direct element', (t) => {
|
|
|
272
272
|
})
|
|
273
273
|
})
|
|
274
274
|
|
|
275
|
-
test.
|
|
275
|
+
test.skip('zooms (from pinch)', (t) => {
|
|
276
276
|
const zooms = pointerGestures(t.context.baseStreams).zooms
|
|
277
277
|
|
|
278
278
|
const div = t.context.div
|
|
@@ -296,7 +296,7 @@ test.cb('zooms (from pinch)', (t) => {
|
|
|
296
296
|
})
|
|
297
297
|
})
|
|
298
298
|
|
|
299
|
-
test.
|
|
299
|
+
test.skip('zooms (from pinch) direct element', (t) => {
|
|
300
300
|
const div = t.context.div
|
|
301
301
|
const zooms = pointerGestures(div).zooms
|
|
302
302
|
|
package/src/ui/flow/viewer.js
CHANGED
package/src/ui/views/examples.js
CHANGED
|
@@ -6,17 +6,21 @@ const examplesData = require('../../../examples/examples.json')
|
|
|
6
6
|
const examples = (state, i18n) => {
|
|
7
7
|
const baseUrl = new URL(window.location.href)
|
|
8
8
|
const origin = (baseUrl.origin === 'null') ? 'file://' : baseUrl.origin
|
|
9
|
-
let newPath = origin +
|
|
10
|
-
newPath = newPath.endsWith(
|
|
9
|
+
let newPath = origin + baseUrl.pathname
|
|
10
|
+
newPath = newPath.endsWith(path.sep) ? newPath : newPath + path.sep
|
|
11
11
|
|
|
12
12
|
const examplesMenus = []
|
|
13
|
+
let groupId = 0
|
|
13
14
|
for (const groupName in examplesData) {
|
|
15
|
+
groupId++
|
|
14
16
|
if (!Object.prototype.hasOwnProperty.call(examplesData, groupName)) continue
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
const examplesElements = examplesData[groupName].map((example, i) => {
|
|
19
|
+
const id = `example${groupId}-${i}`
|
|
20
|
+
return html`<li>
|
|
21
|
+
<a class="example" id="${id}" title="${example.description}" data-path="${newPath}${example.filePath}" href="#"> ${example.title} </a>
|
|
18
22
|
</li>`
|
|
19
|
-
)
|
|
23
|
+
})
|
|
20
24
|
examplesMenus.push(html`<li>${groupName}<ul class="examples-list">${examplesElements}</ul></li>`)
|
|
21
25
|
}
|
|
22
26
|
return html`<ul class="examples-group">${examplesMenus}</ul>`
|