Skip to content

小程序ar环境下加载纹理会在渲染一瞬间后消失 #38

@632366134

Description

@632366134

let geometry = new THREE.PlaneGeometry(2, 2);
let loader = new THREE.TextureLoader();
const texture = await loader.loadAsync(data);
const material = new THREE.MeshBasicMaterial({
side: THREE.DoubleSide,
map: texture,
});

        texture.minFilter = THREE.LinearFilter;
        texture.flipY = false;
        texture.wrapS = texture.wrapT = THREE.ClampToEdgeWrapping;
        let model = (this.model = new THREE.Mesh(geometry, material));
     
       model.rotation.set(-Math.PI / 2, 0, 0);

this.scene.add(model)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions