mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
BufferGeometry => Geometry
This commit is contained in:
parent
eb40499600
commit
17d5a03d8b
@ -3,7 +3,7 @@ import {
|
||||
Mesh,
|
||||
NearestFilter,
|
||||
OrthographicCamera,
|
||||
PlaneBufferGeometry,
|
||||
PlaneGeometry,
|
||||
RGBAFormat,
|
||||
ShaderMaterial,
|
||||
Uniform,
|
||||
@ -181,7 +181,7 @@ LiquidEffect.prototype.swapBuffers = function () {
|
||||
// from https://threejs.org/examples/js/postprocessing/EffectComposer.js
|
||||
const FullScreenQuad = (function () {
|
||||
const camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
||||
const geometry = new PlaneBufferGeometry(2, 2);
|
||||
const geometry = new PlaneGeometry(2, 2);
|
||||
|
||||
const FullScreenQuad = function (material) {
|
||||
this._mesh = new Mesh(geometry, material);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DoubleSide, Mesh, MeshStandardMaterial, PlaneBufferGeometry } from 'three';
|
||||
import { DoubleSide, Mesh, MeshStandardMaterial, PlaneGeometry } from 'three';
|
||||
import { watch } from 'vue';
|
||||
import Object3D from '../../core/Object3D.js';
|
||||
import { bindProps } from '../../tools.js';
|
||||
@ -39,7 +39,7 @@ export default {
|
||||
bindProps(this, ['metalness', 'roughness'], this.material);
|
||||
watch(() => this.color, (value) => this.material.color.set(value));
|
||||
|
||||
this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments);
|
||||
this.geometry = new PlaneGeometry(this.width, this.height, this.widthSegments, this.heightSegments);
|
||||
this.mesh = new Mesh(this.geometry, this.material);
|
||||
this.initObject3D(this.mesh);
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DoubleSide, MeshBasicMaterial, PlaneBufferGeometry } from 'three';
|
||||
import { DoubleSide, MeshBasicMaterial, PlaneGeometry } from 'three';
|
||||
import { watch } from 'vue';
|
||||
import Image from '../../meshes/Image.js';
|
||||
import snoise2 from '../../glsl/snoise2.glsl.js';
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
createGeometry() {
|
||||
this.geometry = new PlaneBufferGeometry(1, 1, this.widthSegments, this.heightSegments);
|
||||
this.geometry = new PlaneGeometry(1, 1, this.widthSegments, this.heightSegments);
|
||||
},
|
||||
createMaterial() {
|
||||
this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {
|
||||
Mesh,
|
||||
PlaneBufferGeometry,
|
||||
PlaneGeometry,
|
||||
ShaderMaterial,
|
||||
Vector2,
|
||||
} from 'three';
|
||||
@ -19,7 +19,7 @@ export default function ZoomBlurImage(three) {
|
||||
return { geometry, material, mesh, uCenter, uStrength, setMap, updateUV };
|
||||
|
||||
function init() {
|
||||
geometry = new PlaneBufferGeometry(2, 2, 1, 1);
|
||||
geometry = new PlaneGeometry(2, 2, 1, 1);
|
||||
|
||||
material = new ShaderMaterial({
|
||||
transparent: true,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DoubleSide, MeshBasicMaterial, PlaneBufferGeometry, TextureLoader } from 'three';
|
||||
import { DoubleSide, MeshBasicMaterial, PlaneGeometry, TextureLoader } from 'three';
|
||||
import { watch } from 'vue';
|
||||
import Mesh from './Mesh.js';
|
||||
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
createGeometry() {
|
||||
this.geometry = new PlaneBufferGeometry(1, 1, 1, 1);
|
||||
this.geometry = new PlaneGeometry(1, 1, 1, 1);
|
||||
},
|
||||
createMaterial() {
|
||||
this.material = new MeshBasicMaterial({ side: DoubleSide, map: this.loadTexture() });
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PlaneBufferGeometry } from 'three';
|
||||
import { PlaneGeometry } from 'three';
|
||||
import { watch } from 'vue';
|
||||
import Mesh from './Mesh.js';
|
||||
|
||||
@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
createGeometry() {
|
||||
this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments);
|
||||
this.geometry = new PlaneGeometry(this.width, this.height, this.widthSegments, this.heightSegments);
|
||||
},
|
||||
},
|
||||
__hmrId: 'Plane',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FontLoader, TextBufferGeometry } from 'three';
|
||||
import { FontLoader, TextGeometry } from 'three';
|
||||
import { watch } from 'vue';
|
||||
import Mesh from './Mesh.js';
|
||||
import TextProps from './TextProps.js';
|
||||
@ -36,7 +36,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
createGeometry() {
|
||||
this.geometry = new TextBufferGeometry(this.text, {
|
||||
this.geometry = new TextGeometry(this.text, {
|
||||
font: this.font,
|
||||
size: this.size,
|
||||
height: this.height,
|
||||
|
Loading…
Reference in New Issue
Block a user