three-render-objects
Advanced tools
Comparing version 1.2.5 to 1.2.6
@@ -74,3 +74,5 @@ 'use strict'; | ||
if (state.renderer) { | ||
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, bckgColor)), polished.parseToRgb(bckgColor).alpha || 1); | ||
var alpha = polished.parseToRgb(bckgColor).alpha; | ||
if (alpha === undefined) alpha = 1; | ||
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, bckgColor)), alpha); | ||
} | ||
@@ -299,3 +301,5 @@ }, | ||
}); | ||
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, state.backgroundColor)), polished.parseToRgb(state.backgroundColor).alpha || 1); | ||
var bckgAlpha = polished.parseToRgb(state.backgroundColor).alpha; | ||
if (bckgAlpha === undefined) bckgAlpha = 1; | ||
state.renderer.setClearColor(new three$1.Color(polished.opacify(1, state.backgroundColor)), bckgAlpha); | ||
state.container.appendChild(state.renderer.domElement); // configure controls | ||
@@ -302,0 +306,0 @@ |
@@ -70,3 +70,5 @@ import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, Vector2, Vector3, Color, EventDispatcher, MOUSE, Quaternion, Spherical } from 'three'; | ||
if (state.renderer) { | ||
state.renderer.setClearColor(new three.Color(opacify(1, bckgColor)), parseToRgb(bckgColor).alpha || 1); | ||
var alpha = parseToRgb(bckgColor).alpha; | ||
if (alpha === undefined) alpha = 1; | ||
state.renderer.setClearColor(new three.Color(opacify(1, bckgColor)), alpha); | ||
} | ||
@@ -295,3 +297,5 @@ }, | ||
}); | ||
state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), parseToRgb(state.backgroundColor).alpha || 1); | ||
var bckgAlpha = parseToRgb(state.backgroundColor).alpha; | ||
if (bckgAlpha === undefined) bckgAlpha = 1; | ||
state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), bckgAlpha); | ||
state.container.appendChild(state.renderer.domElement); // configure controls | ||
@@ -298,0 +302,0 @@ |
{ | ||
"name": "three-render-objects", | ||
"version": "1.2.5", | ||
"version": "1.2.6", | ||
"description": "Easy way to render ThreeJS objects with built-in interaction defaults", | ||
@@ -39,3 +39,3 @@ "unpkg": "dist/three-render-objects.min.js", | ||
"kapsule": "^1.9.2", | ||
"polished": "^2.2.0", | ||
"polished": "^2.3.0", | ||
"three": "^0.97.0", | ||
@@ -42,0 +42,0 @@ "three-fly-controls": "^1.1.0", |
@@ -54,3 +54,5 @@ import { | ||
if (state.renderer) { | ||
state.renderer.setClearColor(new three.Color(opacify(1, bckgColor)), parseToRgb(bckgColor).alpha || 1); | ||
let alpha = parseToRgb(bckgColor).alpha; | ||
if (alpha === undefined) alpha = 1; | ||
state.renderer.setClearColor(new three.Color(opacify(1, bckgColor)), alpha); | ||
} | ||
@@ -248,3 +250,5 @@ }, | ||
state.renderer = new three.WebGLRenderer({ alpha: true }); | ||
state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), parseToRgb(state.backgroundColor).alpha || 1); | ||
let bckgAlpha = parseToRgb(state.backgroundColor).alpha; | ||
if (bckgAlpha === undefined) bckgAlpha = 1; | ||
state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), bckgAlpha); | ||
state.container.appendChild(state.renderer.domElement); | ||
@@ -251,0 +255,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4816685
33229
Updatedpolished@^2.3.0