robgillth
Forum Replies Created
-
Forum: Plugins
In reply to: [Code Embed] three.js + physi.jsok fair enough.
Thank you againForum: Plugins
In reply to: [Code Embed] three.js + physi.jshello David,
Yes – the code is the same as I entered it.
I have posted on that page a screenshot of the source and three screenshots of the developer tools (Firefox) (it doesn’t look like I can upload images here).
The problem seems to be with the physi.js library (?) – I suppose I should be posting to the physi.js github page, but, again, it works in a local server.thank you for looking into this
Forum: Plugins
In reply to: [Code Embed] three.js + physi.jsI should also note that this code works using a local server. I re-worked the code to remove anything unnecessary:
<script type="text/javascript" charset="UTF-8" src="../libs/three/build/three.js"></script> <script type="text/javascript" charset="UTF-8" src="../libs/other/physijs/physi.js"></script> <script> Physijs.scripts.worker = '../libs/other/physijs/physijs_worker.js'; Physijs.scripts.ammo = './ammo.js'; var scene = new Physijs.Scene; var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000); var renderer = new THREE.WebGLRenderer(); renderer.setClearColor(new THREE.Color(0x000000)); renderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(renderer.domElement); var cube = new Physijs.BoxMesh(new THREE.BoxGeometry(4, 4, 4), Physijs.createMaterial(new THREE.MeshStandardMaterial({color: 0x0000ff}), 0.4, 0.4)); cube.position.x = -4; cube.position.y = 2; cube.position.z = 0; scene.add(cube); camera.position.x = -30; camera.position.y = 40; camera.position.z = 30; camera.lookAt(scene.position); var spotLight = new THREE.SpotLight(0xFFFFFF); spotLight.position.set(-40, 40, -15); scene.add(spotLight); var ambientLight = new THREE.AmbientLight(0x353535); scene.add(ambientLight); render(); function render() { requestAnimationFrame(render); renderer.render(scene, camera); scene.simulate(undefined, 1); } </script>
Forum: Themes and Templates
In reply to: [Twenty Twenty] embed (Bandcamp) sizing issueUnfortunately no. It’s going to require more than just some inline CSS. I don’t have the time or expertise to attempt to fix this at deeper levels (ie. functions.php) right now. I have read in many places that working with iframes is tricky. I am going to have to abandon using Bandcamp embeds for now and just use clickable images that take the visitor to the associated Bandcamp page.
Understood – even though the problem hasn’t been entirely remedied, this is still progress. Thank you very much for your help on this!
Ultimately I need this to work on pages where there are embeds from other sources.
I am addressing this remark:
“The variation in the Vimeo video size on /agp/ is coming from Vimeo directly and isn’t being caused by the code provided earlier. ”
Yes, you’re right, my mistake. Here’s the page I am working on currently: https://robgillthings.net/agp/
thank you for your attention to this!
Those Vimeo embeds are on the same page so the above code has the same effect.
I tried it out and it succeeded in reducing the size of the Bandcamp embed but it also made all of the Vimeo embeds on the same page very tiny (most are 16:9 aspect ratio).
Yes – I used a shortcode block:
‘[bandcamp width=350 height=470 album=152909386 size=large bgcol=ffffff linkcol=0687f5 tracklist=false]’
I switched to the 2021 theme and it works as expected there.
I am using the ‘Options for Twentytwenty’ plug-in (in the 2020 theme) to adjust the width of the content area from the default 58rem(580px) to 100rem(1000px) and the player expands to the same width (1000px). I tried doing the same with the 2021 theme (using the ‘Options for twentytwentyone’ plug-in) and it does not make the player change size. I don’t know how to get around this as I need the content to be wider than 580px and would prefer to use the 2020 theme. Also, even though I used the shortcode, the theme has somehow converted the player to the html iframe version (as if I did not choose the ‘wordpress.com’ option in the Bandcamp code embed popup). At this point, I am thinking this may be a theme issue but I just don’t know.thank you for looking into this,
Yes – I used a shortcode block:
‘[bandcamp width=350 height=470 album=152909386 size=large bgcol=ffffff linkcol=0687f5 tracklist=false]’
I switched to the 2021 theme and it works as expected there.
I am using the ‘Options for Twentytwenty’ plug in (in the 2020 theme) to adjust the width of the content area from the default 58rem(580px) to 100rem(1000px) and that is what makes the player expand to that width. I tried doing the same with the 2021 theme (using the ‘Options for twentytwentyone’ plug-in) and it does not make the player change size. I don’t know how to get around this as I need the content to be wider than 580px and would prefer to use the 2020 theme. Also, even though I used the shortcode, the theme has somehow converted the player to the html iframe version (as if I did not choose the ‘wordpress.com’ option in the Bandcamp code embed popup). At this point, I am thinking this may be a theme issue but I just don’t know.thank you for looking into this,