Coder Social home page Coder Social logo

Comments (5)

Almost-Done avatar Almost-Done commented on May 27, 2024 1

Let's keep this issue open; I'll try to merge a fix in the next day or so.

from holojs.

Almost-Done avatar Almost-Done commented on May 27, 2024 1

I merged the changes with 3f2f206

The fix is in the 1.5.0 NuGet package
The fix is in Spin v3.1

from holojs.

Almost-Done avatar Almost-Done commented on May 27, 2024 1

Here's a JS snippet:

    var imageElement = document.createElement('img');
    imageElement.onload = function(e) {
        let texture = new THREE.Texture( this );
        texture.needsUpdate = true;

        let material = new THREE.MeshBasicMaterial( {  map: texture } );
        let geometry = new THREE.BoxBufferGeometry(0.3, 0.3, 0.3);
        let cube = new THREE.Mesh(geometry, material);
        cube.position.z = -1.5;
        cube.position.y = 1.6;
        scene.add(cube);
    };

    imageElement.src = 'camera://local/default';

After onload fires, you can set the source again to 'camera://local/default' and onload will fire again with a new photo. However, this is inefficient; a better way would be to have camera as a source for a Video element and grab frames as needed.

from holojs.

Almost-Done avatar Almost-Done commented on May 27, 2024

Access to the PV camera is not implemented in HoloJs V2 and Spin. It was also omitted from the breaking changes list - sorry about that.

It should be straightforward to add back.

from holojs.

Peiffert avatar Peiffert commented on May 27, 2024

Alright, thank you for this quick answer. 👍

from holojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.