language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | mrdoob | three.js | b6b702c50b236fee662c30c9e79c570861270d2d.json | add language tags to code blocks | threejs/lessons/threejs-scenegraph.md | @@ -44,7 +44,7 @@ sun, earth, moon as a demonstration of how to use a scenegraph. Of course
the real sun, earth, and moon use physics but for our purposes we'll
fake it with a scenegraph.
-```
+```js
// an array of objects who's rotation to update
const objects = [];
@@ -76,7 +76,7 @@ Let's also put a single point light in the center of the scene. We'll go into mo
details about point lights later but for now the simple version is a point light
represents light that eminates from a single point.
-```
+```js
{
const color = 0xFFFFFF;
const intensity = 3;
@@ -93,7 +93,7 @@ which way the top of the camera is facing or rather which way is "up" for the
camera. For most situations positive Y being up is good enough but since
we are looking straight down we need to tell the camera that positive Z is up.
-```
+```js
const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
camera.position.set(0, 50, 0);
camera.up.set(0, 0, 1);
@@ -103,7 +103,7 @@ camera.lookAt(0, 0, 0);
In the render loop, adapted from previous examples, we're rotating all
objects in our `objects` array with this code.
-```
+```js
objects.forEach((obj) => {
obj.rotation.y = time;
});
@@ -115,7 +115,7 @@ Since we added the `sunMesh` to the `objects` array it will rotate.
Now let's add an the earth.
-```
+```js
const earthMaterial = new THREE.MeshPhongMaterial({color: 0x2233FF, emissive: 0x112244});
const earthMesh = new THREE.Mesh(sphereGeometry, earthMaterial);
earthMesh.position.x = 10;
@@ -136,7 +136,7 @@ rotate too.
You can see both the sun and the earth are rotating but the earth is not
going around the sun. Let's make the earth a child of the sun
-```
+```js
-scene.add(earthMesh);
+sunMesh.add(earthMesh);
```
@@ -162,7 +162,7 @@ its scale set to 5x with `sunMesh.scale.set(5, 5, 5)`. That means the
To fix it let's add an empty scene graph node. We'll parent both the sun and the earth
to that node.
-```
+```js
+const solarSystem = new THREE.Object3D();
+scene.add(solarSystem);
+objects.push(solarSystem);
@@ -200,7 +200,7 @@ and rotating itself.
Continuing that same pattern let's add a moon.
-```
+```js
+const earthOrbit = new THREE.Object3D();
+earthOrbit.position.x = 10;
+solarSystem.add(earthOrbit);
@@ -246,7 +246,7 @@ One is called an `AxesHelper`. It draws 3 lines representing the local
<span style="color:blue">Z</span> axes. Let's add one to every node we
created.
-```
+```js
// add an AxesHelper to each node
objects.forEach((node) => {
const axes = new THREE.AxesHelper();
@@ -286,7 +286,7 @@ We want to make both a `GridHelper` and an `AxesHelper` for each node. We need
a label for each node so we'll get rid of the old loop and switch to calling
some function to add the helpers for each node
-```
+```js
-// add an AxesHelper to each node
-objects.forEach((node) => {
- const axes = new THREE.AxesHelper();
@@ -318,7 +318,7 @@ that has a getter and setter for a property. That way we can let dat.GUI
think it's manipulating a single property but internally we can set
the visible property of both the `AxesHelper` and `GridHelper` for a node.
-```
+```js
// Turns both axes and grid visible on/off
// dat.GUI requires a property that returns a bool
// to decide to make a checkbox so we make a setter | true |
Other | mrdoob | three.js | b6b702c50b236fee662c30c9e79c570861270d2d.json | add language tags to code blocks | threejs/lessons/threejs-shadows.md | @@ -50,15 +50,15 @@ We'll use some of the code from [the previous article](threejs-cameras.html).
Let's set the background color to white.
-```
+```js
const scene = new THREE.Scene();
+scene.background = new THREE.Color('white');
```
Then we'll setup the same checkerboard ground but this time it's using
a `MeshBasicMaterial` as we don't need lighting for the ground.
-```
+```js
+const loader = new THREE.TextureLoader();
{
@@ -91,19 +91,19 @@ light grey checkerboard.
Let's load the shadow texture
-```javascript
+```js
const shadowTexture = loader.load('resources/images/roundshadow.png');
```
and make an array to remember each sphere and associated objects.
-```javascript
+```js
const sphereShadowBases = [];
```
Then we'll make a sphere geometry
-```javascript
+```js
const sphereRadius = 1;
const sphereWidthDivisions = 32;
const sphereHeightDivisions = 16;
@@ -112,7 +112,7 @@ const sphereGeo = new THREE.SphereBufferGeometry(sphereRadius, sphereWidthDivisi
And a plane geometry for the fake shadow
-```
+```js
const planeSize = 1;
const shadowGeo = new THREE.PlaneBufferGeometry(planeSize, planeSize);
```
@@ -129,7 +129,7 @@ We make each sphere a different hue and then save off the base, the sphere mesh,
the shadow mesh and the initial y position of each sphere.
-```javascript
+```js
const numSpheres = 15;
for (let i = 0; i < numSpheres; ++i) {
// make a base for the shadow and the sphere.
@@ -169,7 +169,7 @@ for (let i = 0; i < numSpheres; ++i) {
We setup 2 lights. One is a `HemisphereLight` with the itensity set to 2 to really
brighten things up.
-```javascript
+```js
{
const skyColor = 0xB1E1FF; // light blue
const groundColor = 0xB97A20; // brownish orange
@@ -181,7 +181,7 @@ brighten things up.
The other is a `DirectionalLight` so the spheres get some defintion
-```javascript
+```js
{
const color = 0xFFFFFF;
const intensity = 1;
@@ -199,7 +199,7 @@ move the sphere up and down using `Math.abs(Math.sin(time))`
which gives us a bouncy animation. And, we also set the shadow material's
opacity so that as each sphere goes higher its shadow fades out.
-```javascript
+```js
function render(time) {
time *= 0.001; // convert to seconds
@@ -248,14 +248,14 @@ Let's start with the `DirectionaLight` with helper example from [the lights arti
The first thing we need to do is turn on shadows in the renderer.
-```
+```js
const renderer = new THREE.WebGLRenderer({canvas: canvas});
+renderer.shadowMap.enabled = true;
```
Then we also need to tell the light to cast a shadow
-```javascript
+```js
const light = new THREE.DirectionalLight(color, intensity);
+light.castShadow = true;
```
@@ -266,14 +266,14 @@ both cast shadows and/or receive shadows.
Let's make the plane (the ground) only receive shadows since we don't
really care what happens underneath.
-```javascript
+```js
const mesh = new THREE.Mesh(planeGeo, planeMat);
mesh.receiveShadow = true;
```
For the cube and the sphere let's have them both receive and cast shadows
-```javascript
+```js
const mesh = new THREE.Mesh(cubeGeo, cubeMat);
mesh.castShadow = true;
mesh.receiveShadow = true;
@@ -300,7 +300,7 @@ the shadows get rendered. In the example above that area is too small.
In order to visualize that area we can get the light's shadow camera and add
a `CameraHelper` to the scene.
-```javascript
+```js
const cameraHelper = new THREE.CameraHelper(light.shadow.camera);
scene.add(cameraHelper);
```
@@ -328,7 +328,7 @@ that we'll pass an object and 2 properties. It will present one property that da
can adjust and in response will set the two properties one positive and one negative.
We can use this to set `left` and `right` as `width` and `up` and `down` as `height`.
-```javascript
+```js
class DimensionGUIHelper {
constructor(obj, minProp, maxProp) {
this.obj = obj;
@@ -348,7 +348,7 @@ class DimensionGUIHelper {
We'll also use the `MinMaxGUIHelper` we created in the [camera article](threejs-cameras.html)
to adjust `near` and `far`.
-```
+```js
const gui = new dat.GUI();
gui.addColor(new ColorGUIHelper(light, 'color'), 'value').name('color');
gui.add(light, 'intensity', 0, 2, 0.01);
@@ -372,7 +372,7 @@ We tell the GUI to call our `updateCamera` function anytime anything changes.
Let's write that function to update the light, the helper for the light, the
light's shadow camera, and the helper showing the light's shadow camera.
-```
+```js
function updateCamera() {
// update the light target's matrixWorld because it's needed by the helper
light.target.updateMatrixWorld();
@@ -423,7 +423,7 @@ where we could manually set most its settings, `SpotLight`'s shadow camera is co
camera is directly connected to the `SpotLight`'s `angle` setting.
The `aspect` is set automatically based on the size of the shadow map.
-```javascript
+```js
-const light = new THREE.DirectionalLight(color, intensity);
+const light = new THREE.SpotLight(color, intensity);
```
@@ -463,7 +463,7 @@ we'll set it only to receive shadows. Also we'll set the position of the
box so its bottom is slightly below the floor so the floor and the bottom
of the box don't z-fight.
-```javascript
+```js
{
const cubeSize = 30;
const cubeGeo = new THREE.BoxBufferGeometry(cubeSize, cubeSize, cubeSize);
@@ -480,7 +480,7 @@ of the box don't z-fight.
And of course we need to switch the light to a `PointLight`.
-```javascript
+```js
-const light = new THREE.SpotLight(color, intensity);
+const light = new THREE.PointLight(color, intensity);
| true |
Other | mrdoob | three.js | b6b702c50b236fee662c30c9e79c570861270d2d.json | add language tags to code blocks | threejs/lessons/threejs-textures.md | @@ -41,7 +41,7 @@ We'll modify one of our first samples. All we need to do is create a `TextureLoa
[`load`](TextureLoader.load) method with the URL of an
image and and set the material's `map` property to the result instead of setting its `color`.
-```
+```js
+const loader = new THREE.TextureLoader();
const material = new THREE.MeshBasicMaterial({
@@ -73,7 +73,7 @@ How about 6 textures, one on each face of a cube?
We just make 6 materials and pass them as an array when we create the `Mesh`
-```
+```js
const loader = new THREE.TextureLoader();
-const material = new THREE.MeshBasicMaterial({
@@ -114,7 +114,7 @@ Most of the code on this site uses the easiest method of loading textures.
We create a `TextureLoader` and then call its [`load`](TextureLoader.load) method.
This returns a `Texture` object.
-```
+```js
const texture = loader.load('resources/images/flower-1.jpg');
```
@@ -133,7 +133,7 @@ that will be called when the texture has finished loading. Going back to our top
we can wait for the texture to load before creating our `Mesh` and adding it to scene
like this
-```
+```js
const loader = new THREE.TextureLoader();
loader.load('resources/images/wall.jpg', (texture) => {
const material = new THREE.MeshBasicMaterial({
@@ -156,7 +156,7 @@ To wait until all textures have loaded you can use a `LoadingManager`. Create on
and pass it to the `TextureLoader` then set its [`onLoad`](LoadingManager.onLoad)
property to a callback.
-```
+```js
+const loadManager = new THREE.LoadingManager();
*const loader = new THREE.TextureLoader(loadManager);
@@ -181,7 +181,7 @@ we can set to another callback to show a progress indicator.
First we'll add a progress bar in HTML
-```
+```html
<body>
<canvas id="c"></canvas>
+ <div id="loading">
@@ -192,7 +192,7 @@ First we'll add a progress bar in HTML
and the CSS for it
-```
+```css
#loading {
position: fixed;
top: 0;
@@ -215,14 +215,13 @@ and the CSS for it
transform-origin: top left;
transform: scaleX(0);
}
-
```
Then in the code we'll update the scale of the `progressbar` in our `onProgress` callback. It gets
called with the URL of the last item loaded, the number of items loaded so far, and the total
number of items loaded.
-```
+```js
+const loadingElem = document.querySelector('#loading');
+const progressBarElem = loadingElem.querySelector('.progressbar');
@@ -474,14 +473,14 @@ They can be set to one of:
For example to turn on wrapping in both directions:
-```
+```js
someTexture.wrapS = THREE.RepeatWrapping;
someTexture.wrapT = THREE.RepeatWrapping;
```
Repeating is set with the [repeat] repeat property.
-```
+```js
const timesToRepeatHorizontally = 4;
const timesToRepeatVertically = 2;
someTexture.repeat.set(timesToRepeatHorizontally, timesToRepeatVertically);
@@ -491,7 +490,7 @@ Offseting the texture can be done by setting the `offset` property. Textures
are offset with units where 1 unit = 1 texture size. On other words 0 = no offset
and 1 = offset one full texture amount.
-```
+```js
const xOffset = .5; // offset by half the texture
const yOffset = .25; // offset by 1/2 the texture
someTexture.offset.set(xOffset, yOffset);`
@@ -503,7 +502,7 @@ It defaults to 0,0 which rotates from the bottom left corner. Like offset
these units are in texture size so setting them to `.5, .5` would rotate
around the center of the texture.
-```
+```js
someTexture.center.set(.5, .5);
someTexture.rotation = THREE.Math.degToRad(45);
```
@@ -512,7 +511,7 @@ Let's modify the top sample above to play with these values
First we'll keep a reference to the texture so we can manipulate it
-```
+```js
+const texture = loader.load('resources/images/wall.jpg');
const material = new THREE.MeshBasicMaterial({
- map: loader.load('resources/images/wall.jpg');
@@ -522,15 +521,15 @@ const material = new THREE.MeshBasicMaterial({
Then we'll use [dat.GUI](https://github.com/dataarts/dat.gui) again to provide a simple interface.
-```
+```html
<script src="../3rdparty/dat.gui.min.js"></script>
```
As we did in previous dat.GUI examples we'll use a simple class to
give dat.GUI an object that it can manipulate in degrees
but that will set a property in radians.
-```
+```js
class DegRadHelper {
constructor(obj, prop) {
this.obj = obj;
@@ -549,7 +548,7 @@ We also need a class that will convert from a string like `"123"` into
a number like `123` since three.js requires numbers for enum settings
like `wrapS` and `wrapT` but dat.GUI only uses strings for enums.
-```
+```js
class StringToNumberHelper {
constructor(obj, prop) {
this.obj = obj;
@@ -566,7 +565,7 @@ class StringToNumberHelper {
Using those classes we can setup a simple GUI for the settings above
-```
+```js
const wrapModes = {
'ClampToEdgeWrapping': THREE.ClampToEdgeWrapping,
'RepeatWrapping': THREE.RepeatWrapping, | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/lessons/resources/images/threejs-postprocessing.svg | @@ -0,0 +1,368 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 500 500" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
+ <g transform="matrix(1,0,0,1,62.6432,13.5269)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="343.907px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="359.227px 373.001px " y="49.652px 49.652px ">tA</tspan></text>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,62.2643,115.3)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="343.907px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="359.227px 373.001px " y="49.652px 49.652px ">tB</tspan></text>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,15.4481,-13.549)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,33.2232,-7.64102)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,50.9984,-1.73305)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,-4.0743,-13.549)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,17.2451,-7.64102)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,38.5646,-1.73305)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-228.074,216.793)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="343.907px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="359.227px 373.001px " y="49.652px 49.652px ">tB</tspan></text>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,15.4481,-13.549)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,33.2232,-7.64102)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,50.9984,-1.73305)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,-4.0743,-13.549)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,17.2451,-7.64102)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,38.5646,-1.73305)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ </g>
+ <g id="Grain" transform="matrix(1,0,0,1,62.2643,216.793)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="343.907px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="359.227px 373.001px " y="49.652px 49.652px ">tA</tspan></text>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,15.4481,-13.549)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,33.2232,-7.64102)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,50.9984,-1.73305)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,-4.0743,-13.549)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,17.2451,-7.64102)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,38.5646,-1.73305)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ <g transform="matrix(2.49095,0,0,2.49095,279.435,46.2989)">
+ <clipPath id="_clip1">
+ <rect x="0" y="0" width="40" height="30"/>
+ </clipPath>
+ <g clip-path="url(#_clip1)">
+ <g transform="matrix(0.401453,-0,-0,0.401453,-137.176,-105.619)">
+ <use xlink:href="#_Image2" x="342.94" y="264.047" width="99.638px" height="74.729px" transform="matrix(0.996382,0,0,0.996382,0,0)"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g id="Grain1" serif:id="Grain" transform="matrix(1,0,0,1,62.2643,318.608)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="277.263px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">can<tspan x="338.527px 357.484px " y="49.652px 49.652px ">va</tspan>s</text>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,15.4481,-13.549)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,33.2232,-7.64102)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,50.9984,-1.73305)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,-4.0743,-13.549)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,17.2451,-7.64102)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,38.5646,-1.73305)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ <g transform="matrix(2.49095,0,0,2.49095,279.435,46.2989)">
+ <clipPath id="_clip3">
+ <rect x="0" y="0" width="40" height="30"/>
+ </clipPath>
+ <g clip-path="url(#_clip3)">
+ <g transform="matrix(0.401453,-0,-0,0.401453,-137.176,-146.493)">
+ <use xlink:href="#_Image4" x="342.94" y="366.232" width="99.638px" height="74.729px" transform="matrix(0.996382,0,0,0.996382,0,0)"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g id="Grain2" serif:id="Grain" transform="matrix(1,0,0,1,-228.113,318.608)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,195.361,37.7158)">
+ <text x="343.907px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="359.227px 373.001px " y="49.652px 49.652px ">tA</tspan></text>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,15.4481,-13.549)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,33.2232,-7.64102)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,50.9984,-1.73305)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1.21737,0,0,1.21737,-4.0743,-13.549)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.25098;"/>
+ </g>
+ <g transform="matrix(1.14359,0,0,1.14359,17.2451,-7.64102)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.501961;"/>
+ </g>
+ <g transform="matrix(1.06981,0,0,1.06981,38.5646,-1.73305)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);fill-opacity:0.74902;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ <g transform="matrix(2.49095,0,0,2.49095,279.435,46.2989)">
+ <clipPath id="_clip5">
+ <rect x="0" y="0" width="40" height="30"/>
+ </clipPath>
+ <g clip-path="url(#_clip5)">
+ <g transform="matrix(0.401453,-0,-0,0.401453,-20.6033,-146.493)">
+ <use xlink:href="#_Image2" x="51.508" y="366.232" width="99.638px" height="74.729px" transform="matrix(0.996382,0,0,0.996382,0,0)"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-228.074,114.939)">
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="220.697" y="42.442" width="99.638" height="75.267" style="fill:rgb(165,165,165);"/>
+ </g>
+ <g transform="matrix(0.457412,0,0,0.402786,223.571,37.2475)">
+ <text x="282.279px" y="49.652px" style="font-family:'Arial-Black', 'Arial Black', sans-serif;font-weight:900;font-size:31.034px;">r<tspan x="297.599px 311.374px " y="49.652px 49.652px ">tA</tspan></text>
+ </g>
+ <g transform="matrix(1,0,0,1,67.8178,3.85728)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1,0,0,1,58.7378,3.85728)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-159.219,17.4809)">
+ <circle cx="240.92" cy="80.075" r="13.554" style="fill:rgb(16,12,255);"/>
+ </g>
+ <g transform="matrix(1,0,0,1,-168.299,17.4809)">
+ <rect x="275.405" y="66.521" width="27.108" height="27.108" style="fill:rgb(255,15,15);"/>
+ </g>
+ <g transform="matrix(1,0,0,1,-3.93878,19.5282)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="249.571px" y="79.024px" style="font-family:'Courier';font-size:50px;">RenderPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,121.302)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="249.571px" y="79.024px" style="font-family:'Courier';font-size:50px;">RenderPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,222.794)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="249.571px" y="79.024px" style="font-family:'Courier';font-size:50px;">RenderPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,324.609)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="249.571px" y="79.024px" style="font-family:'Courier';font-size:50px;">RenderPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-3.93878,19.5282)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="249.571px" y="79.024px" style="font-family:'Courier';font-size:50px;">RenderPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,121.302)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="264.573px" y="79.024px" style="font-family:'Courier';font-size:50px;">BloomPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,222.794)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="279.576px" y="79.024px" style="font-family:'Courier';font-size:50px;">FilmPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31769,324.609)">
+ <path d="M310.293,69.335C310.293,64.537 306.398,60.642 301.601,60.642L197.648,60.642C192.85,60.642 188.955,64.537 188.955,69.335L188.955,86.721C188.955,91.518 192.85,95.414 197.648,95.414L301.601,95.414C306.398,95.414 310.293,91.518 310.293,86.721L310.293,69.335Z" style="fill:rgb(139,198,243);"/>
+ <g transform="matrix(0.350154,0,0,0.350154,110.606,55.8457)">
+ <text x="279.576px" y="79.024px" style="font-family:'Courier';font-size:50px;">CopyPass</text>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31471,19.5282)">
+ <ellipse cx="105.495" cy="78.028" rx="49.819" ry="25.588" style="fill:none;stroke:rgb(23,19,19);stroke-width:1px;"/>
+ </g>
+ <g transform="matrix(0.466007,0,0,0.466007,52.1556,80.6452)">
+ <text x="48.643px" y="116.381px" style="font-family:'Courier';font-size:37.553px;">scene</text>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,495.108,-63.4596)">
+ <g transform="matrix(1,0,0,0.863239,0,42.4084)">
+ <path d="M160.255,325.561L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.07px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,494.729,38.3138)">
+ <g transform="matrix(1,0,0,0.863239,0,42.4084)">
+ <path d="M160.255,325.561L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.07px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,494.729,139.806)">
+ <g transform="matrix(1,0,0,0.863239,0,42.4084)">
+ <path d="M160.255,325.561L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.07px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,494.729,241.622)">
+ <g transform="matrix(1,0,0,0.863239,0,42.4084)">
+ <path d="M160.255,325.561L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.07px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,652.17,-63.4596)">
+ <g transform="matrix(1,0,0,0.923446,0,23.7388)">
+ <path d="M160.255,324.553L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.04px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,651.791,38.3138)">
+ <g transform="matrix(1,0,0,0.923446,0,23.7388)">
+ <path d="M160.255,324.553L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.04px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,651.791,139.806)">
+ <g transform="matrix(1,0,0,0.923446,0,23.7388)">
+ <path d="M160.255,324.553L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.04px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(6.12323e-17,1,-1,6.12323e-17,651.791,241.622)">
+ <g transform="matrix(1,0,0,0.923446,0,23.7388)">
+ <path d="M160.255,324.553L160.255,348.777" style="fill:none;stroke:black;stroke-width:1.04px;"/>
+ </g>
+ <g transform="matrix(0.559322,0,0,0.559322,68.4434,136.651)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31471,19.5282)">
+ <g transform="matrix(3.42486e-17,0.559322,-0.559322,3.42486e-17,229.117,87.9893)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ <path d="M446.031,77.931C467.985,77.298 478.806,80.163 479.073,94.813C479.757,132.331 392.728,128.488 250.104,124.301C103.319,119.992 29.85,126.026 29.556,159.903C29.487,167.847 30.289,179.036 48.999,179.801" style="fill:none;stroke:black;stroke-width:1px;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31471,121.021)">
+ <g transform="matrix(3.42486e-17,0.559322,-0.559322,3.42486e-17,229.117,87.9893)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ <path d="M446.031,77.931C467.985,77.298 478.806,80.163 479.073,94.813C479.757,132.331 392.728,128.488 250.104,124.301C103.319,119.992 29.85,126.026 29.556,159.903C29.487,167.847 30.289,179.036 48.999,179.801" style="fill:none;stroke:black;stroke-width:1px;"/>
+ </g>
+ <g transform="matrix(1,0,0,1,-4.31471,222.836)">
+ <g transform="matrix(3.42486e-17,0.559322,-0.559322,3.42486e-17,229.117,87.9893)">
+ <path d="M164.149,310.092L172.984,333.967L155.314,333.967L164.149,310.092Z"/>
+ </g>
+ <path d="M446.031,77.931C467.985,77.298 478.806,80.163 479.073,94.813C479.757,132.331 392.728,128.488 250.104,124.301C103.319,119.992 29.85,126.026 29.556,159.903C29.487,167.847 30.289,179.036 48.999,179.801" style="fill:none;stroke:black;stroke-width:1px;"/>
+ </g>
+ <defs>
+ <image id="_Image2" width="100px" height="75px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCABLAGQDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDuBvAO4igCCa5WOPBdS5756UAU7p4blUtboFvN43L0oAtKotolt7cHIHyntQAljNO8Dm4HO7AwKAK1ylqStrOj4Dbw3bNAFxVAChHXYPu80ATO5AwCN1AFO4EnS2GJz0Y9KAOT8TeP9L07xKfCc2kazqGprAlwEsoFdXBI6EsMYGSScDjr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Ad82/aF+U460f2PWH/wARIy3syKTwPfCT7OkkYbG4jPpR/Y9YP+IkZb2ZqeENDlsXlcwEyOQA4OcYr1Muwk8NdSPg+NOIsLnKpyobo7W6F6lvbxx3SrJu+Y4616p8CI1vGTma4TzP4qAHWVrHE7XX2cRyFcFfagB7QtcRrcbs7TlU96AJYpjNA4VszIOV7g0ARfaZY14BlA+9/smgBbbzEBMs5YMcgHtQBNeRSEh48knjjtQBRmV7RbiW6vS67flU/wANAFjRxb3FlFcJhmIzuoAtIux2CD7xyx9KAKttFEl2zMBIxyN/oPSgB39n7ZHe1l8oMOg7H1oAgudPm+xIr3RMqHJk70AMhsWeMM+ZWPV/WgDQtFCWpLOXxnJNAFQTz7HeKIGADhqAH2N1amFnXAkx8/vQAsdgG3SCZsSHJFAFtYY44vm5A5yaAIGuxNa+bafOudpPpQBGjWbwIkxD7zj5h1oAbZQxwXUio2xAflQdKALN5cG3G/YPL7mgCGwLyI0jxheSRjuKABTLK+9CRg/d7UASmaUSBJYgEPANADmedGKxwqVHTmgCwFAGMDFADGVQAgUBfSgDAuAF12JFGFL8gdDQBs3BKwPg4waAGX5IsSQT92gCr4XH/ErP++1AEXiUBLJCg2kE9KAMuWWT7Xofzt85+bnr160AdPdAGVFIyp7UAWEACgAAUAAUDoAKAI7sDySe4oAqQs3lj5jQB//Z"/>
+ <image id="_Image4" width="100px" height="75px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCABLAGQDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9A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vUt7eOO6VZN3zHHWvVPgRGt4yczXCeZ/FQA6ytY4na6+ziOQrgr7UAPaFriNbjdnacqnvQBLFMZoHCtmZByvcGgCL7TLGvAMoH3v9k0ALbeYgJlnLBjkA9qAJryKQkPHkk8cdqAKMyvaLcS3V6XXb8qn+GgCxo4t7iyiuEwzEZ3UAWkXY7BB945Y+lAFW2iiS7ZmAkY5G/0HpQA7+z9sjvay+UGHQdj60AQXOnzfYkV7omVDkyd6AGQ2LPGGfMrHq/rQBoWihLUlnL4zkmgCoJ59jvFEDABw1AD7G6tTCzrgSY+f3oAWOwDbpBM2JDkigC2sMccXzcgc5NAEDXYmtfNtPnXO0n0oAjRrN4ESYh95x8w60ANsoY4LqRUbYgPyoOlAFm8uDbjfsHl9zQBDYF5EaR4wvJIx3FAApllfehIwfu9qAJTNKJAksQCHgGgBzPOjFY4VKjpzQBYCgDGBigBjKoAQKAvpQBgXAC67EijCl+QOhoA2bglYHwcYNADL8kWJIJ+7QBV8Lj/AIlZ/wB9qAIvEoCWSFBtIJ6UAZcssn2vQ/nb5z83PXr1oA6e6AMqKRlT2oAsIAFAAAoAAoHQAUAR3YHkk9xQBUhZvLHzGgD/2Q=="/>
+ </defs>
+</svg> | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/lessons/threejs-post-processing.md | @@ -1,4 +1,258 @@
Title: Three.js Post Processing
Description: How to Post Process in THREE.js
-TBD
\ No newline at end of file
+*Post processing* generally refers to applying some kind of effect or filter to a 2D image. In the case of THREE.js we have a scene with a bunch of meshes in it. We render that scene into a 2D image. Normally that image is rendered directly into the canvas and displayed in the browser but instead we can [render it to a render target](threejs-rendertargets.html) and then apply some *post processing* effects to the result before drawing it to the canvas.
+
+Examples of post processing are Instagram like filters,
+Photoshop filters, etc...
+
+THREE.js has some example classes to help setup a process processing pipeline. The way it works is you create an `EffectComposer` and to it you add multiple `Pass` objects.
+You then call `EffectComposer.render` and it renders your scene to a [render target](threejs-rendertargets.html) and then applies each `Pass`.
+
+Each `Pass` can be some post processing effect like adding a vignette, blurring, applying a bloom, applying film grain, adjusting the hue, saturation, contrast, etc... and finally rendering the result to the canvas.
+
+It's a little bit important to understand how `EffectComposer` functions. It creates two [render targets](threejs-rendertargets.html]. Let's call them **rtA** and **rtB**.
+
+Then, you call `EffectComposer.addPass` to add each pass in the order you want to apply them. The passes are then applied *something like* this.
+
+<div class="threejs_center"><img src="resources/images/threejs-postprocessing.svg" style="width: 600px"></div>
+
+First the scene you passed into `RenderPass` is rendered to **rtA**, then **rtA** is passed to the next pass, whatever it is. That pass uses **rtA** as input to do whatever it does and writes the results to **rtB**. **rtB** is then passed to the next pass which uses **rtB** as input and writes back to **rtA**. This continues through all the passes.
+
+Each `Pass` has 4 basic options
+
+## `enabled`
+
+Whether or not to use this pass
+
+## `needsSwap`
+
+Whether or not to swap `rtA` and `rtB` after finishing this pass
+
+## `clear`
+
+Whether are not to clear before rendering this pass
+
+## `renderToScreen`
+
+Whether or not to render to the canvas instead the current destination render target. Usually you need to set this to true on the last pass you add to your `EffectComposer`.
+
+Let's put together a basic example. We'll start with the example from [the article on responsivness](threejs-responsive.html).
+
+To that first we create an `EffectComposer`.
+
+```js
+const composer = new THREE.EffectComposer(renderer);
+```
+
+Then as the first pass we add a `RenderPass` that will render our scene with our camera into the first render target.
+
+```js
+composer.addPass(new THREE.RenderPass(scene, camera));
+```
+
+Next we add a `BloomPass`. A `BloomPass` renders its input to a generally smaller render target and blurs the result. It then adds that blurred result on top of the original input. This makes the scene *bloom*
+
+```js
+const bloomPass = new THREE.BloomPass(
+ 1, // strength
+ 25, // kernel size
+ 4, // sigma ?
+ 256, // blur render target resolution
+);
+composer.addPass(bloomPass);
+```
+
+Finally we had a `FilmPass` that draws noise and scanlines on top of its input.
+
+```js
+const filmPass = new THREE.FilmPass(
+ 0.35, // noise intensity
+ 0.025, // scanline intensity
+ 648, // scanline count
+ false, // grayscale
+);
+filmPass.renderToScreen = true;
+composer.addPass(filmPass);
+```
+
+Since the `filmPass` is the last pass we set its `renderToScreen` property to true to tell it to render to the canvas. Without setting this it would instead render to the next render target.
+
+To use these classes we need to include a bunch of scripts.
+
+```html
+<script src="resources/threejs/r98/js/shaders/CopyShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/ConvolutionShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/FilmShader.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/EffectComposer.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/RenderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/ShaderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/BloomPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/FilmPass.js"></script>
+```
+
+For pretty much any post processing `EffectComposer.js`, `RenderPass.js`, `ShaderPass.js`, and `CopyShader.js` are required. The rest depend on which effects you plan to use.
+Usually if you miss one you'll get an error in [the JavaScript console](threejs-debugging-javascript.html) telling you which one you're missing.
+
+The last things we need to do are to use `EffectComposer.render` instead of `WebGLRenderer.render` *and* to tell the `EffectComposer` to match the size of the canvas.
+
+```js
+-function render(now) {
+- time *= 0.001;
++let then = 0;
++function render(now) {
++ now *= 0.001; // convert to seconds
++ const deltaTime = now - then;
++ then = now;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
++ composer.setSize(canvas.width, canvas.height);
+ }
+
+ cubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+- const rot = time * speed;
++ const rot = now * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+- renderer.render(scene, camera);
++ composer.render(deltaTime);
+
+ requestAnimationFrame(render);
+}
+```
+
+`EffectComposer.render` takes a `deltaTime` which is the time in seconds since the last frame was rendered. It passes this to the various effects in case any of them are animated. In this case the `FilmPass` is animated.
+
+{{{example url="../threejs-postprocessing.html" }}}
+
+To change effect parameters at runtime usually requires setting uniform values. Let's add a gui to adjust some of the parameters. Figuring out which values you can easily adjust and how to adjust them requires digging through the code for that effect.
+
+Looking inside [`BloomPass.js`](https://github.com/mrdoob/three.js/blob/master/examples/js/postprocessing/BloomPass.js) I found this line:
+
+```js
+this.copyUniforms[ "opacity" ].value = strength;
+```
+
+So we can set the strengh by setting
+
+```js
+bloomPass.copyUniforms.opacity.value = someValue;
+```
+
+Similarly looking in [`FilmPass.js`](https://github.com/mrdoob/three.js/blob/master/examples/js/postprocessing/FilmPass.js) I found these lines:
+
+```js
+if ( grayscale !== undefined ) this.uniforms.grayscale.value = grayscale;
+if ( noiseIntensity !== undefined ) this.uniforms.nIntensity.value = noiseIntensity;
+if ( scanlinesIntensity !== undefined ) this.uniforms.sIntensity.value = scanlinesIntensity;
+if ( scanlinesCount !== undefined ) this.uniforms.sCount.value = scanlinesCount;
+```
+
+So which makes it pretty clear how to set them.
+
+Let's make a quick GUI to set those values
+
+```html
+<script src="../3rdparty/dat.gui.min.js"></script>
+```
+
+and
+
+```js
+const gui = new dat.GUI();
+{
+ const folder = gui.addFolder('BloomPass');
+ folder.add(bloomPass.copyUniforms.opacity, 'value', 0, 2).name('stength');
+ folder.open();
+}
+{
+ const folder = gui.addFolder('FilmPass');
+ folder.add(filmPass.uniforms.grayscale, 'value').name('grayscale');
+ folder.add(filmPass.uniforms.nIntensity, 'value', 0, 1).name('noise intensity');
+ folder.add(filmPass.uniforms.sIntensity, 'value', 0, 1).name('scanline intensity');
+ folder.add(filmPass.uniforms.sCount, 'value', 0, 1000).name('scanline count');
+ folder.open();
+}
+```
+
+and now we can adjust those settings
+
+{{{example url="../threejs-postprocessing-gui.html" }}}
+
+That was a small step to making our own effect.
+
+Post processing effects use shaders. Shaders are written in a language called [GLSL (Graphics Library Shading Language)](https://www.khronos.org/files/opengles_shading_language.pdf). Going over the entire language is way too large a topic for these articles. A few resources to get start from would be maybe [this article](https://webglfundamentals.org/webgl/lessons/webgl-shaders-and-glsl.html) and maybe [the Book of Shaders](https://thebookofshaders.com/).
+
+I think an example to get you started would be helpful though so let's make a simple GLSL post processing shader. We'll make one that lets us multiply the image by a color.
+
+For post processing THREE.js provides a useful helper called the `ShaderPass`. It takes an object with info defining a vertex shader, a fragment shader, and the default inputs. It will handling setting up which texture to read from to get the previous pass's results and where to render to, either one of the `EffectComposer`s render target or the canvas.
+
+Here's a simple post processing shader that multiplies the previous pass's result by a color.
+
+```js
+const colorShader = {
+ uniforms: {
+ tDiffuse: { value: null },
+ color: { value: new THREE.Color(0x88CCFF) },
+ },
+ vertexShader: `
+ varying vec2 vUv;
+ void main() {
+ vUv = uv;
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1);
+ }
+ `,
+ fragmentShader: `
+ varying vec2 vUv;
+ uniform sampler2D tDiffuse;
+ uniform vec3 color;
+ void main() {
+ vec4 previousPassColor = texture2D(tDiffuse, vUv);
+ gl_FragColor = vec4(
+ previousPassColor.rgb * color,
+ previousPassColor.w);
+ }
+ `,
+};
+```
+
+Above `tDiffuse` is the name that `ShaderPass` uses to pass in the previous pass's result texture so we pretty much always need that. We then declare `color` as a THREE.js `Color`.
+
+Next we need a vertex shader. For post processing the vertex shader shown here is pretty much standard and rarely needs to be changed. Without going into too many details (see articles linked above) the variables `uv`, `projectionMatrix`, `modelViewMatrix` and `position` are all magically added by THREE.js.
+
+Finally we create a fragment shader. In it we get get pixel color from the previous pass with this line
+
+```glsl
+vec4 previousPassColor = texture2D(tDiffuse, vUv);
+```
+
+we multiply it by our color and set `gl_FragColor` to the result
+
+```glsl
+gl_FragColor = vec4(
+ previousPassColor.rgb * color,
+ previousPassColor.a);
+```
+
+Adding some simple GUI to set the 3 values of the color
+
+```js
+const gui = new dat.GUI();
+gui.add(colorPass.uniforms.color.value, 'r', 0, 4).name('red');
+gui.add(colorPass.uniforms.color.value, 'g', 0, 4).name('green');
+gui.add(colorPass.uniforms.color.value, 'b', 0, 4).name('blue');
+```
+
+Gives us a simple postprocessing effect that multiplies by a color.
+
+{{{example url="../threejs-postprocessing-custom.html" }}}
+
+As mentioned about all the details of how to write GLSL and custom shaders is too much for these articles. If you really want to know how WebGL itself works then check out [these articles](https://webglfundamentals.org). Another great resources is just to [read through the existing post processing shaders in the THREE.js repo](https://github.com/mrdoob/three.js/tree/master/examples/js/shaders). Some are more complicated than others but if you start with the smaller ones you can hopefully get an idea of how they work.
+
+Most of the post processing effects in the THREE.js repo are unfortunately undocumented so to use them you'll have to [read through the examples](https://github.com/mrdoob/three.js/tree/master/examples) or [the code for the effects themselves](https://github.com/mrdoob/three.js/tree/master/examples/js/postprocessing). Hopefully these simple example and the article on [render targets](threejs-rendertargets.html) provide enough context to get started. | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/lessons/toc.html | @@ -12,6 +12,7 @@
<li><a href="/threejs/lessons/threejs-load-gltf.html">Load a .GLTF file</a></li>
<li><a href="/threejs/lessons/threejs-multiple-scenes.html">Multiple Canvases, Multiple Scenes</a></li>
<li><a href="/threejs/lessons/threejs-picking.html">Picking Objects with the mouse</a></li>
+ <li><a href="/threejs/lessons/threejs-post-processing.html">Post Processing</a></li>
</ul>
<li>Tips</li>
<ul> | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/threejs-postprocessing-custom.html | @@ -0,0 +1,155 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - PostProcessing - Custom</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r98/three.min.js"></script>
+<script src="resources/threejs/r98/js/shaders/CopyShader.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/EffectComposer.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/RenderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/ShaderPass.js"></script>
+<script src="../3rdparty/dat.gui.min.js"></script>
+<script>
+'use strict';
+
+/* global THREE dat */
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+
+ const fov = 75;
+ const aspect = 2; // the canvas default
+ const near = 0.1;
+ const far = 5;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
+ camera.position.z = 2;
+
+ const scene = new THREE.Scene();
+
+ {
+ const color = 0xFFFFFF;
+ const intensity = 2;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+
+ const boxWidth = 1;
+ const boxHeight = 1;
+ const boxDepth = 1;
+ const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
+
+ function makeInstance(geometry, color, x) {
+ const material = new THREE.MeshPhongMaterial({color});
+
+ const cube = new THREE.Mesh(geometry, material);
+ scene.add(cube);
+
+ cube.position.x = x;
+
+ return cube;
+ }
+
+ const cubes = [
+ makeInstance(geometry, 0x44aa88, 0),
+ makeInstance(geometry, 0x8844aa, -2),
+ makeInstance(geometry, 0xaa8844, 2),
+ ];
+
+ const composer = new THREE.EffectComposer(renderer);
+ composer.addPass(new THREE.RenderPass(scene, camera));
+
+ const colorShader = {
+ uniforms: {
+ tDiffuse: { value: null },
+ color: { value: new THREE.Color(0x88CCFF) },
+ },
+ vertexShader: `
+ varying vec2 vUv;
+ void main() {
+ vUv = uv;
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1);
+ }
+ `,
+ fragmentShader: `
+ uniform vec3 color;
+ uniform sampler2D tDiffuse;
+ varying vec2 vUv;
+ void main() {
+ vec4 previousPassColor = texture2D(tDiffuse, vUv);
+ gl_FragColor = vec4(
+ previousPassColor.rgb * color,
+ previousPassColor.a);
+ }
+ `,
+ };
+
+ const colorPass = new THREE.ShaderPass(colorShader);
+ colorPass.renderToScreen = true;
+ composer.addPass(colorPass);
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ const gui = new dat.GUI();
+ gui.add(colorPass.uniforms.color.value, 'r', 0, 4).name('red');
+ gui.add(colorPass.uniforms.color.value, 'g', 0, 4).name('green');
+ gui.add(colorPass.uniforms.color.value, 'b', 0, 4).name('blue');
+
+ let then = 0;
+ function render(now) {
+ now *= 0.001; // convert to seconds
+ const deltaTime = now - then;
+ then = now;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ composer.setSize(canvas.width, canvas.height);
+ }
+
+ cubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+ const rot = now * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+ composer.render(deltaTime);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+ | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/threejs-postprocessing-gui.html | @@ -0,0 +1,157 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - PostProcessing - GUI</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r98/three.min.js"></script>
+<script src="resources/threejs/r98/js/shaders/CopyShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/ConvolutionShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/FilmShader.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/EffectComposer.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/RenderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/ShaderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/BloomPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/FilmPass.js"></script>
+<script src="../3rdparty/dat.gui.min.js"></script>
+<script>
+'use strict';
+
+/* global THREE dat */
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+
+ const fov = 75;
+ const aspect = 2; // the canvas default
+ const near = 0.1;
+ const far = 5;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
+ camera.position.z = 2;
+
+ const scene = new THREE.Scene();
+
+ {
+ const color = 0xFFFFFF;
+ const intensity = 2;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+
+ const boxWidth = 1;
+ const boxHeight = 1;
+ const boxDepth = 1;
+ const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
+
+ function makeInstance(geometry, color, x) {
+ const material = new THREE.MeshPhongMaterial({color});
+
+ const cube = new THREE.Mesh(geometry, material);
+ scene.add(cube);
+
+ cube.position.x = x;
+
+ return cube;
+ }
+
+ const cubes = [
+ makeInstance(geometry, 0x44aa88, 0),
+ makeInstance(geometry, 0x8844aa, -2),
+ makeInstance(geometry, 0xaa8844, 2),
+ ];
+
+ const composer = new THREE.EffectComposer(renderer);
+ composer.addPass(new THREE.RenderPass(scene, camera));
+
+ const bloomPass = new THREE.BloomPass(
+ 1, // strength
+ 25, // kernel size
+ 4, // sigma ?
+ 256, // blur render target resolution
+ );
+ composer.addPass(bloomPass);
+
+ const filmPass = new THREE.FilmPass(
+ 0.35, // noise intensity
+ 0.025, // scanline intensity
+ 648, // scanline count
+ false, // grayscale
+ );
+ filmPass.renderToScreen = true;
+ composer.addPass(filmPass);
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ const gui = new dat.GUI();
+ {
+ const folder = gui.addFolder('BloomPass');
+ folder.add(bloomPass.copyUniforms.opacity, 'value', 0, 2).name('stength');
+ folder.open();
+ }
+ {
+ const folder = gui.addFolder('FilmPass');
+ folder.add(filmPass.uniforms.grayscale, 'value').name('grayscale');
+ folder.add(filmPass.uniforms.nIntensity, 'value', 0, 1).name('noise intensity');
+ folder.add(filmPass.uniforms.sIntensity, 'value', 0, 1).name('scanline intensity');
+ folder.add(filmPass.uniforms.sCount, 'value', 0, 1000).name('scanline count');
+ folder.open();
+ }
+
+ let then = 0;
+ function render(now) {
+ now *= 0.001; // convert to seconds
+ const deltaTime = now - then;
+ then = now;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ composer.setSize(canvas.width, canvas.height);
+ }
+
+ cubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+ const rot = now * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+ composer.render(deltaTime);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+ | true |
Other | mrdoob | three.js | 0704dc9a6d4b960c66c7993e61e09de09ba2109c.json | add postprocessing article | threejs/threejs-postprocessing.html | @@ -0,0 +1,141 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - PostProcessing</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r98/three.min.js"></script>
+<script src="resources/threejs/r98/js/shaders/CopyShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/ConvolutionShader.js"></script>
+<script src="resources/threejs/r98/js/shaders/FilmShader.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/EffectComposer.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/RenderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/ShaderPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/BloomPass.js"></script>
+<script src="resources/threejs/r98/js/postprocessing/FilmPass.js"></script>
+<script>
+'use strict';
+
+/* global THREE */
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+
+ const fov = 75;
+ const aspect = 2; // the canvas default
+ const near = 0.1;
+ const far = 5;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
+ camera.position.z = 2;
+
+ const scene = new THREE.Scene();
+
+ {
+ const color = 0xFFFFFF;
+ const intensity = 2;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+
+ const boxWidth = 1;
+ const boxHeight = 1;
+ const boxDepth = 1;
+ const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
+
+ function makeInstance(geometry, color, x) {
+ const material = new THREE.MeshPhongMaterial({color});
+
+ const cube = new THREE.Mesh(geometry, material);
+ scene.add(cube);
+
+ cube.position.x = x;
+
+ return cube;
+ }
+
+ const cubes = [
+ makeInstance(geometry, 0x44aa88, 0),
+ makeInstance(geometry, 0x8844aa, -2),
+ makeInstance(geometry, 0xaa8844, 2),
+ ];
+
+ const composer = new THREE.EffectComposer(renderer);
+ composer.addPass(new THREE.RenderPass(scene, camera));
+
+ const bloomPass = new THREE.BloomPass(
+ 1, // strength
+ 25, // kernel size
+ 4, // sigma ?
+ 256, // blur render target resolution
+ );
+ composer.addPass(bloomPass);
+
+ const filmPass = new THREE.FilmPass(
+ 0.35, // noise intensity
+ 0.025, // scanline intensity
+ 648, // scanline count
+ false, // grayscale
+ );
+ filmPass.renderToScreen = true;
+ composer.addPass(filmPass);
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ let then = 0;
+ function render(now) {
+ now *= 0.001; // convert to seconds
+ const deltaTime = now - then;
+ then = now;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ composer.setSize(canvas.width, canvas.height);
+ }
+
+ cubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+ const rot = now * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+ composer.render(deltaTime);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+ | true |
Other | mrdoob | three.js | db5eb156bab24de0e8ac6144c143e417992ec041.json | add render target article | threejs/lessons/threejs-picking.md | @@ -257,8 +257,7 @@ This can solve issue 2 and 3 above. As for issue 1, speed, it really depends. Ev
One thing we can do though is since we're only going to be reading one pixel we can just setup the camera so only that one pixel is drawn. We can do this using `PerspectiveCamera.setViewOffset` which lets us tell THREE.js to compute a camera that just renders a smaller part of a larger rectangle. This should save some time.
-To do this type of picking in THREE.js at the moment requires we create 2 scenes. One we will fill with our normal meshes. The other we'll fill with meshes
-that use our picking material.
+To do this type of picking in THREE.js at the moment requires we create 2 scenes. One we will fill with our normal meshes. The other we'll fill with meshes that use our picking material.
So, first create a second scene and make sure it clears to black.
@@ -325,7 +324,7 @@ function setPickPosition(event) {
}
```
-Then let's change the `PickHelper` into a `GPUPickHelper`
+Then let's change the `PickHelper` into a `GPUPickHelper`. It will use a `WebGLRenderTarget` like we covered the [article on render targets](threejs-rendertargets.html). Our render target here is only a single pixel in size, 1x1.
```
-class PickHelper { | true |
Other | mrdoob | three.js | db5eb156bab24de0e8ac6144c143e417992ec041.json | add render target article | threejs/lessons/threejs-post-processing.md | @@ -0,0 +1,4 @@
+Title: Three.js Post Processing
+Description: How to Post Process in THREE.js
+
+TBD
\ No newline at end of file | true |
Other | mrdoob | three.js | db5eb156bab24de0e8ac6144c143e417992ec041.json | add render target article | threejs/lessons/threejs-rendertargets.md | @@ -0,0 +1,145 @@
+Title: Three.js Render Targets
+Description: How to render to a texture.
+
+A render target in three.js is basicaly a texture you can render to.
+After you render to it you can use that texture like any other texture.
+
+Let's make a simple example. We'll start with an example from [the article on responsiveness](threejs-responsive.html).
+
+Rendering to a render target just almost exactly the same as normal rendering. First we create a `WebGLRenderTarget`.
+
+```
+const rtWidth = 512;
+const rtHeight = 512;
+const renderTarget = new THREE.WebGLRenderTarget(rtWidth, rtHeight);
+```
+
+Then we need a `Camera` and a `Scene`
+
+```
+const rtFov = 75;
+const rtAspect = rtWidth / rtHeight;
+const rtNear = 0.1;
+const rtFar = 5;
+const rtCamera = new THREE.PerspectiveCamera(rtFov, rtAspect, rtNear, rtFar);
+rtCamera.position.z = 2;
+
+const rtScene = new THREE.Scene();
+rtScene.background = new THREE.Color('red');
+```
+
+Notice we set the aspect to the aspect for the render target, not the canvas.
+
+We fill the scene with stuff. In this case we're using the light and the 3 cubes [from the previous article](threejs-responsive.html).
+
+```
+{
+ const color = 0xFFFFFF;
+ const intensity = 1;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+* rtScene.add(light);
+}
+
+const boxWidth = 1;
+const boxHeight = 1;
+const boxDepth = 1;
+const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
+
+function makeInstance(geometry, color, x) {
+ const material = new THREE.MeshPhongMaterial({color});
+
+ const cube = new THREE.Mesh(geometry, material);
+* rtScene.add(cube);
+
+ cube.position.x = x;
+
+ return cube;
+}
+
+*const rtCubes = [
+ makeInstance(geometry, 0x44aa88, 0),
+ makeInstance(geometry, 0x8844aa, -2),
+ makeInstance(geometry, 0xaa8844, 2),
+];
+```
+
+The `Scene` and `Camera` from previous article are still there. We'll use them to render to the canvas.
+We just need to add stuff to render.
+
+Let's add a cube that uses the render target's texture.
+
+```
+const material = new THREE.MeshPhongMaterial({
+ map: renderTarget.texture,
+});
+const cube = new THREE.Mesh(geometry, material);
+scene.add(cube);
+```
+
+Now at render time first we render the render target scene to the render target.
+
+```
+function render(time) {
+ time *= 0.001;
+
+ ...
+
+ // rotate all the cubes in the render target scene
+ rtCubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+ const rot = time * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+ // draw render target scene to render target
+ renderer.render(rtScene, rtCamera, renderTarget);
+
+```
+
+Then we render the scene with the single cube that is using the render target's texture to the canvas.
+
+```
+ // rotate the cube in the scene
+ cube.rotation.x = time;
+ cube.rotation.y = time * 1.1;
+
+ // render the scene to the canvas
+ renderer.render(scene, camera);
+```
+
+And voilà
+
+{{{example url="../threejs-render-target.html" }}}
+
+The cube is red because we set the `background` of the `rtScene` to red so the render target's texture is being cleared to red.
+
+Render target are used for all kinds of things. Shadows use a render target. [Picking can use a render target](threejs-picking.html). Various kinds of [post processing effects](threejs-post-processing.html) require a render target.
+
+A few notes about using `WebGLRenderTarget`.
+
+* By default `WebGLRenderTarget` creates 2 textures. A color texture and a depth/stencil texture. If you don't need the depth or stencil textures you can request it not create them by passing in options. Example:
+
+ const rt = new THREE.WebGLRenderTarget(width, height, {
+ depthBuffer: false,
+ stencilBuffer: false,
+ });
+
+* You might need to change the size of a render target
+
+ In the example above we make a render target of a fixed size, 512x512. For things like post processing you generally need to make a render target the same size as your canvas. In our code that would mean when we change the canvas size we would also update both the render target size and the camera we're using when rendering to the render target. Example:
+
+ function render(time) {
+ time *= 0.001;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+
+ + renderTaret.setSize(canvas.width, canvas.height);
+ + rtCamera.aspect = camera.aspect;
+ + rtCamera.updateProjectionMatrix();
+ }
+ | true |
Other | mrdoob | three.js | db5eb156bab24de0e8ac6144c143e417992ec041.json | add render target article | threejs/lessons/toc.html | @@ -27,6 +27,7 @@
<li><a href="/threejs/lessons/threejs-cameras.html">Cameras</a></li>
<li><a href="/threejs/lessons/threejs-shadows.html">Shadows</a></li>
<li><a href="/threejs/lessons/threejs-fog.html">Fog</a></li>
+ <li><a href="/threejs/lessons/threejs-rendertargets.html">Render Targets</a></li>
</ul>
<li>Reference</li>
<ul> | true |
Other | mrdoob | three.js | db5eb156bab24de0e8ac6144c143e417992ec041.json | add render target article | threejs/threejs-render-target.html | @@ -0,0 +1,146 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - Responsive</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r98/three.min.js"></script>
+<script>
+'use strict';
+
+/* global THREE */
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+
+ const rtWidth = 512;
+ const rtHeight = 512;
+ const renderTarget = new THREE.WebGLRenderTarget(rtWidth, rtHeight);
+
+ const rtFov = 75;
+ const rtAspect = rtWidth / rtHeight;
+ const rtNear = 0.1;
+ const rtFar = 5;
+ const rtCamera = new THREE.PerspectiveCamera(rtFov, rtAspect, rtNear, rtFar);
+ rtCamera.position.z = 2;
+
+ const rtScene = new THREE.Scene();
+ rtScene.background = new THREE.Color('red');
+
+ {
+ const color = 0xFFFFFF;
+ const intensity = 1;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+ rtScene.add(light);
+ }
+
+ const boxWidth = 1;
+ const boxHeight = 1;
+ const boxDepth = 1;
+ const geometry = new THREE.BoxGeometry(boxWidth, boxHeight, boxDepth);
+
+ function makeInstance(geometry, color, x) {
+ const material = new THREE.MeshPhongMaterial({color});
+
+ const cube = new THREE.Mesh(geometry, material);
+ rtScene.add(cube);
+
+ cube.position.x = x;
+
+ return cube;
+ }
+
+ const rtCubes = [
+ makeInstance(geometry, 0x44aa88, 0),
+ makeInstance(geometry, 0x8844aa, -2),
+ makeInstance(geometry, 0xaa8844, 2),
+ ];
+
+ const fov = 75;
+ const aspect = 2; // the canvas default
+ const near = 0.1;
+ const far = 5;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
+ camera.position.z = 2;
+
+ const scene = new THREE.Scene();
+
+ {
+ const color = 0xFFFFFF;
+ const intensity = 1;
+ const light = new THREE.DirectionalLight(color, intensity);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+
+ const material = new THREE.MeshPhongMaterial({
+ map: renderTarget.texture,
+ });
+ const cube = new THREE.Mesh(geometry, material);
+ scene.add(cube);
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ function render(time) {
+ time *= 0.001;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ }
+
+ // rotate all the cubes in the render target scene
+ rtCubes.forEach((cube, ndx) => {
+ const speed = 1 + ndx * .1;
+ const rot = time * speed;
+ cube.rotation.x = rot;
+ cube.rotation.y = rot;
+ });
+
+ // draw render target scene to render target
+ renderer.render(rtScene, rtCamera, renderTarget);
+
+ // rotate the cube in the scene
+ cube.rotation.x = time;
+ cube.rotation.y = time * 1.1;
+
+ // render the scene to the canvas
+ renderer.render(scene, camera);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+ | true |
Other | mrdoob | three.js | 63bf6a6f22cef9ec74af326bc59450188a6c9fa0.json | add link to eslint rules | threejs/lessons/threejs-prerequisites.md | @@ -305,7 +305,7 @@ You'll get warnings using `THREE` so add `/* global THREE */` at the top of your
Above you can see eslint knows the rule that `UpperCaseNames` are constructors and so you should be using `new`. Another error caught and avoided. This is [the `new-cap` rule](https://eslint.org/docs/rules/new-cap).
-There's 100s of rules you can turn on or off or customize. For example above I mentioned you should use `const` and `let` over `var`.
+There are [100s of rules you can turn on or off or customize](https://eslint.org/docs/rules/). For example above I mentioned you should use `const` and `let` over `var`.
Here I used `var` and it warned me I should use `let` or `const`
@@ -315,6 +315,8 @@ Here I used `let` but it saw I never change the value so it suggested I use `con
<div class="threejs_center"><img style="width: 615px;" src="resources/images/vscode-eslint-let.png"></div>
+Of course if you'd prefer to keep using `var` you can just turn off that rule. As I said above though I prefer to use `const` and `let` over `var` as they just work better and prevent bugs.
+
For those cases where you really need to override a rule [you can add comments to disable them](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments) for a single line or a section of code.
# If you really need to support legacy browsers use a transpiler | false |
Other | mrdoob | three.js | 446f7732ea7067f283686ea04a4171fc78eefb02.json | fix ios iframe issue | threejs/threejs-picking-gpu.html | @@ -8,7 +8,6 @@
<style>
body {
margin: 0;
- position: fixed;
}
#c {
width: 100vw; | true |
Other | mrdoob | three.js | 446f7732ea7067f283686ea04a4171fc78eefb02.json | fix ios iframe issue | threejs/threejs-picking-raycaster-complex-geo.html | @@ -8,7 +8,6 @@
<style>
body {
margin: 0;
- position: fixed;
}
#c {
width: 100vw; | true |
Other | mrdoob | three.js | 446f7732ea7067f283686ea04a4171fc78eefb02.json | fix ios iframe issue | threejs/threejs-picking-raycaster-transparency.html | @@ -8,7 +8,6 @@
<style>
body {
margin: 0;
- position: fixed;
}
#c {
width: 100vw; | true |
Other | mrdoob | three.js | 069e7e17ed0d4efceed4bdbfe4315a726658aec1.json | put light on camera | threejs/threejs-picking-gpu.html | @@ -53,7 +53,7 @@
const intensity = 1;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(-1, 2, 4);
- scene.add(light);
+ camera.add(light);
}
const boxWidth = 1; | true |
Other | mrdoob | three.js | 069e7e17ed0d4efceed4bdbfe4315a726658aec1.json | put light on camera | threejs/threejs-picking-raycaster-complex-geo.html | @@ -51,7 +51,7 @@
const intensity = 1;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(-1, 2, 4);
- scene.add(light);
+ camera.add(light);
}
const geometry = new THREE.SphereBufferGeometry(.6, 100, 100); | true |
Other | mrdoob | three.js | 069e7e17ed0d4efceed4bdbfe4315a726658aec1.json | put light on camera | threejs/threejs-picking-raycaster-transparency.html | @@ -51,7 +51,7 @@
const intensity = 1;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(-1, 2, 4);
- scene.add(light);
+ camera.add(light);
}
const boxWidth = 1; | true |
Other | mrdoob | three.js | 069e7e17ed0d4efceed4bdbfe4315a726658aec1.json | put light on camera | threejs/threejs-picking-raycaster.html | @@ -50,7 +50,7 @@
const intensity = 1;
const light = new THREE.DirectionalLight(color, intensity);
light.position.set(-1, 2, 4);
- scene.add(light);
+ camera.add(light);
}
const boxWidth = 1; | true |
Other | mrdoob | three.js | 3eb72fb10de61fe45012d47c8ba6ed37283fcbf1.json | fix lesson links | threejs/lessons/resources/lesson.js | @@ -20,254 +20,262 @@ function getQueryParams() {
$(document).ready(function($){
const codeKeywordLinks = {
- AnimationAction: 'https://threejs.org/docs/api/animation/AnimationAction.html',
- AnimationClip: 'https://threejs.org/docs/api/animation/AnimationClip.html',
- AnimationMixer: 'https://threejs.org/docs/api/animation/AnimationMixer.html',
- AnimationObjectGroup: 'https://threejs.org/docs/api/animation/AnimationObjectGroup.html',
- AnimationUtils: 'https://threejs.org/docs/api/animation/AnimationUtils.html',
- KeyframeTrack: 'https://threejs.org/docs/api/animation/KeyframeTrack.html',
- PropertyBinding: 'https://threejs.org/docs/api/animation/PropertyBinding.html',
- PropertyMixer: 'https://threejs.org/docs/api/animation/PropertyMixer.html',
- BooleanKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/BooleanKeyframeTrack.html',
- ColorKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/ColorKeyframeTrack.html',
- NumberKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/NumberKeyframeTrack.html',
- QuaternionKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/QuaternionKeyframeTrack.html',
- StringKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/StringKeyframeTrack.html',
- VectorKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/VectorKeyframeTrack.html',
- Audio: 'https://threejs.org/docs/api/audio/Audio.html',
- AudioAnalyser: 'https://threejs.org/docs/api/audio/AudioAnalyser.html',
- AudioContext: 'https://threejs.org/docs/api/audio/AudioContext.html',
- AudioListener: 'https://threejs.org/docs/api/audio/AudioListener.html',
- PositionalAudio: 'https://threejs.org/docs/api/audio/PositionalAudio.html',
- ArrayCamera: 'https://threejs.org/docs/api/cameras/ArrayCamera.html',
- Camera: 'https://threejs.org/docs/api/cameras/Camera.html',
- CubeCamera: 'https://threejs.org/docs/api/cameras/CubeCamera.html',
- OrthographicCamera: 'https://threejs.org/docs/api/cameras/OrthographicCamera.html',
- PerspectiveCamera: 'https://threejs.org/docs/api/cameras/PerspectiveCamera.html',
- StereoCamera: 'https://threejs.org/docs/api/cameras/StereoCamera.html',
- Animation: 'https://threejs.org/docs/api/constants/Animation.html',
- Core: 'https://threejs.org/docs/api/constants/Core.html',
- CustomBlendingEquation: 'https://threejs.org/docs/api/constants/CustomBlendingEquations.html',
- DrawModes: 'https://threejs.org/docs/api/constants/DrawModes.html',
- Materials: 'https://threejs.org/docs/api/constants/Materials.html',
- Renderer: 'https://threejs.org/docs/api/constants/Renderer.html',
- Textures: 'https://threejs.org/docs/api/constants/Textures.html',
- BufferAttribute: 'https://threejs.org/docs/api/core/BufferAttribute.html',
- BufferGeometry: 'https://threejs.org/docs/api/core/BufferGeometry.html',
- Clock: 'https://threejs.org/docs/api/core/Clock.html',
- DirectGeometry: 'https://threejs.org/docs/api/core/DirectGeometry.html',
- EventDispatcher: 'https://threejs.org/docs/api/core/EventDispatcher.html',
- Face3: 'https://threejs.org/docs/api/core/Face3.html',
- Geometry: 'https://threejs.org/docs/api/core/Geometry.html',
- InstancedBufferAttribute: 'https://threejs.org/docs/api/core/InstancedBufferAttribute.html',
- InstancedBufferGeometry: 'https://threejs.org/docs/api/core/InstancedBufferGeometry.html',
- InstancedInterleavedBuffer: 'https://threejs.org/docs/api/core/InstancedInterleavedBuffer.html',
- InterleavedBuffer: 'https://threejs.org/docs/api/core/InterleavedBuffer.html',
- InterleavedBufferAttribute: 'https://threejs.org/docs/api/core/InterleavedBufferAttribute.html',
- Layers: 'https://threejs.org/docs/api/core/Layers.html',
- Object3D: 'https://threejs.org/docs/api/core/Object3D.html',
- Raycaster: 'https://threejs.org/docs/api/core/Raycaster.html',
- Uniform: 'https://threejs.org/docs/api/core/Uniform.html',
- BufferAttributeTypes: 'https://threejs.org/docs/api/core/bufferAttributeTypes/BufferAttributeTypes.html',
- Earcut: 'https://threejs.org/docs/api/extras/Earcut.html',
- ShapeUtils: 'https://threejs.org/docs/api/extras/ShapeUtils.html',
- Curve: 'https://threejs.org/docs/api/extras/core/Curve.html',
- CurvePath: 'https://threejs.org/docs/api/extras/core/CurvePath.html',
- Font: 'https://threejs.org/docs/api/extras/core/Font.html',
- Interpolations: 'https://threejs.org/docs/api/extras/core/Interpolations.html',
- Path: 'https://threejs.org/docs/api/extras/core/Path.html',
- Shape: 'https://threejs.org/docs/api/extras/core/Shape.html',
- ShapePath: 'https://threejs.org/docs/api/extras/core/ShapePath.html',
- ArcCurve: 'https://threejs.org/docs/api/extras/curves/ArcCurve.html',
- CatmullRomCurve3: 'https://threejs.org/docs/api/extras/curves/CatmullRomCurve3.html',
- CubicBezierCurve: 'https://threejs.org/docs/api/extras/curves/CubicBezierCurve.html',
- CubicBezierCurve3: 'https://threejs.org/docs/api/extras/curves/CubicBezierCurve3.html',
- EllipseCurve: 'https://threejs.org/docs/api/extras/curves/EllipseCurve.html',
- LineCurve: 'https://threejs.org/docs/api/extras/curves/LineCurve.html',
- LineCurve3: 'https://threejs.org/docs/api/extras/curves/LineCurve3.html',
- QuadraticBezierCurve: 'https://threejs.org/docs/api/extras/curves/QuadraticBezierCurve.html',
- QuadraticBezierCurve3: 'https://threejs.org/docs/api/extras/curves/QuadraticBezierCurve3.html',
- SplineCurve: 'https://threejs.org/docs/api/extras/curves/SplineCurve.html',
- ImmediateRenderObject: 'https://threejs.org/docs/api/extras/objects/ImmediateRenderObject.html',
- BoxBufferGeometry: 'https://threejs.org/docs/api/geometries/BoxBufferGeometry.html',
- BoxGeometry: 'https://threejs.org/docs/api/geometries/BoxGeometry.html',
- CircleBufferGeometry: 'https://threejs.org/docs/api/geometries/CircleBufferGeometry.html',
- CircleGeometry: 'https://threejs.org/docs/api/geometries/CircleGeometry.html',
- ConeBufferGeometry: 'https://threejs.org/docs/api/geometries/ConeBufferGeometry.html',
- ConeGeometry: 'https://threejs.org/docs/api/geometries/ConeGeometry.html',
- CylinderBufferGeometry: 'https://threejs.org/docs/api/geometries/CylinderBufferGeometry.html',
- CylinderGeometry: 'https://threejs.org/docs/api/geometries/CylinderGeometry.html',
- DodecahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/DodecahedronBufferGeometry.html',
- DodecahedronGeometry: 'https://threejs.org/docs/api/geometries/DodecahedronGeometry.html',
- EdgesGeometry: 'https://threejs.org/docs/api/geometries/EdgesGeometry.html',
- ExtrudeBufferGeometry: 'https://threejs.org/docs/api/geometries/ExtrudeBufferGeometry.html',
- ExtrudeGeometry: 'https://threejs.org/docs/api/geometries/ExtrudeGeometry.html',
- IcosahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/IcosahedronBufferGeometry.html',
- IcosahedronGeometry: 'https://threejs.org/docs/api/geometries/IcosahedronGeometry.html',
- LatheBufferGeometry: 'https://threejs.org/docs/api/geometries/LatheBufferGeometry.html',
- LatheGeometry: 'https://threejs.org/docs/api/geometries/LatheGeometry.html',
- OctahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/OctahedronBufferGeometry.html',
- OctahedronGeometry: 'https://threejs.org/docs/api/geometries/OctahedronGeometry.html',
- ParametricBufferGeometry: 'https://threejs.org/docs/api/geometries/ParametricBufferGeometry.html',
- ParametricGeometry: 'https://threejs.org/docs/api/geometries/ParametricGeometry.html',
- PlaneBufferGeometry: 'https://threejs.org/docs/api/geometries/PlaneBufferGeometry.html',
- PlaneGeometry: 'https://threejs.org/docs/api/geometries/PlaneGeometry.html',
- PolyhedronBufferGeometry: 'https://threejs.org/docs/api/geometries/PolyhedronBufferGeometry.html',
- PolyhedronGeometry: 'https://threejs.org/docs/api/geometries/PolyhedronGeometry.html',
- RingBufferGeometry: 'https://threejs.org/docs/api/geometries/RingBufferGeometry.html',
- RingGeometry: 'https://threejs.org/docs/api/geometries/RingGeometry.html',
- ShapeBufferGeometry: 'https://threejs.org/docs/api/geometries/ShapeBufferGeometry.html',
- ShapeGeometry: 'https://threejs.org/docs/api/geometries/ShapeGeometry.html',
- SphereBufferGeometry: 'https://threejs.org/docs/api/geometries/SphereBufferGeometry.html',
- SphereGeometry: 'https://threejs.org/docs/api/geometries/SphereGeometry.html',
- TetrahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/TetrahedronBufferGeometry.html',
- TetrahedronGeometry: 'https://threejs.org/docs/api/geometries/TetrahedronGeometry.html',
- TextBufferGeometry: 'https://threejs.org/docs/api/geometries/TextBufferGeometry.html',
- TextGeometry: 'https://threejs.org/docs/api/geometries/TextGeometry.html',
- TorusBufferGeometry: 'https://threejs.org/docs/api/geometries/TorusBufferGeometry.html',
- TorusGeometry: 'https://threejs.org/docs/api/geometries/TorusGeometry.html',
- TorusKnotBufferGeometry: 'https://threejs.org/docs/api/geometries/TorusKnotBufferGeometry.html',
- TorusKnotGeometry: 'https://threejs.org/docs/api/geometries/TorusKnotGeometry.html',
- TubeBufferGeometry: 'https://threejs.org/docs/api/geometries/TubeBufferGeometry.html',
- TubeGeometry: 'https://threejs.org/docs/api/geometries/TubeGeometry.html',
- WireframeGeometry: 'https://threejs.org/docs/api/geometries/WireframeGeometry.html',
- ArrowHelper: 'https://threejs.org/docs/api/helpers/ArrowHelper.html',
- AxesHelper: 'https://threejs.org/docs/api/helpers/AxesHelper.html',
- BoxHelper: 'https://threejs.org/docs/api/helpers/BoxHelper.html',
- Box3Helper: 'https://threejs.org/docs/api/helpers/Box3Helper.html',
- CameraHelper: 'https://threejs.org/docs/api/helpers/CameraHelper.html',
- DirectionalLightHelper: 'https://threejs.org/docs/api/helpers/DirectionalLightHelper.html',
- FaceNormalsHelper: 'https://threejs.org/docs/api/helpers/FaceNormalsHelper.html',
- GridHelper: 'https://threejs.org/docs/api/helpers/GridHelper.html',
- PolarGridHelper: 'https://threejs.org/docs/api/helpers/PolarGridHelper.html',
- HemisphereLightHelper: 'https://threejs.org/docs/api/helpers/HemisphereLightHelper.html',
- PlaneHelper: 'https://threejs.org/docs/api/helpers/PlaneHelper.html',
- PointLightHelper: 'https://threejs.org/docs/api/helpers/PointLightHelper.html',
- RectAreaLightHelper: 'https://threejs.org/docs/api/helpers/RectAreaLightHelper.html',
- SkeletonHelper: 'https://threejs.org/docs/api/helpers/SkeletonHelper.html',
- SpotLightHelper: 'https://threejs.org/docs/api/helpers/SpotLightHelper.html',
- VertexNormalsHelper: 'https://threejs.org/docs/api/helpers/VertexNormalsHelper.html',
- AmbientLight: 'https://threejs.org/docs/api/lights/AmbientLight.html',
- DirectionalLight: 'https://threejs.org/docs/api/lights/DirectionalLight.html',
- HemisphereLight: 'https://threejs.org/docs/api/lights/HemisphereLight.html',
- Light: 'https://threejs.org/docs/api/lights/Light.html',
- PointLight: 'https://threejs.org/docs/api/lights/PointLight.html',
- RectAreaLight: 'https://threejs.org/docs/api/lights/RectAreaLight.html',
- SpotLight: 'https://threejs.org/docs/api/lights/SpotLight.html',
- DirectionalLightShadow: 'https://threejs.org/docs/api/lights/shadows/DirectionalLightShadow.html',
- LightShadow: 'https://threejs.org/docs/api/lights/shadows/LightShadow.html',
- SpotLightShadow: 'https://threejs.org/docs/api/lights/shadows/SpotLightShadow.html',
- AnimationLoader: 'https://threejs.org/docs/api/loaders/AnimationLoader.html',
- AudioLoader: 'https://threejs.org/docs/api/loaders/AudioLoader.html',
- BufferGeometryLoader: 'https://threejs.org/docs/api/loaders/BufferGeometryLoader.html',
- Cache: 'https://threejs.org/docs/api/loaders/Cache.html',
- CompressedTextureLoader: 'https://threejs.org/docs/api/loaders/CompressedTextureLoader.html',
- CubeTextureLoader: 'https://threejs.org/docs/api/loaders/CubeTextureLoader.html',
- DataTextureLoader: 'https://threejs.org/docs/api/loaders/DataTextureLoader.html',
- FileLoader: 'https://threejs.org/docs/api/loaders/FileLoader.html',
- FontLoader: 'https://threejs.org/docs/api/loaders/FontLoader.html',
- ImageBitmapLoader: 'https://threejs.org/docs/api/loaders/ImageBitmapLoader.html',
- ImageLoader: 'https://threejs.org/docs/api/loaders/ImageLoader.html',
- JSONLoader: 'https://threejs.org/docs/api/loaders/JSONLoader.html',
- Loader: 'https://threejs.org/docs/api/loaders/Loader.html',
- LoaderUtils: 'https://threejs.org/docs/api/loaders/LoaderUtils.html',
- MaterialLoader: 'https://threejs.org/docs/api/loaders/MaterialLoader.html',
- ObjectLoader: 'https://threejs.org/docs/api/loaders/ObjectLoader.html',
- TextureLoader: 'https://threejs.org/docs/api/loaders/TextureLoader.html',
- DefaultLoadingManager: 'https://threejs.org/docs/api/loaders/managers/DefaultLoadingManager.html',
- LoadingManager: 'https://threejs.org/docs/api/loaders/managers/LoadingManager.html',
- LineBasicMaterial: 'https://threejs.org/docs/api/materials/LineBasicMaterial.html',
- LineDashedMaterial: 'https://threejs.org/docs/api/materials/LineDashedMaterial.html',
- Material: 'https://threejs.org/docs/api/materials/Material.html',
- MeshBasicMaterial: 'https://threejs.org/docs/api/materials/MeshBasicMaterial.html',
- MeshDepthMaterial: 'https://threejs.org/docs/api/materials/MeshDepthMaterial.html',
- MeshLambertMaterial: 'https://threejs.org/docs/api/materials/MeshLambertMaterial.html',
- MeshNormalMaterial: 'https://threejs.org/docs/api/materials/MeshNormalMaterial.html',
- MeshPhongMaterial: 'https://threejs.org/docs/api/materials/MeshPhongMaterial.html',
- MeshPhysicalMaterial: 'https://threejs.org/docs/api/materials/MeshPhysicalMaterial.html',
- MeshStandardMaterial: 'https://threejs.org/docs/api/materials/MeshStandardMaterial.html',
- MeshToonMaterial: 'https://threejs.org/docs/api/materials/MeshToonMaterial.html',
- PointsMaterial: 'https://threejs.org/docs/api/materials/PointsMaterial.html',
- RawShaderMaterial: 'https://threejs.org/docs/api/materials/RawShaderMaterial.html',
- ShaderMaterial: 'https://threejs.org/docs/api/materials/ShaderMaterial.html',
- ShadowMaterial: 'https://threejs.org/docs/api/materials/ShadowMaterial.html',
- SpriteMaterial: 'https://threejs.org/docs/api/materials/SpriteMaterial.html',
- Box2: 'https://threejs.org/docs/api/math/Box2.html',
- Box3: 'https://threejs.org/docs/api/math/Box3.html',
- Color: 'https://threejs.org/docs/api/math/Color.html',
- Cylindrical: 'https://threejs.org/docs/api/math/Cylindrical.html',
- Euler: 'https://threejs.org/docs/api/math/Euler.html',
- Frustum: 'https://threejs.org/docs/api/math/Frustum.html',
- Interpolant: 'https://threejs.org/docs/api/math/Interpolant.html',
- Line3: 'https://threejs.org/docs/api/math/Line3.html',
- Math: 'https://threejs.org/docs/api/math/Math.html',
- Matrix3: 'https://threejs.org/docs/api/math/Matrix3.html',
- Matrix4: 'https://threejs.org/docs/api/math/Matrix4.html',
- Plane: 'https://threejs.org/docs/api/math/Plane.html',
- Quaternion: 'https://threejs.org/docs/api/math/Quaternion.html',
- Ray: 'https://threejs.org/docs/api/math/Ray.html',
- Sphere: 'https://threejs.org/docs/api/math/Sphere.html',
- Spherical: 'https://threejs.org/docs/api/math/Spherical.html',
- Triangle: 'https://threejs.org/docs/api/math/Triangle.html',
- Vector2: 'https://threejs.org/docs/api/math/Vector2.html',
- Vector3: 'https://threejs.org/docs/api/math/Vector3.html',
- Vector4: 'https://threejs.org/docs/api/math/Vector4.html',
- CubicInterpolant: 'https://threejs.org/docs/api/math/interpolants/CubicInterpolant.html',
- DiscreteInterpolant: 'https://threejs.org/docs/api/math/interpolants/DiscreteInterpolant.html',
- LinearInterpolant: 'https://threejs.org/docs/api/math/interpolants/LinearInterpolant.html',
- QuaternionLinearInterpolant: 'https://threejs.org/docs/api/math/interpolants/QuaternionLinearInterpolant.html',
- Bone: 'https://threejs.org/docs/api/objects/Bone.html',
- Group: 'https://threejs.org/docs/api/objects/Group.html',
- Line: 'https://threejs.org/docs/api/objects/Line.html',
- LineLoop: 'https://threejs.org/docs/api/objects/LineLoop.html',
- LineSegments: 'https://threejs.org/docs/api/objects/LineSegments.html',
- LOD: 'https://threejs.org/docs/api/objects/LOD.html',
- Mesh: 'https://threejs.org/docs/api/objects/Mesh.html',
- Points: 'https://threejs.org/docs/api/objects/Points.html',
- Skeleton: 'https://threejs.org/docs/api/objects/Skeleton.html',
- SkinnedMesh: 'https://threejs.org/docs/api/objects/SkinnedMesh.html',
- Sprite: 'https://threejs.org/docs/api/objects/Sprite.html',
- WebGLRenderer: 'https://threejs.org/docs/api/renderers/WebGLRenderer.html',
- WebGLRenderTarget: 'https://threejs.org/docs/api/renderers/WebGLRenderTarget.html',
- WebGLRenderTargetCube: 'https://threejs.org/docs/api/renderers/WebGLRenderTargetCube.html',
- ShaderChunk: 'https://threejs.org/docs/api/renderers/shaders/ShaderChunk.html',
- ShaderLib: 'https://threejs.org/docs/api/renderers/shaders/ShaderLib.html',
- UniformsLib: 'https://threejs.org/docs/api/renderers/shaders/UniformsLib.html',
- UniformsUtils: 'https://threejs.org/docs/api/renderers/shaders/UniformsUtils.html',
- Fog: 'https://threejs.org/docs/api/scenes/Fog.html',
- FogExp2: 'https://threejs.org/docs/api/scenes/FogExp2.html',
- Scene: 'https://threejs.org/docs/api/scenes/Scene.html',
- CanvasTexture: 'https://threejs.org/docs/api/textures/CanvasTexture.html',
- CompressedTexture: 'https://threejs.org/docs/api/textures/CompressedTexture.html',
- CubeTexture: 'https://threejs.org/docs/api/textures/CubeTexture.html',
- DataTexture: 'https://threejs.org/docs/api/textures/DataTexture.html',
- DepthTexture: 'https://threejs.org/docs/api/textures/DepthTexture.html',
- Texture: 'https://threejs.org/docs/api/textures/Texture.html',
- VideoTexture: 'https://threejs.org/docs/api/textures/VideoTexture.html',
- CCDIKSolver: 'https://threejs.org/docs/examples/animations/CCDIKSolver.html',
- MMDAnimationHelper: 'https://threejs.org/docs/examples/animations/MMDAnimationHelper.html',
- MMDPhysics: 'https://threejs.org/docs/examples/animations/MMDPhysics.html',
- OrbitControls: 'https://threejs.org/docs/examples/controls/OrbitControls.html',
- ConvexBufferGeometry: 'https://threejs.org/docs/examples/geometries/ConvexBufferGeometry.html',
- ConvexGeometry: 'https://threejs.org/docs/examples/geometries/ConvexGeometry.html',
- DecalGeometry: 'https://threejs.org/docs/examples/geometries/DecalGeometry.html',
- BabylonLoader: 'https://threejs.org/docs/examples/loaders/BabylonLoader.html',
- GLTFLoader: 'https://threejs.org/docs/examples/loaders/GLTFLoader.html',
- MMDLoader: 'https://threejs.org/docs/examples/loaders/MMDLoader.html',
- MTLLoader: 'https://threejs.org/docs/examples/loaders/MTLLoader.html',
- OBJLoader: 'https://threejs.org/docs/examples/loaders/OBJLoader.html',
- OBJLoader2: 'https://threejs.org/docs/examples/loaders/OBJLoader2.html',
- LoaderSupport: 'https://threejs.org/docs/examples/loaders/LoaderSupport.html',
- PCDLoader: 'https://threejs.org/docs/examples/loaders/PCDLoader.html',
- PDBLoader: 'https://threejs.org/docs/examples/loaders/PDBLoader.html',
- SVGLoader: 'https://threejs.org/docs/examples/loaders/SVGLoader.html',
- TGALoader: 'https://threejs.org/docs/examples/loaders/TGALoader.html',
- PRWMLoader: 'https://threejs.org/docs/examples/loaders/PRWMLoader.html',
- Lensflare: 'https://threejs.org/docs/examples/objects/Lensflare.html',
- GLTFExporter: 'https://threejs.org/docs/examples/exporters/GLTFExporter.html',
+ AnimationAction: 'https://threejs.org/docs/#api/animation/AnimationAction',
+ AnimationClip: 'https://threejs.org/docs/#api/animation/AnimationClip',
+ AnimationMixer: 'https://threejs.org/docs/#api/animation/AnimationMixer',
+ AnimationObjectGroup: 'https://threejs.org/docs/#api/animation/AnimationObjectGroup',
+ AnimationUtils: 'https://threejs.org/docs/#api/animation/AnimationUtils',
+ KeyframeTrack: 'https://threejs.org/docs/#api/animation/KeyframeTrack',
+ PropertyBinding: 'https://threejs.org/docs/#api/animation/PropertyBinding',
+ PropertyMixer: 'https://threejs.org/docs/#api/animation/PropertyMixer',
+ BooleanKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/BooleanKeyframeTrack',
+ ColorKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/ColorKeyframeTrack',
+ NumberKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/NumberKeyframeTrack',
+ QuaternionKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/QuaternionKeyframeTrack',
+ StringKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/StringKeyframeTrack',
+ VectorKeyframeTrack: 'https://threejs.org/docs/#api/animation/tracks/VectorKeyframeTrack',
+ Audio: 'https://threejs.org/docs/#api/audio/Audio',
+ AudioAnalyser: 'https://threejs.org/docs/#api/audio/AudioAnalyser',
+ AudioContext: 'https://threejs.org/docs/#api/audio/AudioContext',
+ AudioListener: 'https://threejs.org/docs/#api/audio/AudioListener',
+ PositionalAudio: 'https://threejs.org/docs/#api/audio/PositionalAudio',
+ ArrayCamera: 'https://threejs.org/docs/#api/cameras/ArrayCamera',
+ Camera: 'https://threejs.org/docs/#api/cameras/Camera',
+ CubeCamera: 'https://threejs.org/docs/#api/cameras/CubeCamera',
+ OrthographicCamera: 'https://threejs.org/docs/#api/cameras/OrthographicCamera',
+ PerspectiveCamera: 'https://threejs.org/docs/#api/cameras/PerspectiveCamera',
+ StereoCamera: 'https://threejs.org/docs/#api/cameras/StereoCamera',
+ Animation: 'https://threejs.org/docs/#api/constants/Animation',
+ Core: 'https://threejs.org/docs/#api/constants/Core',
+ CustomBlendingEquation: 'https://threejs.org/docs/#api/constants/CustomBlendingEquations',
+ DrawModes: 'https://threejs.org/docs/#api/constants/DrawModes',
+ Materials: 'https://threejs.org/docs/#api/constants/Materials',
+ Renderer: 'https://threejs.org/docs/#api/constants/Renderer',
+ Textures: 'https://threejs.org/docs/#api/constants/Textures',
+ BufferAttribute: 'https://threejs.org/docs/#api/core/BufferAttribute',
+ BufferGeometry: 'https://threejs.org/docs/#api/core/BufferGeometry',
+ Clock: 'https://threejs.org/docs/#api/core/Clock',
+ DirectGeometry: 'https://threejs.org/docs/#api/core/DirectGeometry',
+ EventDispatcher: 'https://threejs.org/docs/#api/core/EventDispatcher',
+ Face3: 'https://threejs.org/docs/#api/core/Face3',
+ Geometry: 'https://threejs.org/docs/#api/core/Geometry',
+ InstancedBufferAttribute: 'https://threejs.org/docs/#api/core/InstancedBufferAttribute',
+ InstancedBufferGeometry: 'https://threejs.org/docs/#api/core/InstancedBufferGeometry',
+ InstancedInterleavedBuffer: 'https://threejs.org/docs/#api/core/InstancedInterleavedBuffer',
+ InterleavedBuffer: 'https://threejs.org/docs/#api/core/InterleavedBuffer',
+ InterleavedBufferAttribute: 'https://threejs.org/docs/#api/core/InterleavedBufferAttribute',
+ Layers: 'https://threejs.org/docs/#api/core/Layers',
+ Object3D: 'https://threejs.org/docs/#api/core/Object3D',
+ Raycaster: 'https://threejs.org/docs/#api/core/Raycaster',
+ Uniform: 'https://threejs.org/docs/#api/core/Uniform',
+ BufferAttributeTypes: 'https://threejs.org/docs/#api/core/bufferAttributeTypes/BufferAttributeTypes',
+ Earcut: 'https://threejs.org/docs/#api/extras/Earcut',
+ ShapeUtils: 'https://threejs.org/docs/#api/extras/ShapeUtils',
+ Curve: 'https://threejs.org/docs/#api/extras/core/Curve',
+ CurvePath: 'https://threejs.org/docs/#api/extras/core/CurvePath',
+ Font: 'https://threejs.org/docs/#api/extras/core/Font',
+ Interpolations: 'https://threejs.org/docs/#api/extras/core/Interpolations',
+ Path: 'https://threejs.org/docs/#api/extras/core/Path',
+ Shape: 'https://threejs.org/docs/#api/extras/core/Shape',
+ ShapePath: 'https://threejs.org/docs/#api/extras/core/ShapePath',
+ ArcCurve: 'https://threejs.org/docs/#api/extras/curves/ArcCurve',
+ CatmullRomCurve3: 'https://threejs.org/docs/#api/extras/curves/CatmullRomCurve3',
+ CubicBezierCurve: 'https://threejs.org/docs/#api/extras/curves/CubicBezierCurve',
+ CubicBezierCurve3: 'https://threejs.org/docs/#api/extras/curves/CubicBezierCurve3',
+ EllipseCurve: 'https://threejs.org/docs/#api/extras/curves/EllipseCurve',
+ LineCurve: 'https://threejs.org/docs/#api/extras/curves/LineCurve',
+ LineCurve3: 'https://threejs.org/docs/#api/extras/curves/LineCurve3',
+ QuadraticBezierCurve: 'https://threejs.org/docs/#api/extras/curves/QuadraticBezierCurve',
+ QuadraticBezierCurve3: 'https://threejs.org/docs/#api/extras/curves/QuadraticBezierCurve3',
+ SplineCurve: 'https://threejs.org/docs/#api/extras/curves/SplineCurve',
+ ImmediateRenderObject: 'https://threejs.org/docs/#api/extras/objects/ImmediateRenderObject',
+ BoxBufferGeometry: 'https://threejs.org/docs/#api/geometries/BoxBufferGeometry',
+ BoxGeometry: 'https://threejs.org/docs/#api/geometries/BoxGeometry',
+ CircleBufferGeometry: 'https://threejs.org/docs/#api/geometries/CircleBufferGeometry',
+ CircleGeometry: 'https://threejs.org/docs/#api/geometries/CircleGeometry',
+ ConeBufferGeometry: 'https://threejs.org/docs/#api/geometries/ConeBufferGeometry',
+ ConeGeometry: 'https://threejs.org/docs/#api/geometries/ConeGeometry',
+ CylinderBufferGeometry: 'https://threejs.org/docs/#api/geometries/CylinderBufferGeometry',
+ CylinderGeometry: 'https://threejs.org/docs/#api/geometries/CylinderGeometry',
+ DodecahedronBufferGeometry: 'https://threejs.org/docs/#api/geometries/DodecahedronBufferGeometry',
+ DodecahedronGeometry: 'https://threejs.org/docs/#api/geometries/DodecahedronGeometry',
+ EdgesGeometry: 'https://threejs.org/docs/#api/geometries/EdgesGeometry',
+ ExtrudeBufferGeometry: 'https://threejs.org/docs/#api/geometries/ExtrudeBufferGeometry',
+ ExtrudeGeometry: 'https://threejs.org/docs/#api/geometries/ExtrudeGeometry',
+ IcosahedronBufferGeometry: 'https://threejs.org/docs/#api/geometries/IcosahedronBufferGeometry',
+ IcosahedronGeometry: 'https://threejs.org/docs/#api/geometries/IcosahedronGeometry',
+ LatheBufferGeometry: 'https://threejs.org/docs/#api/geometries/LatheBufferGeometry',
+ LatheGeometry: 'https://threejs.org/docs/#api/geometries/LatheGeometry',
+ OctahedronBufferGeometry: 'https://threejs.org/docs/#api/geometries/OctahedronBufferGeometry',
+ OctahedronGeometry: 'https://threejs.org/docs/#api/geometries/OctahedronGeometry',
+ ParametricBufferGeometry: 'https://threejs.org/docs/#api/geometries/ParametricBufferGeometry',
+ ParametricGeometry: 'https://threejs.org/docs/#api/geometries/ParametricGeometry',
+ PlaneBufferGeometry: 'https://threejs.org/docs/#api/geometries/PlaneBufferGeometry',
+ PlaneGeometry: 'https://threejs.org/docs/#api/geometries/PlaneGeometry',
+ PolyhedronBufferGeometry: 'https://threejs.org/docs/#api/geometries/PolyhedronBufferGeometry',
+ PolyhedronGeometry: 'https://threejs.org/docs/#api/geometries/PolyhedronGeometry',
+ RingBufferGeometry: 'https://threejs.org/docs/#api/geometries/RingBufferGeometry',
+ RingGeometry: 'https://threejs.org/docs/#api/geometries/RingGeometry',
+ ShapeBufferGeometry: 'https://threejs.org/docs/#api/geometries/ShapeBufferGeometry',
+ ShapeGeometry: 'https://threejs.org/docs/#api/geometries/ShapeGeometry',
+ SphereBufferGeometry: 'https://threejs.org/docs/#api/geometries/SphereBufferGeometry',
+ SphereGeometry: 'https://threejs.org/docs/#api/geometries/SphereGeometry',
+ TetrahedronBufferGeometry: 'https://threejs.org/docs/#api/geometries/TetrahedronBufferGeometry',
+ TetrahedronGeometry: 'https://threejs.org/docs/#api/geometries/TetrahedronGeometry',
+ TextBufferGeometry: 'https://threejs.org/docs/#api/geometries/TextBufferGeometry',
+ TextGeometry: 'https://threejs.org/docs/#api/geometries/TextGeometry',
+ TorusBufferGeometry: 'https://threejs.org/docs/#api/geometries/TorusBufferGeometry',
+ TorusGeometry: 'https://threejs.org/docs/#api/geometries/TorusGeometry',
+ TorusKnotBufferGeometry: 'https://threejs.org/docs/#api/geometries/TorusKnotBufferGeometry',
+ TorusKnotGeometry: 'https://threejs.org/docs/#api/geometries/TorusKnotGeometry',
+ TubeBufferGeometry: 'https://threejs.org/docs/#api/geometries/TubeBufferGeometry',
+ TubeGeometry: 'https://threejs.org/docs/#api/geometries/TubeGeometry',
+ WireframeGeometry: 'https://threejs.org/docs/#api/geometries/WireframeGeometry',
+ ArrowHelper: 'https://threejs.org/docs/#api/helpers/ArrowHelper',
+ AxesHelper: 'https://threejs.org/docs/#api/helpers/AxesHelper',
+ BoxHelper: 'https://threejs.org/docs/#api/helpers/BoxHelper',
+ Box3Helper: 'https://threejs.org/docs/#api/helpers/Box3Helper',
+ CameraHelper: 'https://threejs.org/docs/#api/helpers/CameraHelper',
+ DirectionalLightHelper: 'https://threejs.org/docs/#api/helpers/DirectionalLightHelper',
+ FaceNormalsHelper: 'https://threejs.org/docs/#api/helpers/FaceNormalsHelper',
+ GridHelper: 'https://threejs.org/docs/#api/helpers/GridHelper',
+ PolarGridHelper: 'https://threejs.org/docs/#api/helpers/PolarGridHelper',
+ HemisphereLightHelper: 'https://threejs.org/docs/#api/helpers/HemisphereLightHelper',
+ PlaneHelper: 'https://threejs.org/docs/#api/helpers/PlaneHelper',
+ PointLightHelper: 'https://threejs.org/docs/#api/helpers/PointLightHelper',
+ RectAreaLightHelper: 'https://threejs.org/docs/#api/helpers/RectAreaLightHelper',
+ SkeletonHelper: 'https://threejs.org/docs/#api/helpers/SkeletonHelper',
+ SpotLightHelper: 'https://threejs.org/docs/#api/helpers/SpotLightHelper',
+ VertexNormalsHelper: 'https://threejs.org/docs/#api/helpers/VertexNormalsHelper',
+ AmbientLight: 'https://threejs.org/docs/#api/lights/AmbientLight',
+ DirectionalLight: 'https://threejs.org/docs/#api/lights/DirectionalLight',
+ HemisphereLight: 'https://threejs.org/docs/#api/lights/HemisphereLight',
+ Light: 'https://threejs.org/docs/#api/lights/Light',
+ PointLight: 'https://threejs.org/docs/#api/lights/PointLight',
+ RectAreaLight: 'https://threejs.org/docs/#api/lights/RectAreaLight',
+ SpotLight: 'https://threejs.org/docs/#api/lights/SpotLight',
+ DirectionalLightShadow: 'https://threejs.org/docs/#api/lights/shadows/DirectionalLightShadow',
+ LightShadow: 'https://threejs.org/docs/#api/lights/shadows/LightShadow',
+ SpotLightShadow: 'https://threejs.org/docs/#api/lights/shadows/SpotLightShadow',
+ AnimationLoader: 'https://threejs.org/docs/#api/loaders/AnimationLoader',
+ AudioLoader: 'https://threejs.org/docs/#api/loaders/AudioLoader',
+ BufferGeometryLoader: 'https://threejs.org/docs/#api/loaders/BufferGeometryLoader',
+ Cache: 'https://threejs.org/docs/#api/loaders/Cache',
+ CompressedTextureLoader: 'https://threejs.org/docs/#api/loaders/CompressedTextureLoader',
+ CubeTextureLoader: 'https://threejs.org/docs/#api/loaders/CubeTextureLoader',
+ DataTextureLoader: 'https://threejs.org/docs/#api/loaders/DataTextureLoader',
+ FileLoader: 'https://threejs.org/docs/#api/loaders/FileLoader',
+ FontLoader: 'https://threejs.org/docs/#api/loaders/FontLoader',
+ ImageBitmapLoader: 'https://threejs.org/docs/#api/loaders/ImageBitmapLoader',
+ ImageLoader: 'https://threejs.org/docs/#api/loaders/ImageLoader',
+ JSONLoader: 'https://threejs.org/docs/#api/loaders/JSONLoader',
+ Loader: 'https://threejs.org/docs/#api/loaders/Loader',
+ LoaderUtils: 'https://threejs.org/docs/#api/loaders/LoaderUtils',
+ MaterialLoader: 'https://threejs.org/docs/#api/loaders/MaterialLoader',
+ ObjectLoader: 'https://threejs.org/docs/#api/loaders/ObjectLoader',
+ TextureLoader: 'https://threejs.org/docs/#api/loaders/TextureLoader',
+ DefaultLoadingManager: 'https://threejs.org/docs/#api/loaders/managers/DefaultLoadingManager',
+ LoadingManager: 'https://threejs.org/docs/#api/loaders/managers/LoadingManager',
+ LineBasicMaterial: 'https://threejs.org/docs/#api/materials/LineBasicMaterial',
+ LineDashedMaterial: 'https://threejs.org/docs/#api/materials/LineDashedMaterial',
+ Material: 'https://threejs.org/docs/#api/materials/Material',
+ MeshBasicMaterial: 'https://threejs.org/docs/#api/materials/MeshBasicMaterial',
+ MeshDepthMaterial: 'https://threejs.org/docs/#api/materials/MeshDepthMaterial',
+ MeshLambertMaterial: 'https://threejs.org/docs/#api/materials/MeshLambertMaterial',
+ MeshNormalMaterial: 'https://threejs.org/docs/#api/materials/MeshNormalMaterial',
+ MeshPhongMaterial: 'https://threejs.org/docs/#api/materials/MeshPhongMaterial',
+ MeshPhysicalMaterial: 'https://threejs.org/docs/#api/materials/MeshPhysicalMaterial',
+ MeshStandardMaterial: 'https://threejs.org/docs/#api/materials/MeshStandardMaterial',
+ MeshToonMaterial: 'https://threejs.org/docs/#api/materials/MeshToonMaterial',
+ PointsMaterial: 'https://threejs.org/docs/#api/materials/PointsMaterial',
+ RawShaderMaterial: 'https://threejs.org/docs/#api/materials/RawShaderMaterial',
+ ShaderMaterial: 'https://threejs.org/docs/#api/materials/ShaderMaterial',
+ ShadowMaterial: 'https://threejs.org/docs/#api/materials/ShadowMaterial',
+ SpriteMaterial: 'https://threejs.org/docs/#api/materials/SpriteMaterial',
+ Box2: 'https://threejs.org/docs/#api/math/Box2',
+ Box3: 'https://threejs.org/docs/#api/math/Box3',
+ Color: 'https://threejs.org/docs/#api/math/Color',
+ Cylindrical: 'https://threejs.org/docs/#api/math/Cylindrical',
+ Euler: 'https://threejs.org/docs/#api/math/Euler',
+ Frustum: 'https://threejs.org/docs/#api/math/Frustum',
+ Interpolant: 'https://threejs.org/docs/#api/math/Interpolant',
+ Line3: 'https://threejs.org/docs/#api/math/Line3',
+ Math: 'https://threejs.org/docs/#api/math/Math',
+ Matrix3: 'https://threejs.org/docs/#api/math/Matrix3',
+ Matrix4: 'https://threejs.org/docs/#api/math/Matrix4',
+ Plane: 'https://threejs.org/docs/#api/math/Plane',
+ Quaternion: 'https://threejs.org/docs/#api/math/Quaternion',
+ Ray: 'https://threejs.org/docs/#api/math/Ray',
+ Sphere: 'https://threejs.org/docs/#api/math/Sphere',
+ Spherical: 'https://threejs.org/docs/#api/math/Spherical',
+ Triangle: 'https://threejs.org/docs/#api/math/Triangle',
+ Vector2: 'https://threejs.org/docs/#api/math/Vector2',
+ Vector3: 'https://threejs.org/docs/#api/math/Vector3',
+ Vector4: 'https://threejs.org/docs/#api/math/Vector4',
+ CubicInterpolant: 'https://threejs.org/docs/#api/math/interpolants/CubicInterpolant',
+ DiscreteInterpolant: 'https://threejs.org/docs/#api/math/interpolants/DiscreteInterpolant',
+ LinearInterpolant: 'https://threejs.org/docs/#api/math/interpolants/LinearInterpolant',
+ QuaternionLinearInterpolant: 'https://threejs.org/docs/#api/math/interpolants/QuaternionLinearInterpolant',
+ Bone: 'https://threejs.org/docs/#api/objects/Bone',
+ Group: 'https://threejs.org/docs/#api/objects/Group',
+ Line: 'https://threejs.org/docs/#api/objects/Line',
+ LineLoop: 'https://threejs.org/docs/#api/objects/LineLoop',
+ LineSegments: 'https://threejs.org/docs/#api/objects/LineSegments',
+ LOD: 'https://threejs.org/docs/#api/objects/LOD',
+ Mesh: 'https://threejs.org/docs/#api/objects/Mesh',
+ Points: 'https://threejs.org/docs/#api/objects/Points',
+ Skeleton: 'https://threejs.org/docs/#api/objects/Skeleton',
+ SkinnedMesh: 'https://threejs.org/docs/#api/objects/SkinnedMesh',
+ Sprite: 'https://threejs.org/docs/#api/objects/Sprite',
+ WebGLRenderer: 'https://threejs.org/docs/#api/renderers/WebGLRenderer',
+ WebGLRenderTarget: 'https://threejs.org/docs/#api/renderers/WebGLRenderTarget',
+ WebGLRenderTargetCube: 'https://threejs.org/docs/#api/renderers/WebGLRenderTargetCube',
+ ShaderChunk: 'https://threejs.org/docs/#api/renderers/shaders/ShaderChunk',
+ ShaderLib: 'https://threejs.org/docs/#api/renderers/shaders/ShaderLib',
+ UniformsLib: 'https://threejs.org/docs/#api/renderers/shaders/UniformsLib',
+ UniformsUtils: 'https://threejs.org/docs/#api/renderers/shaders/UniformsUtils',
+ Fog: 'https://threejs.org/docs/#api/scenes/Fog',
+ FogExp2: 'https://threejs.org/docs/#api/scenes/FogExp2',
+ Scene: 'https://threejs.org/docs/#api/scenes/Scene',
+ CanvasTexture: 'https://threejs.org/docs/#api/textures/CanvasTexture',
+ CompressedTexture: 'https://threejs.org/docs/#api/textures/CompressedTexture',
+ CubeTexture: 'https://threejs.org/docs/#api/textures/CubeTexture',
+ DataTexture: 'https://threejs.org/docs/#api/textures/DataTexture',
+ DepthTexture: 'https://threejs.org/docs/#api/textures/DepthTexture',
+ Texture: 'https://threejs.org/docs/#api/textures/Texture',
+ VideoTexture: 'https://threejs.org/docs/#api/textures/VideoTexture',
+ CCDIKSolver: 'https://threejs.org/docs/#examples/animations/CCDIKSolver',
+ MMDAnimationHelper: 'https://threejs.org/docs/#examples/animations/MMDAnimationHelper',
+ MMDPhysics: 'https://threejs.org/docs/#examples/animations/MMDPhysics',
+ OrbitControls: 'https://threejs.org/docs/#examples/controls/OrbitControls',
+ ConvexBufferGeometry: 'https://threejs.org/docs/#examples/geometries/ConvexBufferGeometry',
+ ConvexGeometry: 'https://threejs.org/docs/#examples/geometries/ConvexGeometry',
+ DecalGeometry: 'https://threejs.org/docs/#examples/geometries/DecalGeometry',
+ BabylonLoader: 'https://threejs.org/docs/#examples/loaders/BabylonLoader',
+ GLTFLoader: 'https://threejs.org/docs/#examples/loaders/GLTFLoader',
+ MMDLoader: 'https://threejs.org/docs/#examples/loaders/MMDLoader',
+ MTLLoader: 'https://threejs.org/docs/#examples/loaders/MTLLoader',
+ OBJLoader: 'https://threejs.org/docs/#examples/loaders/OBJLoader',
+ OBJLoader2: 'https://threejs.org/docs/#examples/loaders/OBJLoader2',
+ LoaderSupport: 'https://threejs.org/docs/#examples/loaders/LoaderSupport',
+ PCDLoader: 'https://threejs.org/docs/#examples/loaders/PCDLoader',
+ PDBLoader: 'https://threejs.org/docs/#examples/loaders/PDBLoader',
+ SVGLoader: 'https://threejs.org/docs/#examples/loaders/SVGLoader',
+ TGALoader: 'https://threejs.org/docs/#examples/loaders/TGALoader',
+ PRWMLoader: 'https://threejs.org/docs/#examples/loaders/PRWMLoader',
+ Lensflare: 'https://threejs.org/docs/#examples/objects/Lensflare',
+ GLTFExporter: 'https://threejs.org/docs/#examples/exporters/GLTFExporter',
};
function getKeywordLink(keyword) {
+ const dotNdx = keyword.indexOf('.');
+ if (dotNdx) {
+ const before = keyword.substring(0, dotNdx);
+ const link = codeKeywordLinks[before];
+ if (link) {
+ return `${link}.${keyword.substr(dotNdx + 1)}`;
+ }
+ }
return keyword.startsWith('THREE.')
? codeKeywordLinks[keyword.substring(6)]
: codeKeywordLinks[keyword]; | false |
Other | mrdoob | three.js | 0e7dcddb7ae5f04928028b56d6cace67d5a856a0.json | add more binary files | .gitattirbutes | @@ -1,2 +0,0 @@
-.jpeg binary
- | false |
Other | mrdoob | three.js | 01784f88f291f9d24430e3ac32cd80aa4aac4b1d.json | fix shadow visibility | threejs/threejs-load-gltf-shadows.html | @@ -101,8 +101,10 @@
const cameraHelper = new THREE.CameraHelper(cam);
scene.add(cameraHelper);
+ cameraHelper.visible = false;
const helper = new THREE.DirectionalLightHelper(light, 100);
scene.add(helper);
+ helper.visible = false;
function makeXYZGUI(gui, vector3, name, onChangeFn) {
const folder = gui.addFolder(name);
@@ -117,12 +119,10 @@
light.updateMatrixWorld();
light.target.updateMatrixWorld();
helper.update();
- helper.visible = false;
// update the light's shadow camera's projection matrix
light.shadow.camera.updateProjectionMatrix();
// and now update the camera helper we're using to show the light's shadow camera
cameraHelper.update();
- cameraHelper.visible = false;
}
updateCamera();
@@ -167,13 +167,11 @@
class VisibleGUIHelper {
constructor(...objects) {
this.objects = [...objects];
- this.show = this.objects[0].visible;
}
get value() {
- return this.show;
+ return this.objects[0].visible;
}
set value(v) {
- this.show = v;
this.objects.forEach((obj) => {
obj.visible = v;
}); | false |
Other | mrdoob | three.js | 5b4a70bb1d4876ae161e92be5ac37b0858f3bbd3.json | copy image (#22741) | examples/jsm/utils/RoughnessMipmapper.js | @@ -98,6 +98,7 @@ class RoughnessMipmapper {
material.roughnessMap.repeat.copy( roughnessMap.repeat );
material.roughnessMap.center.copy( roughnessMap.center );
material.roughnessMap.rotation = roughnessMap.rotation;
+ material.roughnessMap.image = roughnessMap.image;
material.roughnessMap.matrixAutoUpdate = roughnessMap.matrixAutoUpdate;
material.roughnessMap.matrix.copy( roughnessMap.matrix ); | false |
Other | mrdoob | three.js | 8b80974628275e16583467410d0f488161c5a81b.json | Use Fetch in FileLoader (#22510)
* initial working draft
* no progress? no problem?
* credentials & progress sorted.
* length logic
* new loadAsync function. load behaviour unchanged.
* erroneous self
* catching errors nicely.
* fix spaces
* remove todo | src/loaders/FileLoader.js | @@ -19,19 +19,17 @@ class FileLoader extends Loader {
url = this.manager.resolveURL( url );
- const scope = this;
-
const cached = Cache.get( url );
if ( cached !== undefined ) {
- scope.manager.itemStart( url );
+ this.manager.itemStart( url );
- setTimeout( function () {
+ setTimeout( () => {
if ( onLoad ) onLoad( cached );
- scope.manager.itemEnd( url );
+ this.manager.itemEnd( url );
}, 0 );
@@ -55,225 +53,164 @@ class FileLoader extends Loader {
}
- // Check for data: URI
- const dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;
- const dataUriRegexResult = url.match( dataUriRegex );
- let request;
-
- // Safari can not handle Data URIs through XMLHttpRequest so process manually
- if ( dataUriRegexResult ) {
-
- const mimeType = dataUriRegexResult[ 1 ];
- const isBase64 = !! dataUriRegexResult[ 2 ];
-
- let data = dataUriRegexResult[ 3 ];
- data = decodeURIComponent( data );
-
- if ( isBase64 ) data = atob( data );
-
- try {
-
- let response;
- const responseType = ( this.responseType || '' ).toLowerCase();
-
- switch ( responseType ) {
-
- case 'arraybuffer':
- case 'blob':
-
- const view = new Uint8Array( data.length );
-
- for ( let i = 0; i < data.length; i ++ ) {
-
- view[ i ] = data.charCodeAt( i );
-
- }
-
- if ( responseType === 'blob' ) {
-
- response = new Blob( [ view.buffer ], { type: mimeType } );
+ // Initialise array for duplicate requests
+ loading[ url ] = [];
- } else {
+ loading[ url ].push( {
+ onLoad: onLoad,
+ onProgress: onProgress,
+ onError: onError,
+ } );
- response = view.buffer;
+ // create request
+ const req = new Request( url, {
+ headers: new Headers( this.requestHeader ),
+ credentials: this.withCredentials ? 'include' : 'same-origin',
+ // An abort controller could be added within a future PR
+ } );
- }
-
- break;
-
- case 'document':
-
- const parser = new DOMParser();
- response = parser.parseFromString( data, mimeType );
-
- break;
-
- case 'json':
-
- response = JSON.parse( data );
+ // start the fetch
+ fetch( req )
+ .then( response => {
- break;
+ if ( response.status === 200 || response.status === 0 ) {
- default: // 'text' or other
+ // Some browsers return HTTP Status 0 when using non-http protocol
+ // e.g. 'file://' or 'data://'. Handle as success.
- response = data;
+ if ( response.status === 0 ) {
- break;
+ console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );
- }
+ }
- // Wait for next browser tick like standard XMLHttpRequest event dispatching does
- setTimeout( function () {
+ const callbacks = loading[ url ];
+ const reader = response.body.getReader();
+ const contentLength = response.headers.get( 'Content-Length' );
+ const total = contentLength ? parseInt( contentLength ) : 0;
+ const lengthComputable = total !== 0;
+ let loaded = 0;
- if ( onLoad ) onLoad( response );
+ // periodically read data into the new stream tracking while download progress
+ return new ReadableStream( {
+ start( controller ) {
- scope.manager.itemEnd( url );
+ readData();
- }, 0 );
+ function readData() {
- } catch ( error ) {
+ reader.read().then( ( { done, value } ) => {
- // Wait for next browser tick like standard XMLHttpRequest event dispatching does
- setTimeout( function () {
+ if ( done ) {
- if ( onError ) onError( error );
+ controller.close();
- scope.manager.itemError( url );
- scope.manager.itemEnd( url );
+ } else {
- }, 0 );
+ loaded += value.byteLength;
- }
+ const event = new ProgressEvent( 'progress', { lengthComputable, loaded, total } );
+ for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
- } else {
+ const callback = callbacks[ i ];
+ if ( callback.onProgress ) callback.onProgress( event );
- // Initialise array for duplicate requests
+ }
- loading[ url ] = [];
+ controller.enqueue( value );
+ readData();
- loading[ url ].push( {
+ }
- onLoad: onLoad,
- onProgress: onProgress,
- onError: onError
+ } );
- } );
+ }
- request = new XMLHttpRequest();
-
- request.open( 'GET', url, true );
-
- request.addEventListener( 'load', function ( event ) {
-
- const response = this.response;
-
- const callbacks = loading[ url ];
+ }
- delete loading[ url ];
+ } );
- if ( this.status === 200 || this.status === 0 ) {
+ } else {
- // Some browsers return HTTP Status 0 when using non-http protocol
- // e.g. 'file://' or 'data://'. Handle as success.
+ throw Error( `fetch for "${response.url}" responded with ${response.status}: ${response.statusText}` );
- if ( this.status === 0 ) console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );
+ }
- // Add to cache only on HTTP success, so that we do not cache
- // error response bodies as proper responses to requests.
- Cache.add( url, response );
+ } )
+ .then( stream => {
- for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
+ const response = new Response( stream );
- const callback = callbacks[ i ];
- if ( callback.onLoad ) callback.onLoad( response );
+ switch ( this.responseType ) {
- }
+ case 'arraybuffer':
- scope.manager.itemEnd( url );
+ return response.arrayBuffer();
- } else {
+ case 'blob':
- for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
+ return response.blob();
- const callback = callbacks[ i ];
- if ( callback.onError ) callback.onError( event );
+ case 'document':
- }
+ return response.text()
+ .then( text => {
- scope.manager.itemError( url );
- scope.manager.itemEnd( url );
+ const parser = new DOMParser();
+ return parser.parseFromString( text, this.mimeType );
- }
+ } );
- }, false );
+ case 'json':
- request.addEventListener( 'progress', function ( event ) {
+ return response.json();
- const callbacks = loading[ url ];
+ default:
- for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
-
- const callback = callbacks[ i ];
- if ( callback.onProgress ) callback.onProgress( event );
+ return response.text();
}
- }, false );
+ } )
+ .then( data => {
- request.addEventListener( 'error', function ( event ) {
+ // Add to cache only on HTTP success, so that we do not cache
+ // error response bodies as proper responses to requests.
+ Cache.add( url, data );
const callbacks = loading[ url ];
-
delete loading[ url ];
for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
const callback = callbacks[ i ];
- if ( callback.onError ) callback.onError( event );
+ if ( callback.onLoad ) callback.onLoad( data );
}
- scope.manager.itemError( url );
- scope.manager.itemEnd( url );
+ this.manager.itemEnd( url );
- }, false );
+ } )
+ .catch( err => {
- request.addEventListener( 'abort', function ( event ) {
+ // Abort errors and other errors are handled the same
const callbacks = loading[ url ];
-
delete loading[ url ];
for ( let i = 0, il = callbacks.length; i < il; i ++ ) {
const callback = callbacks[ i ];
- if ( callback.onError ) callback.onError( event );
+ if ( callback.onError ) callback.onError( err );
}
- scope.manager.itemError( url );
- scope.manager.itemEnd( url );
-
- }, false );
-
- if ( this.responseType !== undefined ) request.responseType = this.responseType;
- if ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials;
+ this.manager.itemError( url );
+ this.manager.itemEnd( url );
- if ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' );
-
- for ( const header in this.requestHeader ) {
-
- request.setRequestHeader( header, this.requestHeader[ header ] );
-
- }
-
- request.send( null );
-
- }
-
- scope.manager.itemStart( url );
+ } );
- return request;
+ this.manager.itemStart( url );
}
| false |
Other | mrdoob | three.js | 11c6a21f0222297bf34c7806470dcf24fb4341ec.json | Add missing DataTexture2DArray declaration for ts | src/Three.d.ts | @@ -25,6 +25,7 @@ export * from './objects/Points';
export * from './objects/Group';
export * from './textures/VideoTexture';
export * from './textures/DataTexture';
+export * from './textures/DataTexture2DArray';
export * from './textures/DataTexture3D';
export * from './textures/CompressedTexture';
export * from './textures/CubeTexture'; | false |
Other | mrdoob | three.js | b7707a06343ecd6658bc24be7156dc1cb7143340.json | Replace .includes with .indexOf | examples/js/loaders/GLTFLoader.js | @@ -696,7 +696,7 @@ THREE.GLTFLoader = ( function () {
if ( ! loader ) {
- if ( json.extensionsRequired && json.extensionsRequired.includes( this.name ) ) {
+ if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {
throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
| true |
Other | mrdoob | three.js | b7707a06343ecd6658bc24be7156dc1cb7143340.json | Replace .includes with .indexOf | examples/jsm/loaders/GLTFLoader.js | @@ -759,7 +759,7 @@ var GLTFLoader = ( function () {
if ( ! loader ) {
- if ( json.extensionsRequired && json.extensionsRequired.includes( this.name ) ) {
+ if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {
throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
| true |
Other | mrdoob | three.js | cee66d393251d2e69d3990e0464238b3fa6f94e6.json | Fix code style and missing break | examples/js/loaders/GLTFLoader.js | @@ -279,19 +279,20 @@ THREE.GLTFLoader = ( function () {
case EXTENSIONS.EXT_MESHOPT_COMPRESSION:
if ( extensionsRequired.includes( extensionName ) ) {
- if ( !this.meshoptDecoder ) {
+ if ( ! this.meshoptDecoder ) {
throw new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );
}
- if ( !this.meshoptDecoder.supported ) {
+ if ( ! this.meshoptDecoder.supported ) {
throw new Error( 'THREE.GLTFLoader: MeshoptDecoder support is required to load compressed files' );
}
}
+ break;
default:
@@ -759,7 +760,7 @@ THREE.GLTFLoader = ( function () {
var buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );
var decoder = this.parser.options.meshoptDecoder;
- if ( !decoder || !decoder.supported ) {
+ if ( ! decoder || ! decoder.supported ) {
return null; // will use the fallback buffer if present
| true |
Other | mrdoob | three.js | cee66d393251d2e69d3990e0464238b3fa6f94e6.json | Fix code style and missing break | examples/jsm/loaders/GLTFLoader.js | @@ -342,19 +342,20 @@ var GLTFLoader = ( function () {
case EXTENSIONS.EXT_MESHOPT_COMPRESSION:
if ( extensionsRequired.includes( extensionName ) ) {
- if ( !this.meshoptDecoder ) {
+ if ( ! this.meshoptDecoder ) {
throw new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );
}
- if ( !this.meshoptDecoder.supported ) {
+ if ( ! this.meshoptDecoder.supported ) {
throw new Error( 'THREE.GLTFLoader: MeshoptDecoder support is required to load compressed files' );
}
}
+ break;
default:
@@ -822,7 +823,7 @@ var GLTFLoader = ( function () {
var buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );
var decoder = this.parser.options.meshoptDecoder;
- if ( !decoder || !decoder.supported ) {
+ if ( ! decoder || ! decoder.supported ) {
return null; // will use the fallback buffer if present
| true |
Other | mrdoob | three.js | 8d1c00395bc97b91deeddcda97fde80e4d00e614.json | Use strict equality in extension check. | src/renderers/webgl/WebGLLights.js | @@ -418,12 +418,12 @@ function WebGLLights( extensions, capabilities ) {
// WebGL 1
- if ( extensions.has( 'OES_texture_float_linear' ) == true ) {
+ if ( extensions.has( 'OES_texture_float_linear' ) === true ) {
state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
- } else if ( extensions.has( 'OES_texture_half_float_linear' ) == true ) {
+ } else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) {
state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
state.rectAreaLTC2 = UniformsLib.LTC_HALF_2; | false |
Other | mrdoob | three.js | dab677f6a81254d8552cfa42739ccc863012d86f.json | Apply conventions and tidy up. | examples/jsm/lights/RectAreaLightUniformsLib.d.ts | @@ -1,10 +1,5 @@
-import {
- WebGLRenderer,
-} from '../../../src/Three';
-
-
export namespace RectAreaLightUniformsLib {
- export function init( renderer: WebGLRenderer ): void;
+ export function init(): void;
} | true |
Other | mrdoob | three.js | dab677f6a81254d8552cfa42739ccc863012d86f.json | Apply conventions and tidy up. | examples/jsm/lights/RectAreaLightUniformsLib.js | @@ -38,7 +38,7 @@ var int32View = new Int32Array( floatView.buffer );
* used, eg. in Ogre), with the additional benefit of rounding, inspired
* by James Tursa?s half-precision code. */
-function toHalf ( val ) {
+function toHalf( val ) {
floatView[ 0 ] = val;
var x = int32View[ 0 ];
@@ -79,7 +79,7 @@ function toHalf ( val ) {
bits += m & 1;
return bits;
-};
+}
var RectAreaLightUniformsLib = {
@@ -101,18 +101,24 @@ var RectAreaLightUniformsLib = {
UniformsLib.LTC_FLOAT_2 = new DataTexture( ltc_float_2, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
const ltc_half_1 = new Uint16Array( LTC_MAT_1.length );
+
LTC_MAT_1.forEach( function ( x, index ) {
- ltc_half_1[index] = toHalf( x );
- });
+
+ ltc_half_1[ index ] = toHalf( x );
+
+ } );
const ltc_half_2 = new Uint16Array( LTC_MAT_2.length );
+
LTC_MAT_2.forEach( function ( x, index ) {
- ltc_half_2[index] = toHalf( x );
- });
-
+
+ ltc_half_2[ index ] = toHalf( x );
+
+ } );
+
UniformsLib.LTC_HALF_1 = new DataTexture( ltc_half_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
UniformsLib.LTC_HALF_2 = new DataTexture( ltc_half_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
-
+
}
}; | true |
Other | mrdoob | three.js | dab677f6a81254d8552cfa42739ccc863012d86f.json | Apply conventions and tidy up. | examples/webgl_lights_rectarealight.html | @@ -54,7 +54,7 @@
var ambient = new THREE.AmbientLight( 0xffffff, 0.1 );
scene.add( ambient );
- RectAreaLightUniformsLib.init( );
+ RectAreaLightUniformsLib.init();
rectLight = new THREE.RectAreaLight( 0xffffff, 1, 10, 10 );
rectLight.position.set( 5, 5, 0 ); | true |
Other | mrdoob | three.js | dab677f6a81254d8552cfa42739ccc863012d86f.json | Apply conventions and tidy up. | src/renderers/webgl/WebGLLights.js | @@ -407,19 +407,19 @@ function WebGLLights( extensions, capabilities ) {
if ( rectAreaLength > 0 ) {
- if ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float_linear' ) ) {
+ if ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float_linear' ) ) {
state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
- } else if ( extensions.get( 'OES_texture_half_float_linear' ) ) {
+ } else if ( extensions.has( 'OES_texture_half_float_linear' ) ) {
state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
state.rectAreaLTC2 = UniformsLib.LTC_HALF_2;
} else {
- throw 'missing webgl extension';
+ console.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );
}
| true |
Other | mrdoob | three.js | eb2f83b0cabbf4eaf9067acc01de22f0fe39fe1d.json | Remove trailing space. | src/renderers/webgl/WebGLLights.js | @@ -404,7 +404,7 @@ function WebGLLights( extensions, capabilities ) {
}
}
-
+
if ( rectAreaLength > 0 ) {
if ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float_linear' ) ) { | false |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | examples/jsm/lights/RectAreaLightUniformsLib.js | @@ -84,7 +84,7 @@ function toHalf ( val ) {
var RectAreaLightUniformsLib = {
// renderer should be an instance of THREE.WebGLRenderer
- init: function ( renderer ) {
+ init: function () {
// source: https://github.com/selfshadow/ltc_code/tree/master/fit/results/ltc.js
@@ -94,39 +94,25 @@ var RectAreaLightUniformsLib = {
// data textures
- var ltc_1 = null;
- var ltc_2 = null;
+ const ltc_float_1 = new Float32Array( LTC_MAT_1 );
+ const ltc_float_2 = new Float32Array( LTC_MAT_2 );
- if ( renderer.capabilities.isWebGL2 === true || renderer.extensions.get( 'OES_texture_float_linear' ) ) {
+ UniformsLib.LTC_FLOAT_1 = new DataTexture( ltc_float_1, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+ UniformsLib.LTC_FLOAT_2 = new DataTexture( ltc_float_2, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
- const ltc_float_1 = new Float32Array( LTC_MAT_1 );
- const ltc_float_2 = new Float32Array( LTC_MAT_2 );
+ const ltc_half_1 = new Uint16Array( LTC_MAT_1.length );
+ LTC_MAT_1.forEach( function ( x, index ) {
+ ltc_half_1[index] = toHalf( x );
+ });
- ltc_1 = new DataTexture( ltc_float_1, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
- ltc_2 = new DataTexture( ltc_float_2, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
-
- } else if ( renderer.extensions.get( 'OES_texture_half_float_linear' ) ) {
-
- const ltc_half_1 = new Uint16Array( LTC_MAT_1.length );
- LTC_MAT_1.forEach( function ( x, index ) {
- ltc_half_1[index] = toHalf( x );
- });
+ const ltc_half_2 = new Uint16Array( LTC_MAT_2.length );
+ LTC_MAT_2.forEach( function ( x, index ) {
+ ltc_half_2[index] = toHalf( x );
+ });
- const ltc_half_2 = new Uint16Array( LTC_MAT_2.length );
- LTC_MAT_2.forEach( function ( x, index ) {
- ltc_half_2[index] = toHalf( x );
- });
+ UniformsLib.LTC_HALF_1 = new DataTexture( ltc_half_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+ UniformsLib.LTC_HALF_2 = new DataTexture( ltc_half_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
- ltc_1 = new DataTexture( ltc_half_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
- ltc_2 = new DataTexture( ltc_half_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
-
- } else {
- throw 'missing webgl extension';
- }
-
- UniformsLib.LTC_1 = ltc_1;
- UniformsLib.LTC_2 = ltc_2;
-
}
}; | true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | examples/webgl_lights_rectarealight.html | @@ -54,7 +54,7 @@
var ambient = new THREE.AmbientLight( 0xffffff, 0.1 );
scene.add( ambient );
- RectAreaLightUniformsLib.init( renderer );
+ RectAreaLightUniformsLib.init( );
rectLight = new THREE.RectAreaLight( 0xffffff, 1, 10, 10 );
rectLight.position.set( 5, 5, 0 ); | true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | src/renderers/WebGLRenderer.js | @@ -297,7 +297,7 @@ function WebGLRenderer( parameters ) {
programCache = new WebGLPrograms( _this, cubemaps, extensions, capabilities, bindingStates, clipping );
materials = new WebGLMaterials( properties );
renderLists = new WebGLRenderLists( properties );
- renderStates = new WebGLRenderStates();
+ renderStates = new WebGLRenderStates( extensions, capabilities );
background = new WebGLBackground( _this, cubemaps, state, objects, _premultipliedAlpha );
bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities ); | true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | src/renderers/webgl/WebGLLights.d.ts | @@ -1,6 +1,9 @@
+import { WebGLExtensions } from './WebGLExtensions';
+import { WebGLCapabilities } from './WebGLCapabilities';
+
export class WebGLLights {
- constructor( gl: WebGLRenderingContext, properties: any, info: any );
+ constructor( extensions: WebGLExtensions, capabilities: WebGLCapabilities );
state: {
version: number; | true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | src/renderers/webgl/WebGLLights.js | @@ -150,7 +150,7 @@ function shadowCastingLightsFirst( lightA, lightB ) {
}
-function WebGLLights() {
+function WebGLLights( extensions, capabilities ) {
const cache = new UniformsCache();
@@ -404,11 +404,24 @@ function WebGLLights() {
}
}
-
+
if ( rectAreaLength > 0 ) {
- state.rectAreaLTC1 = UniformsLib.LTC_1;
- state.rectAreaLTC2 = UniformsLib.LTC_2;
+ if ( capabilities.isWebGL2 || extensions.get( 'OES_texture_float_linear' ) ) {
+
+ state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;
+ state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;
+
+ } else if ( extensions.get( 'OES_texture_half_float_linear' ) ) {
+
+ state.rectAreaLTC1 = UniformsLib.LTC_HALF_1;
+ state.rectAreaLTC2 = UniformsLib.LTC_HALF_2;
+
+ } else {
+
+ throw 'missing webgl extension';
+
+ }
}
| true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | src/renderers/webgl/WebGLRenderStates.d.ts | @@ -2,6 +2,8 @@ import { Scene } from '../../scenes/Scene';
import { Camera } from '../../cameras/Camera';
import { Light } from '../../lights/Light';
import { WebGLLights } from './WebGLLights';
+import { WebGLExtensions } from './WebGLExtensions';
+import { WebGLCapabilities } from './WebGLCapabilities';
interface WebGLRenderState {
@@ -20,6 +22,8 @@ interface WebGLRenderState {
export class WebGLRenderStates {
+ constructor( extensions: WebGLExtensions, capabilities: WebGLCapabilities );
+
get( scene: Scene, camera: Camera ): WebGLRenderState;
dispose(): void;
| true |
Other | mrdoob | three.js | ccfd940ede6dca8a36e605ada4b27994155d939d.json | Move renderer extension check to internal API. | src/renderers/webgl/WebGLRenderStates.js | @@ -1,8 +1,8 @@
import { WebGLLights } from './WebGLLights.js';
-function WebGLRenderState() {
+function WebGLRenderState( extensions, capabilities ) {
- const lights = new WebGLLights();
+ const lights = new WebGLLights( extensions, capabilities );
const lightsArray = [];
const shadowsArray = [];
@@ -50,7 +50,7 @@ function WebGLRenderState() {
}
-function WebGLRenderStates() {
+function WebGLRenderStates( extensions, capabilities ) {
let renderStates = new WeakMap();
@@ -60,15 +60,15 @@ function WebGLRenderStates() {
if ( renderStates.has( scene ) === false ) {
- renderState = new WebGLRenderState();
+ renderState = new WebGLRenderState( extensions, capabilities );
renderStates.set( scene, new WeakMap() );
renderStates.get( scene ).set( camera, renderState );
} else {
if ( renderStates.get( scene ).has( camera ) === false ) {
- renderState = new WebGLRenderState();
+ renderState = new WebGLRenderState( extensions, capabilities );
renderStates.get( scene ).set( camera, renderState );
} else { | true |
Other | mrdoob | three.js | 9189e7ddd4394d9b733788321213675acc3c31d8.json | Remove Scene.dispose definition | src/scenes/Scene.d.ts | @@ -68,6 +68,5 @@ export class Scene extends Object3D {
) => void;
toJSON( meta?: any ): any;
- dispose(): void;
} | false |
Other | mrdoob | three.js | 96cf62c42dcb99838692d3566df0d22e3f03e22a.json | Adjust API. Select float or half via extensions. | examples/jsm/lights/RectAreaLightUniformsLib.js | @@ -2,6 +2,7 @@ import {
ClampToEdgeWrapping,
DataTexture,
HalfFloatType,
+ FloatType,
LinearFilter,
NearestFilter,
RGBAFormat,
@@ -25,7 +26,9 @@ import {
// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt
// code: https://github.com/selfshadow/ltc_code/
-// Convert float32 array value to float16 stored in uint16 array value.
+// toHalf(val) - Convert float32 array value to float16 stored in uint16 array value
+//
+// This function is duplicated from examples/jsm/loaders/RGBELoader.js
// Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410
var floatView = new Float32Array( 1 );
@@ -80,7 +83,8 @@ function toHalf ( val ) {
var RectAreaLightUniformsLib = {
- init: function () {
+ // renderer should be an instance of THREE.WebGLRenderer
+ init: function ( renderer ) {
// source: https://github.com/selfshadow/ltc_code/tree/master/fit/results/ltc.js
@@ -90,18 +94,35 @@ var RectAreaLightUniformsLib = {
// data textures
- const LTC_MAT_HALF_1 = new Uint16Array(LTC_MAT_1.length);
- LTC_MAT_1.forEach(function(x, index) {
- LTC_MAT_HALF_1[index] = toHalf(x);
- });
-
- const LTC_MAT_HALF_2 = new Uint16Array(LTC_MAT_2.length);
- LTC_MAT_2.forEach(function(x, index) {
- LTC_MAT_HALF_2[index] = toHalf(x);
- });
-
- var ltc_1 = new DataTexture( LTC_MAT_HALF_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
- var ltc_2 = new DataTexture( LTC_MAT_HALF_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+ var ltc_1 = null;
+ var ltc_2 = null;
+
+ if ( renderer.capabilities.isWebGL2 === true || renderer.extensions.get( 'OES_texture_float_linear' ) ) {
+
+ const ltc_float_1 = new Float32Array( LTC_MAT_1 );
+ const ltc_float_2 = new Float32Array( LTC_MAT_2 );
+
+ ltc_1 = new DataTexture( ltc_float_1, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+ ltc_2 = new DataTexture( ltc_float_2, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+
+ } else if ( renderer.extensions.get( 'OES_texture_half_float_linear' ) ) {
+
+ const ltc_half_1 = new Uint16Array( LTC_MAT_1.length );
+ LTC_MAT_1.forEach( function ( x, index ) {
+ ltc_half_1[index] = toHalf( x );
+ });
+
+ const ltc_half_2 = new Uint16Array( LTC_MAT_2.length );
+ LTC_MAT_2.forEach( function ( x, index ) {
+ ltc_half_2[index] = toHalf( x );
+ });
+
+ ltc_1 = new DataTexture( ltc_half_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+ ltc_2 = new DataTexture( ltc_half_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 );
+
+ } else {
+ throw 'missing webgl extension';
+ }
UniformsLib.LTC_1 = ltc_1;
UniformsLib.LTC_2 = ltc_2; | false |
Other | mrdoob | three.js | 8fac77159bd3160383bbb201dea613a6989f6aae.json | Remove WebGL extension check. Use new API. | examples/webgl_lights_rectarealight.html | @@ -46,23 +46,6 @@
renderer.outputEncoding = THREE.sRGBEncoding;
document.body.appendChild( renderer.domElement );
- // Check for float-RT support
- // TODO (abelnation): figure out fall-back for float textures
-
- if ( renderer.capabilities.isWebGL2 === false && ! renderer.extensions.get( 'OES_texture_float' ) ) {
-
- alert( 'OES_texture_float not supported' );
- throw 'missing webgl extension';
-
- }
-
- // if ( renderer.capabilities.isWebGL2 === false && ! renderer.extensions.get( 'OES_texture_float_linear' ) ) {
-
- // alert( 'OES_texture_float_linear not supported' );
- // throw 'missing webgl extension';
-
- // }
-
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 0, 20, 35 );
@@ -71,7 +54,7 @@
var ambient = new THREE.AmbientLight( 0xffffff, 0.1 );
scene.add( ambient );
- RectAreaLightUniformsLib.init();
+ RectAreaLightUniformsLib.init( renderer );
rectLight = new THREE.RectAreaLight( 0xffffff, 1, 10, 10 );
rectLight.position.set( 5, 5, 0 ); | false |
Other | mrdoob | three.js | 09ba9c45338f071cebae8e090dd47b494a9e2109.json | Change colors of spheres and boxes hands | examples/jsm/webxr/XRHandPrimitiveModel.js | @@ -31,8 +31,8 @@ class XRHandPrimitiveModel {
}
- var jointMaterial = new MeshStandardMaterial( { color: 0x000000, roughness: 0.2, metalness: 0.8 } );
- var tipMaterial = new MeshStandardMaterial( { color: 0x333333, roughness: 0.2, metalness: 0.8 } );
+ var jointMaterial = new MeshStandardMaterial( { color: 0xffffff, roughness: 1, metalness: 0 } );
+ var tipMaterial = new MeshStandardMaterial( { color: 0x999999, roughness: 1, metalness: 0 } );
const tipIndexes = [
XRHand.THUMB_PHALANX_TIP, | true |
Other | mrdoob | three.js | 09ba9c45338f071cebae8e090dd47b494a9e2109.json | Change colors of spheres and boxes hands | examples/webxr_vr_handinput_mesh.html | @@ -115,10 +115,10 @@
scene.add( hand1 );
handModels.left = [
- handModelFactory.createHandModel( hand1, "oculus", { model: "lowpoly" } ),
- handModelFactory.createHandModel( hand1, "oculus" ),
+ handModelFactory.createHandModel( hand1, "boxes" ),
handModelFactory.createHandModel( hand1, "spheres" ),
- handModelFactory.createHandModel( hand1, "boxes" )
+ handModelFactory.createHandModel( hand1, "oculus", { model: "lowpoly" } ),
+ handModelFactory.createHandModel( hand1, "oculus" )
];
handModels.left.forEach( model => {
@@ -154,10 +154,10 @@
scene.add( hand2 );
handModels.right = [
- handModelFactory.createHandModel( hand2, "oculus", { model: "lowpoly" } ),
- handModelFactory.createHandModel( hand2, "oculus" ),
+ handModelFactory.createHandModel( hand2, "boxes" ),
handModelFactory.createHandModel( hand2, "spheres" ),
- handModelFactory.createHandModel( hand2, "boxes" )
+ handModelFactory.createHandModel( hand2, "oculus", { model: "lowpoly" } ),
+ handModelFactory.createHandModel( hand2, "oculus" )
];
handModels.right.forEach( model => {
| true |
Other | mrdoob | three.js | 2cd4f2a3d376c82dad940a00d30797013b574d46.json | Update handinput_mesh example | examples/webxr_vr_handinput_mesh.html | @@ -103,7 +103,6 @@
hand1 = renderer.xr.getHand( 0 );
hand1.add( handModelFactory.createHandModel( hand1 ) );
-
scene.add( hand1 );
// Hand 2
@@ -113,7 +112,7 @@
scene.add( controllerGrip2 );
hand2 = renderer.xr.getHand( 1 );
- hand2.add( handModelFactory.createHandModel( hand2 ) );
+ hand2.add( handModelFactory.createHandModel( hand2, "spheres" ) );
scene.add( hand2 );
// | false |
Other | mrdoob | three.js | 2e2d7e41a10c36ff72b87cf556f3e4a0ad36d5fa.json | Add ZSTDDecoder, add ZSTD support to KTX2Loader. | examples/jsm/libs/zstddec.module.js | @@ -0,0 +1,115 @@
+/**
+ * @author Don McCurdy / https://www.donmccurdy.com
+ */
+
+let init, instance, heap;
+
+const importObject = {
+
+ env: {
+
+ emscripten_notify_memory_growth: function ( index ) {
+
+ heap = new Uint8Array( instance.exports.memory.buffer );
+
+ }
+
+ }
+
+}
+
+/**
+ * ZSTD (Zstandard) decoder.
+ *
+ * Compiled from https://github.com/facebook/zstd/tree/dev/contrib/single_file_libs, with the
+ * following steps:
+ *
+ * ```
+ * ./combine.sh -r ../../lib -o zstddeclib.c zstddeclib-in.c
+ * emcc zstddeclib.c -O2 -s EXPORTED_FUNCTIONS="['_ZSTD_decompress', '_ZSTD_findDecompressedSize', '_ZSTD_isError']" -s ALLOW_MEMORY_GROWTH=1 -o zstddec.wasm
+ * base64 zstddec.wasm > zstddec.txt
+ * ```
+ *
+ * The base64 string written to `zstddec.txt` is embedded as the `wasm` variable at the bottom
+ * of this file. The rest of this file is written by hand, in order to avoid an additional JS
+ * wrapper generated by Emscripten.
+ */
+export class ZSTDDecoder {
+
+ init () {
+
+ if ( ! init ) {
+
+ init = fetch( 'data:application/wasm;base64,' + wasm )
+ .then( ( response ) => response.arrayBuffer() )
+ .then( ( arrayBuffer ) => WebAssembly.instantiate( arrayBuffer, importObject ) )
+ .then( ( result ) => {
+
+ instance = result.instance;
+
+ importObject.env.emscripten_notify_memory_growth( 0 ); // initialize heap.
+
+ });
+
+ }
+
+ return init;
+
+ }
+
+ decode ( array, uncompressedSize = 0 ) {
+
+ // Write compressed data into WASM memory.
+ const compressedSize = array.byteLength;
+ const compressedPtr = instance.exports.malloc( compressedSize );
+ heap.set( array, compressedPtr );
+
+ // Decompress into WASM memory.
+ uncompressedSize = uncompressedSize || Number( instance.exports.ZSTD_findDecompressedSize( compressedPtr, compressedSize ) );
+ const uncompressedPtr = instance.exports.malloc( uncompressedSize );
+ const actualSize = instance.exports.ZSTD_decompress( uncompressedPtr, uncompressedSize, compressedPtr, compressedSize );
+
+ // Read decompressed data and free WASM memory.
+ const dec = heap.slice( uncompressedPtr, uncompressedPtr + actualSize );
+ instance.exports.free( compressedPtr );
+ instance.exports.free( uncompressedPtr );
+
+ return dec;
+
+ }
+
+}
+
+/**
+ * BSD License
+ *
+ * For Zstandard software
+ *
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name Facebook nor the names of its contributors may be used to
+ * endorse or promote products derived from this software without specific
+ * prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+const wasm = 'AGFzbQEAAAABbw9gAn9/AGAFf39/f38Bf2ABfwF/YAN/f38Bf2AEf39/fwF/YAF/AGADf39/AGAGf39/f39/AX9gAAF/YAAAYAZ/f39/f38AYAh/f39/f39/fwF/YA1/f39/f39/f39/f39/AX9gAX8BfmACf38BfgInAQNlbnYfZW1zY3JpcHRlbl9ub3RpZnlfbWVtb3J5X2dyb3d0aAAFAy0sCQEHBAQCBAEBAQEBBwMFBA4GBwMBBg0BBAMECwoMCAIFAgMDAwYCAAgCBQIEBQFwAQICBQQBAIACBg8CfwFBgKPAAgt/AEH8IgsHxgEOBm1lbW9yeQIABm1hbGxvYwAgBGZyZWUAIQxaU1REX2lzRXJyb3IABhlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplABEPWlNURF9kZWNvbXByZXNzABkGX3N0YXJ0AAEQX19lcnJub19sb2NhdGlvbgAfCHNldFRocmV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AKAKM4QEgACgCnOIBIAUQHiIEQYh/Sw0AIABBmCBqIABBCGogB0EEdkEDcUEfQQggASAEaiABIARBiX9JGyIBIAMgAWtBgAtBgAxBgBcgACgCjOEBIAAoApziASAFEB4iBEGIf0sNACAAQaAwaiAAQQRqIAdBAnZBA3FBNEEJIAEgBGogASAEQYl/SRsiASADIAFrQYANQeAOQZAZIAAoAozhASAAKAKc4gEgBRAeIgNBiH9LDQAgASADaiACayEGCyAGC/oGAQd/Qbp/IQsCQCACKAIAIgkgAigCBGoiDCABIABrSw0AQWwhCyAJIAQgAygCACIIa0sNACABQWBqIQQgCCAJaiENIAAgCWohASACKAIIIQ4CQCAJQQdMBEAgCUEBSA0BA0AgACAILQAAOgAAIAhBAWohCCAAQQFqIgAgAUkNAAsMAQsgASAETQRAA0AgACAIKQAANwAAIAAgCCkACDcACCAIQRBqIQggAEEQaiIAIAFJDQAMAgALAAsgBCAATwRAIAAhCSAIIQoDQCAJIAopAAA3AAAgCSAKKQAINwAIIApBEGohCiAJQRBqIgkgBEkNAAsgCCAEIABraiEIIAQhAAsgASAATQ0AA0AgACAILQAAOgAAIAhBAWohCCAAQQFqIgAgAUcNAAsLIAEgDmshACADIA02AgACQAJAIAIoAggiCCABIAVrSwRAIAggASAGa0sNAyAHIAAgBWsiAGoiCCACKAIEIglqIAdNBEAgASAIIAkQJRoMAwsgASAIQQAgAGsQJSEIIAIgACAJaiIKNgIEIAggAGshAQwBCyACKAIEIQogACEFCyABIApqIQkgCkEHTARAIApBAUgNAQNAIAEgBS0AADoAACAFQQFqIQUgAUEBaiIBIAlJDQALDAELAkAgASAFayIAQQdNBEAgASAFLQAAOgAAIAEgBS0AAToAASABIAUtAAI6AAIgASAFLQADOgADIAEgBSAAQQJ0IgBBwB5qKAIAaiIIKAAANgAEIAggAEHgHmooAgBrIQUMAQsgASAFKQAANwAACyABQQhqIQggBUEIaiEAIAkgBE0EQCAIIApqIQEgCCAAa0EPTARAA0AgCCAAKQAANwAAIABBCGohACA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QAAAEBQAAACAAAAUHAAAAIAAABQgAAAAgAAAFCgAAACAAAAULAAAAAAAABg4AAAAAAAAGEQAAAAAAAAYUAAAAAAAABhcAAAAAAAAGGgAAAAAAAAYdAAAAAAAABiAAAAAAABAGAwABAAAADwYDgAAAAAAOBgNAAAAAAA0GAyAAAAAADAYDEAAAAAALBgMIAAAAAAoGAwQAQaQdC9kBAQAAAAMAAAAHAAAADwAAAB8AAAA/AAAAfwAAAP8AAAD/AQAA/wMAAP8HAAD/DwAA/x8AAP8/AAD/fwAA//8AAP//AQD//wMA//8HAP//DwD//x8A//8/AP//fwD///8A////Af///wP///8H////D////x////8/////fwAAAAABAAAAAgAAAAQAAAAAAAAAAgAAAAQAAAAIAAAAAAAAAAEAAAACAAAAAQAAAAQAAAAEAAAABAAAAAQAAAAIAAAACAAAAAgAAAAHAAAACAAAAAkAAAAKAAAACwBBgCMLAyASUA==' | true |
Other | mrdoob | three.js | 2e2d7e41a10c36ff72b87cf556f3e4a0ad36d5fa.json | Add ZSTDDecoder, add ZSTD support to KTX2Loader. | examples/jsm/loaders/KTX2Loader.js | @@ -40,6 +40,8 @@ import {
sRGBEncoding,
} from '../../../build/three.module.js';
+import { ZSTDDecoder } from '../libs/zstddec.module.js';
+
// Data Format Descriptor (DFD) constants.
const DFDModel = {
@@ -206,6 +208,9 @@ class KTX2Container {
this.basisModule = basisModule;
this.arrayBuffer = arrayBuffer;
+ this.zstd = new ZSTDDecoder();
+ this.zstd.init();
+
this.mipmaps = null;
this.transcodedFormat = null;
@@ -426,7 +431,9 @@ class KTX2Container {
}
- initMipmaps( transcoder, config ) {
+ async initMipmaps( transcoder, config ) {
+
+ await this.zstd.init();
var TranscodeTarget = this.basisModule.TranscodeTarget;
var TextureFormat = this.basisModule.TextureFormat;
@@ -515,7 +522,8 @@ class KTX2Container {
var numImagesInLevel = 1; // TODO(donmccurdy): Support cubemaps, arrays and 3D.
var imageOffsetInLevel = 0;
var imageInfo = new ImageInfo( texFormat, levelWidth, levelHeight, level );
- var levelImageByteLength = imageInfo.numBlocksX * imageInfo.numBlocksY * this.dfd.bytesPlane0;
+ var levelByteLength = this.levels[ level ].byteLength;
+ var levelUncompressedByteLength = this.levels[ level ].uncompressedByteLength;
for ( var imageIndex = 0; imageIndex < numImagesInLevel; imageIndex ++ ) {
@@ -528,11 +536,17 @@ class KTX2Container {
imageInfo.flags = 0;
imageInfo.rgbByteOffset = 0;
- imageInfo.rgbByteLength = levelImageByteLength;
+ imageInfo.rgbByteLength = levelUncompressedByteLength;
imageInfo.alphaByteOffset = 0;
imageInfo.alphaByteLength = 0;
- encodedData = new Uint8Array( this.arrayBuffer, this.levels[ level ].byteOffset + imageOffsetInLevel, levelImageByteLength );
+ encodedData = new Uint8Array( this.arrayBuffer, this.levels[ level ].byteOffset + imageOffsetInLevel, levelByteLength );
+
+ if ( this.header.supercompressionScheme === 2 /* ZSTD */ ) {
+
+ encodedData = this.zstd.decode( encodedData, levelUncompressedByteLength );
+
+ }
result = transcoder.transcodeImage( targetFormat, encodedData, imageInfo, 0, hasAlpha, isVideo );
@@ -569,19 +583,13 @@ class KTX2Container {
result.transcodedImage.delete();
mipmaps.push( { data: levelData, width: levelWidth, height: levelHeight } );
- imageOffsetInLevel += levelImageByteLength;
+ imageOffsetInLevel += levelByteLength;
}
}
- return new Promise( function ( resolve, reject ) {
-
- scope.mipmaps = mipmaps;
-
- resolve();
-
- } );
+ scope.mipmaps = mipmaps;
}
| true |
Other | mrdoob | three.js | 776bd5eb4c05604b28d4653958dbe778c482d003.json | Remove unused code on handtracking examples | examples/webxr_vr_handtracking.html | @@ -26,10 +26,7 @@
var controller1, controller2;
var controllerGrip1, controllerGrip2;
- var raycaster, intersected = [];
- var tempMatrix = new THREE.Matrix4();
-
- var controls, group;
+ var controls;
var grabbing = false;
var scaling = {
@@ -82,45 +79,6 @@
light.shadow.mapSize.set( 4096, 4096 );
scene.add( light );
- group = new THREE.Group();
- scene.add( group );
- /*
- var geometries = [
- new THREE.BoxBufferGeometry( 0.2, 0.2, 0.2 ),
- new THREE.ConeBufferGeometry( 0.2, 0.2, 64 ),
- new THREE.CylinderBufferGeometry( 0.2, 0.2, 0.2, 64 ),
- new THREE.IcosahedronBufferGeometry( 0.2, 3 ),
- new THREE.TorusBufferGeometry( 0.2, 0.04, 64, 32 )
- ];
-
- for ( var i = 0; i < 50; i ++ ) {
-
- var geometry = geometries[ Math.floor( Math.random() * geometries.length ) ];
- var material = new THREE.MeshStandardMaterial( {
- color: Math.random() * 0xffffff,
- roughness: 0.7,
- metalness: 0.0
- } );
-
- var object = new THREE.Mesh( geometry, material );
-
- object.position.x = Math.random() * 4 - 2;
- object.position.y = Math.random() * 2;
- object.position.z = Math.random() * 4 - 2;
-
- object.rotation.x = Math.random() * 2 * Math.PI;
- object.rotation.y = Math.random() * 2 * Math.PI;
- object.rotation.z = Math.random() * 2 * Math.PI;
-
- object.scale.setScalar( Math.random() + 0.5 );
-
- object.castShadow = true;
- object.receiveShadow = true;
-
- group.add( object );
-
- }
-*/
//
renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -183,8 +141,6 @@
controller1.add( line.clone() );
controller2.add( line.clone() );
- raycaster = new THREE.Raycaster();
-
//
window.addEventListener( 'resize', onWindowResize, false ); | true |
Other | mrdoob | three.js | 776bd5eb4c05604b28d4653958dbe778c482d003.json | Remove unused code on handtracking examples | examples/webxr_vr_handtracking_simple.html | @@ -26,7 +26,7 @@
var controller1, controller2;
var controllerGrip1, controllerGrip2;
- var controls, group;
+ var controls;
init();
animate();
@@ -69,45 +69,6 @@
light.shadow.mapSize.set( 4096, 4096 );
scene.add( light );
- group = new THREE.Group();
- scene.add( group );
- /*
- var geometries = [
- new THREE.BoxBufferGeometry( 0.2, 0.2, 0.2 ),
- new THREE.ConeBufferGeometry( 0.2, 0.2, 64 ),
- new THREE.CylinderBufferGeometry( 0.2, 0.2, 0.2, 64 ),
- new THREE.IcosahedronBufferGeometry( 0.2, 3 ),
- new THREE.TorusBufferGeometry( 0.2, 0.04, 64, 32 )
- ];
-
- for ( var i = 0; i < 50; i ++ ) {
-
- var geometry = geometries[ Math.floor( Math.random() * geometries.length ) ];
- var material = new THREE.MeshStandardMaterial( {
- color: Math.random() * 0xffffff,
- roughness: 0.7,
- metalness: 0.0
- } );
-
- var object = new THREE.Mesh( geometry, material );
-
- object.position.x = Math.random() * 4 - 2;
- object.position.y = Math.random() * 2;
- object.position.z = Math.random() * 4 - 2;
-
- object.rotation.x = Math.random() * 2 * Math.PI;
- object.rotation.y = Math.random() * 2 * Math.PI;
- object.rotation.z = Math.random() * 2 * Math.PI;
-
- object.scale.setScalar( Math.random() + 0.5 );
-
- object.castShadow = true;
- object.receiveShadow = true;
-
- group.add( object );
-
- }
-*/
//
renderer = new THREE.WebGLRenderer( { antialias: true } );
@@ -124,13 +85,9 @@
// controllers
controller1 = renderer.xr.getController( 0 );
- controller1.addEventListener( 'selectstart', onSelectStart );
- controller1.addEventListener( 'selectend', onSelectEnd );
scene.add( controller1 );
controller2 = renderer.xr.getController( 1 );
- controller2.addEventListener( 'selectstart', onSelectStart );
- controller2.addEventListener( 'selectend', onSelectEnd );
scene.add( controller2 );
var controllerModelFactory = new XRControllerModelFactory();
@@ -166,8 +123,6 @@
controller1.add( line.clone() );
controller2.add( line.clone() );
- raycaster = new THREE.Raycaster();
-
//
window.addEventListener( 'resize', onWindowResize, false ); | true |
Other | mrdoob | three.js | 331a19ccc3518a2ab46357d7af0ecbb0b0375c98.json | Fix radious sphere on pinch | src/renderers/webxr/WebXRHandController.js | @@ -1,122 +0,0 @@
-import { Object3D } from '../../core/Object3D.js';
-import { SphereBufferGeometry } from '../../geometries/SphereGeometry.js';
-import { MeshStandardMaterial } from '../../materials/MeshStandardMaterial.js';
-import { Mesh } from '../../objects/Mesh.js';
-
-function XRHandModel( controller ) {
-
- Object3D.call( this );
-
- this.controller = controller;
- this.envMap = null;
-
- if ( window.XRHand ) {
-
- var geometry = new SphereBufferGeometry( 1, 10, 10 );
- var jointMaterial = new MeshStandardMaterial( { color: 0x000000, roughness: 0.2, metalness: 0.8 } );
- var tipMaterial = new MeshStandardMaterial( { color: 0x333333, roughness: 0.2, metalness: 0.8 } );
-
- const tipIndexes = [
- XRHand.THUMB_PHALANX_TIP,
- XRHand.INDEX_PHALANX_TIP,
- XRHand.MIDDLE_PHALANX_TIP,
- XRHand.RING_PHALANX_TIP,
- XRHand.LITTLE_PHALANX_TIP
- ];
- for ( let i = 0; i <= XRHand.LITTLE_PHALANX_TIP; i ++ ) {
-
- var cube = new Mesh( geometry, tipIndexes.indexOf( i ) !== - 1 ? tipMaterial : jointMaterial );
- cube.castShadow = true;
- this.add( cube );
-
- }
-
- }
-
-}
-
-XRHandModel.prototype = Object.assign( Object.create( Object3D.prototype ), {
-
- constructor: XRHandModel,
-
- updateMatrixWorld: function ( force ) {
-
- Object3D.prototype.updateMatrixWorld.call( this, force );
-
- this.updateMesh();
-
- },
-
- updateMesh: function () {
-
- const defaultRadius = 0.008;
-
- // XR Joints
- const XRJoints = this.controller.joints;
- for ( var i = 0; i < this.children.length; i ++ ) {
-
- const jointMesh = this.children[ i ];
- const XRJoint = XRJoints[ i ];
-
- if ( XRJoint.visible ) {
-
- jointMesh.position.copy( XRJoint.position );
- jointMesh.quaternion.copy( XRJoint.quaternion );
- jointMesh.scale.setScalar( XRJoint.jointRadius || defaultRadius );
-
- }
-
- jointMesh.visible = XRJoint.visible;
-
- }
-
- }
-} );
-
-
-var XRHandModelFactory = ( function () {
-
- function XRHandModelFactory() {}
-
- XRHandModelFactory.prototype = {
-
- constructor: XRHandModelFactory,
-
- createHandModel: function ( controller ) {
-
- const handModel = new XRHandModel( controller );
- let scene = null;
-
- controller.addEventListener( 'connected', ( event ) => {
-
- const xrInputSource = event.data;
- console.log( "Connected!", xrInputSource );
-
- if ( xrInputSource.hand ) {
-
- handModel.xrInputSource = xrInputSource;
-
- }
-
- } );
-
- controller.addEventListener( 'disconnected', () => {
-
- handModel.motionController = null;
- handModel.remove( scene );
- scene = null;
-
- } );
-
- return handModel;
-
- }
-
- };
-
- return XRHandModelFactory;
-
-} )();
-
-
-export { XRHandModelFactory }; | false |
Other | mrdoob | three.js | ac42bb21815b316c93f05c8f6f9dfe44554013dc.json | Introduce joints in WebXRController for hands | src/renderers/webxr/WebXRController.js | @@ -24,6 +24,26 @@ Object.assign( WebXRController.prototype, {
this._hand.matrixAutoUpdate = false;
this._hand.visible = false;
+ this._hand.joints = [];
+ this._hand.inputState = { pinching: false };
+
+ if ( window.XRHand ) {
+
+ for ( let i = 0; i <= XRHand.LITTLE_PHALANX_TIP; i ++ ) {
+
+ // The transform of this joint will be updated with the joint pose on each frame
+ let joint = new Group();
+ joint.matrixAutoUpdate = false;
+ joint.visible = false;
+ this._hand.joints.push( joint );
+ // ??
+ this._hand.add( joint );
+
+
+ }
+
+ }
+
}
return this._hand;
@@ -122,6 +142,54 @@ Object.assign( WebXRController.prototype, {
if ( inputSource.hand ) {
+ handPose = true;
+ for ( let i = 0; i <= XRHand.LITTLE_PHALANX_TIP; i ++ ) {
+
+ if ( inputSource.hand[ i ] ) {
+
+ // Update the joints groups with the XRJoint poses
+ let jointPose = frame.getJointPose( inputSource.hand[ i ], referenceSpace );
+ const joint = hand.joints[ i ];
+
+ if ( jointPose !== null ) {
+
+ joint.matrix.fromArray( jointPose.transform.matrix );
+ joint.matrix.decompose( joint.position, joint.rotation, joint.scale );
+ joint.jointRadius = jointPose.radius;
+
+ }
+
+ joint.visible = jointPose !== null;
+
+ // Custom events
+
+ // Check pinch
+ const indexTip = hand.joints[ XRHand.INDEX_PHALANX_TIP ];
+ const thumbTip = hand.joints[ XRHand.THUMB_PHALANX_TIP ];
+ const distance = indexTip.position.distanceTo( thumbTip.position );
+ const distanceToPinch = 0.02;
+ if ( hand.inputState.pinching && distance > distanceToPinch ) {
+
+ hand.inputState.pinching = false;
+ this.dispatchEvent( {
+ type: "pinchend",
+ target: this
+ } );
+
+ } else if ( ! hand.inputState.pinching && distance <= distanceToPinch ) {
+
+ hand.inputState.pinching = true;
+ this.dispatchEvent( {
+ type: "pinchstart",
+ target: this
+ } );
+
+ }
+
+ }
+
+ }
+
} else {
if ( targetRay !== null ) { | false |
Other | mrdoob | three.js | 7dd52e4a5a3fc3aa68c3d69078e780c9b792d881.json | remove log in WebXRManager | src/renderers/webxr/WebXRManager.js | @@ -464,7 +464,6 @@ function WebXRManager( renderer, gl ) {
//
const inputSources = session.inputSources;
- //console.log(inputSources);
for ( let i = 0; i < controllers.length; i ++ ) {
| false |
Other | mrdoob | three.js | e1627bac61539417c4445f7c97986d60647f4213.json | Update package.json (#22218) | package-lock.json | @@ -1,27 +1,27 @@
{
"name": "three",
- "version": "0.130.1",
+ "version": "0.131.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "three",
- "version": "0.130.1",
+ "version": "0.131.0",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.14.8",
"@babel/eslint-parser": "^7.14.7",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/preset-env": "^7.14.8",
"@rollup/plugin-babel": "^5.3.0",
- "@rollup/plugin-node-resolve": "^13.0.2",
+ "@rollup/plugin-node-resolve": "^13.0.4",
"chalk": "^4.1.1",
"concurrently": "^6.2.0",
"eslint": "^7.31.0",
"eslint-config-mdcs": "^5.0.0",
"eslint-plugin-html": "^6.1.2",
"glob": "^7.1.7",
- "rollup": "^2.53.3",
+ "rollup": "^2.55.1",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.5.2",
@@ -1786,9 +1786,9 @@
}
},
"node_modules/@rollup/plugin-node-resolve": {
- "version": "13.0.2",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.2.tgz",
- "integrity": "sha512-hv+eAMcA2hQ7qvPVcXbtIyc0dtue4jMyA2sCW4IMkrmh+SeDDEHg1MXTv65VPpKdtjvWzN3+4mHAEl4rT+zgzQ==",
+ "version": "13.0.4",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz",
+ "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
@@ -5425,9 +5425,9 @@
}
},
"node_modules/rollup": {
- "version": "2.53.3",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.53.3.tgz",
- "integrity": "sha512-79QIGP5DXz5ZHYnCPi3tLz+elOQi6gudp9YINdaJdjG0Yddubo6JRFUM//qCZ0Bap/GJrsUoEBVdSOc4AkMlRA==",
+ "version": "2.55.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.55.1.tgz",
+ "integrity": "sha512-1P9w5fpb6b4qroePh8vHKGIvPNxwoCQhjJpIqfZGHLKpZ0xcU2/XBmFxFbc9697/6bmHpmFTLk5R1dAQhFSo0g==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@@ -7803,9 +7803,9 @@
}
},
"@rollup/plugin-node-resolve": {
- "version": "13.0.2",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.2.tgz",
- "integrity": "sha512-hv+eAMcA2hQ7qvPVcXbtIyc0dtue4jMyA2sCW4IMkrmh+SeDDEHg1MXTv65VPpKdtjvWzN3+4mHAEl4rT+zgzQ==",
+ "version": "13.0.4",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz",
+ "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==",
"dev": true,
"requires": {
"@rollup/pluginutils": "^3.1.0",
@@ -10745,9 +10745,9 @@
}
},
"rollup": {
- "version": "2.53.3",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.53.3.tgz",
- "integrity": "sha512-79QIGP5DXz5ZHYnCPi3tLz+elOQi6gudp9YINdaJdjG0Yddubo6JRFUM//qCZ0Bap/GJrsUoEBVdSOc4AkMlRA==",
+ "version": "2.55.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.55.1.tgz",
+ "integrity": "sha512-1P9w5fpb6b4qroePh8vHKGIvPNxwoCQhjJpIqfZGHLKpZ0xcU2/XBmFxFbc9697/6bmHpmFTLk5R1dAQhFSo0g==",
"dev": true,
"requires": {
"fsevents": "~2.3.2" | true |
Other | mrdoob | three.js | e1627bac61539417c4445f7c97986d60647f4213.json | Update package.json (#22218) | package.json | @@ -108,14 +108,14 @@
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/preset-env": "^7.14.8",
"@rollup/plugin-babel": "^5.3.0",
- "@rollup/plugin-node-resolve": "^13.0.2",
+ "@rollup/plugin-node-resolve": "^13.0.4",
"chalk": "^4.1.1",
"concurrently": "^6.2.0",
"eslint": "^7.31.0",
"eslint-config-mdcs": "^5.0.0",
"eslint-plugin-html": "^6.1.2",
"glob": "^7.1.7",
- "rollup": "^2.53.3",
+ "rollup": "^2.55.1",
"rollup-plugin-filesize": "^9.1.1",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.5.2", | true |
Other | mrdoob | three.js | ee1812f926718cdd159943c5e5ef14fc629e5ddc.json | Add support for foveation (#22162) | src/renderers/webxr/WebXRManager.js | @@ -467,6 +467,40 @@ class WebXRManager extends EventDispatcher {
};
+ this.getFoveation = function () {
+
+ if ( glProjLayer !== null ) {
+
+ return glProjLayer.fixedFoveation;
+
+ }
+
+ if ( glBaseLayer !== null ) {
+
+ return glBaseLayer.fixedFoveation;
+
+ }
+
+ return undefined;
+
+ };
+
+ this.setFoveation = function ( foveation ) {
+
+ if ( glProjLayer !== null ) {
+
+ glProjLayer.fixedFoveation = foveation;
+
+ }
+
+ if ( glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined ) {
+
+ glBaseLayer.fixedFoveation = foveation;
+
+ }
+
+ };
+
// Animation Loop
let onAnimationFrameCallback = null; | false |
Other | mrdoob | three.js | df5cbb6f40897f82bcdab2ae0459290120c6a982.json | Fix initial material configuration | examples/webgl_materials_envmaps_hdr_nodes.html | @@ -101,16 +101,16 @@
let material = new THREE.MeshStandardMaterial();
material.color = new THREE.Color( 0xffffff );
- material.roughness = params.metalness;
- material.metalness = params.roguhness;
+ material.roughness = params.roughness;
+ material.metalness = params.metalness;
torusMesh = new THREE.Mesh( geometry, material );
scene.add( torusMesh );
material = new MeshStandardNodeMaterial();
material.color = new THREE.Color( 0xffffff );
- material.roughness = params.metalness;
- material.metalness = params.roguhness;
+ material.roughness = params.roughness;
+ material.metalness = params.metalness;
torusMeshNode = new THREE.Mesh( geometry, material );
scene.add( torusMeshNode ); | false |
Other | mrdoob | three.js | e432081bc1adbff01c8ad7ba32eeb37c89a74eb7.json | fix code style(2) | examples/jsm/renderers/nodes/accessors/CameraNode.js | @@ -69,13 +69,13 @@ class CameraNode extends Node {
if ( scope === CameraNode.PROJECTION || scope === CameraNode.VIEW ) {
- if ( !inputNode || !inputNode.isMatrix4Node !== true ) {
+ if ( inputNode === undefined || !inputNode.isMatrix4Node !== true ) {
inputNode = new Matrix4Node( null );
}
- } else if ( !inputNode || !inputNode.isVector3Node !== true ) {
+ } else if ( inputNode === undefined || !inputNode.isVector3Node !== true ) {
inputNode = new Vector3Node();
| false |
Other | mrdoob | three.js | d0ca03dc5c3060182693ca2c53b0c1a1005a4ff3.json | fix code style | examples/jsm/renderers/nodes/accessors/CameraNode.js | @@ -69,13 +69,13 @@ class CameraNode extends Node {
if ( scope === CameraNode.PROJECTION || scope === CameraNode.VIEW ) {
- if ( !inputNode || !inputNode.isMatrix4Node ) {
+ if ( !inputNode || !inputNode.isMatrix4Node !== true ) {
inputNode = new Matrix4Node( null );
}
- } else if ( !inputNode || !inputNode.isVector3Node ) {
+ } else if ( !inputNode || !inputNode.isVector3Node !== true ) {
inputNode = new Vector3Node();
| false |
Other | mrdoob | three.js | b12d21696ae12736263dce60200c1fc33e25a128.json | Use HTTPS instead of HTTP. | README.md | @@ -11,8 +11,8 @@ three.js
The aim of the project is to create an easy to use, lightweight, 3D library with a default WebGL renderer. The library also provides Canvas 2D, SVG and CSS3D renderers in the examples.
-[Examples](http://threejs.org/examples/) —
-[Documentation](http://threejs.org/docs/) —
+[Examples](https://threejs.org/examples/) —
+[Documentation](https://threejs.org/docs/) —
[Wiki](https://github.com/mrdoob/three.js/wiki) —
[Migrating](https://github.com/mrdoob/three.js/wiki/Migration-Guide) —
[Questions](http://stackoverflow.com/questions/tagged/three.js) — | true |
Other | mrdoob | three.js | b12d21696ae12736263dce60200c1fc33e25a128.json | Use HTTPS instead of HTTP. | docs/index.html | @@ -13,7 +13,7 @@
<div id="panel">
<div id="header">
- <h1><a href="http://threejs.org">three.js</a></h1>
+ <h1><a href="https://threejs.org">three.js</a></h1>
<div id="sections">
<span class="selected">docs</span> | true |
Other | mrdoob | three.js | b12d21696ae12736263dce60200c1fc33e25a128.json | Use HTTPS instead of HTTP. | editor/js/Menubar.Help.js | @@ -47,7 +47,7 @@ function MenubarHelp( editor ) {
option.setTextContent( strings.getKey( 'menubar/help/about' ) );
option.onClick( function () {
- window.open( 'http://threejs.org', '_blank' );
+ window.open( 'https://threejs.org', '_blank' );
} );
options.add( option ); | true |
Other | mrdoob | three.js | b12d21696ae12736263dce60200c1fc33e25a128.json | Use HTTPS instead of HTTP. | examples/webgl_loader_texture_lottie.html | @@ -9,7 +9,7 @@
<body>
<div id="info">
- <a href="http://threejs.org" target="_blank" rel="noopener">three.js</a> webgl - lottie<br/></br>
+ <a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgl - lottie<br/></br>
<input id="scrubber" type="range" value="0" style="width: 300px">
</div>
| true |
Other | mrdoob | three.js | 5922e9215114dc533fa83685dc29532c3c89452e.json | use PositionNode for colors | examples/webgpu_compute.html | @@ -21,7 +21,7 @@
import WebGPUUniformsGroup from './jsm/renderers/webgpu/WebGPUUniformsGroup.js';
import { Vector2Uniform } from './jsm/renderers/webgpu/WebGPUUniform.js';
- import AttributeNode from './jsm/renderers/nodes/core/AttributeNode.js';
+ import PositionNode from './jsm/renderers/nodes/accessors/PositionNode.js';
import ColorNode from './jsm/renderers/nodes/inputs/ColorNode.js';
import OperatorNode from './jsm/renderers/nodes/math/OperatorNode.js';
@@ -156,10 +156,8 @@
'position', particleBuffer.attribute
);
- pointsGeometry.setAttribute( 'color', pointsGeometry.getAttribute( 'position' ) );
-
const pointsMaterial = new THREE.PointsMaterial();
- pointsMaterial.colorNode = new OperatorNode( '+', new AttributeNode( 'vec3', 'color' ), new ColorNode( new THREE.Color( 0x0000FF ) ) );
+ pointsMaterial.colorNode = new OperatorNode( '+', new PositionNode(), new ColorNode( new THREE.Color( 0x0000FF ) ) );
const mesh = new THREE.Points( pointsGeometry, pointsMaterial );
scene.add( mesh ); | false |
Other | mrdoob | three.js | 39fc61d2c4aa2c7db9a0ede6aee1fd4264838bde.json | remove old css prefixes | examples/js/renderers/CSS2DRenderer.js | @@ -92,13 +92,8 @@ THREE.CSS2DRenderer = function () {
vector.applyMatrix4( viewProjectionMatrix );
var element = object.element;
- var style = 'translate(-50%,-50%) translate(' + ( vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - vector.y * _heightHalf + _heightHalf ) + 'px)';
-
- element.style.WebkitTransform = style;
- element.style.MozTransform = style;
- element.style.oTransform = style;
- element.style.transform = style;
+ element.style.transform = 'translate(-50%,-50%) translate(' + ( vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - vector.y * _heightHalf + _heightHalf ) + 'px)';
element.style.display = ( object.visible && vector.z >= - 1 && vector.z <= 1 ) ? '' : 'none';
var objectData = { | true |
Other | mrdoob | three.js | 39fc61d2c4aa2c7db9a0ede6aee1fd4264838bde.json | remove old css prefixes | examples/js/renderers/CSS3DRenderer.js | @@ -74,7 +74,6 @@ THREE.CSS3DRenderer = function () {
var cameraElement = document.createElement( 'div' );
- cameraElement.style.WebkitTransformStyle = 'preserve-3d';
cameraElement.style.transformStyle = 'preserve-3d';
cameraElement.style.pointerEvents = 'none';
@@ -196,7 +195,6 @@ THREE.CSS3DRenderer = function () {
if ( cachedObject === undefined || cachedObject.style !== style ) {
- element.style.WebkitTransform = style;
element.style.transform = style;
var objectData = { style: style };
@@ -230,18 +228,7 @@ THREE.CSS3DRenderer = function () {
if ( cache.camera.fov !== fov ) {
- if ( camera.isPerspectiveCamera ) {
-
- domElement.style.WebkitPerspective = fov + 'px';
- domElement.style.perspective = fov + 'px';
-
- } else {
-
- domElement.style.WebkitPerspective = '';
- domElement.style.perspective = '';
-
- }
-
+ domElement.style.perspective = camera.isPerspectiveCamera ? fov + 'px' : '';
cache.camera.fov = fov;
}
@@ -265,7 +252,6 @@ THREE.CSS3DRenderer = function () {
if ( cache.camera.style !== style ) {
- cameraElement.style.WebkitTransform = style;
cameraElement.style.transform = style;
cache.camera.style = style; | true |
Other | mrdoob | three.js | 39fc61d2c4aa2c7db9a0ede6aee1fd4264838bde.json | remove old css prefixes | examples/jsm/renderers/CSS2DRenderer.js | @@ -98,13 +98,8 @@ var CSS2DRenderer = function () {
vector.applyMatrix4( viewProjectionMatrix );
var element = object.element;
- var style = 'translate(-50%,-50%) translate(' + ( vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - vector.y * _heightHalf + _heightHalf ) + 'px)';
-
- element.style.WebkitTransform = style;
- element.style.MozTransform = style;
- element.style.oTransform = style;
- element.style.transform = style;
+ element.style.transform = 'translate(-50%,-50%) translate(' + ( vector.x * _widthHalf + _widthHalf ) + 'px,' + ( - vector.y * _heightHalf + _heightHalf ) + 'px)';
element.style.display = ( object.visible && vector.z >= - 1 && vector.z <= 1 ) ? '' : 'none';
var objectData = { | true |
Other | mrdoob | three.js | 39fc61d2c4aa2c7db9a0ede6aee1fd4264838bde.json | remove old css prefixes | examples/jsm/renderers/CSS3DRenderer.js | @@ -79,7 +79,6 @@ var CSS3DRenderer = function () {
var cameraElement = document.createElement( 'div' );
- cameraElement.style.WebkitTransformStyle = 'preserve-3d';
cameraElement.style.transformStyle = 'preserve-3d';
cameraElement.style.pointerEvents = 'none';
@@ -201,7 +200,6 @@ var CSS3DRenderer = function () {
if ( cachedObject === undefined || cachedObject.style !== style ) {
- element.style.WebkitTransform = style;
element.style.transform = style;
var objectData = { style: style };
@@ -235,18 +233,7 @@ var CSS3DRenderer = function () {
if ( cache.camera.fov !== fov ) {
- if ( camera.isPerspectiveCamera ) {
-
- domElement.style.WebkitPerspective = fov + 'px';
- domElement.style.perspective = fov + 'px';
-
- } else {
-
- domElement.style.WebkitPerspective = '';
- domElement.style.perspective = '';
-
- }
-
+ domElement.style.perspective = camera.isPerspectiveCamera ? fov + 'px' : '';
cache.camera.fov = fov;
}
@@ -270,7 +257,6 @@ var CSS3DRenderer = function () {
if ( cache.camera.style !== style ) {
- cameraElement.style.WebkitTransform = style;
cameraElement.style.transform = style;
cache.camera.style = style; | true |
Other | mrdoob | three.js | ab7458e32694ee1c3f7695559db0781d87bd36ec.json | Fix code style in the shader | src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.js | @@ -34,10 +34,10 @@ export default /* glsl */`
vec3 T = q1perp * st0.x + q0perp * st1.x;
vec3 B = q1perp * st0.y + q0perp * st1.y;
- float det = max( dot(T,T), dot(B,B) );
- float scale = (det == 0.0) ? 0.0 : faceDirection * inversesqrt( det );
+ float det = max( dot( T, T ), dot( B, B ) );
+ float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );
- return normalize( T * (mapN.x * scale) + B * ( mapN.y * scale ) + N * mapN.z );
+ return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );
}
| false |
Other | mrdoob | three.js | 746f66b295b4190a0c5d5fb305a0ed290e5aa169.json | Add KTX2Exporter (#24102)
* KTX2Exporter: Initial commit
* KTX2Exporter: Keep relative import | examples/jsm/exporters/KTX2Exporter.js | @@ -0,0 +1,281 @@
+import {
+ FloatType,
+ HalfFloatType,
+ UnsignedByteType,
+ RGBAFormat,
+ RGFormat,
+ RGIntegerFormat,
+ RedFormat,
+ RedIntegerFormat,
+ LinearEncoding,
+ sRGBEncoding,
+ DataTexture,
+ REVISION,
+} from 'three';
+
+import {
+ write,
+ KTX2Container,
+ KHR_DF_CHANNEL_RGBSDA_ALPHA,
+ KHR_DF_CHANNEL_RGBSDA_BLUE,
+ KHR_DF_CHANNEL_RGBSDA_GREEN,
+ KHR_DF_CHANNEL_RGBSDA_RED,
+ KHR_DF_MODEL_RGBSDA,
+ KHR_DF_PRIMARIES_BT709,
+ KHR_DF_SAMPLE_DATATYPE_FLOAT,
+ KHR_DF_SAMPLE_DATATYPE_LINEAR,
+ KHR_DF_SAMPLE_DATATYPE_SIGNED,
+ KHR_DF_TRANSFER_LINEAR,
+ KHR_DF_TRANSFER_SRGB,
+ VK_FORMAT_R16_SFLOAT,
+ VK_FORMAT_R16G16_SFLOAT,
+ VK_FORMAT_R16G16B16A16_SFLOAT,
+ VK_FORMAT_R32_SFLOAT,
+ VK_FORMAT_R32G32_SFLOAT,
+ VK_FORMAT_R32G32B32A32_SFLOAT,
+ VK_FORMAT_R8_SRGB,
+ VK_FORMAT_R8_UNORM,
+ VK_FORMAT_R8G8_SRGB,
+ VK_FORMAT_R8G8_UNORM,
+ VK_FORMAT_R8G8B8A8_SRGB,
+ VK_FORMAT_R8G8B8A8_UNORM,
+ } from '../libs/ktx-parse.module.js';
+
+const VK_FORMAT_MAP = {
+
+ [RGBAFormat]: {
+ [FloatType]: {
+ [LinearEncoding]: VK_FORMAT_R32G32B32A32_SFLOAT,
+ },
+ [HalfFloatType]: {
+ [LinearEncoding]: VK_FORMAT_R16G16B16A16_SFLOAT,
+ },
+ [UnsignedByteType]: {
+ [LinearEncoding]: VK_FORMAT_R8G8B8A8_UNORM,
+ [sRGBEncoding]: VK_FORMAT_R8G8B8A8_SRGB,
+ },
+ },
+
+ [RGFormat]: {
+ [FloatType]: {
+ [LinearEncoding]: VK_FORMAT_R32G32_SFLOAT,
+ },
+ [HalfFloatType]: {
+ [LinearEncoding]: VK_FORMAT_R16G16_SFLOAT,
+ },
+ [UnsignedByteType]: {
+ [LinearEncoding]: VK_FORMAT_R8G8_UNORM,
+ [sRGBEncoding]: VK_FORMAT_R8G8_SRGB,
+ },
+ },
+
+ [RedFormat]: {
+ [FloatType]: {
+ [LinearEncoding]: VK_FORMAT_R32_SFLOAT,
+ },
+ [HalfFloatType]: {
+ [LinearEncoding]: VK_FORMAT_R16_SFLOAT,
+ },
+ [UnsignedByteType]: {
+ [LinearEncoding]: VK_FORMAT_R8_SRGB,
+ [sRGBEncoding]: VK_FORMAT_R8_UNORM,
+ },
+ },
+
+};
+
+const KHR_DF_CHANNEL_MAP = {
+
+ 0: KHR_DF_CHANNEL_RGBSDA_RED,
+ 1: KHR_DF_CHANNEL_RGBSDA_GREEN,
+ 2: KHR_DF_CHANNEL_RGBSDA_BLUE,
+ 3: KHR_DF_CHANNEL_RGBSDA_ALPHA,
+
+};
+
+const ERROR_INPUT = 'THREE.KTX2Exporter: Supported inputs are DataTexture, Data3DTexture, or WebGLRenderer and WebGLRenderTarget.';
+const ERROR_FORMAT = 'THREE.KTX2Exporter: Supported formats are RGBAFormat, RGFormat, or RedFormat.';
+const ERROR_TYPE = 'THREE.KTX2Exporter: Supported types are FloatType, HalfFloatType, or UnsignedByteType."';
+const ERROR_ENCODING = 'THREE.KTX2Exporter: Supported encodings are sRGB (UnsignedByteType only) or Linear.';
+
+export class KTX2Exporter {
+
+ parse( arg1, arg2 ) {
+
+ let texture;
+
+ if ( arg1.isDataTexture || arg1.isData3DTexture ) {
+
+ texture = arg1;
+
+ } else if ( arg1.isWebGLRenderer && arg2.isWebGLRenderTarget ) {
+
+ texture = toDataTexture( arg1, arg2 );
+
+ } else {
+
+ throw new Error( ERROR_INPUT );
+
+ }
+
+ if ( VK_FORMAT_MAP[ texture.format ] === undefined ) {
+
+ throw new Error( ERROR_FORMAT );
+
+ }
+
+ if ( VK_FORMAT_MAP[ texture.format ][ texture.type ] === undefined ) {
+
+ throw new Error( ERROR_TYPE );
+
+ }
+
+ if ( VK_FORMAT_MAP[ texture.format ][ texture.type ][ texture.encoding ] === undefined ) {
+
+ throw new Error( ERROR_ENCODING );
+
+ }
+
+ //
+
+ const array = texture.image.data;
+ const channelCount = getChannelCount( texture );
+ const container = new KTX2Container();
+
+ container.vkFormat = VK_FORMAT_MAP[ texture.format ][ texture.type ][ texture.encoding ];
+ container.typeSize = array.BYTES_PER_ELEMENT;
+ container.pixelWidth = texture.image.width;
+ container.pixelHeight = texture.image.height;
+
+ if ( texture.isData3DTexture ) {
+
+ container.pixelDepth = texture.image.depth;
+
+ }
+
+ //
+
+ const basicDesc = container.dataFormatDescriptor[ 0 ];
+
+ // TODO: After `texture.encoding` is replaced, distinguish between
+ // non-color data (unspecified model and primaries) and sRGB or Linear-sRGB colors.
+ basicDesc.colorModel = KHR_DF_MODEL_RGBSDA;
+ basicDesc.colorPrimaries = KHR_DF_PRIMARIES_BT709;
+ basicDesc.transferFunction = texture.encoding === sRGBEncoding
+ ? KHR_DF_TRANSFER_SRGB
+ : KHR_DF_TRANSFER_LINEAR;
+
+ basicDesc.texelBlockDimension = [ 0, 0, 0, 0 ];
+
+ basicDesc.bytesPlane = [
+
+ container.typeSize * channelCount, 0, 0, 0, 0, 0, 0, 0,
+
+ ];
+
+ for ( let i = 0; i < channelCount; ++ i ) {
+
+ let channelType = KHR_DF_CHANNEL_MAP[ i ];
+
+ if ( texture.encoding === LinearEncoding ) {
+
+ channelType |= KHR_DF_SAMPLE_DATATYPE_LINEAR;
+
+ }
+
+ if ( texture.type === FloatType || texture.type === HalfFloatType ) {
+
+ channelType |= KHR_DF_SAMPLE_DATATYPE_FLOAT;
+ channelType |= KHR_DF_SAMPLE_DATATYPE_SIGNED;
+
+ }
+
+ basicDesc.samples.push( {
+
+ channelType: channelType,
+ bitOffset: i * array.BYTES_PER_ELEMENT,
+ bitLength: array.BYTES_PER_ELEMENT * 8 - 1,
+ samplePosition: [0, 0, 0, 0],
+ sampleLower: texture.type === UnsignedByteType ? 0 : -1,
+ sampleUpper: texture.type === UnsignedByteType ? 255 : 1,
+
+ } );
+
+ }
+
+ //
+
+ container.levels = [ {
+
+ levelData: new Uint8Array( array.buffer, array.byteOffset, array.byteLength ),
+ uncompressedByteLength: array.byteLength,
+
+ } ];
+
+ //
+
+ container.keyValue['KTXwriter'] = `three.js ${ REVISION }`;
+
+ //
+
+ return write( container, { keepWriter: true } );
+
+ }
+
+}
+
+function toDataTexture( renderer, rtt ) {
+
+ const channelCount = getChannelCount( rtt.texture );
+
+ let view;
+
+ if ( rtt.texture.type === FloatType ) {
+
+ view = new Float32Array( rtt.width * rtt.height * channelCount );
+
+ } else if ( rtt.texture.type === HalfFloatType ) {
+
+ view = new Uint16Array( rtt.width * rtt.height * channelCount );
+
+ } else if ( rtt.texture.type === UnsignedByteType ) {
+
+ view = new Uint8Array( rtt.width * rtt.height * channelCount );
+
+ } else {
+
+ throw new Error( ERROR_TYPE );
+
+ }
+
+ renderer.readRenderTargetPixels( rtt, 0, 0, rtt.width, rtt.height, view );
+
+ return new DataTexture( view, rtt.width, rt.height, rtt.texture.format, rtt.texture.type );
+
+}
+
+function getChannelCount( texture ) {
+
+ switch ( texture.format ) {
+
+ case RGBAFormat:
+
+ return 4;
+
+ case RGFormat:
+ case RGIntegerFormat:
+
+ return 2;
+
+ case RedFormat:
+ case RedIntegerFormat:
+
+ return 1;
+
+ default:
+
+ throw new Error( ERROR_FORMAT );
+
+ }
+
+} | true |
Other | mrdoob | three.js | 746f66b295b4190a0c5d5fb305a0ed290e5aa169.json | Add KTX2Exporter (#24102)
* KTX2Exporter: Initial commit
* KTX2Exporter: Keep relative import | examples/jsm/libs/ktx-parse.module.js | @@ -1 +1 @@
-const t=new Uint8Array([0]),e=[171,75,84,88,32,50,48,187,13,10,26,10];var n,i,s,a,r,o,l,f;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"}(n||(n={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(i||(i={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(r||(r={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(o||(o={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(f||(f={}));class U{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=n.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:i.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:s.UNSPECIFIED,colorPrimaries:a.SRGB,transferFunction:a.SRGB,flags:o.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class c{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}function h(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):Buffer.from(t)}function _(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function g(t){let e=0;for(const n of t)e+=n.byteLength;const n=new Uint8Array(e);let i=0;for(const e of t)n.set(new Uint8Array(e),i),i+=e.byteLength;return n}function p(t){const n=new Uint8Array(t.buffer,t.byteOffset,e.length);if(n[0]!==e[0]||n[1]!==e[1]||n[2]!==e[2]||n[3]!==e[3]||n[4]!==e[4]||n[5]!==e[5]||n[6]!==e[6]||n[7]!==e[7]||n[8]!==e[8]||n[9]!==e[9]||n[10]!==e[10]||n[11]!==e[11])throw new Error("Missing KTX 2.0 identifier.");const i=new U,s=17*Uint32Array.BYTES_PER_ELEMENT,a=new c(t,e.length,s,!0);i.vkFormat=a._nextUint32(),i.typeSize=a._nextUint32(),i.pixelWidth=a._nextUint32(),i.pixelHeight=a._nextUint32(),i.pixelDepth=a._nextUint32(),i.layerCount=a._nextUint32(),i.faceCount=a._nextUint32();const r=a._nextUint32();i.supercompressionScheme=a._nextUint32();const o=a._nextUint32(),l=a._nextUint32(),f=a._nextUint32(),h=a._nextUint32(),g=a._nextUint64(),p=a._nextUint64(),x=new c(t,e.length+s,3*r*8,!0);for(let e=0;e<r;e++)i.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+x._nextUint64(),x._nextUint64()),uncompressedByteLength:x._nextUint64()});const u=new c(t,o,l,!0),y={vendorId:u._skip(4)._nextUint16(),descriptorType:u._nextUint16(),versionNumber:u._nextUint16(),descriptorBlockSize:u._nextUint16(),colorModel:u._nextUint8(),colorPrimaries:u._nextUint8(),transferFunction:u._nextUint8(),flags:u._nextUint8(),texelBlockDimension:{x:u._nextUint8()+1,y:u._nextUint8()+1,z:u._nextUint8()+1,w:u._nextUint8()+1},bytesPlane:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],samples:[]},D=(y.descriptorBlockSize/4-6)/4;for(let t=0;t<D;t++)y.samples[t]={bitOffset:u._nextUint16(),bitLength:u._nextUint8(),channelID:u._nextUint8(),samplePosition:[u._nextUint8(),u._nextUint8(),u._nextUint8(),u._nextUint8()],sampleLower:u._nextUint32(),sampleUpper:u._nextUint32()};i.dataFormatDescriptor.length=0,i.dataFormatDescriptor.push(y);const b=new c(t,f,h,!0);for(;b._offset<h;){const t=b._nextUint32(),e=b._scan(t),n=_(e),s=b._scan(t-e.byteLength);i.keyValue[n]=n.match(/^ktx/i)?_(s):s,b._offset%4&&b._skip(4-b._offset%4)}if(p<=0)return i;const d=new c(t,g,p,!0),B=d._nextUint16(),w=d._nextUint16(),A=d._nextUint32(),S=d._nextUint32(),m=d._nextUint32(),L=d._nextUint32(),I=[];for(let t=0;t<r;t++)I.push({imageFlags:d._nextUint32(),rgbSliceByteOffset:d._nextUint32(),rgbSliceByteLength:d._nextUint32(),alphaSliceByteOffset:d._nextUint32(),alphaSliceByteLength:d._nextUint32()});const R=g+d._offset,E=R+A,T=E+S,O=T+m,P=new Uint8Array(t.buffer,t.byteOffset+R,A),C=new Uint8Array(t.buffer,t.byteOffset+E,S),F=new Uint8Array(t.buffer,t.byteOffset+T,m),G=new Uint8Array(t.buffer,t.byteOffset+O,L);return i.globalData={endpointCount:B,selectorCount:w,imageDescs:I,endpointsData:P,selectorsData:C,tablesData:F,extendedData:G},i}function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}const u={keepWriter:!1};function y(n,s={}){s=x({},u,s);let a=new ArrayBuffer(0);if(n.globalData){const t=new ArrayBuffer(20+5*n.globalData.imageDescs.length*4),e=new DataView(t);e.setUint16(0,n.globalData.endpointCount,!0),e.setUint16(2,n.globalData.selectorCount,!0),e.setUint32(4,n.globalData.endpointsData.byteLength,!0),e.setUint32(8,n.globalData.selectorsData.byteLength,!0),e.setUint32(12,n.globalData.tablesData.byteLength,!0),e.setUint32(16,n.globalData.extendedData.byteLength,!0);for(let t=0;t<n.globalData.imageDescs.length;t++){const i=n.globalData.imageDescs[t];e.setUint32(20+5*t*4+0,i.imageFlags,!0),e.setUint32(20+5*t*4+4,i.rgbSliceByteOffset,!0),e.setUint32(20+5*t*4+8,i.rgbSliceByteLength,!0),e.setUint32(20+5*t*4+12,i.alphaSliceByteOffset,!0),e.setUint32(20+5*t*4+16,i.alphaSliceByteLength,!0)}a=g([t,n.globalData.endpointsData,n.globalData.selectorsData,n.globalData.tablesData,n.globalData.extendedData])}const r=[];let o=n.keyValue;s.keepWriter||(o=x({},n.keyValue,{KTXwriter:"KTX-Parse v0.2.1"}));for(const e in o){const n=o[e],i=h(e),s="string"==typeof n?h(n):n,a=i.byteLength+1+s.byteLength+1,l=a%4?4-a%4:0;r.push(g([new Uint32Array([a]),i,t,s,t,new Uint8Array(l).fill(0)]))}const l=g(r),f=new ArrayBuffer(44),U=new DataView(f);if(1!==n.dataFormatDescriptor.length||n.dataFormatDescriptor[0].descriptorType!==i.BASICFORMAT)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");const c=n.dataFormatDescriptor[0];U.setUint32(0,44,!0),U.setUint16(4,c.vendorId,!0),U.setUint16(6,c.descriptorType,!0),U.setUint16(8,c.versionNumber,!0),U.setUint16(10,c.descriptorBlockSize,!0),U.setUint8(12,c.colorModel),U.setUint8(13,c.colorPrimaries),U.setUint8(14,c.transferFunction),U.setUint8(15,c.flags),U.setUint8(16,c.texelBlockDimension.x-1),U.setUint8(17,c.texelBlockDimension.y-1),U.setUint8(18,c.texelBlockDimension.z-1),U.setUint8(19,c.texelBlockDimension.w-1);for(let t=0;t<8;t++)U.setUint8(20+t,c.bytesPlane[t]);for(let t=0;t<c.samples.length;t++){const e=c.samples[t],n=28+16*t;U.setUint16(n+0,e.bitOffset,!0),U.setUint8(n+2,e.bitLength),U.setUint8(n+3,e.channelID),U.setUint8(n+4,e.samplePosition[0]),U.setUint8(n+5,e.samplePosition[1]),U.setUint8(n+6,e.samplePosition[2]),U.setUint8(n+7,e.samplePosition[3]),U.setUint32(n+8,e.sampleLower,!0),U.setUint32(n+12,e.sampleUpper,!0)}const _=e.length+68+3*n.levels.length*8,p=_+f.byteLength;let y=p+l.byteLength;y%8&&(y+=8-y%8);const D=[],b=new DataView(new ArrayBuffer(3*n.levels.length*8));let d=y+a.byteLength;for(let t=0;t<n.levels.length;t++){const e=n.levels[t];D.push(e.levelData),b.setBigUint64(24*t+0,BigInt(d),!0),b.setBigUint64(24*t+8,BigInt(e.levelData.byteLength),!0),b.setBigUint64(24*t+16,BigInt(e.uncompressedByteLength),!0),d+=e.levelData.byteLength}const B=new ArrayBuffer(68),w=new DataView(B);return w.setUint32(0,n.vkFormat,!0),w.setUint32(4,n.typeSize,!0),w.setUint32(8,n.pixelWidth,!0),w.setUint32(12,n.pixelHeight,!0),w.setUint32(16,n.pixelDepth,!0),w.setUint32(20,n.layerCount,!0),w.setUint32(24,n.faceCount,!0),w.setUint32(28,n.levels.length,!0),w.setUint32(32,n.supercompressionScheme,!0),w.setUint32(36,_,!0),w.setUint32(40,f.byteLength,!0),w.setUint32(44,p,!0),w.setUint32(48,l.byteLength,!0),w.setBigUint64(52,BigInt(y),!0),w.setBigUint64(60,BigInt(a.byteLength),!0),new Uint8Array(g([new Uint8Array(e).buffer,B,b.buffer,f,l,new ArrayBuffer(y-(p+l.byteLength)),a,...D]))}export{l as KTX2ChannelETC1S,f as KTX2ChannelUASTC,U as KTX2Container,i as KTX2DescriptorType,o as KTX2Flags,s as KTX2Model,a as KTX2Primaries,n as KTX2SupercompressionScheme,r as KTX2Transfer,p as read,y as write};
+const t=0,e=1,n=2,i=3,s=0,a=0,r=2,o=0,l=1,f=160,U=161,c=162,h=163,_=0,p=1,g=0,y=1,x=2,u=3,b=4,d=5,m=6,w=7,D=8,B=9,L=10,A=11,k=12,v=13,S=14,I=15,O=16,T=17,V=18,E=0,F=1,P=2,C=3,z=4,M=5,W=6,N=7,H=8,K=9,X=10,j=11,R=0,Y=1,q=2,G=13,J=14,Q=15,Z=128,$=64,tt=32,et=16,nt=0,it=1,st=2,at=3,rt=4,ot=5,lt=6,ft=7,Ut=8,ct=9,ht=10,_t=13,pt=14,gt=15,yt=16,xt=17,ut=20,bt=21,dt=22,mt=23,wt=24,Dt=27,Bt=28,Lt=29,At=30,kt=31,vt=34,St=35,It=36,Ot=37,Tt=38,Vt=41,Et=42,Ft=43,Pt=44,Ct=45,zt=48,Mt=49,Wt=50,Nt=58,Ht=59,Kt=62,Xt=63,jt=64,Rt=65,Yt=68,qt=69,Gt=70,Jt=71,Qt=74,Zt=75,$t=76,te=77,ee=78,ne=81,ie=82,se=83,ae=84,re=85,oe=88,le=89,fe=90,Ue=91,ce=92,he=95,_e=96,pe=97,ge=98,ye=99,xe=100,ue=101,be=102,de=103,me=104,we=105,De=106,Be=107,Le=108,Ae=109,ke=110,ve=111,Se=112,Ie=113,Oe=114,Te=115,Ve=116,Ee=117,Fe=118,Pe=119,Ce=120,ze=121,Me=122,We=123,Ne=124,He=125,Ke=126,Xe=127,je=128,Re=129,Ye=130,qe=131,Ge=132,Je=133,Qe=134,Ze=135,$e=136,tn=137,en=138,nn=139,sn=140,an=141,rn=142,on=143,ln=144,fn=145,Un=146,cn=147,hn=148,_n=149,pn=150,gn=151,yn=152,xn=153,un=154,bn=155,dn=156,mn=157,wn=158,Dn=159,Bn=160,Ln=161,An=162,kn=163,vn=164,Sn=165,In=166,On=167,Tn=168,Vn=169,En=170,Fn=171,Pn=172,Cn=173,zn=174,Mn=175,Wn=176,Nn=177,Hn=178,Kn=179,Xn=180,jn=181,Rn=182,Yn=183,qn=184,Gn=1000156007,Jn=1000156008,Qn=1000156009,Zn=1000156010,$n=1000156011,ti=1000156017,ei=1000156018,ni=1000156019,ii=1000156020,si=1000156021,ai=1000054e3,ri=1000054001,oi=1000054002,li=1000054003,fi=1000054004,Ui=1000054005,ci=1000054006,hi=1000054007,_i=1000066e3,pi=1000066001,gi=1000066002,yi=1000066003,xi=1000066004,ui=1000066005,bi=1000066006,di=1000066007,mi=1000066008,wi=1000066009,Di=1000066010,Bi=1000066011,Li=1000066012,Ai=1000066013,ki=100034e4,vi=1000340001;class Si{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Ii{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i<t;)i++,this._offset++;return i<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+n,i)}}const Oi=new Uint8Array([0]),Ti=[171,75,84,88,32,50,48,187,13,10,26,10];function Vi(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):Buffer.from(t)}function Ei(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Fi(t){let e=0;for(const n of t)e+=n.byteLength;const n=new Uint8Array(e);let i=0;for(const e of t)n.set(new Uint8Array(e),i),i+=e.byteLength;return n}function Pi(t){const e=new Uint8Array(t.buffer,t.byteOffset,Ti.length);if(e[0]!==Ti[0]||e[1]!==Ti[1]||e[2]!==Ti[2]||e[3]!==Ti[3]||e[4]!==Ti[4]||e[5]!==Ti[5]||e[6]!==Ti[6]||e[7]!==Ti[7]||e[8]!==Ti[8]||e[9]!==Ti[9]||e[10]!==Ti[10]||e[11]!==Ti[11])throw new Error("Missing KTX 2.0 identifier.");const n=new Si,i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Ii(t,Ti.length,i,!0);n.vkFormat=s._nextUint32(),n.typeSize=s._nextUint32(),n.pixelWidth=s._nextUint32(),n.pixelHeight=s._nextUint32(),n.pixelDepth=s._nextUint32(),n.layerCount=s._nextUint32(),n.faceCount=s._nextUint32();const a=s._nextUint32();n.supercompressionScheme=s._nextUint32();const r=s._nextUint32(),o=s._nextUint32(),l=s._nextUint32(),f=s._nextUint32(),U=s._nextUint64(),c=s._nextUint64(),h=new Ii(t,Ti.length+i,3*a*8,!0);for(let e=0;e<a;e++)n.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});const _=new Ii(t,r,o,!0),p={vendorId:_._skip(4)._nextUint16(),descriptorType:_._nextUint16(),versionNumber:_._nextUint16(),descriptorBlockSize:_._nextUint16(),colorModel:_._nextUint8(),colorPrimaries:_._nextUint8(),transferFunction:_._nextUint8(),flags:_._nextUint8(),texelBlockDimension:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],bytesPlane:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],samples:[]},g=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<g;t++){const e={bitOffset:_._nextUint16(),bitLength:_._nextUint8(),channelType:_._nextUint8(),samplePosition:[_._nextUint8(),_._nextUint8(),_._nextUint8(),_._nextUint8()],sampleLower:-Infinity,sampleUpper:Infinity};64&e.channelType?(e.sampleLower=_._nextInt32(),e.sampleUpper=_._nextInt32()):(e.sampleLower=_._nextUint32(),e.sampleUpper=_._nextUint32()),p.samples[t]=e}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(p);const y=new Ii(t,l,f,!0);for(;y._offset<f;){const t=y._nextUint32(),e=y._scan(t),i=Ei(e),s=y._scan(t-e.byteLength);n.keyValue[i]=i.match(/^ktx/i)?Ei(s):s,y._offset%4&&y._skip(4-y._offset%4)}if(c<=0)return n;const x=new Ii(t,U,c,!0),u=x._nextUint16(),b=x._nextUint16(),d=x._nextUint32(),m=x._nextUint32(),w=x._nextUint32(),D=x._nextUint32(),B=[];for(let t=0;t<a;t++)B.push({imageFlags:x._nextUint32(),rgbSliceByteOffset:x._nextUint32(),rgbSliceByteLength:x._nextUint32(),alphaSliceByteOffset:x._nextUint32(),alphaSliceByteLength:x._nextUint32()});const L=U+x._offset,A=L+d,k=A+m,v=k+w,S=new Uint8Array(t.buffer,t.byteOffset+L,d),I=new Uint8Array(t.buffer,t.byteOffset+A,m),O=new Uint8Array(t.buffer,t.byteOffset+k,w),T=new Uint8Array(t.buffer,t.byteOffset+v,D);return n.globalData={endpointCount:u,selectorCount:b,imageDescs:B,endpointsData:S,selectorsData:I,tablesData:O,extendedData:T},n}function Ci(){return(Ci=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}const zi={keepWriter:!1};function Mi(t,e={}){e=Ci({},zi,e);let n=new ArrayBuffer(0);if(t.globalData){const e=new ArrayBuffer(20+5*t.globalData.imageDescs.length*4),i=new DataView(e);i.setUint16(0,t.globalData.endpointCount,!0),i.setUint16(2,t.globalData.selectorCount,!0),i.setUint32(4,t.globalData.endpointsData.byteLength,!0),i.setUint32(8,t.globalData.selectorsData.byteLength,!0),i.setUint32(12,t.globalData.tablesData.byteLength,!0),i.setUint32(16,t.globalData.extendedData.byteLength,!0);for(let e=0;e<t.globalData.imageDescs.length;e++){const n=t.globalData.imageDescs[e];i.setUint32(20+5*e*4+0,n.imageFlags,!0),i.setUint32(20+5*e*4+4,n.rgbSliceByteOffset,!0),i.setUint32(20+5*e*4+8,n.rgbSliceByteLength,!0),i.setUint32(20+5*e*4+12,n.alphaSliceByteOffset,!0),i.setUint32(20+5*e*4+16,n.alphaSliceByteLength,!0)}n=Fi([e,t.globalData.endpointsData,t.globalData.selectorsData,t.globalData.tablesData,t.globalData.extendedData])}const i=[];let s=t.keyValue;e.keepWriter||(s=Ci({},t.keyValue,{KTXwriter:"KTX-Parse v0.3.1"}));for(const t in s){const e=s[t],n=Vi(t),a="string"==typeof e?Vi(e):e,r=n.byteLength+1+a.byteLength+1,o=r%4?4-r%4:0;i.push(Fi([new Uint32Array([r]),n,Oi,a,Oi,new Uint8Array(o).fill(0)]))}const a=Fi(i);if(1!==t.dataFormatDescriptor.length||0!==t.dataFormatDescriptor[0].descriptorType)throw new Error("Only BASICFORMAT Data Format Descriptor output supported.");const r=t.dataFormatDescriptor[0],o=new ArrayBuffer(28+16*r.samples.length),l=new DataView(o),f=24+16*r.samples.length;if(l.setUint32(0,o.byteLength,!0),l.setUint16(4,r.vendorId,!0),l.setUint16(6,r.descriptorType,!0),l.setUint16(8,r.versionNumber,!0),l.setUint16(10,f,!0),l.setUint8(12,r.colorModel),l.setUint8(13,r.colorPrimaries),l.setUint8(14,r.transferFunction),l.setUint8(15,r.flags),!Array.isArray(r.texelBlockDimension))throw new Error("texelBlockDimension is now an array. For dimensionality `d`, set `d - 1`.");l.setUint8(16,r.texelBlockDimension[0]),l.setUint8(17,r.texelBlockDimension[1]),l.setUint8(18,r.texelBlockDimension[2]),l.setUint8(19,r.texelBlockDimension[3]);for(let t=0;t<8;t++)l.setUint8(20+t,r.bytesPlane[t]);for(let t=0;t<r.samples.length;t++){const e=r.samples[t],n=28+16*t;if(e.channelID)throw new Error("channelID has been renamed to channelType.");l.setUint16(n+0,e.bitOffset,!0),l.setUint8(n+2,e.bitLength),l.setUint8(n+3,e.channelType),l.setUint8(n+4,e.samplePosition[0]),l.setUint8(n+5,e.samplePosition[1]),l.setUint8(n+6,e.samplePosition[2]),l.setUint8(n+7,e.samplePosition[3]),64&e.channelType?(l.setInt32(n+8,e.sampleLower,!0),l.setInt32(n+12,e.sampleUpper,!0)):(l.setUint32(n+8,e.sampleLower,!0),l.setUint32(n+12,e.sampleUpper,!0))}const U=Ti.length+68+3*t.levels.length*8,c=U+o.byteLength;let h=n.byteLength>0?c+a.byteLength:0;h%8&&(h+=8-h%8);const _=[],p=new DataView(new ArrayBuffer(3*t.levels.length*8));let g=(h||c+a.byteLength)+n.byteLength;for(let e=0;e<t.levels.length;e++){const n=t.levels[e];_.push(n.levelData),p.setBigUint64(24*e+0,BigInt(g),!0),p.setBigUint64(24*e+8,BigInt(n.levelData.byteLength),!0),p.setBigUint64(24*e+16,BigInt(n.uncompressedByteLength),!0),g+=n.levelData.byteLength}const y=new ArrayBuffer(68),x=new DataView(y);return x.setUint32(0,t.vkFormat,!0),x.setUint32(4,t.typeSize,!0),x.setUint32(8,t.pixelWidth,!0),x.setUint32(12,t.pixelHeight,!0),x.setUint32(16,t.pixelDepth,!0),x.setUint32(20,t.layerCount,!0),x.setUint32(24,t.faceCount,!0),x.setUint32(28,t.levels.length,!0),x.setUint32(32,t.supercompressionScheme,!0),x.setUint32(36,U,!0),x.setUint32(40,o.byteLength,!0),x.setUint32(44,c,!0),x.setUint32(48,a.byteLength,!0),x.setBigUint64(52,BigInt(n.byteLength>0?h:0),!0),x.setBigUint64(60,BigInt(n.byteLength),!0),new Uint8Array(Fi([new Uint8Array(Ti).buffer,y,p.buffer,o,a,h>0?new ArrayBuffer(h-(c+a.byteLength)):new ArrayBuffer(0),n,..._]))}export{Q as KHR_DF_CHANNEL_RGBSDA_ALPHA,q as KHR_DF_CHANNEL_RGBSDA_BLUE,J as KHR_DF_CHANNEL_RGBSDA_DEPTH,Y as KHR_DF_CHANNEL_RGBSDA_GREEN,R as KHR_DF_CHANNEL_RGBSDA_RED,G as KHR_DF_CHANNEL_RGBSDA_STENCIL,p as KHR_DF_FLAG_ALPHA_PREMULTIPLIED,_ as KHR_DF_FLAG_ALPHA_STRAIGHT,s as KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT,c as KHR_DF_MODEL_ASTC,f as KHR_DF_MODEL_ETC1,h as KHR_DF_MODEL_ETC1S,U as KHR_DF_MODEL_ETC2,l as KHR_DF_MODEL_RGBSDA,o as KHR_DF_MODEL_UNSPECIFIED,W as KHR_DF_PRIMARIES_ACES,N as KHR_DF_PRIMARIES_ACESCC,j as KHR_DF_PRIMARIES_ADOBERGB,z as KHR_DF_PRIMARIES_BT2020,P as KHR_DF_PRIMARIES_BT601_EBU,C as KHR_DF_PRIMARIES_BT601_SMPTE,F as KHR_DF_PRIMARIES_BT709,M as KHR_DF_PRIMARIES_CIEXYZ,X as KHR_DF_PRIMARIES_DISPLAYP3,H as KHR_DF_PRIMARIES_NTSC1953,K as KHR_DF_PRIMARIES_PAL525,E as KHR_DF_PRIMARIES_UNSPECIFIED,tt as KHR_DF_SAMPLE_DATATYPE_EXPONENT,Z as KHR_DF_SAMPLE_DATATYPE_FLOAT,et as KHR_DF_SAMPLE_DATATYPE_LINEAR,$ as KHR_DF_SAMPLE_DATATYPE_SIGNED,O as KHR_DF_TRANSFER_ACESCC,T as KHR_DF_TRANSFER_ACESCCT,V as KHR_DF_TRANSFER_ADOBERGB,w as KHR_DF_TRANSFER_BT1886,k as KHR_DF_TRANSFER_DCIP3,B as KHR_DF_TRANSFER_HLG_EOTF,D as KHR_DF_TRANSFER_HLG_OETF,u as KHR_DF_TRANSFER_ITU,y as KHR_DF_TRANSFER_LINEAR,b as KHR_DF_TRANSFER_NTSC,S as KHR_DF_TRANSFER_PAL625_EOTF,v as KHR_DF_TRANSFER_PAL_OETF,L as KHR_DF_TRANSFER_PQ_EOTF,A as KHR_DF_TRANSFER_PQ_OETF,d as KHR_DF_TRANSFER_SLOG,m as KHR_DF_TRANSFER_SLOG2,x as KHR_DF_TRANSFER_SRGB,I as KHR_DF_TRANSFER_ST240,g as KHR_DF_TRANSFER_UNSPECIFIED,a as KHR_DF_VENDORID_KHRONOS,r as KHR_DF_VERSION,e as KHR_SUPERCOMPRESSION_BASISLZ,t as KHR_SUPERCOMPRESSION_NONE,i as KHR_SUPERCOMPRESSION_ZLIB,n as KHR_SUPERCOMPRESSION_ZSTD,Si as KTX2Container,Ut as VK_FORMAT_A1R5G5B5_UNORM_PACK16,qt as VK_FORMAT_A2B10G10R10_SINT_PACK32,Rt as VK_FORMAT_A2B10G10R10_SNORM_PACK32,Yt as VK_FORMAT_A2B10G10R10_UINT_PACK32,jt as VK_FORMAT_A2B10G10R10_UNORM_PACK32,Xt as VK_FORMAT_A2R10G10B10_SINT_PACK32,Ht as VK_FORMAT_A2R10G10B10_SNORM_PACK32,Kt as VK_FORMAT_A2R10G10B10_UINT_PACK32,Nt as VK_FORMAT_A2R10G10B10_UNORM_PACK32,vi as VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT,ki as VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT,Bi as VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT,Xn as VK_FORMAT_ASTC_10x10_SRGB_BLOCK,Kn as VK_FORMAT_ASTC_10x10_UNORM_BLOCK,mi as VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT,zn as VK_FORMAT_ASTC_10x5_SRGB_BLOCK,Cn as VK_FORMAT_ASTC_10x5_UNORM_BLOCK,wi as VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT,Wn as VK_FORMAT_ASTC_10x6_SRGB_BLOCK,Mn as VK_FORMAT_ASTC_10x6_UNORM_BLOCK,Di as VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT,Hn as VK_FORMAT_ASTC_10x8_SRGB_BLOCK,Nn as VK_FORMAT_ASTC_10x8_UNORM_BLOCK,Li as VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT,Rn as VK_FORMAT_ASTC_12x10_SRGB_BLOCK,jn as VK_FORMAT_ASTC_12x10_UNORM_BLOCK,Ai as VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT,qn as VK_FORMAT_ASTC_12x12_SRGB_BLOCK,Yn as VK_FORMAT_ASTC_12x12_UNORM_BLOCK,_i as VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT,wn as VK_FORMAT_ASTC_4x4_SRGB_BLOCK,mn as VK_FORMAT_ASTC_4x4_UNORM_BLOCK,pi as VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT,Bn as VK_FORMAT_ASTC_5x4_SRGB_BLOCK,Dn as VK_FORMAT_ASTC_5x4_UNORM_BLOCK,gi as VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT,An as VK_FORMAT_ASTC_5x5_SRGB_BLOCK,Ln as VK_FORMAT_ASTC_5x5_UNORM_BLOCK,yi as VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT,vn as VK_FORMAT_ASTC_6x5_SRGB_BLOCK,kn as VK_FORMAT_ASTC_6x5_UNORM_BLOCK,xi as VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT,In as VK_FORMAT_ASTC_6x6_SRGB_BLOCK,Sn as VK_FORMAT_ASTC_6x6_UNORM_BLOCK,ui as VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT,Tn as VK_FORMAT_ASTC_8x5_SRGB_BLOCK,On as VK_FORMAT_ASTC_8x5_UNORM_BLOCK,bi as VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT,En as VK_FORMAT_ASTC_8x6_SRGB_BLOCK,Vn as VK_FORMAT_ASTC_8x6_UNORM_BLOCK,di as VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT,Pn as VK_FORMAT_ASTC_8x8_SRGB_BLOCK,Fn as VK_FORMAT_ASTC_8x8_UNORM_BLOCK,Me as VK_FORMAT_B10G11R11_UFLOAT_PACK32,$n as VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,si as VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,at as VK_FORMAT_B4G4R4A4_UNORM_PACK16,ft as VK_FORMAT_B5G5R5A1_UNORM_PACK16,ot as VK_FORMAT_B5G6R5_UNORM_PACK16,Mt as VK_FORMAT_B8G8R8A8_SINT,Ct as VK_FORMAT_B8G8R8A8_SNORM,Wt as VK_FORMAT_B8G8R8A8_SRGB,zt as VK_FORMAT_B8G8R8A8_UINT,Pt as VK_FORMAT_B8G8R8A8_UNORM,St as VK_FORMAT_B8G8R8_SINT,kt as VK_FORMAT_B8G8R8_SNORM,It as VK_FORMAT_B8G8R8_SRGB,vt as VK_FORMAT_B8G8R8_UINT,At as VK_FORMAT_B8G8R8_UNORM,Qe as VK_FORMAT_BC1_RGBA_SRGB_BLOCK,Je as VK_FORMAT_BC1_RGBA_UNORM_BLOCK,Ge as VK_FORMAT_BC1_RGB_SRGB_BLOCK,qe as VK_FORMAT_BC1_RGB_UNORM_BLOCK,$e as VK_FORMAT_BC2_SRGB_BLOCK,Ze as VK_FORMAT_BC2_UNORM_BLOCK,en as VK_FORMAT_BC3_SRGB_BLOCK,tn as VK_FORMAT_BC3_UNORM_BLOCK,sn as VK_FORMAT_BC4_SNORM_BLOCK,nn as VK_FORMAT_BC4_UNORM_BLOCK,rn as VK_FORMAT_BC5_SNORM_BLOCK,an as VK_FORMAT_BC5_UNORM_BLOCK,ln as VK_FORMAT_BC6H_SFLOAT_BLOCK,on as VK_FORMAT_BC6H_UFLOAT_BLOCK,Un as VK_FORMAT_BC7_SRGB_BLOCK,fn as VK_FORMAT_BC7_UNORM_BLOCK,Ne as VK_FORMAT_D16_UNORM,je as VK_FORMAT_D16_UNORM_S8_UINT,Re as VK_FORMAT_D24_UNORM_S8_UINT,Ke as VK_FORMAT_D32_SFLOAT,Ye as VK_FORMAT_D32_SFLOAT_S8_UINT,We as VK_FORMAT_E5B9G9R9_UFLOAT_PACK32,dn as VK_FORMAT_EAC_R11G11_SNORM_BLOCK,bn as VK_FORMAT_EAC_R11G11_UNORM_BLOCK,un as VK_FORMAT_EAC_R11_SNORM_BLOCK,xn as VK_FORMAT_EAC_R11_UNORM_BLOCK,pn as VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK,_n as VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK,yn as VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK,gn as VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK,hn as VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK,cn as VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK,Zn as VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,ii as VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,fi as VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG,ai as VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG,Ui as VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG,ri as VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG,ci as VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG,oi as VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG,hi as VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG,li as VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG,Qn as VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,Jn as VK_FORMAT_R10X6G10X6_UNORM_2PACK16,Gn as VK_FORMAT_R10X6_UNORM_PACK16,ni as VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16,ei as VK_FORMAT_R12X4G12X4_UNORM_2PACK16,ti as VK_FORMAT_R12X4_UNORM_PACK16,pe as VK_FORMAT_R16G16B16A16_SFLOAT,_e as VK_FORMAT_R16G16B16A16_SINT,ce as VK_FORMAT_R16G16B16A16_SNORM,he as VK_FORMAT_R16G16B16A16_UINT,Ue as VK_FORMAT_R16G16B16A16_UNORM,fe as VK_FORMAT_R16G16B16_SFLOAT,le as VK_FORMAT_R16G16B16_SINT,re as VK_FORMAT_R16G16B16_SNORM,oe as VK_FORMAT_R16G16B16_UINT,ae as VK_FORMAT_R16G16B16_UNORM,se as VK_FORMAT_R16G16_SFLOAT,ie as VK_FORMAT_R16G16_SINT,ee as VK_FORMAT_R16G16_SNORM,ne as VK_FORMAT_R16G16_UINT,te as VK_FORMAT_R16G16_UNORM,$t as VK_FORMAT_R16_SFLOAT,Zt as VK_FORMAT_R16_SINT,Jt as VK_FORMAT_R16_SNORM,Qt as VK_FORMAT_R16_UINT,Gt as VK_FORMAT_R16_UNORM,Ae as VK_FORMAT_R32G32B32A32_SFLOAT,Le as VK_FORMAT_R32G32B32A32_SINT,Be as VK_FORMAT_R32G32B32A32_UINT,De as VK_FORMAT_R32G32B32_SFLOAT,we as VK_FORMAT_R32G32B32_SINT,me as VK_FORMAT_R32G32B32_UINT,de as VK_FORMAT_R32G32_SFLOAT,be as VK_FORMAT_R32G32_SINT,ue as VK_FORMAT_R32G32_UINT,xe as VK_FORMAT_R32_SFLOAT,ye as VK_FORMAT_R32_SINT,ge as VK_FORMAT_R32_UINT,st as VK_FORMAT_R4G4B4A4_UNORM_PACK16,it as VK_FORMAT_R4G4_UNORM_PACK8,lt as VK_FORMAT_R5G5B5A1_UNORM_PACK16,rt as VK_FORMAT_R5G6B5_UNORM_PACK16,ze as VK_FORMAT_R64G64B64A64_SFLOAT,Ce as VK_FORMAT_R64G64B64A64_SINT,Pe as VK_FORMAT_R64G64B64A64_UINT,Fe as VK_FORMAT_R64G64B64_SFLOAT,Ee as VK_FORMAT_R64G64B64_SINT,Ve as VK_FORMAT_R64G64B64_UINT,Te as VK_FORMAT_R64G64_SFLOAT,Oe as VK_FORMAT_R64G64_SINT,Ie as VK_FORMAT_R64G64_UINT,Se as VK_FORMAT_R64_SFLOAT,ve as VK_FORMAT_R64_SINT,ke as VK_FORMAT_R64_UINT,Et as VK_FORMAT_R8G8B8A8_SINT,Tt as VK_FORMAT_R8G8B8A8_SNORM,Ft as VK_FORMAT_R8G8B8A8_SRGB,Vt as VK_FORMAT_R8G8B8A8_UINT,Ot as VK_FORMAT_R8G8B8A8_UNORM,Bt as VK_FORMAT_R8G8B8_SINT,wt as VK_FORMAT_R8G8B8_SNORM,Lt as VK_FORMAT_R8G8B8_SRGB,Dt as VK_FORMAT_R8G8B8_UINT,mt as VK_FORMAT_R8G8B8_UNORM,bt as VK_FORMAT_R8G8_SINT,xt as VK_FORMAT_R8G8_SNORM,dt as VK_FORMAT_R8G8_SRGB,ut as VK_FORMAT_R8G8_UINT,yt as VK_FORMAT_R8G8_UNORM,pt as VK_FORMAT_R8_SINT,ht as VK_FORMAT_R8_SNORM,gt as VK_FORMAT_R8_SRGB,_t as VK_FORMAT_R8_UINT,ct as VK_FORMAT_R8_UNORM,Xe as VK_FORMAT_S8_UINT,nt as VK_FORMAT_UNDEFINED,He as VK_FORMAT_X8_D24_UNORM_PACK32,Pi as read,Mi as write}; | true |
Other | mrdoob | three.js | d5c49f58ca81b43118d6810a4bacf5289543e40a.json | Update webgl_panorama_cube.html (#22065)
* Update webgl_panorama_cube.html
* Update webgl_panorama_cube.html
* Update webgl_panorama_cube.html | examples/webgl_panorama_cube.html | @@ -73,28 +73,25 @@
}
- const imageObj = new Image();
+ new THREE.ImageLoader()
+ .load( atlasImgUrl, ( image ) => {
- imageObj.onload = function () {
+ let canvas, context;
+ const tileWidth = image.height;
- let canvas, context;
- const tileWidth = imageObj.height;
+ for ( let i = 0; i < textures.length; i ++ ) {
- for ( let i = 0; i < textures.length; i ++ ) {
+ canvas = document.createElement( 'canvas' );
+ context = canvas.getContext( '2d' );
+ canvas.height = tileWidth;
+ canvas.width = tileWidth;
+ context.drawImage( image, tileWidth * i, 0, tileWidth, tileWidth, 0, 0, tileWidth, tileWidth );
+ textures[ i ].image = canvas;
+ textures[ i ].needsUpdate = true;
- canvas = document.createElement( 'canvas' );
- context = canvas.getContext( '2d' );
- canvas.height = tileWidth;
- canvas.width = tileWidth;
- context.drawImage( imageObj, tileWidth * i, 0, tileWidth, tileWidth, 0, 0, tileWidth, tileWidth );
- textures[ i ].image = canvas;
- textures[ i ].needsUpdate = true;
+ }
- }
-
- };
-
- imageObj.src = atlasImgUrl;
+ } );
return textures;
| false |
Other | mrdoob | three.js | 8fb030c04113613b41fc63c3db6b698673494063.json | Fix regression in WebXR (#22074)
* Fix regression in WebXR
* Use WebGLState to set WebXR framebuffer
Co-authored-by: Rik Cabanier <cabanier@fb.com> | src/renderers/webxr/WebXRManager.js | @@ -496,7 +496,7 @@ class WebXRManager extends EventDispatcher {
const glSubImage = glBinding.getViewSubImage( glProjLayer, view );
- gl.bindFramebuffer( gl.FRAMEBUFFER, glFramebuffer );
+ state.bindXRFramebuffer( glFramebuffer );
gl.framebufferTexture2D( gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glSubImage.colorTexture, 0 );
@@ -506,10 +506,6 @@ class WebXRManager extends EventDispatcher {
}
- gl.bindFramebuffer( gl.FRAMEBUFFER, null );
-
- state.bindXRFramebuffer( glFramebuffer );
-
viewport = glSubImage.viewport;
} | false |
Other | mrdoob | three.js | feb76129726cb2c9a56942e7875b50b6a2330963.json | Add index cache for vao | src/renderers/webgl/WebGLBindingStates.js | @@ -25,9 +25,9 @@
}
- updateBuffers = needsUpdate( geometry );
+ updateBuffers = needsUpdate( geometry, index );
- if ( updateBuffers ) saveCache( geometry );
+ if ( updateBuffers ) saveCache( geometry, index );
} else {
@@ -157,13 +157,14 @@
enabledAttributes: enabledAttributes,
attributeDivisors: attributeDivisors,
object: vao,
- attributes: {}
+ attributes: {},
+ index: null
};
}
- function needsUpdate( geometry ) {
+ function needsUpdate( geometry, index ) {
const cachedAttributes = currentState.attributes;
const geometryAttributes = geometry.attributes;
@@ -181,11 +182,13 @@
}
+ if ( currentState.index !== index ) return true;
+
return false;
}
- function saveCache( geometry ) {
+ function saveCache( geometry, index ) {
const cache = {};
const attributes = geometry.attributes;
@@ -209,6 +212,8 @@
currentState.attributes = cache;
+ currentState.index = index;
+
}
function initAttributes() { | false |
Other | mrdoob | three.js | b2ada74c5ca0f9c7178cd13f53784f0cdd8ca9fd.json | keep last 100 lines (instead of first)
also added color and prefix for `console.warn` and `console.error` | threejs/resources/threejs-lessons-helper.js | @@ -131,8 +131,6 @@
overflow: 'auto',
background: 'rgba(221, 221, 221, 0.9)',
});
- var numLinesRemaining = 100;
- var added = false;
const toggle = document.createElement('div');
let show = false;
Object.assign(toggle.style, {
@@ -151,36 +149,52 @@
}
showHideConsole();
- function addLine(type, str) {
- var div = document.createElement('div');
- div.textContent = str;
+ const maxLines = 100;
+ const lines = [];
+ let added = false;
+
+ function addLine(type, str, color, prefix) {
+ const div = document.createElement('div');
+ div.textContent = prefix + str;
div.className = type;
+ div.style.color = color;
parent.appendChild(div);
+ lines.push(div);
if (!added) {
added = true;
document.body.appendChild(parent);
+ document.body.appendChild(toggle);
}
+ // scrollIntoView only works in Chrome
+ // In Firefox and Safari scrollIntoView inside an iframe moves
+ // that element into the view. It should argably only move that
+ // element inside the iframe itself, otherwise that's giving
+ // any random iframe control to bring itself into view against
+ // the parent's wishes.
+ //
+ // div.scrollIntoView();
}
- function addLines(type, str) {
- if (numLinesRemaining) {
- --numLinesRemaining;
- addLine(type, str);
+ function addLines(type, str, color, prefix) {
+ while (lines.length > maxLines) {
+ const div = lines.shift();
+ div.parentNode.removeChild(div);
}
+ addLine(type, str, color, prefix);
}
- function wrapFunc(obj, funcName) {
- var oldFn = obj[funcName];
+ function wrapFunc(obj, funcName, color, prefix) {
+ const oldFn = obj[funcName];
origConsole[funcName] = oldFn.bind(obj);
- return function() {
- addLines(funcName, [].join.call(arguments, ' '));
+ return function(...args) {
+ addLines(funcName, [...args].join(' '), color, prefix);
oldFn.apply(obj, arguments);
};
}
- window.console.log = wrapFunc(window.console, 'log');
- window.console.warn = wrapFunc(window.console, 'warn');
- window.console.error = wrapFunc(window.console, 'error');
+ window.console.log = wrapFunc(window.console, 'log', 'black', '');
+ window.console.warn = wrapFunc(window.console, 'warn', 'black', '⚠');
+ window.console.error = wrapFunc(window.console, 'error', 'red', '❌');
}
/** | false |
Other | mrdoob | three.js | b5cbff9d54bcdc4797366414e78871c384f5e878.json | add console toggle | threejs/resources/threejs-lessons-helper.js | @@ -133,6 +133,23 @@
});
var numLinesRemaining = 100;
var added = false;
+ const toggle = document.createElement('div');
+ let show = false;
+ Object.assign(toggle.style, {
+ position: 'absolute',
+ right: 0,
+ bottom: 0,
+ background: '#EEE',
+ 'max-height': '2ex',
+ });
+ toggle.addEventListener('click', showHideConsole);
+
+ function showHideConsole() {
+ show = !show;
+ toggle.textContent = show ? '☒' : '☐';
+ parent.style.display = show ? '' : 'none';
+ }
+ showHideConsole();
function addLine(type, str) {
var div = document.createElement('div'); | false |
Other | mrdoob | three.js | 914b48a7b76e291c3d1a4f34514f3a9b9243624e.json | use new technique to keep 3d and scrolling in sync | threejs/lessons/resources/threejs-primitives.js | @@ -393,7 +393,7 @@ function main() {
return addElem(parent, 'div', className);
}
- const renderFuncs = [
+ const primRenderFuncs = [
...[...document.querySelectorAll('[data-primitive]')].map(createPrimitiveDOM),
...[...document.querySelectorAll('[data-primitive-diagram]')].map(createPrimitiveDiagram),
];
@@ -567,8 +567,24 @@ function main() {
renderer.setScissorTest(true);
- renderFuncs.forEach((fn) => {
- fn(renderer, time);
+ // maybe there is another way. Originally I used `position: fixed`
+ // but the problem is if we can't render as fast as the browser
+ // scrolls then our shapes lag. 1 or 2 frames of lag isn't too
+ // horrible but iOS would often been 1/2 a second or worse.
+ // By doing it this way the canvas will scroll which means the
+ // worse that happens is part of the shapes scrolling on don't
+ // get drawn for a few frames but the shapes that are on the screen
+ // scroll perfectly.
+ //
+ // I'm using `transform` on the voodoo that it doesn't affect
+ // layout as much as `top` since AFAIK setting `top` is in
+ // the flow but `transform` is not though thinking about it
+ // the given we're `position: absolute` maybe there's no difference?
+ const transform = `translateY(${window.scrollY}px)`;
+ renderer.domElement.style.transform = transform;
+
+ primRenderFuncs.forEach((fn) => {
+ fn(renderer, time);
});
requestAnimationFrame(render); | true |
Other | mrdoob | three.js | 914b48a7b76e291c3d1a4f34514f3a9b9243624e.json | use new technique to keep 3d and scrolling in sync | threejs/lessons/threejs-primitives.md | @@ -380,7 +380,7 @@ to use it](threejs-scenegraph.html).
flex: 1 1 auto;
}
#c {
- position: fixed;
+ position: absolute;
top: 0;
left: 0;
width: 100vw; | true |
Other | mrdoob | three.js | e95a9252bcd683bd6d58e92f4b214526ca4aa799.json | use TrackballControls instead of OrbitControls
Ideally we'd like to spin the object, not the camera. | threejs/lessons/resources/threejs-primitives.js | @@ -393,8 +393,10 @@ function main() {
return addElem(parent, 'div', className);
}
- document.querySelectorAll('[data-primitive]').forEach(createPrimitiveDOM);
- document.querySelectorAll('[data-primitive-diagram]').forEach(createPrimitiveDiagram);
+ const renderFuncs = [
+ ...[...document.querySelectorAll('[data-primitive]')].map(createPrimitiveDOM),
+ ...[...document.querySelectorAll('[data-primitive-diagram]')].map(createPrimitiveDiagram),
+ ];
function createPrimitiveDOM(base) {
const name = base.dataset.primitive;
@@ -416,7 +418,7 @@ function main() {
}
addDiv(right, '.note').innerHTML = text;
- createPrimitive(elem, info);
+ return createPrimitive(elem, info);
}
function createPrimitiveDiagram(base) {
@@ -425,7 +427,7 @@ function main() {
if (!info) {
throw new Error(`no primitive ${name}`);
}
- createPrimitive(base, info);
+ return createPrimitive(base, info);
}
function createPrimitive(elem, info) {
@@ -448,9 +450,9 @@ function main() {
const camera = new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);
camera.position.z = 15;
- const controls = new THREE.OrbitControls(camera, elem);
- controls.enableZoom = false;
- controls.enablePan = false;
+ const controls = new THREE.TrackballControls(camera, elem);
+ controls.noZoom = true;
+ controls.noPan = true;
promise.then((geometryInfo) => {
if (geometryInfo instanceof THREE.BufferGeometry ||
@@ -489,12 +491,45 @@ function main() {
}
});
- Object.assign(info, {
- scene,
- root,
- elem,
- camera,
- });
+ let oldWidth = -1;
+ let oldHeight = -1;
+
+ function render(renderer, time) {
+ root.rotation.x = time * .1;
+ root.rotation.y = time * .11;
+
+ const rect = elem.getBoundingClientRect();
+ if (rect.bottom < 0 || rect.top > renderer.domElement.clientHeight ||
+ rect.right < 0 || rect.left > renderer.domElement.clientWidth) {
+ return;
+ }
+
+ const width = (rect.right - rect.left) * pixelRatio;
+ const height = (rect.bottom - rect.top) * pixelRatio;
+ const left = rect.left * pixelRatio;
+ const top = rect.top * pixelRatio;
+
+ if (width !== oldWidth || height !== oldHeight) {
+ controls.handleResize();
+ }
+ controls.update();
+
+ const aspect = width / height;
+ const targetFov = THREE.Math.degToRad(60);
+ const fov = aspect >= 1
+ ? targetFov
+ : (2 * Math.atan(Math.tan(targetFov * .5) / aspect));
+
+ camera.fov = THREE.Math.radToDeg(fov);
+ camera.aspect = aspect;
+ camera.updateProjectionMatrix();
+
+ renderer.setViewport(left, top, width, height);
+ renderer.setScissor(left, top, width, height);
+ renderer.render(scene, camera);
+ }
+
+ return render;
}
const pixelRatio = 2; // even on low-res we want hi-res rendering
@@ -520,43 +555,15 @@ function main() {
resizeRendererToDisplaySize(renderer);
renderer.setScissorTest(false);
- // renderer.clear();
// Three r93 needs to render at least once for some reason.
renderer.render(scene, camera);
renderer.setScissorTest(true);
- for (const info of Object.values(primitives)) {
- const {root, scene, camera, elem} = info;
- root.rotation.x = time * .1;
- root.rotation.y = time * .11;
-
- const rect = elem.getBoundingClientRect();
- if (rect.bottom < 0 || rect.top > renderer.domElement.clientHeight ||
- rect.right < 0 || rect.left > renderer.domElement.clientWidth) {
- continue;
- }
-
- const width = (rect.right - rect.left) * pixelRatio;
- const height = (rect.bottom - rect.top) * pixelRatio;
- const left = rect.left * pixelRatio;
- const top = rect.top * pixelRatio;
-
- const aspect = width / height;
- const targetFov = THREE.Math.degToRad(60);
- const fov = aspect >= 1
- ? targetFov
- : (2 * Math.atan(Math.tan(targetFov * .5) / aspect));
-
- camera.fov = THREE.Math.radToDeg(fov);
- camera.aspect = aspect;
- camera.updateProjectionMatrix();
-
- renderer.setViewport(left, top, width, height);
- renderer.setScissor(left, top, width, height);
- renderer.render(scene, camera);
- }
+ renderFuncs.forEach((fn) => {
+ fn(renderer, time);
+ });
requestAnimationFrame(render);
} | true |
Other | mrdoob | three.js | e95a9252bcd683bd6d58e92f4b214526ca4aa799.json | use TrackballControls instead of OrbitControls
Ideally we'd like to spin the object, not the camera. | threejs/lessons/threejs-primitives.md | @@ -338,7 +338,7 @@ to use it](threejs-scenegraph.html).
<canvas id="c"></canvas>
<script src="../resources/threejs/r93/three.min.js"></script>
-<script src="../resources/threejs/r93/js/controls/OrbitControls.js"></script>
+<script src="../resources/threejs/r93/js/controls/TrackballControls.js"></script>
<script src="resources/threejs-primitives.js"></script>
<style>
.spread { | true |
Other | mrdoob | three.js | 2dfb0c0ad5dec1f8ee02508ed433b136900f8349.json | add primitives to toc | threejs/lessons/toc.html | @@ -3,6 +3,7 @@
<ul>
<li><a href="/threejs/lessons/threejs-fundamentals.html">Three.js Fundamentals</a></li>
<li><a href="/threejs/lessons/threejs-responsive.html">Three.js Responsive Design</a></li>
+ <li><a href="/threejs/lessons/threejs-primitives.html">Three.js Primitives</a></li>
</ul>
</ul>
<ul> | false |
Other | mrdoob | three.js | fe99d38f51cdc05ac6c564d0881b062453db60e1.json | add link to primitives article | threejs/lessons/threejs-responsive.md | @@ -267,5 +267,5 @@ display and you compare this sample to those above you should
notice the edges are more crisp.
This article covered a very basic but fundamental topic. Next up lets quickly
-go over the basic primitives that three.js provides.
+[go over the basic primitives that three.js provides](threejs-primitives.html).
| false |
Other | mrdoob | three.js | 7a9f54c29a9be43c63fa196d715f498bced2a16c.json | add place holder for scene graph article. | threejs/lessons/threejs-scenegraph.md | @@ -0,0 +1,5 @@
+Title: Three.js Scenegraph
+Description: What's a scene graph?
+
+TBD
+ | false |
Other | mrdoob | three.js | cfa3d0792916dadd27758390ce4a4a6187aa14ea.json | add primitives article | threejs/lessons/resources/threejs-primitives.js | @@ -0,0 +1,562 @@
+'use strict';
+
+function main() {
+
+ const primitives = {
+ BoxBufferGeometry: {
+ create() {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ return new THREE.BoxBufferGeometry(width, height, depth);
+ },
+ },
+ CircleBufferGeometry: {
+ create() {
+ const radius = 7;
+ const segments = 24;
+ return new THREE.CircleBufferGeometry(radius, segments);
+ },
+ },
+ ConeBufferGeometry: {
+ create() {
+ const radius = 6;
+ const height = 8;
+ const segments = 16;
+ return new THREE.ConeBufferGeometry(radius, height, segments);
+ },
+ },
+ CylinderBufferGeometry: {
+ create() {
+ const radiusTop = 4;
+ const radiusBottom = 4;
+ const height = 8;
+ const radialSegments = 12;
+ return new THREE.CylinderBufferGeometry(radiusTop, radiusBottom, height, radialSegments);
+ },
+ },
+ DodecahedronBufferGeometry: {
+ create() {
+ const radius = 7;
+ return new THREE.DodecahedronBufferGeometry(radius);
+ },
+ },
+ ExtrudeBufferGeometry: {
+ create() {
+ const shape = new THREE.Shape();
+ const x = -2.5;
+ const y = -5;
+ shape.moveTo(x + 2.5, y + 2.5);
+ shape.bezierCurveTo(x + 2.5, y + 2.5, x + 2, y, x, y);
+ shape.bezierCurveTo(x - 3, y, x - 3, y + 3.5, x - 3, y + 3.5);
+ shape.bezierCurveTo(x - 3, y + 5.5, x - 1.5, y + 7.7, x + 2.5, y + 9.5);
+ shape.bezierCurveTo(x + 6, y + 7.7, x + 8, y + 4.5, x + 8, y + 3.5);
+ shape.bezierCurveTo(x + 8, y + 3.5, x + 8, y, x + 5, y);
+ shape.bezierCurveTo(x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5);
+
+ const extrudeSettings = {
+ steps: 2,
+ depth: 2,
+ bevelEnabled: true,
+ bevelThickness: 1,
+ bevelSize: 1,
+ bevelSegments: 2,
+ };
+
+ return new THREE.ExtrudeBufferGeometry(shape, extrudeSettings);
+ },
+ },
+ IcosahedronBufferGeometry: {
+ create() {
+ const radius = 7;
+ return new THREE.IcosahedronBufferGeometry(radius);
+ },
+ },
+ LatheBufferGeometry: {
+ create() {
+ const points = [];
+ for (let i = 0; i < 10; ++i) {
+ points.push(new THREE.Vector2(Math.sin(i * 0.2) * 3 + 3, (i - 5) * .8));
+ }
+ return new THREE.LatheBufferGeometry(points);
+ },
+ },
+ OctahedronBufferGeometry: {
+ create() {
+ const radius = 7;
+ return new THREE.OctahedronBufferGeometry(radius);
+ },
+ },
+ ParametricBufferGeometry: {
+ create() {
+ /*
+ from: https://github.com/mrdoob/three.js/blob/b8d8a8625465bd634aa68e5846354d69f34d2ff5/examples/js/ParametricGeometries.js
+
+ The MIT License
+
+ Copyright © 2010-2018 three.js authors
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ */
+ function klein(v, u, target) {
+ u *= Math.PI;
+ v *= 2 * Math.PI;
+ u = u * 2;
+
+ let x;
+ let y;
+ let z;
+
+ if (u < Math.PI) {
+ x = 3 * Math.cos(u) * (1 + Math.sin(u)) + (2 * (1 - Math.cos(u) / 2)) * Math.cos(u) * Math.cos(v);
+ z = -8 * Math.sin(u) - 2 * (1 - Math.cos(u) / 2) * Math.sin(u) * Math.cos(v);
+ } else {
+ x = 3 * Math.cos(u) * (1 + Math.sin(u)) + (2 * (1 - Math.cos(u) / 2)) * Math.cos(v + Math.PI);
+ z = -8 * Math.sin(u);
+ }
+
+ y = -2 * (1 - Math.cos(u) / 2) * Math.sin(v);
+
+ target.set(x, y, z).multiplyScalar(0.75);
+ }
+
+ const slices = 25;
+ const stacks = 25;
+ return new THREE.ParametricBufferGeometry(klein, slices, stacks);
+ },
+ },
+ PlaneBufferGeometry: {
+ create() {
+ const width = 9;
+ const height = 9;
+ const widthSegments = 2;
+ const heightSegments = 2;
+ return new THREE.PlaneBufferGeometry(width, height, widthSegments, heightSegments);
+ },
+ },
+ PolyhedronBufferGeometry: {
+ create() {
+ const verticesOfCube = [
+ -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1,
+ -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
+ ];
+ const indicesOfFaces = [
+ 2, 1, 0, 0, 3, 2,
+ 0, 4, 7, 7, 3, 0,
+ 0, 1, 5, 5, 4, 0,
+ 1, 2, 6, 6, 5, 1,
+ 2, 3, 7, 7, 6, 2,
+ 4, 5, 6, 6, 7, 4,
+ ];
+ const radius = 7;
+ const detail = 2;
+ return new THREE.PolyhedronBufferGeometry(verticesOfCube, indicesOfFaces, radius, detail);
+ },
+ },
+ RingBufferGeometry: {
+ create() {
+ const innerRadius = 2;
+ const outerRadius = 7;
+ const segments = 18;
+ return new THREE.RingBufferGeometry(innerRadius, outerRadius, segments);
+ },
+ },
+ ShapeBufferGeometry: {
+ create() {
+ const shape = new THREE.Shape();
+ const x = -2.5;
+ const y = -5;
+ shape.moveTo(x + 2.5, y + 2.5);
+ shape.bezierCurveTo(x + 2.5, y + 2.5, x + 2, y, x, y);
+ shape.bezierCurveTo(x - 3, y, x - 3, y + 3.5, x - 3, y + 3.5);
+ shape.bezierCurveTo(x - 3, y + 5.5, x - 1.5, y + 7.7, x + 2.5, y + 9.5);
+ shape.bezierCurveTo(x + 6, y + 7.7, x + 8, y + 4.5, x + 8, y + 3.5);
+ shape.bezierCurveTo(x + 8, y + 3.5, x + 8, y, x + 5, y);
+ shape.bezierCurveTo(x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5);
+ return new THREE.ShapeBufferGeometry(shape);
+ },
+ },
+ SphereBufferGeometry: {
+ create() {
+ const radius = 7;
+ const widthSegments = 12;
+ const heightSegments = 8;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ },
+ TetrahedronBufferGeometry: {
+ create() {
+ const radius = 7;
+ return new THREE.TetrahedronBufferGeometry(radius);
+ },
+ },
+ TextBufferGeometry: {
+ create() {
+ return new Promise((resolve) => {
+ const loader = new THREE.FontLoader();
+
+ loader.load('../resources/threejs/fonts/helvetiker_regular.typeface.json', (font) => {
+ resolve(new THREE.TextBufferGeometry('three.js', {
+ font: font,
+ size: 3.0,
+ height: .2,
+ curveSegments: 12,
+ bevelEnabled: true,
+ bevelThickness: 0.15,
+ bevelSize: .3,
+ bevelSegments: 5,
+ }));
+ });
+ });
+ },
+ },
+ TorusBufferGeometry: {
+ create() {
+ const radius = 5;
+ const tubeRadius = 2;
+ const radialSegments = 8;
+ const tubularSegments = 24;
+ return new THREE.TorusBufferGeometry(radius, tubeRadius, radialSegments, tubularSegments);
+ },
+ },
+ TorusKnotBufferGeometry: {
+ create() {
+ const radius = 3.5;
+ const tube = 1.5;
+ const radialSegments = 8;
+ const tubularSegments = 64;
+ const p = 2;
+ const q = 3;
+ return new THREE.TorusKnotBufferGeometry(radius, tube, tubularSegments, radialSegments, p, q);
+ },
+ },
+ TubeBufferGeometry: {
+ create() {
+ class CustomSinCurve extends THREE.Curve {
+ constructor(scale) {
+ super();
+ this.scale = scale;
+ }
+ getPoint(t) {
+ const tx = t * 3 - 1.5;
+ const ty = Math.sin(2 * Math.PI * t);
+ const tz = 0;
+ return new THREE.Vector3(tx, ty, tz).multiplyScalar(this.scale);
+ }
+ }
+
+ const path = new CustomSinCurve(4);
+ const tubularSegments = 20;
+ const radius = 1;
+ const radialSegments = 8;
+ const closed = false;
+ return new THREE.TubeBufferGeometry(path, tubularSegments, radius, radialSegments, closed);
+ },
+ },
+ EdgesGeometry: {
+ create() {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ return {
+ lineGeometry: new THREE.EdgesGeometry(new THREE.BoxBufferGeometry(width, height, depth)),
+ };
+ },
+ nonBuffer: false,
+ },
+ WireframeGeometry: {
+ create() {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ return {
+ lineGeometry: new THREE.WireframeGeometry(new THREE.BoxBufferGeometry(width, height, depth)),
+ };
+ },
+ nonBuffer: false,
+ },
+ SphereBufferGeometryLow: {
+ create() {
+ const radius = 7;
+ const widthSegments = 5;
+ const heightSegments = 3;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ },
+ SphereBufferGeometryMedium: {
+ create() {
+ const radius = 7;
+ const widthSegments = 24;
+ const heightSegments = 10;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ },
+ SphereBufferGeometryHigh: {
+ create() {
+ const radius = 7;
+ const widthSegments = 50;
+ const heightSegments = 50;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ },
+ SphereBufferGeometryLowSmooth: {
+ create() {
+ const radius = 7;
+ const widthSegments = 5;
+ const heightSegments = 3;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ showLines: false,
+ flatShading: false,
+ },
+ SphereBufferGeometryMediumSmooth: {
+ create() {
+ const radius = 7;
+ const widthSegments = 24;
+ const heightSegments = 10;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ showLines: false,
+ flatShading: false,
+ },
+ SphereBufferGeometryHighSmooth: {
+ create() {
+ const radius = 7;
+ const widthSegments = 50;
+ const heightSegments = 50;
+ return new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments);
+ },
+ showLines: false,
+ flatShading: false,
+ },
+ PlaneBufferGeometryLow: {
+ create() {
+ const width = 9;
+ const height = 9;
+ const widthSegments = 1;
+ const heightSegments = 1;
+ return new THREE.PlaneBufferGeometry(width, height, widthSegments, heightSegments);
+ },
+ },
+ PlaneBufferGeometryHigh: {
+ create() {
+ const width = 9;
+ const height = 9;
+ const widthSegments = 10;
+ const heightSegments = 10;
+ return new THREE.PlaneBufferGeometry(width, height, widthSegments, heightSegments);
+ },
+ },
+ };
+
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas, alpha: true});
+
+ function addLink(parent, name) {
+ const a = document.createElement('a');
+ a.href = `https://threejs.org/docs/#api/geometries/${name}`;
+ const code = document.createElement('code');
+ code.textContent = name;
+ a.appendChild(code);
+ parent.appendChild(a);
+ return a;
+ }
+
+ function addElem(parent, type, className, text) {
+ const elem = document.createElement(type);
+ elem.className = className;
+ if (text) {
+ elem.textContent = text;
+ }
+ parent.appendChild(elem);
+ return elem;
+ }
+
+ function addDiv(parent, className) {
+ return addElem(parent, 'div', className);
+ }
+
+ document.querySelectorAll('[data-primitive]').forEach(createPrimitiveDOM);
+ document.querySelectorAll('[data-primitive-diagram]').forEach(createPrimitiveDiagram);
+
+ function createPrimitiveDOM(base) {
+ const name = base.dataset.primitive;
+ const info = primitives[name];
+ if (!info) {
+ throw new Error(`no primitive ${name}`);
+ }
+
+ const text = base.innerHTML;
+ base.innerHTML = '';
+
+ const elem = addDiv(base, 'shape');
+
+ const right = addDiv(base, 'desc');
+ addLink(right, name);
+ if (info.nonBuffer !== false) {
+ addElem(right, 'span', '', ', ');
+ addLink(right, name.replace('Buffer', ''));
+ }
+ addDiv(right, '.note').innerHTML = text;
+
+ createPrimitive(elem, info);
+ }
+
+ function createPrimitiveDiagram(base) {
+ const name = base.dataset.primitiveDiagram;
+ const info = primitives[name];
+ if (!info) {
+ throw new Error(`no primitive ${name}`);
+ }
+ createPrimitive(base, info);
+ }
+
+ function createPrimitive(elem, info) {
+ const geometry = info.create();
+ const promise = (geometry instanceof Promise) ? geometry : Promise.resolve(geometry);
+ const scene = new THREE.Scene();
+
+ const root = new THREE.Object3D();
+ scene.add(root);
+
+ scene.add(new THREE.HemisphereLight(0xaaaaaa, 0x444444));
+ const light = new THREE.DirectionalLight(0xffffff, 1);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+
+ const fov = 60;
+ const aspect = 1;
+ const zNear = 0.1;
+ const zFar = 50;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);
+ camera.position.z = 15;
+
+ const controls = new THREE.OrbitControls(camera, elem);
+ controls.enableZoom = false;
+ controls.enablePan = false;
+
+ promise.then((geometryInfo) => {
+ if (geometryInfo instanceof THREE.BufferGeometry ||
+ geometryInfo instanceof THREE.Geometry) {
+ const geometry = geometryInfo;
+ geometryInfo = {
+ geometry,
+ };
+ }
+
+ const boxGeometry = geometryInfo.geometry || geometryInfo.lineGeometry;
+ boxGeometry.computeBoundingBox();
+ const centerOffset = new THREE.Vector3();
+ boxGeometry.boundingBox.getCenter(centerOffset).multiplyScalar(-1);
+
+ if (geometryInfo.geometry) {
+ const material = new THREE.MeshPhongMaterial({
+ flatShading: info.flatShading === false ? false : true,
+ side: THREE.DoubleSide,
+ });
+ material.color.setHSL(Math.random(), .5, .5);
+ const mesh = new THREE.Mesh(geometryInfo.geometry, material);
+ mesh.position.copy(centerOffset);
+ root.add(mesh);
+ }
+ if (info.showLines !== false) {
+ const lineMesh = new THREE.LineSegments(
+ geometryInfo.lineGeometry || geometryInfo.geometry,
+ new THREE.LineBasicMaterial({
+ color: geometryInfo.geometry ? 0xffffff : 0x000000,
+ transparent: true,
+ opacity: 0.5,
+ }));
+ lineMesh.position.copy(centerOffset);
+ root.add(lineMesh);
+ }
+ });
+
+ Object.assign(info, {
+ scene,
+ root,
+ elem,
+ camera,
+ });
+ }
+
+ const pixelRatio = 2; // even on low-res we want hi-res rendering
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth * pixelRatio;
+ const height = canvas.clientHeight * pixelRatio;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ // Three r93 needs to render at least once for some reason.
+ const scene = new THREE.Scene();
+ const camera = new THREE.Camera();
+
+ function render(time) {
+ time *= 0.001;
+
+ resizeRendererToDisplaySize(renderer);
+
+ renderer.setScissorTest(false);
+ // renderer.clear();
+
+ // Three r93 needs to render at least once for some reason.
+ renderer.render(scene, camera);
+
+ renderer.setScissorTest(true);
+
+ for (const info of Object.values(primitives)) {
+ const {root, scene, camera, elem} = info;
+ root.rotation.x = time * .1;
+ root.rotation.y = time * .11;
+
+ const rect = elem.getBoundingClientRect();
+ if (rect.bottom < 0 || rect.top > renderer.domElement.clientHeight ||
+ rect.right < 0 || rect.left > renderer.domElement.clientWidth) {
+ continue;
+ }
+
+ const width = (rect.right - rect.left) * pixelRatio;
+ const height = (rect.bottom - rect.top) * pixelRatio;
+ const left = rect.left * pixelRatio;
+ const top = rect.top * pixelRatio;
+
+ camera.aspect = width / height;
+ camera.updateProjectionMatrix();
+
+ renderer.setViewport(left, top, width, height);
+ renderer.setScissor(left, top, width, height);
+ renderer.render(scene, camera);
+ }
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+
+ | true |
Other | mrdoob | three.js | cfa3d0792916dadd27758390ce4a4a6187aa14ea.json | add primitives article | threejs/lessons/threejs-primitives.md | @@ -0,0 +1,390 @@
+Title: Three.js Primitives
+Description: A tour of three.js primitives.
+
+This article one in a series of articles about three.js.
+The first article was [about fundamentals](threejs-fundamentals.html).
+If you haven't read that yet you might want to start there.
+
+Three.js has a large number of primitives. Primitives
+are generally 3D shapes that are generated at runtime
+with a bunch of parameters.
+
+It's common to use primitives for things like a sphere
+for globe or a bunch of boxes to draw a 3D graph. It's
+especially common to use primitives to experiment
+and get started with 3D. For the majority if 3D apps
+it's more common to have an artist make 3D models
+in a 3D modeling program. Later in this series we'll
+cover making and loading data from several 3D modeling
+programs. For now let's go over some of the available
+primitives.
+
+<div class="primitives">
+<div data-primitive="BoxBufferGeometry">A Box</div>
+<div data-primitive="CircleBufferGeometry">A flat circle</div>
+<div data-primitive="ConeBufferGeometry">A Cone</div>
+<div data-primitive="CylinderBufferGeometry">A Cylinder</div>
+<div data-primitive="DodecahedronBufferGeometry">A dodecahedron (12 sides)</div>
+<div data-primitive="ExtrudeBufferGeometry">An extruded 2d shape with optional bevelling.
+Here we are extruding a heart shape. Note this is the basis
+for `TextBufferGeometry` and `TextGeometry` respectively.</div>
+<div data-primitive="IcosahedronBufferGeometry">An icosahedron (20 sides)</div>
+<div data-primitive="LatheBufferGeometry">A shape generated by spinning a line</div>
+<div data-primitive="OctahedronBufferGeometry">An Octahedron (8 sides)</div>
+<div data-primitive="ParametricBufferGeometry">A surface generated by providing a function that takes a 2d point from a grid and returns the corresponding 3d point.</div>
+<div data-primitive="PlaneBufferGeometry">A 2D plane</div>
+<div data-primitive="PolyhedronBufferGeometry">Takes a set of triangles centered around a point and projects them onto a sphere</div>
+<div data-primitive="RingBufferGeometry">A 2D disc with a hole in the center</div>
+<div data-primitive="ShapeBufferGeometry">A 2d outline that gets trianglulated</div>
+<div data-primitive="SphereBufferGeometry">A sphere</div>
+<div data-primitive="TetrahedronBufferGeometry">A terahedron (4 sides)</div>
+<div data-primitive="TextBufferGeometry">3D Text generated from a 3D font and a string</div>
+<div data-primitive="TorusBufferGeometry">A torus (donut)</div>
+<div data-primitive="TorusKnotBufferGeometry">A torus knot</div>
+<div data-primitive="TubeBufferGeometry">A circle traced down a path</div>
+<div data-primitive="EdgesGeometry">A helper object that takes another geometry as input and generates edges only if the angle between faces is greater than some threshold. For example if you look at the box at the top it shows a line going through each face showing every triangle that makes the box. Using an EdgesGeometry instead the middle lines are removed.</div>
+<div data-primitive="WireframeGeometry">Generates geometry that contains one line segment (2 points) per edge in the given geometry. With out this you'd often be missing edges or get extra edges since WebGL generally requires 2 points per line segment. For example if all you had was a single triangle there would only be 3 points. If you tried to draw it using a material with <code>wireframe: true</code> you would only get a single line. Passing that triangle geometry to a <code>WireframeGeometry</code> will generate a new Geometry that has 3 lines segments using 6 points..</div>
+</div>
+
+You might notice of most of them come in pairs of `Geometry`
+or `BufferGeometry`. The difference between the 2 types is effectively flexibility
+vs performance.
+
+`BufferGeometry` based primitves are the performance oriented
+types. The vertices for the geometry are generated directly
+into an efficient typed array format ready to be uploaded to the GPU
+for rendering. This means they are faster to start up
+and take less memory but if you want to modify their
+data they take what is often considered more complex
+programming to manipulate.
+
+`Geometry` based primitives are the more flexible, easier to manipulate
+type. They are built from JavaScript based classes like [`Vector3`](https://threejs.org/docs/api/math/Vector3.html) for
+3D points, [`Face3`](https://threejs.org/docs/index.html#api/core/Face3) for triangles.
+They take quite a bit of memory and before they can be rendered three.js will need to
+convert them to something similar to the corresponding `BufferGeometry` representation.
+
+If you know you are not going to manipulate a primitive or
+if you're comfortable doing the math to manipulate their
+internals then it's best to go with the `BufferGeometry`
+based primitives. If on the other hand you want to change
+a few things before rendering you might find the `Geometry`
+based primitives easier to deal with.
+
+As an simple example a `BufferGeometry`
+can not have new vertices easily added. The number of vertices used is
+decided at creation time, storage is created, and then data for vertices
+are filled in. Where as for `Geometry` that is not true.
+
+We'll go over creating custom geometry in another article. For now
+let's make an example creating each type of primitive. We'll start
+with the [examples from the previous article](threejs-responsive.html).
+
+Near the top let's set a background color
+
+```
+const canvas = document.querySelector('#c');
+const renderer = new THREE.WebGLRenderer({canvas: canvas});
++renderer.setClearColor(0xAAAAAA);
+```
+
+This tells three.js to clear to lightish gray.
+
+The camera needs to change position so that we can see all the
+objects.
+
+```
+-const fov = 75;
++const fov = 40;
+const aspect = 2; // the canvas default
+const zNear = 0.1;
+-const zFar = 5;
++const zFar = 1000;
+const camera = new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);
+-camera.position.z = 2;
++camera.position.z = 120;
+```
+
+Let's add a function, `addObject`, that takes an x, y position and an `Object3D` and adds
+the object to the scene.
+
+```
+const objects = [];
+const spread = 15;
+
+function addObject(x, y, obj) {
+ obj.position.x = x * spread;
+ obj.position.y = y * spread;
+
+ scene.add(obj);
+ objects.push(obj);
+}
+```
+
+Let's also make a function to create a random colored material.
+We'll use a feature of `Color` that lets you set a color
+based on hue, saturation, and luminance.
+
+`hue` goes from 0 to 1 around the color wheel with
+red at 0, green at .33 and blue at .66. `saturation`
+goes from 0 to 1 with 0 having no color and 1 being
+most saturated. `luminance` goes from 0 to 1
+with 0 being black, 1 being white and 0.5 being
+the maximum amount of color. In other words
+as `luminance` goes from 0.0 to 0.5 the color
+will go from black to `hue`. From 0.5 to 1.0
+the color will go from `hue` to white.
+
+```
+function createMaterial() {
+ const material = new THREE.MeshPhongMaterial({
+ side: THREE.DoubleSide,
+ });
+
+ const hue = Math.random();
+ const saturation = 1;
+ const luminance = .5;
+ material.color.setHSL(hue, saturation, luminance);
+
+ return material;
+}
+```
+
+We also passed `side: THREE.DoubleSide` to the material.
+This tells three to draw both sides of the triangles
+that make up a shape. For a solid shape like a sphere
+or a cube there's usually no reason to draw the
+back sides of triangles as they all face inside the
+shape. In our case though we are drawing a few things
+like the `PlaneBufferGeometry` and the `ShapeBufferGeometry`
+which are 2 dimensional and so have no inside. Without
+setting `side: THREE.DoubleSide` they would disappear
+when looking at their back sides.
+
+I should note that it's faster to draw when **not** setting
+`side: THREE.DoubleSide` so ideally we'd set it only on
+the materials that really need it but in this case we
+are not drawing too much so there isn't much reason to
+worry about it.
+
+Let's make a function, `addSolidGeometry`, that
+we pass a geometry and it creates a random colored
+material via `createMaterial` and adds it to the scene
+via `addObject`.
+
+```
+function addSolidGeometry(x, y, geometry) {
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ addObject(x, y, mesh);
+}
+```
+
+Now we can use this for the majority of the primitves we create.
+For example creating a box
+
+```
+{
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ addSolidGeometry(-2, -2, new THREE.BoxBufferGeometry(width, height, depth));
+}
+```
+
+Here's the result
+
+{{{example url="../threejs-primitives.html" }}}
+
+There are a couple of notable exceptions to the pattern above.
+The biggest is probably the `TextBufferGeometry`. It needs to load
+3D font data before it can generate a mesh for the text.
+That data loads asynchronously so we need to wait for it
+to load before trying to create the geometry. You can see below
+we create a `FontLoader` and pass it the url to our font
+and a callback. The callback is called after the font loads.
+In the callback we create the geometry
+and call `addObject` to add it the scene.
+
+```
+{
+ const loader = new THREE.FontLoader();
+ loader.load('resources/threejs/fonts/helvetiker_regular.typeface.json', (font) => {
+ const geometry = new THREE.TextBufferGeometry('three.js', {
+ font: font,
+ size: 3.0,
+ height: .2,
+ curveSegments: 12,
+ bevelEnabled: true,
+ bevelThickness: 0.15,
+ bevelSize: .3,
+ bevelSegments: 5,
+ });
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ geometry.computeBoundingBox();
+ geometry.boundingBox.getCenter(mesh.position).multiplyScalar(-1);
+
+ const parent = new THREE.Object3D();
+ parent.add(mesh);
+
+ addObject(-1, 1, parent);
+ });
+}
+```
+
+There's one other difference. We want to spin the text around its
+center but by default three.js creates the text off center. To
+work around this we can ask three.js to compute the bounding
+box of the geometry. We can then call the `getCenter` method
+of the bounding box and pass it our mesh's position object.
+`getCenter` copies the center of the box into the position.
+It also returns the position object so we can call `multiplyScaler(-1)`
+to position the entire object such that its
+effective center is um, ... at the center of the object.
+
+If we then just called `addSolidGeometry` like with previous
+examples it would set the position again which is
+no good. So, in this case we create an `Object3D` which
+is the standard node for the three.js scene graph. `Mesh`
+is inherited from `Object3D` as well. We'll cover how the scene graph
+works in another article. For now it's enough to know that
+like DOM nodes, children are drawn relative to their parent.
+By making an `Object3D` and making our mesh a child of that
+we can position the `Object3D` where ever we want and still
+keep the center offset we set earilier.
+
+If we didn't do this the text would spin off center.
+
+{{{example url="../threejs-primitives-text.html" }}}
+
+Notice the one on the left is not spinning around its center
+where as the one on the right is.
+
+The other exceptions are the 2 line based examples for `EdgesGeometry`
+and `WireframeGeometry`. Instead of calling `addSolidGeometry` they call
+`addLineGeomtry` which looks like this
+
+```
+function addLineGeometry(x, y, geometry) {
+ const material = new THREE.LineBasicMaterial({color: 0x000000});
+ const mesh = new THREE.LineSegments(geometry, material);
+ addObject(x, y, mesh);
+}
+```
+
+It creates a black `LineBasicMaterial` and then creates a `LineSegments`
+object which is a wrapper for `Mesh` that helps three know you're rendering
+line segments (2 points per segment).
+
+Each of the primitives has several parameters you can pass on creation
+and it's best to [look in the documentation](https://threejs.org/docs/) for all of them rather than
+repeat them here. You can also click the links above next to each shape
+to take you directly to the docs for that shape.
+
+One other thing that's important to cover is that almost all shapes
+have various settings for how much to subdivde them. A good example
+might be the sphere geometries. Sphere's take parameters for
+how many divisions to make around and how many top to bottom. For example
+
+<div class="spread">
+<div data-primitive-diagram="SphereBufferGeometryLow"></div>
+<div data-primitive-diagram="SphereBufferGeometryMedium"></div>
+<div data-primitive-diagram="SphereBufferGeometryHigh"></div>
+</div>
+
+The first sphere has 5 segments around and 3 high which is 15 segments
+or 30 triangles. The second sphere has 24 segments by 10. That's 240 segments
+or 480 triangles. The last one has 50 by 50 which is 2500 segments or 5000 triangles.
+
+It's up to you to decide how many subdivisions you need. It might
+look like you need the highest resolution but remove the lines
+and the flat shading and we get this
+
+<div class="spread">
+<div data-primitive-diagram="SphereBufferGeometryLowSmooth"></div>
+<div data-primitive-diagram="SphereBufferGeometryMediumSmooth"></div>
+<div data-primitive-diagram="SphereBufferGeometryHighSmooth"></div>
+</div>
+
+It's now not so clear that the one on the right with 5000 triangles
+is entirely better than the one in the middle with only 480.
+If you're only drawing a few spheres, like say a single globe for
+a map of the earth, then a single 10000 triangle sphere is not a bad
+choice. If on the otherhand you're trying to draw 1000 spheres
+then 1000 spheres times 10000 triangles each is 10 million triangles.
+To animate smoothly you need the browser to draw at 60 frames a
+second so you'd be asking the browser to draw 600 million triangles
+per second. That's a lot of computing.
+
+Sometimes it's easy to choose. For example you can also choose
+to subdivide a plane.
+
+<div class="spread">
+<div data-primitive-diagram="PlaneBufferGeometryLow"></div>
+<div data-primitive-diagram="PlaneBufferGeometryHigh"></div>
+</div>
+
+The plane on the left is 2 triangles. The plane on the right
+is 200 triangles. Unlike the sphere there is really no trade off in quality for most
+use cases of a plane. You'd most likely only subdivide a plane
+if you expected to want to modify or warp it in some way. A box
+is similar.
+
+So, choose whatever is appropriate for your situation. The less
+subdivisions you choose the more likely things will run smoothly. You'll have
+to decide for yourself what the correct tradeoff is.
+
+Next up let's go over [how three's scene graph works and how
+to use it](threejs-scenegraph.html).
+
+<canvas id="c"></canvas>
+<script src="../resources/threejs/r93/three.min.js"></script>
+<script src="../resources/threejs/r93/js/controls/OrbitControls.js"></script>
+<script src="resources/threejs-primitives.js"></script>
+<style>
+.spread {
+ display: flex;
+}
+.spread>div {
+ flex: 1 1 auto;
+ height: 150px;
+}
+.primitives {
+}
+.primitives>div {
+ display: flex;
+ align-items: center;
+ margin-bottom: 1em;
+}
+.primitives .shape {
+ flex: 0 0 auto;
+ width: 200px;
+ height: 200px;
+}
+.primitives .desc {
+ word-wrap: break-word;
+ padding: 1em;
+ min-width: 0;
+}
+.primitives .desc code {
+ white-space: normal;
+}
+@media (max-width: 550px) {
+ .primitives .shape {
+ width: 120px;
+ height: 120px;
+ }
+}
+.primitives .desc {
+ flex: 1 1 auto;
+}
+#c {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100vw;
+ height: 100vh;
+ z-index: -100;
+}
+</style>
+
+ | true |
Other | mrdoob | three.js | cfa3d0792916dadd27758390ce4a4a6187aa14ea.json | add primitives article | threejs/threejs-primitives-text.html | @@ -0,0 +1,147 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - Primitives</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r93/three.min.js"></script>
+<script src="resources/threejs-lessons-helper.js"></script> <!-- you can and should delete this script. it is only used on the site to help with errors -->
+<script>
+'use strict';
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+ renderer.setClearColor(0xAAAAAA);
+
+ const fov = 40;
+ const aspect = 2; // the canvas default
+ const zNear = 0.1;
+ const zFar = 1000;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);
+ camera.position.z = 40;
+
+ const scene = new THREE.Scene();
+
+ {
+ const light = new THREE.DirectionalLight(0xffffff, 1);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+ {
+ const light = new THREE.DirectionalLight(0xffffff, 1);
+ light.position.set(1, -2, -4);
+ scene.add(light);
+ }
+
+ const objects = [];
+ const spread = 15;
+
+ function addObject(x, y, obj) {
+ obj.position.x = x * spread;
+ obj.position.y = y * spread;
+
+ scene.add(obj);
+ objects.push(obj);
+ }
+
+ function createMaterial() {
+ const material = new THREE.MeshPhongMaterial({
+ side: THREE.DoubleSide,
+ });
+
+ const hue = Math.random();
+ const saturation = 1;
+ const luminance = .5;
+ material.color.setHSL(hue, saturation, luminance);
+
+ return material;
+ }
+
+ function addSolidGeometry(x, y, geometry) {
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ addObject(x, y, mesh);
+ }
+
+ {
+ const loader = new THREE.FontLoader();
+ loader.load('resources/threejs/fonts/helvetiker_regular.typeface.json', (font) => {
+ const geometry = new THREE.TextBufferGeometry('three.js', {
+ font: font,
+ size: 3.0,
+ height: .2,
+ curveSegments: 12,
+ bevelEnabled: true,
+ bevelThickness: 0.15,
+ bevelSize: .3,
+ bevelSegments: 5,
+ });
+
+ addSolidGeometry(-.5, 0, geometry);
+
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ geometry.computeBoundingBox();
+ geometry.boundingBox.getCenter(mesh.position).multiplyScalar(-1);
+
+ const parent = new THREE.Object3D();
+ parent.add(mesh);
+
+ addObject(.5, 0, parent);
+ });
+ }
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ function render(time) {
+ time *= 0.001;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ }
+
+ objects.forEach((obj, ndx) => {
+ const speed = .5 + ndx * .05;
+ const rot = time * speed;
+ obj.rotation.x = rot;
+ obj.rotation.y = rot;
+ });
+
+ renderer.render(scene, camera);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+
+ | true |
Other | mrdoob | three.js | cfa3d0792916dadd27758390ce4a4a6187aa14ea.json | add primitives article | threejs/threejs-primitives.html | @@ -0,0 +1,371 @@
+<!-- Licensed under a BSD license. See license.html for license -->
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
+ <title>Three.js - Primitives</title>
+ <style>
+ body {
+ margin: 0;
+ }
+ #c {
+ width: 100vw;
+ height: 100vh;
+ display: block;
+ }
+ </style>
+ </head>
+ <body>
+ <canvas id="c"></canvas>
+ </body>
+<script src="resources/threejs/r93/three.min.js"></script>
+<script src="resources/threejs-lessons-helper.js"></script> <!-- you can and should delete this script. it is only used on the site to help with errors -->
+<script>
+'use strict';
+
+function main() {
+ const canvas = document.querySelector('#c');
+ const renderer = new THREE.WebGLRenderer({canvas: canvas});
+ renderer.setClearColor(0xAAAAAA);
+
+ const fov = 40;
+ const aspect = 2; // the canvas default
+ const zNear = 0.1;
+ const zFar = 1000;
+ const camera = new THREE.PerspectiveCamera(fov, aspect, zNear, zFar);
+ camera.position.z = 120;
+
+ const scene = new THREE.Scene();
+
+ {
+ const light = new THREE.DirectionalLight(0xffffff, 1);
+ light.position.set(-1, 2, 4);
+ scene.add(light);
+ }
+ {
+ const light = new THREE.DirectionalLight(0xffffff, 1);
+ light.position.set(1, -2, -4);
+ scene.add(light);
+ }
+
+ const objects = [];
+ const spread = 15;
+
+ function addObject(x, y, obj) {
+ obj.position.x = x * spread;
+ obj.position.y = y * spread;
+
+ scene.add(obj);
+ objects.push(obj);
+ }
+
+ function createMaterial() {
+ const material = new THREE.MeshPhongMaterial({
+ side: THREE.DoubleSide,
+ });
+
+ const hue = Math.random();
+ const saturation = 1;
+ const luminance = .5;
+ material.color.setHSL(hue, saturation, luminance);
+
+ return material;
+ }
+
+ function addSolidGeometry(x, y, geometry) {
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ addObject(x, y, mesh);
+ }
+
+ function addLineGeometry(x, y, geometry) {
+ const material = new THREE.LineBasicMaterial({color: 0x000000});
+ const mesh = new THREE.LineSegments(geometry, material);
+ addObject(x, y, mesh);
+ }
+
+ {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ addSolidGeometry(-2, 2, new THREE.BoxBufferGeometry(width, height, depth));
+ }
+ {
+ const radius = 7;
+ const segments = 24;
+ addSolidGeometry(-1, 2, new THREE.CircleBufferGeometry(radius, segments));
+ }
+ {
+ const radius = 6;
+ const height = 8;
+ const segments = 16;
+ addSolidGeometry(0, 2, new THREE.ConeBufferGeometry(radius, height, segments));
+ }
+ {
+ const radiusTop = 4;
+ const radiusBottom = 4;
+ const height = 8;
+ const radialSegments = 12;
+ addSolidGeometry(1, 2, new THREE.CylinderBufferGeometry(radiusTop, radiusBottom, height, radialSegments));
+ }
+ {
+ const radius = 7;
+ addSolidGeometry(2, 2, new THREE.DodecahedronBufferGeometry(radius));
+ }
+ {
+ const shape = new THREE.Shape();
+ const x = -2.5;
+ const y = -5;
+ shape.moveTo(x + 2.5, y + 2.5);
+ shape.bezierCurveTo(x + 2.5, y + 2.5, x + 2, y, x, y);
+ shape.bezierCurveTo(x - 3, y, x - 3, y + 3.5, x - 3, y + 3.5);
+ shape.bezierCurveTo(x - 3, y + 5.5, x - 1.5, y + 7.7, x + 2.5, y + 9.5);
+ shape.bezierCurveTo(x + 6, y + 7.7, x + 8, y + 4.5, x + 8, y + 3.5);
+ shape.bezierCurveTo(x + 8, y + 3.5, x + 8, y, x + 5, y);
+ shape.bezierCurveTo(x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5);
+
+ const extrudeSettings = {
+ steps: 2,
+ depth: 2,
+ bevelEnabled: true,
+ bevelThickness: 1,
+ bevelSize: 1,
+ bevelSegments: 2,
+ };
+
+ addSolidGeometry(-2, 1, new THREE.ExtrudeBufferGeometry(shape, extrudeSettings));
+ }
+ {
+ const radius = 7;
+ addSolidGeometry(-1, 1, new THREE.IcosahedronBufferGeometry(radius));
+ }
+ {
+ const points = [];
+ for (let i = 0; i < 10; ++i) {
+ points.push(new THREE.Vector2(Math.sin(i * 0.2) * 3 + 3, (i - 5) * .8));
+ }
+ addSolidGeometry(0, 1, new THREE.LatheBufferGeometry(points));
+ }
+ {
+ const radius = 7;
+ addSolidGeometry(1, 1, new THREE.OctahedronBufferGeometry(radius));
+ }
+ {
+ /*
+ from: https://github.com/mrdoob/three.js/blob/b8d8a8625465bd634aa68e5846354d69f34d2ff5/examples/js/ParametricGeometries.js
+
+ The MIT License
+
+ Copyright © 2010-2018 three.js authors
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+ */
+ function klein(v, u, target) {
+ u *= Math.PI;
+ v *= 2 * Math.PI;
+ u = u * 2;
+
+ let x;
+ let y;
+ let z;
+
+ if (u < Math.PI) {
+ x = 3 * Math.cos(u) * (1 + Math.sin(u)) + (2 * (1 - Math.cos(u) / 2)) * Math.cos(u) * Math.cos(v);
+ z = -8 * Math.sin(u) - 2 * (1 - Math.cos(u) / 2) * Math.sin(u) * Math.cos(v);
+ } else {
+ x = 3 * Math.cos(u) * (1 + Math.sin(u)) + (2 * (1 - Math.cos(u) / 2)) * Math.cos(v + Math.PI);
+ z = -8 * Math.sin(u);
+ }
+
+ y = -2 * (1 - Math.cos(u) / 2) * Math.sin(v);
+
+ target.set(x, y, z).multiplyScalar(0.75);
+ }
+
+ const slices = 25;
+ const stacks = 25;
+ addSolidGeometry(2, 1, new THREE.ParametricBufferGeometry(klein, slices, stacks));
+ }
+ {
+ const width = 9;
+ const height = 9;
+ const widthSegments = 2;
+ const heightSegments = 2;
+ addSolidGeometry(-2, 0, new THREE.PlaneBufferGeometry(width, height, widthSegments, heightSegments));
+ }
+ {
+ const verticesOfCube = [
+ -1, -1, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1,
+ -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,
+ ];
+ const indicesOfFaces = [
+ 2, 1, 0, 0, 3, 2,
+ 0, 4, 7, 7, 3, 0,
+ 0, 1, 5, 5, 4, 0,
+ 1, 2, 6, 6, 5, 1,
+ 2, 3, 7, 7, 6, 2,
+ 4, 5, 6, 6, 7, 4,
+ ];
+ const radius = 7;
+ const detail = 2;
+ addSolidGeometry(-1, 0, new THREE.PolyhedronBufferGeometry(verticesOfCube, indicesOfFaces, radius, detail));
+ }
+ {
+ const innerRadius = 2;
+ const outerRadius = 7;
+ const segments = 18;
+ addSolidGeometry(0, 0, new THREE.RingBufferGeometry(innerRadius, outerRadius, segments));
+ }
+ {
+ const shape = new THREE.Shape();
+ const x = -2.5;
+ const y = -5;
+ shape.moveTo(x + 2.5, y + 2.5);
+ shape.bezierCurveTo(x + 2.5, y + 2.5, x + 2, y, x, y);
+ shape.bezierCurveTo(x - 3, y, x - 3, y + 3.5, x - 3, y + 3.5);
+ shape.bezierCurveTo(x - 3, y + 5.5, x - 1.5, y + 7.7, x + 2.5, y + 9.5);
+ shape.bezierCurveTo(x + 6, y + 7.7, x + 8, y + 4.5, x + 8, y + 3.5);
+ shape.bezierCurveTo(x + 8, y + 3.5, x + 8, y, x + 5, y);
+ shape.bezierCurveTo(x + 3.5, y, x + 2.5, y + 2.5, x + 2.5, y + 2.5);
+ addSolidGeometry(1, 0, new THREE.ShapeBufferGeometry(shape));
+ }
+ {
+ const radius = 7;
+ const widthSegments = 12;
+ const heightSegments = 8;
+ addSolidGeometry(2, 0, new THREE.SphereBufferGeometry(radius, widthSegments, heightSegments));
+ }
+ {
+ const radius = 7;
+ addSolidGeometry(-2, -1, new THREE.TetrahedronBufferGeometry(radius));
+ }
+ {
+ const loader = new THREE.FontLoader();
+ loader.load('resources/threejs/fonts/helvetiker_regular.typeface.json', (font) => {
+ const geometry = new THREE.TextBufferGeometry('three.js', {
+ font: font,
+ size: 3.0,
+ height: .2,
+ curveSegments: 12,
+ bevelEnabled: true,
+ bevelThickness: 0.15,
+ bevelSize: .3,
+ bevelSegments: 5,
+ });
+ const mesh = new THREE.Mesh(geometry, createMaterial());
+ geometry.computeBoundingBox();
+ geometry.boundingBox.getCenter(mesh.position).multiplyScalar(-1);
+
+ const parent = new THREE.Object3D();
+ parent.add(mesh);
+
+ addObject(-1, -1, parent);
+ });
+ }
+ {
+ const radius = 5;
+ const tubeRadius = 2;
+ const radialSegments = 8;
+ const tubularSegments = 24;
+ addSolidGeometry(0, -1, new THREE.TorusBufferGeometry(radius, tubeRadius, radialSegments, tubularSegments));
+ }
+ {
+ const radius = 3.5;
+ const tube = 1.5;
+ const radialSegments = 8;
+ const tubularSegments = 64;
+ const p = 2;
+ const q = 3;
+ addSolidGeometry(1, -1, new THREE.TorusKnotBufferGeometry(radius, tube, tubularSegments, radialSegments, p, q));
+ }
+ {
+ class CustomSinCurve extends THREE.Curve {
+ constructor(scale) {
+ super();
+ this.scale = scale;
+ }
+ getPoint(t) {
+ const tx = t * 3 - 1.5;
+ const ty = Math.sin(2 * Math.PI * t);
+ const tz = 0;
+ return new THREE.Vector3(tx, ty, tz).multiplyScalar(this.scale);
+ }
+ }
+
+ const path = new CustomSinCurve(4);
+ const tubularSegments = 20;
+ const radius = 1;
+ const radialSegments = 8;
+ const closed = false;
+ addSolidGeometry(2, -1, new THREE.TubeBufferGeometry(path, tubularSegments, radius, radialSegments, closed));
+ }
+ {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ addLineGeometry(-1, -2, new THREE.EdgesGeometry(new THREE.BoxBufferGeometry(width, height, depth)));
+ }
+ {
+ const width = 8;
+ const height = 8;
+ const depth = 8;
+ addLineGeometry(1, -2, new THREE.WireframeGeometry(new THREE.BoxBufferGeometry(width, height, depth)));
+ }
+
+ function resizeRendererToDisplaySize(renderer) {
+ const canvas = renderer.domElement;
+ const width = canvas.clientWidth;
+ const height = canvas.clientHeight;
+ const needResize = canvas.width !== width || canvas.height !== height;
+ if (needResize) {
+ renderer.setSize(width, height, false);
+ }
+ return needResize;
+ }
+
+ function render(time) {
+ time *= 0.001;
+
+ if (resizeRendererToDisplaySize(renderer)) {
+ const canvas = renderer.domElement;
+ camera.aspect = canvas.clientWidth / canvas.clientHeight;
+ camera.updateProjectionMatrix();
+ }
+
+ objects.forEach((obj, ndx) => {
+ const speed = .1 + ndx * .05;
+ const rot = time * speed;
+ obj.rotation.x = rot;
+ obj.rotation.y = rot;
+ });
+
+ renderer.render(scene, camera);
+
+ requestAnimationFrame(render);
+ }
+
+ requestAnimationFrame(render);
+}
+
+main();
+</script>
+</html>
+
+ | true |
Other | mrdoob | three.js | 56ad755727a48ec7af915544965cc54c4e52233e.json | fix front page | threejs/lessons/resources/index.css | @@ -5,7 +5,7 @@ body {
.lesson-main>* {
margin: 1em 0;
}
-.background {
+iframe.background {
position: fixed;
width: 100vw;
height: 100vh; | true |
Other | mrdoob | three.js | 56ad755727a48ec7af915544965cc54c4e52233e.json | fix front page | threejs/lessons/resources/lesson.css | @@ -386,7 +386,10 @@ pre.prettyprint, code.prettyprint {
font-size: 24px;
}
iframe {
- max-width: 95% !important;
+ max-width: 95%;
+ }
+ iframe.background {
+ max-width: 100%;
}
}
| true |
Other | mrdoob | three.js | dec477015c0be1beb36e014c3bd6f52ef4514cc0.json | use inline css for console | threejs/resources/threejs-lessons-helper.js | @@ -118,6 +118,17 @@
function setupConsole() {
var parent = document.createElement("div");
parent.className = "console";
+ Object.assign(parent.style, {
+ fontFamily: 'monospace',
+ fontSize: 'medium',
+ maxHeight: '50%',
+ position: 'fixed',
+ bottom: 0,
+ left: 0,
+ width: '100%',
+ overflow: 'auto',
+ background: '#DDD',
+ });
var numLinesRemaining = 100;
var added = false;
| false |
Other | mrdoob | three.js | 3e59cb410279fae5c49b12798ba14acad85d9521.json | allow a 'startPane' parameter to the editor | build/js/build.js | @@ -70,6 +70,16 @@ function replaceParams(str, params) {
return template(params);
}
+function encodeParams(params) {
+ const values = Object.values(params).filter(v => v);
+ if (!values.length) {
+ return '';
+ }
+ return '&' + Object.entries(params).map((kv) => {
+ return `${encodeURIComponent(kv[0])}=${encodeURIComponent(kv[1])}`;
+ }).join('&');
+}
+
function encodeQuery(query) {
if (!query) {
return '';
@@ -126,6 +136,9 @@ Handlebars.registerHelper('example', function(options) {
options.hash.examplePath = options.data.root.examplePath;
options.hash.encodedUrl = encodeURIComponent(encodeUrl(options.hash.url));
options.hash.url = encodeUrl(options.hash.url);
+ options.hash.params = encodeParams({
+ startPane: options.hash.startPane,
+ });
return templateManager.apply("build/templates/example.template", options.hash);
});
| true |
Other | mrdoob | three.js | 3e59cb410279fae5c49b12798ba14acad85d9521.json | allow a 'startPane' parameter to the editor | build/templates/example.template | @@ -1,5 +1,5 @@
<div class="threejs_example_container">
- <iframe class="threejs_example" style="{{width}} {{height}}" src="/threejs/resources/editor.html?url={{{examplePath}}}{{{encodedUrl}}}"></iframe>
+ <iframe class="threejs_example" style="{{width}} {{height}}" src="/threejs/resources/editor.html?url={{{examplePath}}}{{{encodedUrl}}}{{{params}}}"></iframe>
<a class="threejs_center" href="{{{examplePath}}}{{{url}}}" target="_blank">{{{caption}}}</a>
</div>
| true |
Other | mrdoob | three.js | ff170f9f8f92a69b534bc5776c7b42e988364c9a.json | remove unused code | threejs/resources/editor.js | @@ -234,31 +234,7 @@ function resize() {
}
function addCORSSupport(js) {
- if (/requestCORS/.test(js)) {
- return js;
- }
-
- let found = false;
- js = js.replace(/^( +)(img|image)(\.src = )(.*?);.*?$/mg, function(match, indent, variable, code, url) {
- found = true;
- return indent + "requestCORSIfNotSameOrigin(" + variable + ", " + url + ")\n" +
- indent + variable + code + url + ";";
- });
- if (found) {
- js += `
-
-// This is needed if the images are not on the same domain
-// NOTE: The server providing the images must give CORS permissions
-// in order to be able to use the image with WebGL. Most sites
-// do NOT give permission.
-// See: http://webglfundamentals.org/webgl/lessons/webgl-cors-permission.html
-function requestCORSIfNotSameOrigin(img, url) {
- if ((new URL(url)).origin !== window.location.origin) {
- img.crossOrigin = "";
- }
-}
-`;
- }
+ // not yet needed for three.js
return js;
}
| false |
Other | mrdoob | three.js | 0d491c61a9463182d1a0df70d61d01ee2e017917.json | add readme for model | threejs/resources/models/mountain_landscape/readme.md | @@ -0,0 +1,2 @@
+This model is licensed [CC-BY 4.0](https://creativecommons.org/licenses/by/4.0/)
+Author: [elsergio217](https://sketchfab.com/elsergio217) | false |
Other | mrdoob | three.js | e683d1910bf61acaa1c8149d12f81e2b5871f4b7.json | Fix typo in webgpu/constants.js (#22795) | examples/jsm/renderers/webgpu/WebGPURenderer.js | @@ -168,7 +168,7 @@ class WebGPURenderer {
const swapChain = context.configure( {
device: device,
- format: GPUTextureFormat.BRGA8Unorm // this is the only valid swap chain format right now (r121)
+ format: GPUTextureFormat.BGRA8Unorm // this is the only valid swap chain format right now (r121)
} );
this._adapter = adapter;
@@ -489,7 +489,7 @@ class WebGPURenderer {
} else {
- format = GPUTextureFormat.BRGA8Unorm; // default swap chain format
+ format = GPUTextureFormat.BGRA8Unorm; // default swap chain format
}
@@ -896,7 +896,7 @@ class WebGPURenderer {
depthOrArrayLayers: 1
},
sampleCount: this._parameters.sampleCount,
- format: GPUTextureFormat.BRGA8Unorm,
+ format: GPUTextureFormat.BGRA8Unorm,
usage: GPUTextureUsage.RENDER_ATTACHMENT
} );
@@ -935,7 +935,7 @@ class WebGPURenderer {
this._context.configure( {
device: device,
- format: GPUTextureFormat.BRGA8Unorm,
+ format: GPUTextureFormat.BGRA8Unorm,
usage: GPUTextureUsage.RENDER_ATTACHMENT,
size: {
width: Math.floor( this._width * this._pixelRatio ), | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.