Giter Site home page Giter Site logo

Comments (2)

kalwalt avatar kalwalt commented on August 29, 2024

This toolkit is so awesome that I almost had no trouble to set things up :)

During my test, ideally we would love to cover the whole marker with media content. While under default setting, the height and width are almost identical even it is a 1024x480 or 360x720 media file.

@kalwalt Any input or code modification guidance would be appreciated. Thanks in advance!!

Also some heads up: the video is blacked out in iOS 14.6 (which never happened in previous iOS releases). I guess it is relevant with new privacy rules introduced.

@ronaldyang Sorry for the delay! I have limited time until the end of september.
About the width and the height: i think you are refering to the addVideo function, Now with the the new version is outside ARnft and is in a separate repository https://github.com/webarkit/ARnft-threejs see here

public addVideo (id: string, scale: number) {
const root = this.root
const ARVideo: HTMLVideoElement = document.getElementById(id) as HTMLVideoElement;
const texture = new VideoTexture(ARVideo as HTMLVideoElement)
const mat = new MeshStandardMaterial({ color: 0xbbbbff, map: texture })
ARVideo.play()
const planeGeom = new PlaneGeometry(1, 1, 1, 1)
const plane = new Mesh(planeGeom, mat)
plane.scale.set(scale, scale, scale)
document.addEventListener('getNFTData', (ev: any) => {
var msg = ev.detail
plane.position.y = (msg.height / msg.dpi * 2.54 * 10) / 2.0
plane.position.x = (msg.width / msg.dpi * 2.54 * 10) / 2.0
})
this.root.add(plane)
}

For sure need an improvement, there is also some issues with Firefox and other browsers #8 Maybe you have an idea?

from arnft-threejs.

kalwalt avatar kalwalt commented on August 29, 2024

@ronaldyang this was done in PR #26 let me know if it is ok for you. Closing this, open another issue if you have troubles.

from arnft-threejs.

Related Issues (19)

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.