Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
923 changes: 718 additions & 205 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/model-viewer/src/three-components/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ export class Renderer extends EventDispatcher {
preserveDrawingBuffer: true,
});
this.threeRenderer.autoClear = true;
this.threeRenderer.useLegacyLights = false;
this.threeRenderer.setPixelRatio(1); // handle pixel ratio externally

this.threeRenderer.debug = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* limitations under the License.
*/

import {FrontSide, Material, Mesh, MeshStandardMaterial, Object3D, Sphere} from 'three';
import {FrontSide, Material, Mesh, MeshStandardMaterial, Object3D, Sphere, SpotLight} from 'three';
import {GLTF} from 'three/examples/jsm/loaders/GLTFLoader.js';

import {$clone, $prepare, $preparedGLTF, GLTFInstance, PreparedGLTF} from '../GLTFInstance.js';
Expand Down Expand Up @@ -133,6 +133,13 @@ export class ModelViewerGLTFInstance extends GLTFInstance {
sourceUUIDToClonedMaterial.set(material.uuid, mesh.material);
}
}

const light = node as SpotLight;
if (light.target !== undefined) {
// The target's parent is lost in the cloning process, but in
// GLTFLoader, all light targets are children of their light.
light.add(light.target);
}
});

// Cross-correlate the scene graph by relying on information in the
Expand Down
2 changes: 1 addition & 1 deletion packages/render-fidelity-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"lit": "^2.7.2",
"mkdirp": "^1.0.4",
"pngjs": "^6.0.0",
"puppeteer": "^18.2.1",
"puppeteer": "^21.3.4",
"rimraf": "^3.0.2",
"three": "^0.148.0",
"three-gpu-pathtracer": "^0.0.13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

import HTTPServer from 'http-server';

import {ArtifactCreator} from '../../artifact-creator.js';
import {ImageComparisonConfig} from '../../common.js';

Expand All @@ -29,14 +30,15 @@ export const rendererScreenshot = async(
width: number = 10,
height: number = 10): Promise<void> => {
const dimensions = {width, height};
const server = HTTPServer.createServer({root: './', cache: -1});
const server = HTTPServer.createServer({root: '../../', cache: -1});

server.listen(port);

const screenshotCreator = new ArtifactCreator(
config,
rootDirectory,
`http://localhost:${port}/test/renderers/${renderer}/`);
`http://localhost:${port}/packages/render-fidelity-tools/test/renderers/${
renderer}/`);

if (scenarioName == null) {
throw new Error(' Scenario name not specified!');
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.