Skip to content
#

webgl

Here are 4,015 public repositories matching this topic...

Babylon.js
BStringhamVRSK
BStringhamVRSK commented Aug 12, 2021

Problem:
After using Engine.createTextureFromKtx/jpeg/Png, I need to query the texture width and height so I can generate proper UV coordinates for font display.

Proposed solution
Expose the Texture.getWidth(), getHeight(), etc. methods to get texture information. I currently only need width and height, but I can see usage cases for many of the other "getters" available in the C++ in

stevage
stevage commented Jun 24, 2021

Motivation

I often use this pattern for GeoJSON sources:

  1. addSource('mysource', { type: 'geojson', data: { type:'FeatureCollection', features: [] }});
  2. addLayer({ id: 'mylayer', source: 'mysource' })
  3. Now fetch the actual data, manipulate it, and call setData() to set it.

I do this because:

  • I need to fetch the data asynchronously (but I don't want to hold up all my other i

Improve this page

Add a description, image, and links to the webgl topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the webgl topic, visit your repo's landing page and select "manage topics."

Learn more