This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source https://github.com/codemaker2015/log4j-vulnerability-finder | |
# needs locate to be installed, be sure to be up-to-date with | |
# sudo updatedb | |
# regular expression, check the following packages: | |
PACKAGES='solr\|elastic\|log4j' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import com.google.ar.sceneform.ux.ArFragment; | |
public class MainActivity extends AppCompatActivity { | |
ArFragment arFragment; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<androidx.fragment.app.FragmentContainerView | |
android:id="@+id/arFragment" | |
android:name="com.google.ar.sceneform.ux.ArFragment" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uses-permission android:name="android.permission.CAMERA" /> | |
<uses-feature android:name="android.hardware.camera.ar" /> | |
<application | |
...> | |
... | |
<meta-data android:name="com.google.ar.core" android:value="required" /> | |
</application> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
... | |
implementation "com.gorisse.thomas.sceneform:sceneform:1.20.5" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initializeXRApp() { | |
const { devicePixelRatio, innerHeight, innerWidth } = window; | |
// Create a new WebGL renderer and set the size + pixel ratio. | |
const renderer = new WebGLRenderer({ antialias: true, alpha: true }) | |
renderer.setSize(innerWidth, innerHeight); | |
renderer.setPixelRatio(devicePixelRatio); | |
// Enable XR functionality on the renderer. | |
renderer.xr.enabled = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function start() { | |
// Check if browser supports WebXR with "immersive-ar". | |
const immersiveArSupported = await browserHasImmersiveArCompatibility(); | |
// Initialize app if supported. | |
immersiveArSupported ? | |
initializeXRApp() : | |
displayUnsupportedBrowserMessage(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function createScene(renderer: WebGLRenderer) { | |
const scene = new Scene(); | |
const camera = new PerspectiveCamera( | |
70, | |
window.innerWidth / window.innerHeight, | |
0.02, | |
20, | |
) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function createScene(renderer: WebGLRenderer) { | |
const scene = new Scene() | |
const camera = new PerspectiveCamera( | |
70, | |
window.innerWidth / window.innerHeight, | |
0.02, | |
20, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function handleXRHitTest( | |
renderer: WebGLRenderer, | |
frame: XRFrame, | |
onHitTestResultReady: (hitPoseMatrix: Float32Array) => void, | |
onHitTestResultEmpty: () => void, | |
) { | |
const referenceSpace = renderer.xr.getReferenceSpace(); | |
const session = renderer.xr.getSession(); | |
let xrHitPoseMatrix: Float32Array | null | undefined; |
OlderNewer