Форум программистов, компьютерный форум, киберфорум
JavaScript: HTML5 Canvas
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.60/5: Рейтинг темы: голосов - 5, средняя оценка - 4.60
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86

three.js + GLTFLoader.js

17.07.2023, 16:00. Показов 1463. Ответов 11
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Доброго времени суток!
Подскажите анимация из Blender подключенная через three.js + GLTFLoader.js
работает только на сервере?
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
17.07.2023, 16:00
Ответы с готовыми решениями:

Вращение вокруг точки (pivot) нарисованной с помощью Three.js линии
С помощью JS three.js отрисовываю линию. Как ее вращать относительно ( 1.7, 21, 15 )? Или как-то динамически можно задавать координаты...

Ошибка ReferenceError: THREE is not defined
<html> <head> <meta charset="utf-8"> <title>Planet</title> <script src="three.min.js"></script> </head> <body> <script> var...

Как правильно скопировать существующий пример на three.js?
Парни, я валенок. К делу, есть пример использования three.js: Пример графопостроителя с threejs.org У меня есть желание...

11
89 / 74 / 24
Регистрация: 16.05.2023
Сообщений: 268
18.07.2023, 22:45
GLTF (glTF) могут работать как на сервере, так и на клиентской стороне
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
19.07.2023, 00:04  [ТС]
У меня почему то работает только с запущенным gulp
режим webpack "production"
вот такой вариант:
JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import * as THREE from 'three';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'
canvas = document.getElementById('canvas');
if(canvas) {
const scene = new THREE.Scene();
var width=window.innerWidth;
var height=window.innerHeight;
canvas = document.getElementById('canvas');
canvas.setAttribute('width', width);
canvas.setAttribute('height', height);
const camera = new THREE.PerspectiveCamera( 45, width / height, 0.1, 1000);
 
const renderer = new THREE.WebGLRenderer({canvas: canvas});
renderer.setClearColor(0x000000);
 
 
 
camera.position.set(0, 10, 25);
 
const loader = new GLTFLoader();
let main;
let mixer;
loader.load(
    
    // resource URL
    'images/main.gltf',
    // called when the resource is loaded
   
    function ( gltf ) {
        main=gltf.scene; // THREE.Group
        mixer = new THREE.AnimationMixer(main);
        const clips = gltf.animations;
        const clip = THREE.AnimationClip.findByName(clips, 'CubeAction');
        const action = mixer.clipAction(clip);
        action.play();
        main.position.z=15;
        main.position.y = 10;
        main.position.x = 0;
        scene.add( main );
    },
    // called while loading is progressing
    function ( xhr ) {
 
        console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
 
    },
    // called when loading has errors
    function ( error ) {
 
        console.log( 'An error happened' );
 
    }
);
const light = new THREE.AmbientLight(0xffffff);
 
scene.add(light);
const clock = new THREE.Clock();
function animate() {
    requestAnimationFrame( animate );
    mixer.update(clock.getDelta());
    renderer.render( scene, camera );
    main.rotation.y +=0.005;
    main.rotation.z +=0.005;
}
animate();
 
}
или вот этот работает с gulp или на сервере
three.js и GLTFLoader.js подключены как обычно в index.html

JavaScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
canvas = document.getElementById('canvas');
if(canvas) {
const scene = new THREE.Scene();
var width=window.innerWidth;
var height=window.innerHeight;
canvas = document.getElementById('canvas');
canvas.setAttribute('width', width);
canvas.setAttribute('height', height);
const camera = new THREE.PerspectiveCamera( 45, width / height, 0.1, 1000);
 
const renderer = new THREE.WebGLRenderer({canvas: canvas});
renderer.setClearColor(0xffffff);
 
 
 
camera.position.set(0, 10, 15);
 
const loader = new THREE.GLTFLoader();
let main;
//let mixer;
loader.load(
    
    // resource URL
    'images/main.gltf',
    // called when the resource is loaded
   
    function ( gltf ) {
        main=gltf.scene; // THREE.Group
        mixer = new THREE.AnimationMixer(main);
        const clips = gltf.animations;
        //const clip = THREE.AnimationClip.findByName(clips, 'CubeAction');
    //  const action = mixer.clipAction(clip);
    //  action.play();
        main.position.z=5;
        main.position.y = 8;
        main.position.x = 0;
        main.rotation.y = -2.3;
        main.rotation.x = 0.3;
        scene.add( main );
    },
    // called while loading is progressing
    function ( xhr ) {
 
        console.log( ( xhr.loaded / xhr.total * 100 ) + '% loaded' );
 
    },
    // called when loading has errors
    function ( error ) {
 
        console.log( 'An error happened' );
 
    }
);
const light = new THREE.AmbientLight(0xffffff);
 
scene.add(light);
const clock = new THREE.Clock();
function animate() {
    requestAnimationFrame( animate );
    //mixer.update(clock.getDelta());
    renderer.render( scene, camera );
 
}
animate();
 
}
0
89 / 74 / 24
Регистрация: 16.05.2023
Сообщений: 268
19.07.2023, 02:23
Вот пример 1 страницы html

PHP/HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="en" >
<head>
    <style>
    body {
      font-family: Monospace;
      background: #222;
      color: #fff;
      margin: 0px;
      overflow: hidden;
    }
    </style>
</head>
<body>
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r124/three.min.js"></script>
<script src="https://unpkg.com/three@0.126.0/examples/js/loaders/GLTFLoader.js"></script>
<script src="https://unpkg.com/three@0.126.0/examples/js/controls/OrbitControls.js"></script>
  <script>
//===================================================== canvas
  var renderer = new THREE.WebGLRenderer({ alpha: true, antialiase: true });
  renderer.setSize(window.innerWidth, window.innerHeight);
  document.body.appendChild(renderer.domElement);
 
  //===================================================== scene
  var scene = new THREE.Scene();
 
  //===================================================== camera
  var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000);
  camera.position.z = 5;
  camera.position.y = 1.5;
 
  //===================================================== lights
  var light = new THREE.DirectionalLight(0xefefff, 3);
  light.position.set(1, 1, 1).normalize();
  scene.add(light);
  var light = new THREE.DirectionalLight(0xffefef, 3);
  light.position.set(-1, -1, -1).normalize();
  scene.add(light);
 
  //===================================================== resize
  window.addEventListener("resize", function() {
    let width = window.innerWidth;
    let height = window.innerHeight;
    renderer.setSize(width, height);
    camera.aspect = width / height;
    camera.updateProjectionMatrix();
  });
 
 
  //===================================================== model
  var loader = new THREE.GLTFLoader();
  var mixer;
  var model;
  loader.load(
    "https://raw.githubusercontent.com/baronwatts/models/master/robber.glb", function(gltf) {
 
       gltf.scene.traverse( function( node ) {
          if ( node instanceof THREE.Mesh ) { 
            node.castShadow = true; 
            node.material.side = THREE.DoubleSide;
          }
        });
 
       
      model = gltf.scene;
      model.scale.set(.35,.35,.35);
      scene.add(model);
 
      console.log(gltf.animations); //shows all animations imported into the dopesheet in blender
 
      mixer = new THREE.AnimationMixer(model);
      mixer.clipAction(gltf.animations[1]).play();
 
      document.body.addEventListener("click", kill);
      function kill() {
        mixer.clipAction(gltf.animations[1]).stop();
        mixer.clipAction(gltf.animations[0]).play();
        setTimeout(function() {
          mixer.clipAction(gltf.animations[0]).stop();
          mixer.clipAction(gltf.animations[1]).play();
        }, 1500);
      }
 
 
  });
 
 
//===================================================== animate
var clock = new THREE.Clock();
function render() {
  requestAnimationFrame(render);
  var delta = clock.getDelta();
  if (mixer != null) mixer.update(delta);
  if (model) model.rotation.y += 0.025;
 
  renderer.render(scene, camera);
}
 
render();
  </script>
 
</body>
</html>
Добавлено через 9 минут
PHP/HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html>
<html lang="en" >
<head>
</head>
<body style="margin: 0;height: 100%;">
<canvas id="c" style="width: 100%;height: 100%;display: block;"></canvas>
  
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r103/three.js"></script>
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r103/js/controls/OrbitControls.js"></script>
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r103/js/loaders/GLTFLoader.js"></script>
<script src="https://threejsfundamentals.org/3rdparty/dat.gui.min.js"></script>
 
  <script>
function main() {
  const canvas = document.querySelector('#c');
  const renderer = new THREE.WebGLRenderer({canvas: canvas});
 
  const fov = 45;
  const aspect = 2;  // the canvas default
  const near = 0.1;
  const far = 100;
  const camera = new THREE.PerspectiveCamera(fov, aspect, near, far);
  camera.position.set(0, 10, 20);
 
  const controls = new THREE.OrbitControls(camera, canvas);
  controls.target.set(0, 5, 0);
  controls.update();
 
  const scene = new THREE.Scene();
  scene.background = new THREE.Color('black');
 
  {
    const planeSize = 40;
 
    const loader = new THREE.TextureLoader();
    const texture = loader.load('https://threejsfundamentals.org/threejs/resources/images/checker.png');
    texture.wrapS = THREE.RepeatWrapping;
    texture.wrapT = THREE.RepeatWrapping;
    texture.magFilter = THREE.NearestFilter;
    const repeats = planeSize / 2;
    texture.repeat.set(repeats, repeats);
 
    const planeGeo = new THREE.PlaneBufferGeometry(planeSize, planeSize);
    const planeMat = new THREE.MeshPhongMaterial({
      map: texture,
      side: THREE.DoubleSide,
    });
    const mesh = new THREE.Mesh(planeGeo, planeMat);
    mesh.rotation.x = Math.PI * -.5;
    scene.add(mesh);
  }
 
  {
    const skyColor = 0xB1E1FF;  // light blue
    const groundColor = 0xB97A20;  // brownish orange
    const intensity = 1;
    const light = new THREE.HemisphereLight(skyColor, groundColor, intensity);
    scene.add(light);
  }
 
  {
    const color = 0xFFFFFF;
    const intensity = 1;
    const light = new THREE.DirectionalLight(color, intensity);
    light.position.set(5, 10, 2);
    scene.add(light);
    scene.add(light.target);
  }
 
  function frameArea(sizeToFitOnScreen, boxSize, boxCenter, camera) {
    const halfSizeToFitOnScreen = sizeToFitOnScreen * 0.5;
    const halfFovY = THREE.Math.degToRad(camera.fov * .5);
    const distance = halfSizeToFitOnScreen / Math.tan(halfFovY);
    // compute a unit vector that points in the direction the camera is now
    // in the xz plane from the center of the box
    const direction = (new THREE.Vector3())
        .subVectors(camera.position, boxCenter)
        .multiply(new THREE.Vector3(1, 0, 1))
        .normalize();
 
    // move the camera to a position distance units way from the center
    // in whatever direction the camera was from the center already
    camera.position.copy(direction.multiplyScalar(distance).add(boxCenter));
 
    // pick some near and far values for the frustum that
    // will contain the box.
    camera.near = boxSize / 100;
    camera.far = boxSize * 100;
 
    camera.updateProjectionMatrix();
 
    // point the camera to look at the center of the box
    camera.lookAt(boxCenter.x, boxCenter.y, boxCenter.z);
  }
 
  let curve;
  let curveObject;
  {
    const controlPoints = [
      [1.118281, 5.115846, -3.681386],
      [3.948875, 5.115846, -3.641834],
      [3.960072, 5.115846, -0.240352],
      [3.985447, 5.115846, 4.585005],
      [-3.793631, 5.115846, 4.585006],
      [-3.826839, 5.115846, -14.736200],
      [-14.542292, 5.115846, -14.765865],
      [-14.520929, 5.115846, -3.627002],
      [-5.452815, 5.115846, -3.634418],
      [-5.467251, 5.115846, 4.549161],
      [-13.266233, 5.115846, 4.567083],
      [-13.250067, 5.115846, -13.499271],
      [4.081842, 5.115846, -13.435463],
      [4.125436, 5.115846, -5.334928],
      [-14.521364, 5.115846, -5.239871],
      [-14.510466, 5.115846, 5.486727],
      [5.745666, 5.115846, 5.510492],
      [5.787942, 5.115846, -14.728308],
      [-5.423720, 5.115846, -14.761919],
      [-5.373599, 5.115846, -3.704133],
      [1.004861, 5.115846, -3.641834],
    ];
    const p0 = new THREE.Vector3();
    const p1 = new THREE.Vector3();
    curve = new THREE.CatmullRomCurve3(
      controlPoints.map((p, ndx) => {
        p0.set(...p);
        p1.set(...controlPoints[(ndx + 1) % controlPoints.length]);
        return [
          (new THREE.Vector3()).copy(p0),
          (new THREE.Vector3()).lerpVectors(p0, p1, 0.1),
          (new THREE.Vector3()).lerpVectors(p0, p1, 0.9),
        ];
      }).flat(),
      true,
    );
    {
      const points = curve.getPoints(250);
      const geometry = new THREE.BufferGeometry().setFromPoints(points);
      const material = new THREE.LineBasicMaterial({color: 0xff0000});
      curveObject = new THREE.Line(geometry, material);
      curveObject.scale.set(100, 100, 100);
      curveObject.position.y = -621;
      curveObject.visible = false;
      material.depthTest = false;
      curveObject.renderOrder = 1;
      scene.add(curveObject);
    }
  }
 
  const cars = [];
  {
    const gltfLoader = new THREE.GLTFLoader();
    gltfLoader.load('https://threejsfundamentals.org/threejs/resources/models/cartoon_lowpoly_small_city_free_pack/scene.gltf', (gltf) => {
      const root = gltf.scene;
      scene.add(root);
 
      const loadedCars = root.getObjectByName('Cars');
      const fixes = [
        { prefix: 'Car_08', y: 0,  rot: [Math.PI * .5, 0, Math.PI * .5], },
        { prefix: 'CAR_03', y: 33, rot: [0, Math.PI, 0], },
        { prefix: 'Car_04', y: 40, rot: [0, Math.PI, 0], },
      ];
 
      root.updateMatrixWorld();
      for (const car of loadedCars.children.slice()) {
        const fix = fixes.find(fix => car.name.startsWith(fix.prefix));
        const obj = new THREE.Object3D();
        car.position.set(0, fix.y, 0);
        car.rotation.set(...fix.rot);
        obj.add(car);
        scene.add(obj);
        cars.push(obj);
      }
 
      // compute the box that contains all the stuff
      // from root and below
      const box = new THREE.Box3().setFromObject(root);
 
      const boxSize = box.getSize(new THREE.Vector3()).length();
      const boxCenter = box.getCenter(new THREE.Vector3());
 
      // set the camera to frame the box
      frameArea(boxSize * 0.5, boxSize, boxCenter, camera);
 
      // update the Trackball controls to handle the new size
      controls.maxDistance = boxSize * 10;
      controls.target.copy(boxCenter);
      controls.update();
    });
  }
 
  function resizeRendererToDisplaySize(renderer) {
    const canvas = renderer.domElement;
    const width = canvas.clientWidth;
    const height = canvas.clientHeight;
    const needResize = canvas.width !== width || canvas.height !== height;
    if (needResize) {
      renderer.setSize(width, height, false);
    }
    return needResize;
  }
 
  // create 2 Vector3s we can use for path calculations
  const carPosition = new THREE.Vector3();
  const carTarget = new THREE.Vector3();
 
  function render(time) {
    time *= 0.001;  // convert to seconds
 
    if (resizeRendererToDisplaySize(renderer)) {
      const canvas = renderer.domElement;
      camera.aspect = canvas.clientWidth / canvas.clientHeight;
      camera.updateProjectionMatrix();
    }
 
    {
      const pathTime = time * .01;
      const targetOffset = 0.01;
      cars.forEach((car, ndx) => {
        // a number between 0 and 1 to evenly space the cars
        const u = pathTime + ndx / cars.length;
 
        // get the first point
        curve.getPointAt(u % 1, carPosition);
        carPosition.applyMatrix4(curveObject.matrixWorld);
 
        // get a second point slightly further down the curve
        curve.getPointAt((u + targetOffset) % 1, carTarget);
        carTarget.applyMatrix4(curveObject.matrixWorld);
 
        // put the car at the first point (temporarily)
        car.position.copy(carPosition);
        // point the car the second point
        car.lookAt(carTarget);
 
        // put the car between the 2 points
        car.position.lerpVectors(carPosition, carTarget, 0.5);
      });
    }
 
    renderer.render(scene, camera);
 
    requestAnimationFrame(render);
  }
 
  requestAnimationFrame(render);
}
 
main();
  </script>
 
</body>
</html>
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
19.07.2023, 09:27  [ТС]
Спасибо за ответ.
Я пример с таким подключением пробовал. Он действительно рабочий.
Но меня интересует подключение через import
или подключение файлами.
0
89 / 74 / 24
Регистрация: 16.05.2023
Сообщений: 268
19.07.2023, 16:24
F12 и в консоли смотрите, на что ругается.
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
19.07.2023, 17:04  [ТС]
Там где three.js и GLTFLoader.js подключены в import
В консоле:

TypeError: undefined has no properties


При этом как я понимаю three.js работает.
Миниатюры
three.js + GLTFLoader.js   three.js + GLTFLoader.js  
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
19.07.2023, 17:09  [ТС]
это вариант подключения фалов в index

в консоле


Uncaught TypeError: mixer is undefined
Миниатюры
three.js + GLTFLoader.js  
0
89 / 74 / 24
Регистрация: 16.05.2023
Сообщений: 268
19.07.2023, 18:57
Нужна демка, что бы понять что с подключениями и так далее

Добавлено через 1 минуту
Вообще, когда уже происходит BUILD ресурсов в папку dist, то все ресурсы собираются адекватно.
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
19.07.2023, 23:54  [ТС]
Собирается вроде нормально.
прикрепил исходники от обоих вариантов
Вложения
Тип файла: zip src.zip (39.2 Кб, 5 просмотров)
Тип файла: zip src2.zip (378.6 Кб, 5 просмотров)
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
20.07.2023, 00:04  [ТС]
Сборка
Вложения
Тип файла: zip sbor.zip (163.6 Кб, 7 просмотров)
0
0 / 0 / 0
Регистрация: 21.09.2015
Сообщений: 86
21.07.2023, 14:38  [ТС]
Решил проблему отключив CORS в браузере
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
21.07.2023, 14:38
Помогаю со студенческими работами здесь

Three.js усечённый додекаэдр
Здравствуйте. Как создать усечённый додекаэдр? Более-менее получилось разобраться с просто додекаэдром, но вот с усечённым вообще не...

Three.js Вращение по оси
Использую последнюю версию библиотеки three.js. Сделал сферу, которая вращается по оси. Но она оставляет непонятный след на второй...

Не отображается объект в three.js
Сначала создал сферу, натянул на неё текстурку, все работало. Решил создать конструктор объектов, и что-то пошло не так. объект тупо не...

Как изменить положение обьекта с прототипом THREE.Object3D
Здравствуйте. Не могу разобраться. Помогите пожалуйста! На сцену добавляю свой класс наследуемый от THREE.Object3D. В него...

Three.js цилиндрическая панорама
Доброго времени суток, собственно в чём вопрос. С помощью данного скрипта можно сделать сферическую панораму, есть много уроков и т.п. Но...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
12
Ответ Создать тему
Новые блоги и статьи
SDL3 для Web (WebAssembly): Реализация движения на Box2D v3 - трение и коллизии с повёрнутыми стенами
8Observer8 20.02.2026
Содержание блога Box2D позволяет легко создать главного героя, который не проходит сквозь стены и перемещается с заданным трением о препятствия, которые можно располагать под углом, как верхнее. . .
Конвертировать закладки radiotray-ng в m3u-плейлист
damix 19.02.2026
Это можно сделать скриптом для PowerShell. Использование . \СonvertRadiotrayToM3U. ps1 <path_to_bookmarks. json> Рядом с файлом bookmarks. json появится файл bookmarks. m3u с результатом. # Check if. . .
Семь CDC на одном интерфейсе: 5 U[S]ARTов, 1 CAN и 1 SSI
Eddy_Em 18.02.2026
Постепенно допиливаю свою "многоинтерфейсную плату". Выглядит вот так: https:/ / www. cyberforum. ru/ blog_attachment. php?attachmentid=11617&stc=1&d=1771445347 Основана на STM32F303RBT6. На борту пять. . .
Камера Toupcam IUA500KMA
Eddy_Em 12.02.2026
Т. к. у всяких "хикроботов" слишком уж мелкий пиксель, для подсмотра в ESPriF они вообще плохо годятся: уже 14 величину можно рассмотреть еле-еле лишь на экспозициях под 3 секунды (а то и больше),. . .
И ясному Солнцу
zbw 12.02.2026
И ясному Солнцу, и светлой Луне. В мире покоя нет и люди не могут жить в тишине. А жить им немного лет.
«Знание-Сила»
zbw 12.02.2026
«Знание-Сила» «Время-Деньги» «Деньги -Пуля»
SDL3 для Web (WebAssembly): Подключение Box2D v3, физика и отрисовка коллайдеров
8Observer8 12.02.2026
Содержание блога Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами и вызывать обработчики событий столкновения. . . .
SDL3 для Web (WebAssembly): Загрузка PNG с прозрачным фоном с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 11.02.2026
Содержание блога Библиотека SDL3 содержит встроенные инструменты для базовой работы с изображениями - без использования библиотеки SDL3_image. Пошагово создадим проект для загрузки изображения. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru