How to achieve the gradual disappearance of the line
I want to achieve the effect of the following figure:
Initially I implemented it using the GridHelperclass, but I can't achieve the effect.
Later I used the following code to achieve:
var materialcolor1 = new THREE.MeshBasicMaterial(
color: color1,
vertexColors: THREE.VertexColors,
linewidth: 30,
linecap: 'round',
linejoin: 'round',
transparent: true,
opacity: 0.5,
blending: THREE.MultiplyBlending);
var depthMaterial = new THREE.MeshDepthMaterial();
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(-halfSize, 0, k));
geometry.vertices.push(new THREE.Vector3(halfSize, 0, k));
var line = new THREE.SceneUtils.createMultiMaterialObject(geometry,[material, depthMaterial]);
As a result, no lines are visible in the scene.
Where is the problem with my code? Or is there another effective way to do this?
three.js
add a comment |
I want to achieve the effect of the following figure:
Initially I implemented it using the GridHelperclass, but I can't achieve the effect.
Later I used the following code to achieve:
var materialcolor1 = new THREE.MeshBasicMaterial(
color: color1,
vertexColors: THREE.VertexColors,
linewidth: 30,
linecap: 'round',
linejoin: 'round',
transparent: true,
opacity: 0.5,
blending: THREE.MultiplyBlending);
var depthMaterial = new THREE.MeshDepthMaterial();
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(-halfSize, 0, k));
geometry.vertices.push(new THREE.Vector3(halfSize, 0, k));
var line = new THREE.SceneUtils.createMultiMaterialObject(geometry,[material, depthMaterial]);
As a result, no lines are visible in the scene.
Where is the problem with my code? Or is there another effective way to do this?
three.js
I would useTHREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.
– prisoner849
Nov 14 '18 at 16:14
add a comment |
I want to achieve the effect of the following figure:
Initially I implemented it using the GridHelperclass, but I can't achieve the effect.
Later I used the following code to achieve:
var materialcolor1 = new THREE.MeshBasicMaterial(
color: color1,
vertexColors: THREE.VertexColors,
linewidth: 30,
linecap: 'round',
linejoin: 'round',
transparent: true,
opacity: 0.5,
blending: THREE.MultiplyBlending);
var depthMaterial = new THREE.MeshDepthMaterial();
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(-halfSize, 0, k));
geometry.vertices.push(new THREE.Vector3(halfSize, 0, k));
var line = new THREE.SceneUtils.createMultiMaterialObject(geometry,[material, depthMaterial]);
As a result, no lines are visible in the scene.
Where is the problem with my code? Or is there another effective way to do this?
three.js
I want to achieve the effect of the following figure:
Initially I implemented it using the GridHelperclass, but I can't achieve the effect.
Later I used the following code to achieve:
var materialcolor1 = new THREE.MeshBasicMaterial(
color: color1,
vertexColors: THREE.VertexColors,
linewidth: 30,
linecap: 'round',
linejoin: 'round',
transparent: true,
opacity: 0.5,
blending: THREE.MultiplyBlending);
var depthMaterial = new THREE.MeshDepthMaterial();
var geometry = new THREE.Geometry();
geometry.vertices.push(new THREE.Vector3(-halfSize, 0, k));
geometry.vertices.push(new THREE.Vector3(halfSize, 0, k));
var line = new THREE.SceneUtils.createMultiMaterialObject(geometry,[material, depthMaterial]);
As a result, no lines are visible in the scene.
Where is the problem with my code? Or is there another effective way to do this?
three.js
three.js
edited Nov 14 '18 at 6:15
Vladimir Vagaytsev
2,17592327
2,17592327
asked Nov 14 '18 at 6:00
han moneybagshan moneybags
85
85
I would useTHREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.
– prisoner849
Nov 14 '18 at 16:14
add a comment |
I would useTHREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.
– prisoner849
Nov 14 '18 at 16:14
I would use
THREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.– prisoner849
Nov 14 '18 at 16:14
I would use
THREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.– prisoner849
Nov 14 '18 at 16:14
add a comment |
1 Answer
1
active
oldest
votes
Two approaches of how you can achieve the desired result:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294003%2fhow-to-achieve-the-gradual-disappearance-of-the-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Two approaches of how you can achieve the desired result:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
add a comment |
Two approaches of how you can achieve the desired result:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
add a comment |
Two approaches of how you can achieve the desired result:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>Two approaches of how you can achieve the desired result:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 1, 1000);
camera.position.set(10, 10, 20);
var renderer = new THREE.WebGLRenderer();
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);
var controls = new THREE.OrbitControls(camera, renderer.domElement);
// use attribute
var lineGeom = new THREE.BufferGeometry().setFromPoints(
[
new THREE.Vector3(0, 0, 0),
new THREE.Vector3(0, 10, 0)
]
);
lineGeom.addAttribute("opacity", new THREE.BufferAttribute(new Float32Array([1, 0]), 1));
var lineMat = new THREE.ShaderMaterial(
vertexShader: `
attribute float opacity;
varying float vOpacity;
void main()
vOpacity = opacity;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying float vOpacity;
void main()
gl_FragColor = vec4(1.0, 0.0, 0.0, vOpacity);
`,
transparent: true
);
var line = new THREE.Line(lineGeom, lineMat);
scene.add(line);
// use distance
var grid = new THREE.GridHelper(20, 20, "yellow", "blue");
grid.material = new THREE.ShaderMaterial(
vertexShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
vColor = color;
vPosition = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);
`,
fragmentShader: `
varying vec3 vColor;
varying vec3 vPosition;
void main()
float opacity = smoothstep(-10., 10., vPosition.z);
// float opacity = 1. - (10. - vPosition.z) / 20.; // another option
gl_FragColor = vec4(vColor, opacity);
`,
vertexColors: THREE.VertexColors,
transparent: true
);
scene.add(grid);
render();
function render()
requestAnimationFrame(render);
renderer.render(scene, camera);
body
overflow: hidden;
margin: 0;
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/98/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>answered Nov 14 '18 at 17:29
prisoner849prisoner849
7,64821326
7,64821326
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
add a comment |
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
Your method solved my problem perfectly.Thank you very much.
– han moneybags
Nov 15 '18 at 1:44
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
@hanmoneybags You're welcome :)
– prisoner849
Nov 15 '18 at 6:54
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53294003%2fhow-to-achieve-the-gradual-disappearance-of-the-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I would use
THREE.ShaderMaterial(). Either add a buffer attribute for opacity and process it in the shader or simply do the same just by coordinates of vertices.– prisoner849
Nov 14 '18 at 16:14