-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { expect } from "chai" | ||
|
||
describe("Mesh", () => { | ||
|
||
it("should render cylinder correctly using pixi *.*.*", async () => { | ||
let render = (renderer, resources) => { | ||
let lightingEnvironment = new PIXI3D.LightingEnvironment(renderer) | ||
lightingEnvironment.imageBasedLighting = new PIXI3D.ImageBasedLighting( | ||
resources["assets/chromatic/diffuse.cubemap"].cubemap, | ||
resources["assets/chromatic/specular.cubemap"].cubemap | ||
) | ||
let mesh = PIXI3D.Mesh3D.createCylinder() | ||
mesh.material.lightingEnvironment = lightingEnvironment | ||
mesh.rotationQuaternion.setEulerAngles(15, 35, 0) | ||
renderer.render(mesh) | ||
} | ||
await expect(render).to.match("snapshots/cibey.png", { | ||
resources: [ | ||
"assets/chromatic/specular.cubemap", | ||
"assets/chromatic/diffuse.cubemap" | ||
] | ||
}) | ||
}) | ||
|
||
it("should render circle correctly using pixi *.*.*", async () => { | ||
let render = (renderer, resources) => { | ||
let lightingEnvironment = new PIXI3D.LightingEnvironment(renderer) | ||
lightingEnvironment.imageBasedLighting = new PIXI3D.ImageBasedLighting( | ||
resources["assets/chromatic/diffuse.cubemap"].cubemap, | ||
resources["assets/chromatic/specular.cubemap"].cubemap | ||
) | ||
let mesh = PIXI3D.Mesh3D.createCircle() | ||
mesh.material.lightingEnvironment = lightingEnvironment | ||
renderer.render(mesh) | ||
} | ||
await expect(render).to.match("snapshots/npswr.png", { | ||
resources: [ | ||
"assets/chromatic/specular.cubemap", | ||
"assets/chromatic/diffuse.cubemap" | ||
] | ||
}) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.