upgrade rw + lint (#521)
* Various linting fixes * Fix component name * Upgrade to redwood 0.36.4
This commit was merged in pull request #521.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import {
|
||||
CadhubNumberChoiceParam,
|
||||
CadhubNumberOption,
|
||||
CadhubParams,
|
||||
CadhubStringChoiceParam,
|
||||
CadhubStringOption,
|
||||
} from 'src/components/Customizer/customizerConverter'
|
||||
|
||||
|
||||
@@ -5,8 +5,6 @@ const setPoints = (points, p, i) => {
|
||||
}
|
||||
|
||||
function CSG2Vertices(csg) {
|
||||
const idx = 0
|
||||
|
||||
let vLen = 0,
|
||||
iLen = 0
|
||||
for (const poly of csg.polygons) {
|
||||
@@ -178,7 +176,6 @@ function parseParams(script) {
|
||||
|
||||
let i = 0,
|
||||
line,
|
||||
next,
|
||||
lineNum
|
||||
while (i < lines.length) {
|
||||
line = lines[i].code.trim()
|
||||
@@ -194,7 +191,6 @@ function parseParams(script) {
|
||||
while (i < lines.length) {
|
||||
line = lines[i].code
|
||||
lineNum = lines[i].line
|
||||
next = lines[i + 1] ? lines[i + 1].code : ''
|
||||
if (line[0] === '}') break
|
||||
|
||||
if (line[0] === '/') {
|
||||
@@ -593,7 +589,7 @@ const makeRenderWorker = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const updateAndRender = (timestamp) => {
|
||||
const updateAndRender = () => {
|
||||
renderTimer = null
|
||||
doRotatePanZoom()
|
||||
|
||||
@@ -607,7 +603,6 @@ const makeRenderWorker = () => {
|
||||
state.camera.position = updates.camera.position
|
||||
perspectiveCamera.update(state.camera)
|
||||
renderOptions.entities = [gridOptions, axisOptions, ...entities]
|
||||
const time = Date.now()
|
||||
renderer(renderOptions)
|
||||
if (updateRender) {
|
||||
updateRender = ''
|
||||
|
||||
@@ -75,7 +75,7 @@ export const render = async ({ code, settings }: RenderArgs) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const stl = async ({ code, settings }: RenderArgs) => {
|
||||
export const stl = async ({ code /*settings*/ }: RenderArgs) => {
|
||||
const body = JSON.stringify({
|
||||
settings: {},
|
||||
file: code,
|
||||
|
||||
@@ -21,7 +21,7 @@ export const canvasToBlob = async (
|
||||
}
|
||||
const oldSize = threeInstance.size
|
||||
updateCanvasSize({ width, height })
|
||||
const imgBlobPromise: Promise<Blob> = new Promise((resolve, reject) => {
|
||||
const imgBlobPromise: Promise<Blob> = new Promise((resolve) => {
|
||||
threeInstance.gl.domElement.toBlob(
|
||||
(blob) => {
|
||||
resolve(blob)
|
||||
@@ -34,8 +34,8 @@ export const canvasToBlob = async (
|
||||
return imgBlobPromise
|
||||
}
|
||||
|
||||
export const blobTo64 = async (blob: Blob): Promise<string> => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
export const blobTo64 = (blob: Blob): Promise<string> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader()
|
||||
reader.onloadend = () => {
|
||||
if (typeof reader.result === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user