Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elfrank committed Oct 18, 2019
1 parent ca890ae commit cd898c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions build/RayTracingRenderer.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@

_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(EnvironmentLight)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.map = map;
_this.isEnvironmentLight = true;
return _this;
}

Expand Down Expand Up @@ -2066,21 +2067,21 @@
var directionalLights = [];
var environmentLights = [];
scene.traverse(function (child) {
if (child instanceof THREE$1.Mesh) {
if (child.isMesh) {
if (!child.geometry || !child.geometry.getAttribute('position')) {
console.warn(child, 'must have a geometry property with a position attribute');
} else if (!(child.material instanceof THREE$1.MeshStandardMaterial)) {
} else if (!child.material.isMeshStandardMaterial) {
console.warn(child, 'must use MeshStandardMaterial in order to be rendered.');
} else {
meshes.push(child);
}
}

if (child instanceof THREE$1.DirectionalLight) {
if (child.isDirectionalLight) {
directionalLights.push(child);
}

if (child instanceof EnvironmentLight) {
if (child.isEnvironmentLight) {
if (environmentLights.length > 1) {
console.warn(environmentLights, 'only one environment light can be used per scene');
} else if (isHDRTexture(child)) {
Expand Down
9 changes: 5 additions & 4 deletions build/RayTracingRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
constructor(map, ...args) {
super(...args);
this.map = map;
this.isEnvironmentLight = true;
}

copy(source) {
Expand Down Expand Up @@ -2842,20 +2843,20 @@ void main() {
const directionalLights = [];
const environmentLights = [];
scene.traverse(child => {
if (child instanceof THREE$1.Mesh) {
if (child.isMesh) {
if (!child.geometry || !child.geometry.getAttribute('position')) {
console.warn(child, 'must have a geometry property with a position attribute');
}
else if (!(child.material instanceof THREE$1.MeshStandardMaterial)) {
else if (!(child.material.isMeshStandardMaterial)) {
console.warn(child, 'must use MeshStandardMaterial in order to be rendered.');
} else {
meshes.push(child);
}
}
if (child instanceof THREE$1.DirectionalLight) {
if (child.isDirectionalLight) {
directionalLights.push(child);
}
if (child instanceof EnvironmentLight) {
if (child.isEnvironmentLight) {
if (environmentLights.length > 1) {
console.warn(environmentLights, 'only one environment light can be used per scene');
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ray-tracing-renderer",
"version": "0.1.4",
"version": "0.2.0",
"description": "A [Three.js](https://github.com/mrdoob/three.js/) renderer which utilizes path tracing to render a scene with true photorealism. The renderer supports global illumination, reflections, soft shadows, and realistic environment lighting.",
"main": "src/main.js",
"scripts": {
Expand Down

0 comments on commit cd898c8

Please sign in to comment.