android ANativeWindow rotation rendering angle

android ANativeWindow rotation rendering angle MediaCodec rotation angle reference videoExtractor opens an angled video file mediaFormat.getInteger(MediaFormat.KEY_ROTATION); gets the angle MediaFormat mediaFormat = videoExtractor.getTrackFormat(j); String mime = mediaFormat.getString(MediaFormat.KEY_MIME); if (mime.startsWith(KEY_VIDEO)) {//Match the track corresponding to the video videoExtractor.selectTrack(j);//Select the track corresponding to the video long duration = mediaFormat.getLong(MediaFormat.KEY_DURATION); int width = mediaFormat.getInteger(MediaFormat.KEY_WIDTH); int height = mediaFormat.getInteger(MediaFormat.KEY_HEIGHT); […]

3D rendering principle and simple JavaScript implementation [without using WebGL]

Displaying images and other flat shapes in web pages is very easy. However, when it comes to displaying 3D shapes, things become less easy because 3D geometry is more complex than 2D geometry. To do this, you can use specialized technologies and libraries such as WebGL and Three.js. However, if you just want to display […]

SpringBoot3+Vue3+Mysql+Element Plus completes the database storage of blob type images, and the front end renders the base64 type images transmitted from the back end.

Foreword If your front-end and back-end separation project uses SpringBoot3 + Vue3 + Element Plus, and without OSS (object storage), use mysql to read and write images (may not be limited to images, to be tested). It took three days and after stepping on countless minefields, this function was finally completed. Presented to you. Complete […]

How to add permissions to vxetable right-click menu options and render based on row data

How to add permissions to vxetable right-click menu options and render based on row data Business scenario: ? The page has button permissions, and the right-click menu function is also implemented on the form. It is also necessary to control the permission function of the right-click menu. Solution ideas: By viewing the document, right-click the […]

web3 takes out all completed orders from redux and renders them into the corresponding Table list

The above web3 React dapp project gets canceled and completed and all order data from the blockchain through events and stores them in redux. In we have got our order from the block Then we restore the above environment ganache ganache -d Then log in to MetaMask Then use our project to publish the contract […]

Rotation animation, requestAnimationFrame periodic rendering

The development of online games, product displays, and indoor roaming based on WebGL technology often involves animation. 1. Periodic rendering In order to achieve periodic rendering, you can use a method setInterval() of the browser global object window object. You can call this method window.setInterval(), you can also call setInterval() directly in function form. setInterval() […]

Use Android Jetpack Compose rendering effects to create cool animation effects

How to use rendering effects to create a stunning visual experience in Android Jetpack Compose Learning example: How to use rendering effects to change the UI interface Introduction Jetpack Compose provides a variety of tools and components for building engaging UIs, but one of the lesser-known gems in Compose is RenderEffect. In this blog post, […]

Pyvista reads VTK files to render 3D cloud images and slice and crop them (1)

Pyvista official documentation: https://qtdocs.pyvista.org/index.html The following code was written by me after checking the official documentation API, and it contains the translation of the official API. The notes are very detailed, so the author won’t go into details. Three-dimensional cloud drawing effect: Surface: Surface + Mesh: Gridlines: Surface Points + Right-click to select Show Data: […]

Lightweight encapsulation WebGPU rendering system example <21> – 3D rendering of cellular automaton Game of Life (source code)

Implementation principle: basic PBR lighting and gpu compute calculation Try to use a data-based/semantic loose description of data to present relevant object logic. Current sample source code github address: https://github.com/vilyLei/voxwebgpu/blob/feature/rendering/src/voxgpu/sample/GameOfLife3DPBR.tsCurrent sample running effect: Other effect screenshots: This example is implemented based on this rendering system. The current example TypeScript source code is as follows: const […]

React simple server rendering example (including the use of redux, redux-thunk)

1. package.json { “name”: “react-server”, “version”: “1.0.0”, “description”: “”, “main”: “index.js”, “scripts”: { “dev”: “npm-run-all –parallel dev:**”, “dev:build:client”: “webpack –config config/webpack.client.js –watch”, “dev:build:server”: “webpack –config config/webpack.server.js –watch”, “dev:start”: “nodemon –watch dist –exec node “./dist/bundle.js”” }, “keywords”: [], “author”: “”, “license”: “ISC”, “devDependencies”: { “@babel/core”: “^7.0.0”, “@babel/plugin-proposal-private-property-in-object”: “^7.21.11”, “@babel/preset-env”: “^7.22.20”, “@babel/preset-react”: “^7.22.15”, “@babel/preset-stage-0”: “^7.8.3”, “@babel/preset-typescript”: “^7.23.0”, […]