Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self._camera.minZ = .01
self._cameraHolder.visibility = false
// plane obscuring the camera - for overlaying an effect on the whole view
self._camScreen = Mesh.CreatePlane('camScreen', 10, scene)
self.addMeshToScene(self._camScreen)
self._camScreen.position.z = .1
self._camScreen.parent = self._camera
self._camScreenMat = self.makeStandardMaterial('camscreenmat')
self._camScreen.material = self._camScreenMat
self._camScreen.setEnabled(false)
self._camLocBlock = 0
// apply some defaults
var lightVec = new Vector3(0.1, 1, 0.3)
self._light = new HemisphericLight('light', lightVec, scene)
function arrToColor(a) { return new Color3(a[0], a[1], a[2]) }
scene.clearColor = arrToColor(opts.clearColor)
scene.ambientColor = arrToColor(opts.ambientColor)
self._light.diffuse = arrToColor(opts.lightDiffuse)
self._light.specular = arrToColor(opts.lightSpecular)
self._light.groundColor = arrToColor(opts.groundLightColor)
// make a default flat material (used or clone by terrain, etc)
self.flatMaterial = self.makeStandardMaterial('flatmat')
}