Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const html = require('bel')
// viewer data
// const makeCsgViewer = require('@jscad/csg-viewer')
const rendererStuff = require('@jscad/regl-renderer') // replace this with the correct import
const { prepareRender, drawCommands, cameras, entitiesFromSolids } = rendererStuff
const perspectiveCamera = cameras.perspective
const orbitControls = rendererStuff.controls.orbit
// params
const rotateSpeed = 0.002
const zoomSpeed = 0.08
const panSpeed = 1
// internal state
let initialized = false
let render
let viewerOptions
let camera = perspectiveCamera.defaults
let controls = orbitControls.defaults
let grid = { // grid data
// the choice of what draw command to use is also data based
visuals: {